feat: 全项目列表页操作列规范统一 + 问题.md 六条整改

- 操作列按6条标准统一(WMS 13页/MES 18页):fixed right、宽160超限折更多、一列一填充、危险操作link+二次确认置末、页面级新建移工具栏
- 修复MES物料档案启用报错:改走 POST /product-types/status 专用端点,不再被全字段必填校验拦截
- 附件归档清理由按年改为用户选月(精确到月,截止月最晚6个月前,默认当前月-6),前后端同步
- 序列号文案统一为「是=逐件录SN,否=按数量(不录SN)」,MES 下拉改单选框
- 入库货架/层/位置必填校验(InboundEntry 前端 + inbound.go 后端),杜绝有区域无货架的新脏数据
- 生产流程卡新增列表Tab(新接口 GET /process-card/list 分页),去掉筛选默认时间
- 清理遗留 assets_bak/public_bak 备份目录;更新 WMS/MES 前端构建产物(index.html)
This commit is contained in:
SunYF
2026-10-10 18:09:17 +08:00
parent f6a26256c5
commit 56d56648f9
224 changed files with 687 additions and 1874 deletions
+15 -11
View File
@@ -428,7 +428,7 @@ async function saveMaterial() {
}
// 序列号=是(按 SN 记账)必选(2026-09-30 解耦定稿):0=未选择不可保存
if (![1, 2].includes(Number(mForm.snMode))) {
ElMessage.warning('请选择是否有序列号(是=逐件录 SN / 否=按批次数量)')
ElMessage.warning('请选择序列号(是=逐件录SN / 否=按数量(不录SN))')
return
}
const okSave = await confirmAction(
@@ -488,7 +488,7 @@ function matTypeText(m) {
}
// 序列号显示(记账语境:1是(序列号=是)/2否(序列号=否)/0未选择)
function snModeText(v) {
return Number(v) === 1 ? '是' : Number(v) === 2 ? '否' : '未选择'
return Number(v) === 1 ? '逐件录SN' : Number(v) === 2 ? '按数量(不录SN)' : '未选择'
}
// 区域维护 / 物料档案共用同一组件:切换菜单时复用,watch(mode, immediate) 保证进入即加载
@@ -620,7 +620,7 @@ async function onMaterialFile(e) {
</el-table-column>
<el-table-column label="操作" width="90" align="center" fixed="right">
<template #default="{ row }">
<el-button v-if="can('zone:edit') && !row.isSynthetic" link type="primary" size="small" @click="openNodeEdit(row)">编辑</el-button>
<el-button v-if="can('zone:edit') && !row.isSynthetic" type="primary" size="small" @click="openNodeEdit(row)">编辑</el-button>
<span v-else-if="row.isSynthetic" class="synthetic-tag">虚拟</span>
</template>
</el-table-column>
@@ -674,7 +674,7 @@ async function onMaterialFile(e) {
<template #default="{ row }">{{ fmtTime(row.createdAt) }}</template>
</el-table-column>
<el-table-column label="操作" width="90" align="center" fixed="right">
<template #default="{ row }"><el-button v-if="can('zone:edit') && !row.isSynthetic" link type="primary" size="small" @click="openNodeEdit(row)">编辑</el-button><span v-else-if="row.isSynthetic" class="synthetic-tag">虚拟</span></template>
<template #default="{ row }"><el-button v-if="can('zone:edit') && !row.isSynthetic" type="primary" size="small" @click="openNodeEdit(row)">编辑</el-button><span v-else-if="row.isSynthetic" class="synthetic-tag">虚拟</span></template>
</el-table-column>
</el-table>
<div class="pager">
@@ -726,7 +726,7 @@ async function onMaterialFile(e) {
<el-table-column label="状态" width="80" align="center"><template #default="{ row }"><el-tag :type="row.status === '停用' ? 'info' : 'success'" size="small">{{ row.status || '启用' }}</el-tag></template></el-table-column>
<el-table-column label="备注" min-width="130" show-overflow-tooltip><template #default="{ row }">{{ row.description || '-' }}</template></el-table-column>
<el-table-column label="创建时间" width="155" align="center"><template #default="{ row }">{{ fmtTime(row.createdAt) }}</template></el-table-column>
<el-table-column label="操作" width="90" align="center" fixed="right"><template #default="{ row }"><el-button v-if="can('zone:edit')" link type="primary" size="small" @click="openNodeEdit(row)">编辑</el-button></template></el-table-column>
<el-table-column label="操作" width="90" align="center" fixed="right"><template #default="{ row }"><el-button v-if="can('zone:edit')" type="primary" size="small" @click="openNodeEdit(row)">编辑</el-button></template></el-table-column>
</el-table>
<div class="pager">
<el-pagination background layout="total, sizes, prev, pager, next" :total="nodeState[3].total"
@@ -783,7 +783,7 @@ async function onMaterialFile(e) {
<el-table-column label="状态" width="80" align="center"><template #default="{ row }"><el-tag :type="row.status === '停用' ? 'info' : 'success'" size="small">{{ row.status || '启用' }}</el-tag></template></el-table-column>
<el-table-column label="备注" min-width="120" show-overflow-tooltip><template #default="{ row }">{{ row.description || '-' }}</template></el-table-column>
<el-table-column label="创建时间" width="155" align="center"><template #default="{ row }">{{ fmtTime(row.createdAt) }}</template></el-table-column>
<el-table-column label="操作" width="90" align="center" fixed="right"><template #default="{ row }"><el-button v-if="can('zone:edit')" link type="primary" size="small" @click="openNodeEdit(row)">编辑</el-button></template></el-table-column>
<el-table-column label="操作" width="90" align="center" fixed="right"><template #default="{ row }"><el-button v-if="can('zone:edit')" type="primary" size="small" @click="openNodeEdit(row)">编辑</el-button></template></el-table-column>
</el-table>
<div class="pager">
<el-pagination background layout="total, sizes, prev, pager, next" :total="nodeState[4].total"
@@ -1002,7 +1002,7 @@ async function onMaterialFile(e) {
</el-tag>
</template>
</el-table-column>
<el-table-column label="序列号" width="90" align="center">
<el-table-column label="序列号" width="130" align="center">
<template #default="{ row }">
<el-tag :type="Number(row.snMode) === 1 ? 'warning' : 'success'" size="small">
{{ snModeText(row.snMode) }}
@@ -1018,11 +1018,15 @@ async function onMaterialFile(e) {
<el-table-column label="创建时间" width="155" align="center">
<template #default="{ row }">{{ fmtTime(row.createdAt) }}</template>
</el-table-column>
<el-table-column label="操作" width="150" align="center">
<el-table-column label="操作" width="150" align="center" fixed="right">
<template #default="{ row }">
<el-button v-if="can('material:edit')" link type="primary" size="small" @click="openMatEdit(row)">编辑</el-button>
<el-button link :type="row.isActive !== false ? 'warning' : 'success'" size="small" @click="toggleMatStatus(row)">{{ row.isActive !== false ? '停用' : '启用' }}</el-button>
<el-button v-if="can('material:edit')" type="primary" size="small" @click="openMatEdit(row)">编辑</el-button>
<el-button link type="success" size="small" @click="openMatAttach(row)">附件</el-button>
<el-popconfirm :title="row.isActive !== false ? '确认停用该物料?' : '确认启用该物料?'" @confirm="toggleMatStatus(row)">
<template #reference>
<el-button link :type="row.isActive !== false ? 'warning' : 'success'" size="small">{{ row.isActive !== false ? '停用' : '启用' }}</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
@@ -1068,7 +1072,7 @@ async function onMaterialFile(e) {
<el-radio :value="1">是</el-radio>
<el-radio :value="2">否</el-radio>
</el-radio-group>
<span style="color:#909399;font-size:12px;margin-left:8px">是否有序列号:是=逐件录 SN,否=按批次数量(不录SN);选类型时自动带默认,可手动更改,未选择不可出入库</span>
<span style="color:#909399;font-size:12px;margin-left:8px">是=逐件录SN,否=按数量(不录SN)</span>
</div>
</el-form-item>
<el-form-item label="安全库存" required>