cz 1 жил өмнө
parent
commit
219ea7dfc8

+ 16 - 19
src/components/process/EHSD/Contract.vue

@@ -975,7 +975,7 @@ const activeName = ref("1");
 const formData = reactive({
   data: {
     currency: "",
-    amount: undefined,
+    amount: null,
     contractProductList: [],
     contractProjectList: [],
     fileList: [],
@@ -1406,6 +1406,8 @@ const getDecisionAids = () => {
 
 const changeCustomer = (val) => {
   formData.data.contractProductList = [];
+  formData.data.contractWaitShipmentList = [];
+  formData.data.contractShipmentList = [];
   formData.data.customerName = "";
   formData.data.customerTel = "";
   if (val) {
@@ -1526,8 +1528,8 @@ const selectProduct = (goods) => {
         productName: goods.nameEnglish,
         productModel:
           goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
-        quantity: undefined,
-        price: undefined,
+        quantity: null,
+        price: null,
         amount: "",
         tradeMethods: "",
         packMethod: packMethod,
@@ -1545,8 +1547,8 @@ const selectProduct = (goods) => {
             goods.productWide +
             "*" +
             goods.productHigh,
-          quantity: undefined,
-          price: undefined,
+          quantity: null,
+          price: null,
           amount: "",
           tradeMethods: "",
           packMethod: packMethod,
@@ -1558,7 +1560,7 @@ const selectProduct = (goods) => {
       productCode: goods.code,
       productId: goods.id,
       productName: goods.nameEnglish,
-      quantity: undefined,
+      quantity: null,
       waitQuantity: "",
     });
     // formData.data.contractShipmentList.push({
@@ -1566,7 +1568,7 @@ const selectProduct = (goods) => {
     //   productId: goods.id,
     //   productName: goods.nameEnglish,
     //   shipmentTime: "",
-    //   quantity: undefined,
+    //   quantity: null,
     // });
     ElMessage({
       message: "添加成功!",
@@ -1596,15 +1598,10 @@ const calculationAmount = (att = "") => {
     ) {
       for (let i = 0; i < formData.data.contractProductList.length; i++) {
         let money = 0;
-        if (
-          formData.data.contractProductList[i].quantity &&
-          formData.data.contractProductList[i].price
-        ) {
-          money = parseFloat(
-            Number(formData.data.contractProductList[i].quantity) *
-              Number(formData.data.contractProductList[i].price)
-          ).toFixed(2);
-        }
+        money = parseFloat(
+          Number(formData.data.contractProductList[i].quantity) *
+            Number(formData.data.contractProductList[i].price)
+        ).toFixed(2);
         formData.data.contractProductList[i].amount = money;
       }
       // 重新计算待出货数量
@@ -1652,12 +1649,12 @@ const clickAdd = () => {
   ) {
     formData.data.contractProjectList.push({
       payName: "",
-      amount: undefined,
+      amount: null,
       remark: "",
     });
   } else {
     formData.data.contractProjectList = [
-      { payName: "", amount: undefined, remark: "" },
+      { payName: "", amount: null, remark: "" },
     ];
   }
 };
@@ -1828,7 +1825,7 @@ const clickSplit = (item) => {
     productId: item.productId,
     productName: item.productName,
     shipmentTime: "",
-    quantity: undefined,
+    quantity: null,
   });
 };
 const clickDelete = (index) => {

+ 17 - 20
src/components/process/EHSD/ContractChange.vue

@@ -950,7 +950,7 @@ const activeName = ref("1");
 const formData = reactive({
   data: {
     currency: "",
-    amount: undefined,
+    amount: null,
     contractProductList: [],
     contractProjectList: [],
     fileList: [],
@@ -1375,6 +1375,8 @@ const getDecisionAids = () => {
 
 const changeCustomer = (val) => {
   formData.data.contractProductList = [];
+  formData.data.contractWaitShipmentList = [];
+  formData.data.contractShipmentList = [];
   formData.data.customerName = "";
   formData.data.customerTel = "";
   if (val) {
@@ -1495,8 +1497,8 @@ const selectProduct = (goods) => {
         productName: goods.nameEnglish,
         productModel:
           goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
-        quantity: undefined,
-        price: undefined,
+        quantity: null,
+        price: null,
         amount: "",
         tradeMethods: "",
         packMethod: packMethod,
@@ -1514,8 +1516,8 @@ const selectProduct = (goods) => {
             goods.productWide +
             "*" +
             goods.productHigh,
-          quantity: undefined,
-          price: undefined,
+          quantity: null,
+          price: null,
           amount: "",
           tradeMethods: "",
           packMethod: packMethod,
@@ -1527,7 +1529,7 @@ const selectProduct = (goods) => {
       productCode: goods.code,
       productId: goods.id,
       productName: goods.nameEnglish,
-      quantity: undefined,
+      quantity: null,
       waitQuantity: "",
     });
     // formData.data.contractShipmentList.push({
@@ -1535,7 +1537,7 @@ const selectProduct = (goods) => {
     //   productId: goods.id,
     //   productName: goods.nameEnglish,
     //   shipmentTime: "",
-    //   quantity: undefined,
+    //   quantity: null,
     // });
     ElMessage({
       message: "添加成功!",
@@ -1565,15 +1567,10 @@ const calculationAmount = (att = "") => {
     ) {
       for (let i = 0; i < formData.data.contractProductList.length; i++) {
         let money = 0;
-        if (
-          formData.data.contractProductList[i].quantity &&
-          formData.data.contractProductList[i].price
-        ) {
-          money = parseFloat(
-            Number(formData.data.contractProductList[i].quantity) *
-              Number(formData.data.contractProductList[i].price)
-          ).toFixed(2);
-        }
+        money = parseFloat(
+          Number(formData.data.contractProductList[i].quantity) *
+            Number(formData.data.contractProductList[i].price)
+        ).toFixed(2);
         formData.data.contractProductList[i].amount = money;
       }
       // 重新计算待出货数量
@@ -1621,12 +1618,12 @@ const clickAdd = () => {
   ) {
     formData.data.contractProjectList.push({
       payName: "",
-      amount: undefined,
+      amount: null,
       remark: "",
     });
   } else {
     formData.data.contractProjectList = [
-      { payName: "", amount: undefined, remark: "" },
+      { payName: "", amount: null, remark: "" },
     ];
   }
 };
@@ -1797,7 +1794,7 @@ const clickSplit = (item) => {
     productId: item.productId,
     productName: item.productName,
     shipmentTime: "",
-    quantity: undefined,
+    quantity: null,
   });
 };
 const clickDelete = (index) => {
@@ -1958,7 +1955,7 @@ onMounted(() => {
               productCode: e.productCode,
               productId: e.productId,
               productName: e.productName,
-              quantity: undefined,
+              quantity: null,
               waitQuantity: e.quantity,
             });
           }

+ 16 - 19
src/components/process/EHSD/Sample.vue

@@ -947,7 +947,7 @@ const formData = reactive({
   data: {
     currency: "",
     submitType: "2",
-    amount: undefined,
+    amount: null,
     sampleProductList: [],
     sampleProjectList: [],
     fileList: [],
@@ -1293,6 +1293,8 @@ const getCityData = (id, type, isChange) => {
 getCityData("0");
 const changeCustomer = (val) => {
   formData.data.sampleProductList = [];
+  formData.data.sampleWaitShipmentList = [];
+  formData.data.sampleShipmentList = [];
   formData.data.customerName = "";
   formData.data.customerTel = "";
   if (val) {
@@ -1411,8 +1413,8 @@ const selectProduct = (goods) => {
         productName: goods.nameEnglish,
         productModel:
           goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
-        quantity: undefined,
-        price: undefined,
+        quantity: null,
+        price: null,
         amount: "",
         tradeMethods: "",
         packMethod: packMethod,
@@ -1430,8 +1432,8 @@ const selectProduct = (goods) => {
             goods.productWide +
             "*" +
             goods.productHigh,
-          quantity: undefined,
-          price: undefined,
+          quantity: null,
+          price: null,
           amount: "",
           tradeMethods: "",
           packMethod: packMethod,
@@ -1443,7 +1445,7 @@ const selectProduct = (goods) => {
       productCode: goods.code,
       productId: goods.id,
       productName: goods.nameEnglish,
-      quantity: undefined,
+      quantity: null,
       waitQuantity: "",
     });
     // formData.data.sampleShipmentList.push({
@@ -1451,7 +1453,7 @@ const selectProduct = (goods) => {
     //   productId: goods.id,
     //   productName: goods.nameEnglish,
     //   shipmentTime: "",
-    //   quantity: undefined,
+    //   quantity: null,
     // });
     ElMessage({
       message: "添加成功!",
@@ -1479,15 +1481,10 @@ const calculationAmount = (att = "") => {
     ) {
       for (let i = 0; i < formData.data.sampleProductList.length; i++) {
         let money = 0;
-        if (
-          formData.data.sampleProductList[i].quantity &&
-          formData.data.sampleProductList[i].price
-        ) {
-          money = parseFloat(
-            Number(formData.data.sampleProductList[i].quantity) *
-              Number(formData.data.sampleProductList[i].price)
-          ).toFixed(2);
-        }
+        money = parseFloat(
+          Number(formData.data.sampleProductList[i].quantity) *
+            Number(formData.data.sampleProductList[i].price)
+        ).toFixed(2);
         formData.data.sampleProductList[i].amount = money;
       }
       // 重新计算待出货数量
@@ -1535,12 +1532,12 @@ const clickAdd = () => {
   ) {
     formData.data.sampleProjectList.push({
       payName: "",
-      amount: undefined,
+      amount: null,
       remark: "",
     });
   } else {
     formData.data.sampleProjectList = [
-      { payName: "", amount: undefined, remark: "" },
+      { payName: "", amount: null, remark: "" },
     ];
   }
 };
@@ -1709,7 +1706,7 @@ const clickSplit = (item) => {
     productId: item.productId,
     productName: item.productName,
     shipmentTime: "",
-    quantity: undefined,
+    quantity: null,
   });
 };
 const clickDelete = (index) => {

+ 17 - 20
src/components/process/EHSD/SampleChange.vue

@@ -952,7 +952,7 @@ const formData = reactive({
   data: {
     currency: "",
     submitType: "2",
-    amount: undefined,
+    amount: null,
     sampleProductList: [],
     sampleProjectList: [],
     fileList: [],
@@ -1305,6 +1305,8 @@ const getCityData = (id, type, isChange) => {
 getCityData("0");
 const changeCustomer = (val) => {
   formData.data.sampleProductList = [];
+  formData.data.sampleWaitShipmentList = [];
+  formData.data.sampleShipmentList = [];
   formData.data.customerName = "";
   formData.data.customerTel = "";
   if (val) {
@@ -1423,8 +1425,8 @@ const selectProduct = (goods) => {
         productName: goods.nameEnglish,
         productModel:
           goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
-        quantity: undefined,
-        price: undefined,
+        quantity: null,
+        price: null,
         amount: "",
         tradeMethods: "",
         packMethod: packMethod,
@@ -1442,8 +1444,8 @@ const selectProduct = (goods) => {
             goods.productWide +
             "*" +
             goods.productHigh,
-          quantity: undefined,
-          price: undefined,
+          quantity: null,
+          price: null,
           amount: "",
           tradeMethods: "",
           packMethod: packMethod,
@@ -1455,7 +1457,7 @@ const selectProduct = (goods) => {
       productCode: goods.code,
       productId: goods.id,
       productName: goods.nameEnglish,
-      quantity: undefined,
+      quantity: null,
       waitQuantity: "",
     });
     // formData.data.sampleShipmentList.push({
@@ -1463,7 +1465,7 @@ const selectProduct = (goods) => {
     //   productId: goods.id,
     //   productName: goods.nameEnglish,
     //   shipmentTime: "",
-    //   quantity: undefined,
+    //   quantity: null,
     // });
     ElMessage({
       message: "添加成功!",
@@ -1491,15 +1493,10 @@ const calculationAmount = (att = "") => {
     ) {
       for (let i = 0; i < formData.data.sampleProductList.length; i++) {
         let money = 0;
-        if (
-          formData.data.sampleProductList[i].quantity &&
-          formData.data.sampleProductList[i].price
-        ) {
-          money = parseFloat(
-            Number(formData.data.sampleProductList[i].quantity) *
-              Number(formData.data.sampleProductList[i].price)
-          ).toFixed(2);
-        }
+        money = parseFloat(
+          Number(formData.data.sampleProductList[i].quantity) *
+            Number(formData.data.sampleProductList[i].price)
+        ).toFixed(2);
         formData.data.sampleProductList[i].amount = money;
       }
       // 重新计算待出货数量
@@ -1547,12 +1544,12 @@ const clickAdd = () => {
   ) {
     formData.data.sampleProjectList.push({
       payName: "",
-      amount: undefined,
+      amount: null,
       remark: "",
     });
   } else {
     formData.data.sampleProjectList = [
-      { payName: "", amount: undefined, remark: "" },
+      { payName: "", amount: null, remark: "" },
     ];
   }
 };
@@ -1722,7 +1719,7 @@ const clickSplit = (item) => {
     productId: item.productId,
     productName: item.productName,
     shipmentTime: "",
-    quantity: undefined,
+    quantity: null,
   });
 };
 const clickDelete = (index) => {
@@ -1858,7 +1855,7 @@ onMounted(() => {
               productCode: e.productCode,
               productId: e.productId,
               productName: e.productName,
-              quantity: undefined,
+              quantity: null,
               waitQuantity: e.quantity,
             });
           }

+ 1 - 0
src/views/connect/E-mail/mail/com/mailDetail.vue

@@ -591,6 +591,7 @@ defineExpose({
         font-weight: 700;
         margin-right: 10px;
         display: flex;
+        flex-wrap: wrap;
       }
     }
   }

+ 2 - 1
src/views/connect/E-mail/mail/com/mailList.vue

@@ -331,8 +331,9 @@ const handleRowClick = (row, index) => {
 };
 
 const init = () => {
-  getList();
+  // getList();
 };
+getList();
 
 const handleCurrentChange = (val) => {
   tableData.pagination.pageNum = val;