Compare commits
5 Commits
b614a7c8f5
...
1e2f4953b6
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e2f4953b6 | |||
| 643e538ffd | |||
| fe0071d046 | |||
| c57c84f142 | |||
| d0cac14a33 |
BIN
deploy.tar.gz
BIN
deploy.tar.gz
Binary file not shown.
0
deploy_code.sh
Normal file → Executable file
0
deploy_code.sh
Normal file → Executable file
@ -176,7 +176,7 @@ const handleLogout = () => {
|
||||
<footer v-if="!isLoginPage" class="app-footer">
|
||||
<span class="version-tag">
|
||||
<el-icon style="vertical-align: middle; margin-right: 4px"><InfoFilled /></el-icon>
|
||||
当前版本:V3.7(3.27盘库错误修改)
|
||||
当前版本:V3.8(4.2出库选单错误修改)
|
||||
</span>
|
||||
</footer>
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
<el-table
|
||||
v-else
|
||||
:data="selectedItems"
|
||||
:data="sortedSelectedItems"
|
||||
border
|
||||
style="width: 100%"
|
||||
row-key="uniqueKey"
|
||||
@ -340,6 +340,16 @@ const userStore = useUserStore()
|
||||
|
||||
// --- 状态变量 ---
|
||||
const selectedItems = ref<any[]>([])
|
||||
|
||||
// 按库位路径自然升序排序(优化拣货路径)
|
||||
const sortedSelectedItems = computed(() => {
|
||||
return [...selectedItems.value].sort((a, b) => {
|
||||
const locA = a.warehouse_location || ''
|
||||
const locB = b.warehouse_location || ''
|
||||
return locA.localeCompare(locB, 'zh', { numeric: true })
|
||||
})
|
||||
})
|
||||
|
||||
const manualDialogVisible = ref(false)
|
||||
const bomSelectVisible = ref(false)
|
||||
const previewVisible = ref(false)
|
||||
@ -452,7 +462,12 @@ const loadStockList = async () => {
|
||||
pageSize: stockPageSize.value,
|
||||
keyword: searchKeyword.value.trim()
|
||||
})
|
||||
stockList.value = res.data?.list || []
|
||||
// 为每个item添加uniqueKey和确保warehouse_location字段正确映射
|
||||
stockList.value = (res.data?.list || []).map((item: any) => ({
|
||||
...item,
|
||||
uniqueKey: `${item.type}_${item.id}`,
|
||||
warehouse_location: item.warehouse_location || item.warehouse_loc || item.full_path || ''
|
||||
}))
|
||||
stockTotal.value = res.data?.total || 0
|
||||
} catch (e) {
|
||||
ElMessage.error('加载库存列表失败')
|
||||
@ -480,7 +495,7 @@ const openManualSelect = async () => {
|
||||
...i,
|
||||
name: i.name || i.material_name || i.product_name || '未知名称',
|
||||
standard: i.standard || i.spec_model || '',
|
||||
warehouse_location: i.warehouse_location || (i.warehouse_loc) || '',
|
||||
warehouse_location: i.warehouse_location || i.warehouse_loc || i.full_path || '',
|
||||
uniqueKey: `${i.type}_${i.id}`,
|
||||
available_quantity: parseFloat(i.available_quantity) || 0,
|
||||
export_quantity: 1
|
||||
|
||||
Reference in New Issue
Block a user