Commit 91bc6336 by 张立顺

feat 功能联调

1 parent b2b53411
import api from '~/utils/request/request'
const { appId } = wx.getAccountInfoSync().miniProgram
const CODE = {
platformEntrance: 'SALES_ASSISTANT',
productCode: 'PC00c3'
}
class IndexApi {
/**退出登录 */
logout() {
return api.post(
{
method: 'dj.api.sale.login.logout'
},
true
)
}
/**首页-门店待跟进数据统计 */
getTotal(data) {
return api.post(
{
method: 'dj.api.sale.home.total',
...data
},
true
)
}
/**首页-KPI完成进度 */
getKpiProgress(data) {
return api.post(
{
method: 'dj.api.sale.home.kpi.progress',
...data
},
true
)
}
/**首页-我的团队 */
getMyTeam(data = {}) {
return api.post(
{
method: 'dj.api.sale.home.myTeam',
...data
},
true
)
}
/**首页-指标预警门店列表 */
getWarningStores(data = {}) {
return api.post(
{
method: 'dj.api.sale.home.warning',
...data
},
true
)
}
}
export default IndexApi
import IndexApi from './IndexApi.js'
export default new IndexApi()
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<block wx:for="{{tabList}}" wx:key="index"> <block wx:for="{{tabList}}" wx:key="index">
<!-- style="color:{{tabIndex==index?'#347BFF':''}};" --> <!-- style="color:{{tabIndex==index?'#347BFF':''}};" -->
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}"> <view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}">
<text id="tab-{{index}}"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">({{item.count}})</text></text> <text id="tab-{{index}}"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize28);">({{item.count}})</text></text>
</view> </view>
</block> </block>
<view class="active-doc" style="{{activeStyle}}" /> <view class="active-doc" style="{{activeStyle}}" />
......
<!-- components/switchBlock/switchBlock.wxml --> <!-- components/switchBlock/switchBlock.wxml -->
<view class="switch-box {{ disable?'':'disabled' }}"> <view class="switch-box {{ disable?'':'disabled' }}">
<view class="block text-center {{ switchStatus==1?'':'right' }}" /> <view class="block text-center {{ switchStatus==0?'':'right' }}" />
<view class="male text-center {{ switchStatus==1?'active':'' }}" bindtap="switchChange" data-status="1">{{switchName.left}}</view> <view class="male text-center {{ switchStatus==0?'active':'' }}" bindtap="switchChange" data-status="0">{{switchName.left}}</view>
<view class="woman text-center {{ switchStatus==0?'active':'' }}" bindtap="switchChange" data-status="0">{{switchName.right}}</view> <view class="woman text-center {{ switchStatus==1?'active':'' }}" bindtap="switchChange" data-status="1">{{switchName.right}}</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -5,9 +5,29 @@ Page({ ...@@ -5,9 +5,29 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
activeIndex: 0,
tabList: [
{
count: 8,
text: '当月未拓店人员'
},
{
count: 8,
text: '长期未签约客户'
}
],
},
tabClick(e) {
let {
searchObj
} = this.data;
// delete searchObj.statusList;
this.setData({
activeIndex: e.detail,
// searchObj,
});
// this.search();
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
......
/* packageIndex/pages/salesSummary/salesSummary.wxss */
\ No newline at end of file \ No newline at end of file
/* packageIndex/pages/salesSummary/salesSummary.wxss */
.list {
padding: 0rpx 20rpx 100rpx;
overflow: scroll;
.box {
box-sizing: border-box;
width: 710rpx;
height: 220rpx;
border-radius: 16rpx;
// opacity: 1;
margin: 24rpx auto;
background: #ffffff;
padding: 32rpx;
.header {
display: flex;
align-items: center;
.name {
color: #292d33;
font-size: 32rpx;
font-weight: 500;
}
.phone {
color: #292d33;
font-size: 28rpx;
margin-left: 16rpx;
}
}
.introduction {
display: flex;
flex-wrap: wrap;
.item {
width: 50%;
display: flex;
align-items: center;
margin-top: 16rpx;
align-items: center;
.label {
color: #999ea8;
font-size: 28rpx;
width: 168rpx;
}
.content {
flex: 1;
color: #292d33;
font-size: 28rpx;
margin-left: 21rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.short {
width: 120rpx;
}
}
}
.merchantInfo {
.item {
.label {
width: 120rpx;
}
.person {
width: 90rpx;
}
}
.last {
width: 100%;
}
}
}
}
.merchant {
display: flex;
align-items: center;
.merchantName {
flex: 1;
// width: 100%;
// width: 120rpx;
// height: 50rpx;
}
.status {
margin-left: auto;
width: 80rpx;
color: #ff9d0a;
font-size: 26rpx;
margin-left: 28rpx;
}
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file \ No newline at end of file
<!--packageIndex/pages/salesSummary/salesSummary.wxml--> <!--packageIndex/pages/salesSummary/salesSummary.wxml-->
<text>packageIndex/pages/salesSummary/salesSummary.wxml</text> <!-- <text>packageIndex/pages/salesSummary/salesSummary.wxml</text> -->
<view class="tab"> <!-- <view class="tab">
<view class="tabItem">当月未拓店人员(8)</view> <view class="tabItem">当月未拓店人员(8)</view>
<view class="tabItem">长期未签约客户(8)</view> <view class="tabItem">长期未签约客户(8)</view>
</view> </view> -->
<block wx:if="{{ true }}"> <tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" />
<view class="staff"> <block wx:if="{{ activeIndex==0 }}">
<view class="header"> <view class="list">
<view class="name">张三</view> <view class="box">
<view class="phone">13800000000</view> <view class="header">
</view> <view class="name">张三</view>
<view class="introduction"> <view class="phone">13800000000</view>
<view class="item"> </view>
<view class="label">区域</view> <view class="introduction">
<view class="content">华中大区</view> <view class="item">
</view> <view class="label short">区域</view>
<view class="item"> <view class="content">华中大区</view>
<view class="label">直属上级</view> </view>
<view class="content">李四</view> <view class="item">
</view> <view class="label">直属上级</view>
<view class="item"> <view class="content">李四</view>
<view class="label">跟进中</view> </view>
<view class="content">8家</view> <view class="item">
</view> <view class="label short">跟进中</view>
<view class="item"> <view class="content">8家</view>
<view class="label">已签约未出单</view> </view>
<view class="content">8家</view> <view class="item">
</view> <view class="label">已签约未出单</view>
</view> <view class="content">8家</view>
</view> </view>
<view class="staff"> </view>
<view class="header"> </view>
<view class="name">张三</view> <view class="staff">
<view class="phone">13800000000</view> <view class="header">
</view> <view class="name">张三</view>
<view class="introduction"> <view class="phone">13800000000</view>
<view class="item"> </view>
<view class="label">区域</view> <view class="introduction">
<view class="content">华中大区</view> <view class="item">
</view> <view class="label short">区域</view>
<view class="item"> <view class="content">华中大区</view>
<view class="label">直属上级</view> </view>
<view class="content">李四</view> <view class="item">
</view> <view class="label">直属上级</view>
<view class="item"> <view class="content">李直属上级直属上级直属上级直属上级四</view>
<view class="label">跟进中</view> </view>
<view class="content">8家</view> <view class="item">
</view> <view class="label short">跟进中</view>
<view class="item"> <view class="content">8家</view>
<view class="label">已签约未出单</view> </view>
<view class="content">8家</view> <view class="item">
</view> <view class="label">已签约未出单</view>
</view> <view class="content">8家</view>
</view> </view>
</view>
</view>
</view>
</block> </block>
<block wx:if="{{ false }}"> <block wx:if="{{ activeIndex ==1 }}">
<view class="merchant"> <view class="list">
<view class="header"> <view class="box ">
<view class="name">杭州旺泽宝华哥桑纳尼汽车销售服务...</view> <view class="merchant">
<view class="status">跟进中</view> <view class="merchantName text-hide">杭州旺泽宝华哥桑纳杭州旺泽宝华哥桑纳尼汽车销售服务杭州旺泽宝华哥桑纳尼汽车销售服务尼汽车销售服务...</view>
</view> <view class="status">跟进中</view>
<view class="introduction"> </view>
<view class="item"> <view class="introduction merchantInfo">
<view class="label">拜访次数</view> <view class="item">
<view class="content">拜访次数</view> <view class="label">拜访次数</view>
</view> <view class="content">拜访次数</view>
<view class="item"> </view>
<view class="label">跟进人</view> <view class="item">
<view class="content">张三</view> <view class="label person">跟进人</view>
</view> <view class="content">张三</view>
<view class="item"> </view>
<view class="label">最后跟进</view> <view class="item last">
<view class="content">2025-07-23 22:31</view> <view class="label">最后跟进</view>
</view> <view class="content">2025-07-23 22:31</view>
</view> </view>
</view> </view>
<view class="merchant"> </view>
<view class="header"> <view class="box ">
<view class="name">杭州旺泽宝华哥桑纳尼汽车销售服务...</view> <view class="merchant">
<view class="status">跟进中</view> <view class="merchantName text-hide">杭州旺泽宝华哥桑纳杭州旺泽宝华哥桑纳尼汽车销售服务杭州旺泽宝华哥桑纳尼汽车销售服务尼汽车销售服务...</view>
</view> <view class="status">跟进中</view>
<view class="introduction"> </view>
<view class="item"> <view class="introduction merchantInfo">
<view class="label">拜访次数</view> <view class="item">
<view class="content">拜访次数</view> <view class="label">拜访次数</view>
</view> <view class="content">拜访次数</view>
<view class="item"> </view>
<view class="label">跟进人</view> <view class="item">
<view class="content">张三</view> <view class="label person">跟进人</view>
</view> <view class="content">张三</view>
<view class="item"> </view>
<view class="label">最后跟进</view> <view class="item last">
<view class="content">2025-07-23 22:31</view> <view class="label">最后跟进</view>
</view> <view class="content">2025-07-23 22:31</view>
</view> </view>
</view> </view>
</view>
</view>
</block> </block>
\ No newline at end of file \ No newline at end of file
...@@ -11,11 +11,11 @@ Component({ ...@@ -11,11 +11,11 @@ Component({
data: { data: {
switchName: { switchName: {
left: '当月', left: '当月',
right: '全年' right: '全部'
}, },
rankingSelectIndex: 1, rankingSelectIndex: 1,
overviewSwitchValue: 1, overviewSwitchValue: 1,
overviewTabIndex: 1, overviewTabIndex: 0,
tabList: ['延保', '权益', '轻改'], tabList: ['延保', '权益', '轻改'],
tabIndx: 0, tabIndx: 0,
unreadClueCount: 0, unreadClueCount: 0,
......
...@@ -3,11 +3,14 @@ ...@@ -3,11 +3,14 @@
// height: 100rpx; // height: 100rpx;
// padding: 0 32rpx; // padding: 0 32rpx;
// background-color: #F2F3F7; // background-color: #F2F3F7;
margin-bottom: 28rpx; // box-sizing: border-box;
// margin-bottom: 28rpx;
} }
.selectList { .selectList {
display: flex; display: flex;
margin-top: 31rpx;
.box { .box {
box-sizing: border-box; box-sizing: border-box;
...@@ -63,6 +66,7 @@ ...@@ -63,6 +66,7 @@
.tab { .tab {
display: flex; display: flex;
margin-bottom: 32rpx; margin-bottom: 32rpx;
align-items: center;
.box { .box {
width: 104rpx; width: 104rpx;
...@@ -148,19 +152,59 @@ ...@@ -148,19 +152,59 @@
} }
} .funnel {
position: relative;
width: 644rpx;
height: 228rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #000000;
font-size: 26rpx;
.select { .num {
color: #757980; z-index: 1;
font-size: 24rpx; margin-top: 15rpx;
margin-left: auto; }
.icon { .num:nth-of-type(2) {
width: 24rpx; margin-top: 35rpx;
height: 24rpx; }
.num:nth-of-type(3) {
margin-top: 35rpx;
}
// 元素第二个元素的margin-top为20rpx
// .num:nth-child(2n) {
// margin-top: 20rpx;
// }
// .mun:nth-child(2n) {
// margin-top: 20rpx;
// }
.bg {
position: absolute;
width: 520rpx;
height: 207rpx;
left: 50%;
transform: translateX(-50%);
top: 0;
}
} }
} }
// .select {
// color: #757980;
// font-size: 24rpx;
// margin-left: auto;
// .icon {
// width: 24rpx;
// height: 24rpx;
// }
// }
.text-center { .text-center {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -539,6 +583,7 @@ ...@@ -539,6 +583,7 @@
margin-left: auto; margin-left: auto;
.icon { .icon {
margin-top: 5rpx;
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
} }
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<view class="box {{ overviewTabIndex == 1?'active':'' }}" data-index="1" bindtap="changeOverviewTabIndex">产值</view> <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="box {{ overviewTabIndex == 0?'active':'' }}" data-index="0" bindtap="changeOverviewTabIndex">拓店</view>
</view> </view>
<block wx:if="{{ true }}"> <block wx:if="{{ overviewTabIndex == 1 }}">
<view class="statistics"> <view class="statistics">
<view class="item total"> <view class="item total">
<view class="title">产值</view> <view class="title">产值</view>
...@@ -64,28 +64,8 @@ ...@@ -64,28 +64,8 @@
</view> </view>
</view> </view>
<table></table> <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>
<block wx:if="{{ false }}"> <block wx:if="{{ overviewTabIndex == 0 }}">
<view class="statistics"> <view class="statistics">
<view class="item"> <view class="item">
<view class="title">已完成</view> <view class="title">已完成</view>
...@@ -102,6 +82,7 @@ ...@@ -102,6 +82,7 @@
</view> </view>
<view class="title">销售漏斗</view> <view class="title">销售漏斗</view>
<view class="funnel"> <view class="funnel">
<glsx-image class="bg" src="{{ '/index/funnel.png' }}" webp></glsx-image>
<view class="num">潜客数100</view> <view class="num">潜客数100</view>
<view class="num">签约数60</view> <view class="num">签约数60</view>
<view class="num">拓店数40</view> <view class="num">拓店数40</view>
...@@ -112,28 +93,12 @@ ...@@ -112,28 +93,12 @@
<view class="item">前十位</view> <view class="item">前十位</view>
<view class="item">后十位</view> <view class="item">后十位</view>
</view> </view>
<view class="select">产值</view> <view class="select">
</view> 拓店数
<view class="table"> <glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
<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>
</view> </view>
<table></table>
</block> </block>
</view> </view>
<view class="overview"> <view class="overview">
...@@ -215,45 +180,6 @@ ...@@ -215,45 +180,6 @@
<view class="nothing">暂无数据</view> <view class="nothing">暂无数据</view>
</block> </block>
</view> </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> <store-waring></store-waring>
<view class="box indicator indicatorlast"> <view class="box indicator indicatorlast">
<view class="header"> <view class="header">
......
// packageIndex/pages/regionalLeaders/regionalLeaders.js // packageIndex/pages/regionalLeaders/regionalLeaders.js
import IndexApi from '~/api/index/index'
import { getUserInfo } from '~/utils/cache/userInfo'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -9,20 +11,115 @@ Component({ ...@@ -9,20 +11,115 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
itemTableHeight: 0,
switchName: { switchName: {
left: '当月', left: '当月',
right: '全年' right: '全部'
}, },
rankingSelectIndex: 1, rankingSelectIndex: 1,
overviewSwitchValue: 1, overviewSwitchValue: 0,
overviewTabIndex: 1, overviewTabIndex: 1,
tabActive: 0 tabActive: 0,
tableData: [],
tableObj: [
{
name: '拓店数',
key: 'signedHasOrderTotal',
width: 'var(--fontSize120)'
},
{
name: '已签约数量',
key: 'signedCount',
width: 'var(--fontSize120)'
},
{ name: '跟进中', key: 'followUpCount', width: 'var(--fontSize120)' }
],
headerConfig: {
name: '销售名称',
key: 'staffName',
width: 'var(--fontSize120)'
},
tableFlag: true,
tableWidth: '100%'
},
/**
* 组件生命周期函数
*/
lifetimes: {
attached() {
this.setData({
userInfo: getUserInfo()
})
// 请求我的团队
this.getMyTeam()
// console.log(this.data.overviewSwitchValue)
// console.log(this.data.overviewTabIndex)
// console.log(this.data.tabActive)
}
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
// 通用封装:多次请求只处理最后一次的响应
// 用法:this.runLatest('myTeam', () => IndexApi.getMyTeam({ isAll }))
runLatest(key, executor) {
this._latestMap = this._latestMap || {}
const currentId = (this._latestMap[key] || 0) + 1
this._latestMap[key] = currentId
return Promise.resolve()
.then(() => executor())
.then(res => {
if (this._latestMap[key] === currentId) {
return res
}
return undefined
})
.catch(err => {
if (this._latestMap[key] === currentId) {
throw err
}
return undefined
})
},
getMyTeam() {
// console.log(IndexApi, 'IndexApi')
let { overviewSwitchValue } = this.data
this.runLatest('myTeam', () =>
IndexApi.getMyTeam({
isAll: overviewSwitchValue
})
)
.then(res => {
if (!res) return
console.log(res, 'getMyTeam')
// res.data现在只有一条数据 循环复制10次 并把数据复制的staffName加上数字
// 模拟数据:复制原数据10次并为每个staffName添加数字后缀
if (res.data && res.data.length > 0) {
const originalData = res.data[0] // 取第一条数据作为模板
res.data = []
for (let i = 0; i < 20; i++) {
const copyData = { ...originalData }
copyData.staffName = (originalData.staffName || '销售') + (i + 1)
res.data.push(copyData)
}
}
this.setData({
tableData: res.data,
// 最大不超过10条的高度 10条*72px
itemTableHeight:
res.data.length * 72 > 720 ? 720 : res.data.length * 72
})
console.log(
res.data.length * 72 > 720 ? 720 : res.data.length * 72,
'itemTableHeight'
)
})
.catch(err => {
console.error('getMyTeam error:', err)
})
},
changeTabActive(e) { changeTabActive(e) {
let { index } = e.currentTarget.dataset let { index } = e.currentTarget.dataset
this.setData({ this.setData({
...@@ -30,11 +127,13 @@ Component({ ...@@ -30,11 +127,13 @@ Component({
}) })
}, },
onSwitchChange(e) { onSwitchChange(e) {
console.log(e.detail) // console.log(e.detail)
// let { value } = e.detail // let { value } = e.detail
this.setData({ this.setData({
overviewSwitchValue: Number(e.detail) overviewSwitchValue: Number(e.detail)
}) })
// 请求我的团队
this.getMyTeam()
} }
} }
}) })
...@@ -9,7 +9,15 @@ ...@@ -9,7 +9,15 @@
<switch-block switchStatus="{{ overviewSwitchValue }}" bindswitchEvent="onSwitchChange" switchName="{{ switchName }}" /> <switch-block switchStatus="{{ overviewSwitchValue }}" bindswitchEvent="onSwitchChange" switchName="{{ switchName }}" />
</view> </view>
</view> </view>
<table showMoreBtn="{{ true }}"></table> <table
showMoreBtn="{{ true }}"
table="{{ tableData }}"
headerConfig="{{ headerConfig }}"
tableObj="{{ tableObj }}"
tableFlag="{{ tableFlag }}"
tableWidth="{{ tableWidth }}"
itemTableHeight="{{ itemTableHeight }}"
></table>
</view> </view>
</view> </view>
<storeStatistics></storeStatistics> <storeStatistics></storeStatistics>
......
<!--packageIndex/pages/staff/staff.wxml--> <!--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> <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
<store-waring></store-waring>
\ No newline at end of file \ No newline at end of file
// pages/components/storeStatistics/storeStatistics.js // pages/components/storeStatistics/storeStatistics.js
import IndexApi from '~/api/index/index'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: {}, properties: {
regionId: {
type: String,
value: ''
}
},
/** /**
* 组件的初始数据 * 组件的初始数据
...@@ -11,150 +17,116 @@ Component({ ...@@ -11,150 +17,116 @@ Component({
data: { data: {
switchName: { switchName: {
left: '当月', left: '当月',
right: '全年' right: '全部'
}, },
followUpData: {},
rankingSelectIndex: 1, rankingSelectIndex: 1,
overviewSwitchValue: 1, overviewSwitchValue: 0,
overviewTabIndex: 1, overviewTabIndex: 1,
tabActive: 0, tabActive: 2,
unreadClueCount: 0, unreadClueCount: 0,
orderBy: 1,
tableWidth: 1088, tableWidth: 1088,
tableFlag: true, tableFlag: true,
table: [ kpiProgressTable: [],
{
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: [ tableObj: [
{ {
name: '贴膜', name: '拓店数',
unit: '/台', key: 'completed',
key: 'filmTimes', width: 'var(--fontSize134)'
width: 'var(--fontSize110)'
}, },
{ {
name: '核销', name: '已签约数量',
unit: '/张', key: 'target',
key: 'usedTotal', width: 'var(--fontSize134)'
width: 'var(--fontSize110)'
}, },
{ { name: '跟进中', key: 'completionRate', width: 'var(--fontSize84)' }
name: '体验', ],
unit: '/位', headerConfig: {
key: 'experienceTotal', name: '门店名称',
width: 'var(--fontSize110)' key: 'merchantName',
}, width: 'var(--fontSize128)'
{ },
name: '转化', tableFlag: true,
unit: '/单', tableWidth: '100%'
key: 'upgradeTotal', },
width: 'var(--fontSize110)' /**
}, * 组件生命周期函数
{ */
name: '营业额', lifetimes: {
unit: '', attached() {
key: 'orderMoneyTotal', // this.setData({
sort: false, // userInfo: getUserInfo()
width: '118rpx' // })
}, this.getTotal()
{ name: '客单价', unit: '', key: 'customerUnitMoney', width: '118rpx' }, // 获取当前的年月份 格式为YYYY年M月D日
{ let date = new Date()
name: '转化率', let year = date.getFullYear()
unit: '', let month = date.getMonth() + 1
key: 'upgradeRate', let day = date.getDate()
width: 'var(--fontSize110)' let currentDate = `${year}年${month}月${day}日`
} this.setData({
] currentDate,
month
})
this.getKpiProgress()
}
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
getKpiProgress() {
let { tabActive } = this.data
let params = {
businessType: tabActive,
orderBy: 1
}
IndexApi.getKpiProgress(params)
.then(res => {
console.log(res)
if (res.code == 0) {
console.log(res.data, res.data.length)
this.setData({
kpiProgressTable: res.data,
itemTableHeight:
res.data.length * 72 > 720 ? 720 : res.data.length * 72
})
}
})
.catch(err => {
console.log(err)
})
},
getTotal() {
let { overviewSwitchValue } = this.data
let params = {
isAll: overviewSwitchValue
}
if (this.properties.director) {
params.regionId = this.properties.regionId
}
IndexApi.getTotal(params)
.then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
followUpData: data
})
}
})
.catch(err => {
console.error('getStoreStatistics error:', err)
})
},
changeTabActive(e) { changeTabActive(e) {
let { index } = e.currentTarget.dataset let { index } = e.currentTarget.dataset
this.setData({ this.setData({
tabActive: Number(index) tabActive: Number(index)
}) })
this.getKpiProgress()
}, },
onSwitchChange(e) { onSwitchChange(e) {
console.log(e.detail) console.log(e.detail)
...@@ -162,6 +134,8 @@ Component({ ...@@ -162,6 +134,8 @@ Component({
this.setData({ this.setData({
overviewSwitchValue: Number(e.detail) overviewSwitchValue: Number(e.detail)
}) })
// 请求门店待跟进
this.getTotal()
} }
} }
}) })
...@@ -220,6 +220,8 @@ ...@@ -220,6 +220,8 @@
margin-left: auto; margin-left: auto;
.icon { .icon {
display: inline-block;
margin-top: 10rpx;
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="title">我的门店</view> <view class="title">我的门店</view>
<view class="tableBox"> <view class="tableBox">
<view class="header"> <view class="header">
<view class="left">门店待根据</view> <view class="left">门店待跟进</view>
<view class="right"> <view class="right">
<switch-block switchStatus="{{ overviewSwitchValue }}" bindswitchEvent="onSwitchChange" switchName="{{ switchName }}" /> <switch-block switchStatus="{{ overviewSwitchValue }}" bindswitchEvent="onSwitchChange" switchName="{{ switchName }}" />
</view> </view>
...@@ -13,44 +13,44 @@ ...@@ -13,44 +13,44 @@
<view class="statusList"> <view class="statusList">
<view class="item"> <view class="item">
<view class="label">潜客数</view> <view class="label">潜客数</view>
<view class="num">12</view> <view class="num">{{followUpData.potentialCustomersCount}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="label">跟进中</view> <view class="label">跟进中</view>
<view class="num">12</view> <view class="num">{{followUpData.followUpCount}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="label">已签约未出单</view> <view class="label">已签约未出单</view>
<view class="num">12</view> <view class="num">{{followUpData.signedNoOrderTotal}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="label">已签约已出单</view> <view class="label">已签约已出单</view>
<view class="num">12</view> <view class="num">{{followUpData.signedHasOrderTotal}}</view>
</view> </view>
</view> </view>
<view class="visitRecord"> <view class="visitRecord" wx:if="{{ followUpData.waitFollowShopList[0] }}">
<view class="time"> <view class="time">
<glsx-image class="icon" src="/static/images/clock.png"></glsx-image> <glsx-image class="icon" src="/index/clock.png"></glsx-image>
<view class="timebox">首次拜访:09-26</view> <view class="timebox">首次拜访:{{followUpData.waitFollowShopList[0].firstVisitTime}} 09-26</view>
<view class="status">跟进中</view> <view class="status">跟进中</view>
</view> </view>
<view class="merchantName text-hide">杭州旺泽宝华哥桑纳尼汽车销售服务有限公杭州旺泽宝华哥桑纳尼汽车销售服务有限公司杭州旺泽宝华哥桑纳尼汽车销售服务有限公司司</view> <view class="merchantName text-hide">{{followUpData.waitFollowShopList[0].storeName}}</view>
<view class="content"> <view class="content">
<text class="label">上次拜访内容:</text> <text class="label">上次拜访内容:</text>
<text class="text">客户意向很高,门店运营里有觉得吃力的地方,希望互相客户意向很高,门店运营里有觉得吃力的地客户意向很高,门店运营里有觉得吃力的地搭把手,让门店生意再上一层客户意向很高,门店运营里有觉得吃力的地方,希望互相搭把手,让门店生意再上一层楼客户意向很高,门店运营里有觉得吃力的地方,希望互相搭把手,让门店生意再上一层楼楼</text> <text class="text">{{followUpData.waitFollowShopList[0].lastVisitContent||'-'}}</text>
</view> </view>
<view class="btn">跟进</view> <view class="btn">跟进</view>
</view> </view>
<view class="visitRecord"> <view class="visitRecord" wx:if="{{ followUpData.waitFollowShopList[1] }}">
<view class="time"> <view class="time">
<glsx-image></glsx-image> <glsx-image></glsx-image>
<view class="timebox">首次拜访:09-26</view> <view class="timebox">首次拜访:{{followUpData.waitFollowShopList[1].firstVisitTime}} 09-26</view>
<view class="status">跟进中</view> <view class="status">跟进中</view>
</view> </view>
<view class="merchantName">杭州旺泽宝华哥桑纳尼汽车销售服务有限公司</view> <view class="merchantName text-hide">{{followUpData.waitFollowShopList[1].storeName}}</view>
<view class="content"> <view class="content">
<text class="label">上次拜访内容:</text> <text class="label">上次拜访内容:</text>
<text class="text">客户意向很高,门店运营里有觉得吃力的地方,希望互相搭把手,让门店生意再上一层楼</text> <text class="text">{{followUpData.waitFollowShopList[1].lastVisitContent||'-'}}</text>
</view> </view>
<view class="btn">跟进</view> <view class="btn">跟进</view>
</view> </view>
...@@ -58,21 +58,29 @@ ...@@ -58,21 +58,29 @@
</view> </view>
<view class="headerBar kpiBox"> <view class="headerBar kpiBox">
<view class="tableBox"> <view class="tableBox">
<view class="header title">9月KPI完成进度</view> <view class="header title">{{ month }}月KPI完成进度</view>
<view class="tips">门店KPI指标完成进度</view> <view class="tips">门店KPI指标完成进度</view>
<view class="tab"> <view class="tab">
<view class="item {{ tabActive == 0?'active':'' }}" bindtap="changeTabActive" data-index="0">延保</view> <view class="item {{ tabActive == 2?'active':'' }}" bindtap="changeTabActive" data-index="2">延保</view>
<view class="item {{ tabActive == 1?'active':'' }}" bindtap="changeTabActive" data-index="1">权益</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 class="item {{ tabActive == 0?'active':'' }}" bindtap="changeTabActive" data-index="0">轻改</view>
</view> </view>
<view class="productionProgress"> <view class="productionProgress">
<view class="label">产值进度</view> <view class="label">产值进度</view>
<view class="date">2025年9月29日</view> <view class="date">{{currentDate}}</view>
<view class="select"> <view class="select">
已完成 已完成
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image> <glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view> </view>
</view> </view>
<table showMoreBtn="{{ true }}"></table> <table
showMoreBtn="{{ true }}"
table="{{ kpiProgressTable }}"
headerConfig="{{ headerConfig }}"
tableObj="{{ tableObj }}"
tableFlag="{{ tableFlag }}"
tableWidth="{{ tableWidth }}"
itemTableHeight="{{ itemTableHeight }}"
></table>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
// pages/components/storeWarning/storeWarning.js // pages/components/storeWarning/storeWarning.js
import IndexApi from '~/api/index/index'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
staffUuid: {
type: String,
value: ''
},
regionId: {
type: String,
value: ''
}
},
// 组件生命周期
lifetimes: {
attached() {
this.getMonthList()
this.getWarningStores()
}
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
warningStores: {
backstopWarningCount: 0,
lossWarningCount: 0,
lostShopWarningCount: 0
}
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
getWarningStores() {
let { month, staffUuid, regionId } = this.data
let params = { month }
if (staffUuid) {
params.staffUuid = staffUuid
}
if (regionId) {
params.regionId = regionId
}
IndexApi.getWarningStores(params).then(res => {
console.log(res, 'res')
this.setData({
warningStores: res.data
})
})
},
//实现一个方法,或者当前到往前12月份的数组 是一个对象,有moth yyyy-MM,和回显用的月份showMonth M
getMonthList() {
const monthList = []
const now = new Date()
// 逐月递减生成最近12个月,考虑跨年
for (let i = 0; i < 12; i++) {
const d = new Date(now.getFullYear(), now.getMonth() - i, 1)
const y = d.getFullYear()
const m = d.getMonth() + 1
monthList.push({
// yyyy-MM(月份补零)
month: `${y}-${String(m).padStart(2, '0')}`,
// M(回显用,不补零)
showMonth: `${m}月`
})
}
// 默认选中当前月份
this.setData({
monthList,
month: monthList[0].month,
showMonth: monthList[0].showMonth
})
console.log(monthList, 'monthList')
}
// getWarningStores() {
// IndexApi.getWarningStores({
// staffUuid: this.data.staffUuid,
// regionId: this.data.regionId
// }).then(res => {
// this.setData({
// warningStores: res.data
// })
// })
// }
} }
})
\ No newline at end of file \ No newline at end of file
})
...@@ -65,12 +65,14 @@ ...@@ -65,12 +65,14 @@
.indicator+.indicator { .indicator+.indicator {
margin-bottom: 266rpx; margin-bottom: 266rpx;
} }
.select { .select {
color: #757980; color: #757980;
font-size: 24rpx; font-size: 24rpx;
margin-left: auto; margin-left: auto;
.icon { .icon {
margin-top: 4rpx;
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
} }
......
<!--pages/components/storeWarning/storeWarning.wxml--> <!--pages/components/storeWarning/storeWarning.wxml-->
<!-- <text>pages/components/storeWarning/storeWarning.wxml</text> --> <!-- <text>pages/components/storeWarning/storeWarning.wxml</text> -->
<view class="box indicator"> <view class="box indicator">
<view class="header"> <view class="header">
<view class="left">指标预警门店</view> <view class="left">指标预警门店</view>
<view class="right select"> <view class="right select">
产值 {{showMonth}}
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image> <glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view> </view>
</view> </view>
<view class="tips">指标异常门店</view> <view class="tips">指标异常门店</view>
<view class="list"> <view class="list">
<view class="item"> <view class="item">
<view class="top">兜底指数预警</view> <view class="top">兜底指数预警</view>
<view class="bottom"> <view class="bottom">
<text class="num">12</text> <text class="num">{{warningStores.backstopWarningCount}}</text>
<text class="unit">家</text> <text class="unit">家</text>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="top">丢店风险预警</view> <view class="top">丢店风险预警</view>
<view class="bottom"> <view class="bottom">
<text class="num">12</text> <text class="num">{{warningStores.lostShopWarningCount}}</text>
<text class="unit">家</text> <text class="unit">家</text>
</view> </view>
</view> </view>
<view class="item last"> <view class="item last">
<view class="top">亏损预警</view> <view class="top">亏损预警</view>
<view class="bottom"> <view class="bottom">
<text class="num">12</text> <text class="num">{{warningStores.lossWarningCount}}</text>
<text class="unit">家</text> <text class="unit">家</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
// pages/components/table/table.js // pages/components/table/table.js
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
table: {
type: Array,
value: []
},
tableObj: {
type: Array,
value: []
},
tableFlag: {
type: Boolean,
value: true
},
tableWidth: {
type: String,
value: '100%'
},
headerConfig: {
type: Object,
value: {}
},
itemTableHeight: {
type: String,
value: '0rpx'
}
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
unreadClueCount: 0, // tableWidth: 1088,
tableWidth: 1088, // tableFlag: true,
tableFlag: true,
table: [ table: [
{ // {
id: null, // id: null,
merchantId: 44218100, // merchantId: 44218100,
merchantName: '测试门店22', // merchantName: '测试门店22',
dataDate: null, // dataDate: null,
getTotal: 0, // getTotal: 0,
usedTotal: 0, // usedTotal: 0,
upgradeTotal: 0, // upgradeTotal: 0,
upgradeMoneyTotal: null, // upgradeMoneyTotal: null,
createdBy: null, // createdBy: null,
createdDate: null, // createdDate: null,
updatedBy: null, // updatedBy: null,
updatedDate: null, // updatedDate: null,
deletedFlag: null, // deletedFlag: null,
startDate: null, // startDate: null,
endDate: null, // endDate: null,
yqMerchantIds: null, // yqMerchantIds: null,
orderByType: null, // orderByType: null,
addTotal: 0, // addTotal: 0,
orderMoneyTotal: 0, // orderMoneyTotal: 0,
merchantIdList: null, // merchantIdList: null,
usedPer: null, // usedPer: null,
upgradePer: null, // upgradePer: null,
totalUsedPer: null, // totalUsedPer: null,
totalUpgradePer: null, // totalUpgradePer: null,
customerUnitMoney: 0, // customerUnitMoney: 0,
upgradeRate: 0, // upgradeRate: 0,
experienceTotal: 0, // experienceTotal: 0,
filmTimes: 0, // filmTimes: 0,
notUpgradeTotal: null, // notUpgradeTotal: null,
filmTimesGrowth: null, // filmTimesGrowth: null,
usedTotalGrowth: null, // usedTotalGrowth: null,
upgradeTotalGrowth: null, // upgradeTotalGrowth: null,
notUpgradeTotalGrowth: null, // notUpgradeTotalGrowth: null,
orderMoneyTotalGrowth: null, // orderMoneyTotalGrowth: null,
customerUnitMoneyGrowth: null, // customerUnitMoneyGrowth: null,
experienceTotalGrowth: null, // experienceTotalGrowth: null,
upgradeRateGrowth: null, // upgradeRateGrowth: null,
goodsOrCouponType: null, // goodsOrCouponType: null,
queryRangeType: null // queryRangeType: null
}, // },
{ // {
id: null, // id: null,
merchantId: 44218100, // merchantId: 44218100,
merchantName: '测试门店22', // merchantName: '测试门店22',
dataDate: null, // dataDate: null,
getTotal: 0, // getTotal: 0,
usedTotal: 0, // usedTotal: 0,
upgradeTotal: 0, // upgradeTotal: 0,
upgradeMoneyTotal: null, // upgradeMoneyTotal: null,
createdBy: null, // createdBy: null,
createdDate: null, // createdDate: null,
updatedBy: null, // updatedBy: null,
updatedDate: null, // updatedDate: null,
deletedFlag: null, // deletedFlag: null,
startDate: null, // startDate: null,
endDate: null, // endDate: null,
yqMerchantIds: null, // yqMerchantIds: null,
orderByType: null, // orderByType: null,
addTotal: 0, // addTotal: 0,
orderMoneyTotal: 0, // orderMoneyTotal: 0,
merchantIdList: null, // merchantIdList: null,
usedPer: null, // usedPer: null,
upgradePer: null, // upgradePer: null,
totalUsedPer: null, // totalUsedPer: null,
totalUpgradePer: null, // totalUpgradePer: null,
customerUnitMoney: 0, // customerUnitMoney: 0,
upgradeRate: 0, // upgradeRate: 0,
experienceTotal: 0, // experienceTotal: 0,
filmTimes: 0, // filmTimes: 0,
notUpgradeTotal: null, // notUpgradeTotal: null,
filmTimesGrowth: null, // filmTimesGrowth: null,
usedTotalGrowth: null, // usedTotalGrowth: null,
upgradeTotalGrowth: null, // upgradeTotalGrowth: null,
notUpgradeTotalGrowth: null, // notUpgradeTotalGrowth: null,
orderMoneyTotalGrowth: null, // orderMoneyTotalGrowth: null,
customerUnitMoneyGrowth: null, // customerUnitMoneyGrowth: null,
experienceTotalGrowth: null, // experienceTotalGrowth: null,
upgradeRateGrowth: null, // upgradeRateGrowth: null,
goodsOrCouponType: null, // goodsOrCouponType: null,
queryRangeType: 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)'
}
] ]
// 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)'
// },
// ]
}, },
/** /**
...@@ -146,21 +153,20 @@ Component({ ...@@ -146,21 +153,20 @@ Component({
*/ */
methods: { methods: {
scrollonReachBottom() { scrollonReachBottom() {
console.log('scrollonReachBottom') // console.log('scrollonReachBottom')
let { pages, pageNum } = this.data // let { pages, pageNum } = this.data
// 判断当前页是否是末页 // // 判断当前页是否是末页
if (pages == pageNum) return wx.$util.showToast('列表已到底') // if (pages == pageNum) return wx.$util.showToast('列表已到底')
// this.setData({
this.setData({ // pageNum: pageNum + 1
pageNum: pageNum + 1 // })
}) // this.getMerchantCouponList()
this.getMerchantCouponList()
}, },
restPageNum() { restPageNum() {
this.setData({ // this.setData({
pageNum: 1 // pageNum: 1
}) // })
this.getMerchantCouponList() // this.getMerchantCouponList()
}, }
} }
})
\ No newline at end of file \ No newline at end of file
})
...@@ -179,6 +179,8 @@ ...@@ -179,6 +179,8 @@
overflow: hidden; overflow: hidden;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
color: #292d33;
font-size: 26rpx;
} }
.table .table-body .th .labelName.oneLine { .table .table-body .th .labelName.oneLine {
...@@ -192,7 +194,9 @@ ...@@ -192,7 +194,9 @@
height: var(--fontSize94); height: var(--fontSize94);
margin-left: var(--fontSize10); margin-left: var(--fontSize10);
color: #347bff;
font-size: 28rpx;
font-family: "numberNor";
} }
.table-tips { .table-tips {
...@@ -205,8 +209,19 @@ ...@@ -205,8 +209,19 @@
.nothing { .nothing {
padding: var(--fontSize30) 0; padding: var(--fontSize30) 0;
text-align: center; text-align: center;
font-size: var(--fontSize28); // font-size: var(--fontSize28);
color: #666666; color: #999ea8;
font-size: 24rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.img {
width: 172rpx;
height: 172rpx;
// margin-bottom: 40rpx;
}
} }
.table { .table {
......
<!--pages/components/table/table.wxml--> <!--pages/components/table/table.wxml-->
<!-- <text>pages/components/table/table.wxml</text> --> <!-- <text>pages/components/table/table.wxml</text> -->
<scroll-view <!-- <scroll-view
scroll-x scroll-x
scroll-y scroll-y
show-scrollbar="{{ false }}" show-scrollbar="{{ false }}"
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
refresher-threshold="304" refresher-threshold="304"
refresher-triggered="{{ triggered }}" refresher-triggered="{{ triggered }}"
class="table" class="table"
> style="height: {{ tableHeight }};"
<view class="table-box" style="width: var(--fontSize{{ tableWidth }})"> > -->
<view class="table" wx:if="{{ table.length > 0 }}">
<view class="table-box">
<view class="table-header" style="width: var(--fontSize{{ tableWidth }})"> <view class="table-header" style="width: var(--fontSize{{ tableWidth }})">
<view class="label">合作门店</view> <view class="label">{{headerConfig.name}}</view>
<view class="values"> <view class="values">
<!-- {{ tableSort == index?'active':'' }} --> <!-- {{ tableSort == index?'active':'' }} -->
<block wx:for="{{ tableObj }}" wx:key="index"> <block wx:for="{{ tableObj }}" wx:key="index">
...@@ -29,18 +31,28 @@ ...@@ -29,18 +31,28 @@
</block> </block>
</view> </view>
</view> </view>
<view class="table-body"> <scroll-view
<block wx:if="{{ tableFlag }}"> scroll-x
<block wx:if="{{ table.length > 0 }}"> scroll-y
<block wx:for="{{ table }}" wx:key="index"> show-scrollbar="{{ false }}"
<view class="th" style="width: var(--fontSize{{ tableWidth }})"> bindrefresherrefresh="restPageNum"
<view class="name"> bindscrolltolower="scrollonReachBottom"
<view class="labelName {{ item.merchantName.length<=10?'oneLine':'' }}">{{item.merchantName}}</view> refresher-threshold="304"
</view> refresher-triggered="{{ triggered }}"
<view class="values"> style="height: {{ itemTableHeight }}rpx;"
<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'] }};"> <view class="table-body">
<block wx:if="{{ i.key == 'filmTimes' }}"> <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[headerConfig.key].length<=10?'oneLine':'' }}">{{item[headerConfig.key]}}</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 <view
class="text-center" class="text-center"
style="width:100%;height: 100%;color:{{ isYqdSuper?'#347BFF':'#333333' }}" style="width:100%;height: 100%;color:{{ isYqdSuper?'#347BFF':'#333333' }}"
...@@ -48,22 +60,26 @@ ...@@ -48,22 +60,26 @@
bindtap="changeTableData" bindtap="changeTableData"
>{{item[i.key] || 0}}</view> >{{item[i.key] || 0}}</view>
</block> </block>
<block wx:elif="{{ i.key == 'upgradeRate' }}">{{item[i.key] || 0}}%</block> <block wx:elif="{{ i.key == 'upgradeRate' }}">{{item[i.key] || 0}}%</block> -->
<block wx:else>{{item[i.key] || 0}}</block> <block>{{item[i.key] || 0}}</block>
</view> </view>
</block> </block>
</view>
</view> </view>
</view> </block>
</block> </block>
</block> </block>
</block> </view>
</view> </scroll-view>
</view> </view>
</scroll-view> </view>
<block wx:if="{{ table.length <= 0 }}"> <block wx:if="{{ table.length <= 0 }}">
<view class="nothing">暂无数据</view> <view class="nothing">
<glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image>
<view class="text">暂无数据</view>
</view>
</block> </block>
<view class="showMore"> <!-- <view class="showMore">
<view class="btn">加载更多</view> <view class="btn">加载更多</view>
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image> <glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view>
\ No newline at end of file \ No newline at end of file
</view> -->
\ No newline at end of file \ No newline at end of file
...@@ -21,7 +21,7 @@ const h5Obj = { ...@@ -21,7 +21,7 @@ const h5Obj = {
2测试 2测试
3生产 3生产
*/ */
// const index = 1 const index = 1
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo); // console.log(systemInfo);
...@@ -30,7 +30,7 @@ const systemInfo = wx.getSystemInfoSync() ...@@ -30,7 +30,7 @@ const systemInfo = wx.getSystemInfoSync()
const manual = false const manual = false
const release = false const release = false
let index = 0 // let index = 1
// 判断小程序环境 // 判断小程序环境
// develop:开发版(正常开发工具,测试时) // develop:开发版(正常开发工具,测试时)
...@@ -122,7 +122,7 @@ const domain = { ...@@ -122,7 +122,7 @@ const domain = {
// scrm: 'http://192.168.1.165:8292' // scrm: 'http://192.168.1.165:8292'
}, },
dev: { dev: {
dj: 'http://192.168.3.122:9203', dj: 'http://192.168.3.189:8385',
scrm: 'https://scrm.dev.glsx.com.cn' scrm: 'https://scrm.dev.glsx.com.cn'
}, },
uat: { uat: {
......
...@@ -18,18 +18,22 @@ class Request { ...@@ -18,18 +18,22 @@ class Request {
let header = let header =
RequestMethods === 'POST' RequestMethods === 'POST'
? { ? {
'content-type': 'application/x-www-form-urlencoded' 'content-type': 'application/x-www-form-urlencoded'
} }
: {} : {}
let projectName = params.apiProjectName || this.getRopProject(params.method) let projectName =
params.apiProjectName || this.getRopProject(params.method)
// console.log(projectName, 'projectName') // console.log(projectName, 'projectName')
if (!projectName) projectName = this.getRopProject(params.method) if (!projectName) projectName = this.getRopProject(params.method)
let path = pathEnum[projectName] let path = pathEnum[projectName]
if (!path) { if (!path) {
path = requestPath == 'dj' ? `/rop-dj-${projectName}/` : `/rop-scrm-${projectName}/` path =
requestPath == 'dj'
? `/rop-dj-${projectName}/`
: `/rop-scrm-${projectName}/`
} }
params = this.getData(params, requestPath) params = this.getData(params, requestPath)
console.log(params.method,'params'); // console.log(params.method,'params');
wx.request({ wx.request({
url: `${domain[requestPath]}${path}router?method=${params.method}`, url: `${domain[requestPath]}${path}router?method=${params.method}`,
data: params, data: params,
...@@ -117,7 +121,7 @@ class Request { ...@@ -117,7 +121,7 @@ class Request {
return sign(params, secret, noSignAttr) return sign(params, secret, noSignAttr)
} }
getRopProject(method) { getRopProject(method) {
console.log(method); // console.log(method);
const projectName = method.split('.')[2] const projectName = method.split('.')[2]
return projectName return projectName
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!