|
@@ -7,7 +7,8 @@ import {
|
|
|
getApprovalStatusType,
|
|
|
canApprove as canApproveStatus,
|
|
|
canReject as canRejectStatus,
|
|
|
- formatNumber
|
|
|
+ formatNumber,
|
|
|
+ formatDateTime as formatDateTimeUtil
|
|
|
} from '@/constants/forecast'
|
|
|
|
|
|
/**
|
|
@@ -178,14 +179,21 @@ export default {
|
|
|
selection: false,
|
|
|
menu: true,
|
|
|
menuWidth: 160,
|
|
|
+ menuFixed: false,
|
|
|
expand: false,
|
|
|
column: [
|
|
|
- { label: '商品编码', prop: 'itemCode', minWidth: 120 },
|
|
|
- { label: '商品名称', prop: 'itemName', minWidth: 180, overHidden: true },
|
|
|
+ { label: '物料编码', prop: 'itemCode', minWidth: 120 },
|
|
|
+ { label: '物料名称', prop: 'itemName', minWidth: 180, overHidden: true },
|
|
|
{ label: '规格型号', prop: 'specs', minWidth: 140, overHidden: true },
|
|
|
{ label: '花型/图案', prop: 'pattern', minWidth: 120, overHidden: true },
|
|
|
{ label: '品牌名称', prop: 'brandName', minWidth: 120, overHidden: true },
|
|
|
- { label: '预测数量', prop: 'forecastQuantity', minWidth: 120, align: 'right', slot: true }
|
|
|
+ { label: '预测数量', prop: 'forecastQuantity', minWidth: 120, align: 'right', slot: true },
|
|
|
+ { label: '审核状态', prop: 'approvalStatus', type: 'select', dicData: APPROVAL_STATUS_OPTIONS, minWidth: 100, slot: true },
|
|
|
+ { label: '客户名称', prop: 'customerName', minWidth: 160, overHidden: true },
|
|
|
+ { label: '年份', prop: 'year', minWidth: 100 },
|
|
|
+ { label: '月份', prop: 'month', minWidth: 100 },
|
|
|
+ { label: '审批人', prop: 'approvedName', minWidth: 120, overHidden: true },
|
|
|
+ { label: '审批时间', prop: 'approvedTime', type: 'datetime', minWidth: 160, overHidden: true, slot: true }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
@@ -275,6 +283,11 @@ export default {
|
|
|
return formatNumber(value)
|
|
|
},
|
|
|
|
|
|
+ // 新增:格式化日期时间显示,供子表“审批时间”列使用
|
|
|
+ formatDateTime(dateTime) {
|
|
|
+ return formatDateTimeUtil(dateTime)
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 查看详情
|
|
|
* @this {Vue & ForecastAuditComponent}
|
|
@@ -609,7 +622,20 @@ export default {
|
|
|
const subIdBigint = this.toBigIntSafe(subIdStr)
|
|
|
const fmIdStr = sub && sub.forecastMainId != null ? String(sub.forecastMainId) : idStr
|
|
|
const fmIdBigint = this.toBigIntSafe(fmIdStr)
|
|
|
- return { ...sub, id: subIdStr, forecastMainId: fmIdStr, idBigint: subIdBigint, forecastMainIdBigint: fmIdBigint }
|
|
|
+ return {
|
|
|
+ ...sub,
|
|
|
+ id: subIdStr,
|
|
|
+ forecastMainId: fmIdStr,
|
|
|
+ idBigint: subIdBigint,
|
|
|
+ forecastMainIdBigint: fmIdBigint,
|
|
|
+ // 继承父级字段,保证子表新增列有值可展示
|
|
|
+ approvalStatus: sub && sub.approvalStatus != null ? sub.approvalStatus : (rec && rec.approvalStatus != null ? rec.approvalStatus : APPROVAL_STATUS.PENDING),
|
|
|
+ customerName: sub && sub.customerName != null ? sub.customerName : rec && rec.customerName,
|
|
|
+ year: sub && sub.year != null ? sub.year : rec && rec.year,
|
|
|
+ month: sub && sub.month != null ? sub.month : rec && rec.month,
|
|
|
+ approvedName: sub && sub.approvedName != null ? sub.approvedName : rec && rec.approvedName,
|
|
|
+ approvedTime: sub && sub.approvedTime != null ? sub.approvedTime : rec && rec.approvedTime
|
|
|
+ }
|
|
|
})
|
|
|
: []
|
|
|
const approvalStatus = /** @type {import('@/constants/forecast').ApprovalStatus} */ (rec.approvalStatus ?? APPROVAL_STATUS.PENDING)
|