|
@@ -433,6 +433,44 @@
|
|
{{ scope.row.productAmounts }}
|
|
{{ scope.row.productAmounts }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column prop="sliceType" label="切片型号">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="scope.row.sliceType"
|
|
|
|
+ placeholder=""
|
|
|
|
+ clearable
|
|
|
|
+ filterable
|
|
|
|
+ @change="sliceTypeChangeHandler(scope.row)"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in sliceTypeOptions"
|
|
|
|
+ :key="item.materielCode"
|
|
|
|
+ :label="item.materielName"
|
|
|
|
+ :value="item.materielCode"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="colourNumber" label="色号">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="scope.row.colourNumber"
|
|
|
|
+ placeholder=""
|
|
|
|
+ clearable
|
|
|
|
+ filterable
|
|
|
|
+ @change="colourNumberChangeHandler(scope.row)"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in colourNumberOptions"
|
|
|
|
+ :key="item.materielCode"
|
|
|
|
+ :label="item.materieColorNumber"
|
|
|
|
+ :value="item.materielCode"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column prop="remark" label="备注">
|
|
<el-table-column prop="remark" label="备注">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
<el-input
|
|
@@ -483,7 +521,7 @@
|
|
<el-divider>工艺要求</el-divider>
|
|
<el-divider>工艺要求</el-divider>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="网格:">
|
|
|
|
|
|
+ <el-form-item label="网络:">
|
|
<el-input
|
|
<el-input
|
|
v-model="formData.craftGrid"
|
|
v-model="formData.craftGrid"
|
|
size="small"
|
|
size="small"
|
|
@@ -610,7 +648,7 @@
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 详情弹窗 -->
|
|
<!-- 详情弹窗 -->
|
|
- <el-dialog title="详情" :visible.sync="detailShow" width="1000px">
|
|
|
|
|
|
+ <el-dialog title="详情" :visible.sync="detailShow" width="1200px">
|
|
<div ref="detailTable" id="detail"></div>
|
|
<div ref="detailTable" id="detail"></div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="detailShow = false">取 消</el-button>
|
|
<el-button @click="detailShow = false">取 消</el-button>
|
|
@@ -685,9 +723,13 @@ export default {
|
|
productWeight: "", //销售重量kg
|
|
productWeight: "", //销售重量kg
|
|
productUnitPrice: "", //单价
|
|
productUnitPrice: "", //单价
|
|
productAmounts: "", //金额
|
|
productAmounts: "", //金额
|
|
|
|
+ sliceType: "", //切片类型
|
|
|
|
+ sliceTypeLabel: "",
|
|
|
|
+ colourNumberLabel: "",
|
|
|
|
+ colourNumber: "", //色号
|
|
remark: "", //备注
|
|
remark: "", //备注
|
|
// 工艺表
|
|
// 工艺表
|
|
- craftGrid: "", //网格
|
|
|
|
|
|
+ craftGrid: "", //网络
|
|
craftOil: "", //油剂
|
|
craftOil: "", //油剂
|
|
craftPackage: "", //卷装
|
|
craftPackage: "", //卷装
|
|
craftColorFastness: "", //色牢度
|
|
craftColorFastness: "", //色牢度
|
|
@@ -901,9 +943,13 @@ export default {
|
|
productWeight: "", //销售重量kg
|
|
productWeight: "", //销售重量kg
|
|
productUnitPrice: "", //单价
|
|
productUnitPrice: "", //单价
|
|
productAmounts: "", //金额
|
|
productAmounts: "", //金额
|
|
|
|
+ sliceType: "", //切片类型
|
|
|
|
+ sliceTypeLabel: "",
|
|
|
|
+ colourNumberLabel: "",
|
|
|
|
+ colourNumber: "", //色号
|
|
remark: "", //备注
|
|
remark: "", //备注
|
|
// 工艺表
|
|
// 工艺表
|
|
- craftGrid: "", //网格
|
|
|
|
|
|
+ craftGrid: "", //网络
|
|
craftOil: "", //油剂
|
|
craftOil: "", //油剂
|
|
craftPackage: "", //卷装
|
|
craftPackage: "", //卷装
|
|
craftColorFastness: "", //色牢度
|
|
craftColorFastness: "", //色牢度
|
|
@@ -924,7 +970,7 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
const values = data.map((item) => Number(item[column.property]));
|
|
const values = data.map((item) => Number(item[column.property]));
|
|
- if (index === 4 || index === 5) {
|
|
|
|
|
|
+ if (index === 4 || index === 5 || index === 6 || index === 7) {
|
|
sums[index] = "";
|
|
sums[index] = "";
|
|
} else if (!values.every((value) => isNaN(value))) {
|
|
} else if (!values.every((value) => isNaN(value))) {
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
@@ -957,6 +1003,10 @@ export default {
|
|
productWeight: "", //销售重量kg
|
|
productWeight: "", //销售重量kg
|
|
productUnitPrice: "", //单价
|
|
productUnitPrice: "", //单价
|
|
productAmounts: "", //金额
|
|
productAmounts: "", //金额
|
|
|
|
+ sliceType: "", //切片类型
|
|
|
|
+ sliceTypeLabel: "",
|
|
|
|
+ colourNumberLabel: "",
|
|
|
|
+ colourNumber: "", //色号
|
|
remark: "", //备注
|
|
remark: "", //备注
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -1004,7 +1054,54 @@ export default {
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(error);
|
|
console.log(error);
|
|
}
|
|
}
|
|
|
|
+ // 色号数据
|
|
|
|
+ try {
|
|
|
|
+ let payLoad = [
|
|
|
|
+ {
|
|
|
|
+ basicMap: {
|
|
|
|
+ tableName: "materiel",
|
|
|
|
+ },
|
|
|
|
+ conditionMap: {
|
|
|
|
+ materiel_species: ["1"],
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ let res = await queryDropDownBoxData(payLoad);
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ console.log(res.data.resultMap);
|
|
|
|
+ let { materiel } = res.data.resultMap;
|
|
|
|
+ this.colourNumberOptions = materiel || [];
|
|
|
|
+ } else {
|
|
|
|
+ throw Error("获取下拉框数据失败");
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ }
|
|
|
|
+ // 切片型号
|
|
|
|
+ try {
|
|
|
|
+ let payLoad = [
|
|
|
|
+ {
|
|
|
|
+ basicMap: {
|
|
|
|
+ tableName: "materiel",
|
|
|
|
+ },
|
|
|
|
+ conditionMap: {
|
|
|
|
+ materiel_species: ["6"],
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ let res = await queryDropDownBoxData(payLoad);
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ console.log(res.data.resultMap);
|
|
|
|
+ let { materiel } = res.data.resultMap;
|
|
|
|
+ this.sliceTypeOptions = materiel || [];
|
|
|
|
+ } else {
|
|
|
|
+ throw Error("获取下拉框数据失败");
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
+ //
|
|
// 获取row-key
|
|
// 获取row-key
|
|
getRowKey(row) {
|
|
getRowKey(row) {
|
|
return row[
|
|
return row[
|
|
@@ -1210,6 +1307,8 @@ export default {
|
|
delete item.createTime;
|
|
delete item.createTime;
|
|
delete item.createById;
|
|
delete item.createById;
|
|
delete item.delFlag;
|
|
delete item.delFlag;
|
|
|
|
+ delete item.sliceTypeLabel;
|
|
|
|
+ delete item.colourNumberLabel;
|
|
});
|
|
});
|
|
let productData = {
|
|
let productData = {
|
|
//货品表新增数据
|
|
//货品表新增数据
|
|
@@ -2233,6 +2332,24 @@ export default {
|
|
this.$refs.detailTable.innerHTML = this.printDomData;
|
|
this.$refs.detailTable.innerHTML = this.printDomData;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 切片类型改变回调
|
|
|
|
+ sliceTypeChangeHandler(row) {
|
|
|
|
+ let { sliceType } = row;
|
|
|
|
+ if (sliceType) {
|
|
|
|
+ row.sliceTypeLabel = this.sliceTypeOptions.find(
|
|
|
|
+ (item) => item.materielCode == sliceType
|
|
|
|
+ )?.materielName;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 色号改变回调
|
|
|
|
+ colourNumberChangeHandler(row) {
|
|
|
|
+ let { colourNumber } = row;
|
|
|
|
+ if (colourNumber) {
|
|
|
|
+ row.colourNumberLabel = this.colourNumberOptions.find(
|
|
|
|
+ (item) => item.materielCode == colourNumber
|
|
|
|
+ )?.materieColorNumber;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 打印回调
|
|
// 打印回调
|
|
detailPrintHandler() {
|
|
detailPrintHandler() {
|
|
document.body.innerHTML = document.getElementById("printDom").innerHTML =
|
|
document.body.innerHTML = document.getElementById("printDom").innerHTML =
|
|
@@ -2301,7 +2418,7 @@ export default {
|
|
// productAmounts: "", //金额
|
|
// productAmounts: "", //金额
|
|
// remark: "", //备注
|
|
// remark: "", //备注
|
|
// 工艺表
|
|
// 工艺表
|
|
- craftGrid, //网格
|
|
|
|
|
|
+ craftGrid, //网络
|
|
craftOil, //油剂
|
|
craftOil, //油剂
|
|
craftPackage, //卷装
|
|
craftPackage, //卷装
|
|
craftColorFastness, //色牢度
|
|
craftColorFastness, //色牢度
|
|
@@ -2317,13 +2434,13 @@ export default {
|
|
let customCountryType = customData?.customCountryType || "";
|
|
let customCountryType = customData?.customCountryType || "";
|
|
let contactPerson = customData?.contactPerson || "无";
|
|
let contactPerson = customData?.contactPerson || "无";
|
|
let printStr = `
|
|
let printStr = `
|
|
- <table style="width:900px; border-collapse:collapse;" border="1" cellpadding="10" align="center">
|
|
|
|
|
|
+ <table style="width:1050px; border-collapse:collapse;" border="1" cellpadding="10" align="center">
|
|
<div style="text-align:center;font-size: 20px;">诸暨市新丝维纤维有限公司</div>
|
|
<div style="text-align:center;font-size: 20px;">诸暨市新丝维纤维有限公司</div>
|
|
<div style="text-align:center;">销售合同审计单</div>
|
|
<div style="text-align:center;">销售合同审计单</div>
|
|
<tbody>
|
|
<tbody>
|
|
<tr>
|
|
<tr>
|
|
<td width="600px" colspan="4">合同号:${saleNo}</td>
|
|
<td width="600px" colspan="4">合同号:${saleNo}</td>
|
|
- <td width="300px" colspan="2">日期:${saleDate.replace(
|
|
|
|
|
|
+ <td width="450px" colspan="3">日期:${saleDate.replace(
|
|
"T",
|
|
"T",
|
|
" "
|
|
" "
|
|
)}</td>
|
|
)}</td>
|
|
@@ -2331,32 +2448,34 @@ export default {
|
|
<tr align="center">
|
|
<tr align="center">
|
|
<td width="300px" colspan="2">客户名称:</td>
|
|
<td width="300px" colspan="2">客户名称:</td>
|
|
<td width="300px" colspan="2">${customerName}</td>
|
|
<td width="300px" colspan="2">${customerName}</td>
|
|
- <td width="150px">联系人:</td>
|
|
|
|
- <td width="150px">${contactPerson}</td>
|
|
|
|
|
|
+ <td width="300px" colspan="2">联系人:</td>
|
|
|
|
+ <td width="150px" colspan="1">${contactPerson}</td>
|
|
</tr>
|
|
</tr>
|
|
<tr align="center">
|
|
<tr align="center">
|
|
- <td colspan="2">客户地址:</td>
|
|
|
|
- <td colspan="2">${customAddress}</td>
|
|
|
|
- <td>客户国别:</td>
|
|
|
|
- <td>${customCountryType}</td>
|
|
|
|
|
|
+ <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>
|
|
</tr>
|
|
</tr>
|
|
<tr align="center">
|
|
<tr align="center">
|
|
- <td colspan="2">预计下单时间:</td>
|
|
|
|
- <td colspan="2">${saleOrderEstimatedTime.replace(
|
|
|
|
|
|
+ <td width="300px" colspan="2">预计下单时间:</td>
|
|
|
|
+ <td width="300px" colspan="2">${saleOrderEstimatedTime.replace(
|
|
"T",
|
|
"T",
|
|
" "
|
|
" "
|
|
)}</td>
|
|
)}</td>
|
|
- <td>交货周期:</td>
|
|
|
|
- <td>${saleLeadTime}</td>
|
|
|
|
|
|
+ <td width="300px" colspan="2">交货周期:</td>
|
|
|
|
+ <td >${saleLeadTime}</td>
|
|
</tr>
|
|
</tr>
|
|
<tr align="center">
|
|
<tr align="center">
|
|
- <td colspan="6">货品明细</td>
|
|
|
|
|
|
+ <td colspan="7">货品明细</td>
|
|
</tr>
|
|
</tr>
|
|
<tr align="center">
|
|
<tr align="center">
|
|
- <td width="300px" colspan="2">品名</td>
|
|
|
|
|
|
+ <td width="150px">品名</td>
|
|
<td width="150px">数量/kg</td>
|
|
<td width="150px">数量/kg</td>
|
|
<td width="150px">单价</td>
|
|
<td width="150px">单价</td>
|
|
<td width="150px">金额</td>
|
|
<td width="150px">金额</td>
|
|
|
|
+ <td width="150px">切片型号</td>
|
|
|
|
+ <td width="150px">色号</td>
|
|
<td width="150px">备注</td>
|
|
<td width="150px">备注</td>
|
|
</tr>`;
|
|
</tr>`;
|
|
let amountTotal = 0,
|
|
let amountTotal = 0,
|
|
@@ -2370,70 +2489,87 @@ export default {
|
|
let productData = this.productionOptions.find(
|
|
let productData = this.productionOptions.find(
|
|
(pro) => pro.productNo == item.productNo
|
|
(pro) => pro.productNo == item.productNo
|
|
);
|
|
);
|
|
|
|
+ console.log("item", item);
|
|
|
|
+ item.sliceTypeLabel =
|
|
|
|
+ this.sliceTypeOptions.find(
|
|
|
|
+ (k) => k.materielCode == item.sliceType
|
|
|
|
+ )?.materielName || "";
|
|
|
|
+ item.colourNumberLabel = this.colourNumberOptions.find(
|
|
|
|
+ (k) => k.materielCode == item.colourNumber
|
|
|
|
+ )?.materieColorNumber;
|
|
let productName = productData ? productData.productName : "";
|
|
let productName = productData ? productData.productName : "";
|
|
printStr += `<tr align="center">
|
|
printStr += `<tr align="center">
|
|
- <td colspan="2">${productName}</td>
|
|
|
|
|
|
+ <td>${productName}</td>
|
|
<td>${item.productNumber}</td>
|
|
<td>${item.productNumber}</td>
|
|
<td>${item.productUnitPrice}</td>
|
|
<td>${item.productUnitPrice}</td>
|
|
<td>${item.productAmounts}</td>
|
|
<td>${item.productAmounts}</td>
|
|
|
|
+ <td>${item.sliceTypeLabel}</td>
|
|
|
|
+ <td>${item.colourNumberLabel}</td>
|
|
<td>${item.remark}</td>
|
|
<td>${item.remark}</td>
|
|
</tr>`;
|
|
</tr>`;
|
|
}
|
|
}
|
|
// 计算小计
|
|
// 计算小计
|
|
printStr += `
|
|
printStr += `
|
|
<tr align="center">
|
|
<tr align="center">
|
|
- <td colspan="2">小计:</td>
|
|
|
|
|
|
+ <td>小计:</td>
|
|
<td>${amountTotal}</td>
|
|
<td>${amountTotal}</td>
|
|
<td>${singlTotal}</td>
|
|
<td>${singlTotal}</td>
|
|
<td>${moneyTotal}</td>
|
|
<td>${moneyTotal}</td>
|
|
<td></td>
|
|
<td></td>
|
|
|
|
+ <td></td>
|
|
|
|
+ <td></td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td colspan="6">合计金额(大写):${saleAmountInWords}</td>
|
|
|
|
|
|
+ <td colspan="7">合计金额(大写):${saleAmountInWords}</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td colspan="6">付款方式:${salePayType}</td>
|
|
|
|
|
|
+ <td colspan="7">付款方式:${salePayType}</td>
|
|
</tr>
|
|
</tr>
|
|
<tr align="center">
|
|
<tr align="center">
|
|
- <td colspan="6">工艺要求</td>
|
|
|
|
|
|
+ <td colspan="7">工艺要求</td>
|
|
</tr>
|
|
</tr>
|
|
<tr align="center">
|
|
<tr align="center">
|
|
- <td width="300px" colspan="2">网格</td>
|
|
|
|
|
|
+ <td width="150px">网络</td>
|
|
<td width="150px">油剂</td>
|
|
<td width="150px">油剂</td>
|
|
<td width="150px">卷装</td>
|
|
<td width="150px">卷装</td>
|
|
<td width="150px">色牢度</td>
|
|
<td width="150px">色牢度</td>
|
|
<td width="150px">其他</td>
|
|
<td width="150px">其他</td>
|
|
|
|
+ <td width="150px"></td>
|
|
|
|
+ <td width="150px"></td>
|
|
</tr>
|
|
</tr>
|
|
<tr align="center">
|
|
<tr align="center">
|
|
- <td colspan="2">${craftGrid}</td>
|
|
|
|
|
|
+ <td >${craftGrid}</td>
|
|
<td>${craftOil}</td>
|
|
<td>${craftOil}</td>
|
|
<td>${craftPackage}</td>
|
|
<td>${craftPackage}</td>
|
|
<td>${craftColorFastness}</td>
|
|
<td>${craftColorFastness}</td>
|
|
<td>${craftOther}</td>
|
|
<td>${craftOther}</td>
|
|
|
|
+ <td width="150px"></td>
|
|
|
|
+ <td width="150px"></td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td colspan="6">包装/贴唛:${craftMark}</td>
|
|
|
|
|
|
+ <td colspan="7">包装/贴唛:${craftMark}</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td colspan="6">装运方式:${shippingMethod}</td>
|
|
|
|
|
|
+ <td colspan="7">装运方式:${shippingMethod}</td>
|
|
</tr>
|
|
</tr>
|
|
- <tr>
|
|
|
|
|
|
+ <tr align="center">
|
|
<td colspan="2">业务员:</td>
|
|
<td colspan="2">业务员:</td>
|
|
<td colspan="2">${salesman}</td>
|
|
<td colspan="2">${salesman}</td>
|
|
- <td>业务主管:</td>
|
|
|
|
|
|
+ <td colspan="2">业务主管:</td>
|
|
<td>${saleLeader}</td>
|
|
<td>${saleLeader}</td>
|
|
</tr>
|
|
</tr>
|
|
- <tr>
|
|
|
|
|
|
+ <tr align="center">
|
|
<td colspan="2">财务部:</td>
|
|
<td colspan="2">财务部:</td>
|
|
<td colspan="2">${finance}</td>
|
|
<td colspan="2">${finance}</td>
|
|
- <td>生产部:</td>
|
|
|
|
|
|
+ <td colspan="2">生产部:</td>
|
|
<td>${production}</td>
|
|
<td>${production}</td>
|
|
</tr>
|
|
</tr>
|
|
- <tr>
|
|
|
|
|
|
+ <tr align="center">
|
|
<td colspan="2">批准人:</td>
|
|
<td colspan="2">批准人:</td>
|
|
<td colspan="2">${saleApprover}</td>
|
|
<td colspan="2">${saleApprover}</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
|
|
+ <td></td>
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|