Browse Source

开发和完善车型询价单

master
yunuo970428 3 years ago
parent
commit
0edc53aaa4
  1. 11
      anrui-buscenter/anrui-buscenter-ui/src/api/chexingchaxun/modelinquire.js
  2. 220
      anrui-buscenter/anrui-buscenter-ui/src/views/chexingchaxun/modelinquire/modelconfigurationinquiry.vue
  3. 744
      anrui-buscenter/anrui-buscenter-ui/src/views/chexingchaxun/modelinquire/modelstandardconfiguration.vue
  4. 269
      anrui-buscenter/anrui-buscenter-ui/src/views/chexingchaxun/modelinquire/relation/xuanzekehu.vue
  5. 943
      anrui-buscenter/anrui-buscenter-ui/src/views/chexingchaxun/modelinquire/relation/xuanzekehuAdd.vue

11
anrui-buscenter/anrui-buscenter-ui/src/api/chexingchaxun/modelinquire.js

@ -98,3 +98,14 @@ export function getPurchaseDetails(data) {
method: 'get'
})
}
// 车型询价单--提交
export function save(data) {
return request({
url: '/base/v1/busvehicleinquiry/save',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}

220
anrui-buscenter/anrui-buscenter-ui/src/views/chexingchaxun/modelinquire/modelconfigurationinquiry.vue

@ -0,0 +1,220 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<div class="tab-header webtop">
<div>车型配置询价单</div>
<div>
<el-button type="primary" size="small" @click="handleSubmit">提交</el-button>
<el-button type="info" size="small" @click="handleReturn">关闭</el-button>
</div>
</div>
<div class="listadd">
<div class="wlInfo">
<span>车型配置询价单</span>
</div>
<el-form ref="dataForm" :model="formobj" label-position="right" class="formadd">
<div class="headtitle"><span>客户名称{{ customer }}</span><el-button type="primary" size="small" style="margin-left: 100px" @click="handleSelect">选择客户</el-button></div>
<div class="headtitle"><span>品牌{{ formobj.brandName }}<span style="margin-left: 20px">系列{{ productLineValue }}<span style="margin-left: 20px">驱动{{ driveFormValue }}<span style="margin-left: 20px">功能{{ vehicleTypeValue }}<span style="margin-left: 20px">马力{{ powerValue }}</span></span></span></span></span></div>
<div class="headtitle"><span>车型其他信息{{ vehModelInfor }}</span></div>
<div class="headline">常用配置</div>
<el-row>
<el-col :span="24">
<el-form-item prop="otherConfig">
<span style="display: block;">{{ formobj.vehModelConfig }}</span>
</el-form-item>
</el-col>
</el-row>
<div class="headline">更多配置</div>
<el-row>
<el-col :span="24">
<el-form-item prop="otherConfig">
<span style="display: block;">{{ formobj.moreConfig }}</span>
</el-form-item>
</el-col>
</el-row>
<div class="headline">选装配置</div>
<el-row>
<el-col :span="24">
<el-form-item prop="otherConfig">
<el-input v-model="formobj.optionalConfig" clearable placeholder="" type="textarea" resize="none" :autosize="{ minRows: 2, maxRows: 8}"></el-input>
</el-form-item>
</el-col>
</el-row>
<div class="headline">换装配置</div>
<el-row>
<el-col :span="24">
<el-form-item prop="otherConfig">
<el-input v-model="formobj.replacementConfig" clearable placeholder="" type="textarea" resize="none" :autosize="{ minRows: 2, maxRows: 8}"></el-input>
</el-form-item>
</el-col>
</el-row>
<div class="headline">其他特殊配置说明</div>
<el-row>
<el-col :span="24">
<el-form-item prop="otherConfig">
<el-input v-model="formobj.otherConfig" clearable placeholder="" type="textarea" resize="none" :autosize="{ minRows: 2, maxRows: 8}"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<xuanzekehu v-show="viewState == 2" ref="divSelect" @doback="resetState" @handleCustomer="backData"/>
</div>
</template>
<script>
import { getPathSidByUserSid, save } from '@/api/chexingchaxun/modelinquire.js'
import xuanzekehu from '../../../views/chexingchaxun/modelinquire/relation/xuanzekehu'
export default {
name: 'chexingpeizhixunjiadan',
components: {
xuanzekehu
},
data() {
return {
viewState: 1,
FormLoading: false,
productLineValue: '', //
driveFormValue: '', //
vehicleTypeValue: '', //
powerValue: '', //
vehModelInfor: '', //
customer: '', //
formobj: {
brandName: '',
brandSid: '',
createOrgSid: '',
customerSid: '',
inquirer: '',
inquiryDate: '',
moreConfig: '',
otherConfig: '',
sid: '',
useOrgSid: '',
vehModel: '',
optionalConfig: '',
replacementConfig: '',
vehModelConfig: '',
vehModelConfigSid: '',
vehModelSid: '',
createBySid: '',
}
}
},
methods: {
// ------------------------------------------------------
//
handleReturn() {
this.productLineValue = '' //
this.driveFormValue = '' //
this.vehicleTypeValue = '' //
this.powerValue = '' //
this.vehModelInfor = '' //
this.customer = ''
this.formobj = {
brandName: '',
brandSid: '',
createOrgSid: '',
customerSid: '',
inquirer: '',
inquiryDate: '',
moreConfig: '',
otherConfig: '',
sid: '',
useOrgSid: '',
vehModel: '',
optionalConfig: '',
replacementConfig: '',
vehModelConfig: '',
vehModelConfigSid: '',
vehModelSid: '',
createBySid: ''
}
this.$emit('doback')
},
//
showInfo(value) {
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
}
})
this.productLineValue = value.productLineValue
this.driveFormValue = value.driveFormValue
this.vehicleTypeValue = value.vehicleTypeValue
this.powerValue = value.powerValue
this.vehModelInfor = value.vehModelInfor //
this.formobj.brandName = value.brandName
this.formobj.brandSid = value.brandSid
this.formobj.inquirer = window.sessionStorage.getItem('name')
this.formobj.createBySid = window.sessionStorage.getItem('userSid')
this.formobj.moreConfig = value.otherConfig
this.formobj.vehModelConfig = value.configName
this.formobj.vehModelConfigSid = value.configSid
this.formobj.vehModelSid = value.modelSid
this.formobj.vehModel = value.vehicleAlias
},
handleSelect() {
this.viewState = 2
this.$refs['divSelect'].init()
},
backData(val) {
this.viewState = 1
this.customer = val.name
this.formobj.customerSid = val.sid
},
handleSubmit() {
save(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: res.msg })
this.handleReturn()
}
})
},
resetState() {
this.viewState = 1
},
}
}
</script>
<style scoped>
/deep/ .el-col-2 {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.wlInfo {
padding: 30px 0;
font-size: 24px;
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
}
.formadd {
padding: 0px !important;
}
.headline{
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
background-color: #0294d7;
text-align: left;
color: #ffffff;
}
.headtitle{
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 18px;
background-color: #ffffff;
/*border-bottom: 1px solid #dfe4ed;*/
text-align: left;
}
</style>

744
anrui-buscenter/anrui-buscenter-ui/src/views/chexingchaxun/modelinquire/modelstandardconfiguration.vue

@ -1,385 +1,394 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>车型配置标准页面</div>
<div>
<el-button type="primary" size="small">意向</el-button>
<el-button type="primary" size="small">核价</el-button>
<el-button type="primary" size="small">价格有效期询价</el-button>
<el-button type="info" size="small" @click="handleReturn">关闭</el-button>
</div>
</div>
<div class="listadd">
<div class="wlInfo">
<div class="topRightCorner">
<span>销售指导价{{ guidedPrice }} 万元</span>
<span style="margin-left: 15px">价格有效期{{ priceValidity }}</span>
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>车型配置标准页面</div>
<div>
<el-button type="primary" size="small">意向</el-button>
<el-button type="primary" size="small" @click="handleEnquiry">询价</el-button>
<el-button type="primary" size="small">价格有效期询价</el-button>
<el-button type="info" size="small" @click="handleReturn">关闭</el-button>
</div>
<span>车型配置标准页面</span>
</div>
<el-form ref="dataForm" :model="formobj" label-position="right" class="formadd">
<div class="headtitle"><span>系列{{ formobj.productLineValue }}<span style="margin-left: 20px">驱动{{ formobj.driveFormValue }}<span style="margin-left: 20px">功能{{ formobj.vehicleTypeValue }}<span style="margin-left: 20px">马力{{ formobj.powerValue }}</span></span></span></span></div>
<el-row>
<el-col :span="1">
<el-form-item>
<span>品牌</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="brandName">
<span>{{ formobj.brandName }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>功能</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="vehicleTypeValue">
<span>{{ formobj.vehicleTypeValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>系列</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="productLineValue">
<span>{{ formobj.productLineValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>驱动</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="driveFormValue">
<span>{{ formobj.driveFormValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>马力</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="powerValue">
<span>{{ formobj.powerValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>版本</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="vehicleVersionValue">
<span>{{ formobj.vehicleVersionValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>燃料</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="fuelTypeValue">
<span>{{ formobj.fuelTypeValue }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item>
<span>变速箱</span>
</el-form-item>
</el-col>
<el-col :span="1" class="tleftb">
<el-form-item prop="gearboxTypeValue">
<span>{{ formobj.gearboxTypeValue }}</span>
</el-form-item>
</el-col>
</el-row>
<div class="headline">车型信息</div>
<el-row>
<el-col :span="2">
<span>细分市场</span>
</el-col>
<el-col :span="3">
<el-form-item prop="marketSegmentsValue">
<span>{{ formobj.marketSegmentsValue }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>发动机型号</span>
</el-col>
<el-col :span="3">
<el-form-item prop="engineTypeValue">
<span>{{ formobj.engineTypeValue }}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="2">-->
<!-- <span>公告型号</span>-->
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<!-- <el-form-item prop="announcementModel">-->
<!-- <span>{{ formobj.announcementModel }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="2">
<span>规格型号</span>
</el-col>
<el-col :span="3">
<el-form-item prop="specifications">
<span>{{ formobj.specifications }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>排放标准</span>
</el-col>
<el-col :span="3">
<el-form-item prop="emissionStandardValue">
<span>{{ formobj.emissionStandardValue }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>系别</span>
</el-col>
<el-col :span="2">
<el-form-item prop="departmentValue">
<span>{{ formobj.departmentValue }}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="2">-->
<!-- <span>货箱</span>-->
<!-- </el-col>-->
<!-- <el-col :span="2" class="tleftb">-->
<!-- <el-form-item prop="packingCase">-->
<!-- <span>{{ formobj.packingCase }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
</el-row>
<el-row>
<div class="listadd">
<div class="wlInfo">
<div class="topRightCorner">
<span>销售指导价{{ guidedPrice }} 万元</span>
<span style="margin-left: 15px">价格有效期{{ priceValidity }}</span>
</div>
<span>车型配置标准页面</span>
</div>
<el-form ref="dataForm" :model="formobj" label-position="right" class="formadd">
<div class="headtitle"><span>系列{{ formobj.productLineValue }}<span style="margin-left: 20px">驱动{{ formobj.driveFormValue }}<span style="margin-left: 20px">功能{{ formobj.vehicleTypeValue }}<span style="margin-left: 20px">马力{{ formobj.powerValue }}</span></span></span></span></div>
<el-row>
<el-col :span="1">
<el-form-item>
<span>品牌</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="brandName">
<span>{{ formobj.brandName }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>功能</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="vehicleTypeValue">
<span>{{ formobj.vehicleTypeValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>系列</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="productLineValue">
<span>{{ formobj.productLineValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>驱动</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="driveFormValue">
<span>{{ formobj.driveFormValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>马力</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="powerValue">
<span>{{ formobj.powerValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>版本</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="vehicleVersionValue">
<span>{{ formobj.vehicleVersionValue }}</span>
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item>
<span>燃料</span>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="fuelTypeValue">
<span>{{ formobj.fuelTypeValue }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item>
<span>变速箱</span>
</el-form-item>
</el-col>
<el-col :span="1" class="tleftb">
<el-form-item prop="gearboxTypeValue">
<span>{{ formobj.gearboxTypeValue }}</span>
</el-form-item>
</el-col>
</el-row>
<div class="headline">车型信息</div>
<el-row>
<el-col :span="2">
<span>细分市场</span>
</el-col>
<el-col :span="3">
<el-form-item prop="marketSegmentsValue">
<span>{{ formobj.marketSegmentsValue }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>发动机型号</span>
</el-col>
<el-col :span="3">
<el-form-item prop="engineTypeValue">
<span>{{ formobj.engineTypeValue }}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="2">-->
<!-- <span>公告型号</span>-->
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<!-- <el-form-item prop="announcementModel">-->
<!-- <span>{{ formobj.announcementModel }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="2">
<span>规格型号</span>
</el-col>
<el-col :span="3">
<el-form-item prop="specifications">
<span>{{ formobj.specifications }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>排放标准</span>
</el-col>
<el-col :span="3">
<el-form-item prop="emissionStandardValue">
<span>{{ formobj.emissionStandardValue }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>系别</span>
</el-col>
<el-col :span="2">
<el-form-item prop="departmentValue">
<span>{{ formobj.departmentValue }}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="2">-->
<!-- <span>货箱</span>-->
<!-- </el-col>-->
<!-- <el-col :span="2" class="tleftb">-->
<!-- <el-form-item prop="packingCase">-->
<!-- <span>{{ formobj.packingCase }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
</el-row>
<el-row>
<!-- <el-col :span="2">-->
<!-- <span>内部编码</span>-->
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<!-- <el-form-item prop="insideCode">-->
<!-- <span>{{ formobj.insideCode }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
</el-row>
<div class="headline">常用配置</div>
<el-row>
<el-col :span="2">
<span>颜色</span>
</el-col>
<el-col :span="3">
<el-form-item prop="carColor">
<span>{{ formobj.carColor }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>驾驶室</span>
</el-col>
<el-col :span="3">
<el-form-item prop="specification">
<span>{{ formobj.specification }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>导流罩</span>
</el-col>
<el-col :span="3">
<el-form-item prop="baffleModel">
<span>{{ formobj.baffleModel }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>鞍座</span>
</el-col>
<el-col :span="3">
<el-form-item prop="saddle">
<span>{{ formobj.saddle }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>独立热源</span>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="independentSources">
<span>{{ formobj.independentSources }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
<span>缓速器</span>
</el-col>
<el-col :span="3">
<el-form-item prop="slowMachine">
<span>{{ formobj.slowMachine }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>后速桥比</span>
</el-col>
<el-col :span="3">
<el-form-item prop="rearAxleRatio">
<span>{{ formobj.rearAxleRatio }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>悬架</span>
</el-col>
<el-col :span="3">
<el-form-item prop="suspension">
<span>{{ formobj.suspension }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>轴距</span>
</el-col>
<el-col :span="3">
<el-form-item prop="wheelbase">
<span>{{ formobj.wheelbase }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>燃料箱</span>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="fuelTank">
<span>{{ formobj.fuelTank }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
<span>后视镜</span>
</el-col>
<el-col :span="3">
<el-form-item prop="rearViewMirror">
<span>{{ formobj.rearViewMirror }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>空调</span>
</el-col>
<el-col :span="3">
<el-form-item prop="airConditioner">
<span>{{ formobj.airConditioner }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>座椅</span>
</el-col>
<el-col :span="3">
<el-form-item prop="saddle">
<span>{{ formobj.seat }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>保险杠</span>
</el-col>
<el-col :span="3">
<el-form-item prop="bumper">
<span>{{ formobj.bumper }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>多媒体</span>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="multimedia">
<span>{{ formobj.multimedia }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
<span>轮胎</span>
</el-col>
<el-col :span="3">
<el-form-item prop="tireSize">
<span>{{ formobj.tireSize }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>轮毂材质</span>
</el-col>
<el-col :span="3">
<el-form-item prop="hubMaterial">
<span>{{ formobj.hubMaterial }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>护轮罩</span>
</el-col>
<el-col :span="3">
<el-form-item prop="tireCover">
<span>{{ formobj.tireCover }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>配置包</span>
</el-col>
<el-col :span="3">
<el-form-item prop="configuringBao">
<span>{{ formobj.configuringBao }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>货箱</span>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="packingCase">
<span>{{ formobj.packingCase }}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="2"/>-->
<!-- <el-col :span="2"/>-->
</el-row>
<div class="headline">更多配置</div>
<el-row>
<el-col :span="24">
<el-form-item prop="otherConfig">
<span style="display: block; text-indent: 2em">{{ formobj.otherConfig }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-col :span="2">-->
<!-- <span>内部编码</span>-->
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<!-- <el-form-item prop="insideCode">-->
<!-- <span>{{ formobj.insideCode }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
<!-- <el-col :span="3">-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
<!-- <el-col :span="2">-->
<!-- </el-col>-->
</el-row>
<div class="headline">常用配置</div>
<el-row>
<el-col :span="2">
<span>颜色</span>
</el-col>
<el-col :span="3">
<el-form-item prop="carColor">
<span>{{ formobj.carColor }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>驾驶室</span>
</el-col>
<el-col :span="3">
<el-form-item prop="specification">
<span>{{ formobj.specification }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>导流罩</span>
</el-col>
<el-col :span="3">
<el-form-item prop="baffleModel">
<span>{{ formobj.baffleModel }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>鞍座</span>
</el-col>
<el-col :span="3">
<el-form-item prop="saddle">
<span>{{ formobj.saddle }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>独立热源</span>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="independentSources">
<span>{{ formobj.independentSources }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
<span>缓速器</span>
</el-col>
<el-col :span="3">
<el-form-item prop="slowMachine">
<span>{{ formobj.slowMachine }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>后速桥比</span>
</el-col>
<el-col :span="3">
<el-form-item prop="rearAxleRatio">
<span>{{ formobj.rearAxleRatio }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>悬架</span>
</el-col>
<el-col :span="3">
<el-form-item prop="suspension">
<span>{{ formobj.suspension }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>轴距</span>
</el-col>
<el-col :span="3">
<el-form-item prop="wheelbase">
<span>{{ formobj.wheelbase }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>燃料箱</span>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="fuelTank">
<span>{{ formobj.fuelTank }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
<span>后视镜</span>
</el-col>
<el-col :span="3">
<el-form-item prop="rearViewMirror">
<span>{{ formobj.rearViewMirror }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>空调</span>
</el-col>
<el-col :span="3">
<el-form-item prop="airConditioner">
<span>{{ formobj.airConditioner }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>座椅</span>
</el-col>
<el-col :span="3">
<el-form-item prop="saddle">
<span>{{ formobj.seat }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>保险杠</span>
</el-col>
<el-col :span="3">
<el-form-item prop="bumper">
<span>{{ formobj.bumper }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>多媒体</span>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="multimedia">
<span>{{ formobj.multimedia }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
<span>轮胎</span>
</el-col>
<el-col :span="3">
<el-form-item prop="tireSize">
<span>{{ formobj.tireSize }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>轮毂材质</span>
</el-col>
<el-col :span="3">
<el-form-item prop="hubMaterial">
<span>{{ formobj.hubMaterial }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>护轮罩</span>
</el-col>
<el-col :span="3">
<el-form-item prop="tireCover">
<span>{{ formobj.tireCover }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>配置包</span>
</el-col>
<el-col :span="3">
<el-form-item prop="configuringBao">
<span>{{ formobj.configuringBao }}</span>
</el-form-item>
</el-col>
<el-col :span="2">
<span>货箱</span>
</el-col>
<el-col :span="2" class="tleftb">
<el-form-item prop="packingCase">
<span>{{ formobj.packingCase }}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="2"/>-->
<!-- <el-col :span="2"/>-->
</el-row>
<div class="headline">更多配置</div>
<el-row>
<el-col :span="24">
<el-form-item prop="otherConfig">
<span style="display: block; text-indent: 2em">{{ formobj.otherConfig }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<modelconfigurationinquiry v-show="viewState == 2" ref="divInquiry" @doback="resetState"/>
</div>
</template>
<script>
import { selectExiCarConfig } from '@/api/chexingchaxun/modelinquire.js'
import modelconfigurationinquiry from './modelconfigurationinquiry'
export default {
name: 'chexingpeizhibiaozhun',
components: {
modelconfigurationinquiry
},
data() {
return {
FormLoading: false,
guidedPrice: '',
priceValidity: '',
viewState: 1,
formobj: {},
sid_list: {
modelSid: '',
@ -393,10 +402,17 @@ export default {
this.tempDate.sid = this.$route.query.sid
},
// ------------------------------------------------------
handleEnquiry() {
this.viewState = 2
this.$refs['divInquiry'].showInfo(this.formobj)
},
//
handleReturn() {
this.$emit('doback')
},
resetState() {
this.viewState = 1
},
//
showInfo(sid, row) {
this.FormLoading = true

269
anrui-buscenter/anrui-buscenter-ui/src/views/chexingchaxun/modelinquire/relation/xuanzekehu.vue

@ -0,0 +1,269 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>选择客户</div>
<div>
<el-button type="primary" size="medium" @click="handleCreate()">新增客户</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="webcon">
<div class="searchcon">
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="130px" class="tab-header">
<el-form-item label="客户姓名">
<el-input v-model="listQuery.params.name" placeholder="请输入" clearable class="filter-item"/>
</el-form-item>
<div class="searchbtns">
<el-button type="primary" @click="handleFilter">查询</el-button>
</div>
</el-form>
</div>
</div>
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<div class="searchbtns">
<el-button size="small" type="primary" @click="handleConfirm(scope.row)">选择</el-button>
<el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
</div>
</template>
</el-table-column>
<el-table-column label="登记日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="客户名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="手机号码" align="center">
<template slot-scope="scope">
<span>{{ scope.row.mobile }}</span>
</template>
</el-table-column>
<el-table-column label="微信号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weixin }}</span>
</template>
</el-table-column>
<el-table-column label="客户类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customerType }}</span>
</template>
</el-table-column>
<el-table-column label="客户级别" align="center">
<template slot-scope="scope">
<span>{{ scope.row.level }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<xuanzekehu-add v-show="viewState == 2 || viewState == 3" ref="addAndUpdate" @reloadlist="resetState" @doback="resetState"/>
<el-dialog title="客户登记-类型" :visible.sync="dialogVisible" width="28%" top="13%">
<el-form :model="customerTypeList">
<el-form-item label="联络方式" :label-width="formLabelWidth" class="diaForm">
<el-select v-model="customerTypeList.visitWay" placeholder="请选择" @change="getVisitWay">
<el-option v-for="(item) in visitWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
<el-form-item label="客户类型" :label-width="formLabelWidth" class="diaForm">
<el-select v-model="customerTypeList.customerType" placeholder="请选择" @change="getCustomerType">
<el-option v-for="(item) in customertype_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="el-button-sure" type="primary" @click="handleOpen()"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import { pagerList, typeValues } from '@/api/jichuxinxi/busdepositvehicle'
import xuanzekehuAdd from './xuanzekehuAdd.vue'
export default {
name: 'xuanzekehu',
components: {
Pagination,
pageye,
xuanzekehuAdd
},
data() {
return {
dialogVisible: false, //
formLabelWidth: '110px',
isSearchShow: true,
viewState: 1, // 1 2- 3 4 5-
// -----------
tableKey: 0,
list: [],
sids: [],
customerTypeList: {
visitWay: '', //
visitWayKey: '', // --Key
customerType: '', //
customerTypeKey: '', // --Key
psid: ''
},
visitWay_list: [],
customertype_list: [],
listLoading: false,
listQuery: {
current: 1,
size: 10,
total: 0,
params: {
name: '',
userSid: ''
}
}
}
},
methods: {
init() {
this.getList()
this.getShuJUZiDian()
},
getShuJUZiDian() {
typeValues({ type: 'visitWay' }).then((res) => {
if (res.code === '200') {
this.visitWay_list = res.data
}
})
typeValues({ type: 'customertype' }).then((res) => {
if (res.code === '200') {
this.customertype_list = res.data
}
})
},
handleOpen() {
this.viewState = 2
if (this.customerTypeList.visitWay !== '' && this.customerTypeList.customerType !== '') {
this.dialogVisible = false
const customerTypeList = this.customerTypeList
this.$refs['addAndUpdate'].openCreate(customerTypeList)
this.customerTypeList = {
visitWay: '', //
visitWayKey: '', // --Key
customerType: '', //
customerTypeKey: '', // --Key
psid: ''
}
} else {
this.$message({
message: '请填写联络方式和客户类型',
type: 'warning'
})
}
},
getVisitWay(value) {
let bb = null
this.visitWay_list.forEach((e) => {
if (e.dictValue === value) {
bb = {
value: e.dictValue,
key: e.dictKey
}
}
})
this.customerTypeList.visitWay = bb.value
this.customerTypeList.visitWayKey = bb.key
},
getCustomerType(value) {
let bb = null
this.customertype_list.forEach((e) => {
if (e.dictValue === value) {
bb= {
value: e.dictValue,
key: e.dictKey,
sid: e.sid
}
}
})
this.customerTypeList.customerType = bb.value
this.customerTypeList.customerTypeKey = bb.key
this.customerTypeList.psid = bb.sid
},
// ------------------
handleCreate() {
this.dialogVisible = true
},
resetState() {
this.viewState = 1
this.getList()
},
//
handleReturn() {
this.$emit('doback') //
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
pagerList(this.listQuery).then((response) => {
this.listLoading = false
if (response.code === '200' && response.data && response.data.total > 0) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('选择sid', this.sids)
},
//
handleConfirm(row) {
this.$emit('handleCustomer', row)
},
handleUpdate(row) {
this.viewState = 3
this.$refs['addAndUpdate'].openUpdate(row.sid)
}
}
}
</script>
<style scoped>
.searchcon {
margin-top: 8px;
}
</style>

943
anrui-buscenter/anrui-buscenter-ui/src/views/chexingchaxun/modelinquire/relation/xuanzekehuAdd.vue

@ -0,0 +1,943 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>新增客户信息</div>
<div>
<el-button type="primary" size="small" icon="" @click="handleJUBuCun()">保存</el-button>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd" :rules="rules">
<div class="titwu">客户信息</div>
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<div>基础信息</div>
</div>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="name">
<el-input v-model="temp.name" maxlength="20" placeholder="请输入客户名称" style="width:50%" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户类型</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="weChatID">
<span>{{ temp.customerType }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="mobile">
<el-input v-model="temp.mobile" maxlength="20" placeholder="请输入联系电话" style="width:50%" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">微信号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="weixin">
<el-input v-model="temp.weixin" maxlength="20" placeholder="请输入微信号" style="width:50%" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="temp.customerType==='个人'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">公司名称</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item prop="company">
<el-input v-model="temp.companyName" maxlength="20" placeholder="请输入公司名称" style="width:81%" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户地址</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="temp.province" filterable placeholder="请选择省" class="addinputw" style="width:160px" @change="getShen">
<el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
<el-select v-model="temp.city" filterable placeholder="请选择市" class="addinputw" style="width:160px" @change="getShi">
<el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
<el-select v-model="temp.county" filterable placeholder="请选择县" class="addinputw" style="width:160px" @change="getQu">
<el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
<el-input v-model="temp.address" style="width:46%" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户级别</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="level">
<el-select v-model="temp.level" class="addinputw" placeholder="请选择客户级别" style="width:50%" @change="getJiBie">
<el-option v-for="(item, index) in induslevel" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" v-show="stateId=='0'" class="trightb">
<el-form-item>
<span slot="label">是否开启提醒</span>
</el-form-item>
</el-col>
<el-col :span="8" v-show="stateId=='0'">
<el-form-item>
<el-radio v-model="temp.isOnRemind" label="是"></el-radio>
<el-radio v-model="temp.isOnRemind" label="否"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="temp.isOnRemind=='是'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">提醒日期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-date-picker v-model="temp.remind_day" type="date" style="width:50%" value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">提醒备注</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.remind_remark" maxlength="20" style="width:50%" placeholder="请输入提醒备注" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<!--更多信息-->
<el-collapse v-model="activeNames">
<el-collapse-item title="更多信息" name="2">
<el-row v-show="temp.customerType==='个人'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户生日</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-date-picker v-model="temp.birthday" style="width:50%" type="date" format="yyyy-MM-dd" class="addinputw" value-format="yyyy-MM-dd" placeholder="请选择"/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">性别</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-radio v-model="temp.sex" label="男"></el-radio>
<el-radio v-model="temp.sex" label="女"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件类型</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.certificateType" style="width:50%" maxlength="20" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件号码</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.idnumber" style="width:50%" maxlength="20" placeholder="请输入证件号码" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件有效期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-date-picker v-model="temp.endDate" style="width:50%" type="date" format="yyyy-MM-dd" class="addinputw" value-format="yyyy-MM-dd" placeholder="请选择"/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">电子邮件</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.e_mail" maxlength="20" style="width:50%" placeholder="请输入电子邮箱" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">紧急联系人</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.contacts" maxlength="20" style="width:50%" placeholder="请输入紧急联系人" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">紧急联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.emergencyMobile" maxlength="20" style="width:50%" placeholder="请输入紧急联系电话" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户来源</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select v-model="temp.source" class="addinputw" style="width:50%" placeholder="请选择客户来源" @change="getKeHuLaiYUan">
<el-option v-for="(item, index) in sourceLisst" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户分类</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select v-model="temp.customerClass" style="width:50%" class="addinputw" placeholder="请选择客户分类" @change="getFenLei">
<el-option v-for="(item, index) in merClass" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">备注</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item>
<el-input v-model="temp.remarks" style="width:81%" maxlength="20" placeholder="请输入备注" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<!-- </el-form>-->
</el-collapse-item>
</el-collapse>
<!--运营情况-->
<el-collapse v-model="activeNames">
<el-collapse-item title="运营情况" name="3">
<el-form ref="datufrom" :model="templooke" label-position="top" label-width="190px" class="formadd03">
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">承运货物类型</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select v-model="templooke.consignmentType" style="width:50%" class="addinputw" placeholder="请选择承运货物类型" @change="getHuoWuLeiXing">
<el-option v-for="(item, index) in signmentT" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">承运货物</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select v-model="templooke.consignment" style="width:50%" class="addinputw" placeholder="请选择承运货物" @change="getHuoWu">
<el-option v-for="(item, index) in consign" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">运输路线</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="templooke.hallway_state" style="width:50%" maxlength="20" placeholder="请输入运输路线" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">购车状态</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<div class="yihang">
<el-checkbox-group v-if="aseType.length > 0" v-model="aseTypeBox" @change="changexuanze">
<el-checkbox v-for="item in aseType" :key="item.divtkey" :label="item.divtkey">
{{ item.dictValue }}
</el-checkbox>
</el-checkbox-group>
<div class="mw"><el-input v-model="templooke.purchase_num" :disabled="templooke.purchase_num == '0'" maxlength="10" class="addinputwduan" clearable/></div>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">现有车辆</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input style="width:50%" v-model="templooke.existing_vehicles" maxlength="20" placeholder="请输入现有车辆" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">现有车辆品牌</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input style="width:50%" v-model="templooke.existing_vehiclesBrand" maxlength="20" placeholder="请输入现有车辆品牌" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">备注</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item>
<el-input style="width:81%" v-model="templooke.remarks" maxlength="20" placeholder="请输入备注" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-collapse-item>
</el-collapse>
<!--见证材料-->
<el-collapse v-model="activeNames" v-show="stateId=='0'">
<el-collapse-item title="见证材料" name="4">
<el-form ref="datufrom" :model="templooke" label-position="right" label-width="190px" class="formadd03">
<el-row>
<el-col :span="24">
<span slot="label">文件</span>
<Upload ref="uploadImg" v-model="list1" :limit="1" bucket="map" :upload-data="{type:'0001'}"/>
</el-col>
</el-row>
</el-form>
</el-collapse-item>
</el-collapse>
</el-form>
</div>
</div>
<!-- 弹框提示 -->
<el-dialog :visible.sync="dialogFormVisible" width="300px" :close-on-click-modal="false">
<div class="result-cont">
是否更新用户
</div>
<div slot="footer" v-loading="FormLoading" class="dialog-footer">
<el-button @click="dialogFormVisibl()"></el-button>
<el-button type="primary" @click="dialogStatus()"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { savePcCustomerInfo, getPcCustomerInfoBySid, updatePcCustomerInfo } from '@/api/jichuxinxi/crmcustomer'
import { getProvince, getCity, getCounty } from '@/api/portal/areaPicker' //
import { typeValues } from '@/api/dictcommons/shujuzidian'
import { getPcBusinessInfoBySid } from '@/api/jichuxinxi/crmbusiness'
import Upload from '@/components/uploadFile/upload.vue' //
export default {
name: 'xuanzekehuAdd',
components: { Upload },
data() {
var checkSubmit = (rule, value, callback) => {
const Submit =
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (Submit.test(value)) {
return callback()
}
callback(new Error('请输入手机号'))
}
var identitycard = (rules, value, callback) => {
const card =
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
if (card.test(value)) {
return callback()
}
callback(new Error('请输入身份证号码'))
}
return {
// ---
list1: [],
province: [],
city: [],
county: [],
inputProvinceList: [],
inputCityList: [],
inputCountyList: [],
list: [],
activeNames: ['1'],
// ---------
customerClass: 'customerClass',
merClass: [],
customerSource: 'customerSource',
sourceLisst: [],
customerLevel: 'customerLevel',
induslevel: [],
visitWay: 'visitWay',
industway: [],
documenttype: 'documenttype',
cateType: [],
consignmentType: 'consignmentType',
signmentT: [],
consignment: 'consignment',
consign: [],
industrytype: 'industrytype',
industry_type: [],
customerType_list: [],
sex_list: [],
aseTypeBox: [],
aseType: [
{
dictValue: '首次购车',
divtkey: 0
},
{
dictValue: '续购',
divtkey: 1
}
],
stateId: 0,
FormLoading: false,
listLoading: false,
crmVisitAppendixDtoList: [],
temp: {
crmBusinessDto: {},
crmVisitAppendixDtoList: [],
customerType: '', //
visitWay: '', //
visitWayKey: '',
userSid: ''
}, //
templooke: {},
dialogFormVisible: false,
rules: {
name: [{ required: true, message: '请填写客户名称', trigger: 'blur' }],
address: [{ required: true, message: '请填写客户地址', trigger: 'blur' }]
}
}
},
methods: {
//
init() {
this.getShuJUZiDian()
this.huoquSheng()
},
//
openUpdate(sid) {
this.stateId = sid
this.isOnRemind = '否'
this.init()
if (this.stateId !== '0') {
getPcCustomerInfoBySid(this.stateId).then((response) => {
console.log(response.data)
if (response.code === '200') {
this.$refs['dataForm'].clearValidate()
this.temp = response.data
this.temp.birthday = this.getDates(this.temp.birthday)
if (this.temp.customerType !== '') {
typeValues({ type: 'customerType' }).then((res) => {
if (res.code === '200') {
if (this.temp.customerType === '个人') {
this.temp.certificateType = '身份证'
this.temp.certificateTypeKey = '01'
} else {
this.temp.certificateType = '营业执照'
this.temp.certificateTypeKey = '02'
}
this.customerType_list = res.data
this.customerType_list.forEach((e) => {
if (e.dictValue === this.temp.customerType) {
typeValues({ psid: e.sid, type: this.customerClass }).then((res) => {
if (res.code === '200') {
this.merClass = res.data
}
})
}
})
}
})
}
}
})
getPcBusinessInfoBySid(this.stateId).then((response) => {
if (response.code === '200') {
this.templooke = response.data
//
const Arry = []
Arry.push(parseInt(response.data.purchase_time))
this.aseTypeBox = Arry
}
})
}
},
//
openCreate(customerTypeList) {
this.temp.customerType = customerTypeList.customerType
this.temp.customerTypeKey = customerTypeList.customerTypeKey
this.temp.visitWay = customerTypeList.visitWay
this.temp.visitWayKey = customerTypeList.visitWayKey
this.$refs['dataForm'].clearValidate()
this.stateId = '0'
this.init()
if (this.temp.customerType !== '') {
if (this.temp.customerType === '个人') {
this.temp.certificateType = '身份证'
this.temp.certificateTypeKey = '01'
} else {
this.temp.certificateType = '营业执照'
this.temp.certificateTypeKey = '02'
}
typeValues({ psid: customerTypeList.psid, type: this.customerClass }).then((res) => {
if (res.code === '200') {
this.merClass = res.data
}
})
}
},
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
//
getShuJUZiDian() {
typeValues({ type: this.documenttype }).then((res) => {
if (res.code === '200') {
this.cateType = res.data
}
})
//
typeValues({ type: this.customerSource }).then((res) => {
if (res.code === '200') {
this.sourceLisst = res.data
}
})
//
typeValues({ type: this.customerLevel }).then((res) => {
if (res.code === '200') {
this.induslevel = res.data
}
})
//
typeValues({ type: this.visitWay }).then((res) => {
if (res.code === '200') {
this.industway = res.data
}
})
//
typeValues({ type: this.industrytype }).then((res) => {
if (res.code === '200') {
this.industry_type = res.data
}
})
//
typeValues({ type: this.consignmentType }).then((res) => {
if (res.code === '200') {
this.signmentT = res.data
}
})
//
typeValues({ type: this.consignment }).then((res) => {
if (res.code === '200') {
this.consign = res.data
}
})
//
typeValues({ type: 'sex' }).then((res) => {
if (res.code === '200') {
this.sex_list = res.data
}
})
},
// --------------------------------------------------
huoquSheng() {
getProvince().then((res) => {
if (res.code === '200') {
this.inputProvinceList = res.data
}
})
},
getShen(value) {
let bb = ''
this.inputProvinceList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
// codeprovince
this.temp.province = bb.name
this.huoquShi(bb.sid)
},
huoquShi(sid1) {
var sid = {
sid: sid1
}
getCity(sid).then((res) => {
console.log('2222市', res)
if (res.code === '200') {
this.inputCityList = res.data
}
})
},
getShi(value) {
let bb = ''
this.inputCityList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.temp.city = bb.name
this.huoquXian(bb.sid)
},
huoquXian(sid1) {
var sid = {
sid: sid1
}
getCounty(sid).then((res) => {
console.log('333县', res)
if (res.code === '200') {
this.inputCountyList = res.data
}
})
},
getQu(value) {
let bb = ''
this.inputCountyList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.temp.county = bb.name
},
// ------------------------------------------------------
//
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.activeNames = ['1']
this.templooke = {}
this.temp = {}
this.aseTypeBox = []
this.$emit('doback')
},
//
getDates(v) {
var now = new Date(v)
var year = now.getFullYear() //
var month = now.getMonth() + 1 //
var day = now.getDate() //
var hh = now.getHours() //
var mm = now.getMinutes() //
var ss = now.getSeconds() //
var clock = year + '-'
if (month < 10) clock += '0'
clock += month + '-'
if (day < 10) clock += '0'
clock += day + ' '
if (hh < 10) clock += '0'
clock += hh + ':'
if (mm < 10) clock += '0'
clock += mm + ':'
if (ss < 10) clock += '0'
clock += ss
return clock
},
//
findselect(list, value) {
var item = null
for (var i = 0; i < list.length; i++) {
if (list[i].divtkey === value) {
item = list[i]
break
}
}
return item
},
//
changexuanze() {
this.aseTypeBox = [this.aseTypeBox[this.aseTypeBox.length - 1]]
const item = this.findselect(this.aseType, this.aseTypeBox[0])
this.templooke.purchase_time = item.divtkey
},
//
handleJUBuCun() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true
if (this.temp.sex !== '') {
this.sex_list.forEach((e) => {
if (e.dictValue === this.temp.sex) {
this.temp.sexKey = e.dictKey
}
})
}
if (this.temp.isOnRemind !== '' && this.temp.isOnRemind === '是') {
this.temp.isOnRemindkey = 1
} else {
this.temp.isOnRemindkey = 0
}
if (!this.temp.birthday) {
this.temp.birthday = ''
}
if (this.stateId === '0') {
this.temp.userSid = window.sessionStorage.getItem('userSid')
this.temp.crmBusinessDto = this.templooke
this.getUrl()
this.temp.crmVisitAppendixDtoList = this.crmVisitAppendixDtoList
savePcCustomerInfo(this.temp).then((response) => {
this.FormLoading = false
if (response.code === '200') {
this.$notify({
title: '提示',
message: '添加成功',
type: 'success',
duration: 2000
})
this.list1 = []
this.handleReturn('true')
} else if ('511' === response.code || '513' === response.code) {
this.FormLoading = false
this.dialogFormVisible = true
this.stateId = response.data
} else {
alert(200)
}
}).catch(() => {})
} else {
this.temp.userSid = window.sessionStorage.getItem('userSid')
this.temp.crmBusinessDto = this.templooke
updatePcCustomerInfo(this.temp).then((res) => {
this.FormLoading = false
if (res.code === '200') {
this.$notify({
title: '提示',
message: '修改成功',
type: 'success',
duration: 2000
})
this.handleReturn('true')
} else {
this.$notify({
title: '提示',
message: '修改失败',
type: 'error',
duration: 2000
})
}
})
}
}
})
},
dialogStatus() {
this.dialogFormVisible = false
this.openUpdate(this.stateId)
},
dialogFormVisibl() {
this.$notify({
title: '提示',
message: '用户名手机号重复',
type: 'error',
duration: 2000
})
this.dialogFormVisible = false
return
},
//
getFenLei(value) {
let bb = null
this.merClass.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: 'customerClass',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.temp.customerClass = bb.name
this.temp.customerClassKey = bb.vaule
},
//
getKeHuLaiYUan(value) {
let bb = null
this.sourceLisst.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: 'customerSource',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.temp.source = bb.name
this.temp.sourceKey = bb.vaule
},
//
getJiBie(value) {
let bb = null
this.induslevel.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: 'customerLevel',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.temp.level = bb.name
this.temp.levelKey = bb.vaule
},
//
getHuoWuLeiXing(value) {
let bb = null
this.signmentT.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: 'consignmentType',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.templooke.consignmentType = bb.name
this.templooke.consignmentTypeKey = bb.vaule
},
//
getHuoWu(value) {
let bb = null
this.consign.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: 'consignment',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.templooke.consignment = bb.name
this.templooke.consignmentKey = bb.vaule
},
// --------------------------------------------------------------
getUrl() {
for (var i = 0; i < this.list1.length; i++) {
var namese = this.list1[i].name
var nameArr = namese.split('.')
this.crmVisitAppendixDtoList.push({
// attachType: '0001',
fileName: this.list1[i].name,
filePath: this.list1[i].url,
fileSize: this.list1[i].size,
// linkSid: this.temp.customerSid,
createBySid: window.sessionStorage.getItem('userSid'),
fileType: nameArr[nameArr.length - 1]
})
console.log('11223344', this.crmVisitAppendixDtoList)
}
}
}
}
</script>
<style scoped>
.trightb {
text-align: right;
}
.addinputwduan {
width: 80px;
margin: 0 5px;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>
Loading…
Cancel
Save