Commit 1d4314b7 by Lin

重构 recruitInsert.js 和 recruitInsert.wxml,以简化表单字段和验证逻辑。注释掉未使用的字段,并为潜在客户店铺添加了模拟数据。…

…更新了 UI 元素,使招聘流程更加清晰明了。
1 parent e447400b
...@@ -5,28 +5,28 @@ import { ...@@ -5,28 +5,28 @@ import {
getDemandStoreListAPI, getDemandStoreListAPI,
getStaffDictListAPI, getStaffDictListAPI,
addStaffDictListAPI, addStaffDictListAPI,
getCarBrandList // getCarBrandList
} from '../api' } from '../api'
// 表单字段配置 // 表单字段配置
const FORM_FIELDS = { const FORM_FIELDS = {
MERCHANT: 0, // 门店 MERCHANT: 0, // 门店
SALES: 1, // 近一月新车销量 // SALES: 1, // 近一月新车销量
BRANDS: 2, // 主营品牌 // BRANDS: 1, // 主营品牌
ADDRESS: 3, // 所属省市 // ADDRESS: 3, // 所属省市
ADDRESS_DETAIL: 4, // 详细地址 // ADDRESS_DETAIL: 4, // 详细地址
BUSINESS_TYPE: 5, // 业务类型 BUSINESS_TYPE: 1, // 业务类型
QUANTITY: 6, // 招聘数量 QUANTITY: 2, // 招聘数量
RECRUIT_TYPE: 7, // 招聘类型 RECRUIT_TYPE: 3, // 招聘类型
URGENT: 8, // 是否急招 URGENT: 4, // 是否急招
DESCRIPTION: 9 // 需求描述 DESCRIPTION: 5 // 需求描述
} }
// 表单验证配置 // 表单验证配置
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.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 },
...@@ -36,15 +36,43 @@ const VALIDATION_CONFIG = { ...@@ -36,15 +36,43 @@ const VALIDATION_CONFIG = {
} }
} }
// 潜客门店列表(临时硬编码,后续替换为接口)
const MOCK_POTENTIAL_CUSTOMER_STORES = [
{
id: 1001,
storeName: 'XX汽车服务中心',
merchantId: 5001,
isBind: 1,
cooperationMode: 1,
provinceName: '广东省',
city: '广州市',
districtName: '天河区',
address: '广州市天河区XXX路XX号',
potentialCustomersStatus: 1,
followUpPersonName: '张三',
visitTimes: 3,
firstVisitTime: '03-15',
lastVisitContent: '初步沟通合作意向',
merchantName: 'XX汽车服务有限公司',
isSelf: 1,
createdDate: '2026-03-10 09:30:00',
businessTypeList: [{ businessType: 1 }, { businessType: 2 }],
brandList: [{ mainBrandName: '品牌A', subBrandName: '型号A1' }],
personnelInfoList: [
{ personnelType: 1, personnelName: '李四', personnelPhone: '13800138000' }
]
}
]
Page({ Page({
data: { data: {
IMG_URL, IMG_URL,
formList: [ formList: [
{ 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: '请输入详细地址' }, // { id: 4, label: '详细地址', placeholder: '请输入详细地址' },
{ id: 5, label: '业务类型', placeholder: '请选择业务类型', options: [] }, { id: 5, label: '业务类型', placeholder: '请选择业务类型', options: [] },
{ id: 6, label: '招聘数量', placeholder: '请输入招聘数量' }, { id: 6, label: '招聘数量', placeholder: '请输入招聘数量' },
{ id: 7, label: '招聘类型', placeholder: '请选择招聘类型', options: [] }, { id: 7, label: '招聘类型', placeholder: '请选择招聘类型', options: [] },
...@@ -69,51 +97,51 @@ Page({ ...@@ -69,51 +97,51 @@ Page({
isDialogShowing: false, // Dialog显示状态 isDialogShowing: false, // Dialog显示状态
bySystemMerchant:false, bySystemMerchant:false,
// 地址选择相关 // 地址选择相关
regionData: [], // 原始的省市数据 // regionData: [], // 原始的省市数据
regionPickerRange: [[], []], // pick-view 的列数据 // regionPickerRange: [[], []], // pick-view 的列数据
regionPickerValue: [0, 0] // picker-view 的选中索引 // regionPickerValue: [0, 0] // picker-view 的选中索引
}, },
onLoad() { onLoad() {
this.initRegionData() // this.initRegionData()
}, },
// 获取高德省市数据 // 获取高德省市数据
initRegionData() { // initRegionData() {
wx.request({ // wx.request({
url: 'https://eshield.didihu.com.cn/nesi/apiRegion/search?keyword=中国&extensions_code=1&sub_admin=2', // url: 'https://eshield.didihu.com.cn/nesi/apiRegion/search?keyword=中国&extensions_code=1&sub_admin=2',
method: 'GET', // method: 'GET',
success: (res) => { // success: (res) => {
const obj = JSON.parse(res.data.data) // const obj = JSON.parse(res.data.data)
if (obj && obj.status == '0' && obj.districts.length > 0) { // if (obj && obj.status == '0' && obj.districts.length > 0) {
const countryData = obj.districts[0].districts || []; // const countryData = obj.districts[0].districts || [];
//
// 格式化省份数据 // // 格式化省份数据
const provinces = countryData.map(p => ({ // const provinces = countryData.map(p => ({
name: p.name, // name: p.name,
adcode: p.code, // adcode: p.code,
cities: p.districts ? p.districts.map(c => ({ // cities: p.districts ? p.districts.map(c => ({
name: c.name, // name: c.name,
adcode: c.code // adcode: c.code
})) : [] // })) : []
})); // }));
//
// 初始化 picker-view 的第一列(省份)和第二列(第一个省份对应的城市) // // 初始化 picker-view 的第一列(省份)和第二列(第一个省份对应的城市)
const provinceNames = provinces.map(p => p.name); // const provinceNames = provinces.map(p => p.name);
const cityNames = provinces.length > 0 ? provinces[0].cities.map(c => c.name) : []; // const cityNames = provinces.length > 0 ? provinces[0].cities.map(c => c.name) : [];
//
this.setData({ // this.setData({
regionData: provinces, // regionData: provinces,
regionPickerRange: [provinceNames, cityNames], // regionPickerRange: [provinceNames, cityNames],
regionPickerValue: [0, 0] // regionPickerValue: [0, 0]
}); // });
} // }
}, // },
fail: (err) => { // fail: (err) => {
console.error('获取省市数据失败', err); // console.error('获取省市数据失败', err);
} // }
}); // });
}, // },
// 勾选/取消勾选“未创建系统门店” // 勾选/取消勾选“未创建系统门店”
toggleUncreatedStore() { toggleUncreatedStore() {
const bySystemMerchant = !this.data.bySystemMerchant const bySystemMerchant = !this.data.bySystemMerchant
...@@ -122,25 +150,29 @@ Page({ ...@@ -122,25 +150,29 @@ Page({
// 切换时清空门店相关数据 // 切换时清空门店相关数据
formList[FORM_FIELDS.MERCHANT].value = '' formList[FORM_FIELDS.MERCHANT].value = ''
formList[FORM_FIELDS.MERCHANT].displayValue = '' formList[FORM_FIELDS.MERCHANT].displayValue = ''
formList[FORM_FIELDS.MERCHANT].options = []
formList[FORM_FIELDS.MERCHANT].placeholder = bySystemMerchant
? '请选择潜客门店'
: '请选择招聘门店'
if (!bySystemMerchant) { if (!bySystemMerchant) {
// 隐藏的字段清空 // 隐藏的字段清空
formList[FORM_FIELDS.SALES].value = '' // formList[FORM_FIELDS.SALES].value = ''
formList[FORM_FIELDS.SALES].displayValue = '' // formList[FORM_FIELDS.SALES].displayValue = ''
formList[FORM_FIELDS.BRANDS].value = '' // formList[FORM_FIELDS.BRANDS].value = ''
formList[FORM_FIELDS.BRANDS].displayValue = '' // formList[FORM_FIELDS.BRANDS].displayValue = ''
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].value = ''
formList[FORM_FIELDS.ADDRESS_DETAIL].displayValue = '' // 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 // VALIDATION_CONFIG[FORM_FIELDS.ADDRESS_DETAIL].required = bySystemMerchant
this.setData({ this.setData({
bySystemMerchant, bySystemMerchant,
...@@ -158,90 +190,89 @@ Page({ ...@@ -158,90 +190,89 @@ Page({
}, },
// 近一月新车销量输入 // 近一月新车销量输入
onSalesInput(e) { // onSalesInput(e) {
let value = e.detail.value // let value = e.detail.value
const formList = this.data.formList // const formList = this.data.formList
value = value.replace(/\D/g, '') // value = value.replace(/\D/g, '')
if (value.length > 1 && value.startsWith('0')) { // if (value.length > 1 && value.startsWith('0')) {
value = value.replace(/^0+/, '') // value = value.replace(/^0+/, '')
} // }
if (value !== '') { // if (value !== '') {
let numValue = parseInt(value, 10) // let numValue = parseInt(value, 10)
if (numValue > 9999) { // if (numValue > 9999) {
value = '9999' // value = '9999'
} else if (numValue < 1) { // } else if (numValue < 1) {
value = '1' // value = '1'
} // }
} // }
formList[FORM_FIELDS.SALES].value = value // formList[FORM_FIELDS.SALES].value = value
formList[FORM_FIELDS.SALES].displayValue = value // formList[FORM_FIELDS.SALES].displayValue = value
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;
//
const provinceIndex = value[0] || 0; // const provinceIndex = value[0] || 0;
const cityIndex = value[1] || 0; // const cityIndex = value[1] || 0;
//
if (!regionData || regionData.length === 0) return; // if (!regionData || regionData.length === 0) return;
//
const province = regionData[provinceIndex]; // const province = regionData[provinceIndex];
const city = province.cities[cityIndex]; // const city = province.cities[cityIndex];
//
const provinceName = province ? province.name : ''; // const provinceName = province ? province.name : '';
const cityName = city ? city.name : ''; // const cityName = city ? city.name : '';
const provinceCode = province ? province.adcode : ''; // const provinceCode = province ? province.adcode : '';
const cityCode = city ? city.adcode : ''; // const cityCode = city ? city.adcode : '';
//
// const addressStr = provinceName === cityName ? provinceName : `${provinceName}${cityName}`; // // const addressStr = provinceName === cityName ? provinceName : `${provinceName}${cityName}`;
const addressStr = `${provinceName}${cityName}`; // const addressStr = `${provinceName}${cityName}`;
const addressCode = `${provinceCode}/${cityCode}`; // const addressCode = `${provinceCode}/${cityCode}`;
//
formList[FORM_FIELDS.ADDRESS].value = addressCode; // formList[FORM_FIELDS.ADDRESS].value = addressCode;
formList[FORM_FIELDS.ADDRESS].displayValue = addressStr; // formList[FORM_FIELDS.ADDRESS].displayValue = addressStr;
formList[FORM_FIELDS.ADDRESS].otherValue = provinceName; // formList[FORM_FIELDS.ADDRESS].otherValue = provinceName;
//
this.setData({ // this.setData({
formList, // formList,
regionPickerValue: value // regionPickerValue: value
}); // });
}, // },
// 详细地址输入(未创建系统门店时) // 详细地址输入(未创建系统门店时)
onAddressDetailInput(e) { // onAddressDetailInput(e) {
const value = e.detail.value.substring(0, 60) // const value = e.detail.value.substring(0, 60)
const formList = this.data.formList // const formList = this.data.formList
formList[FORM_FIELDS.ADDRESS_DETAIL].value = value // formList[FORM_FIELDS.ADDRESS_DETAIL].value = value
formList[FORM_FIELDS.ADDRESS_DETAIL].displayValue = value // formList[FORM_FIELDS.ADDRESS_DETAIL].displayValue = value
this.setData({ formList }) // this.setData({ formList })
}, // },
onRegionColumnChange(e) { // onRegionColumnChange(e) {
const { column, value } = e.detail; // const { column, value } = e.detail;
if (column === 0) { // if (column === 0) {
const { regionData, regionPickerRange } = this.data; // const { regionData, regionPickerRange } = this.data;
const provinceIndex = value; // const provinceIndex = value;
const province = regionData[provinceIndex]; // const province = regionData[provinceIndex];
const cityNames = province && province.cities ? province.cities.map(c => c.name) : []; // const cityNames = province && province.cities ? province.cities.map(c => c.name) : [];
//
this.setData({ // this.setData({
'regionPickerRange[1]': cityNames, // 'regionPickerRange[1]': cityNames,
'regionPickerValue[0]': value, // 'regionPickerValue[0]': value,
'regionPickerValue[1]': 0 // 'regionPickerValue[1]': 0
}); // });
} // }
}, // },
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 label = item && item.label const label = item && item.label
// 如果是门店名称且勾选了未创建系统门店,则不弹出 if (label === '需求描述' || label === '招聘数量' || label === '是否急招') return
if (label === '门店名称' && this.data.bySystemMerchant) return // if (label === '近一月新车销量' || label === '所属省市' || label === '详细地址' || label === '需求描述' || label === '招聘数量' || label === '是否急招') return
if (label === '近一月新车销量' || label === '所属省市' || label === '详细地址' || label === '需求描述' || label === '招聘数量' || label === '是否急招') return
return this.showPopup(e) return this.showPopup(e)
}, },
...@@ -255,10 +286,13 @@ Page({ ...@@ -255,10 +286,13 @@ Page({
wx.showLoading({ title: '加载中...', mask: true }) wx.showLoading({ title: '加载中...', mask: true })
try { try {
if (index === 0) { if (index === 0) {
// 获取全部门店列表(不传关键词) if (this.data.bySystemMerchant) {
await this.getPotentialCustomerStoreList()
} else {
await this.getDemandStoreList() await this.getDemandStoreList()
} else if (index === FORM_FIELDS.BRANDS) { }
await this.getBrandList() // } else if (index === FORM_FIELDS.BRANDS) {
// await this.getBrandList()
} else { } else {
await this.getDictList(index) await this.getDictList(index)
} }
...@@ -364,16 +398,38 @@ Page({ ...@@ -364,16 +398,38 @@ Page({
async performSearch(keyword) { async performSearch(keyword) {
const { currentIndex } = this.data const { currentIndex } = this.data
if (currentIndex === FORM_FIELDS.BRANDS) { // if (currentIndex === FORM_FIELDS.BRANDS) {
// 主营品牌本地过滤 // // 主营品牌本地过滤
const { options } = this.data // const { options } = this.data
const filteredOptions = keyword ? options.filter(option => option.text.includes(keyword)) : options // const filteredOptions = keyword ? options.filter(option => option.text.includes(keyword)) : options
this.setData({ filteredOptions }) // this.setData({ filteredOptions })
// return
// }
if (currentIndex !== 0) {
return return
} }
// 只有在门店选择时才进行远程搜索 // 潜客门店:本地过滤
if (currentIndex !== 0) { if (this.data.bySystemMerchant) {
const options = await this.getPotentialCustomerStoreList(keyword)
const processedOptions = options.map(option => ({
...option,
checked: false
}))
const { selectedOptions } = this.data
if (selectedOptions.length > 0) {
const selectedValue = selectedOptions[0]
processedOptions.forEach(option => {
if (option.value === selectedValue) {
option.checked = true
}
})
}
this.setData({
options: processedOptions,
filteredOptions: processedOptions
})
return return
} }
...@@ -610,13 +666,13 @@ Page({ ...@@ -610,13 +666,13 @@ Page({
const { formList, bySystemMerchant } = this.data const { formList, bySystemMerchant } = this.data
return { return {
merchantId: bySystemMerchant ? null : formList[FORM_FIELDS.MERCHANT].value, merchantId: bySystemMerchant ? null : formList[FORM_FIELDS.MERCHANT].value,
merchantName: bySystemMerchant ? formList[FORM_FIELDS.MERCHANT].value : formList[FORM_FIELDS.MERCHANT].displayValue, merchantName: formList[FORM_FIELDS.MERCHANT].displayValue,
salesVolume: bySystemMerchant ? formList[FORM_FIELDS.SALES].value : null, // salesVolume: bySystemMerchant ? formList[FORM_FIELDS.SALES].value : null,
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, // 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,
recruitmentQuantity: formList[FORM_FIELDS.QUANTITY].value, recruitmentQuantity: formList[FORM_FIELDS.QUANTITY].value,
...@@ -720,34 +776,58 @@ Page({ ...@@ -720,34 +776,58 @@ Page({
navigateToResult() { navigateToResult() {
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 搜索关键词(可选)
*/ */
getBrandList() { getPotentialCustomerStoreList(keyword = '') {
return new Promise((resolve, reject) => { return new Promise(resolve => {
getCarBrandList({}) let list = MOCK_POTENTIAL_CUSTOMER_STORES
.then(res => { if (keyword) {
let { code, data } = res list = list.filter(item => item.storeName.includes(keyword))
if (code == 0 && data) { }
const options = list.map(item => ({
const options = data.map(item => ({ text: item.storeName,
text: item.brandName || item.name || '--', value: item.id,
value: item.brandId || item.id merchantId: item.merchantId
})) }))
if (!keyword) {
this.setData({ this.setData({
[`formList[${FORM_FIELDS.BRANDS}].options`]: options 'formList[0].options': options
}) })
resolve(options)
} else {
reject(new Error('获取品牌列表失败'))
} }
}) resolve(options)
.catch(err => {
console.error('获取品牌列表失败', err)
reject(err)
})
}) })
}, },
/** /**
* 动态获取门店列表 * 动态获取门店列表
* @param {String} keyword 搜索关键词(可选) * @param {String} keyword 搜索关键词(可选)
......
...@@ -7,27 +7,24 @@ ...@@ -7,27 +7,24 @@
<view class="checkbox {{ bySystemMerchant ? 'checked' : '' }}"> <view class="checkbox {{ bySystemMerchant ? 'checked' : '' }}">
<van-icon wx:if="{{ bySystemMerchant }}" name="success" size="12px" color="#fff" /> <van-icon wx:if="{{ bySystemMerchant }}" name="success" size="12px" color="#fff" />
</view> </view>
<text class="checkbox-text">未创建系统门店</text> <!-- <text class="checkbox-text">未创建系统门店</text> -->
<text class="checkbox-text">选择潜客门店</text>
</view> </view>
</view> </view>
</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 > 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}}
<text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text> <text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text>
</view> </view>
<view class="value" wx:if="{{ item.label === '门店名称' && bySystemMerchant }}"> <view class="value" wx:if="{{ item.label === '门店名称' }}">
<input class="number-input" type="text" placeholder="请输入门店名称" placeholder-style="color: #BBBBBB;font-size:var(--fontSize28);text-align:right;" value="{{ item.displayValue }}" bindinput="onStoreNameInput" maxlength="50" />
</view>
<view class="value" wx:elif="{{ item.label === '门店名称' && !bySystemMerchant }}">
<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>
<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 === '所属省市' }}">
...@@ -41,11 +38,11 @@ ...@@ -41,11 +38,11 @@
</view> </view>
<view class="value" wx:elif="{{ item.label === '详细地址' }}"> <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" /> <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> -->
<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 !== '是否急招' && item.label !== '详细地址' }}"> <view class="value" wx:elif="{{ item.label !== '需求描述' && item.label !== '招聘数量' && item.label !== '是否急招' }}">
<text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text> <text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
<text class="placeholder" wx:else>{{item.placeholder}}</text> <text class="placeholder" wx:else>{{item.placeholder}}</text>
<image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" /> <image class="arrow_right" src="/packageWorkspace/pages/image/arrow-right.png" mode="aspectFill" />
...@@ -62,7 +59,6 @@ ...@@ -62,7 +59,6 @@
</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>
...@@ -75,7 +71,7 @@ ...@@ -75,7 +71,7 @@
<!-- 固定顶部区域 --> <!-- 固定顶部区域 -->
<view class="popup-fixed-top"> <view class="popup-fixed-top">
<view class="popup-title">选择{{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" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!