|
|
|
@ -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");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|