代办相关

This commit is contained in:
老叶
2021-10-29 15:35:54 +08:00
parent b72ebe3fd1
commit 3c3b33c7a8
5 changed files with 152 additions and 61 deletions
+2
View File
@@ -81,6 +81,8 @@ api = {
appCustomersDefeats: 'app/customers/defeats', //战败客户列表 /战败/再战申请
appServices:'app/services', //获取代办服务列表
}
//远程图片存储地址
+7
View File
@@ -530,4 +530,11 @@ apiQuery.putAppCusorder2 = function (params) {
})
}
//获取代办服务列表
apiQuery.getAppServices = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appServices, 2, params, "GET", resolve, reject)
})
}
export default apiQuery;
+91 -47
View File
@@ -72,26 +72,12 @@ Page({
isShowcheck:false,//是否显示预览核对弹框
checkCount: 2,
checktext: '3s',
isShowRemarks:false,//意向金备注
agencyList:[
{
id:1,
title:'挂牌服务',
check:true,
},
{
id:2,
title:'金融服务',
check:false,
},
{
id:3,
title:'保险服务',
check:false,
},
],
disc_money:'',//优惠金额
srv_total:0,//代办费用
srv_ids:[],//代办数组
agencyList:[],
},
//生命周期函数--监听页面加载
@@ -144,7 +130,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{
this.setData({
step:2,
})
@@ -190,48 +201,30 @@ Page({
icon: 'none'
})
}
else if(this.data.packIndex == -1 ){
else if(this.data.srv_ids.length == 0 && this.data.userInfo.biz_type != 3){
wx.showToast({
title: '请选择代办',
title: '请选择代办内容',
icon: 'none'
})
}
// else if(this.data.packIndex == -1 ){
// wx.showToast({
// title: '请选择代办包',
// icon: 'none'
// })
// }
// else if(this.data.mainIndex == -1 ){
// wx.showToast({
// title: '请选择购车主体',
// 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 if(this.data.entrustIndex == 0 && !/^1[3456789]\d{9}$/.test(this.data.entrust_mobile)){
wx.showToast({
title: '请输入正确委托人手机号',
icon: 'none'
})
}
else{
let that = this
@@ -498,6 +491,7 @@ Page({
priceinfo:'',
})
this.getAppSeriesAttrscolor()
this.getAppServices()
}
},
@@ -545,7 +539,7 @@ Page({
this.setData({
paymentIndex:e.detail.value,
})
this.getAppServicesPackage()
//this.getAppServicesPackage()
if(e.detail.value==1){
this.getAppFinance()
}else{
@@ -556,6 +550,8 @@ Page({
financeIndex:-1,
})
}
//代办包
this.getAppServices()
}
},
@@ -606,6 +602,24 @@ Page({
}
},
//获取代办服务列表
getAppServices(){
if(this.data.paymentIndex != -1&&this.data.customerIndex != -1&&this.data.car_id != ''&&this.data.v_id != ''){
let params = {};
params['payway'] = this.data.car_id;
params['cus_id'] = this.data.customer[this.data.customerIndex].id;
params['car_id'] = this.data.car_id;
params['v_id'] = this.data.v_id;
params['page'] = 1;
params['size'] = 100;
_.apiQuery.getAppServices(params).then(res => {
this.setData({
agencyList:res.data.list,
})
});
}
},
//建卡时间
delryTime(e){
this.setData({
@@ -653,7 +667,7 @@ Page({
params['price'] = that.data.priceinfo.price;
params['deposit'] = that.data.priceinfo.deposit;
params['payway'] = that.data.paymentIndex==0?'1':'0';
params['pack_id'] = that.data.pack_id;
//params['pack_id'] = that.data.pack_id;
//params['main_type'] = that.data.mainIndex==0?'0':'1';
params['ifentrust'] = that.data.entrustIndex==0?'1':'0';
params['delry_time'] = that.data.delry_time;
@@ -672,6 +686,12 @@ Page({
if(this.data.inten_money != ''){
params['inten_money'] = this.data.inten_money;
}
if(this.data.disc_money != ''){
params['disc_money'] = this.data.disc_money;
}
if(this.data.srv_ids.length>0){
params['srv_ids'] = this.data.srv_ids;
}
_.apiQuery.postAppCusorder(params).then(res => {
//刷新列表页
@@ -897,4 +917,28 @@ Page({
})
},
//代办相关
changeAgency(e) {
let agencyList = this.data.agencyList
let values = e.detail.value
let srv_total = 0
agencyList.forEach(item1 => {
item1.checked = false
values.forEach(item2 => {
if(item1.id == item2){
item1.checked = true
srv_total = srv_total + item1.price
}
})
})
this.setData({
srv_ids:e.detail.value,
agencyList,
srv_total,
})
},
})
+33 -13
View File
@@ -170,7 +170,7 @@
</picker>
</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{packArray.length>0}}">
<!-- <view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{packArray.length>0}}">
<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="changePack" value="{{packIndex}}" range="{{packArray}}">
@@ -179,7 +179,7 @@
<i class="iconfont ml5 icon-gengduo"></i>
</picker>
</view>
</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 class="pt30 pb30 text-right font-28 color-666">
@@ -190,20 +190,29 @@
</picker>
</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28">
<view class="absolute left-0 box-middle">车身优惠</view>
<view class="relative pr40">
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入车身优惠金额" model:value="{{disc_money}}" />
<view class="absolute right-0 box-middle font-28 color-666">元</view>
</view>
</view>
<view class="bbs-1-eb last-b-none">
<view class="relative pl190">
<view class="absolute left-0 box-middle font-28 color-333">代办相关</view>
<view class="pt30 pb30 text-right font-28 color-666">
当前代办费用:<text class="color-f9394d">2450</text>元
当前代办费用:<text class="color-f9394d">{{srv_total}}</text>元
</view>
</view>
<view class="fn-clear">
<block wx:for="{{agencyList}}" wx:key='index'>
<view class="fn-fl wp31 relative inner30 bg-f6 font-28 ulib-r10 {{index == agencyList.length-1?'':'mr20'}}" bindtap="checkPicker" data-index="{{index}}">
<text>{{item.title}}</text>
<i class="absolute right-0 box-middle mr30 iconfont {{item.check == 1?'icon-fuxuansel color-36afa2':'icon-fuxuankuang color-999'}}"></i>
</view>
</block>
<view class="pb10 fn-clear">
<checkbox-group bindchange="changeAgency">
<block wx:for="{{agencyList}}" wx:key='index'>
<label class="fn-fl block mb20 wp31 relative inner30 bg-f6 font-28 ulib-r10 {{(index+1)%3==0?'':'mr20'}}">
<text>{{item.title}}</text>
<checkbox class="absolute right-0 box-middle mr15" value="{{item.id}}" checked="{{item.checked}}"/>
</label>
</block>
</checkbox-group>
</view>
</view>
</view>
@@ -309,15 +318,26 @@
<view class="absolute left-0 box-middle font-28 color-333">金融机构</view>
<view class="pt30 pb30 text-right font-28 color-666">{{financeArray[financeIndex]}}</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none">
<!-- <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">{{packArray[packIndex]}}</view>
</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">{{delry_time}}</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" style="height:38rpx;">{{disc_money != ''?disc_money:'0'}}</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" style="height:38rpx;">
<block wx:for="{{agencyList}}" wx:key='index'>
<text class="pl10" wx:if="{{item.checked}}">{{item.title}}</text>
</block>
</view>
</view>
<view class="fixed left-0 right-0 bottom-0 bg-fff-op90 inner40 fn-flex safe-pb">
<button class="wp100 bds-2-36afa2 bg-fff mr20 pt10 pb10 text-center font-32 color-36afa2 ulib-r750" hover-class="btn-36afa2-hover" bindtap="optPreview">重新编辑</button>
<button class="wp100 btn-36afa2 ml20 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="postAppCusorder">确认登记</button>
+19 -1
View File
@@ -1 +1,19 @@
/* pages/order/register/index.wxss */
/*复选框外框样式*/
checkbox .wx-checkbox-input {
width:30rpx;
height:30rpx;
border-color: #999;
background: #f6f6f6;
}
/* 选中后的 背景样式*/
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border-color: #36afa2;
background: #36afa2;
}
/*复选框选中后内部样式*/
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
font-size:20rpx;
color:#fff;
transform:translate(-50%, -50%) scale(1);
-webkit-transform:translate(-50%, -50%) scale(1);
}