Ver Fonte

采购退货审批增加出库单

yusheng há 2 anos atrás
pai
commit
54251f113b

+ 7 - 3
src/views/bpm/handleTask/components/outBound/detailDialog.vue

@@ -335,7 +335,7 @@
   import { mapGetters, mapActions } from 'vuex';
   import outin from '@/api/warehouseManagement/outin';
   import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
-
+  import { getOutInBySourceBizNo } from '@/api/classifyManage';
   import {
     materialType,
     warehousingType,
@@ -348,7 +348,7 @@
   import { getUser } from '@/api/system/user';
   export default {
     components: { StatusStep },
-    props: ['businessId'],
+    props: ['businessId','type'],
     data() {
       return {
         metaList: [],
@@ -443,7 +443,11 @@
       getSceneState: useDictLabel(outputSceneState),
       getAuditStatus: useDictLabel(auditStatus),
       async _getInfo() {
-        const res = await outin.getById(this.businessId);
+        // const res = await outin.getById(this.businessId);
+        const res =
+          this.type == 'sourceBizNo'
+            ? await getOutInBySourceBizNo(this.businessId)
+            : await outin.getById(this.businessId);
         console.log(res);
         this.infoData = {
           ...res,

+ 47 - 4
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/detailDialog.vue

@@ -1,6 +1,21 @@
 <template>
   <div>
-    <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+    <div class="switch">
+      <div class="switch_left">
+        <ul>
+          <li
+            v-for="item in tabOptions"
+            :key="item.key"
+            :class="{ active: activeComp == item.key }"
+            @click="changeActive(item)"
+          >
+            {{ item.name }}
+          </li>
+        </ul>
+      </div>
+    </div>
+    <div v-show="activeComp == 'main'">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
       <headerTitle title="退货信息"></headerTitle>
       <el-row>
         <el-col :span="12">
@@ -160,6 +175,13 @@
         </div>
       </template>
     </ele-pro-table>
+    </div>
+    <add
+      ref="add"
+      v-if="activeComp == 'outBound'"
+      type="sourceBizNo"
+      @success="success"
+    ></add>
   </div>
 </template>
 
@@ -169,16 +191,20 @@
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
   import fileUpload from '@/components/upload/fileUpload';
+  import add from '@/views/bpm/outgoingManagement/add.vue';
 
   import { reviewStatusEnum } from '@/enum/dict';
   import { getOutInBySourceBizNo } from '@/api/classifyManage';
   export default {
     components: {
-      fileUpload
+      fileUpload,
+      add
     },
     mixins: [dictMixins],
     data() {
       return {
+        activeComp: 'main',
+        tabOptions: [{ key: 'main', name: '退货单详情' }],
         codeData: [],
         reviewStatusEnum,
         visible: false,
@@ -336,9 +362,23 @@
     },
     created() {
       this.getDetailData(this.businessId);
-      
+      if (this.taskDefinitionKey == 'storemanApprove') {
+        this.tabOptions.push({ key: 'outBound', name: '出库单' });
+      }
     },
     methods: {
+      changeActive(item) {
+        this.activeComp = item.key;
+        this.$emit('activeCompChange', item.key);
+        if (
+          this.taskDefinitionKey == 'storemanApprove' &&
+          item.key == 'outBound'
+        ) {
+          this.$nextTick(() => {
+            this.$refs.add.eomSuccess(this.form);
+          });
+        }
+      },
       async getcode(code) {
         const res = await getByCode(code);
         this.codeData = res.data;
@@ -370,7 +410,10 @@
           this.detailData = data;
           this.form = data;
         }
-      }
+      },
+      success() {
+        this.$emit('handleClose');
+      },
     }
   };
 </script>

+ 5 - 2
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/submit.vue

@@ -97,7 +97,8 @@
         form: {
           technicianId: '',
           reason: ''
-        }
+        },
+        activeComp:""
       };
     },
     created() {
@@ -112,7 +113,9 @@
       handleBackList() {
         this.$emit('handleBackList');
       },
-
+      activeCompChange(activeComp) {
+        this.activeComp = activeComp;
+      },
       async handleAudit(status) {
         //发起人补充
         if (this.taskDefinitionKey === 'purchase_return_approve') {

+ 30 - 2
src/views/bpm/handleTask/components/saleOrder/invoice/addInvoiceDialog.vue

@@ -1,6 +1,21 @@
 <template>
   <div>
-    <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+    <div class="switch">
+      <div class="switch_left">
+        <ul>
+          <li
+            v-for="item in tabOptions"
+            :key="item.key"
+            :class="{ active: activeComp == item.key }"
+            @click="changeActive(item)"
+          >
+            {{ item.name }}
+          </li>
+        </ul>
+      </div>
+    </div>
+    <div v-show="activeComp == 'main'">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
       <headerTitle title="发货信息"></headerTitle>
       <el-row>
         <el-col :span="12">
@@ -148,11 +163,14 @@
       ref="orderListDialogRef"
       @changeParent="changeOrder"
     ></orderListDialog>
+    </div>
+    <detailDialog type="sourceBizNo" :businessId="form.orderNo" v-if="activeComp == 'outBound'"></detailDialog>
   </div>
 </template>
 
 <script>
   import fileUpload from '@/components/upload/fileUpload';
+  import detailDialog from '@/views/bpm/handleTask/components/outBound/detailDialog.vue'
   import dictMixins from '@/mixins/dictMixins';
 
   import {
@@ -171,7 +189,8 @@
     components: {
       fileUpload,
       inventoryTable,
-      orderListDialog
+      orderListDialog,
+      detailDialog
     },
     data() {
       let formDef = {
@@ -190,6 +209,8 @@
       };
 
       return {
+        activeComp: 'main',
+        tabOptions: [{ key: 'main', name: '发货单详情' }],
         detailData: {},
         payWayOptions: [],
         delDetailIds: [],
@@ -353,8 +374,15 @@
     },
     created() {
       this.getSendSaleOrderDetail(this.businessId);
+      if (this.taskDefinitionKey == 'salesmanUploadReceipt') {
+        this.tabOptions.push({ key: 'outBound', name: '出库单' });
+      }
     },
     methods: {
+      changeActive(item) {
+        this.activeComp = item.key;
+        this.$emit('activeCompChange', item.key);
+      },
       //选择订单回调
       changeOrder(obj) {
         this.form = Object.assign({}, this.form, {

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

@@ -23,6 +23,7 @@
         icon="el-icon-edit-outline"
         type="success"
         size="mini"
+        v-if="outInData.verifyStatus==2"
         @click="handleAudit(1)"
         
         >通过
@@ -34,7 +35,7 @@
         @click="storemanApprove"
         v-if="
           ['storemanApprove'].includes(taskDefinitionKey) &&
-          activeComp == 'outBound'
+          activeComp == 'outBound'&&[0,3].includes(outInData.verifyStatus)
         "
         >申请出库
       </el-button>
@@ -44,7 +45,7 @@
         size="mini"
         @click="handleAudit(0)"
         v-if="
-          ['deptLeaderApprove', 'storemanApprove'].includes(taskDefinitionKey)
+          ['deptLeaderApprove', 'storemanApprove'].includes(taskDefinitionKey)&&outInData.verifyStatus!=1
         "
         >驳回
       </el-button>
@@ -113,8 +114,8 @@
           technicianId: '',
           reason: ''
         },
-        outInData:{},
-        activeComp: ''
+        outInData:{verifyStatus:2},
+        activeComp: '',
       };
     },
     async created() {

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

@@ -1299,7 +1299,7 @@
                 await await outin.outApprove({ outInId: res.data });
                 this.$message.success('保存成功!');
               }
-              this.$router.push('/warehouseManagement/outgoingManagement');
+              // this.$router.push('/warehouseManagement/outgoingManagement');
               if (res?.success) {
                 this.$message.success('保存成功!');
                 this.$router.go(-1);

+ 2 - 2
src/views/bpm/todo/index.vue

@@ -216,8 +216,8 @@
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
         return getTodoTaskPage({
-          pageNum: page,
-          size: limit,
+          pageNo: page,
+          pageSize: limit,
           ...this.params
         });
       },