提交 8648483f01e50512ee8e7e3eb774bdadb78c7a1b

作者 pangy
1 个父辈 aaf13c72

是否婚前首套 和 是否有配偶 逻辑

... ... @@ -2162,6 +2162,17 @@ Page({
2162 2162 // })
2163 2163 // }
2164 2164 // },
  2165 + handleBeforemarry: function (beforemarry) {
  2166 + var hasLover = beforemarry
  2167 + var deduction_amount = beforemarry ? (Deduce_amounts_month["house_fund_loan"] / 2) : Deduce_amounts_month["house_fund_loan"]
  2168 + this.data.hasLoverData.selected = beforemarry ? '是' : ''
  2169 + this.data.hasLoverData.disabled = beforemarry
  2170 + this.setData({
  2171 + hasLoverData: this.data.hasLoverData,
  2172 + hasLover: hasLover,
  2173 + deduction_amount: deduction_amount
  2174 + })
  2175 + },
2165 2176 handleHasLover: function (hasLover) {
2166 2177 this.data.beforemarryData.selected = hasLover ? this.data.beforemarryData.selected : '否'
2167 2178 this.data.beforemarryData.disabled = hasLover ? false : true
... ... @@ -2308,15 +2319,16 @@ Page({
2308 2319 break;
2309 2320 case 'hasLover':
2310 2321 var hasLoverData = this.data.hasLoverData
  2322 + if (hasLoverData.selected == hasLoverData.values[e.detail.value]) {
  2323 + return
  2324 + }
2311 2325 hasLoverData.selected = hasLoverData.values[e.detail.value]
2312 2326 var hasLover = e.detail.value == '0'
2313 2327 this.setData({
2314 2328 hasLoverData: hasLoverData,
2315 2329 hasLover: hasLover
2316 2330 })
2317   - if (hasLoverData.selected == hasLoverData.values[e.detail.value]) {
2318   - return
2319   - }
  2331 +
2320 2332 if (this.data.cur_index == 'house_fund' && this.data.house_type == 'house_fund_loan') {
2321 2333 this.handleHasLover(hasLover)
2322 2334 }
... ... @@ -2625,10 +2637,14 @@ Page({
2625 2637 break;
2626 2638 case 'before_marry':
2627 2639 var beforemarry_Data = this.data.beforemarryData
  2640 + if (beforemarry_Data.selected == beforemarry_Data.values[e.detail.value]) {
  2641 + return
  2642 + }
2628 2643 beforemarry_Data.selected = beforemarry_Data.values[e.detail.value]
2629 2644 this.setData({
2630 2645 beforemarryData: beforemarry_Data
2631 2646 })
  2647 + this.handleBeforemarry('是' == beforemarry_Data.selected)
2632 2648 break;
2633 2649 case 'is_self_loan':
2634 2650 var isself_Data = this.data.isselfData
... ...
注册登录 后发表评论