feat: 重构BOM架构,新增基础设置与虚拟工位管理功能

本次重构删除原有BOM物料清单表,改用工单工艺组合×工艺物料清单作为唯一用料来源;新增系统基础设置表支持WMS地址、日志保留天数等配置,新增虚拟工位作业管理后台接口与前端页签控制功能,同时优化工位号校验逻辑、事件日志自动清理与工单用料查询能力。
This commit is contained in:
SunYF
2026-09-23 11:41:28 +08:00
parent d3eda6b588
commit f274da044c
74 changed files with 3637 additions and 5586 deletions
@@ -27,7 +27,7 @@
</div>
<div class="field">
<span class="lab">工位</span>
<span class="station-fixed">{{ fixedStation ? '工位 ' + fixedStation : '工位加载中…' }}</span>
<span class="station-fixed">{{ fixedStation != null ? '工位 ' + fixedStation : '工位加载中…' }}</span>
</div>
<el-button class="btn-login" type="primary" size="large" :loading="loading" @click="submit">
@@ -49,14 +49,16 @@ import { setAuth } from '../utils/request'
const router = useRouter()
const username = ref('')
const password = ref('')
const fixedStation = ref(0)
// null=未加载;0=上线位是合法工位,不能用 falsy 判断
const fixedStation = ref(null)
const loading = ref(false)
// 工位由服务端配置文件固定,一个工位一个终端,终端不允许修改工位
onMounted(async () => {
try {
const cfg = await getConfig()
if (cfg?.stationNo > 0) fixedStation.value = cfg.stationNo
// 0=上线位、13=下线位为合法虚拟工位,>=0 都算加载成功
if (typeof cfg?.stationNo === 'number' && cfg.stationNo >= 0) fixedStation.value = cfg.stationNo
} catch {
// 网络异常时保留 0,登录会提示配置未加载
}
@@ -67,7 +69,7 @@ async function submit() {
ElMessage.warning('请输入账号和密码')
return
}
if (!fixedStation.value) {
if (fixedStation.value == null) {
ElMessage.warning('工位配置未加载,请检查服务端配置文件后重启')
return
}