数据看板

This commit is contained in:
老叶
2022-10-17 16:23:17 +08:00
parent 4261b03e82
commit e75cf13e85
6 changed files with 94 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
const env = "p";
const env = "d";
const version = 1,
+1 -1
View File
@@ -47,7 +47,7 @@ Page({
})
}
//回访待跟进tab
//顶部tab
this.getAppCustomersVisit_tabs()
//销售顾问
+25 -2
View File
@@ -23,7 +23,7 @@
<view class="mt10 pl30 pr30">
<block wx:for='{{list}}' wx:key='index'>
<view class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden" bindtap="pushLink" data-url="/pages/customer/detail/index?id={{item.id}}">
<view wx:if="{{item.complete_mobile}}" class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden" bindtap="pushLink" data-url="/pages/customer/detail/index?id={{item.id}}">
<view class="absolute top-0 left-0 ml40 bg-36afa2 font-22 color-fff">
<text class="pl10 pr10" wx:if="{{item.tip}}">{{item.tip}}</text>
<text class="pl10 pr10 {{item.defeat?'bls-1-eb':''}}" wx:if="{{item.defeat}}">{{item.defeat}}</text>
@@ -68,7 +68,30 @@
<view wx:else class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
</view>
</block>
</view>
<view wx:elif="{{item.nickname}}" class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden">
<view class="absolute top-0 left-0 ml40 bg-36afa2 font-22 color-fff">
<text class="pl10 pr10" wx:if="{{item.tip}}">{{item.tip}}</text>
<text class="pl10 pr10 {{item.defeat?'bls-1-eb':''}}" wx:if="{{item.defeat}}">{{item.defeat}}</text>
<text class="pl10 pr10 {{item.orders_pay?'bls-1-eb':''}}" wx:if="{{item.orders_pay}}">{{item.orders_pay}}</text>
</view>
<view class="text-nowrap">
<image class='img-50x50 bds-1-eb ulib-r750 text-middle' lazy-load="{{true}}" mode="scaleToFill" src="{{item.avatar}}"></image>
<text class="pl10 text-middle font-26">{{item.nickname}}</text>
</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="fn-fl color-333">{{key}}</view>
<block wx:if="{{key=='销售顾问'}}">
<view class="fn-fr wp60 text-nowrap text-right">
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
<text class="text-middle color-f9394d" wx:else>待分配</text>
<text class="inline-block ml10 bg-36afa2 pt5 pb5 pl15 pr15 text-middle font-22 color-fff ulib-r10" catchtap="optEmployees" data-cid="{{item.id}}" data-level="{{item.level}}" wx:if="{{item.allot == 1}}">{{value?'重新分配':'分配'}}</text>
</view>
</block>
<view wx:else class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
</view>
</block>
</view>
</block>
<lcb-listmore isLoading='{{loading}}' isEnd='{{end}}' isNoData='{{noData}}'></lcb-listmore>
+1 -1
View File
@@ -43,7 +43,7 @@
<view class="font-36">数据看板</view>
<view class="fn-flex fn-flex-wrap pt20 pb10 text-center">
<block wx:for="{{userCal.statistics}}" wx:key='index'>
<view class="wp33 relative pt20 pb20 {{index>2?'bts-1-eb':''}} {{index%3==2?'':'brs-1-eb'}}">
<view class="wp33 relative pt20 pb20 {{index>2?'bts-1-eb':''}} {{index%3==2?'':'brs-1-eb'}}" bindtap="pushLink" data-url="{{item.today.url}}">
<view class="text-bold"><text class="font-36">{{item.today.value}}</text><text class="font-28 color-666">/{{item.month.value}}</text></view>
<view class="font-22"><text>{{item.today.title}}</text><text class="color-666">/{{item.month.title}}</text></view>
</view>
+45 -1
View File
@@ -19,6 +19,9 @@ Page({
staffobj: [],
employeeIndex:-1,//分配销售索引
employee_id:'',//分配销售ID
tab:[],//回访待跟进tab
visit_tab_id:'',//回访待跟进tabid
},
onLoad: function (options) {
for (let key in options) {
@@ -26,7 +29,11 @@ Page({
[key]: options[key]
})
}
this.getAppCusorderV2List()
//顶部tab
this.getAppCustomersVisit_tabs()
//this.getAppCusorderV2List()
wx.setNavigationBarTitle({
title: this.data.title||'订单'
@@ -36,6 +43,26 @@ Page({
this.getAppUserAdmins()
},
//回访待跟进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.getAppCusorderV2List()
wx.stopPullDownRefresh()
});
},
//获取订单列表
getAppCusorderV2List() {
this.setData({
@@ -51,6 +78,9 @@ Page({
if(this.data.type != ''){
params['type'] = this.data.type;
}
if(this.data.visit_tab_id != ''){
params['visit_tab_id'] = this.data.visit_tab_id;
}
_.apiQuery.getAppCusorderV2List(params).then(res => {
this.setData({
pageNo: this.data.pageNo + 1,
@@ -230,6 +260,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.getAppCusorderV2List()
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
this.setData({
+21 -1
View File
@@ -1,6 +1,26 @@
<view class="container">
<view class="mt30 pl30 pr30">
<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'>
<block wx:if="{{item.id>=v2OrderId}}">