Browse Source

fix:5390【报损报溢】新增操作,点击保存,然后去修改,修改完成去提交又会产生一条新数据

mlchen 5 days ago
parent
commit
153b9d31de
2 changed files with 16 additions and 19 deletions
  1. 14 17
      src/views/bpm/handleTask/components/lossOverflowReport/submit.vue
  2. 2 2
      vue.config.js

+ 14 - 17
src/views/bpm/handleTask/components/lossOverflowReport/submit.vue

@@ -40,7 +40,7 @@
 </template>
 
 <script>
-import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
+  import { approveTaskWithVariables } from '@/api/bpm/task';
   import storageApi from '@/api/warehouseManagement';
   // 流程实例的详情页,可用于审批
   export default {
@@ -96,22 +96,20 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
         });
       },
       async _approveTaskWithVariables(status) {
-        if (this.taskDefinitionKey == 'Activity_1l4tn01') {
-          // 驳回(主管审核)
-          if (!status) {
-            const data = await storageApi.notProfitLoss({
-              id: this.businessId,
-              reason: this.form.reason,
-              taskId: this.taskId
+        if (!status) {
+          // 报损报溢所有节点驳回后都恢复为可编辑、可重新提交。
+          const data = await storageApi.notProfitLoss({
+            id: this.businessId,
+            reason: this.form.reason,
+            taskId: this.taskId
+          });
+          if (data.data.code != '-1') {
+            this.$emit('handleAudit', {
+              status,
+              title: '驳回'
             });
-            if (data.data.code != '-1') {
-              this.$emit('handleAudit', {
-                status,
-                title: '驳回'
-              });
-            }
-            return;
           }
+          return;
         } else if (this.taskDefinitionKey == 'Activity_1ftg2hu') {
           // 通过(仓管审核)
           if (!!status) {
@@ -147,8 +145,7 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
         let variables = {
           pass: !!status
         };
-        let API = !!status ? approveTaskWithVariables : rejectTask;
-        API({
+        approveTaskWithVariables({
           id: this.taskId,
           reason: this.form.reason,
           variables

+ 2 - 2
vue.config.js

@@ -38,7 +38,7 @@ module.exports = {
         // target: 'http://124.71.68.31:50001', // 测试环境
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.105:18086',
-        // target: 'http://localhost:18086',
+        target: 'http://localhost:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.3:18086',
         // target: 'http://192.168.1.251:18186',
@@ -46,7 +46,7 @@ module.exports = {
         // target: 'http://192.168.1.3:18086',
         // target: 'http://aiot.zoomwin.com.cn:51001/api',
         // target: 'http://192.168.1.3:18086',
-        target: 'http://192.168.1.147:18086', // 陈兵
+        // target: 'http://192.168.1.147:18086', // 陈兵
         // target: 'http://192.168.1.116:18086', // 赵沙金
         // target: 'http://192.168.1.113:18086', // 郭丹