Kaynağa Gözat

fix:5282【盘点计划】未派单的需要增加删除功能

mlchen 2 gün önce
ebeveyn
işleme
a8e13dff61

+ 24 - 0
src/views/warehouseManagement/stocktaking/plan/index.vue

@@ -46,6 +46,15 @@
           >
             修改
           </el-link>
+          <el-link
+            v-if="row.planStatus == 0"
+            type="danger"
+            :underline="false"
+            icon="el-icon-delete"
+            @click="deleteRow(row)"
+          >
+            删除
+          </el-link>
           <el-link
             v-if="row.planStatus == 1"
             type="primary"
@@ -80,6 +89,7 @@
   import AddInventoryDialog from './components/addInventoryDialog.vue';
   import AssignDialog from './components/assignDialog.vue';
   import {
+    deleteInventoryPlan,
     getInventoryPlanList,
     revocationInventoryPlan
   } from '@/api/inventory';
@@ -230,6 +240,20 @@
           }
         });
       },
+      // 删除未派单计划
+      deleteRow(row) {
+        this.$confirm('是否确定删除该盘点计划?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(async () => {
+            await deleteInventoryPlan([row.id]);
+            this.$message.success('删除成功!');
+            this.$refs.table.reload();
+          })
+          .catch(() => {});
+      },
       // 撤回
       revocationRow(row) {
         this.$confirm('是否确定撤回?', '提示', {

+ 3 - 3
vue.config.js

@@ -2,7 +2,7 @@
  * @Author: mlchen 374826075@qq.com
  * @Date: 2026-07-21 09:26:11
  * @LastEditors: mlchen 374826075@qq.com
- * @LastEditTime: 2026-07-27 09:31:32
+ * @LastEditTime: 2026-08-26 14:45:52
  * @FilePath: /kd-aiot-frontend-wms/vue.config.js
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -43,8 +43,8 @@ module.exports = {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.132:18086',
         // target: 'http://192.168.1.105:18086', //开发
-        // target: 'http://localhost:18086', //开发
-        target: 'http://192.168.1.251:18086', //测试
+        target: 'http://localhost:18086', //开发
+        // target: 'http://192.168.1.251:18086', //测试
         // target: 'http://192.168.1.116:18086',
 
         // target: 'http://192.168.1.116:18086',