From c6be3d3ec036b2f5f4997c30d9cf13c68d7d8bb2 Mon Sep 17 00:00:00 2001
From: wangwei <1610949092@qq.com>
Date: Thu, 27 Feb 2025 20:07:48 +0800
Subject: [PATCH] =?UTF-8?q?2/27=20=E7=95=8C=E9=9D=A2=20=E4=BC=98=E5=8C=961?=
 =?UTF-8?q?.3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/views/collect/IoCreateOrder.vue           | 33 ++++++++++------
 .../collect/device/DevicesDealOrderPre.vue    |  1 -
 .../collect/device/DevicesIoCreateOrder.vue   | 39 ++++++++++++-------
 3 files changed, 46 insertions(+), 27 deletions(-)

diff --git a/src/views/collect/IoCreateOrder.vue b/src/views/collect/IoCreateOrder.vue
index 5ac5748e..6dfb54b3 100644
--- a/src/views/collect/IoCreateOrder.vue
+++ b/src/views/collect/IoCreateOrder.vue
@@ -1746,19 +1746,28 @@ export default {
       }
       this.saveLoading = true
       if (this.orderFormData.billNo != null) {
-        deleteByOrderId(tQuery).then((response) => {
-          this.saveLoading = false
-          if (response.code === 20000) {
-            this.$message.success('放弃成功')
-            this.successCloseData()
-            this.result = ''
-            this.$refs.inputRef.focus()
-          } else {
-            this.$message.error(response.message)
-          }
-          this.loading = false
-          this.saveLoading = false
+        this.$confirm('是否确定取消此次上货?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          deleteByOrderId(tQuery).then((response) => {
+            this.saveLoading = false
+            if (response.code === 20000) {
+              this.$message.success('取消上货成功')
+              this.successCloseData()
+              this.result = ''
+              this.$refs.inputRef.focus()
+            } else {
+              this.$message.error(response.message)
+            }
+            this.loading = false
+            this.saveLoading = false
+          })
+        }).catch(() => {
+
         })
+
       } else {
         this.successCloseData()
         this.result = ''
diff --git a/src/views/collect/device/DevicesDealOrderPre.vue b/src/views/collect/device/DevicesDealOrderPre.vue
index 5090b35b..59d542c5 100644
--- a/src/views/collect/device/DevicesDealOrderPre.vue
+++ b/src/views/collect/device/DevicesDealOrderPre.vue
@@ -585,7 +585,6 @@ export default {
     selectPrescribeDialog,
     prescribeCodePanel,
     PanelOrderManuTagCode, prescribeOriginPanel,
-    PannelOrderBiz,
     DialogCreateOrderSelect,
     PanelOrderAllDetail
   },
diff --git a/src/views/collect/device/DevicesIoCreateOrder.vue b/src/views/collect/device/DevicesIoCreateOrder.vue
index 3e5e8dc7..6abfdd27 100644
--- a/src/views/collect/device/DevicesIoCreateOrder.vue
+++ b/src/views/collect/device/DevicesIoCreateOrder.vue
@@ -47,7 +47,7 @@
             <el-button size="mini" type="primary" @click.native="delOrder()" :loading="submitLoading"
                        style="margin-right: 8px;border-radius: 5%;" v-show="isLinkDisabled"
                        :disabled="orderFormData.billNo == null && curQueueName == ''  "
-            >放弃
+            >取消上货
             </el-button>
             <!--<el-button size="mini" type="primary" @click.native="draftOrder()" :loading="submitLoading"-->
             <!--           v-show="isLinkDisabled" style="margin-right: 8px;border-radius: 5%;"-->
@@ -1746,25 +1746,36 @@ export default {
       }
       this.saveLoading = true
       if (this.orderFormData.billNo != null) {
-        deleteByOrderId(tQuery).then((response) => {
-          this.saveLoading = false
-          if (response.code === 20000) {
-            this.$message.success('放弃成功')
-            this.successCloseData()
-            this.result = ''
-            this.$refs.inputRef.focus()
-          } else {
-            this.$message.error(response.message)
-          }
-          this.loading = false
-          this.saveLoading = false
+        this.$confirm('是否确定取消此次上货?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          deleteByOrderId(tQuery).then((response) => {
+            this.saveLoading = false
+            if (response.code === 20000) {
+              this.$message.success('取消上货成功')
+              this.successCloseData()
+              this.result = ''
+              this.$refs.inputRef.focus()
+            } else {
+              this.$message.error(response.message)
+            }
+            this.loading = false
+            this.saveLoading = false
+          })
+        }).catch(() => {
+
         })
+
       } else {
         this.successCloseData()
         this.result = ''
         this.$refs.inputRef.focus()
       }
-
+      this.sharedData = 'over'
+      //上货页面完成 发送 over 给tabs 页面
+      EventBus.$emit('update-data', { message: this.sharedData });
     },
     // 刷新表单
     resetForm() {