订单修改
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
/**app.wxss**/
|
||||
@import "commons/css/common.wxss";
|
||||
@import "commons/css/common.wxss";
|
||||
page{
|
||||
background-color:#fff;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ api = {
|
||||
appSmsCusorder: "app/sms/cusorder", //订单发短信
|
||||
appCustomerlogs: "app/customerlogs", //获取日志
|
||||
appCustomerData: "app/customers/data", //获取客户详细信息
|
||||
appCusorder: "app/cusorder", //新建订单 /获取订单列表 /获取订单详情 /修改付款方式
|
||||
appCusorder: "app/cusorder", //新建订单 /获取订单列表 /获取订单详情 /修改付款方式 /修改委托协议
|
||||
appCusorderTabs: "app/cusorder/tabs", //获取tab
|
||||
appEmployees: "app/employees", //获取客户详细信息 /获取店员列表 /更新店员信息 /删除店员
|
||||
appLoan: "app/loan", //获取贷款产品信息 /创建贷款信息 /修改贷款信息
|
||||
@@ -45,7 +45,7 @@ api = {
|
||||
appXz: "app/xz", //获取虚拟电话
|
||||
appCustomerlogs: "app/customerlogs", //新增日志
|
||||
appCustomerData: "app/customers/data", //修改客户基本信息
|
||||
|
||||
appServicesPackage: "app/services/package", //获取代办包
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ apiQuery.postAppCusorder = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//修改付款方式
|
||||
//修改付款方式 /修改委托协议
|
||||
apiQuery.putAppCusorder = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appCusorder, 2, params, "PUT", resolve, reject)
|
||||
@@ -320,4 +320,11 @@ apiQuery.putAppCustomerData = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//获取代办包
|
||||
apiQuery.getAppServicesPackage = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appServicesPackage, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
@@ -15,6 +15,7 @@ Page({
|
||||
},
|
||||
],
|
||||
isShowSelectContract:false,
|
||||
isShowSelectEntrust:false,
|
||||
banksIndex:-1,//分期银行
|
||||
yearsIndex:-1,//分期年限
|
||||
money:'',//贷款金额
|
||||
@@ -40,6 +41,7 @@ Page({
|
||||
|
||||
this.getAppCusorderDetails()
|
||||
this.getUserInfo()
|
||||
this.getAppServicesPackage()
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
@@ -63,6 +65,7 @@ Page({
|
||||
this.setData({
|
||||
info:res.data,
|
||||
payway:res.data.payway,
|
||||
pack_id:res.data.pack_id,
|
||||
})
|
||||
|
||||
this.getAppLoan()
|
||||
@@ -107,6 +110,18 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//获取代办包
|
||||
getAppServicesPackage(){
|
||||
let params = {};
|
||||
params['page'] = 1;
|
||||
params['size'] = 100;
|
||||
_.apiQuery.getAppServicesPackage(params).then(res => {
|
||||
this.setData({
|
||||
packList:res.data.list,
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//显示短信弹框
|
||||
showMessage(e){
|
||||
this.setData({
|
||||
@@ -161,10 +176,18 @@ Page({
|
||||
|
||||
//单选
|
||||
radioPicker(e){
|
||||
if(e.currentTarget.dataset.id != this.data.payway){
|
||||
this.setData({
|
||||
payway:e.currentTarget.dataset.id,
|
||||
})
|
||||
if(e.currentTarget.dataset.type == 'payway'){
|
||||
if(e.currentTarget.dataset.id != this.data.payway){
|
||||
this.setData({
|
||||
payway:e.currentTarget.dataset.id,
|
||||
})
|
||||
}
|
||||
}else if(e.currentTarget.dataset.type == 'pack'){
|
||||
if(e.currentTarget.dataset.id != this.data.pack_id){
|
||||
this.setData({
|
||||
pack_id:e.currentTarget.dataset.id,
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -189,8 +212,15 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//显示选择委托
|
||||
optSelectEntrust(){
|
||||
this.setData({
|
||||
isShowSelectEntrust:!this.data.isShowSelectEntrust,
|
||||
})
|
||||
},
|
||||
|
||||
//修改付款方式
|
||||
putAppCusorder(){
|
||||
putAppCusorderPay(){
|
||||
if(this.data.payway == this.data.info.payway){
|
||||
this.setData({
|
||||
isShowSelectContract:false,
|
||||
@@ -212,6 +242,29 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//修改委托协议
|
||||
putAppCusorderPack(){
|
||||
if(this.data.pack_id == this.data.info.pack_id){
|
||||
this.setData({
|
||||
isShowSelectEntrust:false,
|
||||
})
|
||||
}else{
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
params['pack_id'] = this.data.pack_id;
|
||||
_.apiQuery.putAppCusorder(params).then(res => {
|
||||
this.getAppCusorderDetails()
|
||||
this.setData({
|
||||
isShowSelectEntrust:false,
|
||||
})
|
||||
}).catch(res=>{
|
||||
this.setData({
|
||||
isShowSelectEntrust:false,
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//创建贷款信息
|
||||
postAppLoan() {
|
||||
let that = this
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<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="absolute left-0 box-middle font-28 color-333">{{key}}</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{value}}{{key == '车辆合同售价格' || key == '定金'?'元':'' }}</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx">{{value}}{{key == '车辆合同售价格' || key == '定金'?'元':'' }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -31,8 +31,8 @@
|
||||
<view class="font-32">合同信息</view>
|
||||
<view bindtap="optShowCode" class="absolute right-0 box-middle pt10 pb10 pl10 pr30 space-nowrap bg-333 font-22 color-fff ulib-rl750"><i class="iconfont mr5 icon-qianming"></i>邀请签名</view>
|
||||
</view>
|
||||
<view class="fn-flex mt30 pl30 pr30 text-center" bindtap="optSelectContract">
|
||||
<view class="fn-flex-item relative mr10 bg-f8 ulib-r10 overflowhidden">
|
||||
<view class="fn-flex mt30 pl30 pr30 text-center">
|
||||
<view class="fn-flex-item relative mr10 bg-f8 ulib-r10 overflowhidden" bindtap="optSelectContract">
|
||||
<view class="pt30 pb30 pr100 font-32">整车销售合同</view>
|
||||
<view class="absolute top-0 bottom-0 right-0 bg-666 pl10 pr10 color-fff">
|
||||
<view class="relative pb10 box-center-middle">
|
||||
@@ -41,8 +41,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fn-flex-item relative ml10 bg-f8 ulib-r10">
|
||||
<view class="pt30 pb30 font-32">委托服务协议</view>
|
||||
<view class="fn-flex-item relative ml10 bg-f8 ulib-r10 overflowhidden" bindtap="optSelectEntrust">
|
||||
<view class="pt30 pb30 pr100 font-32">委托服务协议</view>
|
||||
<view class="absolute top-0 bottom-0 right-0 bg-666 pl10 pr10 color-fff">
|
||||
<view class="relative pb10 box-center-middle">
|
||||
<i class="iconfont icon-xiugai font-30"></i>
|
||||
<view class="font-18 space-nowrap">修订委托</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -144,7 +150,7 @@
|
||||
<scroll-view class="pb50" scroll-y="true" style="max-height:600rpx;">
|
||||
<view class="pl40 pr40 mt20">
|
||||
<block wx:for="{{contract}}" wx:key='index'>
|
||||
<view class="relative mt20 inner30 bg-f6 ulib-r10" bindtap="radioPicker" data-id="{{item.id}}">
|
||||
<view class="relative mt20 inner30 bg-f6 ulib-r10" bindtap="radioPicker" data-type="payway" data-id="{{item.id}}">
|
||||
<view class="font-32">{{item.title}}</view>
|
||||
<i class="absolute right-0 box-middle mr30 iconfont {{payway == item.id?'icon-danxuan_xuanzhong color-36afa2':'icon-danxuan'}}"></i>
|
||||
</view>
|
||||
@@ -153,7 +159,27 @@
|
||||
</scroll-view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="optSelectContract" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
<button bindtap="putAppCusorder" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
|
||||
<button bindtap="putAppCusorderPay" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
<lcb-msg isShow="{{isShowSelectEntrust}}">
|
||||
<view slot="content">
|
||||
<view class="mt50 font-36 text-center">修订委托</view>
|
||||
<scroll-view class="pb50" scroll-y="true" style="max-height:600rpx;">
|
||||
<view class="pl40 pr40 mt20">
|
||||
<block wx:for="{{packList}}" wx:key='index'>
|
||||
<view class="relative mt20 inner30 bg-f6 ulib-r10" bindtap="radioPicker" data-type="pack" data-id="{{item.id}}">
|
||||
<view class="font-32">{{item.title}}</view>
|
||||
<i class="absolute right-0 box-middle mr30 iconfont {{pack_id == item.id?'icon-danxuan_xuanzhong color-36afa2':'icon-danxuan'}}"></i>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="optSelectEntrust" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
<button bindtap="putAppCusorderPack" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
@@ -13,6 +13,8 @@ Page({
|
||||
colorArray:[],//车型颜色列表
|
||||
levelArray:[],//车型级别列表
|
||||
interiorArray:[],//内饰颜色
|
||||
packArray:[],//代办包
|
||||
packIndex:-1,//代办包索引
|
||||
colorIndex:-1,//车型颜色索引
|
||||
levelIndex:-1,//车型级别索引
|
||||
interiorIndex:-1,//内饰颜色索引
|
||||
@@ -27,11 +29,14 @@ Page({
|
||||
loading: false,
|
||||
isShowSelectCustomer:false,
|
||||
|
||||
paymentIndex:-1,
|
||||
paymentIndex:-1,//付款方式
|
||||
payment:['全款', '分期',],
|
||||
|
||||
// agencyIndex:-1,
|
||||
// agency:['需要', '不需要',],
|
||||
mainIndex:-1,//购车主体
|
||||
main:['个人', '公司',],
|
||||
entrustIndex:-1,//是否委托
|
||||
entrust:['是','否',],
|
||||
entrust_name:'',//委托人姓名
|
||||
entrust_idcard:'',//委托人身份证
|
||||
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
@@ -44,6 +49,7 @@ Page({
|
||||
|
||||
this.getAppCustomersList()
|
||||
this.getAppSeriesCars()
|
||||
this.getAppServicesPackage()
|
||||
this.getUserInfo()
|
||||
|
||||
},
|
||||
@@ -158,6 +164,25 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
//获取代办包
|
||||
getAppServicesPackage(){
|
||||
let params = {};
|
||||
params['page'] = 1;
|
||||
params['size'] = 100;
|
||||
_.apiQuery.getAppServicesPackage(params).then(res => {
|
||||
if(res.data.list.length>0){
|
||||
let packArray = []
|
||||
res.data.list.forEach(item => {
|
||||
packArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
packArray:packArray,
|
||||
packList:res.data.list,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//选择车型
|
||||
changeModel(e) {
|
||||
let car_id = ''
|
||||
@@ -209,6 +234,18 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//代办包
|
||||
changePack(e) {
|
||||
let pack_id = ''
|
||||
if(e.detail.value >= 0){
|
||||
pack_id = this.data.packList[e.detail.value].id
|
||||
}
|
||||
this.setData({
|
||||
pack_id:pack_id,
|
||||
packIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//付款方式
|
||||
changePayment(e) {
|
||||
this.setData({
|
||||
@@ -216,10 +253,19 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//代办车牌
|
||||
changeAgency(e) {
|
||||
//购车主体
|
||||
changeMain(e) {
|
||||
this.setData({
|
||||
agencyIndex:e.detail.value,
|
||||
mainIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//是否委托
|
||||
changeEntrust(e) {
|
||||
this.setData({
|
||||
entrustIndex:e.detail.value,
|
||||
entrust_name:'',
|
||||
entrust_idcard:'',
|
||||
})
|
||||
},
|
||||
|
||||
@@ -256,14 +302,32 @@ Page({
|
||||
title: '请选择付款方式',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
// else if(that.data.agencyIndex == -1 ){
|
||||
// wx.showToast({
|
||||
// title: '请选择是否代办车牌',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
else{
|
||||
}else if(that.data.packIndex == -1 ){
|
||||
wx.showToast({
|
||||
title: '请选择代办包',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.mainIndex == -1 ){
|
||||
wx.showToast({
|
||||
title: '请选择购车主体',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.entrustIndex == -1 ){
|
||||
wx.showToast({
|
||||
title: '请选择是否委托',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.entrustIndex == 0 && that.data.entrust_name == ''){
|
||||
wx.showToast({
|
||||
title: '请填写委托人姓名',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.entrustIndex == 0 && (that.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(that.data.entrust_idcard))){
|
||||
wx.showToast({
|
||||
title: '请填写正确委托人身份证',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
@@ -276,7 +340,15 @@ Page({
|
||||
params['price'] = that.data.levelList[that.data.levelIndex].price;
|
||||
params['deposit'] = that.data.levelList[that.data.levelIndex].deposit;
|
||||
params['payway'] = that.data.paymentIndex==0?'1':'0';
|
||||
// params['if_cnum'] = that.data.agencyIndex==0?'1':'0';
|
||||
params['pack_id'] = that.data.pack_id;
|
||||
params['main_type'] = that.data.mainIndex==0?'0':'1';
|
||||
params['ifentrust'] = that.data.entrustIndex==0?'1':'0';
|
||||
if(this.data.entrust_name != ''){
|
||||
params['entrust_name'] = this.data.entrust_name;
|
||||
}
|
||||
if(this.data.entrust_idcard != ''){
|
||||
params['entrust_idcard'] = this.data.entrust_idcard;
|
||||
}
|
||||
_.apiQuery.postAppCusorder(params).then(res => {
|
||||
|
||||
//刷新列表页
|
||||
@@ -309,6 +381,13 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//输入
|
||||
inputTx(e) {
|
||||
this.setData({
|
||||
[e.currentTarget.dataset.key]: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//选择客户
|
||||
radioPicker(e){
|
||||
if(e.currentTarget.dataset.index != this.data.customerIndex){
|
||||
|
||||
@@ -75,16 +75,50 @@
|
||||
</picker>
|
||||
</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="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">
|
||||
<picker bindchange="changeAgency" value="{{agencyIndex}}" range="{{agency}}">
|
||||
<text class="color-ccc" wx:if="{{agencyIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{agency[agencyIndex]}}</text>
|
||||
<picker bindchange="changePack" value="{{packIndex}}" range="{{packArray}}">
|
||||
<text class="color-ccc" wx:if="{{packIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{packArray[packIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</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">
|
||||
<picker bindchange="changeMain" value="{{mainIndex}}" range="{{main}}">
|
||||
<text class="color-ccc" wx:if="{{mainIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{main[mainIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</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">
|
||||
<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 pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">委托人姓名</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 pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">委托人身份证</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="mt60 pl60 pr60">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="postAppCusorder">确认登记</button>
|
||||
|
||||
Reference in New Issue
Block a user