This commit is contained in:
wujinliang
2026-08-26 18:13:12 +08:00
parent a67f6300f8
commit 9eec68f7c5
7 changed files with 49 additions and 15 deletions
@@ -65,14 +65,14 @@ const queryFields = computed<QueryField[]>(() => [
type: 'select',
label: '客户',
width: 260,
placeholder: customerLoadError.value ? '客户列表加载失败' : '全部客户',
placeholder: customerLoadError.value ? '客户列表加载失败' : '请选择客户',
options: customers.value.map((customer) => ({
value: String(customer.id),
label: customer.legalName?.trim() || customer.tenantName,
})),
props: { filterable: true, disabled: Boolean(customerLoadError.value) },
},
{ key: 'warehouseId', type: 'select', label: '定位仓库', width: 220, placeholder: '全部仓库', options: warehouseOptions.value, props: { filterable: true } },
{ key: 'warehouseId', type: 'select', label: '定位仓库', width: 220, placeholder: '请选择仓库', options: warehouseOptions.value, props: { filterable: true } },
{ key: 'inboundCode', type: 'input', label: '入仓码', width: 220, placeholder: '请输入入仓码' },
{ key: 'expectedArrivalRange', type: 'daterange', label: '预计到达时间', width: 320, placeholder: '请选择日期范围' },
])
@@ -164,7 +164,10 @@ async function loadTasks() {
}
function applyFilters() {
appliedFilters.value = { ...filters.value, expectedArrivalRange: [...filters.value.expectedArrivalRange] }
appliedFilters.value = {
...filters.value,
expectedArrivalRange: Array.isArray(filters.value.expectedArrivalRange) ? [...filters.value.expectedArrivalRange] : [],
}
if (page.value === 1) void loadTasks()
else page.value = 1
}