|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div id="app">
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<TopHeader title="车辆评估系统" />
|
|
|
|
|
<div class="app-xt">
|
|
|
|
|
<el-form ref="form" label-position="left" :model="form">
|
|
|
|
@ -7,11 +7,8 @@
|
|
|
|
|
<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="monthrange" align="right" unlink-panels range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" @blur="getRemainderTime">
|
|
|
|
|
<el-date-picker v-model="form.month" type="month" placeholder="车辆年份" align="right">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
<el-select v-model="form.region" placeholder="请选择" style="width: 150px;">
|
|
|
|
|
<el-option v-for="item in region" :value="item.id" :key="item.id" :label="item.name"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="3.过户次数:">
|
|
|
|
|
<el-select v-model="form.frequency" placeholder="请选择" style="width: 150px;">
|
|
|
|
@ -19,7 +16,7 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="4.公里数:">
|
|
|
|
|
<el-input type="text" v-model="form.Kilometers" style="width: 150px;"><i slot="suffix">万公里</i></el-input>
|
|
|
|
|
<el-input type="text" v-model.number="form.Kilometers" style="width: 150px;"><i slot="suffix">万公里</i></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="5.油漆面:">
|
|
|
|
|
<el-select v-model="form.surface" placeholder="请选择" style="width: 150px;">
|
|
|
|
@ -48,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>
|
|
|
|
@ -80,11 +77,18 @@
|
|
|
|
|
<el-radio label="发动机解体维修"></el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="9.是否发生重大事故:(如有以下情况则视为重大事故:发生纵梁修复、安全气囊弹出、车子四梁六
|
|
|
|
|
柱发生修复、后翼子板切割)">
|
|
|
|
|
<el-form-item label="9.是否发生重大事故:">
|
|
|
|
|
<el-radio-group v-model="form.accident">
|
|
|
|
|
<el-radio label="是"></el-radio>
|
|
|
|
|
<el-radio label="否"></el-radio>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-radio :label="1">
|
|
|
|
|
如有以下情况则视为重大事故:发生纵梁修复、安全气囊弹出、车子四梁六、柱发生修复、后翼子板切割直接扣80分
|
|
|
|
|
</el-radio>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row style="margin-top: 12px">
|
|
|
|
|
<el-radio :label="2">
|
|
|
|
|
发生纵梁修复 安全气囊弹出 最低值再7折
|
|
|
|
|
</el-radio>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="10.是否全程4S店保养:">
|
|
|
|
@ -102,6 +106,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import moment from "moment"
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -124,6 +129,7 @@ export default {
|
|
|
|
|
surface: 10,
|
|
|
|
|
Sheet: 10,
|
|
|
|
|
Kilometers: 15,
|
|
|
|
|
rePart: 13
|
|
|
|
|
},
|
|
|
|
|
region: [
|
|
|
|
|
{
|
|
|
|
@ -222,7 +228,7 @@ export default {
|
|
|
|
|
name: "10面",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 10,
|
|
|
|
|
id: 11,
|
|
|
|
|
name: "11面及以上",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
@ -273,7 +279,7 @@ export default {
|
|
|
|
|
name: "10面",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 10,
|
|
|
|
|
id: 11,
|
|
|
|
|
name: "11面及以上",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
@ -324,44 +330,70 @@ export default {
|
|
|
|
|
name: "10次",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 10,
|
|
|
|
|
id: 11,
|
|
|
|
|
name: "11次及以上",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getRemainderTime(startTime, endTime) {
|
|
|
|
|
var s1 = new Date(startTime.replace(/-/g, "/")),
|
|
|
|
|
s2 = new Date(endTime.replace(/-/g, "/")),
|
|
|
|
|
runTime = parseInt((s2.getTime() - s1.getTime()) / 1000);
|
|
|
|
|
var year = Math.floor(runTime / 86400 / 365);
|
|
|
|
|
runTime = runTime % (86400 * 365);
|
|
|
|
|
var month = Math.floor(runTime / 86400 / 30);
|
|
|
|
|
return year + "," + month;
|
|
|
|
|
},
|
|
|
|
|
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 = this.afterSubmit.frequency - this.form.frequency;
|
|
|
|
|
// //油漆面得分
|
|
|
|
|
// let surface = this.afterSubmit.surface - this.from.surface;
|
|
|
|
|
// //钣金面得分
|
|
|
|
|
// let Sheet = this.afterSubmit.Sheet - this.from.Sheet;
|
|
|
|
|
//公里数得分
|
|
|
|
|
let Kilometers =this.afterSubmit.Sheet - ((this.from.Kilometers * 10000) / this.getRemainderTime) ;
|
|
|
|
|
let Kilometers = 0;
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
Kilometers = Kilometers <= 0 ? 0 : Kilometers;
|
|
|
|
|
console.log(Kilometers)
|
|
|
|
|
// Kilometers =this.afterSubmit.Kilometers - ((this.from.Kilometers * 10000) / ) ;
|
|
|
|
|
} else {
|
|
|
|
|
Kilometers = 0;
|
|
|
|
|
}
|
|
|
|
|
// 更换件
|
|
|
|
|
let rePart = 13;
|
|
|
|
|
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 {
|
|
|
|
|
rePart -= 2;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
rePart = rePart <=0 ? 0 : rePart;
|
|
|
|
|
console.log(rePart)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//总分
|
|
|
|
|
let total = frequency + surface + Sheet + Kilometers;
|
|
|
|
|
console.log('month')
|
|
|
|
|
console.log("total score = " + total);
|
|
|
|
|
// let total = frequency + surface + Sheet + Kilometers;
|
|
|
|
|
// this.setScoreData(obj)
|
|
|
|
|
// console.log("total score = " + total);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
#app {
|
|
|
|
|
width: 100%;
|
|
|
|
|
.app-container {
|
|
|
|
|
min-width: 1600px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
.app-xt {
|
|
|
|
|