<template>
|
<view class="full-page c-m-b-40">
|
<view class="list c-p-t-10">
|
<up-form labelPosition="left" :model="model1" ref="form1" labelWidth='160rpx'>
|
<view class="content c-p-10 c-p-l-24 c-m-t-10 c-m-b-20">
|
<up-form-item label="工作名称" prop="userInfo.name" :borderBottom='false' ref="item1">
|
<up-input v-model="model1.userInfo.name" border="none" placeholder="请填写工作名称"></up-input>
|
<template #right>
|
<up-icon name="arrow-right"></up-icon>
|
</template>
|
</up-form-item>
|
</view>
|
<view class="content c-p-10 c-p-l-24 c-m-t-10 c-m-b-20">
|
<up-form-item label="工作时间" prop="userInfo.name" :borderBottom='false' ref="item1"
|
@click="clickTime">
|
<up-input v-model="model1.userInfo.name" border="none" readonly
|
placeholder="点击选择工作时间"></up-input>
|
<up-icon #right name="arrow-right"></up-icon>
|
</up-form-item>
|
</view>
|
<view class="content c-p-10 c-p-l-24 c-m-t-10 c-m-b-20">
|
<up-form-item label="用工要求" prop="userInfo.name" :borderBottom='false' ref="item1">
|
<view class="c-p-b-20">
|
<up-textarea v-model="value1" border="none" placeholder="请输入用工要求" count
|
maxlength='400'></up-textarea>
|
</view>
|
<!-- <up-tag class='c-p-r-14' text="男" type="warning" plain size="large"></up-tag>
|
<up-tag class='c-p-r-14' text="女" type="warning" plain size="large"></up-tag>
|
<up-tag class='c-p-r-14' text="不限" type="warning" size="large"></up-tag> -->
|
<!-- <up-input v-model="model1.userInfo.name" border="none" placeholder="如今天9:00-今天17:00"></up-input> -->
|
</up-form-item>
|
<!-- <view class="c-p-t-20 c-p-b-20">
|
<up-form-item label="年龄限制" prop="userInfo.name" :borderBottom='false' ref="item1">
|
<up-input v-model="model1.userInfo.name" border="none" placeholder="16~不限"></up-input>
|
<up-icon #right name="arrow-right"></up-icon>
|
</up-form-item>
|
</view> -->
|
<view class="c-p-t-20 c-p-b-20">
|
<up-form-item label="招工人数" prop="userInfo.name" :borderBottom='false' ref="item1">
|
<up-number-box v-model="model1.userInfo.value" @change="valChange"></up-number-box>
|
</up-form-item>
|
</view>
|
<view class="c-p-t-20 c-p-b-20">
|
<up-form-item label="工作地点" prop="userInfo.name" :borderBottom='false' ref="item1" @click="toMap">
|
<up-input v-model="model1.userInfo.address" border="none" readonly placeholder="请输入工作地点"></up-input>
|
<up-icon #right name="arrow-right"></up-icon>
|
</up-form-item>
|
</view>
|
</view>
|
<view class="content c-p-10 c-p-l-24 c-m-t-10 c-m-b-20">
|
<up-form-item label="联系电话" prop="userInfo.name" :borderBottom='false' ref="item1">
|
<up-input v-model="model1.userInfo.number" border="none" placeholder="请输入联系电话"></up-input>
|
</up-form-item>
|
</view>
|
<view class="content c-p-10 c-p-l-24 c-m-t-10 c-m-b-20">
|
<up-form-item label="方式" prop="userInfo.name" :borderBottom='false' ref="item1">
|
<up-tag class='c-p-r-14' text="计时" type="warning" :plain='!(style=="time")' size="large"
|
@click='changStyle("time")'></up-tag>
|
<up-tag class='c-p-r-14' text="计件" type="warning" :plain='!(style=="piece")' size="large"
|
@click='changStyle("piece")'></up-tag>
|
</up-form-item>
|
</view>
|
<view class="content c-p-10 c-p-l-24 c-m-t-10 c-m-b-20">
|
<up-form-item label="计时工价" prop="userInfo.name" :borderBottom='false' ref="item1">
|
<up-input v-model="model1.userInfo.xiaoshi" border="none" placeholder="如今天9:00-今天17:00">
|
<template #suffix>{{style=="time"?'元/小时':'元/件'}}</template></up-input>
|
</up-form-item>
|
</view>
|
<!-- <view class="coreshop-bg-white c-m-t-20 c-p-20">
|
<view class="c-p-b-20 colorgray">
|
招工要求或福利(可多选)
|
</view>
|
<view class="c-p-b-20">
|
<up-tag class='c-p-l-14 c-p-b-14' :text="item" plain v-for="(item,index) in tags" :key="index"> </up-tag>
|
</view>
|
<view class="c-p-b-20 colorgray">
|
招工详细描述
|
</view>
|
<view class="c-p-b-20">
|
<up-textarea v-model="value1" placeholder="请输入:可以补充招工要求和福利" ></up-textarea>
|
</view>
|
</view> -->
|
</up-form>
|
</view>
|
<view class="tabbtns">
|
<up-button color='#fece01' class="text-69" text="发布招工"></up-button>
|
</view>
|
<!-- <fui-fab :zIndex="10" background='#fff' bottom='250'>
|
<fui-icon name="kefu-fill" color='#000'></fui-icon>
|
</fui-fab> -->
|
<fui-date-picker range :show="datePickerShow" type="5" @change="changePicker"
|
@cancel="cancel"></fui-date-picker>
|
</view>
|
</template>
|
|
<script setup>
|
import {
|
ref,
|
reactive
|
} from 'vue';
|
import { useStore } from 'vuex'
|
let longitude= ref(0)
|
let latitude= ref(0)
|
const store = useStore()
|
const value1 = ref('')
|
let datePickerShow = ref(false)
|
const model1 = reactive({
|
userInfo: {
|
name: '',
|
sex: '',
|
number: 12345678989,
|
value: 3,
|
address: '四川省成都市武侯区环球东路',
|
xiaoshi: 20,
|
longitude:0,
|
latitude:0
|
},
|
});
|
const style = ref('time')
|
const changStyle = (val) => {
|
style.value = val
|
}
|
const clickTime = () => {
|
datePickerShow.value = !datePickerShow.value
|
}
|
const changePicker = (val) => {
|
console.log(val);
|
}
|
const toMap = () => {
|
// #ifdef MP-WEIXIN
|
console.log(store,'store’');
|
const txMapkey = store.state.config.qqMapKey; //使用在腾讯位置服务申请的key
|
const referer = store.state.config.shopName; //调用插件的app的名称
|
const location = JSON.stringify({
|
latitude: model1.userInfo.latitude == "" ? latitude : model1.userInfo.latitude,
|
longitude: model1.userInfo.longitude == "" ? longitude : model1.userInfo.longitude
|
});
|
const category = '';
|
|
wx.navigateTo({
|
url: 'plugin://chooseLocation/index?key=' + txMapkey + '&referer=' + referer +
|
'&location=' +
|
location + '&category=' + category
|
});
|
// #endif
|
|
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
uni.chooseLocation({
|
success: (res) => {
|
console.log(res,'res');
|
}
|
});
|
// #endif
|
}
|
</script>
|
|
<style>
|
.list {}
|
|
.content {
|
width: 100%;
|
box-sizing: border-box;
|
background-color: #fff;
|
}
|
|
.u-textarea {
|
padding: 0 !important;
|
}
|
</style>
|