mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-12 00:56:43 +08:00
代码修改
This commit is contained in:
@@ -3,24 +3,24 @@
|
|||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<p class="title pl10 pv12 mt10">基本信息</p>
|
<p class="title pl10 pv12 mt10">基本信息</p>
|
||||||
<van-field
|
<van-field
|
||||||
v-model="userInfo.customerName"
|
v-model="userInfo.customerName"
|
||||||
required
|
required
|
||||||
clearable
|
clearable
|
||||||
label="姓名"
|
label="姓名"
|
||||||
name="姓名"
|
name="姓名"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
v-validate="'required|name'"
|
v-validate="'required|name'"
|
||||||
/>
|
/>
|
||||||
<van-field
|
<van-field
|
||||||
v-model="userInfo.customerPhone"
|
v-model="userInfo.customerPhone"
|
||||||
required
|
required
|
||||||
clearable
|
clearable
|
||||||
label="移动电话"
|
label="移动电话"
|
||||||
name="移动电话"
|
name="移动电话"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
maxlength="11"
|
maxlength="11"
|
||||||
type="tel"
|
type="tel"
|
||||||
v-validate="'required|mobile'"
|
v-validate="'required|mobile'"
|
||||||
/>
|
/>
|
||||||
<form-block :userInfo="userInfo" ref="formBlock"></form-block>
|
<form-block :userInfo="userInfo" ref="formBlock"></form-block>
|
||||||
<van-button type="danger" class="bottom-btn" @click="save" v-no-more-click="1000">保存</van-button>
|
<van-button type="danger" class="bottom-btn" @click="save" v-no-more-click="1000">保存</van-button>
|
||||||
@@ -28,307 +28,307 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Field, CellGroup, Cell, RadioGroup, Radio, } from 'vant'
|
import { Field, CellGroup, Cell, RadioGroup, Radio, } from 'vant'
|
||||||
import { updateCustomerInfo } from '@/api/ebiz/customer/customer'
|
import { updateCustomerInfo } from '@/api/ebiz/customer/customer'
|
||||||
import formBlock from '@/components/ebiz/customer/formBlock'
|
import formBlock from '@/components/ebiz/customer/formBlock'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'addCustomer',
|
name: 'addCustomer',
|
||||||
components: {
|
components: {
|
||||||
[Field.name]: Field,
|
[Field.name]: Field,
|
||||||
[CellGroup.name]: CellGroup,
|
[CellGroup.name]: CellGroup,
|
||||||
[Cell.name]: Cell,
|
[Cell.name]: Cell,
|
||||||
[formBlock.name]: formBlock
|
[formBlock.name]: formBlock
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userInfo: {
|
userInfo: {
|
||||||
customerName: '', //姓名
|
customerName: '', //姓名
|
||||||
customerPhone: '', // 手机号
|
customerPhone: '', // 手机号
|
||||||
customerSex: '0', //性别
|
customerSex: '0', //性别
|
||||||
nativeplace: '1', //国家地区
|
nativeplace: '1', //国家地区
|
||||||
province: '', //户籍省
|
province: '', //户籍省
|
||||||
city: '', //户籍市
|
city: '', //户籍市
|
||||||
birthday: '', //出生日期
|
birthday: '', //出生日期
|
||||||
idType: '1', //证件类型
|
idType: '1', //证件类型
|
||||||
customerIdNumber: '', //证件号码
|
customerIdNumber: '', //证件号码
|
||||||
certificateValidate: '', //证件起始日期
|
certificateValidate: '', //证件起始日期
|
||||||
certiexpiredate: '', //证件到期时间
|
certiexpiredate: '', //证件到期时间
|
||||||
effectiveDateType: false, //是否长期
|
effectiveDateType: false, //是否长期
|
||||||
email: '', //电子邮箱
|
email: '', //电子邮箱
|
||||||
stature: '', //身高
|
stature: '', //身高
|
||||||
weight: '', //体重,
|
weight: '', //体重,
|
||||||
customerType: '0', //客户类别
|
customerType: '0', //客户类别
|
||||||
customerSource: '-1', //客户来源
|
customerSource: '-1', //客户来源
|
||||||
degree: '', //文化程度
|
degree: '', //文化程度
|
||||||
socialSecurity: '0', //有无社保
|
socialSecurity: '0', //有无社保
|
||||||
taxIdentity: '1', //税收居民身份
|
taxIdentity: '1', //税收居民身份
|
||||||
occupationCode: '', //职业类别
|
occupationCode: '', //职业类别
|
||||||
occupationName: '',
|
occupationName: '',
|
||||||
lifeGrade: '', //寿险等级
|
lifeGrade: '', //寿险等级
|
||||||
healthGrade: '', //健康等级
|
healthGrade: '', //健康等级
|
||||||
averageYearlyIncome: '', //平均年收入
|
averageYearlyIncome: '', //平均年收入
|
||||||
liabilitiesMoney: '', //负债金额
|
liabilitiesMoney: '', //负债金额
|
||||||
workUnits: '', //工作单位
|
workUnits: '', //工作单位
|
||||||
workCondition: '', //在职情况
|
workCondition: '', //在职情况
|
||||||
companyProvince: '', //单位省
|
companyProvince: '', //单位省
|
||||||
companyCity: '', //单位市
|
companyCity: '', //单位市
|
||||||
companyArea: '', //单位区
|
companyArea: '', //单位区
|
||||||
companyAddress: '', //单位详细地址
|
companyAddress: '', //单位详细地址
|
||||||
companyZip: '', //单位邮编
|
companyZip: '', //单位邮编
|
||||||
companyPhone: '', //单位电话
|
companyPhone: '', //单位电话
|
||||||
marriage: '', //婚姻状况
|
marriage: '', //婚姻状况
|
||||||
familyAnnualIncome: '', //家庭年收入
|
familyAnnualIncome: '', //家庭年收入
|
||||||
homeProvince: '', //家庭省
|
homeProvince: '', //家庭省
|
||||||
homeCity: '', //家庭市
|
homeCity: '', //家庭市
|
||||||
homeArea: '', //家庭区
|
homeArea: '', //家庭区
|
||||||
homeAddress: '', //家庭详细地址
|
homeAddress: '', //家庭详细地址
|
||||||
homeZip: '', //家庭邮编
|
homeZip: '', //家庭邮编
|
||||||
homePhone: '', //家庭电话
|
homePhone: '', //家庭电话
|
||||||
isNewPeopleFlag: '', //新市民身份
|
isNewPeopleFlag: '', //新市民身份
|
||||||
npType: '', //新市民类型
|
npType: '', //新市民类型
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
mounted() {
|
||||||
mounted() {
|
//this.filterBtn() //按钮初始化
|
||||||
//this.filterBtn() //按钮初始化
|
//window.appCallBack = this.appCallBack //app回调
|
||||||
//window.appCallBack = this.appCallBack //app回调
|
},
|
||||||
},
|
methods: {
|
||||||
methods: {
|
// filterBtn() {
|
||||||
// filterBtn() {
|
// EWebBridge.webCallAppInJs('webview_right_button', {
|
||||||
// EWebBridge.webCallAppInJs('webview_right_button', {
|
// btns: [
|
||||||
// btns: [
|
// {
|
||||||
// {
|
// // img:"@/assets/images/u12045.png",
|
||||||
// // img:"@/assets/images/u12045.png",
|
// title: '保存'
|
||||||
// title: '保存'
|
// }
|
||||||
// }
|
// ]
|
||||||
// ]
|
// })
|
||||||
// })
|
// },
|
||||||
// },
|
// appCallBack(data) {
|
||||||
// appCallBack(data) {
|
// if (data.trigger == 'right_button_click') {
|
||||||
// if (data.trigger == 'right_button_click') {
|
// if (data.index == 0 && this.loading) {
|
||||||
// if (data.index == 0 && this.loading) {
|
// this.$validator.validate().then(valid => {
|
||||||
// this.$validator.validate().then(valid => {
|
// if (true === valid) {
|
||||||
// if (true === valid) {
|
// this.updateCustomerInfo()
|
||||||
// this.updateCustomerInfo()
|
// } else {
|
||||||
// } else {
|
// this.$toast(this.$validator.errors.all()[0])
|
||||||
// this.$toast(this.$validator.errors.all()[0])
|
// }
|
||||||
// }
|
// })
|
||||||
// })
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// },
|
||||||
// },
|
save() {
|
||||||
save() {
|
this.$validator.validate().then(valid => {
|
||||||
this.$validator.validate().then(valid => {
|
if (true === valid) {
|
||||||
if (true === valid) {
|
let vf1 = this.$refs.formBlock.validateForm()
|
||||||
let vf1 = this.$refs.formBlock.validateForm()
|
Promise.all([vf1]).then(result => {
|
||||||
Promise.all([vf1]).then(result => {
|
if (result.indexOf(false) > -1) {
|
||||||
if (result.indexOf(false) > -1) {
|
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
|
||||||
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
|
return
|
||||||
return
|
} else if (this.userInfo.customerIdNumber) {
|
||||||
} else if (this.userInfo.customerIdNumber) {
|
this.$refs.formBlock.validateIdType()
|
||||||
this.$refs.formBlock.validateIdType()
|
} else if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||||
} else if (this.userInfo.birthday && this.userInfo.marriage) {
|
|
||||||
this.$refs.formBlock.validateMarr()
|
|
||||||
} else {
|
|
||||||
if (this.userInfo.birthday && this.userInfo.marriage) {
|
|
||||||
this.$refs.formBlock.validateMarr()
|
this.$refs.formBlock.validateMarr()
|
||||||
} else {
|
} else {
|
||||||
this.updateCustomerInfo()
|
if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||||
}
|
this.$refs.formBlock.validateMarr()
|
||||||
}
|
} else {
|
||||||
})
|
this.updateCustomerInfo()
|
||||||
} else {
|
}
|
||||||
this.$toast(this.$validator.errors.all()[0])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
updateCustomerInfo() {
|
|
||||||
let $this = this
|
|
||||||
let data = {
|
|
||||||
agentCustomerInfoDTO: {
|
|
||||||
customerNumber: '',
|
|
||||||
customerName: $this.userInfo.customerName,
|
|
||||||
customerPhone: $this.userInfo.customerPhone,
|
|
||||||
customerSex: $this.userInfo.customerSex,
|
|
||||||
country: $this.userInfo.nativeplace,
|
|
||||||
//rgtaddress: $this.userInfo.census,
|
|
||||||
birthday: $this.userInfo.birthday,
|
|
||||||
customerIdType: $this.userInfo.idType,
|
|
||||||
customerIdNumber: $this.userInfo.customerIdNumber,
|
|
||||||
idEffectStartDate: $this.userInfo.certificateValidate,
|
|
||||||
idEffectEndDate: $this.userInfo.certiexpiredate,
|
|
||||||
email: $this.userInfo.email,
|
|
||||||
height: $this.userInfo.stature,
|
|
||||||
weight: $this.userInfo.weight,
|
|
||||||
customerType: $this.userInfo.customerType,
|
|
||||||
customerSource: $this.userInfo.customerSource,
|
|
||||||
educationLevel: $this.userInfo.degree,
|
|
||||||
socialSecurity: $this.userInfo.socialSecurity,
|
|
||||||
residentStatus: $this.userInfo.taxIdentity,
|
|
||||||
occupationCode: $this.userInfo.occupationCode,
|
|
||||||
occupationName: $this.userInfo.occupationName,
|
|
||||||
lifeGrade: $this.userInfo.lifeGrade,
|
|
||||||
healthGrade: $this.userInfo.healthGrade,
|
|
||||||
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
|
|
||||||
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
|
|
||||||
workUnits: $this.userInfo.workUnits,
|
|
||||||
jobStatus: $this.userInfo.workCondition,
|
|
||||||
companyProvince: $this.userInfo.companyProvince,
|
|
||||||
companyCity: $this.userInfo.companyCity,
|
|
||||||
companyArea: $this.userInfo.companyArea,
|
|
||||||
companyAddress: $this.userInfo.companyAddress,
|
|
||||||
companyZip: $this.userInfo.companyZip,
|
|
||||||
companyPhone: $this.userInfo.companyPhone,
|
|
||||||
marryStatus: $this.userInfo.marriage,
|
|
||||||
homeProvince: $this.userInfo.homeProvince,
|
|
||||||
homeCity: $this.userInfo.homeCity,
|
|
||||||
homeArea: $this.userInfo.homeArea,
|
|
||||||
homeAddress: $this.userInfo.homeAddress,
|
|
||||||
homeZip: $this.userInfo.homeZip,
|
|
||||||
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
|
|
||||||
province: $this.userInfo.province,
|
|
||||||
city: $this.userInfo.city,
|
|
||||||
homePhone: $this.userInfo.homePhone,
|
|
||||||
isNewPeopleFlag: $this.userInfo.isNewPeopleFlag,
|
|
||||||
npType: $this.userInfo.npType,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
switch (data.agentCustomerInfoDTO.companyArea) {
|
|
||||||
case '500129':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500229'
|
|
||||||
break
|
|
||||||
case '500130':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500230'
|
|
||||||
break
|
|
||||||
case '500131':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500231'
|
|
||||||
break
|
|
||||||
case '500133':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500233'
|
|
||||||
break
|
|
||||||
case '500135':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500235'
|
|
||||||
break
|
|
||||||
case '500136':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500236'
|
|
||||||
break
|
|
||||||
case '500137':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500237'
|
|
||||||
break
|
|
||||||
case '500138':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500238'
|
|
||||||
break
|
|
||||||
case '500140':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500240'
|
|
||||||
break
|
|
||||||
case '500141':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500241'
|
|
||||||
break
|
|
||||||
case '500142':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500242'
|
|
||||||
break
|
|
||||||
case '500143':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500243'
|
|
||||||
break
|
|
||||||
}
|
|
||||||
switch (data.agentCustomerInfoDTO.homeArea) {
|
|
||||||
case '500129':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500229'
|
|
||||||
break
|
|
||||||
case '500130':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500230'
|
|
||||||
break
|
|
||||||
case '500131':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500231'
|
|
||||||
break
|
|
||||||
case '500133':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500233'
|
|
||||||
break
|
|
||||||
case '500135':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500235'
|
|
||||||
break
|
|
||||||
case '500136':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500236'
|
|
||||||
break
|
|
||||||
case '500137':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500237'
|
|
||||||
break
|
|
||||||
case '500138':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500238'
|
|
||||||
break
|
|
||||||
case '500140':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500240'
|
|
||||||
break
|
|
||||||
case '500141':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500241'
|
|
||||||
break
|
|
||||||
case '500142':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500242'
|
|
||||||
break
|
|
||||||
case '500143':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500243'
|
|
||||||
break
|
|
||||||
}
|
|
||||||
updateCustomerInfo(data)
|
|
||||||
.then(res => {
|
|
||||||
if (res.result == 0) {
|
|
||||||
// EWebBridge.webCallAppInJs('goBack', { refresh: '1' })
|
|
||||||
this.$jump({
|
|
||||||
flag: 'goBack',
|
|
||||||
extra: {
|
|
||||||
refresh: '1'
|
|
||||||
},
|
|
||||||
routerInfo: {
|
|
||||||
path: '/customer/customerList'
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
$this.$toast(res.resultMessage)
|
this.$toast(this.$validator.errors.all()[0])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {})
|
},
|
||||||
|
updateCustomerInfo() {
|
||||||
|
let $this = this
|
||||||
|
let data = {
|
||||||
|
agentCustomerInfoDTO: {
|
||||||
|
customerNumber: '',
|
||||||
|
customerName: $this.userInfo.customerName,
|
||||||
|
customerPhone: $this.userInfo.customerPhone,
|
||||||
|
customerSex: $this.userInfo.customerSex,
|
||||||
|
country: $this.userInfo.nativeplace,
|
||||||
|
//rgtaddress: $this.userInfo.census,
|
||||||
|
birthday: $this.userInfo.birthday,
|
||||||
|
customerIdType: $this.userInfo.idType,
|
||||||
|
customerIdNumber: $this.userInfo.customerIdNumber,
|
||||||
|
idEffectStartDate: $this.userInfo.certificateValidate,
|
||||||
|
idEffectEndDate: $this.userInfo.certiexpiredate,
|
||||||
|
email: $this.userInfo.email,
|
||||||
|
height: $this.userInfo.stature,
|
||||||
|
weight: $this.userInfo.weight,
|
||||||
|
customerType: $this.userInfo.customerType,
|
||||||
|
customerSource: $this.userInfo.customerSource,
|
||||||
|
educationLevel: $this.userInfo.degree,
|
||||||
|
socialSecurity: $this.userInfo.socialSecurity,
|
||||||
|
residentStatus: $this.userInfo.taxIdentity,
|
||||||
|
occupationCode: $this.userInfo.occupationCode,
|
||||||
|
occupationName: $this.userInfo.occupationName,
|
||||||
|
lifeGrade: $this.userInfo.lifeGrade,
|
||||||
|
healthGrade: $this.userInfo.healthGrade,
|
||||||
|
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
|
||||||
|
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
|
||||||
|
workUnits: $this.userInfo.workUnits,
|
||||||
|
jobStatus: $this.userInfo.workCondition,
|
||||||
|
companyProvince: $this.userInfo.companyProvince,
|
||||||
|
companyCity: $this.userInfo.companyCity,
|
||||||
|
companyArea: $this.userInfo.companyArea,
|
||||||
|
companyAddress: $this.userInfo.companyAddress,
|
||||||
|
companyZip: $this.userInfo.companyZip,
|
||||||
|
companyPhone: $this.userInfo.companyPhone,
|
||||||
|
marryStatus: $this.userInfo.marriage,
|
||||||
|
homeProvince: $this.userInfo.homeProvince,
|
||||||
|
homeCity: $this.userInfo.homeCity,
|
||||||
|
homeArea: $this.userInfo.homeArea,
|
||||||
|
homeAddress: $this.userInfo.homeAddress,
|
||||||
|
homeZip: $this.userInfo.homeZip,
|
||||||
|
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
|
||||||
|
province: $this.userInfo.province,
|
||||||
|
city: $this.userInfo.city,
|
||||||
|
homePhone: $this.userInfo.homePhone,
|
||||||
|
isNewPeopleFlag: $this.userInfo.isNewPeopleFlag,
|
||||||
|
npType: $this.userInfo.npType,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch (data.agentCustomerInfoDTO.companyArea) {
|
||||||
|
case '500129':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500229'
|
||||||
|
break
|
||||||
|
case '500130':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500230'
|
||||||
|
break
|
||||||
|
case '500131':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500231'
|
||||||
|
break
|
||||||
|
case '500133':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500233'
|
||||||
|
break
|
||||||
|
case '500135':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500235'
|
||||||
|
break
|
||||||
|
case '500136':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500236'
|
||||||
|
break
|
||||||
|
case '500137':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500237'
|
||||||
|
break
|
||||||
|
case '500138':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500238'
|
||||||
|
break
|
||||||
|
case '500140':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500240'
|
||||||
|
break
|
||||||
|
case '500141':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500241'
|
||||||
|
break
|
||||||
|
case '500142':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500242'
|
||||||
|
break
|
||||||
|
case '500143':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500243'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
switch (data.agentCustomerInfoDTO.homeArea) {
|
||||||
|
case '500129':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500229'
|
||||||
|
break
|
||||||
|
case '500130':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500230'
|
||||||
|
break
|
||||||
|
case '500131':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500231'
|
||||||
|
break
|
||||||
|
case '500133':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500233'
|
||||||
|
break
|
||||||
|
case '500135':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500235'
|
||||||
|
break
|
||||||
|
case '500136':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500236'
|
||||||
|
break
|
||||||
|
case '500137':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500237'
|
||||||
|
break
|
||||||
|
case '500138':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500238'
|
||||||
|
break
|
||||||
|
case '500140':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500240'
|
||||||
|
break
|
||||||
|
case '500141':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500241'
|
||||||
|
break
|
||||||
|
case '500142':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500242'
|
||||||
|
break
|
||||||
|
case '500143':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500243'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
updateCustomerInfo(data)
|
||||||
|
.then(res => {
|
||||||
|
if (res.result == 0) {
|
||||||
|
// EWebBridge.webCallAppInJs('goBack', { refresh: '1' })
|
||||||
|
this.$jump({
|
||||||
|
flag: 'goBack',
|
||||||
|
extra: {
|
||||||
|
refresh: '1'
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
path: '/customer/customerList'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
$this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.van-index-anchor {
|
.van-index-anchor {
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
padding-bottom: 45px;
|
|
||||||
.header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: bold;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-bottom: 1px solid #ebedf0;
|
|
||||||
}
|
}
|
||||||
.sex-radio {
|
.container {
|
||||||
.radio-area {
|
padding-bottom: 45px;
|
||||||
display: -webkit-flex;
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-end;
|
||||||
.item {
|
padding: 10px;
|
||||||
width: 70px;
|
}
|
||||||
height: 30px;
|
.title {
|
||||||
line-height: 30px;
|
font-size: 15px;
|
||||||
border: 1px solid #ea5b50;
|
font-weight: bold;
|
||||||
border-radius: 20px;
|
background: #fff;
|
||||||
text-align: center;
|
border-bottom: 1px solid #ebedf0;
|
||||||
color: #ea5b50;
|
}
|
||||||
margin-right: 10px;
|
.sex-radio {
|
||||||
}
|
.radio-area {
|
||||||
.active {
|
display: -webkit-flex;
|
||||||
background: #ea5b50;
|
display: flex;
|
||||||
color: #fff;
|
justify-content: flex-start;
|
||||||
|
.item {
|
||||||
|
width: 70px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
border: 1px solid #ea5b50;
|
||||||
|
border-radius: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: #ea5b50;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
background: #ea5b50;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,24 +3,24 @@
|
|||||||
<p class="title pl10 pv12 mt10">基本信息</p>
|
<p class="title pl10 pv12 mt10">基本信息</p>
|
||||||
<div v-if="source == 'app'">
|
<div v-if="source == 'app'">
|
||||||
<van-field
|
<van-field
|
||||||
v-model="userInfo.customerName"
|
v-model="userInfo.customerName"
|
||||||
required
|
required
|
||||||
clearable
|
clearable
|
||||||
label="姓名"
|
label="姓名"
|
||||||
name="姓名"
|
name="姓名"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
v-validate="'required|name'"
|
v-validate="'required|name'"
|
||||||
/>
|
/>
|
||||||
<van-field
|
<van-field
|
||||||
v-model="userInfo.customerPhone"
|
v-model="userInfo.customerPhone"
|
||||||
required
|
required
|
||||||
clearable
|
clearable
|
||||||
label="移动电话"
|
label="移动电话"
|
||||||
name="移动电话"
|
name="移动电话"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
maxlength="11"
|
maxlength="11"
|
||||||
type="tel"
|
type="tel"
|
||||||
v-validate="'required|mobile'"
|
v-validate="'required|mobile'"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -34,462 +34,462 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Field, CellGroup, Cell } from 'vant'
|
import { Field, CellGroup, Cell } from 'vant'
|
||||||
import { getAgentCustomerInfo, updateCustomerInfo } from '@/api/ebiz/customer/customer'
|
import { getAgentCustomerInfo, updateCustomerInfo } from '@/api/ebiz/customer/customer'
|
||||||
import formBlock from '@/components/ebiz/customer/formBlock'
|
import formBlock from '@/components/ebiz/customer/formBlock'
|
||||||
import { constants } from 'crypto'
|
import { constants } from 'crypto'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'editCustomer',
|
name: 'editCustomer',
|
||||||
components: {
|
components: {
|
||||||
[Field.name]: Field,
|
[Field.name]: Field,
|
||||||
[CellGroup.name]: CellGroup,
|
[CellGroup.name]: CellGroup,
|
||||||
[Cell.name]: Cell,
|
[Cell.name]: Cell,
|
||||||
[formBlock.name]: formBlock
|
[formBlock.name]: formBlock
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
source: this.$route.query.from,
|
|
||||||
appName: this.$route.query.name,
|
|
||||||
appPhone: this.$route.query.tel,
|
|
||||||
customerNumber: localStorage.getItem('customerNumber'),
|
|
||||||
userInfo: {
|
|
||||||
customerName: '', //姓名
|
|
||||||
customerPhone: '', // 手机号
|
|
||||||
customerSex: '0', //性别
|
|
||||||
nativeplace: '1', //国家地区
|
|
||||||
province: '', //户籍省
|
|
||||||
city: '', //户籍市
|
|
||||||
birthday: '', //出生日期
|
|
||||||
idType: '1', //证件类型
|
|
||||||
customerIdNumber: '', //证件号码
|
|
||||||
certificateValidate: '', //证件起始日期
|
|
||||||
certiexpiredate: '', //证件到期时间
|
|
||||||
effectiveDateType: false, //是否长期
|
|
||||||
email: '', //电子邮箱
|
|
||||||
stature: '', //身高
|
|
||||||
weight: '', //体重,
|
|
||||||
customerType: '0', //客户类别
|
|
||||||
customerSource: '-1', //客户来源
|
|
||||||
degree: '', //文化程度
|
|
||||||
socialSecurity: '0', //有无社保
|
|
||||||
taxIdentity: '1', //税收居民身份
|
|
||||||
occupationCode: '', //职业类别
|
|
||||||
occupationName: '',
|
|
||||||
lifeGrade: '', //寿险等级
|
|
||||||
healthGrade: '', //健康等级
|
|
||||||
averageYearlyIncome: '', //平均年收入
|
|
||||||
liabilitiesMoney: '', //负债金额
|
|
||||||
workUnits: '', //工作单位
|
|
||||||
workCondition: '', //在职情况
|
|
||||||
companyProvince: '', //单位省
|
|
||||||
companyCity: '', //单位市
|
|
||||||
companyArea: '', //单位区
|
|
||||||
companyAddress: '', //单位详细地址
|
|
||||||
companyZip: '', //单位邮编
|
|
||||||
companyPhone: '', //单位电话
|
|
||||||
marriage: '', //婚姻状况
|
|
||||||
familyAnnualIncome: '', //家庭年收入
|
|
||||||
homeProvince: '', //家庭省
|
|
||||||
homeCity: '', //家庭市
|
|
||||||
homeArea: '', //家庭区
|
|
||||||
homeAddress: '', //家庭详细地址
|
|
||||||
homeZip: '', //家庭邮编
|
|
||||||
homePhone: '', //家庭电话
|
|
||||||
isNewPeopleFlag: '', //新市民身份
|
|
||||||
npType: '', //新市民类型
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
//this.filterBtn() //按钮初始化
|
|
||||||
//window.appCallBack = this.appCallBack //app回调
|
|
||||||
//数据回显
|
|
||||||
if (this.source == 'app') {
|
|
||||||
this.userInfo.customerName = this.appName
|
|
||||||
this.userInfo.customerPhone = this.appPhone
|
|
||||||
this.customerNumber = ''
|
|
||||||
} else {
|
|
||||||
this.getCustomerInfo() //获取客户信息
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// filterBtn() {
|
|
||||||
// EWebBridge.webCallAppInJs('webview_right_button', {
|
|
||||||
// btns: [
|
|
||||||
// {
|
|
||||||
// img:"@/assets/images/u12045.png",
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// appCallBack(data) {
|
|
||||||
// if (data.trigger == 'right_button_click') {
|
|
||||||
// if (data.index == 0 && this.loading) {
|
|
||||||
// this.updateCustomerInfo() //保存信息
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
getCustomerInfo() {
|
|
||||||
let $this = this
|
|
||||||
let data = {
|
|
||||||
customerNumber: $this.customerNumber
|
|
||||||
}
|
|
||||||
getAgentCustomerInfo(data)
|
|
||||||
.then(res => {
|
|
||||||
if (res.result == 0) {
|
|
||||||
let result = res.content
|
|
||||||
$this.userInfo.nativeplace = result.country
|
|
||||||
$this.userInfo.idType = result.customerIdType
|
|
||||||
$this.userInfo.degree = result.educationLevel
|
|
||||||
$this.userInfo.taxIdentity = result.residentStatus
|
|
||||||
$this.userInfo.marriage = result.marryStatus
|
|
||||||
$this.userInfo.socialSecurity = result.socialSecurity
|
|
||||||
$this.userInfo.customerName = result.customerName
|
|
||||||
$this.userInfo.customerPhone = result.customerPhone
|
|
||||||
$this.userInfo.customerSex = result.customerSex
|
|
||||||
$this.userInfo.birthday = result.birthday
|
|
||||||
$this.userInfo.customerIdNumber = result.customerIdNumber
|
|
||||||
$this.userInfo.certificateValidate = result.idEffectStartDate
|
|
||||||
$this.userInfo.certiexpiredate = result.idEffectEndDate
|
|
||||||
$this.userInfo.email = result.email
|
|
||||||
$this.userInfo.stature = result.height
|
|
||||||
$this.userInfo.weight = result.weight
|
|
||||||
$this.userInfo.customerType = result.customerType
|
|
||||||
$this.userInfo.customerSource = result.customerSource
|
|
||||||
$this.userInfo.occupationName = result.occupationName
|
|
||||||
$this.userInfo.occupationCode = result.occupationCode
|
|
||||||
$this.userInfo.lifeGrade = result.lifeGrade
|
|
||||||
$this.userInfo.healthGrade = result.healthGrade
|
|
||||||
$this.userInfo.averageYearlyIncome = result.averageYearlyIncome
|
|
||||||
$this.userInfo.workUnits = result.workUnits
|
|
||||||
$this.userInfo.province = result.province
|
|
||||||
$this.userInfo.city = result.city
|
|
||||||
$this.userInfo.homeAddress = result.homeAddress
|
|
||||||
$this.userInfo.homeZip = result.homeZip
|
|
||||||
$this.userInfo.homePhone = result.homePhone
|
|
||||||
$this.userInfo.familyAnnualIncome = result.familyAnnualIncome
|
|
||||||
$this.userInfo.workCondition = result.jobStatus
|
|
||||||
$this.userInfo.companyAddress = result.companyAddress
|
|
||||||
$this.userInfo.companyZip = result.companyZip
|
|
||||||
$this.userInfo.companyPhone = result.companyPhone
|
|
||||||
$this.userInfo.liabilitiesMoney = result.liabilitiesMoney
|
|
||||||
$this.userInfo.companyProvince = result.companyProvince
|
|
||||||
$this.userInfo.companyCity = result.companyCity
|
|
||||||
$this.userInfo.companyArea = result.companyArea
|
|
||||||
$this.userInfo.homeProvince = result.homeProvince
|
|
||||||
$this.userInfo.homeCity = result.homeCity
|
|
||||||
$this.userInfo.homeArea = result.homeArea
|
|
||||||
$this.userInfo.isNewPeopleFlag = result.isNewPeopleFlag
|
|
||||||
$this.userInfo.npType = result.npType
|
|
||||||
sessionStorage.setItem('birthday', result.birthday)
|
|
||||||
sessionStorage.setItem('idType', result.customerIdType)
|
|
||||||
|
|
||||||
switch ($this.userInfo.companyArea) {
|
|
||||||
case '500229':
|
|
||||||
$this.userInfo.companyArea = '500129'
|
|
||||||
break
|
|
||||||
case '500230':
|
|
||||||
$this.userInfo.companyArea = '500130'
|
|
||||||
break
|
|
||||||
case '500231':
|
|
||||||
$this.userInfo.companyArea = '500131'
|
|
||||||
break
|
|
||||||
case '500233':
|
|
||||||
$this.userInfo.companyArea = '500133'
|
|
||||||
break
|
|
||||||
case '500235':
|
|
||||||
$this.userInfo.companyArea = '500135'
|
|
||||||
break
|
|
||||||
case '500236':
|
|
||||||
$this.userInfo.companyArea = '500136'
|
|
||||||
break
|
|
||||||
case '500237':
|
|
||||||
$this.userInfo.companyArea = '500137'
|
|
||||||
break
|
|
||||||
case '500238':
|
|
||||||
$this.userInfo.companyArea = '500138'
|
|
||||||
break
|
|
||||||
case '500240':
|
|
||||||
$this.userInfo.companyArea = '500140'
|
|
||||||
break
|
|
||||||
case '500241':
|
|
||||||
$this.userInfo.companyArea = '500141'
|
|
||||||
break
|
|
||||||
case '500242':
|
|
||||||
$this.userInfo.companyArea = '500142'
|
|
||||||
break
|
|
||||||
case '500243':
|
|
||||||
$this.userInfo.companyArea = '500143'
|
|
||||||
break
|
|
||||||
}
|
|
||||||
switch ($this.userInfo.homeArea) {
|
|
||||||
case '500229':
|
|
||||||
$this.userInfo.homeArea = '500129'
|
|
||||||
break
|
|
||||||
case '500230':
|
|
||||||
$this.userInfo.homeArea = '500130'
|
|
||||||
break
|
|
||||||
case '500231':
|
|
||||||
$this.userInfo.homeArea = '500131'
|
|
||||||
break
|
|
||||||
case '500233':
|
|
||||||
$this.userInfo.homeArea = '500133'
|
|
||||||
break
|
|
||||||
case '500235':
|
|
||||||
$this.userInfo.homeArea = '500135'
|
|
||||||
break
|
|
||||||
case '500236':
|
|
||||||
$this.userInfo.homeArea = '500136'
|
|
||||||
break
|
|
||||||
case '500237':
|
|
||||||
$this.userInfo.homeArea = '500137'
|
|
||||||
break
|
|
||||||
case '500238':
|
|
||||||
$this.userInfo.homeArea = '500138'
|
|
||||||
break
|
|
||||||
case '500240':
|
|
||||||
$this.userInfo.homeArea = '500140'
|
|
||||||
break
|
|
||||||
case '500241':
|
|
||||||
$this.userInfo.homeArea = '500141'
|
|
||||||
break
|
|
||||||
case '500242':
|
|
||||||
$this.userInfo.homeArea = '500142'
|
|
||||||
break
|
|
||||||
case '500243':
|
|
||||||
$this.userInfo.homeArea = '500143'
|
|
||||||
break
|
|
||||||
}
|
|
||||||
this.$refs.formBlock.isEndFlag()
|
|
||||||
//查询职业名称
|
|
||||||
// occupationList.forEach(first => {
|
|
||||||
// first.subs.forEach(second => {
|
|
||||||
// second.subs.forEach(third => {
|
|
||||||
// if (third.code == result.occupationCode) {
|
|
||||||
// $this.userInfo.occupationName = third.name
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(err => {})
|
|
||||||
},
|
},
|
||||||
save() {
|
data() {
|
||||||
this.$validator.validate().then(valid => {
|
return {
|
||||||
if (true === valid) {
|
source: this.$route.query.from,
|
||||||
let vf1 = this.$refs.formBlock.validateForm()
|
appName: this.$route.query.name,
|
||||||
Promise.all([vf1]).then(result => {
|
appPhone: this.$route.query.tel,
|
||||||
if (result.indexOf(false) > -1) {
|
customerNumber: localStorage.getItem('customerNumber'),
|
||||||
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
|
userInfo: {
|
||||||
return
|
customerName: '', //姓名
|
||||||
} else if (this.userInfo.customerIdNumber) {
|
customerPhone: '', // 手机号
|
||||||
this.$refs.formBlock.validateIdType()
|
customerSex: '0', //性别
|
||||||
} else {
|
nativeplace: '1', //国家地区
|
||||||
if (this.userInfo.birthday && this.userInfo.marriage) {
|
province: '', //户籍省
|
||||||
this.$refs.formBlock.validateMarr()
|
city: '', //户籍市
|
||||||
|
birthday: '', //出生日期
|
||||||
|
idType: '1', //证件类型
|
||||||
|
customerIdNumber: '', //证件号码
|
||||||
|
certificateValidate: '', //证件起始日期
|
||||||
|
certiexpiredate: '', //证件到期时间
|
||||||
|
effectiveDateType: false, //是否长期
|
||||||
|
email: '', //电子邮箱
|
||||||
|
stature: '', //身高
|
||||||
|
weight: '', //体重,
|
||||||
|
customerType: '0', //客户类别
|
||||||
|
customerSource: '-1', //客户来源
|
||||||
|
degree: '', //文化程度
|
||||||
|
socialSecurity: '0', //有无社保
|
||||||
|
taxIdentity: '1', //税收居民身份
|
||||||
|
occupationCode: '', //职业类别
|
||||||
|
occupationName: '',
|
||||||
|
lifeGrade: '', //寿险等级
|
||||||
|
healthGrade: '', //健康等级
|
||||||
|
averageYearlyIncome: '', //平均年收入
|
||||||
|
liabilitiesMoney: '', //负债金额
|
||||||
|
workUnits: '', //工作单位
|
||||||
|
workCondition: '', //在职情况
|
||||||
|
companyProvince: '', //单位省
|
||||||
|
companyCity: '', //单位市
|
||||||
|
companyArea: '', //单位区
|
||||||
|
companyAddress: '', //单位详细地址
|
||||||
|
companyZip: '', //单位邮编
|
||||||
|
companyPhone: '', //单位电话
|
||||||
|
marriage: '', //婚姻状况
|
||||||
|
familyAnnualIncome: '', //家庭年收入
|
||||||
|
homeProvince: '', //家庭省
|
||||||
|
homeCity: '', //家庭市
|
||||||
|
homeArea: '', //家庭区
|
||||||
|
homeAddress: '', //家庭详细地址
|
||||||
|
homeZip: '', //家庭邮编
|
||||||
|
homePhone: '', //家庭电话
|
||||||
|
isNewPeopleFlag: '', //新市民身份
|
||||||
|
npType: '', //新市民类型
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
//this.filterBtn() //按钮初始化
|
||||||
|
//window.appCallBack = this.appCallBack //app回调
|
||||||
|
//数据回显
|
||||||
|
if (this.source == 'app') {
|
||||||
|
this.userInfo.customerName = this.appName
|
||||||
|
this.userInfo.customerPhone = this.appPhone
|
||||||
|
this.customerNumber = ''
|
||||||
|
} else {
|
||||||
|
this.getCustomerInfo() //获取客户信息
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// filterBtn() {
|
||||||
|
// EWebBridge.webCallAppInJs('webview_right_button', {
|
||||||
|
// btns: [
|
||||||
|
// {
|
||||||
|
// img:"@/assets/images/u12045.png",
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// appCallBack(data) {
|
||||||
|
// if (data.trigger == 'right_button_click') {
|
||||||
|
// if (data.index == 0 && this.loading) {
|
||||||
|
// this.updateCustomerInfo() //保存信息
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
getCustomerInfo() {
|
||||||
|
let $this = this
|
||||||
|
let data = {
|
||||||
|
customerNumber: $this.customerNumber
|
||||||
|
}
|
||||||
|
getAgentCustomerInfo(data)
|
||||||
|
.then(res => {
|
||||||
|
if (res.result == 0) {
|
||||||
|
let result = res.content
|
||||||
|
$this.userInfo.nativeplace = result.country
|
||||||
|
$this.userInfo.idType = result.customerIdType
|
||||||
|
$this.userInfo.degree = result.educationLevel
|
||||||
|
$this.userInfo.taxIdentity = result.residentStatus
|
||||||
|
$this.userInfo.marriage = result.marryStatus
|
||||||
|
$this.userInfo.socialSecurity = result.socialSecurity
|
||||||
|
$this.userInfo.customerName = result.customerName
|
||||||
|
$this.userInfo.customerPhone = result.customerPhone
|
||||||
|
$this.userInfo.customerSex = result.customerSex
|
||||||
|
$this.userInfo.birthday = result.birthday
|
||||||
|
$this.userInfo.customerIdNumber = result.customerIdNumber
|
||||||
|
$this.userInfo.certificateValidate = result.idEffectStartDate
|
||||||
|
$this.userInfo.certiexpiredate = result.idEffectEndDate
|
||||||
|
$this.userInfo.email = result.email
|
||||||
|
$this.userInfo.stature = result.height
|
||||||
|
$this.userInfo.weight = result.weight
|
||||||
|
$this.userInfo.customerType = result.customerType
|
||||||
|
$this.userInfo.customerSource = result.customerSource
|
||||||
|
$this.userInfo.occupationName = result.occupationName
|
||||||
|
$this.userInfo.occupationCode = result.occupationCode
|
||||||
|
$this.userInfo.lifeGrade = result.lifeGrade
|
||||||
|
$this.userInfo.healthGrade = result.healthGrade
|
||||||
|
$this.userInfo.averageYearlyIncome = result.averageYearlyIncome
|
||||||
|
$this.userInfo.workUnits = result.workUnits
|
||||||
|
$this.userInfo.province = result.province
|
||||||
|
$this.userInfo.city = result.city
|
||||||
|
$this.userInfo.homeAddress = result.homeAddress
|
||||||
|
$this.userInfo.homeZip = result.homeZip
|
||||||
|
$this.userInfo.homePhone = result.homePhone
|
||||||
|
$this.userInfo.familyAnnualIncome = result.familyAnnualIncome
|
||||||
|
$this.userInfo.workCondition = result.jobStatus
|
||||||
|
$this.userInfo.companyAddress = result.companyAddress
|
||||||
|
$this.userInfo.companyZip = result.companyZip
|
||||||
|
$this.userInfo.companyPhone = result.companyPhone
|
||||||
|
$this.userInfo.liabilitiesMoney = result.liabilitiesMoney
|
||||||
|
$this.userInfo.companyProvince = result.companyProvince
|
||||||
|
$this.userInfo.companyCity = result.companyCity
|
||||||
|
$this.userInfo.companyArea = result.companyArea
|
||||||
|
$this.userInfo.homeProvince = result.homeProvince
|
||||||
|
$this.userInfo.homeCity = result.homeCity
|
||||||
|
$this.userInfo.homeArea = result.homeArea
|
||||||
|
$this.userInfo.isNewPeopleFlag = result.isNewPeopleFlag
|
||||||
|
$this.userInfo.npType = result.npType
|
||||||
|
sessionStorage.setItem('birthday', result.birthday)
|
||||||
|
sessionStorage.setItem('idType', result.customerIdType)
|
||||||
|
|
||||||
|
switch ($this.userInfo.companyArea) {
|
||||||
|
case '500229':
|
||||||
|
$this.userInfo.companyArea = '500129'
|
||||||
|
break
|
||||||
|
case '500230':
|
||||||
|
$this.userInfo.companyArea = '500130'
|
||||||
|
break
|
||||||
|
case '500231':
|
||||||
|
$this.userInfo.companyArea = '500131'
|
||||||
|
break
|
||||||
|
case '500233':
|
||||||
|
$this.userInfo.companyArea = '500133'
|
||||||
|
break
|
||||||
|
case '500235':
|
||||||
|
$this.userInfo.companyArea = '500135'
|
||||||
|
break
|
||||||
|
case '500236':
|
||||||
|
$this.userInfo.companyArea = '500136'
|
||||||
|
break
|
||||||
|
case '500237':
|
||||||
|
$this.userInfo.companyArea = '500137'
|
||||||
|
break
|
||||||
|
case '500238':
|
||||||
|
$this.userInfo.companyArea = '500138'
|
||||||
|
break
|
||||||
|
case '500240':
|
||||||
|
$this.userInfo.companyArea = '500140'
|
||||||
|
break
|
||||||
|
case '500241':
|
||||||
|
$this.userInfo.companyArea = '500141'
|
||||||
|
break
|
||||||
|
case '500242':
|
||||||
|
$this.userInfo.companyArea = '500142'
|
||||||
|
break
|
||||||
|
case '500243':
|
||||||
|
$this.userInfo.companyArea = '500143'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
switch ($this.userInfo.homeArea) {
|
||||||
|
case '500229':
|
||||||
|
$this.userInfo.homeArea = '500129'
|
||||||
|
break
|
||||||
|
case '500230':
|
||||||
|
$this.userInfo.homeArea = '500130'
|
||||||
|
break
|
||||||
|
case '500231':
|
||||||
|
$this.userInfo.homeArea = '500131'
|
||||||
|
break
|
||||||
|
case '500233':
|
||||||
|
$this.userInfo.homeArea = '500133'
|
||||||
|
break
|
||||||
|
case '500235':
|
||||||
|
$this.userInfo.homeArea = '500135'
|
||||||
|
break
|
||||||
|
case '500236':
|
||||||
|
$this.userInfo.homeArea = '500136'
|
||||||
|
break
|
||||||
|
case '500237':
|
||||||
|
$this.userInfo.homeArea = '500137'
|
||||||
|
break
|
||||||
|
case '500238':
|
||||||
|
$this.userInfo.homeArea = '500138'
|
||||||
|
break
|
||||||
|
case '500240':
|
||||||
|
$this.userInfo.homeArea = '500140'
|
||||||
|
break
|
||||||
|
case '500241':
|
||||||
|
$this.userInfo.homeArea = '500141'
|
||||||
|
break
|
||||||
|
case '500242':
|
||||||
|
$this.userInfo.homeArea = '500142'
|
||||||
|
break
|
||||||
|
case '500243':
|
||||||
|
$this.userInfo.homeArea = '500143'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
this.$refs.formBlock.isEndFlag()
|
||||||
|
//查询职业名称
|
||||||
|
// occupationList.forEach(first => {
|
||||||
|
// first.subs.forEach(second => {
|
||||||
|
// second.subs.forEach(third => {
|
||||||
|
// if (third.code == result.occupationCode) {
|
||||||
|
// $this.userInfo.occupationName = third.name
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {})
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
this.$validator.validate().then(valid => {
|
||||||
|
if (true === valid) {
|
||||||
|
let vf1 = this.$refs.formBlock.validateForm()
|
||||||
|
Promise.all([vf1]).then(result => {
|
||||||
|
if (result.indexOf(false) > -1) {
|
||||||
|
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
|
||||||
|
return
|
||||||
|
} else if (this.userInfo.customerIdNumber) {
|
||||||
|
this.$refs.formBlock.validateIdType()
|
||||||
} else {
|
} else {
|
||||||
this.updateCustomerInfo()
|
if (this.userInfo.birthday && this.userInfo.marriage) {
|
||||||
}
|
this.$refs.formBlock.validateMarr()
|
||||||
}
|
} else {
|
||||||
})
|
this.updateCustomerInfo()
|
||||||
} else {
|
}
|
||||||
this.$toast(this.$validator.errors.all()[0])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
updateCustomerInfo() {
|
|
||||||
let $this = this
|
|
||||||
let data = {
|
|
||||||
agentCustomerInfoDTO: {
|
|
||||||
customerNumber: $this.customerNumber,
|
|
||||||
customerName: $this.userInfo.customerName,
|
|
||||||
customerPhone: $this.userInfo.customerPhone,
|
|
||||||
customerSex: $this.userInfo.customerSex,
|
|
||||||
country: $this.userInfo.nativeplace,
|
|
||||||
//rgtaddress: $this.userInfo.census,
|
|
||||||
birthday: $this.userInfo.birthday,
|
|
||||||
customerIdType: $this.userInfo.idType,
|
|
||||||
customerIdNumber: $this.userInfo.customerIdNumber,
|
|
||||||
idEffectStartDate: $this.userInfo.certificateValidate,
|
|
||||||
idEffectEndDate: sessionStorage.getItem('isEnd') || $this.userInfo.certiexpiredate,
|
|
||||||
email: $this.userInfo.email,
|
|
||||||
height: $this.userInfo.stature,
|
|
||||||
weight: $this.userInfo.weight,
|
|
||||||
customerType: $this.userInfo.customerType,
|
|
||||||
customerSource: $this.userInfo.customerSource,
|
|
||||||
educationLevel: $this.userInfo.degree,
|
|
||||||
socialSecurity: $this.userInfo.socialSecurity,
|
|
||||||
residentStatus: $this.userInfo.taxIdentity,
|
|
||||||
occupationCode: $this.userInfo.occupationCode,
|
|
||||||
occupationName: $this.userInfo.occupationName,
|
|
||||||
lifeGrade: $this.userInfo.lifeGrade,
|
|
||||||
healthGrade: $this.userInfo.healthGrade,
|
|
||||||
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
|
|
||||||
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
|
|
||||||
workUnits: $this.userInfo.workUnits,
|
|
||||||
jobStatus: $this.userInfo.workCondition,
|
|
||||||
companyProvince: $this.userInfo.companyProvince,
|
|
||||||
companyCity: $this.userInfo.companyCity,
|
|
||||||
companyArea: $this.userInfo.companyArea,
|
|
||||||
companyAddress: $this.userInfo.companyAddress,
|
|
||||||
companyZip: $this.userInfo.companyZip,
|
|
||||||
companyPhone: $this.userInfo.companyPhone,
|
|
||||||
marryStatus: $this.userInfo.marriage,
|
|
||||||
homeProvince: $this.userInfo.homeProvince,
|
|
||||||
homeCity: $this.userInfo.homeCity,
|
|
||||||
homeArea: $this.userInfo.homeArea,
|
|
||||||
homeAddress: $this.userInfo.homeAddress,
|
|
||||||
homeZip: $this.userInfo.homeZip,
|
|
||||||
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
|
|
||||||
province: $this.userInfo.province,
|
|
||||||
city: $this.userInfo.city,
|
|
||||||
homePhone: $this.userInfo.homePhone,
|
|
||||||
isNewPeopleFlag: $this.userInfo.isNewPeopleFlag,
|
|
||||||
npType: $this.userInfo.npType,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
switch (data.agentCustomerInfoDTO.companyArea) {
|
|
||||||
case '500129':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500229'
|
|
||||||
break
|
|
||||||
case '500130':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500230'
|
|
||||||
break
|
|
||||||
case '500131':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500231'
|
|
||||||
break
|
|
||||||
case '500133':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500233'
|
|
||||||
break
|
|
||||||
case '500135':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500235'
|
|
||||||
break
|
|
||||||
case '500136':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500236'
|
|
||||||
break
|
|
||||||
case '500137':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500237'
|
|
||||||
break
|
|
||||||
case '500138':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500238'
|
|
||||||
break
|
|
||||||
case '500140':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500240'
|
|
||||||
break
|
|
||||||
case '500141':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500241'
|
|
||||||
break
|
|
||||||
case '500142':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500242'
|
|
||||||
break
|
|
||||||
case '500143':
|
|
||||||
data.agentCustomerInfoDTO.companyArea = '500243'
|
|
||||||
break
|
|
||||||
}
|
|
||||||
switch (data.agentCustomerInfoDTO.homeArea) {
|
|
||||||
case '500129':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500229'
|
|
||||||
break
|
|
||||||
case '500130':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500230'
|
|
||||||
break
|
|
||||||
case '500131':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500231'
|
|
||||||
break
|
|
||||||
case '500133':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500233'
|
|
||||||
break
|
|
||||||
case '500135':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500235'
|
|
||||||
break
|
|
||||||
case '500136':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500236'
|
|
||||||
break
|
|
||||||
case '500137':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500237'
|
|
||||||
break
|
|
||||||
case '500138':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500238'
|
|
||||||
break
|
|
||||||
case '500140':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500240'
|
|
||||||
break
|
|
||||||
case '500141':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500241'
|
|
||||||
break
|
|
||||||
case '500142':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500242'
|
|
||||||
break
|
|
||||||
case '500143':
|
|
||||||
data.agentCustomerInfoDTO.homeArea = '500243'
|
|
||||||
break
|
|
||||||
}
|
|
||||||
updateCustomerInfo(data)
|
|
||||||
.then(res => {
|
|
||||||
if (res.result == 0) {
|
|
||||||
// EWebBridge.webCallAppInJs("bridge",{
|
|
||||||
// "flag":"webview_toast",
|
|
||||||
// "extra":{"content":res.resultMessage}
|
|
||||||
// })
|
|
||||||
//EWebBridge.webCallAppInJs('goBack', { refresh: '1', index: '-2' })
|
|
||||||
this.$jump({
|
|
||||||
flag: 'goBack',
|
|
||||||
extra: {
|
|
||||||
refresh: '1',
|
|
||||||
index: this.$route.query.from == 2 ? '-2' : '-1'
|
|
||||||
},
|
|
||||||
routerInfo: {
|
|
||||||
path: '/customer/customerList'
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
$this.$toast(res.resultMessage)
|
this.$toast(this.$validator.errors.all()[0])
|
||||||
// EWebBridge.webCallAppInJs("bridge",{
|
|
||||||
// "flag":"webview_toast",
|
|
||||||
// "extra":{"content":res.resultMessage}
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
},
|
||||||
console.log(err)
|
updateCustomerInfo() {
|
||||||
})
|
let $this = this
|
||||||
},
|
let data = {
|
||||||
go(path) {
|
agentCustomerInfoDTO: {
|
||||||
this.$jump({
|
customerNumber: $this.customerNumber,
|
||||||
flag: 'h5',
|
customerName: $this.userInfo.customerName,
|
||||||
extra: {
|
customerPhone: $this.userInfo.customerPhone,
|
||||||
url: location.origin + '/#/customer/' + path
|
customerSex: $this.userInfo.customerSex,
|
||||||
},
|
country: $this.userInfo.nativeplace,
|
||||||
routerInfo: {
|
//rgtaddress: $this.userInfo.census,
|
||||||
path: '/customer/' + path
|
birthday: $this.userInfo.birthday,
|
||||||
|
customerIdType: $this.userInfo.idType,
|
||||||
|
customerIdNumber: $this.userInfo.customerIdNumber,
|
||||||
|
idEffectStartDate: $this.userInfo.certificateValidate,
|
||||||
|
idEffectEndDate: sessionStorage.getItem('isEnd') || $this.userInfo.certiexpiredate,
|
||||||
|
email: $this.userInfo.email,
|
||||||
|
height: $this.userInfo.stature,
|
||||||
|
weight: $this.userInfo.weight,
|
||||||
|
customerType: $this.userInfo.customerType,
|
||||||
|
customerSource: $this.userInfo.customerSource,
|
||||||
|
educationLevel: $this.userInfo.degree,
|
||||||
|
socialSecurity: $this.userInfo.socialSecurity,
|
||||||
|
residentStatus: $this.userInfo.taxIdentity,
|
||||||
|
occupationCode: $this.userInfo.occupationCode,
|
||||||
|
occupationName: $this.userInfo.occupationName,
|
||||||
|
lifeGrade: $this.userInfo.lifeGrade,
|
||||||
|
healthGrade: $this.userInfo.healthGrade,
|
||||||
|
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
|
||||||
|
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
|
||||||
|
workUnits: $this.userInfo.workUnits,
|
||||||
|
jobStatus: $this.userInfo.workCondition,
|
||||||
|
companyProvince: $this.userInfo.companyProvince,
|
||||||
|
companyCity: $this.userInfo.companyCity,
|
||||||
|
companyArea: $this.userInfo.companyArea,
|
||||||
|
companyAddress: $this.userInfo.companyAddress,
|
||||||
|
companyZip: $this.userInfo.companyZip,
|
||||||
|
companyPhone: $this.userInfo.companyPhone,
|
||||||
|
marryStatus: $this.userInfo.marriage,
|
||||||
|
homeProvince: $this.userInfo.homeProvince,
|
||||||
|
homeCity: $this.userInfo.homeCity,
|
||||||
|
homeArea: $this.userInfo.homeArea,
|
||||||
|
homeAddress: $this.userInfo.homeAddress,
|
||||||
|
homeZip: $this.userInfo.homeZip,
|
||||||
|
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
|
||||||
|
province: $this.userInfo.province,
|
||||||
|
city: $this.userInfo.city,
|
||||||
|
homePhone: $this.userInfo.homePhone,
|
||||||
|
isNewPeopleFlag: $this.userInfo.isNewPeopleFlag,
|
||||||
|
npType: $this.userInfo.npType,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
switch (data.agentCustomerInfoDTO.companyArea) {
|
||||||
|
case '500129':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500229'
|
||||||
|
break
|
||||||
|
case '500130':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500230'
|
||||||
|
break
|
||||||
|
case '500131':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500231'
|
||||||
|
break
|
||||||
|
case '500133':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500233'
|
||||||
|
break
|
||||||
|
case '500135':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500235'
|
||||||
|
break
|
||||||
|
case '500136':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500236'
|
||||||
|
break
|
||||||
|
case '500137':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500237'
|
||||||
|
break
|
||||||
|
case '500138':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500238'
|
||||||
|
break
|
||||||
|
case '500140':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500240'
|
||||||
|
break
|
||||||
|
case '500141':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500241'
|
||||||
|
break
|
||||||
|
case '500142':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500242'
|
||||||
|
break
|
||||||
|
case '500143':
|
||||||
|
data.agentCustomerInfoDTO.companyArea = '500243'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
switch (data.agentCustomerInfoDTO.homeArea) {
|
||||||
|
case '500129':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500229'
|
||||||
|
break
|
||||||
|
case '500130':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500230'
|
||||||
|
break
|
||||||
|
case '500131':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500231'
|
||||||
|
break
|
||||||
|
case '500133':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500233'
|
||||||
|
break
|
||||||
|
case '500135':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500235'
|
||||||
|
break
|
||||||
|
case '500136':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500236'
|
||||||
|
break
|
||||||
|
case '500137':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500237'
|
||||||
|
break
|
||||||
|
case '500138':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500238'
|
||||||
|
break
|
||||||
|
case '500140':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500240'
|
||||||
|
break
|
||||||
|
case '500141':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500241'
|
||||||
|
break
|
||||||
|
case '500142':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500242'
|
||||||
|
break
|
||||||
|
case '500143':
|
||||||
|
data.agentCustomerInfoDTO.homeArea = '500243'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
updateCustomerInfo(data)
|
||||||
|
.then(res => {
|
||||||
|
if (res.result == 0) {
|
||||||
|
// EWebBridge.webCallAppInJs("bridge",{
|
||||||
|
// "flag":"webview_toast",
|
||||||
|
// "extra":{"content":res.resultMessage}
|
||||||
|
// })
|
||||||
|
//EWebBridge.webCallAppInJs('goBack', { refresh: '1', index: '-2' })
|
||||||
|
this.$jump({
|
||||||
|
flag: 'goBack',
|
||||||
|
extra: {
|
||||||
|
refresh: '1',
|
||||||
|
index: this.$route.query.from == 2 ? '-2' : '-1'
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
path: '/customer/customerList'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
$this.$toast(res.resultMessage)
|
||||||
|
// EWebBridge.webCallAppInJs("bridge",{
|
||||||
|
// "flag":"webview_toast",
|
||||||
|
// "extra":{"content":res.resultMessage}
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
go(path) {
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
url: location.origin + '/#/customer/' + path
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
path: '/customer/' + path
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.van-index-anchor {
|
.van-index-anchor {
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
padding-bottom: 45px;
|
|
||||||
.header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: bold;
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-bottom: 1px solid #ebedf0;
|
|
||||||
}
|
}
|
||||||
}
|
.container {
|
||||||
.bd {
|
padding-bottom: 45px;
|
||||||
border-bottom: 1px solid #ebedf0;
|
.header {
|
||||||
margin-left: 15px;
|
display: flex;
|
||||||
}
|
justify-content: flex-end;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 1px solid #ebedf0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bd {
|
||||||
|
border-bottom: 1px solid #ebedf0;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user