Commit fab3bd11 by unknown

feat:招聘入口配置

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