123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 |
- <template>
- <div>
- <div class="customer-head">
- <div class="customer-back">
- <el-button
- type="danger"
- style="border: none;background: none;color: red"
- icon="el-icon-arrow-left"
- @click="goBack()"
- >返回列表
- </el-button>
- </div>
- <div class="add-customer-btn">
- <el-button
- class="el-button--small-yh"
- style="margin-left: 6px;"
- type="primary"
- size="small"
- v-if="editBtn"
- @click="inEdit"
- >编 辑
- </el-button>
- <el-button
- class="el-button--small-yh"
- v-else
- style="margin-left: 6px;"
- type="primary"
- size="small"
- :disabled="editDis"
- @click="submit"
- >保 存
- </el-button>
- </div>
- </div>
- <div style="margin-top: 50px">
- <el-tab-pane label="基础信息">
- <trade-card title="基础信息">
- <avue-form :option="optionForm" v-model="form" ref="form">
- </avue-form>
- </trade-card>
- <trade-card title="文件中心">
- <upload-file :data="[]" :disabled="editDis"></upload-file>
- </trade-card>
- <trade-card title="反馈表">
- <avue-crud
- :option="option"
- :data="data"
- id="out-table"
- ref="crud"
- :header-cell-class-name="headerClassName"
- :row-style="{ height: '20px', padding: '0px' }"
- :cell-style="{ height: '20px', padding: '0px' }"
- @selection-change="selectionChange"
- >
- </avue-crud>
- </trade-card>
- <trade-card title="操作记录">
- <avue-form :option="optionForm2" v-model="form" ref="form2">
- </avue-form>
- </trade-card>
- </el-tab-pane>
- </div>
- </div>
- </template>
- <script>
- import {
- submit,
- detail,
- submitApprova,
- revokeApproval
- } from '@/api/claimSettlement/index';
- export default {
- name: 'detailsPage',
- data() {
- return {
- editBtn: false,
- editDis: false,
- form: {},
- oldForm: {},
- optionForm: {
- menuBtn: false,
- span: 6,
- disabled: false,
- labelWidth: 100,
- column: [
- {
- label: '理赔单号',
- prop: 'claimNo',
- disabled: true
- },
- {
- label: '来源类型',
- prop: 'claimSourceType',
- type: 'select',
- dicData: [
- {
- label: '经销商',
- value: 1
- },
- {
- label: '门店',
- value: 2
- },
- {
- label: '终端消费者',
- value: 3
- }
- ]
- },
- {
- label: '来源方名称',
- prop: 'sourceName'
- },
- {
- label: '消费者姓名',
- prop: 'consumerName'
- },
- {
- label: '消费者电话',
- prop: 'consumerPhone'
- },
- {
- label: '胎号',
- prop: 'tyreNo'
- },
- {
- label: '规格型号',
- prop: 'tyreSpecs'
- },
- {
- label: '购买日期',
- prop: 'purchaseDate',
- type: 'date',
- format: 'yyyy-MM-dd',
- valueFormat: 'yyyy-MM-dd'
- },
- {
- label: '装车日期',
- prop: 'mountDate',
- type: 'date',
- format: 'yyyy-MM-dd',
- valueFormat: 'yyyy-MM-dd'
- },
- {
- label: '行驶里程(km)',
- prop: 'runMileage'
- },
- {
- label: '索赔金额',
- prop: 'claimAmount'
- },
- {
- label: '理赔原因',
- prop: 'claimReason',
- type: 'textarea',
- span: 12,
- minRows: 2
- },
- {
- label: '备注',
- prop: 'remark',
- type: 'textarea',
- span: 12,
- minRows: 2
- }
- ]
- },
- optionForm2: {
- menuBtn: false,
- span: 6,
- disabled: false,
- labelWidth: 100,
- column: [
- {
- label: '审核状态',
- prop: 'auditStatus',
- type: 'select',
- dicData: [
- {
- label: '待审核',
- value: 0
- },
- {
- label: '审核中',
- value: 1
- },
- {
- label: '已通过',
- value: 2
- },
- {
- label: '已拒绝',
- value: 3
- }
- ],
- disabled: true
- },
- {
- label: '制单人',
- prop: 'createUserName',
- disabled: true
- },
- {
- label: '制单日期',
- prop: 'createTime',
- disabled: true
- },
- {
- label: '修改人',
- prop: 'updateUserName',
- disabled: true
- },
- {
- label: '修改日期',
- prop: 'updateTime',
- disabled: true
- }
- ]
- },
- option: {
- maxHeight: 340,
- calcHeight: 30,
- menuWidth: 60,
- searchMenuSpan: 18,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- menu: false,
- column: [
- {
- label: 'index',
- prop: 'index',
- width: '55',
- fixed: true,
- headerslot: true
- },
- {
- label: '原始文件名',
- prop: 'fileName',
- overHidden: true
- },
- {
- label: '文件地址',
- prop: 'fileUrl',
- overHidden: true
- },
- {
- label: '文件类型',
- prop: 'fileType',
- overHidden: true
- },
- {
- label: '制单人',
- prop: 'createUserName',
- overHidden: true
- },
- {
- label: '制单日期',
- prop: 'createTime',
- type: 'date',
- overHidden: true,
- width: 120,
- format: 'yyyy-MM-dd',
- valueFormat: 'yyyy-MM-dd HH:mm:ss'
- },
- {
- label: '修改人',
- prop: 'updateUserName',
- overHidden: true
- },
- {
- label: '修改日期',
- prop: 'updateTime',
- type: 'date',
- overHidden: true,
- width: 120,
- format: 'yyyy-MM-dd',
- valueFormat: 'yyyy-MM-dd HH:mm:ss'
- },
- {
- label: '备注',
- prop: 'remarks',
- cell: true,
- width: 150,
- overHidden: true
- }
- ]
- }
- };
- },
- components: {},
- props: {
- detailData: Object
- },
- created() {
- if (this.detailData && this.detailData.id) {
- this.editBtn = true;
- this.editDis = true;
- this.optionForm.disabled = true;
- this.getDetail(this.detailData.id);
- }
- },
- methods: {
- inEdit() {
- this.editBtn = false;
- if (this.form.status == '录入') {
- this.editDis = false;
- this.optionForm.disabled = false;
- }
- },
- /**
- * @param {any} id
- */
- getDetail(id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- detail({ id: id })
- .then(res => {
- this.form = res.data.data;
- })
- .finally(() => {
- loading.close();
- });
- },
- // 更改表格颜色
- /**
- * @param {{ columnIndex: number; column: { level: number; }; }} tab
- */
- headerClassName(tab) {
- //颜色间隔
- let back = ""
- if (tab.columnIndex >= 0 && tab.column.level === 1) {
- if (tab.columnIndex % 2 === 0) {
- back = "back-one"
- } else if (tab.columnIndex % 2 === 1) {
- back = "back-two"
- }
- }
- return back;
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item__error {
- display: none !important;
- }
- ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- ::v-deep .el-table .cell {
- padding: 0 2px !important;
- .el-form-item {
- margin-bottom: 0px !important;
- }
- }
- ::v-deep #out-table .back-one {
- background: #ecf5ff !important;
- text-align: center;
- padding: 4px 0;
- }
- ::v-deep #out-table .back-two {
- background: #ecf5ff !important;
- text-align: center;
- padding: 4px 0;
- }
- ::v-deep .el-table--small td,
- .el-table--small th {
- padding: 2px !important;
- }
- </style>
|