Browse Source

多货删除功能

cz 1 year ago
parent
commit
83d45a8447
1 changed files with 31 additions and 1 deletions
  1. 31 1
      src/views/WDLY/outInBound/manyGoods/index.vue

+ 31 - 1
src/views/WDLY/outInBound/manyGoods/index.vue

@@ -188,7 +188,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "160",
+        width: "200",
         align: "center",
       },
       // 渲染 el-button,一般用在最后一列。
@@ -234,6 +234,36 @@ const config = computed(() => {
                 },
               }
             : {},
+          row.processingMethod == 0
+            ? {
+                attrs: {
+                  label: "删除",
+                  type: "danger",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  ElMessageBox.confirm("您确定删除吗?", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning",
+                  }).then(() => {
+                    // 删除
+                    proxy
+                      .post("/excessGoodsDetails/delete", {
+                        id: row.id,
+                      })
+                      .then((res) => {
+                        ElMessage({
+                          message: "操作成功",
+                          type: "success",
+                        });
+                        getList();
+                      });
+                  });
+                },
+              }
+            : {},
         ];
       },
     },