yusheng пре 2 година
родитељ
комит
73654755d5

+ 4 - 2
src/views/bpm/handleTask/components/saleOrder/invoice/submit.vue

@@ -122,8 +122,10 @@
       if (this.taskDefinitionKey == 'storemanApprove') {
         let data = await getSendSaleOrderrecordDetail(this.businessId);
         try {
-          this.outInData = await getOutInBySourceBizNo(data.orderNo);
-        } catch (error) {}
+          this.outInData = await getOutInBySourceBizNo(data.orderNo)
+        } catch (error) {
+          this.outInData.verifyStatus=0
+        }
       }
     },
     methods: {

+ 30 - 4
src/views/bpm/handleTask/components/saleOrder/returnGoods/submit.vue

@@ -24,14 +24,26 @@
         type="success"
         size="mini"
         @click="handleAudit(1)"
+        v-if="outInData.verifyStatus==2"
         >通过
       </el-button>
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="storemanApprove"
+        v-if="
+          ['storemanApprove'].includes(taskDefinitionKey) &&
+          activeComp == 'main'&&[0,3].includes(outInData.verifyStatus)
+        "
+        >申请出库
+      </el-button>
       <el-button
         icon="el-icon-circle-close"
         type="danger"
         size="mini"
         @click="handleAudit(0)"
-        v-if="!['starter'].includes(taskDefinitionKey)"
+        v-if="!['starter'].includes(taskDefinitionKey)&&outInData.verifyStatus!=1"
         >驳回
       </el-button>
 
@@ -100,14 +112,23 @@
           technicianId: '',
           reason: ''
         },
-        userOptions: []
+        userOptions: [],
+        activeComp:'',
+        outInData:{verifyStatus:2},
       };
     },
-    created() {
+    async created() {
       this.userOptions = [];
       listAllUserBind().then((data) => {
         this.userOptions.push(...data);
       });
+      if (this.taskDefinitionKey == 'storemanApprove') {
+        let data = await getReturnSaleOrderrecordDetail(this.businessId);
+        try {
+          this.outInData = await getOutInBySourceBizNo(data.orderNo);
+        } catch (error) {}
+          this.outInData.verifyStatus=0
+      }
     },
     methods: {
       /** 处理转办审批人 */
@@ -118,7 +139,9 @@
       handleBackList() {
         this.$emit('handleBackList');
       },
-
+      async storemanApprove() {
+        this.$emit('submit');
+      },
       async handleAudit(status) {
         let returnType = '';
         //发起人补充
@@ -157,6 +180,9 @@
         }
         this.approveTaskWithVariables(status, returnType);
       },
+      activeCompChange(activeComp) {
+        this.activeComp = activeComp;
+      },
       async approveTaskWithVariables(status, returnType) {
         approve({
           id: this.taskId,

+ 1 - 1
src/views/bpm/outgoingManagement/add.vue

@@ -930,7 +930,7 @@
       },
       eomSuccess(row) {
         console.log(row);
-        this.formData.extInfo.assetType = '9';
+        this.formData.extInfo.assetType = row.categoryLevelTopId||'9';
         this.formData.bizType = '3';
         this.isTask = true;
         this.$refs.trees.valueTitle = '产品';