From 273cbeb014c2556597e407e3b6b692dd890ed725 Mon Sep 17 00:00:00 2001 From: mengxiaolong Date: Wed, 20 Jan 2021 14:25:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A9=9A=E5=A7=BB=E7=8A=B6=E5=86=B5?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/sale/InsuredInfo.vue | 17 ++++++++++------- src/views/ebiz/sale/InsuredPerson.vue | 15 ++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index 6d85e0262..d8863ad06 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -597,6 +597,7 @@ export default { for (let status of DataDictionary.marriage) { if (status.id == marriageCode) { this.userInfo.marriageStatus = status.text + this.userInfo.marriage = status.id } } }, @@ -1118,6 +1119,14 @@ export default { return this.$toast('请输入其它收入来源') } } + + // 婚姻状况处理: 使用computed/watch可能会出现检测不到的情况 + for (let status of DataDictionary.marriage) { + if (status.text === this.userInfo.marryStatus) { + this.userInfo.marriage = status.id + } + } + /* //如果是已婚 if ((this.userInfo.sex == '0' && age < 22) || (this.userInfo.sex == '1' && age < 20)) { @@ -1238,6 +1247,7 @@ export default { } let str = '' params.orderDTO.appntDTO = this.userInfo + console.log('params :>> ', params) //------------------------专为桂企写死--begin---------------// if (this.specilFlag == '1') { params.orderDTO.orderInfoDTO.productCode = 'GFRS_M0024' @@ -1440,13 +1450,6 @@ export default { if (!nVal) { this.userInfo.otherSalarySource = '' } - }, - 'userInfo.marriageStatus'(nv) { - for (let status of DataDictionary.marriage) { - if (status.text === nv) { - this.userInfo.marriage = status.id - } - } } }, beforeDestroy() { diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 2dda02ed9..00a84fde0 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -706,6 +706,7 @@ export default { for (let status of DataDictionary.marriage) { if (status.id == marriageCode) { this.userInfo.marriageStatus = status.text + this.userInfo.marriage = status.id } } }, @@ -1390,6 +1391,13 @@ export default { } } + // 婚姻状况处理: 使用computed/watch可能会出现检测不到的情况 + for (let status of DataDictionary.marriage) { + if (status.text === this.userInfo.marryStatus) { + this.userInfo.marriage = status.id + } + } + //如果是已婚 // if ((this.userInfo.sex == '0' && age < 22) || (this.userInfo.sex == '1' && age < 20)) { // if (this.userInfo.marriage != '2') { @@ -1761,13 +1769,6 @@ export default { } else { this.homeName = this.userInfo.homeAddress = '' } - }, - 'userInfo.marriageStatus'(nv) { - for (let status of DataDictionary.marriage) { - if (status.text === nv) { - this.userInfo.marriage = status.id - } - } } } } From c829041860cea0e10da867cdb6af26707ece9aa3 Mon Sep 17 00:00:00 2001 From: mengxiaolong Date: Wed, 20 Jan 2021 14:55:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8F=96=E5=80=BC=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/sale/InsuredInfo.vue | 2 +- src/views/ebiz/sale/InsuredPerson.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index d8863ad06..f91a4d9cc 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -1122,7 +1122,7 @@ export default { // 婚姻状况处理: 使用computed/watch可能会出现检测不到的情况 for (let status of DataDictionary.marriage) { - if (status.text === this.userInfo.marryStatus) { + if (status.text === this.userInfo.marriageStatus) { this.userInfo.marriage = status.id } } diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 00a84fde0..cc8ae11d0 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -1393,7 +1393,7 @@ export default { // 婚姻状况处理: 使用computed/watch可能会出现检测不到的情况 for (let status of DataDictionary.marriage) { - if (status.text === this.userInfo.marryStatus) { + if (status.text === this.userInfo.marriageStatus) { this.userInfo.marriage = status.id } } From 67bee36d0145ba6409c0696649119feb5375ff0d Mon Sep 17 00:00:00 2001 From: mengxiaolong Date: Wed, 20 Jan 2021 16:08:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8F=97=E7=9B=8A=E4=BA=BA=E5=A9=9A?= =?UTF-8?q?=E5=A7=BB=E7=8A=B6=E5=86=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/sale/AddBeneficiaryInfo.vue | 31 +++++++++++++++------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/views/ebiz/sale/AddBeneficiaryInfo.vue b/src/views/ebiz/sale/AddBeneficiaryInfo.vue index 046934f6e..8c8db9d67 100644 --- a/src/views/ebiz/sale/AddBeneficiaryInfo.vue +++ b/src/views/ebiz/sale/AddBeneficiaryInfo.vue @@ -358,6 +358,14 @@ export default { } }, methods: { + setCustomerMarriage(marriageCode) { + for (let status of DataDictionary.marriage) { + if (status.id == marriageCode) { + this.userInfo.marriageStatus = status.text + // this.userInfo.marriage = status.id + } + } + }, setBankArea(areaInfo) { let province = areaInfo[0] let city = areaInfo[1] @@ -370,19 +378,16 @@ export default { }, onMarriageConfirm(value) { this.userInfo.marriageStatus = value.text - if (value.text === '已婚') { - this.userInfo.marriage = '1' - } else { - this.userInfo.marriage = '2' + for (let status of DataDictionary.marriage) { + if (status.text === value.text) { + this.userInfo.marriage = status.id + } } this.isMarriageStatusShow = false }, setMarriageStatus() { this.isMarriageStatusShow = true - this.columns = [ - { id: 1, text: '已婚' }, - { id: 2, text: '单身' } - ] + this.columns = DataDictionary.marriage }, //监听名字变化 nameChange(name) { @@ -649,8 +654,7 @@ export default { this.userInfo.birthday = data.birthday //出生日期 this.userInfo.idType = data.customerIdType //证件类型 this.userInfo.idNo = data.customerIdNumber //证件号码 - this.userInfo.marriageStatus = data.marryStatus === '1' ? '已婚' : data.marryStatus === '2' ? '单身' : null - this.userInfo.marriage = data.marryStatus + this.setCustomerMarriage(data.marryStatus) this.userInfo.village = data.homeAddress this.userInfo.mobile = data.customerPhone if (data.homeProvince && data.homeCity && data.homeArea) { @@ -695,6 +699,13 @@ export default { // if (insuredSex == appntSex) { // return this.$toast('性别输入有误') // } + + for (let status of DataDictionary.marriage) { + if (status.text === this.userInfo.marriageStatus) { + this.userInfo.marriage = status.id + } + } + console.log(insuredDetail) // 页面跳转 let valid = await this.$validator.validate()