|
@@ -112,8 +112,10 @@ Page({ |
|
@@ -112,8 +112,10 @@ Page({ |
112
|
handleSalaryData: function (items) {
|
112
|
handleSalaryData: function (items) {
|
113
|
for (var i = 0; i < items.length; ++i) {
|
113
|
for (var i = 0; i < items.length; ++i) {
|
114
|
var item = items[i]
|
114
|
var item = items[i]
|
|
|
115
|
+ console.log("item---", item)
|
115
|
item.payroll_date = format.formatTime_date(item.payroll_date)
|
116
|
item.payroll_date = format.formatTime_date(item.payroll_date)
|
116
|
item.count_date = format.formatDate_min(item.start_time) + '-' + format.formatDate_min(item.end_time)
|
117
|
item.count_date = format.formatDate_min(item.start_time) + '-' + format.formatDate_min(item.end_time)
|
|
|
118
|
+ item.zeroShow = item.zero_display=='yes'?true:false//是否展示非0字段
|
117
|
item.detals = this.handleDetailsData(item)
|
119
|
item.detals = this.handleDetailsData(item)
|
118
|
item.isshow = false
|
120
|
item.isshow = false
|
119
|
}
|
121
|
}
|
|
@@ -197,6 +199,7 @@ Page({ |
|
@@ -197,6 +199,7 @@ Page({ |
197
|
let titles = JSON.parse(data['slip_titles'])
|
199
|
let titles = JSON.parse(data['slip_titles'])
|
198
|
let detail = JSON.parse(data['detail'])
|
200
|
let detail = JSON.parse(data['detail'])
|
199
|
let mapping_keys = data["mapping_keys"] ? data["mapping_keys"]:[]
|
201
|
let mapping_keys = data["mapping_keys"] ? data["mapping_keys"]:[]
|
|
|
202
|
+ console.log(titles,detail,mapping_keys)
|
200
|
var details = []
|
203
|
var details = []
|
201
|
for (var i = 0; i < titles.length; ++i) {
|
204
|
for (var i = 0; i < titles.length; ++i) {
|
202
|
var titleData = titles[i]
|
205
|
var titleData = titles[i]
|
|
@@ -212,7 +215,7 @@ Page({ |
|
@@ -212,7 +215,7 @@ Page({ |
212
|
}
|
215
|
}
|
213
|
}
|
216
|
}
|
214
|
if (!title || !value) continue;
|
217
|
if (!title || !value) continue;
|
215
|
- if (mapping_keys.indexOf(titleData['key']) == -1 && (value == '0' || value == 0)) continue;
|
218
|
+ if (mapping_keys.indexOf(titleData['key']) == -1) continue;
|
216
|
details.push({
|
219
|
details.push({
|
217
|
title: title,
|
220
|
title: title,
|
218
|
value: value
|
221
|
value: value
|