Browse Source

feat(招聘): 添加招聘状态显示和停止招聘功能

- 在订单列表页面添加招聘状态显示组件
- 实现停止招聘功能及相关API调用
- 更新配置文件中的本地开发端口
- 在enterprise组件中导入updateJob方法
master
主管理员 1 month ago
parent
commit
4b8813f869
4 changed files with 66 additions and 9 deletions
  1. +1
    -0
      common/api.js
  2. +1
    -1
      common/config.js
  3. +63
    -7
      pages_subpack/hire/order-list.vue
  4. +1
    -1
      pages_subpack/release/component/enterprise.vue

+ 1
- 0
common/api.js View File

@ -57,6 +57,7 @@ export const confirmOrderTryCompanyOk = (params) => http.post('/employ-api/emplo
export const queryJobListByUserId = (params) => http.get('/employ-api/employ/job/queryJobListByUserId', {params:params}) 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.get('/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.get('/employ-api/employ/job/deleteJob', {params:params})


+ 1
- 1
common/config.js View File

@ -3,7 +3,7 @@ module.exports = {
// baseUrl:"https://employadmin.hhlm1688.com" // baseUrl:"https://employadmin.hhlm1688.com"
// baseUrl:"http://h5.xzaiyp.top", //测试环境 // baseUrl:"http://h5.xzaiyp.top", //测试环境
// baseUrl:"http://youyi-test.natapp1.cc", // baseUrl:"http://youyi-test.natapp1.cc",
// baseUrl:"http://127.0.0.1:8002",
// baseUrl:"http://127.0.0.1:8003",
baseUrl:"https://admin.zhixuanlietou.com", baseUrl:"https://admin.zhixuanlietou.com",
// http://youyi-test.natapp1.cc // http://youyi-test.natapp1.cc


+ 63
- 7
pages_subpack/hire/order-list.vue View File

@ -31,6 +31,19 @@
</view> </view>
</view> </view>
<!-- 招聘状态显示 -->
<view class="se-px-40 se-pb-20" v-if="jobInfo">
<view class="se-flex se-flex-h-c">
<view class="se-py-8 se-px-20 se-br-15"
:style="jobInfo.status == 1 ? 'background-color: rgba(255, 77, 79, 0.15);' : 'background-color: rgba(82, 196, 26, 0.15);'">
<text :style="jobInfo.status == 1 ? 'color: #d32f2f; font-weight: 600;' : 'color: #388e3c; font-weight: 600;'"
class="se-fs-26">
{{jobInfo.status == 1 ? '已招满' : '招聘中'}}
</text>
</view>
</view>
</view>
<view class="se-p-40"> <view class="se-p-40">
<view class="se-px-40 se-mb-30 se-py-30 se-bgc-white se-br-40 se-bs-b" <view class="se-px-40 se-mb-30 se-py-30 se-bgc-white se-br-40 se-bs-b"
v-for="(item, index) in orderList" v-for="(item, index) in orderList"
@ -60,12 +73,21 @@
</view> </view>
<u-empty v-if="orderList && orderList.length==0" mode="list" text="暂无订单信息"></u-empty> <u-empty v-if="orderList && orderList.length==0" mode="list" text="暂无订单信息"></u-empty>
</view> </view>
<!-- 已招满按钮 -->
<view class="se-p-40 se-pt-0" v-if="jobInfo && jobInfo.status == 0">
<view class="se-bgc-orange se-br-20 se-py-30 se-flex se-flex-h-c se-flex-v-c"
@click="onStopJob">
<text class="se-c-white se-fs-32 se-fw-6">已招满</text>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
getTaskById
getTaskById,
stopJob
} from "@/common/api.js" } from "@/common/api.js"
import { import {
getStatusText getStatusText
@ -148,18 +170,52 @@
icon: 'none' icon: 'none'
}); });
} }
})
},
onOrderDetail(order) {
uni.navigateTo({
url: `/pages_subpack/order-detail/boss?orderId=${order.id}&type=true`
});
},
onStopJob() {
uni.showModal({
title: '确认操作',
content: '确定要将此招聘标记为已招满吗?',
success: (res) => {
if (res.confirm) {
this.stopJobRequest();
}
}
});
},
stopJobRequest() {
stopJob({ id: this.jobId }).then(response => {
if (response.success) {
uni.showToast({
title: '操作成功',
icon: 'success'
});
//
this.jobInfo.status = 1;
//
setTimeout(() => {
uni.navigateBack();
}, 1500);
} else {
uni.showToast({
title: response.message || '操作失败',
icon: 'none'
});
}
}).catch(error => { }).catch(error => {
console.error('获取工作详情失败:', error);
console.error('停止招聘失败:', error);
uni.showToast({ uni.showToast({
title: '网络错误', title: '网络错误',
icon: 'none' icon: 'none'
}); });
}); });
},
onOrderDetail(order) {
uni.navigateTo({
url: `/pages_subpack/order-detail/boss?orderId=${order.id}&type=true`
});
} }
} }
} }


+ 1
- 1
pages_subpack/release/component/enterprise.vue View File

@ -130,7 +130,7 @@
<script> <script>
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js" import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
import { addTask,industryList,industryById } from "@/common/api.js"
import { addTask,industryList,industryById, updateJob } from "@/common/api.js"
import citySelect from '@/components/cityselect/index.vue' import citySelect from '@/components/cityselect/index.vue'
export default { export default {
components:{ components:{


Loading…
Cancel
Save