feat(wms/coil): 新增排产单展示功能,优化多页面布局与样式
1. 为分步加工弹窗添加全屏属性 2. 在typing、merge、stepSplit、split页面新增排产单列表与详情展示,支持多排产单切换 3. 重构split页面表单布局为双列样式,优化页面结构
This commit is contained in:
@@ -11,12 +11,17 @@
|
||||
</div>
|
||||
|
||||
<!-- 排产计划 -->
|
||||
<el-card class="plan-card" v-if="planDetailList.length > 0" style="margin-bottom: 20px;">
|
||||
<el-card class="plan-card" v-if="planSheetList.length > 0" style="margin-bottom: 20px;">
|
||||
<div slot="header" class="card-header">
|
||||
<span><i class="el-icon-s-order"></i> {{ currentLineName }}排产计划</span>
|
||||
</div>
|
||||
<el-tabs v-model="activePlanSheetId" type="card" size="mini">
|
||||
<el-tab-pane v-for="sheet in planSheetList" :key="sheet.planSheetId"
|
||||
:name="sheet.planSheetId"
|
||||
:label="sheet.planCode || ('排产单' + sheet.planSheetId)" />
|
||||
</el-tabs>
|
||||
<div style="overflow-x: auto;">
|
||||
<el-table :data="planDetailList" size="small" max-height="300" stripe border>
|
||||
<el-table :data="activePlanSheetDetails" size="small" max-height="300" stripe border>
|
||||
<el-table-column label="订单号" prop="orderCode" width="160" />
|
||||
<el-table-column label="合同号" prop="contractCode" width="160" />
|
||||
<el-table-column label="客户" prop="customerName" width="100" />
|
||||
@@ -503,8 +508,9 @@ export default {
|
||||
parsedCacheData: null,
|
||||
itemSelectorQueryParams: {},
|
||||
// 排产计划
|
||||
planDetailList: [],
|
||||
currentPlanSheet: null,
|
||||
planSheetList: [],
|
||||
planSheetDetailMap: {},
|
||||
activePlanSheetId: null,
|
||||
currentLineName: '',
|
||||
};
|
||||
},
|
||||
@@ -512,6 +518,9 @@ export default {
|
||||
l2HotCoilId() {
|
||||
return (this.currentInfo && this.currentInfo.enterCoilNo) || ''
|
||||
},
|
||||
activePlanSheetDetails() {
|
||||
return this.planSheetDetailMap[this.activePlanSheetId] || []
|
||||
},
|
||||
/** 是否双机架工序(actionType 504=正常 / 524=修复) */
|
||||
isDrAction() {
|
||||
return this.actionType === 504 || this.actionType === 524
|
||||
@@ -702,7 +711,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// 根据当前actionType加载对应产线的排产计划
|
||||
// 根据当前actionType加载对应产线的最近3个排产计划
|
||||
async loadPlanDetails() {
|
||||
const lineName = actionTypeToLineName[this.actionType]
|
||||
if (!lineName) return
|
||||
@@ -711,24 +720,33 @@ export default {
|
||||
const sheetRes = await listPlanSheet({
|
||||
lineName,
|
||||
pageNum: 1,
|
||||
pageSize: 1,
|
||||
pageSize: 3,
|
||||
})
|
||||
if (sheetRes.rows && sheetRes.rows.length > 0) {
|
||||
const planSheet = sheetRes.rows[0]
|
||||
this.currentPlanSheet = planSheet
|
||||
const detailRes = await listPlanDetail({
|
||||
planSheetId: planSheet.planSheetId,
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
})
|
||||
if (detailRes.rows) {
|
||||
this.planDetailList = detailRes.rows
|
||||
this.planSheetList = sheetRes.rows || []
|
||||
this.planSheetDetailMap = {}
|
||||
if (this.planSheetList.length > 0) {
|
||||
this.activePlanSheetId = this.planSheetList[0].planSheetId
|
||||
for (const sheet of this.planSheetList) {
|
||||
this.fetchPlanSheetDetail(sheet.planSheetId)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载排产计划失败', error)
|
||||
}
|
||||
},
|
||||
async fetchPlanSheetDetail(planSheetId) {
|
||||
try {
|
||||
const detailRes = await listPlanDetail({
|
||||
planSheetId,
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
})
|
||||
if (detailRes.rows) {
|
||||
const details = detailRes.rows.sort((a, b) => (parseInt(a.bizSeqNo) || 0) - (parseInt(b.bizSeqNo) || 0))
|
||||
this.$set(this.planSheetDetailMap, planSheetId, details)
|
||||
}
|
||||
} catch (e) { console.error('查询排产单明细失败', e) }
|
||||
},
|
||||
|
||||
// 复制当前信息到更新表单
|
||||
copyFromCurrent() {
|
||||
|
||||
Reference in New Issue
Block a user