瀏覽代碼

no message

linwenxin 5 月之前
父節點
當前提交
2a0ef4b376
共有 1 個文件被更改,包括 21 次插入42 次删除
  1. 21 42
      src/components/selectionWorkers.vue

+ 21 - 42
src/components/selectionWorkers.vue

@@ -91,55 +91,34 @@ export default {
     querenss() {
       if (this.type == 1) {
         // 接单
-        this.$modal({
-          title: '接单确认',
-          content: '确认接单?'
-        })
-          .then(() => {
-            this.$api
-              .post('/pg/order/base/rece', {
-                orderBaseId: this.detail.id,
-                workerList: this.checkboxValues.join(',')
-              })
-              .then(res => {
-                this.callback?.()
-              })
+        this.$api
+          .post('/pg/order/base/rece', {
+            orderBaseId: this.detail.id,
+            workerList: (this.checkboxValues || []).join(',')
+          })
+          .then(res => {
+            this.callback?.()
           })
-          .catch(() => {})
       } else if (this.type == 2) {
         // 抢单
-        this.$modal({
-          title: '抢单确认',
-          content: '确认抢单?'
-        })
-          .then(() => {
-            this.$api
-              .post('/pg/order/base/qd', {
-                orderBaseId: this.detail.id,
-                workerList: this.checkboxValues.join(',')
-              })
-              .then(res => {
-                this.callback?.()
-              })
+        this.$api
+          .post('/pg/order/base/qd', {
+            orderBaseId: this.detail.id,
+            workerList: (this.checkboxValues || []).join(',')
+          })
+          .then(res => {
+            this.callback?.()
           })
-          .catch(() => {})
       } else if (this.type == 3) {
         // 更换
-        this.$modal({
-          title: '更换小工确认',
-          content: '确认更换?'
-        })
-          .then(() => {
-            this.$api
-              .post('/pg/order/base/change/slave/worker/team', {
-                orderBaseId: this.detail.id,
-                workerList: this.checkboxValues.join(',')
-              })
-              .then(res => {
-                this.callback?.()
-              })
+        this.$api
+          .post('/pg/order/base/change/slave/worker/team', {
+            orderBaseId: this.detail.id,
+            workerList: (this.checkboxValues || []).join(',')
+          })
+          .then(res => {
+            this.callback?.()
           })
-          .catch(() => {})
       }
     },
     quxiao() {