feat: 完成客户第12条需求+多系统改造
1. 新增预警表添加工单号字段,支持按工单号检索预警 2. 添加工单过滤在制品/绩效报表/预警中心查询 3. 补全WMS台账字段口径与权限配置 4. 修复备料单与数量不符处理流程 5. 新增配送进度/库位联动/自动出库功能 6. 修复AGV配送状态更新逻辑 7. 优化退料与库存管理细节
This commit is contained in:
@@ -4,12 +4,32 @@
|
||||
<el-form-item label="工件SN">
|
||||
<el-input v-model="sn" style="width:220px" placeholder="输入SN查询追溯" @keyup.enter="search" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工单号">
|
||||
<el-input v-model="orderNo" style="width:200px" placeholder="按工单号列出工件(模糊)" @keyup.enter="searchByOrder" />
|
||||
</el-form-item>
|
||||
<el-form-item><el-button type="primary" @click="search">追溯查询</el-button></el-form-item>
|
||||
<el-form-item><el-button @click="searchByOrder">按工单查询</el-button></el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="warning" :disabled="!sn" @click="printCard">打印流程卡</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-card v-if="orderRows.length" shadow="never" style="margin-bottom:12px">
|
||||
<template #header>工单「{{ orderNo }}」下的工件共 {{ orderRows.length }} 件(点「追溯」查看单个工件)</template>
|
||||
<el-table :data="orderRows" border size="small" max-height="240">
|
||||
<el-table-column prop="sn" label="工件SN" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column label="状态" width="100" align="center">
|
||||
<template #default="{ row }">{{ statusText(row.status) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="currentProcess" label="当前工位" width="100" align="center" />
|
||||
<el-table-column label="操作" width="90" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" size="small" @click="pickSn(row.sn)">追溯</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-alert v-if="error" :title="error" type="error" show-icon closable style="margin-bottom:10px" />
|
||||
|
||||
<template v-if="data">
|
||||
@@ -101,16 +121,37 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import request from '../utils/request'
|
||||
import { openPrintableHtml } from '../utils/print'
|
||||
import PageHelp from '../components/PageHelp.vue'
|
||||
import { helpTrace } from '../help'
|
||||
|
||||
const sn = ref('')
|
||||
const orderNo = ref('')
|
||||
const orderRows = ref([])
|
||||
const data = ref(null)
|
||||
const error = ref('')
|
||||
|
||||
// 按工单号列出该工单下的全部工件,点击行内「追溯」查看单个工件生命周期(客户第12条:记录查看加工单号查询)
|
||||
async function searchByOrder() {
|
||||
const no = orderNo.value.trim()
|
||||
if (!no) {
|
||||
ElMessage.warning('请输入工单号')
|
||||
return
|
||||
}
|
||||
try {
|
||||
orderRows.value = (await request.get('/workpieces', { params: { orderNo: no } })) || []
|
||||
if (!orderRows.value.length) ElMessage.info('该工单下暂无工件')
|
||||
} catch {
|
||||
orderRows.value = []
|
||||
}
|
||||
}
|
||||
function pickSn(v) {
|
||||
sn.value = v
|
||||
search()
|
||||
}
|
||||
|
||||
async function search() {
|
||||
if (!sn.value) return
|
||||
error.value = ''
|
||||
|
||||
Reference in New Issue
Block a user