|
@@ -69,20 +69,25 @@
|
|
|
<div style="display: flex; width: 100%">
|
|
|
<div style="width: 33%; border-bottom: 1px solid #999; border-right: 1px solid #999">
|
|
|
<div style="color: #409eff">COUNTRY OF ORIGIN:</div>
|
|
|
+ <div>{{ printDetails.sellCountryName }}</div>
|
|
|
</div>
|
|
|
<div style="width: 34%; border-bottom: 1px solid #999; border-right: 1px solid #999">
|
|
|
<div style="color: #409eff">COUNTRY OF DESTINATION:</div>
|
|
|
+ <div>{{ printDetails.buyCountryName }}</div>
|
|
|
</div>
|
|
|
<div style="width: 33%; border-bottom: 1px solid #999">
|
|
|
<div style="color: #409eff">PLACE OF DISCHARGE:</div>
|
|
|
+ <div>{{ printDetails.transportRemark }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="display: flex; width: 100%">
|
|
|
<div style="width: 33%; border-bottom: 1px solid #999; border-right: 1px solid #999">
|
|
|
<div style="color: #409eff">TERMS OF DELIVERY:</div>
|
|
|
+ <div>{{ dictValueLabel(printDetails.tradeMethods, tradeMethods) }}</div>
|
|
|
</div>
|
|
|
<div style="width: 34%; border-bottom: 1px solid #999; border-right: 1px solid #999">
|
|
|
<div style="color: #409eff">CURRENCY:</div>
|
|
|
+ <div>{{ dictValueLabel(printDetails.currency, accountCurrency) }}</div>
|
|
|
</div>
|
|
|
<div style="width: 33%; border-bottom: 1px solid #999">
|
|
|
<div style="color: #409eff">EXPORT BY/VIA:</div>
|
|
@@ -94,6 +99,7 @@
|
|
|
</div>
|
|
|
<div style="width: 67%">
|
|
|
<div style="color: #409eff">TERMS OF PAYMENT:</div>
|
|
|
+ <div>{{ printDetails.remark }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -117,19 +123,47 @@
|
|
|
</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: 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">168</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">1200</div>
|
|
|
+ <div class="contentRow" style="width: 100px; text-align: center">{{ statistics("amount", 2) }}</div>
|
|
|
</div>
|
|
|
- <div class="baseRow" style="display: flex; color: #409eff">
|
|
|
- <div class="contentRow" style="width: calc(100% - 100px); text-align: right;">FREIGHT COST: </div>
|
|
|
+ <!-- <div class="baseRow" style="display: flex; color: #409eff">
|
|
|
+ <div class="contentRow" style="width: calc(100% - 100px); text-align: right">FREIGHT COST:</div>
|
|
|
<div class="contentRow" style="width: 100px; text-align: center">1200</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: 100px; text-align: center">{{ statistics("amount", 2) }}</div>
|
|
|
</div>
|
|
|
- <div class="baseRow" style="display: flex; color: #409eff">
|
|
|
- <div class="contentRow" style="width: calc(100% - 100px); text-align: right;">TOTAL PRICE: </div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">1200</div>
|
|
|
+ <div class="baseRow" style="display: flex; border-bottom: 1px solid #999">
|
|
|
+ <div class="contentRow" style="width: 100%">{{ translateIntoEnglish(printDetails.totalAmount, printDetails.currency) }}</div>
|
|
|
+ </div>
|
|
|
+ <div style="height: 16px"></div>
|
|
|
+ <div class="baseRow" style="color: #409eff">
|
|
|
+ <div class="contentRow" style="width: 100%">ACCOUNT INFORMATION:</div>
|
|
|
+ </div>
|
|
|
+ <div class="baseRow" style="border-bottom: 1px solid #999">
|
|
|
+ <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>
|
|
|
+ <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Bank Address: {{}}</div>
|
|
|
+ <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Account Number: {{}}</div>
|
|
|
+ <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Swift Code: {{}}</div>
|
|
|
+ <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">Beneficiary Address: {{}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="height: 32px"></div>
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="width: 50%">
|
|
|
+ <div style="color: #409eff">CONFIRMED BY VENDOR:</div>
|
|
|
+ <div>{{ printDetails.sellCorporationNameEn }}</div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%">
|
|
|
+ <div style="color: #409eff">CONFIRMED BY BUYER:</div>
|
|
|
+ <div>{{ printDetails.buyCorporationName }}</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<template #footer>
|
|
@@ -148,6 +182,8 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const contractType = ref([]);
|
|
|
+const accountCurrency = ref([]);
|
|
|
+const tradeMethods = ref([]);
|
|
|
const corporationList = ref([]);
|
|
|
const customerList = ref([]);
|
|
|
const status = ref([
|
|
@@ -400,6 +436,41 @@ const getDict = () => {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ dictCode: "account_currency",
|
|
|
+ tenantId: useUserStore().user.tenantId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.rows && res.rows.length > 0) {
|
|
|
+ accountCurrency.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ dictCode: "trade_methods",
|
|
|
+ tenantId: useUserStore().user.tenantId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.rows && res.rows.length > 0) {
|
|
|
+ tradeMethods.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
corporationList.value = res.rows.map((item) => {
|
|
|
return {
|
|
@@ -441,10 +512,11 @@ const newContract = () => {
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
-const openPrint = ref(true);
|
|
|
+const openPrint = ref(false);
|
|
|
const loadingPrint = ref(false);
|
|
|
const printDetails = ref({});
|
|
|
const clickPrint = (row) => {
|
|
|
+ printDetails.value = {};
|
|
|
loadingPrint.value = true;
|
|
|
openPrint.value = true;
|
|
|
proxy.post("/contract/getContractPdfInfo", { id: row.id }).then((res) => {
|
|
@@ -454,6 +526,18 @@ const clickPrint = (row) => {
|
|
|
const clickDownload = () => {
|
|
|
proxy.getPdf("外销合同PDF文件");
|
|
|
};
|
|
|
+const statistics = (label, index) => {
|
|
|
+ let num = 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return num;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|