主管理员 1 month ago
parent
commit
4e918fbdda
4 changed files with 98 additions and 11 deletions
  1. +2
    -2
      common/api.js
  2. +1
    -1
      pages_subpack/hire/index.vue
  3. +94
    -7
      pages_subpack/release/component/enterprise.vue
  4. +1
    -1
      pages_subpack/release/index.vue

+ 2
- 2
common/api.js View File

@ -56,10 +56,10 @@ export const confirmOrderTryCompanyOk = (params) => http.post('/employ-api/emplo
//我的招聘
export const queryJobListByUserId = (params) => http.get('/employ-api/employ/job/queryJobListByUserId', {params:params})
//编辑招聘信息
export const updateJob = (params) => http.get('/employ-api/employ/job/updateJob', params)
export const updateJob = (params) => http.post('/employ-api/employ/job/updateJob', params)
export const stopJob = (params) => http.post('/employ-api/employ/job/stopJob', params)
//删除招聘信息
export const deleteJob = (params) => http.get('/employ-api/employ/job/deleteJob', {params:params})
export const deleteJob = (params) => http.post('/employ-api/employ/job/deleteJob', params)
//我的求职
export const queryMySeekList = (params) => http.get('/employ-api/employ/seek/queryMySeekList', {params:params})


+ 1
- 1
pages_subpack/hire/index.vue View File

@ -177,7 +177,7 @@
title: '删除中...'
});
// API
deleteJob({ id: jobId }).then(response => {
deleteJob({ jobId: jobId }).then(response => {
uni.hideLoading();
if (response.code === 200) {
uni.showToast({


+ 94
- 7
pages_subpack/release/component/enterprise.vue View File

@ -90,7 +90,7 @@
<view class="se-px-20 se-pb-80 se-fs-20 se-flex">
<view @click="submit"
class="se-mx-10 se-flex-1 se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-28 se-c-white se-bgc-orange">
<text>发布订单</text>
<text>{{ editId ? '更新招聘信息' : '发布订单' }}</text>
</view>
</view>
</view>
@ -130,9 +130,15 @@
<script>
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
import { addTask,industryList,industryById, updateJob } from "@/common/api.js"
import { addTask,industryList,industryById, updateJob, getTaskById } from "@/common/api.js"
import citySelect from '@/components/cityselect/index.vue'
export default {
props: {
editId: {
type: String,
default: null
}
},
components:{
citySelect
},
@ -220,9 +226,8 @@
],
dayMoney:[
{
type: 'string',
required: true,
message: '试工日薪',
message: '请输入试工日薪',
trigger: ['blur', 'change']
}
],
@ -406,6 +411,15 @@
industryById({pid:that.form.industryId}).then(response=>{
console.info("response",response);
that.typeList = response.result
// ID
if (that.editId && that.form.typeId) {
that.$nextTick(() => {
if (that.$refs.uForm) {
that.$refs.uForm.validateField('typeId')
}
})
}
}).catch(error=>{
})
@ -448,6 +462,10 @@
"image": that.form.fileList.map(item => item.url).join(','),//
}
// ID
if (this.editId) {
params.id = this.editId
}
if(this.$dayjs(params.startTime).isAfter(this.$dayjs(params.endTime))){
return uni.$u.toast('开始时间不能大于结束时间')
@ -457,10 +475,13 @@
return uni.$u.toast('开始时间不能小于当前时间')
}
// let p={"bossPhone":"13189698115","dayMoney":"500","endTime":"2016-01-01 00:00:00","industryId":"1865299999310622721","industryName":"","latitude":28.23529,"longitude":112.93134,"moneymax":"15000","moneymin":"12000","payType":"1","startTime":"2015-01-01 00:00:00","title":"","workAddress":"517","workDetail":"","workPic":"https://tennis-oss.xzaiyp.top/2025-02-19/341d669a-ef66-4abb-8b98-ac71c08814c9.jpg"}
addTask(params).then(response=>{
// API
const apiMethod = this.editId ? updateJob : addTask
const successMessage = this.editId ? '更新成功!' : '提交成功!'
apiMethod(params).then(response=>{
console.info("response",response)
uni.$u.toast("提交成功!")
uni.$u.toast(successMessage)
setTimeout(()=>{
uni.navigateBack({
delta:1
@ -491,10 +512,76 @@
})
},
//
getJobDetail() {
getTaskById({
id: this.editId,
edit : '1'
}).then(response => {
const data = response.result
//
this.form.title = data.title || ''
this.form.area = data.address || ''
this.form.industryId = data.categoryOne || ''
this.form.industryName = data.categoryOneName || ''
this.form.typeId = data.categoryTwo || ''
this.form.typeName = data.categoryTwoName || ''
this.form.salaryMin = data.salaryMin || ''
this.form.salaryMax = data.salaryMax || ''
this.form.dayMoney = String(data.salaryDay || '')
this.form.settlement = data.payType || ''
this.form.dateMin = data.startTime || ''
this.form.dateMax = data.endTime || ''
this.form.mobile = data.phone || ''
this.form.introduce = data.details || ''
this.form.latitude = data.latitude || ''
this.form.longitude = data.longitude || ''
//
if (data.image) {
const imageUrls = data.image.split(',')
this.form.fileList = imageUrls.map(url => ({ url: url.trim() }))
}
// ID
if (this.form.industryId) {
this.onIndustryById()
}
//
this.$nextTick(() => {
if (this.$refs.uForm) {
//
this.$refs.uForm.clearValidate()
//
if (this.form.industryName) {
this.$refs.uForm.validateField('industryName')
}
if (this.form.typeId) {
this.$refs.uForm.validateField('typeId')
}
if (this.form.dayMoney) {
this.$refs.uForm.validateField('dayMoney')
}
}
})
}).catch(error => {
console.error('获取招聘详情失败:', error)
uni.showToast({
title: '获取数据失败',
icon: 'none'
})
})
},
},
onReady() {
this.$refs.uForm.setRules(this.rules)
this.onIndustryList()
//
if (this.editId) {
this.getJobDetail()
}
},
}
</script>


+ 1
- 1
pages_subpack/release/index.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<!-- 企业端 -->
<enterpriseBox v-if="status==1" />
<enterpriseBox v-if="status==1" :editId="editId" />
<!-- 师傅端 -->
<masterBox v-if="status==2" :editId="editId" />
</view>


Loading…
Cancel
Save