Commit 5d2654ee by zhangxw

督导小程序联调

1 parent 5b186c40
Showing 45 changed files with 591 additions and 426 deletions
...@@ -28,6 +28,10 @@ module.exports = { ...@@ -28,6 +28,10 @@ module.exports = {
getEmployeePerformanceData(data) { getEmployeePerformanceData(data) {
return api.post('dj.api.supervisor.dashboard.employee.performance', data, [], '/rop-dj-supervisor-mini/router') return api.post('dj.api.supervisor.dashboard.employee.performance', data, [], '/rop-dj-supervisor-mini/router')
}, },
// 获取员工个人产值趋势及达成率
getEmployeeOutPutTrendApi(data) {
return api.post('dj.api.supervisor.business.analysis.output.trend.scene', data, [], '/rop-dj-supervisor-mini/router')
},
// 获取员工个人行为数据 // 获取员工个人行为数据
getEmployeebehaviorData(data) { getEmployeebehaviorData(data) {
return api.post('dj.api.supervisor.dashboard.employee.behavior', data, [], '/rop-dj-supervisor-mini/router') return api.post('dj.api.supervisor.dashboard.employee.behavior', data, [], '/rop-dj-supervisor-mini/router')
...@@ -36,12 +40,8 @@ module.exports = { ...@@ -36,12 +40,8 @@ module.exports = {
getTrainingExperienceList(data) { getTrainingExperienceList(data) {
return api.post('dj.api.supervisor.mini.team.training.list', data, [], '/rop-dj-supervisor-mini/router') return api.post('dj.api.supervisor.mini.team.training.list', data, [], '/rop-dj-supervisor-mini/router')
}, },
// 查询门店日期范围内接待记录统计数据
getReceptionRecordList(data) {
return api.post("dj.api.smartcarlife.recepiton.receptionStaticList", data)
},
// 分页查询接待录音列表 // 分页查询接待录音列表
getRecordDetailList(data) { getRecordingList(data) {
return api.post("dj.api.supervisor.dashboard.recording.list", data, [], '/rop-dj-supervisor-mini/router') return api.post("dj.api.supervisor.dashboard.recording.list", data, [], '/rop-dj-supervisor-mini/router')
}, },
// 获取短链地址 // 获取短链地址
...@@ -61,6 +61,6 @@ module.exports = { ...@@ -61,6 +61,6 @@ module.exports = {
}, },
// 人员带教 // 人员带教
submitMentorData(data) { submitMentorData(data) {
return api.post('dj.api.supervisor.mini.team.coaching.submit', data) return api.post('dj.api.supervisor.mini.team.coaching.submit', data, [], '/rop-dj-supervisor-mini/router')
} }
} }
...@@ -107,7 +107,7 @@ Component({ ...@@ -107,7 +107,7 @@ Component({
const {timeTypeEnum} = this.data const {timeTypeEnum} = this.data
let eventCode = ['supervisor_dayTime_tab', 'supervisor_weekTime_tab', 'supervisor_monthTime_tab'] let eventCode = ['supervisor_dayTime_tab', 'supervisor_weekTime_tab', 'supervisor_monthTime_tab']
if (this.data.setTrackData) { if (this.data.setTrackData) {
// wx.$track.setTrackData(0, eventCode[index], {}, '') wx.$track.setTrackData(0, eventCode[index], {}, '')
} }
this.setData({ this.setData({
dateCurrent: index, dateCurrent: index,
...@@ -139,9 +139,12 @@ Component({ ...@@ -139,9 +139,12 @@ Component({
return obj return obj
}, },
initLoad() { initLoad() {
this.initDate('date')
this.setData({ this.setData({
dateCurrent: 0 dateCurrent: 0,
leftCurrent: false,
rightCurrent: true
}, () => {
this.initDate('date')
}) })
}, },
initDate(type = 'date') { initDate(type = 'date') {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
.date-screen { .date-screen {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
.tab-section { .tab-section {
box-sizing: border-box; box-sizing: border-box;
width: 278rpx; width: 278rpx;
...@@ -33,6 +34,7 @@ ...@@ -33,6 +34,7 @@
box-sizing: border-box; box-sizing: border-box;
height: 56rpx; height: 56rpx;
flex: 1; flex: 1;
max-width: calc(100% - 278rpx);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
......
...@@ -88,7 +88,7 @@ export const ALIYUN = ALIYUN_LIST[1]; ...@@ -88,7 +88,7 @@ export const ALIYUN = ALIYUN_LIST[1];
export const quotedImgUrl = createQuotedUrl[target[envIndex]]; export const quotedImgUrl = createQuotedUrl[target[envIndex]];
export const scoket_url = scoketURL[target[envIndex]]; export const scoket_url = scoketURL[target[envIndex]];
// sentry Dsn 地址 // sentry Dsn 地址
export const dsnUrl = "https://6b10bd312d154ff3a4664772bb4e50f5@sentry.glsx.com.cn/49"; export const dsnUrl = "https://89bfb54e30fd4fafaee5ba09063fb369@sentry.glsx.com.cn/50";
// 图片基地址 // 图片基地址
export const ImgUrl = "https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram"; export const ImgUrl = "https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram";
......
...@@ -3,6 +3,7 @@ const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor ...@@ -3,6 +3,7 @@ const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor
import api from '~/api/crew/index' import api from '~/api/crew/index'
import indexApi from '~/api/index/index' import indexApi from '~/api/index/index'
import studyApi from '~/api/learningCenter/index' import studyApi from '~/api/learningCenter/index'
import { uploadImg } from '~/api/api'
Page({ Page({
/** /**
...@@ -10,23 +11,18 @@ Page({ ...@@ -10,23 +11,18 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
detailInfo: { navBarHeight: 84,
staffName: '赵惠惠', detailInfo: {},
sex: 1,
staffPhone: '18902640418',
entryDate: '2025-12-12',
scene: '延保,轻改,权益'
},
detailItems: [{ detailItems: [{
label: '手机号码', label: '手机号码',
key: 'staffPhone' key: 'storeManagerPhone'
}, { }, {
label: '入职时间', label: '入职时间',
key: 'entryDate', key: 'entryDate',
width: '290rpx' width: '290rpx'
}, { }, {
label: '归属业务', label: '归属业务',
key: 'scene', key: 'business',
inline: true inline: true
}], }],
orderObj: { orderObj: {
...@@ -51,6 +47,14 @@ Page({ ...@@ -51,6 +47,14 @@ Page({
// 任务列表进入 // 任务列表进入
if (options.id) { if (options.id) {
this.getDetail(options.id) this.getDetail(options.id)
} else {
console.log(options)
this.setData({
'orderObj.storeManagerName': options.storeManagerName,
'orderObj.storeManagerPhone': options.storeManagerPhone,
'orderObj.entryDate': options.entryDate,
'orderObj.business': options.business
})
} }
// 获取门店列表 // 获取门店列表
this.getMerchantList() this.getMerchantList()
...@@ -105,6 +109,13 @@ Page({ ...@@ -105,6 +109,13 @@ Page({
} }
}) })
}, },
filterBusiness(data) {
let names = ['', '延保', '权益', '轻改']
if (!data) return '-'
let bizArray = data?.split(',')?.map(item => item.trim()).filter(item => item !== '')
let result = bizArray.map(index => names[parseInt(index)]).filter(name => name !== '').join(',')
return result
},
// 获取带教任务详情 // 获取带教任务详情
getDetail(id) { getDetail(id) {
indexApi.getTaskDetail({id}).then(res => { indexApi.getTaskDetail({id}).then(res => {
...@@ -112,8 +123,11 @@ Page({ ...@@ -112,8 +123,11 @@ Page({
if (code == 0) { if (code == 0) {
data.courseList = data.taskCourseList || [], data.courseList = data.taskCourseList || [],
data.imageList = data.taskImageList || [] data.imageList = data.taskImageList || []
data.business = this.filterBusiness(data.business)
let taskContextLength = data?.taskContext.length
this.setData({ this.setData({
merchantList: data || [] orderObj: data || [],
taskContextLength
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -133,7 +147,7 @@ Page({ ...@@ -133,7 +147,7 @@ Page({
selectMultiple: type != 'merchant', selectMultiple: type != 'merchant',
labelKey: type == 'merchant' ? 'merchantName' : 'title', labelKey: type == 'merchant' ? 'merchantName' : 'title',
valueKey: type == 'merchant'? 'merchantId' : 'courseId', valueKey: type == 'merchant'? 'merchantId' : 'courseId',
selectValue: type == 'merchant' ? [orderObj.merchantId] : orderObj.course selectValue: type == 'merchant' ? [orderObj.merchantId] : orderObj.courseList
}) })
}, },
...@@ -161,8 +175,8 @@ Page({ ...@@ -161,8 +175,8 @@ Page({
taskContextInput(e) { taskContextInput(e) {
let val = e.detail.value || "" let val = e.detail.value || ""
if (val.length > 500) { if (val.length > 1000) {
val = val.substring(0, 500) val = val.substring(0, 1000)
} }
this.setData({ this.setData({
'orderObj.taskContext': val, 'orderObj.taskContext': val,
...@@ -172,12 +186,12 @@ Page({ ...@@ -172,12 +186,12 @@ Page({
handleImageUpload() { handleImageUpload() {
let _this = this let _this = this
let { orderObj } = this.data let { orderObj } = _this.data
wx.chooseImage({ wx.chooseImage({
count: 9 - orderObj.imageList?.length, count: 1,
mediaType: ['image'], sourceType: ['camera'],
success(res) { success(res) {
console.log(res) let [tempFiles] = res.tempFilePaths
for (const file of res.tempFiles) { for (const file of res.tempFiles) {
if (file.size > 10 * 1024 * 1024) { if (file.size > 10 * 1024 * 1024) {
return wx.showToast({ return wx.showToast({
...@@ -186,41 +200,29 @@ Page({ ...@@ -186,41 +200,29 @@ Page({
}) })
} }
} }
wx.$util.showLoading() let imgType = tempFiles.split('.')[1]
const uploadImages = async (tempFiles) => { let type = imgType == 'unknown' ? 'jpg' : imgType
try {
for (const item of tempFiles) {
const val = item.path
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({ wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径 filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', // 编码格式 encoding: 'base64', //编码格式
success: resolve, success(_res) {
fail: reject wx.$util.showLoading('上传中...')
}) uploadImg({
})
const img = await uploadImg({
file: `${type}@${_res.data}` file: `${type}@${_res.data}`
}) }).then(img => {
const { code, data, message } = img wx.$util.hideLoading()
let { code, data, message } = img
if (code == 0) { if (code == 0) {
orderObj.imageList.push({ imageUrl: data }) orderObj.imageList.push({imageUrl: data})
_this.setData({ _this.setData({
orderObj orderObj
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
})
} }
} catch (error) { })
wx.$util.showToast("上传失败,请重试")
} finally {
wx.$util.hideLoading()
}
}
uploadImages(res?.tempFiles)
} }
}) })
}, },
...@@ -243,17 +245,29 @@ Page({ ...@@ -243,17 +245,29 @@ Page({
}, },
submit() { submit() {
let { orderObj } = this.data
if (!orderObj.merchantId || !orderObj.courseList.length || !orderObj.taskContext || !orderObj.imageList.length) return wx.$util.showToast('请完成所有必填项') if (!orderObj.merchantId || !orderObj.courseList.length || !orderObj.taskContext || !orderObj.imageList.length) return wx.$util.showToast('请完成所有必填项')
let params = { let params = {
merchantId: orderObj.merchantId, merchantId: orderObj.merchantId,
merchantName: orderObj.merchantName, merchantName: orderObj.merchantName,
storeManagerPhone: orderObj.phone, storeManagerName: orderObj.storeManagerName,
storeManagerPhone: orderObj.storeManagerPhone,
taskContext: orderObj.taskContext, taskContext: orderObj.taskContext,
courseList: orderObj.courseList?.map(val => {return {id: val.id}}), courseList: orderObj.courseList?.map(val => {return {bcCourseId: val.courseId}}),
imageList: orderObj.imageList imageList: orderObj.imageList
} }
wx.$util.showLoading()
api.submitMentorData(params).then(res => { api.submitMentorData(params).then(res => {
wx.$util.hideLoading()
let { code, message } = res
if (code == 0) {
console.log('222')
this.back()
} else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
}) })
}, },
......
...@@ -29,7 +29,12 @@ page{ ...@@ -29,7 +29,12 @@ page{
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 36rpx; font-size: 36rpx;
width: 100%;
color: #333333; color: #333333;
.staff-name {
max-width: calc(100% - 40rpx);
word-break: break-all;
}
.sex-icon { .sex-icon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
......
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
<view class="box"> <view class="box">
<view class="name"> <view class="name">
<view class="staff"> <view class="staff">
{{detailInfo.staffName}} <view class="text-hide staff-name">{{orderObj.storeManagerName}}</view>
<image class="sex-icon" src="{{IMG_URL}}{{detailInfo.sex == 1 ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" /> <image class="sex-icon" src="{{IMG_URL}}{{orderObj.gender == '女' ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" />
</view> </view>
</view> </view>
<view class="items"> <view class="items">
<view class="item {{item.inline ? 'inline' : ''}}" style="{{item.width ? ('width:' + item.width + ';') : ''}}" wx:for="{{detailItems}}" wx:key="index"> <view class="item {{item.inline ? 'inline' : ''}}" style="{{item.width ? ('width:' + item.width + ';') : ''}}" wx:for="{{detailItems}}" wx:key="index">
<view class="label">{{item.label}}:</view> <view class="label">{{item.label}}:</view>
<view class="value">{{detailInfo[item.key] || '-'}}</view> <view class="value">{{orderObj[item.key] || '-'}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<block wx:if="{{orderObj.imageList.length > 0}}"> <block wx:if="{{orderObj.imageList.length > 0}}">
<view class="payVoucher_image" wx:for="{{orderObj.imageList}}" wx:key="index"> <view class="payVoucher_image" wx:for="{{orderObj.imageList}}" wx:key="index">
<image bindtap="previewImage" data-index="{{index}}" data-url="{{orderObj.imageList}}" src="{{item.imageUrl}}"/> <image bindtap="previewImage" data-index="{{index}}" data-url="{{orderObj.imageList}}" src="{{item.imageUrl}}"/>
<image class="del_icon" wx:if="{{orderObj.taskStatus != 2}}" src="/packageCrowdFunding/images/del_icon.png" mode="" bindtap="delCustomPayVoucher" data-index="{{index}}"/> <image class="del_icon" wx:if="{{orderObj.taskStatus != 2}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/zy_paf_del_icon.png" mode="" bindtap="delPhoto" data-index="{{index}}"/>
</view> </view>
</block> </block>
<block wx:if="{{orderObj.imageList.length < 9 && orderObj.taskStatus != 2}}"> <block wx:if="{{orderObj.imageList.length < 9 && orderObj.taskStatus != 2}}">
......
...@@ -17,7 +17,7 @@ Component({ ...@@ -17,7 +17,7 @@ Component({
key: 'ethnicity' key: 'ethnicity'
}, { }, {
label: '政治面貌', label: '政治面貌',
key: '' key: 'politicalStatus'
}, { }, {
label: '籍贯', label: '籍贯',
key: 'origin' key: 'origin'
......
...@@ -6,13 +6,14 @@ Component({ ...@@ -6,13 +6,14 @@ Component({
type: Object, type: Object,
value: {}, value: {},
observer: function(n) { observer: function(n) {
this.getData()
} }
}, },
selectedMerchantObj: {
type: Object
}
}, },
data: { data: {
IMG_URL, IMG_URL,
merchantName: '深圳南山问界4S店深圳南山问界4S店深圳南山问界4S店',
attendanceItems: [ attendanceItems: [
{ label: '打卡天数', key: 'checkInDays' }, { label: '打卡天数', key: 'checkInDays' },
{ label: '迟到', key: 'late', valueClass: 'danger' }, { label: '迟到', key: 'late', valueClass: 'danger' },
...@@ -55,6 +56,14 @@ Component({ ...@@ -55,6 +56,14 @@ Component({
{ label: '录音缺失率', key: 'recordingMissingRate' } { label: '录音缺失率', key: 'recordingMissingRate' }
] ]
], ],
tagRows: [{
label: '弱项',
class: 'danger',
key: 'badList'
}, {
label: '其他项',
key: 'ohterList'
}],
dressWarningItems: [{ label: '预警次数', key: 'warningCount' }], dressWarningItems: [{ label: '预警次数', key: 'warningCount' }],
behaviorInfo: {} behaviorInfo: {}
}, },
...@@ -67,52 +76,59 @@ Component({ ...@@ -67,52 +76,59 @@ Component({
this.getData() this.getData()
}) })
}, },
getData() { safeObjectToLabelList(obj) {
let { detailInfo } = this.data if (!obj || typeof obj !== 'object') {
// 假数据 return []
let data = {
attendance: {
checkInDays: 20,
late: 1,
earlyLeave: 5,
absenteeism: 5
},
dailyReport: {
submitted: 5,
notSubmitted: 8,
onDuty: 6,
rest: 8,
completionRate: 95
},
customerReception: {
actualDelivery: 10,
receptionCount: 2,
notTouched: 8
},
recordingAnalysis: {
behaviorTags: [],
quantitativeIndicators: {
recordingCount: 20,
dealCount: 5,
defeatCount: 3,
dealRate: 15,
qualityScore: 8,
attackDefenseScore: 11,
recordingMissingRate: 20
} }
}, let cleanObj = {};
dressCodeWarning: { try {
warningCount: 8 const jsonStr = JSON.stringify(obj)
cleanObj = JSON.parse(jsonStr)
} catch (e) {
return []
} }
const result = []
try {
const keys = Object.keys(cleanObj)
for (let i = 0; i < keys.length; i++) {
const key = keys[i]
const value = cleanObj[key]
const displayValue = (typeof value === 'object' && value !== null)
? JSON.stringify(value)
: String(value)
result.push(`${key} : ${displayValue}`)
} }
} catch (e) {
return []
}
return result
},
getData() {
let { detailInfo, startStr, endStr, selectedMerchantObj } = this.data
let params = {
phone: detailInfo.employeePhone,
employeeId: selectedMerchantObj?.employeeId,
bizs: detailInfo.scene,
startDate: startStr,
endDate: endStr,
merchantId: detailInfo.merchantId
}
wx.$util.showLoading()
api.getEmployeebehaviorData(params).then(res => {
wx.$util.hideLoading()
let { code, data, message } = res
if (code == 0) {
data.recordingAnalysis.badList = this.safeObjectToLabelList(data.recordingAnalysis.badList)
data.recordingAnalysis.ohterList = this.safeObjectToLabelList(data.recordingAnalysis.ohterList)
this.setData({ this.setData({
behaviorInfo: data behaviorInfo: data
}) })
let params = { } else {
employeeId: detailInfo.employeeId, wx.$util.showToast(message)
scene: detailInfo.scene
} }
api.getEmployeebehaviorData(params) }).catch(() => {
wx.$util.hideLoading()
})
}, },
handleChangeMerchant() { handleChangeMerchant() {
this.triggerEvent('changeMerchant') this.triggerEvent('changeMerchant')
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</view> </view>
<view class="merchant-change" bind:tap="handleChangeMerchant"> <view class="merchant-change" bind:tap="handleChangeMerchant">
<image src="{{IMG_URL}}analyse-merchant-icon.png" mode=""/> <image src="{{IMG_URL}}analyse-merchant-icon.png" mode=""/>
<view class="name">{{merchantName}}</view> <view class="name">{{selectedMerchantObj.merchantName}}</view>
<image src="{{IMG_URL}}arrow-down.png" mode=""/> <image src="{{IMG_URL}}arrow-down.png" mode=""/>
</view> </view>
...@@ -68,17 +68,14 @@ ...@@ -68,17 +68,14 @@
</view> </view>
</view> </view>
<view class="tags-row"> <view class="tags-row" wx:for="{{tagRows}}" wx:key="index">
<view class="tags-label">弱项:</view> <block wx:if="{{behaviorInfo.recordingAnalysis[item.key].length}}">
<view class="tags-label">{{item.label}}:</view>
<view class="tags"> <view class="tags">
<view class="tag danger" wx:for="{{weakTags}}" wx:key="label">{{item.label}}</view> <view class="tag {{item.class}}" wx:for="{{behaviorInfo.recordingAnalysis[item.key]}}" wx:for-index="subIndex" wx:for-item="subItem" wx:key="subIndex">{{subItem}}</view>
</view>
</view>
<view class="tags-row">
<view class="tags-label">其他项:</view>
<view class="tags">
<view class="tag {{item.type}}" wx:for="{{otherTags}}" wx:key="label">{{item.label}}</view>
</view> </view>
</block>
</view> </view>
<view class="grid grid-{{row.length}} stats-grid" wx:for="{{recordStatsRows}}" wx:for-item="row" wx:key="index"> <view class="grid grid-{{row.length}} stats-grid" wx:for="{{recordStatsRows}}" wx:for-item="row" wx:key="index">
......
...@@ -23,10 +23,7 @@ Component({ ...@@ -23,10 +23,7 @@ Component({
}, },
observers: { observers: {
'chartData': function (data) { 'chartData': function (data) {
setTimeout(() => {
this.initData(data) this.initData(data)
}, 3000)
}, },
}, },
/** /**
...@@ -43,21 +40,20 @@ Component({ ...@@ -43,21 +40,20 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
onInitChart(xData, yData) { onInitChart(xData, yData, yData2) {
console.log(xData, yData, this.ecComponent) console.log(this.ecComponent)
this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => { this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
console.log(canvas, width, height, dpr)
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width: width, width: width,
height: height, height: height,
devicePixelRatio: dpr // new devicePixelRatio: dpr // new
}); });
console.log(chart) this.setOption(chart, xData, yData, yData2);
this.setOption(chart, xData, yData); console.log(chart, xData, yData, yData2)
return chart; return chart;
}) })
}, },
setOption(chart, xData, yData) { setOption(chart, xData, yData, yData2) {
let maxSpan = xData.length < 10 ? 80 : 20 let maxSpan = xData.length < 10 ? 80 : 20
// let start= xData.length < 10 ? 50 : 80 // let start= xData.length < 10 ? 50 : 80
var option = { var option = {
...@@ -172,6 +168,35 @@ Component({ ...@@ -172,6 +168,35 @@ Component({
}] }]
} }
} }
},
{
showSymbol: false,
data: yData2,
type: 'line',
lineStyle: {
type: 'dashed'
},
itemStyle: {
color: "rgba(52, 123, 255, 1)",
},
// smooth: true,
color: this.data.color,
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: 'rgba(147, 170, 253, 1)' // 顶部颜色
}, {
offset: 1,
color: 'rgba(229, 234, 252, 0.31)' // 底部颜色
}]
}
}
} }
] ]
} }
...@@ -180,23 +205,24 @@ Component({ ...@@ -180,23 +205,24 @@ Component({
//初始化数据 //初始化数据
initData(data) { initData(data) {
const xData = [], const xData = [],
yData = [] yData = [],
yData2 = []
const [x, y, y2] = this.data.keys const [x, y, y2] = this.data.keys
data.forEach(item => { data.forEach(item => {
xData.push(item[x]) xData.push(item[x])
yData.push(item[y]) yData.push(item[y])
yData2.push(item[y2])
}) })
this.setData({ this.setData({
xData, xData,
yData yData,
yData2
}) })
this.onInitChart(xData, yData) this.onInitChart(xData, yData, yData2)
}, },
}, },
ready() { ready() {
// 获取组件 // 获取组件
this.ecComponent = this.selectComponent('#mychart-dom-line'); this.ecComponent = this.selectComponent('#mychart-dom-line');
console.log('2222', this.ecComponent)
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
</view> </view>
<view class="merchant-change" bind:tap="handleChangeMerchant"> <view class="merchant-change" bind:tap="handleChangeMerchant">
<image src="{{IMG_URL}}analyse-merchant-icon.png" mode=""/> <image src="{{IMG_URL}}analyse-merchant-icon.png" mode=""/>
<view class="name">{{'深圳南山问界4S店深圳南山问界4S店深圳南山问界4S店'}}</view> <view class="name">{{selectedMerchantObj.merchantName}}</view>
<image src="{{IMG_URL}}arrow-down.png" mode=""/> <image src="{{IMG_URL}}arrow-down.png" mode=""/>
</view> </view>
<block wx:if="{{selectedMerchantObj.merchantId}}">
<view class="merchant-data"> <view class="merchant-data">
<view class="title"> <view class="title">
<image src="{{IMG_URL}}analyse-merchant.png" mode=""/> <image src="{{IMG_URL}}analyse-merchant.png" mode=""/>
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
<view class="ratio" wx:if="{{card.showMom}}"> <view class="ratio" wx:if="{{card.showMom}}">
<text class="ratio-label" wx:if="{{queryType != 'self'}}">环比</text> <text class="ratio-label" wx:if="{{queryType != 'self'}}">环比</text>
<text class="ratio-value">{{card.momValue}}</text> <text class="ratio-value">{{card.momValue}}</text>
<image wx:if="{{queryType != 'self' && card.momArrow}}" class="ratio-arrow" src="{{}}" mode=""/> <image wx:if="{{card.momArrow}}" class="ratio-arrow" src="{{}}" mode=""/>
</view> </view>
</view> </view>
</view> </view>
...@@ -84,10 +85,10 @@ ...@@ -84,10 +85,10 @@
<analyse-line <analyse-line
id="line" id="line"
opts="{{opts}}" opts="{{opts}}"
chartData="{{lineData}}" chartData="{{trendList}}"
/> />
</view> </view>
</block>
<van-dialog <van-dialog
use-slot use-slot
title="{{tipsTitle || '帮助'}}" title="{{tipsTitle || '帮助'}}"
......
...@@ -11,9 +11,9 @@ Component({ ...@@ -11,9 +11,9 @@ Component({
data: { data: {
IMG_URL, IMG_URL,
topStats: [ topStats: [
{ label: '学习时长', value: 20 }, { label: '学习时长', key: 'studyHours' },
{ label: '完成课程数', value: 22 }, { label: '完成课程数', key: 'completedCourses' },
{ label: '带教次数', value: 2 } { label: '带教次数', key: 'coachingTimes' }
], ],
tabs: [ tabs: [
{ key: 'course', label: '课程学习' }, { key: 'course', label: '课程学习' },
...@@ -24,39 +24,74 @@ Component({ ...@@ -24,39 +24,74 @@ Component({
}, },
methods: { methods: {
search(e) { search(e) {
let { activeTab, detailInfo } = this.data this.setData({
let params = {
storeManagerPhone: detailInfo.storeManagerPhone,
startDate: e.detail.startDay?.replace(/\//g, '-'), startDate: e.detail.startDay?.replace(/\//g, '-'),
endDate: e.detail.endDay?.replace(/\//g, '-'), endDate: e.detail.endDay?.replace(/\//g, '-'),
}, () => {
this.getData()
this.getStaticsData()
})
},
getStaticsData() {
let { detailInfo, startDate, endDate } = this.data
let params = {
businessType: detailInfo.scene || undefined,
startDate,
endDate,
sortField: 1,
sortOrder: 0,
storeManagerPhone: detailInfo?.employeePhone
}
api.getTrainingStaffList(params).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
topInfo: data[0] || {}
})
} else {
wx.$util.showToast(message)
}
})
},
getData() {
let { activeTab, detailInfo, startDate, endDate } = this.data
let params = {
businessType: detailInfo?.scene,
storeManagerPhone: detailInfo.employeePhone,
startDate,
endDate,
trainingType: activeTab + 1 trainingType: activeTab + 1
} }
// 假数据 wx.$util.showLoading()
let data = [{ api.getTrainingExperienceList(params).then(res => {
taskId: 1, wx.$util.hideLoading()
name: '客情维护客户画像的重要性', let { code, data, message } = res
completedTime: 1773739327171 if (code == 0) {
}, {
taskId: 2,
name: '督导带教',
completedTime: 1773739321171
}]
data?.forEach(val => { data?.forEach(val => {
val.completedTime = dayjs(val.completedTime).format('YYYY-MM-DD HH:mm:ss') val.completedTime = dayjs(val.completedTime).format('YYYY-MM-DD HH:mm:ss')
}) })
this.setData({list: data}) this.setData({
// api.getTrainingExperienceList(params).then(res => { list: data
})
// }) } else {
wx.$util.showToast(message)
}
}).catch(() => {
wx.$util.hideLoading()
})
}, },
onTabTap(e) { onTabTap(e) {
const { index } = e.currentTarget.dataset || {} const { index } = e.currentTarget.dataset || {}
if (index == this.data.activeTab) return if (index == this.data.activeTab) return
this.setData({ activeTab: index }) this.setData({ activeTab: index, list: [] }, () => {
this.getData()
})
}, },
onViewItem(e) { onViewItem(e) {
const { type, item } = e.currentTarget.dataset || {} const { item } = e.currentTarget.dataset || {}
this.triggerEvent('view', { type, item }) wx.navigateTo({
url: `/packageCrew/pages/mentoring/mentoring?id=${item.taskId}`,
})
} }
}, },
}) })
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="stats"> <view class="stats">
<view class="stat" wx:for="{{topStats}}" wx:key="label"> <view class="stat" wx:for="{{topStats}}" wx:key="label">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="value">{{item.value}}</view> <view class="value">{{topInfo[item.key]}}</view>
</view> </view>
</view> </view>
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<view class="list-item" wx:for="{{list}}" wx:key="id"> <view class="list-item" wx:for="{{list}}" wx:key="id">
<image class="icon" src="{{IMG_URL}}learning-icon.png" mode=""/> <image class="icon" src="{{IMG_URL}}learning-icon.png" mode=""/>
<view class="content"> <view class="content">
<view class="title">{{item.name}}</view> <view class="title">{{item.name || '-'}}</view>
<view class="sub">课程完成时间:{{item.completedTime}}</view> <view class="sub">课程完成时间:{{item.completedTime || '-'}}</view>
</view> </view>
</view> </view>
</block> </block>
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
<view style="display: flex;gap: 12rpx;"> <view style="display: flex;gap: 12rpx;">
<image class="icon" src="{{IMG_URL}}coaching-icon.png" mode=""/> <image class="icon" src="{{IMG_URL}}coaching-icon.png" mode=""/>
<view class="content"> <view class="content">
<view class="title">{{item.name}}</view> <view class="title">{{item.name || '督导带教'}}</view>
<view class="sub">带教时间:{{item.completedTime}}</view> <view class="sub">带教时间:{{item.completedTime ||'-'}}</view>
</view> </view>
</view> </view>
<view class="btn-box"> <view class="btn-box">
......
...@@ -8,7 +8,8 @@ Page({ ...@@ -8,7 +8,8 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
AIContent: '团队培训数据显示表面学习投入尚可,但知识体系构建严重不均,部分老顾问仅完成基础课程,在新产品与金融方案上存在明显知识断层,且带教记录空白,表明技能固化缺乏更新。与此同时,新人虽接受带教较多,但与其高战败率关联看,带教内容可能未精准击中其销售流程中的薄弱环节(如需求挖掘)。当前培训陷入“学用脱节”与“辅导泛化”的困境。建议立即进行针对性调整:第一,实施“短板课程强推计划”,根据上月战败主因(如竞品对比失利),强制相关顾问在3日内完成对应专题课程学习并通关测试;第二,改革带教模式,推行“数据驱动的精准带教”,督导需提前查阅带教对象的近期战败录音或低分项,带着具体问题(如“如何应对XX竞品的空间质疑”)进行陪访或演练,确保每次带教解决一个实际问题。通过“缺什么补什么”和“练什么考什么”,快速将培训转化为实战能力。团队培训数据显示表面学习投入尚可,但知识体系构建严重不均,部分老顾问仅完成基础课程,在新产品与金融方案上存在明显知识断层,且带教记录空白,表明技能固化缺乏更新。将“现状分析”与“建议”两部分自然融合为一段连贯文字,避免使用标题。整段文字需严格控制在500字以内,语言简洁、务实、指向明确。', navBarHeight: 84,
AIContent: '',
detailInfo: {}, detailInfo: {},
detailItems: [{ detailItems: [{
label: '手机号码', label: '手机号码',
...@@ -31,7 +32,8 @@ Page({ ...@@ -31,7 +32,8 @@ Page({
}, { }, {
text: '培训经历' text: '培训经历'
}], }],
tabIndex: 0 tabIndex: 0,
merchantList: []
}, },
navbarReady(e) { navbarReady(e) {
...@@ -42,7 +44,7 @@ Page({ ...@@ -42,7 +44,7 @@ Page({
}, },
tabClick(e) { tabClick(e) {
const eventCode = ['supervisor_baseMessage_tab', 'supervisor_personalPerformance_tab', 'supervisor_behaviorAnalysis_tab', 'supervisor_trainingExperience_tab'] const eventCode = ['supervisor_baseMessage_tab', 'supervisor_personalPerformance_tab', 'supervisor_behaviorAnalysis_tab', 'supervisor_trainingExperience_tab']
// wx.$track.setTrackData(0, eventCode[e.detail], {}, '') wx.$track.setTrackData(0, eventCode[e.detail], {}, '')
this.setData({ this.setData({
tabIndex: e.detail tabIndex: e.detail
}) })
...@@ -52,11 +54,19 @@ Page({ ...@@ -52,11 +54,19 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (options.query) {
let query = JSON.parse(options.query)
console.log(query, '=========')
this.setData({ this.setData({
detailInfo: options detailInfo: query
}) })
// 获取个人基础数据信息 // 获取个人基础数据信息
this.getBaseData(options) this.getBaseData(query)
// 获取人员AI分析数据
this.getPersonAIData(query)
// 获取调店记录
this.getTranferLog()
}
}, },
/** /**
...@@ -70,31 +80,64 @@ Page({ ...@@ -70,31 +80,64 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
// wx.$track.setTrackData(0, `supervisor_personal_dashboard_detail`, {}, '') wx.$track.setTrackData(0, `supervisor_personal_dashboard_detail`, {}, '')
}, },
getBaseData(options) { getTranferLog() {
// 假数据 let { detailInfo } = this.data
let data = { wx.$util.showLoading()
entryDate: '2026-01-01', api.getStoreTransferApi({phoneNumber: detailInfo.employeePhone}).then(res => {
business: '延保,轻改', wx.$util.hideLoading()
gender: '女', let {code, data, message} = res
origin: '陕西省/延安市', if (code == 0) {
name: '周芳', this.setData({
age: 33, merchantList: data || [],
ethnicity: '汉', selectedMerchantObj: {
manager: '李四', merchantId: data[0]?.merchantId || '',
department: '运营零售部门', merchantName: data[0]?.merchantName || '',
position: '延保门店销售', employeeId: data[0]?.employeeId || ''
phone: 13812345678, }
birthday: '1993-03-26' })
} else {
wx.$util.showToast(message)
} }
this.setData({baseInfo: data}) }).catch(() => {
wx.$util.hideLoading()
})
},
getPersonAIData(options) {
api.getAIAnslyseData({
type: 4,
timeDimension: options.timeDimension,
storeManagerPhone: options.phone,
startDate: options.startDate,
endDate: options.endDate
}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({AIContent: data?.aiGenerateResult || ''})
} else {
wx.$util.showToast(message)
}
})
},
filterBusiness(data) {
let names = ['', '延保', '权益', '轻改']
if (!data) return '-'
let bizArray = data?.split(',')?.map(item => item.trim()).filter(item => item !== '')
let result = bizArray.map(index => names[parseInt(index)]).filter(name => name !== '').join(',')
return result
},
getBaseData(options) {
api.getEmployeeBaseData({ api.getEmployeeBaseData({
employeeId: options?.employeeId phone: options?.employeePhone
}).then(res => { }).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
data.business = this.filterBusiness(data.business)
this.setData({ this.setData({
baseInfo: data baseInfo: data
}) })
...@@ -106,24 +149,27 @@ Page({ ...@@ -106,24 +149,27 @@ Page({
// 接待录音 // 接待录音
handleRecording() { handleRecording() {
// wx.$track.setTrackData(0, `supervisor_reception_recording`, {}, '') wx.$track.setTrackData(0, `supervisor_reception_recording`, {}, '')
let { baseInfo, selectedMerchantObj, detailInfo } = this.data
wx.navigateTo({ wx.navigateTo({
url: '/packageCrew/pages/receptionRecording/receptionRecording', url: `/packageCrew/pages/receptionRecording/receptionRecording?storeManagerName=${baseInfo.name}&gender=${baseInfo.gender}&storeManagerPhone=${baseInfo.phone}&entryDate=${baseInfo.entryDate}&business=${baseInfo.business}&selectedMerchantId=${selectedMerchantObj.merchantId}&scene=${detailInfo.scene}&employeeId=${selectedMerchantObj.employeeId}`,
}) })
}, },
// 发起带教 // 发起带教
handleMentoring() { handleMentoring() {
// wx.$track.setTrackData(0, `supervisor_start_mentoring`, {}, '') wx.$track.setTrackData(0, `supervisor_start_mentoring`, {}, '')
let { baseInfo } = this.data
wx.navigateTo({ wx.navigateTo({
url: '/packageCrew/pages/mentoring/mentoring', url: `/packageCrew/pages/mentoring/mentoring?storeManagerName=${baseInfo.name}&gender=${baseInfo.gender}&storeManagerPhone=${baseInfo.phone}&entryDate=${baseInfo.entryDate}&business=${baseInfo.business}`,
}) })
}, },
// 调店记录 // 调店记录
handleStoreTransfer() { handleStoreTransfer() {
// wx.$track.setTrackData(0, `supervisor_store_transfer`, {}, '') wx.$track.setTrackData(0, `supervisor_store_transfer`, {}, '')
let { baseInfo } = this.data
wx.navigateTo({ wx.navigateTo({
url: '/packageCrew/pages/storeTransfer/storeTransfer', url: `/packageCrew/pages/storeTransfer/storeTransfer?phoneNumber=${baseInfo.phone}`,
}) })
}, },
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
</view> </view>
<view class="tab-content"> <view class="tab-content">
<basic-info wx:if="{{tabIndex === 0}}" baseInfo="{{baseInfo}}" /> <basic-info wx:if="{{tabIndex === 0}}" baseInfo="{{baseInfo}}" />
<personal-performance wx:if="{{tabIndex === 1}}" detailInfo="{{detailInfo}}" /> <personal-performance wx:if="{{tabIndex === 1}}" detailInfo="{{detailInfo}}" merchantList="{{merchantList}}" selectedMerchantObj="{{selectedMerchantObj}}" />
<behavior-analysis wx:if="{{tabIndex === 2}}" detailInfo="{{detailInfo}}" /> <behavior-analysis wx:if="{{tabIndex === 2}}" detailInfo="{{detailInfo}}" selectedMerchantObj="{{selectedMerchantObj}}" />
<training-experience wx:if="{{tabIndex === 3}}" detailInfo="{{detailInfo}}" /> <training-experience wx:if="{{tabIndex === 3}}" detailInfo="{{detailInfo}}" />
<view style="width: 100%;height: 200rpx;"></view> <view style="width: 100%;height: 200rpx;"></view>
</view> </view>
......
...@@ -15,18 +15,18 @@ Component({ ...@@ -15,18 +15,18 @@ Component({
*/ */
data: { data: {
statusMap: { statusMap: {
3: { text: '成交', color: '#35C376', background: '#35c37614' }, '成交': { color: '#35C376', background: '#35c37614' },
4: { text: '战败', color: '#F24724', background: '#f2472414' } '战败': { color: '#F24724', background: '#f2472414' }
}, },
itemOptions: [{ itemOptions: [{
label: '服务门店', label: '服务门店',
key: 'merchantName' key: 'merchantName'
}, { }, {
label: '质检评分', label: '质检评分',
key: 'qualityCheckScore' key: 'score'
}, { }, {
label: '攻防评分', label: '攻防评分',
key: 'defenceResultFlag' key: 'gfScroe'
}] }]
}, },
...@@ -37,7 +37,7 @@ Component({ ...@@ -37,7 +37,7 @@ Component({
onViewItem(e) { onViewItem(e) {
let { record } = this.data let { record } = this.data
wx.navigateTo({ wx.navigateTo({
url: `/packageCrew/pages/recordingDetail/recordingDetail?receptionStartTime=${record.receptionStartTime}&batchId=${record.batchId}&merchantNo=${record.merchantNo}`, url: `/packageCrew/pages/recordingDetail/recordingDetail?record=${JSON.stringify(record)}`,
}) })
} }
}, },
......
...@@ -5,18 +5,18 @@ ...@@ -5,18 +5,18 @@
<view class="phone">{{record.phoneNumber}}</view> <view class="phone">{{record.phoneNumber}}</view>
</view> </view>
<view class="right"> <view class="right">
<view class="staff">{{record.employeeName}}</view> <view class="staff">{{record.salesName || '-'}}</view>
<view class="status" style="color: {{statusMap[record.orderStatus].color}};background: {{statusMap[record.orderStatus].background}}">{{statusMap[record.orderStatus].text}}</view> <view class="status" style="color: {{statusMap[record.receptionResult].color}};background: {{statusMap[record.receptionResult].background}}">{{record.receptionResult}}</view>
</view> </view>
</view> </view>
<view> <view>
<text class="record-label" wx:if="{{record.carBrand}}">{{record.carBrand}}</text> <text class="record-label" wx:if="{{record.carBrand}}">{{record.carBrand }}</text>
<text class="record-label" wx:if="{{record.carModel}}">{{record.carModel}}</text> <text class="record-label" wx:if="{{record.carModel}}">{{record.carModel}}</text>
<text class="record-label" wx:if="{{record.tag}}">{{record.tag}}</text> <text class="record-label" wx:if="{{record.tag}}">{{record.tag}}</text>
</view> </view>
<view class="row" wx:for="{{itemOptions}}" wx:key="index"> <view class="row" wx:for="{{itemOptions}}" wx:key="index">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="value">{{record[item.key]}}</view> <view class="value">{{record[item.key] || '-'}}</view>
</view> </view>
<view class="btn-box" wx:if="{{!hideBtn}}"> <view class="btn-box" wx:if="{{!hideBtn}}">
<view class="btn" data-type="coach" data-item="{{item}}" bind:tap="onViewItem">接待详情</view> <view class="btn" data-type="coach" data-item="{{item}}" bind:tap="onViewItem">接待详情</view>
......
// packageCrew/pages/receptionRecording/receptionRecording.js // packageCrew/pages/receptionRecording/receptionRecording.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
import { getReceptionRecordList, getRecordDetailList} from "~/api/crew/index" import { getRecordingList } from "~/api/crew/index"
import dayjs from 'dayjs'
Page({ Page({
/** /**
...@@ -8,39 +9,30 @@ Page({ ...@@ -8,39 +9,30 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
detailInfo: { detailInfo: {},
staffName: '赵惠惠',
sex: 1,
staffPhone: '18902640418',
entryDate: '2025-12-12',
scene: '延保,轻改,权益'
},
detailItems: [{ detailItems: [{
label: '手机号码', label: '手机号码',
key: 'staffPhone' key: 'storeManagerPhone'
}, { }, {
label: '入职时间', label: '入职时间',
key: 'entryDate', key: 'entryDate',
width: '290rpx' width: '290rpx'
}, { }, {
label: '归属业务', label: '归属业务',
key: 'scene', key: 'business',
inline: true inline: true
}], }],
staticsItems: [{ staticsItems: [{
label: '录音', label: '录音',
key: '', key: 'totalRecordings'
value: 60
}, { }, {
label: '成交数', label: '成交数',
key: '', key: 'dealCount'
value: 60
}, { }, {
label: '战败数', label: '战败数',
key: '', key: 'defeatCount'
value: 60
}], }],
listData: [], staticDate: {},
pageNum: 1, pageNum: 1,
nothing: false, nothing: false,
}, },
...@@ -49,7 +41,9 @@ Page({ ...@@ -49,7 +41,9 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getReceptionList() this.setData({
detailInfo: options
})
}, },
/** /**
...@@ -66,113 +60,87 @@ Page({ ...@@ -66,113 +60,87 @@ Page({
}, },
getParams() { search(e) {
let {
searchForm
} = this.data
let userInfo = wx.$util.getUserInfo() || {};
const now = new Date();
const threeMonthsAgo = new Date(now.getFullYear(), now.getMonth() - 3, now.getDate() + 1)
let obj = {
startDateTime: searchForm?.startDateTime || new Date(threeMonthsAgo).format('yyyy-MM-dd'),
endDateTime: searchForm?.endDateTime || now.format('yyyy-MM-dd'),
customerName: searchForm?.customerName || '',
phoneNumber: searchForm?.customerName || '',
}
return obj
},
// 获取接待记录统计数据
getReceptionList() {
let {
listData
} = this.data
let params = this.getParams()
this.setData({ this.setData({
loaded: false list: [],
}, () => { pageNum: 1,
wx.showLoading({ flag: false,
title: '加载中' nothing: false,
}) startStr: e.detail.startDay?.replace(/\//g, '-'),
getReceptionRecordList({ endStr: e.detail.endDay?.replace(/\//g, '-')
merchantNo: params.merchantNo,
startDateTime: params.startDateTime,
endDateTime: params.endDateTime,
staffUuids: params.staffUuids
}).then(res => {
let {
code,
message,
data
} = res
if (code == 0) {
data?.forEach(val => {
val.receptionStaticInfoDTOList = []
val.staticDateStr = `${new Date(val.staticDate).getMonth() + 1}月${new Date(val.staticDate).getDate()}日`
})
this.setData({
listData: listData.concat(data),
pageNum: 1
}, () => { }, () => {
this.getReceptionRecordDetailInfo() this.getReceptionList()
})
} else {
wx.$util.showToast(message)
}
}).catch(err => {
wx.hideLoading()
})
}) })
}, },
// 获取接待记录接待时间轴详情数据
getReceptionRecordDetailInfo() { getReceptionList() {
let { let { pageNum, startStr, endStr, detailInfo, nothing } = this.data
pageNum, // let params = {
listData, // employeeId: detailInfo.employeeId,
nothing // pageNum,
} = this.data // pageSize: 10,
// startDate: startStr,
// endDate: endStr,
// merchantId: detailInfo?.selectedMerchantId,
// bizs: detailInfo.scene ? detailInfo.scene : ''
// }
let params = { let params = {
pageNum, employeeId: '584fdb460afa4dad835cbe8d73cfa923',
...this.getParams() pageNum: 1,
pageSize: 10,
startDate: '2025-06-01',
endDate: '2026-06-30',
merchantId: 44211227,
bizs: 1
} }
if (nothing) return if (nothing) return
wx.showLoading({ wx.$util.showLoading()
title: '加载中' getRecordingList(params).then(res => {
}) wx.$util.hideLoading()
this.track_businessParam = params //埋点业务参数 let { code, data, message } = res
getRecordDetailList(params).then(res => {
let {
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
listData?.forEach(val => { data.dateSummaryList?.forEach(val => {
data?.list?.forEach(subV => { val.receptionStaticInfoDTOList = []
if (val.staticDate == subV.staticDate && val.receptionStaticInfoDTOList?.findIndex(v => v.fileUrl == subV.fileUrl) < 0) val.receptionStaticInfoDTOList.push(subV) val.staticDateStr = `${new Date(val.date).getMonth() + 1}月${new Date(val.date).getDate()}日`
data?.recordingList?.forEach(subVal => {
subVal.totalDuration = subVal.recordingDuration
if (val.date == dayjs(subVal.receptionTime).format('YYYY-MM-DD')) {
val.receptionStaticInfoDTOList.push(subVal)
}
}) })
}) })
let listDataLength = listData.reduce((acc, curr) => acc + curr?.receptionStaticInfoDTOList?.length, 0) let list = data.dateSummaryList
let total = data.totalCount
if (total != 0) {
this.setData({ this.setData({
loaded: true, [`list[${pageNum - 1}]`]: list
listData, })
pageNum: pageNum + 1, }
this.setData({
total,
flag: true,
triggered: false, triggered: false,
nothing: pageNum == data?.pages || listDataLength == data?.total pageNum: pageNum + 1,
nothing: total == this.data.list.flatMap(inner => inner).reduce((sum, item) => sum + (item.receptionStaticInfoDTOList?.length || 0), 0),
staticDate: data?.summary || {}
}, () => {
const query = wx.createSelectorQuery().in(this)
query.select('.content').boundingClientRect()
query.exec(res => {
this.setData({contentHeight: res[0]?.height})
})
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
wx.hideLoading() }).catch(() => {
}).catch(err => { wx.$util.hideLoading()
wx.hideLoading()
}) })
}, },
// 触底加载更多 // 触底加载更多
onBottomRefresh() { onBottomRefresh() {
this.getReceptionRecordDetailInfo() this.getReceptionList()
}, },
/** /**
......
/* packageCrew/pages/receptionRecording/receptionRecording.wxss */ /* packageCrew/pages/receptionRecording/receptionRecording.wxss */
page { page {
background: #F2F3F7; background: #F2F3F7;
height: 100vh;
} }
.content { .content {
background: #FFFFFF; background: #FFFFFF;
......
...@@ -8,15 +8,31 @@ ...@@ -8,15 +8,31 @@
} }
return listDataLength > 0 return listDataLength > 0
} }
var isFirstDateInAllPages = function (allPages, pageIndex, itemDate) {
if (!itemDate) return true
if (!allPages || !allPages.length) return true
// 只检查当前页之前的所有页
for (var p = 0; p < pageIndex; p++) {
var pageArr = allPages[p]
if (!pageArr || !pageArr.length) continue
for (var i = 0; i < pageArr.length; i++) {
if (pageArr[i] && pageArr[i].date === itemDate) {
return false
}
}
}
return true
}
module.exports = { module.exports = {
isShowEmpty: isShowEmpty isShowEmpty: isShowEmpty,
isFirstDateInAllPages: isFirstDateInAllPages
} }
</wxs> </wxs>
<view class="content"> <view class="content">
<view class="top-box"> <view class="top-box">
<view class="name"> <view class="name">
<view class="staff"> <view class="staff">
{{detailInfo.staffName}} {{detailInfo.storeManagerName}}
<image class="sex-icon" src="{{IMG_URL}}{{detailInfo.sex == 1 ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" /> <image class="sex-icon" src="{{IMG_URL}}{{detailInfo.sex == 1 ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" />
</view> </view>
</view> </view>
...@@ -33,26 +49,26 @@ ...@@ -33,26 +49,26 @@
<view class="grid grid-3"> <view class="grid grid-3">
<view class="grid-item" wx:for="{{staticsItems}}" wx:key="label"> <view class="grid-item" wx:for="{{staticsItems}}" wx:key="label">
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="value">{{item.value}}</view> <view class="value">{{staticDate[item.key]}}</view>
<view class="sub {{item.subClass || ''}}" wx:if="{{item.subLabel}}">{{item.subLabel}}</view>
</view> </view>
</view> </view>
</view> </view>
<scroll-view scroll-y class="list-box" enable-back-to-top refresher-enabled="{{true}}" bindscrolltolower="onBottomRefresh" style="height: calc(100% - var(--fontSize80));" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}"> <scroll-view scroll-y class="list-box" enable-back-to-top bindscrolltolower="onBottomRefresh" style="height: calc(100% - {{contentHeight}}px);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="box-content {{!filter.isShowEmpty(listData) ? 'empty-contant' : ''}}"> <view class="box-content">
<block wx:if="{{filter.isShowEmpty(listData)}}"> <block wx:if="{{list.length}}">
<block wx:for="{{listData}}" wx:key="date" wx:if="{{item.receptionStaticInfoDTOList.length}}"> <block wx:for="{{list}}" wx:for-item="listData" wx:for-index="listIndex" wx:key="listIndex">
<view class="date-section"> <block wx:for="{{listData}}" wx:for-item="item" wx:for-index="index" wx:key="index" wx:if="{{item.receptionStaticInfoDTOList.length}}">
<view class="date-section" wx:if="{{filter.isFirstDateInAllPages(list, listIndex, item.date)}}">
<view class="list-date">{{item.staticDateStr}}</view> <view class="list-date">{{item.staticDateStr}}</view>
<block wx:if="{{!hideScore}}"> <block>
<view class="static"> <view class="static">
<view class="static-warp"> <view class="static-warp">
<view> <view>
<text class="summary-item green" data-type="upgrade" bindtap="filterItemData">成交 {{item.upgrades}}</text> <text class="summary-item green" data-type="upgrade" bindtap="filterItemData">成交 {{item.dealCount}}</text>
<text class="line"></text> <text class="line"></text>
</view> </view>
<view> <view>
<text class="summary-item red" data-type="defeat" bindtap="filterItemData">战败 {{item.losses}}</text> <text class="summary-item red" data-type="defeat" bindtap="filterItemData">战败 {{item.defeatCount}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -74,7 +90,8 @@ ...@@ -74,7 +90,8 @@
<view class="list-nothing">到底了~</view> <view class="list-nothing">到底了~</view>
</block> </block>
</block> </block>
<block wx:if="{{!filter.isShowEmpty(listData) && loaded}}"> </block>
<block wx:else>
<empty-data /> <empty-data />
</block> </block>
</view> </view>
......
// packageEquity/pages/receptionDetail/components/dialogue/dialogue.js // packageEquity/pages/receptionDetail/components/dialogue/dialogue.js
import api from "~/utils/request/request.js"; import { findConversationDetailByBatchId } from '~/api/index/index'
let thisPage = null let thisPage = null
import watchScrollMixin from '../../watchScrollMixin' import watchScrollMixin from '../../watchScrollMixin'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
...@@ -217,9 +217,7 @@ Component({ ...@@ -217,9 +217,7 @@ Component({
}, },
/**对话列表 */ /**对话列表 */
async findConversationDetailByBatchIdNew(params) { async findConversationDetailByBatchIdNew(params) {
const { const dialogueList = await findConversationDetailByBatchId(params)
data: dialogueList
} = await api.post("dj.api.car.boutique.inspection.findConversationDetailByBatchIdNew", params)
this.getAudioObject() this.getAudioObject()
dialogueList?.map(e => { dialogueList?.map(e => {
e.visible = true e.visible = true
......
// packageCrew/pages/recordingDetail/recordingDetail.js // packageCrew/pages/recordingDetail/recordingDetail.js
import {getRecordDetailList, getShortUrl, findCheckResultByBatchId, submitOutstandingCases } from "~/api/crew/index" import {getRecordingList, getShortUrl, findCheckResultByBatchId, submitOutstandingCases } from "~/api/crew/index"
import { getReceptionDetail } from '~/api/index/index'
import dayjs from 'dayjs' import dayjs from 'dayjs'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
Page({ Page({
...@@ -10,7 +10,7 @@ Page({ ...@@ -10,7 +10,7 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 113.5, navBarHeight: 84,
typeLists: ['对话', '质检'], typeLists: ['对话', '质检'],
qualityAudio: '', qualityAudio: '',
activeIndex: 0, activeIndex: 0,
...@@ -23,58 +23,29 @@ Page({ ...@@ -23,58 +23,29 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad(options) { async onLoad(options) {
console.log(options) const record = JSON.parse(options.record)
if (Object.keys(options).length) {
// 调用接口获取详情,默认取第一条
let {
receptionStartTime
} = options
const time = dayjs(receptionStartTime).format('YYYY-MM-DD')
const params = {
batchId: options.batchId,
merchantNo: options.merchantNo,
startDateTime: time,
endDateTime: time
}
const res = await getRecordDetailList(params)
let {
code,
data,
message
} = res
if (code == 0) {
console.log(data)
const detailInfo = data.list[0] || {}
if (Object.keys(detailInfo).length) {
detailInfo.staticDate = new Date(detailInfo.staticDate).format('MM月dd日')
this.setData({ this.setData({
record: detailInfo, record,
title: `${dayjs(record.receptionTime).format('M月D日')}${record.recordemployeeName}接待`,
}, () => { }, () => {
wx.$util.getViewInfo('.reception-wrap', ({ wx.$util.getViewInfo('.reception-wrap', ({
height height
}) => { }) => {
this.setData({ this.setData({
receptionWrapHeight: `${height * 2}rpx` receptionWrapHeight: `${height}px`
}) })
}) })
this.findCheckResultByBatchId(detailInfo.batchId)
this.setAudio()
}) })
} // this.setAudio()
} this.findCheckResultByBatchId(record.batchId)
}
}, },
async findCheckResultByBatchId(batchId) { async findCheckResultByBatchId(batchId) {
try { try {
const { const data = await getReceptionDetail({
code,
data,
message
} = await findCheckResultByBatchId({
batchId batchId
}) })
if (code == 0) {
data.map(item => { data.map(item => {
item.offset = item.offset != null ? Number(item.offset): item.offset
item.formatScore = `${item.score || item.score === 0 ? item.score : '-'}/${item.sumScore || item.sumScore === 0 ? item.sumScore : '-'}` item.formatScore = `${item.score || item.score === 0 ? item.score : '-'}/${item.sumScore || item.sumScore === 0 ? item.sumScore : '-'}`
let hitTextList = JSON.parse(item.hitText), let hitTextList = JSON.parse(item.hitText),
matchedClass = 'no-hit', matchedClass = 'no-hit',
...@@ -108,7 +79,6 @@ Page({ ...@@ -108,7 +79,6 @@ Page({
this.setData({ this.setData({
qualityData: data qualityData: data
}) })
} else throw message
} catch (error) { } catch (error) {
wx.$util.showToast(error) wx.$util.showToast(error)
} }
...@@ -161,7 +131,7 @@ Page({ ...@@ -161,7 +131,7 @@ Page({
this.qualityAudio = wx.createInnerAudioContext({ this.qualityAudio = wx.createInnerAudioContext({
useWebAudioImplement: true useWebAudioImplement: true
}) })
this.qualityAudio.src = this.data.record.fileUrl this.qualityAudio.src = this.data.record.recordingUrl
this.qualityAudio.onPause(() => { this.qualityAudio.onPause(() => {
this.setData({ this.setData({
status: 'pause' status: 'pause'
...@@ -274,7 +244,7 @@ Page({ ...@@ -274,7 +244,7 @@ Page({
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
wx.setClipboardData({ wx.setClipboardData({
data: record.fileUrl data: record.recordingUrl
}) })
} }
} }
...@@ -302,21 +272,21 @@ Page({ ...@@ -302,21 +272,21 @@ Page({
}, },
// 提报优秀案例 // 提报优秀案例
handleSubmit() { handleSubmit() {
let { record } = this.data
let params = { let params = {
staffName: record.staffName, recordingId: record.recordingId
staffPhone: record.staffPhone,
merchantId: record.merchantId,
merchantName: record.merchantName,
customerCategory: record.customerCategory,
recordingUrl: record.fileUrl
} }
wx.$util.showLoading()
submitOutstandingCases(params).then(res => { submitOutstandingCases(params).then(res => {
wx.$util.hideLoading()
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
wx.navigateBack() wx.navigateBack()
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}).catch(() => {
wx.$util.hideLoading()
}) })
}, },
/** /**
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
page { page {
background-color: #FAFAFA !important; background-color: #FAFAFA !important;
overflow: hidden; overflow: hidden;
height: 100vh;
} }
.navigation-title { .navigation-title {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</view> </view>
<view class="reception-operate"> <view class="reception-operate">
<image class="img share" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/down-icon.png" bind:tap="download" mode=""/> <image class="img share" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/down-icon.png" bind:tap="download" mode=""/>
<image class="img share" src="{{IMG_URL}}share-icon.png" bind:tap="share" mode=""/> <!-- <image class="img share" src="{{IMG_URL}}share-icon.png" bind:tap="share" mode=""/> -->
<view class="audio-wrap" bind:tap="onHandle"> <view class="audio-wrap" bind:tap="onHandle">
<image class="img" src="{{IMG_URL}}play-icon.png" wx:if="{{status=='pause'||status=='ending'}}"/> <image class="img" src="{{IMG_URL}}play-icon.png" wx:if="{{status=='pause'||status=='ending'}}"/>
<image class="img" src="{{IMG_URL}}stop-icon.png" wx:else/> <image class="img" src="{{IMG_URL}}stop-icon.png" wx:else/>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</view> </view>
</view> </view>
<view class="type-wrap" style="height:calc(100vh - {{receptionWrapHeight}} - 180rpx)"> <view class="type-wrap" style="height:calc(100% - {{receptionWrapHeight}} - {{record.caseSubmitStatus != 1 ? 180 : 0}}rpx)">
<block wx:if="{{receptionWrapHeight}}"> <block wx:if="{{receptionWrapHeight}}">
<view class="component-item {{activeIndex != 0 ?'hide':''}}"> <view class="component-item {{activeIndex != 0 ?'hide':''}}">
<dialogue id="dialogue" batchId="{{record.batchId}}" recordData="{{record}}" qualityData="{{qualityData}}"></dialogue> <dialogue id="dialogue" batchId="{{record.batchId}}" recordData="{{record}}" qualityData="{{qualityData}}"></dialogue>
...@@ -36,6 +36,6 @@ ...@@ -36,6 +36,6 @@
</view> </view>
</block> </block>
</view> </view>
<view class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <view wx:if="{{record.caseSubmitStatus != 1}}" class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn next" bindtap="handleSubmit">提报优秀案例</view> <view class="btn next" bindtap="handleSubmit">提报优秀案例</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
// packageCrew/pages/storeTransfer/storeTransfer.js // packageCrew/pages/storeTransfer/storeTransfer.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
import api from '~/api/index/index' import api from '~/api/crew/index'
Page({ Page({
/** /**
...@@ -8,6 +8,7 @@ Page({ ...@@ -8,6 +8,7 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 84,
list: [] list: []
}, },
...@@ -44,10 +45,16 @@ Page({ ...@@ -44,10 +45,16 @@ Page({
}, },
getList(options) { getList(options) {
let params = { api.getStoreTransferApi({phoneNumber: options.phoneNumber}).then(res => {
employeeId let { code, data, message } = res
if (code == 0) {
this.setData({
list: data || []
})
} else {
wx.$util.showToast(message)
} }
api.getStoreTransferApi({}) })
}, },
/** /**
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<image src="{{IMG_URL}}merchant-icon.png" mode=""/> <image src="{{IMG_URL}}merchant-icon.png" mode=""/>
</view> </view>
<view class="right"> <view class="right">
<view class="name">{{item.merchantName}}</view> <view class="name">{{item.merchantName || '-'}}</view>
<view class="date">最早开单时间:{{item.date}}</view> <view class="date">最早开单时间:{{item.startDate}}</view>
</view> </view>
</view> </view>
</block> </block>
......
...@@ -9,6 +9,7 @@ Page({ ...@@ -9,6 +9,7 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 84,
orderObj: { orderObj: {
onDutyFlag: 0, onDutyFlag: 0,
taskContext: '', taskContext: '',
...@@ -196,6 +197,7 @@ Page({ ...@@ -196,6 +197,7 @@ Page({
taskType: 0, taskType: 0,
onDutyFlag: orderObj.onDutyFlag, onDutyFlag: orderObj.onDutyFlag,
merchantId: orderObj.onDutyFlag == 0 ? orderObj.merchantId : '', merchantId: orderObj.onDutyFlag == 0 ? orderObj.merchantId : '',
merchantName: orderObj.onDutyFlag == 0 ? orderObj.merchantName : '',
taskContext: orderObj.onDutyFlag == 0 ? orderObj.taskContext : '', taskContext: orderObj.onDutyFlag == 0 ? orderObj.taskContext : '',
taskImageList: orderObj.onDutyFlag == 0 ? orderObj.taskImageList : [], taskImageList: orderObj.onDutyFlag == 0 ? orderObj.taskImageList : [],
} }
......
...@@ -6,6 +6,7 @@ Page({ ...@@ -6,6 +6,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
navBarHeight: 84,
orderObj: { orderObj: {
taskContext: '' taskContext: ''
} }
......
...@@ -9,12 +9,13 @@ Page({ ...@@ -9,12 +9,13 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 84,
statusMap: { statusMap: {
1: {name: '待完成', color: '#2C66F7', background: '#2c66f71a'}, 0: {name: '待完成', color: '#2C66F7', background: '#2c66f71a'},
2: {name: '进行中', color: '#FF9D0A', background: '#ff9d0a1a'}, 1: {name: '进行中', color: '#FF9D0A', background: '#ff9d0a1a'},
3: {name: '已完成', color: '#35C376', background: '#35c3761a'}, 2: {name: '已完成', color: '#35C376', background: '#35c3761a'},
}, },
detailInfo: {handleStatus: 1}, detailInfo: {},
orderObj: { orderObj: {
taskContext: '' taskContext: ''
} }
...@@ -66,10 +67,9 @@ Page({ ...@@ -66,10 +67,9 @@ Page({
taskContextInput(e) { taskContextInput(e) {
let val = e.detail.value || "" let val = e.detail.value || ""
if (val.length > 1000) { if (val.length > 500) {
val = val.substring(0, 1000) val = val.substring(0, 500)
} }
console.log(val)
this.setData({ this.setData({
'orderObj.taskContext': val, 'orderObj.taskContext': val,
taskContextLength: val.length taskContextLength: val.length
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
<scroll-view scroll-y class="container" style="padding-top: calc({{navBarHeight}}px + 8rpx);"> <scroll-view scroll-y class="container" style="padding-top: calc({{navBarHeight}}px + 8rpx);">
<view class="detail-box"> <view class="detail-box">
<view class="header"> <view class="header">
<view class="name text-hide">{{'深圳问界4S门店名称深圳问界4S门店名称'}}</view> <view class="name text-hide">{{orderObj.merchantName || '-'}}</view>
<view class="status text-center" style="color:{{ statusMap[detailInfo.handleStatus].color }};background-color:{{statusMap[detailInfo.handleStatus].background }};"> <view class="status text-center" style="color:{{ statusMap[orderObj.taskStatus].color }};background-color:{{statusMap[orderObj.taskStatus].background }};">
{{statusMap[detailInfo.handleStatus].name }} {{statusMap[orderObj.taskStatus].name }}
</view> </view>
</view> </view>
<view class="row"> <view class="row">
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
<view class="item-box remark_box"> <view class="item-box remark_box">
<view class="label">专项任务<text class='required'>*</text></view> <view class="label">专项任务<text class='required'>*</text></view>
<view class="textArea_box"> <view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="taskContextInput" /> <textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="500" placeholder="请输入" class="textarea" bindinput="taskContextInput" />
<view class="currentWordNumber">{{taskContextLength || 0}} / 1000</view> <view class="currentWordNumber">{{taskContextLength || 0}} / 500</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -9,6 +9,7 @@ Page({ ...@@ -9,6 +9,7 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 84,
orderObj: { orderObj: {
taskContext: '', taskContext: '',
taskImageList: [], taskImageList: [],
......
...@@ -7,16 +7,16 @@ const DEFAULT_CONFIG = { ...@@ -7,16 +7,16 @@ const DEFAULT_CONFIG = {
{ label: '转化率', key: '3', type: 'percent' } { label: '转化率', key: '3', type: 'percent' }
], ],
metrics: [ metrics: [
{ label: '个人产值', key: 'personalOutput', type: 'number', width: 'auto' }, { label: '个人产值', key: 'personalOutput', dotKey:'outputWarningLevel', type: 'number', width: 'auto' },
{ label: '个人客单价', key: 'personalUnitPrice', type: 'number', width: '216rpx'}, { label: '个人客单价', key: 'personalUnitPrice', dotKey:'unitPriceWarningLevel', type: 'number', width: '216rpx'},
{ label: '转化率', key: 'personalConversion', type: 'percent', width: '162rpx' } { label: '转化率', key: 'personalConversion', dotKey:'conversionWarningLevel', type: 'percent', width: '162rpx' }
] ]
}, },
behavior: { behavior: {
sortOptions: [ sortOptions: [
{ label: '成交数', key: '1', type: 'number' }, { label: '成交数', key: '4', type: 'number' },
{ label: '战败数', key: '2', type: 'number' }, { label: '战败数', key: '5', type: 'number' },
{ label: '录音数', key: '3', type: 'number' } { label: '录音数', key: '6', type: 'number' }
], ],
metrics: [ metrics: [
{ label: '成交数', key: 'dealCount', type: 'number' }, { label: '成交数', key: 'dealCount', type: 'number' },
...@@ -81,7 +81,8 @@ Component({ ...@@ -81,7 +81,8 @@ Component({
employeeList: { type: Array, value: [] }, employeeList: { type: Array, value: [] },
initialSortKey: { type: String, value: '' }, initialSortKey: { type: String, value: '' },
initialSortOrder: { type: String, value: 'desc' }, initialSortOrder: { type: String, value: 'desc' },
localSort: { type: Boolean, value: false } localSort: { type: Boolean, value: false },
scene: Number
}, },
data: { data: {
...@@ -90,6 +91,11 @@ Component({ ...@@ -90,6 +91,11 @@ Component({
sortKey: '', sortKey: '',
sortOrder: 'desc', sortOrder: 'desc',
displayList: [], displayList: [],
dotMaps: {
0: 'red',
1: 'yellow',
2: 'green'
}
}, },
observers: { observers: {
...@@ -105,6 +111,13 @@ Component({ ...@@ -105,6 +111,13 @@ Component({
}, },
methods: { methods: {
initLoad() {
let { mode } = this.data
this.setData({
sortKey: mode == 'behavior' ? '4' : '1',
sortOrder: 'desc'
})
},
getConfig() { getConfig() {
return DEFAULT_CONFIG[this.data.mode] || DEFAULT_CONFIG.performance return DEFAULT_CONFIG[this.data.mode] || DEFAULT_CONFIG.performance
}, },
...@@ -156,6 +169,7 @@ Component({ ...@@ -156,6 +169,7 @@ Component({
}, },
onTapEmployee(e) { onTapEmployee(e) {
if (this.data.scene == 0) return // 全业务不支持跳转详情
const idx = e.currentTarget?.dataset?.index const idx = e.currentTarget?.dataset?.index
const employee = Array.isArray(this.properties.employeeList) ? this.properties.employeeList[idx] : null const employee = Array.isArray(this.properties.employeeList) ? this.properties.employeeList[idx] : null
this.triggerEvent('employeeTap', { employee }) this.triggerEvent('employeeTap', { employee })
......
...@@ -172,8 +172,16 @@ ...@@ -172,8 +172,16 @@
width: 12rpx; width: 12rpx;
height: 12rpx; height: 12rpx;
border-radius: 12rpx; border-radius: 12rpx;
&.red {
background: #F24724; background: #F24724;
} }
&.yellow {
background: #FF9D0A;
}
&.green {
background: #35C376;
}
}
} }
.metric-value { .metric-value {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<text class="sep">|</text> <text class="sep">|</text>
<text class="phone">{{item.phone || item.employeePhone || '-'}}</text> <text class="phone">{{item.phone || item.employeePhone || '-'}}</text>
</view> </view>
<van-icon name="arrow" class="arrow" /> <van-icon name="arrow" wx:if="{{scene > 0}}" class="arrow" />
</view> </view>
<view class="metrics"> <view class="metrics">
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view class="metric" style="width: {{subItem.width}};"> <view class="metric" style="width: {{subItem.width}};">
<view class="line" wx:if="{{subIndex > 0}}"></view> <view class="line" wx:if="{{subIndex > 0}}"></view>
<view class="metric-item"> <view class="metric-item">
<view class="metric-title">{{subItem.label}} <text class="dot {{}}"></text> </view> <view class="metric-title">{{subItem.label}}<text wx:if="{{mode == 'performance'}}" class="dot {{dotMaps[item[subItem.dotKey]]}}"></text> </view>
<view class="metric-value {{sortKey == subItem.key ? 'primary' : ''}}"> <view class="metric-value {{sortKey == subItem.key ? 'primary' : ''}}">
{{item.metricDisplay[subItem.key]}} {{item.metricDisplay[subItem.key]}}
</view> </view>
......
...@@ -28,8 +28,10 @@ ...@@ -28,8 +28,10 @@
</view> </view>
<AI-analyse AIContent="{{AIContent}}" /> <AI-analyse AIContent="{{AIContent}}" />
<employee-ranking <employee-ranking
id="employee-ranking"
title-icon="{{IMG_URL}}staff-rank.png" title-icon="{{IMG_URL}}staff-rank.png"
mode="{{mode}}" mode="{{mode}}"
scene="{{sceneTabIndex}}"
employee-list="{{employeeList}}" employee-list="{{employeeList}}"
local-sort="{{false}}" local-sort="{{false}}"
bind:sortChange="onEmployeeSortChange" bind:sortChange="onEmployeeSortChange"
......
...@@ -7,6 +7,7 @@ Page({ ...@@ -7,6 +7,7 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 84,
navStyle: 'background-color: rgba(0,0,0,0);', navStyle: 'background-color: rgba(0,0,0,0);',
navTitleStyle: 'font-weight: 600; font- size: 32rpx; color: #000;', navTitleStyle: 'font-weight: 600; font- size: 32rpx; color: #000;',
navBarHeight: 0, navBarHeight: 0,
...@@ -54,7 +55,7 @@ Page({ ...@@ -54,7 +55,7 @@ Page({
}, },
onTabItemTap(e) { onTabItemTap(e) {
// 点击埋点 // 点击埋点
// wx.$track.setTrackData(0, 'supervisor_index_page', {}, '') wx.$track.setTrackData(0, 'supervisor_index_page', {}, '')
}, },
navbarReady(e) { navbarReady(e) {
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
...@@ -86,13 +87,6 @@ Page({ ...@@ -86,13 +87,6 @@ Page({
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function () {
const query = wx.createSelectorQuery().in(this)
query.select('.top-box').boundingClientRect()
query.exec(res => {
this.setData({
topBoxHeight: res[0].height
})
})
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -124,9 +118,9 @@ Page({ ...@@ -124,9 +118,9 @@ Page({
api.getSupervisorStaticData({}).then(res => { api.getSupervisorStaticData({}).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
data.staffCount = data.staffCount ?? '' === '' ? '-' : this.formatThousands(data.staffCount) data.staffCount = (data.staffCount ?? '') === '' ? '-' : this.formatThousands(data.staffCount)
data.shopCount = data.shopCount ?? '' === '' ? '-' : this.formatThousands(data.shopCount) data.shopCount = (data.shopCount ?? '') === '' ? '-' : this.formatThousands(data.shopCount)
data.totalValue = data.totalValue ?? '' === '' ? '-' : this.formatThousands(data.totalValue) data.totalValue = (data.totalValue ?? '') === '' ? '-' : this.formatThousands(data.totalValue)
this.setData({staticData: data}) this.setData({staticData: data})
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -137,7 +131,7 @@ Page({ ...@@ -137,7 +131,7 @@ Page({
tabClick(e) { tabClick(e) {
let eventCode = ['supervisor_dayTask_tab', 'supervisor_weeklyTask_tab', 'supervisor_monthlyTask_tab', 'supervisor_specificTask_tab'] let eventCode = ['supervisor_dayTask_tab', 'supervisor_weeklyTask_tab', 'supervisor_monthlyTask_tab', 'supervisor_specificTask_tab']
// 点击埋点 // 点击埋点
// wx.$track.setTrackData(0, eventCode[e.detail], {}, '') wx.$track.setTrackData(0, eventCode[e.detail], {}, '')
this.setData({ this.setData({
tabIndex: e.detail tabIndex: e.detail
}) })
...@@ -145,7 +139,6 @@ Page({ ...@@ -145,7 +139,6 @@ Page({
jump(e) { jump(e) {
const { target } = e.currentTarget.dataset const { target } = e.currentTarget.dataset
let { startStr, endStr } = this.data
const pageUrl = { const pageUrl = {
3: '/packageIndex/pages/recordingReview/recordingReview', 3: '/packageIndex/pages/recordingReview/recordingReview',
5: '/packageCrew/pages/mentoring/mentoring', 5: '/packageCrew/pages/mentoring/mentoring',
...@@ -164,7 +157,7 @@ Page({ ...@@ -164,7 +157,7 @@ Page({
} }
let status = target.taskStatus != 2 ? 'execute' : 'view' let status = target.taskStatus != 2 ? 'execute' : 'view'
console.log(eventCode[target.taskType][status]) console.log(eventCode[target.taskType][status])
// wx.$track.setTrackData(0, eventCode[target.taskType][status], {}, '') wx.$track.setTrackData(0, eventCode[target.taskType][status], {}, '')
wx.navigateTo({ wx.navigateTo({
url: `${pageUrl[target.taskType]}?taskStatus=${target.taskStatus}&id=${target.id}`, url: `${pageUrl[target.taskType]}?taskStatus=${target.taskStatus}&id=${target.id}`,
}) })
...@@ -224,13 +217,20 @@ Page({ ...@@ -224,13 +217,20 @@ Page({
[`list[${pageNum - 1}]`]: list [`list[${pageNum - 1}]`]: list
}) })
} }
if (scrollTop >= topBoxHeight && repload) { if (repload) {
const query = wx.createSelectorQuery().in(this)
query.select('.top-box').boundingClientRect()
query.exec(res => {
let topBoxHeight = res[0].height
if (scrollTop >= topBoxHeight) {
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
setScrollTop: topBoxHeight setScrollTop: topBoxHeight
}) })
}, 200) }, 200)
} }
})
}
this.setData({ this.setData({
total, total,
flag: true, flag: true,
......
...@@ -39,7 +39,7 @@ Component({ ...@@ -39,7 +39,7 @@ Component({
}, },
goPush(e) { goPush(e) {
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
// wx.$track.setTrackData(0, 'supervisor_course_push', {}, '') wx.$track.setTrackData(0, 'supervisor_course_push', {}, '')
wx.navigateTo({ wx.navigateTo({
url: `/packageLearningCenter/pages/coursePush/coursePush?title=${target.title}&totalDuration=${target.totalDuration}&learnTotal=${target.learnTotal}&_imageUrl=${target._imageUrl}&_tagText=${target._tagText}` url: `/packageLearningCenter/pages/coursePush/coursePush?title=${target.title}&totalDuration=${target.totalDuration}&learnTotal=${target.learnTotal}&_imageUrl=${target._imageUrl}&_tagText=${target._tagText}`
}) })
......
...@@ -9,6 +9,7 @@ Page({ ...@@ -9,6 +9,7 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 84,
statisticsData: {}, statisticsData: {},
showSearchIcon: true, showSearchIcon: true,
pageNum: 1, pageNum: 1,
...@@ -97,7 +98,7 @@ Page({ ...@@ -97,7 +98,7 @@ Page({
onTabItemTap(e) { onTabItemTap(e) {
// 点击埋点 // 点击埋点
// wx.$track.setTrackData(0, 'supervisor_learning_page', {}, '') wx.$track.setTrackData(0, 'supervisor_learning_page', {}, '')
}, },
navbarReady(e) { navbarReady(e) {
...@@ -115,7 +116,7 @@ Page({ ...@@ -115,7 +116,7 @@ Page({
title: '加载中', title: '加载中',
mask: true mask: true
}) })
// wx.$track.setTrackData(0, 'supervisor_course_detail', {}, '') wx.$track.setTrackData(0, 'supervisor_course_detail', {}, '')
api.findBeiSenSSOToken({}).then(res => { api.findBeiSenSSOToken({}).then(res => {
wx.hideLoading() wx.hideLoading()
const beisenToken = res.data; const beisenToken = res.data;
......
...@@ -8,6 +8,7 @@ Page({ ...@@ -8,6 +8,7 @@ Page({
*/ */
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 84,
navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;', navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;',
isForbidden: false isForbidden: false
}, },
...@@ -23,7 +24,7 @@ Page({ ...@@ -23,7 +24,7 @@ Page({
}, },
onTabItemTap(e) { onTabItemTap(e) {
// 点击埋点 // 点击埋点
// wx.$track.setTrackData(0, 'supervisor_mine_page', {}, '') wx.$track.setTrackData(0, 'supervisor_mine_page', {}, '')
}, },
navbarReady(e) { navbarReady(e) {
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
......
...@@ -11,6 +11,7 @@ Page({ ...@@ -11,6 +11,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
navBarHeight: 84,
password: '', password: '',
userName: '', userName: '',
count: 60, count: 60,
...@@ -40,12 +41,6 @@ Page({ ...@@ -40,12 +41,6 @@ Page({
noLoginAgreeChoose: agree noLoginAgreeChoose: agree
}) })
}, },
/**显示隐藏密码 */
pwdSwitch() {
this.setData({
showPwd: !this.data.showPwd
})
},
authChoose(e) { authChoose(e) {
let { let {
detail: agree detail: agree
...@@ -151,8 +146,6 @@ Page({ ...@@ -151,8 +146,6 @@ Page({
if (loginType == 1 && (!code || !mobile)) return if (loginType == 1 && (!code || !mobile)) return
const checkAgree = this.checkAgree() const checkAgree = this.checkAgree()
if (checkAgree) return false if (checkAgree) return false
if (!flag) return if (!flag) return
wx.$util.showLoading() wx.$util.showLoading()
if (this.data.jumpPageFlag) return if (this.data.jumpPageFlag) return
......
...@@ -4,11 +4,46 @@ ...@@ -4,11 +4,46 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"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"
},
{
"name": "packageCrew/pages/peopleOverview/peopleOverview",
"pathName": "packageCrew/pages/peopleOverview/peopleOverview",
"query": "query=%7B%22employeeName%22%3A%22%E9%99%88%E5%B8%8C%22%2C%22phone%22%3A%2213132112126%22%2C%22studyHours%22%3A0%2C%22completedCourses%22%3A0%2C%22coachingTimes%22%3A1%2C%22employeePhone%22%3A%2213132112126%22%2C%22scene%22%3A1%2C%22startDate%22%3A%222026-03-20%22%2C%22endDate%22%3A%222026-03-20%22%2C%22timeDimension%22%3A0%7D",
"launchMode": "default",
"scene": null
},
{
"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",
"launchMode": "default",
"scene": null
},
{
"name": "packageCrew/pages/receptionRecording/receptionRecording",
"pathName": "packageCrew/pages/receptionRecording/receptionRecording",
"query": "storeManagerName=%E6%B5%8B%E8%AF%95%E5%91%98%E5%B7%A51194&gender=%E7%94%B7&storeManagerPhone=13132112126&entryDate=2025-04-05&business=%E5%BB%B6%E4%BF%9D&selectedMerchantId=44211227&scene=&employeeId=584fdb460afa4dad835cbe8d73cfa923",
"launchMode": "default",
"scene": null
},
{
"name": "packageCrew/pages/receptionRecording/receptionRecording",
"pathName": "packageCrew/pages/receptionRecording/receptionRecording",
"query": "storeManagerName=%E6%B5%8B%E8%AF%95%E5%91%98%E5%B7%A51194&gender=%E7%94%B7&storeManagerPhone=13132112126&entryDate=2025-04-05&business=%E5%BB%B6%E4%BF%9D&merchantId=44211227&scene=&employeeId=584fdb460afa4dad835cbe8d73cfa923",
"launchMode": "default",
"scene": null
},
{
"name": "复盘", "name": "复盘",
"pathName": "packageIndex/pages/recordingReview/recordingReview", "pathName": "packageIndex/pages/recordingReview/recordingReview",
"query": "", "query": "",
"scene": null, "launchMode": "default",
"launchMode": "default" "scene": null
}, },
{ {
"name": "packageIndex/pages/weeklyReview/weeklyReview", "name": "packageIndex/pages/weeklyReview/weeklyReview",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!