正在显示
4 个修改的文件
包含
136 行增加
和
27 行删除
@@ -339,7 +339,7 @@ Page({ | @@ -339,7 +339,7 @@ Page({ | ||
339 | selected: '', | 339 | selected: '', |
340 | isrequre: true, | 340 | isrequre: true, |
341 | isblack: 'true', | 341 | isblack: 'true', |
342 | - values: ["公积金贷款", "商业贷款"], | 342 | + values: ["公积金贷款", "商业贷款","组合贷款"], |
343 | placeholder: '请选择贷款类型', | 343 | placeholder: '请选择贷款类型', |
344 | onChange: 'onPickerSelect' | 344 | onChange: 'onPickerSelect' |
345 | }, | 345 | }, |
@@ -409,6 +409,20 @@ Page({ | @@ -409,6 +409,20 @@ Page({ | ||
409 | start: '1970-01-01', | 409 | start: '1970-01-01', |
410 | datelong: 0, | 410 | datelong: 0, |
411 | }, | 411 | }, |
412 | + firstpaybackDate_2: { | ||
413 | + label: '首次还款日期', | ||
414 | + bindtype: 'payback_date_2', | ||
415 | + selected: '', | ||
416 | + isrequre: true, | ||
417 | + isblack: 'true', | ||
418 | + values: ["是", "否"], | ||
419 | + placeholder: '请选择日期', | ||
420 | + onChange: 'onPickerSelect', | ||
421 | + mode: "date", | ||
422 | + fields: "day", | ||
423 | + start: '1970-01-01', | ||
424 | + datelong: 0, | ||
425 | + }, | ||
412 | leasestartDate: { | 426 | leasestartDate: { |
413 | label: '租赁期起', | 427 | label: '租赁期起', |
414 | bindtype: 'lease_start_date', | 428 | bindtype: 'lease_start_date', |
@@ -458,9 +472,19 @@ Page({ | @@ -458,9 +472,19 @@ Page({ | ||
458 | onChange: 'onPickerSelect', | 472 | onChange: 'onPickerSelect', |
459 | }, | 473 | }, |
460 | bankInfo: { | 474 | bankInfo: { |
461 | - label: '贷款银行', | 475 | + label: '公积金贷款银行', |
462 | bindtype: 'bank', | 476 | bindtype: 'bank', |
463 | - maxWidth: 490, | 477 | + maxWidth: 400, |
478 | + isrequre: true, | ||
479 | + placeholder: '请选择贷款银行', | ||
480 | + selected: '', | ||
481 | + values: [], | ||
482 | + onChange: 'onPickerSelect' | ||
483 | + }, | ||
484 | + bankInfo_2: { | ||
485 | + label: '商业贷款银行', | ||
486 | + bindtype: 'bank_2', | ||
487 | + maxWidth: 430, | ||
464 | isrequre: true, | 488 | isrequre: true, |
465 | placeholder: '请选择贷款银行', | 489 | placeholder: '请选择贷款银行', |
466 | selected: '', | 490 | selected: '', |
@@ -982,6 +1006,7 @@ Page({ | @@ -982,6 +1006,7 @@ Page({ | ||
982 | var that = this | 1006 | var that = this |
983 | var Authorization = app.globalData.Authorization; | 1007 | var Authorization = app.globalData.Authorization; |
984 | var bank_info = that.data.bankInfo | 1008 | var bank_info = that.data.bankInfo |
1009 | + var bank_info_2 = that.data.bankInfo_2 | ||
985 | wx.request({ | 1010 | wx.request({ |
986 | url: baseUrl + 'walletmgm/v1/bankinfos', | 1011 | url: baseUrl + 'walletmgm/v1/bankinfos', |
987 | method: "GET", | 1012 | method: "GET", |
@@ -992,9 +1017,10 @@ Page({ | @@ -992,9 +1017,10 @@ Page({ | ||
992 | success: function(res) { | 1017 | success: function(res) { |
993 | console.log(res) | 1018 | console.log(res) |
994 | bank_info.values = that.handleBankinfo(res.data.items) | 1019 | bank_info.values = that.handleBankinfo(res.data.items) |
995 | - | 1020 | + bank_info_2.values = that.handleBankinfo(res.data.items) |
996 | that.setData({ | 1021 | that.setData({ |
997 | - bankInfo: bank_info | 1022 | + bankInfo: bank_info, |
1023 | + bankInfo_2: bank_info_2 | ||
998 | }) | 1024 | }) |
999 | console.log("bankInfo", that.data.bankInfo) | 1025 | console.log("bankInfo", that.data.bankInfo) |
1000 | }, | 1026 | }, |
@@ -1257,27 +1283,50 @@ Page({ | @@ -1257,27 +1283,50 @@ Page({ | ||
1257 | } else if (this.data.loantypeData.selected.length < 1) { | 1283 | } else if (this.data.loantypeData.selected.length < 1) { |
1258 | this.showToast('请选择贷款类型') | 1284 | this.showToast('请选择贷款类型') |
1259 | return | 1285 | return |
1260 | - } else if (!formdata.loan_contract_no || formdata.loan_contract_no.length < 1) { | ||
1261 | - this.showToast('请填写贷款合同编号') | ||
1262 | - return | ||
1263 | - } else if (this.data.bankInfo.selected.length < 1) { | ||
1264 | - this.showToast('请选择贷款银行') | ||
1265 | - return | ||
1266 | - } else if (this.data.firstpaybackDate.selected.length < 1) { | ||
1267 | - this.showToast('请选择首次还款日期') | ||
1268 | - return | ||
1269 | - } else if (!formdata.loan_months || formdata.loan_months.length < 1) { | ||
1270 | - this.showToast('请选择贷款期限') | ||
1271 | - return | 1286 | + } |
1287 | + var loanType = this.data.loantypeData.selected | ||
1288 | + if (loanType == "公积金贷款" || loanType == "组合贷款"){ | ||
1289 | + if (!formdata.loan_contract_no || formdata.loan_contract_no.length < 1) { | ||
1290 | + this.showToast('请填写公积金贷款合同编号') | ||
1291 | + return | ||
1292 | + } else if (this.data.bankInfo.selected.length < 1) { | ||
1293 | + this.showToast('请选择公积金贷款银行') | ||
1294 | + return | ||
1295 | + } else if (this.data.firstpaybackDate.selected.length < 1) { | ||
1296 | + this.showToast('请选择首次还款日期') | ||
1297 | + return | ||
1298 | + } else if (!formdata.loan_months || formdata.loan_months.length < 1) { | ||
1299 | + this.showToast('请选择公积金贷款期限') | ||
1300 | + return | ||
1301 | + } | ||
1302 | + newdata.loan_bank = this.data.bankInfo.selected | ||
1303 | + newdata.loan_start = this.data.firstpaybackDate.datelong | ||
1304 | + newdata.loan_months = parseInt(formdata.loan_months) | ||
1305 | + } | ||
1306 | + if (loanType == "商业贷款" || loanType == "组合贷款") { | ||
1307 | + if (!formdata.sec_loan_contract_no || formdata.sec_loan_contract_no.length < 1) { | ||
1308 | + this.showToast('请填写商业贷款合同编号') | ||
1309 | + return | ||
1310 | + } else if (this.data.bankInfo_2.selected.length < 1) { | ||
1311 | + this.showToast('请选择商业贷款银行') | ||
1312 | + return | ||
1313 | + } else if (this.data.firstpaybackDate_2.selected.length < 1) { | ||
1314 | + this.showToast('请选择首次还款日期') | ||
1315 | + return | ||
1316 | + } else if (!formdata.sec_loan_months || formdata.sec_loan_months.length < 1) { | ||
1317 | + this.showToast('请选择商业贷款期限') | ||
1318 | + return | ||
1319 | + } | ||
1320 | + newdata.sec_loan_bank = this.data.bankInfo_2.selected | ||
1321 | + newdata.sec_loan_start = this.data.firstpaybackDate_2.datelong | ||
1322 | + newdata.sec_loan_months = parseInt(formdata.sec_loan_months) | ||
1272 | } | 1323 | } |
1273 | - newdata.loan_months = parseInt(formdata.loan_months) | ||
1274 | newdata.loan_before_marry = this.data.beforemarryData.selected == "是" ? 'y' : 'n' | 1324 | newdata.loan_before_marry = this.data.beforemarryData.selected == "是" ? 'y' : 'n' |
1275 | newdata.loan_by_self = this.data.isselfData.selected == "是" ? 'y' : 'n' | 1325 | newdata.loan_by_self = this.data.isselfData.selected == "是" ? 'y' : 'n' |
1276 | newdata.certification_type = this.data.identifytypeData.selected | 1326 | newdata.certification_type = this.data.identifytypeData.selected |
1277 | 1327 | ||
1278 | newdata.loan_type = this.data.loantypeData.selected | 1328 | newdata.loan_type = this.data.loantypeData.selected |
1279 | - newdata.loan_bank = this.data.bankInfo.selected | ||
1280 | - newdata.loan_start = this.data.firstpaybackDate.datelong | 1329 | + |
1281 | // newdata.loan_datelong = this.data.loandatelongData.selected | 1330 | // newdata.loan_datelong = this.data.loandatelongData.selected |
1282 | var request_loan_address = this.getLoanAddressRequest() | 1331 | var request_loan_address = this.getLoanAddressRequest() |
1283 | newdata.house_address = request_loan_address | 1332 | newdata.house_address = request_loan_address |
@@ -1442,6 +1491,31 @@ Page({ | @@ -1442,6 +1491,31 @@ Page({ | ||
1442 | this.dealIdInfo(idCardNo, e.currentTarget.id) | 1491 | this.dealIdInfo(idCardNo, e.currentTarget.id) |
1443 | } | 1492 | } |
1444 | }, | 1493 | }, |
1494 | + loan_input: function (e) { | ||
1495 | + console.log('-------', e.detail.value) | ||
1496 | + switch (e.currentTarget.id) { | ||
1497 | + case 'loan_contract_no': | ||
1498 | + this.setData({ | ||
1499 | + loan_contract_no: e.detail.value | ||
1500 | + }) | ||
1501 | + break; | ||
1502 | + case 'loan_months': | ||
1503 | + this.setData({ | ||
1504 | + loan_months: e.detail.value | ||
1505 | + }) | ||
1506 | + break; | ||
1507 | + case 'sec_loan_contract_no': | ||
1508 | + this.setData({ | ||
1509 | + sec_loan_contract_no: e.detail.value | ||
1510 | + }) | ||
1511 | + break; | ||
1512 | + case 'sec_loan_months': | ||
1513 | + this.setData({ | ||
1514 | + sec_loan_months: e.detail.value | ||
1515 | + }) | ||
1516 | + break; | ||
1517 | + } | ||
1518 | + }, | ||
1445 | //根据身份证号码,获取相关信息 | 1519 | //根据身份证号码,获取相关信息 |
1446 | dealIdInfo: function (idCardNum, idcard_belong) { | 1520 | dealIdInfo: function (idCardNum, idcard_belong) { |
1447 | var info = format.analyzeIDCard(idCardNum) | 1521 | var info = format.analyzeIDCard(idCardNum) |
@@ -1757,6 +1831,14 @@ Page({ | @@ -1757,6 +1831,14 @@ Page({ | ||
1757 | firstpaybackDate: firstpayback_Date | 1831 | firstpaybackDate: firstpayback_Date |
1758 | }) | 1832 | }) |
1759 | break; | 1833 | break; |
1834 | + case 'payback_date_2': | ||
1835 | + var firstpayback_Date = this.data.firstpaybackDate_2 | ||
1836 | + firstpayback_Date.selected = e.detail.value | ||
1837 | + firstpayback_Date.datelong = Date.parse(new Date(e.detail.value)) / 1000, | ||
1838 | + this.setData({ | ||
1839 | + firstpaybackDate_2: firstpayback_Date | ||
1840 | + }) | ||
1841 | + break; | ||
1760 | case 'loan_datelong': | 1842 | case 'loan_datelong': |
1761 | var loandatelong_Data = this.data.loandatelongData | 1843 | var loandatelong_Data = this.data.loandatelongData |
1762 | loandatelong_Data.selected = loandatelong_Data.values[e.detail.value] | 1844 | loandatelong_Data.selected = loandatelong_Data.values[e.detail.value] |
@@ -1796,6 +1878,13 @@ Page({ | @@ -1796,6 +1878,13 @@ Page({ | ||
1796 | bankInfo: bank_data | 1878 | bankInfo: bank_data |
1797 | }) | 1879 | }) |
1798 | break; | 1880 | break; |
1881 | + case 'bank_2': | ||
1882 | + var bank_data_2 = this.data.bankInfo_2 | ||
1883 | + bank_data_2.selected = bank_data_2.values[e.detail.value] | ||
1884 | + this.setData({ | ||
1885 | + bankInfo_2: bank_data_2 | ||
1886 | + }) | ||
1887 | + break; | ||
1799 | case 'house_locate': | 1888 | case 'house_locate': |
1800 | console.log('house_locate', e) | 1889 | console.log('house_locate', e) |
1801 | var house_address = this.data.houseLocateInfo; | 1890 | var house_address = this.data.houseLocateInfo; |
@@ -220,11 +220,13 @@ | @@ -220,11 +220,13 @@ | ||
220 | <view style='height:20rpx;width:100%;background:#F8F8F8;'></view> | 220 | <view style='height:20rpx;width:100%;background:#F8F8F8;'></view> |
221 | <view style='padding:0 30rpx;'> | 221 | <view style='padding:0 30rpx;'> |
222 | <template is="picker_cell_normal" data="{{...loantypeData}}" /> | 222 | <template is="picker_cell_normal" data="{{...loantypeData}}" /> |
223 | + </view> | ||
224 | + <view style='padding:0 30rpx;' wx:if="{{loantypeData.selected != '商业贷款'}}"> | ||
223 | <view class='divide_line_30'></view> | 225 | <view class='divide_line_30'></view> |
224 | <view style='height:90rpx'> | 226 | <view style='height:90rpx'> |
225 | <text class='red_star_right_10'>*</text> | 227 | <text class='red_star_right_10'>*</text> |
226 | - <text class='text_777_30 float_left'>贷款合同编号</text> | ||
227 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款合同编号' name='loan_contract_no'></input> | 228 | + <text class='text_777_30 float_left'>公积金贷款合同编号</text> |
229 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款合同编号' name='loan_contract_no' value='{{loan_contract_no}}' bindinput="loan_input" id='loan_contract_no'></input> | ||
228 | </view> | 230 | </view> |
229 | <view class='divide_line_30'></view> | 231 | <view class='divide_line_30'></view> |
230 | <template is="picker_cell_normal" data="{{...bankInfo}}" /> | 232 | <template is="picker_cell_normal" data="{{...bankInfo}}" /> |
@@ -234,11 +236,29 @@ | @@ -234,11 +236,29 @@ | ||
234 | <!-- <template is="picker_cell_normal" data="{{...loandatelongData}}" /> --> | 236 | <!-- <template is="picker_cell_normal" data="{{...loandatelongData}}" /> --> |
235 | <view style='height:90rpx'> | 237 | <view style='height:90rpx'> |
236 | <text class='red_star_right_10'>*</text> | 238 | <text class='red_star_right_10'>*</text> |
237 | - <text class='text_777_30 float_left'>贷款期限(月数)</text> | ||
238 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款月数' name='loan_months' type='number'></input> | 239 | + <text class='text_777_30 float_left'>公积金贷款期限(月数)</text> |
240 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款月数' name='loan_months' value='{{loan_months}}' bindinput="loan_input" id='loan_months' type='number'></input> | ||
241 | + </view> | ||
242 | + </view> | ||
243 | + <view style='padding:0 30rpx;' wx:if="{{loantypeData.selected == '商业贷款' || loantypeData.selected == '组合贷款' }}"> | ||
244 | + <view class='divide_line_30'></view> | ||
245 | + <view style='height:90rpx'> | ||
246 | + <text class='red_star_right_10'>*</text> | ||
247 | + <text class='text_777_30 float_left'>商业贷款合同编号</text> | ||
248 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;width:400rpx;' placeholder='请输入贷款合同编号' name='sec_loan_contract_no' value='{{sec_loan_contract_no}}' bindinput="loan_input" id='sec_loan_contract_no' ></input> | ||
249 | + </view> | ||
250 | + <view class='divide_line_30'></view> | ||
251 | + <template is="picker_cell_normal" data="{{...bankInfo_2}}" /> | ||
252 | + <view class='divide_line_30'></view> | ||
253 | + <template is="picker_cell_normal" data="{{...firstpaybackDate_2}}" /> | ||
254 | + <view class='divide_line_30'></view> | ||
255 | + <!-- <template is="picker_cell_normal" data="{{...loandatelongData}}" /> --> | ||
256 | + <view style='height:90rpx'> | ||
257 | + <text class='red_star_right_10'>*</text> | ||
258 | + <text class='text_777_30 float_left'>商业贷款期限(月数)</text> | ||
259 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款月数' name='sec_loan_months' value='{{sec_loan_months}}' bindinput="loan_input" id='sec_loan_months' type='number'></input> | ||
239 | </view> | 260 | </view> |
240 | </view> | 261 | </view> |
241 | - | ||
242 | </view> | 262 | </view> |
243 | <view wx:if="{{house_type=='house_fund_rent'}}"> | 263 | <view wx:if="{{house_type=='house_fund_rent'}}"> |
244 | 264 |
请
注册
或
登录
后发表评论