正在显示
22 个修改的文件
包含
324 行增加
和
188 行删除
@@ -145,36 +145,18 @@ Page({ | @@ -145,36 +145,18 @@ Page({ | ||
145 | * 用户点击右上角分享 | 145 | * 用户点击右上角分享 |
146 | */ | 146 | */ |
147 | onShareAppMessage: function (options) { | 147 | onShareAppMessage: function (options) { |
148 | - console.log(options) | 148 | + // console.log(options) |
149 | this.prizeshare() | 149 | this.prizeshare() |
150 | - // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
151 | var shareObj = { | 150 | var shareObj = { |
152 | title: options.target.dataset.title, // 默认是小程序的名称(可以写slogan等) | 151 | title: options.target.dataset.title, // 默认是小程序的名称(可以写slogan等) |
153 | - path: '/pages/start/start?status=' + options.target.dataset.status + '&GoId=' + app.globalData.UserId, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
154 | - imgUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
155 | - success: function (res) { | ||
156 | - // 转发成功之后的回调 | ||
157 | - if (res.errMsg == 'shareAppMessage:ok') { } | ||
158 | - }, | ||
159 | - fail: function () { | ||
160 | - // 转发失败之后的回调 | ||
161 | - if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
162 | - // 用户取消转发 | ||
163 | - } else if (res.errMsg == 'shareAppMessage:fail') { | ||
164 | - // 转发失败,其中 detail message 为详细失败信息 | ||
165 | - } | ||
166 | - }, | ||
167 | - complete: function () { | ||
168 | - // 转发结束之后的回调(转发成不成功都会执行) | ||
169 | - } | ||
170 | - } // 来自页面内的按钮的转发 | 152 | + path: '/pages/start/start?status=' + options.target.dataset.status + '&GoId=' + app.globalData.UserId, |
153 | + imgUrl: '', | ||
154 | + } | ||
171 | 155 | ||
172 | if (options.from == 'button') { | 156 | if (options.from == 'button') { |
173 | - // var eData = options.target.dataset; | ||
174 | - // console.log(eData.name); // shareBtn | ||
175 | // 此处可以修改 shareObj 中的内容 | 157 | // 此处可以修改 shareObj 中的内容 |
176 | shareObj.path = '/pages/start/start?status=' + options.target.dataset.status | 158 | shareObj.path = '/pages/start/start?status=' + options.target.dataset.status |
177 | - } // 返回shareObj | 159 | + } |
178 | 160 | ||
179 | return shareObj; | 161 | return shareObj; |
180 | } | 162 | } |
@@ -47,14 +47,9 @@ Page({ | @@ -47,14 +47,9 @@ Page({ | ||
47 | Status: this.data.currentTab, | 47 | Status: this.data.currentTab, |
48 | KeyWord: that.data.KeyWord | 48 | KeyWord: that.data.KeyWord |
49 | } | 49 | } |
50 | - console.log(param) | ||
51 | app.post(url, param).then((res) => { | 50 | app.post(url, param).then((res) => { |
52 | let data = res.data; | 51 | let data = res.data; |
53 | - console.log(data.code) | ||
54 | - console.log(res.data.data.list) | ||
55 | if (data.code == 200) { | 52 | if (data.code == 200) { |
56 | - console.log(1) | ||
57 | - console.log(data.data.list) | ||
58 | that.setData({ | 53 | that.setData({ |
59 | list: data.data.list | 54 | list: data.data.list |
60 | }) | 55 | }) |
@@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
48 | </view> | 48 | </view> |
49 | <view class='null_box'></view> | 49 | <view class='null_box'></view> |
50 | <view class='bottom'> | 50 | <view class='bottom'> |
51 | - <view class='bottom_box' bindtap="{{vip_state?'addFamily':''}}">创建新家庭</view> | 51 | + <view class='bottom_box' style='100%;' bindtap="{{vip_state?'addFamily':''}}">创建新家庭</view> |
52 | <view class='bottom_box' bindtap="goIndex">回到首页</view> | 52 | <view class='bottom_box' bindtap="goIndex">回到首页</view> |
53 | </view> | 53 | </view> |
54 | </view> | 54 | </view> |
@@ -6,6 +6,24 @@ | @@ -6,6 +6,24 @@ | ||
6 | background: #f5f6fa; | 6 | background: #f5f6fa; |
7 | } | 7 | } |
8 | 8 | ||
9 | +.go_index { | ||
10 | + width: 100rpx; | ||
11 | + height: 100rpx; | ||
12 | + border-radius: 50%; | ||
13 | + position: fixed; | ||
14 | + right: 30rpx; | ||
15 | + bottom: 120rpx; | ||
16 | + background: #0286ff; | ||
17 | + font-size: 30rpx; | ||
18 | + color: #fff; | ||
19 | + display: flex; | ||
20 | + align-items: center; | ||
21 | + justify-content: center; | ||
22 | + text-align: center; | ||
23 | + padding: 20rpx; | ||
24 | + box-sizing: border-box; | ||
25 | +} | ||
26 | + | ||
9 | .search_box { | 27 | .search_box { |
10 | width: 100%; | 28 | width: 100%; |
11 | display: flex; | 29 | display: flex; |
@@ -110,6 +128,7 @@ | @@ -110,6 +128,7 @@ | ||
110 | justify-content: center; | 128 | justify-content: center; |
111 | flex-direction: column; | 129 | flex-direction: column; |
112 | margin-left: 15rpx; | 130 | margin-left: 15rpx; |
131 | + position: relative; | ||
113 | /* position: absolute; | 132 | /* position: absolute; |
114 | left: 0; | 133 | left: 0; |
115 | top: -20rpx; */ | 134 | top: -20rpx; */ |
@@ -36,10 +36,8 @@ Page({ | @@ -36,10 +36,8 @@ Page({ | ||
36 | }) | 36 | }) |
37 | }, | 37 | }, |
38 | 38 | ||
39 | - | ||
40 | //名字 | 39 | //名字 |
41 | setName(e) { | 40 | setName(e) { |
42 | - // console.log(e) | ||
43 | var list = this.data.list; | 41 | var list = this.data.list; |
44 | list.name = e.detail.value; | 42 | list.name = e.detail.value; |
45 | this.setData({ | 43 | this.setData({ |
@@ -118,7 +116,7 @@ Page({ | @@ -118,7 +116,7 @@ Page({ | ||
118 | let list = this.data.list; | 116 | let list = this.data.list; |
119 | list.address = e.detail.value; | 117 | list.address = e.detail.value; |
120 | var address = list.address | 118 | var address = list.address |
121 | - if(this.data.familyid==0){ | 119 | + if (this.data.familyid == 0) { |
122 | wx.setStorageSync('address', address) | 120 | wx.setStorageSync('address', address) |
123 | } | 121 | } |
124 | this.setData({ | 122 | this.setData({ |
@@ -176,7 +174,6 @@ Page({ | @@ -176,7 +174,6 @@ Page({ | ||
176 | let url = 'counselor/DefAdd'; | 174 | let url = 'counselor/DefAdd'; |
177 | let params = {} | 175 | let params = {} |
178 | app.post(url, params).then((res) => { | 176 | app.post(url, params).then((res) => { |
179 | - // console.log(res) | ||
180 | if (res.data.code == 200) { | 177 | if (res.data.code == 200) { |
181 | var list = this.data.list | 178 | var list = this.data.list |
182 | that.setData({ | 179 | that.setData({ |
@@ -203,10 +200,8 @@ Page({ | @@ -203,10 +200,8 @@ Page({ | ||
203 | return label_ids != id | 200 | return label_ids != id |
204 | }) | 201 | }) |
205 | // if (add) { | 202 | // if (add) { |
206 | - // console.log(add) | ||
207 | if (!(label_list[mindex].data[sindex].status)) { | 203 | if (!(label_list[mindex].data[sindex].status)) { |
208 | label_ids.push(id) | 204 | label_ids.push(id) |
209 | - console.log(22, label_ids) | ||
210 | } else { | 205 | } else { |
211 | for (var i = 0; i < label_ids.length; i++) { | 206 | for (var i = 0; i < label_ids.length; i++) { |
212 | // if (!(label_list[mindex].data[sindex].status)) { | 207 | // if (!(label_list[mindex].data[sindex].status)) { |
@@ -218,10 +213,6 @@ Page({ | @@ -218,10 +213,6 @@ Page({ | ||
218 | } | 213 | } |
219 | } | 214 | } |
220 | // } | 215 | // } |
221 | - // console.log(label_list, label_ids) | ||
222 | - | ||
223 | - | ||
224 | - | ||
225 | label_list[mindex].data[sindex].status = !(label_list[mindex].data[sindex].status) | 216 | label_list[mindex].data[sindex].status = !(label_list[mindex].data[sindex].status) |
226 | this.setData({ | 217 | this.setData({ |
227 | label_list: label_list, | 218 | label_list: label_list, |
@@ -267,7 +258,6 @@ Page({ | @@ -267,7 +258,6 @@ Page({ | ||
267 | }) | 258 | }) |
268 | }, | 259 | }, |
269 | 260 | ||
270 | - | ||
271 | //成员信息的修改,新增 | 261 | //成员信息的修改,新增 |
272 | listVerify(e) { | 262 | listVerify(e) { |
273 | let that = this; | 263 | let that = this; |
@@ -320,9 +310,13 @@ Page({ | @@ -320,9 +310,13 @@ Page({ | ||
320 | wx.setStorageSync('familyid', res.data.data.family_id) | 310 | wx.setStorageSync('familyid', res.data.data.family_id) |
321 | setTimeout(() => { | 311 | setTimeout(() => { |
322 | if (this.data.familyid == 0) { | 312 | if (this.data.familyid == 0) { |
323 | - wx.redirectTo({ | ||
324 | - url: '/pages/index/CustomerManagement/CustomerManagement', | 313 | + // wx.redirectTo({ |
314 | + // url: '/pages/index/CustomerManagement/CustomerManagement', | ||
315 | + // }) | ||
316 | + wx.navigateTo({ | ||
317 | + url: '/pages/index/addNewFamily/addNewFamily', | ||
325 | }) | 318 | }) |
319 | + | ||
326 | } else { | 320 | } else { |
327 | wx.navigateBack() | 321 | wx.navigateBack() |
328 | } | 322 | } |
@@ -354,7 +348,6 @@ Page({ | @@ -354,7 +348,6 @@ Page({ | ||
354 | DefId: that.data.DefId | 348 | DefId: that.data.DefId |
355 | } | 349 | } |
356 | app.post(url, params).then((res) => { | 350 | app.post(url, params).then((res) => { |
357 | - console.log(res) | ||
358 | if (res.data.code == 200) { | 351 | if (res.data.code == 200) { |
359 | var list = res.data.data.list | 352 | var list = res.data.data.list |
360 | if (res.data.data.list.picurl != '') { | 353 | if (res.data.data.list.picurl != '') { |
@@ -390,6 +383,26 @@ Page({ | @@ -390,6 +383,26 @@ Page({ | ||
390 | }) | 383 | }) |
391 | }, | 384 | }, |
392 | 385 | ||
386 | + //获取家庭地址 | ||
387 | + getAddress() { | ||
388 | + let that = this; | ||
389 | + let url = 'counselor/addUserAds'; | ||
390 | + app.post(url, { | ||
391 | + family_id: this.data.familyid | ||
392 | + }).then((res) => { | ||
393 | + console.log(res) | ||
394 | + if (res.data.code == 200) { | ||
395 | + var list = that.data.list | ||
396 | + console.log(list) | ||
397 | + list.address = res.data.data.address | ||
398 | + that.setData({ | ||
399 | + list: list | ||
400 | + }) | ||
401 | + } | ||
402 | + }).catch((errMsg) => { | ||
403 | + console.log(errMsg) | ||
404 | + }) | ||
405 | + }, | ||
393 | 406 | ||
394 | /** | 407 | /** |
395 | * 生命周期函数--监听页面加载 | 408 | * 生命周期函数--监听页面加载 |
@@ -409,6 +422,10 @@ Page({ | @@ -409,6 +422,10 @@ Page({ | ||
409 | }) | 422 | }) |
410 | this.getUserInfo(); | 423 | this.getUserInfo(); |
411 | } | 424 | } |
425 | + | ||
426 | + if (this.data.familyid != '') { | ||
427 | + this.getAddress() | ||
428 | + } | ||
412 | }, | 429 | }, |
413 | 430 | ||
414 | /** | 431 | /** |
@@ -54,16 +54,40 @@ Page({ | @@ -54,16 +54,40 @@ Page({ | ||
54 | InfoId: 0, | 54 | InfoId: 0, |
55 | def_id: '', | 55 | def_id: '', |
56 | edit_state: false, | 56 | edit_state: false, |
57 | + edit_state2: false, | ||
57 | // risk_listitm: '', | 58 | // risk_listitm: '', |
58 | storge_state: false, | 59 | storge_state: false, |
59 | warranty_info: '请输入', | 60 | warranty_info: '请输入', |
60 | warranty_state: false, | 61 | warranty_state: false, |
61 | warranty_info1: '请输入', | 62 | warranty_info1: '请输入', |
62 | warranty_state1: false, | 63 | warranty_state1: false, |
64 | + edit_state3: false, | ||
63 | coverage: '', | 65 | coverage: '', |
64 | focus: false, | 66 | focus: false, |
67 | + sub_index: '' | ||
65 | }, | 68 | }, |
69 | + | ||
66 | cancleMask() { | 70 | cancleMask() { |
71 | + if (this.data.inforid != 0) { | ||
72 | + if (this.data.edit_state3) { | ||
73 | + this.setData({ | ||
74 | + edit_state: false, | ||
75 | + edit_state2: false | ||
76 | + }) | ||
77 | + } else { | ||
78 | + this.setData({ | ||
79 | + edit_state: true, | ||
80 | + edit_state2: true | ||
81 | + }) | ||
82 | + } | ||
83 | + } else { | ||
84 | + this.setData({ | ||
85 | + edit_state: false, | ||
86 | + edit_state2: false | ||
87 | + }) | ||
88 | + } | ||
89 | + console.log(this.data.edit_state) | ||
90 | + | ||
67 | this.setData({ | 91 | this.setData({ |
68 | popup_state: false, | 92 | popup_state: false, |
69 | }) | 93 | }) |
@@ -102,20 +126,16 @@ Page({ | @@ -102,20 +126,16 @@ Page({ | ||
102 | 126 | ||
103 | //主险名称 | 127 | //主险名称 |
104 | setRiskName(e) { | 128 | setRiskName(e) { |
105 | - // console.log(e) | ||
106 | this.setData({ | 129 | this.setData({ |
107 | main_risks: e.detail.value, | 130 | main_risks: e.detail.value, |
108 | }) | 131 | }) |
109 | - // console.log(this.data.main_risks) | ||
110 | }, | 132 | }, |
111 | 133 | ||
112 | //主险名称 | 134 | //主险名称 |
113 | setRiskMoney(e) { | 135 | setRiskMoney(e) { |
114 | - // console.log(e) | ||
115 | this.setData({ | 136 | this.setData({ |
116 | coverage: e.detail.value, | 137 | coverage: e.detail.value, |
117 | }) | 138 | }) |
118 | - // console.log(this.data.main_risks) | ||
119 | }, | 139 | }, |
120 | 140 | ||
121 | 141 | ||
@@ -165,70 +185,176 @@ Page({ | @@ -165,70 +185,176 @@ Page({ | ||
165 | 185 | ||
166 | //保障项目弹窗 | 186 | //保障项目弹窗 |
167 | ensureProject(e) { | 187 | ensureProject(e) { |
168 | - if (this.data.inforid != 0) { | ||
169 | - this.setData({ | ||
170 | - edit_state: true | ||
171 | - }) | ||
172 | - } | ||
173 | - | ||
174 | - | ||
175 | let that = this; | 188 | let that = this; |
176 | let type = e.currentTarget.dataset.type; | 189 | let type = e.currentTarget.dataset.type; |
177 | let index = e.currentTarget.dataset.xulie; | 190 | let index = e.currentTarget.dataset.xulie; |
178 | let tempProjectlist = Object.assign(this.data.projectlist, {}); | 191 | let tempProjectlist = Object.assign(this.data.projectlist, {}); |
192 | + var sub_index = that.data.sub_index | ||
193 | + var edit_state3 = that.data.edit_state3 | ||
194 | + | ||
179 | // 已经添加的附加险 | 195 | // 已经添加的附加险 |
180 | let risk_list = Object.assign(this.data.risk_list, {}); | 196 | let risk_list = Object.assign(this.data.risk_list, {}); |
181 | let tempRist = risk_list[index].mo; | 197 | let tempRist = risk_list[index].mo; |
182 | - | 198 | + this.setData({ |
199 | + type: type | ||
200 | + }) | ||
183 | 201 | ||
184 | if (type == 'fujiaxian') { | 202 | if (type == 'fujiaxian') { |
185 | this.setData({ | 203 | this.setData({ |
186 | focus: true | 204 | focus: true |
187 | }) | 205 | }) |
188 | } | 206 | } |
189 | - | ||
190 | // 已经添加的主险 | 207 | // 已经添加的主险 |
191 | let tempMain_list = Object.assign(this.data.main_array, {}) | 208 | let tempMain_list = Object.assign(this.data.main_array, {}) |
192 | - if (type == 'zhuxian') { | ||
193 | - if (tempMain_list.length > 0) { | ||
194 | - for (let i in tempProjectlist) { | ||
195 | - for (let j in tempMain_list) { | ||
196 | - if (tempProjectlist[i].id == tempMain_list[j].id) { | ||
197 | - tempProjectlist[i].choose_status = true | ||
198 | - tempProjectlist[i].num = tempMain_list[j].num | ||
199 | - for (let g in tempProjectlist[i].title) { | ||
200 | - tempProjectlist[i].title[g].t_id == tempMain_list[j].t_id ? tempProjectlist[i].title[g].label_state = true : '' | ||
201 | - | 209 | + // this.data.inforid != 0 && this.data.inforid != undefined |
210 | + if (that.data.temp_state) { | ||
211 | + if (!edit_state3) { | ||
212 | + if (type == 'zhuxian') { | ||
213 | + if (tempMain_list.length > 0) { | ||
214 | + for (let i in tempProjectlist) { | ||
215 | + for (let j in tempMain_list) { | ||
216 | + if (tempProjectlist[i].id == tempMain_list[j].id) { | ||
217 | + tempProjectlist[i].choose_status = true | ||
218 | + tempProjectlist[i].num = tempMain_list[j].num | ||
219 | + console.log(tempProjectlist, tempMain_list) | ||
220 | + for (let g in tempProjectlist[i].title) { | ||
221 | + if (tempProjectlist[i].title[g].t_id == tempMain_list[j].t_id) { | ||
222 | + tempProjectlist[i].title[g].label_state = true | ||
223 | + if (tempProjectlist[i].title[g].name == tempMain_list[j].title) { | ||
224 | + tempProjectlist[i].title[g].current = parseInt(g) | ||
225 | + sub_index = parseInt(g) | ||
226 | + } | ||
227 | + } | ||
228 | + } | ||
229 | + } | ||
230 | + } | ||
231 | + } | ||
232 | + } | ||
233 | + } else { | ||
234 | + if (tempRist.length) { | ||
235 | + for (let i in tempProjectlist) { | ||
236 | + for (let j in tempRist) { | ||
237 | + if (tempProjectlist[i].id == tempRist[j].id) { | ||
238 | + tempProjectlist[i].choose_status = true | ||
239 | + tempProjectlist[i].num = tempRist[j].num | ||
240 | + for (let g in tempProjectlist[i].title) { | ||
241 | + if (tempProjectlist[i].title[g].t_id == tempRist[j].t_id) { | ||
242 | + tempProjectlist[i].title[g].label_state = true | ||
243 | + if (tempProjectlist[i].title[g].name == tempRist[j].title) { | ||
244 | + tempProjectlist[i].title[g].current = parseInt(g) | ||
245 | + sub_index = parseInt(g) | ||
246 | + } | ||
247 | + } | ||
248 | + } | ||
249 | + } | ||
250 | + } | ||
251 | + } | ||
252 | + } | ||
253 | + } | ||
254 | + } else { | ||
255 | + if (type == 'zhuxian') { | ||
256 | + if (tempMain_list.length > 0) { | ||
257 | + for (let i in tempProjectlist) { | ||
258 | + for (let j in tempMain_list) { | ||
259 | + if (tempProjectlist[i].id == tempMain_list[j].id) { | ||
260 | + tempProjectlist[i].choose_status = true | ||
261 | + tempProjectlist[i].num = tempMain_list[j].num | ||
262 | + for (let g in tempProjectlist[i].title) { | ||
263 | + for (let k in tempMain_list[j].title) { | ||
264 | + if (tempMain_list[j].title[k].label_state) { | ||
265 | + if (tempProjectlist[i].title[g].t_id == tempMain_list[j].title[k].t_id) { | ||
266 | + tempProjectlist[i].title[g].label_state = true | ||
267 | + tempProjectlist[i].title[g].current = tempMain_list[j].title[k].current | ||
268 | + sub_index = tempMain_list[j].title[k].current | ||
269 | + } | ||
270 | + } | ||
271 | + } | ||
272 | + } | ||
273 | + } | ||
274 | + } | ||
275 | + } | ||
276 | + } | ||
277 | + } else { | ||
278 | + if (tempRist.length) { | ||
279 | + for (let i in tempProjectlist) { | ||
280 | + for (let j in tempRist) { | ||
281 | + if (tempProjectlist[i].id == tempRist[j].id) { | ||
282 | + tempProjectlist[i].choose_status = true | ||
283 | + tempProjectlist[i].num = tempRist[j].num | ||
284 | + for (let g in tempProjectlist[i].title) { | ||
285 | + for (let k in tempRist[j].title) { | ||
286 | + if (tempRist[j].title[k].label_state) { | ||
287 | + if (tempProjectlist[i].title[g].t_id == tempRist[j].title[k].t_id) { | ||
288 | + tempProjectlist[i].title[g].label_state = true | ||
289 | + tempProjectlist[i].title[g].current = tempRist[j].title[k].current | ||
290 | + sub_index = tempRist[j].title[k].current | ||
291 | + } | ||
292 | + } | ||
293 | + } | ||
294 | + } | ||
295 | + } | ||
202 | } | 296 | } |
203 | } | 297 | } |
204 | } | 298 | } |
205 | } | 299 | } |
206 | } | 300 | } |
301 | + | ||
207 | } else { | 302 | } else { |
208 | - if (tempRist.length) { | ||
209 | - for (let i in tempProjectlist) { | ||
210 | - for (let j in tempRist) { | ||
211 | - if (tempProjectlist[i].id == tempRist[j].id) { | ||
212 | - tempProjectlist[i].choose_status = true | ||
213 | - tempProjectlist[i].num = tempRist[j].num | ||
214 | - for (let g in tempProjectlist[i].title) { | ||
215 | - tempProjectlist[i].title[g].t_id == tempRist[j].t_id ? tempProjectlist[i].title[g].label_state = true : '' | 303 | + if (type == 'zhuxian') { |
304 | + if (tempMain_list.length > 0) { | ||
305 | + for (let i in tempProjectlist) { | ||
306 | + for (let j in tempMain_list) { | ||
307 | + if (tempProjectlist[i].id == tempMain_list[j].id) { | ||
308 | + tempProjectlist[i].choose_status = true | ||
309 | + tempProjectlist[i].num = tempMain_list[j].num | ||
310 | + for (let g in tempProjectlist[i].title) { | ||
311 | + for (let k in tempMain_list[j].title) { | ||
312 | + if (tempMain_list[j].title[k].label_state) { | ||
313 | + if (tempProjectlist[i].title[g].t_id == tempMain_list[j].title[k].t_id) { | ||
314 | + tempProjectlist[i].title[g].label_state = true | ||
315 | + tempProjectlist[i].title[g].current = tempMain_list[j].title[k].current | ||
316 | + sub_index = tempMain_list[j].title[k].current | ||
317 | + } | ||
318 | + } | ||
319 | + } | ||
320 | + } | ||
321 | + } | ||
322 | + } | ||
323 | + } | ||
324 | + } | ||
325 | + } else { | ||
326 | + if (tempRist.length) { | ||
327 | + for (let i in tempProjectlist) { | ||
328 | + for (let j in tempRist) { | ||
329 | + if (tempProjectlist[i].id == tempRist[j].id) { | ||
330 | + tempProjectlist[i].choose_status = true | ||
331 | + tempProjectlist[i].num = tempRist[j].num | ||
332 | + for (let g in tempProjectlist[i].title) { | ||
333 | + for (let k in tempRist[j].title) { | ||
334 | + if (tempRist[j].title[k].label_state) { | ||
335 | + if (tempProjectlist[i].title[g].t_id == tempRist[j].title[k].t_id) { | ||
336 | + tempProjectlist[i].title[g].label_state = true | ||
337 | + tempProjectlist[i].title[g].current = tempRist[j].title[k].current | ||
338 | + sub_index = tempRist[j].title[k].current | ||
339 | + } | ||
340 | + } | ||
341 | + } | ||
342 | + } | ||
216 | } | 343 | } |
217 | } | 344 | } |
218 | } | 345 | } |
219 | } | 346 | } |
220 | } | 347 | } |
221 | } | 348 | } |
222 | - | ||
223 | wx.setNavigationBarTitle({ | 349 | wx.setNavigationBarTitle({ |
224 | title: '选择保障项目', | 350 | title: '选择保障项目', |
225 | }) | 351 | }) |
226 | - console.log(tempProjectlist) | ||
227 | this.setData({ | 352 | this.setData({ |
228 | popup_state: true, | 353 | popup_state: true, |
229 | addType: type, | 354 | addType: type, |
230 | xulie: index, | 355 | xulie: index, |
231 | - projectlist: tempProjectlist | 356 | + projectlist: tempProjectlist, |
357 | + sub_index: sub_index | ||
232 | }) | 358 | }) |
233 | }, | 359 | }, |
234 | 360 | ||
@@ -245,13 +371,12 @@ Page({ | @@ -245,13 +371,12 @@ Page({ | ||
245 | for (var j = 0; j < projectlist[i].title.length; j++) { | 371 | for (var j = 0; j < projectlist[i].title.length; j++) { |
246 | projectlist[i].title[j].label_state = false | 372 | projectlist[i].title[j].label_state = false |
247 | } | 373 | } |
248 | - projectlist[i].title[0].current = 0 | ||
249 | - projectlist[i].title[0].label_state = true | 374 | + // projectlist[i].title[0].current = 0 |
375 | + // projectlist[i].title[0].label_state = true | ||
250 | } | 376 | } |
251 | this.setData({ | 377 | this.setData({ |
252 | projectlist: res.data.data.def | 378 | projectlist: res.data.data.def |
253 | }) | 379 | }) |
254 | - // console.log(this.data.projectlist) | ||
255 | } | 380 | } |
256 | }) | 381 | }) |
257 | }, | 382 | }, |
@@ -275,6 +400,7 @@ Page({ | @@ -275,6 +400,7 @@ Page({ | ||
275 | } | 400 | } |
276 | this.setData({ | 401 | this.setData({ |
277 | projectlist: projectlist, | 402 | projectlist: projectlist, |
403 | + sub_index: sindex | ||
278 | }) | 404 | }) |
279 | }, | 405 | }, |
280 | 406 | ||
@@ -288,7 +414,6 @@ Page({ | @@ -288,7 +414,6 @@ Page({ | ||
288 | this.setData({ | 414 | this.setData({ |
289 | projectlist: projectlist | 415 | projectlist: projectlist |
290 | }) | 416 | }) |
291 | - console.log(projectlist) | ||
292 | }, | 417 | }, |
293 | 418 | ||
294 | //选择保障项目 | 419 | //选择保障项目 |
@@ -301,15 +426,23 @@ Page({ | @@ -301,15 +426,23 @@ Page({ | ||
301 | projectlist: projectlist, | 426 | projectlist: projectlist, |
302 | }) | 427 | }) |
303 | if (this.data.inforid != 0) { | 428 | if (this.data.inforid != 0) { |
304 | - edit_state: false | 429 | + edit_state: false; |
430 | + edit_state2: false | ||
305 | } | 431 | } |
306 | }, | 432 | }, |
307 | 433 | ||
308 | //确认选择的推荐方案 | 434 | //确认选择的推荐方案 |
309 | confirmCase() { | 435 | confirmCase() { |
310 | - this.setData({ | ||
311 | - edit_state: false | ||
312 | - }) | 436 | + if (this.data.type == 'fujiaxian') { |
437 | + this.setData({ | ||
438 | + edit_state2: false | ||
439 | + }) | ||
440 | + } else { | ||
441 | + this.setData({ | ||
442 | + edit_state: false | ||
443 | + }) | ||
444 | + } | ||
445 | + | ||
313 | 446 | ||
314 | let index = this.data.xulie; | 447 | let index = this.data.xulie; |
315 | let type = this.data.addType; | 448 | let type = this.data.addType; |
@@ -320,7 +453,6 @@ Page({ | @@ -320,7 +453,6 @@ Page({ | ||
320 | for (var i = 0; i < projectlist.length; i++) { | 453 | for (var i = 0; i < projectlist.length; i++) { |
321 | if (projectlist[i].choose_status) { | 454 | if (projectlist[i].choose_status) { |
322 | main_array.push(projectlist[i]) | 455 | main_array.push(projectlist[i]) |
323 | - console.log(main_array) | ||
324 | } | 456 | } |
325 | } | 457 | } |
326 | 458 | ||
@@ -336,15 +468,12 @@ Page({ | @@ -336,15 +468,12 @@ Page({ | ||
336 | tempRist[index]['mo'] = main_array; | 468 | tempRist[index]['mo'] = main_array; |
337 | that.setData({ | 469 | that.setData({ |
338 | risk_list: tempRist, | 470 | risk_list: tempRist, |
339 | - // risk_listitm: tempRist | ||
340 | }) | 471 | }) |
341 | - console.log(this.data.risk_list) | ||
342 | } else { | 472 | } else { |
343 | that.setData({ | 473 | that.setData({ |
344 | main_array: main_array, | 474 | main_array: main_array, |
345 | }) | 475 | }) |
346 | } | 476 | } |
347 | - console.log(this.data.main_array) | ||
348 | } | 477 | } |
349 | setTimeout(function() { | 478 | setTimeout(function() { |
350 | that.ensureProjectList() | 479 | that.ensureProjectList() |
@@ -355,16 +484,12 @@ Page({ | @@ -355,16 +484,12 @@ Page({ | ||
355 | title: '添加保单', | 484 | title: '添加保单', |
356 | }) | 485 | }) |
357 | }, 800) | 486 | }, 800) |
358 | - | ||
359 | - | ||
360 | - console.log(this.data.risk_list) | ||
361 | }, | 487 | }, |
362 | 488 | ||
363 | //重组主险的保障项目 | 489 | //重组主险的保障项目 |
364 | tempMain() { | 490 | tempMain() { |
365 | var main_array = this.data.main_array | 491 | var main_array = this.data.main_array |
366 | var warranty_one1 = [] | 492 | var warranty_one1 = [] |
367 | - // console.log(main_array) | ||
368 | for (var i = 0; i < main_array.length; i++) { | 493 | for (var i = 0; i < main_array.length; i++) { |
369 | var temp = {} | 494 | var temp = {} |
370 | for (var j = 0; j < main_array[i].title.length; j++) { | 495 | for (var j = 0; j < main_array[i].title.length; j++) { |
@@ -398,23 +523,17 @@ Page({ | @@ -398,23 +523,17 @@ Page({ | ||
398 | 523 | ||
399 | //主险保障其 | 524 | //主险保障其 |
400 | addRiskUnit(e) { | 525 | addRiskUnit(e) { |
401 | - console.log(e) | ||
402 | var risk_list = this.data.risk_list | 526 | var risk_list = this.data.risk_list |
403 | - console.log(risk_list) | ||
404 | var index = e.currentTarget.dataset.index | 527 | var index = e.currentTarget.dataset.index |
405 | risk_list[index].num = e.detail.value | 528 | risk_list[index].num = e.detail.value |
406 | - console.log(risk_list) | ||
407 | this.setData({ | 529 | this.setData({ |
408 | risk_list: risk_list | 530 | risk_list: risk_list |
409 | }) | 531 | }) |
410 | - | ||
411 | }, | 532 | }, |
412 | 533 | ||
413 | //重组附加险整体数据结构 | 534 | //重组附加险整体数据结构 |
414 | tempAddRisk() { | 535 | tempAddRisk() { |
415 | - console.log('storte') | ||
416 | var risk_list = this.data.risk_list | 536 | var risk_list = this.data.risk_list |
417 | - console.log(risk_list) | ||
418 | var sub_array = [] | 537 | var sub_array = [] |
419 | var temp_risk = this.data.risk_list; | 538 | var temp_risk = this.data.risk_list; |
420 | var temp = this.data.risk_list; | 539 | var temp = this.data.risk_list; |
@@ -428,7 +547,6 @@ Page({ | @@ -428,7 +547,6 @@ Page({ | ||
428 | temp_risk[i].name = temp[i].name | 547 | temp_risk[i].name = temp[i].name |
429 | temp_risk[i].num = temp[i].num | 548 | temp_risk[i].num = temp[i].num |
430 | temp_risk[i].title = temp[i].title | 549 | temp_risk[i].title = temp[i].title |
431 | - console.log(temp[i].title, temp_risk[i].title) | ||
432 | temp_risk[i].mo[j].t_id = temp[i].mo[j].title[k].t_id | 550 | temp_risk[i].mo[j].t_id = temp[i].mo[j].title[k].t_id |
433 | temp_risk[i].mo[j].id = temp[i].mo[j].id | 551 | temp_risk[i].mo[j].id = temp[i].mo[j].id |
434 | temp_risk[i].mo[j].name = temp[i].mo[j].name | 552 | temp_risk[i].mo[j].name = temp[i].mo[j].name |
@@ -451,7 +569,8 @@ Page({ | @@ -451,7 +569,8 @@ Page({ | ||
451 | beneficiarySelect(e) { | 569 | beneficiarySelect(e) { |
452 | if (this.data.inforid != 0) { | 570 | if (this.data.inforid != 0) { |
453 | this.setData({ | 571 | this.setData({ |
454 | - edit_state: true | 572 | + edit_state: true, |
573 | + edit_state2: true | ||
455 | }) | 574 | }) |
456 | } | 575 | } |
457 | var index = e.currentTarget.dataset.mindex | 576 | var index = e.currentTarget.dataset.mindex |
@@ -519,10 +638,7 @@ Page({ | @@ -519,10 +638,7 @@ Page({ | ||
519 | 638 | ||
520 | //添加受益人名字 | 639 | //添加受益人名字 |
521 | addPeople(e) { | 640 | addPeople(e) { |
522 | - // console.log(e) | ||
523 | - console.log(this.data.beneficiary_list) | ||
524 | var beneficiary_list = this.data.beneficiary_list; | 641 | var beneficiary_list = this.data.beneficiary_list; |
525 | - | ||
526 | var index = e.currentTarget.dataset.index | 642 | var index = e.currentTarget.dataset.index |
527 | // beneficiary_list[beneficiary_list.length - 1].beneficiary_name = e.detail.value; | 643 | // beneficiary_list[beneficiary_list.length - 1].beneficiary_name = e.detail.value; |
528 | beneficiary_list[index].name = e.detail.value; | 644 | beneficiary_list[index].name = e.detail.value; |
@@ -559,7 +675,6 @@ Page({ | @@ -559,7 +675,6 @@ Page({ | ||
559 | this.setData({ | 675 | this.setData({ |
560 | beneficiary_list: list | 676 | beneficiary_list: list |
561 | }) | 677 | }) |
562 | - // console.log(this.data.beneficiary_list) | ||
563 | }, | 678 | }, |
564 | 679 | ||
565 | //添加受益人 | 680 | //添加受益人 |
@@ -629,7 +744,8 @@ Page({ | @@ -629,7 +744,8 @@ Page({ | ||
629 | addRisk() { | 744 | addRisk() { |
630 | if (this.data.inforid != 0) { | 745 | if (this.data.inforid != 0) { |
631 | this.setData({ | 746 | this.setData({ |
632 | - edit_state: false | 747 | + edit_state: false, |
748 | + edit_state2: false | ||
633 | }) | 749 | }) |
634 | } | 750 | } |
635 | var risk_list = Object.assign(this.data.risk_list, {}); | 751 | var risk_list = Object.assign(this.data.risk_list, {}); |
@@ -728,8 +844,9 @@ Page({ | @@ -728,8 +844,9 @@ Page({ | ||
728 | complete: () => { | 844 | complete: () => { |
729 | i++; | 845 | i++; |
730 | if (i == length) { | 846 | if (i == length) { |
731 | - // console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!'); | 847 | + |
732 | } else { //递归调用uploadDIY函数 | 848 | } else { //递归调用uploadDIY函数 |
849 | + | ||
733 | this.uploadAllfile(filePaths, successUp, failUp, i, length); | 850 | this.uploadAllfile(filePaths, successUp, failUp, i, length); |
734 | } | 851 | } |
735 | }, | 852 | }, |
@@ -762,7 +879,8 @@ Page({ | @@ -762,7 +879,8 @@ Page({ | ||
762 | warrantyTwo(e) { | 879 | warrantyTwo(e) { |
763 | if (this.data.inforid != 0) { | 880 | if (this.data.inforid != 0) { |
764 | this.setData({ | 881 | this.setData({ |
765 | - edit_state: false | 882 | + edit_state: false, |
883 | + edit_state2: false | ||
766 | }) | 884 | }) |
767 | } | 885 | } |
768 | var guarantee_name = e.detail.value | 886 | var guarantee_name = e.detail.value |
@@ -809,14 +927,11 @@ Page({ | @@ -809,14 +927,11 @@ Page({ | ||
809 | var unit = this.data.unit | 927 | var unit = this.data.unit |
810 | var compact_time = this.data.compact_time | 928 | var compact_time = this.data.compact_time |
811 | var year = parseInt(new Date(compact_time).getFullYear()) | 929 | var year = parseInt(new Date(compact_time).getFullYear()) |
812 | - console.log(year) | ||
813 | var month = parseInt(new Date(compact_time).getMonth() + 1) | 930 | var month = parseInt(new Date(compact_time).getMonth() + 1) |
814 | var day = parseInt(new Date(compact_time).getDate()) | 931 | var day = parseInt(new Date(compact_time).getDate()) |
815 | - // var impletion_time = this.data.impletion_time | ||
816 | var warranty_one = this.data.warranty_one | 932 | var warranty_one = this.data.warranty_one |
817 | - | ||
818 | var tempbirth_time = '' | 933 | var tempbirth_time = '' |
819 | - var birthday = '1995-04-20' | 934 | + var birthday = '' |
820 | var birthday_year = parseInt(new Date(birthday).getFullYear()) | 935 | var birthday_year = parseInt(new Date(birthday).getFullYear()) |
821 | 936 | ||
822 | if (compact_time == '') { | 937 | if (compact_time == '') { |
@@ -830,7 +945,6 @@ Page({ | @@ -830,7 +945,6 @@ Page({ | ||
830 | var temp_day = day - 1 | 945 | var temp_day = day - 1 |
831 | if (month < 10) month = "0" + month; | 946 | if (month < 10) month = "0" + month; |
832 | if (temp_day < 10) temp_day = "0" + temp_day; | 947 | if (temp_day < 10) temp_day = "0" + temp_day; |
833 | - // impletion_time = temp_year + '-' + month + '-' + temp_day | ||
834 | warranty_one = temp_year + '-' + month + '-' + temp_day | 948 | warranty_one = temp_year + '-' + month + '-' + temp_day |
835 | } else if (unit == '岁') { | 949 | } else if (unit == '岁') { |
836 | var temp_year = (birthday_year + guarantee_name - 1) | 950 | var temp_year = (birthday_year + guarantee_name - 1) |
@@ -839,14 +953,11 @@ Page({ | @@ -839,14 +953,11 @@ Page({ | ||
839 | if (temp_month < 10) temp_month = "0" + temp_month; | 953 | if (temp_month < 10) temp_month = "0" + temp_month; |
840 | if (month < 10) month = "0" + month; | 954 | if (month < 10) month = "0" + month; |
841 | if (day < 10) day = "0" + day; | 955 | if (day < 10) day = "0" + day; |
842 | - // impletion_time = temp_year + '-' + temp_month + '-' + day | ||
843 | warranty_one = temp_year2 + '-' + month + '-' + day | 956 | warranty_one = temp_year2 + '-' + month + '-' + day |
844 | } else if (unit == '终身') { | 957 | } else if (unit == '终身') { |
845 | - // impletion_time = '终身缴费' | ||
846 | warranty_one = '终身' | 958 | warranty_one = '终身' |
847 | } | 959 | } |
848 | this.setData({ | 960 | this.setData({ |
849 | - // impletion_time: impletion_time, | ||
850 | warranty_one: warranty_one | 961 | warranty_one: warranty_one |
851 | }) | 962 | }) |
852 | } | 963 | } |
@@ -856,7 +967,8 @@ Page({ | @@ -856,7 +967,8 @@ Page({ | ||
856 | burningTime(e) { | 967 | burningTime(e) { |
857 | if (this.data.inforid != 0) { | 968 | if (this.data.inforid != 0) { |
858 | this.setData({ | 969 | this.setData({ |
859 | - edit_state: false | 970 | + edit_state: false, |
971 | + edit_state2: false, | ||
860 | }) | 972 | }) |
861 | } | 973 | } |
862 | var time_name = e.detail.value | 974 | var time_name = e.detail.value |
@@ -905,10 +1017,8 @@ Page({ | @@ -905,10 +1017,8 @@ Page({ | ||
905 | var month = parseInt(new Date(compact_time).getMonth() + 1) | 1017 | var month = parseInt(new Date(compact_time).getMonth() + 1) |
906 | var day = parseInt(new Date(compact_time).getDate()) | 1018 | var day = parseInt(new Date(compact_time).getDate()) |
907 | var impletion_time = this.data.impletion_time | 1019 | var impletion_time = this.data.impletion_time |
908 | - // var warranty_one = this.data.warranty_one | ||
909 | - | ||
910 | var tempbirth_time = '' | 1020 | var tempbirth_time = '' |
911 | - var birthday = '1995-04-20' | 1021 | + var birthday = '' |
912 | var birthday_year = parseInt(new Date(birthday).getFullYear()) | 1022 | var birthday_year = parseInt(new Date(birthday).getFullYear()) |
913 | 1023 | ||
914 | if (compact_time == '') { | 1024 | if (compact_time == '') { |
@@ -923,7 +1033,6 @@ Page({ | @@ -923,7 +1033,6 @@ Page({ | ||
923 | if (month < 10) month = "0" + month; | 1033 | if (month < 10) month = "0" + month; |
924 | if (temp_day < 10) temp_day = "0" + temp_day; | 1034 | if (temp_day < 10) temp_day = "0" + temp_day; |
925 | impletion_time = temp_year + '-' + month + '-' + temp_day | 1035 | impletion_time = temp_year + '-' + month + '-' + temp_day |
926 | - // warranty_one = temp_year + '-' + month + '-' + temp_day | ||
927 | } else if (unit == '岁') { | 1036 | } else if (unit == '岁') { |
928 | var temp_year = (birthday_year + time_name - 1) | 1037 | var temp_year = (birthday_year + time_name - 1) |
929 | var temp_year2 = (birthday_year + time_name) | 1038 | var temp_year2 = (birthday_year + time_name) |
@@ -932,14 +1041,11 @@ Page({ | @@ -932,14 +1041,11 @@ Page({ | ||
932 | if (month < 10) month = "0" + month; | 1041 | if (month < 10) month = "0" + month; |
933 | if (day < 10) day = "0" + day; | 1042 | if (day < 10) day = "0" + day; |
934 | impletion_time = temp_year + '-' + temp_month + '-' + day | 1043 | impletion_time = temp_year + '-' + temp_month + '-' + day |
935 | - // warranty_one = temp_year2 + '-' + month + '-' + day | ||
936 | } else if (unit == '终身') { | 1044 | } else if (unit == '终身') { |
937 | impletion_time = '终身缴费' | 1045 | impletion_time = '终身缴费' |
938 | - // warranty_one = '终身' | ||
939 | } | 1046 | } |
940 | this.setData({ | 1047 | this.setData({ |
941 | impletion_time: impletion_time, | 1048 | impletion_time: impletion_time, |
942 | - // warranty_one: warranty_one | ||
943 | }) | 1049 | }) |
944 | } | 1050 | } |
945 | }, | 1051 | }, |
@@ -1110,6 +1216,9 @@ Page({ | @@ -1110,6 +1216,9 @@ Page({ | ||
1110 | risk_list: res.data.data.def.more, | 1216 | risk_list: res.data.data.def.more, |
1111 | beneficiary_list: beneficiary_list, | 1217 | beneficiary_list: beneficiary_list, |
1112 | edit_state: true, | 1218 | edit_state: true, |
1219 | + edit_state2: true, | ||
1220 | + edit_state3: false, | ||
1221 | + temp_state:true | ||
1113 | }) | 1222 | }) |
1114 | } | 1223 | } |
1115 | }) | 1224 | }) |
@@ -1132,7 +1241,7 @@ Page({ | @@ -1132,7 +1241,7 @@ Page({ | ||
1132 | var long_money = JSON.stringify(this.data.long_money) | 1241 | var long_money = JSON.stringify(this.data.long_money) |
1133 | var more = JSON.stringify(this.data.more) | 1242 | var more = JSON.stringify(this.data.more) |
1134 | var guarantee = JSON.stringify(this.data.guarantee) | 1243 | var guarantee = JSON.stringify(this.data.guarantee) |
1135 | - } else if (this.data.edit_state || wx.getStorageSync('storge_state')) { | 1244 | + } else if (this.data.edit_state || this.data.edit_state2 || wx.getStorageSync('storge_state')) { |
1136 | var favoree = JSON.stringify(this.data.beneficiary_list) | 1245 | var favoree = JSON.stringify(this.data.beneficiary_list) |
1137 | var warranty_two = JSON.stringify(this.data.warranty_two) | 1246 | var warranty_two = JSON.stringify(this.data.warranty_two) |
1138 | var long_money = JSON.stringify(this.data.long_money) | 1247 | var long_money = JSON.stringify(this.data.long_money) |
@@ -1309,7 +1418,6 @@ Page({ | @@ -1309,7 +1418,6 @@ Page({ | ||
1309 | }, | 1418 | }, |
1310 | 1419 | ||
1311 | 1420 | ||
1312 | - | ||
1313 | //获取编辑保单接口 | 1421 | //获取编辑保单接口 |
1314 | getlistVerify(id) { | 1422 | getlistVerify(id) { |
1315 | let url = 'counselor/infordef' | 1423 | let url = 'counselor/infordef' |
@@ -1334,10 +1442,6 @@ Page({ | @@ -1334,10 +1442,6 @@ Page({ | ||
1334 | beneficiary_list[obj].name = beneficiary_list[obj].name | 1442 | beneficiary_list[obj].name = beneficiary_list[obj].name |
1335 | beneficiary_list[obj].unit = beneficiary_list[obj].unit | 1443 | beneficiary_list[obj].unit = beneficiary_list[obj].unit |
1336 | // beneficiary_list[obj].name_array = this.data.insure | 1444 | // beneficiary_list[obj].name_array = this.data.insure |
1337 | - } else { | ||
1338 | - // beneficiary_list[0].name = '' | ||
1339 | - // beneficiary_list[0].unit = '' | ||
1340 | - // beneficiary_list[obj].name_array = this.data.insure | ||
1341 | } | 1445 | } |
1342 | } | 1446 | } |
1343 | 1447 | ||
@@ -1387,6 +1491,9 @@ Page({ | @@ -1387,6 +1491,9 @@ Page({ | ||
1387 | risk_list: risk_list, | 1491 | risk_list: risk_list, |
1388 | beneficiary_list: beneficiary_list, | 1492 | beneficiary_list: beneficiary_list, |
1389 | edit_state: true, | 1493 | edit_state: true, |
1494 | + edit_state2: true, | ||
1495 | + edit_state3: false, | ||
1496 | + temp_state: true, | ||
1390 | guarantee_name: guarantee_name, | 1497 | guarantee_name: guarantee_name, |
1391 | time_name: time_name, | 1498 | time_name: time_name, |
1392 | }) | 1499 | }) |
@@ -1398,12 +1505,12 @@ Page({ | @@ -1398,12 +1505,12 @@ Page({ | ||
1398 | * 生命周期函数--监听页面加载 | 1505 | * 生命周期函数--监听页面加载 |
1399 | */ | 1506 | */ |
1400 | onLoad: function(options) { | 1507 | onLoad: function(options) { |
1401 | - | ||
1402 | this.ensureProjectList() | 1508 | this.ensureProjectList() |
1403 | let that = this; | 1509 | let that = this; |
1404 | options.inforid ? (that.getlistVerify(options.inforid), that.setData({ | 1510 | options.inforid ? (that.getlistVerify(options.inforid), that.setData({ |
1405 | inforid: options.inforid, | 1511 | inforid: options.inforid, |
1406 | - edit_state: true | 1512 | + edit_state: true, |
1513 | + edit_state2: true, | ||
1407 | }), wx.setNavigationBarTitle({ | 1514 | }), wx.setNavigationBarTitle({ |
1408 | title: '编辑保单', | 1515 | title: '编辑保单', |
1409 | })) : "" | 1516 | })) : "" |
@@ -1420,6 +1527,7 @@ Page({ | @@ -1420,6 +1527,7 @@ Page({ | ||
1420 | if (wx.getStorageSync('storge_state') && options.inforid == undefined) { | 1527 | if (wx.getStorageSync('storge_state') && options.inforid == undefined) { |
1421 | this.getStorage() | 1528 | this.getStorage() |
1422 | } | 1529 | } |
1530 | + | ||
1423 | }, | 1531 | }, |
1424 | 1532 | ||
1425 | /** | 1533 | /** |
@@ -95,7 +95,7 @@ | @@ -95,7 +95,7 @@ | ||
95 | <input type='text' placeholder='请输入' value='{{item.name}}' data-index='{{its}}' bindinput='addPeople'></input> | 95 | <input type='text' placeholder='请输入' value='{{item.name}}' data-index='{{its}}' bindinput='addPeople'></input> |
96 | </view> | 96 | </view> |
97 | <view class='list_input'> | 97 | <view class='list_input'> |
98 | - <input class='income_input' type='text' placeholder='受益比例' value='{{item.unit}}' data-index='{{its}}' bindinput='addUnit2'></input> | 98 | + <input class='income_input' type='number' placeholder='受益比例' value='{{item.unit}}' data-index='{{its}}' bindinput='addUnit2'></input> |
99 | <text>%</text> | 99 | <text>%</text> |
100 | </view> | 100 | </view> |
101 | </view> | 101 | </view> |
@@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
114 | <text>主险名称</text> | 114 | <text>主险名称</text> |
115 | </view> | 115 | </view> |
116 | <view class='list_input'> | 116 | <view class='list_input'> |
117 | - <input type='text' placeholder='请填写' name='main_risks' value='{{main_risks}}' bindinput='setRiskName'></input> | 117 | + <input type='text' placeholder='请填写' name='main_risks' value="{{main_risks!='undefined'?main_risks:''}}" bindinput='setRiskName'></input> |
118 | </view> | 118 | </view> |
119 | </view> | 119 | </view> |
120 | <view class='item_list'> | 120 | <view class='item_list'> |
@@ -215,7 +215,7 @@ | @@ -215,7 +215,7 @@ | ||
215 | <view class='item_list'> | 215 | <view class='item_list'> |
216 | <view class='list_title'>续费银行</view> | 216 | <view class='list_title'>续费银行</view> |
217 | <view class='list_input'> | 217 | <view class='list_input'> |
218 | - <input type='text' placeholder='请填写' name='bank' value="{{bank}}" bindinput='setBank'></input> | 218 | + <input type='text' placeholder='请填写' name='bank' value="{{bank!='undefined'?bank:''}}" bindinput='setBank'></input> |
219 | </view> | 219 | </view> |
220 | </view> | 220 | </view> |
221 | <view class='item_list'> | 221 | <view class='item_list'> |
@@ -254,7 +254,7 @@ | @@ -254,7 +254,7 @@ | ||
254 | <view class='protec_item' wx:for='{{item.mo}}' wx:for-item='project' wx:key=''> | 254 | <view class='protec_item' wx:for='{{item.mo}}' wx:for-item='project' wx:key=''> |
255 | <view>{{project.name}}</view> | 255 | <view>{{project.name}}</view> |
256 | <view class='protec_num'>{{project.num}} | 256 | <view class='protec_num'>{{project.num}} |
257 | - <text wx:if='{{edit_state}}'>{{project.title}}</text> | 257 | + <text wx:if='{{edit_state2}}'>{{project.title}}</text> |
258 | <block wx:else> | 258 | <block wx:else> |
259 | <block wx:for='{{project.title}}' wx:for-item='danwei' wx:key=''> | 259 | <block wx:for='{{project.title}}' wx:for-item='danwei' wx:key=''> |
260 | <text wx:if="{{danwei.label_state}}">{{danwei.name}}</text> | 260 | <text wx:if="{{danwei.label_state}}">{{danwei.name}}</text> |
@@ -81,9 +81,9 @@ Page({ | @@ -81,9 +81,9 @@ Page({ | ||
81 | //添加成员 | 81 | //添加成员 |
82 | addPerson(e) { | 82 | addPerson(e) { |
83 | var familyid = this.data.familyid | 83 | var familyid = this.data.familyid |
84 | - if (familyid == undefined){ | 84 | + if (familyid == undefined) { |
85 | this.setData({ | 85 | this.setData({ |
86 | - familyid:0 | 86 | + familyid: 0 |
87 | }) | 87 | }) |
88 | } | 88 | } |
89 | wx.navigateTo({ | 89 | wx.navigateTo({ |
@@ -173,14 +173,14 @@ Page({ | @@ -173,14 +173,14 @@ Page({ | ||
173 | * 生命周期函数--监听页面加载 | 173 | * 生命周期函数--监听页面加载 |
174 | */ | 174 | */ |
175 | onLoad: function(options) { | 175 | onLoad: function(options) { |
176 | - console.log(options.familyid) | 176 | + // console.log(options.familyid) |
177 | let that = this; | 177 | let that = this; |
178 | options.flag ? that.setData({ | 178 | options.flag ? that.setData({ |
179 | flag: options.flag | 179 | flag: options.flag |
180 | }) : "" | 180 | }) : "" |
181 | options.familyid ? (that.setData({ | 181 | options.familyid ? (that.setData({ |
182 | familyid: options.familyid | 182 | familyid: options.familyid |
183 | - }) && that.getdata() && wx.setStorageSync('familyid', options.familyid)):"" | 183 | + }) && that.getdata() && wx.setStorageSync('familyid', options.familyid)) : "" |
184 | }, | 184 | }, |
185 | 185 | ||
186 | /** | 186 | /** |
@@ -195,8 +195,10 @@ Page({ | @@ -195,8 +195,10 @@ Page({ | ||
195 | */ | 195 | */ |
196 | onShow: function() { | 196 | onShow: function() { |
197 | let familyid = wx.getStorageSync('familyid'); | 197 | let familyid = wx.getStorageSync('familyid'); |
198 | - console.log(familyid) | ||
199 | - familyid ? this.getdata():console.log(2) | 198 | + familyid ? this.getdata() : console.log(2); |
199 | + this.setData({ | ||
200 | + familyid: familyid | ||
201 | + }) | ||
200 | }, | 202 | }, |
201 | 203 | ||
202 | /** | 204 | /** |
@@ -32,7 +32,6 @@ Page({ | @@ -32,7 +32,6 @@ Page({ | ||
32 | getIndex() { | 32 | getIndex() { |
33 | let url = 'pubilc/index' | 33 | let url = 'pubilc/index' |
34 | app.post(url, null).then((res) => { | 34 | app.post(url, null).then((res) => { |
35 | - console.log(res) | ||
36 | this.setData({ | 35 | this.setData({ |
37 | imgUrls: res.data.data.banner, | 36 | imgUrls: res.data.data.banner, |
38 | modules: res.data.data.modules, | 37 | modules: res.data.data.modules, |
@@ -45,7 +45,6 @@ Page({ | @@ -45,7 +45,6 @@ Page({ | ||
45 | Page: that.data.Page | 45 | Page: that.data.Page |
46 | } | 46 | } |
47 | app.post(url, params).then((res) => { | 47 | app.post(url, params).then((res) => { |
48 | - console.log(res) | ||
49 | if (res.data.code == 200) { | 48 | if (res.data.code == 200) { |
50 | this.setData({ | 49 | this.setData({ |
51 | classify: res.data.data.menu, | 50 | classify: res.data.data.menu, |
@@ -53,7 +52,6 @@ Page({ | @@ -53,7 +52,6 @@ Page({ | ||
53 | }) | 52 | }) |
54 | } | 53 | } |
55 | }).catch((errMsg) => { | 54 | }).catch((errMsg) => { |
56 | - console.log(errMsg) | ||
57 | }) | 55 | }) |
58 | 56 | ||
59 | }, | 57 | }, |
@@ -41,7 +41,8 @@ | @@ -41,7 +41,8 @@ | ||
41 | </view> | 41 | </view> |
42 | </view> | 42 | </view> |
43 | </view> | 43 | </view> |
44 | -<view class='null_box'></view> | 44 | + <view class='go_index' bindtap="goIndex">回到首页</view> |
45 | +<!-- <view class='null_box'></view> | ||
45 | <view class='bottom'> | 46 | <view class='bottom'> |
46 | <view class='bottom_box' style='width:100%' bindtap="goIndex">回到首页</view> | 47 | <view class='bottom_box' style='width:100%' bindtap="goIndex">回到首页</view> |
47 | -</view> | ||
48 | +</view> --> |
@@ -4,6 +4,24 @@ page { | @@ -4,6 +4,24 @@ page { | ||
4 | background: #f5f6fa; | 4 | background: #f5f6fa; |
5 | } | 5 | } |
6 | 6 | ||
7 | +.go_index { | ||
8 | + width: 100rpx; | ||
9 | + height: 100rpx; | ||
10 | + border-radius: 50%; | ||
11 | + position: fixed; | ||
12 | + right: 30rpx; | ||
13 | + bottom: 60rpx; | ||
14 | + background: #0286ff; | ||
15 | + font-size: 30rpx; | ||
16 | + color: #fff; | ||
17 | + display: flex; | ||
18 | + align-items: center; | ||
19 | + justify-content: center; | ||
20 | + text-align: center; | ||
21 | + padding: 20rpx; | ||
22 | + box-sizing: border-box; | ||
23 | +} | ||
24 | + | ||
7 | .searn_box { | 25 | .searn_box { |
8 | background: #fff; | 26 | background: #fff; |
9 | padding: 12rpx 30rpx; | 27 | padding: 12rpx 30rpx; |
@@ -63,9 +81,11 @@ page { | @@ -63,9 +81,11 @@ page { | ||
63 | margin-bottom: 30rpx; | 81 | margin-bottom: 30rpx; |
64 | margin-right: 39rpx; | 82 | margin-right: 39rpx; |
65 | } | 83 | } |
66 | -.classify_item:nth-child(3n){ | 84 | + |
85 | +.classify_item:nth-child(3n) { | ||
67 | margin-right: 0; | 86 | margin-right: 0; |
68 | } | 87 | } |
88 | + | ||
69 | .classify_active { | 89 | .classify_active { |
70 | border: 0; | 90 | border: 0; |
71 | background: #ffac2f; | 91 | background: #ffac2f; |
@@ -155,6 +175,7 @@ page { | @@ -155,6 +175,7 @@ page { | ||
155 | .icon-shu { | 175 | .icon-shu { |
156 | font-size: 30rpx; | 176 | font-size: 30rpx; |
157 | } | 177 | } |
178 | + | ||
158 | .bottom { | 179 | .bottom { |
159 | width: 100%; | 180 | width: 100%; |
160 | height: 120rpx; | 181 | height: 120rpx; |
@@ -46,7 +46,4 @@ | @@ -46,7 +46,4 @@ | ||
46 | </view> | 46 | </view> |
47 | </view> | 47 | </view> |
48 | </view> | 48 | </view> |
49 | -<view class='null_box'></view> | ||
50 | -<view class='bottom'> | ||
51 | - <view class='bottom_box' style='width:100%' bindtap="goIndex">回到首页</view> | ||
52 | -</view> | ||
49 | +<view class='go_index' bindtap="goIndex">回到首页</view> |
@@ -41,7 +41,9 @@ | @@ -41,7 +41,9 @@ | ||
41 | </view> | 41 | </view> |
42 | <view class='item_list' style=' align-items: flex-start;'> | 42 | <view class='item_list' style=' align-items: flex-start;'> |
43 | <view class='list_title'>主险保障项</view> | 43 | <view class='list_title'>主险保障项</view> |
44 | - <view class='list_input' wx:for='{{listdetail.guarantee}}' wx:key wx:for-item='its'>{{its.name}} {{its.num}}{{its.title}} </view> | 44 | + <view> |
45 | + <view class='list_input' wx:for='{{listdetail.guarantee}}' wx:key wx:for-item='its'>{{its.name}} {{its.num}}{{its.title}} </view> | ||
46 | + </view> | ||
45 | </view> | 47 | </view> |
46 | <view class='item_list'> | 48 | <view class='item_list'> |
47 | <view class='list_title'>合同生效日</view> | 49 | <view class='list_title'>合同生效日</view> |
@@ -47,13 +47,11 @@ page { | @@ -47,13 +47,11 @@ page { | ||
47 | } | 47 | } |
48 | 48 | ||
49 | .list_title { | 49 | .list_title { |
50 | - width: 160rpx; | ||
51 | - /* font-size: 24rpx; */ | 50 | + width: 190rpx; |
52 | color: #000; | 51 | color: #000; |
53 | } | 52 | } |
54 | 53 | ||
55 | .list_input { | 54 | .list_input { |
56 | - /* font-size: 24rpx; */ | ||
57 | color: #000; | 55 | color: #000; |
58 | } | 56 | } |
59 | 57 | ||
@@ -73,5 +71,5 @@ page { | @@ -73,5 +71,5 @@ page { | ||
73 | .bottom_box image{ | 71 | .bottom_box image{ |
74 | width: 330rpx; | 72 | width: 330rpx; |
75 | height: 330rpx; | 73 | height: 330rpx; |
76 | - margin-top: 30rpx; | 74 | + margin: 30rpx 0; |
77 | } | 75 | } |
@@ -51,7 +51,6 @@ for (let i = 0; i <= 59; i++) { | @@ -51,7 +51,6 @@ for (let i = 0; i <= 59; i++) { | ||
51 | } | 51 | } |
52 | 52 | ||
53 | Page({ | 53 | Page({ |
54 | - | ||
55 | /** | 54 | /** |
56 | * 页面的初始数据 | 55 | * 页面的初始数据 |
57 | */ | 56 | */ |
@@ -186,7 +185,6 @@ Page({ | @@ -186,7 +185,6 @@ Page({ | ||
186 | }) | 185 | }) |
187 | }, | 186 | }, |
188 | 187 | ||
189 | - | ||
190 | //完成 | 188 | //完成 |
191 | finish(e) { | 189 | finish(e) { |
192 | var family_id = e.currentTarget.dataset.family_id | 190 | var family_id = e.currentTarget.dataset.family_id |
@@ -207,18 +205,10 @@ Page({ | @@ -207,18 +205,10 @@ Page({ | ||
207 | }) | 205 | }) |
208 | this.getData() | 206 | this.getData() |
209 | this.setData({ | 207 | this.setData({ |
210 | - edit_state: false | 208 | + edit_state: true |
211 | }) | 209 | }) |
212 | } | 210 | } |
213 | }) | 211 | }) |
214 | - | ||
215 | - // wx.showToast({ | ||
216 | - // title: '修改成功', | ||
217 | - // icon:'none', | ||
218 | - // }) | ||
219 | - // this.setData({ | ||
220 | - // edit_state: false | ||
221 | - // }) | ||
222 | }, | 212 | }, |
223 | 213 | ||
224 | 214 | ||
@@ -244,6 +234,7 @@ Page({ | @@ -244,6 +234,7 @@ Page({ | ||
244 | UserId: app.globalData.UserId, | 234 | UserId: app.globalData.UserId, |
245 | DefId: that.data.mainid | 235 | DefId: that.data.mainid |
246 | }).then((res) => { | 236 | }).then((res) => { |
237 | + console.log(res) | ||
247 | if (res.data.code == 200) { | 238 | if (res.data.code == 200) { |
248 | var time = res.data.data.warn.warn_time | 239 | var time = res.data.data.warn.warn_time |
249 | var index = parseInt(time) - 1 | 240 | var index = parseInt(time) - 1 |
@@ -275,7 +266,6 @@ Page({ | @@ -275,7 +266,6 @@ Page({ | ||
275 | // 获取天数 | 266 | // 获取天数 |
276 | days = getDays(val[0] + temp_year, val[1] + 1); | 267 | days = getDays(val[0] + temp_year, val[1] + 1); |
277 | var follow_time = this.data.years[val[0]] + '-' + this.data.months[val[1]] + '-' + this.data.days[val[2]] + ' ' + this.data.hours[val[3]] + ':' + this.data.minutes[val[4]] | 268 | var follow_time = this.data.years[val[0]] + '-' + this.data.months[val[1]] + '-' + this.data.days[val[2]] + ' ' + this.data.hours[val[3]] + ':' + this.data.minutes[val[4]] |
278 | - | ||
279 | this.setData({ | 269 | this.setData({ |
280 | days: days, | 270 | days: days, |
281 | year: this.data.years[val[0]], | 271 | year: this.data.years[val[0]], |
@@ -348,10 +338,6 @@ Page({ | @@ -348,10 +338,6 @@ Page({ | ||
348 | value: [nowYear - temp_year, nowMonth - 1, nowDay - 1, nowHour, nowMinute, nowSecond] | 338 | value: [nowYear - temp_year, nowMonth - 1, nowDay - 1, nowHour, nowMinute, nowSecond] |
349 | }) | 339 | }) |
350 | var follow_time = that.data.year + '-' + that.data.month + '-' + that.data.day + ' ' + that.data.hour + ':' + that.data.minute | 340 | var follow_time = that.data.year + '-' + that.data.month + '-' + that.data.day + ' ' + that.data.hour + ':' + that.data.minute |
351 | - | ||
352 | - that.setData({ | ||
353 | - // follow_time: follow_time | ||
354 | - }) | ||
355 | setTimeout(function(){ | 341 | setTimeout(function(){ |
356 | that.setData({ | 342 | that.setData({ |
357 | time_state:true | 343 | time_state:true |
@@ -30,6 +30,15 @@ Page({ | @@ -30,6 +30,15 @@ Page({ | ||
30 | plan_id: '' | 30 | plan_id: '' |
31 | }, | 31 | }, |
32 | 32 | ||
33 | + //保单详情 | ||
34 | + summaryDetail(e) { | ||
35 | + console.log(e) | ||
36 | + var InId = e.currentTarget.dataset.inid | ||
37 | + wx.navigateTo({ | ||
38 | + url: '/pages/index/policyListDetail/policyListDetail?InId=' + InId, | ||
39 | + }) | ||
40 | + }, | ||
41 | + | ||
33 | // 打电话 | 42 | // 打电话 |
34 | makePhoneCall() { | 43 | makePhoneCall() { |
35 | let that = this; | 44 | let that = this; |
@@ -26,7 +26,6 @@ | @@ -26,7 +26,6 @@ | ||
26 | <view class='popup_btn' bindtap='confirmCase'>确认</view> | 26 | <view class='popup_btn' bindtap='confirmCase'>确认</view> |
27 | </view> | 27 | </view> |
28 | 28 | ||
29 | - | ||
30 | <block wx:else> | 29 | <block wx:else> |
31 | <!-- 保单报告 --> | 30 | <!-- 保单报告 --> |
32 | <view class='top_box'> | 31 | <view class='top_box'> |
@@ -48,7 +47,6 @@ | @@ -48,7 +47,6 @@ | ||
48 | </view> | 47 | </view> |
49 | <view> | 48 | <view> |
50 | <view class='name'>{{userinfo.name}} | 49 | <view class='name'>{{userinfo.name}} |
51 | - <!-- <text class='position'>222</text> --> | ||
52 | </view> | 50 | </view> |
53 | <view>电话 {{userinfo.mobile}}</view> | 51 | <view>电话 {{userinfo.mobile}}</view> |
54 | </view> | 52 | </view> |
@@ -196,13 +194,10 @@ | @@ -196,13 +194,10 @@ | ||
196 | <view class='list_title'>{{item.recognizee}}</view> | 194 | <view class='list_title'>{{item.recognizee}}</view> |
197 | </view> | 195 | </view> |
198 | <view class='item_list'> | 196 | <view class='item_list'> |
199 | - <view class='list_title' bindtap='summaryDetail' data-InId='{{items.id}}'>{{item.in_num}}</view> | 197 | + <view class='list_title' bindtap='summaryDetail' data-InId='{{item.id}}'>{{item.in_num}}</view> |
200 | </view> | 198 | </view> |
201 | <view class='item_list'> | 199 | <view class='item_list'> |
202 | <view class='list_title'>{{item.main_risks}}</view> | 200 | <view class='list_title'>{{item.main_risks}}</view> |
203 | - <!-- <view class='list_title' >你好的JFK第三</view> --> | ||
204 | - <!-- style='white-space: normal;' --> | ||
205 | - | ||
206 | </view> | 201 | </view> |
207 | <view class='item_list'> | 202 | <view class='item_list'> |
208 | <view class='list_title' wx:if='{{item.firm}}'>{{item.firm}}</view> | 203 | <view class='list_title' wx:if='{{item.firm}}'>{{item.firm}}</view> |
@@ -225,8 +220,12 @@ | @@ -225,8 +220,12 @@ | ||
225 | 220 | ||
226 | <!-- 底部按钮 --> | 221 | <!-- 底部按钮 --> |
227 | <view class='null_box'></view> | 222 | <view class='null_box'></view> |
228 | - <view class='bottom_box'> | ||
229 | - <button class='plan_btn' data-status='{{status}}' bindtap="{{save_state?'saveInfo':''}}">保存</button> | ||
230 | - <button class="plan_btn2 {{shareState?'plan_active':''}}" open-type="{{shareState?'share':''}}" data-status='{{status}}'>发送给客户</button> | ||
231 | - </view> | 223 | + <cover-view class='bottom_box'> |
224 | + <cover-view class='plan_btn'> | ||
225 | + <button class='plan_btn' style='border:0;' data-status='{{status}}' bindtap="{{save_state?'saveInfo':''}}">保存</button> | ||
226 | + </cover-view> | ||
227 | + <cover-view class="plan_btn2 {{shareState?'plan_active':''}}"> | ||
228 | + <button class="plan_btn2 {{shareState?'plan_active':''}}" style='border:0;' open-type="{{shareState?'share':''}}" data-status='{{status}}'>发送给客户</button> | ||
229 | + </cover-view> | ||
230 | + </cover-view> | ||
232 | </block> | 231 | </block> |
@@ -37,13 +37,14 @@ | @@ -37,13 +37,14 @@ | ||
37 | "list": [] | 37 | "list": [] |
38 | }, | 38 | }, |
39 | "miniprogram": { | 39 | "miniprogram": { |
40 | - "current": 4, | 40 | + "current": 0, |
41 | "list": [ | 41 | "list": [ |
42 | { | 42 | { |
43 | - "id": -1, | 43 | + "id": 0, |
44 | "name": "保单添加", | 44 | "name": "保单添加", |
45 | "pathName": "pages/index/addListDetail/addListDetail", | 45 | "pathName": "pages/index/addListDetail/addListDetail", |
46 | - "query": "" | 46 | + "query": "", |
47 | + "scene": null | ||
47 | }, | 48 | }, |
48 | { | 49 | { |
49 | "id": -1, | 50 | "id": -1, |
-
请 注册 或 登录 后发表评论