✨ 完善变更记录、客商评分与车辆表单
变更记录详情统一为居中分页弹窗,并去掉经办人等信息行。 客商评分支持删除、提交前自评校验、复评后才能审批,以及 0 分提交。 车辆外廓尺寸和载质量单位改到输入框内,认证审核标签按四字换行,使用部门必填并默认当前部门。 临时额度的 -1 占位金额显示为空。新增项目编号可留空由系统生成。 修复缓存总单页在打开新增项目时误请求缺少 id 的详情接口。 详情页状态与运输方式标签样式统一。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:model-value="modelValue"
|
||||
title="变更记录详情"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
align-center
|
||||
width="1100px"
|
||||
class="change-record-detail-dialog"
|
||||
@update:model-value="$emit('update:modelValue', $event)"
|
||||
@open="resetPage"
|
||||
>
|
||||
<el-table
|
||||
:data="pageRows"
|
||||
border
|
||||
max-height="60vh"
|
||||
:show-overflow-tooltip="false"
|
||||
>
|
||||
<el-table-column prop="field" label="变更字段" min-width="180" />
|
||||
<el-table-column
|
||||
prop="before"
|
||||
label="变更前"
|
||||
min-width="360"
|
||||
class-name="change-record-detail-value"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="after"
|
||||
label="变更后"
|
||||
min-width="500"
|
||||
class-name="change-record-detail-value"
|
||||
/>
|
||||
</el-table>
|
||||
<el-empty v-if="!total" description="暂无变更内容" :image-size="60" />
|
||||
<div class="change-record-detail-dialog__pager">
|
||||
<el-pagination
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
background
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="$emit('update:modelValue', false)">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ChangeRecordDetailDialog',
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
rows: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
total() {
|
||||
return this.rows.length;
|
||||
},
|
||||
pageRows() {
|
||||
const start = (this.currentPage - 1) * this.pageSize;
|
||||
return this.rows.slice(start, start + this.pageSize);
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
rows() {
|
||||
const maxPage = Math.max(1, Math.ceil(this.total / this.pageSize) || 1);
|
||||
if (this.currentPage > maxPage) this.currentPage = 1;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
resetPage() {
|
||||
this.currentPage = 1;
|
||||
this.pageSize = 10;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.change-record-detail-dialog__pager {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
:deep(.change-record-detail-value .cell) {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
overflow: visible;
|
||||
text-overflow: clip;
|
||||
line-height: 1.6;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user