Commit 8b74cb33 by wangzhihui

feat: 新增试岗相关接口及详情弹窗,优化招聘表单字段

1 parent 3061a629
...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd"; ...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2; let index = 1;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
...@@ -115,6 +115,35 @@ module.exports = { ...@@ -115,6 +115,35 @@ module.exports = {
) )
}, },
// 试岗门店列表
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) { processTrialPlanAPI(data) {
......
...@@ -197,16 +197,16 @@ page { ...@@ -197,16 +197,16 @@ page {
background: #ff4d4f1a; background: #ff4d4f1a;
} }
// 面试通过状态 // 试岗通过状态
&.tag-pass { &.tag-pass {
color: #52c41a; color: #35C376;
background: #52c41a1a; background: #eaf9f1;;
} }
// 面试不通过状态 // 试岗通驳回状态
&.tag-fail { &.tag-fail {
color: #ff4d4f; color: #F24724;
background: #ff4d4f1a; background: #f247241a;;
} }
} }
} }
...@@ -672,6 +672,101 @@ page { ...@@ -672,6 +672,101 @@ 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);
height:44rpx;
.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 { .van-popup {
z-index: 10000 !important; z-index: 10000 !important;
...@@ -740,6 +835,68 @@ page { ...@@ -740,6 +835,68 @@ page {
border-bottom: var(--fontSize2) solid #E8E8EA; 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 { .popup-options {
padding: var(--fontSize10) 0; padding: var(--fontSize10) 0;
} }
......
...@@ -12,19 +12,21 @@ const FORM_FIELDS = { ...@@ -12,19 +12,21 @@ const FORM_FIELDS = {
MERCHANT: 0, // 门店 MERCHANT: 0, // 门店
SALES: 1, // 近一月新车销量 SALES: 1, // 近一月新车销量
BRANDS: 2, // 主营品牌 BRANDS: 2, // 主营品牌
ADDRESS: 3, // 门店地址 ADDRESS: 3, // 所属省市
BUSINESS_TYPE: 4, // 业务类型 ADDRESS_DETAIL: 4, // 详细地址
QUANTITY: 5, // 招聘数量 BUSINESS_TYPE: 5, // 业务类型
RECRUIT_TYPE: 6, // 招聘类型 QUANTITY: 6, // 招聘数量
URGENT: 7, // 是否急招 RECRUIT_TYPE: 7, // 招聘类型
DESCRIPTION: 8 // 需求描述 URGENT: 8, // 是否急招
DESCRIPTION: 9 // 需求描述
} }
// 表单验证配置 // 表单验证配置
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.SALES]: { tip: '请输入近一月新车销量', required: false },
[FORM_FIELDS.BRANDS]: { 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.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 },
...@@ -41,13 +43,14 @@ Page({ ...@@ -41,13 +43,14 @@ Page({
{ id: 0, label: '门店名称', placeholder: '请选择招聘门店', options: [] }, { id: 0, label: '门店名称', placeholder: '请选择招聘门店', options: [] },
{ id: 1, label: '近一月新车销量', placeholder: '请输入近一月新车销量' }, { id: 1, label: '近一月新车销量', placeholder: '请输入近一月新车销量' },
{ id: 2, label: '主营品牌', placeholder: '请选择主营品牌', options: [], multi: true }, { id: 2, label: '主营品牌', placeholder: '请选择主营品牌', options: [], multi: true },
{ id: 3, label: '门店地址', placeholder: '请选择门店地址' }, { id: 3, label: '所属省市', placeholder: '请选择所属省市' },
{ id: 4, label: '业务类型', placeholder: '请选择业务类型', options: [] }, { id: 4, label: '详细地址', placeholder: '请输入详细地址' },
{ id: 5, label: '招聘数量', placeholder: '请输入招聘数量' }, { id: 5, label: '业务类型', placeholder: '请选择业务类型', options: [] },
{ id: 6, label: '招聘类型', placeholder: '请选择招聘类型', options: [] }, { id: 6, label: '招聘数量', placeholder: '请输入招聘数量' },
{ id: 7, label: '是否急招', value: 0 }, { id: 7, label: '招聘类型', placeholder: '请选择招聘类型', options: [] },
{ id: 8, label: '是否急招', value: 0 },
{ {
id: 8, id: 9,
label: '需求描述', label: '需求描述',
placeholder: '请简单描述用人要求等信息', placeholder: '请简单描述用人要求等信息',
textCount: 0 textCount: 0
...@@ -128,12 +131,15 @@ Page({ ...@@ -128,12 +131,15 @@ Page({
formList[FORM_FIELDS.ADDRESS].value = '' formList[FORM_FIELDS.ADDRESS].value = ''
formList[FORM_FIELDS.ADDRESS].displayValue = '' formList[FORM_FIELDS.ADDRESS].displayValue = ''
formList[FORM_FIELDS.ADDRESS].otherValue = '' 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.SALES].required = bySystemMerchant
VALIDATION_CONFIG[FORM_FIELDS.BRANDS].required = bySystemMerchant VALIDATION_CONFIG[FORM_FIELDS.BRANDS].required = bySystemMerchant
VALIDATION_CONFIG[FORM_FIELDS.ADDRESS].required = bySystemMerchant VALIDATION_CONFIG[FORM_FIELDS.ADDRESS].required = bySystemMerchant
VALIDATION_CONFIG[FORM_FIELDS.ADDRESS_DETAIL].required = bySystemMerchant
this.setData({ this.setData({
bySystemMerchant, bySystemMerchant,
...@@ -171,7 +177,7 @@ Page({ ...@@ -171,7 +177,7 @@ Page({
this.setData({ formList }) this.setData({ formList })
}, },
// 门店地址选择 (高德地图省市二级联动) // 所属省市选择 (高德地图省市二级联动)
onRegionChange(e) { onRegionChange(e) {
const value = e.detail.value; const value = e.detail.value;
const { regionData, formList } = this.data; const { regionData, formList } = this.data;
...@@ -203,6 +209,15 @@ Page({ ...@@ -203,6 +209,15 @@ Page({
}); });
}, },
// 详细地址输入(未创建系统门店时)
onAddressDetailInput(e) {
const value = e.detail.value.trim().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) { onRegionColumnChange(e) {
const { column, value } = e.detail; const { column, value } = e.detail;
if (column === 0) { if (column === 0) {
...@@ -225,7 +240,7 @@ Page({ ...@@ -225,7 +240,7 @@ Page({
// 如果是门店名称且勾选了未创建系统门店,则不弹出 // 如果是门店名称且勾选了未创建系统门店,则不弹出
if (label === '门店名称' && this.data.bySystemMerchant) return 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) return this.showPopup(e)
}, },
...@@ -599,6 +614,7 @@ Page({ ...@@ -599,6 +614,7 @@ Page({
brand: bySystemMerchant ? formList[FORM_FIELDS.BRANDS].displayValue : null, brand: bySystemMerchant ? formList[FORM_FIELDS.BRANDS].displayValue : null,
provinceCityCode:bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].value : null, provinceCityCode:bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].value : null,
merchantAddress: bySystemMerchant ? formList[FORM_FIELDS.ADDRESS].displayValue : 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, 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,
...@@ -775,7 +791,7 @@ Page({ ...@@ -775,7 +791,7 @@ Page({
try { try {
let requestParam = { let requestParam = {
businessCode: 'recruitment', // 招聘模块相关字典固定穿recruitment 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) getStaffDictListAPI(requestParam)
.then(res => { .then(res => {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
<view class="form"> <view class="form">
<block wx:for="{{ formList }}" wx:key="index"> <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="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}" bindtap="onFormItemTap" data-index="{{ index }}">
<view class="label"> <view class="label">
{{item.label}} {{item.label}}
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<view class="value" wx:elif="{{ item.label === '近一月新车销量' }}"> <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" /> <input class="number-input" type="number" placeholder="{{ item.placeholder }}" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28)" value="{{ item.displayValue }}" bindinput="onSalesInput" />
</view> </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"> <picker mode="multiSelector" range="{{ regionPickerRange }}" value="{{ regionPickerValue }}" bindchange="onRegionChange" bindcolumnchange="onRegionColumnChange">
<view class="picker-inner"> <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>
...@@ -39,11 +39,13 @@ ...@@ -39,11 +39,13 @@
</view> </view>
</picker> </picker>
</view> </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 === '是否急招' }}"> <view class="value" wx:elif="{{ item.label === '是否急招' }}">
<switch checked="{{ switch1Checked }}" bindchange="switch1Change" /> <switch checked="{{ switch1Checked }}" bindchange="switch1Change" />
</view> </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="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" />
......
...@@ -187,7 +187,7 @@ Page({ ...@@ -187,7 +187,7 @@ 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,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!