订单
This commit is contained in:
@@ -32,6 +32,9 @@ api = {
|
||||
appSmsCustomer: "app/sms/customer", //发短信
|
||||
appCustomerlogs: "app/customerlogs", //获取日志
|
||||
appCustomerData: "app/customers/data", //获取客户详细信息
|
||||
|
||||
appCusorder: "app/cusorder", //新建订单 /获取订单列表 /获取订单详情 /修改付款方式
|
||||
appCusorderTabs: "app/cusorder/tabs", //获取tab
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -117,13 +117,20 @@ apiQuery.getAppCustomersTabs = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//获取客户列表 /获取客户详情
|
||||
apiQuery.getAppCustomers = function (params) {
|
||||
//获取客户列表
|
||||
apiQuery.getAppCustomersList = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCustomers, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取客户详情
|
||||
apiQuery.getAppCustomersDetails = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appCustomers, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取列表筛选条件
|
||||
apiQuery.getAppCustomersFilter = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
@@ -166,4 +173,41 @@ apiQuery.getAppCustomerData = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//获取订单列表
|
||||
apiQuery.getAppCusorderList = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCusorder, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取订单详情
|
||||
apiQuery.getAppCusorderDetails = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appCusorder, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//新建订单
|
||||
apiQuery.postAppCusorder = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appCusorder, 2, params, "POST", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//修改付款方式
|
||||
apiQuery.putAppCusorder = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appCusorder, 2, params, "PUT", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取tab
|
||||
apiQuery.getAppCusorderTabs = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCusorderTabs, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default apiQuery;
|
||||
@@ -19,7 +19,11 @@ Page({
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
this.getAppSeriesCars()
|
||||
},
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Page({
|
||||
})
|
||||
}
|
||||
|
||||
this.getAppCustomers()
|
||||
this.getAppCustomersDetails()
|
||||
this.getAppCustomerData()
|
||||
this.getAppCustomerlogs()
|
||||
this.getAppCustomersTabs()
|
||||
@@ -40,10 +40,10 @@ Page({
|
||||
},
|
||||
|
||||
//获取客户详情
|
||||
getAppCustomers(){
|
||||
getAppCustomersDetails(){
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
_.apiQuery.getAppCustomers(params).then(res=>{
|
||||
_.apiQuery.getAppCustomersDetails(params).then(res=>{
|
||||
this.setData({
|
||||
detailinfo:res.data,
|
||||
//statuskey:res.data.status,
|
||||
@@ -248,7 +248,7 @@ Page({
|
||||
load: true,
|
||||
loading: false,
|
||||
})
|
||||
this.getAppCustomers()
|
||||
this.getAppCustomersDetails()
|
||||
this.getAppCustomerData()
|
||||
this.getAppCustomerlogs()
|
||||
},
|
||||
|
||||
@@ -79,7 +79,7 @@ Page({
|
||||
key:this.data.key==''?res.data[0].key:this.data.key,
|
||||
})
|
||||
|
||||
this.getAppCustomers()
|
||||
this.getAppCustomersList()
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
});
|
||||
@@ -119,7 +119,7 @@ Page({
|
||||
},
|
||||
|
||||
//获取客户列表
|
||||
getAppCustomers() {
|
||||
getAppCustomersList() {
|
||||
this.setData({
|
||||
load: false,
|
||||
loading: true,
|
||||
@@ -152,7 +152,7 @@ Page({
|
||||
if(this.data.o_type != ''){
|
||||
params['o_type'] = this.data.o_type;
|
||||
}
|
||||
_.apiQuery.getAppCustomers(params).then(res => {
|
||||
_.apiQuery.getAppCustomersList(params).then(res => {
|
||||
this.setData({
|
||||
flag: this.data.flag - 1
|
||||
})
|
||||
@@ -243,7 +243,7 @@ Page({
|
||||
loading: false,
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppCustomers()
|
||||
this.getAppCustomersList()
|
||||
},
|
||||
|
||||
//排序方式
|
||||
@@ -495,7 +495,7 @@ Page({
|
||||
loading: false,
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppCustomers()
|
||||
this.getAppCustomersList()
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
@@ -504,7 +504,7 @@ Page({
|
||||
this.setData({
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppCustomers()
|
||||
this.getAppCustomersList()
|
||||
},
|
||||
|
||||
})
|
||||
@@ -25,18 +25,18 @@ Page({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
this.getAppCustomersTabs()
|
||||
this.getAppCusorderTabs()
|
||||
},
|
||||
|
||||
//客户-tab
|
||||
getAppCustomersTabs() {
|
||||
_.apiQuery.getAppCustomersTabs().then(res => {
|
||||
getAppCusorderTabs() {
|
||||
_.apiQuery.getAppCusorderTabs().then(res => {
|
||||
this.setData({
|
||||
tab:res.data,
|
||||
key:this.data.key==''?res.data[0].key:this.data.key,
|
||||
})
|
||||
|
||||
this.getAppCustomers()
|
||||
this.getAppCusorderList()
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
});
|
||||
@@ -51,7 +51,7 @@ Page({
|
||||
},
|
||||
|
||||
//获取客户列表
|
||||
getAppCustomers() {
|
||||
getAppCusorderList() {
|
||||
this.setData({
|
||||
load: false,
|
||||
loading: true,
|
||||
@@ -63,7 +63,7 @@ Page({
|
||||
if(this.data.searchInp.value != ''){
|
||||
params['keyword'] = this.data.searchInp.value;
|
||||
}
|
||||
_.apiQuery.getAppCustomers(params).then(res => {
|
||||
_.apiQuery.getAppCusorderList(params).then(res => {
|
||||
this.setData({
|
||||
flag: this.data.flag - 1
|
||||
})
|
||||
@@ -135,7 +135,7 @@ Page({
|
||||
loading: false,
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppCustomers()
|
||||
this.getAppCusorderList()
|
||||
},
|
||||
|
||||
//显示短信弹框
|
||||
@@ -209,7 +209,7 @@ Page({
|
||||
loading: false,
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppCustomers()
|
||||
this.getAppCusorderList()
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
@@ -218,7 +218,7 @@ Page({
|
||||
this.setData({
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppCustomers()
|
||||
this.getAppCusorderList()
|
||||
},
|
||||
|
||||
})
|
||||
+6
-113
@@ -11,11 +11,13 @@
|
||||
</block>
|
||||
</view>
|
||||
<scroll-view class="mt5 font-28 color-666 text-center space-nowrap" scroll-x="true" wx:else>
|
||||
<view class="pl20 inline-block"></view>
|
||||
<block wx:for='{{tab}}' wx:key='list'>
|
||||
<view class="pl20 pr20 tabmenu2 {{key == item.key?'active color-36afa2':''}}" data-index="{{index}}" bindtap="changeTab" >
|
||||
<view class="relative">{{item.name}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="pl40 inline-block"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -38,12 +40,7 @@
|
||||
<text>({{item.mobile}})</text>
|
||||
</view>
|
||||
<view class="text-nowrap">
|
||||
<block wx:for="{{item.tags}}" wx:for-index='i' wx:for-item='tag' wx:key='i'>
|
||||
<text class="inline-block mr10 pl10 pr10 bg-666 font-18 color-fff ulib-r750" wx:if="{{i<4}}">{{tag}}</text>
|
||||
</block>
|
||||
<block wx:if="{{item.tags.length>4}}">
|
||||
...
|
||||
</block>
|
||||
<text class="inline-block mr10 pl10 pr10 bg-666 font-18 color-fff ulib-r750">{{item.status_name}}</text>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{item.id}}">
|
||||
@@ -73,115 +70,11 @@
|
||||
<lcb-msg isShow="{{isShowMessage}}">
|
||||
<view slot="content">
|
||||
<view class="inner40">
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" placeholder-class="color-ccc" maxlength='100' placeholder="请输入短信内容" bindinput='inputTx' data-key="uname" name='uname' value='{{uname}}' />
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" placeholder-class="color-ccc" maxlength='100' placeholder="请输入短信内容" bindinput='inputTx' data-key="content" name='content' value='{{content}}' />
|
||||
</view>
|
||||
<view class="fn-flex bts-1-eb text-center font-32 color-666">
|
||||
<view class="fn-flex-item pt25 pb25" bindtap="hideMessage">取消</view>
|
||||
<view class="fn-flex-item bls-1-eb pt25 pb25 color-36afa2" bindtap="hideMessage">确定</view>
|
||||
<view class="fn-flex-item bls-1-eb pt25 pb25 color-36afa2" disabled="{{!submitFlag}}" bindtap="postAppSmsCustomer">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
<view class="search-sort {{!isClickSort?'fn-hide':''}} {{!isShowSort?'sortout':'sortin'}} bg-fff fixed top-0 bottom-0 z-index-2 ulib-rl20 overflowhidden">
|
||||
<scroll-view class="wp100" scroll-y="true" style="height:100%">
|
||||
<view class="inner30">
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28">建卡开始时间</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 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">建卡结束时间</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pt30 pb30 last-b-none">
|
||||
<view class="font-22">常用时间段</view>
|
||||
<view class="fn-clear">
|
||||
<block wx:for="{{timeSlot}}" wx:key='index'>
|
||||
<view class="inline-block radio-btn mt20 mr20 pt15 pb15 pl25 pr25 ulib-r10 font-28 {{timeSlotIndex == index?'bg-333 color-fff':'bg-f8'}}" bindtap="radioPicker" data-type="timeSlot" data-index="{{index}}">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pt30 pb30 last-b-none">
|
||||
<view class="font-22">是否试驾</view>
|
||||
<view class="fn-clear">
|
||||
<block wx:for="{{testDrive}}" wx:key='index'>
|
||||
<view class="inline-block radio-btn mt20 mr20 pt15 pb15 pl25 pr25 ulib-r10 font-28 {{testDriveIndex == index?'bg-333 color-fff':'bg-f8'}}" bindtap="radioPicker" data-type="testDrive" data-index="{{index}}">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28">意向等级</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 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">意向车名</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 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">车型级别</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 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">客户来源</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 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">到店次数</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pt50 pb100"></view>
|
||||
</scroll-view>
|
||||
<view class="absolute left-0 bottom-0 right-0 fn-flex pt20 pb20 pl60 pr60 bg-fff-op90 text-center">
|
||||
<view class="fn-flex-item mr20 pt15 pb15 bds-2-36afa2 font-32 color-36afa2 ulib-r750" bindtap="resetsearch">重置</view>
|
||||
<view class="fn-flex-item ml20 pt15 pb15 bg-36afa2 font-32 color-fff ulib-r750" bindtap="hidesearch">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-bg fixed left-0 right-0 top-0 bottom-0" hidden="{{!isShowSort}}" style="background-color:rgba(0,0,0,.5);" bindtap="hidesearch"></view>
|
||||
</lcb-msg>
|
||||
+250
-39
@@ -1,54 +1,258 @@
|
||||
// pages/order/register/index.js
|
||||
import _ from '../../../commons/js/commons'
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
customerIndex:0,
|
||||
customer:[
|
||||
{
|
||||
"id":0,
|
||||
"title":"林先生",
|
||||
'tel':"134*****382",
|
||||
},
|
||||
{
|
||||
"id":1,
|
||||
"title":"欧泰票",
|
||||
'tel':"134*****382",
|
||||
},
|
||||
{
|
||||
"id":2,
|
||||
"title":"史蒂夫",
|
||||
'tel':"134*****382",
|
||||
},
|
||||
{
|
||||
"id":3,
|
||||
"title":"林先生",
|
||||
'tel':"134*****382",
|
||||
},
|
||||
{
|
||||
"id":4,
|
||||
"title":"欧泰票",
|
||||
'tel':"134*****382",
|
||||
},
|
||||
{
|
||||
"id":5,
|
||||
"title":"史蒂夫",
|
||||
'tel':"134*****382",
|
||||
},
|
||||
],
|
||||
car_id:'',//车型id
|
||||
v_id:'',//车型级别id
|
||||
color_id:'',//颜色id
|
||||
b_s_id:'',//备选车型id
|
||||
buy_time:'',//预计购车时间
|
||||
modelIndex:-1,//品牌车型索引
|
||||
spareIndex:-1,//备选车型索引
|
||||
colorArray:[],//车型颜色列表
|
||||
levelArray:[],//车型级别列表
|
||||
colorIndex:-1,//车型颜色索引
|
||||
levelIndex:-1,//车型级别索引
|
||||
submitFlag:false,
|
||||
|
||||
customerIndex:-1,
|
||||
customer: [],//客户列表
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
isShowSelectCustomer:false,
|
||||
|
||||
paymentIndex:-1,
|
||||
payment:['全款', '分期',],
|
||||
|
||||
agencyIndex:-1,
|
||||
agency:['需要', '不需要',],
|
||||
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
this.getAppCustomersList()
|
||||
this.getAppSeriesCars()
|
||||
|
||||
},
|
||||
|
||||
//单选
|
||||
//获取客户列表
|
||||
getAppCustomersList(){
|
||||
this.setData({
|
||||
load: false,
|
||||
loading: true,
|
||||
})
|
||||
let params = {};
|
||||
params['page'] = this.data.pageNo;
|
||||
params['size'] = 20;
|
||||
_.apiQuery.getAppCustomersList(params).then(res => {
|
||||
this.setData({
|
||||
pageNo: this.data.pageNo + 1,
|
||||
customer: this.data.customer.concat(res.data.list),
|
||||
load: true,
|
||||
loading: false,
|
||||
})
|
||||
if (res.data.total == 0) {
|
||||
this.setData({
|
||||
noData: true
|
||||
})
|
||||
} else if (this.data.customer.length == res.data.total) {
|
||||
this.setData({
|
||||
end: true
|
||||
})
|
||||
}
|
||||
wx.stopPullDownRefresh()
|
||||
});
|
||||
},
|
||||
|
||||
//获取车型库
|
||||
getAppSeriesCars(){
|
||||
_.apiQuery.getAppSeriesCars().then(res => {
|
||||
if(res.data.length>0){
|
||||
let modelArray = []
|
||||
res.data.forEach(item => {
|
||||
modelArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
modelArray:modelArray,
|
||||
modelList:res.data,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取车型属性 /颜色 /车型级别
|
||||
getAppSeriesAttrs(){
|
||||
let params1 = {};
|
||||
params1['id'] = this.data.car_id;
|
||||
params1['type'] = 0;
|
||||
_.apiQuery.getAppSeriesAttrs(params1).then(res => {
|
||||
if(res.data.total>0){
|
||||
let colorArray = []
|
||||
res.data.list.forEach(item => {
|
||||
colorArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
colorArray:colorArray,
|
||||
colorList:res.data.list,
|
||||
colorIndex:-1,
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
let params2 = {};
|
||||
params2['id'] = this.data.car_id;
|
||||
params2['type'] = 1;
|
||||
_.apiQuery.getAppSeriesAttrs(params2).then(res => {
|
||||
if(res.data.total>0){
|
||||
let levelArray = []
|
||||
res.data.list.forEach(item => {
|
||||
levelArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
levelArray:levelArray,
|
||||
levelList:res.data.list,
|
||||
levelIndex:-1,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//选择车型
|
||||
changeModel(e) {
|
||||
let car_id = ''
|
||||
if(e.detail.value >= 0){
|
||||
car_id = this.data.modelList[e.detail.value].id
|
||||
}
|
||||
this.setData({
|
||||
car_id:car_id,
|
||||
modelIndex:e.detail.value,
|
||||
})
|
||||
if(car_id != ''){
|
||||
this.getAppSeriesAttrs()
|
||||
}
|
||||
},
|
||||
|
||||
//车型级别
|
||||
changeLevel(e) {
|
||||
let v_id = ''
|
||||
if(e.detail.value >= 0){
|
||||
v_id = this.data.levelList[e.detail.value].id
|
||||
}
|
||||
this.setData({
|
||||
v_id:v_id,
|
||||
levelIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//车型颜色
|
||||
changeColor(e) {
|
||||
let color_id = ''
|
||||
if(e.detail.value >= 0){
|
||||
color_id = this.data.colorList[e.detail.value].id
|
||||
}
|
||||
this.setData({
|
||||
color_id:color_id,
|
||||
colorIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//付款方式
|
||||
changePayment(e) {
|
||||
this.setData({
|
||||
paymentIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//代办车牌
|
||||
changeAgency(e) {
|
||||
this.setData({
|
||||
agencyIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//新建订单
|
||||
postAppCusorder() {
|
||||
let that = this
|
||||
if (that.data.customerIndex == -1 ) {
|
||||
wx.showToast({
|
||||
title: '请选择客户',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.car_id == '' ){
|
||||
wx.showToast({
|
||||
title: '请选择品牌车型',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.v_id == '' ){
|
||||
wx.showToast({
|
||||
title: '请选择车型级别',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.color_id == '' ){
|
||||
wx.showToast({
|
||||
title: '请选择车型颜色',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.paymentIndex == -1 ){
|
||||
wx.showToast({
|
||||
title: '请选择付款方式',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.agencyIndex == -1 ){
|
||||
wx.showToast({
|
||||
title: '请选择是否代办车牌',
|
||||
icon: 'none'
|
||||
})
|
||||
} else{
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
let params = {};
|
||||
params['cus_id'] = that.data.customer[that.data.customerIndex].id;
|
||||
params['car_id'] = that.data.car_id;
|
||||
params['v_id'] = that.data.v_id;
|
||||
params['color_id'] = that.data.color_id;
|
||||
|
||||
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';
|
||||
_.apiQuery.postAppCusorder(params).then(res => {
|
||||
wx.showModal({
|
||||
title: '登记成功',
|
||||
content: '',
|
||||
confirmText: "查看详情",
|
||||
confirmColor: "#36afa2",
|
||||
showCancel:false,
|
||||
success() {
|
||||
wx.redirectTo({
|
||||
url: '/pages/order/detail/index?id=' + res.data.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(res=>{
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//选择客户
|
||||
radioPicker(e){
|
||||
if(e.currentTarget.dataset.id != this.data.statusid){
|
||||
if(e.currentTarget.dataset.index != this.data.customerIndex){
|
||||
this.setData({
|
||||
isSubmiting: false,
|
||||
customerIndex:e.currentTarget.dataset.id,
|
||||
customerIndex:e.currentTarget.dataset.index,
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -66,4 +270,11 @@ Page({
|
||||
isShowSelectCustomer:false,
|
||||
})
|
||||
},
|
||||
|
||||
//客户列表上拉触底事件的处理函数
|
||||
scrolltolower(e) {
|
||||
if (this.data.noData || this.data.end||!this.data.load) return;
|
||||
this.getAppCustomersList()
|
||||
},
|
||||
|
||||
})
|
||||
@@ -4,11 +4,11 @@
|
||||
<view class="fn-fl"><i class="iconfont icon-yonghu mr10"></i>用户信息</view>
|
||||
<view class="fn-fr">销售顾问:<text class="color-36afa2">王小胖</text></view>
|
||||
</view>
|
||||
<view class="mt30 pl40 pr40 pt10 pb10 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
|
||||
<view class="mt30 pl40 pr40 pt10 pb10 relative ulib-r10 box-shadow-000-10-10 overflowhidden" bindtap="showSelectCustomer">
|
||||
<view class="pt50 pb50 font-28" wx:if="{{customerIndex == -1}}">请选择客户</view>
|
||||
<view class="pt30 pb30 font-28" wx:else>
|
||||
<view class="font-32">{{customer[customerIndex].title}}</view>
|
||||
<view class="mt5 font-22 color-666">手机号:{{customer[customerIndex].tel}}</view>
|
||||
<view class="font-32">{{customer[customerIndex].name}}</view>
|
||||
<view class="mt5 font-22 color-666">手机号:{{customer[customerIndex].mobile}}</view>
|
||||
</view>
|
||||
<i class="absolute right-0 box-middle iconfont mr30 icon-gengduo font-28 color-666"></i>
|
||||
</view>
|
||||
@@ -18,34 +18,34 @@
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28">品牌车型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<picker bindchange="changeModel" value="{{modelIndex}}" range="{{modelArray}}">
|
||||
<text class="color-ccc" wx:if="{{modelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{modelArray[modelIndex]}}</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">车型级别</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<picker bindchange="changeLevel" value="{{levelIndex}}" range="{{levelArray}}">
|
||||
<text class="color-ccc" wx:if="{{levelIndex == -1}}">{{levelArray.length == 0?'请先选择品牌车型':'请选择'}}</text>
|
||||
<text wx:else>{{levelArray[levelIndex]}}</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">颜色</view>
|
||||
<view class="absolute left-0 box-middle font-28">车型颜色</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<picker bindchange="changeColor" value="{{colorIndex}}" range="{{colorArray}}">
|
||||
<text class="color-ccc" wx:if="{{colorIndex == -1}}">{{colorArray.length == 0?'请先选择品牌车型':'请选择'}}</text>
|
||||
<text wx:else>{{colorArray[colorIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</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">内饰颜色</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
@@ -54,28 +54,42 @@
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">车辆指导价</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">35,235.00元</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;">
|
||||
<text wx:if="{{levelIndex != -1}}">{{levelList[levelIndex].price}}元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">定金</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">5000.00元</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="height:38rpx;">
|
||||
<text wx:if="{{levelIndex != -1}}">{{levelList[levelIndex].deposit}}元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28">付款方式</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<picker bindchange="changePayment" value="{{paymentIndex}}" range="{{payment}}">
|
||||
<text class="color-ccc" wx:if="{{paymentIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{payment[paymentIndex]}}</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">代办车牌</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>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<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="putaddStaff">下一步</button>
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="postAppCustomers">确认登记</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -85,12 +99,12 @@
|
||||
<lcb-msg isShow="{{isShowSelectCustomer}}">
|
||||
<view slot="content">
|
||||
<view class="mt50 font-36 text-center">选择客户</view>
|
||||
<scroll-view class="pb50" scroll-y="true" style="max-height:600rpx;">
|
||||
<scroll-view class="pb50" scroll-y="true" bindscrolltolower="scrolltolower" style="max-height:600rpx;">
|
||||
<view class="pl40 pr40 mt20">
|
||||
<block wx:for="{{customer}}" wx:key='index'>
|
||||
<view class="relative mt20 inner30 bg-f6 ulib-r10" bindtap="radioPicker" data-id="{{item.id}}">
|
||||
<view class="font-32">{{item.title}}</view>
|
||||
<view class="mt5 font-22 color-666">手机号:{{item.tel}}</view>
|
||||
<view class="relative mt20 inner30 bg-f6 ulib-r10" bindtap="radioPicker" data-index="{{index}}">
|
||||
<view class="font-32">{{item.name}}</view>
|
||||
<view class="mt5 font-22 color-666">手机号:{{item.mobile}}</view>
|
||||
<i class="absolute right-0 box-middle mr30 iconfont {{customerIndex == index?'icon-danxuan_xuanzhong color-36afa2':'icon-danxuan'}}"></i>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
Reference in New Issue
Block a user