|
@@ -431,7 +431,11 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="productSpecifications" label="规格">
|
|
|
+ <el-table-column
|
|
|
+ prop="productSpecifications"
|
|
|
+ width="180"
|
|
|
+ label="规格"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-select
|
|
|
v-model="scope.row.productSpecifications"
|
|
@@ -458,6 +462,38 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="productType" label="类型">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="colourNumber" label="色号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ :prop="'colourNumber-' + scope.$index"
|
|
|
+ :name="'colourNumber-' + scope.$index"
|
|
|
+ style="margin: 0px; padding: 0px"
|
|
|
+ >
|
|
|
+ <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.materieEncoding + item.materieColorNumber"
|
|
|
+ :value="item.materielCode"
|
|
|
+ >
|
|
|
+ <span class="discribe" style="float: left">{{
|
|
|
+ item.materieEncoding + item.materieColorNumber
|
|
|
+ }}</span>
|
|
|
+ <!-- <span
|
|
|
+ style="float: right; color: #8492a6; font-size: 13px"
|
|
|
+ >{{ item.materielCode }}</span
|
|
|
+ > -->
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="productNumber" label="数量/kg">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
@@ -522,38 +558,7 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="colourNumber" label="色号">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- :prop="'colourNumber-' + scope.$index"
|
|
|
- :name="'colourNumber-' + scope.$index"
|
|
|
- style="margin: 0px; padding: 0px"
|
|
|
- >
|
|
|
- <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.materieEncoding + item.materieColorNumber"
|
|
|
- :value="item.materielCode"
|
|
|
- >
|
|
|
- <span class="discribe" style="float: left">{{
|
|
|
- item.materieEncoding + item.materieColorNumber
|
|
|
- }}</span>
|
|
|
- <!-- <span
|
|
|
- style="float: right; color: #8492a6; font-size: 13px"
|
|
|
- >{{ item.materielCode }}</span
|
|
|
- > -->
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
<el-table-column prop="remark" label="备注">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
@@ -1336,7 +1341,7 @@ export default {
|
|
|
if (
|
|
|
index === 1 ||
|
|
|
index === 2 ||
|
|
|
- index === 6 ||
|
|
|
+ index === 3 ||
|
|
|
index === 7 ||
|
|
|
index === 8 ||
|
|
|
index === 9
|
|
@@ -1385,6 +1390,7 @@ export default {
|
|
|
colourNumber: "", //色号
|
|
|
remark: "", //备注
|
|
|
specificationsList: [],
|
|
|
+ productSpecifications: "", //型号
|
|
|
});
|
|
|
// 添加校验规则
|
|
|
this.initTableValidate();
|
|
@@ -1466,7 +1472,7 @@ export default {
|
|
|
//审计新增
|
|
|
async addHandler() {
|
|
|
this.isEdit = false;
|
|
|
- await this.getDropDownData();
|
|
|
+ // await this.getDropDownData();
|
|
|
this.resetFormData();
|
|
|
|
|
|
this.title = "新增销售单";
|
|
@@ -1515,6 +1521,12 @@ export default {
|
|
|
} else {
|
|
|
throw Error("获取下拉框数据失败");
|
|
|
}
|
|
|
+ let allProRes = await getSaleOrderProductionList();
|
|
|
+ if (allProRes.code == 200) {
|
|
|
+ this.allProductionOptions = allProRes.data || [];
|
|
|
+ } else {
|
|
|
+ console.log(allProRes);
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
console.log(error);
|
|
|
}
|
|
@@ -1927,6 +1939,8 @@ export default {
|
|
|
delete item.taskNodeKey;
|
|
|
delete item.productionLineNo;
|
|
|
delete item.status;
|
|
|
+ delete item.specificationsList;
|
|
|
+ delete item.productSpecifications;
|
|
|
const matchedOption = this.colourNumberOptions.find(
|
|
|
(option) => option.materielCode === item.colourNumber
|
|
|
);
|
|
@@ -2078,19 +2092,25 @@ export default {
|
|
|
|
|
|
this.productIds = sale_products.map((item) => item.saleProductNo);
|
|
|
|
|
|
- await this.getDropDownData();
|
|
|
- this.productionTableData = sale_products.map((item) => {
|
|
|
+ // await this.getDropDownData();
|
|
|
+ let promiseArr = [];
|
|
|
+ this.productionTableData = sale_products.map((item, index) => {
|
|
|
let targetItem = this.allProductionOptions.find(
|
|
|
(i) => item.productNo == i.productNo
|
|
|
);
|
|
|
- if (
|
|
|
- !this.productionOptions.some((i) => i.productNo == item.productNo)
|
|
|
- ) {
|
|
|
- this.productionOptions.unshift(targetItem);
|
|
|
- }
|
|
|
+ item.productSpecifications = targetItem?.productSpecifications;
|
|
|
item.productType = targetItem?.productType;
|
|
|
+ promiseArr[index] = getProductSpecificationsByProductName({
|
|
|
+ productName: item.productName,
|
|
|
+ });
|
|
|
return item;
|
|
|
});
|
|
|
+
|
|
|
+ let promiseRes = await Promise.all(promiseArr);
|
|
|
+ promiseRes.forEach((item, index) => {
|
|
|
+ this.productionTableData[index].specificationsList = item.data;
|
|
|
+ });
|
|
|
+
|
|
|
if (this.formData.saleCustomNo) {
|
|
|
this.customChangeHandler(this.formData.saleCustomNo);
|
|
|
}
|
|
@@ -3143,7 +3163,7 @@ export default {
|
|
|
<tbody>
|
|
|
<tr>
|
|
|
<td width="600px" colspan="4">合同号:${saleNo}</td>
|
|
|
- <td width="600px" colspan="4">日期:${saleDate.replace(
|
|
|
+ <td width="600px" colspan="5">日期:${saleDate.replace(
|
|
|
"T",
|
|
|
" "
|
|
|
)}</td>
|
|
@@ -3152,11 +3172,11 @@ export default {
|
|
|
<td width="300px" colspan="2">客户名称:</td>
|
|
|
<td width="300px" colspan="2">${customerName}</td>
|
|
|
<td width="300px" colspan="2">联系人:</td>
|
|
|
- <td width="150px" colspan="1">${contactPerson}</td>
|
|
|
+ <td width="150px" colspan="3">${contactPerson}</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td width="300px" colspan="2">客户地址:</td>
|
|
|
- <td width="300px" colspan="2">${customAddress}</td>
|
|
|
+ <td width="300px" colspan="3">${customAddress}</td>
|
|
|
<td width="300px" colspan="2">客户国别:</td>
|
|
|
<td width="300px" colspan="2">${customCountryType}</td>
|
|
|
</tr>
|
|
@@ -3166,22 +3186,23 @@ export default {
|
|
|
"T",
|
|
|
" "
|
|
|
)}</td>
|
|
|
- <td colspan="1">交货周期:</td>
|
|
|
+ <td colspan="2">交货周期:</td>
|
|
|
<td >${saleLeadTime}</td>
|
|
|
<td colspan="2">交货日期:</td>
|
|
|
<td >${deliveryDate.replace("T", " ")}</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
- <td colspan="8">货品明细</td>
|
|
|
+ <td colspan="9">货品明细</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td width="150px">品名</td>
|
|
|
- <td width="150px">类型</td>
|
|
|
+ <td width="100px">规格</td>
|
|
|
+ <td width="100px">类型</td>
|
|
|
+ <td width="100px">色号</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>
|
|
|
</tr>`;
|
|
|
let amountTotal = 0,
|
|
@@ -3208,14 +3229,18 @@ export default {
|
|
|
)?.materieEncoding;
|
|
|
let productName = productData ? productData.productName : "";
|
|
|
let productType = productData ? productData.productType : "";
|
|
|
+ let productSpecifications = productData
|
|
|
+ ? productData.productSpecifications
|
|
|
+ : ""; //规格
|
|
|
printStr += `<tr align="center">
|
|
|
<td>${productName}</td>
|
|
|
+ <td>${productSpecifications}</td>
|
|
|
<td>${productType}</td>
|
|
|
+ <td>${materieEncoding + item.colourNumberLabel}</td>
|
|
|
<td>${item.productNumber}</td>
|
|
|
<td>${item.productUnitPrice}</td>
|
|
|
<td>${item.productAmounts}</td>
|
|
|
<td>${item.sliceTypeLabel}</td>
|
|
|
- <td>${materieEncoding + item.colourNumberLabel}</td>
|
|
|
<td>${item.remark}</td>
|
|
|
</tr>`;
|
|
|
}
|
|
@@ -3224,15 +3249,16 @@ export default {
|
|
|
<tr align="center">
|
|
|
<td>小计:</td>
|
|
|
<td></td>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
<td>${amountTotal.toFixed(2)}</td>
|
|
|
<td>${singlTotal.toFixed(2)}</td>
|
|
|
<td>${moneyTotal.toFixed(2)}</td>
|
|
|
<td></td>
|
|
|
<td></td>
|
|
|
- <td></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td colspan="8">合计金额(大写):${saleAmountInWords}</td>
|
|
|
+ <td colspan="9">合计金额(大写):${saleAmountInWords}</td>
|
|
|
</tr>
|
|
|
`;
|
|
|
|
|
@@ -3241,16 +3267,16 @@ export default {
|
|
|
printStr += `
|
|
|
<tr>
|
|
|
<td colspan="4">付款方式:${payType}</td>
|
|
|
- <td colspan="4">定金:${earnestMoney}</td>
|
|
|
+ <td colspan="5">定金:${earnestMoney}</td>
|
|
|
</tr>`;
|
|
|
} else {
|
|
|
printStr += `
|
|
|
<tr>
|
|
|
- <td colspan="8">付款方式:${payType}</td>
|
|
|
+ <td colspan="9">付款方式:${payType}</td>
|
|
|
</tr>`;
|
|
|
}
|
|
|
printStr += `<tr align="center">
|
|
|
- <td colspan="8">工艺要求</td>
|
|
|
+ <td colspan="9">工艺要求</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td width="150px">网络</td>
|
|
@@ -3261,6 +3287,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>
|
|
@@ -3271,18 +3298,19 @@ export default {
|
|
|
<td>${craftOther}</td>
|
|
|
<td width="150px"></td>
|
|
|
<td width="150px"></td>
|
|
|
+ <td width="150px"></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td colspan="8">包装/贴唛:${craftMark}</td>
|
|
|
+ <td colspan="9">包装/贴唛:${craftMark}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td colspan="8">装运方式:${shippingMethod}</td>
|
|
|
+ <td colspan="9">装运方式:${shippingMethod}</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td colspan="2">业务员:</td>
|
|
|
<td colspan="2">${salesman}</td>
|
|
|
<td colspan="2">财务部:</td>
|
|
|
- <td colspan="2">${finance}</td>
|
|
|
+ <td colspan="3">${finance}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
@@ -3293,6 +3321,7 @@ export default {
|
|
|
<td></td>
|
|
|
<td></td>
|
|
|
<td></td>
|
|
|
+ <td></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|