Commit fab3bd11 by unknown

feat:招聘入口配置

1 parent f9ccffe1
......@@ -384,5 +384,14 @@ module.exports = {
// 查询订单是否支持状态变更
getOrderRefundStep(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.isExist', data)
}
},
/** 待处理招聘统计 */
waitstaffstateAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.stat',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
}
}
// packageCrowdFunding/pages/homePage/index/index.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '~/packageCrowdFunding/api'
import { waitstaffstateAPI} from '~/api/api'
import NP from 'number-precision'
Component({
/**
......@@ -75,14 +76,6 @@ Component({
isTab: true,
tabIndex: 1
},
{
menuText: '招聘管理',
icon: 'event_management',
path: '',
isTab: true,
tabIndex: 1,
tipsNum: 99
},
// {
// menuText: '话术库',
// icon: 'script _library',
......@@ -112,12 +105,22 @@ Component({
icon: "sceneMarket",
navigateToUrl: "/packageEquity/pages/sceneMarket/index/index",
})
// 仅区域运营展示招聘管理模块
if ((userInfo.loginRole == 3) && menuList.every((item) => item.menuText != "招聘管理")) menuList.push({
menuText: "招聘管理",
icon: "recruit-manage",
path: 'packageEquity.recruitManage',
isTab: true,
tabIndex: 1,
tipsNum: 0
})
this.setData({
loginRole,
userInfo,
menuList
})
this.getData()
this.getWaitStaff() // 在组件加载时调用
}
},
......@@ -125,9 +128,6 @@ Component({
* 组件的方法列表
*/
methods: {
onLoad() {
this.getData()
},
getData() {
const userInfo = wx.$util.getUserInfo()
api.getStaticData({ merchantId: userInfo?.default4SStoreInfo_crowdFunding?.merchantId }).then(res => {
......@@ -146,6 +146,23 @@ Component({
}
})
},
// 招聘管理首页需求分析
getWaitStaff() {
const { menuList } = this.data
const index = menuList.findIndex(e => e.menuText === '招聘管理')
waitstaffstateAPI()
.then(result => {
const { code, data } = result
if (code == 0) {
this.setData({
[`menuList[${index}].tipsNum`]: data.waitProcessCount || 0
})
}
})
.catch(err => {
console.error('获取招聘管理统计失败:', err)
})
},
navGo(e) {
console.log(e)
const thisPage = wx.$router.getPageInstance()
......
......@@ -241,5 +241,14 @@ module.exports = {
// 查询订单可展示按钮类型
getMoreBtnAPI(data) {
return api.post('dj.api.smartcarlife.refundApplyRecord.button.select', data)
},
/** 待处理招聘统计 */
waitstaffstateAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.stat',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
}
}
......@@ -10,7 +10,7 @@ import {
getRecordDetailList
} from "../../receptionRecordsApi"
import aiApi from '../../aiApi'
import { getWaitAuditCountAPI } from '~/api/api'
import { getWaitAuditCountAPI, waitstaffstateAPI} from '~/api/api'
let lastPath = null; // 用于存储上一次的路径
function throttle(func, delay) {
let timeoutId;
......@@ -576,6 +576,15 @@ Component({
let index = menuList?.findIndex((val) => val.menuText == "交车目标");
index > -1 && menuList.splice(index, 1);
}
// 区域运营 - feature:招聘管理
if (userInfo?.loginRole == 3 && menuList.every((item) => item.name != '招聘管理')) {
menuList.push({
menuText: "招聘管理",
path: "packageEquity.recruitManage",
icon: "recruit-manage",
tipsNum: 0
})
}
// 区域运营/飞行督导
if ((userInfo?.loginRole == 3 || userInfo?.loginRole == 6) && menuList.every((item) => item.menuText != '工作日报')) {
menuList.push({
......@@ -614,6 +623,7 @@ Component({
let eventArr = [this.getYqStoreConfig(), this.getInspectionBadgeCode(), this.getBusiness(), this.getStoreList(), this.extractCheck()]
if (isStaff) eventArr.push(this.getStaffTargetTask(), this.getIsMentor())
if (userInfo.loginRole == 3) eventArr.push(this.getAwaitAuditCount(userInfo))
if (userInfo.loginRole == 3) eventArr.push(this.getWaitStaff(userInfo))
Promise.all(eventArr).then(() => {
this.menuListRest(); // 解决融合和非融合互相切换导致战败按钮问题
})
......@@ -639,7 +649,33 @@ Component({
let { code, data } = res
if (code == 0) {
this.setData({
[`menuList[${index}].tipsNum`]: data.waiteForAuditNum
[`menuList[${index}].tipsNum`]: data.totalCount
})
}
resolve()
})
})
},
// 获取招聘管理统计数量
getWaitStaff(userInfo) {
return new Promise(resolve => {
let { menuList } = this.data
// 区域运营角色退款审批入口
if (userInfo?.loginRole == 3 && menuList.every(item => item.menuText != '招聘管理')) {
menuList.push({
menuText: '招聘管理',
path: 'packageEquity.recruitManage',
icon: 'recruit-manage',
tipsNum: 0
})
}
let index = menuList.findIndex(e => e.menuText == '招聘管理')
waitstaffstateAPI({}).then(res => {
console.log("招聘管理",res);
let { code, data } = res
if (code == 0) {
this.setData({
[`menuList[${index}].tipsNum`]: data.waitProcessCount
})
}
resolve()
......
......@@ -212,17 +212,19 @@ box-shadow: 0 var(--fontSize24) var(--fontSize24) -var(--fontSize12) #d3d9e680
}
.hot_icon{
position: absolute;
right: 0;
right: var(--fontSize46);
top: 0;
width: var(--fontSize38);
height: var(--fontSize32);
min-width: var(--fontSize24);
height: var(--fontSize24);
background: #F24724;
border-radius: var(--fontSize16);
color: #FFFFFF;
font-size: var(--fontSize22);
font-size: var(--fontSize20);
display: flex;
justify-content: center;
align-items:center;
padding:var(--fontSize2);
border:var(--fontSize2) solid #ffffff;
}
.bubble_icon{
position: absolute;
......
import api from '~/subvehicleConversion/api'
import NP from 'number-precision'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { waitstaffstateAPI} from '~/api/api'
Component({
properties: {
navBarHeight: Number
......@@ -19,7 +20,7 @@ Component({
{title: '调查问卷', imgName: 'questionnaire', isOpen: false},
{title: '营销素材', imgName: 'marketingMaterial', isOpen: false},
{title: '业务申请', imgName: 'businessApplication', isOpen: false},
{title: '招聘管理', imgName: 'businessApplication', isOpen: false, tipsNum:99},
// {title: '招聘管理', imgName: 'businessApplication', isOpen: false, tipsNum:99},
],
exhibitionToolsList: [
{title: '调查问卷', icon: 'questionnaire', isOpen: false},
......@@ -28,7 +29,7 @@ Component({
{title: '活动管理', icon: 'event_management', isOpen: true,path:'activityManagement', isTab: true, tabIndex: 2},
// {title: '话术库', icon: 'script _library', isOpen: false},
{title: '订单补录', icon: 'supplementary_order', isOpen: true, path: 'supplementaryOrderList', isTab: true, tabIndex: 1},
{title: '招聘管理', icon: 'supplementary_order', isOpen: true, path: 'supplementaryOrderList', isTab: true, tabIndex: 1, tipsNum:99}
// {title: '招聘管理', icon: 'supplementary_order', isOpen: true, path: 'supplementaryOrderList', isTab: true, tabIndex: 1, tipsNum:99}
],
staticDataList: [{
label: '今日营业额',
......@@ -90,6 +91,24 @@ Component({
exhibitionToolsList
})
}
// 仅区域运营角色展示招聘管理模块
if ((userInfo.loginRole == 3 ) && exhibitionToolsList.every((item) => item.title != "招聘管理")) {
exhibitionToolsList.push({
title: "招聘管理",
icon: "recruit-manage",
path: 'packageEquity.recruitManage',
isOpen: true,
isTab: true,
tabIndex: 1,
tipsNum: 0
});
this.setData({
exhibitionToolsList
}, () => {
// 在设置完成后再获取招聘管理统计
this.getWaitStaff()
})
}
const params = {
merchantId: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion?.merchantId || ''
}
......@@ -129,5 +148,22 @@ Component({
// }
// })
},
// 获取招聘管理待处理数量
getWaitStaff() {
waitstaffstateAPI()
.then(result => {
const { code, data } = result
if (code == 0) {
const { exhibitionToolsList } = this.data
const index = exhibitionToolsList.findIndex(e => e.title === '招聘管理')
this.setData({
[`exhibitionToolsList[${index}].tipsNum`]: 14
})
}
})
.catch(err => {
console.error('获取招聘管理统计失败:', err)
})
}
}
});
......@@ -156,13 +156,15 @@
position: absolute;
right: 0;
top: 0;
width: var(--fontSize38);
height: var(--fontSize32);
min-width: var(--fontSize28);
height: var(--fontSize28);
background: #F24724;
border-radius: var(--fontSize16);
color: #FFFFFF;
font-size: var(--fontSize22);
font-size: var(--fontSize20);
display: flex;
justify-content: center;
align-items: center;
padding:var(--fontSize1);
border:var(--fontSize2) solid #ffffff;
}
\ No newline at end of file
......@@ -1609,8 +1609,7 @@ Page({
})
}
// 区域运营 - feature:招聘管理
// if (userInfo?.loginRole == 3 && menu.every((item) => item.name != '招聘管理')) {
if (menu.every((item) => item.name != '招聘管理')) {
if (userInfo?.loginRole == 3 && menu.every((item) => item.name != '招聘管理')) {
menu.push({
name: "招聘管理",
url: "packageEquity.recruitManage",
......
......@@ -220,17 +220,19 @@ page ::-webkit-scrollbar {
.menu .item .hot_icon {
position: absolute;
right: 0;
right: var(--fontSize12);
top: 0;
width: var(--fontSize38);
height: var(--fontSize32);
min-width: var(--fontSize24);
height: var(--fontSize24);
background: #F24724;
border-radius: var(--fontSize16);
border-radius: 50%;
color: #FFFFFF;
font-size: var(--fontSize22);
font-size: var(--fontSize20);
display: flex;
justify-content: center;
align-items: center;
padding:var(--fontSize2);
border:var(--fontSize2) solid #ffffff;
}
.menu .item .bubble_icon {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!