提交 c7e1af397049ea7523cca0d2c7025f5d9bd54624

作者 wangyu
1 个父辈 0809407b

优化

@@ -11,11 +11,14 @@ @@ -11,11 +11,14 @@
11 </view> --> 11 </view> -->
12 <text class='text_black_30' style='padding-left:30rpx'>选择专项附加扣除项</text> 12 <text class='text_black_30' style='padding-left:30rpx'>选择专项附加扣除项</text>
13 13
14 - <view wx:for="{{selectIndex}}" class="multi-selection" style='padding:0 30rpx' >  
15 - <view class='float_left'>  
16 - <image src="{{selectIndex[index].sureid? '/images/selected.png' : '/images/unselected.png'}}" class="multi-img" data-selectIndex="{{index}}" style='margin-top:20rpx' bindtap="selectRep"/> 14 + <view wx:for="{{selectIndex}}" class="multi-selection" style='padding:0 30rpx'>
  15 + <view data-selectIndex="{{index}}" bindtap="selectRep">
  16 + <view class='float_left'>
  17 + <image src="{{selectIndex[index].sureid? '/images/selected.png' : '/images/unselected.png'}}" class="multi-img" style='margin-top:20rpx' />
  18 + </view>
  19 + <text class="{{selectIndex[index].sureid?'select_blue_28':'select_666_28'}}" style='line-height:80rpx;margin-left: 34rpx;'>{{item.message}}</text>
