阿丽 3 years ago
parent 53e85dd528
commit 46c6f1297e

@ -1,31 +1,23 @@
<!--
* @Author: your name
* @Date: 2022-03-09 14:13:46
* @LastEditTime: 2022-03-09 15:58:07
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE()
* @FilePath: /yywc-evaluation/src/views/Scoresituation/index.vue
-->
<template>
<div id="app">
<TopHeader title="车辆评估系统得分情况" />
<div class="appbox">
<div class="app-left">
<el-descriptions title="凯美瑞车辆评估报告:" size="medium" column=1 :contentStyle="{'color': 'rgb(22, 93, 253)'}">
<el-descriptions-item label="1.过户得分">9</el-descriptions-item>
<el-descriptions-item label="2.公里数得分">11</el-descriptions-item>
<el-descriptions-item label="3.油漆面得分">7</el-descriptions-item>
<el-descriptions-item label="4.钣金得分">7</el-descriptions-item>
<el-descriptions-item label="5.更换件得分">13</el-descriptions-item>
<el-descriptions-item label="6.发动机变速箱状态得分">40</el-descriptions-item>
<el-descriptions-item label="7.重大事故得分">0</el-descriptions-item>
<el-descriptions-item label="8.全程4S店保养得分">5</el-descriptions-item>
<el-descriptions title="凯美瑞车辆评估报告:" size="medium" :column=1 :contentStyle="{'color': 'rgb(22, 93, 253)'}">
<el-descriptions-item label="1.过户得分">{{initData.frequency}}</el-descriptions-item>
<el-descriptions-item label="2.公里数得分">{{initData.Kilometers}}</el-descriptions-item>
<el-descriptions-item label="3.油漆面得分">{{initData.surface}}</el-descriptions-item>
<el-descriptions-item label="4.钣金得分">{{initData.Sheet}}</el-descriptions-item>
<el-descriptions-item label="5.更换件得分">{{initData.rePart}}</el-descriptions-item>
<el-descriptions-item label="6.发动机变速箱状态得分">{{initData.engine}}</el-descriptions-item>
<el-descriptions-item label="7.重大事故得分">{{accident}}</el-descriptions-item>
<el-descriptions-item label="8.全程4S店保养得分">{{initData.maintain}}</el-descriptions-item>
</el-descriptions>
</div>
<div class="app-right">
<el-descriptions size="40" column=1 :contentStyle="{'color': 'rgb(22, 93, 253)'}">
<el-descriptions-item label="最终得分">60.9</el-descriptions-item>
<el-descriptions-item label="车辆状态">良好{中间值}</el-descriptions-item>
<el-descriptions size="40" :column=1 :contentStyle="{'color': 'rgb(22, 93, 253)'}">
<el-descriptions-item label="最终得分">{{initData.total}}</el-descriptions-item>
<el-descriptions-item label="车辆状况">{{state}}{{numerical}}</el-descriptions-item>
</el-descriptions>
</div>
</div>
@ -37,17 +29,29 @@
export default {
data() {
return {
initData: {}
initData: {},
state:'',
};
},
methods: {
onSubmit() {
console.log("submit!");
},
// onSubmit() {
// let state = state;
// if (initData.total >= 80 && initData.total <=100){
// state << ""
// }else if (initData.total >= 50 && initData.total <=70){
// state =""
// }
// else if (initData.total >= 20 && initData.total <=20){
// state =""
// }
// console.log("submit!");
// },
},
created() {
this.initData = this.getScoreData;
}
this.initData = this.getScoreData;
console.log( this.initData)
},
};
</script>
@ -56,15 +60,12 @@ export default {
width: 100%;
height: 100%;
text-align: center;
}
.appbox {
width: 50%;
display: flex;
padding: 10px 50px;
margin: 0 auto;
}
.app-left {
width: 50%;

@ -2,12 +2,12 @@
<div class="app-container">
<TopHeader title="车辆评估系统" />
<div class="app-xt">
<el-form ref="form" label-position="left" :model="form">
<el-form ref="elForm" label-position="left" :model="form">
<el-form-item label="1.车辆型号:">
<el-input type="text" v-model="form.name" style="width: 150px;"></el-input>
</el-form-item>
<el-form-item label="2.车辆年份:">
<el-date-picker v-model="form.month" type="month" placeholder="车辆年份" align="right">
<el-date-picker v-model="form.month" type="month" placeholder="车辆年份" align="right" style="width: 150px;">
</el-date-picker>
</el-form-item>
<el-form-item label="3.过户次数:">
@ -45,7 +45,7 @@
<el-checkbox label="左尾灯" name="type"></el-checkbox>
</el-col>
<el-col :span="4">
<el-checkbox label="前保险杠" name="type">前保险杠</el-checkbox>
<el-checkbox label="前保险杠" name="type"></el-checkbox>
</el-col>
<el-col :span="4">
<el-checkbox label="后保险杠" name="type"></el-checkbox>
@ -71,25 +71,25 @@
</el-checkbox-group>
</el-form-item>
<el-form-item label="8.发动机变速箱状态:">
<el-radio-group v-model="form.state">
<el-radio label="轻微渗油"></el-radio>
<el-radio label="严重渗油"></el-radio>
<el-radio label="发动机解体维修"></el-radio>
<el-radio-group v-model="form.transmission">
<el-radio :label="1" name="type">轻微渗油</el-radio>
<el-radio :label="2" name="type">严重渗油</el-radio>
<el-radio :label="3" name="type">发动机解体维修</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="9.是否发生重大事故:">
<el-radio-group v-model="form.accident">
<el-checkbox-group v-model="form.accident" @change="accidentChange">
<el-row>
<el-radio :label="1">
<el-checkbox :label="1">
如有以下情况则视为重大事故发生纵梁修复安全气囊弹出车子四梁六柱发生修复后翼子板切割直接扣80分
</el-radio>
</el-checkbox>
</el-row>
<el-row style="margin-top: 12px">
<el-radio :label="2">
发生纵梁修复 安全气囊弹出 最低值再7折
</el-radio>
<el-checkbox :label="2">
发生纵梁修复 安全气囊弹出 最低值再7折
</el-checkbox>
</el-row>
</el-radio-group>
</el-checkbox-group>
</el-form-item>
<el-form-item label="10.是否全程4S店保养:">
<el-radio-group v-model="form.maintain">
@ -106,7 +106,7 @@
</template>
<script>
import moment from "moment"
import moment from "moment";
export default {
data() {
return {
@ -114,73 +114,17 @@ export default {
form: {
month: "",
name: "",
region: "",
frequency: "",
Kilometers: "",
surface: "",
Sheet: "",
tick: [],
state: "",
accident: "",
transmission: "",
accident: [],
maintain: "",
},
afterSubmit: {
frequency: 10,
surface: 10,
Sheet: 10,
Kilometers: 15,
rePart: 13
},
region: [
{
id: 1,
name: "2010年",
},
{
id: 2,
name: "2011年",
},
{
id: 3,
name: "2012年",
},
{
id: 4,
name: "2013年",
},
{
id: 5,
name: "2014年",
},
{
id: 6,
name: "2015年",
},
{
id: 7,
name: "2016年",
},
{
id: 8,
name: "2017年",
},
{
id: 9,
name: "2018年",
},
{
id: 10,
name: "2019年",
},
{
id: 11,
name: "2020年",
},
{
id: 12,
name: "2021年",
},
],
//7
warn: false,
//
Sheet: [
{
@ -334,58 +278,129 @@ export default {
name: "11次及以上",
},
],
totalMonth: 0,
coefficient: "",
};
},
methods: {
accidentChange(val) {
console.log(val);
},
onSubmit() {
//
// let frequency = this.afterSubmit.frequency - this.form.frequency;
// //
// let surface = this.afterSubmit.surface - this.from.surface;
// //
// let Sheet = this.afterSubmit.Sheet - this.from.Sheet;
let frequency = 10 - this.form.frequency;
//
let surface = 10 - this.form.surface;
//
let Sheet = 10 - this.form.Sheet;
//
let Kilometers = 0;
if(this.form.Kilometers && this.form.month) {
const m1 = moment(moment().format("YYYY-MM-DD HH:mm:ss"));
if (this.form.Kilometers && this.form.month) {
const m1 = moment(moment().format("YYYY-MM-DD HH:mm:ss"));
const m2 = moment(this.form.month);
let {_data} = moment.duration(m1.diff(m2));
let k = this.form.Kilometers*10000 / _data.months;
if(k === Infinity) {
Kilometers = 15;
} else {
Kilometers = 15 - (k - 1250) / 125;
let { _data } = moment.duration(m1.diff(m2));
this.totalMonth = _data.months;
let k = (this.form.Kilometers * 10000) / _data.months;
if (k === Infinity) {
Kilometers = 15;
} else {
Kilometers = 15 - (k - 1250) / 125;
}
Kilometers = Kilometers <= 0 ? 0 : Kilometers;
console.log(Kilometers)
// Kilometers =this.afterSubmit.Kilometers - ((this.from.Kilometers * 10000) / ) ;
Kilometers = Kilometers <= 0 ? 0 : Kilometers;
} else {
Kilometers = 0;
}
//
let rePart = 13;
if(this.form.tick.length === 0) {
if (this.form.tick.length === 0) {
rePart = 13;
} else {
this.form.tick.forEach(ele => {
if(['右大灯','左大灯','前右后门','前左后门','后右后门','后左后门'].includes(ele)) {
rePart -= 4;
} else if(['前保险杠', '后保险杠', '右尾灯', '左尾灯'].includes(ele)) {
rePart -= 1;
} else {
this.form.tick.forEach((ele) => {
if (
[
"右大灯",
"左大灯",
"前右后门",
"前左后门",
"后右后门",
"后左后门",
].includes(ele)
) {
rePart -= 4;
} else if (
["前保险杠", "后保险杠", "右尾灯", "左尾灯"].includes(
ele
)
) {
rePart -= 1;
} else {
rePart -= 2;
rePart -= 2;
}
});
rePart = rePart <=0 ? 0 : rePart;
console.log(rePart)
rePart = rePart <= 0 ? 0 : rePart;
}
//
let engine = 40;
if (this.form.transmission === 1) {
engine -= 5;
} else if (this.form.transmission === 2) {
engine -= 20;
} else {
engine -= 40;
}
engine = engine <= 0 ? 0 : engine;
//
let maintain = 0;
if (this.form.maintain === 1) {
maintain = 5;
}
//
if (this.form.accident.findIndex(1) != -1) {
total = 20;
}
if (this.form.accident.findIndex(2) != -1) {
this.warn = true;
}
//
let year = this.totalMonth / 12;
if (this.totalMonth / 12 != 0) {
year++;
}
let coefficient = coefficient;
if (year <= 3) {
coefficient = 1;
} else if (year <= 8) {
// 4-8
coefficient = 0.8;
} else {
// 8
coefficient = 0.7;
}
//
// let total = frequency + surface + Sheet + Kilometers;
// this.setScoreData(obj)
// console.log("total score = " + total);
let total =
(frequency +
surface +
Sheet +
Kilometers +
rePart +
engine +
maintain) *
coefficient;
console.log("total score = " + total);
let obj = {
frequency: frequency,
surface: surface,
Sheet: Sheet,
Kilometers: Kilometers,
rePart: rePart,
engine: engine,
maintain: maintain,
total: total,
};
this.setScoreData(obj);
this.elForm = this.$router.push("/Scoresituation");
},
},
};

Loading…
Cancel
Save