style: simplify order entry and highlight declaring customs rows
This commit is contained in:
@@ -18,7 +18,6 @@ const emit = defineEmits<{
|
|||||||
<section v-if="page" class="first-leg-editor-page">
|
<section v-if="page" class="first-leg-editor-page">
|
||||||
<div class="editor-page-nav">
|
<div class="editor-page-nav">
|
||||||
<el-button link type="primary" @click="emit('back')"><ArrowLeft :size="17" />返回订单列表</el-button>
|
<el-button link type="primary" @click="emit('back')"><ArrowLeft :size="17" />返回订单列表</el-button>
|
||||||
<span>可先保存草稿,确认无误后再提交平台审核</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="editor-page-body"><slot /></div>
|
<div class="editor-page-body"><slot /></div>
|
||||||
<footer class="editor-page-footer"><slot name="footer" /></footer>
|
<footer class="editor-page-footer"><slot name="footer" /></footer>
|
||||||
@@ -44,7 +43,6 @@ const emit = defineEmits<{
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.first-leg-editor-page { min-width: 0; padding-bottom: 72px; border: 1px solid #edf0f5; background: #fff; box-shadow: 0 5px 18px rgba(15, 31, 58, .04); }
|
.first-leg-editor-page { min-width: 0; padding-bottom: 72px; border: 1px solid #edf0f5; background: #fff; box-shadow: 0 5px 18px rgba(15, 31, 58, .04); }
|
||||||
.editor-page-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 5px 16px; border-bottom: 1px solid #edf0f5; }
|
.editor-page-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 5px 16px; border-bottom: 1px solid #edf0f5; }
|
||||||
.editor-page-nav span { color: var(--muted); font-size: 12px; }
|
|
||||||
.editor-page-body { padding: 16px 20px 24px; }
|
.editor-page-body { padding: 16px 20px 24px; }
|
||||||
.editor-page-footer { position: fixed; z-index: 18; right: 0; bottom: 0; left: 224px; display: flex; min-height: 68px; align-items: center; justify-content: center; padding: 10px 24px; border-top: 1px solid #dfe6ee; background: rgba(255, 255, 255, 0.97); box-shadow: 0 -6px 18px rgba(15, 31, 58, .08); backdrop-filter: blur(10px); }
|
.editor-page-footer { position: fixed; z-index: 18; right: 0; bottom: 0; left: 224px; display: flex; min-height: 68px; align-items: center; justify-content: center; padding: 10px 24px; border-top: 1px solid #dfe6ee; background: rgba(255, 255, 255, 0.97); box-shadow: 0 -6px 18px rgba(15, 31, 58, .08); backdrop-filter: blur(10px); }
|
||||||
.editor-page-footer :deep(.editor-actions) { width: min(100%, 900px); justify-content: center; }
|
.editor-page-footer :deep(.editor-actions) { width: min(100%, 900px); justify-content: center; }
|
||||||
@@ -70,7 +68,6 @@ const emit = defineEmits<{
|
|||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
.first-leg-editor-page { padding-bottom: 0; }
|
.first-leg-editor-page { padding-bottom: 0; }
|
||||||
.editor-page-nav { align-items: flex-start; flex-direction: column; gap: 2px; padding: 10px 16px; }
|
.editor-page-nav { align-items: flex-start; flex-direction: column; gap: 2px; padding: 10px 16px; }
|
||||||
.editor-page-nav span { padding-left: 1px; line-height: 1.5; }
|
|
||||||
.editor-page-body { padding: 18px 16px 24px; }
|
.editor-page-body { padding: 18px 16px 24px; }
|
||||||
.editor-page-footer { position: sticky; bottom: 0; left: auto; padding: 10px 16px; }
|
.editor-page-footer { position: sticky; bottom: 0; left: auto; padding: 10px 16px; }
|
||||||
:global(.first-leg-editor-dialog.el-dialog) { width: calc(100vw - 24px) !important; height: 96vh; margin-top: 2vh; }
|
:global(.first-leg-editor-dialog.el-dialog) { width: calc(100vw - 24px) !important; height: 96vh; margin-top: 2vh; }
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ function rowActions(row: object): TableAction[] {
|
|||||||
return [{ key: 'documents', label: '查看资料', disabled: loading.value, run: () => openDetail(row) }]
|
return [{ key: 'documents', label: '查看资料', disabled: loading.value, run: () => openDetail(row) }]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function rowClassName({ row }: { row: CustomsDocumentRow }) {
|
||||||
|
return row.detail.merchantStatus === 'DECLARING' ? 'customs-row-declaring' : ''
|
||||||
|
}
|
||||||
|
|
||||||
function statusLabel(detail: MerchantCustomsContainer) {
|
function statusLabel(detail: MerchantCustomsContainer) {
|
||||||
return detail.merchantStatus ? MERCHANT_CUSTOMS_STATUS_LABELS[detail.merchantStatus] ?? '—' : '—'
|
return detail.merchantStatus ? MERCHANT_CUSTOMS_STATUS_LABELS[detail.merchantStatus] ?? '—' : '—'
|
||||||
}
|
}
|
||||||
@@ -98,7 +102,7 @@ onMounted(() => { void load() })
|
|||||||
<div class="customs-page">
|
<div class="customs-page">
|
||||||
<QueryToolbar v-model="queryModel" layout="grid" ariaLabel="报关资料查询条件" :fields="queryFields" @search="search" />
|
<QueryToolbar v-model="queryModel" layout="grid" ariaLabel="报关资料查询条件" :fields="queryFields" @search="search" />
|
||||||
<section class="customs-card">
|
<section class="customs-card">
|
||||||
<DataTable v-model:page="page" v-model:page-size="pageSize" :data="pagedRecords" :columns="columns" :loading="loading" :total="filteredRecords.length" :page-sizes="[10, 20, 50, 100]" :row-actions="rowActions" row-key="order.id" :empty-text="emptyText">
|
<DataTable v-model:page="page" v-model:page-size="pageSize" :data="pagedRecords" :columns="columns" :loading="loading" :total="filteredRecords.length" :page-sizes="[10, 20, 50, 100]" :row-actions="rowActions" :row-class-name="rowClassName" row-key="order.id" :empty-text="emptyText">
|
||||||
<template #toolbar><strong class="customs-list-heading">资料列表<CustomsHelp title="资料统计口径"><p>统计为本客户同柜退税货物汇总,资料覆盖按入仓码计。</p></CustomsHelp></strong></template>
|
<template #toolbar><strong class="customs-list-heading">资料列表<CustomsHelp title="资料统计口径"><p>统计为本客户同柜退税货物汇总,资料覆盖按入仓码计。</p></CustomsHelp></strong></template>
|
||||||
<template #toolbar-actions><el-button :loading="loading" @click="load"><RefreshCcw :size="16" />刷新</el-button></template>
|
<template #toolbar-actions><el-button :loading="loading" @click="load"><RefreshCcw :size="16" />刷新</el-button></template>
|
||||||
<template v-if="errorMessage" #error><div class="state-error" role="alert"><span>{{ errorMessage }}</span><el-button :loading="loading" @click="load">重新加载</el-button></div></template>
|
<template v-if="errorMessage" #error><div class="state-error" role="alert"><span>{{ errorMessage }}</span><el-button :loading="loading" @click="load">重新加载</el-button></div></template>
|
||||||
@@ -117,5 +121,7 @@ onMounted(() => { void load() })
|
|||||||
.customs-page { display: grid; gap: var(--client-section-gap); }
|
.customs-page { display: grid; gap: var(--client-section-gap); }
|
||||||
.customs-list-heading { display: flex; align-items: center; gap: 4px; }
|
.customs-list-heading { display: flex; align-items: center; gap: 4px; }
|
||||||
.customs-card { overflow: hidden; border: 1px solid var(--client-border); border-radius: var(--client-radius); background: #fff; }
|
.customs-card { overflow: hidden; border: 1px solid var(--client-border); border-radius: var(--client-radius); background: #fff; }
|
||||||
|
.customs-card :deep(.el-table__row.customs-row-declaring > .el-table__cell) { background-color: #eff8ff; }
|
||||||
|
.customs-card :deep(.el-table__row.customs-row-declaring:hover > .el-table__cell) { background-color: #dbeafe; }
|
||||||
.state-error { display: flex; min-height: 84px; align-items: center; justify-content: center; gap: 12px; padding: 14px; color: #b42318; }
|
.state-error { display: flex; min-height: 84px; align-items: center; justify-content: center; gap: 12px; padding: 14px; color: #b42318; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user