This commit is contained in:
wujinliang
2026-08-27 21:48:15 +08:00
parent 550d8add97
commit b47323edf3
53 changed files with 624 additions and 82 deletions
@@ -133,6 +133,7 @@ describe('UnifiedOrdersView contract', () => {
expect(source).toContain("{ key: 'customerRemark', prop: 'customerRemark', label: '客户备注'")
expect(source).toContain("{ key: 'latestInternalNote', prop: 'latestInternalNote', label: '内部备注'")
expect(source.match(/<LineClampText v-if="column\.key === 'remark'"/g)).toHaveLength(3)
expect(source).toContain("detail.summary.internalRemark || detail.summary.latestInternalNote || '—'")
})
it('uses ListPageLayout regions for one 16px query-to-table gap', () => {
@@ -237,6 +238,11 @@ describe('UnifiedOrdersView contract', () => {
expect(source).not.toContain("value.replaceAll('_', ' ')")
})
it('uses the inbound measurement girth formula for cargo dimensions', () => {
expect(source).toContain('formatNumber(length + 2 * (width + height))')
expect(source).not.toContain('formatNumber(2 * (width + height))')
})
it('binds dimension and weight evidence to their formal server records without mixing galleries', () => {
expect(source).toContain('<el-table :data="measurementDetail?.items || []" row-key="id"')
expect(source).toContain('<el-table-column label="箱号" prop="boxCode"')
@@ -439,9 +439,12 @@ function orderStatusLabel(value: string | null | undefined) {
function cargoValue(cargo: Record<string, unknown>, key: string) {
const value = cargo[key]
if (key === 'circumferenceCm') {
const length = Number(cargo.lengthCm)
const width = Number(cargo.widthCm)
const height = Number(cargo.heightCm)
return Number.isFinite(width) && Number.isFinite(height) ? formatNumber(2 * (width + height)) : '—'
return Number.isFinite(length) && Number.isFinite(width) && Number.isFinite(height)
? formatNumber(length + 2 * (width + height))
: '—'
}
if (value === null || value === undefined || value === '') return '—'
if (typeof value === 'number') return formatNumber(value)
@@ -1017,7 +1020,7 @@ onBeforeUnmount(() => {
<div class="wide"><dt>PC 端下单文件</dt><dd>{{ detail.summary.pcOrderFiles?.join('、') || '—' }}</dd></div>
<div><dt>快递公司</dt><dd>{{ detail.summary.expressCompany || detail.order.order?.expressCompany || '—' }}</dd></div>
<div><dt>快递单号</dt><dd>{{ detail.summary.expressTrackingNo || detail.order.order?.expressTrackingNo || '—' }}</dd></div>
<div class="wide"><dt>客服内部备注</dt><dd>{{ detail.summary.internalRemark || '—' }}</dd></div>
<div class="wide"><dt>客服内部备注</dt><dd>{{ detail.summary.internalRemark || detail.summary.latestInternalNote || '—' }}</dd></div>
<div><dt>创建人</dt><dd>{{ detail.summary.createdBy || '—' }}</dd></div>
<div><dt>下一步</dt><dd>{{ canApprove(detail.summary) ? '审核订单' : nextActionBoundary(detail.summary) || '—' }}</dd></div>
</dl>