From 4f515982f47da3b82d7b309ebe3db9c5f841157f Mon Sep 17 00:00:00 2001
From: ouyangxq <775153912@qq.com>
Date: Sun, 20 Sep 2026 18:25:23 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/FirstLegOrderCreateHubView.vue | 2 +-
.../views/FirstLegOrdersView.test.mjs | 10 ++++
.../first-leg/views/FirstLegOrdersView.vue | 46 +++++++++++++++++--
3 files changed, 52 insertions(+), 6 deletions(-)
diff --git a/src/modules/first-leg/views/FirstLegOrderCreateHubView.vue b/src/modules/first-leg/views/FirstLegOrderCreateHubView.vue
index b1ac700..6825425 100644
--- a/src/modules/first-leg/views/FirstLegOrderCreateHubView.vue
+++ b/src/modules/first-leg/views/FirstLegOrderCreateHubView.vue
@@ -37,5 +37,5 @@ function selectMode(mode: 'standard' | 'quick') {
diff --git a/src/modules/first-leg/views/FirstLegOrdersView.test.mjs b/src/modules/first-leg/views/FirstLegOrdersView.test.mjs
index e973b3c..7427a14 100644
--- a/src/modules/first-leg/views/FirstLegOrdersView.test.mjs
+++ b/src/modules/first-leg/views/FirstLegOrdersView.test.mjs
@@ -422,6 +422,16 @@ test('distills order creation into the confirmed prototype sections with server
assert.doesNotMatch(source, /v-model="form\.(?:businessType|origin|destination|priority|tradeTerm)"/)
})
+test('matches the prototype two-column create layout and reset action', () => {
+ assert.match(source, /class="order-form-section prototype-section order-basic-section"/)
+ assert.match(source, /
客户下单<\/h3>
创建新订单<\/p>/)
+ assert.match(source, /\.is-create-route \.prototype-order-form \{[^}]*grid-template-columns: repeat\(2, minmax\(0, 1fr\)\)/)
+ assert.match(source, /\.is-create-route \.cargo-section, \.is-create-route \.cost-estimate-section \{ grid-column: 1 \/ -1; \}/)
+ assert.match(source, /async function resetCreateForm\(\)/)
+ assert.match(source, /确认清空当前填写的订单内容并恢复默认值/)
+ assert.match(source, /v-if="isCreatePage"[^>]*@click="resetCreateForm"[^>]*>]*\/>重置/)
+})
+
test('shows an optional LX inbound order number for one-click dropship orders', () => {
assert.match(source, /v-if="form\.fulfillmentType === 'ONE_CLICK_DROPSHIP'" label="LX入库单号" prop="lxCode"/)
assert.match(source, /v-model="form\.lxCode"[^>]*placeholder="请输入LX入库单号"/)
diff --git a/src/modules/first-leg/views/FirstLegOrdersView.vue b/src/modules/first-leg/views/FirstLegOrdersView.vue
index 9b9082e..e1b4767 100644
--- a/src/modules/first-leg/views/FirstLegOrdersView.vue
+++ b/src/modules/first-leg/views/FirstLegOrdersView.vue
@@ -1485,6 +1485,27 @@ function closeEditor() {
})
}
+async function resetCreateForm() {
+ if (saving.value) return
+ if (editorDirty.value) {
+ try {
+ await ElMessageBox.confirm('确认清空当前填写的订单内容并恢复默认值?', '重置订单', {
+ type: 'warning',
+ confirmButtonText: '确认重置',
+ cancelButtonText: '继续填写',
+ })
+ } catch (error) {
+ if (error === 'cancel' || error === 'close') return
+ throw error
+ }
+ }
+ editingId.value = undefined
+ replaceForm(emptyDraft())
+ await autofillWarehouseSelections()
+ resetEditorValidation()
+ await router.replace({ name: 'first-leg-order-create' })
+}
+
function addCargoItem() {
form.items.push(createEmptyCargoItem(`new-cargo-${++cargoSequence}`))
resetEditorValidation()
@@ -2134,8 +2155,8 @@ async function searchOrders(model: QueryModel) {
-
- 返回保存草稿{{ companySubmissionBlocked ? '提交前需完成资料审核' : '提交订单' }}
+ 重置返回保存草稿{{ companySubmissionBlocked ? '提交前需完成资料审核' : '提交订单' }}
@@ -2528,8 +2549,22 @@ 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 { width: 100%; margin: 0; padding: 0 0 16px; }
-.is-create-route .prototype-section:not(.cargo-section):not(.cost-estimate-section):not(.destination-section) { width: min(100%, 900px); }
+.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-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 .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) { padding-right: 18px; font-size: 13px; }
+.is-create-route .segmented-options, .is-create-route .destination-type-options { width: 100%; max-width: 560px; background: #f3f6f9; }
+.is-create-route .compact-transport-grid { width: 100%; margin-top: 4px; }
+.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 .selected-destination { width: auto; margin-left: 138px; }
+.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; }
@@ -2604,6 +2639,7 @@ async function searchOrders(model: QueryModel) {
.compact-transport-grid :deep(.el-form-item__label) { color: #4d5a6c; font-size: 13px; }
.shipping-form-flow { max-width: 900px; }
.prototype-order-form > .prototype-section:first-child { width: 100%; }
+.is-create-route .prototype-order-form > .prototype-section:first-child > .order-section-heading { margin-top: 0; }
.shipping-form-flow .prototype-form-row { margin-bottom: 10px; }
.shipping-form-flow .prototype-form-row--tabs { margin-bottom: 12px; }
.compact-transport-grid { display: grid; width: 100%; grid-template-columns: 1fr; gap: 0; margin: 6px 0 0; }
From e89b9d3722c1b5f670e005632b299061de65f0f4 Mon Sep 17 00:00:00 2001
From: ouyangxq <775153912@qq.com>
Date: Sun, 20 Sep 2026 18:51:13 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/FirstLegOrderEditorShell.vue | 17 ++++++++++++++---
.../first-leg/views/FirstLegOrdersView.test.mjs | 11 ++++++++++-
.../first-leg/views/FirstLegOrdersView.vue | 13 +++++++++----
3 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/src/modules/first-leg/components/FirstLegOrderEditorShell.vue b/src/modules/first-leg/components/FirstLegOrderEditorShell.vue
index d790f7b..faa6a22 100644
--- a/src/modules/first-leg/components/FirstLegOrderEditorShell.vue
+++ b/src/modules/first-leg/components/FirstLegOrderEditorShell.vue
@@ -42,14 +42,24 @@ const emit = defineEmits<{