Kaynağa Gözat

报价单 ehsd报价单 BUG

lxf 2 yıl önce
ebeveyn
işleme
5f6c4db840

+ 29 - 2
src/components/process/EHSD/PriceSheet.vue

@@ -817,11 +817,38 @@ const props = defineProps({
   queryData: Object,
 });
 onMounted(() => {
-  if (props.queryData.id) {
-    proxy.post("/saleQuotation/detail", { id: props.queryData.id }).then((res) => {
+  if (props.queryData.priceSheetId) {
+    proxy.post("/saleQuotation/detail", { id: props.queryData.priceSheetId }).then((res) => {
       for (var text in res) {
         formData.data[text] = res[text];
       }
+      if (formData.data.ehsdJson) {
+        let ehsdJson = JSON.parse(formData.data.ehsdJson);
+        if (ehsdJson.deliveryTime) {
+          formData.data.deliveryTime = ehsdJson.deliveryTime;
+        }
+      }
+      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+        for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+          if (formData.data.quotationProductList[i].ehsdJson) {
+            let ehsdJsonProduct = JSON.parse(formData.data.quotationProductList[i].ehsdJson);
+            if (ehsdJsonProduct.packMethod) {
+              formData.data.quotationProductList[i].packMethod = ehsdJsonProduct.packMethod;
+            }
+            if (ehsdJsonProduct.tradeMethods) {
+              formData.data.quotationProductList[i].tradeMethods = ehsdJsonProduct.tradeMethods;
+            }
+          }
+        }
+        let fileIds = formData.data.quotationProductList.map((item) => item.productId);
+        proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
+          for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+            if (resFile[formData.data.quotationProductList[i].productId] && resFile[formData.data.quotationProductList[i].productId].length > 0) {
+              formData.data.quotationProductList[i].fileUrl = resFile[formData.data.quotationProductList[i].productId][0].fileUrl;
+            }
+          }
+        });
+      }
       delete formData.data.id;
       delete formData.data.code;
       getCityData(formData.data.customerCountryId, "20");

+ 17 - 2
src/components/process/PriceSheet.vue

@@ -778,11 +778,26 @@ const props = defineProps({
   queryData: Object,
 });
 onMounted(() => {
-  if (props.queryData.id) {
-    proxy.post("/saleQuotation/detail", { id: props.queryData.id }).then((res) => {
+  if (props.queryData.priceSheetId) {
+    proxy.post("/saleQuotation/detail", { id: props.queryData.priceSheetId }).then((res) => {
       for (var text in res) {
         formData.data[text] = res[text];
       }
+      if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
+        for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+          proxy.post("/productInfo/detail", { id: formData.data.quotationProductList[i].productId }).then((resProduct) => {
+            formData.data.quotationProductList[i].code = resProduct.code;
+          });
+        }
+        let fileIds = formData.data.quotationProductList.map((item) => item.productId);
+        proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
+          for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+            if (resFile[formData.data.quotationProductList[i].productId] && resFile[formData.data.quotationProductList[i].productId].length > 0) {
+              formData.data.quotationProductList[i].fileUrl = resFile[formData.data.quotationProductList[i].productId][0].fileUrl;
+            }
+          }
+        });
+      }
       delete formData.data.id;
       delete formData.data.code;
       getCityData(formData.data.buyCountryId, "20");

+ 2 - 2
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -313,7 +313,7 @@ const config = computed(() => {
       attrs: {
         label: "报价人",
         prop: "userName",
-        width: 120,
+        width: 160,
       },
     },
     {
@@ -516,7 +516,7 @@ const clickCopy = (item) => {
     query: {
       flowKey: "sale_quotation_flow",
       flowName: "报价审批流程",
-      id: item.id,
+      priceSheetId: item.id,
       random: proxy.random(),
       tenantType: "EHSD",
     },

+ 4 - 0
src/views/process/processApproval/index.vue

@@ -218,9 +218,13 @@ const handleSubmit = async (_type) => {
             data.victoriatouristJson = JSON.stringify(victoriatouristJson);
           } else if (flowForm.flowKey == "sale_quotation_flow") {
             if (flowForm.tenantType === "EHSD") {
+              data.ehsdJson = JSON.stringify({
+                deliveryTime: data.deliveryTime,
+              });
               data.quotationProductList = data.quotationProductList.map((item) => {
                 let ehsdJson = JSON.stringify({
                   packMethod: item.packMethod,
+                  tradeMethods: item.tradeMethods,
                 });
                 return {
                   ...item,

+ 2 - 2
src/views/salesMange/saleContract/priceSheet/index.vue

@@ -313,7 +313,7 @@ const config = computed(() => {
       attrs: {
         label: "报价人",
         prop: "userName",
-        width: 120,
+        width: 160,
       },
     },
     {
@@ -515,7 +515,7 @@ const clickCopy = (item) => {
     query: {
       flowKey: "sale_quotation_flow",
       flowName: "报价审批流程",
-      id: item.id,
+      priceSheetId: item.id,
       random: proxy.random(),
     },
   });