@@ -11,6 +11,7 @@ import OperationErrorToast from '@/shared/components/OperationErrorToast.vue'
import { createDispatchDraftContainer , deleteDispatchDraftContainer , listDispatchCandidates , listDispatchDrafts , lockDispatchDraftPallet , preArrangeDispatch , releaseDispatchDraft , unlockDispatchDraftPallet , type DispatchPalletCandidateDto } from '../api/dispatches'
import { formatOverseasDateTime } from '../lastMilePresentation'
import type { InboundOrderListItem } from '../types'
import OrderReferenceText from './OrderReferenceText.vue'
type VehicleSpec = { value : string ; label : string ; capacity : number ; maxWeightLb : number }
interface LoadingContainer { id : string ; capacity : number ; maxWeightLb : number ; vehicleLabel : string ; palletIds : string [ ] }
@@ -212,7 +213,7 @@ watch([warehouseTab, () => query.orderType], () => {
< header > < div > < h3 > 出库单列表 < span > ( { { orderGroups . length } } 单 ) < / span > < / h3 > < div class = "order-type-tabs" > < button v-for = "option in [{ value: '', label: '全部' }, ...orderTypeOptions]" :key="option.value || 'all'" type="button" :class="{ active: query.orderType === option.value }" @click="query.orderType = option.value" > {{ option.label }} < / button > < / div > < / div > < / header >
< div v-loading = "loading" class="order-table-wrap" >
< el -table :data = "orderGroups" border height = "520" highlight -current -row row -key = " key " @ current -change = " activeOrderKey = $ event ? .key | | ' ' " >
< el-table-column label = "订单号" min -width = " 150 " > < template # default = "{ row }" > { { text ( row . first . orderNo ) } } < / template > < / el-table-column >
< el-table-column label = "订单号" min -width = " 170 " > < template # default = "{ row }" > < OrderReferenceText :value = "text(row.first.orderNo)" / > < / template > < / el-table-column >
< el-table-column label = "订单类型" width = "100" > < template # default = "{ row }" > { { orderType ( row . first . orderType ) } } < / template > < / el-table-column >
< el-table-column label = "重量(lb)" width = "100" align = "right" > < template # default = "{ row }" > { { number ( Number ( row . first . volumeWeightKg || 0 ) * 2.2046226218 , 0 ) } } LB < / template > < / el-table-column >
< el-table-column label = "托盘数量" width = "90" align = "right" > < template # default = "{ row }" > { { row . pallets . length } } < / template > < / el-table-column >
@@ -226,7 +227,7 @@ watch([warehouseTab, () => query.orderType], () => {
< / section >
< section class = "detail-pane" aria -label = " 入仓单托盘和箱号详情 " >
< header > < h3 > 托盘明细 < span > { { activePallets . length ? ` ( ${ activePallets . length } 托) ` : '' } } < / span > < / h3 > < span > 订单号 : { { text ( activePallets [ 0 ] ? . orderNo ) } } < / span > < / header >
< header > < h3 > 托盘明细 < span > { { activePallets . length ? ` ( ${ activePallets . length } 托) ` : '' } } < / span > < / h3 > < span class = "detail-order-reference" > 订单号 : < OrderReferenceText :value = "text(activePallets[0]?.orderNo)" / > < / span > < / header >
< div class = "pallet-list" >
< div v-for = "item in activePallets" :key="palletId(item)" class="pallet-row" :class="{ assigned: containerFor(palletId(item)) }" draggable="true" @dragstart="dragStart($event, item)" >
< GripVertical :size = "16" class = "drag-handle" / >
@@ -247,7 +248,7 @@ watch([warehouseTab, () => query.orderType], () => {
< div v-for = "(container, index) in containers" :key="container.id" class="loading-container" :class="{ 'loading-container--overweight': containerWeightLb(container) > container.maxWeightLb * 1.1 }" @dragover.prevent @drop.prevent="dropInto($event, container.id)" >
< div class = "container-head" > < strong > { { container . vehicleLabel } } < / strong > < span > 托数 < b > { { container . palletIds . length } } < / b > / { { container . capacity } } · 重量 < b > { { number ( containerWeightLb ( container ) , 0 ) } } LB < / b > / { { container . maxWeightLb } } LB < em v-if = "containerWeightLb(container) > container.maxWeightLb * 1.1">超限10%</em></span><el-button text type="danger" :aria-label="`删除装车车型${index + 1}`" @click="deleteContainer(container)"><Trash2 :size="15" / > < / el-button > < / div >
< div class = "container-body" >
< div v-for = "id in container.palletIds" :key="id" class="loaded-pallet"><span><strong>{{ text(palletSnapshot(id)?.palletNo || id ) }}</strong>{{ text(palletSnapshot(id)?.orderNo) }} </span><el-button text type="danger" :loading="busyPalletIds.includes(id)" @click="removePallet(id)" > 移除 < / el -button > < / div >
< div v-for = "id in container.palletIds" :key="id" class="loaded-pallet"><span><strong>{{ text(palletSnapshot(id)?.palletNo || '托盘号待补充' ) }}</strong><OrderReferenceText :value=" text(palletSnapshot(id)?.orderNo)" /> </span><el-button text type="danger" :loading="busyPalletIds.includes(id)" @click="removePallet(id)" > 移除 < / el -button > < / div >
< span v-if = "!container.palletIds.length" class="drop-hint" > 拖入托盘 , 移入后立即锁定 < / span >
< / div >
< / div >
@@ -277,6 +278,7 @@ watch([warehouseTab, () => query.orderType], () => {
. dispatch - workbench { display : grid ; grid - template - columns : minmax ( 550 px , 1.5 fr ) minmax ( 330 px , .85 fr ) minmax ( 390 px , 1 fr ) ; gap : 16 px ; margin - top : 16 px ; }
. order - pane , . detail - pane , . container - pane { min - width : 0 ; }
. order - pane header , . detail - pane header , . container - pane header { display : flex ; min - height : 74 px ; align - items : center ; justify - content : space - between ; gap : 10 px ; }
. detail - order - reference { display : flex ; min - width : 0 ; max - width : 240 px ; align - items : baseline ; gap : 3 px ; }
h3 , p { margin : 0 ; } h3 { font - size : 16 px ; } h3 span , header > span , p { color : var ( -- cc - muted ) ; font - size : 12 px ; font - weight : 400 ; }
. order - type - tabs { display : flex ; gap : 6 px ; margin - top : 10 px ; overflow - x : auto ; }
. order - type - tabs button { flex : 0 0 auto ; padding : 5 px 12 px ; border - radius : 16 px ; font - size : 12 px ; }
@@ -298,7 +300,7 @@ h3, p { margin: 0; } h3 { font-size: 16px; } h3 span, header > span, p { color:
. container - head span { color : var ( -- cc - muted ) ; font - size : 12 px ; } . container - head b { color : var ( -- el - color - primary ) ; }
. container - body { min - height : 76 px ; padding : 8 px ; } . drop - hint { display : grid ; min - height : 60 px ; place - items : center ; color : var ( -- cc - muted ) ; font - size : 12 px ; }
. loaded - pallet { display : flex ; min - height : 52 px ; align - items : center ; justify - content : space - between ; gap : 8 px ; border - bottom : 1 px solid var ( -- cc - border ) ; }
. loaded - pallet > span { display : flex ; min - width : 0 ; flex - direction : column ; color : var ( -- cc - muted ) ; font - size : 12 px ; } . loaded - pallet strong { color : var ( -- cc - text ) ; font - size : 13 px ; }
. loaded - pallet > span { display : flex ; min - width : 0 ; flex : 1 ; flex - direction : column ; color : var ( -- cc - muted ) ; font - size : 12 px ; } . loaded - pallet strong { color : var ( -- cc - text ) ; font - size : 13 px ; }
. dialog - footer { display : flex ; align - items : center ; justify - content : space - between ; gap : 16 px ; margin : 16 px - 20 px - 20 px ; padding : 14 px 20 px ; border - top : 1 px solid var ( -- cc - border ) ; background : # fafbfc ; }
. dialog - footer > span { color : var ( -- cc - muted ) ; font - size : 12 px ; }
. vehicle - options { display : grid ; gap : 14 px ; }