瀏覽代碼

休店管理

shish 7 月之前
父節點
當前提交
e8eb4e48f9

+ 0 - 27
mallApp/src/pages/goods/detail.vue

@@ -327,33 +327,6 @@ export default {
       });
     },
     showPopup() {
-      const currentShop = uni.getStorageSync('currentShop');
-
-      if (this.$util.isEmpty(currentShop)) {
-        console.error("当前所在门店数据异常");
-      } else if (currentShop.openStartTime !='' && currentShop.openEndTime !='') {
-        // 当前小时与分钟是否在营业时间范围内
-        const currentTime = new Date();
-        const currentHour = currentTime.getHours();
-        const currentMinute = currentTime.getMinutes();
-
-        const openTime = currentShop.openStartTime; //营业开始时间,例如:3:30
-        const openHour = parseInt(openTime.split(':')[0]);
-        const openMinute = parseInt(openTime.split(':')[1]);
-        const closeTime = currentShop.openEndTime; //营业结束时间,例如:18:30
-        const closeHour = parseInt(closeTime.split(':')[0]);
-        const closeMinute = parseInt(closeTime.split(':')[1]);
-
-        if (currentHour < openHour || (currentHour === openHour && currentMinute < openMinute)) {
-          this.$msg("已休店");
-          return;
-        }
-        if (currentHour > closeHour || (currentHour === closeHour && currentMinute > closeMinute)) {
-          this.$msg("已休店");
-          return;
-        }
-      }
-
       this.popupShow = true;
     },
     hidePopup() {

+ 18 - 5
mallApp/src/pages/home/recent.vue

@@ -155,10 +155,10 @@
 
             <!-- 操作按钮组 -->
             <view class="action-buttons">
-              <view class="action-btn secondary" @click.stop="bug(item)">
+              <view class="action-btn secondary" :class="{ disabled: item.openShop === 0 }" @click.stop="bug(item)">
                 <text class="btn-text">🌸 花材</text>
               </view>
-              <view class="action-btn secondary" @click.stop="hs(item)">
+              <view class="action-btn secondary" :class="{ disabled: item.openShop === 0 }" @click.stop="hs(item)">
                 <text class="btn-text">💐 绿植花束</text>
               </view>
             </view>
@@ -300,12 +300,18 @@ export default {
       });
     },
     bug(item) {
+      if(item.openShop == 0){
+        this.$msg('已休店')
+        return
+      }
       this.pageTo({ url: "/pages/item/item?account=" + item.shopId + "&hdId=" + item.id, })
     },
     hs(item) {
-      this.pageTo({
-        url: "/pages/home/category?id=" + item.id + "&account=" + item.shopId,
-      });
+      if(item.openShop == 0){
+        this.$msg('已休店')
+        return
+      }
+      this.pageTo({ url: "/pages/home/category?id=" + item.id + "&account=" + item.shopId, })
     },
     tj(item) {
       this.pageTo({
@@ -837,6 +843,13 @@ page {
       &.secondary {
         background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
         flex: 1.1;
+
+        &.disabled {
+          background: linear-gradient(135deg, #ccc 0%, #999 100%);
+          opacity: 0.6;
+          box-shadow: none;
+          pointer-events: none;
+        }
       }
 
       &.tertiary {

+ 0 - 26
mallApp/src/pages/item/item.vue

@@ -470,32 +470,6 @@ export default {
 		},
 		confirmSelectEvent() {
 			if (this.selectList.length > 0) {
-				const currentShop = uni.getStorageSync('currentShop');
-				if (this.$util.isEmpty(currentShop)) {
-					console.error("当前所在门店数据异常");
-				} else if (currentShop.openStartTime !='' && currentShop.openEndTime !='') {
-					// 当前小时与分钟是否在营业时间范围内
-					const currentTime = new Date();
-					const currentHour = currentTime.getHours();
-					const currentMinute = currentTime.getMinutes();
-
-					const openTime = currentShop.openStartTime; //营业开始时间,例如:3:30
-					const openHour = parseInt(openTime.split(':')[0]);
-					const openMinute = parseInt(openTime.split(':')[1]);
-					const closeTime = currentShop.openEndTime; //营业结束时间,例如:18:30
-					const closeHour = parseInt(closeTime.split(':')[0]);
-					const closeMinute = parseInt(closeTime.split(':')[1]);
-
-					if (currentHour < openHour || (currentHour === openHour && currentMinute < openMinute)) {
-						this.$msg("已休店");
-						return;
-					}
-					if (currentHour > closeHour || (currentHour === closeHour && currentMinute > closeMinute)) {
-						this.$msg("已休店");
-						return;
-					}
-				}
-
 				//因历史遗留原因,打开花材页马上点花材出现数量0或null的情况,需要过滤 shish 20210716
 				let selectList = this.selectList;
 				let list = [];

+ 3 - 1
mallApp/src/pages/order/buy.vue

@@ -197,7 +197,9 @@ export default {
       this.form.sendCost = this.freightPrice
     },
     formSubmit() {
-      this.createOrderFn()
+			this.$util.confirmModal({content:'确认提交'},() => {
+			  this.createOrderFn()	
+			})
     },
     createOrderFn() {
       let hdId = this.option.hdId?this.option.hdId:0