huang_an 1 rok pred
rodič
commit
58032e7067

+ 9 - 0
src/api/warehouseManagement/index.js

@@ -120,6 +120,15 @@ export default {
     }
     return Promise.reject(new Error(res.data.message));
   },
+  getInfoBySourceBizNoAll: async (id) => {
+    const res = await request.get(
+      `/wms/outintwo/getInfoBySourceBizNoAll/${id}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
   // 质检保存
   qualityInspection: async (data) => {
     const res = await request.post(`/wms/outintwo/qualityInspection`, data);

+ 6 - 6
src/views/bpm/outgoingManagement/details.vue

@@ -635,25 +635,25 @@
         if (this.isInterior) {
           res = await storageApi.getInboundDetailsById(id);
         } else {
-          res = await storageApi.getInfoBySourceBizNo(id);
+          res = await storageApi.getInfoBySourceBizNoAll(id);
         }
         console.log(
           '===============================================================',
           res
         );
-        this.infoData = res;
-        this.extInfo = res.extInfo;
-        this.productList = res.outInDetailList.map(
+        this.infoData = res?.[0];
+        this.extInfo = res?.[0]?.extInfo;
+        this.productList = res?.[0].outInDetailList?.map(
           (productItem, productIndex) => {
             return {
               ...productItem,
               outInDetailRecordRequestList:
-                productItem.outInDetailRecordRequestList.map((packingItem) => {
+                productItem.outInDetailRecordRequestList?.map((packingItem) => {
                   return {
                     ...packingItem,
                     categoryName: productItem.categoryName,
                     categoryCode: productItem.categoryCode,
-                    materialDetailList: packingItem.materialDetailList.map(
+                    materialDetailList: packingItem.materialDetailList?.map(
                       (materialItem) => {
                         return {
                           ...materialItem,