yusheng 1 рік тому
батько
коміт
de5526e563

+ 30 - 12
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/submit.vue

@@ -36,7 +36,7 @@
           />
           />
         </el-select>
         </el-select>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="审批建议"  style="margin-bottom: 20px">
+      <el-form-item label="审批建议" style="margin-bottom: 20px">
         <el-input
         <el-input
           type="textarea"
           type="textarea"
           v-model="form.reason"
           v-model="form.reason"
@@ -59,7 +59,7 @@
         type="danger"
         type="danger"
         size="mini"
         size="mini"
         v-if="taskDefinitionKey !== 'stater'"
         v-if="taskDefinitionKey !== 'stater'"
-        @click="handleAudit(0)"
+        @click="rejectTask(0)"
         >驳回
         >驳回
       </el-button>
       </el-button>
 
 
@@ -86,6 +86,8 @@
     updateReceiptAPI,
     updateReceiptAPI,
     returnHandleProcessCancel
     returnHandleProcessCancel
   } from '@/api/bpm/components/saleManage/saleorder';
   } from '@/api/bpm/components/saleManage/saleorder';
+  import {rejectTask} from '@/api/bpm/task';
+
   import { listAllUserBind } from '@/api/system/organization';
   import { listAllUserBind } from '@/api/system/organization';
   import { EventBus } from './eventBus.js';
   import { EventBus } from './eventBus.js';
   import outin from '@/api/warehouseManagement/outin';
   import outin from '@/api/warehouseManagement/outin';
@@ -273,7 +275,7 @@
         let storageData = data.returnStorageData;
         let storageData = data.returnStorageData;
         // 入库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
         // 入库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
         storageData.isSkip = 1;
         storageData.isSkip = 1;
-        console.log(storageData,'dasdsa');
+        console.log(storageData, 'dasdsa');
         try {
         try {
           this.isLoading = true;
           this.isLoading = true;
           const res = await outin.saveNew(storageData);
           const res = await outin.saveNew(storageData);
@@ -377,12 +379,13 @@
         // 获取销售退货入库信息
         // 获取销售退货入库信息
 
 
         let storageData = data.returnStorageData;
         let storageData = data.returnStorageData;
-        data.detailList.forEach((val,index)=>{
-            val.weight=storageData._packingList[index].weight
-            val.materielDesignation=storageData._packingList[index].materielDesignation
-            val.clientCode=storageData._packingList[index].clientCode
-            val.engrave=storageData._packingList[index].engrave
-          })
+        data.detailList.forEach((val, index) => {
+          val.weight = storageData._packingList[index].weight;
+          val.materielDesignation =
+            storageData._packingList[index].materielDesignation;
+          val.clientCode = storageData._packingList[index].clientCode;
+          val.engrave = storageData._packingList[index].engrave;
+        });
         // 是否已经入库
         // 是否已经入库
         // if (storageData.isStorage) {
         // if (storageData.isStorage) {
         //   try {
         //   try {
@@ -417,9 +420,7 @@
         try {
         try {
           this.isLoading = true;
           this.isLoading = true;
           const res = await storageApi.storage(storageData);
           const res = await storageApi.storage(storageData);
-          
-        
-          
+
           data.returnInReceiptId = res.data.toString();
           data.returnInReceiptId = res.data.toString();
           await saleReturnUpdateAPI(data);
           await saleReturnUpdateAPI(data);
           approveTaskWithVariablesAPI({
           approveTaskWithVariablesAPI({
@@ -503,6 +504,23 @@
           }
           }
         });
         });
       },
       },
+      //驳回
+      rejectTask() {
+        rejectTask({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables: {
+            pass: false
+          }
+        }).then((res) => {
+          if (res.code != '-1') {
+            this.$emit('handleAudit', {
+              status: false,
+              title: '驳回'
+            });
+          }
+        });
+      },
       getTableValue() {
       getTableValue() {
         return new Promise((resolve, reject) => {
         return new Promise((resolve, reject) => {
           this.$emit('getTableValue', async (data) => {
           this.$emit('getTableValue', async (data) => {

+ 3 - 7
src/views/bpm/handleTask/components/saleOrder/returnGoods/addReturnGoodsDialog.vue

@@ -425,11 +425,7 @@
             prop: 'technicalDrawings',
             prop: 'technicalDrawings',
             label: '技术图纸',
             label: '技术图纸',
             slot: 'technicalDrawings',
             slot: 'technicalDrawings',
-            formatter: (_row, _column, cellValue) => {
-              return (
-                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
-              );
-            },
+
             align: 'center'
             align: 'center'
           },
           },
           {
           {
@@ -498,7 +494,7 @@
             allcountAmount =
             allcountAmount =
               (this.$refs.inventoryTableref &&
               (this.$refs.inventoryTableref &&
                 this.$refs.inventoryTableref.totalAmount) +
                 this.$refs.inventoryTableref.totalAmount) +
-              Number(this.form.redressAmount);
+              Number(this.form.redressAmount||0);
           }
           }
           if (this.form.type === '40') {
           if (this.form.type === '40') {
             allcountAmount =
             allcountAmount =
@@ -506,7 +502,7 @@
               this.$refs.inventoryTableref1.getPrice()[0];
               this.$refs.inventoryTableref1.getPrice()[0];
           }
           }
           if (this.form.type === '50') {
           if (this.form.type === '50') {
-            allcountAmount = Number(this.form.redressAmount);
+            allcountAmount = Number(this.form.redressAmount||0);
           }
           }
         } else {
         } else {
           allcountAmount =
           allcountAmount =

+ 1 - 5
src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue

@@ -419,11 +419,7 @@
             prop: 'technicalDrawings',
             prop: 'technicalDrawings',
             label: '技术图纸',
             label: '技术图纸',
             slot: 'technicalDrawings',
             slot: 'technicalDrawings',
-            formatter: (_row, _column, cellValue) => {
-              return (
-                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
-              );
-            },
+          
             align: 'center'
             align: 'center'
           },
           },
           {
           {