优化
This commit is contained in:
@@ -122,6 +122,7 @@ export interface ProductImageUploadResult {
|
||||
export interface FirstLegOrderSaveRequest {
|
||||
inboundCode?: string
|
||||
customerName: string
|
||||
fulfillmentType?: 'STANDARD' | 'ONE_CLICK_DROPSHIP'
|
||||
transportMode: ApiTransportMode
|
||||
tradeTerm?: string
|
||||
destinationCountryCode: string
|
||||
@@ -183,6 +184,7 @@ export interface MerchantFirstLegOrder {
|
||||
orderNo: string | null
|
||||
customerId: number | string | null
|
||||
customerName: string
|
||||
fulfillmentType?: 'STANDARD' | 'ONE_CLICK_DROPSHIP' | null
|
||||
status: ApiFirstLegStatus
|
||||
transportMode?: ApiTransportMode
|
||||
tradeTerm: string | null
|
||||
|
||||
@@ -105,6 +105,7 @@ function savePayload(draft: FirstLegOrderDraft, warehouse: ClientWarehouse, cust
|
||||
return {
|
||||
inboundCode: draft.inboundCode?.trim() || undefined,
|
||||
customerName: customerName.trim(),
|
||||
fulfillmentType: draft.fulfillmentType ?? 'STANDARD',
|
||||
transportMode: apiTransport(draft),
|
||||
tradeTerm: draft.tradeTerm || undefined,
|
||||
destinationCountryCode: draft.destinationCountryCode.trim().toUpperCase(),
|
||||
@@ -309,7 +310,7 @@ function mapOrder(order: MerchantFirstLegOrder, warehouses: PlatformReceivingWar
|
||||
return {
|
||||
id: String(order.id ?? order.orderId ?? ''), orderNo: order.orderNo, referenceNo: order.referenceId ?? '',
|
||||
transportMode: order.transportMode ? clientTransport(order) : null,
|
||||
businessType: 'EXPORT', origin: shipper?.city ?? '', destination: order.destinationWarehouseName || order.destinationCountryCode || '',
|
||||
businessType: 'EXPORT', fulfillmentType: order.fulfillmentType ?? 'STANDARD', origin: shipper?.city ?? '', destination: order.destinationWarehouseName || order.destinationCountryCode || '',
|
||||
receivingWarehouseId: String(order.receivingWarehouseId), receivingWarehouseName: order.receivingWarehouseName,
|
||||
receivingWarehouseSnapshot: orderWarehouseSnapshot(order, warehouse), expectedDepartureDate: order.expectedShipDate ?? '', etd: '', eta: '',
|
||||
shipperPartyId: shipper?.id ?? '', shipperPartySnapshot: shipper, shipper: shipper?.name ?? '',
|
||||
|
||||
@@ -98,6 +98,7 @@ export interface FirstLegOrder {
|
||||
referenceNo: string
|
||||
transportMode: FirstLegTransportMode | null
|
||||
businessType: FirstLegBusinessType
|
||||
fulfillmentType?: 'STANDARD' | 'ONE_CLICK_DROPSHIP'
|
||||
origin: string
|
||||
destination: string
|
||||
receivingWarehouseId: string
|
||||
@@ -156,6 +157,7 @@ export type FirstLegOrderDraft = Omit<Pick<
|
||||
| 'referenceNo'
|
||||
| 'transportMode'
|
||||
| 'businessType'
|
||||
| 'fulfillmentType'
|
||||
| 'origin'
|
||||
| 'destination'
|
||||
| 'receivingWarehouseId'
|
||||
|
||||
@@ -121,7 +121,7 @@ export function validateFirstLegOrderDraft(draft: FirstLegOrderDraft) {
|
||||
const line = `第 ${index + 1} 条货物`
|
||||
if (!item.cargoNameCn.trim()) errors.push(`${line}缺少中文品名`)
|
||||
if (!item.packageType.trim()) errors.push(`${line}缺少包装类型`)
|
||||
if (draft.destinationType === 'FBA' && !item.sku.trim()) errors.push(`${line}缺少客户 SKU`)
|
||||
if ((draft.destinationType === 'FBA' || draft.fulfillmentType === 'ONE_CLICK_DROPSHIP') && !item.sku.trim()) errors.push(`${line}缺少客户 SKU`)
|
||||
if (draft.destinationType === 'FBA' && !item.shipmentId.trim()) errors.push(`${line}缺少货件编号`)
|
||||
if (draft.destinationType === 'FBA' && !item.referenceId.trim()) errors.push(`${line}缺少跟踪编号`)
|
||||
if (!Number.isInteger(item.pieces) || item.pieces <= 0) errors.push(`${line}件数必须为正整数`)
|
||||
|
||||
@@ -347,6 +347,7 @@ function emptyDraft(): FirstLegOrderDraft {
|
||||
referenceNo: '',
|
||||
transportMode: 'FCL',
|
||||
businessType: 'EXPORT',
|
||||
fulfillmentType: 'STANDARD',
|
||||
origin: '',
|
||||
destination: '',
|
||||
receivingWarehouseId: '',
|
||||
@@ -1749,6 +1750,7 @@ async function searchOrders(model: QueryModel) {
|
||||
<section class="order-form-section prototype-section">
|
||||
<div class="order-section-heading"><div><h3>客户下单</h3><p>先选择货物如何送到国内收货仓,并填写本次运输安排。</p></div></div>
|
||||
<div class="prototype-form-flow shipping-form-flow">
|
||||
<el-form-item label="履约类型" prop="fulfillmentType" required class="prototype-form-row prototype-form-row--tabs"><el-radio-group v-model="form.fulfillmentType" class="segmented-options"><el-radio-button value="STANDARD">普通头程</el-radio-button><el-radio-button value="ONE_CLICK_DROPSHIP">一件代发</el-radio-button></el-radio-group><small v-if="form.fulfillmentType === 'ONE_CLICK_DROPSHIP'" class="field-guidance">测量完成后不办理国内库存入库,将直接推送 PDA 合托。</small></el-form-item>
|
||||
<el-form-item label="取货方式" prop="pickupMethod" required class="prototype-form-row prototype-form-row--tabs"><el-radio-group v-model="form.pickupMethod" class="segmented-options" @change="changePickupMethod"><el-radio-button value="SELF_EXPRESS">快递自送</el-radio-button><el-radio-button value="PICKUP">我司提货</el-radio-button><el-radio-button value="SELF_TRUCK">卡车自送</el-radio-button></el-radio-group></el-form-item>
|
||||
<template v-if="form.pickupMethod === 'PICKUP' && form.shipperPartySnapshot">
|
||||
<el-form-item label="提货联系人" prop="shipperPartySnapshot.contactName" required :rules="requiredTextRules('请输入提货联系人')" class="prototype-form-row prototype-form-row--compact"><el-input v-model="form.shipperPartySnapshot.contactName" maxlength="50" placeholder="请输入联系人姓名" /></el-form-item>
|
||||
|
||||
Reference in New Issue
Block a user