提交 3f54bbf7e047f40cc1afed4646e6bdc8d74d9bd8

作者 wangyu
2 个父辈 8870cd76 c1fbff7c

Merge branch '机器人dev' into 海峡new

# Conflicts:
#	app.js
#	pages/main/advancepayment/adPayHome.js
... ... @@ -148,6 +148,7 @@ App({
148 148 // baseUrl: "http://47.110.158.110:20000/",
149 149 // baseUrl: "https://api.workai.com.cn/",
150 150 baseUrl: "https://api.fjhxrl.com/",
  151 + // baseUrl: "https://api.workai.com.cn/",
151 152 OSSUrl: "", //"https://oss.workai.com.cn/",
152 153 userInfo: null,
153 154 hostInfo: null,
... ...
... ... @@ -114,8 +114,10 @@ Page({
114 114 handleSalaryData: function (items) {
115 115 for (var i = 0; i < items.length; ++i) {
116 116 var item = items[i]
  117 + console.log("item---", item)
117 118 item.payroll_date = format.formatTime_date(item.payroll_date)
118 119 item.count_date = format.formatDate_min(item.start_time) + '-' + format.formatDate_min(item.end_time)
  120 + item.zeroShow = item.zero_display=='yes'?true:false//是否展示非0字段
119 121 item.detals = this.handleDetailsData(item)
120 122 item.isshow = false
121 123 }
... ... @@ -199,6 +201,7 @@ Page({
199 201 let titles = JSON.parse(data['slip_titles'])
200 202 let detail = JSON.parse(data['detail'])
201 203 let mapping_keys = data["mapping_keys"] ? data["mapping_keys"] : []
  204 + console.log(titles,detail,mapping_keys)
202 205 var details = []
203 206 for (var i = 0; i < titles.length; ++i) {
204 207 var titleData = titles[i]
... ... @@ -207,14 +210,15 @@ Page({
207 210 if (!title) {
208 211 title = titleData['original_column']
209 212 }
210   - if (!value) {
  213 + if (value != 0 && !value) {
211 214 value = data[titleData['key']]
212 215 if (value != undefined) {
213 216 value += 'tax_rate' == titleData['key'] ? '%' : ''
214 217 }
215   - }
216   - if (!title || !value) continue;
217   - if (mapping_keys.indexOf(titleData['key']) == -1 && (value == '0' || value == 0)) continue;
  218 + }
  219 + if (!title ) continue;
  220 + if (!title || (value!=0&&!value)) continue;
  221 + // if (mapping_keys.indexOf(titleData['key']) == -1 && (value == '0' || value == 0)) continue;
218 222 details.push({
219 223 title: title,
220 224 value: value
... ...
... ... @@ -57,7 +57,7 @@
57 57 <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view>
58 58 </view>
59 59 <view wx:if="{{item.isshow}}" wx:for="{{item.detals}}" wx:for-item='detal'>
60   - <view>
  60 + <view hidden="{{!item.zeroShow&&(detal.value=='0'||detal.value==0)}}" >
61 61 <text class='text_999_28'>{{detal.title}}</text>
62 62 <text class='text_999_28' style='color:#333;text-align:right;float: right'>{{detal.value}}</text>
63 63 </view>
... ...
注册登录 后发表评论