flat: 暂存1

This commit is contained in:
Apcallover
2024-07-17 11:06:43 +08:00
parent 7d1904fa2c
commit 85aaeacd2b
57 changed files with 7565 additions and 170 deletions

142
pageMy/admin/admin.vue Normal file
View File

@@ -0,0 +1,142 @@
<template>
<view class="app_cotainer">
<u--form labelPosition="left" :fromData="formValues" :model="formValues" :rules="rules" ref="uForm">
<u-form-item labelWidth="70" label="姓名" prop="name" borderBottom>
<u--input v-model="formValues.name" placeholder="请输入姓名"></u--input>
</u-form-item>
<u-form-item labelWidth="70" label="身份证" prop="idNumber" borderBottom>
<u--input v-model="formValues.idNumber" placeholder="请输入身份证"></u--input>
</u-form-item>
<u-form-item labelWidth="70" label="手机号" prop="phone" borderBottom>
<u--input v-model="formValues.phone" placeholder="请输入手机号"></u--input>
</u-form-item>
<u-form-item labelWidth="70" label="求职意愿" prop="willingJob" borderBottom>
<u--input v-model="formValues.willingJob" placeholder="请输入求职意愿"></u--input>
</u-form-item>
<u-form-item labelWidth="70" label="期望薪资" prop="wage" borderBottom>
<u--input type="number" v-model="formValues.wage" placeholder="请输入期望薪资"></u--input>
</u-form-item>
</u--form>
<view class="btn_add">
<u-button type="primary" size="large" text="提交信息" @click="confrim"></u-button>
</view>
</view>
</template>
<script>
import {
dateFormat
} from '@/untils/format.js'
import {
setPeopleRegister
} from '@/api/admin.js'
import {
addSuperviseComplaintInfo
} from '@/api/content'
const formData = {
name: '',
idNumber: '',
phone: '',
wage: '',
willingJob: '',
}
const rules = {
'name': {
type: 'string',
required: true,
message: '请输入姓名',
trigger: ['blur', 'change']
},
'idNumber': {
type: 'string',
required: true,
pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
message: '请输入身份证',
trigger: ['blur', 'change']
},
'phone': {
type: 'string',
required: true,
pattern: /^1[3-9]{1}\d{9}/,
message: '请填写联系方式',
trigger: ['blur', 'change']
},
"willingJob": {
type: 'string',
required: true,
message: '请输入求职意愿',
trigger: ['blur', 'change']
},
"wage": {
type: 'number',
required: true,
min: 0,
message: '请输入期望薪资',
trigger: ['blur', 'change']
},
}
export default {
data() {
return {
formValues: Object.assign({}, formData),
rules: Object.assign({}, rules),
};
},
onLoad() {},
computed: {},
methods: {
confrim() {
this.$refs.uForm.validate().then(async (res) => {
let params = {
...this.formValues,
}
uni.showLoading({
title: '请求中'
})
let resData = await setPeopleRegister(params)
uni.hideLoading()
if (resData.data?.code === 200) {
uni.$u.toast(resData.data.msg)
this.$api.sleep(1000).then(() => {
uni.navigateBack(1)
})
}
}).catch((errors) => {
if (/[\u4e00-\u9fff]/.test(errors.message)) {
this.$api.msg(errors.message)
} else {
this.$api.msg('请输入信息')
}
})
}
}
}
</script>
<style lang="scss" scoped>
.app_cotainer {
padding: 24rpx;
.picker_flag {
// border: 0;
// height: auto;
display: flex;
justify-content: flex-start;
padding: 0;
}
.reply_info {}
.btn_add {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 110rpx;
background-color: $uni-bg-color-grey;
padding: 24rpx 24rpx calc(10px + env(safe-area-inset-bottom) / 2) 24rpx;
text-align: center;
line-height: 110rpx;
}
}
</style>

272
pageMy/admin/check.vue Normal file
View File

