<template>
|
<div class="product">
|
<p v-if="drivingHeaderInfo.length > 0" class="title" style="border: none">
|
<span></span>
|
行驶证基本信息
|
</p>
|
<FormInfo
|
:info="drivingInfo"
|
:keys="drivingHeaderInfo"
|
title=""
|
:loading="loading"
|
></FormInfo>
|
<p v-if="carRegHeaderInfo.length > 0" class="title" style="border: none">
|
<span></span>
|
机动车登记证
|
</p>
|
<FormInfo
|
:info="carRegInfo"
|
:keys="carRegHeaderInfo"
|
title=""
|
:loading="loading"
|
></FormInfo>
|
<p v-if="car300HeaderInfo.length > 0" class="title" style="border: none">
|
<span></span>
|
车300信息
|
</p>
|
<FormInfo
|
:info="car300Info"
|
:keys="car300HeaderInfo"
|
title=""
|
:loading="loading"
|
></FormInfo>
|
|
<KeysTable
|
:list="maintenanceRecordList"
|
:header="maintenanceRecordHeader"
|
:isShowPages="false"
|
title="维保记录"
|
></KeysTable>
|
<KeysTable
|
:list="serviceTimeRecordList"
|
:header="serviceTimeRecordHeader"
|
:isShowPages="false"
|
title="保养时间记录"
|
></KeysTable>
|
<KeysTable
|
:list="bodyStructureDamageRecordList"
|
:header="bodyStructureDamageRecordHeader"
|
:isShowPages="false"
|
title="车身结构损伤记录"
|
></KeysTable>
|
<KeysTable
|
:list="insuranceList"
|
:header="insuranceHeader"
|
:isShowPages="false"
|
title="碰撞记录"
|
></KeysTable>
|
<KeysTable
|
:list="claimsList"
|
:header="claimsHeader"
|
:isShowPages="false"
|
title="事故记录"
|
></KeysTable>
|
|
<div class="btn">
|
<el-button size="medium" plain @click="prevPage()">上一页</el-button>
|
<el-button
|
size="medium"
|
:loading="submitLoading"
|
type="primary"
|
@click="nextPage()"
|
>下一页</el-button
|
>
|
</div>
|
</div>
|
</template>
|
<script>
|
import FormInfo from "../../../../comprehensiveTransaction/components/FormInfo.vue";
|
import KeysTable from "../../../../comprehensiveTransaction/components/KeysTable";
|
import { queryCarInfoMap } from "@comprehensive/serve/public";
|
import { mainCreditInfoHeader } from "@comprehensive/utils/formHeaders";
|
import {
|
maintenanceRecordHeader,
|
serviceTimeRecordHeader,
|
bodyStructureDamageRecordHeader,
|
insuranceHeader,
|
claimsHeader,
|
} from "@comprehensive/utils/tableHeaders";
|
import common from "@/utils/common";
|
export default {
|
data() {
|
return {
|
applyInfo: this.$store.state.product.applyInfo,
|
applyMenu: this.$store.state.product.applyMenu,
|
drivingInfo: {}, //行驶证基本信息
|
drivingHeaderInfo: [], //行驶证基本信息title
|
carRegInfo: {}, //机动车登记证信息
|
carRegHeaderInfo: [], //机动车登记证信息title
|
car300Info: {}, //车300信息
|
car300HeaderInfo: [], //车300信息title
|
loading: false,
|
submitLoading: false,
|
|
maintenanceRecordHeader: [...maintenanceRecordHeader], //维保详细记录
|
maintenanceRecordList: [],
|
serviceTimeRecordHeader: [...serviceTimeRecordHeader], //保养时间记录
|
serviceTimeRecordList: [],
|
bodyStructureDamageRecordHeader: [...bodyStructureDamageRecordHeader], //车身结构损伤
|
bodyStructureDamageRecordList: [],
|
insuranceHeader: [...insuranceHeader], //碰撞信息
|
insuranceList: [],
|
claimsHeader: [...claimsHeader], //事故信息
|
claimsList: [],
|
};
|
},
|
computed: {},
|
components: {
|
FormInfo,
|
KeysTable,
|
},
|
async created() {
|
console.log("preApprovalInfo", this.applyInfo, this.applyMenu);
|
this.init();
|
},
|
methods: {
|
init() {
|
this.requestQueryCarInfoMap();
|
},
|
async requestQueryCarInfoMap() {
|
const { applyInfo } = this;
|
this.loading = true;
|
const resp = await queryCarInfoMap({
|
applySerialNo: applyInfo.serialNo,
|
});
|
this.loading = false;
|
if (resp.code == "00") {
|
// car300Info: {}, //车300信息
|
// car300HeaderInfo: [],//车300信息title
|
this.drivingInfo = {
|
...resp.result.drivingInfoMap,
|
};
|
this.drivingHeaderInfo = [];
|
for (const key in this.drivingInfo) {
|
if (this.drivingInfo.hasOwnProperty(key)) {
|
const item = this.drivingInfo[key];
|
this.drivingHeaderInfo.push({
|
label: item.filedDescription,
|
field: key,
|
});
|
}
|
}
|
this.carRegInfo = {
|
...resp.result.carRegInfoMap,
|
};
|
this.carRegHeaderInfo = [];
|
for (const key in this.carRegInfo) {
|
if (this.carRegInfo.hasOwnProperty(key)) {
|
const item = this.carRegInfo[key];
|
this.carRegHeaderInfo.push({
|
label: item.filedDescription,
|
field: key,
|
});
|
}
|
}
|
this.car300Info = {
|
...resp.result.car300InfoMap,
|
};
|
this.car300HeaderInfo = [];
|
for (const key in this.car300Info) {
|
if (this.car300Info.hasOwnProperty(key)) {
|
const item = this.car300Info[key];
|
this.car300HeaderInfo.push({
|
label: item.filedDescription,
|
field: key,
|
});
|
}
|
}
|
this.maintenanceRecordList = resp.result.maintenanceRecord
|
this.serviceTimeRecordList = resp.result.serviceTimeRecord
|
this.bodyStructureDamageRecordList = resp.result.bodyStructureDamageRecord
|
this.insuranceList = resp.result.insurance
|
this.claimsList = resp.result.claims
|
}
|
},
|
prevPage() {
|
this.applyMenu.forEach((val, index) => {
|
if (val.tabname == "车辆详情") {
|
common.tabInfo(
|
this.applyMenu[index - 1].tabname,
|
"CreditFlowCommon",
|
this
|
);
|
}
|
});
|
},
|
nextPage() {
|
this.$parent.updateApplyTabTree("车辆详情");
|
},
|
},
|
beforeRouteLeave(to, from, next) {
|
next();
|
},
|
};
|
</script>
|