cz 1 سال پیش
والد
کامیت
c78fba44f9
2فایلهای تغییر یافته به همراه98 افزوده شده و 93 حذف شده
  1. 58 59
      src/views/salesMange/saleContract/contract/index.vue
  2. 40 34
      src/views/salesMange/shipmentMange/document/index.vue

+ 58 - 59
src/views/salesMange/saleContract/contract/index.vue

@@ -8,7 +8,7 @@
         :loading="loading"
         :selectConfig="selectConfig"
         highlight-current-row
-        :statConfig='statConfig'
+        :statConfig="statConfig"
         :action-list="[
           {
             text: '创建合同',
@@ -400,30 +400,30 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.issue && row.issue === "0" && row.status == 30
-            ? {
-                attrs: {
-                  label: "下发交接单",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  ElMessageBox.confirm("是否确认下发交接单?", "提示", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning",
-                  }).then(() => {
-                    proxy
-                      .post("/contract/edit", { id: row.id, issue: 1 })
-                      .then(() => {
-                        ElMessage({ message: "下发成功", type: "success" });
-                        getList();
-                      });
-                  });
-                },
-              }
-            : {},
+          // row.issue && row.issue === "0" && row.status == 30
+          //   ? {
+          //       attrs: {
+          //         label: "下发交接单",
+          //         type: "primary",
+          //         text: true,
+          //       },
+          //       el: "button",
+          //       click() {
+          //         ElMessageBox.confirm("是否确认下发交接单?", "提示", {
+          //           confirmButtonText: "确定",
+          //           cancelButtonText: "取消",
+          //           type: "warning",
+          //         }).then(() => {
+          //           proxy
+          //             .post("/contract/edit", { id: row.id, issue: 1 })
+          //             .then(() => {
+          //               ElMessage({ message: "下发成功", type: "success" });
+          //               getList();
+          //             });
+          //         });
+          //       },
+          //     }
+          //   : {},
           row.status == 30
             ? {
                 attrs: {
@@ -584,14 +584,13 @@ const getList = async (req) => {
   });
 };
 const statConfig = computed(() => {
-	return [
-		{
-			label: '合计',
-			data:[],
-		},
-		
-	]
-})
+  return [
+    {
+      label: "合计",
+      data: [],
+    },
+  ];
+});
 getDict();
 if (route.query.code) {
   sourceList.value.pagination.keyword = route.query.code;
@@ -601,46 +600,46 @@ const getTotal = () => {
   proxy.get("/contract/getHeadCustomerStatistics").then((res) => {
     statConfig.value[0].data = [];
     statConfig.value[0].data.push({
-      label:'合计',
-      data:[
+      label: "合计",
+      data: [
         {
-          label:'数量',
-          num:res.data.sumQuantity,
-          color:'rgb(171 0 255)',
+          label: "数量",
+          num: res.data.sumQuantity,
+          color: "rgb(171 0 255)",
         },
         {
-          label:'金额',
-          num:res.data.sumArrivalAmount,
-          color:'rgb(171 0 255)',
+          label: "金额",
+          num: res.data.sumArrivalAmount,
+          color: "rgb(171 0 255)",
         },
         {
-          label:'到账金额',
-          num:res.data.sumAmount,
-          color:'rgb(171 0 255)',
+          label: "到账金额",
+          num: res.data.sumAmount,
+          color: "rgb(171 0 255)",
         },
-      ]
-    })
+      ],
+    });
     for (let i = 0; i < res.data.list.length; i++) {
       statConfig.value[0].data.push({
-        label:res.data.list[i].sellCorporationName,
-        data:[
+        label: res.data.list[i].sellCorporationName,
+        data: [
           {
-            label:'数量',
-            num:res.data.list[i].sumQuantity,
-            color:'blue',
+            label: "数量",
+            num: res.data.list[i].sumQuantity,
+            color: "blue",
           },
           {
-            label:'金额',
-            num:res.data.list[i].sumClaimMoney,
-            color:'blue',
+            label: "金额",
+            num: res.data.list[i].sumClaimMoney,
+            color: "blue",
           },
           {
-            label:'到账金额',
-            num:res.data.list[i].sumClaimMoney,
-            color:'blue',
+            label: "到账金额",
+            num: res.data.list[i].sumClaimMoney,
+            color: "blue",
           },
-        ]
-      })
+        ],
+      });
     }
     console.log(res);
   });

+ 40 - 34
src/views/salesMange/shipmentMange/document/index.vue

@@ -223,9 +223,9 @@
         <el-button @click="clickPrint(2)" type="primary">商业发票</el-button>
         <el-button @click="clickPrint(3)" type="primary">销售确认书</el-button>
         <el-button @click="clickPrint(4)" type="primary">报关单</el-button>
-        <!-- <el-button @click="clickPrint(5)" type="primary"
+        <el-button @click="clickPrint(5)" type="primary"
           >代理报关委托书</el-button
-        > -->
+        >
       </div>
       <template #footer>
         <el-button @click="openSelectPrint = false" size="large"
@@ -238,7 +238,7 @@
       <div id="printMe">
         <div
           id="pdfDom"
-          style="padding: 16px; font-size: 12px !important;font-family: 'msyh';"
+          style="padding: 16px; font-size: 12px !important; font-family: 'msyh'"
         >
           <div v-if="openStatus === 1">
             <div style="font-size: 16px; text-align: center; font-weight: 700">
@@ -1210,7 +1210,12 @@
       <div id="printMe">
         <div
           id="pdfDom"
-          style="width: 1400px; padding: 16px; font-size: 12px !important;font-family: 'msyh';"
+          style="
+            width: 1400px;
+            padding: 16px;
+            font-size: 12px !important;
+            font-family: 'msyh';
+          "
         >
           <table cellspacing="0" cellpadding="0" border="0" class="one">
             <tr>
@@ -3123,41 +3128,42 @@ 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;
       });
   } else {
+    openStatus.value = status;
     mandateDialog.value = true;
+    proxy.post(`/documentsPdf/detail?id=${rowData.value.id}`).then((res) => {
+      console.log(res, "sada");
+    });
   }
-  // proxy.get("/documents/generateInvoiceAPackPdf", { id: rowData.value.id }).then((res) => {
-  //   printDetails.value = res.data;
-  // });
 };
 const clickDownload = () => {
   if (openStatus.value === 1) {
@@ -3172,7 +3178,7 @@ const clickDownload = () => {
     data.content = JSON.stringify(data.content);
     proxy.post("/documentsPdf/add", data).then();
     setTimeout(() => {
-      proxy.getPdf("报关单PDF文件",1400);
+      proxy.getPdf("报关单PDF文件", 1400);
       nextTick(() => {
         setTimeout(() => {
           textShow.value = false;