lxf 1 жил өмнө
parent
commit
6415a4b373

+ 35 - 192
src/components/PDF/contractPDF.vue

@@ -1,30 +1,14 @@
 <template>
   <div>
     <div id="printMe">
-      <div
-        id="pdfDom"
-        style="width: 800px; padding: 16px; font-size: 12px !important"
-      >
+      <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
         <div style="font-size: 18px; text-align: center">
           {{ printDetails.sellCorporationNameEn }}
         </div>
         <div style="text-align: center">
-          {{ printDetails.sellCountryName }},{{
-            printDetails.sellProvinceName
-          }},{{ printDetails.sellCityName }},{{
-            printDetails.sellDetailedAddress
-          }}
-        </div>
-        <div
-          style="
-            font-size: 14px;
-            color: #409eff;
-            text-align: center;
-            padding-top: 16px;
-          "
-        >
-          PROFORMA INVOICE
+          {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }}
         </div>
+        <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">PROFORMA INVOICE</div>
         <div style="padding-top: 8px">
           <div>PI NO. : {{ printDetails.contractCode }}</div>
           <div>PI DATE: {{ printDetails.createTimeEn }}</div>
@@ -34,11 +18,7 @@
             <div style="color: #409eff">VENDOR:</div>
             <div>{{ printDetails.sellCorporationNameEn }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.sellCountryName }},{{
-                printDetails.sellProvinceName
-              }},{{ printDetails.sellCityName }},{{
-                printDetails.sellDetailedAddress
-              }}
+              {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }}
             </div>
             <div>CONTACT: {{ printDetails.sellContactName }}</div>
             <div>TEL.: {{ printDetails.sellContactNumber }}</div>
@@ -47,11 +27,7 @@
             <div style="color: #409eff">BUYER:</div>
             <div>{{ printDetails.buyCorporationName }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.buyDetailedAddress }},{{
-                printDetails.buyCityName
-              }},{{ printDetails.buyProvinceName }},{{
-                printDetails.buyCountryName
-              }}
+              {{ printDetails.buyDetailedAddress }},{{ printDetails.buyCityName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCountryName }}
             </div>
             <div>CONTACT: {{ printDetails.buyContactName }}</div>
             <div>TEL.: {{ printDetails.buyContactNumber }}</div>
@@ -60,23 +36,11 @@
         <div style="height: 16px"></div>
         <div style="border: 1px solid black">
           <div style="display: flex; width: 100%">
-            <div
-              style="
-                width: 33%;
-                border-bottom: 1px solid black;
-                border-right: 1px solid black;
-              "
-            >
+            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
               <div style="color: #409eff">COUNTRY OF ORIGIN:</div>
               <div>{{ printDetails.sellCountryName }}</div>
             </div>
-            <div
-              style="
-                width: 34%;
-                border-bottom: 1px solid black;
-                border-right: 1px solid black;
-              "
-            >
+            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
               <div style="color: #409eff">COUNTRY OF DESTINATION:</div>
               <div>{{ printDetails.buyCountryName }}</div>
             </div>
@@ -86,25 +50,13 @@
             </div>
           </div>
           <div style="display: flex; width: 100%">
