cz 1 سال پیش
والد
کامیت
4955f7decd

+ 16 - 29
src/components/PDF/samplePDF.vue

@@ -65,22 +65,18 @@
           <td style="width: 35%">{{ pdfData.createTimeEn }}</td>
         </tr>
         <tr>
-          <!-- 客户PO -->
           <td style="width: 15%">Contact Person:</td>
-          <td style="width: 35%"></td>
-          <!-- 贸易方式 -->
+          <td style="width: 35%">{{ pdfData.createUserName }}</td>
           <td style="width: 15%">Email:</td>
           <td style="width: 35%">
-            {{ dictValueLabel(pdfData.tradeMethods, tradeMethods) }}
+            {{ pdfData.createUserEmail }}
           </td>
         </tr>
         <tr>
-          <!-- 最终目的地 -->
           <td style="width: 15%">Payment Teams:</td>
-          <td style="width: 35%">{{ pdfData.buyCityName }}</td>
-          <!-- 装货港 -->
-          <td style="width: 15%">Lead Time:</td>
           <td style="width: 35%"></td>
+          <td style="width: 15%">Lead Time:</td>
+          <td style="width: 35%">{{ pdfData.deliveryTime }}</td>
         </tr>
       </table>
       <div style="height: 15px; background: #7f197f"></div>
@@ -89,11 +85,9 @@
           <td style="width: 15%">Image</td>
           <td style="width: 20%">Description</td>
           <td style="width: 15%">Size</td>
-          <td style="width: 12%">Material</td>
-          <td style="width: 12%">Quantity</td>
-
-          <td style="width: 13%">Sample <br />Fee</td>
-          <td style="width: 13%">Total <br />Amount</td>
+          <td style="width: 15%">Quantity</td>
+          <td style="width: 17%">Sample <br />Fee</td>
+          <td style="width: 18%">Total <br />Amount</td>
         </tr>
 
         <tr
@@ -112,19 +106,18 @@
           </td>
           <td style="width: 20%">{{ item.productRemark }}</td>
           <td style="width: 15%">{{ item.productSpec }}</td>
-          <td style="width: 12%">{{ item.packMethod }}</td>
-          <td style="width: 12%">
+          <td style="width: 15%">
             {{ item.productQuantity }}
           </td>
-          <td style="width: 13%">
+          <td style="width: 17%">
             {{ pdfData.currency }} {{ moneyFormat(item.productPrice, 2) }}
           </td>
-          <td style="width: 13%">
+          <td style="width: 18%">
             {{ pdfData.currency }} {{ moneyFormat(item.amount, 2) }}
           </td>
         </tr>
         <tr>
-          <td colspan="6" style="text-align: right">Total Amount:</td>
+          <td colspan="5" style="text-align: right">Total Amount:</td>
           <td style="width: 10%">
             {{ pdfData.currency }}
             {{ moneyFormat(pdfData.totalAmount, 2) }}
