cz 1 vuosi sitten
vanhempi
commit
6d7041234b
1 muutettua tiedostoa jossa 26 lisäystä ja 28 poistoa
  1. 26 28
      src/views/salesMange/shipmentMange/document/index.vue

+ 26 - 28
src/views/salesMange/shipmentMange/document/index.vue

@@ -3159,32 +3159,32 @@ const clickPrint = (status) => {
       .then((res) => {
         if (res.data.content) {
           res.data.content = JSON.parse(res.data.content);
-          if (
-            res.data.content.products &&
-            res.data.content.products.length > 0
-          ) {
-            let arr = [];
-            for (let i = 0; i < res.data.content.products.length; i++) {
-              const ele = res.data.content.products[i];
-              let index = -1;
-              if (i === 0) {
-                arr.push(ele);
-              } else {
-                const isHaveProduct = arr.some((x, i) => {
-                  if (x.productId === ele.productId) {
-                    index = i;
-                    return true;
-                  }
-                });
-                if (isHaveProduct && index >= 0) {
-                  arr[index].quantity += ele.quantity;
-                } else {
-                  arr.push(ele);
-                }
-              }
-            }
-            res.data.content.products = arr;
-          }
+          // if (
+          //   res.data.content.products &&
+          //   res.data.content.products.length > 0
+          // ) {
+          //   let arr = [];
+          //   for (let i = 0; i < res.data.content.products.length; i++) {
+          //     const ele = res.data.content.products[i];
+          //     let index = -1;
+          //     if (i === 0) {
+          //       arr.push(ele);
+          //     } else {
+          //       const isHaveProduct = arr.some((x, i) => {
+          //         if (x.productId === ele.productId) {
+          //           index = i;
+          //           return true;
+          //         }
+          //       });
+          //       if (isHaveProduct && index >= 0) {
+          //         arr[index].quantity += ele.quantity;
+          //       } else {
+          //         arr.push(ele);
+          //       }
+          //     }
+          //   }
+          //   res.data.content.products = arr;
+          // }
         }
         printCustomsDeclaration.value = res.data;
       });
@@ -3200,7 +3200,6 @@ const clickPrint = (status) => {
           res.agentList = [];
         }
         mandateData.value = res;
-        console.log(mandateData.value, "daa");
       });
   }
 };
@@ -3249,7 +3248,6 @@ const clickSave = () => {
   } else if (openStatus.value === 5) {
     let content = proxy.deepClone(mandateData.value);
     content.agentList = content.agentList.join(",");
-    console.log(content, "ada");
     const data = {
       documentId: rowData.value.id,
       contractCode: rowData.value.code,