style(business): 统一业务状态标签为文字+颜色样式

- 新增全局 `.status-text` 样式,去除 el-tag 背景和边框,仅保留彩色文字和跟随文字颜色的圆点
- 业务状态相关的 el-tag 标签全部加上 `class="status-text"`,覆盖调度状态、审批状态、运单状态等全站业务状态展示
- 统一发货模板查看弹窗的卡片样式,新增分区块样式与运费信息展示板块
- 调整发货模板弹窗详情 label 宽度,所有 el-descriptions 的 label 宽度统一为 140px 以保证视觉一致
- 表格列内嵌输入控件全宽默认样式生效,无需单独设置跨度,解决输入框显示不足问题
- 弹窗中的部分表单和导入区域使用 `section-card` 统一卡片风格
- 客商档案查看模式改为独立路由,实现查看与编辑隔离并调整对应操作按钮文案
- 相关样式调整及细节优化,包括运费单位颜色等辅助样式,保证界面细节统一规范
This commit is contained in:
2026-08-24 20:15:14 +08:00
parent 6bd8d18e20
commit 8883186344
19 changed files with 312 additions and 97 deletions
@@ -98,19 +98,19 @@
</template>
<template #status="{ row }">
<el-tag :type="statusTagType(row.status)">
<el-tag :type="statusTagType(row.status)" class="status-text">
{{ displayStatus(row, 'status') }}
</el-tag>
</template>
<template #businessStatus="{ row }">
<el-tag :type="statusTagType(row.businessStatus)">
<el-tag :type="statusTagType(row.businessStatus)" class="status-text">
{{ displayStatus(row, 'businessStatus') }}
</el-tag>
</template>
<template #approvalStatus="{ row }">
<el-tag :type="statusTagType(row.approvalStatus)">
<el-tag :type="statusTagType(row.approvalStatus)" class="status-text">
{{ displayStatus(row, 'approvalStatus') }}
</el-tag>
</template>
@@ -2522,7 +2522,7 @@
<span>|</span>
{{ detailRow.planNo || '-' }}
</h2>
<el-tag class="is-dispatching" effect="light">
<el-tag :type="statusTagType(detailRow.businessStatus)" class="status-text" effect="light">
{{ displayStatus(detailRow, 'businessStatus') }}
</el-tag>
<el-tag type="primary" effect="light">
@@ -2692,7 +2692,7 @@
<div class="business-crud-page__waybill-heading">
<strong>运单详情</strong>
<span>{{ detailRow.waybillNo || '-' }}</span>
<el-tag type="success">{{ displayStatus(detailRow, 'businessStatus') }}</el-tag>
<el-tag :type="statusTagType(detailRow.businessStatus)" class="status-text">{{ displayStatus(detailRow, 'businessStatus') }}</el-tag>
<el-tag type="primary">
{{ formatTransportPlanDetailTransportType(waybillTransportMode(detailRow)) }}
</el-tag>
@@ -3106,7 +3106,7 @@
</el-table-column>
</el-table>
</div>
<el-descriptions v-else :column="2" border>
<el-descriptions v-else :column="2" border label-width="140px">
<el-descriptions-item
v-for="field in section.fields"
:key="field[0]"
@@ -3133,6 +3133,67 @@
<el-table-column prop="remark" label="备注" min-width="160" />
</el-table>
</section-card>
<section-card
v-if="
config.enableShippingTemplateFreight && detailRow.templateType === '运单'
"
:title="`运费信息${transportMode === 'road' ? '(公路)' : ''}`"
>
<el-descriptions
v-if="transportMode === 'road'"
:column="2"
border
label-width="140px"
class="business-crud-page__freight-descriptions"
>
<template v-for="(item, index) in shippingTemplateFreight.freightItems" :key="index">
<el-descriptions-item :label="`单价${index + 1}`">
<template v-if="item.unitPrice || item.priceUnit">
{{ formatShippingTemplateFreightNumber(item.unitPrice) }}
<span v-if="item.priceUnit" class="business-crud-page__freight-unit">{{ item.priceUnit }}</span>
</template>
<template v-else>-</template>
</el-descriptions-item>
<el-descriptions-item :label="`数量合计${index + 1}`">
{{ shippingTemplateRoadFreightQuantity(index) }}
<span v-if="transportCargoRows[index]?.quantityUnit" class="business-crud-page__freight-unit">
{{ transportCargoRows[index].quantityUnit }}
</span>
</el-descriptions-item>
<el-descriptions-item :label="`运费${index + 1}`">
{{ shippingTemplateRoadFreightAmount(item, index) }}
<span class="business-crud-page__freight-currency">{{ shippingTemplateCurrencyLabel }}</span>
</el-descriptions-item>
</template>
<el-descriptions-item label="运费合计">
{{ shippingTemplateRoadFreightTotal }}
<span class="business-crud-page__freight-currency">{{ shippingTemplateCurrencyLabel }}</span>
</el-descriptions-item>
<el-descriptions-item label="其他运费合计">
{{ formatShippingTemplateFreightNumber(shippingTemplateFreight.otherFreightAmount) }}
<span class="business-crud-page__freight-currency">{{ shippingTemplateCurrencyLabel }}</span>
</el-descriptions-item>
<el-descriptions-item label="币种">
{{ currencyName(shippingTemplateFreight.currency) }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-else :column="2" border label-width="140px" class="business-crud-page__freight-descriptions">
<el-descriptions-item label="运费">
{{ formatShippingTemplateFreightNumber(shippingTemplateFreight.freightAmount) }}
<span class="business-crud-page__freight-currency">{{ shippingTemplateCurrencyLabel }}</span>
</el-descriptions-item>
<el-descriptions-item label="数量合计">
{{ transportCargoQuantityTotal }}
</el-descriptions-item>
<el-descriptions-item label="其他运费合计">
{{ formatShippingTemplateFreightNumber(shippingTemplateFreight.otherFreightAmount) }}
<span class="business-crud-page__freight-currency">{{ shippingTemplateCurrencyLabel }}</span>
</el-descriptions-item>
<el-descriptions-item label="币种">
{{ currencyName(shippingTemplateFreight.currency) }}
</el-descriptions-item>
</el-descriptions>
</section-card>
<section-card
v-if="config.enableAttachmentTable"
:title="config.attachmentTitle || '附件'"
@@ -3702,7 +3763,7 @@
<span class="business-crud-page__dispatch-heading-no">
{{ dispatchDialogNo || '-' }}
</span>
<el-tag :type="statusTagType(dispatchRow.businessStatus)" effect="light">
<el-tag :type="statusTagType(dispatchRow.businessStatus)" class="status-text" effect="light">
{{ dispatchDialogStatusText }}
</el-tag>
<el-tag type="primary" effect="light">
@@ -5450,22 +5511,24 @@
class="business-crud-page__cargo-import-dialog"
@closed="cargoImportRows = []"
>
<div class="business-crud-page__cargo-import">
<el-upload
action="#"
accept=".xls,.xlsx"
:auto-upload="false"
:show-file-list="false"
:disabled="cargoImportLoading"
:on-change="handleCargoImportFileChange"
>
<el-button type="primary" :loading="cargoImportLoading">上传</el-button>
<template #tip>
<div class="el-upload__tip">支持.xlsx.xls的文件格式单个文件大小限制50M</div>
</template>
</el-upload>
<el-button type="primary" @click="handleCargoImportTemplate">点击下载模板</el-button>
</div>
<section-card>
<div class="business-crud-page__cargo-import">
<el-upload
action="#"
accept=".xls,.xlsx"
:auto-upload="false"
:show-file-list="false"
:disabled="cargoImportLoading"
:on-change="handleCargoImportFileChange"
>
<el-button type="primary" :loading="cargoImportLoading">上传</el-button>
<template #tip>
<div class="el-upload__tip">支持.xlsx.xls的文件格式单个文件大小限制50M</div>
</template>
</el-upload>
<el-button type="primary" @click="handleCargoImportTemplate">点击下载模板</el-button>
</div>
</section-card>
<template #footer>
<el-button :disabled="cargoImportLoading" @click="closeCargoImportDialog">关闭</el-button>
<el-button
@@ -15461,6 +15524,15 @@ export default {
flex-direction: column;
gap: 12px;
.business-crud-page__freight-descriptions {
.business-crud-page__freight-unit,
.business-crud-page__freight-currency {
margin-left: 4px;
color: #909399;
font-size: 13px;
}
}
.section-card {
:deep(.el-descriptions__table) {
width: 100%;
@@ -1,7 +1,7 @@
<template>
<div v-loading="loading" class="master-detail">
<section v-if="master" class="detail-overview">
<div class="detail-heading"><div><h2>多联总单详情 <span>|</span> {{ master.masterNo }}</h2><el-tag :type="statusType(master.businessStatus)">{{ statusName(master.businessStatus) }}</el-tag><el-tag v-if="transportFlowLabel" type="info" class="transport-flow-tag">{{ transportFlowLabel }}</el-tag></div><el-button @click="$emit('back')">返回</el-button></div>
<div class="detail-heading"><div><h2>多联总单详情 <span>|</span> {{ master.masterNo }}</h2><el-tag :type="statusType(master.businessStatus)" class="status-text">{{ statusName(master.businessStatus) }}</el-tag><el-tag v-if="transportFlowLabel" type="info" class="transport-flow-tag">{{ transportFlowLabel }}</el-tag></div><el-button @click="$emit('back')">返回</el-button></div>
<dl class="detail-meta"><div><dt>客户</dt><dd>{{ master.customerName || '-' }}</dd></div><div><dt>合同编号</dt><dd>{{ master.contractNo || '-' }}</dd></div><div><dt>项目</dt><dd>{{ master.projectName || '-' }}</dd></div><div class="detail-meta__attachments"><dt>附件</dt><dd><template v-if="attachments.length"><el-link v-for="file in attachments" :key="file.url || file.link || file.name || file.originalName" type="primary" @click="previewAttachment(file)">{{ attachmentName(file) }}</el-link></template><span v-else>-</span></dd></div></dl>
<div class="route-map"><template v-for="(route, index) in segments" :key="route.segmentNo"><div class="route-map__node"><span :class="['route-badge', index ? 'middle' : 'start']">{{ index ? '经' : '起' }}</span><strong>{{ route.departureName || '-' }}</strong><small>{{ route.departureAddress || '-' }}</small><small class="route-map__progress">{{ index ? `已到达 ${quantity(segments[index - 1].arrivedQuantity)}/${quantity(master.totalQuantity)}` : `已调度 ${quantity(route.dispatchedQuantity)}/${quantity(master.totalQuantity)}` }}</small><small v-if="index" class="route-map__progress">已调度 {{ quantity(route.dispatchedQuantity) }}/{{ quantity(master.totalQuantity) }}</small></div><div class="route-map__line"></div><div v-if="index === segments.length - 1" class="route-map__node"><span class="route-badge end">终</span><strong>{{ route.arrivalName || '-' }}</strong><small>{{ route.arrivalAddress || '-' }}</small><small class="route-map__progress">已到达 {{ quantity(route.arrivedQuantity) }}/{{ quantity(master.totalQuantity) }}</small></div></template></div>
</section>
@@ -17,7 +17,7 @@
<header @click="toggleSegment(route.segmentNo)"><h3><span class="segment-index">{{ segmentNumber(route, index) }}</span><span>{{ route.departureName || '-' }} {{ route.arrivalName || '-' }}</span><span class="segment-detail__transport-type">{{ segmentTransportType(route) || '-' }}</span><span class="segment-detail__progress-bar"><span :style="{ width: `${segmentProgress(route)}%` }"></span></span><span class="segment-detail__progress">已调度 <em>{{ quantity(route.dispatchedQuantity) }}</em> / {{ quantity(plannedQuantity(route)) }} {{ plannedUnit(route) }}</span></h3><div class="segment-detail__header-right"><el-tooltip :content="isSegmentExpanded(route.segmentNo) ? '折叠' : '展开'" placement="top"><el-button circle :icon="isSegmentExpanded(route.segmentNo) ? ArrowUp : ArrowDown" @click.stop="toggleSegment(route.segmentNo)" /></el-tooltip></div></header>
<div v-show="isSegmentExpanded(route.segmentNo)" class="segment-execution">
<div class="segment-stats"><div><span>总量</span><strong>{{ quantity(master.totalQuantity) }}<small></small></strong></div><div><span>已调度</span><strong class="dispatched">{{ quantity(route.dispatchedQuantity) }}<small></small></strong></div><div><span>剩余</span><strong class="remaining">{{ quantity(remainingQuantity(route)) }}<small></small></strong></div></div>
<el-table :data="route.waybills || []" border class="waybill-table"><el-table-column label="运单号" min-width="180"><template #default="{ row }"><el-link type="primary" @click="openWaybill(row)">{{ row.waybillNo }}</el-link></template></el-table-column><el-table-column prop="carrierName" label="承运商" min-width="190" /><el-table-column label="司机/车牌" min-width="180"><template #default="{ row }">{{ driverVehicle(row) }}</template></el-table-column><el-table-column prop="cargoType" label="货物类型" min-width="120" /><el-table-column label="数量(吨)" width="130"><template #default="{ row }">{{ quantity(row.quantity) }}</template></el-table-column><el-table-column label="状态" width="130"><template #default="{ row }"><el-tag :type="waybillStatusType(row.businessStatus)" size="small">{{ waybillStatusName(row.businessStatus) }}</el-tag></template></el-table-column><el-table-column prop="createTime" label="创建时间" min-width="180" /></el-table>
<el-table :data="route.waybills || []" border class="waybill-table"><el-table-column label="运单号" min-width="180"><template #default="{ row }"><el-link type="primary" @click="openWaybill(row)">{{ row.waybillNo }}</el-link></template></el-table-column><el-table-column prop="carrierName" label="承运商" min-width="190" /><el-table-column label="司机/车牌" min-width="180"><template #default="{ row }">{{ driverVehicle(row) }}</template></el-table-column><el-table-column prop="cargoType" label="货物类型" min-width="120" /><el-table-column label="数量(吨)" width="130"><template #default="{ row }">{{ quantity(row.quantity) }}</template></el-table-column><el-table-column label="状态" width="130"><template #default="{ row }"><el-tag :type="waybillStatusType(row.businessStatus)" size="small" class="status-text">{{ waybillStatusName(row.businessStatus) }}</el-tag></template></el-table-column><el-table-column prop="createTime" label="创建时间" min-width="180" /></el-table>
<el-empty v-if="!(route.waybills || []).length" description="暂无运单明细" :image-size="56" />
<div v-if="(route.transportPlans || []).length" class="transport-plan-detail"><h4>关联计划单</h4><el-table :data="route.transportPlans" border><el-table-column label="计划单号" min-width="160"><template #default="{ row }"><el-link type="primary" @click="openPlan(row)">{{ row.planNo }}</el-link></template></el-table-column><el-table-column prop="planName" label="计划名称" min-width="180" /><el-table-column prop="transportType" label="运输方式" width="130" /><el-table-column prop="planStartDate" label="计划开始日期" width="130" /><el-table-column prop="planEndDate" label="计划结束日期" width="130" /><el-table-column prop="businessStatus" label="状态" width="110" /></el-table></div>
</div>
@@ -4,7 +4,7 @@
<div class="overview-heading">
<div>
<h2>多联总单调度 <span>|</span> {{ master.masterNo }}</h2>
<el-tag :type="statusType(master.businessStatus)">{{ statusName(master.businessStatus) }}</el-tag>
<el-tag :type="statusType(master.businessStatus)" class="status-text">{{ statusName(master.businessStatus) }}</el-tag>
</div>
</div>
<div class="overview-content">
@@ -78,6 +78,7 @@
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
placeholder="请选择"
style="width: 200px"
/></el-form-item>
</div>
</template>
@@ -116,6 +117,7 @@
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
placeholder="请选择"
style="width: 200px"
/></el-form-item>
</div>
</template>
@@ -428,7 +430,27 @@
<div class="address-pagination"><el-pagination v-model:current-page="commonCargoPage.current" v-model:page-size="commonCargoPage.size" :page-sizes="[10, 20, 50]" layout="total, prev, pager, next, sizes" :total="commonCargoPage.total" @size-change="loadCommonCargoList" @current-change="loadCommonCargoList" /></div>
<template #footer><el-button @click="commonCargoVisible = false">关闭</el-button><el-button type="primary" :disabled="!commonCargoSelected.length" @click="confirmCommonCargoSelection">确定</el-button></template>
</el-dialog>
<el-dialog v-model="cargoImportVisible" title="导入货物" append-to-body width="560px"><div class="cargo-import"><el-upload action="#" accept=".xls,.xlsx" :auto-upload="false" :show-file-list="false" :disabled="cargoImportLoading" :on-change="handleCargoImport"><el-button type="primary" :loading="cargoImportLoading">上传</el-button><template #tip><div class="el-upload__tip">支持 .xlsx、.xls 文件,单个文件不超过 50M</div></template></el-upload><el-button type="primary" plain @click="downloadCargoTemplate">点击下载模板</el-button></div><template #footer><el-button @click="cargoImportVisible = false">关闭</el-button></template></el-dialog>
<el-dialog v-model="cargoImportVisible" title="导入货物" append-to-body width="560px">
<section-card>
<div class="cargo-import">
<el-upload
action="#"
accept=".xls,.xlsx"
:auto-upload="false"
:show-file-list="false"
:disabled="cargoImportLoading"
:on-change="handleCargoImport"
>
<el-button type="primary" :loading="cargoImportLoading">上传</el-button>
<template #tip>
<div class="el-upload__tip">支持 .xlsx、.xls 文件,单个文件不超过 50M</div>
</template>
</el-upload>
<el-button type="primary" plain @click="downloadCargoTemplate">点击下载模板</el-button>
</div>
</section-card>
<template #footer><el-button @click="cargoImportVisible = false">关闭</el-button></template>
</el-dialog>
<el-dialog v-model="routeDialogVisible" title="选择线路" width="1280px" @opened="loadRouteList">
<div class="route-dialog__search">
<el-form :model="routeQuery" label-position="right" label-width="86px">
@@ -1966,6 +1988,15 @@ export default {
margin-top: 8px;
color: #606266;
}
.cargo-import {
display: flex;
flex-direction: column;
gap: 16px;
.el-upload__tip {
margin-top: 8px;
line-height: 1.5;
}
}
@media screen and (max-width: 1440px) {
.route-node-form {
grid-template-columns: repeat(2, minmax(320px, 1fr));