|
@@ -120,11 +120,11 @@
|
|
|
></right-toolbar>
|
|
|
<el-radio-group
|
|
|
style="float: right; margin-right: 100px"
|
|
|
- v-model="orderType"
|
|
|
+ v-model="queryParams.orderType"
|
|
|
size="mini"
|
|
|
@change="orderTypeChange"
|
|
|
>
|
|
|
- <el-radio-button :label="0">全部</el-radio-button>
|
|
|
+ <el-radio-button :label="null">全部</el-radio-button>
|
|
|
<el-radio-button :label="1">库存</el-radio-button>
|
|
|
<el-radio-button :label="2">生产</el-radio-button>
|
|
|
</el-radio-group>
|
|
@@ -419,10 +419,18 @@
|
|
|
:label="item.productName"
|
|
|
:value="item.productNo"
|
|
|
>
|
|
|
+ <span class="discribe" style="float: left">{{
|
|
|
+ item.productName
|
|
|
+ }}</span>
|
|
|
+ <span
|
|
|
+ style="float: right; color: #8492a6; font-size: 13px"
|
|
|
+ >{{ item.productType }}</span
|
|
|
+ >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="productType" label="规格"> </el-table-column>
|
|
|
<el-table-column prop="productNumber" label="数量/kg">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
@@ -699,7 +707,7 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!-- 详情弹窗 -->
|
|
|
- <el-dialog title="详情" :visible.sync="detailShow" width="1200px">
|
|
|
+ <el-dialog title="详情" :visible.sync="detailShow" width="1250px">
|
|
|
<div ref="detailTable" id="detail"></div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="detailShow = false">取 消</el-button>
|
|
@@ -740,6 +748,7 @@ import {
|
|
|
productInvoiceInfo,
|
|
|
addProductInvoice,
|
|
|
updateProductInvoice,
|
|
|
+ saleOrderList,
|
|
|
} from "@/api/tablelist/commonTable";
|
|
|
import { listData } from "@/api/system/tenant/data";
|
|
|
import { getToken } from "@/utils/auth";
|
|
@@ -940,6 +949,7 @@ export default {
|
|
|
sortOrder: true,
|
|
|
// 共通查询参数接受子组件的参数
|
|
|
queryParams: {
|
|
|
+ orderType: null,
|
|
|
pageNum: 1, // 第几页
|
|
|
pageSize: 10, // 每页大小
|
|
|
orderByColumn: "", // 根据某列排序
|
|
@@ -1042,6 +1052,9 @@ export default {
|
|
|
row.productName = this.productionOptions.find(
|
|
|
(item) => item.productNo == productNo
|
|
|
)?.productName;
|
|
|
+ row.productType = this.productionOptions.find(
|
|
|
+ (item) => item.productNo == productNo
|
|
|
+ )?.productType;
|
|
|
},
|
|
|
// 订单类型改变回调
|
|
|
orderTypeChange(type) {
|
|
@@ -1105,7 +1118,13 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
const values = data.map((item) => Number(item[column.property]));
|
|
|
- if (index === 4 || index === 5 || index === 6 || index === 7) {
|
|
|
+ if (
|
|
|
+ index === 1 ||
|
|
|
+ index === 5 ||
|
|
|
+ index === 6 ||
|
|
|
+ index === 7 ||
|
|
|
+ index === 8
|
|
|
+ ) {
|
|
|
sums[index] = "";
|
|
|
} else if (!values.every((value) => isNaN(value))) {
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
@@ -1133,6 +1152,7 @@ export default {
|
|
|
this.productionTableData.push({
|
|
|
saleProductNo: uuidv4(),
|
|
|
productNo: "", //货品编号
|
|
|
+ productType: "", //货品类型
|
|
|
productName: "", //货品名称
|
|
|
productNumber: "", //销售数量
|
|
|
productWeight: "", //销售重量kg
|
|
@@ -1322,21 +1342,39 @@ export default {
|
|
|
if (this.templateInfo == {}) return;
|
|
|
// 调用查询需要携带当前table的唯一标识
|
|
|
this.queryParams.queryMap.sqlkey = this.templateInfo.template.sqlKey;
|
|
|
- this.queryParams.orderByColumn = camelCase(
|
|
|
- this.queryParams.orderByColumn || ""
|
|
|
- );
|
|
|
+ // 排序
|
|
|
+ // this.queryParams.orderByColumn = camelCase(
|
|
|
+ // this.queryParams.orderByColumn || ""
|
|
|
+ // );
|
|
|
// 根据sql语句查询当前表数据
|
|
|
- let getListFun = orderType == 0 ? unionListTableData : getTableList1;
|
|
|
- if (orderType != 0) {
|
|
|
- this.queryParams.conditionMap = {
|
|
|
- columnName: "order_type",
|
|
|
- columnValue: orderType,
|
|
|
- };
|
|
|
- }
|
|
|
- getListFun(this.queryParams).then(async (res) => {
|
|
|
+ // let getListFun = orderType == 0 ? unionListTableData : getTableList1;
|
|
|
+ // if (orderType != 0) {
|
|
|
+ // this.queryParams.conditionMap = {
|
|
|
+ // columnName: "order_type",
|
|
|
+ // columnValue: orderType,
|
|
|
+ // };
|
|
|
+ // }
|
|
|
+ delete this.queryParams.orderByColumn;
|
|
|
+ this.queryParams.queryMap.queryParam =
|
|
|
+ this.queryParams.queryMap.queryCriteriaValue;
|
|
|
+ // this.queryParams.orderType = "";
|
|
|
+ saleOrderList(this.queryParams).then(async (res) => {
|
|
|
this.tableList = [];
|
|
|
- res.rows.forEach((item) => {
|
|
|
- this.tableList.push(item.resultMap);
|
|
|
+ // res.rows.forEach((item) => {
|
|
|
+ // this.tableList.push(item.resultMap);
|
|
|
+ // });
|
|
|
+ this.tableList = res.rows;
|
|
|
+
|
|
|
+ // 订单表字段添加表名
|
|
|
+ this.tableList.forEach((item) => {
|
|
|
+ let keys = Object.keys(item);
|
|
|
+ for (const key of keys) {
|
|
|
+ if (key == "customName") {
|
|
|
+ item["customer_" + key] = item[key];
|
|
|
+ } else {
|
|
|
+ item["sale_order_" + key] = item[key];
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
// 驼峰转换
|
|
|
let tempTableList = [];
|
|
@@ -1347,10 +1385,12 @@ export default {
|
|
|
}
|
|
|
return kv;
|
|
|
});
|
|
|
+
|
|
|
// this.setDictStyleData().then(() => {
|
|
|
// this.tableList = this.setFieldStyleData(this.tableList);
|
|
|
// });
|
|
|
this.tableList = await this.setFieldStyleData(tempTableList);
|
|
|
+ console.log(this.tableList);
|
|
|
this.total = res.total;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.tableRef?.clearSelection();
|
|
@@ -1517,6 +1557,7 @@ export default {
|
|
|
delete item.delFlag;
|
|
|
delete item.sliceTypeLabel;
|
|
|
delete item.colourNumberLabel;
|
|
|
+ delete item.productType; //删除产品类型
|
|
|
const matchedOption = this.colourNumberOptions.find(
|
|
|
(option) => option.materielCode === item.colourNumber
|
|
|
);
|
|
@@ -1528,6 +1569,9 @@ export default {
|
|
|
matchedOption.materieEncoding;
|
|
|
item.taskName = taskName;
|
|
|
});
|
|
|
+ this.productionTableData.forEach((item) => {
|
|
|
+ delete item.productType; //删除产品类型
|
|
|
+ });
|
|
|
let productData = {
|
|
|
//货品表新增数据
|
|
|
basicMap: {
|
|
@@ -1658,10 +1702,16 @@ export default {
|
|
|
saleOrderEstimatedTime &&
|
|
|
(this.formData.saleOrderEstimatedTime = saleOrderEstimatedTime);
|
|
|
deliveryDate && (this.formData.deliveryDate = new Date(deliveryDate));
|
|
|
- this.productionTableData = sale_products;
|
|
|
+
|
|
|
this.productIds = sale_products.map((item) => item.saleProductNo);
|
|
|
|
|
|
await this.getDropDownData();
|
|
|
+ this.productionTableData = sale_products.map((item) => {
|
|
|
+ item.productType = this.productionOptions.find(
|
|
|
+ (i) => item.productNo == i.productNo
|
|
|
+ )?.productType;
|
|
|
+ return item;
|
|
|
+ });
|
|
|
if (this.formData.saleCustomNo) {
|
|
|
this.customChangeHandler(this.formData.saleCustomNo);
|
|
|
}
|
|
@@ -2691,13 +2741,13 @@ export default {
|
|
|
? 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>
|
|
@@ -2712,7 +2762,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>
|
|
@@ -2722,14 +2772,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>
|
|
@@ -2756,8 +2807,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>${productName}</td>
|
|
|
+ <td>${productType}</td>
|
|
|
<td>${item.productNumber}</td>
|
|
|
<td>${item.productUnitPrice}</td>
|
|
|
<td>${item.productAmounts}</td>
|
|
@@ -2770,6 +2823,7 @@ export default {
|
|
|
printStr += `
|
|
|
<tr align="center">
|
|
|
<td>小计:</td>
|
|
|
+ <td></td>
|
|
|
<td>${amountTotal}</td>
|
|
|
<td>${singlTotal}</td>
|
|
|
<td>${moneyTotal}</td>
|
|
@@ -2778,7 +2832,7 @@ export default {
|
|
|
<td></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <td colspan="7">合计金额(大写):${saleAmountInWords}</td>
|
|
|
+ <td colspan="8">合计金额(大写):${saleAmountInWords}</td>
|
|
|
</tr>
|
|
|
`;
|
|
|
|
|
@@ -2787,16 +2841,16 @@ export default {
|
|
|
printStr += `
|
|
|
<tr>
|
|
|
<td colspan="4">付款方式:${salePayType}</td>
|
|
|
- <td colspan="3">定金:${earnestMoney}</td>
|
|
|
+ <td colspan="4">定金:${earnestMoney}</td>
|
|
|
</tr>`;
|
|
|
} else {
|
|
|
printStr += `
|
|
|
<tr>
|
|
|
- <td colspan="7">付款方式:${salePayType}</td>
|
|
|
+ <td colspan="8">付款方式:${salePayType}</td>
|
|
|
</tr>`;
|
|
|
}
|
|
|
printStr += `<tr align="center">
|
|
|
- <td colspan="7">工艺要求</td>
|
|
|
+ <td colspan="8">工艺要求</td>
|
|
|
</tr>
|
|
|
<tr align="center">
|
|
|
<td width="150px">网络</td>
|
|
@@ -2806,6 +2860,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>
|
|
@@ -2815,24 +2870,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>
|
|
@@ -2840,6 +2896,7 @@ export default {
|
|
|
<td></td>
|
|
|
<td></td>
|
|
|
<td></td>
|
|
|
+ <td></td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|