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(
...@@ -74,6 +84,36 @@ module.exports = { ...@@ -74,6 +84,36 @@ 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/'
// 统计列表配置映射 // 统计列表配置映射
...@@ -31,14 +31,17 @@ const TAGLIST = [ ...@@ -31,14 +31,17 @@ const TAGLIST = [
// 招聘信息字段配置 // 招聘信息字段配置
const RECRUITMENT_INFO_CONFIG = [ const RECRUITMENT_INFO_CONFIG = [
{ label: '门店名称', field: 'merchantName' }, { label: '门店名称', field: 'merchantName' },
{ label: '近一月新车销量', field: 'salesVolume' },
{ label: '主营品牌', field: 'brand' },
{ label: '门店地址', field: 'merchantAddress' },
{ label: '业务类型', field: 'businessTypeName' }, { label: '业务类型', field: 'businessTypeName' },
{ label: '招聘类型', field: 'recruitmentTypeName' }, { label: '招聘类型', field: 'recruitmentTypeName' },
{ label: '需求描述', field: 'requirementDescription' },
{ label: '招聘负责人', field: 'recruiterName' }, { label: '招聘负责人', field: 'recruiterName' },
{ label: '技术督导', field: 'technicalSupervisorName' }, { label: '技术督导', field: 'technicalSupervisorName' },
{ label: '申请时间', field: 'createdDate' }, { label: '申请时间', field: 'createdDate' },
{ label: '需求描述', field: 'requirementDescription' },
{ label: '拒绝理由', field: 'recallReason' } { label: '拒绝理由', field: 'recallReason' }
] ]
// 招聘状态映射配置 // 招聘状态映射配置
const RECRUIT_STATUS_CONFIG = { const RECRUIT_STATUS_CONFIG = {
...@@ -92,6 +95,25 @@ Page({ ...@@ -92,6 +95,25 @@ Page({
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' })
}
})
}
}
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"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
...@@ -215,6 +215,7 @@ page { ...@@ -215,6 +215,7 @@ page {
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;
...@@ -660,3 +696,114 @@ page { ...@@ -660,3 +696,114 @@ page {
} }
} }
} }
/* 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
...@@ -4,20 +4,27 @@ const IMG_URL = ...@@ -4,20 +4,27 @@ const IMG_URL =
import { import {
getDemandStoreListAPI, getDemandStoreListAPI,
getStaffDictListAPI, getStaffDictListAPI,
addStaffDictListAPI addStaffDictListAPI,
getCarBrandList
} from '../api' } from '../api'
// 表单字段配置 // 表单字段配置
const FORM_FIELDS = { const FORM_FIELDS = {
MERCHANT: 0, // 门店 MERCHANT: 0, // 门店
QUANTITY: 2, // 招聘数量 SALES: 1, // 近一月新车销量
URGENT: 4, // 是否急招 BRANDS: 2, // 主营品牌
DESCRIPTION: 5, // 需求描述 ADDRESS: 3, // 门店地址
RECRUIT_TYPE: 3, // 招聘类型 BUSINESS_TYPE: 4, // 业务类型
BUSINESS_TYPE: 1 // 业务类型 QUANTITY: 5, // 招聘数量
} RECRUIT_TYPE: 6, // 招聘类型
URGENT: 7, // 是否急招
DESCRIPTION: 8 // 需求描述
}
// 表单验证配置 // 表单验证配置
const VALIDATION_CONFIG = { const VALIDATION_CONFIG = {
[FORM_FIELDS.MERCHANT]: { tip: '请选择招聘门店', required: true }, [FORM_FIELDS.MERCHANT]: { tip: '请填写/选择招聘门店', required: true },
[FORM_FIELDS.SALES]: { tip: '请输入近一月新车销量', required: false },
[FORM_FIELDS.BRANDS]: { tip: '请选择主营品牌', required: false },
[FORM_FIELDS.ADDRESS]: { tip: '请选择门店地址', required: false },
[FORM_FIELDS.BUSINESS_TYPE]: { tip: '请选择业务类型', required: true }, [FORM_FIELDS.BUSINESS_TYPE]: { tip: '请选择业务类型', required: true },
[FORM_FIELDS.QUANTITY]: { tip: '请输入招聘数量', required: true }, [FORM_FIELDS.QUANTITY]: { tip: '请输入招聘数量', required: true },
[FORM_FIELDS.RECRUIT_TYPE]: { tip: '请选择招聘类型', required: true }, [FORM_FIELDS.RECRUIT_TYPE]: { tip: '请选择招聘类型', required: true },
...@@ -25,19 +32,22 @@ const VALIDATION_CONFIG = { ...@@ -25,19 +32,22 @@ const VALIDATION_CONFIG = {
tip: '请简单描述用人要求等信息', tip: '请简单描述用人要求等信息',
required: false required: false
} }
} }
Page({ Page({
data: { data: {
IMG_URL, IMG_URL,
formList: [ formList: [
{ id: 0, label: '门店名称', placeholder: '点击选择', options: [] }, { id: 0, label: '门店名称', placeholder: '请选择招聘门店', options: [] },
{ id: 1, label: '业务类型', placeholder: '点击选择', options: [] }, { id: 1, label: '近一月新车销量', placeholder: '请输入近一月新车销量' },
{ id: 2, label: '招聘数量', placeholder: '请输入' }, { id: 2, label: '主营品牌', placeholder: '请选择主营品牌', options: [], multi: true },
{ id: 3, label: '招聘类型', placeholder: '点击选择', options: [] }, { id: 3, label: '门店地址', placeholder: '请选择门店地址' },
{ id: 4, label: '是否急招', value: 0 }, { id: 4, label: '业务类型', placeholder: '请选择业务类型', options: [] },
{ id: 5, label: '招聘数量', placeholder: '请输入招聘数量' },
{ id: 6, label: '招聘类型', placeholder: '请选择招聘类型', options: [] },
{ id: 7, label: '是否急招', value: 0 },
{ {
id: 5, id: 8,
label: '需求描述', label: '需求描述',
placeholder: '请简单描述用人要求等信息', placeholder: '请简单描述用人要求等信息',
textCount: 0 textCount: 0
...@@ -55,12 +65,92 @@ Page({ ...@@ -55,12 +65,92 @@ Page({
searchTimer: null, // 防抖定时器 searchTimer: null, // 防抖定时器
isDialogShowing: false // Dialog显示状态 isDialogShowing: false // Dialog显示状态
}, },
// 勾选/取消勾选“未创建系统门店”
toggleUncreatedStore() {
const bySystemMerchant = !this.data.bySystemMerchant
const formList = this.data.formList
// 切换时清空门店相关数据
formList[FORM_FIELDS.MERCHANT].value = ''
formList[FORM_FIELDS.MERCHANT].displayValue = ''
if (!bySystemMerchant) {
// 隐藏的字段清空
formList[FORM_FIELDS.SALES].value = ''
formList[FORM_FIELDS.SALES].displayValue = ''
formList[FORM_FIELDS.BRANDS].value = ''
formList[FORM_FIELDS.BRANDS].displayValue = ''
formList[FORM_FIELDS.ADDRESS].value = ''
formList[FORM_FIELDS.ADDRESS].displayValue = ''
formList[FORM_FIELDS.ADDRESS].otherValue = ''
}
// 更新校验规则
VALIDATION_CONFIG[FORM_FIELDS.SALES].required = bySystemMerchant
VALIDATION_CONFIG[FORM_FIELDS.BRANDS].required = bySystemMerchant
VALIDATION_CONFIG[FORM_FIELDS.ADDRESS].required = bySystemMerchant
this.setData({
bySystemMerchant,
formList
})
},
// 门店名称输入(未创建系统门店时)
onStoreNameInput(e) {
const value = e.detail.value.trim().substring(0, 50)
const formList = this.data.formList
formList[FORM_FIELDS.MERCHANT].value = value
formList[FORM_FIELDS.MERCHANT].displayValue = value
this.setData({ formList })
},
// 近一月新车销量输入
onSalesInput(e) {
let value = e.detail.value
const formList = this.data.formList
value = value.replace(/\D/g, '')
if (value.length > 1 && value.startsWith('0')) {
value = value.replace(/^0+/, '')
}
if (value !== '') {
let numValue = parseInt(value, 10)
if (numValue > 9999) {
value = '9999'
} else if (numValue < 1) {
value = '1'
}
}
formList[FORM_FIELDS.SALES].value = value
formList[FORM_FIELDS.SALES].displayValue = value
this.setData({ formList })
},
// 门店地址选择
onRegionChange(e) {
console.log(e)
const code = e.detail.code
const value = e.detail.value
// value 是个数组:[省, 市, 区]
const province = value[0] || ''
const city = value[1] || ''
const formList = this.data.formList
const addressStr = `${province} ${city}`
const addreddCode = code.join('/')
formList[FORM_FIELDS.ADDRESS].value = addreddCode
formList[FORM_FIELDS.ADDRESS].displayValue = addressStr
formList[FORM_FIELDS.ADDRESS].otherValue = province
this.setData({ formList })
},
onFormItemTap(e) { onFormItemTap(e) {
const index = e.currentTarget.dataset.index const index = e.currentTarget.dataset.index
const item = this.data.formList && this.data.formList[index] const item = this.data.formList && this.data.formList[index]
const id = item && item.id const label = item && item.label
// 需求描述(5)、招聘数量(2)、是否急招(4) 不需要点击弹窗
if (id === 5 || id === 2 || id === 4) return // 如果是门店名称且勾选了未创建系统门店,则不弹出
if (label === '门店名称' && this.data.bySystemMerchant) return
if (label === '近一月新车销量' || label === '门店地址' || label === '需求描述' || label === '招聘数量' || label === '是否急招') return
return this.showPopup(e) return this.showPopup(e)
}, },
// 显示popup // 显示popup
...@@ -75,6 +165,8 @@ Page({ ...@@ -75,6 +165,8 @@ Page({
if (index === 0) { if (index === 0) {
// 获取全部门店列表(不传关键词) // 获取全部门店列表(不传关键词)
await this.getDemandStoreList() await this.getDemandStoreList()
} else if (index === FORM_FIELDS.BRANDS) {
await this.getBrandList()
} else { } else {
await this.getDictList(index) await this.getDictList(index)
} }
...@@ -99,8 +191,18 @@ Page({ ...@@ -99,8 +191,18 @@ Page({
return { ...option, checked: false } return { ...option, checked: false }
} }
}) })
// 如果已有选中值,标记为选中(单选模式) // 如果已有选中值,标记为选中
if (item.value && item.displayValue) { if (item.value && item.displayValue) {
if (item.multi) {
const selectedValues = Array.isArray(item.value) ? item.value : item.value.split(',')
options = options.map(option => {
if (selectedValues.includes(String(option.value))) {
option.checked = true
selectedOptions.push(option.value)
}
return option
})
} else {
const selectedValue = Array.isArray(item.value) const selectedValue = Array.isArray(item.value)
? item.value[0] ? item.value[0]
: item.value : item.value
...@@ -113,6 +215,7 @@ Page({ ...@@ -113,6 +215,7 @@ Page({
}) })
} }
} }
}
this.setData({ this.setData({
showPopup: true, showPopup: true,
...@@ -169,6 +272,14 @@ Page({ ...@@ -169,6 +272,14 @@ Page({
async performSearch(keyword) { async performSearch(keyword) {
const { currentIndex } = this.data const { currentIndex } = this.data
if (currentIndex === FORM_FIELDS.BRANDS) {
// 主营品牌本地过滤
const { options } = this.data
const filteredOptions = keyword ? options.filter(option => option.text.includes(keyword)) : options
this.setData({ filteredOptions })
return
}
// 只有在门店选择时才进行远程搜索 // 只有在门店选择时才进行远程搜索
if (currentIndex !== 0) { if (currentIndex !== 0) {
return return
...@@ -211,12 +322,33 @@ Page({ ...@@ -211,12 +322,33 @@ Page({
} }
}, },
// 切换选项选中状态(单选模式) // 切换选项选中状态
toggleOption(e) { toggleOption(e) {
const value = e.currentTarget.dataset.value const value = e.currentTarget.dataset.value
const index = e.currentTarget.dataset.index const index = e.currentTarget.dataset.index
const options = this.data.options const options = this.data.options
const filteredOptions = this.data?.filteredOptions const filteredOptions = this.data?.filteredOptions
const currentIndex = this.data.currentIndex
const item = this.data.formList[currentIndex]
// 找到点击的选项在原始options中的索引
const originalIndex = options.findIndex(option => option.value === value)
const filteredIndex = filteredOptions.findIndex(option => option.value === value)
if (item.multi) {
if (originalIndex >= 0) {
options[originalIndex].checked = !options[originalIndex].checked
if (filteredIndex >= 0) {
filteredOptions[filteredIndex].checked = options[originalIndex].checked
}
}
const selectedOptions = options.filter(o => o.checked).map(o => o.value)
this.setData({
options,
filteredOptions,
selectedOptions
})
} else {
// 先取消所有选中状态 // 先取消所有选中状态
options.forEach(option => { options.forEach(option => {
option.checked = false option.checked = false
...@@ -224,15 +356,10 @@ Page({ ...@@ -224,15 +356,10 @@ Page({
filteredOptions.forEach(option => { filteredOptions.forEach(option => {
option.checked = false option.checked = false
}) })
// 找到点击的选项在原始options中的索引
const originalIndex = options.findIndex(option => option.value === value)
// 设置当前选中状态 // 设置当前选中状态
if (originalIndex >= 0) { if (originalIndex >= 0) {
options[originalIndex].checked = true options[originalIndex].checked = true
// 同步更新filteredOptions中对应选项的状态 // 同步更新filteredOptions中对应选项的状态
const filteredIndex = filteredOptions.findIndex(
option => option.value === value
)
if (filteredIndex >= 0) { if (filteredIndex >= 0) {
filteredOptions[filteredIndex].checked = true filteredOptions[filteredIndex].checked = true
} }
...@@ -244,6 +371,7 @@ Page({ ...@@ -244,6 +371,7 @@ Page({
filteredOptions, filteredOptions,
selectedOptions selectedOptions
}) })
}
}, },
// 输入值变化 // 输入值变化
inputValue(e) { inputValue(e) {
...@@ -324,7 +452,7 @@ Page({ ...@@ -324,7 +452,7 @@ Page({
}) })
}, },
// 确认选择(单选模式) // 确认选择
confirmSelect() { confirmSelect() {
const { currentIndex, selectedOptions, inputValue } = this.data const { currentIndex, selectedOptions, inputValue } = this.data
const formList = this.data.formList const formList = this.data.formList
...@@ -335,6 +463,15 @@ Page({ ...@@ -335,6 +463,15 @@ Page({
let displayValue = '' let displayValue = ''
if (hasOptionList) { if (hasOptionList) {
if (item.multi) {
if (selectedOptions.length === 0) {
wx.showToast({ title: '至少选择一项', icon: 'none' })
return
}
const selectedTexts = this.data.options.filter(o => selectedOptions.includes(o.value)).map(o => o.text)
value = selectedOptions.join('/')
displayValue = selectedTexts.join('/')
} else {
const selectedValue = selectedOptions[0] || '' const selectedValue = selectedOptions[0] || ''
if (selectedValue) { if (selectedValue) {
const selectedOption = this.data.options.find( const selectedOption = this.data.options.find(
...@@ -345,6 +482,7 @@ Page({ ...@@ -345,6 +482,7 @@ Page({
displayValue = selectedOption.text || '' displayValue = selectedOption.text || ''
} }
} }
}
} else { } else {
value = inputValue value = inputValue
displayValue = inputValue displayValue = inputValue
...@@ -377,17 +515,23 @@ Page({ ...@@ -377,17 +515,23 @@ Page({
// 构建提交数据 // 构建提交数据
buildSubmitData() { buildSubmitData() {
const { formList } = this.data const { formList, bySystemMerchant } = this.data
return { return {
merchantId: formList[FORM_FIELDS.MERCHANT].value, merchantId: bySystemMerchant ? null : formList[FORM_FIELDS.MERCHANT].value,
merchantName: formList[FORM_FIELDS.MERCHANT].displayValue, merchantName: bySystemMerchant ? formList[FORM_FIELDS.MERCHANT].value : formList[FORM_FIELDS.MERCHANT].displayValue,
salesVolume: bySystemMerchant ? formList[FORM_FIELDS.SALES].value : null,
brand: bySystemMerchant ? formList[FORM_FIELDS.BRANDS].displayValue : null,
provinceCityCode:bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].value : null,
merchantAddress: bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].displayValue : null,
province: bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].otherValue : null,
businessType: formList[FORM_FIELDS.BUSINESS_TYPE].value, businessType: formList[FORM_FIELDS.BUSINESS_TYPE].value,
businessTypeName: formList[FORM_FIELDS.BUSINESS_TYPE].displayValue, businessTypeName: formList[FORM_FIELDS.BUSINESS_TYPE].displayValue,
recruitmentQuantity: formList[FORM_FIELDS.QUANTITY].value, recruitmentQuantity: formList[FORM_FIELDS.QUANTITY].value,
recruitmentType: formList[FORM_FIELDS.RECRUIT_TYPE].value, recruitmentType: formList[FORM_FIELDS.RECRUIT_TYPE].value,
recruitmentTypeName: formList[FORM_FIELDS.RECRUIT_TYPE].displayValue, recruitmentTypeName: formList[FORM_FIELDS.RECRUIT_TYPE].displayValue,
requirementDescription: formList[FORM_FIELDS.DESCRIPTION].value || '', requirementDescription: formList[FORM_FIELDS.DESCRIPTION].value || '',
urgent: formList[FORM_FIELDS.URGENT].value urgent: formList[FORM_FIELDS.URGENT].value,
bySystemMerchant:!this.data.bySystemMerchant
} }
}, },
switch1Change(e) { switch1Change(e) {
...@@ -484,6 +628,34 @@ Page({ ...@@ -484,6 +628,34 @@ Page({
wx.$router.redirectTo(`recruitResult`) wx.$router.redirectTo(`recruitResult`)
}, },
/** /**
* 获取主营品牌列表
*/
getBrandList() {
return new Promise((resolve, reject) => {
getCarBrandList({})
.then(res => {
let { code, data } = res
if (code == 0 && data) {
const options = data.map(item => ({
text: item.brandName || item.name || '--',
value: item.brandId || item.id
}))
this.setData({
[`formList[${FORM_FIELDS.BRANDS}].options`]: options
})
resolve(options)
} else {
reject(new Error('获取品牌列表失败'))
}
})
.catch(err => {
console.error('获取品牌列表失败', err)
reject(err)
})
})
},
/**
* 动态获取门店列表 * 动态获取门店列表
* @param {String} keyword 搜索关键词(可选) * @param {String} keyword 搜索关键词(可选)
* @returns {Promise} 返回门店选项列表 * @returns {Promise} 返回门店选项列表
...@@ -527,7 +699,7 @@ Page({ ...@@ -527,7 +699,7 @@ Page({
try { try {
let requestParam = { let requestParam = {
businessCode: 'recruitment', // 招聘模块相关字典固定穿recruitment businessCode: 'recruitment', // 招聘模块相关字典固定穿recruitment
typeCode: index == 1 ? 'business_type' : 'recruitment_type' // 招聘模块内相关业务字典传对应值 ○business_type-业务类型○recruitment_type-招聘类型 typeCode: index == 4 ? 'business_type' : 'recruitment_type' // 招聘模块内相关业务字典传对应值 ○business_type-业务类型○recruitment_type-招聘类型
} }
getStaffDictListAPI(requestParam) getStaffDictListAPI(requestParam)
.then(res => { .then(res => {
......
...@@ -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
...@@ -21,7 +21,44 @@ page { ...@@ -21,7 +21,44 @@ page {
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;
......
<!--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> </view>
<block wx:if="{{ item.id === 4 }}"> <view class="value" wx:if="{{ item.label === '门店名称' && bySystemMerchant }}">
<view class="value"> <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" />
<switch checked="{{ switch1Checked }}" bindchange="switch1Change" />
</view> </view>
</block> <view class="value" wx:elif="{{ item.label === '门店名称' && !bySystemMerchant }}">
<block wx:elif="{{ item.id === 2 }}"> <text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<view class="value"> <text class="placeholder" wx:else>{{item.placeholder}}</text>
<input <image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
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 === '近一月新车销量' }}">
<block wx:elif="{{ item.id === 5 }}"> <input class="number-input" type="number" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)" value="{{ item.displayValue }}" bindinput="onSalesInput" />
<!-- 需求描述没有普通value部分 --> </view>
</block> <view class="value" wx:elif="{{ item.label === '门店地址' }}">
<block wx:else> <picker mode="region" bindchange="onRegionChange" level='city' value="{{ item.value ? item.value.split(' ') : [] }}">
<view class="value"> <view class="picker-inner">
<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> </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="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
</view>
<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="onNumberInput" data-index="{{ index }}" />
<text class="unit">人</text>
</view>
<block wx:if="{{ !showPopup }}"> <block wx:if="{{ !showPopup }}">
<view class="textarea-wrapper" wx:if="{{ item.id === 5 }}"> <view class="textarea-wrapper" wx:if="{{ item.label === '需求描述' }}">
<textarea <textarea class="textarea-input" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;" value="{{ item.displayValue }}" bindinput="onTextareaInput" data-index="{{ index }}" maxlength="200" disabled="{{ isDialogShowing }}" />
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 class="textarea-count">{{item.textCount || 0}}/200</view>
</view> </view>
</block> </block>
</view> </view>
</block> </block>
</block>
</view> </view>
<view class="footer"> <view class="footer">
<view class="btn" bind:tap="submit">提交</view> <view class="btn" bind:tap="submit">提交</view>
...@@ -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!