Commit e4db5539 by 张立顺

feat 接口联调

1 parent f1ae7840
...@@ -54,5 +54,89 @@ class IndexApi { ...@@ -54,5 +54,89 @@ class IndexApi {
true true
) )
} }
// 数据总览-产值筛选数量统计
outputCount(data = {}) {
return api.post(
{
method: 'dj.api.sale.data.overview.output.count',
...data
},
true
)
}
// 大区看板-产值排序
outputRanking(data = {}) {
return api.post(
{
method: 'dj.api.sale.region.output.ranking',
...data
},
true
)
}
// 大区看板-拓店排行榜
storeExpansionRanking(data = {}) {
return api.post(
{
method: 'dj.api.sale.region.store.expansion.ranking',
...data
},
true
)
}
// 数据总览-拓店筛选数量统计,销售漏斗
storeExpansionCount(data = {}) {
return api.post(
{
method: 'dj.api.sale.data.overview.store.expansion.count',
...data
},
true
)
}
// 数据总览-拓店排行榜
overviewStoreExpansionRanking(data = {}) {
return api.post(
{
method: 'dj.api.sale.data.overview.store.expansion.ranking',
...data
},
true
)
}
// 数据总览-门店产值排行榜
storeOutputRanking(data = {}) {
return api.post(
{
method: 'dj.api.sale.data.overview.store.output.ranking',
...data
},
true
)
}
// 销售小结
summaryMonthShow(data = {}) {
return api.post(
{
method: 'dj.api.sale.summary.month.show',
...data
},
true
)
}
// 销售小结人员详情列表
summaryMonthShowPersonList(data = {}) {
return api.post(
{
method: 'dj.api.sale.summary.month.show.person.list',
...data
},
true
)
}
} }
export default IndexApi export default IndexApi
...@@ -52,40 +52,41 @@ ...@@ -52,40 +52,41 @@
}, },
"subpackages": [ "subpackages": [
{ {
"root": "packageIndex/pages", "root": "packageIndex",
"name": "packageIndex", "name": "packageIndex",
"pages": [ "pages": [
"staff/staff", "pages/staff/staff",
"regionalLeaders/regionalLeaders", "pages/regionalLeaders/regionalLeaders",
"directorLeaders/directorLeaders", "pages/directorLeaders/directorLeaders",
"salesSummary/salesSummary" "pages/salesSummary/salesSummary",
"pages/warningStoreList/warningStoreList"
] ]
}, },
{ {
"root": "packageCustomer/pages", "root": "packageCustomer",
"name": "packageCustomer", "name": "packageCustomer",
"pages": [ "pages": [
"potentialDetail/potentialDetail", "pages/potentialDetail/potentialDetail",
"createVisit/createVisit", "pages/createVisit/createVisit",
"resultFeedback/resultFeedback", "pages/resultFeedback/resultFeedback",
"createPotential/createPotential", "pages/createPotential/createPotential",
"merchantDetail/merchantDetail" "pages/merchantDetail/merchantDetail"
] ]
}, },
{ {
"root": "packageTool/pages", "root": "packageTool",
"name": "packageTool", "name": "packageTool",
"pages": [ "pages": [
"index/index", "pages/index/index",
"salesDailyReport/salesDailyReport", "pages/salesDailyReport/salesDailyReport",
"salesReport/salesReport" "pages/salesReport/salesReport"
] ]
}, },
{ {
"root": "packageMine/pages", "root": "packageMine",
"name": "packageMine", "name": "packageMine",
"pages": [ "pages": [
"setting/setting" "pages/setting/setting"
] ]
} }
], ],
......
// components/SelectPopup/SelectPopup.js
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
properties: {
show: {
type: Boolean,
value: false
},
title: {
type: String,
value: ''
},
// 原始选项列表,支持任意字段名,通过 labelKey/valueKey 映射
options: {
type: Array,
value: []
},
// 是否多选
multiple: {
type: Boolean,
value: false
},
// 单选初始值
value: {
type: null,
value: null
},
// 多选初始值
values: {
type: Array,
value: []
},
// 字段映射
labelKey: {
type: String,
value: 'name'
},
valueKey: {
type: String,
value: 'value'
},
// 多选最大数量(不限制则设为 0 或不传)
max: {
type: Number,
value: 0
},
// 单选时点击即确认
confirmOnSelect: {
type: Boolean,
value: false
}
},
data: {
IMG_URL,
displayOptions: [], // 带 checked 的渲染选项
selectedValues: [] // 选中的值列表(单选也统一用数组)
},
observers: {
'options, multiple, value, values': function (
options,
multiple,
value,
values
) {
this.initDisplay(options || [], multiple, value, values)
},
show(n) {
// 进出场时保持数据一致
if (n) {
this.initDisplay(
this.properties.options || [],
this.properties.multiple,
this.properties.value,
this.properties.values
)
}
}
},
methods: {
initDisplay(options = [], multiple = false, value = null, values = []) {
console.log(value)
const vKey = this.properties.valueKey
// 初始选中值统一转为数组
const initSelected = multiple
? Array.isArray(values)
? values.slice()
: []
: value !== null && value !== undefined
? value
: []
const display = (options || []).map(item => {
const val = item[vKey]
console.log(vKey, val, initSelected)
const checked = initSelected.some(v => v === val)
return { ...item, checked }
})
this.setData({
displayOptions: display,
selectedValues: initSelected
})
},
toggle(e) {
const { index } = e.currentTarget.dataset
const { multiple, max, valueKey } = this.properties
const item = this.data.displayOptions[index]
if (!item || item.disabled) return
if (multiple) {
let nextChecked = !item.checked
// 限制最大数量
if (nextChecked && max > 0) {
const selectedCount = this.data.selectedValues.length
if (selectedCount >= max) {
// 可根据项目规范提示用户,这里不做 UI 弹窗,保持组件纯净
return
}
}
this.setData({ [`displayOptions[${index}].checked`]: nextChecked })
const val = item[valueKey]
let selected = this.data.selectedValues.slice()
const pos = selected.findIndex(v => v === val)
if (nextChecked && pos === -1) selected.push(val)
if (!nextChecked && pos > -1) selected.splice(pos, 1)
this.setData({ selectedValues: selected })
this.triggerEvent('change', {
values: selected,
items: this.getSelectedItems()
})
} else {
// 单选:取消其他,选中当前
const currentVal = item[valueKey]
const display = this.data.displayOptions.map((it, idx) => ({
...it,
checked: idx === index ? !it.checked : false
}))
const selected = display[index].checked ? [currentVal] : []
this.setData({ displayOptions: display, selectedValues: selected })
this.triggerEvent('change', {
values: selected,
items: this.getSelectedItems()
})
if (this.properties.confirmOnSelect) {
this.onConfirm()
}
}
},
onCancel() {
this.triggerEvent('cancel')
},
onConfirm() {
const values = this.data.selectedValues
const items = this.getSelectedItems()
this.triggerEvent('confirm', { values, items })
},
getSelectedItems() {
return (this.data.displayOptions || []).filter(it => it.checked)
}
}
})
{
"component": true,
"usingComponents": {
"popup": "/components/Popup/Popup"
}
}
\ No newline at end of file \ No newline at end of file
/* components/SelectPopup/SelectPopup.wxss */
.sp-list {
padding: 0 32rpx;
.sp-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 96rpx;
border-bottom: 2rpx solid #F0F2F5;
color: #333;
font-size: 28rpx;
&:last-child {
border-bottom: none;
}
.label {
max-width: 600rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.check {
width: 36rpx;
height: 36rpx;
}
}
.active {
.label {
color: #3D74FF;
}
}
}
<!-- components/SelectPopup/SelectPopup.wxml -->
<popup show="{{show}}" title="{{title}}" height="50%" bind:confirm="onConfirm" bind:hidePopup="onCancel" customPopupSlotStyle="overflow:auto;">
<view class="sp-list">
<block wx:for="{{displayOptions}}" wx:key="value">
<view class="sp-item {{item.checked ? 'active' : ''}} {{item.disabled ? 'disabled' : ''}}" bindtap="toggle" data-index="{{index}}">
<text class="label">{{item[labelKey] || item.label || item.text}}</text>
<image class="check" src="{{IMG_URL}}customer/checked.png" wx:if="{{item.checked}}" />
</view>
</block>
</view>
</popup>
\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,7 @@ Component({ ...@@ -14,7 +14,7 @@ Component({
*/ */
data: { data: {
// loginList: ['微信登录', '手机号', '账号密码'], // loginList: ['微信登录', '手机号', '账号密码'],
loginList: ['授权登录', '手机号',], loginList: ['授权登录', '手机号']
}, },
/** /**
...@@ -22,13 +22,13 @@ Component({ ...@@ -22,13 +22,13 @@ Component({
*/ */
methods: { methods: {
changLoginType(e) { changLoginType(e) {
const thisPage = wx.$router.getPageInstance(), let thisPage = wx.$router.getPageInstance(),
loginType = e.currentTarget.dataset.index loginType = e.currentTarget.dataset.index
thisPage.setData({ thisPage.setData({
loginType loginType
}) })
wx.vibrateShort() wx.vibrateShort()
thisPage.checkLoginBtn() thisPage.checkLoginBtn()
}, }
} }
})
\ No newline at end of file \ No newline at end of file
})
// packageIndex/pages/salesSummary/salesSummary.js // packageIndex/pages/salesSummary/salesSummary.js
import IndexApi from '~/api/index/index'
import { tsFormatTime } from '~/utils/format'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -8,79 +9,107 @@ Page({ ...@@ -8,79 +9,107 @@ Page({
activeIndex: 0, activeIndex: 0,
tabList: [ tabList: [
{ {
count: 8, count: 0,
text: '当月未拓店人员' text: '当月未拓店人员'
}, },
{ {
count: 8, count: 0,
text: '长期未签约客户' text: '长期未签约客户'
} }
], ]
},
getList() {
let { activeIndex } = this.data
IndexApi.summaryMonthShowPersonList({
personType: activeIndex == 0 ? 1 : 2
}).then(res => {
console.log(res)
res.data = res.data.map(item => ({
...item,
lastFollowUpTime: item.lastFollowUpTime
? tsFormatTime(item.lastFollowUpTime)
: '-'
}))
this.setData({
list: res.data
})
})
},
initTablist() {
IndexApi.summaryMonthShow({}).then(res => {
console.log(res)
const { noExpansionPersonCount = 0, noSignCustomerCount = 0 } =
res.data || {}
const tabList = this.data.tabList.map(item => ({ ...item }))
tabList[0].count = noExpansionPersonCount
tabList[1].count = noSignCustomerCount
this.setData({ tabList })
// this.setData({
// tabList[0].count: res.data.noExpansionPersonCount,
// tabList[1].count: res.data.noSignCustomerCount,
// })
})
}, },
tabClick(e) { tabClick(e) {
let {
searchObj
} = this.data;
// delete searchObj.statusList;
this.setData({ this.setData({
activeIndex: e.detail, activeIndex: e.detail
// searchObj, })
}); this.getList()
// this.search();
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// 获取上一个月份 格式M月,考虑跨年情况
let month = new Date().getMonth() + 1
// let year = new Date().getFullYear()
if (month == 1) {
month = 12
year--
} else {
month--
}
wx.setNavigationBarTitle({
title: month + '月销售小结'
})
this.getList()
this.initTablist()
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
onShareAppMessage() {}
})
...@@ -5,101 +5,57 @@ ...@@ -5,101 +5,57 @@
<view class="tabItem">长期未签约客户(8)</view> <view class="tabItem">长期未签约客户(8)</view>
</view> --> </view> -->
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" /> <tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" />
<block wx:if="{{ activeIndex==0 }}">
<view class="list">
<view class="box">
<view class="header">
<view class="name">张三</view>
<view class="phone">13800000000</view>
</view>
<view class="introduction">
<view class="item">
<view class="label short">区域</view>
<view class="content">华中大区</view>
</view>
<view class="item">
<view class="label">直属上级</view>
<view class="content">李四</view>
</view>
<view class="item">
<view class="label short">跟进中</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 short">区域</view>
<view class="content">华中大区</view>
</view>
<view class="item">
<view class="label">直属上级</view>
<view class="content">李直属上级直属上级直属上级直属上级四</view>
</view>
<view class="item">
<view class="label short">跟进中</view>
<view class="content">8家</view>
</view>
<view class="item">
<view class="label">已签约未出单</view>
<view class="content">8家</view>
</view>
</view>
</view>
</view>
</block>
<block wx:if="{{ activeIndex ==1 }}">
<view class="list">
<view class="box ">
<view class="merchant">
<view class="merchantName text-hide">杭州旺泽宝华哥桑纳杭州旺泽宝华哥桑纳尼汽车销售服务杭州旺泽宝华哥桑纳尼汽车销售服务尼汽车销售服务...</view>
<view class="status">跟进中</view>
</view>
<view class="introduction merchantInfo">
<view class="item">
<view class="label">拜访次数</view>
<view class="content">拜访次数</view>
</view>
<view class="item">
<view class="label person">跟进人</view>
<view class="content">张三</view>
</view>
<view class="item last">
<view class="label">最后跟进</view>
<view class="content">2025-07-23 22:31</view>
</view>
</view>
</view>
<view class="box ">
<view class="merchant">
<view class="merchantName text-hide">杭州旺泽宝华哥桑纳杭州旺泽宝华哥桑纳尼汽车销售服务杭州旺泽宝华哥桑纳尼汽车销售服务尼汽车销售服务...</view>
<view class="status">跟进中</view>
</view>
<view class="introduction merchantInfo">
<view class="item">
<view class="label">拜访次数</view>
<view class="content">拜访次数</view>
</view>
<view class="item">
<view class="label person">跟进人</view>
<view class="content">张三</view>
</view>
<view class="item last">
<view class="label">最后跟进</view>
<view class="content">2025-07-23 22:31</view>
</view>
</view>
</view>
</view>
</block>
\ No newline at end of file \ No newline at end of file
<scroll-view class="scrollView" scroll-y style="height: calc(100vh - 80px);">
<block wx:if="{{ activeIndex==0 }}">
<view class="list">
<view class="box" wx:for="{{ list }}" wx:key="index">
<view class="header">
<view class="name">{{item.personName}}</view>
<view class="phone">{{item.personPhone}}</view>
</view>
<view class="introduction">
<view class="item">
<view class="label short">区域</view>
<view class="content">{{item.regionName}}</view>
</view>
<view class="item">
<view class="label">直属上级</view>
<view class="content">{{item.directSuperior}}</view>
</view>
<view class="item">
<view class="label short">跟进中</view>
<view class="content">{{item.followUpCount||0}}家</view>
</view>
<view class="item">
<view class="label">已签约未出单</view>
<view class="content">{{item.signedNotIssuedCount||0}}家</view>
</view>
</view>
</view>
</view>
</block>
<block wx:if="{{ activeIndex ==1 }}">
<view class="list">
<view class="box" wx:for="{{ list }}" wx:key="index">
<view class="merchant">
<view class="merchantName text-hide">{{item.potentialCustomerName}}</view>
<view class="status">跟进中</view>
</view>
<view class="introduction merchantInfo">
<view class="item">
<view class="label">拜访次数</view>
<view class="content">{{item.visitCount?item.visitCount+'次':'-'}}</view>
</view>
<view class="item">
<view class="label person">跟进人</view>
<view class="content">{{item.followPersonName||'-'}}</view>
</view>
<view class="item last">
<view class="label">最后跟进</view>
<view class="content">{{item.lastFollowUpTime||'-'}}</view>
</view>
</view>
</view>
</view>
</block>
</scroll-view>
\ No newline at end of file \ No newline at end of file
// packageIndex/pages/salesSummary/salesSummary.js
import IndexApi from '~/api/index/index'
import { tsFormatTime } from '~/utils/format'
Page({
/**
* 页面的初始数据
*/
data: {
activeIndex: 0,
tabList: [
{
count: 0,
text: '兜底指标预警'
},
{
count: 0,
text: '丢店风险预警'
},
{
count: 0,
text: '亏损预警'
}
]
},
getWarningStores() {
let { month, staffUuid, regionId, tabList } = this.data
let params = { month }
if (staffUuid) {
params.staffUuid = staffUuid
}
if (regionId) {
params.regionId = regionId
}
IndexApi.getWarningStores(params).then(res => {
console.log(res, 'res')
let { backstopWarningList, lostShopWarningList, lossWarningList } =
res.data
tabList[0].count = backstopWarningList.length
tabList[1].count = lostShopWarningList.length
tabList[2].count = lossWarningList.length
this.setData({
tabList,
backstopWarningList,
lostShopWarningList,
lossWarningList
})
})
},
getList() {
let { activeIndex } = this.data
IndexApi.summaryMonthShowPersonList({
personType: activeIndex == 0 ? 1 : 2
}).then(res => {
console.log(res)
res.data = res.data.map(item => ({
...item,
lastFollowUpTime: item.lastFollowUpTime
? tsFormatTime(item.lastFollowUpTime)
: '-'
}))
this.setData({
list: res.data
})
})
},
initTablist() {
IndexApi.summaryMonthShow({}).then(res => {
console.log(res)
const { noExpansionPersonCount = 0, noSignCustomerCount = 0 } =
res.data || {}
const tabList = this.data.tabList.map(item => ({ ...item }))
tabList[0].count = noExpansionPersonCount
tabList[1].count = noSignCustomerCount
this.setData({ tabList })
// this.setData({
// tabList[0].count: res.data.noExpansionPersonCount,
// tabList[1].count: res.data.noSignCustomerCount,
// })
})
},
tabClick(e) {
this.setData({
activeIndex: e.detail
})
this.getWarningStores()
},
onRoute(options) {
console.log(options, 'options')
// console.log(options, 'options')
this.setData({
month: options.month,
staffUuid: options.staffUuid,
regionId: options.regionId
})
this.getWarningStores()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
})
{
"title": "指标预警门店",
"usingComponents": {}
}
/* 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-->
<!-- <text>packageIndex/pages/salesSummary/salesSummary.wxml</text> -->
<!-- <view class="tab">
<view class="tabItem">当月未拓店人员(8)</view>
<view class="tabItem">长期未签约客户(8)</view>
</view> -->
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" />
<scroll-view class="scrollView" scroll-y style="height: calc(100vh - 80px);">
<block wx:if="{{ activeIndex==0 }}">
<view class="list">
<view class="box" wx:for="{{ list }}" wx:key="index">
<view class="header">
<view class="name">{{item.personName}}</view>
<view class="phone">{{item.personPhone}}</view>
</view>
<view class="introduction">
<view class="item">
<view class="label short">区域</view>
<view class="content">{{item.regionName}}</view>
</view>
<view class="item">
<view class="label">直属上级</view>
<view class="content">{{item.directSuperior}}</view>
</view>
<view class="item">
<view class="label short">跟进中</view>
<view class="content">{{item.followUpCount||0}}家</view>
</view>
<view class="item">
<view class="label">已签约未出单</view>
<view class="content">{{item.signedNotIssuedCount||0}}家</view>
</view>
</view>
</view>
</view>
</block>
<block wx:if="{{ activeIndex ==1 }}">
<view class="list">
<view class="box" wx:for="{{ list }}" wx:key="index">
<view class="merchant">
<view class="merchantName text-hide">{{item.potentialCustomerName}}</view>
<view class="status">跟进中</view>
</view>
<view class="introduction merchantInfo">
<view class="item">
<view class="label">拜访次数</view>
<view class="content">{{item.visitCount?item.visitCount+'次':'-'}}</view>
</view>
<view class="item">
<view class="label person">跟进人</view>
<view class="content">{{item.followPersonName||'-'}}</view>
</view>
<view class="item last">
<view class="label">最后跟进</view>
<view class="content">{{item.lastFollowUpTime||'-'}}</view>
</view>
</view>
</view>
</view>
</block>
</scroll-view>
\ No newline at end of file \ No newline at end of file
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
"tab-no-line": "/components/TabNoLine/Tab", "tab-no-line": "/components/TabNoLine/Tab",
"switch-block": "/components/switchBlock/switchBlock", "switch-block": "/components/switchBlock/switchBlock",
"store-waring": "/pages/components/storeWarning/storeWarning", "store-waring": "/pages/components/storeWarning/storeWarning",
"table": "/pages/components/table/table" "tableScrollX": "/pages/components/tableScrollX/table"
} }
} }
...@@ -41,162 +41,129 @@ ...@@ -41,162 +41,129 @@
<view class="statistics"> <view class="statistics">
<view class="item total"> <view class="item total">
<view class="title">产值</view> <view class="title">产值</view>
<view class="num">¥ 99,999,800,000.00</view> <view class="num">¥ {{dataOverview.outputValue}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">出单门店</view> <view class="title">出单门店</view>
<view class="num">9959</view> <view class="num">{{dataOverview.storeCount}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">KPI完成率</view> <view class="title">KPI完成率</view>
<view class="num">99%</view> <view class="num">{{dataOverview.completeRate}}%</view>
</view> </view>
</view> </view>
<view class="title">门店产值排行榜</view> <view class="title">门店产值排行榜</view>
<view class="rankingSelect"> <view class="rankingSelect">
<view class="left"> <view class="left">
<view class="item {{ rankingSelectIndex == 1 ? 'active' : '' }}" bindtap="changeRankingSelectIndex" data-index="1">前十位</view> <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 class="item {{ rankingSelectIndex == 2 ? 'active' : '' }}" bindtap="changeRankingSelectIndex" data-index="2">后十位</view>
</view> </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></table> <tableScrollX
table="{{ dataOverviewTable }}"
headerConfig="{{ headerConfigOverview }}"
tableObj="{{ tableObj }}"
tableFlag="{{ tableFlag }}"
tableWidth="{{ tableWidthOverview }}"
itemTableHeight="{{ itemTableHeightOverview }}"
></tableScrollX>
</block> </block>
<block wx:if="{{ overviewTabIndex == 0 }}"> <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>
<view class="num">12</view> <view class="num">{{dataOverview.completed}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">拓店目标</view> <view class="title">拓店目标</view>
<view class="num">3</view> <view class="num">{{dataOverview.expansionTarget}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="title">完成率</view> <view class="title">完成率</view>
<view class="num">99%</view> <view class="num">{{dataOverview.completionRate}}%</view>
</view> </view>
</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> <glsx-image class="bg" src="{{ '/index/funnel.png' }}" webp></glsx-image>
<view class="num">潜客数100</view> <view class="num">潜客数 {{dataOverview.potentialCustomerCounts}}</view>
<view class="num">签约数60</view> <view class="num">签约数 {{dataOverview.signingCounts}}</view>
<view class="num">拓店数40</view> <view class="num">拓店数 {{dataOverview.expansionCounts}}</view>
</view> </view>
<view class="title">拓店排行榜</view> <view class="title">拓店排行榜</view>
<view class="rankingSelect"> <view class="rankingSelect">
<view class="left"> <view class="left">
<view class="item">前十位</view> <view
<view class="item">后十位</view> class="item {{ rankingSelectIndexOverview == 1 ? 'active' : '' }}"
</view> bindtap="changeRankingSelectIndexOverview"
<view class="select"> data-index="1"
拓店数 >前十位</view>
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image> <view
class="item {{ rankingSelectIndexOverview == 2 ? 'active' : '' }}"
bindtap="changeRankingSelectIndexOverview"
data-index="2"
>后十位</view>
</view> </view>
</view> </view>
<table></table> <view class="select">
拓店数
<glsx-image class="icon" src="{{ '/index/arrowbottom.png' }}" webp></glsx-image>
</view>
<tableScrollX
table="{{ dataOverviewTable }}"
headerConfig="{{ headerConfigStoreExpansion }}"
tableObj="{{ tableHeaderConfigStoreExpansion }}"
tableFlag="{{ tableFlag }}"
tableWidth="{{ tableWidthOverview }}"
itemTableHeight="{{ itemTableHeightOverview }}"
></tableScrollX>
</block> </block>
</view> </view>
<view class="overview"> <view class="overview">
<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="{{ regionoverviewSwitchValue }}" bindswitchEvent="regiononSwitchChange" switchName="{{ switchName }}" />
</view> </view>
</view> </view>
<view class="tab"> <view class="tab">
<view class="box {{ overviewTabIndex == 1?'active':'' }}" data-index="1" bindtap="changeOverviewTabIndex">产值</view> <view class="box {{ overviewTabIndexRegion == 1?'active':'' }}" data-index="1" bindtap="changeOverviewTabIndexRegion">产值</view>
<view class="box {{ overviewTabIndex == 0?'active':'' }}" data-index="0" bindtap="changeOverviewTabIndex">拓店</view> <view class="box {{ overviewTabIndexRegion == 0?'active':'' }}" data-index="0" bindtap="changeOverviewTabIndexRegion">拓店</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>
<scroll-view <tableScrollX
scroll-x table="{{ tableData }}"
scroll-y headerConfig="{{ headerConfig }}"
show-scrollbar="{{ false }}" tableObj="{{ overviewTabIndexRegion == 1?tableConfigOverview: tableObjStoreExpansion }}"
bindrefresherrefresh="restPageNum" tableFlag="{{ tableFlag }}"
bindscrolltolower="scrollonReachBottom" tableWidth="{{ tableWidth }}"
refresher-threshold="304" itemTableHeight="{{ itemTableHeightOverview }}"
refresher-triggered="{{ triggered }}" ></tableScrollX>
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>
<store-waring></store-waring> <store-waring></store-waring>
<view class="box indicator indicatorlast"> <view class="box indicator indicatorlast" bind:tap="navigateToSalesSummary">
<view class="header"> <view class="header">
<view class="left">8月销售小结</view> <view class="left">{{month}}销售小结</view>
</view> </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">{{salesSummaryObject.noExpansionPersonCount || 0}}</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">{{salesSummaryObject.noSignCustomerCount || 0}}</text>
<text class="unit">人</text> <text class="unit">人</text>
</view> </view>
</view> </view>
......
...@@ -49,7 +49,8 @@ Component({ ...@@ -49,7 +49,8 @@ Component({
width: 'var(--fontSize128)' width: 'var(--fontSize128)'
}, },
tableFlag: true, tableFlag: true,
tableWidth: '100%' tableWidth: '100%',
itemTableHeight: '0rpx'
}, },
/** /**
* 组件生命周期函数 * 组件生命周期函数
...@@ -91,7 +92,7 @@ Component({ ...@@ -91,7 +92,7 @@ Component({
this.setData({ this.setData({
kpiProgressTable: res.data, kpiProgressTable: res.data,
itemTableHeight: itemTableHeight:
res.data.length * 72 > 720 ? 720 : res.data.length * 72 res.data.length * 94 > 940 ? 940 : res.data.length * 94
}) })
} }
}) })
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<view class="visitRecord" wx:if="{{ followUpData.waitFollowShopList[0] }}"> <view class="visitRecord" wx:if="{{ followUpData.waitFollowShopList[0] }}">
<view class="time"> <view class="time">
<glsx-image class="icon" src="/index/clock.png"></glsx-image> <glsx-image class="icon" src="/index/clock.png"></glsx-image>
<view class="timebox">首次拜访:{{followUpData.waitFollowShopList[0].firstVisitTime}} 09-26</view> <view class="timebox">首次拜访:{{followUpData.waitFollowShopList[0].firstVisitTime||'-'}}</view>
<view class="status">跟进中</view> <view class="status">跟进中</view>
</view> </view>
<view class="merchantName text-hide">{{followUpData.waitFollowShopList[0].storeName}}</view> <view class="merchantName text-hide">{{followUpData.waitFollowShopList[0].storeName}}</view>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<view class="visitRecord" wx:if="{{ followUpData.waitFollowShopList[1] }}"> <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">首次拜访:{{followUpData.waitFollowShopList[1].firstVisitTime}} 09-26</view> <view class="timebox">首次拜访:{{followUpData.waitFollowShopList[1].firstVisitTime||'-'}}</view>
<view class="status">跟进中</view> <view class="status">跟进中</view>
</view> </view>
<view class="merchantName text-hide">{{followUpData.waitFollowShopList[1].storeName}}</view> <view class="merchantName text-hide">{{followUpData.waitFollowShopList[1].storeName}}</view>
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
tableFlag="{{ tableFlag }}" tableFlag="{{ tableFlag }}"
tableWidth="{{ tableWidth }}" tableWidth="{{ tableWidth }}"
itemTableHeight="{{ itemTableHeight }}" itemTableHeight="{{ itemTableHeight }}"
itemHeight="94rpx"
></table> ></table>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -36,6 +36,34 @@ Component({ ...@@ -36,6 +36,34 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
navigateToStoreDetail: function (e) {
console.log(e, 'e')
wx.$router.go('packageIndex.warningStoreList', {
month: this.data.month
// storeUuid: e.currentTarget.dataset.storeuuid
})
// wx.navigateTo({
// url: `/pages/storeDetail/storeDetail?storeUuid=${e.currentTarget.dataset.storeuuid}`
// })
},
// 选择月份
changeMonth() {
let { monthList, month } = this.data
console.log(month, 'monthList')
this.setData({
showSelectPopup: true,
selectOptions: monthList,
selectTitle: '日期选择',
selectMultiple: false,
// selectType: 'coopMode',
selectValue: [month]
})
},
hideSelectPopup() {
this.setData({
showSelectPopup: false
})
},
getWarningStores() { getWarningStores() {
let { month, staffUuid, regionId } = this.data let { month, staffUuid, regionId } = this.data
let params = { month } let params = { month }
...@@ -63,29 +91,19 @@ Component({ ...@@ -63,29 +91,19 @@ Component({
const m = d.getMonth() + 1 const m = d.getMonth() + 1
monthList.push({ monthList.push({
// yyyy-MM(月份补零) // yyyy-MM(月份补零)
month: `${y}-${String(m).padStart(2, '0')}`, value: `${y}-${String(m).padStart(2, '0')}`,
// M(回显用,不补零) // M(回显用,不补零)
showMonth: `${m}月` name: `${m}月`
}) })
} }
// 默认选中当前月份 // 默认选中当前月份
this.setData({ this.setData({
monthList, monthList,
month: monthList[0].month, month: monthList[0].value,
showMonth: monthList[0].showMonth showMonth: monthList[0].name
}) })
console.log(monthList, 'monthList') console.log(monthList, 'monthList')
} }
// getWarningStores() {
// IndexApi.getWarningStores({
// staffUuid: this.data.staffUuid,
// regionId: this.data.regionId
// }).then(res => {
// this.setData({
// warningStores: res.data
// })
// })
// }
} }
}) })
{ {
"component": true, "component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
"usingComponents": {
"select-popup": "/components/SelectPopup/SelectPopup"
}
}
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
<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" bindtap="changeMonth">
{{showMonth}} {{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" bindtap="navigateToStoreDetail">
<view class="item"> <view class="item">
<view class="top">兜底指数预警</view> <view class="top">兜底指数预警</view>
<view class="bottom"> <view class="bottom">
...@@ -32,4 +32,13 @@ ...@@ -32,4 +32,13 @@
</view> </view>
</view> </view>
</view> </view>
</view>
\ No newline at end of file \ No newline at end of file
</view>
<select-popup
show="{{ showSelectPopup }}"
options="{{ selectOptions }}"
multiple="{{ selectMultiple }}"
values="{{ selectValues }}"
value="{{ selectValue }}"
bindconfirm="handlePopupConfirm"
title="{{ selectTitle }}"
></select-popup>
\ No newline at end of file \ No newline at end of file
...@@ -27,6 +27,10 @@ Component({ ...@@ -27,6 +27,10 @@ Component({
itemTableHeight: { itemTableHeight: {
type: String, type: String,
value: '0rpx' value: '0rpx'
},
itemHeight: {
type: String,
value: '72rpx'
} }
}, },
......
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
color: #292d33; color: #292d33;
font-size: 26rpx; font-size: 24rpx;
} }
.table .table-body .th .labelName.oneLine { .table .table-body .th .labelName.oneLine {
......
// pages/components/table/table.js
Component({
/**
* 组件的属性列表
*/
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'
},
itemHeight: {
type: String,
value: '72rpx'
}
},
/**
* 组件的初始数据
*/
data: {
// 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)'
// },
// ]
},
/**
* 组件的方法列表
*/
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()
}
}
})
{
"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(--fontSize160);
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(--fontSize160);
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;
color: #292d33;
font-size: 24rpx;
}
.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);
color: #347bff;
font-size: 28rpx;
font-family: "numberNor";
}
.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: #999ea8;
font-size: 24rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.img {
width: 172rpx;
height: 172rpx;
// margin-bottom: 40rpx;
}
}
.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 }}"
>
<!-- style="height: {{ itemTableHeight }}rpx;" -->
<view class="table" wx:if="{{ table.length > 0 }}">
<view class="table-box">
<view class="table-header" style="width: var(--fontSize{{ tableWidth }})">
<view class="label">{{headerConfig.name}}</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">
<!-- {{item.unit}} -->
<view class="name">{{item.name}}</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[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
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>{{item[i.key] || 0}}{{i.unit}}</block>
</view>
</block>
</view>
</view>
</block>
</block>
</block>
</view>
</view>
</view>
</scroll-view>
<block wx:if="{{ table.length <= 0 }}">
<view class="nothing">
<glsx-image class="img" src="{{ '/index/empty.png' }}" webp></glsx-image>
<view class="text">暂无数据</view>
</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
...@@ -27,7 +27,7 @@ const systemInfo = wx.getSystemInfoSync() ...@@ -27,7 +27,7 @@ const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo); // console.log(systemInfo);
// console.log(accountInfo.miniProgram.envVersion) // console.log(accountInfo.miniProgram.envVersion)
//手动控制体验版环境的请求 true就依据下面index false就默认为2 //手动控制体验版环境的请求 true就依据下面index false就默认为2
const manual = false const manual = true
const release = false const release = false
// let index = 1 // let index = 1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!