<!--
|
* @Descripttion:
|
* @version:
|
* @Author: Pengjiantian
|
* @Date: 2019-08-26 15:08:09
|
* @LastEditors: PengJianTian
|
* @LastEditTime: 2019-12-10 11:21:39
|
-->
|
<template>
|
<div id="area">
|
<el-container>
|
<el-main>
|
<el-form
|
label-position="right"
|
ref="form"
|
:model="form"
|
id="search-form"
|
>
|
<el-row :gutter="20">
|
<el-col :md="8" :lg="6">
|
<el-form-item label="统一社会信用码" prop="reditcode">
|
<el-input
|
v-model.trim="form.reditcode"
|
placeholder="请输入"
|
></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :md="8" :lg="6">
|
<el-form-item label="企业工商登记名" prop="enterprisename">
|
<el-input
|
v-model.trim="form.enterprisename"
|
placeholder="请输入"
|
></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :md="8" :lg="6">
|
<form-select
|
v-model="form.flowstatus"
|
prop="flowstatus"
|
code-no="FlowStatus"
|
label="企业状态"
|
></form-select>
|
</el-col>
|
|
<el-col :md="8" :lg="6" v-if="showFormMore">
|
<form-select
|
v-model="form.companytype"
|
prop="companytype"
|
code-no="enterpriseAccessType"
|
label="企业准入类型"
|
></form-select>
|
</el-col>
|
<el-col :md="8" :lg="6" v-if="showFormMore">
|
<form-select
|
v-model="form.currentFlowStatus"
|
prop="currentFlowStatus"
|
code-no="phaseno"
|
label="当前流程状态"
|
></form-select>
|
</el-col>
|
<el-col :md="8" :lg="6" v-if="showFormMore">
|
<form-select
|
v-model="form.channelareaname"
|
prop="channelareaname"
|
code-no="enterpriseBelongArea"
|
label="企业归属地区"
|
></form-select>
|
</el-col>
|
<el-col :md="8" :lg="6" v-if="showFormMore">
|
<el-form-item label="当前申请人" prop="currentInputUserId">
|
<el-input
|
v-model="form.currentInputUserId"
|
placeholder="请输入"
|
></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col
|
:md="8"
|
:lg="6"
|
style="flex: 1; display: flex; justify-content: flex-end"
|
>
|
<el-form-item :class="showFormMore ? 'pull-right' : 'pull-left'">
|
<el-button size="mini" @click="handleResetForm">重置</el-button>
|
<el-button
|
type="primary"
|
size="mini"
|
@click="handleSubmit"
|
style="margin-left: 22px"
|
>搜索</el-button
|
>
|
<el-button
|
type="text"
|
@click="handleFormMore"
|
class="from-buttons"
|
>
|
{{ formMoreText }}
|
<i
|
:class="
|
showFormMore ? 'el-icon-arrow-up' : 'el-icon-arrow-down'
|
"
|
></i>
|
</el-button>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<el-row>
|
<el-button
|
type="primary"
|
icon="el-icon-circle-plus-outline"
|
size="small"
|
@click="showAdmitDialog = true"
|
v-if="powerControl.addApplyLimit"
|
>新增申请</el-button
|
>
|
</el-row>
|
<el-row>
|
<el-table
|
v-loading="listLoading"
|
:data="tableData"
|
fit
|
stripe
|
highlight-current-row
|
max-height="530"
|
style="width: 100%; margin-top: 30px"
|
>
|
<el-table-column label=" " type="index" align="center" width="50px">
|
</el-table-column>
|
<el-table-column
|
prop="reditcode"
|
label="统一社会信用码"
|
width="180"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="enterprisename"
|
label="企业工商登记名"
|
width="250"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="enterpriseaccesstypeCn"
|
width="140"
|
label="企业准入类型"
|
></el-table-column>
|
<el-table-column
|
prop="enterprisestatus"
|
width="140"
|
label="企业状态"
|
></el-table-column>
|
<el-table-column
|
prop="phasename"
|
width="140"
|
label="当前流程状态"
|
></el-table-column>
|
<el-table-column
|
prop="channelareaname"
|
label="企业归属地区"
|
width="140"
|
></el-table-column>
|
<el-table-column
|
prop="accessTime"
|
width="150"
|
label="准入时间"
|
></el-table-column>
|
<el-table-column
|
prop="accessUser"
|
label="准入人"
|
width="150"
|
></el-table-column>
|
<el-table-column
|
prop="takeouttime"
|
label="准出时间"
|
width="150"
|
></el-table-column>
|
<el-table-column
|
prop="takeoutuserid"
|
label="准出人"
|
width="150"
|
></el-table-column>
|
<el-table-column
|
prop="updatetime"
|
label="上次修改时间"
|
width="170"
|
></el-table-column>
|
<el-table-column
|
prop="updateuserid"
|
width="130"
|
label="上次修改用户"
|
></el-table-column>
|
<el-table-column
|
prop="currentapplyuser"
|
width="140"
|
label="当前申请人"
|
></el-table-column>
|
<el-table-column label="申请管理" fixed="right" width="150">
|
<template slot-scope="scope">
|
<!-- style="margin:0 20px 0 0" -->
|
<!-- 默认显示第一个 -->
|
<el-button
|
type="text"
|
@click="handler(scope.row, scope.row.btns[0])"
|
>{{ scope.row.btns[0] }}</el-button
|
>
|
<!-- 只有两个按钮时默认显示 -->
|
<el-button
|
type="text"
|
@click="handler(scope.row, scope.row.btns[1])"
|
v-if="scope.row.btns.length === 2"
|
>{{ scope.row.btns[1] }}</el-button
|
>
|
<el-popover
|
:ref="scope.$index"
|
placement="bottom"
|
@show="
|
scope.row.isSwitch = true;
|
$set(tableData, scope.$index, scope.row);
|
"
|
@hide="
|
scope.row.isSwitch = false;
|
$set(tableData, scope.$index, scope.row);
|
"
|
trigger="hover"
|
popper-class="custom_popper"
|
v-if="scope.row.btns.length !== 2"
|
>
|
<div style="text-align: center; margin: 2px 0">
|
<el-button
|
type="text"
|
style="padding: 0"
|
v-for="(item, index) in scope.row.btns"
|
:key="index"
|
v-show="index != 0"
|
@click="
|
scope._self.$refs[scope.$index].doClose();
|
handler(scope.row, item);
|
"
|
>{{ item }}</el-button
|
>
|
</div>
|
<!-- 只有一个按钮时置灰 -->
|
<el-button
|
style="margin-left: 20px"
|
type="text"
|
slot="reference"
|
:disabled="scope.row.btns.length < 2"
|
>
|
更多
|
<i
|
style="font-size: 14px"
|
:class="[
|
{
|
'el-icon-arrow-down':
|
!scope.row.isSwitch && scope.row.btns.length > 2,
|
},
|
{ 'el-icon-arrow-up': scope.row.isSwitch },
|
]"
|
></i>
|
</el-button>
|
</el-popover>
|
</template>
|
</el-table-column>
|
</el-table>
|
<pagination
|
v-show="total > 0"
|
:total="total"
|
:page.sync="listQuery.currentPage"
|
:limit.sync="listQuery.pageSize"
|
@pagination="initTable"
|
/>
|
</el-row>
|
<!-- 新增自营弹框-->
|
<add-dialog :showDialog.sync="showAdmitDialog"></add-dialog>
|
</el-main>
|
</el-container>
|
<OperateSuccessTip :content="contentTip.cancel" v-if="isShowCancel" />
|
</div>
|
</template>
|
|
<script>
|
import "../../style/areaBuilding.styl";
|
import {
|
qryEnpAdmitInList,
|
qryEnpDetailParams,
|
enpCancelApply,
|
enpTakeOut,
|
createEnpChangeApply,
|
enpReapply,
|
enpFlowReset,
|
qryEnpDetailParamsContinue,
|
} from "@/api/area/enterprise";
|
import Pagination from "@/components/Pagination";
|
import FormSelect from "./FormSelect";
|
import AddDialog from "./AddDialog";
|
import OperateSuccessTip from "@/views/area/components/operateSuccessTip";
|
export default {
|
components: { AddDialog, FormSelect, Pagination, OperateSuccessTip },
|
data: function () {
|
return {
|
handleChange: false,
|
showAdmitDialog: false,
|
form: {
|
reditcode: "",
|
enterprisename: "",
|
flowstatus: [],
|
companytype: [],
|
currentFlowStatus: [],
|
channelareaname: [],
|
currentInputUserId: "",
|
},
|
formMoreText: "展开",
|
showFormMore: false,
|
// 分页
|
listLoading: true,
|
tableData: [],
|
total: 0,
|
listQuery: {
|
currentPage: 1,
|
pageSize: 10,
|
},
|
// 权限控制
|
powerControl: {
|
addApplyLimit: false, // 新增申请 -- 未明确是否需要增加权限
|
detailsLimit: false, // 详情
|
cancelApplyLimit: false, // 取消申请
|
changeApplyLimit: false, // 变更申请
|
continueHandleLimit: false, // 继续处理
|
takeOutLimit: false, // 准出
|
renewApplyLimit: false, // 重新申请
|
withdrawApplyLimit: false, // 撤回申请
|
},
|
isShowCancel: false, // 取消成功展示
|
contentTip: {
|
cancel: "取消成功",
|
},
|
};
|
},
|
created() {
|
this.initTable();
|
},
|
mounted() {
|
// console.log(this.window)
|
if (
|
this.window.location.host.indexOf("236") != -1 ||
|
this.window.location.host.indexOf("localhost") != -1
|
) {
|
this.powerControl.addApplyLimit =
|
this.window.top._server_enterprise_saveEnpAdmit = true;
|
this.powerControl.detailsLimit =
|
this.window.top._server_enterprise_qryEnpDetailParams = true;
|
this.powerControl.cancelApplyLimit =
|
this.window.top._server_enterprise_enpCancelApply = true;
|
this.powerControl.changeApplyLimit =
|
this.window.top._server_enterprise_createEnpChangeApply = true;
|
this.powerControl.continueHandleLimit =
|
this.window.top._server_enterprise_qryEnpDetailParamsContinue = true;
|
this.powerControl.takeOutLimit =
|
this.window.top._server_enterprise_enpTakeOut = true;
|
this.powerControl.renewApplyLimit =
|
this.window.top._server_enterprise_enpReapply = true;
|
this.powerControl.withdrawApplyLimit =
|
this.window.top._server_enterprise_enpFlowReset = true;
|
} else {
|
this.powerControl.addApplyLimit =
|
this.window.top._server_enterprise_saveEnpAdmit; // 新增申请
|
this.powerControl.detailsLimit =
|
this.window.top._server_enterprise_qryEnpDetailParams; // 详情
|
this.powerControl.cancelApplyLimit =
|
this.window.top._server_enterprise_enpCancelApply; // 取消申请
|
this.powerControl.changeApplyLimit =
|
this.window.top._server_enterprise_createEnpChangeApply; // 变更申请
|
this.powerControl.continueHandleLimit =
|
this.window.top._server_enterprise_qryEnpDetailParamsContinue; // 继续处理
|
this.powerControl.takeOutLimit =
|
this.window.top._server_enterprise_enpTakeOut; // 准出
|
this.powerControl.renewApplyLimit =
|
this.window.top._server_enterprise_enpReapply; // 重新申请
|
this.powerControl.withdrawApplyLimit =
|
this.window.top._server_enterprise_enpFlowReset; // 撤回申请
|
}
|
},
|
methods: {
|
// 企业申请列表
|
initTable() {
|
this.listLoading = true;
|
let params = Object.assign(this.listQuery, this.form);
|
qryEnpAdmitInList(params).then((res) => {
|
res.result.records.map((item) => {
|
for (let key in item) {
|
if (item[key] === "") {
|
item[key] = "--";
|
}
|
}
|
});
|
this.tableData = res.result.records;
|
this.showBtn(this.tableData);
|
this.total = res.result.total;
|
this.listLoading = false;
|
});
|
},
|
handleFormMore() {
|
this.showFormMore = !this.showFormMore;
|
this.showFormMore
|
? (this.formMoreText = "收起")
|
: (this.formMoreText = "展开");
|
},
|
handleSubmit() {
|
this.listQuery.currentPage = 1;
|
this.initTable();
|
},
|
handleResetForm() {
|
this.$refs["form"].resetFields();
|
},
|
// 列表更多处理
|
// 处理列表各种操作管理
|
handler(row, key) {
|
switch (key) {
|
case "继续处理":
|
this.handleContinue(row);
|
break;
|
case "详情":
|
this.handleDetails(row);
|
break;
|
case "变更申请":
|
this.handleChangeDetails(row);
|
break;
|
case "取消申请":
|
this.handleCancel(row);
|
break;
|
case "撤回申请":
|
this.handleWithdrawal(row);
|
break;
|
case "重新申请":
|
this.handleReset(row);
|
break;
|
case "准出":
|
this.handleTakeOut(row);
|
break;
|
default:
|
break;
|
}
|
},
|
// 排序展示列表需要的按钮
|
showBtn(array) {
|
// 给每一行数据天年btns属性
|
array.forEach((val) => {
|
val.btns = [];
|
val.operationOption.continue == 1 &&
|
this.powerControl.continueHandleLimit
|
? val.btns.push("继续处理")
|
: "";
|
val.operationOption.details == 1 && this.powerControl.detailsLimit
|
? val.btns.push("详情")
|
: "";
|
val.operationOption.changeDetails == 1 &&
|
this.powerControl.changeApplyLimit
|
? val.btns.push("变更申请")
|
: "";
|
val.operationOption.cancel == 1 && this.powerControl.cancelApplyLimit
|
? val.btns.push("取消申请")
|
: "";
|
val.operationOption.withdraw == 1 &&
|
this.powerControl.withdrawApplyLimit
|
? val.btns.push("撤回申请")
|
: "";
|
val.operationOption.reset == 1 && this.powerControl.renewApplyLimit
|
? val.btns.push("重新申请")
|
: "";
|
val.operationOption.takeOut == 1 && this.powerControl.takeOutLimit
|
? val.btns.push("准出")
|
: "";
|
});
|
},
|
// 继续处理
|
async handleContinue(row) {
|
let params = {
|
creditCode: row.reditcode,
|
serialno: row.serialno,
|
searchType: 1,
|
clickType: 0, // 点击类型(详情传1 继续处理传0)
|
};
|
let res = await qryEnpDetailParamsContinue(params);
|
let enterpriseParams = {
|
clickType: 0,
|
...res.result,
|
};
|
this.$store.commit("SET_enterpriseParams", enterpriseParams);
|
this.$router.push({ path: "/area/enterprise/update/enterpriseBaseInfo" });
|
},
|
// 详情
|
async handleDetails(row) {
|
let params = {
|
creditCode: row.reditcode,
|
serialno: row.serialno,
|
searchType: 1,
|
clickType: 1, // 点击类型(详情传1 继续处理传0)
|
};
|
let res = await qryEnpDetailParams(params);
|
let enterpriseParams = {
|
clickType: 1, // 点击类型(详情传1 继续处理传0)
|
...res.result,
|
mainTain: "",
|
};
|
this.$store.commit("SET_enterpriseParams", enterpriseParams);
|
this.$router.push({
|
path: "/area/enterprise/details/enterpriseBaseInfo",
|
query: { ...enterpriseParams },
|
});
|
// this.$router.push(`/area/enterprise/details/allMsgDetails/${row.serialno}?objectType=${params.searchType}`)
|
},
|
// 变更申请
|
async handleChangeDetails(row) {
|
let confirm = await this.$confirm(
|
`请确认是否变更"${row.enterprisename}"的申请信息!`,
|
"变更申请确认",
|
{
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
customClass: "enp_messages_box",
|
confirmButtonClass: "enp_messages_box_confirm",
|
cancelButtonClass: "enp_messages_box_cancel",
|
center: true,
|
}
|
)
|
.then(() => {
|
return true;
|
})
|
.catch(() => {
|
return false;
|
});
|
if (confirm) {
|
this.listLoading = true;
|
this.handleChange = true;
|
let params = {
|
creditcode: row.reditcode,
|
serialno: row.serialno,
|
};
|
let res = await createEnpChangeApply(params);
|
if (res.code === "00") {
|
this.listLoading = false;
|
this.handleChange = false;
|
let enterpriseParams = {
|
clickType: 0, // 点击类型(详情传1 继续处理传0)
|
...res.result,
|
likePhaseno: true, // 区分上一步/上一页
|
};
|
this.$store.commit("SET_enterpriseParams", enterpriseParams);
|
this.$router.push({
|
path: "/area/enterprise/update/enterpriseBaseInfo",
|
});
|
} else {
|
this.listLoading = false;
|
this.handleChange = false;
|
}
|
}
|
},
|
// 取消申请
|
handleCancel(row) {
|
let params = { serialno: row.serialno };
|
this.$confirm(
|
`请确认是否取消"${row.enterprisename}"的申请信息!`,
|
"取消申请确认",
|
{
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
customClass: "enp_messages_box",
|
confirmButtonClass: "enp_messages_box_confirm",
|
cancelButtonClass: "enp_messages_box_cancel",
|
center: true,
|
}
|
)
|
.then(() => {
|
enpCancelApply(params).then((res) => {
|
if (res.code === "00") {
|
// this.$message.success('取消成功!')
|
let timer = null;
|
if (timer) {
|
clearTimeout(timer);
|
}
|
this.isShowCancel = !this.isShowCancel;
|
timer = setTimeout(() => {
|
this.isShowCancel = !this.isShowCancel;
|
clearTimeout(timer);
|
this.initTable();
|
}, 1000);
|
}
|
});
|
})
|
.catch(() => {});
|
},
|
// 企业准出
|
handleTakeOut(row) {
|
let params = { serialno: row.serialno };
|
this.$confirm(
|
`请确认是否准出"${row.enterprisename}"的申请信息!`,
|
"准出确认",
|
{
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
customClass: "enp_messages_box",
|
confirmButtonClass: "enp_messages_box_confirm",
|
cancelButtonClass: "enp_messages_box_cancel",
|
center: true,
|
}
|
)
|
.then(() => {
|
enpTakeOut(params).then((res) => {
|
if (res.code === "00") {
|
this.$message.success("准出成功!");
|
this.initTable();
|
}
|
});
|
})
|
.catch(() => {});
|
},
|
// 重新申请
|
handleReset(row) {
|
let params = {
|
creditcode: row.reditcode,
|
serialno: row.serialno,
|
};
|
this.$confirm(
|
`请确认是否重新激活"${row.enterprisename}"的申请信息!`,
|
"重新申请确认",
|
{
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
customClass: "enp_messages_box",
|
confirmButtonClass: "enp_messages_box_confirm",
|
cancelButtonClass: "enp_messages_box_cancel",
|
center: true,
|
}
|
)
|
.then(() => {
|
enpReapply(params).then((res) => {
|
if (res.code === "00") {
|
this.$message.success("重新申请成功!");
|
this.initTable();
|
this.handleContinue(row);
|
}
|
});
|
})
|
.catch(() => {});
|
},
|
// 撤回申请
|
handleWithdrawal(row) {
|
let params = {
|
creditcode: row.reditcode,
|
serialno: row.serialno,
|
};
|
this.$confirm(
|
`请确认是否撤回"${row.enterprisename}"的申请信息!`,
|
"撤回申请确认",
|
{
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
customClass: "enp_messages_box",
|
confirmButtonClass: "enp_messages_box_confirm",
|
cancelButtonClass: "enp_messages_box_cancel",
|
center: true,
|
}
|
)
|
.then(() => {
|
enpFlowReset(params).then((res) => {
|
if (res.code === "00") {
|
this.$message.success("撤回成功!");
|
this.initTable();
|
}
|
});
|
})
|
.catch(() => {});
|
},
|
},
|
};
|
</script>
|
|
<style lang="stylus">
|
.el-dropdown-link {
|
cursor: pointer;
|
color: #0081f0;
|
}
|
|
.el-icon-arrow-down {
|
font-size: 12px;
|
}
|
|
.enp_messages_box.el-message-box--center {
|
width: 458px;
|
height: 173px;
|
|
.el-message-box__header {
|
padding-top: 40px;
|
|
.el-message-box__title {
|
// font-family PingFangSC-Medium,PingFangSC
|
font-size: 18px;
|
font-width: bold;
|
height: 25px;
|
line-height: 25px;
|
}
|
|
.el-message-box__headerbtn {
|
top: 20px;
|
right: 20px;
|
background: rgba(245, 245, 245, 1);
|
}
|
}
|
|
.el-message-box__content {
|
.el-message-box__message {
|
p {
|
height: 20px;
|
line-height: 20px;
|
font-size: 14px;
|
font-weight: 400;
|
color: rgba(101, 101, 101, 1);
|
// font-family PingFangSC-Medium,PingFangSC
|
}
|
}
|
}
|
|
.el-message-box__btns {
|
padding-top: 30px;
|
|
.enp_messages_box_confirm {
|
margin-left: 40px;
|
margin-left: 40px;
|
background-color: rgba(0, 129, 240, 1);
|
border-radius: 4px;
|
color: rgba(255, 255, 255, 1);
|
}
|
|
.enp_messages_box_cancel {
|
border-radius: 4px;
|
border: 1px solid rgba(204, 204, 204, 1);
|
color: rgba(85, 85, 85, 1);
|
}
|
|
.enp_messages_box_cancel, .enp_messages_box_confirm {
|
padding: 0;
|
width: 120px;
|
height: 30px;
|
|
span {
|
font-size: 14px;
|
height: 20px;
|
font-weight: 400;
|
line-height: 20px;
|
}
|
}
|
}
|
}
|
</style>
|