...
|
...
|
@@ -67,26 +67,41 @@ Page({ |
|
|
sub_index: ''
|
|
|
},
|
|
|
|
|
|
cancleMask() {
|
|
|
if (this.data.inforid != 0) {
|
|
|
if (this.data.edit_state3) {
|
|
|
this.setData({
|
|
|
edit_state: false,
|
|
|
edit_state2: false
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
edit_state: true,
|
|
|
edit_state2: true
|
|
|
})
|
|
|
}
|
|
|
//回到顶部
|
|
|
goTop: function(e) { // 一键回到顶部
|
|
|
if (wx.pageScrollTo) {
|
|
|
wx.pageScrollTo({
|
|
|
scrollTop: 0
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
edit_state: false,
|
|
|
edit_state2: false
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
|
|
|
})
|
|
|
}
|
|
|
console.log(this.data.edit_state)
|
|
|
},
|
|
|
|
|
|
|
|
|
cancleMask() {
|
|
|
// if (this.data.inforid != 0) {
|
|
|
// if (this.data.edit_state3) {
|
|
|
// this.setData({
|
|
|
// edit_state: false,
|
|
|
// edit_state2: false
|
|
|
// })
|
|
|
// } else {
|
|
|
// this.setData({
|
|
|
// edit_state: true,
|
|
|
// edit_state2: true
|
|
|
// })
|
|
|
// }
|
|
|
// } else {
|
|
|
// this.setData({
|
|
|
// edit_state: false,
|
|
|
// edit_state2: false
|
|
|
// })
|
|
|
// }
|
|
|
// console.log(this.data.edit_state)
|
|
|
|
|
|
this.setData({
|
|
|
popup_state: false,
|
...
|
...
|
@@ -207,16 +222,23 @@ Page({ |
|
|
// 已经添加的主险
|
|
|
let tempMain_list = Object.assign(this.data.main_array, {})
|
|
|
// this.data.inforid != 0 && this.data.inforid != undefined
|
|
|
//编辑/缓存状态
|
|
|
if (that.data.temp_state) {
|
|
|
if (!edit_state3) {
|
|
|
console.log('edit')
|
|
|
//edit_state3:代表是刚获取到信息是的结构,还是重新选择之后的数据结构
|
|
|
if (edit_state3) {
|
|
|
//获取到的信息结构
|
|
|
if (type == 'zhuxian') {
|
|
|
console.log('zx')
|
|
|
this.setData({
|
|
|
focus: false
|
|
|
})
|
|
|
if (tempMain_list.length > 0) {
|
|
|
for (let i in tempProjectlist) {
|
|
|
for (let j in tempMain_list) {
|
|
|
if (tempProjectlist[i].id == tempMain_list[j].id) {
|
|
|
tempProjectlist[i].choose_status = true
|
|
|
tempProjectlist[i].num = tempMain_list[j].num
|
|
|
console.log(tempProjectlist, tempMain_list)
|
|
|
for (let g in tempProjectlist[i].title) {
|
|
|
if (tempProjectlist[i].title[g].t_id == tempMain_list[j].t_id) {
|
|
|
tempProjectlist[i].title[g].label_state = true
|
...
|
...
|
@@ -231,6 +253,7 @@ Page({ |
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
console.log('fjx')
|
|
|
if (tempRist.length) {
|
|
|
for (let i in tempProjectlist) {
|
|
|
for (let j in tempRist) {
|
...
|
...
|
@@ -298,8 +321,8 @@ Page({ |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
console.log('add')
|
|
|
if (type == 'zhuxian') {
|
|
|
if (tempMain_list.length > 0) {
|
|
|
for (let i in tempProjectlist) {
|
...
|
...
|
@@ -704,6 +727,7 @@ Page({ |
|
|
})
|
|
|
console.log(this.data.beneficiary_list)
|
|
|
},
|
|
|
|
|
|
//重组添加受益人
|
|
|
tempBeneficiary() {
|
|
|
var beneficiary_list = this.data.beneficiary_list
|
...
|
...
|
@@ -885,6 +909,7 @@ Page({ |
|
|
}
|
|
|
var guarantee_name = e.detail.value
|
|
|
var warranty_two = this.data.warranty_two
|
|
|
var impletion_time = this.data.impletion_time
|
|
|
warranty_two.num = guarantee_name
|
|
|
this.setData({
|
|
|
guarantee_name: e.detail.value,
|
...
|
...
|
@@ -899,12 +924,21 @@ Page({ |
|
|
this.setData({
|
|
|
unit: unit,
|
|
|
})
|
|
|
var warranty_two = this.data.warranty_two
|
|
|
if (unit == '终身') {
|
|
|
warranty_two.num = ''
|
|
|
this.setData({
|
|
|
warranty_info: '',
|
|
|
warranty_state: true
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
warranty_state: false
|
|
|
})
|
|
|
}
|
|
|
this.setData({
|
|
|
warranty_two: warranty_two
|
|
|
})
|
|
|
this.countImpletionTime2()
|
|
|
},
|
|
|
|
...
|
...
|
@@ -974,6 +1008,7 @@ Page({ |
|
|
var time_name = e.detail.value
|
|
|
var long_money = this.data.long_money
|
|
|
long_money.num = time_name
|
|
|
|
|
|
this.setData({
|
|
|
time_name: time_name,
|
|
|
long_money: long_money
|
...
|
...
|
@@ -986,12 +1021,21 @@ Page({ |
|
|
this.setData({
|
|
|
unit2: unit
|
|
|
})
|
|
|
var long_money = this.data.long_money
|
|
|
if (unit == '终身') {
|
|
|
long_money.num = ''
|
|
|
this.setData({
|
|
|
warranty_info1: '',
|
|
|
warranty_state1: true
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
warranty_state1: false
|
|
|
})
|
|
|
}
|
|
|
this.setData({
|
|
|
long_money: long_money
|
|
|
})
|
|
|
this.countImpletionTime()
|
|
|
},
|
|
|
|
...
|
...
|
@@ -1065,6 +1109,17 @@ Page({ |
|
|
let index = e.currentTarget.dataset.index;
|
|
|
let risk_list = Object.assign(this.data.risk_list, {});
|
|
|
risk_list[index].title = unit
|
|
|
if (risk_list[index].title == '终身') {
|
|
|
risk_list[index].num = ''
|
|
|
this.setData({
|
|
|
risk_state: true
|
|
|
})
|
|
|
} else {
|
|
|
this.setData({
|
|
|
risk_state: false
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.setData({
|
|
|
risk_list: risk_list
|
|
|
})
|
...
|
...
|
@@ -1114,7 +1169,6 @@ Page({ |
|
|
var recognizee = this.data.recognizee_name
|
|
|
var main_risks = this.data.main_risks
|
|
|
var coverage = this.data.coverage
|
|
|
|
|
|
var year_money = this.data.year_money
|
|
|
var compact_time = this.data.compact_time
|
|
|
var impletion_time = this.data.impletion_time
|
...
|
...
|
@@ -1217,8 +1271,8 @@ Page({ |
|
|
beneficiary_list: beneficiary_list,
|
|
|
edit_state: true,
|
|
|
edit_state2: true,
|
|
|
edit_state3: false,
|
|
|
temp_state:true
|
|
|
edit_state3: true,
|
|
|
temp_state: true
|
|
|
})
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -1354,6 +1408,7 @@ Page({ |
|
|
app.post(url, params).then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
if (continue1 == 'continue1') {
|
|
|
this.goTop()
|
|
|
wx.showToast({
|
|
|
title: '添加成功',
|
|
|
icon: 'none',
|
...
|
...
|
@@ -1492,7 +1547,7 @@ Page({ |
|
|
beneficiary_list: beneficiary_list,
|
|
|
edit_state: true,
|
|
|
edit_state2: true,
|
|
|
edit_state3: false,
|
|
|
edit_state3: true,
|
|
|
temp_state: true,
|
|
|
guarantee_name: guarantee_name,
|
|
|
time_name: time_name,
|
...
|
...
|
|