提交 13659c53790df359a6e2a590af7be342d02b2070

作者 wangyu
1 个父辈 3b39c573

优化专项附加详情

1 1 // pages/main/addtionalreduce/additiondetail/additiondetail.js
  2 +var format = require('../../../../utils/util.js');
2 3 Page({
3 4
4 5 /**
... ... @@ -13,6 +14,10 @@ Page({
13 14 "medical_fund": "大病医疗",
14 15 "house_fund": "住房"
15 16 },
  17 + reducetype: {
  18 + "month": "月",
  19 + "year": "年"
  20 + },
16 21 datas:{}
17 22 },
18 23
... ... @@ -22,15 +27,51 @@ Page({
22 27 onLoad: function (options) {
23 28 var that = this
24 29 console.log("options", options);
  30 + this.handleData(options.datas)
25 31 this.setData({
26   - cur_status: options.status,
27   - datas: JSON.parse(options.datas)
  32 + cur_status: options.status
28 33 })
29 34 wx.setNavigationBarTitle({
30 35 title: that.data.additiontitle[options.status],
31 36 })
32 37 },
33 38
  39 + handleData: function (data){
  40 + var newData = JSON.parse(data);
  41 +
  42 + if (newData && newData.length>0){
  43 + if (newdata.children_birthday && newdata.children_birthday > 0) {
  44 + newdata.children_birthday_new = format.formatTime_date(newdata.children_birthday)
  45 + }
  46 + if (newdata.spouse_birthday && newdata.spouse_birthday > 0) {
  47 + newdata.spouse_birthday_new = format.formatTime_date(newdata.spouse_birthday)
  48 + }
  49 + if (newdata.education_start && newdata.education_start > 0) {
  50 + newdata.education_start_new = format.formatTime_date(newdata.education_start)
  51 + }
  52 + if (newdata.education_end && newdata.education_end > 0) {
  53 + newdata.education_end_new = format.formatTime_date(newdata.education_end)
  54 + }
  55 +
  56 + if (newdata.birthday && newdata.birthday > 0) {
  57 + newdata.birthday_new = format.formatTime_date(newdata.birthday)
  58 + }
  59 + if (newdata.birthday && newdata.birthday > 0) {
  60 + newdata.birthday_new = format.formatTime_date(newdata.birthday)
  61 + }
  62 + if (newdata.rent_start && newdata.rent_start > 0) {
  63 + newdata.rent_start_new = format.formatTime_date(newdata.rent_start)
  64 + }
  65 + if (newdata.rent_end && newdata.rent_end > 0) {
  66 + newdata.rent_end_new = format.formatTime_date(newdata.rent_end)
  67 + }
  68 + }
  69 + this.setData({
  70 + datas: newData
  71 + })
  72 + console.log("handleData", this.data.datas)
  73 + },
  74 +
34 75 /**
35 76 * Lifecycle function--Called when page is initially rendered
36 77 */
... ...
... ... @@ -6,7 +6,7 @@
6 6 <view style='height:90rpx;width:100%'>
7 7 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
8 8 <text class='text_left'>子女身份证件类型:</text>
9   - <text class='text_right_333'>{{datas.children_id_card_type}}</text>
  9 + <text class='text_right_333'>{{datas.children_id_card_type=='1'?"身份证":datas.children_id_card_type}}</text>
10 10 </view>
11 11 <view style='height:90rpx;width:100%'>
12 12 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
... ... @@ -21,12 +21,12 @@
21 21 <view style='height:90rpx;width:100%'>
22 22 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
23 23 <text class='text_left'>出生日期</text>
24   - <text class='text_right_333'>{{datas.children_birthday}}</text>
  24 + <text class='text_right_333'>{{datas.children_birthday_new}}</text>
25 25 </view>
26 26 <view style='height:90rpx;width:100%'>
27 27 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
28 28 <text class='text_left'>国籍</text>
29   - <text class='text_right_333'>中国</text>
  29 + <text class='text_right_333'>{{datas.nation}}</text>
30 30 </view>
31 31 <view style='width:100%;height:20rpx;background:#f9f9f9'></view>
32 32 <view style='height:90rpx;width:100%'>
... ... @@ -37,30 +37,30 @@
37 37 <view style='height:90rpx;width:100%'>
38 38 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
39 39 <text class='text_left'>子女学籍号</text>
40   - <text class='text_right_333'>902482958937583</text>
  40 + <text class='text_right_333'>{{datas.student_no}}</text>
41 41 </view>
42 42 <view style='height:90rpx;width:100%'>
43 43 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
44 44 <text class='text_left'>子女受教育阶段</text>
45   - <text class='text_right_333'>{{datas.education_period}}</text>
  45 + <text class='text_right_333'>{{datas.education_period_new}}</text>
46 46 </view>
47 47 <view style='height:90rpx;width:100%'>
48 48 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
49 49 <text class='text_left'>受教育日期起</text>
50   - <text class='text_right_333'>2016-09</text>
  50 + <text class='text_right_333'>{{datas.education_start_new}}</text>
51 51 </view>
52 52 <view style='height:90rpx;width:100%'>
53 53 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
54 54 <text class='text_left'>受教育日期止</text>
55   - <text class='text_right_333'>2022-06</text>
  55 + <text class='text_right_333'>{{datas.education_end_new}}</text>
56 56 </view>
57 57 <view style='height:90rpx;width:100%'>
58 58 <text class='text_left'>扣除方式</text>
59   - <text class='text_right_333'>度</text>
  59 + <text class='text_right_333'>{{reducetype[datas.deduction_type]}}度</text>
60 60 </view>
61 61 <view style='height:90rpx;width:100%'>
62 62 <text class='text_left'>扣除金额</text>
63   - <text class='text_right_orange'>¥{{datas.deduction_amount}}/</text>
  63 + <text class='text_right_orange'>¥{{datas.deduction_amount}}/reducetype[datas.deduction_type]</text>
64 64 </view>
65 65 <view style='width:100%;height:20rpx;background:#f9f9f9'></view>
66 66 <view style='height:90rpx;width:100%'>
... ... @@ -69,7 +69,7 @@
69 69 </view>
70 70 <view style='height:90rpx;width:100%'>
71 71 <text class='text_left'>配偶证件类型</text>
72   - <text class='text_right_333'>{{datas.spouse_id_card_type}}</text>
  72 + <text class='text_right_333'>{{datas.spouse_id_card_type=='1'?"身份证":datas.spouse_id_card_type}}</text>
73 73 </view>
74 74 <view style='height:90rpx;width:100%'>
75 75 <text class='text_left'>配偶身份证件号码</text>
... ... @@ -77,11 +77,11 @@
77 77 </view>
78 78 <view style='height:90rpx;width:100%'>
79 79 <text class='text_left'>出生日期</text>
80   - <text class='text_right_333'>{{datas.spouse_birthday}}</text>
  80 + <text class='text_right_333'>{{datas.spouse_birthday_new}}</text>
81 81 </view>
82 82 <view style='height:90rpx;width:100%'>
83 83 <text class='text_left'>国籍</text>
84   - <text class='text_right_333'>中国</text>
  84 + <text class='text_right_333'>{{datas.nation}}</text>
85 85 </view>
86 86 </view>
87 87
... ... @@ -90,50 +90,50 @@
90 90 <view style='height:90rpx;width:100%'>
91 91 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
92 92 <text class='text_left'>赡养类型:</text>
93   - <text class='text_right_333'>独立赡养</text>
  93 + <text class='text_right_333'>{{datas.support_type}}</text>
94 94 </view>
95 95 <view style='height:90rpx;width:100%'>
96 96 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
97 97 <text class='text_left'>被赡养人姓名:</text>
98   - <text class='text_right_333'>实发</text>
  98 + <text class='text_right_333'>{{datas.supported_name}}</text>
99 99 </view>
100 100 <view style='height:90rpx;width:100%'>
101 101 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
102 102 <text class='text_left'>被赡养人证件类型:</text>
103   - <text class='text_right_333'>身份证</text>
  103 + <text class='text_right_333'>{{datas.id_card_type=='1'?"身份证":datas.id_card_type}}</text>
104 104 </view>
105 105 <view style='height:90rpx;width:100%'>
106 106 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
107 107 <text class='text_left'>被赡养人证件号码:</text>
108   - <text class='text_right_333'>92497239127583265721</text>
  108 + <text class='text_right_333'>{{datas.supported_name}}</text>
109 109 </view>
110 110 <view style='height:90rpx;width:100%'>
111 111 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
112 112 <text class='text_left'>被赡养人出生日期:</text>
113   - <text class='text_right_333'>2010-09-09</text>
  113 + <text class='text_right_333'>{{datas.birthday_new}}</text>
114 114 </view>
115 115 <view style='height:90rpx;width:100%'>
116 116 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
117 117 <text class='text_left'>被赡养人国籍:</text>
118   - <text class='text_right_333'>中国</text>
  118 + <text class='text_right_333'>{{datas.nation}}</text>
119 119 </view>
120 120 <view style='height:90rpx;width:100%'>
121 121 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
122 122 <text class='text_left'>与纳税人关系:</text>
123   - <text class='text_right_333'>配偶</text>
  123 + <text class='text_right_333'>{{datas.relationship}}</text>
124 124 </view>
125 125 <view style='height:90rpx;width:100%'>
126 126 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
127 127 <text class='text_left'>分摊比例:</text>
128   - <text class='text_right_333'>100%</text>
  128 + <text class='text_right_333'>{{datas.percent}}%</text>
129 129 </view>
130 130 <view style='height:90rpx;width:100%'>
131 131 <text class='text_left'>扣除方式</text>
132   - <text class='text_right_333'>度</text>
  132 + <text class='text_right_333'>{{reducetype[datas.deduction_type]}}度</text>
133 133 </view>
134 134 <view style='height:90rpx;width:100%'>
135 135 <text class='text_left'>扣除金额</text>
136   - <text class='text_right_orange'>¥1200/月</text>
  136 + <text class='text_right_orange'>¥{{datas.deduction_amount}}/reducetype[datas.deduction_type]</text>
137 137 </view>
138 138 </view>
139 139
... ... @@ -142,20 +142,20 @@
142 142 <view style='height:90rpx;width:100%'>
143 143 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
144 144 <text class='text_left'>租赁房屋坐落地址:</text>
145   - <text class='text_right_333'>北京市 市辖区 朝阳区</text>
  145 + <text class='text_right_333'>{{datas.house_address}}</text>
146 146 </view>
147 147 <view style='height:90rpx'>
148   - <text class='text_right_333'>瑞创国际1101大厦</text>
  148 + <text class='text_right_333'>{{datas.house_detail_address}}</text>
149 149 </view>
150 150 <view style='height:90rpx;width:100%'>
151 151 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
152 152 <text class='text_left'>出租方类型:</text>
153   - <text class='text_right_333'>个人</text>
  153 + <text class='text_right_333'>{{datas.owner_type}}</text>
154 154 </view>
155 155 <view style='height:90rpx;width:100%'>
156 156 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
157 157 <text class='text_left'>出租方名称:</text>
158   - <text class='text_right_333'>自如</text>
  158 + <text class='text_right_333'>{{datas.owner_name}}</text>
159 159 </view>
160 160 <view style='height:90rpx;width:100%'>
161 161 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
... ... @@ -163,62 +163,62 @@
163 163 <text style='font-size: 15px;color: #777777;line-height:90rpx;'>出租方纳税人识别号:</text>
164 164 <!-- <text style='line-height:24rpx;font-size:24rpx;color:#AEAEAE;'>统一社会信用代码</text> -->
165 165 </view>
166   - <text class='text_right_333'>89712839990102</text>
  166 + <text class='text_right_333'>{{datas.owner_credit_no}}</text>
167 167 </view>
168 168 <view style='height:90rpx;width:100%'>
169 169 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
170 170 <text class='text_left'>证书类型:</text>
171   - <text class='text_right_333'>产权证号</text>
  171 + <text class='text_right_333'>{{datas.certification_type}}</text>
172 172 </view>
173 173 <view style='height:90rpx;width:100%'>
174 174 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
175 175 <text class='text_left'>证书号码:</text>
176   - <text class='text_right_333'>902482958937583427252376</text>
  176 + <text class='text_right_333'>{{datas.certification_no}}</text>
177 177 </view>
178 178 <view style='width:100%;height:20rpx;background:#f9f9f9'></view>
179 179 <view style='height:90rpx;width:100%'>
180 180 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
181 181 <text class='text_left'>租赁合同编号</text>
182   - <text class='text_right_333'>yu9348935743757385</text>
  182 + <text class='text_right_333'>{{datas.rent_contract_no}}</text>
183 183 </view>
184 184 <view style='height:90rpx;width:100%'>
185 185 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
186 186 <text class='text_left'>租赁期起</text>
187   - <text class='text_right_333'>902482958937583427252376</text>
  187 + <text class='text_right_333'>{{datas.rent_start_new}}</text>
188 188 </view>
189 189 <view style='height:90rpx;width:100%'>
190 190 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left;margin-right:10rpx'>*</text>
191 191 <text class='text_left'>租赁期止</text>
192   - <text class='text_right_333'>yu9348935743757385</text>
  192 + <text class='text_right_333'>{{datas.rent_end_new}}</text>
193 193 </view>
194 194 <view style='height:90rpx;width:100%'>
195 195 <text class='text_left'>扣除方式</text>
196   - <text class='text_right_333'>度</text>
  196 + <text class='text_right_333'>{{reducetype[datas.deduction_type]}}度</text>
197 197 </view>
198 198 <view style='height:90rpx;width:100%'>
199 199 <text class='text_left'>扣除金额</text>
200   - <text class='text_right_orange'>¥1200/月</text>
  200 + <text class='text_right_orange'>¥{{datas.deduction_amount}}/reducetype[datas.deduction_type]</text>
201 201 </view>
202 202 <view style='width:100%;height:20rpx;background:#f9f9f9'></view>
203 203 <view style='height:90rpx;width:100%'>
204 204 <text class='text_left'>配偶姓名</text>
205   - <text class='text_right_333'>西施</text>
  205 + <text class='text_right_333'>{{datas.spouse_name}}</text>
206 206 </view>
207 207 <view style='height:90rpx;width:100%'>
208 208 <text class='text_left'>配偶证件类型</text>
209   - <text class='text_right_333'>结婚证</text>
  209 + <text class='text_right_333'>{{datas.spouse_id_card_type=='1'?"身份证":datas.spouse_id_card_type}}</text>
210 210 </view>
211 211 <view style='height:90rpx;width:100%'>
212 212 <text class='text_left'>配偶身份证件号码</text>
213   - <text class='text_right_333'>1101101010110</text>
  213 + <text class='text_right_333'>{{datas.spouse_id_card_no}}</text>
214 214 </view>
215 215 <view style='height:90rpx;width:100%'>
216 216 <text class='text_left'>出生日期</text>
217   - <text class='text_right_333'>2000年10月1日</text>
  217 + <text class='text_right_333'>{{datas.birthday_new}}</text>
218 218 </view>
219 219 <view style='height:90rpx;width:100%'>
220 220 <text class='text_left'>国籍</text>
221   - <text class='text_right_333'>中国</text>
  221 + <text class='text_right_333'>{{datas.nation}}</text>
222 222 </view>
223 223 </view>
224 224
... ...
... ... @@ -117,14 +117,27 @@ Page({
117 117 success: function(res) {
118 118 if (res && res.data) {
119 119 console.log("res", res)
120   - that.setData({
121   - additionInfo: res.data.items
122   - })
  120 + that.handleAddition(res.data)
123 121 }
124 122 }
125 123 })
126 124 },
127 125
  126 + handleAddition: function(data) {
  127 + var newdata = data.items
  128 + for (var i = 0; i < newdata.length; i++) {
  129 + if (newdata[i].education_start && newdata[i].education_start > 0) {
  130 + newdata[i].education_start = format.formatTime_date(newdata[i].education_start)
  131 + }
  132 + if (newdata[i].education_end && newdata[i].education_end > 0) {
  133 + newdata[i].education_end = format.formatTime_date(newdata[i].education_end)
  134 + }
  135 + }
  136 + this.setData({
  137 + additionInfo: newdata
  138 + })
  139 + },
  140 +
128 141 goaddSupporter: function() {
129 142 wx.navigateTo({
130 143 url: '../adddupporters/adddupporters?id=' + this.data.additionInfo[0].id,
... ... @@ -142,7 +155,6 @@ Page({
142 155 // title: '暂无可查看资料',
143 156 // })
144 157 // }
145   -
146 158 // },
147 159
148 160 showdetail: function(e) {
... ... @@ -168,7 +180,7 @@ Page({
168 180 'content-type': 'application/json',
169 181 "Authorization": Authorization
170 182 },
171   - method:"POST",
  183 + method: "POST",
172 184 success: function(res) {
173 185 if (res && res.data) {
174 186 console.log("res", res)
... ... @@ -182,7 +194,7 @@ Page({
182 194 console.log("goedit", e)
183 195 if (this.data.additionInfo && this.data.additionInfo.length > 0) {
184 196 wx.navigateTo({
185   - url: '../addextrainfo/addextrainfo?datas=' + '' + '&status=' + this.data.cur_status + '&reducetype=' + this.data.reducetypeData[this.data.selected_reduceindex] + '&isedit=true' ,
  197 + url: '../addextrainfo/addextrainfo?datas=' + '' + '&status=' + this.data.cur_status + '&reducetype=' + this.data.reducetypeData[this.data.selected_reduceindex] + '&isedit=true',
186 198 })
187 199 }
188 200 },
... ... @@ -237,7 +249,7 @@ Page({
237 249 },
238 250 success: function(res) {
239 251 console.log('succ', res)
240   - if (res.statusCode < 300) {
  252 + if (res.statusCode == 200) {
241 253 that.handleData(res.data);
242 254 }
243 255 },
... ...
... ... @@ -33,7 +33,7 @@
33 33 </view>
34 34 <view style='height:70rpx'>
35 35 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
36   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
  36 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
37 37 </view>
38 38 <view style='height:70rpx'>
39 39 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ... @@ -83,7 +83,7 @@
83 83 </view>
84 84 <view style='height:70rpx'>
85 85 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
86   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
  86 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
87 87 </view>
88 88 <view style='height:70rpx'>
89 89 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ... @@ -118,7 +118,7 @@
118 118 </view>
119 119 <view style='height:70rpx'>
120 120 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
121   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
  121 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
122 122 </view>
123 123 <view style='height:70rpx'>
124 124 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ... @@ -155,7 +155,7 @@
155 155 </view>
156 156 <view style='height:70rpx'>
157 157 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
158   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
  158 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
159 159 </view>
160 160 <view style='height:70rpx'>
161 161 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ... @@ -258,7 +258,7 @@
258 258 </view>
259 259 <view style='height:70rpx'>
260 260 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
261   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
  261 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
262 262 </view>
263 263 <view style='height:70rpx'>
264 264 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ...
注册登录 后发表评论