@@ -0,0 +1,272 @@
<template>
<view class="check-container">
<view class="check-top">
<u-search placeholder="搜索岗位名" v-model="searchVal" @change="serchlist" :showAction="false"></u-search>
<view class="top-type">
<view :class="{ 'blue': checkType === 0 }" @click="changeCheckType(0)">全职岗位</view>
<view :class="{ 'blue': checkType === 1 }" @click="changeCheckType(1)">零工岗位</view>
</view>
</view>
<view class="check-content">
<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th width="104" align="center">操作</uni-th>
<uni-th align="center">岗位名称</uni-th>
<uni-th align="center">招聘人数</uni-th>
<uni-th align="center">参考工资</uni-th>
<uni-th align="center">零工工种</uni-th>
<uni-th align="center">年龄要求</uni-th>
<uni-th align="center">学历要求</uni-th>
<uni-th align="center">经验要求</uni-th>
<uni-th align="center">详细地址</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td>
<view class="uni-group">
<button class="uni-button" v-if="item.reviewState !== 1" size="mini" type="primary"
@click="confirm(item)">通过</button>
<button class="uni-button" v-if="item.reviewState !== 9" size="mini" type="warn"
@click="cancle(item)">驳回</button>
</view>
</uni-td>
<template v-if="checkType === 0">
<uni-td align="center">{{ item.jobName }}</uni-td>
</template>
<template v-if="checkType === 1">
<uni-td align="center">{{ item.missionTitle }}</uni-td>
</template>
<uni-td align="center">{{ item.peopleNum }}</uni-td>
<uni-td align="center">{{ item.wage }}</uni-td>
<uni-td align="center">{{ item.worktypeNames }}</uni-td>
<uni-td align="center">{{ item.ageDesc }}</uni-td>
<uni-td align="center">{{ findEduArr(item.education) }}</uni-td>
<uni-td align="center">{{ item.experienceDesc }}</uni-td>
<uni-td align="center">{{ item.address }}</uni-td>
</uni-tr>
</uni-table>
<view class="uni-pagination-box">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="pageChange" />
</view>
<!-- popup -->
<u-modal :show="modalShow" @confirm="modalConfirm" ref="uModal" @cancel="modalShow = false" title="拒绝申请"
:asyncClose="true" showCancelButton>
<view class="slot-content" style="width: 100%;">
<u--textarea v-model="remarkVal" placeholder="请输入备注"></u--textarea>
</view>
</u-modal>
</view>
</view>
</template>
复制代码
</view>
</view>
</template>
<script>
import {
getMissionList,
getJkWorksList,
updateUserrecruitApproval
} from '@/api/admin.js'
import dic from '../../common/dic'
import {
debounce
} from '@/untils/tools.js'
export default {
data() {
return {
eduArr: dic.eduArr,
searchVal: '',
remarkVal: '',
tableData: [],
pageSize: 10,
pageCurrent: 0,
total: 0,
loading: false,
checkType: 0, // 0 全职 1 零工
modalShow: false,
selectItem: null,
}
},
onLoad() {
this.getData('refresh')
},
methods: {
async modalConfirm() {
if (!this.remarkVal) {
this.modalShow = true
// #ifdef H5
this.$refs.uModal.loading = false
// #endif
// #ifndef H5
this.modalShow = false
// #endif
return this.$api.msg('请输入备注')
} else {
let params = [{
jobType: this.checkType === 0 ? 1 : 0,
reviewState: 9,
id: this.selectItem.id,
reviewMsg: this.remarkVal
}]
let resData = await updateUserrecruitApproval(params)
if (resData.data.code === 200) {
this.getData('update')
this.modalShow = false
} else {
// #ifdef H5
this.$refs.uModal.loading = false
// #endif
// #ifndef H5
this.modalShow = false
// #endif
}
}
},
confirm(value) {
const _that = this
uni.showModal({
title: '提示',
content: '确认通过审核',
success: async function(res) {
if (res.confirm) {
let params = [{
jobType: _that.checkType === 0 ? 1 : 0,
reviewState: 1,
id: value.id,
reviewMsg: _that.remarkVal
}]
let resData = await updateUserrecruitApproval(params)
if (resData.data.code === 200) {
_that.getData('update')
}
}
}
});
},
cancle(value) {
this.selectItem = value
this.modalShow = true
},
serchlist: debounce(function(val) {
this.getData('refresh')
}, 600),
changeCheckType(type) {
this.checkType = type
this.getData('refresh')
},
pageChange({
type,
current
}) {
switch (type) {
case 'next':
this.getData()
break;
case 'prev':
this.getData('prev')
break;
}
},
async getData(type = 'next') {
this.loading = true
let params = {
current: this.pageCurrent,
pageSize: this.pageSize
}
switch (type) {
case 'next':
params.current += 1
break;
case 'prev':
params.current -= 1
break;
case 'refresh':
params.current = 1
params.pageSize = 10
break;
}
switch (this.checkType) {
case 0:
params.jobName = this.searchVal
break;
case 1:
params.missionTitle = this.searchVal
break;
}
let resData = null
if (this.checkType === 0) {
resData = await getJkWorksList(params)
} else {
resData = await getMissionList(params)
}
this.loading = false
if (resData.data.code === 200) {
const {
current,
records,
total,
size
} = resData.data.data
this.tableData = records
this.pageCurrent = current
this.pageSize = size
this.total = total
}
},
findEduArr(id) {
const v = dic.eduArr[0].find((item) => item.value === id)
if (v) return v.label
return ''
}
}
}
</script>
<style scoped>
.check-container {
padding: 12px;
}
.top-type {
display: flex;
justify-content: space-around;
align-items: center;
color: #666666;
font-size: 14px;
margin-top: 10px;
}
.blue {
color: blue;
}
.check-top {
margin-bottom: 24rpx;
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 12px;
z-index: 9;
background-color: #ffffff;
}
.check-content {
margin-top: 84px;
}
.uni-pagination-box {
margin-top: 14px;
}
.uni-group {
display: flex;
align-items: center;
}
</style>

