|
@@ -0,0 +1,308 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <div id="pdfDom" ref="pdfDom">
|
|
|
|
+ <table border="1" style="width: 100%" class="table">
|
|
|
|
+ <tr>
|
|
|
|
+ <td style="width: 150px">图片</td>
|
|
|
|
+ <td>
|
|
|
|
+ <div style="font-size: 18px" class="color-class">
|
|
|
|
+ {{ printDetails.sellCorporationNameEn }}
|
|
|
|
+ </div>
|
|
|
|
+ <div style="font-size: 14px; color: #000">
|
|
|
|
+ Address: {{ printDetails.sellDetailedAddress }}
|
|
|
|
+ </div>
|
|
|
|
+ <div style="font-size: 14px; color: #000; margin-top: 5px">
|
|
|
|
+ {{ printDetails.sellCityName }},{{
|
|
|
|
+ printDetails.sellProvinceName
|
|
|
|
+ }},{{ printDetails.sellCountryName }}
|
|
|
|
+ </div>
|
|
|
|
+ <div style="margin: 8px 0; color: black">
|
|
|
|
+ Tel: <span>{{ printDetails.sellContactNumber }}</span> Fax:
|
|
|
|
+ <span></span> Website: <span></span>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="2">
|
|
|
|
+ <div
|
|
|
|
+ class="color-class"
|
|
|
|
+ style="text-align: center; font-size: 18px"
|
|
|
|
+ >
|
|
|
|
+ Proforma Invoice
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ <div style="height: 15px; background: #7f197f"></div>
|
|
|
|
+ <table border="1" style="width: 100%" class="table">
|
|
|
|
+ <tr>
|
|
|
|
+ <td style="width: 50%; text-align: left">
|
|
|
|
+ Buyer: {{ printDetails.buyCorporationName }}
|
|
|
|
+ </td>
|
|
|
|
+ <td style="width: 50%; text-align: left">
|
|
|
|
+ Seller: {{ printDetails.sellCorporationNameEn }}
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ <table border="1" style="width: 100%; border-top: none" class="table">
|
|
|
|
+ <tr>
|
|
|
|
+ <td style="width: 15%">PI No.</td>
|
|
|
|
+ <td style="width: 35%">{{ printDetails.contractCode }}</td>
|
|
|
|
+ <td style="width: 15%">Date:</td>
|
|
|
|
+ <td style="width: 35%">{{ printDetails.createTimeEn }}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td style="width: 15%">PO No.</td>
|
|
|
|
+ <td style="width: 35%">客户PO</td>
|
|
|
|
+ <td style="width: 15%">Price Term:</td>
|
|
|
|
+ <td style="width: 35%" rowspan="2">
|
|
|
|
+ {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td style="width: 15%">Final Destination:</td>
|
|
|
|
+ <td style="width: 35%"></td>
|
|
|
|
+ <td style="width: 15%">Loading Port:</td>
|
|
|
|
+ <!-- <td style="width: 35%">{{ printDetails.createTimeEn }}</td> -->
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ <div style="height: 15px; background: #7f197f"></div>
|
|
|
|
+ <table border="1" style="width: 100%" class="table">
|
|
|
|
+ <tr>
|
|
|
|
+ <td style="width: 15%">Image</td>
|
|
|
|
+ <td style="width: 20%">Description</td>
|
|
|
|
+ <td style="width: 15%">Size</td>
|
|
|
|
+ <td style="width: 10%">Packaging</td>
|
|
|
|
+ <td style="width: 10%">
|
|
|
|
+ Order <br />
|
|
|
|
+ Quantity
|
|
|
|
+ </td>
|
|
|
|
+ <td style="width: 10%">Carton <br />Quantity</td>
|
|
|
|
+ <td style="width: 10%">Unit <br />Price</td>
|
|
|
|
+ <td style="width: 10%">Total <br />Amount</td>
|
|
|
|
+ </tr>
|
|
|
|
+
|
|
|
|
+ <tr
|
|
|
|
+ v-if="
|
|
|
|
+ printDetails.productInfoList &&
|
|
|
|
+ printDetails.productInfoList.length > 0
|
|
|
|
+ "
|
|
|
|
+ v-for="(item, index) in printDetails.productInfoList"
|
|
|
|
+ :key="item.productId"
|
|
|
|
+ >
|
|
|
|
+ <td style="width: 15%">图片</td>
|
|
|
|
+ <td style="width: 20%">{{ item.productName }}</td>
|
|
|
|
+ <td style="width: 15%">{{ item.spec }}</td>
|
|
|
|
+ <td style="width: 10%">包装方式</td>
|
|
|
|
+ <td style="width: 10%">
|
|
|
|
+ {{ item.productQuantity }}
|
|
|
|
+ </td>
|
|
|
|
+ <td style="width: 10%">总箱数</td>
|
|
|
|
+ <td style="width: 10%">
|
|
|
|
+ {{ printDetails.currency }} {{ moneyFormat(item.productPrice, 2) }}
|
|
|
|
+ </td>
|
|
|
|
+ <td style="width: 10%">
|
|
|
|
+ {{ printDetails.currency }} {{ moneyFormat(item.amount, 2) }}
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="7" style="text-align: right">Total Amount:</td>
|
|
|
|
+ <td style="width: 10%">
|
|
|
|
+ {{ printDetails.currency }}
|
|
|
|
+ {{ moneyFormat(printDetails.totalAmount, 2) }}
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="7" style="text-align: right">Deposit(30.00%):</td>
|
|
|
|
+ <td style="width: 10%">{{ printDetails.advanceRatio }}%</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="7" style="text-align: right">Balance(70.00%):</td>
|
|
|
|
+ <td style="width: 10%">
|
|
|
|
+ 剩余比例:剩余比例 = 最终价格 * (100% - 预付比例)
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ <div style="height: 15px; background: #7f197f"></div>
|
|
|
|
+ <table border="1" style="width: 100%" class="table">
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="width-one" style="text-align: left">1.Lead Time:</td>
|
|
|
|
+ <td style="text-align: left">{{ printDetails.deliveryTime }} Days</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="width-one" style="text-align: left">2.Payment Term:</td>
|
|
|
|
+ <td style="text-align: left">{{ printDetails.remark }}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="width-one" style="text-align: left">3.Shipping Mode</td>
|
|
|
|
+ <td style="text-align: left">
|
|
|
|
+ {{ dictValueLabel(printDetails.transportMethod, shippingMethod) }}
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="width-one" style="text-align: left">4.Insurance</td>
|
|
|
|
+ <td style="text-align: left">By Buyer</td>
|
|
|
|
+ </tr>
|
|
|
|
+
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="width-one" style="text-align: left">5.Banking Info</td>
|
|
|
|
+ <td style="text-align: left">
|
|
|
|
+ <div>Beneficiary Name: {{ printDetails.beneficiaryName }}</div>
|
|
|
|
+ <div>Beneficiary Bank: {{ printDetails.beneficiaryBank }}</div>
|
|
|
|
+ <div>
|
|
|
|
+ Beneficiary Bank Address:
|
|
|
|
+ {{ printDetails.beneficiaryBankAddress }}
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ Beneficiary Account Number:
|
|
|
|
+ {{ printDetails.beneficiaryAccountNumber }}
|
|
|
|
+ </div>
|
|
|
|
+ <div>Swift Code: {{ printDetails.swiftCode }}</div>
|
|
|
|
+ <div>
|
|
|
|
+ Beneficiary Address: {{ printDetails.beneficiaryAddress }}
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="width-one" style="text-align: left">
|
|
|
|
+ 6.Important Clauses:
|
|
|
|
+ </td>
|
|
|
|
+ <td style="text-align: left">
|
|
|
|
+ A:Making payment will be considered as confirmation and
|
|
|
|
+ countersignature of this order. Order can not be canceled after
|
|
|
|
+ confirmation and countersignature except acceptance by the seller.
|
|
|
|
+ The Buyer has obligation to make full payment of order including
|
|
|
|
+ canceled orders.
|
|
|
|
+ <br />
|
|
|
|
+ B:The seller should not be responsible for the delay cause by the
|
|
|
|
+ buyer and force majeure.
|
|
|
|
+ <br />
|
|
|
|
+ C:Modification of products will not be allowed after the deposit has
|
|
|
|
+ been arranged unless acceptance by the seller. All costs and
|
|
|
|
+ <br />consequences arising from modifying the product or other
|
|
|
|
+ things will be borne by the buyer.
|
|
|
|
+ <br />
|
|
|
|
+ D:Packging details including shipping marks, barcodes, artworks,etc
|
|
|
|
+ .should be provided 30 days before cargo readty agreed by both
|
|
|
|
+ <br />parties.The delay caused by the buyer's failure to submit the
|
|
|
|
+ packaging materials on time will be borne the buyer.
|
|
|
|
+ <br />
|
|
|
|
+ E: Shipping information including consignee and notify party,
|
|
|
|
+ discharge port, loading port ects should be provided 20 before
|
|
|
|
+ cargo<br />
|
|
|
|
+ ready date. The delay caused by the buyer's failure to provide
|
|
|
|
+ shipping information on time will be borne by the buyer.
|
|
|
|
+ <br />
|
|
|
|
+ F:Please notify the seller of the special requirements of shipping
|
|
|
|
+ documents and certificates when placing an order.
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ <table border="1" style="width: 100%; border-top: none" class="table">
|
|
|
|
+ <tr>
|
|
|
|
+ <td style="width: 50%; text-align: left">The Buyer's Signature</td>
|
|
|
|
+ <td style="width: 50%; text-align: left">The Seller's Signature</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup>
|
|
|
|
+import { NumberToChinese } from "@/utils/util.js";
|
|
|
|
+import { watch } from "vue";
|
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
|
+const printDetails = ref({});
|
|
|
|
+const props = defineProps({
|
|
|
|
+ rowData: Object,
|
|
|
|
+});
|
|
|
|
+const getPdfData = (query) => {
|
|
|
|
+ proxy.post("/contract/getContractPdfInfo", query).then((res) => {
|
|
|
|
+ printDetails.value = res;
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+const statistics = (label, index) => {
|
|
|
|
+ let num = 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);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return num;
|
|
|
|
+};
|
|
|
|
+const statisticsTwo = (label, index) => {
|
|
|
|
+ let num = 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);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return num;
|
|
|
|
+};
|
|
|
|
+const productUnit = ref([]);
|
|
|
|
+const tradeMethods = ref([]);
|
|
|
|
+const shippingMethod = ref([]);
|
|
|
|
+const getDict = () => {
|
|
|
|
+ proxy.getDictOne(["trade_mode", "shipping_method", "unit"]).then((res) => {
|
|
|
|
+ tradeMethods.value = res["trade_mode"].map((x) => ({
|
|
|
|
+ label: x.dictValue,
|
|
|
|
+ value: x.dictKey,
|
|
|
|
+ }));
|
|
|
|
+ shippingMethod.value = res["shipping_method"].map((x) => ({
|
|
|
|
+ label: x.dictValue,
|
|
|
|
+ value: x.dictKey,
|
|
|
|
+ }));
|
|
|
|
+ productUnit.value = res["unit"].map((x) => ({
|
|
|
|
+ label: x.dictValue,
|
|
|
|
+ value: x.dictKey,
|
|
|
|
+ }));
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+getDict();
|
|
|
|
+watch(
|
|
|
|
+ props.rowData,
|
|
|
|
+ () => {
|
|
|
|
+ if (props.rowData.id) {
|
|
|
|
+ getPdfData({ id: props.rowData.id });
|
|
|
|
+ } else if (props.rowData.code) {
|
|
|
|
+ getPdfData({ code: props.rowData.code });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ immediate: true,
|
|
|
|
+ deep: true,
|
|
|
|
+ }
|
|
|
|
+);
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.color-class {
|
|
|
|
+ color: #7f197f;
|
|
|
|
+}
|
|
|
|
+.bck {
|
|
|
|
+ background: #7f197f;
|
|
|
|
+}
|
|
|
|
+.width-one {
|
|
|
|
+ width: 140px;
|
|
|
|
+}
|
|
|
|
+.table {
|
|
|
|
+ border-collapse: collapse;
|
|
|
|
+ border-spacing: 0;
|
|
|
|
+
|
|
|
|
+ td {
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding: 2px 4px;
|
|
|
|
+ // padding: 5px 10px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|