Răsfoiți Sursa

销售合同 - 发起合同优化

lxf 1 an în urmă
părinte
comite
9040c29c14
1 a modificat fișierele cu 16 adăugiri și 2 ștergeri
  1. 16 2
      src/components/process/Contract.vue

+ 16 - 2
src/components/process/Contract.vue

@@ -829,11 +829,18 @@ const pushGoods = (goods) => {
         if (item.fileList && item.fileList.length > 0) {
           fileUrl = item.fileList[0].fileUrl;
         }
+        let name = item.name;
+        if (item.standardJson) {
+          let standardJson = JSON.parse(item.standardJson);
+          if (standardJson && standardJson.englishName) {
+            name = standardJson.englishName;
+          }
+        }
         return {
           fileUrl: fileUrl,
           code: item.code,
           productId: item.id,
-          productName: item.name,
+          productName: name,
           productModel: item.spec,
           unit: item.unit,
           quantity: undefined,
@@ -846,10 +853,17 @@ const pushGoods = (goods) => {
     );
     formData.data.contractShipmentList = formData.data.contractShipmentList.concat(
       goods.map((item) => {
+        let name = item.name;
+        if (item.standardJson) {
+          let standardJson = JSON.parse(item.standardJson);
+          if (standardJson && standardJson.englishName) {
+            name = standardJson.englishName;
+          }
+        }
         return {
           code: item.code,
           productId: item.id,
-          productName: item.name,
+          productName: name,
           shipmentTime: "",
           quantity: undefined,
         };