feat: add desktop dropship pallet printing
This commit is contained in:
@@ -125,6 +125,7 @@ export interface UnifiedOrderResource {
|
||||
currentHoldReason: string | null
|
||||
companyName?: string | null
|
||||
businessType?: string | null
|
||||
fulfillmentType?: string | null
|
||||
pickupMethod?: string | null
|
||||
requestedPickupAt: string | null
|
||||
pickupAt?: string | null
|
||||
|
||||
@@ -7,6 +7,14 @@ const source = readFileSync(resolve(process.cwd(), 'src/modules/unified-orders/p
|
||||
const routeSource = readFileSync(resolve(process.cwd(), 'src/modules/unified-orders/routes.ts'), 'utf8').replace(/\r\n/g, '\n')
|
||||
|
||||
describe('UnifiedOrdersView contract', () => {
|
||||
it('exposes desktop pallet printing only for one-click dropship orders', () => {
|
||||
expect(source).toContain("detail.value?.summary.fulfillmentType === 'ONE_CLICK_DROPSHIP'")
|
||||
expect(source).toContain("{ key: 'dropship-print', label: '托盘打印', icon: '🖨️' }")
|
||||
expect(source).toContain("activeDetailTab === 'dropship-print'")
|
||||
expect(source).toContain('<DropshipPalletPrintPanel')
|
||||
expect(source).toContain("can('platform:firstleg:inbound:list')")
|
||||
})
|
||||
|
||||
it('loads the reference unit price and lets the backend enforce the combined final lock', () => {
|
||||
const openDialogSource = source.slice(source.indexOf('async function openFeeConfirmDialog()'), source.indexOf('async function executeConfirmAndSendFee()'))
|
||||
const sendFeeSource = source.slice(source.indexOf('async function executeConfirmAndSendFee()'), source.indexOf('function handleOrderSelectionChange'))
|
||||
|
||||
@@ -78,6 +78,7 @@ import {
|
||||
InboundFeePanel,
|
||||
InboundMeasurementDialog,
|
||||
MeasurementEvidenceThumbnail,
|
||||
DropshipPalletPrintPanel,
|
||||
sendInboundFee,
|
||||
type InboundFeeSnapshot,
|
||||
type InboundMeasurementDetail,
|
||||
@@ -324,15 +325,17 @@ const canReleaseInbound = computed(() => Boolean(
|
||||
&& holdDetail.value?.canRelease,
|
||||
))
|
||||
|
||||
const detailTabs = [
|
||||
const isDropshipOrder = computed(() => detail.value?.summary.fulfillmentType === 'ONE_CLICK_DROPSHIP')
|
||||
const detailTabs = computed(() => [
|
||||
{ key: 'basic', label: '基本信息', icon: '📋' },
|
||||
{ key: 'cargo', label: '货品信息', icon: '📦' },
|
||||
{ key: 'fees', label: '费用信息', icon: '💰' },
|
||||
{ key: 'history', label: '状态历史', icon: '📝' },
|
||||
{ key: 'measurement', label: '测量数据', icon: '📐' },
|
||||
...(isDropshipOrder.value ? [{ key: 'dropship-print', label: '托盘打印', icon: '🖨️' }] : []),
|
||||
{ key: 'other', label: '其他', icon: '🗂️' },
|
||||
{ key: 'fulfillment', label: '拆分履约', icon: '🧩' },
|
||||
]
|
||||
])
|
||||
|
||||
const customerMeasurementColumns = [
|
||||
{ key: 'itemNo', label: '#' }, { key: 'lengthCm', label: '箱规长(cm)' }, { key: 'widthCm', label: '箱规宽(cm)' },
|
||||
@@ -2396,6 +2399,17 @@ onBeforeUnmount(() => {
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template v-else-if="activeDetailTab === 'dropship-print'">
|
||||
<el-empty v-if="!normalizedInboundId" description="订单尚未生成入库单,暂无托盘码可打印" :image-size="64" />
|
||||
<el-alert v-else-if="!can('platform:firstleg:inbound:list')" title="当前账号缺少入库单查看权限,无法打印托盘码" type="warning" :closable="false" show-icon />
|
||||
<DropshipPalletPrintPanel
|
||||
v-else
|
||||
:customer-id="String(detail.summary.tenantId)"
|
||||
:inbound-id="normalizedInboundId"
|
||||
:inbound-code="detail.summary.inboundCode"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template v-else-if="activeDetailTab === 'measurement'">
|
||||
<div class="panel-title">
|
||||
<p>{{ detail.summary.measurement?.completedAt ? `测量完成于 ${formatDate(detail.summary.measurement.completedAt)}` : '尚未完成测量' }}</p>
|
||||
|
||||
Reference in New Issue
Block a user