This commit is contained in:
2026-08-12 18:00:26 +08:00
parent 2a889a7d91
commit 9d9b8943b8
16 changed files with 114 additions and 16 deletions
@@ -88,4 +88,15 @@ describe('InboundWorkflowWorkspace', () => {
expect(source).not.toContain('reserveLocation')
expect(source).not.toContain('allocatePallet')
})
it('uses semantic outlined or solid buttons for workflow launches and decisions', () => {
expect(source).toContain('<el-button type="primary" @click="measurementDialogOpen = true">')
expect(source).toContain('<el-button type="primary" @click="reviewDialogOpen = true">')
expect(source).toContain('type="primary" plain')
expect(source).toContain('type="danger" plain')
expect(source).toContain('type="warning" plain')
expect(source).toContain('<Pencil :size="16" />编辑测量数据')
expect(source).toContain('<ClipboardCheck :size="16" />审核测量数据')
expect(source).toContain('@media (max-width: 360px)')
})
})
@@ -334,5 +334,10 @@ describe('InboundOrdersView', () => {
expect(source).toContain('preference-key="inbound-orders-table"')
expect(columnSource.match(/defaultVisible: false/g)?.length).toBeGreaterThanOrEqual(25)
expect(toolbarSource).toMatch(/@media \(max-width: 720px\)[\s\S]*width: 100%/)
expect(source).toContain('<el-button size="small" type="primary" @click="openDetail')
expect(source).toContain('<ClipboardCheck :size="15" />处理')
expect(source).toContain('<el-button size="small" plain type="primary"')
expect(source).not.toContain('<el-button link type="primary" @click="openDetail(row as InboundOrderSummary)">')
expect(source).toContain('@media (max-width: 360px) { .inbound-tab { padding-inline: 12px; } .row-actions { align-items: stretch; flex-direction: column; }')
})
})
@@ -411,7 +411,7 @@ onBeforeUnmount(() => { disposed = true; loadRequestId += 1; customerRequestId +
</header>
<DataTable v-model:page="page" v-model:page-size="pageSize" :data="result.records" :columns="columns" preference-key="inbound-orders-table" :loading="loading" :total="result.total" :page-sizes="[20, 50, 100]" row-key="id" :empty-text="listEmptyText" aria-label="入库单列表">
<template #pagination-left>当前显示 {{ currentPageCount }} 条 · 共 {{ result.total }} 条</template>
<template #actions="{ row }"><div v-if="access.can('platform:firstleg:inbound:view')" class="row-actions"><el-button link type="primary" @click="openDetail(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><span v-else class="muted-action">无查看权限</span></template>
<template #actions="{ row }"><div v-if="access.can('platform:firstleg:inbound:view')" class="row-actions"><el-button size="small" type="primary" @click="openDetail(row as InboundOrderSummary)"><ClipboardCheck :size="15" />处理</el-button><el-button size="small" plain type="primary" :loading="printingInboundId === (row as InboundOrderSummary).id" :disabled="Boolean(printingInboundId)" @click="printCartonLabels(row as InboundOrderSummary)"><Printer :size="15" />打印箱唛</el-button><el-button size="small" plain type="primary" @click="openDetail(row as InboundOrderSummary)"><Eye :size="15" />查看</el-button></div><span v-else class="muted-action">无查看权限</span></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 #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>
@@ -485,5 +485,5 @@ onBeforeUnmount(() => { disposed = true; loadRequestId += 1; customerRequestId +
.primary-cell span, .status-stack span, .status-stack small { color: var(--cc-muted); font-size: 12px; }
@media (max-width: 900px) { .inbound-tabs { width: 100%; } }
@media (max-width: 720px) { .inbound-tab { padding-inline: 14px; } .table-tabs-row { padding: 0 10px; } .inbound-stats-row { min-height: 0; align-items: stretch; flex-direction: column; gap: 10px; padding: 10px; } .inbound-stats-row .total-info { justify-content: flex-start; } }
@media (max-width: 360px) { .inbound-tab { padding-inline: 12px; } .row-actions { align-items: flex-start; flex-direction: column; } }
@media (max-width: 360px) { .inbound-tab { padding-inline: 12px; } .row-actions { align-items: stretch; flex-direction: column; } .row-actions :deep(.el-button) { width: 100%; min-height: 40px; } }
</style>
@@ -412,7 +412,7 @@ defineExpose({ reload: loadWorkspace })
/>
<el-tooltip v-if="canEdit && editable" content="删除图片" placement="top">
<el-button
text
plain
type="danger"
class="weight-delete"
:aria-label="`删除称重图片 ${index + 1}`"