linwenxin 4 meses atrás
pai
commit
48c10e6009

+ 18 - 0
src/packageWorkorder/pages/mixins/orderBtnsShow.js

@@ -195,6 +195,24 @@ export default {
         ['DYY', 'FWZ'].includes(this.orderStatus_v_zh(item.orderStatus, item)) &&
         (item.isImportExcel ? item.isMeet : true)
       )
+    },
+    // 总部下载
+    ZONGBUXIAZAI(item, userInfo) {
+      return item.isImportExcel
+    },
+    ZONGBUXIAZAIFUNC(item, userInfo) {
+      if (!item.lastClickTime || item.lastClickTime + 60000 < new Date().getTime()) {
+        this.$api
+          .post('/changeOrder/dow', {
+            orderBaseId: item.id
+          })
+          .then(res => {
+            item.lastClickTime = new Date().getTime()
+            this.$successToast()
+          })
+      } else {
+        this.$successToast()
+      }
     }
   }
 }

+ 8 - 0
src/packageWorkorder/pages/orderDetail.vue

@@ -620,6 +620,14 @@
 
       <template slot="footer">
         <view class="bottom-container" v-if="detail">
+          <!-- 总部下载 -->
+          <u-button
+            v-if="ZONGBUXIAZAI(detail, userInfo)"
+            type="primary"
+            text="总部下载"
+            @tap="ZONGBUXIAZAIFUNC(detail, userInfo)"
+          ></u-button>
+
           <!-- 接单 -->
           <u-button v-if="JIEDAN(detail, userInfo)" type="primary" text="接单" @tap="actionReceive()"></u-button>
 

+ 8 - 0
src/packageWorkorder/pages/orderList.vue

@@ -135,6 +135,14 @@
               </view>
             </view>
             <view class="item-btn" @tap.stop>
+              <!-- 总部下载 -->
+              <u-button
+                v-if="ZONGBUXIAZAI(item, userInfo)"
+                type="primary"
+                text="总部下载"
+                @tap="ZONGBUXIAZAIFUNC(item, userInfo)"
+              ></u-button>
+
               <!-- 接单 ok-->
               <u-button v-if="JIEDAN(item, userInfo)" type="primary" text="接单" @tap="actionReceive(item)"></u-button>
 

+ 8 - 0
src/packageWorkorder/pages/search.vue

@@ -89,6 +89,14 @@
           </view>
         </view>
         <view class="item-btn" @tap.stop>
+          <!-- 总部下载 -->
+          <u-button
+            v-if="ZONGBUXIAZAI(item, userInfo)"
+            type="primary"
+            text="总部下载"
+            @tap="ZONGBUXIAZAIFUNC(item, userInfo)"
+          ></u-button>
+
           <!-- 接单 ok-->
           <u-button v-if="JIEDAN(item, userInfo)" type="primary" text="接单" @tap="actionReceive(item)"></u-button>