17 </view> 20 </view>
18 - <text class="{{selectIndex[index].sureid?'select_blue_28':'select_666_28'}}" style='line-height:80rpx;margin-left: 34rpx;'>{{item.message}}</text> 21 +
19 </view> 22 </view>
20 <view wx:if="{{selectIndex[4].sureid}}" style='background: #F1FAFD;height:62rpx;position: relative;display: flex;justify-content:center'> 23 <view wx:if="{{selectIndex[4].sureid}}" style='background: #F1FAFD;height:62rpx;position: relative;display: flex;justify-content:center'>
21 <view bindtap='housing01'> 24 <view bindtap='housing01'>
@@ -35,6 +38,6 @@ @@ -35,6 +38,6 @@
35 </view> 38 </view>
36 39
37 <view class="btn_bottom" bindtap='gocommit'> 40 <view class="btn_bottom" bindtap='gocommit'>
38 - <button class="btn_bottom" > 提交</button> 41 + <button class="btn_bottom"> 提交</button>
39 </view> 42 </view>
40 </view> 43 </view>
@@ -164,6 +164,7 @@ Page({ @@ -164,6 +164,7 @@ Page({
164 }, 164 },
165 165
166 handleAddition: function(data) { 166 handleAddition: function(data) {
  167 + var that = this
167 var newdata = data.items 168 var newdata = data.items
168 if (newdata && newdata.length>0){ 169 if (newdata && newdata.length>0){
169 var issinglechild_Data = this.data.issinglechildData; 170 var issinglechild_Data = this.data.issinglechildData;
@@ -172,12 +173,12 @@ Page({ @@ -172,12 +173,12 @@ Page({
172 173
173 var shareMethod_Data = this.data.shareMethodData; 174 var shareMethod_Data = this.data.shareMethodData;
174 shareMethod_Data.disabled = true; 175 shareMethod_Data.disabled = true;
175 - shareMethod_Data.selected = data.share_method; 176 + shareMethod_Data.selected = data.share_method ? data.share_method:"";
176 177
177 this.setData({ 178 this.setData({
178 issinglechildData: issinglechild_Data, 179 issinglechildData: issinglechild_Data,
179 shareMethodData: shareMethod_Data, 180 shareMethodData: shareMethod_Data,
180 - reduce_amount: data.month_deduction_amount, 181 + reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : that.data.reduce_amount,
181 input_disable:true 182 input_disable:true
182 }) 183 })
183 } 184 }
@@ -315,7 +316,7 @@ Page({ @@ -315,7 +316,7 @@ Page({
315 goadd: function(e) { //添加 316 goadd: function(e) { //添加
316 console.log("goadd", e) 317 console.log("goadd", e)
317 var that = this 318 var that = this
318 - if (this.data.cur_status == 'support_duty') { 319 + if (this.data.cur_status == 'support_duty' && !this.data.issinglechildData.disabled) {
319 if (this.data.issinglechildData.selected.length < 1) { 320 if (this.data.issinglechildData.selected.length < 1) {
320 this.showToast("请选择是否独生子女") 321 this.showToast("请选择是否独生子女")
321 return 322 return
@@ -328,7 +329,7 @@ Page({ @@ -328,7 +329,7 @@ Page({
328 if (this.data.reduce_amount == -1){ 329 if (this.data.reduce_amount == -1){
329 this.showToast("请输入扣除金额") 330 this.showToast("请输入扣除金额")
330 return 331 return
331 - }else if (this.data.reduce_amount < 1 || this.data.reduce_amount > 1000) { 332 + }else if (this.data.reduce_amount < 0 || this.data.reduce_amount > 1000) {
332 this.showToast("本年度月扣除金额不得大于1000") 333 this.showToast("本年度月扣除金额不得大于1000")
333 return 334 return
334 } 335 }
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 <view style='height:90rpx'> 23 <view style='height:90rpx'>
24 <text style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #666;margin-left:26rpx'>本年度月扣除金额</text> 24 <text style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #666;margin-left:26rpx'>本年度月扣除金额</text>
25 <text class='float_right' style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:20rpx' name='country'>/月</text> 25 <text class='float_right' style='line-height: 90rpx;text-align:right;font-size: 30rpx;color: #333;margin-left:20rpx' name='country'>/月</text>
26 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入(不超过1000)' type='digit' name='reduce_amount' bindinput='bindinput' disabled='{{input_disable}}' value='{{reduce_amount>0?reduce_amount:""}}'></input> 26 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入(不超过1000)' type='digit' name='reduce_amount' bindinput='bindinput' disabled='{{input_disable}}' value='{{reduce_amount>=0?reduce_amount:""}}'></input>
27 </view> 27 </view>
28 </view> 28 </view>
29 <view wx:elif="{{issinglechildData.selected=='是'}}"> 29 <view wx:elif="{{issinglechildData.selected=='是'}}">
@@ -334,14 +334,14 @@ @@ -334,14 +334,14 @@
334 <view class='text_999_28 float_left' style='line-height:70rpx;width:248rpx;text-align:left;white-space:nowrap;'>租赁房屋坐落地址:</view> 334 <view class='text_999_28 float_left' style='line-height:70rpx;width:248rpx;text-align:left;white-space:nowrap;'>租赁房屋坐落地址:</view>
335 <view style='display:flex;flex-direction:column;max-width:392rpx;'> 335 <view style='display:flex;flex-direction:column;max-width:392rpx;'>
336 <text class='text_333_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_address_new}}</text> 336 <text class='text_333_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_address_new}}</text>
337 - <text class='text_999_28 text_singleline' style='line-height:70rpx:text-align:left'>{{item.house_detail_address}}</text> 337 + <text class='text_999_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_detail_address}}</text>
338 </view> 338 </view>
339 </view> 339 </view>
340 <view wx:if="{{house_type!='house_fund_loan'}}"> 340 <view wx:if="{{house_type!='house_fund_loan'}}">
341 <text class='text_999_28 float_left' style='line-height:70rpx;width:192rpx;text-align:left;white-space:nowrap;'>房屋坐落地址:</text> 341 <text class='text_999_28 float_left' style='line-height:70rpx;width:192rpx;text-align:left;white-space:nowrap;'>房屋坐落地址:</text>
342 <view style='display:flex;flex-direction:column;max-width:450rpx;'> 342 <view style='display:flex;flex-direction:column;max-width:450rpx;'>
343 <text class='text_333_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_address_new}}</text> 343 <text class='text_333_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_address_new}}</text>
344 - <text class='text_999_28 text_singleline' style='line-height:70rpx:text-align:left'>{{item.house_detail_address}}</text> 344 + <text class='text_999_28 text_singleline' style='line-height:70rpx;text-align:left'>{{item.house_detail_address}}</text>
345 </view> 345 </view>
346 </view> 346 </view>
347 </view> 347 </view>
注册登录 后发表评论