优化
This commit is contained in:
@@ -17,7 +17,7 @@ import OrderReferenceText from '../components/OrderReferenceText.vue'
|
||||
import { useAccessPreviewStore } from '@/core/access/accessPreview'
|
||||
import { overseasWarehousePermissions as permission } from '../permissions'
|
||||
import { toLastMileOrderListItem } from '../lastMilePresentation'
|
||||
import { groupPendingOrdersByContainer, type LastMileContainerPlanRow } from '../lastMileContainerPlanning'
|
||||
import type { LastMileContainerPlanRow } from '../lastMileContainerPlanning'
|
||||
import type { LastMileOrderListItem } from '../types'
|
||||
|
||||
const rows = ref<LastMileOrderListItem[]>([])
|
||||
@@ -29,6 +29,7 @@ const page = ref(1)
|
||||
const pageSize = ref(10)
|
||||
const total = ref(0)
|
||||
const selectedRows = ref<LastMileOrderListItem[]>([])
|
||||
const containerRows = ref<LastMileContainerPlanRow[]>([])
|
||||
const actionLoading = ref(false)
|
||||
const actionError = ref<ApiErrorDetails | null>(null)
|
||||
const transferOpen = ref(false)
|
||||
@@ -106,12 +107,19 @@ const containerColumns: DataTableColumn[] = [
|
||||
{ key: 'eligibility', prop: 'eligibility', label: '资格', minWidth: 160, slotName: 'eligibility' },
|
||||
{ key: 'planNotice', prop: 'planNotice', label: '生成说明', minWidth: 320 },
|
||||
]
|
||||
const containerRows = computed(() => groupPendingOrdersByContainer(rows.value))
|
||||
|
||||
async function load(model: QueryModel = filters.value) {
|
||||
Object.assign(filters.value, model)
|
||||
loading.value = true
|
||||
loadError.value = null
|
||||
if (statusTab.value === '待分配') {
|
||||
rows.value = []
|
||||
containerRows.value = []
|
||||
total.value = 0
|
||||
loadError.value = { message: '柜级待分配摘要分页接口尚未在当前 test 后端提供,已停止从订单分页本地聚合整柜' }
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
const dateRange = Array.isArray(filters.value.createdAt) ? filters.value.createdAt.map(String) : []
|
||||
const booleanValue = (value: unknown) => value === 'true' ? true : value === 'false' ? false : undefined
|
||||
@@ -124,7 +132,7 @@ async function load(model: QueryModel = filters.value) {
|
||||
inboundCode: String(filters.value.inboundCode || '').trim() || undefined,
|
||||
sourceOrderNo: String(filters.value.sourceOrderNo || '').trim() || undefined,
|
||||
containerNo: String(filters.value.containerNo || '').trim() || undefined,
|
||||
currentStatus: statusTab.value === '待分配' ? 'PENDING_ASSIGNMENT' : String(filters.value.status || '').trim() || undefined,
|
||||
currentStatus: String(filters.value.status || '').trim() || undefined,
|
||||
transferWarehouseCode: String(filters.value.transferWarehouseCode || '').trim() || undefined,
|
||||
abnormal: booleanValue(filters.value.abnormal),
|
||||
detained: booleanValue(filters.value.detained),
|
||||
|
||||
Reference in New Issue
Block a user