style(admin): unify dialog layouts and dense readonly presentation
This commit is contained in:
@@ -267,7 +267,7 @@ async function voidPending(row: PlatformPriceBookVersion) {
|
||||
try {
|
||||
const result = await ElMessageBox.prompt(
|
||||
`作废后,版本 V${row.versionNo} 将不能再确认生效;版本记录和原始文件会继续保留。`,
|
||||
'作废待确认价格表',
|
||||
`作废待确认价格表 · V${row.versionNo} · ${priceBookScopeLabel(row.customerId)}`,
|
||||
{
|
||||
customClass: 'admin-density-confirm',
|
||||
type: 'warning',
|
||||
@@ -396,19 +396,19 @@ onMounted(() => {
|
||||
confirm-text="上传并解析"
|
||||
@confirm="submitUpload"
|
||||
>
|
||||
<div class="upload-content">
|
||||
<el-alert title="上传后先展示解析结果和仓库映射;确认后只替换同一报价范围的当前生效版本。客户专属报价生效后,计价时优先于平台公共报价。" type="info" :closable="false" show-icon />
|
||||
<label class="upload-scope-field"><span>报价范围</span><el-select v-model="uploadCustomerId" filterable :disabled="uploading" aria-label="上传报价范围"><el-option label="平台公共报价" value="0" /><el-option v-for="customer in customerOptions" :key="String(customer.id)" :label="`客户专属 · ${customer.tenantName || '未命名客户'}`" :value="String(customer.id)" /></el-select></label>
|
||||
<input ref="uploadInput" class="visually-hidden-input" type="file" accept=".xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" aria-label="选择 XLSX 船期价格表" :disabled="uploading" @change="selectUploadFile" />
|
||||
<div class="upload-file-control">
|
||||
<el-button :disabled="uploading" @click="uploadInput?.click()"><FileSpreadsheet :size="16" />选择 XLSX 文件</el-button>
|
||||
<div class="upload-file-name" :class="{ 'is-empty': !uploadFile }">
|
||||
<strong>{{ uploadFile?.name || '尚未选择文件' }}</strong>
|
||||
<span v-if="uploadFile">{{ (uploadFile.size / 1024 / 1024).toFixed(2) }} MB</span>
|
||||
<span v-else>最大 10MB</span>
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="uploadFileError" class="upload-file-error" role="alert">{{ uploadFileError }}</p>
|
||||
<div class="density-dialog-sections">
|
||||
<el-alert title="上传后先展示解析结果和仓库映射;确认后只替换同一报价范围的当前生效版本。客户专属报价生效后,计价时优先于平台公共报价。" type="info" :closable="false" show-icon />
|
||||
<el-form class="density-form" label-position="left" label-width="90px" :disabled="uploading">
|
||||
<table class="density-table density-table--editable" aria-label="上传价格表资料"><tbody>
|
||||
<tr><td><el-form-item label="报价范围"><el-select v-model="uploadCustomerId" filterable :disabled="uploading" aria-label="上传报价范围"><el-option label="平台公共报价" value="0" /><el-option v-for="customer in customerOptions" :key="String(customer.id)" :label="`客户专属 · ${customer.tenantName || '未命名客户'}`" :value="String(customer.id)" /></el-select></el-form-item></td></tr>
|
||||
<tr><td><el-form-item label="价格表文件">
|
||||
<input ref="uploadInput" class="visually-hidden-input" type="file" accept=".xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" aria-label="选择 XLSX 船期价格表" :disabled="uploading" @change="selectUploadFile" />
|
||||
<div class="upload-file-control"><el-button :disabled="uploading" @click="uploadInput?.click()"><FileSpreadsheet :size="16" />选择 XLSX 文件</el-button><span class="upload-file-name">{{ uploadFile?.name || '尚未选择文件' }}</span></div>
|
||||
</el-form-item></td></tr>
|
||||
</tbody></table>
|
||||
</el-form>
|
||||
<p class="density-dialog-note">{{ uploadFile ? (uploadFile.size / 1024 / 1024).toFixed(2) + ' MB' : '最大 10MB' }}</p>
|
||||
<el-alert v-if="uploadFileError" :title="uploadFileError" type="error" :closable="false" show-icon />
|
||||
</div>
|
||||
</AppDialog>
|
||||
|
||||
@@ -424,16 +424,9 @@ onMounted(() => {
|
||||
.metric-cell strong { color: var(--cc-text); font-size: var(--admin-font-body); }
|
||||
.issue-counts { color: var(--cc-muted); font-size: var(--admin-font-caption); }
|
||||
.issue-counts .is-blocking, .is-danger { color: var(--el-color-danger); font-weight: 700; }
|
||||
.upload-content { display: grid; gap: var(--admin-space-6); }
|
||||
.upload-scope-field { display: grid; gap: var(--admin-space-2); color: var(--cc-muted); font-size: var(--admin-font-caption); }
|
||||
.upload-scope-field :deep(.el-select) { width: 100%; }
|
||||
.visually-hidden-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
|
||||
.upload-file-control { display: flex; align-items: center; gap: var(--admin-space-5); }
|
||||
.upload-file-name { display: grid; min-width: 0; gap: 3px; color: var(--cc-text); font-size: var(--admin-font-body); }
|
||||
.upload-file-name strong { overflow-wrap: anywhere; }
|
||||
.upload-file-name span { color: var(--cc-muted); font-size: var(--admin-font-caption); }
|
||||
.upload-file-name.is-empty strong { color: var(--cc-muted); font-weight: 400; }
|
||||
.upload-file-error { margin: calc(-1 * var(--admin-space-3)) 0 0; color: var(--el-color-danger); font-size: var(--admin-font-caption); }
|
||||
.upload-file-name { min-width: 0; overflow-wrap: anywhere; }
|
||||
@media (max-width: 720px) {
|
||||
.table-actions :deep(.el-button) { min-height: 40px; }
|
||||
.upload-file-control { align-items: stretch; flex-direction: column; }
|
||||
|
||||
Reference in New Issue
Block a user