fix(admin): default manual node times to now
This commit is contained in:
@@ -195,8 +195,8 @@ const fulfillmentEvents = computed<FulfillmentEvent[]>(() => {
|
||||
})
|
||||
function eventTagType(type: FulfillmentEvent['type']) { return ({ '仓内操作': 'info', '确认离仓': 'success', '船运节点': 'primary', '人工补录': 'warning', '异常': 'danger' } as const)[type] }
|
||||
|
||||
function resetManualForm() {
|
||||
Object.assign(manualForm, { standardNode: '', estimatedAt: '', actualAt: '', locationCode: '', locationName: '', reason: '' })
|
||||
function resetManualForm(initialTime = '') {
|
||||
Object.assign(manualForm, { standardNode: '', estimatedAt: initialTime, actualAt: initialTime, locationCode: '', locationName: '', reason: '' })
|
||||
manualError.value = null; manualValidationError.value = ''
|
||||
}
|
||||
function createIdempotencyKey() { return globalThis.crypto?.randomUUID?.() || `carrier-node-${Date.now()}-${Math.random().toString(16).slice(2)}` }
|
||||
@@ -206,7 +206,8 @@ function localDateTimeNow() {
|
||||
}
|
||||
function openManualDialog() {
|
||||
if (!props.containerBookingId) return
|
||||
resetManualForm(); manualIdempotencyKey.value = createIdempotencyKey(); manualObservedAt.value = localDateTimeNow(); manualDialogOpen.value = true
|
||||
const now = localDateTimeNow()
|
||||
resetManualForm(now); manualIdempotencyKey.value = createIdempotencyKey(); manualObservedAt.value = now; manualDialogOpen.value = true
|
||||
}
|
||||
async function submitManualNode() {
|
||||
manualValidationError.value = ''
|
||||
|
||||
Reference in New Issue
Block a user