| | |
| | | <view class="content c-p-10 c-p-l-24 c-m-t-10 c-m-b-20"> |
| | | <up-form-item label="工作名称" prop="publicJob.orderName" :borderBottom='false' ref="item1"> |
| | | <up-input v-model="publicJob.orderName" border="none" placeholder="请填写工作名称"></up-input> |
| | | <template #right> |
| | | <!-- <template #right> |
| | | <up-icon name="arrow-right"></up-icon> |
| | | </template> |
| | | </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> |
| | | </view> |
| | | <view class="c-p-t-20 c-p-b-20"> |
| | | <up-form-item label="工作地点" prop="publicJob.worderAddress" :borderBottom='false' ref="item1" |
| | | @click="toMap"> |
| | | <up-input v-model="publicJob.worderAddress" border="none" readonly |
| | | placeholder="请输入工作地点"></up-input> |
| | | <up-form-item label="工作地点" prop="publicJob.worderAddress" :borderBottom='false' ref="item1"> |
| | | <up-input v-model="publicJob.worderAddress" border="none" 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="publicJob.workerType" :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-tag class='c-p-r-14' text="计时" type="warning" :plain='!(publicJob.workerType=="0")' size="large" |
| | | @click='changStyle(0)'></up-tag> |
| | | <up-tag class='c-p-r-14' text="计件" type="warning" :plain='!(publicJob.workerType=="1")' size="large" |
| | | @click='changStyle(1)'></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="publicJob.workPrice" :borderBottom='false' ref="item1"> |
| | | <up-input v-model="publicJob.workPrice" border="none" placeholder="如今天9:00-今天17:00"> |
| | | <template #suffix>{{style=="time"?'元/小时':'元/件'}}</template></up-input> |
| | | <up-input v-model="publicJob.workPrice" border="none" placeholder="请输入工价"> |
| | | <template #suffix>{{publicJob.workerType=="0"?'元/小时':'元/件'}}</template></up-input> |
| | | </up-form-item> |
| | | </view> |
| | | <!-- <view class="coreshop-bg-white c-m-t-20 c-p-20"> |
| | |
| | | <!-- <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" |
| | | <fui-date-picker range :show="datePickerShow" type="5" @change="changePicker" :minDate='minDate' |
| | | @cancel="cancel"></fui-date-picker> |
| | | </view> |
| | | </template> |
| | |
| | | reactive, |
| | | getCurrentInstance |
| | | } from 'vue'; |
| | | import { |
| | | onLoad, |
| | | onShow |
| | | } from "@dcloudio/uni-app"; |
| | | const { |
| | | $upload, |
| | | $api, |
| | |
| | | import { |
| | | useStore |
| | | } from 'vuex' |
| | | onLoad(() => { |
| | | let data = JSON.parse($db.get('userInfo')).userCompany |
| | | if (data) { |
| | | publicJob.orderUserId = 5 |
| | | } |
| | | }) |
| | | let minDate = $util.formatDate(new Date()) |
| | | let longitude = ref(0) |
| | | let latitude = ref(0) |
| | | let workTime = ref('') |
| | | const store = useStore() |
| | | let datePickerShow = ref(false) |
| | | const publicJob = reactive({ |
| | | id: '', //招工Id |
| | | id: 0, //招工Id |
| | | orderUserId: '', //招工用户id |
| | | orderName: '', //招工名称 |
| | | wordStartTime: '', //工作开始时间 |
| | | wordEndTime: '', //工作结束时间 |
| | | demand: '', //需求 |
| | | worderCount: '', //招工人数 |
| | | worderCounted: '', //已招工人数 |
| | | worderAddress: '', //工作地点 |
| | | contactPhone: '', //联系电话 |
| | | workerType: '', //工作方式 |
| | | workerType: 0, //工作方式 0计时1计件 |
| | | workPrice: '', //工价 |
| | | orderStatus: '', //招工状态 |
| | | orderStatusName: '', //是否选中 |
| | | isSelected: '', //是否选中 |
| | | isSelectedName: '', //是否选中 |
| | | }) |
| | | |
| | | const style = ref('time') |
| | | const changStyle = (val) => { |
| | | style.value = val |
| | | publicJob.workerType = val |
| | | } |
| | | const clickTime = () => { |
| | | datePickerShow.value = !datePickerShow.value |
| | | } |
| | | const changePicker = (val) => { |
| | | console.log(val); |
| | | workTime.value = val.startDate.result + '至' + val.endDate.result |
| | | publicJob.wordStartTime = new Date(val.startDate.result) //工作开始时间 |
| | | publicJob.wordEndTime = new Date(val.endDate.result) |
| | | } |
| | | const saveOrder = () => { |
| | | // publicJob.worderCount = (+publicJob.worderCount) |
| | | $api.saveOrder(publicJob).then(res => { |
| | | |
| | | $util.showToast({ |
| | | title: "保存成功!", |
| | | icon: "success" |
| | | }) |
| | | uni.navigateTo({ |
| | | url:'/pages/order/order' |
| | | }) |
| | | }) |
| | | } |
| | | const toMap = () => { |