315
pageMy/admin/dengji.vue Normal file
View File

@@ -0,0 +1,315 @@
<template>
<view class="check-container">
<view class="check-top">
<u-search placeholder="搜索身份证" v-model="searchVal" @change="serchlist" :showAction="false"></u-search>
</view>
<view class="check-content">
<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th width="104" align="center">姓名</uni-th>
<uni-th align="center">身份证</uni-th>
<uni-th align="center">手机号</uni-th>
<uni-th width="204" align="center">设置</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td align="center">{{ item.name }}</uni-td>
<uni-td align="center">{{ item.idNumber }}</uni-td>
<uni-td align="center">{{ item.telphone }}</uni-td>
<uni-td>
<view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="confirm(item)">添加日志</button>
</view>
</uni-td>
</uni-tr>
</uni-table>
<view class="uni-pagination-box">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="pageChange" />
</view>
<!-- popup -->
<custom-popup :visible="modalShow" :content-h="100" @onClose="modalShow = false;serveInfo = {}">
<view class="s-header">
<view class="heade-lf" @click="modalShow = false;serveInfo = {}">取消</view>
<view class="heade-ri" @click="confimPopup">确认</view>
</view>
<view class="s-content">
<u--form labelPosition="left" :model="serveInfo" :fromData="serveInfo" :rules="rules" ref="uForm">
<u-form-item labelWidth="80" label="服务时间" prop="createTime" borderBottom
@click="showTime = true; hideKeyboard()" ref="item1">
<u--input v-model="serveInfo.createTime" disabledColor="#ffffff" placeholder="请选择服务时间"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item labelWidth="70" label="服务主题" prop="serveTheme" borderBottom ref="item1">
<u--input v-model="serveInfo.serveTheme" placeholder="请输入服务主题"></u--input>
</u-form-item>
<u-form-item labelWidth="70" label="服务内容" prop="serveContent" borderBottom ref="item1">
<u--textarea v-model="serveInfo.serveContent" placeholder="请输入服务内容"></u--textarea>
</u-form-item>
<u-form-item labelWidth="70" label="服务备注" prop="bak1" borderBottom ref="item1">
<u--textarea v-model="serveInfo.bak1" placeholder="请输入服务备注"></u--textarea>
</u-form-item>
</u--form>
</view>
</custom-popup>
<u-datetime-picker :show="showTime" :value="birthday" mode="date" closeOnClickOverlay @confirm="timeConfirm"
@cancel="timeClose" @close="timeClose"></u-datetime-picker>
</view>
</view>
</template>
</view>
</view>
</template>
<script>
import {
getTalentsList,
saveMainserveuserlog
} from '@/api/admin.js'
import {
mapGetters
} from 'vuex'
import dic from '../../common/dic'
import {
debounce,
} from '@/untils/tools.js'
import {
dateFormat
} from '@/untils/format.js'
import {
cloneDeep,
} from 'lodash';
const validateForm = {
createTime: '请输入服务时间',
serveTheme: '请输入服务主题',
serveContent: '请输入服务内容',
}
const formData = {
createTime: '',
serveTheme: '',
serveContent: '',
}
const rules = {
'createTime': {
type: 'string',
required: true,
message: '请输入服务时间',
trigger: ['blur', 'change']
},
'serveTheme': {
type: 'string',
required: true,
message: '请输入服务主题',
trigger: ['blur', 'change']
},
'serveContent': {
type: 'string',
required: true,
message: '请输入服务内容',
trigger: ['blur', 'change']
}
}
export default {
data() {
return {
eduArr: dic.eduArr,
searchVal: '',
tableData: [],
pageSize: 10,
pageCurrent: 0,
total: 0,
loading: false,
modalShow: false,
selectItem: null,
showTime: false,
serveInfo: Object.assign({}, formData),
birthday: Number(new Date()),
rules: rules,
}
},
computed: {
...mapGetters(['userInfo'])
},
onLoad() {
this.getData('refresh')
},
methods: {
timeConfirm(e) {
this.showTime = false
this.serveInfo.createTime = dateFormat(e.value, 'yyyy-MM-dd')
},
timeClose() {
this.showTime = false
},
hideKeyboard() {
uni.hideKeyboard()
},
async confimPopup() {
this.$refs.uForm.validate().then(async (res) => {
uni.showLoading({
title: '请求中'
})
const copy = cloneDeep(this.serveInfo)
let params = {
...copy,
createTime: copy.createTime + ' 00:00:00',
// serveId: this.selectItem.serveId,
// serveUserId: this.selectItem.serveUserId,
talentsId: this.selectItem.id,
idNumber: this.selectItem.idNumber,
toName: this.selectItem.name,
fromName: this.userInfo.real_name
}
let resData = await saveMainserveuserlog(params)
uni.hideLoading()
if (resData.data.code === 200) {
this.$api.msg('添加日志成功')
this.modalShow = false
this.getData('update')
}
}).catch((errors) => {
console.log(errors)
if (/[\u4e00-\u9fff]/.test(errors.message)) {
this.$api.msg(errors.message)
} else {
this.$api.msg('请输入信息')
}
})
},
confirm(user) {
this.modalShow = true
this.selectItem = user
},
serchlist: debounce(function(val) {
this.getData('refresh')
}, 600),
pageChange({
type,
current
}) {
switch (type) {
case 'next':
this.getData()
break;
case 'prev':
this.getData('prev')
break;
}
},
async getData(type = 'next') {
this.loading = true
let params = {
current: this.pageCurrent,
pageSize: this.pageSize
}
switch (type) {
case 'next':
params.current += 1
break;
case 'prev':
params.current -= 1
break;
case 'refresh':
params.current = 1
params.pageSize = 10
break;
}
if (this.searchVal) {
params.idNumber = this.searchVal
}
let resData = await getTalentsList(params)
this.loading = false
if (resData.data.code === 200) {
const {
current,
records,
total,
size
} = resData.data.data
this.tableData = records
this.pageCurrent = current
this.pageSize = size
this.total = total
}
},
}
}
</script>
<style scoped>
.check-container {
padding: 12px;
}
.top-type {
display: flex;
justify-content: space-around;
align-items: center;
color: #666666;
font-size: 14px;
margin-top: 10px;
}
.blue {
color: blue;
}
.check-top {
margin-bottom: 24rpx;
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 12px;
z-index: 9;
background-color: #ffffff;
}
.check-content {
margin-top: 54px;
}
.uni-pagination-box {
margin-top: 14px;
}
.uni-group {
display: flex;
align-items: center;
}
.s-header {
display: flex;
justify-content: space-between;
text-align: center;
font-size: 13px;
padding: 10px 14px 0 14px;
.heade-lf {
line-height: 24px;
width: 38px;
height: 24px;
border-radius: 4px;
border: 1px solid #666666;
color: #666666;
}
.heade-ri {
line-height: 24px;
width: 38px;
height: 24px;
border-radius: 4px;
border: 1px solid #1b66ff;
background-color: #1b66ff;
color: #FFFFFF;
}
}
.s-content {
padding: 12px;
}
</style>