yusheng 10 сар өмнө
parent
commit
dd0938ae5a

+ 7 - 7
src/BIZComponents/product-list.vue

@@ -518,13 +518,13 @@
         if (this.isSupplier) {
           let supplierList = await this.getSupplierObj(list, 'categoryId');
           list.forEach((item) => {
-            item['supplierList'] = supplierList[item.id];
-            item['entrustedEnterpriseIdList'] = supplierList[item.id];
-            if (supplierList[item.id]?.length) {
-              item['entrustedEnterpriseId'] = supplierList[item.id][0].id;
-              item['supplierCode'] = supplierList[item.id][0].code;
-              item['supplierId'] = supplierList[item.id][0].id;
-              item['supplierName'] = supplierList[item.id][0].name;
+            item['supplierList'] = supplierList[item.categoryId];
+            // item['entrustedEnterpriseIdList'] = supplierList[item.categoryId];
+            if (supplierList[item.categoryId]?.length) {
+              // item['entrustedEnterpriseId'] = supplierList[item.id][0].id;
+              item['supplierCode'] = supplierList[item.categoryId][0].code;
+              item['supplierId'] = supplierList[item.categoryId][0].id;
+              item['supplierName'] = supplierList[item.categoryId][0].name;
             }
           });
         }