- Adjusted button sizes in CameraPreviewDialog and OperationCellRenderer for uniformity. - Enhanced the layout and structure of ServerFormDialog and sign dialog to improve user experience. - Implemented a new task panel design for better alignment and readability in various dialogs. - Added computed properties for dynamic subtitles and footers in the sign dialog. - Replaced ElMessageBox.prompt with a custom rename remark dialog for better styling consistency.
780 lines
21 KiB
Vue
780 lines
21 KiB
Vue
<template>
|
||
<div class="encoding-sub-container">
|
||
<!-- <scan-box
|
||
ref="scanBox"
|
||
cache-key="encoding:courierCode"
|
||
width="220px"
|
||
:tree-props="{ children: 'children', label: 'label' }"
|
||
:auto-submit="false"
|
||
:preset-tree="presetTree"
|
||
:available-fields="availableFieldsRef"
|
||
@condition-change="handleConditionChange"
|
||
@reset="handleConditionReset"
|
||
@condition-clear="handleConditionClear"
|
||
/> -->
|
||
|
||
<div class="main-content">
|
||
<div class="toolbar">
|
||
<div class="toolbar-left">
|
||
<order-toolbar-button-group
|
||
:buttons="toolbarButtons"
|
||
:resolve-disabled="resolveButtonDisabled"
|
||
:resolve-loading="resolveButtonLoading"
|
||
:resolve-label="resolveButtonLabel"
|
||
layout-key="encoding-courier"
|
||
@action="handleToolbarButtonClick"
|
||
/>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="upper-wrapper">
|
||
<upper-table
|
||
ref="upperTable"
|
||
title="快递编码列表"
|
||
default-align="center"
|
||
table-id="encoding-courier-code"
|
||
:data="tableData"
|
||
:columns="columns"
|
||
:table-size="tableSize"
|
||
:pagination="pagination"
|
||
:show-index="true"
|
||
:show-selection="true"
|
||
:loading="loading"
|
||
:query-time="queryTime"
|
||
@page-change="handlePageChange"
|
||
@page-size-change="handlePageSizeChange"
|
||
@refresh="loadList"
|
||
@selection-change="onSelectionChange"
|
||
>
|
||
<template #column-actions="{ row }">
|
||
<div class="encoding-operation-actions">
|
||
<el-button link type="primary" size="small" @click="openEdit(row)">编辑</el-button>
|
||
<el-button
|
||
link
|
||
type="danger"
|
||
size="small"
|
||
:loading="deletingId === row.id"
|
||
:disabled="row.id == null"
|
||
@click="handleDelete(row)"
|
||
>
|
||
删除
|
||
</el-button>
|
||
</div>
|
||
</template>
|
||
|
||
<template #empty>
|
||
<div class="empty-tip">暂无快递编码数据</div>
|
||
</template>
|
||
</upper-table>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 新增 / 编辑快递编码:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) -->
|
||
<el-dialog
|
||
v-model="dialogVisible"
|
||
class="courier-code-dialog"
|
||
width="min(560px, 92vw)"
|
||
align-center
|
||
append-to-body
|
||
:show-close="false"
|
||
@close="resetForm"
|
||
>
|
||
<div class="task-panel">
|
||
<header class="task-panel__head">
|
||
<div class="task-panel__titles">
|
||
<h2>{{ dialogMode === 'create' ? '新增快递编码' : '编辑快递编码' }}</h2>
|
||
<p>{{ dialogMode === 'create' ? '填写业务编码并选择对应快递公司' : '业务编码创建后不可修改' }}</p>
|
||
</div>
|
||
<button
|
||
class="task-panel__close"
|
||
type="button"
|
||
aria-label="关闭"
|
||
@click="dialogVisible = false"
|
||
>
|
||
<svg viewBox="0 0 12 12" fill="none">
|
||
<path d="M1 1L11 11M11 1L1 11" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
||
</svg>
|
||
</button>
|
||
</header>
|
||
|
||
<div class="task-panel__body">
|
||
<el-form ref="formRef" :model="formData" :rules="rules" class="task-panel__form">
|
||
<div class="task-panel__field task-panel__field--input">
|
||
<span class="task-panel__field-label is-required">业务编码</span>
|
||
<div class="task-panel__field-control">
|
||
<el-form-item prop="code">
|
||
<el-input
|
||
v-model="formData.code"
|
||
size="default"
|
||
placeholder="如 SF.KY"
|
||
:disabled="dialogMode === 'edit'"
|
||
@blur="validateCodeUnique"
|
||
/>
|
||
</el-form-item>
|
||
<p class="task-panel__field-tip">
|
||
{{ dialogMode === 'edit'
|
||
? '业务编码创建后不可修改'
|
||
: '业务编码用于对接快递接口,建议使用「快递编码.业务」格式' }}
|
||
</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="task-panel__field task-panel__field--input">
|
||
<span class="task-panel__field-label is-required">业务名称</span>
|
||
<div class="task-panel__field-control">
|
||
<el-form-item prop="name">
|
||
<el-input v-model="formData.name" size="default" placeholder="如 顺丰空运产品" />
|
||
</el-form-item>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="task-panel__field task-panel__field--input">
|
||
<span class="task-panel__field-label is-required">快递公司</span>
|
||
<div class="task-panel__field-control">
|
||
<el-form-item prop="express_code">
|
||
<el-select
|
||
v-model="formData.express_code"
|
||
size="default"
|
||
placeholder="请选择快递公司"
|
||
filterable
|
||
style="width: 100%"
|
||
@change="handleExpressChange"
|
||
>
|
||
<el-option
|
||
v-for="item in expressOptions"
|
||
:key="item.code"
|
||
:label="item.label || item.name"
|
||
:value="item.code"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</div>
|
||
</div>
|
||
</el-form>
|
||
</div>
|
||
|
||
<footer class="task-panel__foot">
|
||
<span class="task-panel__hint">提交后该编码将用于快递下单与面单打印</span>
|
||
<div class="task-panel__actions">
|
||
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
||
<el-button size="small" type="primary" :loading="saving" @click="submitForm">保存</el-button>
|
||
</div>
|
||
</footer>
|
||
</div>
|
||
</el-dialog>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import { onMounted, reactive, ref } from 'vue'
|
||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||
import type { FormInstance, FormRules } from 'element-plus'
|
||
import ScanBox from '@/components/ScanBox/index.vue'
|
||
import UpperTable from '@/components/UpperTable/index.vue'
|
||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||
import { getExpressList } from '@/api/index/index'
|
||
import {
|
||
expressCheckCodeUnique,
|
||
expressCreate,
|
||
expressDelete,
|
||
expressList,
|
||
expressUpdate
|
||
} from '@/api/setting.express/express'
|
||
import {
|
||
buildWhereConditions,
|
||
courierAvailableFields,
|
||
courierColumns
|
||
} from '../encoding-config'
|
||
|
||
type ExpressOption = {
|
||
code: string
|
||
name: string
|
||
label?: string
|
||
}
|
||
|
||
type ExpressRecord = {
|
||
id?: number
|
||
code: string
|
||
name: string
|
||
express_code: string
|
||
platform?: string
|
||
express_name?: string
|
||
express_label?: string
|
||
}
|
||
|
||
const scanBox = ref<any>(null)
|
||
const upperTable = ref<any>(null)
|
||
const presetTree = ref<any[]>([])
|
||
const availableFieldsRef = reactive(JSON.parse(JSON.stringify(courierAvailableFields)))
|
||
const columns = courierColumns
|
||
|
||
const loading = ref(false)
|
||
const saving = ref(false)
|
||
const deletingId = ref<number | string | null>(null)
|
||
const batchDeleting = ref(false)
|
||
const selectedIds = ref<number[]>([])
|
||
|
||
// ---- toolbar 按钮配置(分类排序,对齐 waveOrder) ----
|
||
const toolbarButtons: ToolbarButtonConfig[] = [
|
||
{ key: 'refresh', label: '刷新', category: 'refresh', size: 'small', action: 'loadData' },
|
||
{ key: 'create', label: '新增编码', category: 'action', size: 'small', action: 'openCreate' },
|
||
{ key: 'batchDelete', label: '批量删除', category: 'cancel', size: 'small', disabledKey: 'noSelection', loadingKey: 'batchDelete', action: 'handleBatchDelete' }
|
||
]
|
||
|
||
function resolveButtonDisabled(key?: string): boolean {
|
||
if (key === 'noSelection') return !selectedIds.value.length
|
||
return false
|
||
}
|
||
|
||
function resolveButtonLoading(key?: string): boolean {
|
||
if (key === 'loading') return loading.value
|
||
if (key === 'batchDelete') return batchDeleting.value
|
||
return false
|
||
}
|
||
|
||
function resolveButtonLabel(defaultLabel: string, _dynamicLabelKey?: string): string {
|
||
return defaultLabel
|
||
}
|
||
|
||
const toolbarActionMap: Record<string, () => void> = {
|
||
loadData: loadList,
|
||
openCreate,
|
||
handleBatchDelete
|
||
}
|
||
|
||
function handleToolbarButtonClick(action: string) {
|
||
toolbarActionMap[action]?.()
|
||
}
|
||
const tableData = ref<ExpressRecord[]>([])
|
||
const expressOptions = ref<ExpressOption[]>([])
|
||
const queryTime = ref(0)
|
||
const tableSize = ref('small')
|
||
|
||
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||
|
||
const dialogVisible = ref(false)
|
||
const dialogMode = ref<'create' | 'edit'>('create')
|
||
const formRef = ref<FormInstance>()
|
||
const formData = reactive<ExpressRecord>({
|
||
id: undefined,
|
||
code: '',
|
||
name: '',
|
||
express_code: '',
|
||
express_name: ''
|
||
})
|
||
|
||
const rules: FormRules = {
|
||
code: [{ required: true, message: '请输入业务编码', trigger: 'blur' }],
|
||
name: [{ required: true, message: '请输入业务名称', trigger: 'blur' }],
|
||
express_code: [{ required: true, message: '请选择快递公司', trigger: 'change' }]
|
||
}
|
||
|
||
const isSuccess = (res: any) => res && [0, 1, 200].includes(res.code)
|
||
|
||
function buildListPayload() {
|
||
const where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||
const payload: Record<string, any> = {
|
||
pagination: {
|
||
page: pagination.currentPage,
|
||
pageSize: pagination.pageSize
|
||
}
|
||
}
|
||
if (Object.keys(where).length) {
|
||
payload.where = where
|
||
}
|
||
return payload
|
||
}
|
||
|
||
function normalizeListRow(item: any): ExpressRecord {
|
||
const platform = item?.platform ?? item?.express_code ?? ''
|
||
const baseName = item?.express_name ?? item?.platform_name ?? ''
|
||
return {
|
||
...item,
|
||
express_code: platform,
|
||
express_name: baseName || item?.name
|
||
}
|
||
}
|
||
|
||
function syncPresetTree(list: ExpressRecord[]) {
|
||
presetTree.value = list.map((item) => ({
|
||
label: item.name || item.code,
|
||
id: item.id,
|
||
code: item.code,
|
||
children: []
|
||
}))
|
||
}
|
||
|
||
function fillExpressScanOptions(raw: any[]) {
|
||
const field = availableFieldsRef.find((f: any) => f.value === 'platform')
|
||
if (!field) return
|
||
field.options = (raw || []).map((item: any) => ({
|
||
label: item.label || item.name || item.express_name || item.code,
|
||
value: item.code || item.express_code
|
||
}))
|
||
}
|
||
|
||
function onSelectionChange(rows: ExpressRecord[]) {
|
||
selectedIds.value = (rows || [])
|
||
.map((r) => r.id)
|
||
.filter((id): id is number => id != null && Number.isFinite(Number(id)))
|
||
.map((id) => Number(id))
|
||
}
|
||
|
||
async function loadList() {
|
||
loading.value = true
|
||
const start = Date.now()
|
||
try {
|
||
const res: any = await expressList(buildListPayload())
|
||
if (!isSuccess(res)) {
|
||
ElMessage.error(res?.message || '获取快递编码失败')
|
||
tableData.value = []
|
||
pagination.total = 0
|
||
presetTree.value = []
|
||
return
|
||
}
|
||
const data = res?.data || {}
|
||
const raw = data.list || []
|
||
tableData.value = raw.map((item: any) => normalizeListRow(item))
|
||
pagination.total = Number(data.pagination?.total ?? data.total ?? data.count ?? 0)
|
||
syncPresetTree(tableData.value)
|
||
} catch {
|
||
tableData.value = []
|
||
pagination.total = 0
|
||
presetTree.value = []
|
||
ElMessage.error('获取快递编码失败')
|
||
} finally {
|
||
queryTime.value = Date.now() - start
|
||
loading.value = false
|
||
}
|
||
}
|
||
|
||
async function loadBaseOptions() {
|
||
try {
|
||
const res: any = await getExpressList({ systemOnly: true })
|
||
if (!isSuccess(res)) return
|
||
const raw = res?.data || []
|
||
expressOptions.value = raw.map((item: any) => ({
|
||
code: item.code || item.express_code,
|
||
name: item.name || item.express_name,
|
||
label: item.label
|
||
}))
|
||
fillExpressScanOptions(raw)
|
||
} catch {
|
||
expressOptions.value = []
|
||
}
|
||
}
|
||
|
||
function handlePageChange(page: number) {
|
||
pagination.currentPage = page
|
||
loadList()
|
||
}
|
||
|
||
function handlePageSizeChange(size: number) {
|
||
pagination.pageSize = size
|
||
pagination.currentPage = 1
|
||
loadList()
|
||
}
|
||
|
||
function handleConditionChange() {
|
||
pagination.currentPage = 1
|
||
loadList()
|
||
}
|
||
|
||
function handleConditionClear() {
|
||
pagination.currentPage = 1
|
||
loadList()
|
||
}
|
||
|
||
function handleConditionReset() {
|
||
pagination.currentPage = 1
|
||
scanBox.value?.reset?.()
|
||
loadList()
|
||
}
|
||
|
||
function handleExpressChange(code: string) {
|
||
const target = expressOptions.value.find((item) => item.code === code)
|
||
if (!target) return
|
||
formData.express_name = target.name || target.label || ''
|
||
}
|
||
|
||
function resetForm() {
|
||
formData.id = undefined
|
||
formData.code = ''
|
||
formData.name = ''
|
||
formData.express_code = ''
|
||
formData.express_name = undefined
|
||
formRef.value?.clearValidate()
|
||
}
|
||
|
||
function openCreate() {
|
||
dialogMode.value = 'create'
|
||
dialogVisible.value = true
|
||
resetForm()
|
||
}
|
||
|
||
function openEdit(row: ExpressRecord) {
|
||
dialogMode.value = 'edit'
|
||
dialogVisible.value = true
|
||
formData.id = row.id
|
||
formData.code = row.code
|
||
formData.name = row.name
|
||
formData.express_code = row.express_code || row.platform || ''
|
||
formData.express_name = row.express_name
|
||
formRef.value?.clearValidate()
|
||
}
|
||
|
||
function summarizeDeleteResult(data: Record<string, any> | null | undefined) {
|
||
if (!data || typeof data !== 'object') return ''
|
||
const deleted = Array.isArray(data.deleted_ids) ? data.deleted_ids.length : 0
|
||
const already = Array.isArray(data.already_deleted_ids) ? data.already_deleted_ids.length : 0
|
||
const parts: string[] = []
|
||
if (deleted) parts.push(`已删除 ${deleted} 条`)
|
||
if (already) parts.push(`已为删除状态 ${already} 条`)
|
||
return parts.length ? `(${parts.join(';')})` : ''
|
||
}
|
||
|
||
async function handleDelete(row: ExpressRecord) {
|
||
const id = row.id
|
||
if (id == null || !Number.isFinite(Number(id))) {
|
||
ElMessage.warning('无法删除:缺少有效 ID')
|
||
return
|
||
}
|
||
try {
|
||
await ElMessageBox.confirm(
|
||
`确定软删除快递映射「${row.name || row.code}」吗?`,
|
||
'删除确认',
|
||
{ type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消', buttonSize: 'small' }
|
||
)
|
||
} catch {
|
||
return
|
||
}
|
||
|
||
deletingId.value = id
|
||
try {
|
||
const res: any = await expressDelete({ ids: [Number(id)] })
|
||
if (!isSuccess(res)) {
|
||
ElMessage.error(res?.message || '删除失败')
|
||
return
|
||
}
|
||
const extra = summarizeDeleteResult(res.data)
|
||
ElMessage.success((res.message || '删除成功') + extra)
|
||
await loadList()
|
||
} catch {
|
||
ElMessage.error('删除失败')
|
||
} finally {
|
||
deletingId.value = null
|
||
}
|
||
}
|
||
|
||
async function handleBatchDelete() {
|
||
const ids = [...selectedIds.value]
|
||
if (!ids.length) {
|
||
ElMessage.warning('请先勾选要删除的映射')
|
||
return
|
||
}
|
||
try {
|
||
await ElMessageBox.confirm(
|
||
`确定批量软删除选中的 ${ids.length} 条快递映射吗?`,
|
||
'删除确认',
|
||
{ type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消', buttonSize: 'small' }
|
||
)
|
||
} catch {
|
||
return
|
||
}
|
||
|
||
batchDeleting.value = true
|
||
try {
|
||
const res: any = await expressDelete({ ids })
|
||
if (!isSuccess(res)) {
|
||
ElMessage.error(res?.message || '批量删除失败')
|
||
return
|
||
}
|
||
const extra = summarizeDeleteResult(res.data)
|
||
ElMessage.success((res.message || '批量删除已提交') + extra)
|
||
selectedIds.value = []
|
||
upperTable.value?.clearSelection?.()
|
||
await loadList()
|
||
} catch {
|
||
ElMessage.error('批量删除失败')
|
||
} finally {
|
||
batchDeleting.value = false
|
||
}
|
||
}
|
||
|
||
async function validateCodeUnique() {
|
||
if (!formData.code) return true
|
||
try {
|
||
const res: any = await expressCheckCodeUnique({
|
||
id: dialogMode.value === 'edit' ? formData.id : undefined,
|
||
code: formData.code
|
||
})
|
||
if (!isSuccess(res)) {
|
||
ElMessage.warning(res?.message || '业务编码校验失败')
|
||
return false
|
||
}
|
||
return true
|
||
} catch {
|
||
ElMessage.warning('业务编码校验失败')
|
||
return false
|
||
}
|
||
}
|
||
|
||
async function submitForm() {
|
||
if (!formRef.value || saving.value) return
|
||
const valid = await formRef.value.validate().catch(() => false)
|
||
if (!valid) return
|
||
const unique = await validateCodeUnique()
|
||
if (!unique) return
|
||
|
||
saving.value = true
|
||
try {
|
||
const createPayload: {
|
||
code: string
|
||
name: string
|
||
express_code: string
|
||
} = {
|
||
code: formData.code.trim(),
|
||
name: formData.name.trim(),
|
||
express_code: String(formData.express_code).trim()
|
||
}
|
||
/** setting.express.update:id 必填;至少提供 code / name / express_code 之一;关联系统快递用 express_code */
|
||
const updatePayload: {
|
||
id: number
|
||
code: string
|
||
name: string
|
||
express_code?: string
|
||
} = {
|
||
id: Number(formData.id),
|
||
code: formData.code.trim(),
|
||
name: formData.name.trim()
|
||
}
|
||
if (formData.express_code) {
|
||
updatePayload.express_code = String(formData.express_code).trim()
|
||
}
|
||
const res: any = dialogMode.value === 'create'
|
||
? await expressCreate(createPayload)
|
||
: await expressUpdate(updatePayload)
|
||
if (!isSuccess(res)) {
|
||
ElMessage.error(res?.message || '保存失败')
|
||
return
|
||
}
|
||
ElMessage.success(dialogMode.value === 'create' ? '新增成功' : '更新成功')
|
||
dialogVisible.value = false
|
||
loadList()
|
||
} catch {
|
||
ElMessage.error('保存失败')
|
||
} finally {
|
||
saving.value = false
|
||
}
|
||
}
|
||
|
||
onMounted(async () => {
|
||
await loadBaseOptions()
|
||
await loadList()
|
||
})
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
@use '../styles/encoding-sub.scss';
|
||
|
||
.encoding-operation-actions {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 0 2px;
|
||
justify-content: center;
|
||
|
||
:deep(.el-button) {
|
||
font-size: 11px;
|
||
padding: 0 4px;
|
||
height: 20px;
|
||
margin-left: 0;
|
||
margin-right: 0;
|
||
}
|
||
|
||
:deep(.el-button + .el-button) {
|
||
margin-left: 0;
|
||
}
|
||
|
||
:deep(.el-button.is-link) {
|
||
padding: 0 4px;
|
||
height: 20px;
|
||
}
|
||
}
|
||
|
||
/* 新增 / 编辑快递编码:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */
|
||
.task-panel {
|
||
background: #fff;
|
||
color: #303133;
|
||
|
||
&__head {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
gap: 12px;
|
||
padding: 16px;
|
||
}
|
||
|
||
&__titles {
|
||
flex: 1;
|
||
min-width: 0;
|
||
|
||
h2 {
|
||
margin: 0;
|
||
font-size: 18px;
|
||
line-height: 24px;
|
||
font-weight: 400;
|
||
color: #303133;
|
||
}
|
||
|
||
p {
|
||
margin: 4px 0 0;
|
||
font-size: 12px;
|
||
line-height: 18px;
|
||
color: #909399;
|
||
}
|
||
}
|
||
|
||
&__close {
|
||
width: 24px;
|
||
height: 24px;
|
||
flex: none;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: none;
|
||
border-radius: 4px;
|
||
background: transparent;
|
||
color: #909399;
|
||
cursor: pointer;
|
||
transition: color 0.2s;
|
||
|
||
svg {
|
||
width: 12px;
|
||
height: 12px;
|
||
}
|
||
|
||
&:hover {
|
||
color: #409eff;
|
||
}
|
||
}
|
||
|
||
&__body {
|
||
padding: 12px 16px 0;
|
||
}
|
||
|
||
&__form {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
}
|
||
|
||
&__field {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 16px;
|
||
min-height: 40px;
|
||
padding: 8px 12px;
|
||
border: 1px solid #ebeef5;
|
||
border-radius: 4px;
|
||
background: #fafafa;
|
||
|
||
/* 输入行:去掉灰色容器,与静态信息行区分 */
|
||
&--input {
|
||
align-items: flex-start;
|
||
min-height: 0;
|
||
padding: 4px 0 0 12px;
|
||
border: none;
|
||
border-radius: 0;
|
||
background: transparent;
|
||
|
||
.task-panel__field-label {
|
||
padding-top: 7px;
|
||
}
|
||
}
|
||
}
|
||
|
||
&__field-label {
|
||
font-size: 12px;
|
||
line-height: 20px;
|
||
color: #606266;
|
||
flex-shrink: 0;
|
||
|
||
&.is-required::before {
|
||
content: '*';
|
||
color: #f56c6c;
|
||
margin-right: 4px;
|
||
}
|
||
}
|
||
|
||
&__field-control {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
&__field-tip {
|
||
margin: 4px 0 0;
|
||
font-size: 12px;
|
||
line-height: 18px;
|
||
color: #909399;
|
||
}
|
||
|
||
&__foot {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 12px;
|
||
padding: 16px;
|
||
}
|
||
|
||
&__hint {
|
||
font-size: 12px;
|
||
color: #909399;
|
||
}
|
||
|
||
&__actions {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
|
||
:deep(.el-button) {
|
||
margin-left: 0;
|
||
margin-right: 0;
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 面板内嵌 el-form-item:去掉默认间距,错误提示改回文档流内展示 */
|
||
.task-panel__form {
|
||
:deep(.el-form-item) {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
:deep(.el-form-item__content) {
|
||
margin-left: 0;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
:deep(.el-form-item__error) {
|
||
position: static;
|
||
padding-top: 4px;
|
||
}
|
||
}
|
||
</style>
|
||
|
||
<style lang="scss">
|
||
/* el-dialog 会被 append 到 body:去掉默认头/内边距,统一交给面板 */
|
||
.el-dialog.courier-code-dialog {
|
||
padding: 0;
|
||
overflow: hidden;
|
||
|
||
.el-dialog__header {
|
||
display: none;
|
||
}
|
||
|
||
.el-dialog__body {
|
||
padding: 0;
|
||
}
|
||
}
|
||
</style>
|