Commit 0d3cc0f0 by 前端

Merge branch 'SAAS+V5.8.3' into 'master'

上线合并

See merge request !26
2 parents 3061a629 80415961
......@@ -11,8 +11,8 @@ Page({
// 订单信息
orderInfo: {},
statusMap: {
'1': {name: '待审核', tips: '请尽快处理', icon: 'more-o', color: '#FF9D0A'},
'2': {name: '已审核', tips: '订单已流转至线上运营审核', icon: 'passed', color: '#35C376'},
'2': {name: '待审核', tips: '请尽快处理', icon: 'more-o', color: '#FF9D0A'},
// '2': {name: '已审核', tips: '订单已流转至线上运营审核', icon: 'passed', color: '#35C376'},
'3': {name: '已审核', tips: '订单已被线上运营审核通过', icon: 'passed', color: '#35C376'},
'4': {name: '已驳回', tips: '订单已驳回', icon: 'warning-o', color: '#666666'}
},
......
......@@ -85,9 +85,9 @@
</view>
<view class="empty-box"></view>
</view>
<view wx:if="{{orderInfo.status == 1}}" class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<!-- <view wx:if="{{orderInfo.status == 1}}" class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn cancel" bindtap="reject">驳回</view>
<view class="btn confirm" bindtap="pass">通过</view>
</view>
</view> -->
</view>
<approval-popup wx:if="{{showPopup}}" show="{{ showPopup }}" infoData="{{popupInfo}}" bindconfirm="handlePopupConfirm" bindcancel="hidePopup"></approval-popup>
\ No newline at end of file
......@@ -31,8 +31,8 @@ Page({
'3': '已驳回'
},
listAuditStatusMap: {
'1': {name: '待审核', color: '#FF9D0A', background: '#ff9d0a1a'},
'2': {name: '已审核', color: '#35C376', background: '#35C3761a'}, // 线上运营待审核,区域运营已审核过显示为已审核
'2': {name: '待审核', color: '#FF9D0A', background: '#ff9d0a1a'},
// '2': {name: '已审核', color: '#35C376', background: '#35C3761a'}, // 线上运营待审核,区域运营已审核过显示为已审核
'3': {name: '已审核', color: '#35C376', background: '#35C3761a'},
'4': {name: '已驳回', color: '#777777', background: '#7777771a'}
},
......
......@@ -74,7 +74,7 @@
</view>
<view class="btn-box flex">
<view><text class="label">总价</text><text class="unit">¥</text><text>{{li.finalPrice}}</text></view>
<view bindtap="handleDetail" data-target="{{li}}" class="btn {{li.status == 1 ? 'primary' : ''}}">{{li.status == 1 ? '审核' : '查看'}}</view>
<view bindtap="handleDetail" data-target="{{li}}" class="btn {{li.status == 1 ? 'primary' : ''}}">查看</view>
</view>
</view>
</view>
......
......@@ -114,7 +114,36 @@ module.exports = {
'/rop-dj-staff-miniprogram/router'
)
},
// 试岗门店列表
getTrialOnboardingStoreList(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.trial.onboarding.store.list',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 试岗计划详情
getTrialOnboardingDetailAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.trial.onboarding.detail',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 业务场景列表
getRecruitmentDemandSubSceneList(data) {
return api.post(
'dj.staff.api.recruitment.demand.sub.scene.list',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 处理试岗计划
processTrialPlanAPI(data) {
......
// packageWorkspace/pages/recruitManage/pages/recruitDetail/recruitDetail.js
import { unix } from 'dayjs'
import { getRecruitDetailAPI, processResumeAPI, getStaffDictListAPI, addTrialPlanAPI, updateTrialPlanAPI, deleteTrialPlanAPI, processTrialPlanAPI } from '../api'
import { getRecruitDetailAPI, processResumeAPI, getStaffDictListAPI, addTrialPlanAPI, updateTrialPlanAPI, deleteTrialPlanAPI, processTrialPlanAPI, getTrialOnboardingStoreList, getRecruitmentDemandSubSceneList, getTrialOnboardingDetailAPI } from '../api'
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
// 统计列表配置映射
......@@ -8,7 +8,7 @@ const STATISTICS_CONFIG = [
{ title: '需求数量', field: 'recruitmentQuantity' },
{ title: '投递简历数', field: 'resumeCount' },
{ title: '处理简历数', field: 'processResumeCount' },
{ title: '试岗人数', field: 'trialOnboardingCount' },
{ title: '试岗人数', field: 'trialOnboardingCount' },
{ title: '入职人数', field: 'entryCount' }
]
......@@ -33,7 +33,8 @@ const RECRUITMENT_INFO_CONFIG = [
{ label: '门店名称', field: 'merchantName' },
{ label: '近一月新车销量', field: 'salesVolume' },
{ label: '主营品牌', field: 'brand' },
{ label: '门店地址', field: 'merchantAddress' },
{ label: '所属省市', field: 'merchantAddress' },
{ label: '详细地址', field: 'merchantAddressDetail' },
{ label: '业务类型', field: 'businessTypeName' },
{ label: '招聘类型', field: 'recruitmentTypeName' },
{ label: '需求描述', field: 'requirementDescription' },
......@@ -52,6 +53,44 @@ const RECRUIT_STATUS_CONFIG = {
3: { text: '面试不通过', class: 'fail', canProcess: false }
}
const TRIAL_PICKER = {
STORE: 'store',
BIZ_SCENE: 'bizScene',
RESIDENT_TYPE: 'residentType',
CHANNEL: 'channel'
}
const EMPTY_TRIAL_FORM = {
id: '',
personName: '',
phoneNumber: '',
storeNo: '',
storeName: '',
bizSceneCodes: [],
displayBizScene: '',
residentType: '',
residentTypeName: '',
channelType: '',
channelName: '',
trialTime: '',
displayTrialTime: ''
}
const getEmptyTrialForm = () => ({
...EMPTY_TRIAL_FORM,
bizSceneCodes: []
})
const TRIAL_DETAIL_BASIC_FIELDS = [
{ label: '人员姓名', field: 'personName' },
{ label: '手机号', field: 'phoneNumber' },
{ label: '招聘渠道', field: 'channelName' },
{ label: '试岗时间', field: 'displayTrialTime' },
{ label: '试岗门店', field: 'storeName' },
{ label: '业务场景', field: 'displayBizScene' },
{ label: '驻店类型', field: 'residentTypeName' }
]
Page({
/**
* 格式化时间戳为 YYYY-MM-DD 格式
......@@ -98,19 +137,24 @@ Page({
// 试岗相关
showTrialPopup: false,
trialPopupType: 'add',
trialFormData: {
id: '',
personName: '',
phoneNumber: '',
channelType: '',
channelName: '',
trialTime: '',
displayTrialTime: ''
},
trialFormData: getEmptyTrialForm(),
channelOptions: [],
showChannelPopup: false,
tempChannelType: '',
tempChannelName: '',
trialStoreOptions: [],
trialBizSceneOptions: [],
residentTypeOptions: [],
trialPickerType: '',
trialPickerTitle: '',
trialPickerOptions: [],
trialPickerFilteredOptions: [],
trialSelectedOptions: [],
trialPickerMulti: false,
trialPickerShowSearch: false,
trialPickerKeyWord: '',
trialSearchTimer: null,
showTrialDetailPopup: false,
trialDetailData: {},
trialDetailBasicFields: TRIAL_DETAIL_BASIC_FIELDS,
trialTimeShow: false,
trialCurrentDate: new Date().getTime(),
isProcessingTrial: false,
......@@ -441,20 +485,21 @@ Page({
// 查找对应的数据项
const item = this.data.recruitmentPlans.find(i => i.id === id)
if (!item) return
this.getChannelOptions();
this.setData({
this.loadTrialPopupBaseData().then(() => {
this.setData({
showTrialPopup: true,
trialPopupType: 'add',
trialFormData: {
...getEmptyTrialForm(),
personName: item.personName || '',
phoneNumber: item.phoneNumber || '',
channelType: item.channelType || '',
channelName: item.channelName || '',
trialTime: '',
displayTrialTime: ''
channelName: item.channelName || ''
},
trialBizSceneOptions: [],
trialCurrentDate: new Date().getTime()
})
})
},
/**
* 处理按钮点击
......@@ -800,12 +845,119 @@ showTrialTimePicker() {
})
},
// 解析 bizSceneInfo(支持 JSON 字符串或数组)
parseBizSceneInfo(bizSceneInfo) {
if (!bizSceneInfo) return []
if (typeof bizSceneInfo === 'string') {
try {
const parsed = JSON.parse(bizSceneInfo)
return Array.isArray(parsed) ? parsed : []
} catch (e) {
return []
}
}
return Array.isArray(bizSceneInfo) ? bizSceneInfo : []
},
getBizSceneCode(item) {
return item.sceneCode || ''
},
getBizSceneName(item) {
return item.sceneName || ''
},
buildBizSceneInfo(codes, options) {
const codeSet = new Set((codes || []).map(String))
return (options || [])
.filter(o => codeSet.has(String(o.value)))
.map(o => ({
sceneCode: o.value,
sceneName: o.text
}))
},
getBizSceneDisplay(codes, options) {
const codeSet = new Set((codes || []).map(String))
return (options || [])
.filter(o => codeSet.has(String(o.value)))
.map(o => o.text)
.join('/')
},
formatBizSceneDisplay(bizSceneInfo) {
const list = this.parseBizSceneInfo(bizSceneInfo)
const text = list.map(s => this.getBizSceneName(s)).filter(Boolean).join('+')
return text || '-'
},
getApprovalResultInfo(approvalResult) {
if (approvalResult == null) {
return { text: '审批中', tagClass: 'pending' }
}
if (approvalResult == 1) {
return { text: '通过', tagClass: 'pass' }
}
return { text: '驳回', tagClass: 'fail' }
},
showTrialDetail(e) {
const id = e.currentTarget.dataset.id
if (!id) return
const query = wx.createSelectorQuery()
query.selectViewport().scrollOffset()
query.exec(res => {
if (res && res[0]) {
this.setData({ pageScrollTop: res[0].scrollTop })
}
})
wx.showLoading({ title: '加载中...', mask: true })
getTrialOnboardingDetailAPI({ id, demandId: this.curDataId })
.then(res => {
wx.hideLoading()
if (res.code == 0 && res.data) {
const data = res.data
const approvalInfo = this.getApprovalResultInfo(data.approvalResult)
this.setData({
showTrialDetailPopup: true,
trialDetailData: {
...data,
personName: data.personName || '-',
phoneNumber: data.phoneNumber || '-',
channelName: data.channelName || '-',
displayTrialTime: data.trialTime?this.formatDate(data.trialTime) : '-',
storeName: data.storeName || '-',
displayBizScene: this.formatBizSceneDisplay(data.bizSceneInfo),
residentTypeName: data.residentTypeName || '-',
approvalText: approvalInfo.text,
approvalTagClass: approvalInfo.tagClass
}
})
} else {
wx.showToast({ title: res.message || '加载失败', icon: 'none' })
}
})
.catch(() => {
wx.hideLoading()
wx.showToast({ title: '加载失败', icon: 'none' })
})
},
hideTrialDetailPopup() {
this.setData({
showTrialDetailPopup: false,
trialDetailData: {}
})
},
// 获取招聘渠道字典
getChannelOptions() {
if (this.data.channelOptions.length > 0) return;
getStaffDictListAPI({
businessCode: "recruitment",
typeCode: "recruitment_channel"
loadChannelOptions() {
if (this.data.channelOptions.length > 0) {
return Promise.resolve(this.data.channelOptions)
}
return getStaffDictListAPI({
businessCode: 'recruitment',
typeCode: 'recruitment_channel'
}).then(res => {
if (res.code == 0 && res.data) {
const options = res.data.map(item => ({
......@@ -813,31 +965,150 @@ showTrialTimePicker() {
value: item.itemValue
}))
this.setData({ channelOptions: options })
return options
}
return []
})
},
// 显示试岗弹窗
showTrialPopup(e) {
const type = e.currentTarget.dataset.type;
this.getChannelOptions();
if (type === 'add') {
// 获取试岗门店列表
loadTrialStoreOptions(keyword = '') {
const params = { demandId: this.curDataId }
if (keyword) params.storeName = keyword
return getTrialOnboardingStoreList(params).then(res => {
if (res.code == 0 && res.data) {
const options = res.data.map(item => ({
text: item.storeName || '-',
value: item.storeNo
}))
if (!keyword) {
this.setData({ trialStoreOptions: options })
}
return options
}
return []
})
},
// 获取驻店类型字典
loadResidentTypeOptions() {
if (this.data.residentTypeOptions.length > 0) {
return Promise.resolve(this.data.residentTypeOptions)
}
return getStaffDictListAPI({
businessCode: 'recruitment',
typeCode: 'store_staff_type'
}).then(res => {
if (res.code == 0 && res.data) {
const options = res.data.map(item => ({
text: item.itemName,
value: item.itemValue
}))
this.setData({ residentTypeOptions: options })
return options
}
return []
})
},
// 打开弹窗时并行加载基础选项
loadTrialPopupBaseData() {
wx.showLoading({ title: '加载中...', mask: true })
return Promise.all([
this.loadChannelOptions(),
this.loadTrialStoreOptions(),
this.loadResidentTypeOptions()
]).finally(() => {
wx.hideLoading()
})
},
// 拉取业务场景列表
fetchBizSceneList(storeNo, preSelectedCodes = null) {
const { recruitment } = this.data
if (!storeNo) {
this.setData({
showTrialPopup: true,
trialPopupType: 'add',
trialFormData: {
id: '',
personName: '',
phoneNumber: '',
channelType: '',
channelName: '',
trialTime: '',
displayTrialTime: ''
},
trialCurrentDate: new Date().getTime()
trialBizSceneOptions: [],
'trialFormData.bizSceneCodes': [],
'trialFormData.displayBizScene': ''
})
} else {
const item = e.currentTarget.dataset.item;
return Promise.resolve([])
}
if (!recruitment || !recruitment.businessType) {
wx.showToast({ title: '缺少业务类型信息', icon: 'none' })
return Promise.resolve([])
}
return getRecruitmentDemandSubSceneList({
merchantId: storeNo,
businessType: recruitment.businessType
}).then(res => {
if (res.code == 0 && res.data) {
const options = res.data.map(item => ({
text: this.getBizSceneName(item) || item.itemName || '-',
value: this.getBizSceneCode(item) || item.itemValue
}))
const validCodes = options.map(o => String(o.value))
let selectedCodes
if (preSelectedCodes !== null) {
selectedCodes = (preSelectedCodes || [])
.map(String)
.filter(code => validCodes.includes(code))
} else {
selectedCodes = options.map(o => o.value)
}
const displayBizScene = this.getBizSceneDisplay(selectedCodes, options)
this.setData({
trialBizSceneOptions: options,
'trialFormData.bizSceneCodes': selectedCodes,
'trialFormData.displayBizScene': displayBizScene
})
return options
}
this.setData({
trialBizSceneOptions: [],
'trialFormData.bizSceneCodes': [],
'trialFormData.displayBizScene': ''
})
return []
})
},
resolveStoreName(storeNo, storeName, storeOptions) {
if (storeName) return storeName
const matched = (storeOptions || []).find(o => String(o.value) === String(storeNo))
return matched ? matched.text : ''
},
resolveResidentTypeName(residentType, residentTypeName, residentOptions) {
if (residentTypeName) return residentTypeName
const matched = (residentOptions || []).find(o => String(o.value) === String(residentType))
return matched ? matched.text : ''
},
// 显示试岗弹窗
showTrialPopup(e) {
const type = e.currentTarget.dataset.type
this.loadTrialPopupBaseData().then(() => {
const { trialStoreOptions, residentTypeOptions } = this.data
if (type === 'add') {
this.setData({
showTrialPopup: true,
trialPopupType: 'add',
trialFormData: getEmptyTrialForm(),
trialBizSceneOptions: [],
trialCurrentDate: new Date().getTime()
})
return
}
const item = e.currentTarget.dataset.item
const bizSceneList = this.parseBizSceneInfo(item.bizSceneInfo)
const bizSceneCodes = bizSceneList.map(s => this.getBizSceneCode(s)).filter(Boolean)
const storeName = this.resolveStoreName(item.storeNo, item.storeName, trialStoreOptions)
const residentTypeName = this.resolveResidentTypeName(
item.residentType,
item.residentTypeName,
residentTypeOptions
)
this.setData({
showTrialPopup: true,
trialPopupType: 'edit',
......@@ -845,6 +1116,12 @@ showTrialTimePicker() {
id: item.id,
personName: item.personName || '',
phoneNumber: item.phoneNumber || '',
storeNo: item.storeNo || '',
storeName,
bizSceneCodes: [...bizSceneCodes],
displayBizScene: bizSceneList.map(s => this.getBizSceneName(s)).filter(Boolean).join('/'),
residentType: item.residentType || '',
residentTypeName,
channelType: item.channelType || '',
channelName: item.channelName || '',
trialTime: item.trialTime || '',
......@@ -852,11 +1129,18 @@ showTrialTimePicker() {
},
trialCurrentDate: item.trialTime ? new Date(item.trialTime).getTime() : new Date().getTime()
})
}
if (item.storeNo) {
this.fetchBizSceneList(item.storeNo, bizSceneCodes)
}
})
},
// 显示试岗处理弹窗
handleTrialDeal(e) {
const item = e.currentTarget.dataset.item || {}
const item = e.currentTarget.dataset.item || {}
console.log(item)
if(item.approvalResult == null){
return wx.showToast({ title: '审批中不允许处理', icon: 'none' })
}
const query = wx.createSelectorQuery()
query.selectViewport().scrollOffset()
query.exec(res => {
......@@ -879,7 +1163,16 @@ showTrialTimePicker() {
})
},
hideTrialPopup() {
this.setData({ showTrialPopup: false, isProcessingTrial: false })
if (this.data.trialSearchTimer) {
clearTimeout(this.data.trialSearchTimer)
}
this.setData({
showTrialPopup: false,
showChannelPopup: false,
isProcessingTrial: false,
trialPickerKeyWord: '',
trialSearchTimer: null
})
},
handleTrialInput(e) {
......@@ -912,46 +1205,244 @@ showTrialTimePicker() {
},
showChannelPicker() {
this.openTrialPicker(TRIAL_PICKER.CHANNEL)
},
showTrialSelectPicker(e) {
this.openTrialPicker(e.currentTarget.dataset.type)
},
openTrialPicker(type) {
const { trialFormData } = this.data
if (type === TRIAL_PICKER.BIZ_SCENE && !trialFormData.storeNo) {
return wx.showToast({ title: '请先选择试岗门店', icon: 'none' })
}
let options = []
let selectedOptions = []
let title = ''
let multi = false
let showSearch = false
if (type === TRIAL_PICKER.STORE) {
options = this.data.trialStoreOptions || []
title = '试岗门店'
showSearch = true
if (trialFormData.storeNo) {
selectedOptions = [trialFormData.storeNo]
}
} else if (type === TRIAL_PICKER.BIZ_SCENE) {
options = this.data.trialBizSceneOptions || []
title = '业务场景'
multi = true
selectedOptions = [...(trialFormData.bizSceneCodes || [])]
} else if (type === TRIAL_PICKER.RESIDENT_TYPE) {
options = this.data.residentTypeOptions || []
title = '驻店类型'
if (trialFormData.residentType) {
selectedOptions = [trialFormData.residentType]
}
} else if (type === TRIAL_PICKER.CHANNEL) {
options = this.data.channelOptions || []
title = '招聘渠道'
if (trialFormData.channelType) {
selectedOptions = [trialFormData.channelType]
}
}
const pickerOptions = options.map(option => ({
...option,
checked: selectedOptions.map(String).includes(String(option.value))
}))
this.setData({
showChannelPopup: true,
tempChannelType: this.data.trialFormData.channelType,
tempChannelName: this.data.trialFormData.channelName
trialPickerType: type,
trialPickerTitle: title,
trialPickerMulti: multi,
trialPickerShowSearch: showSearch,
trialPickerOptions: pickerOptions,
trialPickerFilteredOptions: pickerOptions,
trialSelectedOptions: selectedOptions,
trialPickerKeyWord: ''
})
},
hideChannelPicker() {
if (this.data.trialSearchTimer) {
clearTimeout(this.data.trialSearchTimer)
}
this.setData({
showChannelPopup: false
showChannelPopup: false,
trialPickerKeyWord: '',
trialSearchTimer: null
})
},
toggleChannelOption(e) {
const { value, name } = e.currentTarget.dataset;
this.setData({
tempChannelType: value,
tempChannelName: name
})
toggleTrialPickerOption(e) {
const value = e.currentTarget.dataset.value
const options = this.data.trialPickerOptions
const filteredOptions = this.data.trialPickerFilteredOptions
const { trialPickerMulti } = this.data
const originalIndex = options.findIndex(option => String(option.value) === String(value))
const filteredIndex = filteredOptions.findIndex(option => String(option.value) === String(value))
if (trialPickerMulti) {
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({ trialPickerOptions: options, trialPickerFilteredOptions: filteredOptions, trialSelectedOptions: selectedOptions })
} else {
options.forEach(option => {
option.checked = false
})
filteredOptions.forEach(option => {
option.checked = false
})
if (originalIndex >= 0) {
options[originalIndex].checked = true
if (filteredIndex >= 0) {
filteredOptions[filteredIndex].checked = true
}
}
this.setData({
trialPickerOptions: options,
trialPickerFilteredOptions: filteredOptions,
trialSelectedOptions: [value]
})
}
},
confirmChannelSelect() {
this.setData({
'trialFormData.channelType': this.data.tempChannelType,
'trialFormData.channelName': this.data.tempChannelName,
showChannelPopup: false
})
const {
trialPickerType,
trialSelectedOptions,
trialPickerOptions,
trialPickerMulti,
trialFormData
} = this.data
if (trialPickerMulti && trialSelectedOptions.length === 0) {
return wx.showToast({ title: '至少选择一项', icon: 'none' })
}
if (!trialPickerMulti && trialSelectedOptions.length === 0) {
return wx.showToast({ title: '请选择一项', icon: 'none' })
}
if (trialPickerType === TRIAL_PICKER.CHANNEL) {
const selectedValue = trialSelectedOptions[0] || ''
const selectedOption = trialPickerOptions.find(o => String(o.value) === String(selectedValue))
this.setData({
'trialFormData.channelType': selectedValue,
'trialFormData.channelName': selectedOption ? selectedOption.text : '',
showChannelPopup: false,
trialPickerKeyWord: ''
})
return
}
if (trialPickerType === TRIAL_PICKER.STORE) {
const selectedValue = trialSelectedOptions[0] || ''
const selectedOption = trialPickerOptions.find(o => String(o.value) === String(selectedValue))
const storeNo = selectedValue
const storeName = selectedOption ? selectedOption.text : ''
const storeChanged = String(trialFormData.storeNo) !== String(storeNo)
this.setData({
'trialFormData.storeNo': storeNo,
'trialFormData.storeName': storeName,
showChannelPopup: false,
trialPickerKeyWord: ''
})
if (storeChanged) {
this.fetchBizSceneList(storeNo)
}
return
}
if (trialPickerType === TRIAL_PICKER.BIZ_SCENE) {
const displayBizScene = this.getBizSceneDisplay(trialSelectedOptions, trialPickerOptions)
this.setData({
'trialFormData.bizSceneCodes': trialSelectedOptions,
'trialFormData.displayBizScene': displayBizScene,
showChannelPopup: false
})
return
}
if (trialPickerType === TRIAL_PICKER.RESIDENT_TYPE) {
const selectedValue = trialSelectedOptions[0] || ''
const selectedOption = trialPickerOptions.find(o => String(o.value) === String(selectedValue))
this.setData({
'trialFormData.residentType': selectedValue,
'trialFormData.residentTypeName': selectedOption ? selectedOption.text : '',
showChannelPopup: false
})
}
},
onTrialPickerSearchInput(e) {
const keyword = e.detail.value || ''
this.setData({ trialPickerKeyWord: keyword })
if (this.data.trialSearchTimer) {
clearTimeout(this.data.trialSearchTimer)
}
const timer = setTimeout(() => {
this.performTrialStoreSearch(keyword)
}, 500)
this.setData({ trialSearchTimer: timer })
},
handleTrialPickerSearchReset() {
this.setData({ trialPickerKeyWord: '' })
this.performTrialStoreSearch('')
},
performTrialStoreSearch(keyword) {
if (this.data.trialPickerType !== TRIAL_PICKER.STORE) return
wx.showLoading({ title: '搜索中...', mask: true })
this.loadTrialStoreOptions(keyword)
.then(options => {
const { trialSelectedOptions } = this.data
const processedOptions = options.map(option => ({
...option,
checked: trialSelectedOptions.map(String).includes(String(option.value))
}))
this.setData({
trialPickerOptions: processedOptions,
trialPickerFilteredOptions: processedOptions
})
})
.finally(() => {
wx.hideLoading()
})
},
// 提交试岗表单
confirmTrialProcess() {
if (this.data.isProcessingTrial) return;
const { trialFormData, trialPopupType } = this.data;
console.log(trialFormData,'trialFormData')
const { trialFormData, trialPopupType, trialBizSceneOptions } = this.data;
if (!trialFormData.personName.trim()) {
return wx.showToast({ title: '请输入人员姓名', icon: 'none' })
}
if (!/^(13\d|15\d|16\d|17\d|18\d|19\d|14\d)\d{8}$/.test(trialFormData.phoneNumber)) {
return wx.showToast({ title: '请输入正确的11位手机号', icon: 'none' })
}
if (!trialFormData.storeNo) {
return wx.showToast({ title: '请选择试岗门店', icon: 'none' })
}
if (!trialFormData.bizSceneCodes || trialFormData.bizSceneCodes.length === 0) {
return wx.showToast({ title: '请选择业务场景', icon: 'none' })
}
if (!trialFormData.residentType) {
return wx.showToast({ title: '请选择驻店类型', icon: 'none' })
}
if (!trialFormData.channelType) {
return wx.showToast({ title: '请选择招聘渠道', icon: 'none' })
}
......@@ -960,11 +1451,17 @@ showTrialTimePicker() {
}
this.setData({ isProcessingTrial: true })
const bizSceneInfoList = this.buildBizSceneInfo(trialFormData.bizSceneCodes, trialBizSceneOptions)
const params = {
demandId: this.curDataId,
personName:trialFormData.personName,
phoneNumber:trialFormData.phoneNumber,
storeNo: trialFormData.storeNo,
storeName: trialFormData.storeName,
bizSceneInfo: JSON.stringify(bizSceneInfoList),
residentType: trialFormData.residentType,
residentTypeName: trialFormData.residentTypeName,
trialTime:trialFormData.displayTrialTime,
channelType:trialFormData.channelType,
channelName:trialFormData.channelName
......
......@@ -197,16 +197,16 @@ page {
background: #ff4d4f1a;
}
// 面试通过状态
// 试岗通过状态
&.tag-pass {
color: #52c41a;
background: #52c41a1a;
color: #35C376;
background: #eaf9f1;;
}
// 面试不通过状态
// 试岗通驳回状态
&.tag-fail {
color: #ff4d4f;
background: #ff4d4f1a;
color: #F24724;
background: #f247241a;;
}
}
}
......@@ -672,6 +672,100 @@ page {
}
}
.trial_detail_popup {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
.title {
height: var(--fontSize112);
line-height: var(--fontSize110);
color: #292d33;
font-size: var(--fontSize32);
text-align: center;
flex-shrink: 0;
}
.trial_detail_scroll {
flex: 1;
overflow-y: auto;
padding: var(--fontSize32);
box-sizing: border-box;
}
.section_head {
font-size: var(--fontSize28);
color: #292d33;
font-size: 32rpx;
font-weight: 500;
padding: var(--fontSize24) 0 var(--fontSize36);
}
.detail_item {
display: flex;
align-items: flex-start;
font-size: var(--fontSize28);
line-height: 44rpx;
margin-bottom: var(--fontSize12);
.detail_label {
color: #999999;
flex-shrink: 0;
width: var(--fontSize168);
}
.detail_value {
color: #222222;
margin-left: var(--fontSize16);
word-break: break-all; /* 任意位置断行 */
white-space: normal;
}
}
.detail_item_result {
align-items: center;
.tag {
flex-shrink: 0;
display: inline-block;
padding: var(--fontSize4) var(--fontSize12);
font-size: var(--fontSize20);
border-radius: var(--fontSize4);
&.tag-pending {
color: #ff9d0a;
background: #fff5e6;
}
&.tag-pass {
color: #35C376;
background: #eaf9f1;
}
&.tag-fail {
color: #F24724;
background: #f247241a;
}
}
}
.btn_cancel{
background: #f4f5f7;
height: 80rpx;
border-radius: 20rpx;
color: #222222;
font-size: 32rpx;
font-weight: 400;
text-align: center;
line-height: 80rpx;
margin:0 40rpx;
}
}
// 时间选择器弹窗优化
.van-popup {
z-index: 10000 !important;
......@@ -740,6 +834,68 @@ page {
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%);
}
}
}
.empty-tip {
padding: var(--fontSize60) 0;
text-align: center;
color: #999;
font-size: var(--fontSize28);
}
.popup-options {
padding: var(--fontSize10) 0;
}
......
......@@ -2,8 +2,8 @@
<!-- 招聘详情 -->
<glsx-privacy appletName="招聘详情" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view
class="container_page {{ showPopup || timeShow||showTrialPopup ? 'page-locked' : '' }}"
style="{{ showPopup || timeShow ||showTrialPopup? 'top: -' + pageScrollTop + 'px;' : '' }}"
class="container_page {{ showPopup || timeShow || showTrialPopup || showTrialDetailPopup ? 'page-locked' : '' }}"
style="{{ showPopup || timeShow || showTrialPopup || showTrialDetailPopup ? 'top: -' + pageScrollTop + 'px;' : '' }}"
>
<!-- 顶部数据统计 -->
<view class="content_top">
......@@ -65,17 +65,17 @@
<block wx:if="{{ trialOnboardingPlans.length }}">
<block wx:for="{{ trialOnboardingPlans }}" wx:key="index">
<view class="card">
<view class="card_top white_bg">
<view class="card_top white_bg" bindtap="showTrialDetail" data-id="{{ item.id }}">
<image class="user_icon" src="{{ IMG_URL }}staff-icon.png" mode="aspectFill" />
<view class="user_info">
<view class="user_top">
<view class="name">{{item.personName }}</view>
<view class="tag tag-{{ item.processResult == null ? 'pending' : (item.processResult == 1 ? 'pass' : 'fail') }}">
{{ item.processResult == null ? '试岗中' : (item.processResult == 1 ? '通过' : '不通过') }}
<view class="tag tag-{{ item.approvalResult == null ? 'pending' : (item.approvalResult == 1 ? 'pass' : 'fail') }}">
{{ item.approvalResult == null ? '审批中' : (item.approvalResult == 1 ? '通过' : '驳回') }}
</view>
</view>
<view class="user_bottom" style="gap: 0; margin-top: 0;">
<view class="phone" data-phone="{{ item.phoneNumber }}" bind:tap="phoneCall">
<view class="phone" catchtap="phoneCall" data-phone="{{ item.phoneNumber }}">
<text class="phone_text"> {{ item.phoneNumber}}</text>
<image class="phone_icon" src="/packageWorkspace/pages/image/call-icon.png" mode="widthFix" />
</view>
......@@ -84,9 +84,9 @@
</view>
</view>
<view class="card_actions" wx:if="{{item.processResult === null}}">
<view wx:if="{{item.isUserAdd}}" class="btn btn_delete" bindtap="deleteTrialPlan" data-id="{{item.id}}">删除</view>
<view wx:if="{{item.isUserAdd}}" class="btn btn_edit" bindtap="showTrialPopup" data-type="edit" data-item="{{item}}">编辑</view>
<view class="btn btn_edit" bindtap="handleTrialDeal" data-type="edit" data-item="{{item}}">处理</view>
<view wx:if="{{item.isUserAdd}}" class="btn btn_delete" catchtap="deleteTrialPlan" data-id="{{item.id}}">删除</view>
<view wx:if="{{item.isUserAdd}}" class="btn btn_edit" catchtap="showTrialPopup" data-type="edit" data-item="{{item}}">编辑</view>
<view class="btn btn_edit" catchtap="handleTrialDeal" data-type="edit" data-item="{{item}}">处理</view>
</view>
</view>
</block>
......@@ -346,6 +346,38 @@
bind:cancel="calcelDate"
/>
</van-popup>
<!-- 试岗计划详情弹窗 -->
<van-popup show="{{ showTrialDetailPopup }}" position="bottom" bind:close="hideTrialDetailPopup" close-on-click-overlay="{{ false }}" custom-style="height: 85%; background-color: #fff; border-radius: 24rpx 24rpx 0 0; display: flex; flex-direction: column;" z-index="9998">
<view class="trial_detail_popup">
<view class="title">基础信息</view>
<scroll-view scroll-y class="trial_detail_scroll">
<view class="detail_card">
<view class="detail_item" wx:for="{{ trialDetailBasicFields }}" wx:key="field">
<text class="detail_label">{{ item.label }}</text>
<text class="detail_value">{{ trialDetailData[item.field] || '-' }}</text>
</view>
</view>
<view class="detail_section">
<view class="section_head">
<text>审批信息</text>
</view>
<view class="detail_card">
<view class="detail_item detail_item_result">
<text class="detail_label">结果</text>
<view class="tag tag-{{ trialDetailData.approvalTagClass }}">{{ trialDetailData.approvalText }}</view>
</view>
<view class="detail_item" wx:if="{{ trialDetailData.approvalResult == 0 && trialDetailData.approvalRemark }}">
<view class="detail_label">驳回原因</view>
<view class="detail_value">{{ trialDetailData.approvalRemark }}</view>
</view>
</view>
</view>
</scroll-view>
<view style="padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);" bindtap="hideTrialDetailPopup">
<view class="btn btn_cancel">关闭</view>
</view>
</view>
</van-popup>
<!-- 试岗表单弹窗 -->
<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%;">
......@@ -370,6 +402,7 @@
<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">
招聘渠道
......@@ -390,6 +423,36 @@
<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="showTrialSelectPicker" data-type="store">
<view class="{{ trialFormData.storeName ? 'time_text' : 'placeholder_text' }}">{{ trialFormData.storeName || '请选择试岗门店'}}</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="showTrialSelectPicker" data-type="bizScene">
<view class="{{ trialFormData.displayBizScene ? 'time_text' : 'placeholder_text' }}">{{ trialFormData.displayBizScene || '请选择业务场景'}}</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="showTrialSelectPicker" data-type="residentType">
<view class="{{ trialFormData.residentTypeName ? 'time_text' : 'placeholder_text' }}">{{ trialFormData.residentTypeName || '请选择驻店类型'}}</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);">
......@@ -399,30 +462,36 @@
</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">
<!-- 试岗选项选择弹窗(招聘渠道/试岗门店/业务场景/驻店类型) -->
<van-popup show="{{ showChannelPopup }}" position="bottom" overlay="{{ true }}" close-on-click-overlay="{{ false }}" lock-scroll="{{ false }}" 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 class="popup-title">选择{{ trialPickerTitle }}</view>
<view class="search-box" wx:if="{{ trialPickerShowSearch }}">
<view class="search-input">
<block wx:if="{{ !trialPickerKeyWord }}">
<image src="/images/search.png" class="search-icon" />
</block>
<input type="text" placeholder="搜索" class="input" confirm-type="search" value="{{ trialPickerKeyWord }}" placeholder-class="input-placeholder" bindinput="onTrialPickerSearchInput" />
<block wx:if="{{ trialPickerKeyWord }}">
<image src="/images/clear.png" class="search-clear" bindtap="handleTrialPickerSearchReset" />
</block>
</view>
</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="popup-options" wx:if="{{ trialPickerFilteredOptions.length > 0 }}">
<view class="option-item {{ item.checked ? 'checked' : '' }}" wx:for="{{ trialPickerFilteredOptions }}" wx:key="value" bindtap="toggleTrialPickerOption" data-value="{{ item.value }}">
<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 class="option-check {{ item.checked ? 'checked' : '' }}">
<text class="check-icon" wx:if="{{ item.checked }}">✓</text>
</view>
</view>
</view>
<view class="empty-tip" wx:else>
<text>无匹配结果</text>
</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>
......@@ -431,3 +500,8 @@
</view>
</view>
</van-popup>
<!-- 试岗时间选择器 -->
<van-popup show="{{ trialTimeShow }}" position="bottom" overlay="{{ false }}" close-on-click-overlay="{{ false }}" lock-scroll="{{ false }}" bind:close="cancelTrialDate" 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>
......@@ -12,19 +12,21 @@ const FORM_FIELDS = {
MERCHANT: 0, // 门店
SALES: 1, // 近一月新车销量
BRANDS: 2, // 主营品牌
ADDRESS: 3, // 门店地址
BUSINESS_TYPE: 4, // 业务类型
QUANTITY: 5, // 招聘数量
RECRUIT_TYPE: 6, // 招聘类型
URGENT: 7, // 是否急招
DESCRIPTION: 8 // 需求描述
ADDRESS: 3, // 所属省市
ADDRESS_DETAIL: 4, // 详细地址
BUSINESS_TYPE: 5, // 业务类型
QUANTITY: 6, // 招聘数量
RECRUIT_TYPE: 7, // 招聘类型
URGENT: 8, // 是否急招
DESCRIPTION: 9 // 需求描述
}
// 表单验证配置
const VALIDATION_CONFIG = {
[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.ADDRESS]: { tip: '请选择所属省市', required: false },
[FORM_FIELDS.ADDRESS_DETAIL]: { tip: '请输入详细地址', required: false },
[FORM_FIELDS.BUSINESS_TYPE]: { tip: '请选择业务类型', required: true },
[FORM_FIELDS.QUANTITY]: { tip: '请输入招聘数量', required: true },
[FORM_FIELDS.RECRUIT_TYPE]: { tip: '请选择招聘类型', required: true },
......@@ -34,6 +36,10 @@ const VALIDATION_CONFIG = {
}
}
// 详细地址:仅支持大小写字母、数字、中文及 、,/[]【】(提交时校验)
const ADDRESS_DETAIL_ALLOWED_REG = /^[a-zA-Z0-9\u4e00-\u9fa5、,\/\[\]【】]*$/
const ADDRESS_DETAIL_FORMAT_TIP = '详细地址仅支持大小写字母、数字、中文及、,/[]【】符号'
Page({
data: {
IMG_URL,
......@@ -41,13 +47,14 @@ Page({
{ id: 0, label: '门店名称', placeholder: '请选择招聘门店', options: [] },
{ id: 1, label: '近一月新车销量', placeholder: '请输入近一月新车销量' },
{ id: 2, label: '主营品牌', placeholder: '请选择主营品牌', options: [], multi: true },
{ id: 3, label: '门店地址', placeholder: '请选择门店地址' },
{ id: 4, label: '业务类型', placeholder: '请选择业务类型', options: [] },
{ id: 5, label: '招聘数量', placeholder: '请输入招聘数量' },
{ id: 6, label: '招聘类型', placeholder: '请选择招聘类型', options: [] },
{ id: 7, label: '是否急招', value: 0 },
{ id: 3, label: '所属省市', placeholder: '请选择所属省市' },
{ id: 4, label: '详细地址', placeholder: '请输入详细地址' },
{ id: 5, label: '业务类型', placeholder: '请选择业务类型', options: [] },
{ id: 6, label: '招聘数量', placeholder: '请输入招聘数量' },
{ id: 7, label: '招聘类型', placeholder: '请选择招聘类型', options: [] },
{ id: 8, label: '是否急招', value: 0 },
{
id: 8,
id: 9,
label: '需求描述',
placeholder: '请简单描述用人要求等信息',
textCount: 0
......@@ -63,7 +70,8 @@ Page({
inputValue: '',
keyWord: '', // 搜索关键词
searchTimer: null, // 防抖定时器
isDialogShowing: false, // Dialog显示状态
isDialogShowing: false, // Dialog显示状态
bySystemMerchant:false,
// 地址选择相关
regionData: [], // 原始的省市数据
regionPickerRange: [[], []], // pick-view 的列数据
......@@ -128,12 +136,15 @@ Page({
formList[FORM_FIELDS.ADDRESS].value = ''
formList[FORM_FIELDS.ADDRESS].displayValue = ''
formList[FORM_FIELDS.ADDRESS].otherValue = ''
formList[FORM_FIELDS.ADDRESS_DETAIL].value = ''
formList[FORM_FIELDS.ADDRESS_DETAIL].displayValue = ''
}
// 更新校验规则
VALIDATION_CONFIG[FORM_FIELDS.SALES].required = bySystemMerchant
VALIDATION_CONFIG[FORM_FIELDS.BRANDS].required = bySystemMerchant
VALIDATION_CONFIG[FORM_FIELDS.ADDRESS].required = bySystemMerchant
VALIDATION_CONFIG[FORM_FIELDS.ADDRESS_DETAIL].required = bySystemMerchant
this.setData({
bySystemMerchant,
......@@ -171,7 +182,7 @@ Page({
this.setData({ formList })
},
// 门店地址选择 (高德地图省市二级联动)
// 所属省市选择 (高德地图省市二级联动)
onRegionChange(e) {
const value = e.detail.value;
const { regionData, formList } = this.data;
......@@ -203,6 +214,15 @@ Page({
});
},
// 详细地址输入(未创建系统门店时)
onAddressDetailInput(e) {
const value = e.detail.value.substring(0, 60)
const formList = this.data.formList
formList[FORM_FIELDS.ADDRESS_DETAIL].value = value
formList[FORM_FIELDS.ADDRESS_DETAIL].displayValue = value
this.setData({ formList })
},
onRegionColumnChange(e) {
const { column, value } = e.detail;
if (column === 0) {
......@@ -225,7 +245,7 @@ Page({
// 如果是门店名称且勾选了未创建系统门店,则不弹出
if (label === '门店名称' && this.data.bySystemMerchant) return
if (label === '近一月新车销量' || label === '门店地址' || label === '需求描述' || label === '招聘数量' || label === '是否急招') return
if (label === '近一月新车销量' || label === '所属省市' || label === '详细地址' || label === '需求描述' || label === '招聘数量' || label === '是否急招') return
return this.showPopup(e)
},
......@@ -579,13 +599,18 @@ Page({
},
// 表单验证
validateForm() {
const { formList } = this.data
const { formList, bySystemMerchant } = this.data
for (let [index, config] of Object.entries(VALIDATION_CONFIG)) {
if (config.required && !formList[index].value) {
wx.showToast({ title: config.tip, icon: 'none', duration: 2000 })
return false
}
}
const addressDetail = formList[FORM_FIELDS.ADDRESS_DETAIL].value || ''
if (bySystemMerchant && addressDetail && !ADDRESS_DETAIL_ALLOWED_REG.test(addressDetail)) {
wx.showToast({ title: ADDRESS_DETAIL_FORMAT_TIP, icon: 'none', duration: 2000 })
return false
}
return true
},
......@@ -599,6 +624,7 @@ Page({
brand: bySystemMerchant ? formList[FORM_FIELDS.BRANDS].displayValue : null,
provinceCityCode:bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].value : null,
merchantAddress: bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].displayValue : null,
merchantAddressDetail: bySystemMerchant ? formList[FORM_FIELDS.ADDRESS_DETAIL].value : null,
province: bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].otherValue : null,
businessType: formList[FORM_FIELDS.BUSINESS_TYPE].value,
businessTypeName: formList[FORM_FIELDS.BUSINESS_TYPE].displayValue,
......@@ -775,7 +801,7 @@ Page({
try {
let requestParam = {
businessCode: 'recruitment', // 招聘模块相关字典固定穿recruitment
typeCode: index == 4 ? 'business_type' : 'recruitment_type' // 招聘模块内相关业务字典传对应值 ○business_type-业务类型○recruitment_type-招聘类型
typeCode: index == FORM_FIELDS.BUSINESS_TYPE ? 'business_type' : 'recruitment_type' // 招聘模块内相关业务字典传对应值 ○business_type-业务类型○recruitment_type-招聘类型
}
getStaffDictListAPI(requestParam)
.then(res => {
......
......@@ -13,7 +13,7 @@
</view>
<view class="form">
<block wx:for="{{ formList }}" wx:key="index">
<block wx:if="{{ index === 0 || index > 3 || (index > 0 && index <= 3 && bySystemMerchant) }}">
<block wx:if="{{ index === 0 || index > 4 || (index > 0 && index <= 4 && bySystemMerchant) }}">
<view class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}" bindtap="onFormItemTap" data-index="{{ index }}">
<view class="label">
{{item.label}}
......@@ -30,7 +30,7 @@
<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 === '门店地址' }}">
<view class="value" wx:elif="{{ item.label === '所属省市' }}">
<picker mode="multiSelector" range="{{ regionPickerRange }}" value="{{ regionPickerValue }}" bindchange="onRegionChange" bindcolumnchange="onRegionColumnChange">
<view class="picker-inner">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
......@@ -39,11 +39,13 @@
</view>
</picker>
</view>
<view class="value" wx:elif="{{ item.label === '详细地址' }}">
<input class="number-input" type="text" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28);text-align:right;" value="{{ item.displayValue }}" bindinput="onAddressDetailInput" maxlength="60" />
</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 !== '是否急招' }}">
<view class="value" wx:elif="{{ item.label !== '需求描述' && 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" />
......
......@@ -13,7 +13,7 @@ module.exports = {
/**小程序新增员工*/
createStaffAccount(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.staffBaseInfo.account.merchant.assign', params)
return api.post('dj.api.smartcarlife.staffBaseInfo.account.approval.add', params)
},
/** 员工日报配置列表查询 */
......
......@@ -11,6 +11,14 @@
{
"value": ".vscode",
"type": "folder"
},
{
"value": ".git",
"type": "folder"
},
{
"value": ".cursor",
"type": "folder"
}
],
"include": []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!