Просмотр исходного кода

发货单关闭添加弹窗确认

xiaohaizhao 11 часов назад
Родитель
Сommit
750a79bc77
1 измененных файлов с 20 добавлено и 9 удалено
  1. 20 9
      src/HDrpManagement/dispatch/details/index.vue

+ 20 - 9
src/HDrpManagement/dispatch/details/index.vue

@@ -451,15 +451,26 @@ import printMaterials from "../modules/printMaterials";
         })
       },
       async onClose(){
-        const res = await this.$api.requested({
-          "id": 2025070114184202,
-          "content": {
-            "sa_dispatchid": this.$route.query.id
-          },
-        })
-        this.tool.showMessage(res,()=>{
-          this.queryMainData()
-        })
+        this.$confirm(this.$t('是否确定关闭当前发货单?'), this.$t('提示'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: 'warning'
+        }).then(async () => {
+          const res = await this.$api.requested({
+            "id": 2025070114184202,
+            "content": {
+              "sa_dispatchid": this.$route.query.id
+            },
+          })
+          this.tool.showMessage(res,()=>{
+            this.queryMainData()
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: this.$t('已取消')
+          });
+        });
       },
       async isReCheck(){
         const res = await this.$api.requested({