|
@@ -569,10 +569,17 @@ export default {
|
|
|
this.$refs.detailTable.innerHTML = this.printDomData;
|
|
|
});
|
|
|
},
|
|
|
- getDictLabel(value, dictLsit = []) {
|
|
|
- return dictLsit.find((item) => {
|
|
|
- return item.value == value;
|
|
|
- })?.label;
|
|
|
+ // getDictLabel(value, dictLsit = []) {
|
|
|
+ // return dictLsit.find((item) => {
|
|
|
+ // return item.value == value;
|
|
|
+ // })?.label;
|
|
|
+ // },
|
|
|
+ getDictLabel(value, dict) {
|
|
|
+ return (
|
|
|
+ this.dict.type[dict].find((item) => {
|
|
|
+ return item.value === value;
|
|
|
+ })?.label || ""
|
|
|
+ );
|
|
|
},
|
|
|
// 获取详情html字符串
|
|
|
async getDetailTableString(row) {
|
|
@@ -604,12 +611,14 @@ export default {
|
|
|
},
|
|
|
];
|
|
|
let res = await queryDropDownBoxData(payLoad);
|
|
|
+ await this.getDropDownData();
|
|
|
if (res.code == 200) {
|
|
|
console.log(res);
|
|
|
let { sale_craft, sale_order, sale_products } = res.data.resultMap;
|
|
|
let {
|
|
|
//订单表数据
|
|
|
saleNo, //合同号
|
|
|
+ lotNumber, //批号
|
|
|
saleCustomNo, //客户编号
|
|
|
saleDate, //销售单日期
|
|
|
saleOrderEstimatedTime, //预计下单时间
|
|
@@ -648,28 +657,22 @@ export default {
|
|
|
let customData = this.customerOptions.find(
|
|
|
(item) => item.customNo == saleCustomNo
|
|
|
);
|
|
|
- let payType = this.getDictLabel(
|
|
|
- salePayType,
|
|
|
- this.dict.type.payment_method
|
|
|
- ); //付款方式
|
|
|
+ let payType = this.getDictLabel(salePayType, "payment_method"); //付款方式
|
|
|
let customerName = customData ? customData.customName : "";
|
|
|
let customAddress = customData?.customAddress || "无";
|
|
|
let customCountryType = customData?.customCountryType || "";
|
|
|
let contactPerson = customData?.contactPerson || "无";
|
|
|
let directionOfTwistDescription = directionOfTwist
|
|
|
- ? this.getDictLabel(
|
|
|
- directionOfTwist,
|
|
|
- this.dict.type.direction_of_twist
|
|
|
- )
|
|
|
+ ? this.getDictLabel(directionOfTwist, "direction_of_twist")
|
|
|
: "";
|
|
|
let printStr = `
|
|
|
- <table style="width:1050px; border-collapse:collapse;" border="1" cellpadding="10" align="center">
|
|
|
+ <table style="width:1200px; border-collapse:collapse;" border="1" cellpadding="10" align="center">
|
|
|
<div style="text-align:center;font-size: 20px;">诸暨市新丝维纤维有限公司</div>
|
|
|
<div style="text-align:center;">销售合同审计单</div>
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
<td width="600px" colspan="4">合同号:${saleNo}</td>
|
|
|
- <td width="450px" colspan="3">日期:${saleDate.replace(
|
|
|
+ <td width="600px" colspan="4">日期:${saleDate.replace(
|
|
|
"T",
|
|
|
" "
|
|
|
)}</td>
|
|
@@ -684,7 +687,7 @@ export default {
|
|
|
<td width="300px" colspan="2">客户地址:</td>
|
|
|
<td width="300px" colspan="2">${customAddress}</td>
|
|
|
<td width="300px" colspan="2">客户国别:</td>
|
|
|
- <td width="150px" colspan="1">${customCountryType}</td>
|
|
|
+ <td width="300px" colspan="2">${customCountryType}</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td width="300px" colspan="2">预计下单时间:</td>
|
|
@@ -694,14 +697,15 @@ export default {
|
|
|
)}</td>
|
|
|
<td colspan="1">交货周期:</td>
|
|
|
<td >${saleLeadTime}</td>
|
|
|
- <td colspan="1">交货日期:</td>
|
|
|
+ <td colspan="2">交货日期:</td>
|
|
|
<td >${deliveryDate.replace("T", " ")}</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
- <td colspan="7">货品明细</td>
|
|
|
+ <td colspan="8">货品明细</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td width="150px">品名</td>
|
|
|
+ <td width="150px">类型</td>
|
|
|
<td width="150px">数量/kg</td>
|
|
|
<td width="150px">单价</td>
|
|
|
<td width="150px">金额</td>
|
|
@@ -728,8 +732,10 @@ export default {
|
|
|
(k) => k.materielCode == item.colourNumber
|
|
|
)?.materieColorNumber;
|
|
|
let productName = productData ? productData.productName : "";
|
|
|
+ let productType = productData ? productData.productType : "";
|
|
|
printStr += `<tr align="center">
|
|
|
<td>${productName}</td>
|
|
|
+ <td>${productType}</td>
|
|
|
<td>${item.productNumber}</td>
|
|
|
<td>${item.productUnitPrice}</td>
|
|
|
<td>${item.productAmounts}</td>
|
|
@@ -742,6 +748,7 @@ export default {
|
|
|
printStr += `
|
|
|
<tr align="center">
|
|
|
<td>小计:</td>
|
|
|
+ <td></td>
|
|
|
<td>${amountTotal}</td>
|
|
|
<td>${singlTotal}</td>
|
|
|
<td>${moneyTotal}</td>
|
|
@@ -750,7 +757,7 @@ export default {
|
|
|
<td></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td colspan="7">合计金额(大写):${saleAmountInWords}</td>
|
|
|
+ <td colspan="8">合计金额(大写):${saleAmountInWords}</td>
|
|
|
</tr>
|
|
|
`;
|
|
|
|
|
@@ -759,16 +766,16 @@ export default {
|
|
|
printStr += `
|
|
|
<tr>
|
|
|
<td colspan="4">付款方式:${payType}</td>
|
|
|
- <td colspan="3">定金:${earnestMoney}</td>
|
|
|
+ <td colspan="4">定金:${earnestMoney}</td>
|
|
|
</tr>`;
|
|
|
} else {
|
|
|
printStr += `
|
|
|
<tr>
|
|
|
- <td colspan="7">付款方式:${payType}</td>
|
|
|
+ <td colspan="8">付款方式:${payType}</td>
|
|
|
</tr>`;
|
|
|
}
|
|
|
printStr += `<tr align="center">
|
|
|
- <td colspan="7">工艺要求</td>
|
|
|
+ <td colspan="8">工艺要求</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td width="150px">网络</td>
|
|
@@ -778,6 +785,7 @@ export default {
|
|
|
<td width="150px">捻向</td>
|
|
|
<td width="150px">其他</td>
|
|
|
<td width="150px"></td>
|
|
|
+ <td width="150px"></td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td >${craftGrid}</td>
|
|
@@ -787,24 +795,25 @@ export default {
|
|
|
<td>${directionOfTwistDescription}</td>
|
|
|
<td>${craftOther}</td>
|
|
|
<td width="150px"></td>
|
|
|
+ <td width="150px"></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td colspan="7">包装/贴唛:${craftMark}</td>
|
|
|
+ <td colspan="8">包装/贴唛:${craftMark}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td colspan="7">装运方式:${shippingMethod}</td>
|
|
|
+ <td colspan="8">装运方式:${shippingMethod}</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td colspan="2">业务员:</td>
|
|
|
<td colspan="2">${salesman}</td>
|
|
|
<td colspan="2">业务主管:</td>
|
|
|
- <td>${saleLeader}</td>
|
|
|
+ <td colspan="2">${saleLeader}</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td colspan="2">财务部:</td>
|
|
|
<td colspan="2">${finance}</td>
|
|
|
<td colspan="2">生产部:</td>
|
|
|
- <td>${production}</td>
|
|
|
+ <td colspan="2">${production}</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td colspan="2">批准人:</td>
|
|
@@ -812,6 +821,7 @@ export default {
|
|
|
<td></td>
|
|
|
<td></td>
|
|
|
<td></td>
|
|
|
+ <td></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|