Commit 8ea1770c by zhangxw

团队联调修改

1 parent 5d2654ee
......@@ -52,7 +52,7 @@ Component({
data: {
// 默认展示今天日期,格式为 月/日
date: '',
minDate: dayjs().subtract(1, 'year').valueOf(),
minDate: dayjs().subtract(3, 'year').valueOf(),
maxDate: dayjs().valueOf(),
dateCurrent: 0,
titleEnum: {
......@@ -92,11 +92,11 @@ Component({
async getWeeklyData() {
const result = await api.getWeekSelectData()
const weekColumns = result.data?.map((item, index) => ({
label: `${item.startDate}-${item.endDate}`,
label: `${dayjs(item.startDate).format('YYYY/MM/DD')}-${dayjs(item.endDate).format('YYYY/MM/DD')}`,
startDate: dayjs(item.startDate).format('YYYY/MM/DD'),
endDate: dayjs(item.endDate).format('YYYY/MM/DD'),
index
}))
}))
this.setData({
weekColumns
})
......@@ -210,7 +210,7 @@ Component({
if (c_value[0] != _date[0] || c_value[1] != _date[1] || c_value[2] != _date[2]) {
const picker = this.selectComponent("#datePicker")
this.setData({
minDate: dayjs().subtract(1, 'year').valueOf(),
minDate: dayjs().subtract(3, 'year').valueOf(),
maxDate: dayjs().valueOf(),
},
() => {
......@@ -223,7 +223,7 @@ Component({
if (c_value[0] != _date[0] || c_value[1] != _date[1]) {
const picker = this.selectComponent("#datePicker")
this.setData({
minDate: dayjs().subtract(1, 'year').valueOf(),
minDate: dayjs().subtract(3, 'year').valueOf(),
maxDate: dayjs().valueOf(),
},
() => {
......@@ -267,7 +267,7 @@ Component({
const min = dayjs(minDate).startOf('day');
const sel = dayjs(selectedDate).startOf('day');
rightCurrent = sel.isSame(today, 'day');
leftCurrent = sel.isSame(min, 'day');
leftCurrent = sel.isSame(min, 'day');
break;
}
case 'year-month': {
......@@ -291,7 +291,8 @@ Component({
calcBoundary();
this.setData({
dateShow: false,
dateShow: false,
currentDate: (formatMap[timeType] || (() => ''))(),
date: (formatMap[timeType] || (() => ''))()
});
this.triggerEvent('search', this.getParams())
......
......@@ -126,8 +126,11 @@ Page({
data.business = this.filterBusiness(data.business)
let taskContextLength = data?.taskContext.length
this.setData({
orderObj: data || [],
taskContextLength
}, () => {
this.setData({
orderObj: data || {}
})
})
} else {
wx.$util.showToast(message)
......
......@@ -108,10 +108,10 @@ Component({
let params = {
phone: detailInfo.employeePhone,
employeeId: selectedMerchantObj?.employeeId,
merchantId: selectedMerchantObj?.merchantId,
bizs: detailInfo.scene,
startDate: startStr,
endDate: endStr,
merchantId: detailInfo.merchantId
endDate: endStr
}
wx.$util.showLoading()
api.getEmployeebehaviorData(params).then(res => {
......
......@@ -36,7 +36,7 @@
<view class="grid-item" wx:for="{{dailyReportItems}}" wx:key="label">
<view class="label">{{item.label}}</view>
<view class="value">{{behaviorInfo.dailyReport[item.key]}}</view>
<view class="sub {{item.subClass || ''}}" wx:if="{{item.subLabel}}">{{item.subLabel}}{{behaviorInfo.dailyReport[item.subKey]}}%</view>
<view class="sub {{item.subClass || ''}}" wx:if="{{item.subLabel}}">{{item.subLabel}}{{behaviorInfo.dailyReport[item.subKey]}}</view>
</view>
</view>
</view>
......
......@@ -41,7 +41,6 @@ Component({
*/
methods: {
onInitChart(xData, yData, yData2) {
console.log(this.ecComponent)
this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width: width,
......@@ -49,7 +48,6 @@ Component({
devicePixelRatio: dpr // new
});
this.setOption(chart, xData, yData, yData2);
console.log(chart, xData, yData, yData2)
return chart;
})
},
......
......@@ -197,8 +197,7 @@ const getValueColor = (val) => {
} else {
n = null
}
console.log(n, '1111111111')
if (n === null) return '#999EA8'
if (n === null) return '#999ea8'
if (n > 0) return '#FF0000'
if (n < 0) return '#35C376'
return '#FF9D0A'
......@@ -211,8 +210,8 @@ const getMomArrow = (val) => {
const num = parseFloat(cleaned)
return isNaN(num) ? null : num
}
const n = parsePercentage(val)
if (n === null) return ''
const n = parsePercentage(val)
if (n === null) return ''
if (n > 0) return `${IMG_URL}icon-red-rise.png`
if (n < 0) return `${IMG_URL}icon-green-decline.png`
return `${IMG_URL}just01.png`
......@@ -226,7 +225,7 @@ const getIndexMomArrow = (val) => {
return isNaN(num) ? null : num
}
const n = parsePercentage(val)
if (n === null) return ''
if (n === null) return ''
if (n > 0) return `${IMG_URL}rise.png`
if (n < 0) return `${IMG_URL}decline.png`
return `${IMG_URL}icon-white-just01.png`
......@@ -314,7 +313,7 @@ Component({
bizs: detailInfo.scene,
startDate: startStr,
endDate: endStr,
merchantId: selectedMerchantObj.merchantId
merchantId: selectedMerchantObj?.merchantId
}
wx.$util.showLoading()
api.getEmployeePerformanceData(params).then(res => {
......@@ -330,12 +329,10 @@ Component({
})
const statCards = INDEX_DATA_LIST.map((item) => {
const value = item.key === 'dailyPerformanceRate' ? staffData[item.key] : formatNumber(staffData[item.key])
const momRaw = item.ratioKey ? staffData[item.ratioKey] : null
const momValue = item.ratioKey ? momRaw : ''
console.log(momRaw, momValue, '22222222')
const momRaw = item.ratioKey ? staffData[item.ratioKey] : '-'
const momValue = item.ratioKey ? momRaw || '-' : '-'
const momColor = item.ratioKey ? getValueColor(momRaw) : '#999EA8'
const momArrow = item.ratioKey ? getIndexMomArrow(momRaw) : ''
console.log(momColor, momArrow)
return {
...item,
value,
......@@ -346,8 +343,8 @@ Component({
}
})
const analyseChunks = ANALYSE_ITEMS.map((item) => {
const raw = staffData[item.key]
const momRaw = staffData[item.momKey]
const raw = (staffData[item.key] ?? '') === '' ? '-' : staffData[item.key]
const momRaw = (staffData[item.momKey] ?? '') === '' ? '-' : staffData[item.momKey]
const value = item.valueType === 'rate' ? raw : formatDash(raw)
const momValue = momRaw
return {
......@@ -372,8 +369,8 @@ Component({
cols: [
{ label: '成交数', value: (staffData?.[item.dealCountKey] ?? '') === '' ? '-' : staffData?.[item.dealCountKey] },
{ label: '单车采购产值', value: (staffData?.[item.avgOutputKey] ?? '') === '' ? '-' : staffData?.[item.avgOutputKey], colorClass: 'blue' },
{ label: '渗透率', value: item.penetrationRateKey ? staffData?.[item.penetrationRateKey] : '-', colorClass: 'blue' },
{ label: '转化率', value: item.conversionRateKey ? staffData?.[item.conversionRateKey] : '-', colorClass: 'blue' },
{ label: '渗透率', value: (staffData?.[item.penetrationRateKey] ?? '') === '' ? '-' : staffData?.[item.penetrationRateKey], colorClass: 'blue' },
{ label: '转化率', value: (staffData?.[item.conversionRateKey] ?? '') === '' ? '-' : staffData?.[item.conversionRateKey], colorClass: 'blue' },
],
}
}
......@@ -385,13 +382,13 @@ Component({
label: item.label,
cols: [
{ label: '成交数', value: (staffData?.[item.dealCountKey] ?? '') === '' ? '-' : staffData?.[item.dealCountKey] },
{ label: '渗透率', value: item.penetrationRateKey ? staffData?.[item.penetrationRateKey] : '-', subLabel: penetrationTarget === '-' ? '' : `兜底目标${penetrationTarget}`, colorClass: 'blue' },
{ label: '转化率', value: item.conversionRateKey ? staffData?.[item.conversionRateKey] : '-', subLabel: conversionTarget === '-' ? '' : `兜底目标${conversionTarget}`, colorClass: 'blue' },
{ label: '渗透率', value: item.penetrationRateKey && (staffData?.[item.penetrationRateKey] ?? '') !== '' ? staffData?.[item.penetrationRateKey] : '-', subLabel: penetrationTarget === '-' ? '' : `兜底目标${(penetrationTarget ?? '') === '' ? '-' : penetrationTarget}`, colorClass: 'blue' },
{ label: '转化率', value: item.conversionRateKey && (staffData?.[item.conversionRateKey] ?? '') !== '' ? staffData?.[item.conversionRateKey] : '-', subLabel: conversionTarget === '-' ? '' : `兜底目标${(conversionTarget ?? '') === '' ? '-' : conversionTarget}`, colorClass: 'blue' },
],
}
})
const helpTextArr = detailInfo?.scene == 2 ? HELP_TEXT_QINGGAI : HELP_TEXT_DEFAULT
const helpTextArr = HELP_TEXT_DEFAULT
this.getTrendList()
this.setData({
statMerchants,
......@@ -413,12 +410,12 @@ Component({
getTrendList() {
let { detailInfo, startStr, endStr, dateType, selectedMerchantObj } = this.data
let params = {
staffUuids: [selectedMerchantObj.employeeId],
staffUuids: [selectedMerchantObj?.employeeId],
cycleType: dateType,
bizs: detailInfo.scene,
startTime: startStr,
endTime: endStr,
merchantIds: [selectedMerchantObj.merchantId]
merchantIds: [selectedMerchantObj?.merchantId]
}
api.getEmployeeOutPutTrendApi(params).then(res => {
let { code, data, message } = res
......
......@@ -35,7 +35,7 @@
<view class="ratio" wx:if="{{card.showMom}}">
<text class="ratio-label" wx:if="{{queryType != 'self'}}">环比</text>
<text class="ratio-value">{{card.momValue}}</text>
<image wx:if="{{card.momArrow}}" class="ratio-arrow" src="{{}}" mode=""/>
<image wx:if="{{card.momArrow}}" class="ratio-arrow" src="{{card.momArrow}}" mode=""/>
</view>
</view>
</view>
......
......@@ -139,7 +139,11 @@ Page({
if (code == 0) {
data.business = this.filterBusiness(data.business)
this.setData({
baseInfo: data
baseInfo: {
...data,
name: data?.name || options?.employeeName,
phone: data?.phone || options?.employeePhone
}
})
} else {
wx.$util.showToast(message)
......
......@@ -75,23 +75,14 @@ Page({
getReceptionList() {
let { pageNum, startStr, endStr, detailInfo, nothing } = this.data
// let params = {
// employeeId: detailInfo.employeeId,
// pageNum,
// pageSize: 10,
// startDate: startStr,
// endDate: endStr,
// merchantId: detailInfo?.selectedMerchantId,
// bizs: detailInfo.scene ? detailInfo.scene : ''
// }
let params = {
employeeId: '584fdb460afa4dad835cbe8d73cfa923',
pageNum: 1,
employeeId: detailInfo.employeeId,
pageNum,
pageSize: 10,
startDate: '2025-06-01',
endDate: '2026-06-30',
merchantId: 44211227,
bizs: 1
startDate: startStr,
endDate: endStr,
merchantId: detailInfo?.selectedMerchantId,
bizs: detailInfo.scene ? detailInfo.scene : ''
}
if (nothing) return
wx.$util.showLoading()
......
......@@ -36,7 +36,7 @@ Page({
})
})
})
// this.setAudio()
this.setAudio()
this.findCheckResultByBatchId(record.batchId)
},
async findCheckResultByBatchId(batchId) {
......
......@@ -16,7 +16,7 @@
</view>
<view class="right">
<view class="name">{{item.merchantName || '-'}}</view>
<view class="date">最早开单时间:{{item.startDate}}</view>
<view class="date">最早开单时间:{{item.startDate || '-'}}</view>
</view>
</view>
</block>
......
......@@ -56,7 +56,13 @@ Page({
let { code, data, message } = res
if (code == 0) {
let taskContextLength = data.taskContext?.length
this.setData({orderObj: data || {}, taskContextLength})
this.setData({
taskContextLength
}, () => {
this.setData({
orderObj: data || {}
})
})
} else {
wx.$util.showToast(message)
}
......
......@@ -50,7 +50,13 @@ Page({
let { code, data, message } = res
if (code == 0) {
let taskContextLength = data.taskContext?.length
this.setData({orderObj: data || {}, taskContextLength})
this.setData({
taskContextLength
}, () => {
this.setData({
orderObj: data || {}
})
})
} else {
wx.$util.showToast(message)
}
......
......@@ -58,7 +58,13 @@ Page({
if (code == 0) {
let taskContextLength = data.taskContext?.length
data.createTime = dayjs(data.createTime).format('YYYY-MM-DD HH:mm:ss')
this.setData({orderObj: data || {}, taskContextLength})
this.setData({
taskContextLength
}, () => {
this.setData({
orderObj: data || {}
})
})
} else {
wx.$util.showToast(message)
}
......
......@@ -66,7 +66,13 @@ Page({
let { code, data, message } = res
if (code == 0) {
let taskContextLength = data.taskContext?.length
this.setData({orderObj: data || {}, taskContextLength})
this.setData({
taskContextLength
}, () => {
this.setData({
orderObj: data || {}
})
})
} else {
wx.$util.showToast(message)
}
......
......@@ -88,7 +88,11 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
const query = wx.createSelectorQuery().in(this)
query.select('.top-box').boundingClientRect()
query.exec(res => {
this.setData({topBoxHeight: res[0]?.height})
})
},
/**
......
......@@ -7,34 +7,38 @@
</view>
</navigation-bar>
<view class="bg"></view>
<scroll-view class="container" scroll-y style="padding-top: {{navBarHeight}}px;">
<view class="tab">
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" bindtap="changeTab" data-target="{{item}}" wx:for="{{tabList}}" wx:key="index">{{item.text}}</view>
</view>
<view class="scene-tab">
<view class="scene-tab-item {{sceneTabIndex == index ? 'active' : ''}}" wx:for="{{sceneTabList}}" wx:key="index" bindtap="changeSceneTab" data-target="{{item}}">
<image wx:if="{{sceneTabIndex == index}}" src="{{IMG_URL}}{{item.icon}}.png" mode=""/>
{{item.text}}
<view class="container" scroll-y style="padding-top: {{navBarHeight}}px;">
<view class="top-box">
<view class="tab">
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" bindtap="changeTab" data-target="{{item}}" wx:for="{{tabList}}" wx:key="index">{{item.text}}</view>
</view>
</view>
<view class="date">
<date-screen id="date" bind:search="search" setTrackData="{{true}}"></date-screen>
</view>
<view class="static-info">
<view class="static-item" style="flex: {{item.width}}rpx 0 0;background: {{item.background}};" wx:for="{{staticList}}" wx:key="index">
<view class="label">{{item.label}}</view>
<view class="value">{{staticData[item.key]}}</view>
<view class="scene-tab">
<view class="scene-tab-item {{sceneTabIndex == index ? 'active' : ''}}" wx:for="{{sceneTabList}}" wx:key="index" bindtap="changeSceneTab" data-target="{{item}}">
<image wx:if="{{sceneTabIndex == index}}" src="{{IMG_URL}}{{item.icon}}.png" mode=""/>
{{item.text}}
</view>
</view>
<view class="date">
<date-screen id="date" bind:search="search" setTrackData="{{true}}"></date-screen>
</view>
</view>
<AI-analyse AIContent="{{AIContent}}" />
<employee-ranking
id="employee-ranking"
title-icon="{{IMG_URL}}staff-rank.png"
mode="{{mode}}"
scene="{{sceneTabIndex}}"
employee-list="{{employeeList}}"
local-sort="{{false}}"
bind:sortChange="onEmployeeSortChange"
bind:employeeTap="onEmployeeTap"
/>
</scroll-view>
<scroll-view scroll-y style="height: calc(100% - {{topBoxHeight}}px);">
<view class="static-info">
<view class="static-item" style="flex: {{item.width}}rpx 0 0;background: {{item.background}};" wx:for="{{staticList}}" wx:key="index">
<view class="label">{{item.label}}</view>
<view class="value">{{staticData[item.key]}}</view>
</view>
</view>
<AI-analyse AIContent="{{AIContent}}" />
<employee-ranking
id="employee-ranking"
title-icon="{{IMG_URL}}staff-rank.png"
mode="{{mode}}"
scene="{{sceneTabIndex}}"
employee-list="{{employeeList}}"
local-sort="{{false}}"
bind:sortChange="onEmployeeSortChange"
bind:employeeTap="onEmployeeTap"
/>
</scroll-view>
</view>
......@@ -10,7 +10,6 @@ Page({
navBarHeight: 84,
navStyle: 'background-color: rgba(0,0,0,0);',
navTitleStyle: 'font-weight: 600; font- size: 32rpx; color: #000;',
navBarHeight: 0,
userInfo: {},
staticList: [{
label: '驻店人员',
......
......@@ -54,7 +54,7 @@
<view class="name" wx:if="{{item.taskType != 4}}">
{{missionMap[item.taskType].name}}
<text wx:if="{{item.taskType == 5}}">-{{item.storeManagerName}}</text>
<text wx:if="{{item.taskType == 5}}">-{{item.storeManagerName || '-'}}</text>
</view>
<view class="name" wx:else>{{item.merchantName || '-'}}</view>
</view>
......
......@@ -52,8 +52,8 @@ page {
}
.wx .img {
width: var(--fontSize400);
height: var(--fontSize400);
width: var(--fontSize486);
height: var(--fontSize486);
display: block;
margin: 0 auto;
}
......@@ -63,7 +63,7 @@ page {
}
.login-btn {
margin: 9vh 0 0;
margin: 6vh 0 0;
background: #2c66f7;
border-radius: var(--fontSize28);
text-align: center;
......
......@@ -4,11 +4,18 @@
"miniprogram": {
"list": [
{
"name": "packageCrew/pages/peopleOverview/peopleOverview",
"pathName": "packageCrew/pages/peopleOverview/peopleOverview",
"query": "query=%7B%22employeeId%22%3Anull%2C%22employeeName%22%3A%22%E9%99%88%E5%B8%8C%22%2C%22employeePhone%22%3A%2213132112126%22%2C%22personalOutput%22%3A9420%2C%22personalUnitPrice%22%3A724.62%2C%22personalConversion%22%3A0.4483%2C%22dealCount%22%3Anull%2C%22defeatCount%22%3Anull%2C%22recordingCount%22%3Anull%2C%22leadCount%22%3Anull%2C%22missingRate%22%3Anull%2C%22dealRate%22%3Anull%2C%22avgRecordPerDeal%22%3Anull%2C%22bussinessType%22%3A%221%22%2C%22conversionWarningLevel%22%3A0%2C%22unitPriceWarningLevel%22%3A0%2C%22outputWarningLevel%22%3A2%2C%22scene%22%3A2%2C%22startDate%22%3A%222026-03-01%22%2C%22endDate%22%3A%222026-03-31%22%2C%22timeDimension%22%3A2%7D",
"scene": null,
"launchMode": "default"
},
{
"name": "packageCrew/pages/receptionRecording/receptionRecording",
"pathName": "packageCrew/pages/receptionRecording/receptionRecording",
"query": "storeManagerName=%E9%99%88%E5%B8%8C&gender=null&storeManagerPhone=13132112126&entryDate=2025-03-18&business=%E5%BB%B6%E4%BF%9D&selectedMerchantId=44211227&scene=1&employeeId=584fdb460afa4dad835cbe8d73cfa923",
"scene": null,
"launchMode": "default"
"launchMode": "default",
"scene": null
},
{
"name": "packageCrew/pages/peopleOverview/peopleOverview",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!