Просмотр исходного кода

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wt

liujt 7 месяцев назад
Родитель
Сommit
36019b431d

+ 13 - 3
src/views/bpm/handleTask/components/selectedCollectionOutbound/submit.vue

@@ -63,7 +63,11 @@
 <script>
   import storageApi from '@/api/warehouseManagement';
   import { cancel } from '@/api/bpm/components/purchasingManage/outSourceSend';
-  import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
+  import {
+    approveTaskWithVariables,
+    rejectTask,
+    cancelTask
+  } from '@/api/bpm/task';
 
   // 流程实例的详情页,可用于审批
   export default {
@@ -186,13 +190,19 @@
             confirmButtonText: '确定'
           })
             .then(() => {
-              cancel({
-                id: this.taskId,
+              if (!this.form.reason) {
+                return this.$message.warning('审批建议不能为空');
+              }
+
+              cancelTask({
+                id: this.id,
+                taskId: this.taskId,
                 reason: this.form.reason,
                 businessId: this.businessId
               })
                 .then(() => {
                   this.$emit('handleClose');
+                  this.$message.success('流程作废成功');
                 })
                 .catch(() => {
                   this.$message.error('流程作废失败');

+ 3 - 3
src/views/bpm/stockManagement/storage.vue

@@ -1692,7 +1692,7 @@
               let weight =
                 filtersItem.sendTotalWeight ||
                 filtersItem.receiveTotalWeight ||
-                singleWeight * filtersItem.measureQuantity;
+                singleWeight * measureQuantity;
               console.log(weight, 'weight');
               // if(weight){
 
@@ -1774,8 +1774,8 @@
                   : '', // 颜色
                 measureType: item.measureType, // 计量方式
                 netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
-                singleWeight: singleWeight, // 单重重量
-                weight: weight, // 总重量
+                singleWeight: singleWeight||0, // 单重重量
+                weight: weight||0, // 总重量
                 weightUnit: item.weightUnit, // 重量单位
                 totalMoney: totalMoney, // 总价
                 unitPrice: item.unitPrice || unitPrice, // 单价