feat(wms): 添加订单号显示并改进日期格式化功能
1. 在发货单组件中增加订单号显示,替换原有电话字段 2. 实现统一的日期格式化工具函数,修复参数冲突问题 3. 发货操作后自动添加待操作记录 4. 优化钢卷操作中的日期处理逻辑
This commit is contained in:
@@ -34,8 +34,8 @@
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.principal }}</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="label">电话:</span>
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.principalPhone }}</div>
|
||||
<span class="label">订单号:</span>
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.orderId ? localWaybill.orderCode : localWaybill.principalPhone }}</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="label">合同号:</span>
|
||||
@@ -239,6 +239,8 @@ export default {
|
||||
handler(newVal) {
|
||||
if (newVal) {
|
||||
this.localWaybill = {
|
||||
orderId: newVal.orderId || '',
|
||||
orderCode: newVal.orderCode || '',
|
||||
consigneeUnit: newVal.consigneeUnit || '',
|
||||
senderUnit: newVal.senderUnit || '',
|
||||
deliveryYear: this.getYearFromDate(newVal.deliveryTime) || '',
|
||||
@@ -499,12 +501,12 @@ export default {
|
||||
[
|
||||
`负责人:${this.localWaybill.principal || ''}`,
|
||||
undefined, undefined,
|
||||
`电话:${this.localWaybill.principalPhone || ''}`,
|
||||
`订单号:${this.localWaybill.orderId ? this.localWaybill.orderCode : this.localWaybill.principalPhone || ''}`,
|
||||
undefined, undefined,
|
||||
`合同号:${this.localWaybill.contractCode || ''}`,
|
||||
undefined, undefined,
|
||||
`车牌:${this.localWaybill.licensePlate || ''}`
|
||||
], // 负责人/电话/合同号/车牌行(r=2)
|
||||
], // 负责人/订单号/合同号/车牌行(r=2)
|
||||
["品名", '切边', '包装', '仓库位置', '结算', '原料厂家', '卷号', '规格', '材质', '重量(t)', '单价', '备注'], // 表格表头(r=3)
|
||||
];
|
||||
|
||||
@@ -558,7 +560,7 @@ export default {
|
||||
{ s: { c: 4, r: headerRow1Idx }, e: { c: 7, r: headerRow1Idx } }, // 日期(E2-H2)
|
||||
{ s: { c: 8, r: headerRow1Idx }, e: { c: 11, r: headerRow1Idx } }, // 发货单位(I2-L2)
|
||||
{ s: { c: 0, r: headerRow2Idx }, e: { c: 2, r: headerRow2Idx } }, // 负责人(A3-C3)
|
||||
{ s: { c: 3, r: headerRow2Idx }, e: { c: 5, r: headerRow2Idx } }, // 电话(D3-F3)
|
||||
{ s: { c: 3, r: headerRow2Idx }, e: { c: 5, r: headerRow2Idx } }, // 订单号(D3-F3)
|
||||
{ s: { c: 6, r: headerRow2Idx }, e: { c: 8, r: headerRow2Idx } }, // 合同号(G3-I3)
|
||||
{ s: { c: 9, r: headerRow2Idx }, e: { c: 11, r: headerRow2Idx } }, // 车牌(J3-L3)
|
||||
{ s: { c: 0, r: remarkRowIdx }, e: { c: 11, r: remarkRowIdx } }, // 备注跨列合并(A*_L*)
|
||||
@@ -747,9 +749,9 @@ export default {
|
||||
date: `${this.localWaybill.deliveryYear || ''}年${this.localWaybill.deliveryMonth || ''}月${this.localWaybill.deliveryDay || ''}日`,
|
||||
sender: `发货单位:${this.localWaybill.senderUnit || ''}`
|
||||
};
|
||||
const header2 = { // 负责人+电话+合同号+车牌
|
||||
const header2 = { // 负责人+订单号+合同号+车牌
|
||||
principal: `负责人:${this.localWaybill.principal || ''}`,
|
||||
phone: `电话:${this.localWaybill.principalPhone || ''}`,
|
||||
phone: `订单号:${this.localWaybill.orderId ? this.localWaybill.orderCode : this.localWaybill.principalPhone || ''}`,
|
||||
contract: `合同号:${this.localWaybill.contractCode || ''}`,
|
||||
license: `车牌:${this.localWaybill.licensePlate || ''}`
|
||||
};
|
||||
@@ -797,7 +799,7 @@ export default {
|
||||
worksheet.getCell(`G${rowIdx}`).value = header2.contract;
|
||||
worksheet.getCell(`J${rowIdx}`).value = header2.license;
|
||||
worksheet.mergeCells(`A${rowIdx}:C${rowIdx}`); // 负责人:A3-C3
|
||||
worksheet.mergeCells(`D${rowIdx}:F${rowIdx}`); // 电话:D3-F3
|
||||
worksheet.mergeCells(`D${rowIdx}:F${rowIdx}`); // 订单号:D3-F3
|
||||
worksheet.mergeCells(`G${rowIdx}:I${rowIdx}`); // 合同号:G3-I3
|
||||
worksheet.mergeCells(`J${rowIdx}:L${rowIdx}`); // 车牌:J3-L3
|
||||
// 3.4 表格表头(第4行)
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.principal }}</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="label">电话:</span>
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.principalPhone }}</div>
|
||||
<span class="label">订单号:</span>
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.orderId ? localWaybill.orderCode : localWaybill.principalPhone }}</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="label">合同号:</span>
|
||||
@@ -239,6 +239,8 @@ export default {
|
||||
handler(newVal) {
|
||||
if (newVal) {
|
||||
this.localWaybill = {
|
||||
orderId: newVal.orderId || '',
|
||||
orderCode: newVal.orderCode || '',
|
||||
consigneeUnit: newVal.consigneeUnit || '',
|
||||
senderUnit: newVal.senderUnit || '',
|
||||
deliveryYear: this.getYearFromDate(newVal.deliveryTime) || '',
|
||||
@@ -499,12 +501,12 @@ export default {
|
||||
[
|
||||
`负责人:${this.localWaybill.principal || ''}`,
|
||||
undefined, undefined,
|
||||
`电话:${this.localWaybill.principalPhone || ''}`,
|
||||
`订单号:${this.localWaybill.orderId ? this.localWaybill.orderCode : this.localWaybill.principalPhone || ''}`,
|
||||
undefined, undefined,
|
||||
`合同号:${this.localWaybill.contractCode || ''}`,
|
||||
undefined,
|
||||
`车牌:${this.localWaybill.licensePlate || ''}`
|
||||
], // 负责人/电话/合同号/车牌行(r=2)
|
||||
], // 负责人/订单号/合同号/车牌行(r=2)
|
||||
["品名", '切边', '包装', '仓库位置', '结算', '原料厂家', '卷号', '规格', '材质', '重量(t)', '备注'], // 表格表头(r=3,11列)
|
||||
];
|
||||
|
||||
@@ -557,7 +559,7 @@ export default {
|
||||
{ s: { c: 4, r: headerRow1Idx }, e: { c: 6, r: headerRow1Idx } }, // 日期(4-7)
|
||||
{ s: { c: 8, r: headerRow1Idx }, e: { c: 10, r: headerRow1Idx } }, // 发货单位(8-10,无多余)
|
||||
{ s: { c: 0, r: headerRow2Idx }, e: { c: 2, r: headerRow2Idx } }, // 负责人(0-2)
|
||||
{ s: { c: 3, r: headerRow2Idx }, e: { c: 5, r: headerRow2Idx } }, // 电话(3-5)
|
||||
{ s: { c: 3, r: headerRow2Idx }, e: { c: 5, r: headerRow2Idx } }, // 订单号(3-5)
|
||||
{ s: { c: 6, r: headerRow2Idx }, e: { c: 7, r: headerRow2Idx } }, // 合同号(6-8)
|
||||
{ s: { c: 9, r: headerRow2Idx }, e: { c: 10, r: headerRow2Idx } }, // 车牌(9-10,无多余)
|
||||
{ s: { c: 0, r: remarkRowIdx }, e: { c: 10, r: remarkRowIdx } }, // 备注合并0-10列
|
||||
@@ -738,9 +740,9 @@ export default {
|
||||
date: `${this.localWaybill.deliveryYear || ''}年${this.localWaybill.deliveryMonth || ''}月${this.localWaybill.deliveryDay || ''}日`,
|
||||
sender: `发货单位:${this.localWaybill.senderUnit || ''}`
|
||||
};
|
||||
const header2 = { // 负责人+电话+合同号+车牌
|
||||
const header2 = { // 负责人+订单号+合同号+车牌
|
||||
principal: `负责人:${this.localWaybill.principal || ''}`,
|
||||
phone: `电话:${this.localWaybill.principalPhone || ''}`,
|
||||
phone: `订单号:${this.localWaybill.orderId ? this.localWaybill.orderCode : this.localWaybill.principalPhone || ''}`,
|
||||
contract: `合同号:${this.localWaybill.contractCode || ''}`,
|
||||
license: `车牌:${this.localWaybill.licensePlate || ''}`
|
||||
};
|
||||
@@ -788,7 +790,7 @@ export default {
|
||||
worksheet.getCell(`G${rowIdx}`).value = header2.contract;
|
||||
worksheet.getCell(`J${rowIdx}`).value = header2.license;
|
||||
worksheet.mergeCells(`A${rowIdx}:C${rowIdx}`); // 负责人:A3-C3
|
||||
worksheet.mergeCells(`D${rowIdx}:F${rowIdx}`); // 电话:D3-F3
|
||||
worksheet.mergeCells(`D${rowIdx}:F${rowIdx}`); // 订单号:D3-F3
|
||||
worksheet.mergeCells(`G${rowIdx}:I${rowIdx}`); // 合同号:G3-I3
|
||||
worksheet.mergeCells(`J${rowIdx}:K${rowIdx}`); // 车牌:J3-L3
|
||||
// 3.4 表格表头(第4行)
|
||||
|
||||
Reference in New Issue
Block a user