优化
This commit is contained in:
@@ -23,6 +23,7 @@ function selectMode(mode: 'standard' | 'quick') {
|
||||
|
||||
<template>
|
||||
<section class="first-leg-create-hub">
|
||||
<h1 class="create-hub-title">头程下单</h1>
|
||||
<nav v-if="canQuickOrder" class="order-mode-switch" aria-label="头程下单方式">
|
||||
<button type="button" :class="{ active: activeMode === 'standard' }" :aria-current="activeMode === 'standard' ? 'page' : undefined" @click="selectMode('standard')"><FilePenLine :size="18" />普通下单</button>
|
||||
<button type="button" :class="{ active: activeMode === 'quick' }" :aria-current="activeMode === 'quick' ? 'page' : undefined" @click="selectMode('quick')"><Zap :size="18" />快速下单</button>
|
||||
@@ -33,5 +34,5 @@ function selectMode(mode: 'standard' | 'quick') {
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.first-leg-create-hub{display:grid;min-width:0;gap:14px}.order-mode-switch{display:inline-flex;width:max-content;padding:4px;border:1px solid #d9e2ec;border-radius:8px;background:#f4f7fa}.order-mode-switch button{display:inline-flex;height:38px;align-items:center;gap:8px;padding:0 20px;border:0;border-radius:6px;background:transparent;color:#607087;font:inherit;font-size:13px;font-weight:650;cursor:pointer}.order-mode-switch button.active{background:var(--primary);color:#fff;box-shadow:0 2px 6px rgba(23,107,135,.2)}.order-mode-switch button:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
|
||||
.first-leg-create-hub{display:grid;min-width:0;gap:12px}.create-hub-title{margin:0;color:var(--navy);font-size:24px;line-height:1.25}.order-mode-switch{display:inline-flex;width:max-content;padding:4px;border:1px solid #d9e2ec;border-radius:8px;background:#f4f7fa}.order-mode-switch button{display:inline-flex;height:38px;align-items:center;gap:8px;padding:0 20px;border:0;border-radius:6px;background:transparent;color:#607087;font:inherit;font-size:13px;font-weight:650;cursor:pointer}.order-mode-switch button.active{background:var(--primary);color:#fff;box-shadow:0 2px 6px rgba(23,107,135,.2)}.order-mode-switch button:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
|
||||
</style>
|
||||
|
||||
@@ -375,7 +375,7 @@ test('collects the backend-required first-leg fields', () => {
|
||||
assert.match(source, /form\.customsInspection = form\.items\.some\(\(item\) => item\.woodenProduct\) \? true : null/)
|
||||
assert.match(source, /木制品<small>勾选后自动商检<\/small>/)
|
||||
assert.doesNotMatch(source, /label="是否商检"/)
|
||||
assert.match(source, /第 \{\{ index \+ 1 \}\} 条须商检/)
|
||||
assert.match(source, /<small v-if="item\.woodenProduct">自动商检<\/small>/)
|
||||
})
|
||||
|
||||
test('distills order creation into the confirmed prototype sections with server pricing', () => {
|
||||
@@ -441,7 +441,12 @@ test('matches the prototype two-column create layout and reset action', () => {
|
||||
assert.match(editorShellSource, /submit-gradient 5s ease-in-out infinite/)
|
||||
assert.match(editorShellSource, /submit-shine 3\.2s ease-in-out infinite/)
|
||||
assert.match(editorShellSource, /@media \(prefers-reduced-motion: reduce\)/)
|
||||
assert.doesNotMatch(createHubSource, /<h1>头程下单<\/h1>|填写货物信息,创建新的头程运输订单/)
|
||||
assert.match(createHubSource, /<h1 class="create-hub-title">头程下单<\/h1>/)
|
||||
assert.doesNotMatch(createHubSource, /填写货物信息,创建新的头程运输订单/)
|
||||
assert.match(source, /\.is-create-route \.prototype-order-form \{[^}]*align-items: start/)
|
||||
assert.doesNotMatch(source, /\.is-create-route \.order-basic-section, \.is-create-route \.destination-section \{ height: 100%; \}/)
|
||||
assert.match(source, /\.is-create-route \.order-basic-section > \.order-section-heading, \.is-create-route \.destination-section > \.order-section-heading \{[^}]*height: 74px[^}]*min-height: 74px/)
|
||||
assert.match(source, /\.is-create-route \.order-basic-section > \.order-section-heading h3, \.is-create-route \.destination-section > \.order-section-heading h3 \{[^}]*font-size: 17px[^}]*line-height: 24px/)
|
||||
})
|
||||
|
||||
test('shows an optional LX inbound order number for one-click dropship orders', () => {
|
||||
|
||||
@@ -2550,14 +2550,14 @@ async function searchOrders(model: QueryModel) {
|
||||
.is-create-route { gap: 0; }
|
||||
.is-create-route .first-leg-editor-page { width: 100%; }
|
||||
.is-create-route .supporting-data-error, .is-create-route > .el-alert { margin-bottom: 14px; }
|
||||
.is-create-route .prototype-order-form { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 16px; margin: 0; padding: 0 0 16px; }
|
||||
.is-create-route .prototype-section { min-width: 0; margin: 0; padding: 0 24px 24px; border: 1px solid #dfe6ee; border-radius: 8px; background: #fff; }
|
||||
.is-create-route .prototype-order-form { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; margin: 0; padding: 0 0 14px; }
|
||||
.is-create-route .prototype-section { min-width: 0; margin: 0; padding: 0 20px 18px; border: 1px solid #dfe6ee; border-radius: 8px; background: #fff; }
|
||||
.is-create-route .prototype-section + .prototype-section { margin-top: 0; }
|
||||
.is-create-route .order-basic-section, .is-create-route .destination-section { height: 100%; }
|
||||
.is-create-route .cargo-section, .is-create-route .cost-estimate-section { grid-column: 1 / -1; }
|
||||
.is-create-route .order-section-heading { min-height: 66px; align-items: center; margin: 0 -24px 22px; padding: 15px 24px; border-bottom: 1px solid #e7ecf2; }
|
||||
.is-create-route .order-section-heading h3, .is-create-route .prototype-section:first-child > .order-section-heading h3 { margin: 0; color: var(--navy); font-size: 17px; font-weight: 700; }
|
||||
.is-create-route .order-section-heading p { margin-top: 4px; color: #8a98a8; }
|
||||
.is-create-route .order-basic-section > .order-section-heading, .is-create-route .destination-section > .order-section-heading { box-sizing: border-box; height: 74px; min-height: 74px; align-items: flex-start; margin: 0 -20px 16px; padding: 12px 20px; border-bottom: 1px solid #e7ecf2; }
|
||||
.is-create-route .order-basic-section > .order-section-heading h3, .is-create-route .destination-section > .order-section-heading h3 { margin: 0; color: var(--navy); font-size: 17px; font-weight: 700; line-height: 24px; }
|
||||
.is-create-route .cargo-section > .order-section-heading, .is-create-route .cost-estimate-section > .order-section-heading { min-height: 58px; align-items: flex-start; margin: 0 -20px 16px; padding: 12px 20px; border-bottom: 1px solid #e7ecf2; }
|
||||
.is-create-route .order-section-heading p { margin-top: 2px; color: #8a98a8; }
|
||||
.is-create-route .prototype-form-flow, .is-create-route .destination-form-flow { width: 100%; max-width: none; }
|
||||
.is-create-route .prototype-form-row, .is-create-route .prototype-form-row--wide, .is-create-route .prototype-form-row--compact, .is-create-route .prototype-form-row--short, .is-create-route .prototype-form-row--tabs { grid-template-columns: 120px minmax(0, 1fr); }
|
||||
.is-create-route .prototype-form-row :deep(.el-form-item__label) { display: flex; height: 40px; min-height: 40px; align-items: center; justify-content: flex-end; padding: 0 18px 0 0; font-size: 13px; line-height: 1.35; text-align: right; }
|
||||
@@ -2566,12 +2566,13 @@ async function searchOrders(model: QueryModel) {
|
||||
.is-create-route .compact-transport-grid > :deep(.el-form-item), .is-create-route .compact-transport-grid > :deep(.el-form-item:nth-child(1)), .is-create-route .compact-transport-grid > :deep(.el-form-item:nth-child(6)), .is-create-route .compact-transport-grid > :deep(.el-form-item:nth-child(7)) { grid-template-columns: 120px minmax(0, 1fr); }
|
||||
.is-create-route .compact-transport-grid > :deep(.el-form-item__label) { display: flex; height: 40px; min-height: 40px; align-items: center; justify-content: flex-end; padding: 0 18px 0 0; line-height: 1.35; text-align: right; }
|
||||
.is-create-route .selected-destination { width: auto; margin-left: 138px; }
|
||||
.is-create-route .shipping-form-flow .prototype-form-row, .is-create-route .destination-form-flow .prototype-form-row, .is-create-route .compact-transport-grid > :deep(.el-form-item) { margin-bottom: 8px; }
|
||||
.is-create-route .cargo-table-heading, .is-create-route .cost-estimate-section .order-section-heading { margin-bottom: 16px; }
|
||||
.order-form { width: min(100%, 1000px); margin: 0; padding: 0 0 12px; }
|
||||
.order-form.is-dialog-order-form { width: 100%; max-width: none; }
|
||||
.is-dialog-order-form > .cargo-section, .is-dialog-order-form > .cost-estimate-section { width: 100%; max-width: none; }
|
||||
.order-form :deep(.el-form-item__error) { position: static; padding-top: 6px; overflow-wrap: anywhere; line-height: 1.45; }
|
||||
.order-form-section + .order-form-section { margin-top: 30px; padding-top: 28px; border-top: 1px solid #edf0f5; }
|
||||
.order-form-section + .order-form-section { border-top: 1px solid #edf0f5; }
|
||||
.order-form-section h3 { margin: 0 0 16px; color: var(--navy); font-size: 16px; }
|
||||
.order-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
|
||||
.order-form-grid > *, .cargo-form-grid > * { min-width: 0; }
|
||||
|
||||
Reference in New Issue
Block a user