...
|
...
|
@@ -11,7 +11,7 @@ Page({ |
11
|
11
|
cur_status: "",
|
12
|
12
|
legal_entity_id: "",
|
13
|
13
|
legal_entity: "",
|
14
|
|
- house_type:"",
|
|
14
|
+ house_type: "",
|
15
|
15
|
declareStatus: {
|
16
|
16
|
"to_declare": "待申报",
|
17
|
17
|
"declaring": "申报中",
|
...
|
...
|
@@ -49,6 +49,24 @@ Page({ |
49
|
49
|
"month": "月",
|
50
|
50
|
"year": "年"
|
51
|
51
|
},
|
|
52
|
+ issinglechildData: {
|
|
53
|
+ label: '是否独生子女',
|
|
54
|
+ bindtype: 'issingle_child',
|
|
55
|
+ selected: '',
|
|
56
|
+ isblack: '',
|
|
57
|
+ placeholder: '请选择是否独生子女',
|
|
58
|
+ values: ["是", "否"],
|
|
59
|
+ onChange: 'onPickerSelect'
|
|
60
|
+ },
|
|
61
|
+ shareMethodData: {
|
|
62
|
+ label: '分摊方式',
|
|
63
|
+ bindtype: 'share_method',
|
|
64
|
+ selected: '',
|
|
65
|
+ isblack: '',
|
|
66
|
+ values: ["赡养人平均分摊", "赡养人约定分摊", "被赡养人指定分摊"],
|
|
67
|
+ placeholder: '请选择分摊方式',
|
|
68
|
+ onChange: 'onPickerSelect'
|
|
69
|
+ },
|
52
|
70
|
additionInfo: [],
|
53
|
71
|
reducetypeData: ["月度", "年度"],
|
54
|
72
|
modalData: {},
|
...
|
...
|
@@ -70,6 +88,7 @@ Page({ |
70
|
88
|
lefttext: "添加家庭成员并申报",
|
71
|
89
|
righttext: "确定为该选择的人申报",
|
72
|
90
|
},
|
|
91
|
+ reduce_amount:0,
|
73
|
92
|
selected_reduceindex: 0,
|
74
|
93
|
selected_addindex: 0
|
75
|
94
|
},
|
...
|
...
|
@@ -81,7 +100,7 @@ Page({ |
81
|
100
|
var that = this
|
82
|
101
|
var housetype, housestatus
|
83
|
102
|
console.log("options", options);
|
84
|
|
- if (options.status == 'house_fund_rent') {
|
|
103
|
+ if (options.status == 'house_fund_rent') {
|
85
|
104
|
housetype = 'house_fund_rent'
|
86
|
105
|
housestatus = 'house_fund'
|
87
|
106
|
} else if (options.status == 'house_fund_loan') {
|
...
|
...
|
@@ -96,12 +115,12 @@ Page({ |
96
|
115
|
house_type: housetype,
|
97
|
116
|
legal_entity_id: options.legal_entity_id,
|
98
|
117
|
legal_entity: options.legal_entity,
|
99
|
|
- selected_reduceindex: options.status =='medical_fund'?1:0
|
|
118
|
+ selected_reduceindex: options.status == 'medical_fund' ? 1 : 0
|
100
|
119
|
})
|
101
|
120
|
wx.setNavigationBarTitle({
|
102
|
121
|
"title": that.data.additiontitle[this.data.cur_status],
|
103
|
122
|
})
|
104
|
|
-
|
|
123
|
+
|
105
|
124
|
},
|
106
|
125
|
|
107
|
126
|
/**
|
...
|
...
|
@@ -153,15 +172,15 @@ Page({ |
153
|
172
|
if (newdata[i].patient_birthday && newdata[i].patient_birthday > 0) {
|
154
|
173
|
newdata[i].patient_birthday = format.formatTime_date(newdata[i].patient_birthday)
|
155
|
174
|
}
|
156
|
|
- if (newdata[i].house_address){
|
157
|
|
- if (newdata[i].house_address.province == newdata[i].house_address.city){
|
158
|
|
- newdata[i].house_address_new = newdata[i].house_address.city + newdata[i].house_address.district
|
159
|
|
- }else{
|
160
|
|
- newdata[i].house_address_new = newdata[i].house_address.province + newdata[i].house_address.city + newdata[i].house_address.district
|
|
175
|
+ if (newdata[i].house_address) {
|
|
176
|
+ if (newdata[i].house_address.province == newdata[i].house_address.city) {
|
|
177
|
+ newdata[i].house_address_new = newdata[i].house_address.city + newdata[i].house_address.district
|
|
178
|
+ } else {
|
|
179
|
+ newdata[i].house_address_new = newdata[i].house_address.province + newdata[i].house_address.city + newdata[i].house_address.district
|
161
|
180
|
}
|
162
|
181
|
}
|
163
|
|
- if (newdata[i].co_supporters && newdata[i].co_supporters.length>0){
|
164
|
|
- for (var j = 0; j < newdata[i].co_supporters.length;j++){
|
|
182
|
+ if (newdata[i].co_supporters && newdata[i].co_supporters.length > 0) {
|
|
183
|
+ for (var j = 0; j < newdata[i].co_supporters.length; j++) {
|
165
|
184
|
if (newdata[i].co_supporters[j].birthday && newdata[i].birthday > 0) {
|
166
|
185
|
newdata[i].co_supporters[j].birthday = format.formatTime_date(newdata[i].co_supporters[j].birthday)
|
167
|
186
|
}
|
...
|
...
|
@@ -169,9 +188,9 @@ Page({ |
169
|
188
|
}
|
170
|
189
|
}
|
171
|
190
|
|
172
|
|
- var housetype_new = this.data.house_type
|
173
|
|
- if (newdata.length > 0 && newdata[0].type){
|
174
|
|
- housetype_new = newdata[0].type == 'loan' ? "house_fund_loan" :"house_fund_rent"
|
|
191
|
+ var housetype_new = this.data.house_type
|
|
192
|
+ if (newdata.length > 0 && newdata[0].type) {
|
|
193
|
+ housetype_new = newdata[0].type == 'loan' ? "house_fund_loan" : "house_fund_rent"
|
175
|
194
|
}
|
176
|
195
|
console.log("housetype_new", housetype_new)
|
177
|
196
|
this.setData({
|
...
|
...
|
@@ -245,6 +264,26 @@ Page({ |
245
|
264
|
goadd: function(e) { //添加
|
246
|
265
|
console.log("goadd", e)
|
247
|
266
|
var that = this
|
|
267
|
+ if (this.data.cur_status == 'support_duty'){
|
|
268
|
+ if (this.data.issinglechildData.selected.length < 1) {
|
|
269
|
+ this.showToast("请选择是否独生子女")
|
|
270
|
+ return
|
|
271
|
+ }
|
|
272
|
+ if (this.data.issinglechildData.selected == "否") {
|
|
273
|
+ if (this.data.shareMethodData.selected.length < 1) {
|
|
274
|
+ this.showToast("请选择分摊方式")
|
|
275
|
+ return
|
|
276
|
+ }
|
|
277
|
+ if (this.data.reduce_amount < 1 || this.data.reduce_amount > 1000) {
|
|
278
|
+ this.showToast("请输入合理金额")
|
|
279
|
+ return
|
|
280
|
+ }
|
|
281
|
+ } else {
|
|
282
|
+ this.setData({
|
|
283
|
+ reduce_amount: 2000
|
|
284
|
+ })
|
|
285
|
+ }
|
|
286
|
+ }
|
248
|
287
|
var modalinfo, senddata
|
249
|
288
|
if (this.data.cur_status == 'continuing_education' || this.data.cur_status == 'house_fund') {
|
250
|
289
|
|
...
|
...
|
@@ -384,7 +423,7 @@ Page({ |
384
|
423
|
showModal_addtype: false
|
385
|
424
|
})
|
386
|
425
|
var senddata = ""
|
387
|
|
- if (this.data.cur_status == 'support_duty' ){
|
|
426
|
+ if (this.data.cur_status == 'support_duty') {
|
388
|
427
|
// senddata = JSON.stringify(this.data.additionInfo[0]);
|
389
|
428
|
}
|
390
|
429
|
wx.navigateTo({
|
...
|
...
|
@@ -419,11 +458,47 @@ Page({ |
419
|
458
|
}
|
420
|
459
|
},
|
421
|
460
|
|
|
461
|
+ onPickerSelect: function(e) {
|
|
462
|
+ console.log('picker发送选择改变,携带值为', e)
|
|
463
|
+ switch (e.currentTarget.id) {
|
|
464
|
+ case 'issingle_child':
|
|
465
|
+ var issinglechildData = this.data.issinglechildData
|
|
466
|
+ issinglechildData.selected = issinglechildData.values[e.detail.value]
|
|
467
|
+ this.setData({
|
|
468
|
+ issinglechildData: issinglechildData
|
|
469
|
+ })
|
|
470
|
+ break;
|
|
471
|
+ case 'share_method':
|
|
472
|
+ var share_methodData = this.data.shareMethodData
|
|
473
|
+ share_methodData.selected = share_methodData.values[e.detail.value]
|
|
474
|
+ this.setData({
|
|
475
|
+ shareMethodData: share_methodData
|
|
476
|
+ })
|
|
477
|
+ break;
|
|
478
|
+ }
|
|
479
|
+ },
|
|
480
|
+
|
|
481
|
+ bindinput:function(e){
|
|
482
|
+ console.log("bindinput",e)
|
|
483
|
+ this.setData({
|
|
484
|
+ reduce_amount: parseFloat(e.detail.value)
|
|
485
|
+ })
|
|
486
|
+ },
|
|
487
|
+
|
|
488
|
+ showToast: function (data) {
|
|
489
|
+ if (data && data.length > 0) {
|
|
490
|
+ wx.showToast({
|
|
491
|
+ title: data,
|
|
492
|
+ icon: "none"
|
|
493
|
+ })
|
|
494
|
+ }
|
|
495
|
+ },
|
|
496
|
+
|
422
|
497
|
/**
|
423
|
498
|
* Lifecycle function--Called when page hide
|
424
|
499
|
*/
|
425
|
500
|
onHide: function() {
|
426
|
|
-
|
|
501
|
+
|
427
|
502
|
},
|
428
|
503
|
|
429
|
504
|
/**
|
...
|
...
|
|