优化
This commit is contained in:
@@ -135,8 +135,8 @@ const documents = computed<DocumentRow[]>(() => {
|
||||
.filter((item) => item[1]).map(([type, number]) => ({ type: String(type), number: String(number), createdAt: '—', quote: '—' } as DocumentRow))
|
||||
.concat((order.relabelApplications || []).map(application => ({ type: '换标单', number: application.relabelNo, createdAt: formatOverseasDateTime(application.createdAt), quote: '—', status: relabelApplicationStatusLabel(application.status), quantity: application.quantity })))
|
||||
})
|
||||
const cargo = computed<CargoRow[]>(() => showReturnForecast.value && detail.value?.returnReceipt?.items?.length
|
||||
? detail.value.returnReceipt.items.map(item => ({ id: item.skuCode, sku: item.skuCode, productName: text(item.productNameZh),
|
||||
const cargo = computed<CargoRow[]>(() => isReturnOrder.value
|
||||
? (detail.value?.returnReceipt?.items || []).map(item => ({ id: item.skuCode, sku: item.skuCode, productName: text(item.productNameZh),
|
||||
quantity: item.expectedQuantity, pallets: 0, cartons: 0, weight: 0, volume: 0 }))
|
||||
: (detail.value?.cargo || []).map((item) => ({
|
||||
id: String(item.id), sku: text(item.skuCode), productName: text(item.productNameZh), pallets: Number(item.palletCount || 0),
|
||||
@@ -157,7 +157,7 @@ const logs = computed<LogRow[]>(() => {
|
||||
return [...statusRows, ...operationRows].sort((left, right) => right.sortAt.localeCompare(left.sortAt))
|
||||
})
|
||||
|
||||
const cargoColumns = computed<DataTableColumn[]>(() => showReturnForecast.value ? [
|
||||
const cargoColumns = computed<DataTableColumn[]>(() => isReturnOrder.value ? [
|
||||
{ key: 'sku', prop: 'sku', label: 'SKU', minWidth: 150 },
|
||||
{ key: 'productName', prop: 'productName', label: '中文品名', minWidth: 180 },
|
||||
{ key: 'quantity', prop: 'quantity', label: '预报件数', width: 120, align: 'right' },
|
||||
@@ -238,7 +238,7 @@ onMounted(load)
|
||||
<div v-for="field in basicFields" :key="field.label" :class="{ wide: field.wide }"><dt>{{ field.label }}</dt><dd :class="{ 'detail-field-value--business': isSingleLineBusinessField(field), 'package-difference--nonzero': isNonzeroDifference(field) }" :title="isSingleLineBusinessField(field) ? String(field.value) : undefined">{{ field.value }}</dd></div>
|
||||
</dl>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="cargo"><template #label><span class="density-tab-icon" aria-hidden="true">📦</span><span>货物信息</span></template><section class="table-panel"><DataTable :data="cargo" :columns="cargoColumns" column-settings-mode="hide" row-key="id" empty-text="暂无货物明细"></DataTable></section></el-tab-pane>
|
||||
<el-tab-pane name="cargo"><template #label><span class="density-tab-icon" aria-hidden="true">📦</span><span>货物信息</span></template><section class="table-panel"><DataTable :data="cargo" :columns="cargoColumns" column-settings-mode="hide" row-key="id" :empty-text="isReturnOrder ? '暂无客户预报货物明细' : '暂无货物明细'"></DataTable></section></el-tab-pane>
|
||||
<el-tab-pane v-if="detail?.order.orderType === 'RETURN_RELABEL'" name="return-receipt"><template #label><span class="density-tab-icon" aria-hidden="true">📦</span><span>退货签收与箱内清点</span></template>
|
||||
<section v-if="detail.returnReceipt" class="table-panel" aria-label="退货签收与箱内清点">
|
||||
<h3>{{ detail.returnReceipt.order.returnNo }} · 实收 {{ detail.returnReceipt.order.receivedQuantity }} / 预报 {{ detail.returnReceipt.order.expectedQuantity }} 件</h3>
|
||||
|
||||
Reference in New Issue
Block a user