回访待跟进tab

This commit is contained in:
老叶
2022-06-02 11:17:50 +08:00
parent c3a40e5bf5
commit a81e615f48
4 changed files with 72 additions and 1 deletions
+2
View File
@@ -136,6 +136,8 @@ api = {
appFinanceNums:'app/finance/nums', //获取金融分期期数
appCusorderV2Customer:'app/cusorderV2/customer', //获取客户订单
appCustomersVisit_tabs:'app/customers/visit_tabs', //回访待跟进tab
}
+7
View File
@@ -839,5 +839,12 @@ apiQuery.getAppCusorderV2Customer = function (params) {
})
}
//回访待跟进tab
apiQuery.getAppCustomersVisit_tabs = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appCustomersVisit_tabs, 2, params, "GET", resolve, reject)
})
}
export default apiQuery;
+43 -1
View File
@@ -26,6 +26,8 @@ Page({
level:'',//客户级别
status:'',//客户状态
status_tp:'',
tab:[],//回访待跟进tab
visit_tab_id:'',//回访待跟进tabid
},
onLoad(options) {
for (let key in options) {
@@ -33,7 +35,10 @@ Page({
[key]: options[key]
})
}
this.getAppCustomersList()
//回访待跟进tab
this.getAppCustomersVisit_tabs()
//销售顾问
this.getAppUserAdmins()
@@ -46,6 +51,26 @@ Page({
},
//回访待跟进tab
getAppCustomersVisit_tabs() {
let params = {};
if(this.data.status != ''){
params['status'] = this.data.status;
}
_.apiQuery.getAppCustomersVisit_tabs(params).then(res => {
if(res.data.list.length>0){
this.setData({
tab:res.data.list,
visit_tab_id:res.data.list[0].id,
})
}
this.getAppCustomersList()
wx.stopPullDownRefresh()
});
},
//获取客户列表
getAppCustomersList() {
this.setData({
@@ -103,6 +128,9 @@ Page({
if(this.data.status_tp != ''){
params['status_tp'] = this.data.status_tp;
}
if(this.data.visit_tab_id != ''){
params['visit_tab_id'] = this.data.visit_tab_id;
}
_.apiQuery.getAppCustomersList(params).then(res => {
this.setData({
total: res.data.total,
@@ -292,6 +320,20 @@ Page({
}
},
//切换tab
changeTab(e){
this.setData({
list: [],
pageNo: 1,
noData: false,
end: false,
load: true,
loading: false,
visit_tab_id: e.currentTarget.dataset.id,
})
this.getAppCustomersList()
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
+20
View File
@@ -1,5 +1,25 @@
<view class="container">
<view wx:if="{{tab.length>0}}">
<view style="padding-top:110rpx"></view>
<view class="fixed top-0 left-0 right-0 bg-fff pl30 pr30 z-index-1">
<view class="fn-flex mt5 pl20 pr20 font-32 color-666 text-center" wx:if="{{tab.length<5}}">
<block wx:for='{{tab}}' wx:key='list'>
<view class="fn-flex-item pl20 pr20 tabmenu2 {{visit_tab_id == item.id?'active color-36afa2':''}}" data-id="{{item.id}}" bindtap="changeTab">
<view class="relative">{{item.name}}</view>
</view>
</block>
</view>
<scroll-view class="mt5 font-32 color-666 text-center space-nowrap" scroll-x="true" wx:else>
<block wx:for='{{tab}}' wx:key='list'>
<view class="pl20 pr20 tabmenu2 {{visit_tab_id == item.id?'active color-36afa2':''}}" data-id="{{item.id}}" bindtap="changeTab" >
<view class="relative">{{item.name}}</view>
</view>
</block>
</scroll-view>
</view>
</view>
<view class="mt10 pl30 pr30">
<block wx:for='{{list}}' wx:key='index'>