Commit e146ca7d by 张立顺

feat 招聘管理代码

1 parent e718eab4
Showing 58 changed files with 2243 additions and 88 deletions
<template> <template>
<div id="app"> <div id="app">
<template v-if="showWindow"> <!-- <template v-if="showWindow"> -->
<transition name="fade"> <transition name="fade">
<keep-alive v-if="$route.meta.keepAlive"> <keep-alive v-if="$route.meta.keepAlive">
<router-view></router-view> <router-view></router-view>
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
<transition name="fade"> <transition name="fade">
<router-view v-if="!$route.meta.keepAlive"></router-view> <router-view v-if="!$route.meta.keepAlive"></router-view>
</transition> </transition>
</template> <!-- </template> -->
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'App', name: 'App',
data () { data() {
return { return {
showWindow: false showWindow: false
} }
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
watch: { watch: {
watchFlag: { watchFlag: {
immediate: true, immediate: true,
handler (newval) { handler(newval) {
console.log(newval, '===') console.log(newval, '===')
this.showWindow = newval this.showWindow = newval
this.hideLoading() this.hideLoading()
...@@ -31,12 +31,11 @@ export default { ...@@ -31,12 +31,11 @@ export default {
} }
}, },
computed: { computed: {
watchFlag () { watchFlag() {
return this.$store.state.app.showWindow return this.$store.state.app.showWindow
} }
}, },
mounted () { mounted() {},
},
methods: {} methods: {}
} }
......
// 需要那个,引入那个
import {
ImagePreview,
Checkbox,
Collapse,
CollapseItem,
Swipe,
SwipeItem,
Dialog,
Toast,
Field,
Popup,
Picker,
Form,
Button,
Icon,
Tab,
Tabs,
PullRefresh,
List,
Tag,
Empty,
DatetimePicker,
Search,
Switch,
Cell,
CellGroup,
Loading
} from 'vant'
// 导出一个函数,接收一个app参数,在函数中注册组件
export function vant(app) {
// 别忘了注册
app.use(Swipe)
app.use(SwipeItem)
app.use(Dialog)
app.use(Toast)
app.use(Popup)
app.use(Picker)
app.use(Form)
app.use(Field)
app.use(Button)
app.use(Icon)
app.use(Collapse)
app.use(CollapseItem)
app.use(Checkbox)
app.use(ImagePreview)
app.use(Tab)
app.use(Tabs)
app.use(PullRefresh)
app.use(List)
app.use(Tag)
app.use(Empty)
app.use(DatetimePicker)
app.use(Search)
app.use(Switch)
app.use(Cell)
app.use(CellGroup)
app.use(Loading)
}
...@@ -16,6 +16,9 @@ import router from './router' ...@@ -16,6 +16,9 @@ import router from './router'
import store from './store' import store from './store'
import api from './api' import api from './api'
import { fetchConfig, cfg } from '@/config' import { fetchConfig, cfg } from '@/config'
import { vant } from '@/config/vant.config.js'
// import mixin from './mixins/index'
vant(Vue)
import '@/assets/css/index.scss' import '@/assets/css/index.scss'
import { bus, tools, store as local, util } from './utils' import { bus, tools, store as local, util } from './utils'
import './utils/util' import './utils/util'
...@@ -36,18 +39,18 @@ Vue.prototype.to = function (name, params) { ...@@ -36,18 +39,18 @@ Vue.prototype.to = function (name, params) {
Vue.config.productionTip = false Vue.config.productionTip = false
import VConsole from 'vconsole' import VConsole from 'vconsole'
const isMock = ['prod','production'].includes(process.env.NODE_ENV) const isMock = ['prod', 'production'].includes(process.env.NODE_ENV)
fetchConfig(!isMock).then(res => { fetchConfig(!isMock).then(res => {
// 从配置服务器获取动态配置 // 从配置服务器获取动态配置
// 设置 js中可以访问 $cdn // 设置 js中可以访问 $cdn
Vue.use(cfg) Vue.use(cfg)
window.$fetchConfig = res window.$fetchConfig = res
if (res.vconsole) new VConsole() // if (res.vconsole) new VConsole()
/**登录过期 重新登录 */ /**登录过期 重新登录 */
window.reLogin = () => { window.reLogin = () => {
util.removeLocalStorage('ww_userInfo') util.removeLocalStorage('ww_userInfo')
util.clearSessionId() util.clearSessionId()
store.dispatch('navigation') store.dispatch('navigation') // 暂时不管登录过期
} }
window.vm = new Vue({ window.vm = new Vue({
el: '#app', el: '#app',
......
...@@ -3,5 +3,42 @@ export const mobilePages = { ...@@ -3,5 +3,42 @@ export const mobilePages = {
{ {
name: 'index' name: 'index'
} }
],
recruitManage: [
{
name: 'recruitManage/recruitManage',
path: '/recruitManage/recruitManage',
meta: {
title: '招聘管理'
}
},
{
name: 'recruitInsert/recruitInsert',
path: '/recruitManage/recruitInsert',
meta: {
title: '添加招聘需求'
}
},
{
name: 'recruitDetail/recruitDetail',
path: '/recruitManage/recruitDetail',
meta: {
title: '招聘详情'
}
},
{
name: 'recruitResult/recruitResult',
path: '/recruitManage/recruitResult',
meta: {
title: '提交成功'
}
},
{
name: 'recruitmentReview/recruitmentReview',
path: '/recruitManage/recruitmentReview',
meta: {
title: '招聘审核'
}
}
] ]
} }
...@@ -12,16 +12,15 @@ import routes from './routes' ...@@ -12,16 +12,15 @@ import routes from './routes'
import store from '@/store' import store from '@/store'
// hack router push callback // hack router push callback
const originalPush = Router.prototype.push const originalPush = Router.prototype.push
Router.prototype.push = function push (location, onResolve, onReject) { Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject) if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch(err => err)
} }
Vue.use(Router) Vue.use(Router)
const Adaptive = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|WebOS|Symbian|Windows Phone)/i,
isMobile = (Adaptive.exec(navigator.userAgent))
const router = createRouter() const router = createRouter()
function createRouter () { function createRouter() {
return new Router({ return new Router({
// mode: 'history', // 如果是 history模式 需要配置vue.config.js publicPath // mode: 'history', // 如果是 history模式 需要配置vue.config.js publicPath
base: process.env.BASE_URL, base: process.env.BASE_URL,
...@@ -33,12 +32,6 @@ function createRouter () { ...@@ -33,12 +32,6 @@ function createRouter () {
} }
// http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main/ // http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main/
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (!isMobile && to.name !== 'pc') next({
path: '/pc'
})
if (isMobile && to.name !== 'mobile') next({
path: '/mobile'
})
store.commit('SET_LAST_PATH', to.name) store.commit('SET_LAST_PATH', to.name)
/* 路由发生变化修改页面title */ /* 路由发生变化修改页面title */
store.dispatch('setPageMeta', to.meta) store.dispatch('setPageMeta', to.meta)
...@@ -47,12 +40,12 @@ router.beforeEach((to, from, next) => { ...@@ -47,12 +40,12 @@ router.beforeEach((to, from, next) => {
if (to.matched.some(recode => recode.meta.noAuth)) { if (to.matched.some(recode => recode.meta.noAuth)) {
store.state.app.showWindow = true store.state.app.showWindow = true
} else { } else {
store.dispatch('navigation', to) store.dispatch('navigation', to) // 暂时不管登录过期
} }
next() next()
}) })
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter () { export function resetRouter() {
const newRouter = createRouter() const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router router.matcher = newRouter.matcher // reset router
} }
......
import { mobilePages } from './mobile' import { mobilePages } from './mobile'
import { pcPages } from './pc' import { pcPages } from './pc'
const keepAlives = [] const keepAlives = []
const Adaptive = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|WebOS|Symbian|Windows Phone)/i,
isMobile = (Adaptive.exec(navigator.userAgent)), // 合并所有页面配置
pages = isMobile ? mobilePages : pcPages; // 动态选择routes对象 const pages = { ...mobilePages, ...pcPages }
// const getPages = _ => {
// let router = {
// path: '/',
// // name: 'index',
// redirect: `${isMobile ? '/mobile' : '/pc'}`,
// // component: resolve => require([`views/index.vue`], resolve)
// }
// router.children = routes.map(e => {
// let name = `${e.name}`
// let route = {
// path: e.path,
// name,
// meta: e.meta || {},
// component: resolve => require([`views/${name}/index.vue`], resolve)
// }
// // if (e.children) route.children = setChildren(e, name)
// if (e.meta && e.meta.keepAlive) keepAlives.push(name)
// return route
// })
// return [router]
// }
let routes = [ let routes = [
{ {
path:'/', path: '/',
redirect: `${isMobile ? '/mobile' : '/pc'}` redirect: '/mobile' // 默认重定向到 mobile,或者根据需求改为其他
} }
] ]
Object.keys(pages).map(parent => { Object.keys(pages).map(parent => {
pages[parent].map(val => { pages[parent].map(val => {
let childrenPath = `${parent}/${val.name}` let childrenPath = `${parent}/${val.name}`
let { meta } = val let { meta } = val
const path = `/${val.name == 'index' ? parent : childrenPath}` const path = val.path || `/${val.name == 'index' ? parent : childrenPath}`
const name = val.name == 'index' ? parent : childrenPath.replace('/', '.') const name = val.name == 'index' ? parent : val.name
if (meta && meta.keepAlive) keepAlives.push(name) if (meta && meta.keepAlive) keepAlives.push(name)
let route = { let route = {
component: resolve => require([`views/${childrenPath}.vue`], resolve), component: resolve => require([`views/${childrenPath}.vue`], resolve),
...@@ -47,6 +29,7 @@ Object.keys(pages).map(parent => { ...@@ -47,6 +29,7 @@ Object.keys(pages).map(parent => {
routes.push(route) routes.push(route)
}) })
}) })
export const keeps = keepAlives export const keeps = keepAlives
export default routes export default routes
...@@ -10,27 +10,29 @@ const state = { ...@@ -10,27 +10,29 @@ const state = {
import router from '@/router' import router from '@/router'
const mutations = { const mutations = {
SET_PAGE_META (state, meta) { SET_PAGE_META(state, meta) {
state.pageMeta = meta state.pageMeta = meta
}, },
SET_LAST_PATH (state, path) { SET_LAST_PATH(state, path) {
state.lastPath = path state.lastPath = path
} }
} }
const actions = { const actions = {
setPageMeta ({ commit }, meta) { setPageMeta({ commit }, meta) {
document.title = meta.title || '企微招聘' document.title = meta.title || '企微招聘'
commit('SET_PAGE_META', meta) commit('SET_PAGE_META', meta)
}, },
registerHttp ({ }, sessionId = '') { registerHttp({}, sessionId = '') {
let { scrmRequest, djRequest } = window.$fetchConfig let { scrmRequest, djRequest } = window.$fetchConfig
window.$SCRM_HTTP = new Http({ ...scrmRequest, alert: Notify }) window.$SCRM_HTTP = new Http({ ...scrmRequest, alert: Notify })
window.$DJ_HTTP = new Http({ ...djRequest, alert: Notify, headers: { token: sessionId } }) window.$DJ_HTTP = new Http({ ...djRequest, alert: Notify, headers: { token: sessionId } })
}, },
async login ({ dispatch }) { async login({ dispatch }) {
console.log('login')
return
try { try {
const wwCode = getParams('code'), const wwCode = getParams('code'),
{ corpId, agentId } = util.getLocalStorage('ww_storage_info'), { corpId, agentId } = util.getLocalStorage('ww_storage_info') || {},
paramsPhone = util.getLocalStorage('ww_params_phone'), paramsPhone = util.getLocalStorage('ww_params_phone'),
{ loginUrl } = window.$fetchConfig { loginUrl } = window.$fetchConfig
if (wwCode) { if (wwCode) {
...@@ -64,14 +66,13 @@ const actions = { ...@@ -64,14 +66,13 @@ const actions = {
} else throw '' } else throw ''
} else throw '' } else throw ''
} else throw message } else throw message
} } else window.location.href = `${loginUrl}?redirect_uri=${encodeURIComponent(window.location.href)}&corpId=${corpId}&agentId=${agentId}&backLoginCode=BACKCODE`
else window.location.href = `${loginUrl}?redirect_uri=${encodeURIComponent(window.location.href)}&corpId=${corpId}&agentId=${agentId}&backLoginCode=BACKCODE`
} catch (error) { } catch (error) {
if (!error) error = '登录失败或无权限' if (!error) error = '登录失败或无权限'
if (error) Notify(typeof error === 'string' ? error : error.toString()) if (error) Notify(typeof error === 'string' ? error : error.toString())
} }
}, },
navigation ({ dispatch }, to) { navigation({ dispatch }, to) {
let { corpId, agentId, phone } = getParams(), let { corpId, agentId, phone } = getParams(),
userInfo = util.getLocalStorage('ww_userInfo') userInfo = util.getLocalStorage('ww_userInfo')
if (phone) util.setLocalStorage('ww_params_phone', phone) if (phone) util.setLocalStorage('ww_params_phone', phone)
...@@ -88,7 +89,7 @@ const actions = { ...@@ -88,7 +89,7 @@ const actions = {
util.showLoading() util.showLoading()
dispatch('login') dispatch('login')
} }
}, }
} }
const getParams = name => { const getParams = name => {
let [url, paramsList] = window.location.href.split('?') let [url, paramsList] = window.location.href.split('?')
......
No preview for this file type
No preview for this file type
<template> <template>
<div class="pc-layout"> <div class="pc-layout">PC端首页2222</div>
PC端首页
</div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: '', name: '',
data () { data() {
return { return {}
}
}, },
mounted () { mounted() {},
}, methods: {}
methods: {
}
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
</style> </style>
\ No newline at end of file \ No newline at end of file
const djStaffUrl = '/rop-dj-staff-miniprogram/router'
const djBusinessUrl = '/rop-dj-business-school-miniprogram/router'
const djSmartCarlifeUrl = '/dj.api.smartcarlife' // Just a guess, checking previous api.js usage
// Helper function to simulate api.post from the original file using window.$DJ_HTTP
// Original: api.post(method, data, [], url)
function post(method, data = {}, url, options = {}) {
// Merge method into data as per ssoApi.js pattern for $DJ_HTTP
const payload = {
method,
technicalSupervisorName: '梁老湿', // 技术督导姓名
technicalSupervisorPhone: '15814019200', // 技术督导手机号
sessionId: '8bcad25d-8bfa-41a8-a5e8-ef06ace89ee8',
...data
}
return window.$DJ_HTTP({
url,
data: payload,
...options
})
}
export default {
// 获取招聘管理列表数据
getRecruitList(data) {
// return post('dj.api.staff.h5.recruitment.page', data, djStaffUrl)
return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.page', data, djStaffUrl)
},
// 获取招聘管理详情
getRecruitDetailAPI(data) {
// http://192.168.1.86:8594/rop-dj-staff-miniprogram/router/dj.api.staff.h5.recruitment.demand.technicalSupervisor.demand.detail/1.0.0
return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.demand.detail', data, djStaffUrl, { hideloading: true })
},
// 处理简历
processResumeAPI(data) {
return post('dj.api.staff.h5.recruitment.resume.technicalSupervisor.process', data, djStaffUrl)
// return post('dj.api.staff.h5.recruitment.resume.process', data, djStaffUrl)
},
// 招聘需求-确认/驳回
// http://192.168.1.86:8594/rop-dj-staff-miniprogram/router/dj.api.staff.h5.recruitment.demand.technicalSupervisor.status.update/1.0.0
updateDemandStatusAPI(data) {
return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.status.update', data, djStaffUrl)
},
// 招聘需求-统计
// http://192.168.1.86:8594/rop-dj-staff-miniprogram/router/dj.api.staff.h5.recruitment.demand.technicalSupervisor.stat/1.0.0
getDemandStatAPI(data) {
return post('dj.api.staff.h5.recruitment.demand.technicalSupervisor.stat', data, djStaffUrl)
},
// 招聘管理门店列表
// getDemandStoreListAPI(data) {
// return post('dj.api.staff.h5.recruitment.demand.store.list', data, djStaffUrl)
// },
// // 招聘管理字典查询
// getStaffDictListAPI(data) {
// return post('dj.api.staff.h5.dict.list', data, djStaffUrl)
// },
// /** 待处理招聘统计 */
// waitstaffstateAPI(data) {
// return post('dj.api.staff.h5.recruitment.demand.stat', data, djStaffUrl)
// },
// /** 添加招聘需求 */
// addStaffDictListAPI(data) {
// return post('dj.api.staff.h5.recruitment.demand.add', data, djStaffUrl)
// },
// /** 确认招聘需求 flag? */
// confiremStaffFlagAPI(data) {
// return post('dj.api.staff.h5.recruitment.confirm', data, djStaffUrl)
// },
// // 获取带教任务数量
// getMentorShipTaskNum(data) {
// return post('dj.api.businessSchool.miniProgram.teachTask.count', data, djBusinessUrl)
// },
// The following APIs didn't have a specific URL in the original file,
// they just had 2 args: api.post(method, data).
// I'll assume they might use a default URL or I need to check where they point.
// Original: return api.post('dj.api.smartcarlife.selectOrderGoods.list', data)
// ssoApi.js uses window.$DJ_HTTP for 'dj.api.*'.
// I will use a default URL or the biUrl from ssoApi if appropriate, but ssoApi used '/rop-dj-pe-analysis/router'.
// Let's assume they go to the default DJ gateway if no URL provided?
// But wait, the original api.post signature was (method, data, [], url).
// When url is missing, what does it default to?
// In `ssoApi.js`, `loginByPhone` uses `/rop-dj-pe-analysis/router`.
// I will leave the URL blank or use a default if I can find one.
// For now, I'll map them to `window.$DJ_HTTP` without a specific URL if not known,
// or maybe they are not used in this module?
// The module is `recruitManage`. `selectOrderGoods` seems unrelated?
// I will comment them out or keep them as is with a TODO if they seem unrelated.
// They seem like copy-paste leftovers (smartcarlife, updateCustomerphotos).
// I'll include them but using a generic post wrapper.
// 根据商户号获取可选商品列表
getSelectOrderGoodsList(data) {
// Assuming default gateway if no URL specified
return post('dj.api.smartcarlife.selectOrderGoods.list', data, '')
},
// 更新施图
updateCustomerphotos(data) {
return post('dj.api.smartcarlife.updateCustomerphotos', data, '')
},
// 技师施工图片审批
technicianApprove(data) {
return post('dj.api.smartcarlife.technician.approve', data, '')
},
// 退款审批列表查询
getRefundReviewListAPI(data) {
return post('dj.api.smartcarlife.refundApplyRecord.waitForAudit.list', data, '')
},
// 日报填报前参数校验
dailyReportCheck(data) {
return post('dj.api.smartcarlife.staff.daily.report.data.check', data, '')
}
}
No preview for this file type
{
"navigationBarTitleText": "招聘详情",
"disableScroll": false,
"usingComponents": {
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-popup": "@vant/weapp/popup/index",
"empty-card": "../components/emptyCard/emptyCard"
}
}
\ No newline at end of file \ No newline at end of file
{
"disableScroll": true,
"navigationBarTitleText": "添加招聘需求",
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-dialog": "@vant/weapp/dialog/index"
}
}
/**index.wxss**/
page {
height: 100vh;
display: flex;
background: #f7f8fa;
}
.scrollarea {
flex: 1;
overflow-y: auto;
}
.container {
padding: 0 var(--fontSize20);
.title {
color: #292d33;
height: var(--fontSize80);
font-size: var(--fontSize28);
text-align: left;
padding: var(--fontSize10);
font-weight: 600;
line-height: var(--fontSize80);
}
.form {
box-sizing: border-box;
min-height: var(--fontSize976);
border-radius: var(--fontSize18);
opacity: 1;
background: #ffffff;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a;
padding: 0 var(--fontSize44);
.form-item {
display: flex;
justify-content: space-between;
height: var(--fontSize104);
align-items: center;
font-size: var(--fontSize28);
.required {
color: #f24724;
text-align: left;
padding-left: var(--fontSize8);
line-height: var(--fontSize40);
position: relative;
top: var(--fontSize4);
box-sizing: border-box;
}
.placeholder {
width: var(--fontSize280);
height: var(--fontSize36);
opacity: 1;
color: #dee0e3;
font-size: var(--fontSize28);
text-align: right;
line-height: var(--fontSize36);
}
.display_value {
width: var(--fontSize320);
height: var(--fontSize36);
color: #323233;
font-size: var(--fontSize28);
text-align: right;
line-height: var(--fontSize36);
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.value {
display: flex;
align-items: center;
switch {
transform: scale(0.67);
transform-origin: 100% 50%;
}
.wx-switch-input {
width: 140rpx !important;
height: 60rpx !important;
background: #dcdfe6 !important;
border-color: #dcdfe6 !important;
border-radius: 30rpx !important;
}
.wx-switch-input::before {
width: 136rpx !important;
height: 56rpx !important;
background: #dcdfe6 !important;
border-radius: 28rpx !important;
}
.wx-switch-input::after {
width: 56rpx !important;
height: 56rpx !important;
border-radius: 28rpx !important;
top: 2rpx !important;
left: 2rpx !important;
}
.wx-switch-input-checked {
background: #347BFF !important;
border-color: #347BFF !important;
}
.wx-switch-input-checked::before {
background: #347BFF !important;
}
.wx-switch-input-checked::after {
transform: translateX(80rpx) !important;
}
}
.arrow_right {
width: var(--fontSize12);
height: var(--fontSize21);
margin-left: var(--fontSize8);
}
.unit {
color: #646566;
font-size: var(--fontSize24);
margin-left: var(--fontSize8);
}
.number-input {
flex: 1;
height: var(--fontSize36);
font-size: var(--fontSize24);
color: #323233;
text-align: right;
border: none;
background: transparent;
}
}
.form-item-textarea {
height: auto;
min-height: var(--fontSize104);
flex-direction: column;
align-items: flex-start;
padding: var(--fontSize24) 0;
.label {
margin-bottom: var(--fontSize20);
}
.textarea-wrapper {
width: 100%;
position: relative;
}
.textarea-input {
width: 100%;
height: var(--fontSize440);
padding: var(--fontSize18) var(--fontSize24);
padding-bottom: var(--fontSize60);
background: #ffffff;
border-radius: var(--fontSize8);
font-size: var(--fontSize28);
color: #323233;
line-height: var(--fontSize36);
box-sizing: border-box;
border: var(--fontSize2) solid #ececec;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
&::-webkit-scrollbar {
width: 0;
height: 0;
display: none;
}
}
.textarea-count {
position: absolute;
right: var(--fontSize16);
bottom: var(--fontSize16);
font-size: var(--fontSize28);
color: #969799;
}
}
}
.footer {
margin-top: var(--fontSize150);
.btn {
margin: 0 auto;
width: var(--fontSize622);
height: var(--fontSize88);
border-radius: var(--fontSize12);
opacity: 1;
background: #347bff;
color: #ffffff;
font-size: var(--fontSize32);
text-align: center;
line-height: var(--fontSize88);
}
}
}
/* popup样式 */
.popup-content {
height: 100%;
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
}
/* 设置popup顶部圆角 */
.van-popup--bottom {
border-radius: var(--fontSize20) var(--fontSize20) 0 0 !important;
overflow: hidden;
}
.popup-fixed-top {
flex: 0 0 auto;
}
.popup-fixed-bottom {
flex: 0 0 auto;
padding: 0 var(--fontSize40);
background: #fff;
padding-top: var(--fontSize20);
}
.popup-scroll-area {
flex: 1;
overflow-y: auto;
padding: 0 var(--fontSize40);
}
.popup-title {
height: var(--fontSize110);
line-height: var(--fontSize110);
font-size: var(--fontSize32);
font-weight: bold;
text-align: center;
border-bottom: var(--fontSize2) solid #E8E8EA;
}
.search-box {
width: var(--fontSize686);
padding: var(--fontSize16) 0;
border-bottom: var(--fontSize2) solid #eff0f2;
margin: 0 var(--fontSize40);
.search-input {
width: 100%;
display: flex;
align-items: center;
height: var(--fontSize72);
background-color: #f5f5f5;
border-radius: var(--fontSize36);
padding: 0 var(--fontSize30);
font-size: var(--fontSize28);
box-sizing: border-box;
position: relative;
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
position: absolute;
left: 45%;
top: 50%;
transform: translate(-100%, -50%);
z-index: 1;
margin-left: calc(var(--fontSize-14) - var(--fontSize28));
}
.input {
flex: 1;
height: 100%;
text-align: center;
background-color: transparent;
color: #333;
font-size: var(--fontSize28);
}
.input-placeholder {
color: #999;
text-align: center;
}
.search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
position: absolute;
right: var(--fontSize30);
top: 50%;
z-index: 999;
transform: translateY(-50%);
}
}
}
.popup-options {
padding: var(--fontSize10) 0;
}
.option-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--fontSize24);
border-bottom: var(--fontSize2) solid #eee;
font-size: var(--fontSize28);
}
.option-item:active {
background-color: #f2f3f5;
}
.option-name {
flex: 1;
}
.option-item.checked .option-name {
color: #1989fa;
}
.option-check {
width: var(--fontSize40);
height: var(--fontSize40);
display: flex;
align-items: center;
justify-content: center;
}
.option-check.checked {
color: #1989fa;
}
.check-icon {
font-size: var(--fontSize32);
}
.empty-tip {
padding: var(--fontSize60) 0;
text-align: center;
color: #999;
font-size: var(--fontSize28);
}
.popup-input {
padding: var(--fontSize20) 0;
}
.popup-input input {
width: 100%;
height: var(--fontSize80);
border: var(--fontSize2) solid #eee;
border-radius: var(--fontSize8);
padding: 0 var(--fontSize20);
box-sizing: border-box;
background-color: chartreuse;
}
.popup-buttons {
display: flex;
justify-content: space-between;
padding-top: var(--fontSize20);
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.cancel-btn,
.confirm-btn {
width: var(--fontSize331);
height: var(--fontSize80);
border-radius: var(--fontSize12);
font-size: var(--fontSize28);
line-height: var(--fontSize80);
display: flex;
align-items: center;
justify-content: center;
}
.cancel-btn {
background-color: #f7f8fa;
color: #323233;
margin-right: var(--fontSize24);
}
.confirm-btn {
background-color: #1989fa;
color: #fff;
}
\ No newline at end of file \ No newline at end of file
<!--index.wxml-->
<view class="scrollarea">
<view class="container">
<view class="title">请完善您的用人需求</view>
<view class="form">
<block wx:for="{{ formList }}" wx:key="index">
<view class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}" bindtap="onFormItemTap" data-index="{{ index }}">
<view class="label">
{{item.label}}
<text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text>
</view>
<view class="value" wx:if="{{ item.label === '是否急招' }}">
<switch checked="{{ switch1Checked }}" bindchange="switch1Change" />
</view>
<view class="value" wx:if="{{ item.label !== '需求描述' && item.label !== '招聘数量' && item.label !== '是否急招' }}">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill" />
</view>
<view class="value" wx:if="{{ item.label === '招聘数量' }}">
<input class="number-input" type="number" placeholder="{{ item.placeholder }}" placeholder-style="color: #DEE0E3;font-size:var(--fontSize28)" value="{{ item.displayValue }}" bindinput="onNumberInput" data-index="{{ index }}" />
<text class="unit">人</text>
</view>
<block wx:if="{{ !showPopup }}">
<view class="textarea-wrapper" wx:if="{{ item.label === '需求描述' }}">
<textarea class="textarea-input" placeholder="{{ item.placeholder }}" placeholder-style="color: #DEE0E3;" value="{{ item.displayValue }}" bindinput="onTextareaInput" data-index="{{ index }}" maxlength="200" disabled="{{ isDialogShowing }}" />
<view class="textarea-count">{{item.textCount || 0}}/200</view>
</view>
</block>
</view>
</block>
</view>
<view class="footer">
<view class="btn" bind:tap="submit">提交</view>
</view>
</view>
</view>
<!-- Vant Popup 组件 -->
<van-popup show="{{ showPopup }}" position="bottom" custom-style="height: 70%" bind:close="onClose">
<view class="popup-content">
<!-- 固定顶部区域 -->
<view class="popup-fixed-top">
<view class="popup-title">选择{{currentItem.label}}</view>
<!-- 搜索框 -->
<view class="search-box" wx:if="{{ currentIndex === 0 }}">
<view class="search-input">
<block wx:if="{{ !keyWord }}">
<image src="/images/search.png" class="search-icon" />
</block>
<input type="text" placeholder="搜索" class="input" confirm-type="search" value="{{ keyWord }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ keyWord }}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
</block>
</view>
</view>
</view>
<!-- 可滚动的中间区域 -->
<view class="popup-scroll-area">
<!-- 选项列表 -->
<view class="popup-options" wx:if="{{ options.length > 0 }}">
<view class="option-item {{ item.checked ? 'checked' : '' }}" wx:for="{{ filteredOptions }}" wx:key="index" bindtap="toggleOption" data-index="{{ index }}" data-value="{{ item.value }}">
<view class="option-name">{{item.text}}</view>
<view class="option-check {{ item.checked ? 'checked' : '' }}">
<text class="check-icon" wx:if="{{ item.checked }}">✓</text>
</view>
</view>
<view class="empty-tip" wx:if="{{ filteredOptions.length === 0 }}">
<text>无匹配结果</text>
</view>
</view>
</view>
<!-- 固定底部区域 -->
<view class="popup-fixed-bottom ">
<view class="popup-buttons">
<view class="cancel-btn" bindtap="onClose">取消</view>
<view class="confirm-btn" bindtap="confirmSelect">确定</view>
</view>
</view>
</view>
</van-popup>
<van-dialog id="van-dialog" width="var(--fontSize622)" custom-style="height: 364px;" confirm-button-color="#347BFF" />
\ No newline at end of file \ No newline at end of file
export const supportTypeList = [
{
confId: 0,
confName: '新店启动'
},
{
confId: 1,
confName: '老店业绩提升-渗透率过低'
},
{
confId: 2,
confName: '老店业绩提升-客单价过低'
}
]
export const statusList = [
{
confId: 0,
confName: '待人事确认'
},
{
confId: 1,
confName: '招聘中'
},
{
confId: 2,
confName: '已完成'
},
{
confId: 3,
confName: '已驳回'
}
]
export const mentorshipFormData = [
{
label: '招聘数量',
name: 'recruitmentQuantity',
labelName: 'recruitmentQuantity',
disabled: true
},
{
label: '业务类型',
name: 'businessTypeName',
labelName: 'businessTypeName',
disabled: true
},
{
label: '招聘类型',
name: 'recruitmentTypeName',
labelName: 'recruitmentTypeName',
disabled: true
}
]
export const formRule = {
supportWay: [{ required: true, message: '支援方式不能为空' }],
storeType: [{ required: true, message: '门店类型不能为空' }],
businessType: [{ required: true, message: '业务类型1不能为空' }],
saleType: [{ required: true, message: '业务类型2不能为空' }],
teachStartTime: [{ required: true, message: '开始带教时间不能为空' }],
problemDescription: [{ required: true, message: '门店现存问题不能为空' }],
solutionDescription: [{ required: true, message: '预估解决方案不能为空' }]
}
export const checkRequired = function (obj, formRule) {
let target = Object.keys(formRule)
console.log(target)
for (let i = 0; i < target.length; i++) {
let attr = target[i]
let item = formRule[attr]
let requirObj = item.find(k => k.required == true)
let validFn = item.find(k => k.validator)
if (requirObj && (obj[attr] ?? '') === '') {
return {
...requirObj,
attr
}
}
if (validFn) {
let validObj = validFn.validator({}, obj[attr])
if (validObj) {
return {
...validObj,
attr
}
}
}
}
return false
}
// export const getConfName = function (dataList, confId) {
// const confIdStr = `${confId}`?.split(',')
// let result = confIdStr?.map(v => {
// const found = dataList?.find(item => item.confId == v)
// return found?.confName
// })
// return result?.length ? result.join(',') : '-'
// }
export const getStatusName = function (status) {
const found = statusList?.find(item => item.confId == status)
return found?.confName || '-'
}
// 获取状态提示文本
export const getStatusTipText = function (item) {
const { status, waitProcessResumeCount, confirmFlag, trialWaitConfirmCount, onboardingWaitConfirmCount } = item
// 待处理提示文案显示逻辑
if (status == 1 && waitProcessResumeCount > 0) {
return `您有${waitProcessResumeCount}份简历待处理,请及时跟进`
} else if (status == 1 && confirmFlag == 'Y' && trialWaitConfirmCount > 0) {
return '您有新的试岗记录,请及时查看'
} else if (status == 1 && confirmFlag == 'Y' && onboardingWaitConfirmCount > 0) {
return '您有新的入职记录,请及时查看'
} else if (status == 2 && confirmFlag == 'Y') {
return '您的招聘需求已完成,请及时查看'
} else if (status == 3 && confirmFlag == 'Y') {
return '您的招聘需求已拒绝,请及时查看'
}
return null
}
import {
mentorshipFormData,
getStatusName,
getStatusTipText
} from './constantData'
import { getRecruitList, waitstaffstateAPI, confiremStaffFlagAPI } from '../api'
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
list: [],
tabList: [],
pageSize: 10,
currentPage: 1,
mentorshipFormData,
triggered: false,
nothing: false,
userInfo: {},
tabIndex: 0,
btnVisible: true, // 按钮是否显示
lastScrollTop: 0, // 上次滚动位置
scrollThreshold: 50, // 滚动阈值(px)
scrollTimer: null // 滚动停止定时器
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let { mentorshipFormData } = this.data
let userInfo = wx.$util.getUserInfo()
this.getWaitstaffstate()
this.search()
// 非区域运营登录,打回到首页
//ll if (userInfo?.loginRole != 3) wx.reLaunch({ url: "/pages/loading/loading" })
if (userInfo?.isSuper) {
let index = mentorshipFormData?.findIndex(
v => v.name == 'flightSupervisorName'
)
this.setData({
mentorshipFormData
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getWaitstaffstate()
this.search()
},
onBottomRefresh() {
this.getList()
},
// 获取招聘任务统计数据
getWaitstaffstate() {
waitstaffstateAPI({}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
tabList: [
`待我处理(${data.waitProcessCount})`,
`全部(${data.totalCount})`
]
})
} else {
// wx.$util.showToast(message)
}
})
},
// 标签切换
tabClick(e) {
this.setData(
{
tabIndex: e.detail,
list: []
},
() => {
this.search()
this.getWaitstaffstate()
}
)
},
// 搜索
search() {
this.setData({
nothing: false,
currentPage: 1
})
this.getList()
},
// 获取列表数据
getList() {
let { tabIndex, pageSize, currentPage, nothing } = this.data
if (nothing) return
wx.showLoading({
title: '加载中'
})
getRecruitList({
pageSize,
pageNum: currentPage,
onlyWaiting: !!!tabIndex // boolean类型转换
}).then(res => {
wx.hideLoading()
if (res.code == '0') {
let { list, pages } = res.data
// 为列表数据添加状态名称和提示文本
list = list.map(item => {
const tipText = getStatusTipText(item)
return {
...item,
statusName: getStatusName(item.status),
showTip: !!tipText, // 是否显示提示
tipText: tipText || '' // 提示文本
}
})
this.setData({
[`list[${currentPage - 1}]`]: list,
currentPage: currentPage + 1,
nothing: currentPage == pages,
triggered: false
})
} else {
this.setData({
list: [],
nothing: false
})
wx.$util.showToast(res.message || '接口异常')
}
})
},
// 跳转详情
handleDetail(e) {
// 节流控制:2秒内只能触发一次
const now = Date.now()
const throttleTime = 2000 // 节流时间:2秒
if (this.lastDetailTime && now - this.lastDetailTime < throttleTime) {
return
}
this.lastDetailTime = now
const { item } = e.currentTarget.dataset
wx.$router.go(
'/packageEquity/pages/recruitManage/recruitDetail/recruitDetail',
{
id: item.id
}
)
//仅已完成/以驳回可以调用flag接口
if (item.status == 0 || item.status == 1) return
confiremStaffFlagAPI({ id: item.id }).then(res => {
let { code } = res
if (code == 0) {
this.getWaitstaffstate()
this.search()
}
})
},
// 跳转添加招聘页面
handleInsertRecruit() {
wx.$router.go(
'/packageEquity/pages/recruitManage/recruitInsert/recruitInsert'
)
},
/**
* 处理滚动事件
* 监听向上滚动时隐藏按钮,滚动停止1秒后重新显示按钮
*/
handleScroll(e) {
const { scrollTop } = e.detail
const { lastScrollTop, scrollThreshold, btnVisible, scrollTimer } =
this.data
// 清除之前的定时器
if (scrollTimer) {
clearTimeout(scrollTimer)
}
// 计算滚动方向和距离
const scrollDistance = Math.abs(scrollTop - lastScrollTop)
// 只有滚动距离超过阈值才触发显隐逻辑,避免频繁切换
if (scrollDistance > scrollThreshold) {
// 向上滑动(scrollTop 增大)- 隐藏按钮
if (scrollTop > lastScrollTop && btnVisible) {
this.setData({
btnVisible: false
})
}
// 向下滑动(scrollTop 减小)- 隐藏按钮
else if (scrollTop < lastScrollTop && btnVisible) {
this.setData({
btnVisible: false
})
}
// 更新上次滚动位置
this.setData({
lastScrollTop: scrollTop
})
}
// 在顶部时始终显示按钮
if (scrollTop <= 0) {
if (!btnVisible) {
this.setData({
btnVisible: true,
lastScrollTop: 0
})
}
return
}
// 设置定时器:滚动停止2秒后显示按钮
const timer = setTimeout(() => {
this.setData({
btnVisible: true
})
}, 1000)
this.setData({
scrollTimer: timer
})
},
// 生命周期函数--监听页面隐藏
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
// 清理定时器
if (this.data.scrollTimer) {
clearTimeout(this.data.scrollTimer)
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
})
{
"navigationBarTitleText": "招聘管理",
"enablePullDownRefresh": false,
"onReachBottomDistance": 50,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/mentorshipManage/mentorshipManage.wxss */
page {
background: #F7F8FA;
height: 100%;
overflow: hidden;
}
.container_page {
height: 100%;
overflow: hidden;
// 顶部Tab模块
.top_content {
background: #FFFFFF;
padding-top: var(--fontSize24);
box-sizing: border-box;
.user_box {
display: flex;
align-items: center;
margin-bottom: var(--fontSize28);
padding: 0 var(--fontSize32);
.user_avatar {
width: var(--fontSize48);
height: var(--fontSize48);
border-radius: 50%;
overflow: hidden;
}
.user_name {
margin-left: var(--fontSize12);
font-weight: 600;
font-size: var(--fontSize32);
color: #292D33;
}
.user_tips {
margin-left: var(--fontSize4);
padding: 0 var(--fontSize8);
height: var(--fontSize36);
font-size: var(--fontSize20);
color: #347BFF;
background: #EAF1FF;
border-radius: var(--fontSize4);
text-align: center;
line-height: var(--fontSize36);
}
}
.tips_box {
height: var(--fontSize56);
background: #FFF5E6;
border-radius: var(--fontSize8);
display: flex;
align-items: center;
padding: 0 var(--fontSize28);
margin: 0 var(--fontSize32) var(--fontSize20) var(--fontSize32);
.tipsIcon {
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize8);
}
.contentText {
font-size: var(--fontSize24);
color: #FF9D0A;
}
}
.tab_box {
margin: 0 var(--fontSize-32);
position: relative;
}
}
// 列表模块
.content {
padding-top: var(--fontSize24);
height: calc(100vh - var(--fontSize120));
box-sizing: border-box;
.list {
height: 100%;
.item {
margin: 0 var(--fontSize20) var(--fontSize24) var(--fontSize20);
border-radius: var(--fontSize16);
background: #ffffff;
box-shadow: 0 var(--fontSize4) var(--fontSize16) 0 #cdcdd180;
padding: var(--fontSize24);
.item_header {
display: flex;
align-items: center;
margin-bottom: var(--fontSize4);
justify-content: space-between;
.ji {
display: inline-block;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.merchant-name {
flex: 1;
min-width: 0;
font-size: var(--fontSize30);
color: #292D33;
font-weight: 600;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: var(--fontSize16);
}
.status-tag {
font-size: var(--fontSize24);
border-radius: var(--fontSize4);
padding: var(--fontSize4) var(--fontSize8);
font-weight: 400;
// 待人事确认 status = 0
&.status-0 {
color: #347bff;
background: #eaf1ff;
}
// 招聘中 status = 1
&.status-1 {
color: #ff9d0a;
background: #fff5e6;
}
// 已完成 status = 2
&.status-2 {
color: #35c376;
background: #eaf9f1;
}
// 已驳回 status = 3
&.status-3 {
color: #f24724;
background: #fdece9;
}
}
.icon {
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: var(--fontSize12);
}
}
.item_content {
box-sizing: border-box;
display: flex;
color: #292D33;
padding-top: var(--fontSize17);
.label {
flex-shrink: 0;
width: var(--fontSize144);
margin-right: var(--fontSize16);
font-size: var(--fontSize28);
color: #999EA8;
}
.value {
word-break: break-all;
font-size: var(--fontSize28);
}
}
.item_footer {
display: flex;
justify-content: flex-end;
align-items: center;
font-size: var(--fontSize24);
color: #9B9B9E;
padding-top: var(--fontSize20);
.msg_tips {
width: var(--fontSize662);
height: var(--fontSize72);
border-radius: var(--fontSize16);
background: #f7f7f7;
color: #292d33;
font-size: var(--fontSize28);
text-align: left;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--fontSize32);
.arrow_right {
width: var(--fontSize12);
height: var(--fontSize21);
}
}
}
}
.super_item {
padding-bottom: var(--fontSize32);
}
}
// 空数据占位
.no_data {
height: 100%;
}
}
// 新增需求按钮
.insert_btn {
display: grid;
place-items: center;
color: #347bff;
width: var(--fontSize136);
height: var(--fontSize136);
font-size: var(--fontSize24);
border-radius: var(--fontSize15);
position: fixed;
-webkit-tap-highlight-color: transparent; //元素默认高亮背景设置
right: var(--fontSize40);
bottom: var(--fontSize468);
background: #ffffffcc;
text-align: center;
box-shadow: 0 var(--fontSize4) var(--fontSize18) 0 #0000001a;
transition: all 0.3s ease-in-out;
.label {
width: var(--fontSize114);
margin-top: -8px;
line-height: var(--fontSize34);
}
.insert_icon {
width: var(--fontSize54);
height: var(--fontSize54);
}
// 显示状态
&.btn-visible {
transform: translateX(0);
opacity: 1;
}
// 隐藏状态 - 向右滑出并淡出
&.btn-hidden {
transform: translateX(calc(100% + var(--fontSize40)));
opacity: 0;
}
}
// 触底提示
.list-nothing {
color: #999ea8;
font-size: var(--fontSize20);
text-align: center;
padding: 0 0 var(--fontSize60) 0;
}
}
.arrowIcon {
position: fixed;
right: 0;
bottom: var(--fontSize468);
width: var(--fontSize36);
height: var(--fontSize136);
background: #FFFFFF;
border: var(--fontSize2) solid #EFF0F2;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a;
border-radius: var(--fontSize16) 0 0 var(--fontSize16);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease-in-out;
// 显示状态 - 从右侧滑入
&.arrow-visible {
transform: translateX(0);
opacity: 1;
}
// 隐藏状态 - 向右滑出
&.arrow-hidden {
transform: translateX(100%);
opacity: 0;
pointer-events: none; // 隐藏时禁止点击
}
.image {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
<!-- 招聘管理 -->
<glsx-privacy appletName="招聘管理" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view class="container_page">
<!-- 顶部Tab模块 -->
<view class="top_content" wx:if="{{ tabList.length }}">
<view class="tab_box">
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ tabIndex }}" />
</view>
</view>
<!-- 列表模块 -->
<view class="content">
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{ true }}"
bindrefresherrefresh="search"
bindscrolltolower="onBottomRefresh"
bindscroll="handleScroll"
class="list"
scroll-top="{{ scrollTop }}"
lower-threshold="400"
refresher-threshold="104"
refresher-triggered="{{ triggered }}"
>
<!-- 需求列表 -->
<block wx:if="{{ list.length && list[0].length }}">
<block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view
wx:for="{{ i }}"
wx:key="index"
class="item {{ userInfo.isSuper ? 'super_item' : '' }}"
bind:tap="handleDetail"
data-item="{{ item }}"
>
<view class="item_header">
<image wx:if="{{ item.urgent == 1 }}" class="ji" src="{{ IMG_URL }}miniProgram/ji.png" mode="aspectFill"></image>
<text class="merchant-name">{{item.merchantName}}</text>
<text class="status-tag status-{{ item.status }}">{{item.statusName}}</text>
</view>
<view class="item_content" wx:for="{{ mentorshipFormData }}" wx:for-item="it" wx:for-index="subInd" wx:key="subInd">
<block>
<view class="label">{{it.label}}</view>
<view class="value">
{{item[it.labelName] || '-'}}
<text wx:if="{{ it.label == '招聘数量' }}">人</text>
</view>
</block>
</view>
<!-- 提示消息 -->
<view class="item_footer" wx:if="{{ tabIndex == 0 && item.showTip && item.confirmFlag == 'N' && item.status !== 0 }}">
<view class="msg_tips">
<text>{{item.tipText}}</text>
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill" />
</view>
</view>
</view>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">没有更多了</view>
</block>
</block>
<!-- 空数据占位 -->
<view class="no_data" wx:else>
<empty-data />
</view>
</scroll-view>
</view>
<!-- 添加招聘按钮 -->
<view class="insert_btn {{ btnVisible ? 'btn-visible' : 'btn-hidden' }}" bindtap="handleInsertRecruit">
<image class="insert_icon" src="/packageEquity/pages/image/recruit-insert.png" mode="widthFix" />
<view class="label">
<text>添加招聘</text>
<text>需求</text>
</view>
</view>
<!-- 箭头图标 - 与按钮互斥显示 -->
<view class="arrowIcon {{ btnVisible ? 'arrow-hidden' : 'arrow-visible' }}">
<image class="image" src="{{ IMG_URL }}upgrade/arrow-left.png" />
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/recruitManage/recruitResult/recruitResult.js
import constantData from '~/pages/constant/data'
Page({
/**
* 页面的初始数据
*/
data: {
sceneType: null, // 当前场景类型
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 获取当前用户的场景类型
const userInfo = wx.$util.getUserInfo()
this.setData({
sceneType: userInfo?.sceneType
})
},
// 继续添加需求
continueAdd() {
wx.$router.reLaunch(`recruitInsert`);
},
// 返回招聘列表
backToList() {
wx.$router.reLaunch(`recruitManage`);
},
// 返回首页
backToHome() {
const { sceneType } = this.data
// 根据场景类型跳转到对应的首页
// 场景类型:0-会员权益/升级,1-精品升级,2-次新车转化,3-售后众筹
const scenePageMap = constantData.pageUrl
const targetPage = scenePageMap[sceneType] || 'tabIndex.index'
wx.$router.reLaunch(targetPage, {});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "提交成功",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/statePage/state.wxss */
.container {
display: flex;
justify-content: center;
height: 100vh;
width: 100%;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
width: 80%;
}
.icon {
width: 200px;
height: 200px;
opacity: 1;
background: #ffffff;
margin-bottom: 30px;
margin-top: var(--fontSize64);
}
.text {
width: 80px;
height: 28px;
opacity: 1;
color: #292d33;
font-size: 20px;
font-weight: 600;
font-family: "PingFang SC", sans-serif;
text-align: center;
margin-bottom: 15px;
}
.sub_text {
font-size: var(--fontSize28);
text-align: center;
margin-bottom: 40px;
width: 90%;
line-height: 1.5;
color: #7a8299;
}
.btn,
.btn-secondary {
width: 261px;
height: 40px;
border-radius: 6px;
opacity: 1;
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
}
.btn {
border: 1px solid #347bff;
background: #347bff;
color: #ffffff;
}
.btn-secondary {
border: 1px solid #f4f5f7;
background: #f4f5f7;
color: #292d33;
}
.back_btn {
color: #347BFF;
font-size: 14px;
padding: 10px;
margin-top: 10px;
}
\ No newline at end of file \ No newline at end of file
<template>
<div class="recruit-result">
<div class="content">
<van-icon name="checked" color="#07c160" size="100" class="icon" />
<div class="text">提交成功</div>
<div class="sub_text">人事同事正在加急处理您的用人需求,请耐心等待,进度可及时关注企微提醒。</div>
<div class="btn" @click="continueAdd">继续添加需求</div>
<div class="btn btn-secondary" @click="backToList">返回招聘列表</div>
<div class="back_btn" @click="backToHome">返回首页</div>
</div>
</div>
</template>
<script>
export default {
name: 'RecruitResult',
data() {
return {
sceneType: null
}
},
created() {
// Mock user info or get from store
// const userInfo = this.$store.getters.userInfo
// this.sceneType = userInfo?.sceneType
},
methods: {
continueAdd() {
this.$router.replace({ name: 'recruitInsert/recruitInsert' })
},
backToList() {
this.$router.replace({ name: 'recruitManage/recruitManage' })
},
backToHome() {
// Logic from original file:
// const scenePageMap = constantData.pageUrl
// const targetPage = scenePageMap[this.sceneType] || 'tabIndex.index'
// For now, just go to root or a default home
this.$router.push('/')
}
}
}
</script>
<style lang="scss" scoped>
.recruit-result {
display: flex;
justify-content: center;
height: 100vh;
width: 100%;
background: #ffffff;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
width: 80%;
padding-top: 64px;
}
.icon {
margin-bottom: 30px;
}
.text {
height: 28px;
color: #292d33;
font-size: 20px;
font-weight: 600;
text-align: center;
margin-bottom: 15px;
}
.sub_text {
font-size: 14px;
text-align: center;
margin-bottom: 40px;
width: 90%;
line-height: 1.5;
color: #7a8299;
}
.btn,
.btn-secondary {
width: 261px;
height: 40px;
border-radius: 6px;
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
cursor: pointer;
}
.btn {
border: 1px solid #347bff;
background: #347bff;
color: #ffffff;
}
.btn-secondary {
border: 1px solid #f4f5f7;
background: #f4f5f7;
color: #292d33;
}
.back_btn {
color: #347bff;
font-size: 14px;
padding: 10px;
margin-top: 10px;
cursor: pointer;
}
</style>
<!--index.wxml-->
<view class="container">
<view class="content">
<image class="icon" src="/packageEquity/pages/image/success-icon.png" mode="aspectFill"/>
<view class="text">提交成功</view>
<view class="sub_text">人事同事正在加急处理您的用人需求,请耐心等待,进度可及时关注企微提醒。</view>
<view class="btn" bind:tap="continueAdd">继续添加需求</view>
<view class="btn btn-secondary" bind:tap="backToList">返回招聘列表</view>
<view class="back_btn" bind:tap="backToHome">返回首页</view>
</view>
</view>
<template>
<div class="recruitment-review">
<div class="content">
<div class="info-list">
<div class="info-item">
<span class="label">门店名称</span>
<div class="value">
{{ detail.merchantName || '--' }}
<img v-if="detail.urgent === 1" class="ji" :src="`${IMG_URL}miniProgram/ji.png`" />
</div>
</div>
<div class="info-item">
<span class="label">近一月新车销量</span>
<div class="value">400</div>
</div>
<div class="info-item">
<span class="label">主营品牌</span>
<div class="value">鸿蒙智行/比亚迪</div>
</div>
<div class="info-item">
<span class="label">门店地址</span>
<div class="value">广东省深圳市深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层</div>
</div>
<div class="info-item">
<span class="label">业务类型</span>
<div class="value">{{ detail.businessTypeName || '--' }}</div>
</div>
<div class="info-item">
<span class="label">招聘类型</span>
<div class="value">{{ detail.recruitmentTypeName || '--' }}</div>
</div>
<div class="info-item">
<span class="label">招聘数量</span>
<div class="value">6</div>
</div>
<div class="info-item">
<span class="label">区域运营</span>
<div class="value">罗敏</div>
</div>
<div class="info-item">
<span class="label">需求描述</span>
<div class="value">{{ detail.requirementDescription || '--' }}</div>
</div>
<div class="info-item">
<span class="label">招聘负责人</span>
<div class="value flex-center">
{{ detail.recruiterName || '--' }}
<a v-if="detail.recruiterPhone" :href="'tel:' + detail.recruiterPhone" class="phone-icon-wrapper">
<!-- <van-icon name="phone-o" /> -->
<img class="phone_icon" src="../image/call-icon.png" />
</a>
</div>
</div>
<div class="info-item">
<span class="label">技术督导</span>
<div class="value flex-center">
{{ detail.technicalSupervisorName || '--' }}
<a v-if="detail.technicalSupervisorPhone" :href="'tel:' + detail.technicalSupervisorPhone" class="phone-icon-wrapper">
<!-- <van-icon name="phone-o" /> -->
<img class="phone_icon" src="../image/call-icon.png" />
</a>
</div>
</div>
<div class="info-item">
<span class="label">申请时间</span>
<div class="value">{{ detail.createdDate || '--' }}</div>
</div>
</div>
</div>
<div class="footer-btns">
<van-button class="btn reject-btn" @click="handleReject">驳回</van-button>
<van-button class="btn confirm-btn" type="primary" @click="handleConfirm">确认</van-button>
</div>
<!-- 驳回弹窗 -->
<van-dialog v-model:show="showRejectDialog" title="驳回" :show-confirm-button="false" :show-cancel-button="false" class="reject-dialog">
<div class="dialog-content">
<div class="dialog-label">
驳回原因
<span class="required">*</span>
</div>
<div class="textarea-wrapper">
<textarea v-model="rejectReason" class="custom-textarea" placeholder="请输入驳回原因" maxlength="200"></textarea>
<div class="char-count">{{ rejectReason.length }}/200</div>
</div>
<div class="dialog-tip">说明:驳回后,无法再进行招聘事项。</div>
</div>
<div class="dialog-footer">
<div class="dialog-btn cancel" @click="showRejectDialog = false">取消</div>
<div class="dialog-btn confirm" @click="confirmReject">确定</div>
</div>
</van-dialog>
</div>
</template>
<script>
import api from '../api'
import { Toast, Dialog } from 'vant'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
export default {
name: 'RecruitmentReview',
data() {
return {
IMG_URL,
detail: {},
showRejectDialog: false,
rejectReason: ''
}
},
created() {
this.fetchDetail()
},
methods: {
async fetchDetail() {
const id = this.$route.query.id
if (!id) {
Toast('参数错误')
return
}
try {
const res = await api.getRecruitDetailAPI({ id })
// if (res.code === 200) {
this.detail = res?.recruitment || {}
// } else {
// Toast(res.msg || '获取详情失败')
// }
} catch (error) {
console.error(error)
Toast('网络错误')
}
},
handleReject() {
this.rejectReason = ''
this.showRejectDialog = true
},
async confirmReject() {
if (!this.rejectReason) {
Toast('请输入驳回原因')
return
}
try {
await api.updateDemandStatusAPI({
id: this.detail.id || this.$route.query.id,
status: 3, // 3-已驳回
recallReason: this.rejectReason
})
Toast.success('已驳回')
this.showRejectDialog = false
this.$router.back()
} catch (error) {
console.error(error)
}
},
async handleConfirm() {
// Dialog.confirm({
// title: '提示',
// message: '确认通过该招聘需求吗?'
// })
// .then(async () => {
// try {
// await
const res = await api.updateDemandStatusAPI({
id: this.detail.id || this.$route.query.id,
status: 1 // 1-招聘中
})
Toast.success('已确认')
this.$router.back()
// }
// catch (error) {
// console.error(error)
// }
// })
// .catch(() => {
// // on cancel
// })
}
}
}
</script>
<style lang="scss" scoped>
.recruitment-review {
min-height: 100vh;
background: #fff;
padding-bottom: 80px; /* Space for footer */
display: flex;
flex-direction: column;
.content {
padding: 20px 16px;
flex: 1;
}
.info-list {
.info-item {
display: flex;
justify-content: space-between;
margin-bottom: 24px;
font-size: 14px;
line-height: 1.5;
.label {
color: #999;
width: 100px; /* Fixed width for labels to align */
flex-shrink: 0;
}
.value {
color: #333;
text-align: right;
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
flex-wrap: wrap;
word-break: break-all;
}
.ji {
display: inline-block;
width: 16px;
height: 16px;
margin-left: 5px;
}
}
}
.flex-center {
display: flex;
align-items: center;
justify-content: flex-end;
}
.phone-icon-wrapper {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
// border: 1px dashed #999;
border-radius: 4px;
// margin-left: 8px;
color: #333;
}
.footer-btns {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 70px;
// background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
// box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
z-index: 100;
.btn {
width: 48%;
height: 40px;
border-radius: 4px;
font-size: 16px;
}
.reject-btn {
background: #f5f5f5;
color: #333;
border: none;
}
.confirm-btn {
background: #3b87ff; /* Blue color matching design typically */
border: none;
}
}
/* Custom Dialog Styles */
::v-deep .reject-dialog {
width: 90%;
max-width: 320px;
border-radius: 8px;
.van-dialog__header {
padding-top: 20px;
font-weight: 500;
font-size: 18px;
}
.dialog-content {
padding: 16px 20px;
.dialog-label {
font-size: 14px;
color: #333;
margin-bottom: 8px;
.required {
color: #ff4d4f;
margin-left: 4px;
}
}
.textarea-wrapper {
position: relative;
border: 1px solid #ebedf0;
border-radius: 4px;
padding: 8px;
background: #fff;
.custom-textarea {
width: 100%;
height: 120px;
border: none;
resize: none;
font-size: 14px;
color: #333;
padding: 0;
&::placeholder {
color: #c8c9cc;
}
&:focus {
outline: none;
}
}
.char-count {
text-align: right;
font-size: 12px;
color: #969799;
margin-top: 4px;
}
}
.dialog-tip {
font-size: 12px;
color: #999;
margin-top: 8px;
line-height: 1.5;
}
}
.dialog-footer {
display: flex;
justify-content: space-between;
padding: 0 20px 20px;
.dialog-btn {
flex: 1;
height: 40px;
line-height: 40px;
text-align: center;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
&.cancel {
background: #f5f5f5;
color: #333;
margin-right: 12px;
}
&.confirm {
background: #3b87ff;
color: #fff;
}
}
}
}
}
.phone_icon {
display: inline-block;
width: 20px;
height: 20px;
// margin-left: 5px;
vertical-align: middle;
}
</style>
...@@ -4,9 +4,9 @@ const defaultSettings = require('./src/config/conf.js') ...@@ -4,9 +4,9 @@ const defaultSettings = require('./src/config/conf.js')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
// page title // page title
const name = defaultSettings.title || '登录中...' const name = defaultSettings.title || '登录中...'
// 生产环境,测试和正式 // 生产环境,测试和正式
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV) const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
/** /**
...@@ -16,14 +16,17 @@ const SpritesmithPlugin = require('webpack-spritesmith') ...@@ -16,14 +16,17 @@ const SpritesmithPlugin = require('webpack-spritesmith')
const spritesmithFunction = data => { const spritesmithFunction = data => {
let { spritesheet, sprites } = data let { spritesheet, sprites } = data
let shared = `.sprite-icon { background-image: url(${data.sprites[0].image});background-size: ${spritesheet.width / 2}px ${spritesheet.height / 2}px;}` let shared = `.sprite-icon { background-image: url(${data.sprites[0].image});background-size: ${spritesheet.width / 2}px ${spritesheet.height / 2}px;}`
let perSprite = sprites.map(sprite => { let perSprite = sprites
.map(sprite => {
let { name, width, height, offset_x, offset_y } = sprite let { name, width, height, offset_x, offset_y } = sprite
return `.icon-${name} { width: ${width / 2}px; height: ${height / 2}px; background-position: ${offset_x / 2}px ${offset_y / 2}px;}` return `.icon-${name} { width: ${width / 2}px; height: ${height / 2}px; background-position: ${offset_x / 2}px ${offset_y / 2}px;}`
}).join('\n') })
.join('\n')
return `${shared}\n${perSprite}` return `${shared}\n${perSprite}`
} }
module.exports = { module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-lwk/', // 署应用包时的基本 URL。 vue-router hash 模式使用 // publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-zhangls/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-lwk/', // 署应用包时的基本 URL。 vue-router hash 模式使用 // publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-lwk/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: '/dj-scrm-wx-work-main/', // 署应用包时的基本 URL。 vue-router history模式使用 微信开发环境需打开 // publicPath: '/dj-scrm-wx-work-main/', // 署应用包时的基本 URL。 vue-router history模式使用 微信开发环境需打开
outputDir: 'dist', // 生产环境构建文件的目录 outputDir: 'dist', // 生产环境构建文件的目录
...@@ -33,9 +36,11 @@ module.exports = { ...@@ -33,9 +36,11 @@ module.exports = {
devServer: { devServer: {
disableHostCheck: true, disableHostCheck: true,
// port: 9527, // 端口 dj-scrm-wx-work-lwk // port: 9527, // 端口 dj-scrm-wx-work-lwk
port: 9528, // 端口 dj-scrm-wx-work-main-lwk
// port: 9528, // 端口 dj-scrm-wx-work-main-lwk
open: false, // 启动后打开浏览器. open: false, // 启动后打开浏览器.
public:'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main-lwk/#/',
// public: 'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main-zhangls/#/',
overlay: { overlay: {
// 当出现编译器错误或警告时,在浏览器中显示全屏覆盖层 // 当出现编译器错误或警告时,在浏览器中显示全屏覆盖层
warnings: false, warnings: false,
...@@ -81,13 +86,16 @@ module.exports = { ...@@ -81,13 +86,16 @@ module.exports = {
image: path.resolve(__dirname, './src/assets/images/sprite.png'), image: path.resolve(__dirname, './src/assets/images/sprite.png'),
// 生成SCSS // 生成SCSS
css: [ css: [
[path.resolve(__dirname, './src/assets/css/sprite.scss'), { [
path.resolve(__dirname, './src/assets/css/sprite.scss'),
{
format: 'function_based_template' format: 'function_based_template'
}] }
]
] ]
}, },
customTemplates: { customTemplates: {
'function_based_template': spritesmithFunction, function_based_template: spritesmithFunction
}, },
//background引用路径 //background引用路径
apiOptions: { apiOptions: {
...@@ -137,9 +145,11 @@ module.exports = { ...@@ -137,9 +145,11 @@ module.exports = {
* 打包分析 * 打包分析
*/ */
if (IS_PROD) { if (IS_PROD) {
config.plugin('webpack-report').use(BundleAnalyzerPlugin, [{ config.plugin('webpack-report').use(BundleAnalyzerPlugin, [
{
analyzerMode: 'static' analyzerMode: 'static'
}]) }
])
} }
config config
// https://webpack.js.org/configuration/devtool/#development // https://webpack.js.org/configuration/devtool/#development
...@@ -149,10 +159,12 @@ module.exports = { ...@@ -149,10 +159,12 @@ module.exports = {
config config
.plugin('ScriptExtHtmlWebpackPlugin') .plugin('ScriptExtHtmlWebpackPlugin')
.after('html') .after('html')
.use('script-ext-html-webpack-plugin', [{ .use('script-ext-html-webpack-plugin', [
{
// 将 runtime 作为内联引入不单独存在 // 将 runtime 作为内联引入不单独存在
inline: /runtime\..*\.js$/ inline: /runtime\..*\.js$/
}]) }
])
.end() .end()
config.optimization.splitChunks({ config.optimization.splitChunks({
chunks: 'all', chunks: 'all',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!