正在显示
2 个修改的文件
包含
18 行增加
和
9 行删除
| @@ -9,7 +9,7 @@ Page({ | @@ -9,7 +9,7 @@ Page({ | ||
| 9 | Authorization: null, | 9 | Authorization: null, |
| 10 | data: { | 10 | data: { |
| 11 | // tab切换 | 11 | // tab切换 |
| 12 | - isshow : false, | 12 | + // isshow : false, |
| 13 | currentTab: 0, | 13 | currentTab: 0, |
| 14 | taxDatas: [], | 14 | taxDatas: [], |
| 15 | salaryDatas: {}, | 15 | salaryDatas: {}, |
| @@ -110,6 +110,7 @@ Page({ | @@ -110,6 +110,7 @@ Page({ | ||
| 110 | item.payroll_date = format.formatTime_date(item.payroll_date) | 110 | item.payroll_date = format.formatTime_date(item.payroll_date) |
| 111 | item.count_date = format.formatDate_min(item.start_time) + '-' + format.formatDate_min(item.end_time) | 111 | item.count_date = format.formatDate_min(item.start_time) + '-' + format.formatDate_min(item.end_time) |
| 112 | item.detals = this.handleDetailsData(item) | 112 | item.detals = this.handleDetailsData(item) |
| 113 | + item.isshow = false | ||
| 113 | } | 114 | } |
| 114 | return items; | 115 | return items; |
| 115 | }, | 116 | }, |
| @@ -155,9 +156,14 @@ Page({ | @@ -155,9 +156,14 @@ Page({ | ||
| 155 | 156 | ||
| 156 | gospan:function(e){ | 157 | gospan:function(e){ |
| 157 | console.log(e) | 158 | console.log(e) |
| 159 | + var item = this.data.salaryDatas[e.currentTarget.id] | ||
| 160 | + item.isshow = !item.isshow | ||
| 158 | this.setData({ | 161 | this.setData({ |
| 159 | - isshow: !this.data.isshow | 162 | + salaryDatas: this.data.salaryDatas |
| 160 | }) | 163 | }) |
| 164 | + // this.setData({ | ||
| 165 | + // isshow: !this.data.isshow | ||
| 166 | + // }) | ||
| 161 | // console.log('idddddd',e.currentTarget.id) | 167 | // console.log('idddddd',e.currentTarget.id) |
| 162 | // if (!e.currentTarget.id) return | 168 | // if (!e.currentTarget.id) return |
| 163 | // var that = this | 169 | // var that = this |
| @@ -187,11 +193,14 @@ Page({ | @@ -187,11 +193,14 @@ Page({ | ||
| 187 | var detail = JSON.parse(data['detail']) | 193 | var detail = JSON.parse(data['detail']) |
| 188 | var details = [] | 194 | var details = [] |
| 189 | for (var i = 0; i < titles.length; ++i) { | 195 | for (var i = 0; i < titles.length; ++i) { |
| 190 | - var titleData = titles[i] | ||
| 191 | - var value = detail[titleData['key']] | ||
| 192 | - | 196 | + var titleData = titles[i] |
| 197 | + var value = detail[titleData['key']] | ||
| 198 | + var title = titleData['title'] | ||
| 199 | + if (!title){ | ||
| 200 | + title = titleData['original_column'] | ||
| 201 | + } | ||
| 193 | details.push({ | 202 | details.push({ |
| 194 | - title: titleData['title'], | 203 | + title: title, |
| 195 | value: value | 204 | value: value |
| 196 | }) | 205 | }) |
| 197 | } | 206 | } |
| @@ -47,16 +47,16 @@ | @@ -47,16 +47,16 @@ | ||
| 47 | <text class='text_999_28'>应发金额:<text class='text_333_28'>{{item.pay_salary}}</text></text> | 47 | <text class='text_999_28'>应发金额:<text class='text_333_28'>{{item.pay_salary}}</text></text> |
| 48 | <text class='text_999_28'>实发:<text class='text_333_28 text_color_28'>¥{{item.salary}}</text></text> | 48 | <text class='text_999_28'>实发:<text class='text_333_28 text_color_28'>¥{{item.salary}}</text></text> |
| 49 | <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view> | 49 | <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view> |
| 50 | - <view wx:if="{{!isshow}}" bindtap='gospan' id='{{item.id}}'> | 50 | + <view wx:if="{{!item.isshow}}" bindtap='gospan' id='{{index}}'> |
| 51 | <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>展开</text> | 51 | <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>展开</text> |
| 52 | <image class='head_image_wrap_down' src='/images/arrow_blue_down.png'></image> | 52 | <image class='head_image_wrap_down' src='/images/arrow_blue_down.png'></image> |
| 53 | </view> | 53 | </view> |
| 54 | - <view wx:if="{{isshow}}" bindtap='gospan'> | 54 | + <view wx:if="{{item.isshow}}" bindtap='gospan' id='{{index}}'> |
| 55 | <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>收起</text> | 55 | <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>收起</text> |
| 56 | <image class='head_image_wrap_up' src='/images/arrow_blue_up.png'></image> | 56 | <image class='head_image_wrap_up' src='/images/arrow_blue_up.png'></image> |
| 57 | <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view> | 57 | <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view> |
| 58 | </view> | 58 | </view> |
| 59 | - <view wx:if="{{isshow}}" wx:for="{{item.detals}}" wx:for-item='detal'> | 59 | + <view wx:if="{{item.isshow}}" wx:for="{{item.detals}}" wx:for-item='detal'> |
| 60 | <view> | 60 | <view> |
| 61 | <text class='text_999_28'>{{detal.title}}</text> | 61 | <text class='text_999_28'>{{detal.title}}</text> |
| 62 | <text class='text_999_28' style='color:#333;text-align:right;float: right'>{{detal.value}}</text> | 62 | <text class='text_999_28' style='color:#333;text-align:right;float: right'>{{detal.value}}</text> |
请
注册
或
登录
后发表评论