huang_an 1 год назад
Родитель
Сommit
a3cab29811

+ 1 - 6
src/views/bpm/handleTask/components/selectedCollectionOutbound/boxTabPage.vue

@@ -16,12 +16,7 @@
         ref="componentRef"
         v-bind="activeNameProps"
       /> -->
-    </keep-alive>
-    <keep-alive>
-      <outbound
-        ref="componentRef"
-        :activeNameProps="activeNameProps"
-      ></outbound>
+      <outbound :activeNameProps="activeNameProps"></outbound>
     </keep-alive>
   </div>
 </template>

+ 135 - 135
src/views/bpm/handleTask/components/selectedCollectionOutbound/boxTabPage2.vue

@@ -1,145 +1,145 @@
 <template>
-    <div>
-      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-        <el-tab-pane
-          v-for="item in tabOption"
-          :label="item.label"
-          :name="item.name"
-        >
-        </el-tab-pane>
-      </el-tabs>
-      <keep-alive>
-        <component
-          v-if="activeName && isValidComponent(activeName)"
-          :is="activeName"
-          :key="activeName"
-          ref="componentRef"
-          v-bind="activeNameProps"
-        />
-      </keep-alive>
-    </div>
-  </template>
-  
-  <script>
-    import { deepClone } from '@/components/FormGenerator/utils/index';
-    import { getPickOrderById } from '@/api/pda';
-    export default {
-      name: 'boxTabPage',
-      components: {
-        tab1: () => import('./detailDialog.vue'),
-        tab2: () => import('@/views/bpm/outgoingManagement/outbound.vue')
+  <div>
+    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+      <el-tab-pane
+        v-for="item in tabOption"
+        :label="item.label"
+        :name="item.name"
+      >
+      </el-tab-pane>
+    </el-tabs>
+    <keep-alive>
+      <component
+        v-if="activeName && isValidComponent(activeName)"
+        :is="activeName"
+        :key="activeName"
+        ref="componentRef"
+        v-bind="activeNameProps"
+      />
+    </keep-alive>
+  </div>
+</template>
+
+<script>
+  import { deepClone } from '@/components/FormGenerator/utils/index';
+  import { getPickOrderById } from '@/api/pda';
+  export default {
+    name: 'boxTabPage',
+    components: {
+      tab1: () => import('./detailDialog.vue'),
+      tab2: () => import('@/views/bpm/outgoingManagement/outbound.vue')
+    },
+    props: {
+      taskDefinitionKey: {
+        type: String,
+        default: ''
       },
-      props: {
-        taskDefinitionKey: {
-          type: String,
-          default: ''
-        },
-        activeComp: {
-          type: String,
-          default: ''
-        },
-        permissionType: {
-          type: String,
-          default: 'view'
-        },
-        businessId: {
-          type: String,
-          default: ''
-        }
+      activeComp: {
+        type: String,
+        default: ''
       },
-      data() {
-        return {
-          form: {},
-          activeName: 'tab1',
-          cKey: 1,
-          extractedList: [],
-          wwType: ''
-        };
+      permissionType: {
+        type: String,
+        default: 'view'
       },
-      computed: {
-        tabOption() {
-          let list = [
-            {
-              label: '领料单详情',
-              name: 'tab1',
-              isShow: true
-            },
-            {
-              label: '出库',
-              name: 'tab2',
-              isShow: true
-            }
-          ];
-          return list.filter((item) => item.isShow);
-        },
-        activeNameProps() {
-          switch (this.activeName) {
-            case 'tab1':
-              return {
-                businessId: this.businessId,
-                form: this.form
-              };
-            case 'tab2':
-              return {
-                form: this.form,
-                bizType: 11,
-                sourceBizNo: this.form.code,
-                detailList: this.form.detailList,
-                type: '自选领用出库',
-                wwType: this.wwType,
-                extractedList: this.extractedList
-              };
+      businessId: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form: {},
+        activeName: 'tab1',
+        cKey: 1,
+        extractedList: [],
+        wwType: ''
+      };
+    },
+    computed: {
+      tabOption() {
+        let list = [
+          {
+            label: '领料单详情',
+            name: 'tab1',
+            isShow: true
+          },
+          {
+            label: '出库',
+            name: 'tab2',
+            isShow: true
           }
+        ];
+        return list.filter((item) => item.isShow);
+      },
+      activeNameProps() {
+        switch (this.activeName) {
+          case 'tab1':
+            return {
+              businessId: this.businessId,
+              form: this.form
+            };
+          case 'tab2':
+            return {
+              form: this.form,
+              bizType: 11,
+              sourceBizNo: this.form.code,
+              detailList: this.form.detailList,
+              type: '自选领用出库',
+              wwType: this.wwType,
+              extractedList: this.extractedList
+            };
+        }
+      }
+    },
+    async created() {
+      this.getPickOrderDetail();
+    },
+    methods: {
+      isValidComponent(componentName) {
+        const validComponents = ['tab1', 'tab2'];
+        return validComponents.includes(componentName);
+      },
+      handleClick(val) {
+        this.activeName = val.name;
+        if (val.name == 'tab2') {
+          this.$emit('activeCompChange', 'inoutBound');
+        } else {
+          console.log('activeCompChange------------');
+          this.$emit('activeCompChange', 'inoutBoundView');
         }
       },
-      async created() {
-        this.getPickOrderDetail();
+      async getTableValue() {
+        console.log(this.$refs.componentRef);
+        return {
+          form: this.form,
+          returnStorageData: this.$refs.componentRef.getReturnStorage
+            ? await this.$refs.componentRef.getReturnStorage()
+            : ''
+        };
       },
-      methods: {
-        isValidComponent(componentName) {
-          const validComponents = ['tab1', 'tab2'];
-          return validComponents.includes(componentName);
-        },
-        handleClick(val) {
-          this.activeName = val.name;
-          if (val.name == 'tab2') {
-            this.$emit('activeCompChange', 'inoutBound');
-          } else {
-            console.log('activeCompChange------------');
-            this.$emit('activeCompChange', 'inoutBoundView');
-          }
-        },
-        async getTableValue() {
-          console.log(this.$refs.componentRef);
-          return {
-            form: this.form,
-            returnStorageData: this.$refs.componentRef.getReturnStorage
-              ? await this.$refs.componentRef.getReturnStorage()
-              : ''
-          };
-        },
-        getPickOrderDetail() {
-          getPickOrderById(this.businessId).then((data) => {
-            data.detailList = data.detailList.map((item) => {
-              item.code = data.code;
-              return item;
-            });
-            this.wwType = data.type;
-            this.extractedList = data.detailList.map((item) => ({
-              taskId: item.taskId,
-              workOrderId: item.workOrderId
-            }));
-            let categoryLevelTopIds = data.detailList.map(
-              (item) => item.rootCategoryLevelId
-            );
-            let filterCategoryLevelTopIds = Array.from(
-              new Set(categoryLevelTopIds)
-            );
-            data.categoryLevelTopId = filterCategoryLevelTopIds.join(',');
-            this.form = deepClone(data);
+      getPickOrderDetail() {
+        getPickOrderById(this.businessId).then((data) => {
+          data.detailList = data.detailList.map((item) => {
+            item.code = data.code;
+            return item;
           });
-        }
+          this.wwType = data.type;
+          this.extractedList = data.detailList.map((item) => ({
+            taskId: item.taskId,
+            workOrderId: item.workOrderId
+          }));
+          let categoryLevelTopIds = data.detailList.map(
+            (item) => item.rootCategoryLevelId
+          );
+          let filterCategoryLevelTopIds = Array.from(
+            new Set(categoryLevelTopIds)
+          );
+          data.categoryLevelTopId = filterCategoryLevelTopIds.join(',');
+          this.form = deepClone(data);
+        });
       }
-    };
-  </script>
-  <style scoped lang="scss"></style>
+    }
+  };
+</script>
+<style scoped lang="scss"></style>

+ 84 - 84
src/views/bpm/handleTask/components/selectedCollectionOutbound/boxTabPage3.vue

@@ -1,6 +1,6 @@
 <template>
-    <div>
-      <!-- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+  <div>
+    <!-- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
         <el-tab-pane
           v-for="item in tabOption"
           :label="item.label"
@@ -8,96 +8,96 @@
         >
         </el-tab-pane>
       </el-tabs> -->
-      <keep-alive>
-        <!-- <component
+    <keep-alive>
+      <!-- <component
           v-if="activeName && isValidComponent(activeName)"
           :is="activeName"
           :key="activeName"
           ref="componentRef"
           v-bind="activeNameProps"
         /> -->
-        <outbound :activeNameProps="activeNameProps"></outbound>
-      </keep-alive>
-    </div>
-  </template>
-  
-  <script>
-    // import { deepClone } from '@/components/FormGenerator/utils/index';
-    // import { getPickOrderById } from '@/api/pda';
-  
-    import Outbound from '@/views/bpm/outgoingManagement/outbound.vue';
-  
-    export default {
-      name: 'boxTabPage',
-      components: {
-        Outbound
-        // tab1: () => import('./detailDialog.vue'),
-        // tab2: () => import('@/views/bpm/outgoingManagement/outbound.vue')
+
+      <outbound :activeNameProps="activeNameProps"></outbound>
+    </keep-alive>
+  </div>
+</template>
+
+<script>
+  // import { deepClone } from '@/components/FormGenerator/utils/index';
+  // import { getPickOrderById } from '@/api/pda';
+
+  import Outbound from '@/views/bpm/outgoingManagement/outbound.vue';
+
+  export default {
+    name: 'boxTabPage',
+    components: {
+      Outbound
+      // tab1: () => import('./detailDialog.vue'),
+      // tab2: () => import('@/views/bpm/outgoingManagement/outbound.vue')
+    },
+    props: {
+      taskDefinitionKey: {
+        type: String,
+        default: ''
       },
-      props: {
-        taskDefinitionKey: {
-          type: String,
-          default: ''
-        },
-        activeComp: {
-          type: String,
-          default: ''
-        },
-        permissionType: {
-          type: String,
-          default: 'view'
-        },
-        businessId: {
-          type: String,
-          default: ''
-        }
+      activeComp: {
+        type: String,
+        default: ''
       },
-      data() {
-        return {
-          form: {},
-          // activeName: 'tab1',
-          cKey: 1,
-          extractedList: [],
-          wwType: '',
-          activeNameProps: {
-            businessId: this.businessId,
-            // form: this.form,
-            bizType: 11,
-            // sourceBizNo: this.form.code,
-            // detailList: this.form.detailList,
-            type: '自选领用出库'
-            // wwType: this.wwType,
-            // extractedList: this.extractedList
-          }
-        };
+      permissionType: {
+        type: String,
+        default: 'view'
       },
-      computed: {},
-      async created() {},
-      methods: {
-        // isValidComponent(componentName) {
-        //   const validComponents = ['tab1', 'tab2'];
-        //   return validComponents.includes(componentName);
-        // },
-        // handleClick(val) {
-        //   this.activeName = val.name;
-        //   if (val.name == 'tab2') {
-        //     this.$emit('activeCompChange', 'inoutBound');
-        //   } else {
-        //     console.log('activeCompChange------------');
-        //     this.$emit('activeCompChange', 'inoutBoundView');
-        //   }
-        // },
-        async getTableValue() {
-          console.log(this.$refs.componentRef);
-          return {
-            form: this.form,
-            returnStorageData: this.$refs.componentRef.getReturnStorage
-              ? await this.$refs.componentRef.getReturnStorage()
-              : ''
-          };
+      businessId: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form: {},
+        // activeName: 'tab1',
+        cKey: 1,
+        extractedList: [],
+        wwType: '',
+        activeNameProps: {
+          businessId: this.businessId,
+          // form: this.form,
+          bizType: 11,
+          // sourceBizNo: this.form.code,
+          // detailList: this.form.detailList,
+          type: '自选领用出库'
+          // wwType: this.wwType,
+          // extractedList: this.extractedList
         }
+      };
+    },
+    computed: {},
+    async created() {},
+    methods: {
+      // isValidComponent(componentName) {
+      //   const validComponents = ['tab1', 'tab2'];
+      //   return validComponents.includes(componentName);
+      // },
+      // handleClick(val) {
+      //   this.activeName = val.name;
+      //   if (val.name == 'tab2') {
+      //     this.$emit('activeCompChange', 'inoutBound');
+      //   } else {
+      //     console.log('activeCompChange------------');
+      //     this.$emit('activeCompChange', 'inoutBoundView');
+      //   }
+      // },
+      async getTableValue() {
+        console.log(this.$refs.componentRef);
+        return {
+          form: this.form,
+          returnStorageData: this.$refs.componentRef.getReturnStorage
+            ? await this.$refs.componentRef.getReturnStorage()
+            : ''
+        };
       }
-    };
-  </script>
-  <style scoped lang="scss"></style>
-  
+    }
+  };
+</script>
+<style scoped lang="scss"></style>

+ 8 - 2
src/views/bpm/outgoingManagement/outbound.vue

@@ -580,7 +580,7 @@
       saleProductList: { type: Array, default: () => [] },
       // extractedList: { type: Array, default: () => [] },
       // wwType: { type: Number, default: null },
-      activeNameProps: { type: Object, default: {} }
+      activeNameProps: { type: Object, default: () => {} }
     },
     directives: {
       'el-table-infinite-scroll': elTableInfiniteScroll
@@ -684,6 +684,7 @@
         });
       },
       getPickOrderDetail() {
+        console.log(this.activeNameProps, 99999999999999999999);
         getPickOrderById(this.activeNameProps.businessId).then((data) => {
           data.detailList = data.detailList.map((item) => {
             item.code = data.code;
@@ -969,7 +970,12 @@
           let pData2 = {
             type: this.wwType,
             taskIds: this.extractedList.map((item) => item.taskId),
-            workOrderIds: this.extractedList.map((item) => item.workOrderId)
+            workOrderIds: this.extractedList.map((item) => item.workOrderId),
+            workOrderIds: this.extractedList.map((item) => item.workOrderId),
+            outsourceBatchNos: this.extractedList.map(
+              (item) => item.outsourceBatchNo
+            ),
+            outsourceCodes: this.extractedList.map((item) => item.outsourceCode)
           };
           storageApi
             .getHierarchyFifo(this.wwType == 3 ? pData2 : pData)

+ 6 - 1
src/views/bpm/outgoingManagement/outbound2.vue

@@ -903,7 +903,12 @@
           let pData2 = {
             type: this.wwType,
             taskIds: this.extractedList.map((item) => item.taskId),
-            workOrderIds: this.extractedList.map((item) => item.workOrderId)
+            workOrderIds: this.extractedList.map((item) => item.workOrderId),
+            workOrderIds: this.extractedList.map((item) => item.workOrderId),
+            outsourceBatchNos: this.extractedList.map(
+              (item) => item.outsourceBatchNo
+            ),
+            outsourceCodes: this.extractedList.map((item) => item.outsourceCode)
           };
           storageApi
             .getHierarchyFifo(this.wwType == 3 ? pData2 : pData)

+ 6 - 1
src/views/bpm/outgoingManagement/outbound3.vue

@@ -969,7 +969,12 @@
           let pData2 = {
             type: this.wwType,
             taskIds: this.extractedList.map((item) => item.taskId),
-            workOrderIds: this.extractedList.map((item) => item.workOrderId)
+            workOrderIds: this.extractedList.map((item) => item.workOrderId),
+            workOrderIds: this.extractedList.map((item) => item.workOrderId),
+            outsourceBatchNos: this.extractedList.map(
+              (item) => item.outsourceBatchNo
+            ),
+            outsourceCodes: this.extractedList.map((item) => item.outsourceCode)
           };
           storageApi
             .getHierarchyFifo(this.wwType == 3 ? pData2 : pData)

+ 2 - 0
src/views/bpm/stockManagement/storage.vue

@@ -1001,6 +1001,8 @@
           this.showPackingList.forEach((obj) => {
             obj.workOrderId = this.detailProductList[0].workOrderId;
             obj.taskId = this.detailProductList[0].taskId;
+            obj.outsourceBatchNo = this.detailProductList[0].batchNo;
+            obj.outsourceCode = this.detailProductList[0].sourceCode;
           });
           this.pickingPageNum = Math.ceil(
             this.showPackingList.length / this.pageSize

+ 2 - 0
src/views/bpm/stockManagement/storage_2.vue

@@ -1013,6 +1013,8 @@
           this.showPackingList.forEach((obj) => {
             obj.workOrderId = this.detailProductList[0].workOrderId;
             obj.taskId = this.detailProductList[0].taskId;
+            obj.outsourceBatchNo = this.detailProductList[0].batchNo;
+            obj.outsourceCode = this.detailProductList[0].sourceCode;
           });
         },
         deep: true

+ 2 - 0
src/views/bpm/stockManagement/storage_3.vue

@@ -1001,6 +1001,8 @@
           this.showPackingList.forEach((obj) => {
             obj.workOrderId = this.detailProductList[0].workOrderId;
             obj.taskId = this.detailProductList[0].taskId;
+            obj.outsourceBatchNo = this.detailProductList[0].batchNo;
+            obj.outsourceCode = this.detailProductList[0].sourceCode;
           });
           this.pickingPageNum = Math.ceil(
             this.showPackingList.length / this.pageSize