提交 e1ca6ae73faab391a8e31e8ed26d3d47f5d0a485

作者 wangyu
1 个父辈 8c8fa297

优化

... ... @@ -180,7 +180,7 @@ Page({
180 180 bindtype: 'reduce_type',
181 181 selected: '',
182 182 isblack: 'true',
183   - values: ["月度扣除", "年度扣除"],
  183 + values: ["月度", "年度"],
184 184 placeholder: '请选择扣除方式',
185 185 onChange: 'onPickerSelect'
186 186 },
... ... @@ -333,11 +333,11 @@ Page({
333 333 var reduce_typeData = this.data.reducetypeData
334 334 var deduction_amount
335 335 if (options.reducetype == '月度'){
336   - reduce_typeData.selected = '月度扣除'
  336 + reduce_typeData.selected = '月度'
337 337 deduction_amount = Deduce_amounts_month[nameKey]
338 338 }else {
339 339 deduction_amount = Deduce_amounts_year[nameKey]
340   - reduce_typeData.selected = '年度扣除'
  340 + reduce_typeData.selected = '年度'
341 341 }
342 342
343 343 var title = '添加' + (options.title ? options.title : AddTypeNames[nameKey])
... ...
... ... @@ -223,8 +223,8 @@
223 223 <view class='divide_line_f5f5f5'></view>
224 224 <view style='height:90rpx'>
225 225 <text class='text_black_30 float_left'>扣除金额</text>
226   - <text wx:if="{{reducetypeData.selected=='月度扣除'}}" class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right;color:#FF9F00;'>¥{{deduction_amount}}/月</text>
227   - <text wx:if="{{reducetypeData.selected=='年度扣除'}}" class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right;color:#FF9F00;'>¥{{deduction_amount}}/年</text>
  226 + <text wx:if="{{reducetypeData.selected=='月度'}}" class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right;color:#FF9F00;'>¥{{deduction_amount}}/月</text>
  227 + <text wx:if="{{reducetypeData.selected=='年度'}}" class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right;color:#FF9F00;'>¥{{deduction_amount}}/年</text>
228 228 <!-- <input class='input_wrap01 float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#FF9F00;' placeholder='请输入扣除金额' type='digit' name='reduce_money'></input> -->
229 229 </view>
230 230 <view class='divide_line_f5f5f5'></view>
... ...
... ... @@ -56,7 +56,7 @@
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'>月度</text>
60 60 </view>
61 61 <view style='height:90rpx;width:100%'>
62 62 <text class='text_left'>扣除金额</text>
... ... @@ -129,7 +129,7 @@
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'>月度</text>
133 133 </view>
134 134 <view style='height:90rpx;width:100%'>
135 135 <text class='text_left'>扣除金额</text>
... ... @@ -193,7 +193,7 @@
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'>月度</text>
197 197 </view>
198 198 <view style='height:90rpx;width:100%'>
199 199 <text class='text_left'>扣除金额</text>
... ...
... ... @@ -48,11 +48,14 @@ Page({
48 48 lookandadd:function(e){
49 49 console.log("lookandadd", e);
50 50 if (this.data.additiondata.options && this.data.additiondata.options.length>0){
  51 + var newstatus
  52 + if (this.data.additiondata.options[e.currentTarget.id].indexOf("house_fund"!=-1)){
  53 + newstatus = "house_fund"
  54 + }
51 55 wx.navigateTo({
52   - url: '../lookandupdate/lookandupdate?status=' + this.data.additiondata.options[e.currentTarget.id] + "&legal_entity_id=" + this.data.additiondata.legal_entity_id + "&legal_entity=" + this.data.additiondata.legal_entity,
  56 + url: '../lookandupdate/lookandupdate?status=' + newstatus + "&legal_entity_id=" + this.data.additiondata.legal_entity_id + "&legal_entity=" + this.data.additiondata.legal_entity,
53 57 })
54 58 }
55   -
56 59 },
57 60
58 61 /**
... ...
1 1 // pages/main/addtionalreduce/childreneducate/childreneducate.js
2 2 var app = getApp();
3 3 var baseUrl = app.globalData.baseUrl;
4   -
  4 +var format = require('../../../../utils/util.js');
5 5 Page({
6 6
7 7 /**
... ... @@ -45,8 +45,8 @@ Page({
45 45 "house_fund": "persontax/v1/house-funds/"
46 46 },
47 47 reducetype: {
48   - "month": "月度扣除",
49   - "year": "年度扣除"
  48 + "month": "月度",
  49 + "year": "年度"
50 50 },
51 51 additionInfo: [],
52 52 reducetypeData: ["月度", "年度"],
... ... @@ -117,7 +117,6 @@ Page({
117 117 success: function(res) {
118 118 if (res && res.data) {
119 119 console.log("res", res)
120   -
121 120 that.setData({
122 121 additionInfo: res.data.items
123 122 })
... ...
... ... @@ -16,7 +16,10 @@
16 16 <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
17 17 <view style='height:110rpx'>
18 18 <text class='text_gray_36 float_left' style='line-height:110rpx'>{{item.children_name}}</text>
19   - <view class='declare_style float_right'> {{declareStatus[item.status]}}</view>
  19 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  20 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  21 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
  22 +
20 23 </view>
21 24 <view style='padding-right: 30rpx'>
22 25 <view class='divide_line_f5f5f5'></view>
... ... @@ -30,7 +33,7 @@
30 33 </view>
31 34 <view style='height:70rpx'>
32 35 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
33   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
  36 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
34 37 </view>
35 38 <view style='height:70rpx'>
36 39 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ... @@ -51,7 +54,9 @@
51 54 <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
52 55 <view style='height:110rpx'>
53 56 <text class='text_gray_36' style='line-height:110rpx'>非学历教育</text>
54   - <view class='declare_style float_right'> {{declareStatus[item.status]}}</view>
  57 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  58 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  59 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
55 60 </view>
56 61 <view style='padding-right:30rpx'>
57 62 <view class='divide_line_f5f5f5'></view>
... ... @@ -77,7 +82,7 @@
77 82 </view>
78 83 <view style='height:70rpx'>
79 84 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
80   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
  85 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
81 86 </view>
82 87 <view style='height:70rpx'>
83 88 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ... @@ -88,7 +93,9 @@
88 93 <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
89 94 <view style='height:110rpx'>
90 95 <text class='text_gray_36' style='line-height:110rpx'>学历教育</text>
91   - <view class='declare_style float_right'> {{declareStatus[item.status]}}</view>
  96 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  97 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  98 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
92 99 </view>
93 100 <view style='padding-right:right'>
94 101 <view class='divide_line_f5f5f5'></view>
... ... @@ -110,7 +117,7 @@
110 117 </view>
111 118 <view style='height:70rpx'>
112 119 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
113   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
  120 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
114 121 </view>
115 122 <view style='height:70rpx'>
116 123 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ... @@ -129,7 +136,9 @@
129 136 <view style='margin:30rpx;padding-left:30rpx' class='card_rectangle_bg_column'>
130 137 <view style='height:110rpx'>
131 138 <text class='text_gray_36 float_left' style='line-height:110rpx'>被赡养人</text>
132   - <view class='declare_style float_right'> {{declareStatus[item.status]}}</view>
  139 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  140 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  141 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
133 142 </view>
134 143 <view style='padding-right:30rpx'>
135 144 <view class='divide_line_f5f5f5'></view>
... ... @@ -143,7 +152,7 @@
143 152 </view>
144 153 <view style='height:70rpx'>
145 154 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
146   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
  155 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
147 156 </view>
148 157 <view style='height:70rpx'>
149 158 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ... @@ -188,7 +197,9 @@
188 197 <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
189 198 <view style='height:110rpx'>
190 199 <text class='text_gray_36' style='line-height:110rpx'>支出明细</text>
191   - <view class='declare_style float_right'> {{declareStatus[item.status]}}</view>
  200 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  201 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  202 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
192 203 </view>
193 204 <view style='padding-right:30rpx'>
194 205 <view class='divide_line_f5f5f5'></view>
... ... @@ -228,7 +239,9 @@
228 239 <view style='margin:30rpx;padding-left: 30rpx' class='card_rectangle_bg_column'>
229 240 <view style='height:110rpx'>
230 241 <text class='text_gray_36 float_left' style='line-height:110rpx'>住房</text>
231   - <view class='declare_style float_right'> {{declareStatus[item.status]}}</view>
  242 + <view wx:if="{{item.status=='failed'}}" class='declare_style red_bg'> {{declareStatus[item.status]}}</view>
  243 + <view wx:if="{{item.status=='success'}}" class='declare_style blue_bg'> {{declareStatus[item.status]}}</view>
  244 + <view wx:else class='declare_style orange_bg'> {{declareStatus[item.status]}}</view>
232 245 </view>
233 246 <view style='padding-right: 30rpx'>
234 247 <view class='divide_line_f5f5f5'></view>
... ... @@ -239,7 +252,7 @@
239 252 </view>
240 253 <view style='height:70rpx'>
241 254 <text class='text_999_28 ' style='line-height:70rpx'>扣除方式:</text>
242   - <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{reducetype[item.deduction_type]}}</text>
  255 + <text class='text_333_28 ' style='line-height:70rpx;margin-left:20rpx'>{{item.deduction_type}}</text>
243 256 </view>
244 257 <view style='height:70rpx'>
245 258 <text class='text_999_28 ' style='line-height:70rpx'>扣除金额:</text>
... ...
... ... @@ -239,7 +239,6 @@
239 239 .declare_style {
240 240 width: 144rpx;
241 241 height: 48rpx;
242   - background: #f5a623;
243 242 border-radius: 20px 0px 0px 20px;
244 243 font-family: PingFangSC-Regular;
245 244 font-size: 13px;
... ... @@ -249,5 +248,18 @@
249 248 justify-content: center;
250 249 line-height: 48rpx;
251 250 margin-top: 30rpx;
  251 + float:right;
  252 +}
  253 +
  254 +.orange_bg{
  255 + background: #f5a623;
  256 +}
  257 +
  258 +.red_bg{
  259 + background: #f56723;
  260 +}
  261 +
  262 +.blue_bg{
  263 + background: #357AEB;
252 264 }
253 265
... ...
... ... @@ -34,6 +34,7 @@ Page({
34 34 },
35 35
36 36 bindKeyInput(e) {
  37 + console.log("bindKeyInput",e)
37 38 this.setData({
38 39 inputValue: e.detail.value
39 40 })
... ... @@ -47,6 +48,7 @@ Page({
47 48 data: {
48 49 text: that.data.inputValue
49 50 },
  51 + method:"POST",
50 52 header: {
51 53 'content-type': 'application/json',
52 54 "Authorization": Authorization
... ...
... ... @@ -20,7 +20,7 @@
20 20 </view>
21 21 </scroll-view>
22 22 <view class='bottom_wrap'>
23   - <input class='input_wrap' confirm-type="send"></input>
  23 + <input class='input_wrap' confirm-type="send" bindinput="bindKeyInput"></input>
24 24 <view class='btn_send_wrap' bindtap='sendMsg'>发送</view>
25 25 </view>
26 26 </view>
... ...
注册登录 后发表评论