fix(client): keep Excel import on order list
This commit is contained in:
@@ -338,7 +338,8 @@ test('distills order creation into the confirmed prototype sections with server
|
||||
assert.match(source, /class="segmented-options"/)
|
||||
assert.match(source, /class="prototype-form-row prototype-form-row--tabs"/)
|
||||
assert.match(source, /<table class="cargo-edit-table">/)
|
||||
assert.match(source, /isCreatePage && !routeDraftId && canCreateOrder[\s\S]*Excel 批量导入/)
|
||||
assert.match(source, /auth\.hasPermission\('order:first-leg:create'\)[\s\S]*批量导入订单/)
|
||||
assert.doesNotMatch(source, /create-batch-import-entry|需要一次创建多条订单|页面上方“Excel 批量导入”/)
|
||||
assert.match(source, /导入成功的数据只创建草稿,不会直接提交审核/)
|
||||
assert.match(source, /下载正式模板[\s\S]*选择 Excel/)
|
||||
assert.match(source, /仅支持 \.xlsx,文件不超过 5MB、最多 50 行/)
|
||||
|
||||
@@ -1848,17 +1848,6 @@ async function searchOrders(model: QueryModel) {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<section v-if="isCreatePage && !routeDraftId && canCreateOrder" class="create-batch-import-entry" aria-label="Excel 批量下单">
|
||||
<div>
|
||||
<strong>需要一次创建多条订单?</strong>
|
||||
<span>下载正式 Excel 模板,填写后上传;导入成功的数据将创建为订单草稿,不会直接提交审核。</span>
|
||||
</div>
|
||||
<div class="create-batch-import-actions">
|
||||
<el-button :loading="batchTemplateDownloading" @click="downloadBatchTemplate"><Download :size="16" />下载 Excel 模板</el-button>
|
||||
<el-button type="primary" @click="openBatchImport"><Upload :size="16" />Excel 批量导入</el-button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div v-if="isCreatePage && supportingDataErrors.length" class="supporting-data-error" role="alert">
|
||||
<AlertTriangle :size="20" />
|
||||
<div><strong>下单配套数据加载失败</strong><span v-for="message in supportingDataErrors" :key="message">{{ message }}</span></div>
|
||||
@@ -1933,7 +1922,7 @@ async function searchOrders(model: QueryModel) {
|
||||
<section class="order-form-section prototype-section cargo-section">
|
||||
<div class="order-section-heading cargo-table-heading"><div><h3>货物明细</h3></div></div>
|
||||
<div class="cargo-table-toolbar">
|
||||
<span class="cargo-table-hint">可逐行维护货物明细;一次创建多条订单草稿请使用页面上方“Excel 批量导入”。</span>
|
||||
<span class="cargo-table-hint">可逐行维护货物明细;批量订单请返回订单列表使用正式 Excel 导入。</span>
|
||||
<div class="cargo-table-actions"><el-button @click="addCargoItem"><Plus :size="16" />添加行</el-button><el-button type="danger" plain :disabled="!selectedCargoIds.length" @click="removeSelectedCargoItems"><Trash2 :size="15" />删除所选行</el-button></div>
|
||||
</div>
|
||||
<div class="cargo-table-wrap">
|
||||
@@ -2261,12 +2250,6 @@ 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; }
|
||||
.create-batch-import-entry { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 14px 18px; border: 1px solid #d9e2ff; border-radius: 8px; background: #f7f9ff; }
|
||||
.create-batch-import-entry > div:first-child { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
|
||||
.create-batch-import-entry strong { color: var(--navy); font-size: 14px; }
|
||||
.create-batch-import-entry span { color: var(--muted); font-size: 12px; line-height: 1.5; }
|
||||
.create-batch-import-actions { display: flex; flex: 0 0 auto; gap: 8px; }
|
||||
.create-batch-import-actions :deep(.el-button) { min-height: 38px; margin-left: 0; }
|
||||
.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); }
|
||||
.order-form { width: min(100%, 1000px); margin: 0; padding: 0 0 12px; }
|
||||
@@ -2494,9 +2477,6 @@ async function searchOrders(model: QueryModel) {
|
||||
.product-image-field { grid-row: auto; }
|
||||
}
|
||||
@media (max-width: 720px) {
|
||||
.create-batch-import-entry { align-items: stretch; flex-direction: column; }
|
||||
.create-batch-import-actions { flex-direction: column; }
|
||||
.create-batch-import-actions :deep(.el-button) { width: 100%; }
|
||||
.first-leg-query-toolbar { padding: 12px; }
|
||||
.first-leg-query-toolbar :deep(.query-toolbar__filters) { display: flex; }
|
||||
:global(.client-main:has(> .first-leg-page:not(.is-create-route)) > .client-page-heading) { margin-bottom: 10px; }
|
||||
|
||||
Reference in New Issue
Block a user