flat: 企业审核
This commit is contained in:
@@ -124,3 +124,8 @@ export const stationModify =
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
export const getInviteApproval = (params) => request({
|
||||
url: '/api/jobslink-api/tenant/invite/approval',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
ref="crud"
|
||||
:table-loading="loading"
|
||||
@date-change="dateChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@@ -13,6 +14,7 @@
|
||||
@search-change="searchChange"
|
||||
@refresh-change="refreshChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
>
|
||||
<template slot="menuLeft">
|
||||
<el-button
|
||||
@@ -20,7 +22,14 @@
|
||||
@click.stop="distributionCodeDialog = true; isEdit = false; inviteCodeForm = {}"
|
||||
type="primary"
|
||||
v-show="vaildData(permission.manage_station_inviteCode_edituser, false)"
|
||||
>新增用户</el-button>
|
||||
>新增用户
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
@click.stop="handleCheck"
|
||||
type="primary"
|
||||
>审核
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="menu" slot-scope="{row}">
|
||||
<el-button type="text" @click="rowUpdate(row)">编辑</el-button>
|
||||
@@ -43,9 +52,11 @@
|
||||
:visible.sync="distributionCodeDialog"
|
||||
append-to-body
|
||||
width="30%">
|
||||
<el-form :model="inviteCodeForm" :rules="inviteCodeRules" filterable ref="inviteCode" label-width="100px" class="demo-ruleForm">
|
||||
<el-form :model="inviteCodeForm" :rules="inviteCodeRules" filterable ref="inviteCode" label-width="100px"
|
||||
class="demo-ruleForm">
|
||||
<el-form-item label="企业名称:" prop="companyId">
|
||||
<el-select v-model="inviteCodeForm.inviteCompanyId" :disabled="isEdit" filterable placeholder="请选择企业" style="width: 260px" >
|
||||
<el-select v-model="inviteCodeForm.inviteCompanyId" :disabled="isEdit" filterable placeholder="请选择企业"
|
||||
style="width: 260px">
|
||||
<el-option
|
||||
v-for="item in enterpriseList"
|
||||
:key="item.id"
|
||||
@@ -64,7 +75,8 @@
|
||||
<el-input style="width: 260px" v-model="inviteCodeForm.phone" placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" prop="remarks">
|
||||
<el-input type="textarea" style="width: 260px" v-model="inviteCodeForm.remarks" placeholder="请输入备注" ></el-input>
|
||||
<el-input type="textarea" style="width: 260px" v-model="inviteCodeForm.remarks"
|
||||
placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -82,9 +94,14 @@ import {
|
||||
getEnterpriseList,
|
||||
saveEnterpriseItem,
|
||||
getInvitationCodeList,
|
||||
getInvitationStatusUpdate
|
||||
getInvitationStatusUpdate,
|
||||
getInviteApproval
|
||||
} from "@/api/manage/station";
|
||||
import {Message} from "element-ui";
|
||||
import lodash from "lodash";
|
||||
import {recruitStatus} from "@/common/dic";
|
||||
import {Auditing} from "@/api/manage/mission";
|
||||
|
||||
const inviteCodeRules = {
|
||||
stationId: [
|
||||
{required: true, message: '请选择企业', trigger: 'blur'}
|
||||
@@ -96,17 +113,24 @@ const inviteCodeRules = {
|
||||
{required: true, message: '请输入手机号', trigger: 'blur', pattern: /^1[3-9]{1}\d{9}/}
|
||||
],
|
||||
idNumber: [
|
||||
{ required: true, message: '请输入身份证', trigger: 'blur', pattern: /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}[\dX]$/}
|
||||
{
|
||||
required: true,
|
||||
message: '请输入身份证',
|
||||
trigger: 'blur',
|
||||
pattern: /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}[\dX]$/
|
||||
}
|
||||
],
|
||||
}
|
||||
const curdOptions = {
|
||||
dateBtn: false,
|
||||
addBtn: false,
|
||||
tip: false,
|
||||
editBtn: false,
|
||||
delBtn: false,
|
||||
height: "auto",
|
||||
border: true,
|
||||
searchMenuSpan: 48,
|
||||
selection: true,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
column: [{
|
||||
@@ -147,6 +171,13 @@ const curdOptions = {
|
||||
prop: 'isEnabled',
|
||||
slot: true,
|
||||
width: 100
|
||||
}, {
|
||||
label: '审核状态',
|
||||
prop: 'reviewStatus',
|
||||
width: 100,
|
||||
type: 'select',
|
||||
dicData: recruitStatus,
|
||||
display: false,
|
||||
}]
|
||||
}
|
||||
const page = {
|
||||
@@ -154,6 +185,13 @@ const page = {
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
}
|
||||
const message = lodash.throttle(
|
||||
function (options) {
|
||||
Message(options);
|
||||
},
|
||||
3000,
|
||||
{trailing: false}
|
||||
);
|
||||
export default {
|
||||
name: "manage_station_inviteCode",
|
||||
data() {
|
||||
@@ -163,10 +201,12 @@ export default {
|
||||
enterpriseList: [], // 企业列表
|
||||
inviteCodeForm: {},
|
||||
inviteCodeList: [],
|
||||
selectionList: [],
|
||||
option: Object.assign({}, curdOptions),
|
||||
page: Object.assign({}, page),
|
||||
searchData: {},
|
||||
isEdit: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
@@ -176,6 +216,72 @@ export default {
|
||||
...mapGetters(["permission"]),
|
||||
},
|
||||
methods: {
|
||||
handleCheck() {
|
||||
let self = this
|
||||
if (this.selectionList.length < 1) {
|
||||
message({
|
||||
type: "warning",
|
||||
message: "请至少选择一条数据",
|
||||
});
|
||||
return;
|
||||
}
|
||||
let idList = this.selectionList.filter((item) => item.reviewStatus === 0).map((v) => v.id)
|
||||
if (idList.length == 0) {
|
||||
this.$message.error("只能提交【审核中】的任务");
|
||||
} else {
|
||||
let h = this.$createElement;
|
||||
this.$prompt(
|
||||
h("p", {style: "color: #F56C6C"}, "一旦驳回无法进行后续操作"),
|
||||
"请核对招聘信息后再进行审核通过",
|
||||
{
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: "通 过",
|
||||
cancelButtonText: "驳 回",
|
||||
type: "warning",
|
||||
center: true,
|
||||
inputType: "textarea",
|
||||
inputPlaceholder: "备注驳回原因",
|
||||
beforeClose: function (action, instance, done) {
|
||||
if (action === 'cancel') {
|
||||
if (!instance.inputValue) {
|
||||
return this.$message({
|
||||
type: "info",
|
||||
message: "请输入驳回原因!",
|
||||
});
|
||||
}
|
||||
self.handelFetchAuditing(idList, 9, instance.inputValue, "成功驳回, 操作成功!").then(() => done())
|
||||
} else if (action === 'confirm') {
|
||||
self.handelFetchAuditing(idList, 1, instance.inputValue).then(() => done())
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
handelFetchAuditing(idList, reviewState, msg, message) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let arr = idList.map((item) => ({
|
||||
id: item,
|
||||
reviewStatus: reviewState,
|
||||
reviewMsg: msg || '',
|
||||
}))
|
||||
this.loading = true;
|
||||
getInviteApproval(arr).then(() => {
|
||||
this.loading = false;
|
||||
this.onLoad();
|
||||
this.$message({
|
||||
type: message ? "info" : "success",
|
||||
message: message || "审核通过,操作成功!",
|
||||
});
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
reject()
|
||||
});
|
||||
})
|
||||
},
|
||||
rowUpdate(row) {
|
||||
this.isEdit = true
|
||||
this.distributionCodeDialog = true
|
||||
@@ -211,7 +317,11 @@ export default {
|
||||
});
|
||||
this.refreshChange();
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
async onLoad() {
|
||||
this.getInvitationCode()
|
||||
@@ -253,7 +363,9 @@ export default {
|
||||
current: this.page.currentPage,
|
||||
size: this.page.pageSize,
|
||||
}
|
||||
this.loading = true
|
||||
let resData = await getInvitationCodeList(params)
|
||||
this.loading = false
|
||||
if (resData.data.code === 200) {
|
||||
const {size, records, current, total} = resData.data.data
|
||||
this.inviteCodeList = records
|
||||
|
||||
Reference in New Issue
Block a user