@@ -9,6 +9,7 @@
< view class = "task-summary-card" >
< view class = "summary-head" > < text class = "inbound-code" > { { task . inboundCode || '—' } } < / text > < text class = "status" > { { statusLabel } } < / text > < / view >
< text class = "warehouse-summary" > { { task . warehouseName || '仓库未关联' } } < / text >
< text class = "warehouse-summary" > 当前票 · { { task . customerName || '客户未关联' } } < / text >
< view class = "compact-metrics" >
< text > < strong > { { task . totalCartons || 0 } } < / strong > 总箱 < / text >
< text > < strong > { { task . countedCartons || 0 } } < / strong > 清点 < / text >
@@ -20,7 +21,7 @@
< button v-if = "task.taskStatus === 'PENDING'" class="primary-button" :disabled="submitting" @tap="claimTask" > 领取并开始入库 < / button >
< / view >
< view v-if = "task.taskStatus === 'CLAIMED'" class="section-card" >
< view v-if = "task.taskStatus === 'CLAIMED' || currentPallet " class="section-card" >
< text class = "section-title" > 1. 扫箱清点 < / text >
< template v-if = "palletSetupReady" >
< ScanTargetInput v-model = "boxCode" name="boxCode" label="箱码" placeholder="扫描或输入箱唛箱码" :active="activeScan === 'boxCode'" @activate="activeScan = 'boxCode'" @submit="resolveCarton" / >
@@ -29,6 +30,8 @@
< button class = "compact-action" :disabled = "!canResolveCarton" @tap ="resolveCarton()" > 读取 SKU < / button >
< / view >
< view v-if = "carton" class="carton-card" >
< text class = "carton-owner" > { { scanTask ? . customerName || task . customerName } } · { { carton . inboundCode } } < / text >
< text v-if = "carton.blockReason" class="pallet-hint blocked" > {{ carton.blockReason }} < / text >
< view v-for = "(line, index) in skuCounts" :key="line.inboundDetailId" class="sku-count-row" >
< view class = "sku-copy" > < text class = "sku-label" > SKU { { index + 1 } } < / text > < text class = "sku-code" > { { line . skuCode || '—' } } < / text > < / view >
< view v-if = "!isResolvedPendingCarton" class="quantity-stepper" >
@@ -53,7 +56,7 @@
< / view >
< view v-if = "task.taskStatus === 'CLAIMED' && task.totalCartons > 0 && task.boundCartons === task.totalCartons" class="continue-strip" >
< text > 本票已全部归托 。 托盘未装满时先继续装其他票 , 实物装满后再封托 。 < / text >
< button class = "secondary-button" @tap ="continueOtherTask" > 继续装其他入仓单 < / button >
< button class = "secondary-button" : disabled = "submitting || loading" @tap ="continueOtherTask" > 继续装其他入仓单 < / button >
< / view >
< view class = "section-card" >
@@ -61,7 +64,9 @@
< view v-if = "currentPallet" class="pallet-card" >
< view class = "pallet-head" > < text class = "pallet-code" > { { currentPallet . palletNo } } < / text > < text class = "pallet-status" : class = "currentPallet.status === 'SEALED' ? 'sealed' : ''" > { { currentPallet . status === 'SEALED' ? '已封托' : '当前托盘' } } < / text > < / view >
< text class = "pallet-meta" > { { currentPallet . cartonCount || 0 } } 箱 · { { currentPallet . skuCount || 0 } } SKU · { { currentPallet . weightKg || 0 } } kg · { { currentPallet . volumeCbm || 0 } } m³ < / text >
< view v-for = "item in (currentPalletDetails?.cartons || [])" :key="item.cartonId" class="carton-row"><text>{{ item.boxCode }}</text><button v-if="currentPallet.status === 'OPEN'" class="text-button" :disabled="submitting" @tap="moveCarton(item, null)" > 移回待绑托 < / button > < / view >
< text class = "pallet-meta" > 整托 { { palletCustomerCount } } 个客户 · { { palletMembers . length } } 票 < / text >
< view v-for = "member in palletMembers" :key="member.taskId" class="member-row" > < text > { { member . customerName || '客户未关联' } } · { { member . inboundCode } } < / text > < strong > { { member . cartonCount } } 箱 < / strong > < / view >
< view v-for = "item in (currentPalletDetails?.cartons || [])" :key="item.cartonId" class="carton-row"><view><text>{{ item.boxCode }}</text><text class="carton-owner">{{ memberForCarton(item)?.customerName }} · {{ item.inboundCode }}</text></view><button v-if="currentPallet.status === 'OPEN'" class="text-button" :disabled="submitting || loading" @tap="moveCarton(item, null)" > 移回待绑托 < / button > < / view >
< button v-if = "currentPallet.palletId && currentPallet.status === 'OPEN'" class="primary-button" :disabled="!currentPallet.cartonCount || submitting" @tap="sealPallet(currentPallet)" > 封托 < / button >
< button v-if = "currentPallet.palletId && currentPallet.status === 'SEALED'" class="secondary-button unseal-button" :disabled="submitting" @tap="openUnseal(currentPallet)" > 解除封托 < / button >
< / view >
@@ -82,7 +87,7 @@
import PortalHeader from '@/components/PortalHeader.vue'
import PopupHeader from '@/components/PopupHeader.vue'
import ScanTargetInput from '@/components/ScanTargetInput.vue'
import { bindDropshipPendingCartons , claimDropshipPalletizationTask , countDropshipCarton , getDropshipPalletizationTask , moveDropshipCarton , resolveDropshipCarton , sealDropshipPallet , unsealDropshipPallet } from '@/api/pda-dropship.js'
import { bindDropshipPendingCartons , claimDropshipPalletizationTask , countDropshipCarton , getDropshipPalletizationTask , moveDropshipCarton , resolveDropshipWorkspaceCarton , resolveDropshipWorkspacePallet , sealDropshipPallet , unsealDropshipPallet } from '@/api/pda-dropship.js'
import { session , requireSession } from '@/stores/session.js'
import { formatApiError } from '@/utils/user-facing.js'
import { stableOperationId } from '@/utils/idempotency.js'
@@ -93,52 +98,56 @@
export default {
components : { PopupHeader , PortalHeader , ScanTargetInput } ,
data ( ) { return { user : session . currentUser , taskId : '' , warehouseId : '' , task : null , palletCode : '' , selectedPalletId : '' , selectedPalletNo : '' , boxCode : '' , carton : null , skuCounts : [ ] , activeScan : 'boxCode' , loading : false , submitting : false , error : '' , notice : '' , unsealOpen : false , unsealTarget : null } } ,
data ( ) { return { user : session . currentUser , taskId : '' , warehouseId : '' , task : null , scanTask : null , workspace : null , initialPalletNo : '' , palletCode : '' , selectedPalletId : '' , selectedPalletNo : '' , boxCode : '' , carton : null , skuCounts : [ ] , activeScan : 'boxCode' , loading : false , submitting : false , error : '' , notice : '' , unsealOpen : false , unsealTarget : null } } ,
computed : {
statusLabel ( ) { return this . task ? . taskStatus === 'COMPLETED' ? '已完成' : ( this . task ? . taskStatus === 'CLAIMED' ? '作业中' : '待领取' ) } ,
palletSetupReady ( ) { return this . task ? . palletSetupReady === true } ,
palletSetupMessage ( ) { return this . task ? . palletSetupMessage || ` 预计 ${ this . task ? . expectedPalletCount || 0 } 托,当前仅生成 ${ this . task ? . generatedPalletCount || 0 } 个托盘码,请联系后台处理后刷新 ` } ,
canResolveCarton ( ) { return Boolean ( this . palletSetupReady && this . task ? . taskStatus === 'CLAIMED' && String ( this . boxCode || '' ) . trim ( ) && ! this . loading && ! this . submitting ) } ,
canResolveCarton ( ) { return Boolean ( this . palletSetupReady && String ( this . boxCode || '' ) . trim ( ) && ! this . loading && ! this . submitting ) } ,
canCount ( ) { return Boolean ( this . carton ? . canCount && this . skuCounts . length && this . skuCounts . every ( ( line ) => Number . isInteger ( Number ( line . actualQuantity ) ) && Number ( line . actualQuantity ) >= 0 && ( ! this . lineDiffers ( line ) || String ( line . discrepancyRemark || '' ) . trim ( ) ) ) ) } ,
isResolvedPendingCarton ( ) { return this . carton ? . countStatus === 'COUNTED_UNBOUND' } ,
canRebindResolvedCarton ( ) { return Boolean ( this . isResolvedPendingCarton && this . carton ? . cartonId && this . assignableCurrentPallet ? . palletNo ) } ,
canSubmitCarton ( ) { return this . currentPallet ? . status === 'SEALED' ? false : ( this . isResolvedPendingCarton ? this . canRebindResolvedCarton : this . canCount ) } ,
canSubmitCarton ( ) { return this . currentPallet ? . status === 'SEALED' || ( ( this . selectedPalletNo || this . palletCode ) && ! this . currentPallet ) ? false : ( this . isResolvedPendingCarton ? this . canRebindResolvedCarton : this . canCount ) } ,
cartonActionLabel ( ) { return this . isResolvedPendingCarton ? '确认归入当前托盘' : '确认清点' } ,
currentPalletDetails ( ) { return ( this . task ? . pallets || [ ] ) . find ( ( item ) => item . palletNo === this . selectedPalletNo ) || null } ,
currentPallet ( ) { return this . currentPalletDetails || ( this . selectedPalletNo ? { palletNo : this . selectedPalletNo , status : 'OPEN' } : null ) } ,
currentPalletDetails ( ) { return this . workspace ? . pallet ? . palletNo === this . selectedPalletNo ? this . workspace . pallet : null } ,
currentPallet ( ) { return this . currentPalletDetails } ,
palletMembers ( ) { return this . workspace ? . members || [ ] } ,
palletCustomerCount ( ) { return new Set ( this . palletMembers . map ( ( member ) => String ( member . customerId ) ) ) . size } ,
assignableCurrentPallet ( ) { return this . currentPallet ? . status === 'OPEN' ? this . currentPallet : null }
} ,
onLoad ( options ) { this . taskId = String ( options . taskId || '' ) ; this . warehouseId = String ( options . warehouseId || '' ) } ,
onShow ( ) { if ( ! requireSession ( ) ) return ; this . user = session . currentUser ; const draft = restoreDropshipPalletizingDraft ( this . draftIdentity ( ) ) ; this . selectedPalletNo = draft ? . activePalletNo || '' ; this . startScanner ( ) ; this . loadTask ( ) } ,
onLoad ( options ) { this . taskId = String ( options . taskId || '' ) ; this . warehouseId = String ( options . warehouseId || '' ) ; this . initialPalletNo = String ( options . palletNo || '' ) } ,
onShow ( ) { if ( ! requireSession ( ) ) return ; this . user = session . currentUser ; const draft = restoreDropshipPalletizingDraft ( this . draftIdentity ( ) ) ; this . selectedPalletNo = this . initialPalletNo || draft ? . activePalletNo || '' ; this . initialPalletNo = '' ; this . startScanner ( ) ; this . loadTask ( ) } ,
onHide ( ) { this . stopScanner ( ) } , onUnload ( ) { this . stopScanner ( ) } , beforeUnmount ( ) { this . stopScanner ( ) } ,
onBackPress ( ) { if ( ! this . unsealOpen ) return false ; this . closeUnseal ( ) ; return true } ,
methods : {
startScanner ( ) { this . stopScanner ( ) ; this . _stopScanner = startScanBroadcast ( { onScan : ( value ) => this . handleScan ( value ) , onError : ( ) => { this . error = '扫码头连接失败,可使用输入框继续作业' } } ) } ,
stopScanner ( ) { if ( this . _stopScanner ) this . _stopScanner ( ) ; this . _stopScanner = null } ,
handleScan ( value ) { if ( ! this . palletSetupReady ) { this . error = this . palletSetupMessage ; return } const plan = planDropshipScan ( createDropshipScanState ( { online : isOnline ( ) } ) , value , { unboundCartons : this . task ? . unboundCartons } ) ; if ( [ DROPSHIP _SCAN _INTENT . BLOCKED , DROPSHIP _SCAN _INTENT . INVALID ] . includes ( plan . intent ) ) { this . error = plan . message ; return } const code = plan . palletNo || plan . boxCode ; if ( plan . palletNo ) { this . palletCode = code ; this . selectPallet ( code ) } else { this . boxCode = code ; this . resolveCarton ( ) } } ,
handleScan ( value ) { if ( this . loading || this . submitting ) return ; if ( ! this . palletSetupReady ) { this . error = this . palletSetupMessage ; return } const plan = planDropshipScan ( createDropshipScanState ( { online : isOnline ( ) } ) , value , { unboundCartons : this . task ? . unboundCartons } ) ; if ( [ DROPSHIP _SCAN _INTENT . BLOCKED , DROPSHIP _SCAN _INTENT . INVALID ] . includes ( plan . intent ) ) { this . error = plan . message ; return } const code = plan . palletNo || plan . boxCode ; if ( plan . palletNo ) { this . palletCode = code ; this . selectPallet ( code ) } else { this . boxCode = code ; this . resolveCarton ( ) } } ,
resetMessages ( ) { this . error = '' ; this . notice = '' } ,
async loadTask ( ) {
if ( ! this . taskId || ! this . warehouseId ) { this . error = '缺少合托任务或仓库信息,请返回任务列表' ; return }
this . loading = true ; this . resetMessages ( )
try { this . task = await getDropshipPalletizationTask ( this . taskId , this . warehouseId ) ; if ( this . task . taskStatus === 'COMPLETED' ) clearDropshipPalletizingDraft ( this . draftIdentity ( ) ) }
try { this . task = await getDropshipPalletizationTask ( this . taskId , this . warehouseId ) ; await this . refreshPallet ( ) ; if ( this . task . taskStatus === 'COMPLETED' ) clearDropshipPalletizingDraft ( this . draftIdentity ( ) ) }
catch ( error ) { this . error = formatApiError ( error , '一件代发入库任务加载失败' ) }
finally { this . loading = false }
} ,
async claimTask ( ) { await this . runMutation ( ( ) => claimDropshipPalletizationTask ( this . taskId , this . warehouseId ) , '任务领取成功' ) } ,
async resolveCarton ( value ) {
if ( this . loading || this . submitting ) return
if ( ! this . palletSetupReady ) { this . error = this . palletSetupMessage ; return }
const code = String ( value || this . boxCode || '' ) . trim ( ) . toUpperCase ( ) ; if ( ! code || this . loading ) return
this . boxCode = code ; this . loading = true ; this . resetMessages ( ) ; this . carton = null
try { this . carton = await resolveDropshipCarton ( this . taskId , this . warehouseId , code ) ; this . skuCounts = ( this . carton . skuLines || [ ] ) . map ( ( line ) => ( { ... line , actualQuantity : String ( line . actualQuantity ? ? line . expectedQuantity ? ? '' ) , discrepancyRemark : line . discrepancyRemark || '' } ) ) }
try { const resolved = await resolveDropshipWorkspaceCarton ( this . warehouseId , code ) ; this . scanTask = resolved . task ; this . carton = resolved . carton ; this . skuCounts = ( this . carton . skuLines || [ ] ) . map ( ( line ) => ( { ... line , actualQuantity : String ( line . actualQuantity ? ? line . expectedQuantity ? ? '' ) , discrepancyRemark : line . discrepancyRemark || '' } ) ) }
catch ( error ) { this . error = formatApiError ( error , '箱码解析失败' ) }
finally { this . loading = false }
} ,
async countCarton ( ) {
const skuLines = this . skuCounts . map ( ( line ) => ( { inboundDetailId : line . inboundDetailId , skuCode : line . skuCode , actualQuantity : Number ( line . actualQuantity ) , discrepancyAction : this . lineDiffers ( line ) ? 'ACCEPT_VARIANCE' : 'MATCH' , discrepancyRemark : this . lineDiffers ( line ) ? String ( line . discrepancyRemark || '' ) . trim ( ) : null } ) )
const result = await this . runMutation ( ( ) => countDropshipCarton ( this . taskId , { warehouseId : this . warehouseId , boxCode : this . carton . boxCode , palletNo : this . assignableCurrentPallet ? . palletNo || null , skuLines } ) , this . assignableCurrentPallet ? '本箱已清点并归托' : '本箱已完成入库清点' )
const result = await this . runMutation ( async ( ) => { await this . activateScanTask ( ) ; return countDropshipCarton ( this . taskId , { warehouseId : this . warehouseId , boxCode : this . carton . boxCode , palletNo : this . assignableCurrentPallet ? . palletNo || null , skuLines } ) } , this . assignableCurrentPallet ? '本箱已清点并归托' : '本箱已完成入库清点' )
if ( result ) { this . boxCode = '' ; this . carton = null ; this . skuCounts = [ ] }
} ,
async confirmCarton ( ) {
if ( ! this . canSubmitCarton || this . loading || this . submitting ) return
if ( this . isResolvedPendingCarton ) { await this . rebindResolvedCarton ( ) ; return }
await this . countCarton ( )
} ,
@@ -147,35 +156,62 @@
const targetPalletNo = this . assignableCurrentPallet . palletNo
const payload = { warehouseId : this . warehouseId , targetPalletNo }
payload . operationId = stableOperationId ( 'dropship-move' , String ( this . user ? . id ) + '-' + this . taskId , { cartonId : this . carton . cartonId , taskVersion : this . task . version , ... payload } )
const result = await this . runMutation ( ( ) => moveDropshipCarton ( this . taskId , this . carton . cartonId , payload ) , ` 本箱已归入 ${ targetPalletNo } ` )
const result = await this . runMutation ( async ( ) => { await this . activateScanTask ( ) ; return moveDropshipCarton ( this . taskId , this . carton . cartonId , payload ) } , ` 本箱已归入 ${ targetPalletNo } ` )
if ( result ) { this . boxCode = '' ; this . carton = null ; this . skuCounts = [ ] }
} ,
lineDiffers ( line ) { return Number ( line . actualQuantity ) !== Number ( line . expectedQuantity ) } ,
adjustQuantity ( index , step ) { const line = this . skuCounts [ index ] ; if ( line ) line . actualQuantity = String ( Math . max ( 0 , Number ( line . actualQuantity || 0 ) + step ) ) } ,
async selectPallet ( value ) {
if ( this . loading || this . submitting ) return
if ( ! this . palletSetupReady ) { this . error = this . palletSetupMessage ; return }
const code = String ( value || this . palletCode || '' ) . trim ( ) . toUpperCase ( ) ; const pallet = ( this . task ? . pallets || [ ] ) . find ( ( item ) => item . palletNo === code )
this . palletCode = code ; this . selectedPalletId = pallet ? String ( pallet . palletId ) : '' ; this . selectedPalletNo = code ; this . activeScan = 'boxCode' ; saveDropshipPalletizingDraft ( this . draftIdentity ( ) , { activePalletNo : code } )
const code = String ( value || this . palletCode || '' ) . trim ( ) . toUpperCase ( )
this . palletCode = code
this . loading = true ; this . resetMessages ( ) ; this . workspace = null
try { this . workspace = await resolveDropshipWorkspacePallet ( this . warehouseId , code ) ; this . selectedPalletNo = code ; this . palletCode = code ; this . selectedPalletId = String ( this . workspace . pallet . palletId ) ; this . activeScan = 'boxCode' ; saveDropshipPalletizingDraft ( this . draftIdentity ( ) , { activePalletNo : code } ) }
catch ( error ) { this . selectedPalletNo = '' ; this . error = formatApiError ( error , '托盘校验失败' ) ; return }
finally { this . loading = false }
const pallet = this . currentPallet
if ( pallet ? . status === 'SEALED' ) { this . notice = ` 托盘 ${ code } 已封托,可在托盘操作区解除封托 ` ; return }
if ( Number ( this . task ? . unboundCartons || 0 ) > 0 ) await this . runMutation ( ( ) => bindDropshipPendingCartons ( this . taskId , this . warehouseId , code , this . task . version ) , ` 待归托箱已绑定至 ${ code } ` )
else this . notice = pallet ? ` 当前托盘: ${ code } ` : ` 已选择仓库开放托盘 ${ code } , 清点箱码时将校验并归托 `
else this . notice = ` 已选择仓库开放托盘 ${ code } , 可连续扫描不同客户的箱码 `
} ,
async refreshPallet ( ) { if ( ! this . selectedPalletNo ) { this . workspace = null ; return } ; this . workspace = null ; this . workspace = await resolveDropshipWorkspacePallet ( this . warehouseId , this . selectedPalletNo ) } ,
memberForCarton ( carton ) { return this . palletMembers . find ( ( member ) => String ( member . inboundId ) === String ( carton . inboundId ) ) } ,
async activateScanTask ( ) {
const targetId = String ( this . scanTask ? . taskId || this . taskId )
let target = await getDropshipPalletizationTask ( targetId , this . warehouseId )
if ( target . taskStatus === 'PENDING' ) target = await claimDropshipPalletizationTask ( targetId , this . warehouseId )
this . taskId = targetId ; this . task = target
saveDropshipPalletizingDraft ( this . draftIdentity ( ) , { activePalletNo : this . selectedPalletNo } )
} ,
async activatePalletTask ( ) {
const member = this . palletMembers . find ( ( item ) => String ( item . taskId ) === this . taskId ) || this . palletMembers [ 0 ]
if ( ! member ) throw new Error ( '托盘没有已归托箱,请先清点归托' )
const target = await getDropshipPalletizationTask ( member . taskId , this . warehouseId )
this . taskId = String ( target . taskId ) ; this . task = target
} ,
draftIdentity ( ) { return { operatorId : this . user ? . id , taskId : this . taskId , warehouseId : this . warehouseId } } ,
async moveCarton ( carton , targetPalletNo ) {
if ( this . submitting || ! isOnline ( ) || ! this . palletSetupReady ) return
const payload = { warehouseId : this . warehouseId , targetPalletNo : targetPalletNo || null }
payload . operationId = stableOperationId ( 'dropship-move' , String ( this . user ? . id ) + '-' + this . taskId , { cartonId : carton . cartonId , taskVersion : this . task . version , ... payload } )
await this . runMutation ( ( ) => moveDropshipCarton ( this . taskId , carton . cartonId , payload ) , targetPalletNo ? '箱码已换托' : '箱码已移回待绑托区' )
const member = this . memberForCarton ( carton )
if ( ! member ) { this . error = '未找到箱码所属任务,请刷新托盘' ; return }
await this . runMutation ( async ( ) => { const target = await getDropshipPalletizationTask ( member . taskId , this . warehouseId ) ; this . taskId = String ( target . taskId ) ; this . task = target ; return moveDropshipCarton ( this . taskId , carton . cartonId , payload ) } , targetPalletNo ? '箱码已换托' : '箱码已移回待绑托区' )
} ,
continueOtherTask ( ) { uni . redirectTo ( { url : ` /pages/dropship-tasks/dropship-tasks?warehouseId= ${ encodeURIComponent ( this . warehouseId ) } &palletNo= ${ encodeURIComponent ( this . assignableCurrentPallet ? . palletNo || '' ) } ` } ) } ,
async sealPallet ( pallet ) {
if ( this . loading || this . submitting ) return
const content = this . palletMembers . map ( ( member ) => ` ${ member . customerName || '客户未关联' } / ${ member . inboundCode } : ${ member . cartonCount } 箱 ` ) . join ( '\n' )
uni . showModal ( { title : ` 确认封托 · ${ pallet . cartonCount } 箱 ` , content : ` ${ content } \ n请确认实物已装满,封托后按整托装柜。 ` , success : async ( answer ) => { if ( answer . confirm ) await this . runMutation ( async ( ) => { await this . activatePalletTask ( ) ; return sealDropshipPallet ( this . taskId , this . warehouseId , pallet ) } , ` ${ pallet . palletNo } 已封托 ` ) } } )
} ,
continueOtherTask ( ) { uni . redirectTo ( { url : ` /pages/dropship-tasks/dropship-tasks?warehouseId= ${ encodeURIComponent ( this . warehouseId ) } ` } ) } ,
async sealPallet ( pallet ) { await this . runMutation ( ( ) => sealDropshipPallet ( this . taskId , this . warehouseId , pallet ) , ` ${ pallet . palletNo } 已封托 ` ) } ,
openUnseal ( pallet ) { this . unsealTarget = pallet ; this . unsealOpen = true ; this . $refs . unsealPopup . open ( ) } ,
closeUnseal ( ) { this . unsealOpen = false ; this . $refs . unsealPopup ? . close ( ) ; this . unsealTarget = null } ,
handleUnsealPopupChange ( event ) { this . unsealOpen = Boolean ( event . show ) ; if ( ! event . show ) this . unsealTarget = null } ,
async confirmUnseal ( ) {
const pallet = this . unsealTarget ; if ( ! pallet || this . submitting ) return
this . $refs . unsealPopup . close ( ) ; this . unsealOpen = false
const result = await this . runMutation ( ( ) => unsealDropshipPallet ( this . taskId , this . warehouseId , pallet ) , ` ${ pallet . palletNo } 已解除封托 ` )
const result = await this . runMutation ( async ( ) => { await this . activatePalletTask ( ) ; return unsealDropshipPallet ( this . taskId , this . warehouseId , pallet ) } , ` ${ pallet . palletNo } 已解除封托 ` )
this . unsealTarget = null
if ( result ) { this . selectedPalletNo = pallet . palletNo ; saveDropshipPalletizingDraft ( this . draftIdentity ( ) , { activePalletNo : pallet . palletNo } ) }
} ,
@@ -189,6 +225,7 @@
? result
: await getDropshipPalletizationTask ( this . taskId , this . warehouseId )
this . notice = message
try { await this . refreshPallet ( ) } catch ( error ) { this . error = formatApiError ( error , '操作已成功,托盘汇总刷新失败,请刷新后继续' ) }
return result
}
catch ( error ) { this . error = formatApiError ( error , '操作失败' ) ; return null }
@@ -199,6 +236,8 @@
< / script >
< style scoped >
. member - row { display : flex ; justify - content : space - between ; gap : 8 px ; padding : 8 px 0 ; border - bottom : 1 px solid # edf1f5 ; font - size : 12 px ; }
. carton - owner { display : block ; color : # 667085 ; font - size : 12 px ; line - height : 20 px ; overflow - wrap : anywhere ; }
. content { padding : 0 0 32 px ; background : # fff ; }
. state , . message { margin - bottom : 10 px ; padding : 12 px ; border - radius : 9 px ; color : # 667085 ; font - size : 12 px ; line - height : 18 px ; text - align : center ; background : # fff ; }
. message . error { color : # b42318 ; background : # fff1f0 ; } . message . success { color : # 067647 ; background : # ecfdf3 ; }