huang_an 2 лет назад
Родитель
Сommit
e90181a4ca

+ 4 - 4
src/utils/dict/warehouse.js

@@ -34,10 +34,10 @@ export const warehousingType = [
 export const sceneState = [
   { code: 1, label: '生产入库' },
   { code: 2, label: '采购入库' },
-  { code: 3, label: '赠送入库' },
-  { code: 4, label: '借用入库' },
-  // { code: 5, label: '退还入库' },
-  { code: 6, label: '其他入库' }
+  { code: 3, label: '归还入库' },
+  { code: 4, label: '领料退货入库' },
+  { code: 6, label: '销售退货入库' },
+  { code: 5, label: '其他入库' }
 ];
 export const outputSceneState = [
   { code: 1, label: '退供出库' },

+ 6 - 3
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/customerReturnOrder.vue

@@ -801,7 +801,9 @@
         return this.dict[dictEnum['产品不合格类型']] || [];
       }
     },
-    created() {},
+    created() {
+      console.log(this.isShowReturnOrder, '====');
+    },
     mounted() {
       this.getReturnInfo(this.businessId);
     },
@@ -955,7 +957,7 @@
       },
       getTableValue() {
         return new Promise((resolve) => {
-          this.$refs.formRef.validate((validate) => {
+          this.$refs.formRef.validate(async (validate) => {
             if (!validate) {
               resolve(false);
             } else {
@@ -998,7 +1000,8 @@
                 }),
                 returnRecordId: this.form.returnRecordId,
                 id: this.form.id,
-                returnStorageData: this.$refs.inboundDetails?.infoData
+                returnStorageData:
+                  await this.$refs.inboundDetails?.getReturnStorage()
               };
               resolve(params);
             }

+ 201 - 202
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/customerReturnOrderDialog.vue

@@ -31,217 +31,216 @@
 </template>
 
 <script>
-import {EventBus} from './eventBus.js';
-import {
-  getOutInByIdAPI,
-  saleReturnGetByIdAPI
-} from '@/api/bpm/components/saleManage/saleorder';
-import {deepClone} from '@/utils';
+  import { EventBus } from './eventBus.js';
+  import {
+    getOutInByIdAPI,
+    saleReturnGetByIdAPI
+  } from '@/api/bpm/components/saleManage/saleorder';
+  import { deepClone } from '@/utils';
 
-export default {
-  name: 'customerReturnOrderDialog',
-  props: {
-    taskDefinitionKey: {
-      type: String,
-      default: 'stater'
+  export default {
+    name: 'customerReturnOrderDialog',
+    props: {
+      taskDefinitionKey: {
+        type: String,
+        default: 'stater'
+      },
+      businessId: {
+        type: String,
+        default: ''
+      }
+    },
+    components: {
+      repairTabsPage: () => import('./repair-tabs-page'),
+      customerReturnOrder: () => import('./customerReturnOrder')
     },
-    businessId: {
-      type: String,
-      default: ''
-    }
-  },
-  components: {
-    repairTabsPage: () => import('./repair-tabs-page'),
-    customerReturnOrder: () => import('./customerReturnOrder')
-  },
 
-  data() {
-    //innerOuterBoth 1 只有内部  2 只有外部 9 都有
-    return {
-      dialogType: 'add',
-      pageName: '',
-      repairTabsOptions: [
-        {
-          key: 'outerStoremanOut',
-          isOutOrIn: 'outerStore',
-          name: '物品出库给外协'
-        },
-        {
-          key: 'outerStoremanIn',
-          isOutOrIn: 'outerStore',
-          name: '外协返修物品入库'
-        },
-        {
-          key: 'outerInQC',
-          isOutOrIn: 'outerStore',
-          name: '外协返修入库质检'
-        },
-        {
-          key: 'innerStoremanIn',
-          isOutOrIn: 'innerStore',
-          name: '内部生产物品入库'
-        },
-        {
-          key: 'innerInQC',
-          isOutOrIn: 'innerStore',
-          name: '内部生产入库质检'
-        }
-      ],
-      activeComp: '',
-      permissionType: '',
-      isShowReturnOrder: '',
-      warehousingMaterialList: [],
-      materialCodeReqList: [],
-      metaList: [],
-      form: {},
-      innerOuterBoth: '',
-      loading: false,
-      key: 1
-    };
-  },
-  computed: {
-    tabOptions() {
-      let list = [
-        {
-          key: 'stater',
-          permissionType: 'update',
-          isShowReturnOrder: false,
-          name: '发起人申请',
-          isShow: true
-        },
-        {
-          key: 'deptLeader',
-          permissionType: 'view',
-          isShowReturnOrder: false,
-          name: '销售主管审批',
-          isShow: true
-        },
-        {
-          key: 'storeman',
-          permissionType: 'update',
-          isShowReturnOrder: true,
-          name: '仓管入库',
-          isShow: true
-        },
-        {
-          key: 'QCLeader',
-          permissionType: 'view',
-          isShowReturnOrder: false,
-          name: '质量部主管指派',
-          isShow: true
-        },
-        {
-          key: 'QCApprove',
-          permissionType: 'update',
-          isShowReturnOrder: false,
-          name: '质检员审核',
-          isShow: true
-        },
-        {
-          key: 'techLeader',
-          permissionType: 'view',
-          isShowReturnOrder: false,
-          name: '技术部主管指派',
-          isShow: true
-        },
-        {
-          key: 'techApprove',
-          permissionType: 'update',
-          isShowReturnOrder: false,
-          name: '技术员审核',
-          isShow: true
-        },
-        {
-          key: 'produceLeader',
-          permissionType: 'view',
-          isShowReturnOrder: false,
-          name: '生产部主管指派',
-          isShow: true
-        },
-        {
-          key: 'produceApprove',
-          permissionType: 'update',
-          isShowReturnOrder: false,
-          name: '生产员审核',
-          isShow: true
-        },
-        {
-          key: 'outerStore',
-          permissionType: 'update',
-          isShowReturnOrder: false,
-          name: '外部处理',
-          isShow: [2, 9].includes(this.innerOuterBoth)
-        },
-        {
-          key: 'innerStore',
-          permissionType: 'update',
-          isShowReturnOrder: false,
-          name: '内部处理',
-          isShow: [1, 9].includes(this.innerOuterBoth)
-        },
-        {
-          key: 'QCApprove2',
-          permissionType: 'update',
-          isShowReturnOrder: false,
-          name: '质检员反馈',
-          isShow: true
-        }
-      ];
-      return list.filter((item) => item.isShow);
-    }
-  },
-  async created() {
-    //返修节点中有可能多流程
-    let find =
-      this.repairTabsOptions.find(
-        (item) => item.key == this.taskDefinitionKey
-      )?.isOutOrIn || '';
-    let optionKey = find || this.taskDefinitionKey;
-    this.activeComp = optionKey || 'stater';
-//获取当前流程标签信息
-    let currentTab = this.tabOptions.find(
-      (item) => item.key == this.activeComp
-    ) || {}
-    this.permissionType = currentTab?.permissionType;
-    this.isShowReturnOrder = currentTab?.isShowReturnOrder;
-    find && (await this.getReturnInfo(this.businessId));
-    this.pageName = ['outerStore', 'innerStore'].includes(this.activeComp)
-      ? 'repairTabsPage'
-      : 'customerReturnOrder';
-  },
-  mounted() {
-    setTimeout(() => {
-      this.getActiveCompValue();
-    }, 400);
-  },
-  methods: {
-    getTableValue() {
-      return this.$refs.componentRef.getTableValue();
+    data() {
+      //innerOuterBoth 1 只有内部  2 只有外部 9 都有
+      return {
+        dialogType: 'add',
+        pageName: '',
+        repairTabsOptions: [
+          {
+            key: 'outerStoremanOut',
+            isOutOrIn: 'outerStore',
+            name: '物品出库给外协'
+          },
+          {
+            key: 'outerStoremanIn',
+            isOutOrIn: 'outerStore',
+            name: '外协返修物品入库'
+          },
+          {
+            key: 'outerInQC',
+            isOutOrIn: 'outerStore',
+            name: '外协返修入库质检'
+          },
+          {
+            key: 'innerStoremanIn',
+            isOutOrIn: 'innerStore',
+            name: '内部生产物品入库'
+          },
+          {
+            key: 'innerInQC',
+            isOutOrIn: 'innerStore',
+            name: '内部生产入库质检'
+          }
+        ],
+        activeComp: '',
+        permissionType: '',
+        isShowReturnOrder: '',
+        warehousingMaterialList: [],
+        materialCodeReqList: [],
+        metaList: [],
+        form: {},
+        innerOuterBoth: '',
+        loading: false,
+        key: 1
+      };
+    },
+    computed: {
+      tabOptions() {
+        let list = [
+          {
+            key: 'stater',
+            permissionType: 'update',
+            isShowReturnOrder: false,
+            name: '发起人申请',
+            isShow: true
+          },
+          {
+            key: 'deptLeader',
+            permissionType: 'view',
+            isShowReturnOrder: false,
+            name: '销售主管审批',
+            isShow: true
+          },
+          {
+            key: 'storeman',
+            permissionType: 'update',
+            isShowReturnOrder: true,
+            name: '仓管入库',
+            isShow: true
+          },
+          {
+            key: 'QCLeader',
+            permissionType: 'view',
+            isShowReturnOrder: false,
+            name: '质量部主管指派',
+            isShow: true
+          },
+          {
+            key: 'QCApprove',
+            permissionType: 'update',
+            isShowReturnOrder: false,
+            name: '质检员审核',
+            isShow: true
+          },
+          {
+            key: 'techLeader',
+            permissionType: 'view',
+            isShowReturnOrder: false,
+            name: '技术部主管指派',
+            isShow: true
+          },
+          {
+            key: 'techApprove',
+            permissionType: 'update',
+            isShowReturnOrder: false,
+            name: '技术员审核',
+            isShow: true
+          },
+          {
+            key: 'produceLeader',
+            permissionType: 'view',
+            isShowReturnOrder: false,
+            name: '生产部主管指派',
+            isShow: true
+          },
+          {
+            key: 'produceApprove',
+            permissionType: 'update',
+            isShowReturnOrder: false,
+            name: '生产员审核',
+            isShow: true
+          },
+          {
+            key: 'outerStore',
+            permissionType: 'update',
+            isShowReturnOrder: false,
+            name: '外部处理',
+            isShow: [2, 9].includes(this.innerOuterBoth)
+          },
+          {
+            key: 'innerStore',
+            permissionType: 'update',
+            isShowReturnOrder: false,
+            name: '内部处理',
+            isShow: [1, 9].includes(this.innerOuterBoth)
+          },
+          {
+            key: 'QCApprove2',
+            permissionType: 'update',
+            isShowReturnOrder: false,
+            name: '质检员反馈',
+            isShow: true
+          }
+        ];
+        return list.filter((item) => item.isShow);
+      }
     },
-    handleCard(val) {
-      this.activeComp = val.key;
+    async created() {
+      //返修节点中有可能多流程
+      let find =
+        this.repairTabsOptions.find(
+          (item) => item.key == this.taskDefinitionKey
+        )?.isOutOrIn || '';
+      let optionKey = find || this.taskDefinitionKey;
+      this.activeComp = optionKey || 'stater';
+      //获取当前流程标签信息
+      let currentTab =
+        this.tabOptions.find((item) => item.key == this.activeComp) || {};
+      this.permissionType = currentTab?.permissionType;
+      this.isShowReturnOrder = currentTab?.isShowReturnOrder;
+      find && (await this.getReturnInfo(this.businessId));
       this.pageName = ['outerStore', 'innerStore'].includes(this.activeComp)
         ? 'repairTabsPage'
         : 'customerReturnOrder';
-      this.permissionType = val.permissionType;
-      this.isShowReturnOrder = val.isShowReturnOrder;
-      this.key++;
-      this.getActiveCompValue();
     },
-    getActiveCompValue() {
-      EventBus.$emit('getActiveCompValue', {
-        activeComp: this.activeComp,
-        permissionType: this.permissionType
-      });
+    mounted() {
+      setTimeout(() => {
+        this.getActiveCompValue();
+      }, 400);
     },
-    async getReturnInfo(businessId) {
-      this.form = await saleReturnGetByIdAPI(businessId);
-      this.innerOuterBoth = this.form.innerOuterBoth;
-      // this.$nextTick(() => {
-      //   this.$refs.table.reRenderTable();
-      // });
+    methods: {
+      getTableValue() {
+        return this.$refs.componentRef.getTableValue();
+      },
+      handleCard(val) {
+        this.activeComp = val.key;
+        this.pageName = ['outerStore', 'innerStore'].includes(this.activeComp)
+          ? 'repairTabsPage'
+          : 'customerReturnOrder';
+        this.permissionType = val.permissionType;
+        this.isShowReturnOrder = val.isShowReturnOrder;
+        this.key++;
+        this.getActiveCompValue();
+      },
+      getActiveCompValue() {
+        EventBus.$emit('getActiveCompValue', {
+          activeComp: this.activeComp,
+          permissionType: this.permissionType
+        });
+      },
+      async getReturnInfo(businessId) {
+        this.form = await saleReturnGetByIdAPI(businessId);
+        this.innerOuterBoth = this.form.innerOuterBoth;
+        // this.$nextTick(() => {
+        //   this.$refs.table.reRenderTable();
+        // });
+      }
     }
-  }
-};
+  };
 </script>
 <style scoped lang="scss"></style>

Разница между файлами не показана из-за своего большого размера
+ 778 - 326
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/inboundDetails.vue


+ 19 - 19
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/interiorStorageToOutsourcingQuality.vue

@@ -79,7 +79,7 @@
               <span v-else>{{ formData.extInfo.deliveryPhone }}</span>
             </el-form-item>
           </el-col>
-          <el-col :span="12" v-if="taskDefinitionKey === 'innerInQCFeedback'">
+          <el-col :span="12" v-if="taskDefinitionKey === 'outerInQCFeedback'">
             <el-form-item
               prop="qualityFile"
               label="回执附件"
@@ -590,10 +590,10 @@
               isStorage
                 ? materialCodeReqListOrStorage.length != 0 &&
                   resultArray.length <= 0 &&
-                  taskDefinitionKey === 'innerInQC'
+                  taskDefinitionKey === 'outerInQC'
                 : materialCodeReqList.length != 0 &&
                   resultArray.length <= 0 &&
-                  taskDefinitionKey === 'innerInQC'
+                  taskDefinitionKey === 'outerInQC'
             "
             type="success"
             plain
@@ -806,7 +806,7 @@
               </template>
             </el-table-column>
             <el-table-column
-              v-if="taskDefinitionKey === 'innerInQC' && wrapControl"
+              v-if="taskDefinitionKey === 'outerInQC' && wrapControl"
               label="操作"
               width="80"
               fixed="right"
@@ -961,7 +961,7 @@
               </template>
             </el-table-column>
             <el-table-column
-              v-if="taskDefinitionKey === 'innerInQC' && materialControl"
+              v-if="taskDefinitionKey === 'outerInQC' && materialControl"
               label="操作"
               width="80"
               fixed="right"
@@ -1234,7 +1234,7 @@
               goodsiItem.outInNum = goodsiItem.packingCount;
               this.warehousingMaterialList.push(goodsiItem);
               goodsiItem.outInDetailRecordVOList.forEach((wrapItem) => {
-                if (this.taskDefinitionKey === 'innerInQC') {
+                if (this.taskDefinitionKey === 'outerInQC') {
                   // 生产性采购
                   if (
                     wrapItem.outInDetailRecordMaterialDetailVOList.length > 0
@@ -1263,7 +1263,7 @@
                         materialItem.result === null
                           ? ''
                           : String(materialItem.result);
-                      if (this.taskDefinitionKey === 'innerInQC') {
+                      if (this.taskDefinitionKey === 'outerInQC') {
                         // 生产性采购
                         materialItem.isPack = false;
                         this.materialControl = true;
@@ -1467,7 +1467,7 @@
       wrapListSave() {
         let materialCodeReqList = [];
         // 生产性入库没入库用materialCodeReqList字段
-        if (this.taskDefinitionKey === 'innerInQC' && this.isStorage) {
+        if (this.taskDefinitionKey === 'outerInQC' && this.isStorage) {
           materialCodeReqList = this.materialCodeReqListOrStorage;
         } else {
           materialCodeReqList = this.materialCodeReqList;
@@ -1539,14 +1539,14 @@
       //包装明细保存
       packCout(row) {
         // 生产性质检必须已检才能通过
-        if (this.taskDefinitionKey === 'innerInQC' && row.status != '1') {
+        if (this.taskDefinitionKey === 'outerInQC' && row.status != '1') {
           this.$message.error('请选择质检结果');
           return false;
         }
         //true保存==》反之
         if (!row.isPack) {
           // 生产性采购审核
-          if (this.taskDefinitionKey === 'innerInQC') {
+          if (this.taskDefinitionKey === 'outerInQC') {
             this.isWrapTable = false;
             row.isPack = true;
             this.$nextTick(() => {
@@ -1567,7 +1567,7 @@
           // );
           let materialCodeReqList = [];
           // 生产性入库没入库用materialCodeReqList字段
-          if (this.taskDefinitionKey === 'innerInQC' && this.isStorage) {
+          if (this.taskDefinitionKey === 'outerInQC' && this.isStorage) {
             materialCodeReqList = this.materialCodeReqListOrStorage;
           } else {
             materialCodeReqList = this.materialCodeReqList;
@@ -1595,14 +1595,14 @@
           });
           this.$nextTick(() => {
             // 生产性包装保存
-            if (this.taskDefinitionKey === 'innerInQC' && this.isStorage) {
+            if (this.taskDefinitionKey === 'outerInQC' && this.isStorage) {
               this.initFormData();
             }
             this.isWeight = true;
           });
         } else {
           // 生产性
-          if (this.taskDefinitionKey === 'innerInQC') {
+          if (this.taskDefinitionKey === 'outerInQC') {
             this.isWrapTable = false;
             row.isPack = false;
             this.$nextTick(() => {
@@ -1620,7 +1620,7 @@
       bulkEditingWrap() {
         let materialCodeReqList = [];
         // 生产性入库没入库用materialCodeReqList字段
-        if (this.taskDefinitionKey === 'innerInQC' && this.isStorage) {
+        if (this.taskDefinitionKey === 'outerInQC' && this.isStorage) {
           materialCodeReqList = this.materialCodeReqListOrStorage;
         } else {
           materialCodeReqList = this.materialCodeReqList;
@@ -1652,7 +1652,7 @@
       bulkEditingMaterial() {
         let materialCodeReqList = [];
         // 生产性入库没入库用materialCodeReqList字段
-        if (this.taskDefinitionKey === 'innerInQC' && this.isStorage) {
+        if (this.taskDefinitionKey === 'outerInQC' && this.isStorage) {
           materialCodeReqList = this.materialCodeReqListOrStorage;
         } else {
           materialCodeReqList = this.materialCodeReqList;
@@ -1688,7 +1688,7 @@
         // 是否单点
         if (!isLonely) {
           // 生产性质检必须已检才能通过
-          if (this.taskDefinitionKey === 'innerInQC' && row.status != '1') {
+          if (this.taskDefinitionKey === 'outerInQC' && row.status != '1') {
             this.$message.error('请选择质检结果');
             return false;
           }
@@ -1696,7 +1696,7 @@
         let materialCodeReqList = [];
         let code = 'onlyCode';
         // 生产性入库没入库用materialCodeReqList字段
-        if (this.taskDefinitionKey === 'innerInQC' && this.isStorage) {
+        if (this.taskDefinitionKey === 'outerInQC' && this.isStorage) {
           materialCodeReqList = this.materialCodeReqListOrStorage;
           code = 'code';
         } else {
@@ -1706,7 +1706,7 @@
         // true保存 false编辑
         if (!row.isPack) {
           // 生产性采购审核
-          if (this.taskDefinitionKey === 'innerInQC') {
+          if (this.taskDefinitionKey === 'outerInQC') {
             this.isWrapTable = false;
             this.isMaterialTable = false;
             row.isPack = true;
@@ -1803,7 +1803,7 @@
           });
         } else {
           // 生产性采购审核
-          if (this.taskDefinitionKey === 'innerInQC') {
+          if (this.taskDefinitionKey === 'outerInQC') {
             this.isMaterialTable = false;
             this.isWrapTable = false;
             row.isPack = false;

+ 1 - 2
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/submit.vue

@@ -130,9 +130,8 @@
         this.activeComp = row.activeComp;
         this.childActiveComp = row.childActiveComp;
         this.permissionType = row.permissionType;
-        console.log(this.childActiveComp,this.taskDefinitionKey,'=====');
+        console.log(this.childActiveComp, this.taskDefinitionKey, '=====');
       });
-
     },
     mounted() {},
     methods: {

Некоторые файлы не были показаны из-за большого количества измененных файлов