优化
This commit is contained in:
@@ -48,6 +48,13 @@ test('exposes real list, draft, submit, and detail workflow entries without canc
|
||||
assert.doesNotMatch(source, /cancelOrder|取消订单/)
|
||||
})
|
||||
|
||||
test('returns edited submissions to the refreshed order list instead of opening detail', () => {
|
||||
const submitSource = source.slice(source.indexOf('async function submitOrder()'), source.indexOf('async function searchOrders'))
|
||||
assert.match(submitSource, /if \(isCreatePage\.value\)[\s\S]*router\.push\(\{ name: 'first-leg-orders' \}\)[\s\S]*return/)
|
||||
assert.match(submitSource, /await loadPageData\(\)/)
|
||||
assert.doesNotMatch(submitSource, /first-leg-order-detail/)
|
||||
})
|
||||
|
||||
test('copies an order into the dedicated create page without reusing order identity', () => {
|
||||
assert.match(source, /key: 'copy', label: '复制下单'/)
|
||||
assert.match(source, /name: 'first-leg-order-create'[\s\S]*copyFrom: order\.id/)
|
||||
@@ -478,6 +485,9 @@ test('shows field-level validation and concise guidance for required order input
|
||||
assert.match(source, /prop="shipperPartySnapshot\.contactName" required/)
|
||||
assert.match(source, /prop="consigneePartySnapshot\.address" required/)
|
||||
assert.match(source, /:prop="`items\.\$\{index\}\.cargoNameCn`" required/)
|
||||
assert.match(source, /form\.destinationType === 'FBA' \|\| form\.fulfillmentType === 'ONE_CLICK_DROPSHIP' \? '必填' : '选填'/)
|
||||
assert.match(source, /SKU NO\. 和 UPC NO\. 均为选填项/)
|
||||
assert.match(source, /一件代发必须填写 SKU/)
|
||||
assert.match(source, /:prop="`items\.\$\{index\}\.grossWeightKg`" required/)
|
||||
assert.match(source, /<span class="required-field-mark" aria-hidden="true">\*<\/span>总毛重/)
|
||||
assert.match(source, /<span class="required-field-mark" aria-hidden="true">\*<\/span>总体积/)
|
||||
|
||||
@@ -1954,7 +1954,7 @@ async function submitOrder() {
|
||||
const knownCompanyAuditStatus = companyAuditLoaded.value ? tenantStore.company.auditStatus : undefined
|
||||
const savedOrder = await store.saveDraft(cloneDraft(form), tenantStore.company.companyName, editingId.value)
|
||||
editingId.value = savedOrder.id
|
||||
const order = await store.submitSaved(savedOrder.id, knownCompanyAuditStatus)
|
||||
await store.submitSaved(savedOrder.id, knownCompanyAuditStatus)
|
||||
markEditorClean()
|
||||
editorOpen.value = false
|
||||
if (isCreatePage.value) {
|
||||
@@ -1963,7 +1963,7 @@ async function submitOrder() {
|
||||
ElMessage.success('订单已提交,等待平台审核')
|
||||
return
|
||||
}
|
||||
await router.push({ name: 'first-leg-order-detail', params: { orderId: order.id } })
|
||||
await loadPageData()
|
||||
ElMessage.success('订单已提交,等待平台审核')
|
||||
} catch (error) {
|
||||
ElMessage.error(error instanceof Error ? error.message : '订单提交失败')
|
||||
@@ -2213,7 +2213,7 @@ async function searchOrders(model: QueryModel) {
|
||||
<table class="cargo-edit-table">
|
||||
<thead><tr>
|
||||
<th class="cargo-check-cell"><el-checkbox :model-value="allCargoSelected" :indeterminate="someCargoSelected" aria-label="全选货物" @change="toggleAllCargoItems" /></th><th class="cargo-index-cell">#</th>
|
||||
<th>SKU NO.<small>SKU必填</small></th><th>中文品名</th><th class="cargo-image-column">图片</th><th>英文品名</th><th>报关 HS CODE</th><th>清关 HS CODE</th><th>包装类型</th><th>材质</th><th class="cargo-switch-column">危险品</th><th class="cargo-switch-column">木制品<small>勾选后须商检</small></th>
|
||||
<th>SKU NO.<small>{{ form.destinationType === 'FBA' || form.fulfillmentType === 'ONE_CLICK_DROPSHIP' ? '必填' : '选填' }}</small></th><th>中文品名</th><th class="cargo-image-column">图片</th><th>英文品名</th><th>报关 HS CODE</th><th>清关 HS CODE</th><th>包装类型</th><th>材质</th><th class="cargo-switch-column">危险品</th><th class="cargo-switch-column">木制品<small>勾选后须商检</small></th>
|
||||
<th class="cargo-number-column">箱规长 cm</th><th class="cargo-number-column">箱规宽 cm</th><th class="cargo-number-column">箱规高 cm</th><th class="cargo-number-column">每箱数量</th><th class="cargo-number-column">箱数</th><th class="cargo-number-column"><span class="required-field-mark" aria-hidden="true">*</span>总毛重</th><th class="cargo-number-column"><span class="required-field-mark" aria-hidden="true">*</span>总体积</th><th class="cargo-number-column">总数量</th><th class="cargo-number-column">总净重</th>
|
||||
<th>清关申报单价 USD</th><th>清关申报金额 USD</th><th>用途</th><th>型号</th><th>品牌</th><th class="cargo-dimensions-column">产品规格 长×宽×高</th><th>货件编号<small>货件编号必填</small></th><th>跟踪编号<small>跟踪编号必填</small></th><th>UPC NO.</th><th>备注</th><th class="cargo-operation-column">操作</th>
|
||||
</tr></thead>
|
||||
@@ -2233,7 +2233,7 @@ async function searchOrders(model: QueryModel) {
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="cargo-table-hint"><span v-if="form.fulfillmentType === 'ONE_CLICK_DROPSHIP'">每个箱组默认装一个 SKU;同一箱内有多个 SKU 时点击“添加 SKU”,箱数、箱规、重量和体积只填写一次。</span><span v-else>SKU NO.、货件编号、跟踪编号为 FBA 货物必填项,UPC NO. 选填</span></div>
|
||||
<div class="cargo-table-hint"><span v-if="form.fulfillmentType === 'ONE_CLICK_DROPSHIP'">一件代发必须填写 SKU;每个箱组默认装一个 SKU,同一箱内有多个 SKU 时点击“添加 SKU”,箱数、箱规、重量和体积只填写一次。</span><span v-else-if="form.destinationType === 'FBA'">SKU NO.、货件编号、跟踪编号为 FBA 货物必填项,UPC NO. 选填</span><span v-else>SKU NO. 和 UPC NO. 均为选填项</span></div>
|
||||
</section>
|
||||
|
||||
<section class="order-form-section prototype-section cost-estimate-section" aria-label="费用预估">
|
||||
|
||||
Reference in New Issue
Block a user