فهرست منبع

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dev

lucw 8 ماه پیش
والد
کامیت
7c8bfea335
2فایلهای تغییر یافته به همراه47 افزوده شده و 3 حذف شده
  1. 9 0
      src/api/material/BOM.js
  2. 38 3
      src/views/material/BOMmanage/index.vue

+ 9 - 0
src/api/material/BOM.js

@@ -427,3 +427,12 @@ export async function getDetailList(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+//BOM撤回
+export async function withdrawBom(params) {
+  const res = await request.get(`/bpm/task/withdraw`, { params });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 38 - 3
src/views/material/BOMmanage/index.vue

@@ -99,6 +99,12 @@
               @click="handSubmit(row)"
               >发布</el-link
             >
+            <el-link
+              v-if="row.approvalStatus == 1 && $hasPermission('main:bomcategory:withdraw')"
+              type="primary"
+              @click="handWithdraw(row)"
+              >撤回</el-link
+            >
 
             <el-link
               type="danger"
@@ -159,7 +165,8 @@
     bomSubmit,
     jsBomSubmit,
     deviceBomSubmit,
-    deleteBomTreeList
+    deleteBomTreeList,
+    withdrawBom
   } from '@/api/material/BOM';
   import LCdetail from './components/LCdetail.vue';
   import { getByCode } from '@/api/system/dictionary-data';
@@ -286,7 +293,9 @@
           {
             columnKey: 'action',
             slot: 'action',
-            label: '操作'
+            label: '操作',
+            width: 170,
+            align: 'center'
           }
         ],
         sxtList: [
@@ -459,7 +468,33 @@
           };
         });
       },
-
+      // 撤回
+      handWithdraw(row) {
+        const params = {
+          processInstanceId: row.processInstanceId,
+          businessId: row.id,
+          processDefinitionKey: this.clientEnvironmentId == 5 ? this.radioSubmit == 1 ? 'bom_release' : 'bom_release_device' : 'bom_approver'
+        };
+        this.$confirm('是否确认撤回?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            withdrawBom(params).then((res) => {
+              if (res?.code == '0') {
+                this.$message.success('撤回成功');
+                this.reload();
+              }
+            }).catch((err) => {
+              // this.$message.error(err.message);
+            });
+          })
+          .catch(() => {
+      
+          });
+        
+      },
       handSubmit(row) {
         this.currentNodeData = row;
         if (this.clientEnvironmentId == 5) {