零首付
This commit is contained in:
@@ -78,6 +78,7 @@ Page({
|
||||
options_ids:[],//选装包id数组
|
||||
options_total:0,//选装包费用
|
||||
if_zero_firstpay:0,//是否零首付
|
||||
price_loan0:'',//首付按揭金额
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -109,6 +110,7 @@ Page({
|
||||
brand_id:res.data.brand_id,
|
||||
car_id:res.data.car_id,
|
||||
if_zero_firstpay:res.data.if_zero_firstpay,
|
||||
price_loan0:res.data.price_loan0,
|
||||
})
|
||||
|
||||
/*匹配车辆信息*/
|
||||
@@ -770,6 +772,7 @@ Page({
|
||||
if(this.data.paymentIndex != e.detail.value && e.detail.value >= 0){
|
||||
this.setData({
|
||||
paymentIndex:e.detail.value,
|
||||
price_loan0:'',
|
||||
})
|
||||
//代办列表
|
||||
this.getAppServices()
|
||||
@@ -896,7 +899,9 @@ Page({
|
||||
if(that.data.paymentIndex==1){
|
||||
params['if_zero_firstpay'] = that.data.if_zero_firstpay;
|
||||
}
|
||||
|
||||
if(that.data.price_loan0 > 0){
|
||||
params['price_loan0'] = that.data.price_loan0;
|
||||
}
|
||||
let srv_arr = []
|
||||
that.data.agencyList.forEach(item => {
|
||||
if(item.checked){
|
||||
@@ -1378,6 +1383,7 @@ Page({
|
||||
this.setData({
|
||||
if_zero_firstpay:e.detail.value ? 1 :0,
|
||||
'priceinfo.sdeposit':'',
|
||||
price_loan0:'',
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -122,6 +122,10 @@
|
||||
<view class="absolute left-0 box-middle color-333">零首付</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{if_zero_firstpay==1?'是':'否'}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{price_loan0>0}}">
|
||||
<view class="absolute left-0 box-middle color-333">首付按揭金额</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{price_loan0}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.sdeposit&&if_zero_firstpay!=1}}">
|
||||
<view class="absolute left-0 box-middle color-333">定金</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.sdeposit}}</text>元</view>
|
||||
@@ -138,6 +142,12 @@
|
||||
<switch checked="{{if_zero_firstpay==1}}" bindchange="switchZeroFirstpay" type="switch" color='#36afa2' style="zoom:0.8" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{if_zero_firstpay==1}}">
|
||||
<view class="absolute left-0 box-middle">首付按揭金额</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入首付按揭金额" model:value='{{price_loan0}}' always-embed='{{true}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{priceinfo.deposit_list&&paymentIndex != -1&&if_zero_firstpay!=1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">定金<text class="color-f9394d">*</text></view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
@@ -377,6 +387,10 @@
|
||||
<view class="absolute left-0 box-middle color-333">零首付</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{if_zero_firstpay==1?'是':'否'}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{price_loan0>0}}">
|
||||
<view class="absolute left-0 box-middle color-333">首付按揭金额</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{price_loan0}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.sdeposit&&if_zero_firstpay!=1}}">
|
||||
<view class="absolute left-0 box-middle color-333">定金</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.sdeposit}}</text>元</view>
|
||||
|
||||
@@ -18,6 +18,17 @@ Page({
|
||||
notify_file_obj:[],
|
||||
|
||||
is_tiexi:0,//是否贴息
|
||||
tab:[
|
||||
{
|
||||
title:'首付按揭',
|
||||
value:1,
|
||||
},
|
||||
{
|
||||
title:'车辆按揭',
|
||||
value:0,
|
||||
},
|
||||
],
|
||||
tabkey:1,
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
@@ -40,58 +51,116 @@ Page({
|
||||
_.apiQuery.getAppCusorderV2(params).then(res=>{
|
||||
this.setData({
|
||||
info:res.data,
|
||||
notify_file_obj:res.data.notify_file,
|
||||
lend_file_obj:res.data.lend_file,
|
||||
price_loan:res.data.price_loan?res.data.price_loan:'',
|
||||
is_tiexi:res.data.is_tiexi,
|
||||
})
|
||||
|
||||
//匹配融机构
|
||||
if(!!res.data.finance_id){
|
||||
let finanparams = {};
|
||||
finanparams['page'] = 1;
|
||||
finanparams['size'] = 100;
|
||||
_.apiQuery.getAppFinance(finanparams).then(res6 => {
|
||||
if(res6.data.list.length>0){
|
||||
let financeArray = []
|
||||
res6.data.list.forEach((item,index) => {
|
||||
if(item.id == res.data.finance_id){
|
||||
this.setData({
|
||||
financeIndex:index,
|
||||
})
|
||||
}
|
||||
financeArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
finance_id:res.data.finance_id,
|
||||
financeArray:financeArray,
|
||||
financeList:res6.data.list,
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.getAppFinance()
|
||||
}
|
||||
|
||||
//匹配分期期数
|
||||
if(!!res.data.num){
|
||||
_.apiQuery.getAppFinanceNums().then(res1 => {
|
||||
if(res1.data.list.length>0){
|
||||
res1.data.list.forEach((item,index) => {
|
||||
if(item == res.data.num){
|
||||
this.setData({
|
||||
numIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
num:res.data.num,
|
||||
nums:res1.data.list,
|
||||
})
|
||||
}
|
||||
if(this.data.tabkey==1&&res.data.price_loan0>0){
|
||||
this.setData({
|
||||
notify_file_obj:res.data.price_loan0_data.notify_file,
|
||||
lend_file_obj:res.data.price_loan0_data.lend_file,
|
||||
price_loan:res.data.price_loan0_data.price_loan?res.data.price_loan0_data.price_loan:'',
|
||||
is_tiexi:res.data.price_loan0_data.is_tiexi,
|
||||
})
|
||||
//匹配融机构
|
||||
if(res.data.price_loan0_data.finance_id>0){
|
||||
let finanparams = {};
|
||||
finanparams['page'] = 1;
|
||||
finanparams['size'] = 100;
|
||||
_.apiQuery.getAppFinance(finanparams).then(res6 => {
|
||||
if(res6.data.list.length>0){
|
||||
let financeArray = []
|
||||
res6.data.list.forEach((item,index) => {
|
||||
if(item.id == res.data.price_loan0_data.finance_id){
|
||||
this.setData({
|
||||
financeIndex:index,
|
||||
})
|
||||
}
|
||||
financeArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
finance_id:res.data.price_loan0_data.finance_id,
|
||||
financeArray:financeArray,
|
||||
financeList:res6.data.list,
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.getAppFinance()
|
||||
}
|
||||
|
||||
//匹配分期期数
|
||||
if(res.data.price_loan0_data.num>0){
|
||||
_.apiQuery.getAppFinanceNums().then(res1 => {
|
||||
if(res1.data.list.length>0){
|
||||
res1.data.list.forEach((item,index) => {
|
||||
if(item == res.data.price_loan0_data.num){
|
||||
this.setData({
|
||||
numIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
num:res.data.price_loan0_data.num,
|
||||
nums:res1.data.list,
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.getAppFinanceNums()
|
||||
}
|
||||
}else{
|
||||
this.getAppFinanceNums()
|
||||
this.setData({
|
||||
notify_file_obj:res.data.notify_file,
|
||||
lend_file_obj:res.data.lend_file,
|
||||
price_loan:res.data.price_loan?res.data.price_loan:'',
|
||||
is_tiexi:res.data.is_tiexi,
|
||||
})
|
||||
//匹配融机构
|
||||
if(res.data.finance_id>0){
|
||||
let finanparams = {};
|
||||
finanparams['page'] = 1;
|
||||
finanparams['size'] = 100;
|
||||
_.apiQuery.getAppFinance(finanparams).then(res6 => {
|
||||
if(res6.data.list.length>0){
|
||||
let financeArray = []
|
||||
res6.data.list.forEach((item,index) => {
|
||||
if(item.id == res.data.finance_id){
|
||||
this.setData({
|
||||
financeIndex:index,
|
||||
})
|
||||
}
|
||||
financeArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
finance_id:res.data.finance_id,
|
||||
financeArray:financeArray,
|
||||
financeList:res6.data.list,
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.getAppFinance()
|
||||
}
|
||||
|
||||
//匹配分期期数
|
||||
if(res.data.num>0){
|
||||
_.apiQuery.getAppFinanceNums().then(res1 => {
|
||||
if(res1.data.list.length>0){
|
||||
res1.data.list.forEach((item,index) => {
|
||||
if(item == res.data.num){
|
||||
this.setData({
|
||||
numIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
num:res.data.num,
|
||||
nums:res1.data.list,
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.getAppFinanceNums()
|
||||
}
|
||||
}
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
@@ -319,6 +388,9 @@ Page({
|
||||
params['num'] = that.data.num;
|
||||
}
|
||||
params['is_tiexi'] = this.data.is_tiexi;
|
||||
if(this.data.tabkey==1&&this.data.info.price_loan0>0){
|
||||
params['if_loan0'] = 1;
|
||||
}
|
||||
_.apiQuery.putAppLoan(params).then(res => {
|
||||
|
||||
that.setData({
|
||||
@@ -375,6 +447,9 @@ Page({
|
||||
params['num'] = that.data.num;
|
||||
}
|
||||
params['is_tiexi'] = this.data.is_tiexi;
|
||||
if(this.data.tabkey==1&&this.data.info.price_loan0>0){
|
||||
params['if_loan0'] = 1;
|
||||
}
|
||||
_.apiQuery.putAppLoan(params).then(res => {
|
||||
|
||||
that.setData({
|
||||
@@ -479,4 +554,100 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//切换tab
|
||||
changeTab(e){
|
||||
this.setData({
|
||||
tabkey: e.currentTarget.dataset.value,
|
||||
})
|
||||
if(this.data.tabkey==1){
|
||||
this.setData({
|
||||
notify_file_obj:this.data.info.price_loan0_data.notify_file,
|
||||
lend_file_obj:this.data.info.price_loan0_data.lend_file,
|
||||
price_loan:this.data.info.price_loan0_data.price_loan?this.data.info.price_loan0_data.price_loan:'',
|
||||
is_tiexi:this.data.info.price_loan0_data.is_tiexi,
|
||||
})
|
||||
//匹配融机构
|
||||
if(this.data.info.price_loan0_data.finance_id>0&&this.data.financeList.length>0){
|
||||
this.data.financeList.forEach((item,index) => {
|
||||
if(item.id == this.data.info.price_loan0_data.finance_id){
|
||||
this.setData({
|
||||
financeIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
finance_id:this.data.info.price_loan0_data.finance_id,
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
financeIndex:-1,//金融机构索引
|
||||
finance_id:'',//金融机构id
|
||||
})
|
||||
}
|
||||
|
||||
//匹配分期期数
|
||||
if(this.data.info.price_loan0_data.num&&this.data.nums.length>0){
|
||||
this.data.nums.forEach((item,index) => {
|
||||
if(item == this.data.info.price_loan0_data.num){
|
||||
this.setData({
|
||||
numIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
num:this.data.info.price_loan0_data.num,
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
numIndex:-1,//分期期数索引
|
||||
num:'',//分期期数
|
||||
})
|
||||
}
|
||||
}else{
|
||||
this.setData({
|
||||
notify_file_obj:this.data.info.notify_file,
|
||||
lend_file_obj:this.data.info.lend_file,
|
||||
price_loan:this.data.info.price_loan?this.data.info.price_loan:'',
|
||||
is_tiexi:this.data.info.is_tiexi,
|
||||
})
|
||||
//匹配融机构
|
||||
if(this.data.info.finance_id>0&&this.data.financeList.length>0){
|
||||
this.data.financeList.forEach((item,index) => {
|
||||
if(item.id == this.data.info.finance_id){
|
||||
this.setData({
|
||||
financeIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
finance_id:this.data.info.finance_id,
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
financeIndex:-1,//金融机构索引
|
||||
finance_id:'',//金融机构id
|
||||
})
|
||||
}
|
||||
|
||||
//匹配分期期数
|
||||
if(this.data.info.num>0&&this.data.nums.length>0){
|
||||
this.data.nums.forEach((item,index) => {
|
||||
if(item == this.data.info.num){
|
||||
this.setData({
|
||||
numIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
num:this.data.info.num,
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
numIndex:-1,//分期期数索引
|
||||
num:'',//分期期数
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -1,5 +1,13 @@
|
||||
<view class="container">
|
||||
<view class="inner30">
|
||||
<view class="fn-flex mt5 pl100 pr100 font-32 color-666 text-center" wx:if="{{info.price_loan0>0}}">
|
||||
<block wx:for='{{tab}}' wx:key='list'>
|
||||
<view class="fn-flex-item pl20 pr20 tabmenu2 {{tabkey == item.value?'active color-36afa2':''}}" data-value="{{item.value}}" bindtap="changeTab">
|
||||
<view class="relative">{{item.title}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{info.edit_status==1}}">
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{financeArray.length>0}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">金融机构<text class="color-f9394d">*</text></view>
|
||||
@@ -135,7 +143,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="fixed left-0 right-0 bottom-0 bg-fff-op90 inner40 fn-flex safe-pb">
|
||||
<view class="fixed left-0 right-0 bottom-0 bg-fff-op90 inner40 fn-flex safe-pb" wx:if="{{info.edit_status==1}}">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putAppLoan1">确认</button>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
/* pages/order/editFinance/index.wxss */
|
||||
.tabmenu2{display:inline-block;line-height:72rpx;}
|
||||
.tabmenu2.active view.relative{display:inline-block;}
|
||||
.tabmenu2.active view.relative::before{display:inline-block;position:absolute;bottom:0;left:50%;transform:translate(-50%,0);width:64rpx;height:6rpx;content:"";background-color:#36afa2;}
|
||||
@@ -102,6 +102,7 @@ Page({
|
||||
options_ids:[],//选装包id数组
|
||||
options_total:0,//选装包费用
|
||||
if_zero_firstpay:0,//是否零首付
|
||||
price_loan0:'',//首付按揭金额
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -526,6 +527,7 @@ Page({
|
||||
if(this.data.paymentIndex != e.detail.value && e.detail.value >= 0){
|
||||
this.setData({
|
||||
paymentIndex:e.detail.value,
|
||||
price_loan0:'',
|
||||
})
|
||||
//代办列表
|
||||
this.getAppServices()
|
||||
@@ -718,6 +720,9 @@ Page({
|
||||
if(that.data.paymentIndex==1){
|
||||
params['if_zero_firstpay'] = that.data.if_zero_firstpay;
|
||||
}
|
||||
if(that.data.price_loan0 > 0){
|
||||
params['price_loan0'] = that.data.price_loan0;
|
||||
}
|
||||
_.apiQuery.postAppCusorderV2(params).then(res => {
|
||||
|
||||
//刷新列表页
|
||||
@@ -1482,6 +1487,7 @@ Page({
|
||||
this.setData({
|
||||
if_zero_firstpay:e.detail.value ? 1 :0,
|
||||
'priceinfo.sdeposit':'',
|
||||
price_loan0:'',
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -241,6 +241,12 @@
|
||||
<switch checked="{{if_zero_firstpay==1}}" bindchange="switchZeroFirstpay" type="switch" color='#36afa2' style="zoom:0.8" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{if_zero_firstpay==1}}">
|
||||
<view class="absolute left-0 box-middle">首付按揭金额</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入首付按揭金额" model:value='{{price_loan0}}' always-embed='{{true}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{priceinfo.deposit_list&&paymentIndex != -1&&if_zero_firstpay!=1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">定金<text class="color-f9394d">*</text></view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
@@ -507,6 +513,10 @@
|
||||
<view class="absolute left-0 box-middle color-333">零首付</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{if_zero_firstpay==1?'是':'否'}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{price_loan0>0}}">
|
||||
<view class="absolute left-0 box-middle color-333">首付按揭金额</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{price_loan0}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.sdeposit&&if_zero_firstpay!=1}}">
|
||||
<view class="absolute left-0 box-middle color-333">定金</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.sdeposit}}</text>元</view>
|
||||
|
||||
Reference in New Issue
Block a user