瀏覽代碼

feat:删除确认提示

hmc 1 年之前
父節點
當前提交
f98a7c3daf
共有 1 個文件被更改,包括 13 次插入9 次删除
  1. 13 9
      zkqy-ui/src/views/orderMange/components/dialogForm/OutStock.vue

+ 13 - 9
zkqy-ui/src/views/orderMange/components/dialogForm/OutStock.vue

@@ -94,16 +94,20 @@ export default {
   methods: {
     //删除回滚对应产品的库存
     handleDelete(index,row){
-      removeErrorOutboundRecord(row.id).then(res=>{
-        if (res.code == 200) {
-          this.$message.success("删除成功");
-          this.getOutStockDetail(this.orderRow);
-        } else {
-          this.$message.error("删除失败");
-          throw Error("删除失败");
+      this.$confirm("是否删除名称为 “"+row.productName+"” 出库明细数据", "提示", { type: "warning" }).then(
+        () => {
+          removeErrorOutboundRecord(row.id).then(res=>{
+            if (res.code == 200) {
+              this.$message.success("删除成功");
+              this.getOutStockDetail(this.orderRow);
+            } else {
+              this.$message.error("删除失败");
+              throw Error("删除失败");
+            }
+          })
         }
-      })
-       //出库
+      );
+      //出库
       console.log("删除出库产品、回滚库存",row)
     },
     exportOutInfo() {