|
|
|
@ -9,83 +9,44 @@ |
|
|
|
<text style="color: #BD3624;">*</text> |
|
|
|
</view> |
|
|
|
<view class="form-sheet-cell"> |
|
|
|
<input type="text" class="title-input"/> |
|
|
|
<input type="text" |
|
|
|
v-model="form.title" |
|
|
|
class="title-input"/> |
|
|
|
</view> |
|
|
|
|
|
|
|
<uv-cell |
|
|
|
title="工作地点" |
|
|
|
rightIconStyle="fontSize: 30rpx;" |
|
|
|
value="请选择招工地点" |
|
|
|
:value="form.address || '请选择招工地点'" |
|
|
|
@click="selectAddr" |
|
|
|
isLink |
|
|
|
></uv-cell> |
|
|
|
|
|
|
|
<uv-cell |
|
|
|
title="所属工种" |
|
|
|
title="学历要求" |
|
|
|
rightIconStyle="fontSize: 30rpx;" |
|
|
|
value="请选择所属工种" |
|
|
|
:value="form.school || '请选择学历要求'" |
|
|
|
@click="openPicker('school')" |
|
|
|
isLink |
|
|
|
></uv-cell> |
|
|
|
|
|
|
|
<!-- <view class="form-sheet-cell"> |
|
|
|
<view class="label"> |
|
|
|
工作地点 |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
请选择招工地点 |
|
|
|
</view> |
|
|
|
<view class="right-icon"> |
|
|
|
<uv-icon |
|
|
|
name="arrow-right" |
|
|
|
></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="form-sheet-cell"> |
|
|
|
<view class="label"> |
|
|
|
学历要求 |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
请选择学历要求 |
|
|
|
</view> |
|
|
|
<view class="right-icon"> |
|
|
|
<uv-icon |
|
|
|
name="arrow-right" |
|
|
|
></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="form-sheet-cell"> |
|
|
|
<view class="label"> |
|
|
|
工龄要求 |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
请选择工龄要求 |
|
|
|
</view> |
|
|
|
<view class="right-icon"> |
|
|
|
<uv-icon |
|
|
|
name="arrow-right" |
|
|
|
></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="form-sheet-cell"> |
|
|
|
<view class="label"> |
|
|
|
所属工种 |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
请选择工种 |
|
|
|
</view> |
|
|
|
<view class="right-icon"> |
|
|
|
<uv-icon |
|
|
|
name="arrow-right" |
|
|
|
></uv-icon> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<uv-cell |
|
|
|
title="工龄要求" |
|
|
|
rightIconStyle="fontSize: 30rpx;" |
|
|
|
:value="form.workYear || '请选择工龄要求'" |
|
|
|
@click="openPicker('workYear')" |
|
|
|
isLink |
|
|
|
></uv-cell> |
|
|
|
|
|
|
|
|
|
|
|
<view class="form-sheet-cell"> |
|
|
|
<view class="label"> |
|
|
|
薪资范围 |
|
|
|
</view> |
|
|
|
<view class="price"> |
|
|
|
<input placeholder="最小值" v-model="form.min" /> |
|
|
|
<input placeholder="最小薪资" v-model="form.minPrice" /> |
|
|
|
~ |
|
|
|
<input placeholder="最大值" v-model="form.max" /> |
|
|
|
<input placeholder="最大薪资" v-model="form.maxPrice" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="form-sheet-cell"> |
|
|
|
@ -96,7 +57,7 @@ |
|
|
|
<view class="price"> |
|
|
|
<uv-radio |
|
|
|
:customStyle="{margin: '8px'}" |
|
|
|
v-for="(item, index) in radiolist" |
|
|
|
v-for="(item, index) in priceList" |
|
|
|
:key="index" |
|
|
|
iconSize="30rpx" |
|
|
|
size="40rpx" |
|
|
|
@ -115,7 +76,7 @@ |
|
|
|
<view class="price"> |
|
|
|
<uv-radio |
|
|
|
:customStyle="{margin: '8px'}" |
|
|
|
v-for="(item, index) in radiolist" |
|
|
|
v-for="(item, index) in jopList" |
|
|
|
:key="index" |
|
|
|
iconSize="30rpx" |
|
|
|
size="40rpx" |
|
|
|
@ -132,31 +93,43 @@ |
|
|
|
</view> |
|
|
|
<input placeholder="请输入联系电话" v-model="form.phone" /> |
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
<view class="" |
|
|
|
style="margin-top: 20rpx;"> |
|
|
|
<uv-textarea |
|
|
|
v-model="form.content" |
|
|
|
v-model="form.jobDetails" |
|
|
|
count |
|
|
|
:maxlength="300" |
|
|
|
autoHeight |
|
|
|
placeholder="请输入详细介绍"></uv-textarea> |
|
|
|
placeholder="请输入岗位详细介绍"></uv-textarea> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="uni-color-btn"> |
|
|
|
<view class="uni-color-btn" |
|
|
|
@click="submit"> |
|
|
|
发布 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<uv-picker ref="picker" |
|
|
|
:columns="columns" |
|
|
|
@confirm="pickerConfirm"></uv-picker> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import Position from '@/utils/position.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
form : { |
|
|
|
|
|
|
|
school : '', |
|
|
|
workYear : '', |
|
|
|
minPrice : '', |
|
|
|
maxPrice : '', |
|
|
|
address : '123', |
|
|
|
}, |
|
|
|
radiovalue : '', |
|
|
|
radiolist : [ |
|
|
|
priceList : [ |
|
|
|
{ |
|
|
|
name : '日结', |
|
|
|
}, |
|
|
|
@ -164,9 +137,95 @@ |
|
|
|
name : '月结', |
|
|
|
}, |
|
|
|
], |
|
|
|
jopList : [ |
|
|
|
{ |
|
|
|
name : '正式工', |
|
|
|
}, |
|
|
|
{ |
|
|
|
name : '临时工', |
|
|
|
}, |
|
|
|
], |
|
|
|
picker : { |
|
|
|
workYear : [ |
|
|
|
'不限', |
|
|
|
], |
|
|
|
school : [ |
|
|
|
'不限', |
|
|
|
'初中', |
|
|
|
'高中', |
|
|
|
'专科', |
|
|
|
'本科', |
|
|
|
'研究生', |
|
|
|
'博士', |
|
|
|
], |
|
|
|
}, |
|
|
|
pickerKey : 'workYear', |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
for (var i = 0; i < 30; i++) { |
|
|
|
this.picker.workYear.push((i + 1) + '年') |
|
|
|
} |
|
|
|
}, |
|
|
|
computed : { |
|
|
|
columns(){ |
|
|
|
return [this.picker[this.pickerKey]] |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
openPicker(key){ |
|
|
|
this.pickerKey = key |
|
|
|
this.$refs.picker.open() |
|
|
|
}, |
|
|
|
pickerConfirm(e){ |
|
|
|
this.form[this.pickerKey] = e.value[0] |
|
|
|
}, |
|
|
|
//地图上选择地址 |
|
|
|
selectAddr() { |
|
|
|
Position.selectAddress(res => { |
|
|
|
//经纬度信息 |
|
|
|
this.form.latitude = res.latitude |
|
|
|
this.form.longitude = res.longitude |
|
|
|
if (res.name) { |
|
|
|
return this.form.address = res.name |
|
|
|
} |
|
|
|
this.form.address = '' |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 提交 |
|
|
|
submit(){ |
|
|
|
|
|
|
|
// if(this.fileList.length == 0){ |
|
|
|
// return uni.showToast({ |
|
|
|
// title: '请上传图片', |
|
|
|
// icon : 'none' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
|
|
|
|
if (this.$utils.verificationAll(this.form, { |
|
|
|
title: '请输入招工标题', |
|
|
|
address : '请选择工作地点', |
|
|
|
school : '请选择学历要求', |
|
|
|
workYear : '请选择学历要求', |
|
|
|
minPrice : '请输入最小薪资', |
|
|
|
maxPrice : '请输入最大薪资', |
|
|
|
phone: '请输入联系电话', |
|
|
|
jobDetails: '请输入岗位详细介绍', |
|
|
|
})) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.$api('publishJob', this.form, res => { |
|
|
|
if(res.code == 200){ |
|
|
|
uni.showToast({ |
|
|
|
title: '发布成功!', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
|
|
|
|
setTimeout(uni.navigateBack, 1000, -1) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|