|
@@ -117,128 +117,246 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860" v-loading="loadingPrint">
|
|
|
- <!-- <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
|
|
|
- <div style="font-size: 18px; text-align: center">{{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}</div>
|
|
|
- <div style="text-align: center">
|
|
|
- {{ printDetails.sellCountryId }},{{ printDetails.sellProvinceId }},{{ printDetails.sellCityId }},{{ printDetails.sellAddress }}
|
|
|
+ <el-dialog title="打印" v-if="openSelectPrint" v-model="openSelectPrint" width="600">
|
|
|
+ <div>
|
|
|
+ <el-button @click="clickPrint(1)" type="primary">装箱单</el-button>
|
|
|
+ <el-button @click="clickPrint(2)" type="primary">商业发票</el-button>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="openSelectPrint = false" size="large">关闭</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
|
|
|
+ <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
|
|
|
+ <div v-if="openStatus === 1">
|
|
|
+ <div style="font-size: 16px; text-align: center; font-weight: 700">装箱单</div>
|
|
|
+ <div style="font-size: 16px; text-align: center; text-decoration: underline; font-weight: 700">PACKING LIST</div>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="openStatus === 2">
|
|
|
+ <div style="font-size: 16px; text-align: center; font-weight: 700">商业发票</div>
|
|
|
+ <div style="font-size: 16px; text-align: center; text-decoration: underline; font-weight: 700">COMMERCIAL INVOICE</div>
|
|
|
</div>
|
|
|
- <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">QUOTATION</div>
|
|
|
<div style="padding-top: 8px">
|
|
|
- <div>Reference NO. : {{ printDetails.code }}</div>
|
|
|
- <div style="display: flex">
|
|
|
- <div style="width: 50%">DATE: {{ moment(printDetails.createTime).format("DD/MMM/yyyy") }}</div>
|
|
|
- <div style="width: 50%">Valid Date:</div>
|
|
|
- </div>
|
|
|
+ <div>C.I. NO. : {{ printDetails.contract.code }}</div>
|
|
|
+ <div>C.I. DATE: {{ printDetails.date }}</div>
|
|
|
</div>
|
|
|
- <div style="border: 1px solid #999; display: flex">
|
|
|
- <div style="width: 50%; border-right: 1px solid #999">
|
|
|
- <div style="color: #409eff">VENDOR:</div>
|
|
|
- <div>{{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}</div>
|
|
|
+ <div style="height: 16px"></div>
|
|
|
+ <div style="border: 1px solid black; display: flex">
|
|
|
+ <div style="width: 50%; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">买方 SOLD TO MESSRS:</div>
|
|
|
+ <div>{{ printDetails.customer.name }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.sellCountryId }},{{ printDetails.sellProvinceId }},{{ printDetails.sellCityId }},{{ printDetails.sellAddress }}
|
|
|
+ {{ printDetails.contract.buyCountryName }},{{ printDetails.contract.buyProvinceName }},{{ printDetails.contract.buyCityName }},{{
|
|
|
+ printDetails.contract.buyAddress
|
|
|
+ }}
|
|
|
</div>
|
|
|
- <div>{{ printDetails.sellContactName }},{{ printDetails.sellContactNumber }}</div>
|
|
|
+ <div>CONTRACT</div>
|
|
|
+ <div>TEL.: {{ printDetails.contract.buyContactNumber }}</div>
|
|
|
</div>
|
|
|
<div style="width: 50%">
|
|
|
- <div style="color: #409eff">BUYER:</div>
|
|
|
- <div>{{ getLabel(printDetails.buyCorporationId, customerList, "name") }}</div>
|
|
|
+ <div style="font-weight: 700">卖方 VENDOR:</div>
|
|
|
+ <div>{{ printDetails.corporation.name }}</div>
|
|
|
+ <div>{{ printDetails.corporation.nameEn }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.buyCountryName }},{{ printDetails.buyProvinceName }},{{ printDetails.buyCityName }},{{ printDetails.buyAddress }}
|
|
|
+ {{ printDetails.contract.sellCountryId }},{{ printDetails.contract.sellProvinceId }},{{ printDetails.contract.sellCityId }},{{
|
|
|
+ printDetails.contract.sellAddress
|
|
|
+ }}
|
|
|
</div>
|
|
|
- <div>{{ printDetails.buyContactName }},{{ printDetails.buyContactNumber }}</div>
|
|
|
+ <div>CONTRACT</div>
|
|
|
+ <div>TEL.: {{ printDetails.contract.sellContactNumber }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="height: 16px"></div>
|
|
|
- <div style="border: 1px solid #999">
|
|
|
+ <div style="border: 1px solid black">
|
|
|
<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.sellCountryId }}</div>
|
|
|
+ <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">原产国 COUNTRY OF ORIGIN:</div>
|
|
|
+ <div>{{ printDetails.contract.sellCountryId }}</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 style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">目的国 COUNTRY OF DESTINATION:</div>
|
|
|
+ <div>{{ printDetails.documents.countryName }}</div>
|
|
|
</div>
|
|
|
- <div style="width: 33%; border-bottom: 1px solid #999">
|
|
|
- <div style="color: #409eff">PLACE OF DISCHARGE:</div>
|
|
|
- <div>{{ printDetails.transportRemark }}</div>
|
|
|
+ <div style="width: 33%; border-bottom: 1px solid black">
|
|
|
+ <div style="font-weight: 700">贸易方式 TERMS OF DELIVERY:</div>
|
|
|
+ <div>{{ dictValueLabel(printDetails.contract.tradeMethods, tradeMethods) }}</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 style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">付款方式 TERMS OF PAYMENT:</div>
|
|
|
+ <div>{{ dictValueLabel(printDetails.contract.paymentMethod, fundsPaymentMethod) }}</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 style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">交货期 DELIVERY TIME:</div>
|
|
|
+ <div>{{ printDetails.contract.deliveryTime }}</div>
|
|
|
</div>
|
|
|
- <div style="width: 33%; border-bottom: 1px solid #999">
|
|
|
- <div style="color: #409eff">EXPORT BY/VIA:</div>
|
|
|
+ <div style="width: 33%; border-bottom: 1px solid black">
|
|
|
+ <div style="font-weight: 700">运输方式 EXPORT BY/VIA:</div>
|
|
|
+ <div>{{ dictValueLabel(printDetails.contract.transportMethod, shippingMethod) }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="display: flex; width: 100%">
|
|
|
- <div style="width: 33%; border-right: 1px solid #999">
|
|
|
- <div style="color: #409eff">DELIVERY TIME:</div>
|
|
|
+ <div style="width: 33%; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">装卸港 PLACE OF DISCHARGE:</div>
|
|
|
+ <div>{{ printDetails.contract.transportRemark }}</div>
|
|
|
</div>
|
|
|
- <div style="width: 67%">
|
|
|
- <div style="color: #409eff">TERMS OF PAYMENT:</div>
|
|
|
- <div>{{ printDetails.remark }}</div>
|
|
|
+ <div style="width: 34%; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">目的港 FINAL DESTINATION:</div>
|
|
|
+ <div>{{ printDetails.documents.portOfDestination }}</div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 33%">
|
|
|
+ <div style="font-weight: 700">质保期 WARRANTY:</div>
|
|
|
+ <div>
|
|
|
+ <span v-if="printDetails.contract.warranty">{{ printDetails.contract.warranty }}天</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</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>
|
|
|
- <div v-if="printDetails.quotationProductList && printDetails.quotationProductList.length > 0">
|
|
|
- <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationProductList" :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">{{ item.productName }}</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">{{ item.productUnit }}</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">{{ item.quantity }}</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">{{ item.price }}</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">{{ item.amount }}</div>
|
|
|
- </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: 100px; text-align: center">{{ statistics("quantity", 0) }}</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center"></div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">{{ statistics("amount", 2) }}</div>
|
|
|
- </div>
|
|
|
- <div v-if="printDetails.quotationPayList && printDetails.quotationPayList.length > 0">
|
|
|
- <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.quotationPayList" :key="index">
|
|
|
- <div class="contentRow" style="width: calc(100% - 100px); text-align: right; color: #409eff">{{ item.payName }}:</div>
|
|
|
- <div class="contentRow" style="width: 100px; text-align: center">{{ item.amount }}</div>
|
|
|
+ <div style="border: 1px solid black">
|
|
|
+ <div style="display: flex; width: 100%">
|
|
|
+ <div style="width: 33%; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">唛头及箱号 MARK & NUMBERS</div>
|
|
|
+ <div style="padding: 8px 0" v-html="getStyle(printDetails.documents.remark)"></div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 34%; border-right: 1px solid black">
|
|
|
+ <div style="font-weight: 700">包装规格 PACKING & DESCRIPTION</div>
|
|
|
+ <div v-if="printDetails.packDetailList && printDetails.packDetailList.length > 0">
|
|
|
+ <div style="padding: 8px 0" v-for="(item, index) in printDetails.packDetailList" :key="index">
|
|
|
+ <span style="padding-right: 16px">{{ index + 1 }}</span>
|
|
|
+ <span v-if="item.boxLong">{{ item.boxLong }}cm</span>
|
|
|
+ <span>*</span>
|
|
|
+ <span v-if="item.boxWide">{{ item.boxWide }}cm</span>
|
|
|
+ <span>*</span>
|
|
|
+ <span v-if="item.boxHigh">{{ item.boxHigh }}cm</span>
|
|
|
+ <span>*</span>
|
|
|
+ <span>{{ item.packQuantity }}TNS</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 33%">
|
|
|
+ <div style="font-weight: 700">总毛重 TOTAL GROSS WEIGHT/KG</div>
|
|
|
+ <div>{{ printDetails.sumRoughWeight }}</div>
|
|
|
+ <div style="font-weight: 700">总净重 TOTAL NET WEIGHT/KG</div>
|
|
|
+ <div>{{ printDetails.sumBomVolume }}</div>
|
|
|
+ <div style="font-weight: 700">总体积 TOTAL DIMENSION/M3</div>
|
|
|
+ <div>{{ printDetails.sumNetWeight }}</div>
|
|
|
+ </div>
|
|
|
</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">{{ getAllMoney(statistics("amount", 2)) }}</div>
|
|
|
- </div>
|
|
|
- <div class="baseRow" style="display: flex; border-bottom: 1px solid #999">
|
|
|
- <div class="contentRow" style="width: 100%">{{ translateIntoEnglish(printDetails.amount, printDetails.currency) }}</div>
|
|
|
- </div>
|
|
|
- <div style="height: 32px"></div>
|
|
|
- <div style="display: flex">
|
|
|
- <div style="width: 50%">
|
|
|
- <div style="color: #409eff">CONFIRMED BY VENDOR:</div>
|
|
|
- <div>{{ getLabel(printDetails.sellCorporationId, corporationList, "nameEn") }}</div>
|
|
|
- </div>
|
|
|
- <div style="width: 50%">
|
|
|
- <div style="color: #409eff">CONFIRMED BY BUYER:</div>
|
|
|
- <div>{{ getLabel(printDetails.buyCorporationId, customerList, "name") }}</div>
|
|
|
- </div>
|
|
|
+ <div style="height: 16px"></div>
|
|
|
+ <table class="three" cellspacing="0" cellpadding="0" border="0" style="width: 100%; border-bottom: 0">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 100px">
|
|
|
+ 项目
|
|
|
+ <br />
|
|
|
+ ITEM NO.
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ 货物描述
|
|
|
+ <br />
|
|
|
+ DESCRIPTION OF GOODS
|
|
|
+ </td>
|
|
|
+ <td style="width: 100px">
|
|
|
+ 数量
|
|
|
+ <br />
|
|
|
+ QUANTITY
|
|
|
+ <br />
|
|
|
+ (SET/PCS)
|
|
|
+ </td>
|
|
|
+ <td style="width: 100px" v-if="openStatus === 1">
|
|
|
+ 净重
|
|
|
+ <br />
|
|
|
+ N.W./ KG
|
|
|
+ </td>
|
|
|
+ <td style="width: 100px; border-right: 0" v-if="openStatus === 1">
|
|
|
+ 毛重
|
|
|
+ <br />
|
|
|
+ G.W./ KG
|
|
|
+ </td>
|
|
|
+ <td style="width: 100px" v-if="openStatus === 2">
|
|
|
+ 单价
|
|
|
+ <br />
|
|
|
+ UNIT PRICE
|
|
|
+ <br />
|
|
|
+ {{ dictValueLabel(printDetails.contract.currency, accountCurrency) }}
|
|
|
+ </td>
|
|
|
+ <td style="width: 100px; border-right: 0" v-if="openStatus === 2">
|
|
|
+ 总价
|
|
|
+ <br />
|
|
|
+ TOTAL PRICE
|
|
|
+ <br />
|
|
|
+ {{ dictValueLabel(printDetails.contract.currency, accountCurrency) }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody v-if="printDetails.documentsProducts && printDetails.documentsProducts.length > 0">
|
|
|
+ <tr v-for="(item, index) in printDetails.documentsProducts" :key="index">
|
|
|
+ <td style="text-align: center">{{ index + 1 }}</td>
|
|
|
+ <td>
|
|
|
+ <div style="text-align: center">{{ item.describes }}</div>
|
|
|
+ <div style="text-align: center">{{ item.subDescribe }}</div>
|
|
|
+ <div style="text-align: center">HS CODE: {{ item.customsCode }}</div>
|
|
|
+ </td>
|
|
|
+ <td style="text-align: center">{{ item.quantity }}</td>
|
|
|
+ <td :rowspan="printDetails.documentsProducts.length" style="text-align: center" v-if="index === 0 && openStatus === 1">
|
|
|
+ {{ printDetails.sumBomVolume }}
|
|
|
+ </td>
|
|
|
+ <td :rowspan="printDetails.documentsProducts.length" style="text-align: center; border-right: 0" v-if="index === 0 && openStatus === 1">
|
|
|
+ {{ printDetails.sumRoughWeight }}
|
|
|
+ </td>
|
|
|
+ <td style="text-align: center" v-if="openStatus === 2">{{ printDetails.contract.currency }}{{ item.price }}</td>
|
|
|
+ <td style="text-align: center; border-right: 0" v-if="openStatus === 2">
|
|
|
+ {{ printDetails.contract.currency }}{{ parseFloat(Number(item.quantity) * Number(item.price)).toFixed(2) }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ <template v-if="openStatus === 2">
|
|
|
+ <tr>
|
|
|
+ <td :colspan="2" style="text-align: left">SUBTOTAL:</td>
|
|
|
+ <td style="text-align: center">{{ statistics("quantity", "", 0) }}</td>
|
|
|
+ <td></td>
|
|
|
+ <td style="text-align: center">{{ printDetails.contract.currency }}{{ statistics("price", "quantity", 2) }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td :colspan="4" style="text-align: left">TOTAL EXW PRICE:</td>
|
|
|
+ <td style="text-align: center">{{ printDetails.contract.currency }}{{ statistics("price", "quantity", 2) }}</td>
|
|
|
+ </tr>
|
|
|
+ </template>
|
|
|
+ </table>
|
|
|
+ <div v-if="openStatus === 1">
|
|
|
+ <div style="font-weight: 700; padding: 4px 0">THE PACK FOR ABOVE CARGO ARE AS BELOWING SHOWS:</div>
|
|
|
+ <table
|
|
|
+ class="three"
|
|
|
+ cellspacing="0"
|
|
|
+ cellpadding="0"
|
|
|
+ border="0"
|
|
|
+ style="width: 100%; border-bottom: 0"
|
|
|
+ v-if="printDetails.packDetailList && printDetails.packDetailList.length > 0">
|
|
|
+ <tbody v-for="(item, index) in printDetails.packDetailList" :key="index">
|
|
|
+ <tr v-for="(itemAAA, indexAAA) in item.packDetailGoodsList" :key="indexAAA">
|
|
|
+ <td :rowspan="item.packDetailGoodsList.length" style="text-align: center; width: 100px" v-if="indexAAA === 0">CTN NO.{{ index + 1 }}</td>
|
|
|
+ <td>
|
|
|
+ <div style="text-align: center">{{ itemAAA.remark }}</div>
|
|
|
+ </td>
|
|
|
+ <td style="text-align: center; width: 100px">{{ itemAAA.unit }}</td>
|
|
|
+ <td style="text-align: center; width: 100px">{{ itemAAA.quantity }}</td>
|
|
|
+ <td :rowspan="item.packDetailGoodsList.length" style="text-align: center; width: 200px; border-right: 0" v-if="indexAAA === 0">
|
|
|
+ <span v-if="item.boxLong">{{ item.boxLong }}cm</span>
|
|
|
+ <span>*</span>
|
|
|
+ <span v-if="item.boxLong">{{ item.boxWide }}cm</span>
|
|
|
+ <span>*</span>
|
|
|
+ <span v-if="item.boxLong">{{ item.boxHigh }}cm</span>
|
|
|
+ <span> / {{ item.roughWeight }}KG</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
<template #footer>
|
|
|
<el-button @click="openPrint = false" size="large">取消</el-button>
|
|
|
<el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
|
|
@@ -252,10 +370,15 @@ import { computed, ref } from "vue";
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
+import useUserStore from "@/store/modules/user";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const shipmentList = ref([]);
|
|
|
const countryData = ref([]);
|
|
|
+const fundsPaymentMethod = ref([]);
|
|
|
+const shippingMethod = ref([]);
|
|
|
+const tradeMethods = ref([]);
|
|
|
+const accountCurrency = ref([]);
|
|
|
const sourceList = ref({
|
|
|
data: [],
|
|
|
pagination: {
|
|
@@ -357,6 +480,74 @@ const getDict = () => {
|
|
|
proxy.post("/areaInfo/list", { parentId: "0" }).then((res) => {
|
|
|
countryData.value = res;
|
|
|
});
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ dictCode: "funds_payment_method",
|
|
|
+ tenantId: useUserStore().user.tenantId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.rows && res.rows.length > 0) {
|
|
|
+ fundsPaymentMethod.value = res.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ dictCode: "shipping_method",
|
|
|
+ tenantId: useUserStore().user.tenantId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.rows && res.rows.length > 0) {
|
|
|
+ shippingMethod.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("/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,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
@@ -605,44 +796,70 @@ const submitTwoForm = () => {
|
|
|
);
|
|
|
});
|
|
|
};
|
|
|
+const rowData = ref({});
|
|
|
+const openSelectPrint = ref(false);
|
|
|
const clickToView = (item) => {
|
|
|
- console.log(item);
|
|
|
+ rowData.value = item;
|
|
|
+ openSelectPrint.value = true;
|
|
|
};
|
|
|
const openPrint = ref(false);
|
|
|
-const loadingPrint = ref(false);
|
|
|
-const printDetails = ref({});
|
|
|
-const clickPrint = (row) => {
|
|
|
- printDetails.value = {};
|
|
|
- loadingPrint.value = true;
|
|
|
+const openStatus = ref("");
|
|
|
+const printDetails = ref({
|
|
|
+ packDetailGoodsList: [],
|
|
|
+ documents: {},
|
|
|
+ contract: {},
|
|
|
+ corporation: {},
|
|
|
+ packDetailList: [],
|
|
|
+ documentsProducts: [],
|
|
|
+ customer: {},
|
|
|
+});
|
|
|
+const clickPrint = (status) => {
|
|
|
+ printDetails.value = {
|
|
|
+ packDetailGoodsList: [],
|
|
|
+ documents: {},
|
|
|
+ contract: {},
|
|
|
+ corporation: {},
|
|
|
+ packDetailList: [],
|
|
|
+ documentsProducts: [],
|
|
|
+ customer: {},
|
|
|
+ };
|
|
|
+ openStatus.value = status;
|
|
|
openPrint.value = true;
|
|
|
- proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
|
|
|
- printDetails.value = res;
|
|
|
+ proxy.get("/documents/generateInvoiceAPackPdf", { id: rowData.value.id }).then((res) => {
|
|
|
+ printDetails.value = res.data;
|
|
|
});
|
|
|
};
|
|
|
const clickDownload = () => {
|
|
|
- proxy.getPdf("报价单PDF文件");
|
|
|
+ if (openStatus.value === 1) {
|
|
|
+ proxy.getPdf("装箱单PDF文件");
|
|
|
+ } else if (openStatus.value === 2) {
|
|
|
+ proxy.getPdf("商业发票PDF文件");
|
|
|
+ }
|
|
|
+};
|
|
|
+const getStyle = (text) => {
|
|
|
+ if (text) {
|
|
|
+ return text.replace(/\n|\r\n/g, "<br>");
|
|
|
+ } else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+};
|
|
|
+const statistics = (label, label2, index) => {
|
|
|
+ let num = 0;
|
|
|
+ if (printDetails.value.documentsProducts && printDetails.value.documentsProducts.length > 0) {
|
|
|
+ printDetails.value.documentsProducts.map((item) => {
|
|
|
+ if (label2) {
|
|
|
+ if (item[label] && item[label2]) {
|
|
|
+ num = parseFloat(Number(num) + Number(item[label]) * Number(item[label2])).toFixed(index);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (item[label]) {
|
|
|
+ num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return num;
|
|
|
};
|
|
|
-// const statistics = (label, index) => {
|
|
|
-// let num = 0;
|
|
|
-// if (printDetails.value.quotationProductList && printDetails.value.quotationProductList.length > 0) {
|
|
|
-// printDetails.value.quotationProductList.map((item) => {
|
|
|
-// if (item[label]) {
|
|
|
-// num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }
|
|
|
-// return num;
|
|
|
-// };
|
|
|
-// const getLabel = (key, list, label) => {
|
|
|
-// let text = "";
|
|
|
-// if (list && list.length > 0) {
|
|
|
-// let data = list.filter((item) => item.id === key);
|
|
|
-// if (data && data.length > 0) {
|
|
|
-// text = data[0][label];
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return text;
|
|
|
-// };
|
|
|
// const getAllMoney = (num) => {
|
|
|
// let money = num;
|
|
|
// if (printDetails.value.quotationPayList && printDetails.value.quotationPayList.length > 0) {
|
|
@@ -665,12 +882,30 @@ const clickDownload = () => {
|
|
|
}
|
|
|
.baseRow {
|
|
|
min-height: 24px;
|
|
|
- border-top: 1px solid #999;
|
|
|
- border-left: 1px solid #999;
|
|
|
+ border-top: 1px solid black;
|
|
|
+ border-left: 1px solid black;
|
|
|
}
|
|
|
.contentRow {
|
|
|
- border-right: 1px solid #999;
|
|
|
- line-height: 24px;
|
|
|
+ border-right: 1px solid black;
|
|
|
+ line-height: 20px;
|
|
|
padding-left: 4px;
|
|
|
}
|
|
|
+.three {
|
|
|
+ width: 100%;
|
|
|
+ border: 1px solid black;
|
|
|
+}
|
|
|
+.three thead {
|
|
|
+ text-align: center;
|
|
|
+ line-height: 20px;
|
|
|
+ font-weight: 700;
|
|
|
+}
|
|
|
+.three th {
|
|
|
+ border-right: 1px solid black;
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+}
|
|
|
+.three td {
|
|
|
+ line-height: 20px;
|
|
|
+ border-right: 1px solid black;
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+}
|
|
|
</style>
|