linwenxin před 6 měsíci
rodič
revize
c504dcccbd
1 změnil soubory, kde provedl 44 přidání a 7 odebrání
  1. 44 7
      src/packageWorkorder/pages/search.vue

+ 44 - 7
src/packageWorkorder/pages/search.vue

@@ -343,19 +343,49 @@ export default {
     },
 
     // 接单
-    actionReceive(id) {
+    actionReceive(item) {
+      this.title = '接收确认'
+      this.selectionWorkersType = 1
+      this.item = { ...item }
+      this.callback = () => {
+        this.$successToast()
+        this.refreshList()
+        this.toDetail(item.id)
+        this.$nextTick(() => {
+          this.item = null
+          this.selectionWorkersType = null
+          this.callback = null
+          this.title = null
+        })
+      }
+    },
+
+    // 抢单
+    qdOrder(item) {
+      // this.title = '接收确认'
+      // this.selectionWorkersType = 2
+      // this.item = { ...item }
+      // this.callback = () => {
+      //   this.$successToast()
+      //   this.refreshList()
+      //   this.toDetail(item.id)
+      //   this.item = null
+      //   this.selectionWorkersType = null
+      //   this.callback = null
+      // }
       this.$modal({
-        title: '接单确认',
-        content: '确认接单?'
+        title: '单确认',
+        content: '确认单?'
       })
         .then(() => {
           this.$api
-            .post('/pg/order/base/rece', {
-              orderBaseId: id
+            .post('/pg/order/base/qd', {
+              orderBaseId: item.id
             })
             .then(res => {
               this.$successToast()
               this.refreshList()
+              this.toDetail(item.id)
             })
         })
         .catch(() => {})
@@ -365,15 +395,22 @@ export default {
     toCharge(id, type) {
       if (type == 'M') {
         this.$navToPage({
-          url: `/packageMaterial/pages/sale/index?type=${type}&oid=${id}&tabCurrent=1`
+          url: `/packageMaterial/pages/sale/orderList?type=${type}&oid=${id}&tabCurrent=1`
         })
       } else if (type == 'P') {
         this.$navToPage({
-          url: `/packageMaterial/pages/newSale/index?type=${type}&oid=${id}&tabCurrent=1`
+          url: `/packageMaterial/pages/newSale/orderList?type=${type}&oid=${id}&tabCurrent=1`
         })
       }
     },
 
+    // 去配件申请
+    toPartsApply(id) {
+      this.$navToPage({
+        url: `/packageMaterial/pages/partsApply/form?id=${id}`
+      })
+    },
+
     // 去过程反馈
     toFeedback(id) {
       this.$navToPage({