✨ 完善变更记录、客商评分与车辆表单

变更记录详情统一为居中分页弹窗,并去掉经办人等信息行。
客商评分支持删除、提交前自评校验、复评后才能审批,以及 0 分提交。
车辆外廓尺寸和载质量单位改到输入框内,认证审核标签按四字换行,使用部门必填并默认当前部门。
临时额度的 -1 占位金额显示为空。新增项目编号可留空由系统生成。
修复缓存总单页在打开新增项目时误请求缺少 id 的详情接口。
详情页状态与运输方式标签样式统一。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-22 20:13:44 +08:00
parent 3a8442e522
commit ce1ce02551
13 changed files with 532 additions and 329 deletions
+61 -21
View File
@@ -129,7 +129,7 @@
>
<el-form
label-position="right"
label-width="calc(7em + 24px)"
label-width="calc(4em + 12px)"
class="certification-audit archive-form"
>
<section-card title="基础信息">
@@ -145,19 +145,25 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="外廓尺寸(毫米)">
<el-form-item label="外廓尺寸">
<div class="dimension-group">
<div class="dimension-group__item">
<span class="dimension-group__label">长</span>
<span class="certification-audit__value">{{ auditValue('outerLength') }}</span>
<span class="certification-audit__value">
{{ auditValueWithUnit('outerLength', 'mm') }}
</span>
</div>
<div class="dimension-group__item">
<span class="dimension-group__label">宽</span>
<span class="certification-audit__value">{{ auditValue('outerWidth') }}</span>
<span class="certification-audit__value">
{{ auditValueWithUnit('outerWidth', 'mm') }}
</span>
</div>
<div class="dimension-group__item">
<span class="dimension-group__label">高</span>
<span class="certification-audit__value">{{ auditValue('outerHeight') }}</span>
<span class="certification-audit__value">
{{ auditValueWithUnit('outerHeight', 'mm') }}
</span>
</div>
</div>
</el-form-item>
@@ -165,13 +171,17 @@
</el-row>
<el-row :gutter="18">
<el-col :span="6">
<el-form-item label="核定载质量(KG)">
<span class="certification-audit__value">{{ auditValue('approvedLoadKg') }}</span>
<el-form-item label="核定载质量">
<span class="certification-audit__value">
{{ auditValueWithUnit('approvedLoadKg', 'KG') }}
</span>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="准牵引总质量(KG)">
<span class="certification-audit__value">{{ auditValue('tractionMassKg') }}</span>
<el-form-item label="准牵引总质量">
<span class="certification-audit__value">
{{ auditValueWithUnit('tractionMassKg', 'KG') }}
</span>
</el-form-item>
</el-col>
<el-col :span="6">
@@ -357,7 +367,7 @@
v-if="showRejectReason"
class="certification-audit__reason"
label-position="right"
label-width="calc(7em + 24px)"
label-width="calc(4em + 24px)"
>
<el-form-item label="驳回原因" required>
<el-input
@@ -427,7 +437,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="外廓尺寸(毫米)">
<el-form-item label="外廓尺寸">
<div class="dimension-group">
<div class="dimension-group__item">
<span class="dimension-group__label">长</span>
@@ -436,7 +446,9 @@
inputmode="numeric"
placeholder="请输入"
@input="vehicleForm.outerLength = digitsOnly($event)"
/>
>
<template #suffix>mm</template>
</el-input>
</div>
<div class="dimension-group__item">
<span class="dimension-group__label">宽</span>
@@ -445,7 +457,9 @@
inputmode="numeric"
placeholder="请输入"
@input="vehicleForm.outerWidth = digitsOnly($event)"
/>
>
<template #suffix>mm</template>
</el-input>
</div>
<div class="dimension-group__item">
<span class="dimension-group__label">高</span>
@@ -454,7 +468,9 @@
inputmode="numeric"
placeholder="请输入"
@input="vehicleForm.outerHeight = digitsOnly($event)"
/>
>
<template #suffix>mm</template>
</el-input>
</div>
</div>
</el-form-item>
@@ -462,23 +478,27 @@
</el-row>
<el-row :gutter="18">
<el-col :span="6">
<el-form-item label="核定载质量(KG)" prop="approvedLoadKg">
<el-form-item label="核定载质量" prop="approvedLoadKg">
<el-input
v-model="vehicleForm.approvedLoadKg"
inputmode="numeric"
placeholder="请输入"
@input="vehicleForm.approvedLoadKg = digitsOnly($event)"
/>
>
<template #suffix>KG</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="准牵引总质量(KG)" prop="tractionMassKg">
<el-form-item label="准牵引总质量" prop="tractionMassKg">
<el-input
v-model="vehicleForm.tractionMassKg"
inputmode="numeric"
placeholder="请输入"
@input="vehicleForm.tractionMassKg = digitsOnly($event)"
/>
>
<template #suffix>KG</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
@@ -896,6 +916,7 @@ export default {
energyTypeOptions: ['柴油', '汽油', '新能源', '天然气'],
baseRules: {
organizationName: [{ required: true, message: '请选择所属组织', trigger: 'change' }],
useDepartment: [{ required: true, message: '请选择使用部门', trigger: 'change' }],
plateNo: [
{ required: true, message: '请输入车牌号', trigger: 'change' },
{ validator: this.validatePlateNo, trigger: 'change' },
@@ -986,6 +1007,9 @@ export default {
if (this.vehicleBox && !this.vehicleForm.id && !this.vehicleForm.organizationName) {
this.vehicleForm.organizationName = this.getCurrentOrganizationName();
}
if (this.vehicleBox && !this.vehicleForm.useDepartment) {
this.vehicleForm.useDepartment = this.getCurrentOrganizationName();
}
});
},
flattenDeptOptions(tree = [], level = 0) {
@@ -1061,6 +1085,7 @@ export default {
if (!row?.id) {
this.vehicleForm = emptyForm();
this.vehicleForm.organizationName = this.getCurrentOrganizationName();
this.vehicleForm.useDepartment = this.getCurrentOrganizationName();
this.syncPlateNo(false);
this.vehicleBox = true;
return;
@@ -1070,6 +1095,9 @@ export default {
...emptyForm(),
...(res.data.data || {}),
};
if (!this.vehicleForm.useDepartment) {
this.vehicleForm.useDepartment = this.getCurrentOrganizationName();
}
this.splitPlateNo();
this.syncPlateNo(false);
this.vehicleBox = true;
@@ -1102,6 +1130,10 @@ export default {
const value = this.certificationAuditForm[prop];
return value === undefined || value === null || value === '' ? '-' : value;
},
auditValueWithUnit(prop, unit) {
const value = this.auditValue(prop);
return value === '-' ? value : `${value}${unit}`;
},
handleCertificationApprove() {
auditCertification(this.certificationAuditForm.id, 1).then(() => {
this.$message.success('认证已通过');
@@ -1693,11 +1725,19 @@ export default {
}
}
.certification-audit,
.certification-audit {
:deep(.el-form-item__label) {
flex: 0 0 calc(4em + 12px) !important;
width: calc(4em + 12px) !important;
max-width: calc(4em + 12px);
}
}
.certification-audit__reason {
:deep(.el-form-item__label) {
flex: 0 0 calc(7em + 24px) !important;
width: calc(7em + 24px) !important;
flex: 0 0 calc(4em + 24px) !important;
width: calc(4em + 24px) !important;
max-width: calc(4em + 24px);
}
}