ソースを参照

开始制作管理

shish 4 年 前
コミット
a42c2b5aa7
1 ファイル変更26 行追加2 行削除
  1. 26 2
      hdPad/src/pages/home/components/workInfo.vue

+ 26 - 2
hdPad/src/pages/home/components/workInfo.vue

@@ -10,6 +10,11 @@
       </view>
       </view>
       <view class="order-item">
       <view class="order-item">
 
 
+        <view v-if="beginCount > 0 && orderInfo.fromType == 4" style="min-height:35upx;height:auto;">
+          <text class="left">开始制作</text>
+          <text class="right" style="color:red;font-weight:bold;font-size:20upx;">{{beginCount}} 秒后</text>
+        </view>
+
         <view v-if="orderInfo.hasReachTime == 1"><text class="left">配送</text>
         <view v-if="orderInfo.hasReachTime == 1"><text class="left">配送</text>
           <text class="right" style="color:red;font-weight:bold;">
           <text class="right" style="color:red;font-weight:bold;">
             <text v-if="orderInfo.reachDate == orderInfo.today">今天</text>
             <text v-if="orderInfo.reachDate == orderInfo.today">今天</text>
@@ -168,7 +173,9 @@ export default {
       customData:{},
       customData:{},
       workItemId:0,
       workItemId:0,
       currentJobType:'modify',
       currentJobType:'modify',
-      currentJobId:0
+      currentJobId:0,
+      beginCount:0,
+      INT:null
     }
     }
   },
   },
 	props: {
 	props: {
@@ -196,11 +203,15 @@ export default {
     // #endif          
     // #endif          
   },
   },
 	destroyed(){
 	destroyed(){
+
+    clearInterval(this.INT)
+
 		// #ifdef APP-PLUS
 		// #ifdef APP-PLUS
 		//避免重复,每次进来先移除全局自定义事件监听器
 		//避免重复,每次进来先移除全局自定义事件监听器
 		uni.$off('listenGetScanCode')
 		uni.$off('listenGetScanCode')
 		// #endif
 		// #endif
-    	this.removeFromSaveDirect()
+    this.removeFromSaveDirect()
+
 	},
 	},
   methods:{
   methods:{
 		previewImage(url){
 		previewImage(url){
@@ -325,6 +336,19 @@ export default {
       getFullInfo({id}).then(res=>{
       getFullInfo({id}).then(res=>{
         if(res.code == 1){
         if(res.code == 1){
           this.orderInfo = res.data.info
           this.orderInfo = res.data.info
+
+          let that = this
+          this.beginCount = Number(this.orderInfo.beginCount)
+          if(this.beginCount > 0 && this.orderInfo.fromType ==4){
+            clearInterval(this.INT)
+            that.INT = setInterval(function(){
+              that.beginCount--
+              if(that.beginCount <= 0){
+                clearInterval(that.INT)
+              }
+            },1000)
+          }
+
           let bigNum = 0
           let bigNum = 0
           let smallNum = 0
           let smallNum = 0
           this.orderItem = res.data.item
           this.orderItem = res.data.item