|
@@ -14,8 +14,7 @@
|
|
|
action: () => newContract(),
|
|
|
},
|
|
|
]"
|
|
|
- @get-list="getList"
|
|
|
- >
|
|
|
+ @get-list="getList">
|
|
|
<template #amount="{ item }">
|
|
|
<div>
|
|
|
<span style="padding-right: 4px">{{ item.currency }}</span>
|
|
@@ -37,30 +36,14 @@
|
|
|
</div>
|
|
|
|
|
|
<el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
|
|
|
- <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.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
|
|
|
</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>
|
|
@@ -70,55 +53,27 @@
|
|
|
<div style="color: #409eff">VENDOR:</div>
|
|
|
<div>{{ printDetails.sellCorporationNameEn }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.sellCountryName }},{{
|
|
|
- printDetails.sellProvinceName
|
|
|
- }},{{ printDetails.sellCityName }},{{
|
|
|
- printDetails.sellDetailedAddress
|
|
|
- }}
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- {{ printDetails.sellContactName }},{{
|
|
|
- printDetails.sellContactNumber
|
|
|
- }}
|
|
|
+ {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
|
|
|
</div>
|
|
|
+ <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
|
|
|
</div>
|
|
|
<div style="width: 50%">
|
|
|
<div style="color: #409eff">BUYER:</div>
|
|
|
<div>{{ printDetails.buyCorporationName }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.buyCountryName }},{{
|
|
|
- printDetails.buyProvinceName
|
|
|
- }},{{ printDetails.buyCityName }},{{
|
|
|
- printDetails.buyDetailedAddress
|
|
|
- }}
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- {{ printDetails.buyContactName }},{{
|
|
|
- printDetails.buyContactNumber
|
|
|
- }}
|
|
|
+ {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyDetailedAddress }}
|
|
|
</div>
|
|
|
+ <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<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>
|
|
@@ -128,25 +83,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>
|
|
|
{{ dictValueLabel(printDetails.currency, accountCurrency) }}
|
|
@@ -155,9 +98,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>
|
|
@@ -174,47 +115,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">
|
|
@@ -232,23 +145,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>
|
|
@@ -260,27 +162,14 @@
|
|
|
</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">
|
|
|
{{ statistics("amount", 2) }}
|
|
|
</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>
|
|
@@ -289,65 +178,21 @@
|
|
|
</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;
|
|
|
- "
|
|
|
- >
|
|
|
- Beneficiary Name: {{}}
|
|
|
- </div>
|
|
|
- <div
|
|
|
- style="
|
|
|
- line-height: 24px;
|
|
|
- padding-left: 4px;
|
|
|
- word-break: break-all;
|
|
|
- word-wrap: break-word;
|
|
|
- "
|
|
|
- >
|
|
|
- Beneficiary Bank: {{}}
|
|
|
+ <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;
|
|
|
- "
|
|
|
- >
|
|
|
- Beneficiary Bank Address: {{}}
|
|
|
+ <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;
|
|
|
- "
|
|
|
- >
|
|
|
- Beneficiary Account Number: {{}}
|
|
|
+ <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;
|
|
|
- "
|
|
|
- >
|
|
|
- Swift Code: {{}}
|
|
|
+ <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;
|
|
|
- "
|
|
|
- >
|
|
|
- Beneficiary Address: {{}}
|
|
|
+ <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>
|
|
|
</div>
|
|
@@ -365,9 +210,7 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<el-button @click="openPrint = false" size="large">取消</el-button>
|
|
|
- <el-button type="primary" @click="clickDownload()" size="large"
|
|
|
- >下载PDF</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -593,15 +436,11 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- ElMessageBox.confirm(
|
|
|
- "此操作将永久删除该数据, 是否继续?",
|
|
|
- "提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }
|
|
|
- ).then(() => {
|
|
|
+ ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
proxy
|
|
|
.post("/contract/edit", {
|
|
|
id: row.id,
|
|
@@ -748,12 +587,8 @@ const clickDownload = () => {
|
|
|
};
|
|
|
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) => {
|
|
|
- console.log(item, label, item[label]);
|
|
|
if (item[label]) {
|
|
|
num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
|
|
|
}
|