feat(wms/coil): 新增排产单展示功能,优化多页面布局与样式

1.  为分步加工弹窗添加全屏属性
2.  在typing、merge、stepSplit、split页面新增排产单列表与详情展示,支持多排产单切换
3.  重构split页面表单布局为双列样式,优化页面结构
This commit is contained in:
2026-05-28 17:43:04 +08:00
parent 8e6ae90690
commit 1f4dcea63a
5 changed files with 534 additions and 216 deletions

View File

@@ -88,7 +88,7 @@
</el-table-column>
</el-table>
<el-descriptions :column="1" border title="镀锌二级数据"
<!-- <el-descriptions :column="1" border title="镀锌二级数据"
v-if="actionType == 501 && showSplitForm"></el-descriptions>
<el-table v-if="actionType == 501 && showSplitForm" v-loading="zincLoading" :data="zincList" border stripe
@row-click="handleZincItemClick" highlight-current-row>
@@ -97,7 +97,51 @@
<el-table-column prop="createTime" label="生产开始时间" />
<el-table-column prop="endTime" label="生产结束时间" />
<el-table-column prop="shiftNo" label="班组" />
</el-table>
</el-table> -->
<!-- 今日排产单 -->
<div v-if="planSheetList.length > 0" class="plan-sheet-section">
<el-descriptions :column="1" border :title="'最近排产单(' + planSheetLineName + ''">
</el-descriptions>
<el-tabs v-model="activePlanSheetId" type="card">
<el-tab-pane v-for="sheet in planSheetList" :key="sheet.planSheetId"
:name="sheet.planSheetId"
:label="sheet.planCode || ('排产单' + sheet.planSheetId)" />
</el-tabs>
<el-table v-loading="planSheetLoading" :data="activePlanSheetDetails" border stripe size="mini"
max-height="400">
<el-table-column type="index" label="序号" width="50" />
<el-table-column label="订单信息" header-align="center">
<el-table-column prop="contractCode" label="合同号" width="140" show-overflow-tooltip />
<el-table-column prop="customerName" label="客户" width="120" show-overflow-tooltip />
<el-table-column prop="salesman" label="业务员" width="100" show-overflow-tooltip />
</el-table-column>
<el-table-column label="成品信息" header-align="center">
<el-table-column prop="productName" label="成品名称" width="140" show-overflow-tooltip />
<el-table-column prop="productMaterial" label="材质" width="100" />
<el-table-column prop="coatingG" label="镀层g" width="80" />
<el-table-column prop="productWidth" label="成品宽度" width="100" />
<el-table-column prop="rollingThick" label="轧制厚度" width="100" />
<el-table-column prop="markCoatThick" label="标丝厚度" width="100" />
<el-table-column prop="tonSteelLengthRange" label="长度区间(m)" width="120" />
<el-table-column prop="planQty" label="数量" width="80" />
<el-table-column prop="planWeight" label="重量" width="100" />
<el-table-column prop="surfaceTreatment" label="表面处理" width="110" show-overflow-tooltip />
<el-table-column prop="widthReq" label="切边要求" width="110" show-overflow-tooltip />
<el-table-column prop="productPackaging" label="包装要求" width="100" show-overflow-tooltip />
<el-table-column prop="productEdgeReq" label="宽度要求" width="100" show-overflow-tooltip />
<el-table-column prop="usageReq" label="用途" width="100" show-overflow-tooltip />
</el-table-column>
<el-table-column prop="remark" label="备注" width="140" show-overflow-tooltip />
</el-table>
</div>
<!-- 今日排产单空状态 -->
<div v-if="planSheetList.length === 0 && planSheetLineName && !planSheetLoading" class="plan-sheet-section">
<el-descriptions :column="1" border :title="'最近排产单(' + planSheetLineName + ''">
</el-descriptions>
<el-empty description="今天暂无排产单" :image-size="80" />
</div>
</div>
</el-col>
@@ -318,6 +362,8 @@ import { getMaterialCoil, listMaterialCoil, createSpecialChild, completeSpecialS
import { completeAction, getPendingAction, updatePendingAction } from '@/api/wms/pendingAction'
import { saveCoilCache, getCoilCacheByCoilId, delCoilCache } from '@/api/wms/coilCache'
import { getGalvanize1TypingPrefill } from '@/api/pocket/acidTyping';
import { listPlanSheet } from '@/api/aps/planSheet'
import { listPlanDetail } from '@/api/aps/planDetail'
import ProductSelect from "@/components/KLPService/ProductSelect";
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
@@ -454,6 +500,11 @@ export default {
parsedCacheData: null,
// 最早的热轧卷板材质
firstHeatMaterial: '',
// 排产单相关
planSheetList: [],
planSheetDetailMap: {},
planSheetLoading: false,
activePlanSheetId: null,
}
},
computed: {
@@ -461,6 +512,39 @@ export default {
getItemLabel() {
return this.splitForm.itemType === 'product' ? '成品' : this.splitForm.itemType === 'raw_material' ? '原料' : '材料项'
},
// actionType → 产线名称映射
planSheetLineName() {
const mapping = {
11: '酸轧线',
200: '酸轧线',
520: '酸轧线',
206: '镀锌线',
501: '镀锌线',
521: '镀锌线',
203: '脱脂线',
502: '脱脂线',
522: '脱脂线',
204: '拉矫线',
503: '拉矫线',
523: '拉矫线',
205: '双机架',
504: '双机架',
524: '双机架',
505: '镀铬线',
525: '镀铬线',
}
return mapping[this.actionType] || ''
},
todayDateStr() {
const d = new Date()
const y = d.getFullYear()
const m = String(d.getMonth() + 1).padStart(2, '0')
const day = String(d.getDate()).padStart(2, '0')
return `${y}-${m}-${day}`
},
activePlanSheetDetails() {
return this.planSheetDetailMap[this.activePlanSheetId] || []
},
},
watch: {
coilId: {
@@ -490,10 +574,57 @@ export default {
// 获取镀锌线二级系统数据
this.getZincList()
}
if (this.planSheetLineName) {
this.fetchPlanSheets()
}
}
}
},
methods: {
// 查询最近排产单及明细
async fetchPlanSheets() {
if (!this.planSheetLineName) return
this.planSheetLoading = true
try {
const res = await listPlanSheet({
lineName: this.planSheetLineName,
pageSize: 3,
pageNum: 1,
})
this.planSheetList = res.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 (e) {
console.error('查询排产单失败', e)
} finally {
this.planSheetLoading = false
}
},
async fetchPlanSheetDetail(planSheetId) {
try {
const res = await listPlanDetail({
planSheetId,
pageSize: 100,
pageNum: 1,
})
const details = res.rows || []
details.sort((a, b) => {
const na = parseInt(a.bizSeqNo) || 0
const nb = parseInt(b.bizSeqNo) || 0
return na - nb
})
this.$set(this.planSheetDetailMap, planSheetId, details)
} catch (e) {
console.error('查询排产单明细失败', e)
}
},
// 查询待分条的钢卷信息
async getCoilInfo() {
try {
@@ -1102,4 +1233,8 @@ export default {
transform: translateY(-2px);
}
}
.plan-sheet-section {
margin-top: 16px;
}
</style>