feat:多项功能优化
This commit is contained in:
@@ -145,6 +145,15 @@ async function loadDicts() {
|
||||
const zs = await request.get('/zone/picker')
|
||||
zones.value = Array.isArray(zs) ? zs : zs?.list || []
|
||||
}
|
||||
// 区域下拉选项:picker 每行是一个货位,同一区域会重复出现,按区域编码去重后只展示一条
|
||||
const zoneOptions = computed(() => {
|
||||
const map = new Map()
|
||||
zones.value.forEach(z => {
|
||||
if (!z.zoneCode) return
|
||||
if (!map.has(z.zoneCode)) map.set(z.zoneCode, { zoneCode: z.zoneCode, zoneName: z.zoneName || '' })
|
||||
})
|
||||
return [...map.values()]
|
||||
})
|
||||
|
||||
async function loadGenRows() {
|
||||
loadingGen.value = true
|
||||
@@ -166,7 +175,6 @@ async function submitGen() {
|
||||
}
|
||||
const payload = {
|
||||
materialCode: genForm.materialCode, operator,
|
||||
outboundType: 'general',
|
||||
outboundCategory: genForm.outboundCategory,
|
||||
ownershipType: genForm.ownershipType,
|
||||
ownershipNo: genForm.ownershipType !== 'none' ? genForm.ownershipNo.trim() : undefined,
|
||||
@@ -368,7 +376,7 @@ onMounted(loadDicts)
|
||||
|
||||
<el-form-item label="出库区域">
|
||||
<el-select v-model="genForm.zoneCode" filterable clearable placeholder="可选" style="width:100%">
|
||||
<el-option v-for="z in zones" :key="z.code" :value="z.code" :label="`${z.code} ${z.name || ''}`" />
|
||||
<el-option v-for="z in zoneOptions" :key="z.zoneCode" :value="z.zoneCode" :label="`${z.zoneCode} ${z.zoneName}`" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="箱号">
|
||||
|
||||
Reference in New Issue
Block a user