feat&refactor: 2026-09-22 半成品业务模型重构与功能完善

- 重构半成品流转逻辑:进度权威源改为 workpiece.currentStationNo,新增 completedText 快照字段,废除 doneProcessCodes
- 清理物料品类中半成品类型,存量数据幂等清理,调整物料管理方式文案为批次/序列号
- 新增日排产状态专用更新接口,修复工单工艺校验逻辑
- 新增物料档案代理接口、深路径文件下载接口
- 优化前端界面文案与工位选择逻辑,补充追溯页半成品流转展示
- 调整WMS端物料品类校验与入库接口契约
- 新增/更新数据库表结构与实体类代码
This commit is contained in:
SunYF
2026-09-22 14:42:52 +08:00
parent 09cfc6ca1c
commit d3eda6b588
49 changed files with 1155 additions and 1122 deletions
+11 -9
View File
@@ -134,7 +134,7 @@
执行路线:{{ routeText }}
<span class="combo-route-tip">(执行顺序=工位号升序,可跳过未选工位)</span>
</div>
<div class="combo-tip">默认每个已绑定工艺的工位全选;至少选一道工艺;全不选某工艺则该工艺不进入组合。</div>
<div class="combo-tip">仅显示已绑定启用工位的工艺;默认每个工艺的启用工位全选,至少选一道工艺;全不选某工艺则该工艺不进入组合。</div>
</div>
</el-form-item>
</el-form>
@@ -246,16 +246,13 @@ const flowGroups = computed(() => {
flows.value.forEach((f) => {
if (map.has(f.id) && f.name) map.get(f.id).flowName = f.name
})
const arr = Array.from(map.values())
arr.sort((a, b) => {
if (a.flowId === 0) return 1
if (b.flowId === 0) return -1
return (a.flowName || '').localeCompare(b.flowName || '', 'zh')
})
// 只显示「至少绑定了一个启用工位」的工艺;未绑定工位、或绑定的工位全部停用的工艺整组隐藏
const arr = Array.from(map.values()).filter((g) => g.flowId > 0 && g.stations.some((s) => s.isActive))
arr.sort((a, b) => (a.flowName || '').localeCompare(b.flowName || '', 'zh'))
return arr.map((g) => ({
key: g.flowId,
flowId: g.flowId,
title: g.flowId ? (g.flowName || `工艺${g.flowId}`) : '未绑定工艺',
title: g.flowName || `工艺${g.flowId}`,
stations: [...g.stations].sort((a, b) => (a.stationNo || 0) - (b.stationNo || 0))
}))
})
@@ -272,7 +269,12 @@ const routeText = computed(() => flowCombination.value.map((c) => c.stationNo).j
const hasCombination = (row) => Array.isArray(row.flowCombination) && row.flowCombination.length > 0
function defaultSelStations() {
return stations.value.filter((s) => s.flowId > 0).map((s) => s.stationNo).sort((a, b) => a - b)
// 默认全选「可见工艺组」内的启用工位(被隐藏工艺组下的工位不参与组合)
const visible = new Set(flowGroups.value.map((g) => g.flowId))
return stations.value
.filter((s) => s.flowId > 0 && visible.has(s.flowId) && s.isActive)
.map((s) => s.stationNo)
.sort((a, b) => a - b)
}
async function loadComboData() {