docs: 统一修正全项目“SN管理”相关术语为“序列号”
本次 commit 统一修正了全项目范围内关于 SN 管理的术语表述,将原“SN管理”、“序列号件”、“批次件”等表述调整为“序列号”、“序列号=是”、“序列号=否”,同时同步更新了相关文档、代码注释、前端提示文本、数据库 schema 注释、API 文档等,确保全链路术语统一,消除理解歧义。
This commit is contained in:
@@ -128,7 +128,7 @@ const zones = ref([])
|
||||
// 目标工位下拉(需求20:来自 MES 工位列表,不允许手输);可用批次下拉(问题18:批次不手输,从该物料在库批次中选)
|
||||
const stationOptions = ref([])
|
||||
const batchOptions = ref([])
|
||||
// 选中物料的展示类型(问题18:类型含「其他」):other=其他品类(按批次管理)/sn=电气件/batch=结构件
|
||||
// 选中物料的展示类型(问题18):sn=序列号=是(逐件录SN)/batch=序列号=否(按批次数量)
|
||||
const pickedType = ref('')
|
||||
const genForm = reactive({
|
||||
outboundNo: '',
|
||||
@@ -141,10 +141,6 @@ const genForm = reactive({
|
||||
const snInput = ref('')
|
||||
const snList = ref([])
|
||||
const savingGen = ref(false)
|
||||
const genRows = ref([])
|
||||
const loadingGen = ref(false)
|
||||
const genPage = reactive({ current: 1, size: 10 })
|
||||
const genTotal = ref(0)
|
||||
|
||||
const SN_SEP = /[,,;;、\s]+/
|
||||
function addSnLines() {
|
||||
@@ -187,7 +183,7 @@ async function loadBatchOptions(code) {
|
||||
if (batchOptions.value.length && !genForm.batchNo) genForm.batchNo = batchOptions.value[0].batchNo
|
||||
} catch { batchOptions.value = [] }
|
||||
}
|
||||
// 物料选中(问题18:出库记账方式由物料档案 sn_mode 自动判定,杜绝客户手选;2026-09-30 类型与SN行为解耦)
|
||||
// 物料选中(问题18:出库记账由物料档案 sn_mode 自动判定,杜绝客户手选;2026-09-30 类型与SN行为解耦)
|
||||
function onMaterialPick(m) {
|
||||
genForm.mode = m && m.snMode === 1 ? 2 : 1
|
||||
pickedType.value = m ? (m.snMode === 1 ? 'sn' : 'batch') : ''
|
||||
@@ -280,15 +276,6 @@ async function fillZoneFromHistory() {
|
||||
}
|
||||
watch(() => genForm.batchNo, (v) => { if (v && genForm.materialCode) fillZoneFromHistory() })
|
||||
|
||||
async function loadGenRows() {
|
||||
loadingGen.value = true
|
||||
try {
|
||||
const data = await request.get('/outbound/query', { params: { outboundType: 'general', page: genPage.current, pageSize: genPage.size } })
|
||||
genRows.value = (data?.list || []).map(r => ({ ...r, snCodes: (r.details || []).map(d => d.snCode).filter(Boolean).join(',') }))
|
||||
genTotal.value = data?.total || 0
|
||||
} finally { loadingGen.value = false }
|
||||
}
|
||||
|
||||
async function submitGen() {
|
||||
if (!genForm.materialCode) { ElMessage.warning('请选择物料'); return }
|
||||
if (!genForm.outboundCategory) { ElMessage.warning('请选择出库类别'); return }
|
||||
@@ -302,7 +289,7 @@ async function submitGen() {
|
||||
outboundNo: genForm.outboundNo.trim() || undefined,
|
||||
materialCode: genForm.materialCode, operator,
|
||||
outboundCategory: genForm.outboundCategory,
|
||||
batchNo: batchVal,
|
||||
batchNo: undefined,
|
||||
ownershipType: genForm.ownershipType,
|
||||
ownershipNo: genForm.ownershipNo.trim() || undefined,
|
||||
targetStation: genForm.targetStation.trim() || undefined,
|
||||
@@ -336,8 +323,6 @@ async function submitGen() {
|
||||
snList.value = []
|
||||
batchOptions.value = []
|
||||
pickedType.value = ''
|
||||
genPage.current = 1
|
||||
await loadGenRows()
|
||||
if (activeTab.value === 'records') await loadRecords()
|
||||
} finally { savingGen.value = false }
|
||||
}
|
||||
@@ -402,7 +387,7 @@ function downloadCSV() {
|
||||
}
|
||||
|
||||
function onTabChange(tab) {
|
||||
if (tab === 'general') { loadDicts(); loadGenRows() }
|
||||
if (tab === 'general') { loadDicts() }
|
||||
else if (tab === 'records') { loadDicts(); loadRecords() }
|
||||
}
|
||||
|
||||
@@ -479,16 +464,20 @@ onMounted(loadDicts)
|
||||
<el-card shadow="never" class="mb12" header="通用出库(不依赖工单:退料 / 样品 / 报废 / 发货)">
|
||||
<el-form label-width="96px" style="max-width:880px">
|
||||
<el-form-item label="物料" required>
|
||||
<MaterialSelect v-model="genForm.materialCode" placeholder="选择物料(编码/图号/类型/品类)" @item-change="onMaterialPick" />
|
||||
<MaterialSelect v-model="genForm.materialCode" placeholder="选择物料(编码/图号/类型/物料类别)" @item-change="onMaterialPick" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出库类型">
|
||||
<el-form-item label="出库方式">
|
||||
<el-tag size="small" type="warning">通用</el-tag>
|
||||
<span style="color:#909399;font-size:12px;margin-left:8px">不挂靠工单的自由出库(备料/补料/通用 三类之一)</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="序列号">
|
||||
<template v-if="genForm.materialCode">
|
||||
<el-tag size="small" :type="pickedType === 'sn' ? 'warning' : 'info'">
|
||||
{{ pickedType === 'sn' ? '序列号件' : '批次件' }}
|
||||
{{ pickedType === 'sn' ? '序列号=是' : '序列号=否' }}
|
||||
</el-tag>
|
||||
<span style="color:#909399;font-size:12px;margin-left:8px">类型由所选物料档案自动判定,无需手选</span>
|
||||
<span style="color:#909399;font-size:12px;margin-left:8px">由所选物料档案自动判定,无需手选</span>
|
||||
</template>
|
||||
<span v-else style="color:#909399;font-size:12px">请先选择物料,系统自动带出记账方式(序列号件/批次件)</span>
|
||||
<span v-else style="color:#909399;font-size:12px">请先选择物料,系统自动带出(序列号=是 / 序列号=否)</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="出库单号">
|
||||
@@ -585,56 +574,15 @@ onMounted(loadDicts)
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" header="通用出库记录">
|
||||
<el-table :data="genRows" border size="small" v-loading="loadingGen" empty-text="暂无通用出库记录">
|
||||
<el-table-column prop="outboundNo" label="出库单号" min-width="150" />
|
||||
<el-table-column label="出库类别" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="small" type="info">{{ categoryLabel(row.outboundCategory) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="materialCode" label="物料" min-width="130" />
|
||||
<el-table-column prop="batchNo" label="批次号" min-width="120">
|
||||
<template #default="{ row }">{{ row.batchNo || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库位" min-width="120" align="center">
|
||||
<template #default="{ row }">{{ row.zoneCode ? row.zoneCode + ' ' + locText(row) : '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="SN" min-width="180">
|
||||
<template #default="{ row }">{{ row.snCodes || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="quantity" label="数量" width="80" align="center" />
|
||||
<el-table-column label="归属" min-width="130">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.ownershipType === 'workorder'">合同号 {{ row.ownershipNo || '' }}</span>
|
||||
<span v-else-if="row.ownershipType === 'project'">科技项目号 {{ row.ownershipNo || '' }}</span>
|
||||
<span v-else-if="row.ownershipType === 'other'">其他 {{ row.ownershipNo || '' }}</span>
|
||||
<span v-else>其他</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品工号" min-width="110" align="center">
|
||||
<template #default="{ row }">{{ row.productWorkNo || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="targetStation" label="目标工位" width="100" align="center">
|
||||
<template #default="{ row }">{{ row.targetStation || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boxNo" label="箱号" min-width="120">
|
||||
<template #default="{ row }">{{ row.boxNo || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="inspectionNo" label="检测单号" min-width="160">
|
||||
<template #default="{ row }">{{ row.inspectionNo || '-' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operator" label="操作人" width="100" align="center" />
|
||||
<el-table-column label="时间" width="150" align="center">
|
||||
<template #default="{ row }">{{ fmtTime(row.createdAt) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pager">
|
||||
<el-pagination background layout="total, sizes, prev, pager, next" :total="genTotal"
|
||||
:current-page="genPage.current" :page-size="genPage.size" :page-sizes="[10, 20, 50, 100]"
|
||||
@current-change="(p) => { genPage.current = p; loadGenRows() }"
|
||||
@size-change="(s) => { genPage.size = s; genPage.current = 1; loadGenRows() }" />
|
||||
</div>
|
||||
<el-card shadow="never">
|
||||
<el-alert type="info" :closable="false" show-icon>
|
||||
<template #title>
|
||||
<div style="font-size:12px;line-height:1.7">
|
||||
通用出库的录入与记录已分离(全项目统一风格):本页仅做「录入」,<b>通用出库记录</b>请到下方「出库记录」页签查看——
|
||||
切换后选「类型 = 通用出库」即可看到全部通用出库,并支持筛选与导出。
|
||||
</div>
|
||||
</template>
|
||||
</el-alert>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -642,7 +590,7 @@ onMounted(loadDicts)
|
||||
<el-tab-pane label="出库记录" name="records">
|
||||
<el-card shadow="never" class="mb12">
|
||||
<el-form inline label-width="80px" @submit.prevent>
|
||||
<el-form-item label="类型">
|
||||
<el-form-item label="出库方式">
|
||||
<el-select v-model="recFilters.outboundType" clearable placeholder="全部" style="width:140px">
|
||||
<el-option label="备料出库" value="workorder" />
|
||||
<el-option label="工位补料" value="refill" />
|
||||
|
||||
Reference in New Issue
Block a user