-            <div
-              style="
-                width: 33%;
-                border-bottom: 1px solid black;
-                border-right: 1px solid black;
-              "
-            >
+            <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
               <div style="color: #409eff">TERMS OF DELIVERY:</div>
               <div>
                 {{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}
               </div>
             </div>
-            <div
-              style="
-                width: 34%;
-                border-bottom: 1px solid black;
-                border-right: 1px solid black;
-              "
-            >
+            <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
               <div style="color: #409eff">CURRENCY:</div>
               <div>
                 {{ printDetails.currency }}
@@ -113,9 +65,7 @@
             <div style="width: 33%; border-bottom: 1px solid black">
               <div style="color: #409eff">EXPORT BY/VIA:</div>
               <div>
-                {{
-                  dictValueLabel(printDetails.transportMethod, shippingMethod)
-                }}
+                {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
               </div>
             </div>
           </div>
@@ -132,47 +82,19 @@
         </div>
         <div style="height: 16px"></div>
         <div class="baseRow" style="display: flex; color: #409eff">
-          <div class="contentRow" style="width: 50px; text-align: center">
-            NO.
-          </div>
-          <div
-            class="contentRow"
-            style="width: calc(100% - 450px); text-align: center"
-          >
-            COMMODITY, SPECIFICATION
-          </div>
-          <div class="contentRow" style="width: 100px; text-align: center">
-            UNIT
-          </div>
-          <div class="contentRow" style="width: 100px; text-align: center">
-            QUANTITY
-          </div>
-          <div class="contentRow" style="width: 100px; text-align: center">
-            UNIT PRICE
-          </div>
-          <div class="contentRow" style="width: 100px; text-align: center">
-            TOTAL PRICE
-          </div>
+          <div class="contentRow" style="width: 50px; text-align: center">NO.</div>
+          <div class="contentRow" style="width: calc(100% - 450px); text-align: center">COMMODITY, SPECIFICATION</div>
+          <div class="contentRow" style="width: 100px; text-align: center">UNIT</div>
+          <div class="contentRow" style="width: 100px; text-align: center">QUANTITY</div>
+          <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
+          <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
         </div>
-        <div
-          v-if="
-            printDetails.productInfoList &&
-            printDetails.productInfoList.length > 0
-          "
-        >
-          <div
-            class="baseRow"
-            style="display: flex"
-            v-for="(item, index) in printDetails.productInfoList"
-            :key="item.productId"
-          >
+        <div v-if="printDetails.productInfoList && printDetails.productInfoList.length > 0">
+          <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.productInfoList" :key="item.productId">
             <div class="contentRow" style="width: 50px; text-align: center">
               {{ index + 1 }}
             </div>
-            <div
-              class="contentRow"
-              style="width: calc(100% - 450px); text-align: center"
-            >
+            <div class="contentRow" style="width: calc(100% - 450px); text-align: center">
               {{ item.productName }}
             </div>
             <div class="contentRow" style="width: 100px; text-align: center">
@@ -190,23 +112,12 @@
           </div>
         </div>
         <div class="baseRow" style="display: flex; color: #409eff">
-          <div
-            class="contentRow"
-            style="width: calc(100% - 400px); text-align: center"
-          >
-            SUBTOTAL:
-          </div>
-          <div
-            class="contentRow"
-            style="width: 100px; text-align: center"
-          ></div>
+          <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
+          <div class="contentRow" style="width: 100px; text-align: center"></div>
           <div class="contentRow" style="width: 100px; text-align: center">
             {{ statistics("productQuantity", 0) }}
           </div>
-          <div
-            class="contentRow"
-            style="width: 100px; text-align: center"
-          ></div>
+          <div class="contentRow" style="width: 100px; text-align: center"></div>
           <div class="contentRow" style="width: 100px; text-align: center">
             {{ statistics("amount", 2) }}
           </div>
@@ -218,38 +129,20 @@
             </div>
           </div> -->
         <div class="baseRow" style="display: flex">
-          <div
-            class="contentRow"
-            style="width: calc(100% - 100px); text-align: right; color: #409eff"
-          >
-            FREIGHT COST:
-          </div>
+          <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">FREIGHT COST:</div>
           <div class="contentRow" style="width: 100px; text-align: center">
             {{ statisticsTwo("amount", 2) }}
           </div>
         </div>
         <div class="baseRow" style="display: flex">
-          <div
-            class="contentRow"
-            style="width: calc(100% - 100px); text-align: right; color: #409eff"
-          >
-            TOTAL PRICE:
-          </div>
+          <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">TOTAL PRICE:</div>
           <div class="contentRow" style="width: 100px; text-align: center">
             {{ printDetails.totalAmount }}
           </div>
         </div>
-        <div
-          class="baseRow"
-          style="display: flex; border-bottom: 1px solid black"
-        >
+        <div class="baseRow" style="display: flex; border-bottom: 1px solid black">
           <div class="contentRow" style="width: 100%">
-            {{
-              translateIntoEnglish(
-                printDetails.totalAmount,
-                printDetails.currency
-              )
-            }}
+            {{ translateIntoEnglish(printDetails.totalAmount, printDetails.currency) }}
           </div>
         </div>
         <div style="height: 16px"></div>
@@ -258,66 +151,22 @@
         </div>
         <div class="baseRow" style="border-bottom: 1px solid black">
           <div class="contentRow" style="width: 100%">
-            <div
-              style="
-                line-height: 24px;
-                padding-left: 4px;
-                word-break: break-all;
-                word-wrap: break-word;
-              "
-            >
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
               Beneficiary Name: {{ printDetails.beneficiaryName }}
             </div>
-            <div
-              style="
-                line-height: 24px;
-                padding-left: 4px;
-                word-break: break-all;
-                word-wrap: break-word;
-              "
-            >
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
               Beneficiary Bank: {{ printDetails.beneficiaryBank }}
             </div>
-            <div
-              style="
-                line-height: 24px;
-                padding-left: 4px;
-                word-break: break-all;
-                word-wrap: break-word;
-              "
-            >
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
               Beneficiary Bank Address:
               {{ printDetails.beneficiaryBankAddress }}
             </div>
-            <div
-              style="
-                line-height: 24px;
-                padding-left: 4px;
-                word-break: break-all;
-                word-wrap: break-word;
-              "
-            >
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
               Beneficiary Account Number:
               {{ printDetails.beneficiaryAccountNumber }}
             </div>
-            <div
-              style="
-                line-height: 24px;
-                padding-left: 4px;
-                word-break: break-all;
-                word-wrap: break-word;
-              "
-            >
-              Swift Code: {{ printDetails.swiftCode }}
-            </div>
-            <div
-              style="
-                line-height: 24px;
-                padding-left: 4px;
-                word-break: break-all;
-                word-wrap: break-word;
-              "
-            >
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{ printDetails.swiftCode }}</div>
+            <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
               Beneficiary Address: {{ printDetails.beneficiaryAddress }}
             </div>
           </div>
@@ -353,10 +202,7 @@ const getPdfData = (row) => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (
-    printDetails.value.productInfoList &&
-    printDetails.value.productInfoList.length > 0
-  ) {
+  if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
     printDetails.value.productInfoList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -367,10 +213,7 @@ const statistics = (label, index) => {
 };
 const statisticsTwo = (label, index) => {
   let num = 0;
-  if (
-    printDetails.value.contractProjectList &&
-    printDetails.value.contractProjectList.length > 0
-  ) {
+  if (printDetails.value.contractProjectList && printDetails.value.contractProjectList.length > 0) {
     printDetails.value.contractProjectList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
@@ -405,4 +248,4 @@ watch(
   line-height: 24px;
   padding-left: 4px;
 }
-</style>
+</style>

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

@@ -42,7 +42,7 @@
             {{ printDetails.sellCorporationNameEn }}
           </div>
           <div style="text-align: center">
-            {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+            {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }}
           </div>
           <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">PROFORMA INVOICE</div>
           <div style="padding-top: 8px">
@@ -54,7 +54,7 @@
               <div style="color: #409eff">VENDOR:</div>
               <div>{{ printDetails.sellCorporationNameEn }}</div>
               <div style="padding: 16px 0">
-                {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
+                {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }}
               </div>
               <div>CONTACT: {{ printDetails.sellContactName }}</div>
               <div>TEL.: {{ printDetails.sellContactNumber }}</div>

+ 10 - 10
src/views/salesMange/shipmentMange/document/index.vue

@@ -157,9 +157,9 @@
             <div style="font-weight: 700">买方 SOLD TO MESSRS:</div>
             <div>{{ printDetails.customer.name }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.contract.buyCountryName }},{{ printDetails.contract.buyProvinceName }},{{ printDetails.contract.buyCityName }},{{
-                printDetails.contract.buyPostalCode
-              }},{{ printDetails.contract.buyAddress }}
+              {{ printDetails.contract.buyAddress }},{{ printDetails.contract.buyPostalCode }},{{ printDetails.contract.buyCityName }},{{
+                printDetails.contract.buyProvinceName
+              }},{{ printDetails.contract.buyCountryName }}
             </div>
             <div>CONTRACT: {{ printDetails.contract.buyContactName }}</div>
             <div>TEL.: {{ printDetails.contract.buyContactNumber }}</div>
@@ -169,8 +169,8 @@
             <div>{{ printDetails.corporation.name }}</div>
             <div>{{ printDetails.corporation.nameEn }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.contract.sellCountryName }},{{ printDetails.contract.sellProvinceName }},{{ printDetails.contract.sellCityName }},{{
-                printDetails.contract.sellAddress
+              {{ printDetails.contract.sellAddress }},{{ printDetails.contract.sellCityName }},{{ printDetails.contract.sellProvinceName }},{{
+                printDetails.contract.sellCountryName
               }}
             </div>
             <div>CONTRACT: {{ printDetails.contract.sellContactName }}</div>
@@ -183,8 +183,8 @@
             <div>{{ printDetails.corporation.name }}</div>
             <div>{{ printDetails.corporation.nameEn }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.contract.sellCountryName }},{{ printDetails.contract.sellProvinceName }},{{ printDetails.contract.sellCityName }},{{
-                printDetails.contract.sellAddress
+              {{ printDetails.contract.sellAddress }},{{ printDetails.contract.sellCityName }},{{ printDetails.contract.sellProvinceName }},{{
+                printDetails.contract.sellCountryName
               }}
             </div>
             <div>CONTRACT: {{ printDetails.contract.sellContactName }}</div>
@@ -194,9 +194,9 @@
             <div style="font-weight: 700">买方 BUYER:</div>
             <div>{{ printDetails.customer.name }}</div>
             <div style="padding: 16px 0">
-              {{ printDetails.contract.buyCountryName }},{{ printDetails.contract.buyProvinceName }},{{ printDetails.contract.buyCityName }},{{
-                printDetails.contract.buyPostalCode
-              }},{{ printDetails.contract.buyAddress }}
+              {{ printDetails.contract.buyAddress }},{{ printDetails.contract.buyPostalCode }},{{ printDetails.contract.buyCityName }},{{
+                printDetails.contract.buyProvinceName
+              }},{{ printDetails.contract.buyCountryName }}
             </div>
             <div>CONTRACT: {{ printDetails.contract.buyContactName }}</div>
             <div>TEL.: {{ printDetails.contract.buyContactNumber }}</div>