订单顶级,是否委托
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<block wx:for="{{info.car_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
||||
<view class="relative bbs-1-eb pl140 font-28">
|
||||
<view class="relative bbs-1-eb pl140 font-28" wx:if="{{value}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">{{key}}</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx">{{value}}{{key == '车辆合同售价' || key == '定金'?'元':'' }}</view>
|
||||
</view>
|
||||
|
||||
@@ -37,7 +37,6 @@ Page({
|
||||
b_s_id:'',//备选车型id
|
||||
finance_id:'',//金融机构id
|
||||
|
||||
|
||||
spareIndex:-1,//备选车型索引
|
||||
colorArray:[],//车型颜色列表
|
||||
levelArray:[],//车型级别列表
|
||||
@@ -58,10 +57,6 @@ Page({
|
||||
payment:['全款', '分期',],
|
||||
mainIndex:-1,//购车主体
|
||||
main:['个人', '公司',],
|
||||
entrustIndex:-1,//是否委托
|
||||
entrust:['是','否',],
|
||||
entrust_name:'',//受托人姓名
|
||||
entrust_idcard:'',//受托人身份证
|
||||
|
||||
isPreview:false,//是否预览
|
||||
isShowcheck:false,//是否显示预览核对弹框
|
||||
@@ -93,8 +88,6 @@ Page({
|
||||
|
||||
this.setData({
|
||||
delry_time:res.data.delry_time?res.data.delry_time:'',
|
||||
entrust_name:res.data.entrust_name?res.data.entrust_name:'',
|
||||
entrust_idcard:res.data.entrust_idcard?res.data.entrust_idcard:'',
|
||||
})
|
||||
|
||||
/*匹配车辆信息*/
|
||||
@@ -298,19 +291,6 @@ Page({
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//匹配是否委托
|
||||
if(!!res.data.ifentrust){
|
||||
let entrustIndex = -1
|
||||
if(res.data.ifentrust==0){
|
||||
entrustIndex = 1
|
||||
}else if(res.data.ifentrust==1){
|
||||
entrustIndex = 0
|
||||
}
|
||||
this.setData({
|
||||
entrustIndex:entrustIndex,
|
||||
})
|
||||
}
|
||||
/*end匹配其他信息*/
|
||||
|
||||
})
|
||||
@@ -404,29 +384,13 @@ Page({
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.entrustIndex == -1 ){
|
||||
wx.showToast({
|
||||
title: '请选择是否委托',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.delry_time == ''){
|
||||
wx.showToast({
|
||||
title: '请输入期望交付时间',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.entrustIndex == 0 && this.data.entrust_name == ''){
|
||||
wx.showToast({
|
||||
title: '请填写受托人姓名',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(this.data.entrustIndex == 0 && (this.data.entrust_idcard == ''|| !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(this.data.entrust_idcard))){
|
||||
wx.showToast({
|
||||
title: '请填写正确受托人身份证',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
else{
|
||||
|
||||
let that = this
|
||||
that.setData({
|
||||
@@ -744,15 +708,6 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//是否委托
|
||||
changeEntrust(e) {
|
||||
this.setData({
|
||||
entrustIndex:e.detail.value,
|
||||
entrust_name:'',
|
||||
entrust_idcard:'',
|
||||
})
|
||||
},
|
||||
|
||||
//获取车辆价格
|
||||
getAppSeriesInfo(){
|
||||
if(this.data.car_id != ''&&this.data.v_id != ''&&this.data.color_id != ''&&this.data.incolor_id != ''){
|
||||
@@ -814,14 +769,7 @@ Page({
|
||||
params['deposit'] = that.data.priceinfo.deposit;
|
||||
params['payway'] = that.data.paymentIndex==0?'1':'0';
|
||||
params['pack_id'] = that.data.pack_id;
|
||||
params['ifentrust'] = that.data.entrustIndex==0?'1':'0';
|
||||
params['delry_time'] = that.data.delry_time;
|
||||
if(that.data.entrust_name != ''){
|
||||
params['entrust_name'] = that.data.entrust_name;
|
||||
}
|
||||
if(that.data.entrust_idcard != ''){
|
||||
params['entrust_idcard'] = that.data.entrust_idcard;
|
||||
}
|
||||
if(that.data.finance_id!= ''){
|
||||
params['finance_id'] = that.data.finance_id;
|
||||
}
|
||||
|
||||
@@ -114,31 +114,6 @@
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<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">
|
||||
<picker bindchange="changeEntrust" value="{{entrustIndex}}" range="{{entrust}}">
|
||||
<text class="color-ccc" wx:if="{{entrustIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{entrust[entrustIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{entrustIndex==0}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||
<view class="absolute left-0 box-middle">受托人姓名<text class="color-f9394d">*</text></view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入受托人姓名" bindinput='inputTx' data-key="entrust_name" name='entrust_name' value='{{entrust_name}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||
<view class="absolute left-0 box-middle">受托人身份证<text class="color-f9394d">*</text></view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入受托人身份证" bindinput='inputTx' data-key="entrust_idcard" name='entrust_idcard' value='{{entrust_idcard}}' />
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||
<view class="absolute left-0 box-middle">期望交付时间<text class="color-f9394d">*</text></view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
@@ -211,20 +186,6 @@
|
||||
<view class="absolute left-0 box-middle font-28 color-333">代办包</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{packArray[packIndex]}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">是否委托</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{entrust[entrustIndex]}}</view>
|
||||
</view>
|
||||
<block wx:if="{{entrustIndex==0}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||
<view class="absolute left-0 box-middle">受托人姓名</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{entrust_name}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||
<view class="absolute left-0 box-middle">受托人身份证</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{entrust_idcard}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">期望交付时间</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{delry_time}}</view>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</view>
|
||||
|
||||
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
||||
<view class="mt25 fn-clear font-28">
|
||||
<view class="mt25 fn-clear font-28" wx:if="{{value}}">
|
||||
<view class="fn-fl color-333">{{key}}</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
|
||||
</view>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</view>
|
||||
|
||||
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
||||
<view class="mt25 fn-clear font-28">
|
||||
<view class="mt25 fn-clear font-28" wx:if="{{value}}">
|
||||
<view class="fn-fl color-333">{{key}}</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
|
||||
</view>
|
||||
|
||||
@@ -19,6 +19,12 @@ Page({
|
||||
submitFlag:false,
|
||||
isShowRemarks:false,//意向金备注
|
||||
|
||||
entrustIndex:1,//是否委托
|
||||
entrust:['是','否',],
|
||||
entrust_name:'',//受托人姓名
|
||||
entrust_idcard:'',//受托人身份证
|
||||
entrust_mobile:'',//委托人手机号
|
||||
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -127,6 +133,16 @@ Page({
|
||||
this.getAppCustomersList()
|
||||
},
|
||||
|
||||
//是否委托
|
||||
changeEntrust(e) {
|
||||
this.setData({
|
||||
entrustIndex:e.detail.value,
|
||||
entrust_name:'',
|
||||
entrust_idcard:'',
|
||||
entrust_mobile:'',
|
||||
})
|
||||
},
|
||||
|
||||
//新建订单
|
||||
postAppCusorder2() {
|
||||
if (this.data.customerIndex == -1 ) {
|
||||
@@ -154,7 +170,32 @@ Page({
|
||||
title: '请输入客户地址',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
}
|
||||
else if(this.data.entrustIndex == -1 ){
|
||||
wx.showToast({
|
||||
title: '请选择是否委托',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.entrustIndex == 0 && this.data.entrust_name == ''){
|
||||
wx.showToast({
|
||||
title: '请填写受托人姓名',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.entrustIndex == 0 && (this.data.entrust_idcard == ''|| !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(this.data.entrust_idcard))){
|
||||
wx.showToast({
|
||||
title: '请输入正确受托人身份证',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.entrustIndex == 0 && !/^1[3456789]\d{9}$/.test(this.data.entrust_mobile)){
|
||||
wx.showToast({
|
||||
title: '请输入正确委托人手机号',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
let that = this
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
@@ -165,6 +206,16 @@ Page({
|
||||
params['mobile'] = that.data.mobile;
|
||||
params['cardid'] = that.data.cardid;
|
||||
params['address'] = that.data.address;
|
||||
params['ifentrust'] = that.data.entrustIndex==0?'1':'0';
|
||||
if(that.data.entrust_name != ''){
|
||||
params['entrust_name'] = that.data.entrust_name;
|
||||
}
|
||||
if(that.data.entrust_idcard != ''){
|
||||
params['entrust_idcard'] = that.data.entrust_idcard;
|
||||
}
|
||||
if(that.data.entrust_mobile != ''){
|
||||
params['entrust_mobile'] = that.data.entrust_mobile;
|
||||
}
|
||||
if(this.data.inten_money != ''){
|
||||
params['inten_money'] = this.data.inten_money;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,36 @@
|
||||
<view class="absolute right-0 box-middle font-28 color-666">元</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<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">
|
||||
<picker bindchange="changeEntrust" value="{{entrustIndex}}" range="{{entrust}}">
|
||||
<text class="color-ccc" wx:if="{{entrustIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{entrust[entrustIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{entrustIndex==0}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||
<view class="absolute left-0 box-middle">受托人姓名<text class="color-f9394d">*</text></view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入受托人姓名" bindinput='inputTx' data-key="entrust_name" name='entrust_name' value='{{entrust_name}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||
<view class="absolute left-0 box-middle">受托人身份证<text class="color-f9394d">*</text></view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入受托人身份证" bindinput='inputTx' data-key="entrust_idcard" name='entrust_idcard' value='{{entrust_idcard}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||
<view class="absolute left-0 box-middle">受托人手机号码<text class="color-f9394d">*</text></view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入受托人手机号码" bindinput='inputTx' data-key="entrust_mobile" name='entrust_mobile' value='{{entrust_mobile}}' />
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user