Browse Source

采购订单维护-反审功能增加操作提醒弹窗

002390 1 năm trước cách đây
mục cha
commit
a28e9edb26
1 tập tin đã thay đổi với 21 bổ sung13 xóa
  1. 21 13
      src/views/purchase/purchase-order/fs/index.vue

+ 21 - 13
src/views/purchase/purchase-order/fs/index.vue

@@ -37,19 +37,27 @@ export default {
       let puOrderIds = this.innerValue.map((item) => Number(item.id));
       if (pu.status === "2") {
         // 已审核
-        try {
-          this.$modal.loading("提交中...");
-          let { code, msg } = await counterApprove({ puOrderIds });
-          if (code == 200) {
-            this.$notify.success({
-              message: msg,
-            });
-            this.$emit("success");
-          }
-        } catch (error) {
-        } finally {
-          this.$modal.closeLoading();
-        }
+        this.$confirm("是否继续执行反审操作?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(async () => {
+            try {
+              this.$modal.loading("提交中...");
+              let { code, msg } = await counterApprove({ puOrderIds });
+              if (code == 200) {
+                this.$notify.success({
+                  message: msg,
+                });
+                this.$emit("success");
+              }
+            } catch (error) {
+            } finally {
+              this.$modal.closeLoading();
+            }
+          })
+          .catch(() => {});
       } else {
         this.$notify.warning({
           message: "请选择已审核单据进行反审!",