Commit 2e86390c by wangzhihui

招聘管理

1 parent 6f68c1b3
...@@ -11,6 +11,16 @@ module.exports = { ...@@ -11,6 +11,16 @@ module.exports = {
'/rop-dj-staff-miniprogram/router' '/rop-dj-staff-miniprogram/router'
) )
}, },
// 获取主营品牌列表
getCarBrandList(data = {}) {
return api.post(
"scrm.api.carlife.common.getOnlyCarBrandList",
data,
[],
"/rop-scrm-carlife/router",
"scrm"
);
},
// 获取招聘管理详情 // 获取招聘管理详情
getRecruitDetailAPI(data) { getRecruitDetailAPI(data) {
return api.post( return api.post(
...@@ -73,7 +83,37 @@ module.exports = { ...@@ -73,7 +83,37 @@ module.exports = {
[], [],
'/rop-dj-staff-miniprogram/router' '/rop-dj-staff-miniprogram/router'
) )
}, },
// 新增试岗计划
addTrialPlanAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.trial.onboarding.add',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 编辑试岗计划
updateTrialPlanAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.trial.onboarding.edit',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 删除试岗计划
deleteTrialPlanAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.trial.onboarding.delete',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 获取带教任务数量 // 获取带教任务数量
getMentorShipTaskNum(data) { getMentorShipTaskNum(data) {
return api.post( return api.post(
......
// packageWorkspace/pages/recruitManage/pages/recruitDetail/recruitDetail.js // packageWorkspace/pages/recruitManage/pages/recruitDetail/recruitDetail.js
import { unix } from 'dayjs' import { unix } from 'dayjs'
import { getRecruitDetailAPI, processResumeAPI } from '../api' import { getRecruitDetailAPI, processResumeAPI, getStaffDictListAPI, addTrialPlanAPI, updateTrialPlanAPI, deleteTrialPlanAPI } from '../api'
const IMG_URL = const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/' 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
// 统计列表配置映射 // 统计列表配置映射
...@@ -30,15 +30,18 @@ const TAGLIST = [ ...@@ -30,15 +30,18 @@ const TAGLIST = [
// 招聘信息字段配置 // 招聘信息字段配置
const RECRUITMENT_INFO_CONFIG = [ const RECRUITMENT_INFO_CONFIG = [
{ label: '门店名称', field: 'merchantName' }, { label: '门店名称', field: 'merchantName' },
{ label: '业务类型', field: 'businessTypeName' }, { label: '近一月新车销量', field: 'salesVolume' },
{ label: '招聘类型', field: 'recruitmentTypeName' }, { label: '主营品牌', field: 'brand' },
{ label: '招聘负责人', field: 'recruiterName' }, { label: '门店地址', field: 'merchantAddress' },
{ label: '技术督导', field: 'technicalSupervisorName' }, { label: '业务类型', field: 'businessTypeName' },
{ label: '申请时间', field: 'createdDate' }, { label: '招聘类型', field: 'recruitmentTypeName' },
{ label: '需求描述', field: 'requirementDescription' }, { label: '需求描述', field: 'requirementDescription' },
{ label: '拒绝理由', field: 'recallReason' } { label: '招聘负责人', field: 'recruiterName' },
] { label: '技术督导', field: 'technicalSupervisorName' },
{ label: '申请时间', field: 'createdDate' },
{ label: '拒绝理由', field: 'recallReason' }
]
// 招聘状态映射配置 // 招聘状态映射配置
const RECRUIT_STATUS_CONFIG = { const RECRUIT_STATUS_CONFIG = {
...@@ -91,7 +94,26 @@ Page({ ...@@ -91,7 +94,26 @@ Page({
detailLoaded: false, // 标识是否已加载详情 detailLoaded: false, // 标识是否已加载详情
curDataId: '', curDataId: '',
isProcessing: false, // 是否正在处理中,防止重复提交 isProcessing: false, // 是否正在处理中,防止重复提交
pageScrollTop: 0, // 保存页面滚动位置 pageScrollTop: 0, // 保存页面滚动位置
// 试岗相关
showTrialPopup: false,
trialPopupType: 'add',
trialFormData: {
personName: '',
phoneNumber: '',
channelType: '',
channelName: '',
trialTime: '',
displayTrialTime: ''
},
channelOptions: [],
showChannelPopup: false,
tempChannelType: '',
tempChannelName: '',
trialTimeShow: false,
trialCurrentDate: new Date().getTime(),
isProcessingTrial: false,
// 时间选择器列表子项展示-格式化处理 // 时间选择器列表子项展示-格式化处理
formatter(type, value) { formatter(type, value) {
if (type === 'year') { if (type === 'year') {
...@@ -405,6 +427,27 @@ Page({ ...@@ -405,6 +427,27 @@ Page({
}) })
.catch(err => {}) .catch(err => {})
}, },
/*转试岗*/
handleTrial(e){
let { id } = e.currentTarget.dataset
// 查找对应的数据项
const item = this.data.recruitmentPlans.find(i => i.id === id)
if (!item) return
this.getChannelOptions();
this.setData({
showTrialPopup: true,
trialPopupType: 'add',
trialFormData: {
personName: item.personName || '',
phoneNumber: item.phoneNumber || '',
channelType: item.channelType || '',
channelName: item.channelName || '',
trialTime: '',
displayTrialTime: ''
},
trialCurrentDate: new Date().getTime()
})
},
/** /**
* 处理按钮点击 * 处理按钮点击
*/ */
...@@ -676,6 +719,195 @@ Page({ ...@@ -676,6 +719,195 @@ Page({
}) })
} }
}, },
// --- 试岗相关方法 ---
showTrialTimePicker() {
this.setData({
trialTimeShow: true
})
},
cancelTrialDate() {
this.setData({
trialTimeShow: false
})
},
onTrialInput(event) {
this.setData({
trialCurrentDate: event.detail
})
},
bindTrialDateChange(event) {
const timestamp = event.detail
const dateStr = this.formatDate(timestamp)
this.setData({
'trialFormData.trialTime': timestamp,
'trialFormData.displayTrialTime': dateStr,
trialTimeShow: false,
trialCurrentDate: timestamp
})
},
// 获取招聘渠道字典
getChannelOptions() {
if (this.data.channelOptions.length > 0) return;
getStaffDictListAPI({
businessCode: "recruitment",
typeCode: "recruitment_channel"
}).then(res => {
if (res.code == 0 && res.data) {
const options = res.data.map(item => ({
text: item.itemName,
value: item.itemValue
}))
this.setData({ channelOptions: options })
}
})
},
// 显示试岗弹窗
showTrialPopup(e) {
const type = e.currentTarget.dataset.type;
this.getChannelOptions();
if (type === 'add') {
this.setData({
showTrialPopup: true,
trialPopupType: 'add',
trialFormData: {
personName: '',
phoneNumber: '',
channelType: '',
channelName: '',
trialTime: '',
displayTrialTime: ''
},
trialCurrentDate: new Date().getTime()
})
} else {
const item = e.currentTarget.dataset.item;
this.setData({
showTrialPopup: true,
trialPopupType: 'edit',
trialFormData: {
id: item.id,
personName: item.personName || '',
phoneNumber: item.phoneNumber || '',
channelType: item.channelType || '',
channelName: item.channelName || '',
trialTime: item.trialTime || '',
displayTrialTime: item.onboardingDate || ''
},
trialCurrentDate: item.trialTime ? new Date(item.trialTime).getTime() : new Date().getTime()
})
}
},
hideTrialPopup() {
this.setData({ showTrialPopup: false })
},
handleTrialInput(e) {
const field = e.currentTarget.dataset.field;
const value = e.detail.value;
this.setData({
[`trialFormData.${field}`]: value
})
},
showChannelPicker() {
this.setData({
showChannelPopup: true,
tempChannelType: this.data.trialFormData.channelType,
tempChannelName: this.data.trialFormData.channelName
})
},
hideChannelPicker() {
this.setData({
showChannelPopup: false
})
},
toggleChannelOption(e) {
const { value, name } = e.currentTarget.dataset;
this.setData({
tempChannelType: value,
tempChannelName: name
})
},
confirmChannelSelect() {
this.setData({
'trialFormData.channelType': this.data.tempChannelType,
'trialFormData.channelName': this.data.tempChannelName,
showChannelPopup: false
})
},
// 提交试岗表单
confirmTrialProcess() {
if (this.data.isProcessingTrial) return;
const { trialFormData, trialPopupType } = this.data;
console.log(trialFormData,'trialFormData')
if (!trialFormData.personName.trim()) {
return wx.showToast({ title: '请输入人员姓名', icon: 'none' })
}
if (!/^1\d{10}$/.test(trialFormData.phoneNumber)) {
return wx.showToast({ title: '请输入正确的11位手机号', icon: 'none' })
}
if (!trialFormData.channelType) {
return wx.showToast({ title: '请选择招聘渠道', icon: 'none' })
}
if (!trialFormData.trialTime) {
return wx.showToast({ title: '请选择试岗时间', icon: 'none' })
}
this.setData({ isProcessingTrial: true })
const params = {
demandId: this.curDataId,
personName:trialFormData.personName,
phoneNumber:trialFormData.phoneNumber,
trialTime:trialFormData.displayTrialTime,
channelType:trialFormData.channelType,
channelName:trialFormData.channelName
}
if(trialPopupType === 'edit') params.id = trialFormData.id
const apiFunc = trialPopupType === 'add' ? addTrialPlanAPI : updateTrialPlanAPI;
apiFunc(params).then(res => {
this.setData({ isProcessingTrial: false })
if (res.code == 0) {
wx.showToast({ title: '保存成功', icon: 'success' })
this.hideTrialPopup()
this.getDetail(this.curDataId)
} else {
wx.showToast({ title: res.message || '保存失败', icon: 'none' })
}
}).catch(() => {
this.setData({ isProcessingTrial: false })
wx.showToast({ title: '保存失败', icon: 'none' })
})
},
// 删除试岗计划
deleteTrialPlan(e) {
const id = e.currentTarget.dataset.id;
wx.showModal({
title: '提示',
content: '确认删除该试岗计划吗?',
success: (res) => {
if (res.confirm) {
deleteTrialPlanAPI({ id }).then(res => {
if (res.code == 0) {
wx.showToast({ title: '删除成功', icon: 'success' })
this.getDetail(this.curDataId)
} else {
wx.showToast({ title: res.message || '删除失败', icon: 'none' })
}
})
}
}
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
"disableScroll": false, "disableScroll": false,
"usingComponents": { "usingComponents": {
"van-datetime-picker": "@vant/weapp/datetime-picker/index", "van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"van-icon": "@vant/weapp/icon/index",
"empty-card": "../components/emptyCard/emptyCard" "empty-card": "../components/emptyCard/emptyCard"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -214,7 +214,8 @@ page { ...@@ -214,7 +214,8 @@ page {
.user_bottom { .user_bottom {
display: flex; display: flex;
gap: var(--fontSize8); gap: var(--fontSize8);
align-items: center; align-items: center;
justify-content: space-between;
margin-top: var(--fontSize8); // 推到底部 margin-top: var(--fontSize8); // 推到底部
.tag { .tag {
...@@ -257,6 +258,41 @@ page { ...@@ -257,6 +258,41 @@ page {
// 入职计划模块 // 入职计划模块
.entry_plan { .entry_plan {
.btn_add_trial {
color: #347bff;
font-size: 26rpx;
padding: 8rpx 12rpx;
border-radius: 4rpx;
opacity: 1;
border: 2rpx solid #ccdbff;
background: #e6edff;
}
.card_actions {
display: flex;
justify-content: space-between;
gap: 16rpx;
margin-top: 20rpx;
.btn {
flex: 1;
border-radius: 532rpx;
padding: 12rpx 0;
font-size: 26rpx;
line-height: 36rpx;
text-align: center;
}
.btn_edit {
color: #ffffff;
background: #347bff;
}
.btn_delete {
color: #347bff;
background: #347bff1a;
}
}
.card_content { .card_content {
.item { .item {
display: flex; display: flex;
...@@ -659,4 +695,115 @@ page { ...@@ -659,4 +695,115 @@ page {
padding-top: var(--fontSize36) !important; padding-top: var(--fontSize36) !important;
} }
} }
}
\ No newline at end of file \ No newline at end of file
}
/* 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;
}
.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);
}
.popup-buttons {
display: flex;
justify-content: space-between;
padding-top: var(--fontSize20);
}
.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;
}
...@@ -56,7 +56,12 @@ ...@@ -56,7 +56,12 @@
</view> </view>
<!-- 试岗计划 --> <!-- 试岗计划 -->
<view class="entry_plan"> <view class="entry_plan">
<view class="block_title">试岗计划</view> <view class="block_title" style="display: flex; justify-content: space-between; align-items: center;">
<text>试岗计划</text>
<view class="btn_add_trial" bindtap="showTrialPopup" data-type="add" style="color: #347bff; font-size: 26rpx; font-weight: normal; display: flex; align-items: center;">
<van-icon name="plus" style="margin-right: 4rpx;" /> 添加试岗
</view>
</view>
<block wx:if="{{ trialOnboardingPlans.length }}"> <block wx:if="{{ trialOnboardingPlans.length }}">
<block wx:for="{{ trialOnboardingPlans }}" wx:key="index"> <block wx:for="{{ trialOnboardingPlans }}" wx:key="index">
<view class="card"> <view class="card">
...@@ -75,6 +80,10 @@ ...@@ -75,6 +80,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="card_actions">
<view class="btn btn_delete" bindtap="deleteTrialPlan" data-id="{{item.id}}">删除</view>
<view class="btn btn_edit" bindtap="showTrialPopup" data-type="edit" data-item="{{item}}">编辑</view>
</view>
</view> </view>
</block> </block>
</block> </block>
...@@ -111,6 +120,10 @@ ...@@ -111,6 +120,10 @@
<text class="phone_text">{{item.phoneNumber}}</text> <text class="phone_text">{{item.phoneNumber}}</text>
<image class="phone_icon" src="/packageWorkspace/pages/image/call-icon.png" mode="widthFix" /> <image class="phone_icon" src="/packageWorkspace/pages/image/call-icon.png" mode="widthFix" />
</view> </view>
<view class="date">
<text style="margin-right: var(--fontSize8);">投递于</text>
{{item.createdDate}}
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -132,12 +145,10 @@ ...@@ -132,12 +145,10 @@
</view> </view>
</view> </view>
<view class="card_content"> <view class="card_content">
<view class="date">
<text style="margin-right: var(--fontSize8);">投递于</text>
{{item.createdDate}}
</view>
<view class="btn_group"> <view class="btn_group">
<view class="btn btn_outline" bindtap="handleViewResume" data-url="{{ item.resumeUrl }}">查看简历</view> <view class="btn btn_outline" bindtap="handleViewResume" data-url="{{ item.resumeUrl }}">查看简历</view>
<view wx:if="{{ item.processResult}}" class="btn btn_primary" bindtap="handleTrial" data-id="{{ item.id }}">转试岗</view>
<view <view
wx:if="{{ item.processResult == null || (item.processResult == 2 && item.interviewResult == null) }}" wx:if="{{ item.processResult == null || (item.processResult == 2 && item.interviewResult == null) }}"
class="btn btn_primary" class="btn btn_primary"
...@@ -193,7 +204,9 @@ ...@@ -193,7 +204,9 @@
</block> </block>
</view> </view>
</view> </view>
<edit-popup wx:if="{{ handleShowMessagePop }}" formData="{{ formData }}" bindconfirm="updateMentorShip" bindcancel="hidePopup"></edit-popup>
</view>
<edit-popup wx:if="{{ handleShowMessagePop }}" formData="{{ formData }}" bindconfirm="updateMentorShip" bindcancel="hidePopup"></edit-popup>
<van-popup <van-popup
show="{{ showPopup }}" show="{{ showPopup }}"
position="bottom" position="bottom"
...@@ -303,4 +316,88 @@ ...@@ -303,4 +316,88 @@
bind:cancel="calcelDate" bind:cancel="calcelDate"
/> />
</van-popup> </van-popup>
</view>
\ No newline at end of file \ No newline at end of file
<!-- 试岗表单弹窗 -->
<van-popup show="{{ showTrialPopup }}" position="bottom" bind:close="hideTrialPopup" close-on-click-overlay="{{ false }}" custom-style="height: 80%; background-color: #f7f8fa; border-radius: 24rpx 24rpx 0 0; display: flex; flex-direction: column;" z-index="9999">
<view class="popup_content" style="flex: 1; display: flex; flex-direction: column; overflow: hidden; height: 100%;">
<view class="title">{{ trialPopupType === 'add' ? '新增试岗' : '编辑试岗' }}</view>
<scroll-view scroll-y class="form" style="flex: 1; overflow-y: auto;">
<view style="background: #ffffff; border-radius: 16rpx; padding: 0 20rpx;">
<view class="form_item">
<view class="label">
人员姓名
<text class="required">*</text>
</view>
<view class="value">
<input placeholder="请输入人员姓名" value="{{ trialFormData.personName }}" bindinput="handleTrialInput" data-field="personName" maxlength="20" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)"/>
</view>
</view>
<view class="form_item">
<view class="label">
手机号
<text class="required">*</text>
</view>
<view class="value">
<input placeholder="请输入手机号" value="{{ trialFormData.phoneNumber }}" bindinput="handleTrialInput" data-field="phoneNumber" type="number" maxlength="11" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)"/>
</view>
</view>
<view class="form_item">
<view class="label">
招聘渠道
<text class="required">*</text>
</view>
<view class="value" catchtap="showChannelPicker">
<view class="{{ trialFormData.channelName ? 'time_text' : 'placeholder_text' }}">{{ trialFormData.channelName || '请选择招聘渠道'}}</view>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
</view>
</view>
<view class="form_item">
<view class="label">
试岗时间
<text class="required">*</text>
</view>
<view class="value" catchtap="showTrialTimePicker">
<view class="{{ trialFormData.displayTrialTime ? 'time_text' : 'placeholder_text' }}">{{ trialFormData.displayTrialTime || '请选择试岗时间'}}</view>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
</view>
</view>
</view>
</scroll-view>
<view class="popup_footer" style="padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);">
<view class="btn btn_cancel" bindtap="hideTrialPopup">取消</view>
<view class="btn btn_confirm" bindtap="confirmTrialProcess">确认</view>
</view>
</view>
</van-popup>
<!-- 试岗时间选择器 -->
<van-popup show="{{ trialTimeShow }}" position="bottom" bind:close="cancelTrialDate" close-on-click-overlay="{{ true }}" z-index="10000" round catchtouchmove="preventTouchMove">
<van-datetime-picker type="date" bind:input="onTrialInput" bind:cancel="cancelTrialDate" value="{{ trialCurrentDate }}" formatter="{{ formatter }}" bind:confirm="bindTrialDateChange" />
</van-popup>
<!-- 招聘渠道选择弹窗 -->
<van-popup show="{{ showChannelPopup }}" position="bottom" custom-style="height: 70%" bind:close="hideChannelPicker" z-index="10000">
<view class="popup-content">
<!-- 固定顶部区域 -->
<view class="popup-fixed-top">
<view class="popup-title">选择招聘渠道</view>
</view>
<!-- 可滚动的中间区域 -->
<view class="popup-scroll-area">
<!-- 选项列表 -->
<view class="popup-options" wx:if="{{ channelOptions.length > 0 }}">
<view class="option-item {{ tempChannelType == item.value ? 'checked' : '' }}" wx:for="{{ channelOptions }}" wx:key="value" bindtap="toggleChannelOption" data-value="{{ item.value }}" data-name="{{ item.text }}">
<view class="option-name">{{item.text}}</view>
<view class="option-check {{ tempChannelType == item.value ? 'checked' : '' }}">
<text class="check-icon" wx:if="{{ tempChannelType == item.value }}">✓</text>
</view>
</view>
</view>
</view>
<!-- 固定底部区域 -->
<view class="popup-fixed-bottom" style="padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);">
<view class="popup-buttons">
<view class="cancel-btn" bindtap="hideChannelPicker">取消</view>
<view class="confirm-btn" bindtap="confirmChannelSelect">确定</view>
</view>
</view>
</view>
</van-popup>
\ No newline at end of file \ No newline at end of file
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
"disableScroll": true, "disableScroll": true,
"navigationBarTitleText": "添加招聘需求", "navigationBarTitleText": "添加招聘需求",
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -20,9 +20,46 @@ page { ...@@ -20,9 +20,46 @@ page {
text-align: left; text-align: left;
padding: var(--fontSize10); padding: var(--fontSize10);
font-weight: 600; font-weight: 600;
line-height: var(--fontSize80); line-height: var(--fontSize80);
display: flex;
align-items: center;
justify-content: space-between;
} }
.checkbox-wrapper {
padding: var(--fontSize20) 0;
display: flex;
justify-content: flex-end;
border-bottom: var(--fontSize2) solid #f5f5f5;
.checkbox-item {
display: flex;
align-items: center;
.checkbox {
width: var(--fontSize28);
height: var(--fontSize28);
border: var(--fontSize2) solid #dcdfe6;
border-radius: var(--fontSize4);
margin-right: var(--fontSize12);
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
&.checked {
background-color: #347bff;
border-color: #347bff;
}
}
.checkbox-text {
font-size: var(--fontSize24);
color: #646566;
}
}
}
.form { .form {
box-sizing: border-box; box-sizing: border-box;
min-height: var(--fontSize976); min-height: var(--fontSize976);
......
<!--index.wxml--> <!--index.wxml-->
<view class="scrollarea"> <view class="scrollarea">
<view class="container"> <view class="container">
<view class="title">请完善用人需求</view> <view class="title">请完善用人需求
<view class="checkbox-wrapper">
<view class="checkbox-item" bindtap="toggleUncreatedStore">
<view class="checkbox {{ bySystemMerchant ? 'checked' : '' }}">
<van-icon wx:if="{{ bySystemMerchant }}" name="success" size="12px" color="#fff" />
</view>
<text class="checkbox-text">未创建系统门店</text>
</view>
</view>
</view>
<view class="form"> <view class="form">
<block wx:for="{{ formList }}" wx:key="index"> <block wx:for="{{ formList }}" wx:key="index">
<!-- bindtap="{{item.label === '需求描述' || item.label === '招聘数量' ? '' : 'showPopup'}}" --> <block wx:if="{{ index === 0 || index > 3 || (index > 0 && index <= 3 && bySystemMerchant) }}">
<view class="form-item {{ item.id === 5 ? 'form-item-textarea' : '' }}" bindtap="onFormItemTap" data-index="{{ index }}"> <view class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}" bindtap="onFormItemTap" data-index="{{ index }}">
<view class="label"> <view class="label">
{{item.label}} {{item.label}}
<text wx:if="{{ item.id !== 5 }}" class="required">*</text> <text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text>
</view>
<block wx:if="{{ item.id === 4 }}">
<view class="value">
<switch checked="{{ switch1Checked }}" bindchange="switch1Change" />
</view> </view>
</block> <view class="value" wx:if="{{ item.label === '门店名称' && bySystemMerchant }}">
<block wx:elif="{{ item.id === 2 }}"> <input class="store-input" type="text" placeholder="请输入门店名称" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28);text-align:right;" value="{{ item.displayValue }}" bindinput="onStoreNameInput" maxlength="50" />
<view class="value">
<input
class="number-input"
type="number"
placeholder="{{ item.placeholder }}"
placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)"
value="{{ item.displayValue }}"
bindinput="onNumberInput"
data-index="{{ index }}"
/>
<text class="unit">人</text>
</view> </view>
</block> <view class="value" wx:elif="{{ item.label === '门店名称' && !bySystemMerchant }}">
<block wx:elif="{{ item.id === 5 }}"> <text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<!-- 需求描述没有普通value部分 --> <text class="placeholder" wx:else>{{item.placeholder}}</text>
</block> <image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
<block wx:else> </view>
<view class="value"> <view class="value" wx:elif="{{ item.label === '近一月新车销量' }}">
<input class="number-input" type="number" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)" value="{{ item.displayValue }}" bindinput="onSalesInput" />
</view>
<view class="value" wx:elif="{{ item.label === '门店地址' }}">
<picker mode="region" bindchange="onRegionChange" level='city' value="{{ item.value ? item.value.split(' ') : [] }}">
<view class="picker-inner">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
</view>
</picker>
</view>
<view class="value" wx:elif="{{ item.label === '是否急招' }}">
<switch checked="{{ switch1Checked }}" bindchange="switch1Change" />
</view>
<view class="value" wx:elif="{{ item.label !== '需求描述' && item.label !== '招聘数量' && item.label !== '是否急招' }}">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text> <text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text> <text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" /> <image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
</view> </view>
</block> <view class="value" wx:elif="{{ item.label === '招聘数量' }}">
<block wx:if="{{ !showPopup }}"> <input class="number-input" type="number" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)" value="{{ item.displayValue }}" bindinput="onNumberInput" data-index="{{ index }}" />
<view class="textarea-wrapper" wx:if="{{ item.id === 5 }}"> <text class="unit">人</text>
<textarea
class="textarea-input"
placeholder="{{ item.placeholder }}"
placeholder-style="color: #BBBBBB;"
value="{{ item.displayValue }}"
bindinput="onTextareaInput"
data-index="{{ index }}"
maxlength="200"
disabled="{{ isDialogShowing }}"
/>
<view class="textarea-count">{{item.textCount || 0}}/200</view>
</view> </view>
</block> <block wx:if="{{ !showPopup }}">
</view> <view class="textarea-wrapper" wx:if="{{ item.label === '需求描述' }}">
<textarea class="textarea-input" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;" 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>
</block> </block>
</view> </view>
<view class="footer"> <view class="footer">
...@@ -67,23 +71,13 @@ ...@@ -67,23 +71,13 @@
<view class="popup-content"> <view class="popup-content">
<!-- 固定顶部区域 --> <!-- 固定顶部区域 -->
<view class="popup-fixed-top"> <view class="popup-fixed-top">
<view class="popup-title">选择{{currentItem.label == '门店名称' ? '门店' : currentItem.label}}</view> <view class="popup-title">选择{{currentItem.label}}</view>
<!-- 搜索框 --> <view class="search-box" wx:if="{{ currentIndex === 0 || currentIndex === 2 }}">
<view class="search-box" wx:if="{{ currentIndex === 0 }}">
<view class="search-input"> <view class="search-input">
<block wx:if="{{ !keyWord }}"> <block wx:if="{{ !keyWord }}">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
</block> </block>
<input <input type="text" placeholder="搜索" class="input" confirm-type="search" value="{{ keyWord }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
type="text"
placeholder="搜索"
class="input"
confirm-type="search"
value="{{ keyWord }}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search"
/>
<block wx:if="{{ keyWord }}"> <block wx:if="{{ keyWord }}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" /> <image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
</block> </block>
...@@ -94,17 +88,10 @@ ...@@ -94,17 +88,10 @@
<view class="popup-scroll-area"> <view class="popup-scroll-area">
<!-- 选项列表 --> <!-- 选项列表 -->
<view class="popup-options" wx:if="{{ options.length > 0 }}"> <view class="popup-options" wx:if="{{ options.length > 0 }}">
<view <view class="option-item {{ item.checked ? 'checked' : '' }}" wx:for="{{ filteredOptions }}" wx:key="index" bindtap="toggleOption" data-index="{{ index }}" data-value="{{ item.value }}">
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-name">{{item.text}}</view>
<view class="option-check" wx:if="{{ item.checked }}"> <view class="option-check {{ item.checked ? 'checked' : '' }}">
<image src="{{ IMG_URL }}checked.png" mode="" /> <text class="check-icon" wx:if="{{ item.checked }}">✓</text>
</view> </view>
</view> </view>
<view class="empty-tip" wx:if="{{ filteredOptions.length === 0 }}"> <view class="empty-tip" wx:if="{{ filteredOptions.length === 0 }}">
...@@ -113,7 +100,7 @@ ...@@ -113,7 +100,7 @@
</view> </view>
</view> </view>
<!-- 固定底部区域 --> <!-- 固定底部区域 -->
<view class="popup-fixed-bottom"> <view class="popup-fixed-bottom ">
<view class="popup-buttons"> <view class="popup-buttons">
<view class="cancel-btn" bindtap="onClose">取消</view> <view class="cancel-btn" bindtap="onClose">取消</view>
<view class="confirm-btn" bindtap="confirmSelect">确定</view> <view class="confirm-btn" bindtap="confirmSelect">确定</view>
......
...@@ -187,11 +187,11 @@ Page({ ...@@ -187,11 +187,11 @@ Page({
// 弹窗 // 弹窗
const noticeItem = data.list[0]; const noticeItem = data.list[0];
// 根据类型取到对应的值 // 根据类型取到对应的值
const { message, ...dialogParams } = dialogOptions[serviceCenterEnum][noticeItem.reminderType || 1]; // const { message, ...dialogParams } = dialogOptions[serviceCenterEnum][noticeItem.reminderType || 1];
that.setData({ // that.setData({
isShowingModal: true, // isShowingModal: true,
}); // });
try { try {
await Dialog.alert({ await Dialog.alert({
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"appid": "wx6216a8e625e76b00", "appid": "wx6216a8e625e76b00",
"projectname": "regional-assistant", "projectname": "regional-assistant",
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "3.13.0", "libVersion": "3.14.3",
"scripts": { "scripts": {
"beforeUpload": "node ./scripts/wx-upload-guard.js || exit 1" "beforeUpload": "node ./scripts/wx-upload-guard.js || exit 1"
}, },
...@@ -40,10 +40,21 @@ ...@@ -40,10 +40,21 @@
"sass" "sass"
], ],
"ignoreDevUnusedFiles": false, "ignoreDevUnusedFiles": false,
"ignoreUploadUnusedFiles": false "ignoreUploadUnusedFiles": false,
"compileWorklet": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"minifyWXSS": true,
"minifyWXML": true,
"localPlugins": false,
"disableUseStrict": false,
"condition": false,
"swc": false,
"disableSWC": true
}, },
"editorSetting": { "editorSetting": {
"tabIndent": "insertSpaces", "tabIndent": "insertSpaces",
"tabSize": 2 "tabSize": 2
} },
"simulatorPluginLibVersion": {}
} }
\ No newline at end of file \ No newline at end of file
{ {
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"condition": { "condition": {},
"miniprogram": {
"list": [
{
"name": "申诉列表",
"pathName": "packageWorkspace/pages/appealFormManage/appealFormList/appealFormList",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "考勤列表",
"pathName": "packageWorkspace/pages/attendanceStatis/attendanceList/attendanceList",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "有效引荐数",
"pathName": "packageWorkspace/pages/validReferralCount/referralCountList/referralCountList",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "精品升级",
"pathName": "tabWorkOrder/pages/createOrder/createOrder",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "权战ai",
"pathName": "packageEquity/pages/createDeafeatOrderAi/createDeafeatOrderAi",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "权订单",
"pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "质检",
"pathName": "packageEquity/pages/aiInspection/aiInspection",
"query": "badgeId=4827E2F0CD24",
"launchMode": "default",
"scene": null
},
{
"name": "驻店目标",
"pathName": "packageEquity/pages/residentTarget/residentTarget",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "线管理",
"pathName": "packageEquity/pages/clueList/clueList",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "场景",
"pathName": "pages/sceneIndex/sceneIndex",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "员工日报",
"pathName": "tabWorkOrder/pages/staffDaily/staffDaily",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "权益-个人中心",
"pathName": "packageEquity/pages/TabBar/equityPage",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "创建权益订单",
"pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "权益列表",
"pathName": "packageEquity/pages/TabBar/equityPage",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "领券预约",
"pathName": "tabMine/pages/collectCoupons/collectCoupons",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "个人中心",
"pathName": "pages/tabMine/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
},
"libVersion": "3.14.3", "libVersion": "3.14.3",
"projectname": "regional-assistant", "projectname": "regional-assistant",
"setting": { "setting": {
"compileHotReLoad": true "compileHotReLoad": true,
"urlCheck": false,
"coverView": true,
"lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false,
"preloadBackgroundData": false,
"autoAudits": false,
"useApiHook": true,
"useApiHostProcess": true,
"showShadowRootInWxmlPanel": true,
"useStaticServer": false,
"useLanDebug": false,
"showES6CompileOption": false,
"checkInvalidKey": true,
"ignoreDevUnusedFiles": false,
"bigPackageSizeSupport": false
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!