初始化项目
This commit is contained in:
@@ -1,708 +0,0 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<company-tree @node-click="handleNodeClick"></company-tree>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
ref="crud"
|
||||
v-model="form"
|
||||
:permission="permissionList"
|
||||
@row-del="rowDel"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<template slot="menuLeft">
|
||||
<el-button
|
||||
size="small"
|
||||
plain
|
||||
v-if="permission.manage_company_accountList_reset"
|
||||
icon="el-icon-refresh"
|
||||
@click="handleReset"
|
||||
>密码重置</el-button
|
||||
>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="companyName">
|
||||
<el-tag>{{ row.companyName }}</el-tag>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="roleName">
|
||||
<el-tag>{{ row.roleName }}</el-tag>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="deptName">
|
||||
<el-tag>{{ row.deptName }}</el-tag>
|
||||
</template>
|
||||
<template v-slot:menu="{ row }">
|
||||
<el-button
|
||||
v-if="row.status === 1"
|
||||
@click="rowEnable(row)"
|
||||
type="text"
|
||||
size="small"
|
||||
>启用</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="row.status === 0"
|
||||
@click="rowDisable(row)"
|
||||
type="text"
|
||||
size="small"
|
||||
>停用</el-button
|
||||
>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<el-dialog
|
||||
title="用户角色配置"
|
||||
append-to-body
|
||||
:visible.sync="roleBox"
|
||||
width="345px"
|
||||
>
|
||||
<el-tree
|
||||
:data="roleGrantList"
|
||||
show-checkbox
|
||||
default-expand-all
|
||||
node-key="id"
|
||||
ref="treeRole"
|
||||
:default-checked-keys="roleTreeObj"
|
||||
:props="props"
|
||||
></el-tree>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="roleBox = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitRole">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="用户数据导入"
|
||||
append-to-body
|
||||
:visible.sync="excelBox"
|
||||
width="555px"
|
||||
>
|
||||
<avue-form
|
||||
:option="excelOption"
|
||||
v-model="excelForm"
|
||||
:upload-after="uploadAfter"
|
||||
:upload-error="uploadError"
|
||||
>
|
||||
<template slot="excelTemplate">
|
||||
<el-button type="primary" @click="handleTemplate()">
|
||||
点击下载
|
||||
<i class="el-icon-download el-icon--right"></i>
|
||||
</el-button>
|
||||
</template>
|
||||
</avue-form>
|
||||
</el-dialog>
|
||||
</basic-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAllList,
|
||||
update,
|
||||
grant,
|
||||
resetPassword,
|
||||
enableUser,
|
||||
disableUser,
|
||||
} from "@/api/system/user";
|
||||
import { getDeptTree } from "@/api/system/dept";
|
||||
import { getRoleTree } from "@/api/system/role";
|
||||
import { mapGetters } from "vuex";
|
||||
import website from "@/config/website";
|
||||
import { getToken } from "@/util/auth";
|
||||
import companyTree from "./companyTree";
|
||||
import { isMobile, check18IdCardNo } from "@/util/validate";
|
||||
import { excelAccept } from "@/common/accept";
|
||||
|
||||
export default {
|
||||
components: { companyTree },
|
||||
name: "manage_company_accountList",
|
||||
data() {
|
||||
const validatePass = (rule, value, callback) => {
|
||||
if (value === "") {
|
||||
callback(new Error("请输入密码"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validatePass2 = (rule, value, callback) => {
|
||||
if (value === "") {
|
||||
callback(new Error("请再次输入密码"));
|
||||
} else if (value !== this.form.password) {
|
||||
callback(new Error("两次输入密码不一致!"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validateMobile = (rule, value, callback) => {
|
||||
if (isMobile(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("手机号格式不正确"));
|
||||
}
|
||||
};
|
||||
return {
|
||||
form: {},
|
||||
roleBox: false,
|
||||
excelBox: false,
|
||||
selectionList: [],
|
||||
query: {},
|
||||
loading: false,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
init: {
|
||||
roleTree: [],
|
||||
deptTree: [],
|
||||
},
|
||||
props: {
|
||||
label: "title",
|
||||
value: "key",
|
||||
},
|
||||
roleGrantList: [],
|
||||
roleTreeObj: [],
|
||||
tenantId: "",
|
||||
tenantData: [],
|
||||
option: {
|
||||
height: "auto",
|
||||
calcHeight: 186,
|
||||
tip: false,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
selection: true,
|
||||
addBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: true,
|
||||
dialogType: "drawer",
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: "登录账号",
|
||||
prop: "account",
|
||||
search: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "用户姓名",
|
||||
prop: "realName",
|
||||
search: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "所属角色",
|
||||
prop: "roleName",
|
||||
slot: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "所属部门",
|
||||
prop: "deptName",
|
||||
slot: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
type: "select",
|
||||
display: false,
|
||||
dicData: [
|
||||
{ label: "启用", value: 0 },
|
||||
{ label: "停用", value: 1 },
|
||||
],
|
||||
},
|
||||
],
|
||||
group: [
|
||||
{
|
||||
label: "基础信息",
|
||||
prop: "baseInfo",
|
||||
icon: "el-icon-user-solid",
|
||||
column: [
|
||||
{
|
||||
label: "登录账号",
|
||||
prop: "account",
|
||||
editDisabled: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入登录手机号",
|
||||
trigger: "blur",
|
||||
},
|
||||
{ validator: validateMobile, trigger: "blur" },
|
||||
],
|
||||
span: website.tenantMode ? 12 : 24,
|
||||
},
|
||||
{
|
||||
label: "密码",
|
||||
prop: "password",
|
||||
hide: true,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
validator: validatePass,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "确认密码",
|
||||
prop: "password2",
|
||||
hide: true,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
validator: validatePass2,
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "详细信息",
|
||||
prop: "detailInfo",
|
||||
icon: "el-icon-s-order",
|
||||
column: [
|
||||
{
|
||||
label: "用户姓名",
|
||||
prop: "realName",
|
||||
hide: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入用户姓名",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "身份证号",
|
||||
prop: "idNumber",
|
||||
overHidden: true,
|
||||
rules: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (check18IdCardNo(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证格式不正确"));
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "电子邮箱",
|
||||
prop: "email",
|
||||
hide: true,
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: "用户性别",
|
||||
prop: "sex",
|
||||
type: "select",
|
||||
dicData: [
|
||||
{
|
||||
label: "男",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "女",
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: "不限",
|
||||
value: -1,
|
||||
},
|
||||
],
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "用户生日",
|
||||
type: "date",
|
||||
prop: "birthday",
|
||||
format: "yyyy-MM-dd hh:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd hh:mm:ss",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "账号状态",
|
||||
prop: "statusName",
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "职责信息",
|
||||
prop: "dutyInfo",
|
||||
icon: "el-icon-s-custom",
|
||||
column: [
|
||||
{
|
||||
label: "所属角色",
|
||||
prop: "roleId",
|
||||
multiple: false,
|
||||
type: "tree",
|
||||
dicData: [],
|
||||
props: {
|
||||
label: "title",
|
||||
},
|
||||
checkStrictly: true,
|
||||
slot: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请选择所属角色",
|
||||
trigger: "click",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "所属部门",
|
||||
prop: "deptId",
|
||||
type: "tree",
|
||||
multiple: false,
|
||||
dicData: [],
|
||||
props: {
|
||||
label: "title",
|
||||
},
|
||||
checkStrictly: true,
|
||||
slot: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择所属部门",
|
||||
trigger: "click",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
data: [],
|
||||
excelForm: {},
|
||||
excelOption: {
|
||||
submitBtn: false,
|
||||
emptyBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: "文件上传",
|
||||
prop: "excelFile",
|
||||
type: "upload",
|
||||
drag: true,
|
||||
loadText: "文件上传中,请稍等",
|
||||
span: 24,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
},
|
||||
tip: "请上传 .xls,.xlsx 标准格式文件",
|
||||
action: "/api/jobslink-api/system/tuser/import-user",
|
||||
accept: excelAccept,
|
||||
},
|
||||
{
|
||||
label: "数据覆盖",
|
||||
prop: "isCovered",
|
||||
type: "switch",
|
||||
align: "center",
|
||||
width: 80,
|
||||
dicData: [
|
||||
{
|
||||
label: "否",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "是",
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
value: 0,
|
||||
slot: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择是否覆盖",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "模板下载",
|
||||
prop: "excelTemplate",
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"form.tenantId"() {
|
||||
if (this.form.tenantId !== "") {
|
||||
this.initData(this.form.tenantId);
|
||||
}
|
||||
},
|
||||
"excelForm.isCovered"() {
|
||||
if (this.excelForm.isCovered !== "") {
|
||||
const column = this.findObject(this.excelOption.column, "excelFile");
|
||||
column.action = `/api/jobslink-api/system/tuser//import-user?isCovered=${this.excelForm.isCovered}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "permission"]),
|
||||
permissionList() {
|
||||
return {
|
||||
addBtn: this.vaildData(this.permission.user_add, false),
|
||||
viewBtn: this.vaildData(
|
||||
this.permission.manage_company_accountList_view,
|
||||
false
|
||||
),
|
||||
delBtn: this.vaildData(this.permission.user_delete, false),
|
||||
editBtn: this.vaildData(this.permission.user_edit, false),
|
||||
};
|
||||
},
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(",");
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
initData(tenantId) {
|
||||
getRoleTree(tenantId).then((res) => {
|
||||
const column = this.findObject(this.option.group, "roleId");
|
||||
column.dicData = res.data.data;
|
||||
});
|
||||
getDeptTree(tenantId).then((res) => {
|
||||
const column = this.findObject(this.option.group, "deptId");
|
||||
column.dicData = res.data.data;
|
||||
});
|
||||
},
|
||||
submitRole() {
|
||||
const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
|
||||
grant(this.ids, roleList).then(() => {
|
||||
this.roleBox = false;
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page);
|
||||
});
|
||||
},
|
||||
rowUpdate(row, index, done, loading) {
|
||||
update(row).then(
|
||||
() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
done();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
loading();
|
||||
}
|
||||
);
|
||||
},
|
||||
rowEnable(row) {
|
||||
this.$confirm("您确定要启用此账号吗?", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true;
|
||||
return enableUser(row.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.loading = false;
|
||||
this.refreshChange();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
rowDisable(row) {
|
||||
this.$confirm("您确定要停用此账号吗?", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true;
|
||||
return disableUser(row.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.loading = false;
|
||||
this.refreshChange();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.tenantId = "";
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, params);
|
||||
done();
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear() {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
handleReset() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning("请选择至少一条数据");
|
||||
return;
|
||||
}
|
||||
this.$confirm("确定将选择账号密码重置为手机号后六位吗?", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
return resetPassword(this.ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.$refs.crud.toggleSelection();
|
||||
});
|
||||
},
|
||||
handleGrant() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message.warning("请选择至少一条数据");
|
||||
return;
|
||||
}
|
||||
this.roleTreeObj = [];
|
||||
if (this.selectionList.length === 1) {
|
||||
this.roleTreeObj = this.selectionList[0].roleId.split(",");
|
||||
}
|
||||
getRoleTree().then((res) => {
|
||||
this.roleGrantList = res.data.data;
|
||||
this.roleBox = true;
|
||||
});
|
||||
},
|
||||
handleImport() {
|
||||
this.excelBox = true;
|
||||
},
|
||||
handleNodeClick({ data }) {
|
||||
this.tenantId = data.tenantId;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
uploadAfter(res, done) {
|
||||
this.refreshChange();
|
||||
if (!(res instanceof Error)) {
|
||||
this.excelBox = false;
|
||||
}
|
||||
done();
|
||||
},
|
||||
uploadError(error) {
|
||||
if (error) {
|
||||
this.$message.error(error);
|
||||
}
|
||||
},
|
||||
handleExport() {
|
||||
this.$confirm("是否导出用户数据?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
const searchForm = this.$refs.crud.searchForm;
|
||||
window.open(
|
||||
`/api/jobslink-api/system/tuser/export-user?Jobslink-Auth=${getToken()}&account=${
|
||||
searchForm.account
|
||||
}&realName=${searchForm.realName}`
|
||||
);
|
||||
});
|
||||
},
|
||||
handleTemplate() {
|
||||
window.open(
|
||||
`/api/jobslink-api/system/tuser/export-template?Jobslink-Auth=${getToken()}`
|
||||
);
|
||||
},
|
||||
beforeOpen(done, type) {
|
||||
if (["edit", "view"].includes(type)) {
|
||||
//预留
|
||||
}
|
||||
done();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
if (this.tenantId) {
|
||||
this.loading = true;
|
||||
getAllList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params),
|
||||
this.tenantId
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
this.selectionClear();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,230 +0,0 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
title="添加账号"
|
||||
:visible.sync="visible"
|
||||
size="60%"
|
||||
@closed="closed"
|
||||
:class="{'avue--detail':!operation,
|
||||
'avue--view':!operation}"
|
||||
>
|
||||
<avue-form ref="form" v-model="form" :option="option" @submit="submit">
|
||||
<template slot="code">
|
||||
<span>灵活用工</span>
|
||||
</template>
|
||||
<template slot="role">
|
||||
<span>企业管理员</span>
|
||||
</template>
|
||||
</avue-form>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isMobile } from "@/util/validate";
|
||||
import { getAdmin } from "@/api/manage/company";
|
||||
import { add } from "@/api/manage/account";
|
||||
import { check18IdCardNo } from "@/util/validate";
|
||||
import md5 from "js-md5";
|
||||
import lodash from "lodash";
|
||||
|
||||
const validateMobile = (rule, value, callback) => {
|
||||
if (isMobile(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("手机号格式不正确"));
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
props: {},
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
form: {},
|
||||
operation: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
option () {
|
||||
return {
|
||||
menuPosition: "right",
|
||||
disabled: !this.operation,
|
||||
menuBtn: this.operation,
|
||||
group: [
|
||||
{
|
||||
label: "基础信息",
|
||||
prop: "baseInfo",
|
||||
icon: "el-icon-user-solid",
|
||||
column: [
|
||||
{
|
||||
label: "账号",
|
||||
prop: "account",
|
||||
search: true,
|
||||
placeholder: "请输入手机号",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入登录手机号",
|
||||
trigger: "blur",
|
||||
},
|
||||
{ validator: validateMobile, trigger: "blur" },
|
||||
],
|
||||
span: 12,
|
||||
},
|
||||
{
|
||||
label: "密码",
|
||||
prop: "password",
|
||||
display: this.operation,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入密码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "详细信息",
|
||||
prop: "detailInfo",
|
||||
icon: "el-icon-s-order",
|
||||
column: [
|
||||
{
|
||||
label: "用户姓名",
|
||||
prop: "realName",
|
||||
hide: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入用户姓名",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "身份证号",
|
||||
prop: "idNumber",
|
||||
overHidden: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入身份证号",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (check18IdCardNo(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证格式不正确"));
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "用户性别",
|
||||
prop: "sex",
|
||||
type: "select",
|
||||
dicData: [
|
||||
{
|
||||
label: "男",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "女",
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: "不限",
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "用户生日",
|
||||
type: "date",
|
||||
prop: "birthday",
|
||||
format: "yyyy-MM-dd",
|
||||
valueFormat: "yyyy-MM-dd hh:mm:ss",
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "账号状态",
|
||||
prop: "statusName",
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "职责信息",
|
||||
prop: "dutyInfo",
|
||||
icon: "el-icon-s-custom",
|
||||
column: [
|
||||
{
|
||||
label: "开通产品",
|
||||
prop: "code",
|
||||
formslot: true,
|
||||
},
|
||||
{
|
||||
label: "所属角色",
|
||||
prop: "role",
|
||||
formslot: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
submit (form, done) {
|
||||
const data = lodash.clone(form);
|
||||
data.password = md5(data.password);
|
||||
add(data)
|
||||
.then((resp) => {
|
||||
this.$message({ type: "success", message: resp.data.msg });
|
||||
done();
|
||||
this.visible = false;
|
||||
})
|
||||
.catch(() => {
|
||||
done();
|
||||
});
|
||||
},
|
||||
open (row) {
|
||||
this.form.companyId = row.id;
|
||||
this.form.tenantId = row.tenantId;
|
||||
this.form.stationId = row.stationId;
|
||||
getAdmin(row.id).then((resp) => {
|
||||
if (resp.data.data.id) {
|
||||
this.operation = false;
|
||||
this.form = resp.data.data;
|
||||
} else {
|
||||
this.operation = true;
|
||||
}
|
||||
this.visible = true;
|
||||
});
|
||||
},
|
||||
closed () {
|
||||
this.operation = false;
|
||||
this.$refs.form.resetForm();
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
"form.account": function (value) {
|
||||
if (value && value.length === 11) {
|
||||
this.form.password = value.substring(5);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,606 +0,0 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
size="60%"
|
||||
append-to-body
|
||||
title="审核"
|
||||
class="avue--view avue--detail"
|
||||
>
|
||||
<avue-form class="companyCheck-form" ref="check-form" v-model="form" :option="formOption" @submit="submit" :upload-before="uploadBefore">
|
||||
<template slot="cityId" slot-scope="{disabled}">
|
||||
<jl-city-cascader :disabled="disabled" v-model="form.cityId"></jl-city-cascader>
|
||||
</template>
|
||||
<template slot="motoleyUrl">
|
||||
<el-upload
|
||||
list-type="picture-card"
|
||||
:auto-upload="true"
|
||||
:file-list="imgList"
|
||||
:limit="5"
|
||||
:action="mutiPutFile"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-exceed="handleImgLimit"
|
||||
:on-success="handleImgSuccess"
|
||||
:on-remove="handleImgRemove"
|
||||
:before-remove="beforeRemove"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
>
|
||||
<i slot="default" class="el-icon-plus avue-upload__icon"></i>
|
||||
<div slot="tip" class="el-upload__tip">*最多上传5张图片,且大小限制2M以内</div>
|
||||
</el-upload>
|
||||
</template>
|
||||
<template slot="product">
|
||||
<span>灵活用工</span>
|
||||
</template>
|
||||
<template slot="serveCost" v-if="form.serveCost !== undefined">
|
||||
<span>{{moneyFormat(form.serveCost)}} {{wageUnitCategory[form.serveUnit]}}</span>
|
||||
</template>
|
||||
<template slot="menuForm">
|
||||
<!-- <div v-show="[1,2].includes(form.status)"> -->
|
||||
<div v-show="form.status != 0 && form.status != 9">
|
||||
<el-button size="medium" type="primary" @click="handlePass" :loading="loading">通过</el-button>
|
||||
<el-button size="medium" @click="handleReject" :loading="loading">驳回</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</avue-form>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { moneyFormat } from "@/util/money";
|
||||
import { validatenull,check18IdCardNo } from "@/util/validate";
|
||||
import {reject, examineInfo,newExamineApi } from "@/api/manage/company";
|
||||
import { getStationDic } from "@/api/manage/station";
|
||||
import { getTradeDic } from "@/api/manage/trade";
|
||||
import { putFile } from "@/api/resource/oss";
|
||||
|
||||
const accept = [
|
||||
"image/png",
|
||||
"image/jpeg",
|
||||
"image/svg+xml",
|
||||
"image/gif",
|
||||
"image/x-photoshop",
|
||||
];
|
||||
|
||||
const validateCityId=(rule,value,callback)=>{
|
||||
if(value==0){
|
||||
callback(new Error('请选择所在地区'));
|
||||
}else{
|
||||
callback();
|
||||
}
|
||||
|
||||
};
|
||||
const validateIdNumber=(rule,value,callback)=>{
|
||||
if(check18IdCardNo(value)){
|
||||
callback()
|
||||
}
|
||||
else{
|
||||
callback(new Error('身份证格式不正确'));
|
||||
}
|
||||
}
|
||||
const validateTradeId=(rule,value,callback)=>{
|
||||
if(value=='请选择行业'){
|
||||
callback(new Error('请选择行业'));
|
||||
}else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
|
||||
return {
|
||||
loading: false,
|
||||
visible: false,
|
||||
operation: false,
|
||||
mutiPutFile:putFile,
|
||||
form: { serveCost: 0, serveUnit: 0 },
|
||||
wageUnitCategory: {
|
||||
0: "元/人·次",
|
||||
1: "元/人·时",
|
||||
2: "元/人·天",
|
||||
3: "元/人·周",
|
||||
4: "元/人·月",
|
||||
5: "元/人·个",
|
||||
6: "元/人·件"
|
||||
},
|
||||
imgList:[],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
formOption() {
|
||||
return {
|
||||
emptyBtn: false,
|
||||
submitBtn: false,
|
||||
//disabled: true,
|
||||
labelWidth: 120,
|
||||
group: [
|
||||
{
|
||||
label: "企业信息",
|
||||
column: [
|
||||
{
|
||||
type: "select",
|
||||
label: "所属工作站",
|
||||
size: "small",
|
||||
prop: "stationId",
|
||||
dicUrl: getStationDic(),
|
||||
props: {
|
||||
label: "stationName",
|
||||
value: "stationId"
|
||||
},
|
||||
dicFormatter(resp) {
|
||||
return resp.data;
|
||||
},
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
label: "行业",
|
||||
size: "small",
|
||||
prop: "tradeId",
|
||||
dicUrl: getTradeDic(),
|
||||
props: {
|
||||
label: "name",
|
||||
value: "id"
|
||||
},
|
||||
dicFormatter(resp) {
|
||||
var result=[];
|
||||
resp.data.forEach(ele => {
|
||||
if(ele.name!="1"){
|
||||
result.push(ele)
|
||||
}
|
||||
});
|
||||
return result;
|
||||
},
|
||||
rules:[
|
||||
{
|
||||
required:true,validator:validateTradeId,trigger:'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "企业名称",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "companyName",
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "统一信用代码",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "companyTid",
|
||||
placeholder: "18位统一社会信用代码",
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "法人姓名",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "masterName",
|
||||
rules:[
|
||||
{
|
||||
required:true,message:'请输入法人姓名',trigger:'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "法人身份证号",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "masterIdentity",
|
||||
rules:[
|
||||
{
|
||||
required:true,message:'请输入法人身份证号',trigger:'blur'
|
||||
},
|
||||
{
|
||||
validator:validateIdNumber,trigger:'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "所在地区",
|
||||
span: 12,
|
||||
display: true,
|
||||
prop: "cityId",
|
||||
formslot: true,
|
||||
rules:[
|
||||
{
|
||||
required:true,message:'请选择所在地区',trigger:'blur'
|
||||
},
|
||||
{
|
||||
validator:validateCityId,trigger:'blur',required:true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "详细地址",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "companyAddress",
|
||||
rules:[
|
||||
{
|
||||
required:true,message:'请输入详细地址',trigger:'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 图片预览
|
||||
{
|
||||
type: "upload",
|
||||
label: "营业执照",
|
||||
span: 12,
|
||||
accept,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
size: "small",
|
||||
prop: "authUrlId",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传营业执照照片",
|
||||
},
|
||||
],
|
||||
tip: '上传图片大小限制2M以内',
|
||||
},
|
||||
{
|
||||
type: "upload",
|
||||
label: "法人身份证正面",
|
||||
span: 12,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
accept,
|
||||
tip: '上传图片大小限制2M以内',
|
||||
size: "small",
|
||||
prop: "identityUrl4Id",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传法人身份证正面",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "upload",
|
||||
label: "法人身份证背面",
|
||||
span: 12,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
accept,
|
||||
tip: '上传图片大小限制2M以内',
|
||||
size: "small",
|
||||
prop: "identityUrl5Id",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传法人身份证背面",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "upload",
|
||||
label: "电子签章申请表",
|
||||
span: 12,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
accept,
|
||||
tip: '上传图片大小限制2M以内',
|
||||
size: "small",
|
||||
prop: "signSrcUrl",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传电子签章申请表",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "upload",
|
||||
label: "授权委托书",
|
||||
span: 24,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
accept,
|
||||
tip: '上传图片大小限制2M以内',
|
||||
size: "small",
|
||||
prop: "letterOfAttorneyUrl",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传授权委托书",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "招聘简章",
|
||||
formslot:true,
|
||||
span:24,
|
||||
tip: '上传图片大小限制2M以内',
|
||||
accept,
|
||||
prop:'motoleyUrl',
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传招聘简章",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "管理员信息",
|
||||
column: [
|
||||
{
|
||||
type: "input",
|
||||
label: "联系人",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "realName"
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "手机号码",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "account"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "服务信息",
|
||||
column: [
|
||||
{
|
||||
type: "input",
|
||||
label: "联系人",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "product",
|
||||
formslot: true
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "服务费",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "serveCost",
|
||||
formslot: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(id) {
|
||||
examineInfo(id).then(res => {
|
||||
this.imgList=[];
|
||||
this.loading = false;
|
||||
this.form = res.data.data;
|
||||
this.visible = true;
|
||||
if(this.form.tradeId==1){
|
||||
this.form.tradeId='请选择行业';
|
||||
}
|
||||
//给imgList赋值
|
||||
if(this.form.motoleyUrl!=""){
|
||||
var strList=this.form.motoleyUrl.split(',');
|
||||
for(var i in strList){
|
||||
this.imgList.push({
|
||||
url:strList[i]
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePass() {
|
||||
this.loading = true;
|
||||
this.$refs["check-form"].validate(valid=>{
|
||||
if(valid){
|
||||
//newExamineApi({id:this.form.companyId,...this.form}
|
||||
newExamineApi(this.form.id,this.form.tenantId,this.form.tradeId,this.form.masterName,this.form.masterIdentity,
|
||||
this.form.cityId,this.form.companyAddress,this.form.authUrlId,
|
||||
this.form.identityUrl4Id,this.form.identityUrl5Id,this.form.signSrcUrl,this.form.letterOfAttorneyUrl,
|
||||
this.form.motoleyUrl
|
||||
).then(() => {
|
||||
this.$emit("success");
|
||||
this.visible = false;
|
||||
this.$message({ type: "success", message: "操作成功!" });
|
||||
},
|
||||
(error) => {
|
||||
this.$message.error(error);
|
||||
this.visible = false;
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
else{
|
||||
this.loading=false;
|
||||
}
|
||||
})
|
||||
},
|
||||
handleReject() {
|
||||
this.$prompt("", "驳回", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
inputPlaceholder: "驳回原因(0~50个字)",
|
||||
inputValidator: val => {
|
||||
if (validatenull(val)) {
|
||||
return "请输入驳回原因";
|
||||
} else {
|
||||
if(val.length>50){
|
||||
return "驳回原因不能超过50个字";
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
inputType: "textarea"
|
||||
})
|
||||
.then(({ value }) => {
|
||||
this.loading = true;
|
||||
return reject(this.form.id, value);
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = false;
|
||||
this.$emit("success");
|
||||
this.visible = false;
|
||||
this.$message({ type: "success", message: "操作成功!" });
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
moneyFormat,
|
||||
beforeAvatarUpload(file) {
|
||||
const isJPG = ["image/png", "image/jpeg", "image/svg+xml", "image/gif"].indexOf(file.type) != -1;
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isJPG) {
|
||||
this.$message.error('上传图片格式不正确');
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传图片大小不能超过 2MB!');
|
||||
}
|
||||
return isJPG && isLt2M;
|
||||
},
|
||||
handleAuthUrlIdSuccess(res) {
|
||||
this.$set(this.form, "authUrlId", res.data.link);
|
||||
},
|
||||
handleidentityUrl4IdSuccess(res){
|
||||
this.$set(this.form, "identityUrl4Id", res.data.link);
|
||||
},
|
||||
handleidentityUrl5IdSuccess(res){
|
||||
this.$set(this.form, "identityUrl5Id", res.data.link);
|
||||
},
|
||||
/*多张图片上传*/
|
||||
|
||||
handleImgLimit(){
|
||||
this.$message.warning('当前最多上传5张图片');
|
||||
},
|
||||
handleImgSuccess(res){
|
||||
if(res.code==200){
|
||||
this.imgList.push({url:res.data.link});
|
||||
var str="";
|
||||
for(var i=0;i<this.imgList.length;i++){
|
||||
str+=this.imgList[i]['url']+",";
|
||||
}
|
||||
if(str.length>0){
|
||||
str=str.substr(0,str.length-1);
|
||||
}
|
||||
this.form.motoleyUrl=str;
|
||||
}
|
||||
else{
|
||||
this.$message.error('上传失败');
|
||||
}
|
||||
},
|
||||
handleImgRemove(file){
|
||||
let index=0;
|
||||
for(let i in this.imgList){
|
||||
if(this.imgList[i]['uid']==file.uid){
|
||||
index=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.imgList.splice(index,1);
|
||||
var str="";
|
||||
for(var i=0;i<this.imgList.length;i++){
|
||||
str+=this.imgList[i]['url']+",";
|
||||
}
|
||||
if(str.length>0){
|
||||
str=str.substr(0,str.length-1);
|
||||
}
|
||||
this.form.motoleyUrl=str;
|
||||
},
|
||||
uploadBefore(file, done, loading){
|
||||
const isJPG = ["image/png", "image/jpeg", "image/svg+xml", "image/gif"].indexOf(file.type) != -1;
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M || !isJPG) {
|
||||
this.$message.error('上传图片大小不能超过 2MB!');
|
||||
loading();
|
||||
}
|
||||
else{
|
||||
done();
|
||||
return isJPG && isLt2M;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.companyCheck-form .el-upload--picture-card{
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.companyCheck-form .el-input__inner{
|
||||
border: 1px solid #DCDFE6;
|
||||
}
|
||||
.companyCheck-form .el-upload-list--picture-card .el-upload-list__item{
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,316 +0,0 @@
|
||||
<template>
|
||||
<el-drawer :visible.sync="visible" size="60%" @closed="closed" title="配置">
|
||||
<div class="company-config" v-loading="loading">
|
||||
<div>
|
||||
<div ref="configTitle" class="company-config-title">
|
||||
<span>服务配置 <span class="companyConfig-title-tip">提示:</span><span class="companyConfig-title-text">修改配置后,提醒企业重新登录账号(不可刷新)才可更改状态。</span></span>
|
||||
|
||||
<div class="company-config-title-tool"></div>
|
||||
</div>
|
||||
<el-table :data="configData" border>
|
||||
<div slot="empty">请在右上角添加新服务</div>
|
||||
<el-table-column label="产品" prop="name"> </el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template v-slot="{ row }">
|
||||
<span>{{ typeText[row.type].label[row.value] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<el-button size="small" type="text" @click="configSubmit(row, row.value)"
|
||||
v-if="row.value != 2 && row.type!=6">
|
||||
{{ typeText[row.type].btn[row.value] }}
|
||||
</el-button>
|
||||
|
||||
<el-button size="small" type="text" @click="configPay(row, 'free')"
|
||||
v-if="row.type == 4 && row.value != 2">免缴
|
||||
</el-button>
|
||||
<el-button size="small" type="text" @click="configPay(row, 'yes')" v-if="row.type == 4 && row.value == 2">
|
||||
已缴
|
||||
</el-button>
|
||||
|
||||
<el-button size="small" type="text" @click="configPay(row, 'no')"
|
||||
v-if="row.type == 4 && row.value == 2">未缴
|
||||
</el-button>
|
||||
|
||||
<!--启用电子合同按钮-->
|
||||
<el-button size="small" type="text" @click="configOpenElec(row)" v-if="row.type == 6 && row.value == 0">
|
||||
启用
|
||||
</el-button>
|
||||
<el-button size="small" type="text" @click="configSubmit(row)" v-if="row.type == 6 && row.value == 1">
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="company-config-title">
|
||||
<span>服务费信息</span>
|
||||
<div class="company-config-title-tool">
|
||||
<el-button type="text" icon="el-icon-circle-plus-outline" @click="serviceVisible = true">添加新服务</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="serviceData" border>
|
||||
<div slot="empty">请在右上角添加新服务</div>
|
||||
<el-table-column label="产品">
|
||||
<template>灵活用工</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="服务费" prop="serveCost">
|
||||
<template v-slot="{ row }">{{ moneyFormat(row.serveCost) }}元</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="isEnabled">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.isEnabled === 0">停用</span>
|
||||
<span v-else-if="row.isEnabled === 1">启用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template v-slot="{ row }">
|
||||
<el-button size="small" type="text" :disabled="row.isEnabled === 1" @click="serverEnable(row)">启用
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="company-config-title">
|
||||
<span>操作记录</span>
|
||||
</div>
|
||||
</div>
|
||||
<company-config-record :data="record"></company-config-record>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="serviceVisible" append-to-body @closed="serviceClosed">
|
||||
<avue-form ref="serviceForm" v-model="serviceForm" :option="serviceOption" @reset-change="emptytChange"
|
||||
@submit="serviceSubmit">
|
||||
<template v-slot:id>
|
||||
<span>灵活用工</span>
|
||||
</template>
|
||||
</avue-form>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { moneyFormat, toCent } from "@/util/money";
|
||||
import {
|
||||
getConfig,
|
||||
setConfig,
|
||||
addService,
|
||||
serviceEnable,
|
||||
whetherSignService,
|
||||
} from "@/api/manage/company";
|
||||
import lodash from "lodash";
|
||||
import companyConfigRecord from "./companyConfigRecord";
|
||||
import { getConfigList } from "@/api/manage/companyRecord";
|
||||
import Axios from "axios";
|
||||
|
||||
export default {
|
||||
components: { companyConfigRecord },
|
||||
props: {},
|
||||
data() {
|
||||
const common = { 0: "停用", 1: "启用" };
|
||||
const commonBtnText = { 0: "启用", 1: "停用" };
|
||||
|
||||
const trial = { 0: "已缴", 1: "未缴", 2: "免缴" };
|
||||
const trialBtnText = { 0: "未缴", 1: "已缴" };
|
||||
|
||||
const contract = { 0: "未签", 1: "已签" };
|
||||
const contractBtnText = { 0: "已签", 1: "未签" };
|
||||
|
||||
const elecContract = { 0: "关闭", 1: "启用" }
|
||||
const elecContractBtnText = { 0: "启用", 1: "关闭" }
|
||||
|
||||
const typeText = {
|
||||
"-1": { label: common, btn: commonBtnText },
|
||||
1: { label: common, btn: commonBtnText },
|
||||
2: { label: common, btn: commonBtnText },
|
||||
3: { label: common, btn: commonBtnText },
|
||||
4: { label: trial, btn: trialBtnText },
|
||||
5: { label: contract, btn: contractBtnText },
|
||||
6: { label: elecContract, btn: elecContractBtnText }
|
||||
};
|
||||
|
||||
return {
|
||||
typeText,
|
||||
loading: true,
|
||||
visible: false,
|
||||
configVisible: false,
|
||||
serviceVisible: false,
|
||||
companyId: null,
|
||||
tenantId: null,
|
||||
configForm: {},
|
||||
serviceForm: {},
|
||||
record: [],
|
||||
serviceOption: {
|
||||
menuPosition: "right",
|
||||
labelWidth: 120,
|
||||
column: [
|
||||
{
|
||||
type: "select",
|
||||
label: "产品",
|
||||
prop: "id",
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
label: "服务费金额",
|
||||
prop: "serveCost",
|
||||
precision: 2,
|
||||
rules: [{ required: true, message: "请输入服务费金额" }],
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
label: "计量单位",
|
||||
prop: "serveUnit",
|
||||
dataType: "number",
|
||||
dicData: [{ value: 0, label: "元/人·次" }],
|
||||
rules: [{ required: true, message: "请选择计量单位" }],
|
||||
span: 24,
|
||||
},
|
||||
],
|
||||
},
|
||||
configData: [],
|
||||
serviceData: [],
|
||||
height: 0,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
mounted() { },
|
||||
methods: {
|
||||
serviceSubmit(form, done) {
|
||||
form.serveCost = toCent(form.serveCost);
|
||||
form.companyId = this.companyId;
|
||||
form.tenantId = this.tenantId;
|
||||
addService(form)
|
||||
.then(() => {
|
||||
this.$message({ type: "success", message: "操作成功!" });
|
||||
this.getConfig();
|
||||
this.serviceVisible = false;
|
||||
done();
|
||||
})
|
||||
.catch(() => {
|
||||
done();
|
||||
});
|
||||
},
|
||||
configSubmit(row) {
|
||||
const data = lodash.cloneDeep(row);
|
||||
data.value = data.value ? 0 : 1;
|
||||
setConfig(data)
|
||||
.then(() => {
|
||||
this.$message({ type: "success", message: "操作成功!" });
|
||||
this.getConfig();
|
||||
})
|
||||
.catch(() => {
|
||||
this.getConfig();
|
||||
});
|
||||
},
|
||||
/*免缴保证金*/
|
||||
configPay(row, type) {
|
||||
const data = lodash.cloneDeep(row);
|
||||
if (type == "free") {//免缴--2
|
||||
data.value = 2;
|
||||
} else if (type == "yes") {//已缴 --0
|
||||
data.value = 0;
|
||||
} else if (type == "no") {//未缴--1
|
||||
data.value = 1;
|
||||
}
|
||||
|
||||
setConfig(data)
|
||||
.then(() => {
|
||||
this.$message({ type: "success", message: "操作成功!" });
|
||||
this.getConfig();
|
||||
})
|
||||
.catch(() => {
|
||||
this.getConfig();
|
||||
});
|
||||
},
|
||||
/*开启电子合同服务*/
|
||||
configOpenElec(row) {
|
||||
whetherSignService(this.companyId).then((res) => {
|
||||
if (res.data.data) {
|
||||
const data = lodash.cloneDeep(row);
|
||||
data.value = 1;
|
||||
setConfig(data)
|
||||
.then(() => {
|
||||
this.$message({ type: "success", message: "操作成功!" });
|
||||
this.getConfig();
|
||||
})
|
||||
.catch(() => {
|
||||
this.getConfig();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.$message.error('企业未开通【电子签章】,不能开启【电子合同】')
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
this.$message.error(error)
|
||||
})
|
||||
},
|
||||
closed() {
|
||||
this.$emit("success");
|
||||
this.loading = true;
|
||||
|
||||
this.serviceClosed();
|
||||
},
|
||||
serviceClosed() {
|
||||
this.$refs.serviceForm && this.$refs.serviceForm.resetForm();
|
||||
},
|
||||
open(companyId, tenantId) {
|
||||
this.companyId = companyId;
|
||||
this.tenantId = tenantId;
|
||||
this.visible = true;
|
||||
this.getConfig();
|
||||
},
|
||||
getConfig() {
|
||||
this.loading = true;
|
||||
Axios.all([
|
||||
getConfigList(this.companyId),
|
||||
getConfig(this.companyId),
|
||||
]).then(
|
||||
Axios.spread((record, config) => {
|
||||
this.record = record.data.data;
|
||||
this.configData = config.data.data.config;
|
||||
this.serviceData = config.data.data.fee;
|
||||
this.loading = false;
|
||||
})
|
||||
);
|
||||
},
|
||||
serverEnable(row) {
|
||||
this.loading = true;
|
||||
serviceEnable(row.id, this.companyId)
|
||||
.then(() => {
|
||||
this.$message({ type: "success", message: "操作成功!" });
|
||||
this.getConfig();
|
||||
})
|
||||
.catch(() => {
|
||||
this.getConfig();
|
||||
});
|
||||
},
|
||||
moneyFormat,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.company-config-title {
|
||||
font-size: 18px;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.company-config-title-tool {
|
||||
float: right;
|
||||
}
|
||||
.companyConfig-title-tip{
|
||||
font-size: 14px;
|
||||
color: red;
|
||||
}
|
||||
.companyConfig-title-text{
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,33 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="data" style="width: 100%" border>
|
||||
<el-table-column type="index" label="序号" :width="70"></el-table-column>
|
||||
<el-table-column prop="createTime" label="修改时间"></el-table-column>
|
||||
<el-table-column prop="createUserName" label="修改人"></el-table-column>
|
||||
<el-table-column prop="remarks" label="修改概述"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
defautl() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {},
|
||||
methods: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,33 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="data" style="width: 100%" border>
|
||||
<el-table-column type="index" label="序号" :width="70"></el-table-column>
|
||||
<el-table-column prop="createTime" label="修改时间" sortable></el-table-column>
|
||||
<el-table-column prop="createUserName" label="修改人"></el-table-column>
|
||||
<el-table-column prop="remarks" label="修改概述"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
defautl() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
created() {},
|
||||
methods: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,151 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="record" style="width: 100%" border>
|
||||
<el-table-column type="index" label="序号" :width="70"></el-table-column>
|
||||
<el-table-column prop="date" label="修改时间"></el-table-column>
|
||||
<el-table-column prop="createUserName" label="修改人"></el-table-column>
|
||||
<el-table-column label="修改概述">
|
||||
<template #default="{ row, $index }">
|
||||
<span>{{ getDetails(row, $index === 0 ? "创建" : "变更:") }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCompanyList } from "@/api/manage/companyRecord";
|
||||
import lodash from "lodash";
|
||||
import dictVertical from "../../util/demo/dict-vertical.vue";
|
||||
|
||||
const ignoreKey = {
|
||||
id: true,
|
||||
companyId: true,
|
||||
createUser: true,
|
||||
createUserName: true,
|
||||
createTime: true,
|
||||
reviewTime: true,
|
||||
tenantId: true,
|
||||
authType: true,
|
||||
manager: true,
|
||||
telphone: true,
|
||||
};
|
||||
const labelDic = {
|
||||
stationId: "所属工作站",
|
||||
companyName: "企业名称",
|
||||
tradeId: "所属行业",
|
||||
masterName: "法人姓名",
|
||||
masterIdentity: "法人身份证号",
|
||||
companyTid: "统一信用代码",
|
||||
companyAddress: "详细地址",
|
||||
cityId: "所在地区",
|
||||
authUrlId: "营业执照照片",
|
||||
identityUrl4Id: "法人身份证(人像)",
|
||||
identityUrl5Id: "法人身份证(国徽)",
|
||||
remarks: "驳回原因",
|
||||
status: "企业状态",
|
||||
};
|
||||
|
||||
function First(d) {
|
||||
const data = lodash.cloneDeep(d);
|
||||
|
||||
this.change = (newData) => {
|
||||
const result = {
|
||||
date: newData.createTime,
|
||||
row: [],
|
||||
createUserName: newData.createUserName,
|
||||
};
|
||||
for (const key in newData) {
|
||||
if (Object.hasOwnProperty.call(newData, key)) {
|
||||
const element = newData[key];
|
||||
if (
|
||||
!ignoreKey.hasOwnProperty(key) &&
|
||||
element !== null &&
|
||||
element !== "" &&
|
||||
element !== -1
|
||||
) {
|
||||
result.row.push({
|
||||
key,
|
||||
label: labelDic[key],
|
||||
newValue: element,
|
||||
oldValue: data[key],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
this.create = {
|
||||
date: data.createTime,
|
||||
row: [],
|
||||
createUserName: data.createUserName,
|
||||
};
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
function record(data) {
|
||||
const arr = [];
|
||||
const first = new First(data[0]);
|
||||
arr[0] = first.create;
|
||||
for (let index = 1; index < data.length; index++) {
|
||||
const element = data[index];
|
||||
arr.push(first.change(element));
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
export default {
|
||||
components: { dictVertical },
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
getCompanyList(this.data.id).then((rep) => {
|
||||
this.list = rep.data.data;
|
||||
});
|
||||
},
|
||||
getDetails(row, start) {
|
||||
if (!row.row) {
|
||||
return "";
|
||||
}
|
||||
let rel = start;
|
||||
Array.prototype.forEach.call(row.row, (item) => {
|
||||
rel += "、" + item.label;
|
||||
});
|
||||
rel = rel.replace("、", "");
|
||||
return rel;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
record() {
|
||||
let result = [];
|
||||
if (this.list.length > 0) {
|
||||
result = record(this.list);
|
||||
}
|
||||
return result;
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,100 +0,0 @@
|
||||
<template>
|
||||
<basic-container v-loading="loading">
|
||||
<el-input
|
||||
ref="search"
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
placeholder="搜索公司"
|
||||
v-model="query.companyName"
|
||||
clearable
|
||||
></el-input>
|
||||
<div class="company-tree" ref="tree" :style="{height:height+'px','margin-top':'5px'}">
|
||||
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
||||
</div>
|
||||
<el-pagination
|
||||
ref="pagination"
|
||||
layout="prev, pager, next"
|
||||
:total="page.total"
|
||||
:page-size="page.pageSize"
|
||||
@current-change="currentChange"
|
||||
></el-pagination>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMenuList } from "@/api/manage/company";
|
||||
import _ from "lodash";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
height: 100,
|
||||
data: [],
|
||||
page: {
|
||||
pageSize: 30,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "companyName",
|
||||
},
|
||||
query: {
|
||||
companyName: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.onLoad(this.page, this.query);
|
||||
this.getTreeHeight();
|
||||
},
|
||||
methods: {
|
||||
handleNodeClick(data, vNode, node) {
|
||||
this.$emit("node-click", { data, vNode, node });
|
||||
},
|
||||
onLoad(page, param) {
|
||||
getMenuList(page.currentPage, page.pageSize, param)
|
||||
.then((resp) => {
|
||||
const data = resp.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.lloading = false;
|
||||
});
|
||||
},
|
||||
queryChange: _.debounce(function () {
|
||||
this.onLoad(this.page, this.query);
|
||||
}, 1000),
|
||||
currentChange(current) {
|
||||
this.page.currentPage = current;
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
getTreeHeight() {
|
||||
const pageStyle = this.$refs.pagination.$el;
|
||||
const searchStyle = this.$refs.search.$el;
|
||||
const treeStyle = this.$refs.tree;
|
||||
this.height =
|
||||
document.documentElement.clientHeight -
|
||||
pageStyle.offsetTop -
|
||||
searchStyle.offsetTop -
|
||||
treeStyle.offsetTop -
|
||||
10;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
"query.companyName": function () {
|
||||
this.page.currentPage = 1;
|
||||
this.queryChange();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.company-tree {
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,610 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<el-drawer
|
||||
title=""
|
||||
append-to-body
|
||||
:visible.sync="drawer"
|
||||
size="70%"
|
||||
:wrapperClosable="false"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
class="examineDialog">
|
||||
<div class="companyTitle">
|
||||
<div class="title">
|
||||
<h2>{{row.companyName}}</h2>
|
||||
<p><span>所属工作站:{{companyInfo.stationName}}</span><span>邀请码:{{row.inviteCode}}</span></p>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button type="primary" size="small" @click="reviewHandelClick('0')">审核通过</el-button>
|
||||
<el-button type="info" size="small" @click="reviewHandelClick('1')">审核不通过</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="企业信息" name="companyInfo">
|
||||
<el-form ref="form" :model="companyInfo" label-width="150px">
|
||||
<el-form-item label="社会信用代码:">
|
||||
<el-input v-model="companyInfo.companyTid" :disabled="true" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司名称:">
|
||||
<el-input v-model="companyInfo.companyName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人:">
|
||||
<el-input v-model="companyInfo.masterName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号:">
|
||||
<el-input v-model="companyInfo.masterIdentity" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人电话:">
|
||||
<el-input v-model="companyInfo.masterPhone" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册电话:">
|
||||
<el-input v-model="companyInfo.telphone" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="行业:">
|
||||
<!-- <el-input v-model="companyInfo.tradeId" :disabled="true"></el-input> -->
|
||||
<el-select v-model="companyInfo.tradeId" placeholder="请选择" :disabled="true">
|
||||
<el-option
|
||||
v-for="(item,index) in tradeDic"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在地区:">
|
||||
<jl-city-cascader
|
||||
:disabled="true"
|
||||
v-model="companyInfo.cityId"
|
||||
></jl-city-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址:">
|
||||
<el-input v-model="companyInfo.companyAddress" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="服务设置" name="serviceInfo">
|
||||
<ul class="serviceInfo">
|
||||
<li v-for="(item,index) in configData" :key="index">
|
||||
<div>{{item.name}}</div>
|
||||
<span v-if="item.type == 1 && item.value == 0">停用</span><span v-else-if="item.type == 1 && item.value == 1">启用</span>
|
||||
<span v-if="item.type == 4 && item.value == 1">未缴</span><span v-if="item.type == 4 && item.value == 0">已缴</span><span v-if="item.type == 4 && item.value == 2">免缴</span>
|
||||
<span v-if="item.type == 3 && item.value == 0">停用</span><span v-if="item.type == 3 && item.value == 1">启用</span>
|
||||
<span v-if="item.type == 2 && item.value == 0">关闭</span><span v-if="item.type == 2 && item.value == 1">开启</span>
|
||||
<span v-if="item.type == 5 && item.value == 0">未签</span><span v-if="item.type == 5 && item.value == 1">已签</span>
|
||||
<span v-if="item.type == 6 && item.value == 0">关闭</span><span v-if="item.type == 6 && item.value == 1">开启</span>
|
||||
</li>
|
||||
</ul>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="服务费信息" name="serviceChargeInfo">
|
||||
<div class="serviceChargeInfo">
|
||||
<p class="tips">服务费:是企业享受二项服务(发工资和投商保)的费用,启用之后需新的订单才会生效。</p>
|
||||
<el-table :data="serviceData" border>
|
||||
<el-table-column label="产品">
|
||||
<template>服务费</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="服务费" prop="serveCost">
|
||||
<template v-slot="{ row }">{{ moneyFormat(row.serveCost) }}元</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="isEnabled">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.isEnabled === 0">停用</span>
|
||||
<span v-else-if="row.isEnabled === 1">启用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="附件" name="enclosure">
|
||||
<avue-form
|
||||
:option="option"
|
||||
v-model="companyInfo"
|
||||
ref="form"
|
||||
@submit="formSubmit"
|
||||
:upload-after="uploadAfter"
|
||||
:upload-error="uploadError"
|
||||
:upload-before="beforeAvatarUpload"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<template slot="motoleyUrl">
|
||||
<el-upload
|
||||
class="companyList-upload"
|
||||
list-type="picture-card"
|
||||
:auto-upload="true"
|
||||
:file-list="imgList"
|
||||
:limit="4"
|
||||
:action="mutiPutFile"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-exceed="handleImgLimit"
|
||||
:on-success="handleImgSuccess"
|
||||
:on-remove="handleImgRemove"
|
||||
:before-remove="beforeRemove"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:disabled="true"
|
||||
>
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
</avue-form>
|
||||
<i class="el-icon-download" @click="downloadAllClick('enclosure')">下载全部</i>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="签发电子签章" name="contractOn">
|
||||
<avue-form
|
||||
:option="optionContractOn"
|
||||
v-model="companyInfo"
|
||||
ref="form"
|
||||
@submit="formSubmit"
|
||||
:upload-after="uploadAfter"
|
||||
:upload-error="uploadError"
|
||||
:upload-before="beforeAvatarUpload"
|
||||
@on-load="onLoad"
|
||||
disbled
|
||||
>
|
||||
</avue-form>
|
||||
<i class="el-icon-download" @click="downloadAllClick('contractOn')">下载全部</i>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="操作记录" name="operationRecord">
|
||||
<company-config-record :data="record"></company-config-record>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import {getStation } from "@/api/manage/station";
|
||||
import {getDetail} from "@/api/manage/company";
|
||||
import { getTradeDic } from "@/api/manage/trade";
|
||||
import { moneyFormat } from "@/util/money";
|
||||
import { getConfigListNew } from "@/api/manage/companyRecord";
|
||||
import companyConfigRecord from "../companyConfigRecordNew";
|
||||
import Axios from "axios";
|
||||
import { putFile } from "@/api/resource/oss";
|
||||
import {
|
||||
getConfigNew,
|
||||
review,
|
||||
downloadList
|
||||
} from "@/api/manage/company";
|
||||
const accept = [
|
||||
"image/png",
|
||||
"image/jpeg",
|
||||
"image/svg+xml",
|
||||
"image/gif",
|
||||
"image/x-photoshop",
|
||||
];
|
||||
export default {
|
||||
components: { companyConfigRecord },
|
||||
data() {
|
||||
return {
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
activeName: 'companyInfo',
|
||||
downloadUrls:'',
|
||||
formEnclosure:{},
|
||||
drawer:false,
|
||||
companyInfo:{},
|
||||
row:{},
|
||||
inviteCode:null,
|
||||
tradeDic:[],
|
||||
configData:[],
|
||||
companyId: null,
|
||||
tenantId: null,
|
||||
serviceData: [],
|
||||
record:[],
|
||||
mutiPutFile:putFile,
|
||||
imgList:[],
|
||||
option: {
|
||||
labelWidth: 200,
|
||||
menuBtn:false,
|
||||
column: [
|
||||
{
|
||||
type: "upload",
|
||||
label: "法人身份证(人像)",
|
||||
span:12,
|
||||
showFileList: false,
|
||||
disabled:true,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
accept,
|
||||
size: "small",
|
||||
prop: "identityUrl4Id",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传法人身份证(人像)",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "upload",
|
||||
label: "法人身份证(国徽)",
|
||||
span: 12,
|
||||
disabled:true,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
accept,
|
||||
size: "small",
|
||||
prop: "identityUrl5Id",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传法人身份证(国徽)",
|
||||
},
|
||||
],
|
||||
// tip:'上传图片大小限制2M以内',
|
||||
},
|
||||
{
|
||||
type: "upload",
|
||||
label: "营业执照",
|
||||
span: 12,
|
||||
disabled:true,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
accept,
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
size: "small",
|
||||
prop: "authUrlId",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传营业执照照片",
|
||||
},
|
||||
],
|
||||
// tip:'上传图片大小限制2M以内',
|
||||
},
|
||||
|
||||
{
|
||||
type: "upload",
|
||||
label: "授权委托书",
|
||||
disabled:true,
|
||||
span: 12,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
accept,
|
||||
size: "small",
|
||||
prop: "letterOfAttorneyUrl",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传授权委托书",
|
||||
},
|
||||
],
|
||||
// tip:'上传图片大小限制2M以内',
|
||||
},
|
||||
{
|
||||
label: "招聘简章",
|
||||
disabled:true,
|
||||
formslot:true,
|
||||
span:24,
|
||||
prop:'motoleyUrl',
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传招聘简章",
|
||||
},
|
||||
],
|
||||
viewDisplay: false,
|
||||
},
|
||||
]
|
||||
},
|
||||
optionContractOn: {
|
||||
labelWidth: 200,
|
||||
menuBtn:false,
|
||||
column: [
|
||||
{
|
||||
type: "upload",
|
||||
label: "电子签章申请表",
|
||||
span: 12,
|
||||
showFileList: false,
|
||||
disabled:true,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
accept,
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
size: "small",
|
||||
prop: "signSrcUrl",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传电子签章申请表",
|
||||
},
|
||||
],
|
||||
// tip:'上传图片大小限制2M以内',
|
||||
},
|
||||
{
|
||||
type: "upload",
|
||||
disabled:true,
|
||||
label: "电子签章章模",
|
||||
span: 12,
|
||||
showFileList: false,
|
||||
listType: "picture-img",
|
||||
multiple: false,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
url: "link",
|
||||
},
|
||||
canvasOption: {},
|
||||
headers: [],
|
||||
data: [],
|
||||
accept,
|
||||
size: "small",
|
||||
prop: "templateUrl",
|
||||
action: putFile,
|
||||
viewDisplay: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "电子签章章模",
|
||||
},
|
||||
],
|
||||
// tip:'上传图片大小限制2M以内',
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
moneyFormat,
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
//下载全部
|
||||
downloadAllClick(name){
|
||||
this.downloadUrls = '';
|
||||
if(name == 'enclosure'){
|
||||
this.downloadUrls += this.companyInfo.identityUrl4Id + ',';
|
||||
this.downloadUrls += this.companyInfo.identityUrl5Id + ',';
|
||||
this.downloadUrls += this.companyInfo.authUrlId + ',';
|
||||
this.downloadUrls += this.companyInfo.letterOfAttorneyUrl + ',';
|
||||
this.downloadUrls += this.companyInfo.motoleyUrl;
|
||||
}else{
|
||||
this.downloadUrls += this.companyInfo.signSrcUrl + ',';
|
||||
this.downloadUrls += this.companyInfo.templateUrl;
|
||||
}
|
||||
window.open(downloadList(this.downloadUrls));
|
||||
},
|
||||
//审核接口
|
||||
reviewHandelClick(status){
|
||||
if(status == 1){
|
||||
this.$prompt('原因:', '审核不通过', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputPattern: /[^\d.]/g,
|
||||
inputErrorMessage: '请输入暂不发放原因',
|
||||
}).then(({ value }) => {
|
||||
review(this.companyId,status,value).then((res) => {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.drawer = false;
|
||||
this.$emit("refresh")
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
}else{
|
||||
review(this.companyId,status,'').then((res) => {
|
||||
this.$message({
|
||||
message: res.data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.drawer = false;
|
||||
this.$emit("refresh")
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
/*多张图片上传*/
|
||||
|
||||
handleImgLimit(){
|
||||
this.$message.warning('当前最多上传4张图片');
|
||||
},
|
||||
handleImgSuccess(res){
|
||||
if(res.code==200){
|
||||
this.imgList.push({url:res.data.link});
|
||||
|
||||
var str="";
|
||||
for(var i=0;i<this.imgList.length;i++){
|
||||
str+=this.imgList[i]['url']+",";
|
||||
}
|
||||
if(str.length>0){
|
||||
str=str.substr(0,str.length-1);
|
||||
}
|
||||
this.companyInfo.motoleyUrl=str;
|
||||
}
|
||||
else{
|
||||
this.$message.error('上传失败');
|
||||
}
|
||||
|
||||
},
|
||||
handleImgRemove(file){
|
||||
let index=0;
|
||||
for(let i in this.imgList){
|
||||
if(this.imgList[i]['uid']==file.uid){
|
||||
index=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.imgList.splice(index,1);
|
||||
var str="";
|
||||
for(var i=0;i<this.imgList.length;i++){
|
||||
str+=this.imgList[i]['url']+",";
|
||||
}
|
||||
if(str.length>0){
|
||||
str=str.substr(0,str.length-1);
|
||||
}
|
||||
this.companyInfo.motoleyUrl=str;
|
||||
},
|
||||
//获取企业服务配置
|
||||
getConfig() {
|
||||
this.loading = true;
|
||||
Axios.all([
|
||||
getConfigListNew(this.companyId,0),
|
||||
getConfigNew(this.companyId),
|
||||
]).then(
|
||||
Axios.spread((record, config) => {
|
||||
this.record = record.data.data;
|
||||
this.configData = config.data.data.config;
|
||||
this.serviceData = config.data.data.fee;
|
||||
this.loading = false;
|
||||
})
|
||||
);
|
||||
},
|
||||
/*打开drawer*/
|
||||
openDialog (row) {
|
||||
this.companyId = row.id;
|
||||
this.tenantId = row.tenantId;
|
||||
this.inviteCode = row.inviteCode;
|
||||
this.row = row;
|
||||
this.drawer = true;
|
||||
this.imgList = [];
|
||||
getTradeDic(true).then((res) => {
|
||||
this.tradeDic = res.data.data;
|
||||
});
|
||||
getDetail(row.id).then((res) => {
|
||||
this.loading = false;
|
||||
this.companyInfo = res.data.data;
|
||||
// if(this.form.tradeId==1){
|
||||
// this.form.tradeId='';
|
||||
// this.tradeId = this.form.tradeId;
|
||||
// }
|
||||
if(this.companyInfo.motoleyUrl!=""){
|
||||
var strList=this.companyInfo.motoleyUrl.split(',');
|
||||
for(var i in strList){
|
||||
this.imgList.push({url:strList[i]})
|
||||
}
|
||||
}
|
||||
getStation().then((res)=>{
|
||||
let getStationList = res.data.data;
|
||||
getStationList.forEach((ele) => {
|
||||
if(row.stationId == ele.stationId){
|
||||
this.companyInfo.stationName = ele.stationName;
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
this.getConfig();
|
||||
|
||||
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.examineDialog .companyTitle{
|
||||
border-bottom: 2px solid #e7e7e7;
|
||||
margin-bottom: 30px;
|
||||
display: flex;
|
||||
}
|
||||
.examineDialog .el-drawer__header{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.examineDialog .companyTitle p span{
|
||||
margin-right: 20px;
|
||||
}
|
||||
.examineDialog .companyTitle h2{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.examineDialog .companyTitle .title{
|
||||
width: 85%;
|
||||
}
|
||||
.examineDialog .companyTitle .btn{
|
||||
margin-top: 40px;
|
||||
}
|
||||
.examineDialog .el-form-item{
|
||||
float: left;
|
||||
width: 35%;
|
||||
}
|
||||
.examineDialog .el-cascader,.examineDialog .el-select{
|
||||
width: 100%;
|
||||
}
|
||||
.examineDialog .el-input__suffix{
|
||||
display: none;
|
||||
}
|
||||
.examineDialog .serviceInfo li{
|
||||
display: flex;
|
||||
height: 50px;
|
||||
background-color: #F5F7FA;
|
||||
border-radius: 10px;
|
||||
margin-top: 20px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.examineDialog .serviceInfo li div{
|
||||
width: 60%;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.examineDialog .serviceInfo li span{
|
||||
color: #409EFF;
|
||||
}
|
||||
.examineDialog .serviceChargeInfo .tips{
|
||||
line-height: 30px;
|
||||
color: #ff0000;
|
||||
}
|
||||
.examineDialog .el-icon-download{
|
||||
color: #1989fa;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
right: -120px;
|
||||
top: 0;
|
||||
}
|
||||
.v-modal{
|
||||
z-index: -1 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,181 +0,0 @@
|
||||
<template>
|
||||
<basic-container class="examinListBox">
|
||||
<!--搜索栏-->
|
||||
<el-form
|
||||
size="small"
|
||||
label-position="right"
|
||||
:inline="true"
|
||||
style="padding-left: 10px;padding-right: 10px;"
|
||||
>
|
||||
<el-row :span="24">
|
||||
<el-form-item >
|
||||
<el-radio-group v-model="search.status" size="small" @change="changeCategory">
|
||||
<el-radio-button
|
||||
v-for="(item,key,index) in examineListStatus"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
>{{item.label}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="企业名称:">
|
||||
<el-input v-model="search.companyName" placeholder="企业名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册电话:" v-if="search.status === 3 || search.status === 4 || search.status === 5">
|
||||
<el-input v-model="search.phone" placeholder="注册电话" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属工作站:">
|
||||
<el-select
|
||||
v-model="search.stationId"
|
||||
placeholder="所属工作站"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, key, index) in workstationList"
|
||||
:key="index"
|
||||
:label="item.stationName"
|
||||
:value="item.stationId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商保状态:" v-if="search.status === 0 || search.status === 1 || search.status === 9">
|
||||
<el-select
|
||||
v-model="search.insuranceOn"
|
||||
placeholder="商保状态"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, key, index) in insuranceOnList"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子合同:" v-if="search.status === 0 || search.status === 1 || search.status === 9">
|
||||
<el-select
|
||||
v-model="search.contractOn"
|
||||
placeholder="电子合同"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, key, index) in contractOnList"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div class="searchBtn">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="handleSearch">搜 索</el-button>
|
||||
<el-button size="small" icon="el-icon-delete" @click="handleClear">清 空</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!--/搜索栏-->
|
||||
<!-- table -->
|
||||
<wait-table ref="wait" v-if="search.status === 3" @refresh="handleClear"></wait-table>
|
||||
<ing-table ref="ing" v-if="search.status === 4" @refresh="handleClear"></ing-table>
|
||||
<success-table ref="success" v-if="search.status === 0" @refresh="handleClear"></success-table>
|
||||
<fail-table ref="fail" v-if="search.status === 1" @refresh="handleClear"></fail-table>
|
||||
<pause-table ref="pause" v-if="search.status === 5" @refresh="handleClear"></pause-table>
|
||||
<stop-table ref="stop" v-if="search.status === 9" @refresh="handleClear"></stop-table>
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import WaitTable from './examineTable/waitTable'//待完善
|
||||
import IngTable from './examineTable/ingTable'//待审核
|
||||
import SuccessTable from './examineTable/successTable'//审核通过
|
||||
import FailTable from './examineTable/failTable'//审核不通过
|
||||
import PauseTable from './examineTable/pauseTable'//暂不处理
|
||||
import StopTable from './examineTable/stopTable'//暂不处理
|
||||
import { examineListState } from '@/common/dic'
|
||||
import { getStation } from "@/api/manage/station";
|
||||
export default {
|
||||
name: "manage_compan_examineList",
|
||||
components: {
|
||||
WaitTable,
|
||||
IngTable,
|
||||
SuccessTable,
|
||||
FailTable,
|
||||
PauseTable,
|
||||
StopTable
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
workstationList:{},
|
||||
examineListStatus:examineListState,
|
||||
insuranceOnList:[{
|
||||
value: '0',
|
||||
label: '停用'
|
||||
}, {
|
||||
value: '1',
|
||||
label: '启用'
|
||||
}],
|
||||
contractOnList:[{
|
||||
value: '0',
|
||||
label: '关闭'
|
||||
}, {
|
||||
value: '1',
|
||||
label: '开启'
|
||||
}],
|
||||
search: {
|
||||
status: 3//认证状态 0:审核通过;1:审核不通过; 2:已驳回 3:待完善;4.待审核;5,暂不处理;9:终止合作
|
||||
},
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
}
|
||||
},
|
||||
created(){
|
||||
getStation().then((res) => {
|
||||
this.workstationList = res.data.data;
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
changeCategory(){
|
||||
this.search = {
|
||||
status: this.search.status,
|
||||
}
|
||||
},
|
||||
//搜索按钮
|
||||
handleSearch () {
|
||||
if (this.search.status === 3) {
|
||||
this.$refs.wait.onLoad(this.page, this.search);
|
||||
} else if (this.search.status === 4) {
|
||||
this.$refs.ing.onLoad(this.page, this.search);
|
||||
} else if (this.search.status === 0) {
|
||||
this.$refs.success.onLoad(this.page, this.search);
|
||||
} else if (this.search.status === 1) {
|
||||
this.$refs.fail.onLoad(this.page, this.search);
|
||||
} else if (this.search.status === 5) {
|
||||
this.$refs.pause.onLoad(this.page, this.search);
|
||||
}else if (this.search.status === 9) {
|
||||
this.$refs.stop.onLoad(this.page, this.search);
|
||||
}
|
||||
},
|
||||
//清空按钮
|
||||
handleClear(){
|
||||
this.search.companyName = "";
|
||||
this.search.phone = "";
|
||||
this.search.stationId = "";
|
||||
this.search.insuranceOn = "";
|
||||
this.search.contractOn = "";
|
||||
this.handleSearch ();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style >
|
||||
.searchBtn {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.examinListBox .el-form--inline .el-form-item{
|
||||
margin-bottom: 28px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,294 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:data="data"
|
||||
:option="option"
|
||||
@on-load="onLoad"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
>
|
||||
<template slot="menu" slot-scope="{ row }">
|
||||
<el-button
|
||||
@click="checkClick(row,'fail')"
|
||||
type="text"
|
||||
size="small"
|
||||
>查看</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<!-- 暂不处理弹窗 -->
|
||||
<el-dialog
|
||||
title="暂不处理"
|
||||
:visible.sync="refuseDialogVisible"
|
||||
width="30%"
|
||||
:modal=false
|
||||
class="refuseDialog"
|
||||
@close = "resetForm('causeForm')"
|
||||
>
|
||||
<!-- <p class="refuseDialogTitle">原因:</p> -->
|
||||
<div>
|
||||
<el-form :model="causeForm" :rules="rules" ref="causeForm">
|
||||
<el-form-item label="原因:" prop="cause">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="请输入原因"
|
||||
v-model="causeForm.cause">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetForm('causeForm')" size="small">取 消</el-button>
|
||||
<el-button type="primary" @click="noProcessingBtn('causeForm')" size="small">暂不处理</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--查看保单详情dialog-->
|
||||
<check-dialog ref="check" v-show="false"></check-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import checkDialog from "../examineDialog/checkDialog";
|
||||
import {getListNew,getNoProcessing} from "@/api/manage/company";
|
||||
import { getStationDic , getStation } from "@/api/manage/station";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//status:3,//认证状态 0:审核通过;1:审核不通过; 2:已驳回 3:待完善;4.待审核;5,暂不处理;9:终止合作
|
||||
query: {
|
||||
status:1
|
||||
},
|
||||
rowData:{},
|
||||
causeForm:{},
|
||||
rules: {
|
||||
cause: [
|
||||
{required: true, message: '请输入原因', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
noProcessingStatus:5,// 5:暂不处理;9:终止合作
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
refuseDialogVisible: false,
|
||||
data: [],
|
||||
option:{
|
||||
title:'表格的标题',
|
||||
titleSize:'h3',
|
||||
titleStyle:{
|
||||
color:'red'
|
||||
},
|
||||
border: true,
|
||||
addBtn: false,
|
||||
editBtn:false,
|
||||
delBtn:false,
|
||||
page:false,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
menuWidth:90,
|
||||
align:'center',
|
||||
menuAlign:'center',
|
||||
|
||||
column:[
|
||||
{
|
||||
label:'企业名称',
|
||||
prop:'companyName'
|
||||
},
|
||||
// {
|
||||
// label:'统一社会信用代码',
|
||||
// prop:'companyTid'
|
||||
// },
|
||||
// {
|
||||
// label:'注册电话',
|
||||
// prop:'telphone'
|
||||
// },
|
||||
{
|
||||
label:'所属工作站',
|
||||
prop:'stationId',
|
||||
dicUrl: getStationDic(),
|
||||
props: {
|
||||
label: "stationName",
|
||||
value: "stationId",
|
||||
},
|
||||
},
|
||||
{
|
||||
label:'保证金',
|
||||
prop:'trialOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'已缴',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'未缴',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
label:'免缴',
|
||||
value:2
|
||||
},
|
||||
{
|
||||
label: " ",
|
||||
value: -1,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'商保状态',
|
||||
prop:'insuranceOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'停用',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'启用',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
label: " ",
|
||||
value: -1,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'合同',
|
||||
prop:'isSign',
|
||||
dicData:[
|
||||
{
|
||||
label:'未签',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'已签',
|
||||
value:1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'电子合同',
|
||||
prop:'contractOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'关闭',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'开启',
|
||||
value:1
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "注册时间",
|
||||
prop: "createTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label: "提交审核时间",
|
||||
prop: "commitReviewTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label: "审核不通过时间",
|
||||
prop: "reviewTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label:'原因',
|
||||
prop:'remarks'
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
checkDialog
|
||||
},
|
||||
methods:{
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
//查看
|
||||
checkClick(row,flag){
|
||||
this.$refs.check.openDialog(row,flag);
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
//暂不处理
|
||||
refuseClick(row){
|
||||
this.rowData = row
|
||||
this.refuseDialogVisible = true;
|
||||
},
|
||||
//暂不处理按钮
|
||||
noProcessingBtn(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.refuseDialogVisible = false;
|
||||
this.loading = true;
|
||||
getNoProcessing(this.rowData.id,this.causeForm.cause,this.noProcessingStatus).then((res)=>{
|
||||
if (res.data.code==200) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.loading=false;
|
||||
this.onLoad(this.page, this.query);
|
||||
}else{
|
||||
this.$message.error(res.data.msg)
|
||||
this.loading=false;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
//更新form表单
|
||||
resetForm(formName){
|
||||
this.$refs[formName].resetFields();
|
||||
this.refuseDialogVisible = false;
|
||||
},
|
||||
// beforeOpen(){
|
||||
// this.onLoad(this.page, this.query);
|
||||
// },
|
||||
onLoad(page, params = {}) {
|
||||
console.log(page);
|
||||
this.loading = true;
|
||||
getListNew(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
//console.log(getStationDic());
|
||||
getStation().then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.refuseDialog .el-dialog__body{
|
||||
padding: 0 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,262 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:data="data"
|
||||
:option="option"
|
||||
@on-load="onLoad"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
>
|
||||
<template slot="menu" slot-scope="{ row }">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="HandelExamineClick(row)"
|
||||
>审核</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<!-- 暂不处理弹窗 -->
|
||||
<el-dialog
|
||||
title="暂不处理"
|
||||
:visible.sync="refuseDialogVisible"
|
||||
width="30%"
|
||||
:modal=false
|
||||
class="refuseDialog"
|
||||
@close = "resetForm('causeForm')"
|
||||
>
|
||||
<!-- <p class="refuseDialogTitle">原因:</p> -->
|
||||
<div>
|
||||
<el-form :model="causeForm" :rules="rules" ref="causeForm">
|
||||
<el-form-item label="原因:" prop="cause">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="请输入原因"
|
||||
v-model="causeForm.cause">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetForm('causeForm')" size="small">取 消</el-button>
|
||||
<el-button type="primary" @click="noProcessingBtn('causeForm')" size="small">暂不处理</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--查看保单详情dialog-->
|
||||
<examine-dialog ref="examine" v-show="false" @refresh="refreshChange"></examine-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import examineDialog from "../examineDialog/ExamineDialog";
|
||||
import {getListNew} from "@/api/manage/company";
|
||||
import { getStationDic , getStation } from "@/api/manage/station";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//status:3,//认证状态 0:审核通过;1:审核不通过; 2:已驳回 3:待完善;4.待审核;5,暂不处理;9:终止合作
|
||||
query: {
|
||||
status:4
|
||||
},
|
||||
rowData:{},
|
||||
causeForm:{},
|
||||
rules: {
|
||||
cause: [
|
||||
{required: true, message: '请输入原因', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
noProcessingStatus:5,// 5:暂不处理;9:终止合作
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
refuseDialogVisible: false,
|
||||
data: [],
|
||||
option:{
|
||||
title:'表格的标题',
|
||||
titleSize:'h3',
|
||||
titleStyle:{
|
||||
color:'red'
|
||||
},
|
||||
border: true,
|
||||
addBtn: false,
|
||||
editBtn:false,
|
||||
delBtn:false,
|
||||
page:false,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
menuWidth:90,
|
||||
align:'center',
|
||||
menuAlign:'center',
|
||||
|
||||
column:[
|
||||
{
|
||||
label:'企业名称',
|
||||
prop:'companyName'
|
||||
},
|
||||
// {
|
||||
// label:'统一社会信用代码',
|
||||
// prop:'companyTid'
|
||||
// },
|
||||
|
||||
{
|
||||
label:'所属工作站',
|
||||
prop:'stationId',
|
||||
dicUrl: getStationDic(),
|
||||
props: {
|
||||
label: "stationName",
|
||||
value: "stationId",
|
||||
},
|
||||
},
|
||||
{
|
||||
label:'邀请码',
|
||||
prop:'inviteCode'
|
||||
},
|
||||
{
|
||||
label:'注册电话',
|
||||
prop:'telphone'
|
||||
},
|
||||
{
|
||||
label:'保证金',
|
||||
prop:'trialOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'已缴',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'未缴',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
label:'免缴',
|
||||
value:2
|
||||
},
|
||||
{
|
||||
label: " ",
|
||||
value: -1,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'商保状态',
|
||||
prop:'insuranceOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'停用',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'启用',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
label: " ",
|
||||
value: -1,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'合同',
|
||||
prop:'isSign',
|
||||
dicData:[
|
||||
{
|
||||
label:'未签',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'已签',
|
||||
value:1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'电子合同',
|
||||
prop:'contractOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'关闭',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'开启',
|
||||
value:1
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "注册时间",
|
||||
prop: "createTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label: "提交审核时间",
|
||||
prop: "commitReviewTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
examineDialog
|
||||
},
|
||||
methods:{
|
||||
HandelExamineClick(row){
|
||||
console.log("审核");
|
||||
this.$refs.examine.openDialog(row);
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
//查看
|
||||
checkClick(row){
|
||||
this.$refs.check.openDialog(row,'ing');
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
//更新form表单
|
||||
resetForm(formName){
|
||||
this.$refs[formName].resetFields();
|
||||
this.refuseDialogVisible = false;
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getListNew(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
//console.log(getStationDic());
|
||||
getStation().then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.refuseDialog .el-dialog__body{
|
||||
padding: 0 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,225 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:data="data"
|
||||
:option="option"
|
||||
@on-load="onLoad"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
>
|
||||
<template slot="menu" slot-scope="{ row }">
|
||||
<el-button
|
||||
@click="checkClick(row)"
|
||||
type="text"
|
||||
size="small"
|
||||
>查看</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<!-- 暂不处理弹窗 -->
|
||||
<el-dialog
|
||||
title="暂不处理"
|
||||
:visible.sync="refuseDialogVisible"
|
||||
width="30%"
|
||||
:modal=false
|
||||
class="refuseDialog"
|
||||
@close = "resetForm('causeForm')"
|
||||
>
|
||||
<!-- <p class="refuseDialogTitle">原因:</p> -->
|
||||
<div>
|
||||
<el-form :model="causeForm" :rules="rules" ref="causeForm">
|
||||
<el-form-item label="原因:" prop="cause">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="请输入原因"
|
||||
v-model="causeForm.cause">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetForm('causeForm')" size="small">取 消</el-button>
|
||||
<el-button type="primary" @click="noProcessingBtn('causeForm')" size="small">暂不处理</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--查看保单详情dialog-->
|
||||
<check-dialog ref="check" v-show="false" @refresh = "handleSearch"></check-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import checkDialog from "../examineDialog/checkDialog";
|
||||
import {getListNew,getNoProcessing} from "@/api/manage/company";
|
||||
import { getStationDic , getStation } from "@/api/manage/station";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//status:3,//认证状态 0:审核通过;1:审核不通过; 2:已驳回 3:待完善;4.待审核;5,暂不处理;9:终止合作
|
||||
query: {
|
||||
status:5
|
||||
},
|
||||
rowData:{},
|
||||
causeForm:{},
|
||||
rules: {
|
||||
cause: [
|
||||
{required: true, message: '请输入原因', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
noProcessingStatus:5,// 5:暂不处理;9:终止合作
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
refuseDialogVisible: false,
|
||||
data: [],
|
||||
option:{
|
||||
title:'表格的标题',
|
||||
titleSize:'h3',
|
||||
titleStyle:{
|
||||
color:'red'
|
||||
},
|
||||
border: true,
|
||||
addBtn: false,
|
||||
editBtn:false,
|
||||
delBtn:false,
|
||||
page:false,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
menuWidth:90,
|
||||
align:'center',
|
||||
menuAlign:'center',
|
||||
|
||||
column:[
|
||||
{
|
||||
label:'企业名称',
|
||||
prop:'companyName'
|
||||
},
|
||||
{
|
||||
label:'统一社会信用代码',
|
||||
prop:'companyTid'
|
||||
},
|
||||
{
|
||||
label:'注册电话',
|
||||
prop:'telphone'
|
||||
},
|
||||
{
|
||||
label:'所属工作站',
|
||||
prop:'stationId',
|
||||
dicUrl: getStationDic(),
|
||||
props: {
|
||||
label: "stationName",
|
||||
value: "stationId",
|
||||
},
|
||||
},
|
||||
{
|
||||
label:'邀请码',
|
||||
prop:'inviteCode'
|
||||
},
|
||||
{
|
||||
label: "注册时间",
|
||||
prop: "createTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label: "暂不处理时间",
|
||||
prop: "reviewTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label:'原因',
|
||||
prop:'remarks'
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
checkDialog
|
||||
},
|
||||
methods:{
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
//查看
|
||||
checkClick(row){
|
||||
this.$refs.check.openDialog(row,'pause');
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
//暂不处理
|
||||
refuseClick(row){
|
||||
this.rowData = row
|
||||
this.refuseDialogVisible = true;
|
||||
},
|
||||
//暂不处理按钮
|
||||
noProcessingBtn(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.refuseDialogVisible = false;
|
||||
this.loading = true;
|
||||
getNoProcessing(this.rowData.id,this.causeForm.cause,this.noProcessingStatus).then((res)=>{
|
||||
if (res.data.code==200) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.loading=false;
|
||||
this.onLoad(this.page, this.query);
|
||||
}else{
|
||||
this.$message.error(res.data.msg)
|
||||
this.loading=false;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
//更新form表单
|
||||
resetForm(formName){
|
||||
this.$refs[formName].resetFields();
|
||||
this.refuseDialogVisible = false;
|
||||
},
|
||||
// beforeOpen(){
|
||||
// this.onLoad(this.page, this.query);
|
||||
// },
|
||||
handleSearch(){
|
||||
console.log(123123)
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getListNew(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
//console.log(getStationDic());
|
||||
getStation().then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.refuseDialog .el-dialog__body{
|
||||
padding: 0 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,281 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:data="data"
|
||||
:option="option"
|
||||
@on-load="onLoad"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
>
|
||||
<template slot="menu" slot-scope="{ row }">
|
||||
<el-button
|
||||
@click="checkClick(row)"
|
||||
type="text"
|
||||
size="small"
|
||||
>查看</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<!-- 暂不处理弹窗 -->
|
||||
<el-dialog
|
||||
title="暂不处理"
|
||||
:visible.sync="refuseDialogVisible"
|
||||
width="30%"
|
||||
:modal=false
|
||||
class="refuseDialog"
|
||||
@close = "resetForm('causeForm')"
|
||||
>
|
||||
<!-- <p class="refuseDialogTitle">原因:</p> -->
|
||||
<div>
|
||||
<el-form :model="causeForm" :rules="rules" ref="causeForm">
|
||||
<el-form-item label="原因:" prop="cause">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="请输入原因"
|
||||
v-model="causeForm.cause">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetForm('causeForm')" size="small">取 消</el-button>
|
||||
<el-button type="primary" @click="noProcessingBtn('causeForm')" size="small">暂不处理</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--查看保单详情dialog-->
|
||||
<check-dialog ref="check" v-show="false" @refresh = "refreshChange"></check-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import checkDialog from "../examineDialog/ExamineDialogSus";
|
||||
import {getListNew,getNoProcessing} from "@/api/manage/company";
|
||||
import { getStationDic , getStation } from "@/api/manage/station";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//status:3,//认证状态 0:审核通过;1:审核不通过; 2:已驳回 3:待完善;4.待审核;5,暂不处理;9:终止合作
|
||||
query: {
|
||||
status:9
|
||||
},
|
||||
rowData:{},
|
||||
causeForm:{},
|
||||
rules: {
|
||||
cause: [
|
||||
{required: true, message: '请输入原因', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
noProcessingStatus:5,// 5:暂不处理;9:终止合作
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
refuseDialogVisible: false,
|
||||
data: [],
|
||||
option:{
|
||||
title:'表格的标题',
|
||||
titleSize:'h3',
|
||||
titleStyle:{
|
||||
color:'red'
|
||||
},
|
||||
border: true,
|
||||
addBtn: false,
|
||||
editBtn:false,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
menuWidth:90,
|
||||
delBtn:false,
|
||||
page:false,
|
||||
align:'center',
|
||||
menuAlign:'center',
|
||||
|
||||
column:[
|
||||
{
|
||||
label:'企业名称',
|
||||
prop:'companyName'
|
||||
},
|
||||
{
|
||||
label:'所属工作站',
|
||||
prop:'stationId',
|
||||
dicUrl: getStationDic(),
|
||||
props: {
|
||||
label: "stationName",
|
||||
value: "stationId",
|
||||
},
|
||||
},
|
||||
{
|
||||
label:'保证金',
|
||||
prop:'trialOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'已缴',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'未缴',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
label:'免缴',
|
||||
value:2
|
||||
},
|
||||
{
|
||||
label: " ",
|
||||
value: -1,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'商保状态',
|
||||
prop:'insuranceOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'停用',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'启用',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
label: " ",
|
||||
value: -1,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'合同',
|
||||
prop:'isSign',
|
||||
dicData:[
|
||||
{
|
||||
label:'未签',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'已签',
|
||||
value:1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'电子合同',
|
||||
prop:'contractOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'关闭',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'开启',
|
||||
value:1
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "注册时间",
|
||||
prop: "createTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label: "提交审核时间",
|
||||
prop: "createTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label: "审核通过时间",
|
||||
prop: "reviewTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
checkDialog
|
||||
},
|
||||
methods:{
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
//查看
|
||||
checkClick(row){
|
||||
this.$refs.check.openDialog(row,'stop');
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
//暂不处理
|
||||
refuseClick(row){
|
||||
this.rowData = row
|
||||
this.refuseDialogVisible = true;
|
||||
},
|
||||
//暂不处理按钮
|
||||
noProcessingBtn(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.refuseDialogVisible = false;
|
||||
this.loading = true;
|
||||
getNoProcessing(this.rowData.id,this.causeForm.cause,this.noProcessingStatus).then((res)=>{
|
||||
if (res.data.code==200) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.loading=false;
|
||||
this.onLoad(this.page, this.query);
|
||||
}else{
|
||||
this.$message.error(res.data.msg)
|
||||
this.loading=false;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
//更新form表单
|
||||
resetForm(formName){
|
||||
this.$refs[formName].resetFields();
|
||||
this.refuseDialogVisible = false;
|
||||
},
|
||||
// beforeOpen(){
|
||||
// this.onLoad(this.page, this.query);
|
||||
// },
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getListNew(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
//console.log(getStationDic());
|
||||
getStation().then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.refuseDialog .el-dialog__body{
|
||||
padding: 0 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,268 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:data="data"
|
||||
:option="option"
|
||||
@on-load="onLoad"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
>
|
||||
<template slot="menu" slot-scope="{ row }">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="HandelExamineClick(row)"
|
||||
>查看</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<!-- 暂不处理弹窗 -->
|
||||
<el-dialog
|
||||
title="暂不处理"
|
||||
:visible.sync="refuseDialogVisible"
|
||||
width="30%"
|
||||
:modal=false
|
||||
class="refuseDialog"
|
||||
@close = "resetForm('causeForm')"
|
||||
>
|
||||
<!-- <p class="refuseDialogTitle">原因:</p> -->
|
||||
<div>
|
||||
<el-form :model="causeForm" :rules="rules" ref="causeForm">
|
||||
<el-form-item label="原因:" prop="cause">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="请输入原因"
|
||||
v-model="causeForm.cause">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetForm('causeForm')" size="small">取 消</el-button>
|
||||
<el-button type="primary" @click="noProcessingBtn('causeForm')" size="small">暂不处理</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--查看保单详情dialog-->
|
||||
<examine-dialog ref="examine" v-show="false" @refresh="refreshChange"></examine-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import examineDialog from "../examineDialog/ExamineDialogSus";
|
||||
import {getListNew} from "@/api/manage/company";
|
||||
import { getStationDic , getStation } from "@/api/manage/station";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//status:3,//认证状态 0:审核通过;1:审核不通过; 2:已驳回 3:待完善;4.待审核;5,暂不处理;9:终止合作
|
||||
query: {
|
||||
status:0
|
||||
},
|
||||
rowData:{},
|
||||
causeForm:{},
|
||||
rules: {
|
||||
cause: [
|
||||
{required: true, message: '请输入原因', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
noProcessingStatus:5,// 5:暂不处理;9:终止合作
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
refuseDialogVisible: false,
|
||||
data: [],
|
||||
option:{
|
||||
title:'表格的标题',
|
||||
titleSize:'h3',
|
||||
titleStyle:{
|
||||
color:'red'
|
||||
},
|
||||
border: true,
|
||||
addBtn: false,
|
||||
editBtn:false,
|
||||
delBtn:false,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
page:false,
|
||||
align:'center',
|
||||
menuWidth:90,
|
||||
menuAlign:'center',
|
||||
|
||||
column:[
|
||||
{
|
||||
label:'企业名称',
|
||||
prop:'companyName'
|
||||
},
|
||||
// {
|
||||
// label:'统一社会信用代码',
|
||||
// prop:'companyTid'
|
||||
// },
|
||||
|
||||
{
|
||||
label:'所属工作站',
|
||||
prop:'stationId',
|
||||
dicUrl: getStationDic(),
|
||||
props: {
|
||||
label: "stationName",
|
||||
value: "stationId",
|
||||
},
|
||||
},
|
||||
// {
|
||||
// label:'邀请码',
|
||||
// prop:'inviteCode'
|
||||
// },
|
||||
// {
|
||||
// label:'注册电话',
|
||||
// prop:'telphone'
|
||||
// },
|
||||
{
|
||||
label:'保证金',
|
||||
prop:'trialOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'已缴',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'未缴',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
label:'免缴',
|
||||
value:2
|
||||
},
|
||||
{
|
||||
label: " ",
|
||||
value: -1,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'商保状态',
|
||||
prop:'insuranceOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'停用',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'启用',
|
||||
value:1
|
||||
},
|
||||
{
|
||||
label: " ",
|
||||
value: -1,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'合同',
|
||||
prop:'isSign',
|
||||
dicData:[
|
||||
{
|
||||
label:'未签',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'已签',
|
||||
value:1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label:'电子合同',
|
||||
prop:'contractOn',
|
||||
dicData:[
|
||||
{
|
||||
label:'关闭',
|
||||
value:0
|
||||
},
|
||||
{
|
||||
label:'开启',
|
||||
value:1
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "注册时间",
|
||||
prop: "createTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label: "提交审核时间",
|
||||
prop: "commitReviewTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
{
|
||||
label: "审核通过时间",
|
||||
prop: "reviewTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
examineDialog
|
||||
},
|
||||
methods:{
|
||||
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
//查看
|
||||
HandelExamineClick(row){
|
||||
this.$refs.examine.openDialog(row,'suss');
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
//更新form表单
|
||||
resetForm(formName){
|
||||
this.$refs[formName].resetFields();
|
||||
this.refuseDialogVisible = false;
|
||||
},
|
||||
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getListNew(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
//console.log(getStationDic());
|
||||
getStation().then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.refuseDialog .el-dialog__body{
|
||||
padding: 0 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,216 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:data="data"
|
||||
:option="option"
|
||||
@on-load="onLoad"
|
||||
:before-open="beforeOpen"
|
||||
:page.sync="page"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
>
|
||||
<template slot="menu" slot-scope="{ row }">
|
||||
<el-button
|
||||
@click="checkClick(row,'wait')"
|
||||
type="text"
|
||||
size="small"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
@click="refuseClick(row)"
|
||||
type="text"
|
||||
size="small"
|
||||
>暂不处理</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<!-- 暂不处理弹窗 -->
|
||||
<el-dialog
|
||||
title="暂不处理"
|
||||
:visible.sync="refuseDialogVisible"
|
||||
width="30%"
|
||||
:modal=false
|
||||
class="refuseDialog"
|
||||
@close = "resetForm('causeForm')"
|
||||
>
|
||||
<!-- <p class="refuseDialogTitle">原因:</p> -->
|
||||
<div>
|
||||
<el-form :model="causeForm" :rules="rules" ref="causeForm">
|
||||
<el-form-item label="原因:" prop="cause">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="请输入原因"
|
||||
maxlength="20"
|
||||
show-word-limit
|
||||
v-model="causeForm.cause">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetForm('causeForm')" size="small">取 消</el-button>
|
||||
<el-button type="primary" @click="noProcessingBtn('causeForm')" size="small">暂不处理</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--查看保单详情dialog-->
|
||||
<check-dialog ref="check" v-show="false" @refresh="refreshChange"></check-dialog>
|
||||
</basic-container>
|
||||
</template>
|
||||
<script>
|
||||
import checkDialog from "../examineDialog/checkDialog";
|
||||
import {getListNew,getNoProcessing} from "@/api/manage/company";
|
||||
import { getStationDic , getStation } from "@/api/manage/station";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//status:3,//认证状态 0:审核通过;1:审核不通过; 2:已驳回 3:待完善;4.待审核;5,暂不处理;9:终止合作
|
||||
query: {
|
||||
status:3
|
||||
},
|
||||
rowData:{},
|
||||
causeForm:{},
|
||||
rules: {
|
||||
cause: [
|
||||
{required: true, message: '请输入原因', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
noProcessingStatus:5,// 5:暂不处理;9:终止合作
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
refuseDialogVisible: false,
|
||||
data: [],
|
||||
option:{
|
||||
title:'表格的标题',
|
||||
titleSize:'h3',
|
||||
titleStyle:{
|
||||
color:'red'
|
||||
},
|
||||
border: true,
|
||||
addBtn: false,
|
||||
editBtn:false,
|
||||
delBtn:false,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
page:false,
|
||||
menuWidth:150,
|
||||
align:'center',
|
||||
menuAlign:'center',
|
||||
|
||||
column:[
|
||||
{
|
||||
label:'企业名称',
|
||||
prop:'companyName'
|
||||
},
|
||||
{
|
||||
label:'统一社会信用代码',
|
||||
prop:'companyTid'
|
||||
},
|
||||
{
|
||||
label:'注册电话',
|
||||
prop:'telphone'
|
||||
},
|
||||
{
|
||||
label:'所属工作站',
|
||||
prop:'stationId',
|
||||
dicUrl: getStationDic(),
|
||||
props: {
|
||||
label: "stationName",
|
||||
value: "stationId",
|
||||
},
|
||||
},
|
||||
{
|
||||
label:'邀请码',
|
||||
prop:'inviteCode'
|
||||
},
|
||||
{
|
||||
label: "注册时间",
|
||||
prop: "createTime",
|
||||
type: "date",
|
||||
format: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
width:150
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
checkDialog
|
||||
},
|
||||
methods:{
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
//查看
|
||||
checkClick(row,flag){
|
||||
this.$refs.check.openDialog(row,flag);
|
||||
},
|
||||
/*刷新本页 带搜索参数*/
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
//暂不处理
|
||||
refuseClick(row){
|
||||
this.rowData = row
|
||||
this.refuseDialogVisible = true;
|
||||
},
|
||||
//暂不处理按钮
|
||||
noProcessingBtn(formName){
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.refuseDialogVisible = false;
|
||||
this.loading = true;
|
||||
getNoProcessing(this.rowData.id,this.causeForm.cause,this.noProcessingStatus).then((res)=>{
|
||||
if (res.data.code==200) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.refreshChange();
|
||||
this.loading=false;
|
||||
}else{
|
||||
this.$message.error(res.data.msg)
|
||||
this.loading=false;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
//更新form表单
|
||||
resetForm(formName){
|
||||
this.$refs[formName].resetFields();
|
||||
this.refuseDialogVisible = false;
|
||||
},
|
||||
// beforeOpen(){
|
||||
// this.onLoad(this.page, this.query);
|
||||
// },
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getListNew(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
//console.log(getStationDic());
|
||||
getStation().then((res)=>{
|
||||
console.log(res);
|
||||
})
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.refuseDialog .el-dialog__body{
|
||||
padding: 0 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,312 +0,0 @@
|
||||
<template>
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
:table-loading="loading"
|
||||
:data="data"
|
||||
ref="crud"
|
||||
v-model="form"
|
||||
:permission="permissionList"
|
||||
:before-open="beforeOpen"
|
||||
:before-close="beforeClose"
|
||||
:page.sync="page"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<template slot="menuLeft"></template>
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTitleList, getTitle, updateTitle } from "@/api/manage/fp";
|
||||
import { mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "manage_company_fpList",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
query: {},
|
||||
loading: true,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0,
|
||||
},
|
||||
option: {
|
||||
height: "auto",
|
||||
tip: false,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
border: true,
|
||||
addBtn: false,
|
||||
editBtn: true,
|
||||
delBtn: false,
|
||||
menuWidth: 300,
|
||||
dialogClickModal: false,
|
||||
dialogType: "drawer",
|
||||
column: [
|
||||
{
|
||||
label: "公司名称",
|
||||
prop: "companyName",
|
||||
type: "input",
|
||||
search: true,
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: "纳税人识别号",
|
||||
prop: "regNumber",
|
||||
type: "input",
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: "发票类型",
|
||||
prop: "type",
|
||||
type: "select",
|
||||
dicData: [
|
||||
{ label: "增值税专用发票", value: 1 },
|
||||
{ label: "增值税普通发票", value: 0 },
|
||||
],
|
||||
search: true,
|
||||
searchSpan: 4,
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: "银行账号",
|
||||
prop: "bankNumber",
|
||||
type: "input",
|
||||
editDisplay: false,
|
||||
},
|
||||
],
|
||||
group: [
|
||||
{
|
||||
label: "",
|
||||
column: [
|
||||
{
|
||||
type: "input",
|
||||
label: "发票抬头",
|
||||
span: 24,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "titleName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "发票抬头必须填写",
|
||||
},
|
||||
],
|
||||
placeholder: "请填写您的发票抬头",
|
||||
},
|
||||
{
|
||||
type: "radio",
|
||||
label: "发票类型",
|
||||
dicData: [
|
||||
{
|
||||
label: "增值税专用发票",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "增值税普通发票",
|
||||
value: 0,
|
||||
},
|
||||
],
|
||||
span: 24,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "type",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择发票类型",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "纳税人识别号",
|
||||
span: 24,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "regNumber",
|
||||
readonly: false,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "纳税人识别号必须填写",
|
||||
},
|
||||
],
|
||||
placeholder: "请填写18位有效社会纳税人识别号",
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "开户银行",
|
||||
span: 24,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "bankName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "开户银行必须填写",
|
||||
},
|
||||
],
|
||||
placeholder: "请填写您开户许可证上的开户银行名称",
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "银行账号",
|
||||
span: 24,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "bankNumber",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "银行账号必须填写",
|
||||
},
|
||||
],
|
||||
placeholder: "请填写基本开户账号最长30位",
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "注册地址",
|
||||
span: 24,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "regAddress",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "注册地址必须填写",
|
||||
},
|
||||
],
|
||||
placeholder: "请填写营业执照上面的注册地址",
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "注册电话",
|
||||
span: 24,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "regTelphone",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "注册电话必须填写",
|
||||
},
|
||||
],
|
||||
placeholder: "请填写您公司有效的联系电话",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
labelWidth: 150,
|
||||
},
|
||||
data: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "permission"]),
|
||||
permissionList() {
|
||||
return {
|
||||
editBtn: this.vaildData(
|
||||
this.permission.manage_company_fpList_edit,
|
||||
false
|
||||
),
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
rowUpdate(row, index, done, loading) {
|
||||
updateTitle(row).then(
|
||||
() => {
|
||||
this.onLoad(this.page);
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
// 数据回调进行刷新
|
||||
done(row);
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
loading();
|
||||
}
|
||||
);
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, params);
|
||||
done();
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear() {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
beforeOpen(done, type) {
|
||||
if (["edit"].includes(type)) {
|
||||
this.loading = true;
|
||||
getTitle(this.form.id).then((res) => {
|
||||
this.loading = false;
|
||||
this.form = res.data.data;
|
||||
done();
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeClose(done) {
|
||||
done();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
getTitleList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params)
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,226 +0,0 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<company-tree @node-click="nodeClick"></company-tree>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<basic-container>
|
||||
<avue-crud :data="data" :table-loading="loading" :option="option" ref="crud" v-model="form"
|
||||
:permission="permissionList"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
|
||||
@size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
|
||||
<template slot="menuLeft">
|
||||
<!--
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
|
||||
</el-button>
|
||||
-->
|
||||
|
||||
<el-button size="small" icon="el-icon-setting" @click="handleRole" plain>权限设置</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<el-dialog title="角色权限配置" append-to-body :visible.sync="box" width="345px">
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="菜单权限">
|
||||
<el-tree :data="menuGrantList" show-checkbox node-key="id" ref="treeMenu"
|
||||
:default-checked-keys="menuTreeObj" :props="props"></el-tree>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="数据权限" v-if="userInfo.role_name !== 'admin'">
|
||||
<el-tree :data="dataScopeGrantList" show-checkbox node-key="id" ref="treeDataScope"
|
||||
:default-checked-keys="dataScopeTreeObj" :props="props"></el-tree>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="接口权限" v-if="userInfo.role_name !== 'admin'">
|
||||
<el-tree :data="apiScopeGrantList" show-checkbox node-key="id" ref="treeApiScope"
|
||||
:default-checked-keys="apiScopeTreeObj" :props="props"></el-tree>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="box = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</basic-container>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<script>
|
||||
import companyTree from "./companyTree";
|
||||
import { getList, grant, grantTree, getRole} from '@/api/manage/role'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'roleList',
|
||||
components: {
|
||||
companyTree
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo']),
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(",");
|
||||
},
|
||||
idsArray() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
companyId: null,
|
||||
tenantId: null,
|
||||
box: false,
|
||||
selectionList: [],
|
||||
menuGrantList: [],
|
||||
page: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
},
|
||||
query: {
|
||||
|
||||
},
|
||||
props: {
|
||||
label: "title",
|
||||
value: "key",
|
||||
},
|
||||
data: [],
|
||||
option: {
|
||||
height: "auto",
|
||||
calcHeight: 186,
|
||||
tip: false,
|
||||
page: true,
|
||||
addBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: true,
|
||||
editBtn: false,
|
||||
selection: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
dialogType: "drawer",
|
||||
index: true,
|
||||
indexLabel: '序号',
|
||||
column: [
|
||||
{
|
||||
label: '角色名称',
|
||||
prop: 'roleName',
|
||||
search: true,
|
||||
rules: [
|
||||
{
|
||||
required: true, message: '请输入角色名称', trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
label: '角色排序',
|
||||
prop: 'sort',
|
||||
type: 'number',
|
||||
rules: [
|
||||
{
|
||||
required: true, message: '请输入角色排序', trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
nodeClick(data) {
|
||||
this.companyId = data.data.id;
|
||||
this.tenantId = data.data.tenantId;
|
||||
this.onLoad(this.page)
|
||||
|
||||
},
|
||||
/*权限配置*/
|
||||
handleRole() {
|
||||
if (this.selectionList.length !== 1) {
|
||||
this.$message.warning("只能选择一条数据");
|
||||
return;
|
||||
}
|
||||
this.menuTreeObj = [];
|
||||
this.dataScopeTreeObj = [];
|
||||
this.apiScopeTreeObj = [];
|
||||
grantTree().then((res) => {
|
||||
this.menuGrantList = res.data.data.menu;
|
||||
this.dataScopeGrantList = res.data.data.dataScope;
|
||||
this.apiScopeGrantList = res.data.data.apiScope;
|
||||
getRole(this.ids, this.tenantId).then((res) => {
|
||||
this.menuTreeObj = res.data.data.menu;
|
||||
this.dataScopeTreeObj = res.data.data.dataScope;
|
||||
this.apiScopeTreeObj = res.data.data.apiScope;
|
||||
this.box = true;
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
submit() {
|
||||
const menuList = this.$refs.treeMenu.getCheckedKeys();
|
||||
|
||||
let dataScopeList = [];
|
||||
let apiScopeList = [];
|
||||
if (this.userInfo.role_name !== "admin") {
|
||||
dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
|
||||
apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
|
||||
}
|
||||
grant(this.idsArray, this.tenantId, menuList, dataScopeList, apiScopeList).then(() => {
|
||||
this.box = false;
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.onLoad(this.page);
|
||||
});
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
selectionClear() {
|
||||
this.selectionList = [];
|
||||
this.$refs.crud.toggleSelection();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, this.query);
|
||||
done();
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
|
||||
if (this.companyId) {
|
||||
this.loading = true;
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params),
|
||||
this.tenantId,
|
||||
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -1,558 +0,0 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<company-tree @node-click="nodeClick"></company-tree>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:data="data"
|
||||
:table-loading="loading"
|
||||
:option="option"
|
||||
ref="crud"
|
||||
v-model="form"
|
||||
:permission="permissionList"
|
||||
:before-open="beforeOpen"
|
||||
:before-close="beforeClose"
|
||||
:page.sync="page"
|
||||
@row-update="rowUpdate"
|
||||
@row-save="rowSave"
|
||||
@row-del="rowDel"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<template slot="menuLeft">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
v-if="vaildData(permission.manage_company_worktypes_add, false)"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
:disabled="!companyId"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
v-if="
|
||||
vaildData(permission.manage_company_talentsList_upload, false)
|
||||
"
|
||||
icon="el-icon-upload2"
|
||||
@click="handleImport"
|
||||
:disabled="!companyId"
|
||||
>批量新增</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
v-if="
|
||||
vaildData(permission.manage_company_talentsList_delete, false)
|
||||
"
|
||||
@click="handleDelete"
|
||||
:disabled="!companyId"
|
||||
>删 除</el-button
|
||||
>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
title="用户数据导入"
|
||||
append-to-body
|
||||
:visible.sync="excelBox"
|
||||
width="555px"
|
||||
>
|
||||
<avue-form
|
||||
:option="excelOption"
|
||||
v-model="excelForm"
|
||||
:upload-after="uploadAfter"
|
||||
:upload-before="beforeAvatarUpload"
|
||||
:upload-error="uploadError"
|
||||
>
|
||||
<template slot="excelTemplate">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleTemplate()"
|
||||
:loading="templateLoading"
|
||||
>
|
||||
点击下载
|
||||
<i class="el-icon-download el-icon--right"></i>
|
||||
</el-button>
|
||||
</template>
|
||||
</avue-form>
|
||||
</el-dialog>
|
||||
<ied ref="ied"></ied>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getList,
|
||||
detail,
|
||||
save,
|
||||
update,
|
||||
remove,
|
||||
importTalents,
|
||||
} from "@/api/manage/talents";
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
isvalidatemobile,
|
||||
validatename,
|
||||
validatenull,
|
||||
isExcel,
|
||||
check18IdCardNo,
|
||||
} from "@/util/validate";
|
||||
import companyTree from "./companyTree";
|
||||
import { getWorkTypes } from "@/api/manage/worktypes";
|
||||
import { getTemplate } from "@/api/resource/template";
|
||||
import ied from "@/views/util/import-error-dialog";
|
||||
import { excelAccept } from "@/common/accept";
|
||||
|
||||
export default {
|
||||
components: { companyTree, ied },
|
||||
name: "manage_company_talentsList",
|
||||
data() {
|
||||
return {
|
||||
companyId: null,
|
||||
loading: false,
|
||||
templateLoading: false,
|
||||
excelBox: false,
|
||||
selectionList: [],
|
||||
data: [],
|
||||
form: {},
|
||||
query: {},
|
||||
worktypes: [],
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 10,
|
||||
},
|
||||
excelForm: {},
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
nodeClick({ data }) {
|
||||
this.companyId = data.id;
|
||||
this.$refs.crud.searchReset();
|
||||
this.page.currentPage = 1;
|
||||
this.refreshChange();
|
||||
this.updateWorkTypes(data.id);
|
||||
},
|
||||
updateWorkTypes(id) {
|
||||
if (id) {
|
||||
getWorkTypes(id).then((res) => {
|
||||
this.worktypes = res.data.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
rowSave(row, done) {
|
||||
const data = {
|
||||
companyId: this.companyId,
|
||||
idNumber: row.idNumber,
|
||||
name: row.name,
|
||||
telphone: row.telphone,
|
||||
worktypes: row.worktypes.join(","),
|
||||
};
|
||||
save(data).then(
|
||||
() => {
|
||||
this.onLoad(this.page, this.query);
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
done();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
done();
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
rowUpdate(row, index, done, loading) {
|
||||
const data = {
|
||||
id: row.id,
|
||||
companyId: this.companyId,
|
||||
idNumber: row.idNumber,
|
||||
name: row.name,
|
||||
telphone: row.telphone,
|
||||
worktypes: row.worktypes,
|
||||
};
|
||||
update(data).then(
|
||||
() => {
|
||||
this.onLoad(this.page, this.query);
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
done();
|
||||
},
|
||||
(error) => {
|
||||
window.console.log(error);
|
||||
loading();
|
||||
}
|
||||
);
|
||||
},
|
||||
rowDel(row) {
|
||||
this.$confirm("确定将选择数据删除?", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
return remove(row.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.onLoad(this.page, this.query);
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
});
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, params);
|
||||
done();
|
||||
},
|
||||
beforeOpen(done, type) {
|
||||
if (["add", "edit"].includes(type)) {
|
||||
done();
|
||||
}
|
||||
if (["edit", "view"].includes(type)) {
|
||||
detail(this.form.id).then((resp) => {
|
||||
resp.data.data.worktypes = resp.data.data.worktypes.split(",");
|
||||
this.form = resp.data.data;
|
||||
done();
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeClose(done) {
|
||||
done();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
if (this.companyId) {
|
||||
this.loading = true;
|
||||
params;
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params),
|
||||
this.companyId
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
uploadAfter(res, done) {
|
||||
if (!(res instanceof Error) && !res.data) {
|
||||
this.excelBox = false;
|
||||
} else if (res.data && res.data.code === 900) {
|
||||
const arr = [];
|
||||
const data = res.data.data;
|
||||
data.error &&
|
||||
data.error.errorList.forEach((item) => {
|
||||
arr.push(`${item.name} ${item.remarks}`);
|
||||
});
|
||||
data.auth &&
|
||||
data.auth.authList.forEach((item) => {
|
||||
arr.push(`${item.name} ${item.remarks}`);
|
||||
});
|
||||
this.$refs.ied.show(arr);
|
||||
}
|
||||
this.refreshChange();
|
||||
done();
|
||||
},
|
||||
uploadError(error) {
|
||||
if (error) {
|
||||
this.$message.error(error);
|
||||
}
|
||||
},
|
||||
beforeAvatarUpload(file, done, loading) {
|
||||
if (!isExcel(file)) {
|
||||
loading();
|
||||
this.$message.error("上传参保信息只能是 .xls,.xlsx 标准格式文件!");
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.crud.rowAdd();
|
||||
},
|
||||
handleImport() {
|
||||
this.excelBox = true;
|
||||
},
|
||||
handleTemplate() {
|
||||
this.templateLoading = true;
|
||||
getTemplate("mrc")
|
||||
.then((rep) => {
|
||||
this.templateLoading = false;
|
||||
window.open(rep.data.data);
|
||||
})
|
||||
.catch(() => {
|
||||
this.templateLoading = false;
|
||||
});
|
||||
},
|
||||
handleDelete() {
|
||||
if (this.selectionList.length === 0) {
|
||||
this.$message({ type: "warning", message: "请至少选择一条" });
|
||||
return;
|
||||
} else {
|
||||
this.$confirm("确定将选择数据删除?", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true;
|
||||
return remove(this.ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.onLoad(this.page, this.query);
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "permission"]),
|
||||
permissionList() {
|
||||
return {
|
||||
addBtn: this.vaildData(
|
||||
this.permission.manage_company_talentsList_add,
|
||||
false
|
||||
),
|
||||
viewBtn: this.vaildData(
|
||||
this.permission.manage_company_talentsList_view,
|
||||
false
|
||||
),
|
||||
editBtn: this.vaildData(
|
||||
this.permission.manage_company_talentsList_edit,
|
||||
false
|
||||
),
|
||||
delBtn: this.vaildData(
|
||||
this.permission.manage_company_talentsList_delete,
|
||||
false
|
||||
),
|
||||
};
|
||||
},
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.id);
|
||||
});
|
||||
return ids.join(",");
|
||||
},
|
||||
excelOption() {
|
||||
return {
|
||||
submitBtn: false,
|
||||
emptyBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: "文件上传",
|
||||
prop: "excelFile",
|
||||
type: "upload",
|
||||
drag: true,
|
||||
loadText: "文件上传中,请稍等",
|
||||
span: 24,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
},
|
||||
tip: "请上传 .xls,.xlsx 标准格式文件",
|
||||
accept: excelAccept,
|
||||
showFileList: false,
|
||||
action: importTalents(this.companyId, this.excelForm.isCovered),
|
||||
},
|
||||
{
|
||||
label: "数据覆盖",
|
||||
prop: "isCovered",
|
||||
type: "switch",
|
||||
align: "center",
|
||||
width: 80,
|
||||
dicData: [
|
||||
{
|
||||
label: "否",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "是",
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
value: 0,
|
||||
slot: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择是否覆盖",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "模板下载",
|
||||
prop: "excelTemplate",
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
option() {
|
||||
return {
|
||||
height: "auto",
|
||||
calcHeight: 186,
|
||||
tip: false,
|
||||
page: true,
|
||||
addBtn: false,
|
||||
delBtn: false,
|
||||
viewBtn: true,
|
||||
editBtn: true,
|
||||
selection: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
dialogType: "drawer",
|
||||
labelWidth: 95,
|
||||
border:true,
|
||||
column: [
|
||||
{
|
||||
type: "input",
|
||||
label: "姓名",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "name",
|
||||
search: true,
|
||||
searchSpan: 4,
|
||||
searchLabelWidth: 50,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
validator(rule, value, callback) {
|
||||
if (value === "") {
|
||||
callback(new Error("请输入姓名"));
|
||||
} else if (validatename(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("姓名格式不正确"));
|
||||
}
|
||||
},
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
placeholder: "姓名",
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "身份证号码",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "idNumber",
|
||||
search: true,
|
||||
searchLabelWidth: 89,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入身份证号",
|
||||
},
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (check18IdCardNo(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证格式不正确"));
|
||||
}
|
||||
},
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
placeholder: " 身份证号",
|
||||
},
|
||||
{
|
||||
label: "工种",
|
||||
prop: "worktypes",
|
||||
type: "select",
|
||||
multiple: true,
|
||||
span: 12,
|
||||
dicData: this.worktypes,
|
||||
props: { label: "name", value: "name" },
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择工种",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "手机号码",
|
||||
span: 12,
|
||||
display: true,
|
||||
size: "small",
|
||||
prop: "telphone",
|
||||
rules: [
|
||||
/*{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入手机号码",
|
||||
},*/
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (validatenull(value)) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
let list = isvalidatemobile(value);
|
||||
if (list[0]) {
|
||||
callback(new Error(list[1]));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
placeholder: "手机号",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,584 +0,0 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<company-tree @node-click="nodeClick"></company-tree>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<basic-container>
|
||||
<avue-crud
|
||||
:data="data"
|
||||
:table-loading="loading"
|
||||
:option="option"
|
||||
ref="crud"
|
||||
v-model="form"
|
||||
:permission="permissionList"
|
||||
:before-open="beforeOpen"
|
||||
:before-close="beforeClose"
|
||||
:page.sync="page"
|
||||
@row-update="rowUpdate"
|
||||
@row-del="rowDel"
|
||||
@search-change="searchChange"
|
||||
@search-reset="searchReset"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@refresh-change="refreshChange"
|
||||
@on-load="onLoad"
|
||||
>
|
||||
<template slot="menuLeft">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
v-if="
|
||||
vaildData(permission.manage_company_worktypes_upload, false)
|
||||
"
|
||||
icon="el-icon-upload2"
|
||||
:disabled="!companyId"
|
||||
@click="handleImport"
|
||||
>批量新增</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
v-if="
|
||||
vaildData(permission.manage_company_worktypes_delete, false)
|
||||
"
|
||||
:disabled="!companyId"
|
||||
@click="handleDelete"
|
||||
>删 除</el-button
|
||||
>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
title="用户数据导入"
|
||||
append-to-body
|
||||
:visible.sync="excelBox"
|
||||
width="555px"
|
||||
>
|
||||
<avue-form
|
||||
:option="excelOption"
|
||||
v-model="excelForm"
|
||||
:upload-after="uploadAfter"
|
||||
:upload-error="uploadError"
|
||||
>
|
||||
<template slot="excelTemplate">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleTemplate()"
|
||||
:loading="templateLoading"
|
||||
>
|
||||
点击下载
|
||||
<i class="el-icon-download el-icon--right"></i>
|
||||
</el-button>
|
||||
</template>
|
||||
</avue-form>
|
||||
</el-dialog>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList, update, excelImport, remove } from "@/api/manage/trade";
|
||||
import { mapGetters } from "vuex";
|
||||
import companyTree from "./companyTree";
|
||||
import { getTemplate } from "@/api/resource/template";
|
||||
import { excelAccept } from "@/common/accept";
|
||||
|
||||
const scoreDic = [
|
||||
{ label: "-", value: -1 },
|
||||
{ label: "客服", value: 1 },
|
||||
{ label: "用户", value: 2 },
|
||||
];
|
||||
|
||||
export default {
|
||||
components: { companyTree },
|
||||
name: "manage_company_worktypes",
|
||||
data() {
|
||||
return {
|
||||
companyId: null,
|
||||
tenanteId: null,
|
||||
loading: false,
|
||||
templateLoading: false,
|
||||
excelBox: false,
|
||||
selectionList: [],
|
||||
data: [],
|
||||
form: {},
|
||||
query: {},
|
||||
page: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 10,
|
||||
},
|
||||
option: {
|
||||
height: "auto",
|
||||
calcHeight: 186,
|
||||
tip: false,
|
||||
page: true,
|
||||
addBtn: false,
|
||||
delBtn: true,
|
||||
viewBtn: true,
|
||||
editBtn: true,
|
||||
selection: true,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 6,
|
||||
dialogType: "drawer",
|
||||
column: [
|
||||
{
|
||||
type: "input",
|
||||
label: "行业名称",
|
||||
prop: "tradeName",
|
||||
display: false,
|
||||
search: true,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
label: "行业来源",
|
||||
span: 12,
|
||||
display: false,
|
||||
prop: "tradeSource",
|
||||
dicData: scoreDic,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "工种名称",
|
||||
span: 12,
|
||||
display: false,
|
||||
prop: "worktypesName",
|
||||
search: true,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
label: "工种来源",
|
||||
span: 12,
|
||||
display: false,
|
||||
prop: "worktypesSource",
|
||||
dicData: scoreDic,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "参保名称",
|
||||
span: 12,
|
||||
display: false,
|
||||
prop: "insuredName",
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "保费",
|
||||
span: 12,
|
||||
display: false,
|
||||
prop: "insuredCost",
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "技能名称",
|
||||
display: false,
|
||||
prop: "skillsName",
|
||||
search: true,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
label: "技能来源",
|
||||
span: 12,
|
||||
display: false,
|
||||
prop: "skillsSource",
|
||||
dicData: scoreDic,
|
||||
},
|
||||
],
|
||||
group: [
|
||||
{
|
||||
label: "行业信息",
|
||||
column: [
|
||||
{
|
||||
type: "input",
|
||||
label: "行业名称",
|
||||
prop: "tradeName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入行业名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "行业别名",
|
||||
prop: "tradeAlias",
|
||||
},
|
||||
{
|
||||
type: "textarea",
|
||||
label: "行业备注",
|
||||
prop: "tradeRemarks",
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
label: "行业来源",
|
||||
span: 12,
|
||||
editDisplay: false,
|
||||
prop: "tradeSource",
|
||||
dicData: scoreDic,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "工种信息",
|
||||
column: [
|
||||
{
|
||||
type: "input",
|
||||
label: "工种名称",
|
||||
span: 12,
|
||||
size: "small",
|
||||
prop: "worktypesName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入工种名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
placeholder: "请输入工种名称",
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "工种别名",
|
||||
prop: "worktypesAlias",
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "参保名称",
|
||||
span: 12,
|
||||
size: "small",
|
||||
prop: "insuredName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入参保名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
placeholder: "请输入参保名称",
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "保费",
|
||||
span: 12,
|
||||
size: "small",
|
||||
prop: "insuredCost",
|
||||
rules: [],
|
||||
placeholder: "请输入保费",
|
||||
},
|
||||
{
|
||||
type: "textarea",
|
||||
label: "工种备注",
|
||||
prop: "worktypesRemarks",
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
label: "工种来源",
|
||||
span: 12,
|
||||
editDisplay: false,
|
||||
prop: "worktypesSource",
|
||||
dicData: scoreDic,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "技能信息",
|
||||
column: [
|
||||
{
|
||||
type: "input",
|
||||
label: "技能名称",
|
||||
prop: "skillsName",
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
whitespace: true,
|
||||
message: "请输入参保名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
label: "技能别名",
|
||||
prop: "skillsAlias",
|
||||
},
|
||||
{
|
||||
type: "textarea",
|
||||
label: "技能备注",
|
||||
prop: "skillsRemarks",
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
type: "select",
|
||||
label: "技能来源",
|
||||
span: 12,
|
||||
editDisplay: false,
|
||||
prop: "skillsSource",
|
||||
dicData: scoreDic,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
excelForm: {},
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
nodeClick({ data }) {
|
||||
this.companyId = data.id;
|
||||
this.tenantId = data.tenantId;
|
||||
this.page.currentPage = 1;
|
||||
this.$refs.crud.searchReset();
|
||||
this.refreshChange();
|
||||
},
|
||||
rowUpdate(row, done, loading) {
|
||||
update(
|
||||
{
|
||||
id: row.tradeId,
|
||||
alias: row.tradeAlias,
|
||||
remarks: row.tradeRemarks,
|
||||
},
|
||||
{
|
||||
id: row.worktypesId,
|
||||
alias: row.worktypesAlias,
|
||||
insuredName: row.insuredName,
|
||||
insuredCost: row.insuredCost,
|
||||
remarks: row.worktypesRemarks,
|
||||
},
|
||||
{
|
||||
id: row.skillsId,
|
||||
alias: row.skillsAlias,
|
||||
remarks: row.skillsRemarks,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.onLoad(this.page);
|
||||
this.refreshChange();
|
||||
done();
|
||||
})
|
||||
.catch(() => {
|
||||
loading();
|
||||
});
|
||||
},
|
||||
rowDel(row) {
|
||||
this.$confirm("确定将选择数据删除?", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
return remove(row.skillsId);
|
||||
})
|
||||
.then(() => {
|
||||
this.onLoad(this.page, this.query);
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
});
|
||||
},
|
||||
selectionChange(list) {
|
||||
this.selectionList = list;
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
searchChange(params, done) {
|
||||
this.query = params;
|
||||
this.page.currentPage = 1;
|
||||
this.onLoad(this.page, params);
|
||||
done();
|
||||
},
|
||||
beforeOpen(done, type) {
|
||||
if (["add", "edit"].includes(type)) {
|
||||
done();
|
||||
}
|
||||
if (["edit", "view"].includes(type)) {
|
||||
done();
|
||||
}
|
||||
},
|
||||
beforeClose(done) {
|
||||
done();
|
||||
},
|
||||
currentChange(currentPage) {
|
||||
this.page.currentPage = currentPage;
|
||||
},
|
||||
sizeChange(pageSize) {
|
||||
this.page.pageSize = pageSize;
|
||||
},
|
||||
refreshChange() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
if (this.companyId) {
|
||||
this.loading = true;
|
||||
getList(
|
||||
page.currentPage,
|
||||
page.pageSize,
|
||||
Object.assign(this.query, params),
|
||||
this.companyId
|
||||
).then((res) => {
|
||||
const data = res.data.data;
|
||||
this.page.total = data.total;
|
||||
this.data = data.records;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleImport() {
|
||||
this.excelBox = true;
|
||||
},
|
||||
handleDelete() {
|
||||
this.$confirm("确定将选择数据删除?", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
return remove(this.ids.join(","));
|
||||
})
|
||||
.then(() => {
|
||||
this.onLoad(this.page, this.query);
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
});
|
||||
},
|
||||
uploadAfter(res, done) {
|
||||
if (!(res instanceof Error)) {
|
||||
this.excelBox = false;
|
||||
}
|
||||
this.refreshChange();
|
||||
this.onLoad(this.page, this.query);
|
||||
done();
|
||||
},
|
||||
uploadError(error) {
|
||||
if (error) {
|
||||
this.$message.error(error);
|
||||
}
|
||||
},
|
||||
handleTemplate() {
|
||||
this.templateLoading = true;
|
||||
getTemplate("hy")
|
||||
.then((rep) => {
|
||||
this.templateLoading = false;
|
||||
window.open(rep.data.data);
|
||||
})
|
||||
.catch(() => {
|
||||
this.templateLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["userInfo", "permission"]),
|
||||
permissionList() {
|
||||
return {
|
||||
addBtn: this.vaildData(
|
||||
this.permission.manage_company_talentsList_add,
|
||||
false
|
||||
),
|
||||
viewBtn: this.vaildData(
|
||||
this.permission.manage_company_talentsList_view,
|
||||
false
|
||||
),
|
||||
editBtn: this.vaildData(
|
||||
this.permission.manage_company_talentsList_edit,
|
||||
false
|
||||
),
|
||||
delBtn: this.vaildData(
|
||||
this.permission.manage_company_talentsList_delete,
|
||||
false
|
||||
),
|
||||
};
|
||||
},
|
||||
ids() {
|
||||
let ids = [];
|
||||
this.selectionList.forEach((ele) => {
|
||||
ids.push(ele.skillsId);
|
||||
});
|
||||
return ids;
|
||||
},
|
||||
excelOption() {
|
||||
return {
|
||||
submitBtn: false,
|
||||
emptyBtn: false,
|
||||
column: [
|
||||
{
|
||||
label: "文件上传",
|
||||
prop: "excelFile",
|
||||
type: "upload",
|
||||
drag: true,
|
||||
loadText: "文件上传中,请稍等",
|
||||
span: 24,
|
||||
propsHttp: {
|
||||
res: "data",
|
||||
},
|
||||
accept: excelAccept,
|
||||
tip: "请上传 .xls,.xlsx 标准格式文件",
|
||||
action: excelImport(
|
||||
this.companyId,
|
||||
this.tenantId,
|
||||
this.excelForm.isCovered
|
||||
),
|
||||
},
|
||||
{
|
||||
label: "数据覆盖",
|
||||
prop: "isCovered",
|
||||
type: "switch",
|
||||
align: "center",
|
||||
width: 80,
|
||||
dicData: [
|
||||
{
|
||||
label: "否",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "是",
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
value: 0,
|
||||
slot: true,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择是否覆盖",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "模板下载",
|
||||
prop: "excelTemplate",
|
||||
formslot: true,
|
||||
span: 24,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user