优化
This commit is contained in:
@@ -13,7 +13,7 @@ const detail = {
|
||||
orderId: '90001', tenantId: '208', inboundCode: 'RK-001', mainStatus: 'WAIT_MEASURE',
|
||||
receivingWarehouseId: '700000000000000001', receivingWarehouseName: '深圳仓', destinationWarehouseName: '洛杉矶中转仓',
|
||||
channelCode: 'OLD', channelName: '原渠道', channelChanged: false,
|
||||
expectedArrivalAt: '2026-09-06T10:00:00', customerRemark: '原备注',
|
||||
expectedArrivalAt: '2026-09-06T10:00:00', estimatedVolumeCbm: 0.625, customerRemark: '原备注',
|
||||
},
|
||||
order: {
|
||||
order: { version: 7, receivingWarehouseId: '700000000000000001', channelCode: 'OLD', channelName: '原渠道', customerRemark: '原备注' },
|
||||
@@ -68,7 +68,7 @@ describe('OrderDeclarationEditorDialog', () => {
|
||||
|
||||
expect(ElMessageBox.confirm).toHaveBeenCalledWith(expect.stringContaining('原箱码继续有效,无需更换已打印箱唛'), '确认变更渠道', expect.any(Object))
|
||||
expect(ElMessageBox.confirm).toHaveBeenCalledWith(expect.stringContaining('纸面上的旧渠道文字不会自动变化'), '确认变更渠道', expect.any(Object))
|
||||
expect(updatePlatformUnifiedOrderDeclaration).toHaveBeenCalledWith('208', '90001', expect.objectContaining({ expectedVersion: 7, channelCode: 'NEW', channelName: '新渠道' }))
|
||||
expect(updatePlatformUnifiedOrderDeclaration).toHaveBeenCalledWith('208', '90001', expect.objectContaining({ expectedVersion: 7, estimatedVolumeCbm: 0.625, channelCode: 'NEW', channelName: '新渠道' }))
|
||||
expect(ElMessage.success).toHaveBeenCalledWith(expect.stringContaining('订单已标记为“曾变更渠道”'))
|
||||
expect(wrapper.emitted('updated')).toHaveLength(1)
|
||||
expect(wrapper.emitted('update:modelValue')).toContainEqual([false])
|
||||
|
||||
@@ -36,6 +36,7 @@ const form = reactive({
|
||||
expectedVersion: 0,
|
||||
customerRemark: '',
|
||||
expectedArrivalAt: '',
|
||||
estimatedVolumeCbm: null as number | null,
|
||||
channelCode: '',
|
||||
channelName: '',
|
||||
cargoes: [] as EditableCargo[],
|
||||
@@ -67,6 +68,7 @@ function resetForm() {
|
||||
form.expectedVersion = Number(snapshot?.version ?? 0)
|
||||
form.customerRemark = snapshot?.customerRemark || props.detail.summary.customerRemark || ''
|
||||
form.expectedArrivalAt = props.detail.summary.expectedArrivalAt || ''
|
||||
form.estimatedVolumeCbm = props.detail.summary.estimatedVolumeCbm ?? null
|
||||
form.channelCode = snapshot?.channelCode || props.detail.summary.channelCode || ''
|
||||
form.channelName = snapshot?.channelName || props.detail.summary.channelName || ''
|
||||
originalChannel.code = form.channelCode.trim()
|
||||
@@ -191,6 +193,7 @@ async function save() {
|
||||
expectedVersion: form.expectedVersion,
|
||||
customerRemark: nullable(form.customerRemark),
|
||||
expectedArrivalAt: nullable(form.expectedArrivalAt),
|
||||
estimatedVolumeCbm: form.estimatedVolumeCbm,
|
||||
channelCode: form.channelCode.trim(),
|
||||
channelName: form.channelName.trim(),
|
||||
cargoes: form.cargoes.map(({ key: _key, ...cargo }) => ({
|
||||
@@ -245,10 +248,11 @@ async function save() {
|
||||
|
||||
<el-form label-position="top" class="order-fields">
|
||||
<el-row :gutter="14">
|
||||
<el-col :span="8"><el-form-item label="渠道名称" required><el-select v-model="form.channelCode" aria-label="渠道名称" filterable clearable :loading="channelsLoading" placeholder="请选择正式渠道" @change="selectChannel"><el-option v-for="channel in channels" :key="channel.channelCode" :label="`${channel.channelName} · ${channel.channelCode}`" :value="channel.channelCode" /></el-select></el-form-item></el-col>
|
||||
<el-col :span="7"><el-form-item label="渠道名称" required><el-select v-model="form.channelCode" aria-label="渠道名称" filterable clearable :loading="channelsLoading" placeholder="请选择正式渠道" @change="selectChannel"><el-option v-for="channel in channels" :key="channel.channelCode" :label="`${channel.channelName} · ${channel.channelCode}`" :value="channel.channelCode" /></el-select></el-form-item></el-col>
|
||||
<el-col :span="4"><el-form-item label="渠道编码"><el-input :model-value="form.channelCode" readonly aria-label="渠道编码" /></el-form-item></el-col>
|
||||
<el-col :span="6"><el-form-item label="预计到货时间"><el-date-picker v-model="form.expectedArrivalAt" type="datetime" value-format="YYYY-MM-DDTHH:mm:ss" format="YYYY-MM-DD HH:mm" clearable /></el-form-item></el-col>
|
||||
<el-col :span="6"><el-form-item label="客户备注"><el-input v-model="form.customerRemark" maxlength="1000" show-word-limit /></el-form-item></el-col>
|
||||
<el-col :span="4"><el-form-item label="预估体积(m³)"><el-input-number v-model="form.estimatedVolumeCbm" :min="0.0001" :precision="4" :controls="false" /></el-form-item></el-col>
|
||||
<el-col :span="5"><el-form-item label="预计到货时间"><el-date-picker v-model="form.expectedArrivalAt" type="datetime" value-format="YYYY-MM-DDTHH:mm:ss" format="YYYY-MM-DD HH:mm" clearable /></el-form-item></el-col>
|
||||
<el-col :span="4"><el-form-item label="客户备注"><el-input v-model="form.customerRemark" maxlength="1000" show-word-limit /></el-form-item></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user