提交 194b6e69934c7c48323921cefebfef18ed38c027

作者 pangy
2 个父辈 b920f38d fa7bbc4e

Merge branch 'dev_py' into dev2.0

... ... @@ -339,7 +339,7 @@ Page({
339 339 selected: '',
340 340 isrequre: true,
341 341 isblack: 'true',
342   - values: ["公积金贷款", "商业贷款"],
  342 + values: ["公积金贷款", "商业贷款","组合贷款"],
343 343 placeholder: '请选择贷款类型',
344 344 onChange: 'onPickerSelect'
345 345 },
... ... @@ -409,6 +409,20 @@ Page({
409 409 start: '1970-01-01',
410 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 426 leasestartDate: {
413 427 label: '租赁期起',
414 428 bindtype: 'lease_start_date',
... ... @@ -458,9 +472,19 @@ Page({
458 472 onChange: 'onPickerSelect',
459 473 },
460 474 bankInfo: {
461   - label: '贷款银行',
  475 + label: '公积金贷款银行',
462 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 488 isrequre: true,
465 489 placeholder: '请选择贷款银行',
466 490 selected: '',
... ... @@ -982,6 +1006,7 @@ Page({
982 1006 var that = this
983 1007 var Authorization = app.globalData.Authorization;
984 1008 var bank_info = that.data.bankInfo
  1009 + var bank_info_2 = that.data.bankInfo_2
985 1010 wx.request({
986 1011 url: baseUrl + 'walletmgm/v1/bankinfos',
987 1012 method: "GET",
... ... @@ -992,9 +1017,10 @@ Page({
992 1017 success: function(res) {
993 1018 console.log(res)
994 1019 bank_info.values = that.handleBankinfo(res.data.items)
995   -
  1020 + bank_info_2.values = that.handleBankinfo(res.data.items)
996 1021 that.setData({
997   - bankInfo: bank_info
  1022 + bankInfo: bank_info,
  1023 + bankInfo_2: bank_info_2
998 1024 })
999 1025 console.log("bankInfo", that.data.bankInfo)
1000 1026 },
... ... @@ -1257,27 +1283,50 @@ Page({
1257 1283 } else if (this.data.loantypeData.selected.length < 1) {
1258 1284 this.showToast('请选择贷款类型')
1259 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 1324 newdata.loan_before_marry = this.data.beforemarryData.selected == "是" ? 'y' : 'n'
1275 1325 newdata.loan_by_self = this.data.isselfData.selected == "是" ? 'y' : 'n'
1276 1326 newdata.certification_type = this.data.identifytypeData.selected
1277 1327
1278 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 1330 // newdata.loan_datelong = this.data.loandatelongData.selected
1282 1331 var request_loan_address = this.getLoanAddressRequest()
1283 1332 newdata.house_address = request_loan_address
... ... @@ -1442,6 +1491,31 @@ Page({
1442 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 1520 dealIdInfo: function (idCardNum, idcard_belong) {
1447 1521 var info = format.analyzeIDCard(idCardNum)
... ... @@ -1757,6 +1831,14 @@ Page({
1757 1831 firstpaybackDate: firstpayback_Date
1758 1832 })
1759 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 1842 case 'loan_datelong':
1761 1843 var loandatelong_Data = this.data.loandatelongData
1762 1844 loandatelong_Data.selected = loandatelong_Data.values[e.detail.value]
... ... @@ -1796,6 +1878,13 @@ Page({
1796 1878 bankInfo: bank_data
1797 1879 })
1798 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 1888 case 'house_locate':
1800 1889 console.log('house_locate', e)
1801 1890 var house_address = this.data.houseLocateInfo;
... ...
... ... @@ -220,11 +220,13 @@
220 220 <view style='height:20rpx;width:100%;background:#F8F8F8;'></view>
221 221 <view style='padding:0 30rpx;'>
222 222 <template is="picker_cell_normal" data="{{...loantypeData}}" />
  223 + </view>
  224 + <view style='padding:0 30rpx;' wx:if="{{loantypeData.selected != '商业贷款'}}">
223 225 <view class='divide_line_30'></view>
224 226 <view style='height:90rpx'>
225 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 230 </view>
229 231 <view class='divide_line_30'></view>
230 232 <template is="picker_cell_normal" data="{{...bankInfo}}" />
... ... @@ -234,11 +236,29 @@
234 236 <!-- <template is="picker_cell_normal" data="{{...loandatelongData}}" /> -->
235 237 <view style='height:90rpx'>
236 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 260 </view>
240 261 </view>
241   -
242 262 </view>
243 263 <view wx:if="{{house_type=='house_fund_rent'}}">
244 264
... ...
... ... @@ -10,7 +10,7 @@
10 10 }
11 11
12 12 .input_wrap {
13   - width: 460rpx;
  13 + /* width: 460rpx; */
14 14 height: 90rpx;
15 15 font-size: 30rpx;
16 16 color: #333;
... ...
... ... @@ -67,7 +67,7 @@ page{
67 67 }
68 68
69 69 .input_wrap {
70   - width: 480rpx;
  70 + /* width: 480rpx; */
71 71 height: 90rpx;
72 72 font-size: 28rpx;
73 73 color: #000;
... ...
注册登录 后发表评论