This commit is contained in:
2026-08-12 10:59:49 +08:00
parent fb542e0b6f
commit f9ff9086d5
20 changed files with 103 additions and 81 deletions
@@ -294,19 +294,29 @@ describe('InboundOrdersView', () => {
const columnSource = source.slice(source.indexOf('const columns:'))
const operation = columnSource.indexOf("key: 'actions'")
const inboundCode = columnSource.indexOf("key: 'inboundCode'")
const processStatus = columnSource.indexOf("key: 'processStatus'")
const orderStatus = columnSource.indexOf("key: 'orderStatus'")
const measureReview = columnSource.indexOf("key: 'measureReviewStatus'")
const feeStatus = columnSource.indexOf("key: 'feeStatus'")
const feeReviewStatus = columnSource.indexOf("key: 'feeReviewStatus'")
const customer = columnSource.indexOf("key: 'customerName'")
const warehouse = columnSource.indexOf("key: 'warehouseName'")
expect(operation).toBeGreaterThan(-1)
expect(operation).toBeLessThan(inboundCode)
expect(inboundCode).toBeLessThan(orderStatus)
expect(inboundCode).toBeLessThan(processStatus)
expect(processStatus).toBeLessThan(orderStatus)
expect(orderStatus).toBeLessThan(measureReview)
expect(measureReview).toBeLessThan(feeStatus)
expect(feeStatus).toBeLessThan(customer)
expect(feeStatus).toBeLessThan(feeReviewStatus)
expect(feeReviewStatus).toBeLessThan(customer)
expect(customer).toBeLessThan(warehouse)
expect(columnSource).toContain("fixed: 'left'")
expect(columnSource).toContain("{ key: 'processStatus', label: '入库流程状态'")
expect(columnSource).toContain("{ key: 'orderStatus', label: '订单状态'")
expect(columnSource).toContain("{ key: 'feeStatus', label: '费用状态'")
expect(columnSource).toContain("{ key: 'feeReviewStatus', label: '费用审核状态'")
expect(source).toContain('<template #processStatus="{ row }">')
expect(source).toContain('<template #feeReviewStatus="{ row }">')
expect(toolbarSource).toMatch(/@media \(max-width: 720px\)[\s\S]*width: 100%/)
})
})
@@ -124,10 +124,12 @@ const queryFields = computed(() => showAdvancedFilters.value
const columns: DataTableColumn[] = [
{ key: 'actions', label: '操作', width: 228, fixed: 'left', slotName: 'actions' },
{ key: 'inboundCode', label: '入仓码', minWidth: 166, slotName: 'inbound' },
{ key: 'orderStatus', label: '订单 / 流程状态', minWidth: 156, slotName: 'orderStatus' },
{ key: 'processStatus', label: '入库流程状态', minWidth: 132, slotName: 'processStatus' },
{ key: 'orderStatus', label: '订单状态', minWidth: 120, slotName: 'orderStatus' },
{ key: 'measureReviewStatus', label: '测量数据审核状态', minWidth: 142, slotName: 'measureReviewStatus' },
{ key: 'expectedArrivalAt', label: '预计到达时间', minWidth: 164, slotName: 'expectedArrivalAt' },
{ key: 'feeStatus', label: '费用审核状态', minWidth: 132, slotName: 'feeStatus' },
{ key: 'feeStatus', label: '费用状态', minWidth: 112, slotName: 'feeStatus' },
{ key: 'feeReviewStatus', label: '费用审核状态', minWidth: 132, slotName: 'feeReviewStatus' },
{ key: 'customerName', label: '客户', minWidth: 142, slotName: 'customerName' },
{ key: 'warehouseName', label: '仓库', minWidth: 140, slotName: 'warehouseName' },
{ key: 'deliveryWarehouseName', label: '交货仓', minWidth: 140, slotName: 'deliveryWarehouseName' },
@@ -452,10 +454,12 @@ onBeforeUnmount(() => { disposed = true; loadRequestId += 1; detailRequestId +=
<template #pagination-left>当前显示 {{ currentPageCount }} 条 · 共 {{ result.total }} 条</template>
<template #actions="{ row }"><div class="row-actions"><el-button link type="primary" @click="openWorkspace(row as InboundOrderSummary)"><ClipboardCheck :size="15" />处理</el-button><el-button link :loading="printingInboundId === (row as InboundOrderSummary).id" :disabled="Boolean(printingInboundId)" @click="printCartonLabels(row as InboundOrderSummary)"><Printer :size="15" />打印箱唛</el-button><el-button link @click="openDetail(row as InboundOrderSummary)"><Eye :size="15" />查看</el-button></div></template>
<template #inbound="{ row }"><div class="primary-cell"><strong>{{ text((row as InboundOrderSummary).inboundCode) }}</strong><span>订单 {{ text((row as InboundOrderSummary).orderNo) }}</span></div></template>
<template #orderStatus="{ row }"><div class="status-stack"><el-tag :type="statusType((row as InboundOrderSummary).processStatus)" effect="light">{{ statusLabel((row as InboundOrderSummary).processStatus) }}</el-tag><span>订单:{{ codeLabel((row as InboundOrderSummary).orderStatusSnapshot, inboundOrderStatusLabels) }}</span></div></template>
<template #processStatus="{ row }"><el-tag :type="statusType((row as InboundOrderSummary).processStatus)" effect="light">{{ statusLabel((row as InboundOrderSummary).processStatus) }}</el-tag></template>
<template #orderStatus="{ row }">{{ codeLabel((row as InboundOrderSummary).orderStatusSnapshot, inboundOrderStatusLabels) }}</template>
<template #measureReviewStatus="{ row }">{{ codeLabel((row as InboundOrderSummary).measureReviewStatus, measureReviewLabels) }}</template>
<template #expectedArrivalAt="{ row }">{{ formatDate((row as InboundOrderSummary).expectedArrivalAt) }}</template>
<template #feeStatus="{ row }"><div class="status-stack"><span>{{ codeLabel((row as InboundOrderSummary).feeStatus, feeStatusLabels) }}</span><small v-if="(row as InboundOrderSummary).feeReviewStatus">审核:{{ codeLabel((row as InboundOrderSummary).feeReviewStatus, inboundReviewStatusLabels) }}</small></div></template>
<template #feeStatus="{ row }">{{ codeLabel((row as InboundOrderSummary).feeStatus, feeStatusLabels) }}</template>
<template #feeReviewStatus="{ row }">{{ codeLabel((row as InboundOrderSummary).feeReviewStatus, inboundReviewStatusLabels) }}</template>
<template #customerName="{ row }">{{ text((row as InboundOrderSummary).customerName) }}</template>
<template #warehouseName="{ row }">{{ text((row as InboundOrderSummary).warehouseName) }}</template>
<template #deliveryWarehouseName="{ row }">{{ text((row as InboundOrderSummary).deliveryWarehouseName) }}</template>