@@ -164,16 +157,9 @@ const props = defineProps({
   rowData: Object,
 });
 const getPdfData = (query) => {
-  proxy.post("/contract/getContractPdfInfo", query).then((res) => {
+  proxy.post("/sample/getSamplePdfInfo", query).then((res) => {
+    console.log(res, "ada");
     pdfData.value = res;
-    if (pdfData.value.advanceRatio) {
-      pdfData.value.advanceRatio = parseFloat(
-        pdfData.value.advanceRatio
-      ).toFixed(2);
-      pdfData.value.advanceRatioOne = (
-        100 - Number(pdfData.value.advanceRatio)
-      ).toFixed(2);
-    }
     if (pdfData.value.sellCorporationId) {
       proxy
         .post("/fileInfo/getList", {
@@ -208,13 +194,14 @@ const getPdfData = (query) => {
     }
   });
 };
+// if (props.rowData && props.rowData.id) {
+//   getPdfData({ id: props.rowData.id });
+// }
 watch(
   props.rowData,
   () => {
     if (props.rowData.id) {
       getPdfData({ id: props.rowData.id });
-    } else if (props.rowData.code) {
-      getPdfData({ code: props.rowData.code });
     }
   },
   {

+ 18 - 3
src/components/contractCom/contractDetailsOne.vue

@@ -14,13 +14,15 @@
     <div class="content-box" v-if="activeName !== 'third'">
       <div class="left">
         <div
-          v-for="i in leftList"
+          v-for="(i, index) in leftList"
           :key="i.id"
           class="left-item"
           :style="{ color: currentItem.id === i.id ? '#409eff' : '' }"
           @click="handleItemClick(i)"
         >
-          <div v-if="activeName === 'first'">v {{ i.version }}</div>
+          <div v-if="activeName === 'first'">
+            v {{ i.version || index + 1 }}
+          </div>
           <div v-if="activeName === 'second'">
             {{ i.code }}
           </div>
@@ -180,7 +182,12 @@ const pushProcessApproval = (row) => {
 };
 const handleChange = (val) => {
   if (val === "first") {
-    leftList.value = contractDataList.value;
+    // leftList.value = contractDataList.value;
+    leftList.value = [
+      {
+        id: props.contractId,
+      },
+    ];
   }
   if (val === "second") {
     leftList.value = purchaseDataList.value;
@@ -189,6 +196,14 @@ const handleChange = (val) => {
     handleItemClick(leftList.value[0]);
   }
 };
+if (props.contractId) {
+  leftList.value = [
+    {
+      id: props.contractId,
+    },
+  ];
+  handleItemClick(leftList.value[0]);
+}
 const getDetailsData = () => {
   proxy
     .post("/contract/getVersionList", { id: props.contractId })

+ 11 - 0
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -101,6 +101,9 @@
       <ContractPDFOne :rowData="rowData"></ContractPDFOne>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
+        <el-button type="primary" v-print="printObj" size="large"
+          >打印</el-button
+        >
         <el-button type="primary" @click="clickDownload()" size="large"
           >下载PDF</el-button
         >
@@ -756,6 +759,14 @@ const clickCorporationName = (row) => {
     },
   });
 };
+
+const printObj = ref({
+  id: "pdfDom",
+  popTitle: "",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
 </script>
 
 <style lang="scss" scoped>

+ 11 - 0
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -159,6 +159,9 @@
       <SamplePDF :rowData="rowData"></SamplePDF>
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
+        <el-button type="primary" v-print="printObj" size="large"
+          >打印</el-button
+        >
         <el-button type="primary" @click="clickDownload()" size="large"
           >下载PDF</el-button
         >
@@ -752,6 +755,14 @@ const clickPrint = (row) => {
   };
   openPrint.value = true;
 };
+
+const printObj = ref({
+  id: "pdfDom",
+  popTitle: "",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
 </script>
 
 <style lang="scss" scoped>

+ 3 - 3
src/views/process/processApproval/index.vue

@@ -570,7 +570,7 @@ const skipPage = () => {
       });
     } else if (flowForm.flowKey == "account_request_funds_flow") {
       router.replace({
-        path: "/ERP/fundManage/funds",
+        path: "/ehsd/fundManage/funds",
       });
     } else if (flowForm.flowKey == "refund_flow") {
       router.replace({
@@ -578,7 +578,7 @@ const skipPage = () => {
       });
     } else if (flowForm.flowKey == "pay_flow") {
       router.replace({
-        path: "/ERP/purchasePayment/payment",
+        path: "/ehsd/purchasePayment/payment",
       });
     } else if (flowForm.flowKey == "sale_quotation_flow") {
       if (flowForm.tenantType === "EHSD") {
@@ -593,7 +593,7 @@ const skipPage = () => {
     } else if (flowForm.flowKey == "contract_flow") {
       if (flowForm.tenantType === "EHSD") {
         router.replace({
-          path: "/EHSD/saleContract/contractEHSD",
+          path: "/ehsd/saleContract/contract",
         });
       } else {
         router.replace({