feat(wms/coil): 新增排产单展示功能,优化多页面布局与样式
1. 为分步加工弹窗添加全屏属性 2. 在typing、merge、stepSplit、split页面新增排产单列表与详情展示,支持多排产单切换 3. 重构split页面表单布局为双列样式,优化页面结构
This commit is contained in:
@@ -89,6 +89,40 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 今日排产单 -->
|
||||
<div v-if="planSheetList.length > 0" class="plan-sheet-section">
|
||||
<el-descriptions :column="1" border :title="'最近排产单(' + planSheetLineName + ')'" size="small" />
|
||||
<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>
|
||||
<el-table v-loading="planSheetLoading" :data="activePlanSheetDetails" border stripe size="mini" max-height="300">
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="bizSeqNo" label="序号" width="55" />
|
||||
<el-table-column label="订单信息">
|
||||
<el-table-column prop="orderCode" label="订单号" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="contractCode" label="合同号" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="customerName" label="客户" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="salesman" label="业务员" width="80" show-overflow-tooltip />
|
||||
</el-table-column>
|
||||
<el-table-column label="成品信息">
|
||||
<el-table-column prop="productName" label="成品名称" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="productMaterial" label="材质" width="80" />
|
||||
<el-table-column prop="coatingG" label="镀层g" width="70" />
|
||||
<el-table-column prop="productWidth" label="宽度" width="80" />
|
||||
<el-table-column prop="rollingThick" label="轧厚" width="80" />
|
||||
<el-table-column prop="planQty" label="数量" width="65" />
|
||||
<el-table-column prop="planWeight" label="重量" width="80" />
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="100" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-else-if="planSheetLineName && !planSheetLoading" class="plan-sheet-section">
|
||||
<el-descriptions :column="1" border :title="'最近排产单(' + planSheetLineName + ')'" size="small" />
|
||||
<el-empty description="今天暂无排产单" :image-size="60" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧:目标卷信息 -->
|
||||
@@ -300,6 +334,8 @@
|
||||
<script>
|
||||
import { getMaterialCoil, mergeMaterialCoil } from '@/api/wms/coil';
|
||||
import { listPendingAction, getPendingAction } from '@/api/wms/pendingAction';
|
||||
import { listPlanSheet } from '@/api/aps/planSheet'
|
||||
import { listPlanDetail } from '@/api/aps/planDetail'
|
||||
import CoilSelector from '@/components/CoilSelector';
|
||||
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
||||
import RawMaterialSelector from "@/components/KLPService/RawMaterialSelect";
|
||||
@@ -413,7 +449,12 @@ export default {
|
||||
defectCode: null,
|
||||
degree: null,
|
||||
remark: null
|
||||
}
|
||||
},
|
||||
// 排产单相关
|
||||
planSheetList: [],
|
||||
planSheetDetailMap: {},
|
||||
planSheetLoading: false,
|
||||
activePlanSheetId: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -441,7 +482,25 @@ export default {
|
||||
return this.pendingMergeList.filter(pending => !this.sourceCoils.some(source => source.enterCoilNo === pending.enterCoilNo))
|
||||
}
|
||||
return [];
|
||||
}
|
||||
},
|
||||
planSheetLineName() {
|
||||
const mapping = {
|
||||
11: '酸轧线', 200: '酸轧线', 520: '酸轧线',
|
||||
501: '镀锌线', 521: '镀锌线',
|
||||
203: '脱脂线', 502: '脱脂线', 522: '脱脂线',
|
||||
204: '拉矫线', 503: '拉矫线', 523: '拉矫线',
|
||||
205: '双机架', 504: '双机架', 524: '双机架',
|
||||
505: '镀铬线', 525: '镀铬线',
|
||||
}
|
||||
return mapping[parseInt(this.actionTypeCode)] || ''
|
||||
},
|
||||
todayDateStr() {
|
||||
const d = new Date()
|
||||
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`
|
||||
},
|
||||
activePlanSheetDetails() {
|
||||
return this.planSheetDetailMap[this.activePlanSheetId] || []
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 不再需要watch,直接用@change事件处理
|
||||
@@ -471,6 +530,7 @@ export default {
|
||||
// 保存当前页面的待操作类型
|
||||
if (actionTypeCode) {
|
||||
this.actionTypeCode = actionTypeCode;
|
||||
this.fetchPlanSheets();
|
||||
}
|
||||
|
||||
// 设置只读模式
|
||||
@@ -867,6 +927,33 @@ export default {
|
||||
this.$router.back();
|
||||
},
|
||||
|
||||
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 || []).sort((a, b) => (parseInt(a.bizSeqNo) || 0) - (parseInt(b.bizSeqNo) || 0))
|
||||
this.$set(this.planSheetDetailMap, planSheetId, details)
|
||||
} catch (e) { console.error('查询排产单明细失败', e) }
|
||||
},
|
||||
|
||||
// 新增异常
|
||||
addAbnormal() {
|
||||
this.currentAbnormalIndex = -1;
|
||||
@@ -1439,4 +1526,8 @@ export default {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
|
||||
.plan-sheet-section {
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user