Commit 65933729 by 张立顺

feat 功能开发

1 parent c699b9f3
Showing 65 changed files with 3735 additions and 32 deletions
...@@ -55,7 +55,10 @@ ...@@ -55,7 +55,10 @@
"root": "packageIndex/pages", "root": "packageIndex/pages",
"name": "packageIndex", "name": "packageIndex",
"pages": [ "pages": [
"index/index" "staff/staff",
"regionalLeaders/regionalLeaders",
"directorLeaders/directorLeaders",
"salesSummary/salesSummary"
] ]
}, },
{ {
......
...@@ -64,6 +64,7 @@ page { ...@@ -64,6 +64,7 @@ page {
} }
} }
} }
image { image {
...@@ -80,4 +81,79 @@ image { ...@@ -80,4 +81,79 @@ image {
width: 16rpx !important; width: 16rpx !important;
height: 28rpx !important; height: 28rpx !important;
transform: translateY(7rpx); transform: translateY(7rpx);
}
image {
width: 100%;
height: 100%;
vertical-align: top;
}
.y-center {
top: 50%;
transform: translateY(-50%);
}
.x-center {
left: 50%;
transform: translateX(-50%);
}
.box-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.two-text {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.isFullSucreen {
box-sizing: border-box;
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
// padding-bottom: 34px !important;
}
.isFullSucreen-bottom {
bottom: 34px !important;
}
.list-nothing {
padding: var(--fontSize30) 0;
text-align: center;
font-size: var(--fontSize28);
color: #666666;
}
.list-not {
display: flex;
align-items: center;
justify-content: center;
color: #999;
font-size: var(--fontSize24);
height: 100%;
}
.bgcw {
background-color: #fff;
} }
\ No newline at end of file \ No newline at end of file
// components/Tab/Tab.js
// behaviors: [LocationBehavior],
import { imgUrlMixin } from '~/mixins/index'
Component({
behaviors: [imgUrlMixin],
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
properties: {
outClassName:String,
tab: Array,
openScroll: Boolean,
tabHeight: {
type: Boolean,
value: false
},
productHeight: {
type: Boolean,
value: false
},
tabBoxStyle: String,
index: {
type: Number,
observer: function (n) {
this.setData({
count: n,
to: `to-${n}`
})
}
},
itemWidth: String,
align: {
type: String,
value: ''
},
// 是否有红点
unreadClueCount: {
type: Number,
value: 0
},
noLine: Boolean
},
/**
* 组件的初始数据
*/
data: {
count: 0,
to: ''
},
// lifetimes:{
// attached: function() {
// console.log('unreadClueCount',this.data.unreadClueCount)
// }
// },
/**
* 组件的方法列表
*/
methods: {
click(e) {
let { count } = e.currentTarget.dataset
this.setData({
count,
to: `to-${count}`,
unreadClueCount:0
})
this.triggerEvent('click', count)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/Tab/Tab.wxss */
.tab-box {
display: flex;
width: 100%;
height: 52rpx;
box-sizing: border-box;
}
.tab-box.left {
padding-left: 32rpx;
}
.left .tab {
padding-right: 40rpx;
}
.tab {
position: relative;
flex-shrink: 0;
}
.tab {
.text {
height: 52rpx;
display: flex;
line-height: 52rpx;
box-sizing: border-box;
color: #181a1f;
font-size: 32rpx;
text-align: left;
}
}
.left .text {
justify-content: flex-start;
}
.flex .tab .text {
padding: 0;
}
.tab.active .text {
/* font-weight: 500; */
font-weight: 600;
/* font-size: 38rpx; */
transition: all .25s;
/* color: #2C2C2C; */
font-family: PingFangSC-S0pxibold;
color: #181a1f;
font-size: 36rpx;
}
.tab .line {
width: 48rpx;
height: var(--borderRadius);
background: var(--btnColor);
border-radius: 2rpx;
margin: 0 auto;
transform: scale(0);
transition: all .25s;
}
.tab.active .line {
transform: scale(1);
}
.tab-box::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
.active .redpoint {
display: none;
}
.redpoint {
position: absolute;
top: 10px;
right: 5px;
/* top: 8px;
right: 10px; */
width: 10px;
height: 10px;
background: #EB4E4E;
border-radius: 50%;
}
/* 外部出进来的自定义样式 */
.project-tab {
padding-left: 20px;
padding-right: 20px;
}
.project-tab .tab {
margin-right: 28px;
}
.project-tab .tab.active .text {
font-size: 28rpx;
color: var(--btnColor);
}
.project-tab .tab .line {
width: auto;
}
\ No newline at end of file \ No newline at end of file
<wxs src="./Tab.wxs" module="filterUtils" />
<block>
<scroll-view class="tab-box flex" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}" enhanced="{{true}}" show-scrollbar="{{false}}" style="{{tabBoxStyle}}">
<block wx:for="{{tab}}" wx:key="index" wx:for-index="index">
<view class="tab {{index==count?'active':''}}" style="width:{{itemWidth}}; margin-left: {{index == 0 ? 0 : 32}}rpx" bindtap="click" data-count="{{index}}">
<view class="text " style="{{tabBoxStyle}}">{{item}}</view>
<view wx:if="{{!noLine}}" class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
</view>
</block>
</scroll-view>
</block>
\ No newline at end of file \ No newline at end of file
var hasRedpoint = function (unreadClueCount) {
// console.log('unreadClueCount: ', unreadClueCount);
if(unreadClueCount>0){
return true
}else{
return false;
}
};
module.exports = {
hasRedpoint: hasRedpoint,
};
// components/switchBlock/switchBlock.js
Component({
/**
* 组件的属性列表
*/
properties: {
switchName: {
// label:
type: Object,
value: {
left: '必填',
right: '非必填'
}
},
switchStatus: {
type: Boolean
},
disable: {
type: Boolean,
value: true
}
// switchStatus: {
// type: Number
// // value: 1,
// // observer: function (n) {
// // console.log(n)
// // // if (n) this.getLetter()
// // }
// }
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
switchChange(e) {
// console.log(e)
let { disable } = this.data
if (disable) {
let { status } = e.currentTarget.dataset
console.log(status)
this.triggerEvent('switchEvent', status)
}
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/switchBlock/switchBlock.wxss */
.switch-box {
box-sizing: border-box;
padding: 4rpx;
width: 172rpx;
height: 56rpx;
border-radius: 8rpx;
display: flex;
background: #f7f8fa;
// border: var(--fontSize2) solid #347BFF;
font-size: var(--fontSize28);
color: #999EA8;
margin-left: auto;
position: relative;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.switch-box .block {
position: absolute;
top: 4rpx;
left: 4rpx;
width: 80rpx;
border-radius: 4rpx;
height: 48rpx;
background: #fff;
transition: all .25s;
}
.switch-box .block.right {
left: 50%;
}
.switch-box .male,
.switch-box .woman {
width: 80rpx;
height: 48rpx;
position: absolute;
top: 4rpx;
transition: all .25s;
color: #999EA8;
}
.switch-box .male {
left: 4rpx;
}
.switch-box .woman {
right: 4rpx;
}
.switch-box .male.active,
.switch-box .woman.active {
color: #292d33;
}
.disabled {
opacity: .5;
}
\ No newline at end of file \ No newline at end of file
<!-- components/switchBlock/switchBlock.wxml -->
<view class="switch-box {{ disable?'':'disabled' }}">
<view class="block text-center {{ switchStatus==1?'':'right' }}" />
<view class="male text-center {{ switchStatus==1?'active':'' }}" bindtap="switchChange" data-status="1">{{switchName.left}}</view>
<view class="woman text-center {{ switchStatus==0?'active':'' }}" bindtap="switchChange" data-status="0">{{switchName.right}}</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/directorLeaders/directorLeaders.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/directorLeaders/directorLeaders.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/directorLeaders/directorLeaders.wxml-->
<text>packageIndex/pages/directorLeaders/directorLeaders.wxml</text>
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/index/index.wxml--> <!--packageIndex/pages/index/index.wxml-->
<text>packageIndex/pages/index/index.wxml</text>
\ No newline at end of file \ No newline at end of file
<text>packageIndex/pages/index/index.wxml</text>
<!-- regionalLeaders
directorLeaders
staff -->
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/regionalLeaders/regionalLeaders.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/regionalLeaders/regionalLeaders.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/regionalLeaders/regionalLeaders.wxml-->
<text>packageIndex/pages/regionalLeaders/regionalLeaders.wxml</text>
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/salesSummary/salesSummary.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/salesSummary/salesSummary.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/salesSummary/salesSummary.wxml-->
<text>packageIndex/pages/salesSummary/salesSummary.wxml</text>
<view class="tab">
<view class="tabItem">当月未拓店人员(8)</view>
<view class="tabItem">长期未签约客户(8)</view>
</view>
<block wx:if="{{ true }}">
<view class="staff">
<view class="header">
<view class="name">张三</view>
<view class="phone">13800000000</view>
</view>
<view class="introduction">
<view class="item">
<view class="label">区域</view>
<view class="content">华中大区</view>
</view>
<view class="item">
<view class="label">直属上级</view>
<view class="content">李四</view>
</view>
<view class="item">
<view class="label">跟进中</view>
<view class="content">8家</view>
</view>
<view class="item">
<view class="label">已签约未出单</view>
<view class="content">8家</view>
</view>
</view>
</view>
<view class="staff">
<view class="header">
<view class="name">张三</view>
<view class="phone">13800000000</view>
</view>
<view class="introduction">
<view class="item">
<view class="label">区域</view>
<view class="content">华中大区</view>
</view>
<view class="item">
<view class="label">直属上级</view>
<view class="content">李四</view>
</view>
<view class="item">
<view class="label">跟进中</view>
<view class="content">8家</view>
</view>
<view class="item">
<view class="label">已签约未出单</view>
<view class="content">8家</view>
</view>
</view>
</view>
</block>
<block wx:if="{{ false }}">
<view class="merchant">
<view class="header">
<view class="name">杭州旺泽宝华哥桑纳尼汽车销售服务...</view>
<view class="status">跟进中</view>
</view>
<view class="introduction">
<view class="item">
<view class="label">拜访次数</view>
<view class="content">拜访次数</view>
</view>
<view class="item">
<view class="label">跟进人</view>
<view class="content">张三</view>
</view>
<view class="item">
<view class="label">最后跟进</view>
<view class="content">2025-07-23 22:31</view>
</view>
</view>
</view>
<view class="merchant">
<view class="header">
<view class="name">杭州旺泽宝华哥桑纳尼汽车销售服务...</view>
<view class="status">跟进中</view>
</view>
<view class="introduction">
<view class="item">
<view class="label">拜访次数</view>
<view class="content">拜访次数</view>
</view>
<view class="item">
<view class="label">跟进人</view>
<view class="content">张三</view>
</view>
<view class="item">
<view class="label">最后跟进</view>
<view class="content">2025-07-23 22:31</view>
</view>
</view>
</view>
</block>
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/staff/staff.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/staff/staff.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/staff/staff.wxml-->
<text>packageIndex/pages/staff/staff.wxml</text>
\ No newline at end of file \ No newline at end of file
...@@ -28,7 +28,7 @@ module.exports = { ...@@ -28,7 +28,7 @@ module.exports = {
/** 大区经理、总监视角销售人员日报查询 */ /** 大区经理、总监视角销售人员日报查询 */
dailyReportSelect(data) { dailyReportSelect(data) {
return api.post({ return api.post({
method: 'dj.api.manager.staff.dailyReport.select', method: 'dj.api.sale.staff.dailyReport.manager.view.select',
...data, ...data,
}) })
}, },
......
Component({
properties: {
currentMonth: {
type: String,
value: ''
}
},
data: {
isCurrentMonth: false,
},
lifetimes: {
attached: function () {
this.updateCurrentMonth();
}
},
methods: {
updateCurrentMonth: function () {
const now = new Date();
const year = now.getFullYear();
const month = now.getMonth() + 1; // 月份从0开始
const formattedMonth = `${year}-${month < 10 ? '0' + month : month}`;
console.log(this.properties.currentMonth, 'formattedMonth', formattedMonth);
this.setData({
isCurrentMonth: this.properties.currentMonth === formattedMonth
});
},
prevMonth: function () {
const [year, month] = this.properties.currentMonth.split('-').map(Number);
const prevDate = new Date(year, month - 1 - 1); // 上一个月
const newMonth = `${prevDate.getFullYear()}-${prevDate.getMonth() + 1 < 10 ? '0' + (prevDate.getMonth() + 1) : prevDate.getMonth() + 1}`;
console.log(newMonth, 11, this.getCurrentMonth());
this.setData({
isCurrentMonth: !(newMonth == this.getCurrentMonth())
});
this.triggerEvent('monthChange', { month: newMonth });
},
nextMonth: function () {
const [year, month] = this.properties.currentMonth.split('-').map(Number);
const nextDate = new Date(year, month); // 下一个月
const newMonth = `${nextDate.getFullYear()}-${nextDate.getMonth() + 1 < 10 ? '0' + (nextDate.getMonth() + 1) : nextDate.getMonth() + 1}`;
// 不允许切换到当前月份之后
if (newMonth > this.getCurrentMonth()) return;
this.setData({
isCurrentMonth: !(newMonth === this.getCurrentMonth())
});
this.triggerEvent('monthChange', { month: newMonth });
},
getCurrentMonth: function () {
const now = new Date();
return `${now.getFullYear()}-${(now.getMonth() + 1 < 10 ? '0' : '') + (now.getMonth() + 1)}`;
}
}
});
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageTool/pages/salesReport/components/month-switcher/month-switcher.wxss */
.month-switcher {
display: flex;
align-items: center;
// justify-content: center;
justify-content: space-around;
padding: 40rpx 30rpx 20rpx;
.month {
color: #5a5e66;
font-size: 28rpx;
width: 20%;
text-align: center;
// margin-right: auto;
// margin: 0 100rpx;
}
// .left {
// padding-right: 100rpx;
// }
.icon {
// flex: 1;
// width: 33%;
}
// .right {
// padding-left: 100rpx;
// }
}
button {
background-color: #f0f0f0;
border: none;
padding: 10px;
cursor: pointer;
}
button[disabled] {
background-color: #ccc;
cursor: not-allowed;
}
.icon {
width: 32rpx;
height: 32rpx;
}
\ No newline at end of file \ No newline at end of file
<view class="month-switcher">
<!-- <button bindtap="prevMonth">←</button> -->
<view class="arrow">
<glsx-image bindtap="prevMonth" class="icon left" src="{{ '/tools/left.png' }}" webp></glsx-image>
</view>
<view class="month">{{currentMonth}}</view>
<glsx-image wx:if="{{ isCurrentMonth }}" bindtap="nextMonth" class="icon right" src="{{ '/tools/right.png' }}" webp></glsx-image>
<view class="icon" wx:else></view>
<!-- <button wx:if="{{isCurrentMonth}}" bindtap="nextMonth">→</button> -->
</view>
\ No newline at end of file \ No newline at end of file
// packageTool/pages/salesReport/salesReport.js // packageTool/pages/salesReport/salesReport.js
var util = require('~/utils/timeFormat/time-utils.js') var util = require('~/utils/timeFormat/time-utils.js')
import { getUserInfo } from '~/utils/cache/userInfo' import { getUserInfo } from '~/utils/cache/userInfo'
import api from '../../api.js'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
currentMonth: '',
timeBean: {}, //timeBean 传递给组件的数据,数据的格式在一开始的工具类中明确 timeBean: {}, //timeBean 传递给组件的数据,数据的格式在一开始的工具类中明确
selectWeek: 0 //0代表的本周 1代表下一周 -1代表上一周 selectWeek: 0 //0代表的本周 1代表下一周 -1代表上一周
}, },
getList() {
let { currentMonth } = this.data
api.dailyReportSelect({ reportMonth: currentMonth }).then((result) => {
console.log(result)
}).catch((err) => {
});
},
handleMonthChange: function (e) {
this.setData({
currentMonth: e.detail.month
});
},
toDetail(e) { toDetail(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let { timeBean } = this.data let { timeBean } = this.data
...@@ -86,6 +102,7 @@ Page({ ...@@ -86,6 +102,7 @@ Page({
timeBean: util.getWeekDayList(this.data.selectWeek) timeBean: util.getWeekDayList(this.data.selectWeek)
}) })
this.setReportDate() this.setReportDate()
this.getList()
}, },
// 设置报告日期 // 设置报告日期
setReportDate() { setReportDate() {
...@@ -104,44 +121,48 @@ Page({ ...@@ -104,44 +121,48 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
const now = new Date();
const year = now.getFullYear();
const month = now.getMonth() + 1; // 月份从0开始
this.setData({ this.setData({
currentMonth: `${year}-${month < 10 ? '0' + month : month}`,
userInfo: getUserInfo() userInfo: getUserInfo()
}) });
this.initData() this.initData()
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
{ {
"navigationBarTitleText": "销售人员日报", "navigationBarTitleText": "销售人员日报",
"usingComponents": { "usingComponents": {
"weekCalendar": "./components/weekCalendar/weekCalendar" "weekCalendar": "./components/weekCalendar/weekCalendar",
"month-switcher": "./components/month-switcher/month-switcher"
} }
} }
\ No newline at end of file \ No newline at end of file
/* packageTool/pages/salesReport/salesReport.wxss */ /* packageTool/pages/salesReport/salesReport.wxss */
Page {
background: #f7f8fa;
}
.main { .main {
box-sizing: border-box; box-sizing: border-box;
width: 710rpx; width: 710rpx;
...@@ -87,7 +91,7 @@ ...@@ -87,7 +91,7 @@
} }
} }
margin-bottom: 100rpx;
} }
} }
\ No newline at end of file \ No newline at end of file
<!--packageTool/pages/salesReport/salesReport.wxml--> <!--packageTool/pages/salesReport/salesReport.wxml-->
<!-- <view style="margin-top:{{ navBarHeight }}px"> --> <!-- <view style="margin-top:{{ navBarHeight }}px"> -->
<view class="main"> <view class="main">
<weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar> <!-- <weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar> -->
<month-switcher bind:monthChange="handleMonthChange" currentMonth="{{currentMonth}}"></month-switcher>
<view class="staffBox"> <view class="staffBox">
<view class="title"> <view class="title">
<view class="name">销售名称</view> <view class="name">销售名称</view>
......
// packageIndex/pages/directorLeaders/directorLeaders.js
Component({
/**
* 组件的属性列表
*/
properties: {},
/**
* 组件的初始数据
*/
data: {
switchName: {
left: '当月',
right: '全年'
},
rankingSelectIndex: 1,
overviewSwitchValue: 1,
overviewTabIndex: 1,
tabList: ['延保', '权益', '轻改'],
tabIndx: 0,
unreadClueCount: 0,
tableWidth: 1088,
tableFlag: true,
table: [
{
id: null,
merchantId: 44218100,
merchantName: '测试门店22',
dataDate: null,
getTotal: 0,
usedTotal: 0,
upgradeTotal: 0,
upgradeMoneyTotal: null,
createdBy: null,
createdDate: null,
updatedBy: null,
updatedDate: null,
deletedFlag: null,
startDate: null,
endDate: null,
yqMerchantIds: null,
orderByType: null,
addTotal: 0,
orderMoneyTotal: 0,
merchantIdList: null,
usedPer: null,
upgradePer: null,
totalUsedPer: null,
totalUpgradePer: null,
customerUnitMoney: 0,
upgradeRate: 0,
experienceTotal: 0,
filmTimes: 0,
notUpgradeTotal: null,
filmTimesGrowth: null,
usedTotalGrowth: null,
upgradeTotalGrowth: null,
notUpgradeTotalGrowth: null,
orderMoneyTotalGrowth: null,
customerUnitMoneyGrowth: null,
experienceTotalGrowth: null,
upgradeRateGrowth: null,
goodsOrCouponType: null,
queryRangeType: null
},
{
id: null,
merchantId: 44218100,
merchantName: '测试门店22',
dataDate: null,
getTotal: 0,
usedTotal: 0,
upgradeTotal: 0,
upgradeMoneyTotal: null,
createdBy: null,
createdDate: null,
updatedBy: null,
updatedDate: null,
deletedFlag: null,
startDate: null,
endDate: null,
yqMerchantIds: null,
orderByType: null,
addTotal: 0,
orderMoneyTotal: 0,
merchantIdList: null,
usedPer: null,
upgradePer: null,
totalUsedPer: null,
totalUpgradePer: null,
customerUnitMoney: 0,
upgradeRate: 0,
experienceTotal: 0,
filmTimes: 0,
notUpgradeTotal: null,
filmTimesGrowth: null,
usedTotalGrowth: null,
upgradeTotalGrowth: null,
notUpgradeTotalGrowth: null,
orderMoneyTotalGrowth: null,
customerUnitMoneyGrowth: null,
experienceTotalGrowth: null,
upgradeRateGrowth: null,
goodsOrCouponType: null,
queryRangeType: null
}
],
tableObj: [
{
name: '贴膜',
unit: '/台',
key: 'filmTimes',
width: 'var(--fontSize110)'
},
{
name: '核销',
unit: '/张',
key: 'usedTotal',
width: 'var(--fontSize110)'
},
{
name: '体验',
unit: '/位',
key: 'experienceTotal',
width: 'var(--fontSize110)'
},
{
name: '转化',
unit: '/单',
key: 'upgradeTotal',
width: 'var(--fontSize110)'
},
{
name: '营业额',
unit: '',
key: 'orderMoneyTotal',
sort: false,
width: '118rpx'
},
{ name: '客单价', unit: '', key: 'customerUnitMoney', width: '118rpx' },
{
name: '转化率',
unit: '',
key: 'upgradeRate',
width: 'var(--fontSize110)'
}
]
},
/**
* 组件的方法列表
*/
methods: {
scrollonReachBottom() {
console.log('scrollonReachBottom')
let { pages, pageNum } = this.data
// 判断当前页是否是末页
if (pages == pageNum) return wx.$util.showToast('列表已到底')
this.setData({
pageNum: pageNum + 1
})
this.getMerchantCouponList()
},
restPageNum() {
this.setData({
pageNum: 1
})
this.getMerchantCouponList()
},
changeRankingSelectIndex(e) {
this.setData({
rankingSelectIndex: e.currentTarget.dataset.index
})
},
changeOverviewTabIndex(e) {
this.setData({
overviewTabIndex: e.currentTarget.dataset.index
})
},
onSwitchChange(e) {
console.log(e.detail)
// let { value } = e.detail
this.setData({
overviewSwitchValue: Number(e.detail)
})
},
changeTabIndx(e) {
this.setData({
tabIndx: e.detail
})
}
}
})
{
"component": true,
"usingComponents": {
"tab-no-line": "/components/TabNoLine/Tab",
"switch-block": "/components/switchBlock/switchBlock",
"store-waring": "/pages/components/storeWarning/storeWarning",
"table": "/pages/components/table/table"
}
}
/* packageIndex/pages/directorLeaders/directorLeaders.wxss */
.tabContainer {
// height: 100rpx;
// padding: 0 32rpx;
// background-color: #F2F3F7;
margin-bottom: 28rpx;
}
.selectList {
display: flex;
.box {
box-sizing: border-box;
display: flex;
// height: 48rpx;
border-radius: 8rpx;
opacity: 1;
background: #ffffff80;
padding: 6rpx 8rpx;
}
.icon {
width: 32rpx;
height: 32rpx;
// 旋转90度
transform: rotate(45deg);
// margin-left: 8rpx;
}
.bold {
color: #292d33;
margin-right: 4rpx;
}
.mode {
margin-left: 24rpx;
}
}
.overview {
box-sizing: border-box;
padding: 32rpx;
background-color: #fff;
border-radius: 16rpx;
margin-top: 24rpx;
.header {
display: flex;
align-items: center;
margin-bottom: 20rpx;
.left {
color: #181a1f;
font-size: 32rpx;
font-weight: 500;
}
.right {
margin-left: auto;
}
}
.tab {
display: flex;
margin-bottom: 32rpx;
.box {
width: 104rpx;
height: 56rpx;
border-radius: 4rpx;
opacity: 1;
background: #f2f3f5;
line-height: 56rpx;
text-align: center;
color: #292d33;
font-size: 28rpx;
margin-right: 16rpx;
}
.active {
background: #292d33;
color: #fff;
}
}
.statistics {
display: flex;
margin-bottom: 48rpx;
.item {
width: 135rpx;
display: flex;
flex-direction: column;
.title {
color: #757b85;
font-size: 24rpx;
margin-bottom: 8rpx;
}
.num {
color: #292d33;
font-size: 40rpx;
font-family: "numberBold";
}
}
.item+.item {
margin-left: 30rpx;
}
.total {
width: 340rpx;
}
}
.title {
color: #181a1f;
font-size: 28rpx;
margin-bottom: 16rpx;
}
.rankingSelect {
display: flex;
align-items: center;
.left {
display: flex;
align-items: center;
margin-bottom: 16rpx;
.item {
width: 120rpx;
height: 56rpx;
border-radius: 8rpx;
border: 2rpx solid #dee0e3;
color: #757b85;
line-height: 56rpx;
text-align: center;
margin-right: 16px;
}
.active {
color: #347BFF;
}
}
}
}
.select {
color: #757980;
font-size: 24rpx;
margin-left: auto;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.table-header {
display: flex;
position: relative;
align-items: center;
color: #757980;
font-size: 24rpx;
z-index: 8;
background: #f2f6ff;
// margin: var(--fontSize8) 0;
}
.table {
.label {
flex-shrink: 0;
display: flex;
align-items: center;
box-sizing: border-box;
position: sticky;
left: 0;
height: 68rpx;
width: var(--fontSize232);
padding: var(--fontSize20);
z-index: 10;
background: #f2f6ff;
}
}
.table .values {
display: flex;
// font-size: var(--fontSize24);
// color: #666666;
}
.table .values .value {
display: flex;
text-align: center;
align-items: center;
justify-content: center;
height: 68rpx;
margin-left: var(--fontSize10);
// background: #f9f9fa;
// border-radius: var(--fontSize8);
// font-size: var(--fontSize22);
position: relative;
}
.table .values .value .label {
display: flex;
flex-direction: column;
}
.table .values .value .label .unit {
font-size: var(--fontSize20);
}
.table .values .value .sort-list {
display: flex;
flex-direction: column;
margin-left: var(--fontSize7);
}
.table .values .value .sort-list>view {
border: var(--fontSize6) solid transparent;
}
.table .values .value .sort-list .up {
border-bottom-color: #999;
margin-bottom: var(--fontSize6);
}
.table .values .value .sort-list .down {
border-top-color: #999;
}
.table .values .value.active {
color: #347BFF;
}
.table .values .value.active .sort-list .up.sort-active {
border-bottom-color: #347BFF;
}
.table .values .value.active .sort-list .down.sort-active {
border-top-color: #347BFF;
}
.table-total {
position: relative;
display: flex;
height: var(--fontSize60);
background-color: #eff5fe;
}
.table-total.averageTotal {
border-top: 1px solid #fff;
}
.table-total .totalLabel {
flex-shrink: 0;
position: sticky;
left: 0;
display: flex;
align-items: center;
width: var(--fontSize232);
box-sizing: border-box;
padding: 0 var(--fontSize20);
z-index: 8;
color: #333;
font-size: var(--fontSize28);
background-color: #eff5fe;
}
.table-total .totalLabel.average {
font-size: var(--fontSize22);
color: #333;
font-weight: 600;
}
.table-total .values {
display: flex;
}
.table-total .values .th {
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize28);
color: #333;
margin-left: var(--fontSize10);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.table .table-body .th {
position: relative;
align-items: center;
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, 0.3);
}
.table .table-body .th:last-of-type {
border-bottom: none;
}
.table .table-body .th .name {
flex-shrink: 0;
position: sticky;
left: 0;
z-index: 8;
background-color: #fff;
box-sizing: border-box;
height: var(--fontSize94);
width: var(--fontSize232);
padding: var(--fontSize20) var(--fontSize20);
font-size: var(--fontSize20);
color: #666666;
box-shadow: 4px 0 4px -3px #0000000f;
// box-shadow: 0 0 8rpx 0 #0000000f;
}
.table .table-body .th .name .labelName {
height: var(--fontSize58);
box-sizing: border-box;
word-break: break-all;
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.table .table-body .th .labelName.oneLine {
line-height: var(--fontSize58);
}
.table .table-body .th .values .td {
font-size: var(--fontSize28);
color: #333333;
width: var(--fontSize130);
height: var(--fontSize94);
margin-left: var(--fontSize10);
}
.table-tips {
padding: var(--fontSize30) 0;
text-align: center;
font-size: var(--fontSize20);
color: #666666;
}
.nothing {
padding: var(--fontSize30) 0;
text-align: center;
font-size: var(--fontSize28);
color: #666666;
}
.table {
display: block;
position: relative;
overflow: scroll;
width: 100%;
height: 100%;
// height: 800rpx;
}
.table__head {
height: var(--fontSize96);
white-space: nowrap;
position: sticky;
top: 0;
z-index: 100;
height: var(--fontSize88);
font-size: var(--fontSize24);
line-height: var(--fontSize88);
color: #aaabbd;
background-color: #f8f8f8;
border-bottom: var(--fontSize2) solid #ecf1f8;
background-color: #fff;
white-space: nowrap;
display: flex;
}
.table-box {
background: #FFFFFF;
// border: var(--fontSize2) solid #F3F3F3;
// border-radius: var(--fontSize16);
}
.table__head__td {
width: var(--fontSize200);
display: flex;
justify-content: flex-start;
align-items: center;
background-color: #fff;
box-sizing: border-box;
position: relative;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.table__head__td:nth-child(1) {
padding-left: var(--fontSize24);
width: var(--fontSize260);
margin-right: var(--fontSize40);
position: sticky;
z-index: 101;
left: 0;
}
.table__head__td__text {
display: inline;
}
.table__row {
position: relative;
height: var(--fontSize96);
white-space: nowrap;
display: flex;
justify-content: flex-start;
align-items: center;
border-bottom: var(--fontSize2) solid #ecf1f8;
}
.table__row__td {
overflow: scroll;
white-space: nowrap;
width: var(--fontSize200);
display: inline-block;
background-color: #fff;
box-sizing: border-box;
font-size: var(--fontSize26);
line-height: var(--fontSize96);
position: relative;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.table__row__td:nth-child(1) {
margin-right: var(--fontSize40);
padding-left: var(--fontSize24);
width: var(--fontSize260);
position: sticky;
z-index: 10;
left: 0;
}
.indicator {
width: 710rpx;
// height: 252rpx;
border-radius: 16rpx;
opacity: 1;
background: #ffffff;
box-sizing: border-box;
margin-top: 24rpx;
padding: 32rpx;
.header {
display: flex;
align-items: center;
.left {
color: #181a1f;
font-size: 32rpx;
font-weight: 500;
}
}
.tips {
color: #999ea8;
margin-top: 8rpx;
}
.list {
margin-top: 16rpx;
display: flex;
align-items: center;
box-sizing: border-box;
.item {
width: 40%;
.top {
color: #757b85;
margin-bottom: 14rpx;
}
.bottom {
color: #292d33;
.num {
font-size: 40rpx;
font-family: "numberBold";
}
.unit {
margin-left: 4rpx;
}
}
// df
}
.last {
width: 20%;
}
}
}
.indicatorlast {
margin-bottom: 266rpx;
}
.select {
color: #757980;
font-size: 24rpx;
margin-left: auto;
.icon {
width: 24rpx;
height: 24rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!-- 总监页面 -->
<!-- <view class="scence"> -->
<!-- tabBoxStyle="{{ tabBoxStyle }}" -->
<tab-no-line
noLine="{{ true }}"
tab="{{ tabList }}"
itemWidth="{{ '11%' }}"
index="{{ tabIndx }}"
unreadClueCount="{{ unreadClueCount }}"
bindclick="changeTabIndx"
class="tabContainer"
/>
<view class="selectList">
<view class="carband box">
<view class="text">
主营品牌 /
<text class="bold">鸿蒙智行问界</text>
</view>
<glsx-image class="icon" src="{{ '/index/arrow.png' }}" webp></glsx-image>
</view>
<view class="mode box">
<view class="text">
合作模式 /
<text class="bold">直营</text>
</view>
<glsx-image class="icon" src="{{ '/index/arrow.png' }}" webp></glsx-image>
</view>
</view>
<view class="overview">
<view class="header">
<view class="left">数据总览</view>
<view class="right">
<switch-block switchStatus="{{ overviewSwitchValue }}" bindswitchEvent="onSwitchChange" switchName="{{ switchName }}" />
</view>
</view>
<view class="tab">
<view class="box {{ overviewTabIndex == 1?'active':'' }}" data-index="1" bindtap="changeOverviewTabIndex">产值</view>
<view class="box {{ overviewTabIndex == 0?'active':'' }}" data-index="0" bindtap="changeOverviewTabIndex">拓店</view>
</view>
<block wx:if="{{ true }}">
<view class="statistics">
<view class="item total">
<view class="title">产值</view>
<view class="num">¥ 99,999,800,000.00</view>
</view>
<view class="item">
<view class="title">出单门店</view>
<view class="num">9959</view>
</view>
<view class="item">
<view class="title">KPI完成率</view>
<view class="num">99%</view>
</view>
</view>
<view class="title">门店产值排行榜</view>
<view class="rankingSelect">
<view class="left">
<view class="item {{ rankingSelectIndex == 1 ? 'active' : '' }}" bindtap="changeRankingSelectIndex" data-index="1">前十位</view>
<view class="item {{ rankingSelectIndex == 0 ? 'active' : '' }}" bindtap="changeRankingSelectIndex" data-index="0">后十位</view>
</view>
<view class="select">
产值
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view>
</view>
<table></table>
<!-- <view class="table">
<view class="header">
<view class="merchantName">门店名称</view>
<view class="label">产值/元</view>
<view class="label">客单价/元</view>
<view class="label">引流率</view>
</view>
<view class="th">
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="label">¥660,000.00</view>
<view class="label">¥4,000.00</view>
<view class="label">99.99%</view>
</view>
<view class="th">
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="label">¥660,000.00</view>
<view class="label">¥4,000.00</view>
<view class="label">99.99%</view>
</view>
</view> -->
</block>
<block wx:if="{{ false }}">
<view class="statistics">
<view class="item">
<view class="title">已完成</view>
<view class="num">12</view>
</view>
<view class="item">
<view class="title">拓店目标</view>
<view class="num">3</view>
</view>
<view class="item">
<view class="title">完成率</view>
<view class="num">99%</view>
</view>
</view>
<view class="title">销售漏斗</view>
<view class="funnel">
<view class="num">潜客数100</view>
<view class="num">签约数60</view>
<view class="num">拓店数40</view>
</view>
<view class="title">拓店排行榜</view>
<view class="rankingSelect">
<view class="left">
<view class="item">前十位</view>
<view class="item">后十位</view>
</view>
<view class="select">产值</view>
</view>
<view class="table">
<view class="header">
<view class="merchantName">门店名称</view>
<view class="label">产值/元</view>
<view class="label">客单价/元</view>
<view class="label">引流率</view>
</view>
<view class="th">
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="label">¥660,000.00</view>
<view class="label">¥4,000.00</view>
<view class="label">99.99%</view>
</view>
<view class="th">
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="label">¥660,000.00</view>
<view class="label">¥4,000.00</view>
<view class="label">99.99%</view>
</view>
</view>
</block>
</view>
<view class="overview">
<view class="header">
<view class="left">大区看板</view>
<view class="right">
<switch-block switchStatus="{{ overviewSwitchValue }}" bindswitchEvent="onSwitchChange" switchName="{{ switchName }}" />
</view>
</view>
<view class="tab">
<view class="box {{ overviewTabIndex == 1?'active':'' }}" data-index="1" bindtap="changeOverviewTabIndex">产值</view>
<view class="box {{ overviewTabIndex == 0?'active':'' }}" data-index="0" bindtap="changeOverviewTabIndex">拓店</view>
<view class="select">
产值
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view>
</view>
<scroll-view
scroll-x
scroll-y
show-scrollbar="{{ false }}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="304"
refresher-triggered="{{ triggered }}"
class="table"
>
<view class="table-box" style="width: var(--fontSize{{ tableWidth }})">
<view class="table-header" style="width: var(--fontSize{{ tableWidth }})">
<view class="label">合作门店</view>
<view class="values">
<!-- {{ tableSort == index?'active':'' }} -->
<block wx:for="{{ tableObj }}" wx:key="index">
<!-- bindtap="changeTableSort" -->
<view class="value" style="width: {{ item.width }};" id="header-{{ index }}" data-index="{{ index }}">
<view class="lable">
<view class="name">{{item.name}}{{item.unit}}</view>
</view>
<!-- <view class="sort-list">
<view class="up {{ item.sort?'sort-active':'' }}" />
<view class="down {{ !item.sort?'sort-active':'' }}" />
</view> -->
</view>
</block>
</view>
</view>
<view class="table-body">
<block wx:if="{{ tableFlag }}">
<block wx:if="{{ table.length > 0 }}">
<block wx:for="{{ table }}" wx:key="index">
<view class="th" style="width: var(--fontSize{{ tableWidth }})">
<view class="name">
<view class="labelName {{ item.merchantName.length<=10?'oneLine':'' }}">{{item.merchantName}}</view>
</view>
<view class="values">
<block wx:for="{{ tableObj }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view class="td text-center" style="width: {{ tableObj[ind]['width'] }};">
<block wx:if="{{ i.key == 'filmTimes' }}">
<view
class="text-center"
style="width:100%;height: 100%;color:{{ isYqdSuper?'#347BFF':'#333333' }}"
data-item="{{ item }}"
bindtap="changeTableData"
>{{item[i.key] || 0}}</view>
</block>
<block wx:elif="{{ i.key == 'upgradeRate' }}">{{item[i.key] || 0}}%</block>
<block wx:else>{{item[i.key] || 0}}</block>
</view>
</block>
</view>
</view>
</block>
</block>
</block>
</view>
</view>
</scroll-view>
<block wx:if="{{ table.length <= 0 }}">
<view class="nothing">暂无数据</view>
</block>
</view>
<!-- <view class="bulletinBoard">
<view class="header">
<view class="left">大区看板</view>
<view class="right">
<view class="month box">当月</view>
<view class="year box">全年</view>
</view>
</view>
<view class="rankingSelect">
<view class="left">
<view class="item">产值</view>
<view class="item">拓店</view>
</view>
<view class="select">产值</view>
</view>
<view class="table">
<view class="header">
<view class="merchantName">大区名称</view>
<view class="label">产值/元</view>
<view class="label">客单价/元</view>
<view class="label">引流率</view>
<view class="label">转化率</view>
</view>
<view class="th">
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="label">¥660,000.00</view>
<view class="label">¥4,000.00</view>
<view class="label">99.99%</view>
<view class="label">99.99%</view>
</view>
<view class="th">
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="label">¥660,000.00</view>
<view class="label">¥4,000.00</view>
<view class="label">99.99%</view>
<view class="label">99.99%</view>
</view>
</view>
</view> -->
<store-waring></store-waring>
<view class="box indicator indicatorlast">
<view class="header">
<view class="left">8月销售小结</view>
</view>
<view class="list">
<view class="item">
<view class="top">当月未拓店人员</view>
<view class="bottom">
<text class="num">12</text>
<text class="unit">人</text>
</view>
</view>
<view class="item">
<view class="top">长期未签约客户</view>
<view class="bottom">
<text class="num">12</text>
<text class="unit">人</text>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/regionalLeaders/regionalLeaders.js
Component({
/**
* 组件的属性列表
*/
properties: {},
/**
* 组件的初始数据
*/
data: {
switchName: {
left: '当月',
right: '全年'
},
rankingSelectIndex: 1,
overviewSwitchValue: 1,
overviewTabIndex: 1,
tabActive: 0
},
/**
* 组件的方法列表
*/
methods: {
changeTabActive(e) {
let { index } = e.currentTarget.dataset
this.setData({
tabActive: Number(index)
})
},
onSwitchChange(e) {
console.log(e.detail)
// let { value } = e.detail
this.setData({
overviewSwitchValue: Number(e.detail)
})
}
}
})
{
"component": true,
"usingComponents": {
"switch-block": "/components/switchBlock/switchBlock",
"store-waring": "/pages/components/storeWarning/storeWarning",
"table": "/pages/components/table/table",
"storeStatistics": "/pages/components/storeStatistics/storeStatistics"
}
}
/* packageIndex/pages/regionalLeaders/regionalLeaders.wxss */
.headerBar {
.title {
color: #181a1f;
font-size: 32rpx;
font-weight: 500;
margin: 24rpx 0;
}
.tableBox {
width: 710rpx;
// height: 492rpx;
border-radius: 16rpx;
// opacity: 1;
background: #ffffff;
box-sizing: border-box;
padding: 32rpx;
}
.header {
display: flex;
align-items: center;
margin-bottom: 20rpx;
.left {
color: #181a1f;
font-size: 32rpx;
font-weight: 500;
}
.right {
margin-left: auto;
}
}
.tips {
color: #999ea8;
margin-bottom: 16rpx;
}
.statusList {
display: flex;
flex-wrap: wrap;
.item {
width: 50%;
margin-bottom: 16rpx;
.label {
color: #757b85;
margin-bottom: 8rpx;
}
.num {
color: #292d33;
font-size: 40rpx;
font-family: "numberBold";
}
}
}
.visitRecord {
box-sizing: border-box;
padding: 16rpx 12rpx;
width: 670rpx;
// height: 244rpx;
border-radius: 12rpx;
opacity: 1;
background: #f7f8fa;
margin: 0 auto;
.time {
display: flex;
align-items: center;
.icon {
width: 26.67rpx;
height: 26.67rpx;
}
}
.timebox {
color: #757b85;
font-size: 26rpx;
}
.status {
margin-left: auto;
color: #ff9d0a;
font-size: 26rpx;
}
.merchantName {
color: #292d33;
font-size: 28rpx;
margin: 12rpx 0;
}
.content {
position: relative;
// height: var(--fontSize60);
box-sizing: border-box;
word-break: break-all;
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
// display: flex;
width: 100%;
// height: 52rpx;
// remove pseudo label, we render it in WXML
.label {
color: #999ea8;
}
.text {
color: #757b85;
}
}
// .two-text {
// display: inline-block;
// overflow: hidden;
// text-overflow: ellipsis;
// -webkit-line-clamp: 2;
// -webkit-box-orient: vertical;
// }
.btn {
width: 144rpx;
height: 56rpx;
border-radius: 12rpx;
// opacity: 1;
line-height: 56rpx;
text-align: center;
color: #ffffff;
font-size: 28rpx;
background: #347bff;
margin-left: auto;
margin-top: 12rpx;
}
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tab {
display: flex;
box-sizing: border-box;
width: 440rpx;
height: 64rpx;
border-radius: 16rpx;
opacity: 1;
// border: 2rpx solid #e4e4e4;
background: #f5f5f5;
padding: 4rpx;
.item {
color: #999ea8;
font-size: 32rpx;
width: 33%;
display: flex;
align-items: center;
justify-content: center;
&.active {
width: 144rpx;
height: 56rpx;
border-radius: 14rpx;
color: #347BFF;
background: #ffffff;
}
}
}
}
.kpiBox {
margin-top: 16rpx;
}
.visitRecord+.visitRecord {
margin-top: 16rpx;
}
.productionProgress {
display: flex;
align-items: center;
margin: 27rpx 0;
.label {
color: #181a1f;
font-size: 28rpx;
}
.date {
color: #5a5e66;
margin-left: 16rpx;
}
}
.select {
color: #757980;
font-size: 24rpx;
margin-left: auto;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.storeWaring {
margin-bottom: 166rpx;
}
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/regionalLeaders/regionalLeaders.wxml-->
<!-- <text>packageIndex/pages/regionalLeaders/regionalLeaders.wxml</text> -->
<view class="headerBar">
<view class="title">我的团队</view>
<view class="tableBox">
<view class="header">
<view class="left">销售人员管理</view>
<view class="right">
<switch-block switchStatus="{{ overviewSwitchValue }}" bindswitchEvent="onSwitchChange" switchName="{{ switchName }}" />
</view>
</view>
<table showMoreBtn="{{ true }}"></table>
</view>
</view>
<storeStatistics></storeStatistics>
<view class="storeWaring">
<store-waring></store-waring>
</view>
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/staff/staff.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"store-waring": "/pages/components/storeWarning/storeWarning",
"storeStatistics": "/pages/components/storeStatistics/storeStatistics"
}
}
/* packageIndex/pages/staff/staff.wxss */
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/staff/staff.wxml-->
<!-- <text>packageIndex/pages/staff/staff.wxml</text> -->
<!--packageIndex/pages/regionalLeaders/regionalLeaders.wxml-->
<!-- <text>packageIndex/pages/regionalLeaders/regionalLeaders.wxml</text>
<view class="merchant">
<view class="title">我的门店</view>
<view class="box">
<view class="header">
<view class="left">数据总览</view>
<view class="right">
<view class="month box">当月</view>
<view class="year box">全年</view>
</view>
</view>
<view class="tips">潜客门店跟进情况</view>
<view class="statusList">
<view class="item">
<view class="title">潜客数</view>
<view class="num">12</view>
</view>
<view class="item">
<view class="title">跟进中</view>
<view class="num">12</view>
</view>
<view class="item">
<view class="title">已签约未出单</view>
<view class="num">12</view>
</view>
<view class="item">
<view class="title">已签约已出单</view>
<view class="num">12</view>
</view>
</view>
<view class="visitRecord">
<view class="time">
<glsx-image></glsx-image>
<view class="timebox">首次拜访:09-26</view>
<view class="status">跟进中</view>
</view>
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="content">上次拜访内容:-</view>
<view class="btn">跟进</view>
</view>
<view class="visitRecord">
<view class="time">
<glsx-image></glsx-image>
<view class="timebox">首次拜访:09-26</view>
<view class="status">跟进中</view>
</view>
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="content">上次拜访内容:客户意向很高,门店运营里有觉得吃力的地方,希望互相搭把手,让门店生意再上一层楼</view>
<view class="btn">跟进</view>
</view>
</view>
</view>
<view class="kpiBox">
<view class="header">9月KPI完成进度</view>
<view class="tips">9月KPI完成进度</view>
<view class="tab">
<view class="item">延保</view>
<view class="item">权益</view>
<view class="item">轻改</view>
</view>
<view class="productionProgress">
<view class="label">产值进度</view>
<view class="date">2025年9月29日</view>
<view class="select">已完成</view>
</view>
<view class="table">
<view class="header">
<view class="merchantName">门店名称</view>
<view class="label">产值/元</view>
<view class="label">客单价/元</view>
<view class="label">引流率</view>
</view>
<view class="th">
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="label">¥660,000.00</view>
<view class="label">¥4,000.00</view>
<view class="label">99.99%</view>
</view>
<view class="th">
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="label">¥660,000.00</view>
<view class="label">¥4,000.00</view>
<view class="label">99.99%</view>
</view>
<view class="btn">加载更多</view>
</view>
</view> -->
<storeStatistics></storeStatistics>
<store-waring></store-waring>
<!-- <view class="box indicator">
<view class="header">
<view class="left">指标预警门店</view>
<view class="right">9月</view>
</view>
<view class="tips">指标异常门店</view>
<view class="list">
<view class="item">
<view class="top">兜底指数预警</view>
<view class="bottom">
<text>12</text>
<text>家</text>
</view>
</view>
<view class="item">
<view class="top">丢店风险预警</view>
<view class="bottom">
<text>12</text>
<text>家</text>
</view>
</view>
<view class="item">
<view class="top">亏损预警</view>
<view class="bottom">
<text>12</text>
<text>家</text>
</view>
</view>
</view>
</view> -->
\ No newline at end of file \ No newline at end of file
// pages/components/storeStatistics/storeStatistics.js
Component({
/**
* 组件的属性列表
*/
properties: {},
/**
* 组件的初始数据
*/
data: {
switchName: {
left: '当月',
right: '全年'
},
rankingSelectIndex: 1,
overviewSwitchValue: 1,
overviewTabIndex: 1,
tabActive: 0,
unreadClueCount: 0,
tableWidth: 1088,
tableFlag: true,
table: [
{
id: null,
merchantId: 44218100,
merchantName: '测试门店22',
dataDate: null,
getTotal: 0,
usedTotal: 0,
upgradeTotal: 0,
upgradeMoneyTotal: null,
createdBy: null,
createdDate: null,
updatedBy: null,
updatedDate: null,
deletedFlag: null,
startDate: null,
endDate: null,
yqMerchantIds: null,
orderByType: null,
addTotal: 0,
orderMoneyTotal: 0,
merchantIdList: null,
usedPer: null,
upgradePer: null,
totalUsedPer: null,
totalUpgradePer: null,
customerUnitMoney: 0,
upgradeRate: 0,
experienceTotal: 0,
filmTimes: 0,
notUpgradeTotal: null,
filmTimesGrowth: null,
usedTotalGrowth: null,
upgradeTotalGrowth: null,
notUpgradeTotalGrowth: null,
orderMoneyTotalGrowth: null,
customerUnitMoneyGrowth: null,
experienceTotalGrowth: null,
upgradeRateGrowth: null,
goodsOrCouponType: null,
queryRangeType: null
},
{
id: null,
merchantId: 44218100,
merchantName: '测试门店22',
dataDate: null,
getTotal: 0,
usedTotal: 0,
upgradeTotal: 0,
upgradeMoneyTotal: null,
createdBy: null,
createdDate: null,
updatedBy: null,
updatedDate: null,
deletedFlag: null,
startDate: null,
endDate: null,
yqMerchantIds: null,
orderByType: null,
addTotal: 0,
orderMoneyTotal: 0,
merchantIdList: null,
usedPer: null,
upgradePer: null,
totalUsedPer: null,
totalUpgradePer: null,
customerUnitMoney: 0,
upgradeRate: 0,
experienceTotal: 0,
filmTimes: 0,
notUpgradeTotal: null,
filmTimesGrowth: null,
usedTotalGrowth: null,
upgradeTotalGrowth: null,
notUpgradeTotalGrowth: null,
orderMoneyTotalGrowth: null,
customerUnitMoneyGrowth: null,
experienceTotalGrowth: null,
upgradeRateGrowth: null,
goodsOrCouponType: null,
queryRangeType: null
}
],
tableObj: [
{
name: '贴膜',
unit: '/台',
key: 'filmTimes',
width: 'var(--fontSize110)'
},
{
name: '核销',
unit: '/张',
key: 'usedTotal',
width: 'var(--fontSize110)'
},
{
name: '体验',
unit: '/位',
key: 'experienceTotal',
width: 'var(--fontSize110)'
},
{
name: '转化',
unit: '/单',
key: 'upgradeTotal',
width: 'var(--fontSize110)'
},
{
name: '营业额',
unit: '',
key: 'orderMoneyTotal',
sort: false,
width: '118rpx'
},
{ name: '客单价', unit: '', key: 'customerUnitMoney', width: '118rpx' },
{
name: '转化率',
unit: '',
key: 'upgradeRate',
width: 'var(--fontSize110)'
}
]
},
/**
* 组件的方法列表
*/
methods: {
changeTabActive(e) {
let { index } = e.currentTarget.dataset
this.setData({
tabActive: Number(index)
})
},
onSwitchChange(e) {
console.log(e.detail)
// let { value } = e.detail
this.setData({
overviewSwitchValue: Number(e.detail)
})
}
}
})
{
"component": true,
"usingComponents": {
"switch-block": "/components/switchBlock/switchBlock",
"store-waring": "/pages/components/storeWarning/storeWarning",
"table": "/pages/components/table/table"
}
}
/* pages/components/storeStatistics/storeStatistics.wxss */
/* packageIndex/pages/regionalLeaders/regionalLeaders.wxss */
.headerBar {
.title {
color: #181a1f;
font-size: 32rpx;
font-weight: 500;
margin: 24rpx 0;
}
.tableBox {
width: 710rpx;
// height: 492rpx;
border-radius: 16rpx;
// opacity: 1;
background: #ffffff;
box-sizing: border-box;
padding: 32rpx;
}
.header {
display: flex;
align-items: center;
margin-bottom: 20rpx;
.left {
color: #181a1f;
font-size: 32rpx;
font-weight: 500;
}
.right {
margin-left: auto;
}
}
.tips {
color: #999ea8;
margin-bottom: 16rpx;
}
.statusList {
display: flex;
flex-wrap: wrap;
.item {
width: 50%;
margin-bottom: 16rpx;
.label {
color: #757b85;
margin-bottom: 8rpx;
}
.num {
color: #292d33;
font-size: 40rpx;
font-family: "numberBold";
}
}
}
.visitRecord {
box-sizing: border-box;
padding: 16rpx 12rpx;
width: 670rpx;
// height: 244rpx;
border-radius: 12rpx;
opacity: 1;
background: #f7f8fa;
margin: 0 auto;
.time {
display: flex;
align-items: center;
.icon {
width: 26.67rpx;
height: 26.67rpx;
}
}
.timebox {
color: #757b85;
font-size: 26rpx;
}
.status {
margin-left: auto;
color: #ff9d0a;
font-size: 26rpx;
}
.merchantName {
color: #292d33;
font-size: 28rpx;
margin: 12rpx 0;
}
.content {
position: relative;
// height: var(--fontSize60);
box-sizing: border-box;
word-break: break-all;
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
// display: flex;
width: 100%;
// height: 52rpx;
// remove pseudo label, we render it in WXML
.label {
color: #999ea8;
}
.text {
color: #757b85;
}
}
// .two-text {
// display: inline-block;
// overflow: hidden;
// text-overflow: ellipsis;
// -webkit-line-clamp: 2;
// -webkit-box-orient: vertical;
// }
.btn {
width: 144rpx;
height: 56rpx;
border-radius: 12rpx;
// opacity: 1;
line-height: 56rpx;
text-align: center;
color: #ffffff;
font-size: 28rpx;
background: #347bff;
margin-left: auto;
margin-top: 12rpx;
}
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tab {
display: flex;
box-sizing: border-box;
width: 440rpx;
height: 64rpx;
border-radius: 16rpx;
opacity: 1;
// border: 2rpx solid #e4e4e4;
background: #f5f5f5;
padding: 4rpx;
.item {
color: #999ea8;
font-size: 32rpx;
width: 33%;
display: flex;
align-items: center;
justify-content: center;
&.active {
width: 144rpx;
height: 56rpx;
border-radius: 14rpx;
color: #347BFF;
background: #ffffff;
}
}
}
}
.kpiBox {
margin-top: 16rpx;
}
.visitRecord+.visitRecord {
margin-top: 16rpx;
}
.productionProgress {
display: flex;
align-items: center;
margin: 27rpx 0;
.label {
color: #181a1f;
font-size: 28rpx;
}
.date {
color: #5a5e66;
margin-left: 16rpx;
}
}
.select {
color: #757980;
font-size: 24rpx;
margin-left: auto;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.storeWaring {
margin-bottom: 166rpx;
}
\ No newline at end of file \ No newline at end of file
<!--pages/components/storeStatistics/storeStatistics.wxml-->
<!-- <text>pages/components/storeStatistics/storeStatistics.wxml</text> -->
<view class="merchant headerBar">
<view class="title">我的门店</view>
<view class="tableBox">
<view class="header">
<view class="left">门店待根据</view>
<view class="right">
<switch-block switchStatus="{{ overviewSwitchValue }}" bindswitchEvent="onSwitchChange" switchName="{{ switchName }}" />
</view>
</view>
<view class="tips">潜客门店跟进情况</view>
<view class="statusList">
<view class="item">
<view class="label">潜客数</view>
<view class="num">12</view>
</view>
<view class="item">
<view class="label">跟进中</view>
<view class="num">12</view>
</view>
<view class="item">
<view class="label">已签约未出单</view>
<view class="num">12</view>
</view>
<view class="item">
<view class="label">已签约已出单</view>
<view class="num">12</view>
</view>
</view>
<view class="visitRecord">
<view class="time">
<glsx-image class="icon" src="/static/images/clock.png"></glsx-image>
<view class="timebox">首次拜访:09-26</view>
<view class="status">跟进中</view>
</view>
<view class="merchantName text-hide">杭州旺泽宝华哥桑纳尼汽车销售服务有限公杭州旺泽宝华哥桑纳尼汽车销售服务有限公司杭州旺泽宝华哥桑纳尼汽车销售服务有限公司司</view>
<view class="content">
<text class="label">上次拜访内容:</text>
<text class="text">客户意向很高,门店运营里有觉得吃力的地方,希望互相客户意向很高,门店运营里有觉得吃力的地客户意向很高,门店运营里有觉得吃力的地搭把手,让门店生意再上一层客户意向很高,门店运营里有觉得吃力的地方,希望互相搭把手,让门店生意再上一层楼客户意向很高,门店运营里有觉得吃力的地方,希望互相搭把手,让门店生意再上一层楼楼</text>
</view>
<view class="btn">跟进</view>
</view>
<view class="visitRecord">
<view class="time">
<glsx-image></glsx-image>
<view class="timebox">首次拜访:09-26</view>
<view class="status">跟进中</view>
</view>
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view>
<view class="content">
<text class="label">上次拜访内容:</text>
<text class="text">客户意向很高,门店运营里有觉得吃力的地方,希望互相搭把手,让门店生意再上一层楼</text>
</view>
<view class="btn">跟进</view>
</view>
</view>
</view>
<view class="headerBar kpiBox">
<view class="tableBox">
<view class="header title">9月KPI完成进度</view>
<view class="tips">门店KPI指标完成进度</view>
<view class="tab">
<view class="item {{ tabActive == 0?'active':'' }}" bindtap="changeTabActive" data-index="0">延保</view>
<view class="item {{ tabActive == 1?'active':'' }}" bindtap="changeTabActive" data-index="1">权益</view>
<view class="item {{ tabActive == 2?'active':'' }}" bindtap="changeTabActive" data-index="2">轻改</view>
</view>
<view class="productionProgress">
<view class="label">产值进度</view>
<view class="date">2025年9月29日</view>
<view class="select">
已完成
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view>
</view>
<table showMoreBtn="{{ true }}"></table>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// pages/components/storeWarning/storeWarning.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/components/storeWarning/storeWarning.wxss */
.indicator {
width: 710rpx;
// height: 252rpx;
border-radius: 16rpx;
opacity: 1;
background: #ffffff;
box-sizing: border-box;
margin-top: 24rpx;
padding: 32rpx;
.header {
display: flex;
align-items: center;
.left {
color: #181a1f;
font-size: 32rpx;
font-weight: 500;
}
}
.tips {
color: #999ea8;
margin-top: 8rpx;
}
.list {
margin-top: 16rpx;
display: flex;
align-items: center;
box-sizing: border-box;
.item {
width: 40%;
.top {
color: #757b85;
margin-bottom: 14rpx;
}
.bottom {
color: #292d33;
.num {
font-size: 40rpx;
font-family: "numberBold";
}
.unit {
margin-left: 4rpx;
}
}
// df
}
.last {
width: 20%;
}
}
}
.indicator+.indicator {
margin-bottom: 266rpx;
}
.select {
color: #757980;
font-size: 24rpx;
margin-left: auto;
.icon {
width: 24rpx;
height: 24rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/components/storeWarning/storeWarning.wxml-->
<!-- <text>pages/components/storeWarning/storeWarning.wxml</text> -->
<view class="box indicator">
<view class="header">
<view class="left">指标预警门店</view>
<view class="right select">
产值
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view>
</view>
<view class="tips">指标异常门店</view>
<view class="list">
<view class="item">
<view class="top">兜底指数预警</view>
<view class="bottom">
<text class="num">12</text>
<text class="unit">家</text>
</view>
</view>
<view class="item">
<view class="top">丢店风险预警</view>
<view class="bottom">
<text class="num">12</text>
<text class="unit">家</text>
</view>
</view>
<view class="item last">
<view class="top">亏损预警</view>
<view class="bottom">
<text class="num">12</text>
<text class="unit">家</text>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// pages/components/table/table.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
unreadClueCount: 0,
tableWidth: 1088,
tableFlag: true,
table: [
{
id: null,
merchantId: 44218100,
merchantName: '测试门店22',
dataDate: null,
getTotal: 0,
usedTotal: 0,
upgradeTotal: 0,
upgradeMoneyTotal: null,
createdBy: null,
createdDate: null,
updatedBy: null,
updatedDate: null,
deletedFlag: null,
startDate: null,
endDate: null,
yqMerchantIds: null,
orderByType: null,
addTotal: 0,
orderMoneyTotal: 0,
merchantIdList: null,
usedPer: null,
upgradePer: null,
totalUsedPer: null,
totalUpgradePer: null,
customerUnitMoney: 0,
upgradeRate: 0,
experienceTotal: 0,
filmTimes: 0,
notUpgradeTotal: null,
filmTimesGrowth: null,
usedTotalGrowth: null,
upgradeTotalGrowth: null,
notUpgradeTotalGrowth: null,
orderMoneyTotalGrowth: null,
customerUnitMoneyGrowth: null,
experienceTotalGrowth: null,
upgradeRateGrowth: null,
goodsOrCouponType: null,
queryRangeType: null
},
{
id: null,
merchantId: 44218100,
merchantName: '测试门店22',
dataDate: null,
getTotal: 0,
usedTotal: 0,
upgradeTotal: 0,
upgradeMoneyTotal: null,
createdBy: null,
createdDate: null,
updatedBy: null,
updatedDate: null,
deletedFlag: null,
startDate: null,
endDate: null,
yqMerchantIds: null,
orderByType: null,
addTotal: 0,
orderMoneyTotal: 0,
merchantIdList: null,
usedPer: null,
upgradePer: null,
totalUsedPer: null,
totalUpgradePer: null,
customerUnitMoney: 0,
upgradeRate: 0,
experienceTotal: 0,
filmTimes: 0,
notUpgradeTotal: null,
filmTimesGrowth: null,
usedTotalGrowth: null,
upgradeTotalGrowth: null,
notUpgradeTotalGrowth: null,
orderMoneyTotalGrowth: null,
customerUnitMoneyGrowth: null,
experienceTotalGrowth: null,
upgradeRateGrowth: null,
goodsOrCouponType: null,
queryRangeType: null
}
],
tableObj: [
{
name: '贴膜',
unit: '/台',
key: 'filmTimes',
width: 'var(--fontSize110)'
},
{
name: '核销',
unit: '/张',
key: 'usedTotal',
width: 'var(--fontSize110)'
},
{
name: '体验',
unit: '/位',
key: 'experienceTotal',
width: 'var(--fontSize110)'
},
{
name: '转化',
unit: '/单',
key: 'upgradeTotal',
width: 'var(--fontSize110)'
},
{
name: '营业额',
unit: '',
key: 'orderMoneyTotal',
sort: false,
width: '118rpx'
},
{ name: '客单价', unit: '', key: 'customerUnitMoney', width: '118rpx' },
{
name: '转化率',
unit: '',
key: 'upgradeRate',
width: 'var(--fontSize110)'
}
]
},
/**
* 组件的方法列表
*/
methods: {
scrollonReachBottom() {
console.log('scrollonReachBottom')
let { pages, pageNum } = this.data
// 判断当前页是否是末页
if (pages == pageNum) return wx.$util.showToast('列表已到底')
this.setData({
pageNum: pageNum + 1
})
this.getMerchantCouponList()
},
restPageNum() {
this.setData({
pageNum: 1
})
this.getMerchantCouponList()
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/components/table/table.wxss */
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.table-header {
display: flex;
position: relative;
align-items: center;
color: #757980;
font-size: 24rpx;
z-index: 8;
background: #f2f6ff;
// margin: var(--fontSize8) 0;
}
.table {
.label {
flex-shrink: 0;
display: flex;
align-items: center;
box-sizing: border-box;
position: sticky;
left: 0;
height: 68rpx;
width: var(--fontSize232);
padding: var(--fontSize20);
z-index: 10;
background: #f2f6ff;
}
}
.table .values {
display: flex;
// font-size: var(--fontSize24);
// color: #666666;
}
.table .values .value {
display: flex;
text-align: center;
align-items: center;
justify-content: center;
height: 68rpx;
margin-left: var(--fontSize10);
// background: #f9f9fa;
// border-radius: var(--fontSize8);
// font-size: var(--fontSize22);
position: relative;
}
.table .values .value .label {
display: flex;
flex-direction: column;
}
.table .values .value .label .unit {
font-size: var(--fontSize20);
}
.table .values .value .sort-list {
display: flex;
flex-direction: column;
margin-left: var(--fontSize7);
}
.table .values .value .sort-list>view {
border: var(--fontSize6) solid transparent;
}
.table .values .value .sort-list .up {
border-bottom-color: #999;
margin-bottom: var(--fontSize6);
}
.table .values .value .sort-list .down {
border-top-color: #999;
}
.table .values .value.active {
color: #347BFF;
}
.table .values .value.active .sort-list .up.sort-active {
border-bottom-color: #347BFF;
}
.table .values .value.active .sort-list .down.sort-active {
border-top-color: #347BFF;
}
.table-total {
position: relative;
display: flex;
height: var(--fontSize60);
background-color: #eff5fe;
}
.table-total.averageTotal {
border-top: 1px solid #fff;
}
.table-total .totalLabel {
flex-shrink: 0;
position: sticky;
left: 0;
display: flex;
align-items: center;
width: var(--fontSize232);
box-sizing: border-box;
padding: 0 var(--fontSize20);
z-index: 8;
color: #333;
font-size: var(--fontSize28);
background-color: #eff5fe;
}
.table-total .totalLabel.average {
font-size: var(--fontSize22);
color: #333;
font-weight: 600;
}
.table-total .values {
display: flex;
}
.table-total .values .th {
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize28);
color: #333;
margin-left: var(--fontSize10);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.table .table-body .th {
position: relative;
align-items: center;
display: flex;
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, 0.3);
}
.table .table-body .th:last-of-type {
border-bottom: none;
}
.table .table-body .th .name {
flex-shrink: 0;
position: sticky;
left: 0;
z-index: 8;
background-color: #fff;
box-sizing: border-box;
height: var(--fontSize94);
width: var(--fontSize232);
padding: var(--fontSize20) var(--fontSize20);
font-size: var(--fontSize20);
color: #666666;
box-shadow: 4px 0 4px -3px #0000000f;
// box-shadow: 0 0 8rpx 0 #0000000f;
}
.table .table-body .th .name .labelName {
height: var(--fontSize58);
box-sizing: border-box;
word-break: break-all;
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.table .table-body .th .labelName.oneLine {
line-height: var(--fontSize58);
}
.table .table-body .th .values .td {
font-size: var(--fontSize28);
color: #333333;
width: var(--fontSize130);
height: var(--fontSize94);
margin-left: var(--fontSize10);
}
.table-tips {
padding: var(--fontSize30) 0;
text-align: center;
font-size: var(--fontSize20);
color: #666666;
}
.nothing {
padding: var(--fontSize30) 0;
text-align: center;
font-size: var(--fontSize28);
color: #666666;
}
.table {
display: block;
position: relative;
overflow: scroll;
width: 100%;
height: 100%;
// height: 800rpx;
}
.table__head {
height: var(--fontSize96);
white-space: nowrap;
position: sticky;
top: 0;
z-index: 100;
height: var(--fontSize88);
font-size: var(--fontSize24);
line-height: var(--fontSize88);
color: #aaabbd;
background-color: #f8f8f8;
border-bottom: var(--fontSize2) solid #ecf1f8;
background-color: #fff;
white-space: nowrap;
display: flex;
}
.table-box {
background: #FFFFFF;
// border: var(--fontSize2) solid #F3F3F3;
// border-radius: var(--fontSize16);
}
.table__head__td {
width: var(--fontSize200);
display: flex;
justify-content: flex-start;
align-items: center;
background-color: #fff;
box-sizing: border-box;
position: relative;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.table__head__td:nth-child(1) {
padding-left: var(--fontSize24);
width: var(--fontSize260);
margin-right: var(--fontSize40);
position: sticky;
z-index: 101;
left: 0;
}
.table__head__td__text {
display: inline;
}
.table__row {
position: relative;
height: var(--fontSize96);
white-space: nowrap;
display: flex;
justify-content: flex-start;
align-items: center;
border-bottom: var(--fontSize2) solid #ecf1f8;
}
.table__row__td {
overflow: scroll;
white-space: nowrap;
width: var(--fontSize200);
display: inline-block;
background-color: #fff;
box-sizing: border-box;
font-size: var(--fontSize26);
line-height: var(--fontSize96);
position: relative;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.table__row__td:nth-child(1) {
margin-right: var(--fontSize40);
padding-left: var(--fontSize24);
width: var(--fontSize260);
position: sticky;
z-index: 10;
left: 0;
}
.indicator {
width: 710rpx;
// height: 252rpx;
border-radius: 16rpx;
opacity: 1;
background: #ffffff;
box-sizing: border-box;
margin-top: 24rpx;
padding: 32rpx;
.header {
display: flex;
align-items: center;
.left {
color: #181a1f;
font-size: 32rpx;
font-weight: 500;
}
}
.tips {
color: #999ea8;
margin-top: 8rpx;
}
.list {
margin-top: 16rpx;
display: flex;
align-items: center;
box-sizing: border-box;
.item {
width: 40%;
.top {
color: #757b85;
margin-bottom: 14rpx;
}
.bottom {
color: #292d33;
.num {
font-size: 40rpx;
font-family: "numberBold";
}
.unit {
margin-left: 4rpx;
}
}
// df
}
.last {
width: 20%;
}
}
}
.showMore {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
// padding: 0 56rpx;
width: 260rpx;
height: 56rpx;
border-radius: 40rpx;
// opacity: 1;
margin: 16rpx auto;
border: 1rpx solid #c3c3c3;
color: #6379a9;
font-size: 24rpx;
.icon {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/components/table/table.wxml-->
<!-- <text>pages/components/table/table.wxml</text> -->
<scroll-view
scroll-x
scroll-y
show-scrollbar="{{ false }}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="304"
refresher-triggered="{{ triggered }}"
class="table"
>
<view class="table-box" style="width: var(--fontSize{{ tableWidth }})">
<view class="table-header" style="width: var(--fontSize{{ tableWidth }})">
<view class="label">合作门店</view>
<view class="values">
<!-- {{ tableSort == index?'active':'' }} -->
<block wx:for="{{ tableObj }}" wx:key="index">
<!-- bindtap="changeTableSort" -->
<view class="value" style="width: {{ item.width }};" id="header-{{ index }}" data-index="{{ index }}">
<view class="lable">
<view class="name">{{item.name}}{{item.unit}}</view>
</view>
<!-- <view class="sort-list">
<view class="up {{ item.sort?'sort-active':'' }}" />
<view class="down {{ !item.sort?'sort-active':'' }}" />
</view> -->
</view>
</block>
</view>
</view>
<view class="table-body">
<block wx:if="{{ tableFlag }}">
<block wx:if="{{ table.length > 0 }}">
<block wx:for="{{ table }}" wx:key="index">
<view class="th" style="width: var(--fontSize{{ tableWidth }})">
<view class="name">
<view class="labelName {{ item.merchantName.length<=10?'oneLine':'' }}">{{item.merchantName}}</view>
</view>
<view class="values">
<block wx:for="{{ tableObj }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view class="td text-center" style="width: {{ tableObj[ind]['width'] }};">
<block wx:if="{{ i.key == 'filmTimes' }}">
<view
class="text-center"
style="width:100%;height: 100%;color:{{ isYqdSuper?'#347BFF':'#333333' }}"
data-item="{{ item }}"
bindtap="changeTableData"
>{{item[i.key] || 0}}</view>
</block>
<block wx:elif="{{ i.key == 'upgradeRate' }}">{{item[i.key] || 0}}%</block>
<block wx:else>{{item[i.key] || 0}}</block>
</view>
</block>
</view>
</view>
</block>
</block>
</block>
</view>
</view>
</scroll-view>
<block wx:if="{{ table.length <= 0 }}">
<view class="nothing">暂无数据</view>
</block>
<view class="showMore">
<view class="btn">加载更多</view>
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view>
\ No newline at end of file \ No newline at end of file
import { getUserInfo } from '~/utils/cache/userInfo'
Page({ Page({
// behaviors: [kfMixin], // behaviors: [kfMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
navStyle: 'background-color: rgba(0,0,0,0);'
}, },
// navbar高度设置 // navbar高度设置
// navbarReady(e) {
// let { height, statusBarHeight } = e.detail
// this.setData({
// headerHeight: height / 2 + statusBarHeight
// })
// },
navbarReady(e) { navbarReady(e) {
let { height, statusBarHeight } = e.detail; let navBarHeight = e.detail.height
this.setData({ this.setData({
headerHeight: height / 2 + statusBarHeight, navBarHeight
// headerHeight: height / 2 + statusBarHeight + 88 * 2 })
});
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
const userInfo = getUserInfo()
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this.setData({
userInfo,
loginRole: userInfo.loginRole
})
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function () {},
},
onReachBottom() { onReachBottom() {
console.log("滑到底部了"); console.log('滑到底部了')
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: async function () { onShow: async function () {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
...@@ -54,5 +63,5 @@ Page({ ...@@ -54,5 +63,5 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () {},
onShareTimeline: function () {}, onShareTimeline: function () {}
}); })
{ {
"usingComponents": {} "navigationStyle": "custom",
"usingComponents": {
"staff": "../../components/staff/staff",
"regionalLeaders": "../../components/regionalLeaders/regionalLeaders",
"directorLeaders": "../../components/directorLeaders/directorLeaders"
}
} }
page { page {
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
background-color: #FFFFFF !important; // background-color: #FFFFFF !important;
overflow: scroll;
}
@keyframes opacity-view {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
...@@ -10,13 +21,41 @@ page { ...@@ -10,13 +21,41 @@ page {
color: transparent; color: transparent;
} }
.bg {
width: 100%;
height: var(--fontSize800);
// background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/nav-bg.png') no-repeat;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/sales-assistant/index/index_bg.png') no-repeat;
background-size: 100% var(--fontSize800);
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.layout {
box-sizing: border-box;
position: relative;
font-size: 24rpx;
color: #8A8C90;
overflow: scroll;
margin: 0 var(--fontSize20);
.tabContainer {
height: 100rpx;
}
}
.sub-menu-active-custom { .sub-menu-active-custom {
background: #3666FE !important; background: #3666FE !important;
/* color: #3666FE !important; */ /* color: #3666FE !important; */
} }
.sidebar-active-custom::after { .sidebar-active-custom::after {
background: #3666FE !important; background: #3666FE !important;
} }
.sidebar-active-custom { .sidebar-active-custom {
color: #3666FE !important; color: #3666FE !important;
} }
......
<!--pages/tab/index/index.wxml--> <!--pages/tab/index/index.wxml-->
<text>pages/tab/index/index.wxml</text>
\ No newline at end of file \ No newline at end of file
<!-- <text>pages/tab/index/index.wxml</text> -->
<navigation-bar navStyle="{{ navStyle }}" bindnavbarReady="navbarReady">首页</navigation-bar>
<view class="bg"></view>
<view style="height:100vh;overflow: hidden;">
<view class="layout" style="height:calc(100vh - {{ navBarHeight}}px); margin-top:{{ navBarHeight + 'px' }}">
<!-- 登录角色 1-总监 2-大区经理 3-销售人员 -->
<staff wx:if="{{ loginRole == 3 }}"></staff>
<regionalLeaders wx:if="{{ loginRole == 2 }}"></regionalLeaders>
<directorLeaders wx:if="{{ loginRole == 1 }}"></directorLeaders>
</view>
</view>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!