|
|
|
@ -31,6 +31,19 @@ |
|
|
|
</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-px-40 se-mb-30 se-py-30 se-bgc-white se-br-40 se-bs-b" |
|
|
|
v-for="(item, index) in orderList" |
|
|
|
@ -60,12 +73,21 @@ |
|
|
|
</view> |
|
|
|
<u-empty v-if="orderList && orderList.length==0" mode="list" text="暂无订单信息"></u-empty> |
|
|
|
</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> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getTaskById |
|
|
|
getTaskById, |
|
|
|
stopJob |
|
|
|
} from "@/common/api.js" |
|
|
|
import { |
|
|
|
getStatusText |
|
|
|
@ -148,18 +170,52 @@ |
|
|
|
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 => { |
|
|
|
console.error('获取工作详情失败:', error); |
|
|
|
console.error('停止招聘失败:', error); |
|
|
|
uni.showToast({ |
|
|
|
title: '网络错误', |
|
|
|
icon: 'none' |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
onOrderDetail(order) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pages_subpack/order-detail/boss?orderId=${order.id}&type=true` |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|