编辑
@@ -5576,6 +5577,9 @@ const attachmentViewerPlugins = [
const PageAvueForm = {
inheritAttrs: false,
+ props: {
+ formPageTitle: { type: String, default: '' },
+ },
render() {
const attrs = { ...this.$attrs };
const rowSave = attrs.onRowSave;
@@ -5596,9 +5600,12 @@ const PageAvueForm = {
slot,
])
);
- return h('div', { class: attrs.option?.dialogCustomClass || 'business-crud-form-page-dialog' }, [
- h(resolveComponent('avue-form'), attrs, slots),
- ]);
+ const children = [];
+ if (this.formPageTitle) {
+ children.push(h('div', { class: 'archive-page-form__title' }, this.formPageTitle));
+ }
+ children.push(h(resolveComponent('avue-form'), attrs, slots));
+ return h('div', { class: attrs.option?.dialogCustomClass || 'business-crud-form-page-dialog' }, children);
},
};
@@ -6202,6 +6209,18 @@ export default {
(this.isStandaloneBusinessPage && ['add', 'edit'].includes(this.$route.query.mode))
);
},
+ formPageTitle() {
+ if (
+ this.isStandaloneFormPage &&
+ (this.isShippingTemplatePage || this.isTransportPlanPage || this.isWaybillDetailLayout)
+ ) {
+ return (
+ this.$route.query.name ||
+ `${this.$route.query.mode === 'edit' ? '编辑' : '新增'}${this.config.title || ''}`
+ );
+ }
+ return '';
+ },
crudContainer() {
return this.isStandaloneFormPage ? 'PageAvueForm' : 'avue-crud';
},
@@ -15158,8 +15177,9 @@ export default {
&__transport-plan-detail-head,
&__transport-plan-waybill-card {
- border: 1px solid #dfe3e8;
background: #fff;
+ border-radius: 6px;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
&__transport-plan-detail-head {
@@ -15316,7 +15336,7 @@ export default {
}
&__transport-plan-waybill-card {
- margin-top: 8px;
+ //margin-top: 8px;
padding: 16px 14px 12px;
}
@@ -16025,7 +16045,7 @@ export default {
// 独立表单页(合同/运单/运输计划/运输模板):标题分块使用白底卡片,间距 12px,与 section-card 风格一致
:global(.business-crud-form-page-dialog:not(.el-dialog)) {
- padding: 20px 24px 96px;
+ //padding: 20px 24px 96px;
box-sizing: border-box;
}
diff --git a/src/views/business/components/master-order-editor.vue b/src/views/business/components/master-order-editor.vue
index b2b0349..9af1cb4 100644
--- a/src/views/business/components/master-order-editor.vue
+++ b/src/views/business/components/master-order-editor.vue
@@ -1739,6 +1739,8 @@ export default {
padding: 16px;
border: 1px solid #eff1f7;
background: #fff;
+ border-radius: 6px;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
h3 {
margin: 0 0 16px;
padding-left: 12px;
diff --git a/src/views/business/loading-manage.vue b/src/views/business/loading-manage.vue
index e91e757..4ca1f5a 100644
--- a/src/views/business/loading-manage.vue
+++ b/src/views/business/loading-manage.vue
@@ -388,6 +388,7 @@
@update:model-value="value => !isStandaloneFormPage && (dialogVisible = value)"
@closed="resetLoadingDialog"
>
+
{{ formPageTitle }}
@@ -724,7 +725,7 @@
-
+
-
+
+ {{ masterEditorTitle }}
+
+
.master-search {
- margin-bottom: 8px;
+ margin-bottom: 12px;
padding: 12px 12px 4px;
background: #fff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
@@ -419,9 +424,8 @@ export default {
}
}
.master-list-panel {
- background: #fff;
.toolbar {
- padding: 8px;
+ padding: 8px 0;
}
}
.master-card {
@@ -513,6 +517,7 @@ export default {
font-size: 14px;
font-weight: 600;
line-height: 1.4;
+ max-width: 180px;
}
}
.route-connector {
diff --git a/src/views/business/project-apply.vue b/src/views/business/project-apply.vue
index 0d3bed7..001484f 100644
--- a/src/views/business/project-apply.vue
+++ b/src/views/business/project-apply.vue
@@ -2116,10 +2116,10 @@ export default {
font-weight: 600;
&::before {
- width: 4px;
+ //width: 4px;
height: 18px;
margin-right: 8px;
- background: #409eff;
+ //background: #409eff;
border-radius: 2px;
content: '';
}
diff --git a/src/views/business/voucher-manage.vue b/src/views/business/voucher-manage.vue
index 8eeed25..353c10c 100644
--- a/src/views/business/voucher-manage.vue
+++ b/src/views/business/voucher-manage.vue
@@ -99,7 +99,7 @@
width="120"
fixed="right"
align="center"
- />
-
+
{{ vehicleDetail.plateNo || vehicle.plateNo }}
{{ vehicleDetail.plateColor || '-' }}
{{ vehicleDetail.businessRelation || '-' }}
- {{ vehicleDetail.organizationName || '-' }}
- {{ vehicleDetail.vehicleType || '-' }}
- {{ vehicleDetail.energyType || '-' }}
+ {{
+ vehicleDetail.organizationName || '-'
+ }}
+ {{
+ vehicleDetail.vehicleType || '-'
+ }}
+ {{
+ vehicleDetail.energyType || '-'
+ }}
{{ dimensions }}
- {{ vehicleDetail.approvedLoadKg ?? '-' }}
- {{ vehicleDetail.tractionMassKg ?? '-' }}
- {{ vehicleDetail.drivingLicenseNo || '-' }}
- {{ vehicleDetail.roadTransportCertNo || '-' }}
- {{ vehicleDetail.drivingLicenseEndDate || '-' }}
- {{ vehicleDetail.roadTransportCertEndDate || '-' }}
- {{ vehicleDetail.annualReviewEndDate || '-' }}
+ {{
+ vehicleDetail.approvedLoadKg ?? '-'
+ }}
+ {{
+ vehicleDetail.tractionMassKg ?? '-'
+ }}
+ {{
+ vehicleDetail.drivingLicenseNo || '-'
+ }}
+ {{
+ vehicleDetail.roadTransportCertNo || '-'
+ }}
+ {{
+ vehicleDetail.drivingLicenseEndDate || '-'
+ }}
+ {{
+ vehicleDetail.roadTransportCertEndDate || '-'
+ }}
+ {{
+ vehicleDetail.annualReviewEndDate || '-'
+ }}
-
+
-
+
@@ -86,56 +106,316 @@ import { getList as getChangeList } from '@/api/vehicle/transport-change-record'
import { getList as getOilElectricList } from '@/api/vehicle/oil-electric-record';
import { getList as getEtcList } from '@/api/vehicle/etc-record';
import { getList as getOtherExpenseList } from '@/api/vehicle/other-expense-record';
+import SectionCard from '@/components/section-card/main.vue';
const cols = (...items) => items.map(([label, prop, width]) => ({ label, prop, width }));
const tabConfigs = [
- ['insurance', '保险记录', getInsuranceList, cols(['车牌号', 'vehicleNo'], ['保险类型', 'insuranceType'], ['开始日期', 'startDate'], ['结束日期', 'endDate'], ['保费', 'premium'], ['保单号', 'policyNo'])],
- ['violation', '违章记录', getViolationList, cols(['车牌号', 'vehicleNo'], ['驾驶人', 'driverName'], ['类型', 'violationType'], ['事项', 'violationItem'], ['违章时间', 'violationTime'], ['罚款金额', 'fineAmount'])],
- ['maintenance', '维修记录', getMaintenanceList, cols(['车牌号', 'vehicleNo'], ['维修人', 'maintainer'], ['维修时间', 'maintenanceTime'], ['维修位置', 'location'], ['费用', 'cost'], ['维修单位', 'company'])],
- ['maintenancePlan', '保养记录', getMaintenancePlanList, cols(['车牌号', 'vehicleNo'], ['保养人', 'maintainer'], ['保养时间', 'maintenanceTime'], ['保养项目', 'maintenanceItem'], ['费用', 'cost'], ['下次保养时间', 'nextMaintenanceTime'])],
- ['tire', '换胎记录', getTireList, cols(['车牌号', 'vehicleNo'], ['更换时间', 'replacementTime'], ['轮胎品牌', 'tireBrand'], ['轮胎规格', 'tireSpec'], ['费用', 'cost'])],
- ['accident', '事故记录', getAccidentList, cols(['车牌号', 'vehicleNo'], ['事故时间', 'accidentTime'], ['事故地点', 'accidentLocation'], ['事故类型', 'accidentType'], ['损失金额', 'lossAmount'])],
- ['annualInspection', '年检记录', getAnnualInspectionList, cols(['车牌号', 'vehicleNo'], ['年检日期', 'inspectionDate'], ['年检有效期至', 'inspectionEndDate'], ['年检机构', 'inspectionOrganization'], ['费用', 'cost'])],
- ['mileage', '里程记录', getMileageList, cols(['车牌号', 'vehicleNo'], ['记录时间', 'recordTime'], ['里程数', 'mileage'], ['里程单位', 'mileageUnit'], ['备注', 'remark'])],
- ['change', '变更记录', getChangeList, cols(['车牌号', 'vehicleNo'], ['变更类型', 'changeType'], ['变更时间', 'changeTime'], ['变更前内容', 'beforeChange'], ['变更后内容', 'afterChange'])],
- ['equipment', '设备台账', null, cols(['设备编码', 'equipmentCode'], ['设备名称', 'equipmentName'], ['设备类型', 'equipmentType'], ['安装日期', 'installDate'], ['状态', 'status'])],
- ['oilElectric', '油电台账', getOilElectricList, cols(['车牌号', 'vehicleNo'], ['加油/充电日期', 'recordDate'], ['类型', 'energyType'], ['数量', 'quantity'], ['金额', 'amount'])],
- ['etc', 'ETC记录', getEtcList, cols(['车牌号', 'vehicleNo'], ['交易日期', 'transactionDate'], ['交易金额', 'amount'], ['交易地点', 'location'], ['ETC卡号', 'etcCardNo'])],
- ['otherExpense', '其他费用记录', getOtherExpenseList, cols(['车牌号', 'vehicleNo'], ['费用日期', 'expenseDate'], ['费用类型', 'expenseType'], ['金额', 'amount'], ['备注', 'remark'])],
+ [
+ 'insurance',
+ '保险记录',
+ getInsuranceList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['保险类型', 'insuranceType'],
+ ['开始日期', 'startDate'],
+ ['结束日期', 'endDate'],
+ ['保费', 'premium'],
+ ['保单号', 'policyNo']
+ ),
+ ],
+ [
+ 'violation',
+ '违章记录',
+ getViolationList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['驾驶人', 'driverName'],
+ ['类型', 'violationType'],
+ ['事项', 'violationItem'],
+ ['违章时间', 'violationTime'],
+ ['罚款金额', 'fineAmount']
+ ),
+ ],
+ [
+ 'maintenance',
+ '维修记录',
+ getMaintenanceList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['维修人', 'maintainer'],
+ ['维修时间', 'maintenanceTime'],
+ ['维修位置', 'location'],
+ ['费用', 'cost'],
+ ['维修单位', 'company']
+ ),
+ ],
+ [
+ 'maintenancePlan',
+ '保养记录',
+ getMaintenancePlanList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['保养人', 'maintainer'],
+ ['保养时间', 'maintenanceTime'],
+ ['保养项目', 'maintenanceItem'],
+ ['费用', 'cost'],
+ ['下次保养时间', 'nextMaintenanceTime']
+ ),
+ ],
+ [
+ 'tire',
+ '换胎记录',
+ getTireList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['更换时间', 'replacementTime'],
+ ['轮胎品牌', 'tireBrand'],
+ ['轮胎规格', 'tireSpec'],
+ ['费用', 'cost']
+ ),
+ ],
+ [
+ 'accident',
+ '事故记录',
+ getAccidentList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['事故时间', 'accidentTime'],
+ ['事故地点', 'accidentLocation'],
+ ['事故类型', 'accidentType'],
+ ['损失金额', 'lossAmount']
+ ),
+ ],
+ [
+ 'annualInspection',
+ '年检记录',
+ getAnnualInspectionList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['年检日期', 'inspectionDate'],
+ ['年检有效期至', 'inspectionEndDate'],
+ ['年检机构', 'inspectionOrganization'],
+ ['费用', 'cost']
+ ),
+ ],
+ [
+ 'mileage',
+ '里程记录',
+ getMileageList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['记录时间', 'recordTime'],
+ ['里程数', 'mileage'],
+ ['里程单位', 'mileageUnit'],
+ ['备注', 'remark']
+ ),
+ ],
+ [
+ 'change',
+ '变更记录',
+ getChangeList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['变更类型', 'changeType'],
+ ['变更时间', 'changeTime'],
+ ['变更前内容', 'beforeChange'],
+ ['变更后内容', 'afterChange']
+ ),
+ ],
+ [
+ 'equipment',
+ '设备台账',
+ null,
+ cols(
+ ['设备编码', 'equipmentCode'],
+ ['设备名称', 'equipmentName'],
+ ['设备类型', 'equipmentType'],
+ ['安装日期', 'installDate'],
+ ['状态', 'status']
+ ),
+ ],
+ [
+ 'oilElectric',
+ '油电台账',
+ getOilElectricList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['加油/充电日期', 'recordDate'],
+ ['类型', 'energyType'],
+ ['数量', 'quantity'],
+ ['金额', 'amount']
+ ),
+ ],
+ [
+ 'etc',
+ 'ETC记录',
+ getEtcList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['交易日期', 'transactionDate'],
+ ['交易金额', 'amount'],
+ ['交易地点', 'location'],
+ ['ETC卡号', 'etcCardNo']
+ ),
+ ],
+ [
+ 'otherExpense',
+ '其他费用记录',
+ getOtherExpenseList,
+ cols(
+ ['车牌号', 'vehicleNo'],
+ ['费用日期', 'expenseDate'],
+ ['费用类型', 'expenseType'],
+ ['金额', 'amount'],
+ ['备注', 'remark']
+ ),
+ ],
].map(([name, label, request, columns]) => ({ name, label, request, columns }));
export default {
+ components: { SectionCard },
props: { modelValue: Boolean, vehicle: { type: Object, default: () => ({}) } },
emits: ['update:modelValue'],
data() {
- return { detailLoading: false, tableLoading: false, vehicleDetail: {}, activeTab: 'insurance', records: [], page: { current: 1, size: 10, total: 0 } };
+ return {
+ detailLoading: false,
+ tableLoading: false,
+ vehicleDetail: {},
+ activeTab: 'insurance',
+ records: [],
+ page: { current: 1, size: 10, total: 0 },
+ };
},
computed: {
- tabs() { return tabConfigs; },
- activeConfig() { return tabConfigs.find(item => item.name === this.activeTab) || tabConfigs[0]; },
- activeColumns() { return this.activeConfig.columns; },
- dimensions() { const v = this.vehicleDetail; return [v.outerLength, v.outerWidth, v.outerHeight].filter(item => item !== null && item !== undefined && item !== '').join('×') || '-'; },
- plateColorType() { return { 黄牌: 'warning', 蓝牌: 'primary', 绿牌: 'success' }[this.vehicleDetail.plateColor] || 'info'; },
- imageFields() { return [['行驶证主页面', 'drivingLicenseImage'], ['行驶证主页反页', 'drivingLicenseMainBack'], ['行驶证副页正页', 'drivingLicenseViceFront'], ['行驶证副页反页', 'drivingLicenseViceBack'], ['道路运输证', 'roadTransportCertImage']].map(([label, prop]) => ({ label, prop })); },
- imageUrls() { return this.imageFields.map(item => this.vehicleDetail[item.prop]).filter(Boolean); },
+ tabs() {
+ return tabConfigs;
+ },
+ activeConfig() {
+ return tabConfigs.find(item => item.name === this.activeTab) || tabConfigs[0];
+ },
+ activeColumns() {
+ return this.activeConfig.columns;
+ },
+ dimensions() {
+ const v = this.vehicleDetail;
+ return (
+ [v.outerLength, v.outerWidth, v.outerHeight]
+ .filter(item => item !== null && item !== undefined && item !== '')
+ .join('×') || '-'
+ );
+ },
+ plateColorType() {
+ return (
+ { 黄牌: 'warning', 蓝牌: 'primary', 绿牌: 'success' }[this.vehicleDetail.plateColor] ||
+ 'info'
+ );
+ },
+ imageFields() {
+ return [
+ ['行驶证主页面', 'drivingLicenseImage'],
+ ['行驶证主页反页', 'drivingLicenseMainBack'],
+ ['行驶证副页正页', 'drivingLicenseViceFront'],
+ ['行驶证副页反页', 'drivingLicenseViceBack'],
+ ['道路运输证', 'roadTransportCertImage'],
+ ].map(([label, prop]) => ({ label, prop }));
+ },
+ imageUrls() {
+ return this.imageFields.map(item => this.vehicleDetail[item.prop]).filter(Boolean);
+ },
+ },
+ watch: {
+ modelValue(value) {
+ if (value) this.initialize();
+ },
},
- watch: { modelValue(value) { if (value) this.initialize(); } },
methods: {
- async initialize() { this.activeTab = 'insurance'; this.page.current = 1; this.vehicleDetail = { ...this.vehicle }; if (this.vehicle.id) { this.detailLoading = true; try { const res = await getDetail(this.vehicle.id); this.vehicleDetail = { ...this.vehicle, ...(res.data.data || {}) }; } finally { this.detailLoading = false; } } this.loadRecords(); },
- async loadRecords() { const { request } = this.activeConfig; if (!request) { this.records = []; this.page.total = 0; return; } this.tableLoading = true; try { const res = await request(this.page.current, this.page.size, { vehicleNo: this.vehicleDetail.plateNo || this.vehicle.plateNo, vehicleType: '车辆' }); const data = res.data.data || {}; this.records = data.records || []; this.page.total = data.total || 0; } finally { this.tableLoading = false; } },
- handlePageChange() { this.page.current = 1; this.loadRecords(); },
+ async initialize() {
+ this.activeTab = 'insurance';
+ this.page.current = 1;
+ this.vehicleDetail = { ...this.vehicle };
+ if (this.vehicle.id) {
+ this.detailLoading = true;
+ try {
+ const res = await getDetail(this.vehicle.id);
+ this.vehicleDetail = { ...this.vehicle, ...(res.data.data || {}) };
+ } finally {
+ this.detailLoading = false;
+ }
+ }
+ this.loadRecords();
+ },
+ async loadRecords() {
+ const { request } = this.activeConfig;
+ if (!request) {
+ this.records = [];
+ this.page.total = 0;
+ return;
+ }
+ this.tableLoading = true;
+ try {
+ const res = await request(this.page.current, this.page.size, {
+ vehicleNo: this.vehicleDetail.plateNo || this.vehicle.plateNo,
+ vehicleType: '车辆',
+ });
+ const data = res.data.data || {};
+ this.records = data.records || [];
+ this.page.total = data.total || 0;
+ } finally {
+ this.tableLoading = false;
+ }
+ },
+ handlePageChange() {
+ this.page.current = 1;
+ this.loadRecords();
+ },
},
};
diff --git a/src/views/vehicle/customer-archive.vue b/src/views/vehicle/customer-archive.vue
index 55a0112..e744ecc 100644
--- a/src/views/vehicle/customer-archive.vue
+++ b/src/views/vehicle/customer-archive.vue
@@ -4860,24 +4860,6 @@ export default {
//background: #fff;
}
-.archive-page-form__title {
- display: flex;
- align-items: center;
- margin-bottom: 20px;
- color: #303133;
- font-size: 18px;
- font-weight: 600;
-
- &::before {
- width: 4px;
- height: 18px;
- margin-right: 8px;
- background: #409eff;
- border-radius: 2px;
- content: '';
- }
-}
-
.archive-form__footer {
display: flex;
justify-content: flex-end;