提交 3f54bbf7e047f40cc1afed4646e6bdc8d74d9bd8

作者 wangyu
2 个父辈 8870cd76 c1fbff7c

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

# Conflicts:
#	app.js
#	pages/main/advancepayment/adPayHome.js
@@ -148,6 +148,7 @@ App({ @@ -148,6 +148,7 @@ App({
148 // baseUrl: "http://47.110.158.110:20000/", 148 // baseUrl: "http://47.110.158.110:20000/",
149 // baseUrl: "https://api.workai.com.cn/", 149 // baseUrl: "https://api.workai.com.cn/",
150 baseUrl: "https://api.fjhxrl.com/", 150 baseUrl: "https://api.fjhxrl.com/",
  151 + // baseUrl: "https://api.workai.com.cn/",
151 OSSUrl: "", //"https://oss.workai.com.cn/", 152 OSSUrl: "", //"https://oss.workai.com.cn/",
152 userInfo: null, 153 userInfo: null,
153 hostInfo: null, 154 hostInfo: null,
@@ -114,8 +114,10 @@ Page({ @@ -114,8 +114,10 @@ Page({
114 handleSalaryData: function (items) { 114 handleSalaryData: function (items) {
115 for (var i = 0; i < items.length; ++i) { 115 for (var i = 0; i < items.length; ++i) {
116 var item = items[i] 116 var item = items[i]
  117 + console.log("item---", item)
117 item.payroll_date = format.formatTime_date(item.payroll_date) 118 item.payroll_date = format.formatTime_date(item.payroll_date)
118 item.count_date = format.formatDate_min(item.start_time) + '-' + format.formatDate_min(item.end_time) 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 item.detals = this.handleDetailsData(item) 121 item.detals = this.handleDetailsData(item)
120 item.isshow = false 122 item.isshow = false
121 } 123 }
@@ -199,6 +201,7 @@ Page({ @@ -199,6 +201,7 @@ Page({
199 let titles = JSON.parse(data['slip_titles']) 201 let titles = JSON.parse(data['slip_titles'])
200 let detail = JSON.parse(data['detail']) 202 let detail = JSON.parse(data['detail'])
201 let mapping_keys = data["mapping_keys"] ? data["mapping_keys"] : [] 203 let mapping_keys = data["mapping_keys"] ? data["mapping_keys"] : []
  204 + console.log(titles,detail,mapping_keys)
202 var details = [] 205 var details = []
203 for (var i = 0; i < titles.length; ++i) { 206 for (var i = 0; i < titles.length; ++i) {
204 var titleData = titles[i] 207 var titleData = titles[i]
@@ -207,14 +210,15 @@ Page({ @@ -207,14 +210,15 @@ Page({
207 if (!title) { 210 if (!title) {
208 title = titleData['original_column'] 211 title = titleData['original_column']
209 } 212 }
210 - if (!value) { 213 + if (value != 0 && !value) {
211 value = data[titleData['key']] 214 value = data[titleData['key']]
212 if (value != undefined) { 215 if (value != undefined) {
213 value += 'tax_rate' == titleData['key'] ? '%' : '' 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 details.push({ 222 details.push({
219 title: title, 223 title: title,
220 value: value 224 value: value
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
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="{{item.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 hidden="{{!item.zeroShow&&(detal.value=='0'||detal.value==0)}}" >
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>
63 </view> 63 </view>
注册登录 后发表评论