feat: 完成产线MES系统全流程功能迭代与优化
本提交完成了多个核心模块的功能完善与业务对齐: 1. 工位终端:固定工位配置、移除自选工位逻辑、适配配置化工位号 2. MES核心:重构工位组合逻辑、新增工单/流程状态管理、补全报工/追溯逻辑 3. WMS客户端:新增修改密码功能、优化帮助弹窗逻辑 4. 文档与权限:补充完整操作手册、统一菜单名称与权限描述 5. 修复多业务校验:排产数量校验、工单状态校验、工位绑定规则
This commit is contained in:
@@ -27,16 +27,7 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<span class="lab">工位</span>
|
||||
<el-select
|
||||
v-if="!fixedStation"
|
||||
v-model="stationNo"
|
||||
size="large"
|
||||
class="station-el"
|
||||
placeholder="请选择工位"
|
||||
>
|
||||
<el-option v-for="n in 12" :key="n" :label="'工位 ' + n" :value="n" />
|
||||
</el-select>
|
||||
<span v-else class="station-fixed">工位 {{ fixedStation }}</span>
|
||||
<span class="station-fixed">{{ fixedStation ? '工位 ' + fixedStation : '工位加载中…' }}</span>
|
||||
</div>
|
||||
|
||||
<el-button class="btn-login" type="primary" size="large" :loading="loading" @click="submit">
|
||||
@@ -55,22 +46,20 @@ import { ElMessage } from 'element-plus'
|
||||
import { getConfig, login } from '../api'
|
||||
import { setAuth } from '../utils/request'
|
||||
|
||||
const STATION_KEY = 'ws_station_no'
|
||||
const router = useRouter()
|
||||
const username = ref('')
|
||||
const password = ref('')
|
||||
const stationNo = ref(null)
|
||||
const fixedStation = ref(0)
|
||||
const loading = ref(false)
|
||||
|
||||
// 工位由服务端配置文件固定(1~12),一个工位一个终端,终端不允许修改工位
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const cfg = await getConfig()
|
||||
if (cfg?.stationNo > 0) fixedStation.value = cfg.stationNo
|
||||
} catch {
|
||||
// 网络异常时忽略,工位仍可自选
|
||||
// 网络异常时保留 0,登录会提示配置未加载
|
||||
}
|
||||
stationNo.value = fixedStation.value || Number(localStorage.getItem(STATION_KEY)) || null
|
||||
})
|
||||
|
||||
async function submit() {
|
||||
@@ -78,9 +67,8 @@ async function submit() {
|
||||
ElMessage.warning('请输入账号和密码')
|
||||
return
|
||||
}
|
||||
const sn = fixedStation.value || stationNo.value
|
||||
if (!sn) {
|
||||
ElMessage.warning('请选择工位')
|
||||
if (!fixedStation.value) {
|
||||
ElMessage.warning('工位配置未加载,请检查服务端配置文件后重启')
|
||||
return
|
||||
}
|
||||
loading.value = true
|
||||
@@ -88,10 +76,9 @@ async function submit() {
|
||||
const data = await login({
|
||||
username: username.value,
|
||||
password: password.value,
|
||||
stationNo: sn
|
||||
stationNo: fixedStation.value
|
||||
})
|
||||
setAuth(data.accessToken, data.user)
|
||||
localStorage.setItem(STATION_KEY, String(sn))
|
||||
ElMessage.success('登录成功')
|
||||
router.push('/main')
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user