refactor: 重构工艺工序相关命名与数据模型
1. 全局替换"工序"为"工艺"统一术语,包括页面文案、枚举、注释
2. 重构工单与工件工艺数据模型:
- 新增工艺组合表flow_material作为备料/齐套唯一源头
- 新增工位状态表station_state支持自主停单/恢复接单
- 移除station_process派工表,改用工单工艺组合作为路线唯一源头
- 替换processCode为flowId作为工艺关联标识
- 重构工件当前进度字段为currentStationNo
3. 删除冗余的静态备份资源文件
4. 调整物料选择组件默认启用仅显示激活物料
5. 优化工单创建/编辑逻辑,新增工艺组合校验与保存
This commit is contained in:
@@ -301,7 +301,7 @@ const mEditingId = ref(0)
|
||||
const mForm = reactive({
|
||||
code: '', name: '', spec: '', unit: '',
|
||||
manageMode: 1, templateCode: '', description: '',
|
||||
itemType: 1, safetyStock: 0
|
||||
itemType: 1, safetyStock: 0, isActive: true
|
||||
})
|
||||
const mSaving = ref(false)
|
||||
|
||||
@@ -338,7 +338,7 @@ function resetMForm() {
|
||||
Object.assign(mForm, {
|
||||
code: '', name: '', spec: '', unit: '',
|
||||
manageMode: 1, templateCode: '', description: '',
|
||||
itemType: 1, safetyStock: 0
|
||||
itemType: 1, safetyStock: 0, isActive: true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -355,7 +355,8 @@ function openMatEdit(row) {
|
||||
templateCode: row.templateCode || '',
|
||||
itemType: row.itemType || 1,
|
||||
safetyStock: row.safetyStock || 0,
|
||||
description: row.description || ''
|
||||
description: row.description || '',
|
||||
isActive: row.isActive !== false
|
||||
})
|
||||
matDialog.value = true
|
||||
}
|
||||
@@ -402,7 +403,8 @@ async function saveMaterial() {
|
||||
description: mForm.description,
|
||||
itemType: Number(mForm.itemType),
|
||||
manageMode,
|
||||
safetyStock: Number(mForm.safetyStock) || 0
|
||||
safetyStock: Number(mForm.safetyStock) || 0,
|
||||
isActive: !!mForm.isActive
|
||||
}
|
||||
if (mEditingId.value) {
|
||||
await request.post('/material/update', { id: mEditingId.value, ...base })
|
||||
@@ -922,6 +924,9 @@ async function onMaterialFile(e) {
|
||||
<el-table-column label="安全库存" width="100" align="center">
|
||||
<template #default="{ row }">{{ row.safetyStock || 0 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="启用" width="80" align="center">
|
||||
<template #default="{ row }"><el-tag :type="row.isActive !== false ? 'success' : 'info'" size="small">{{ row.isActive !== false ? '启用' : '停用' }}</el-tag></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" width="155" align="center">
|
||||
<template #default="{ row }">{{ fmtTime(row.createdAt) }}</template>
|
||||
</el-table-column>
|
||||
@@ -976,6 +981,10 @@ async function onMaterialFile(e) {
|
||||
<el-form-item label="说明">
|
||||
<el-input v-model="mForm.description" type="textarea" :rows="2" placeholder="备注(可空)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="启用">
|
||||
<el-switch v-model="mForm.isActive" />
|
||||
<span style="color:#909399;font-size:12px;margin-left:8px">停用后不在新建入库 / 备料下拉出现</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<AttachmentPanel v-if="mEditingId" biz-type="material" :biz-id="mForm.code" title="附件(零件图纸 / 资料)" />
|
||||
<template #footer>
|
||||
|
||||
Reference in New Issue
Block a user