first commit
This commit is contained in:
@@ -0,0 +1,589 @@
|
||||
<!--协会信息管理 djx 2019-07-08-->
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.dia .el-dialog__body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.el-form--label-top .el-form-item__label {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
margin: 16px 0px;
|
||||
}
|
||||
|
||||
.editor {
|
||||
width: 100%;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.el-input--suffix .el-input__inner {
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.el-dropdown-menu__item {
|
||||
padding: 0px 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<!--快捷查询-->
|
||||
<el-row class="header navbar bg-white shadow">
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input style="width:180px;" placeholder="可按协会名称查询" v-model="pageForm.searchKeyword" clearable></el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
</el-row>
|
||||
|
||||
<!--表格-->
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="协会名称"
|
||||
prop="stmc"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="成立时间" prop="clsj"></el-table-column>
|
||||
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="主要负责人"
|
||||
prop="username"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="负责人单位" prop="name"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="负责人电话" prop="phone"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="负责人邮箱" prop="email"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="成员人数" prop="rs"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="180px">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="openInfo(scope)" size="mini">查看</el-button>
|
||||
<el-button type="primary" @click="openSzcy(scope)" size="mini">设置成员</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<!--分页-->
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
|
||||
<!--设置成员-->
|
||||
<el-dialog title="设置成员" class="dia"
|
||||
:visible.sync="szcyDialogVisible" custom-class="ViewDialogClass" width="50%" top="3%">
|
||||
|
||||
<el-steps :active="active" align-center>
|
||||
<el-step title="选择人员"></el-step>
|
||||
<el-step title="设置是否缴费"></el-step>
|
||||
</el-steps>
|
||||
|
||||
<el-row v-show="active=='1'">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input style="width:180px;" size="mini" placeholder="可按姓名、工号查询" v-model="szcyPageForm.searchKeyword"
|
||||
clearable></el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select size="mini" placeholder="请选择单位" v-model="szcyPageForm.unit" style="width: 160px;"
|
||||
clearable="true" filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" size="mini" icon="el-icon-search" @click="szcySearch"></el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 6px;">
|
||||
<el-label style="color: #409EFF">协会最少组建人数为<span style="color: red">{{cyrs}}</span>人,目前协会成员已有<span
|
||||
style="color: red">{{rs}}</span>人
|
||||
</el-label>
|
||||
</el-row>
|
||||
<el-row v-show="active=='1'">
|
||||
<el-table :row-key="rowKey" ref="upTable" @selection-change="handleSelectionChange" :data="upTableData"
|
||||
size="small">
|
||||
<el-table-column :reserve-selection="true" type="selection" width="46"></el-table-column>
|
||||
<el-table-column label="姓名" prop="username" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column label="教工号" prop="loginname" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column label="单位" width="280px" prop="name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="电话" prop="mobile" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex" header-align="center" align="center"></el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<!--分页-->
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 26px;" v-show="active=='1'">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="szcypageSizeChange"
|
||||
@current-change="szcypageNumberChange"
|
||||
:current-page="szcyPageForm.pageNumber"
|
||||
:page-sizes="[5, 10, 15, 20]"
|
||||
:page-size="szcyPageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="szcyPageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
|
||||
<el-card class="box-card" v-show="active=='2'" style="margin-top: 20px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="color: #ebb563">请选择以下人员的缴费信息</span>
|
||||
<el-button @click="szcyDo" style="float: right; padding: 6px 6px;" type="primary" icon="el-icon-check"
|
||||
circle></el-button>
|
||||
</div>
|
||||
|
||||
<el-form :model="formData" label-position="top" style="margin-left: 0px;" size="small" label-width="86px">
|
||||
<el-row>
|
||||
<el-col :span="8"
|
||||
style="text-align: center;margin-bottom: 8px;background-color: #EBEEF5;color: black;font-weight: bold">
|
||||
姓名
|
||||
</el-col>
|
||||
<el-col :span="8"
|
||||
style="text-align: center;margin-bottom: 8px;background-color: #EBEEF5;color: black;font-weight: bold">
|
||||
性别
|
||||
</el-col>
|
||||
<el-col :span="8"
|
||||
style="text-align: center;margin-bottom: 8px;background-color: #EBEEF5;color: black;font-weight: bold">
|
||||
缴费信息
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-for="item in multipleSelection">
|
||||
<el-col :span="8" style="text-align: center;margin-bottom: 8px;">
|
||||
<el-lebel style="color: grey">{{item.username}}</el-lebel>
|
||||
</el-col>
|
||||
<el-col :span="8" style="text-align: center;margin-bottom: 8px;">
|
||||
<el-lebel style="color: grey">{{item.sex}}</el-lebel>
|
||||
</el-col>
|
||||
<el-col :span="8" style="text-align: center;margin-bottom: 8px;">
|
||||
<el-radio v-model="item.jnjf" label="1">已缴费</el-radio>
|
||||
<el-radio v-model="item.jnjf" label="2">未缴费</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin: 20px 0px;" v-if="multipleSelection.length==0">
|
||||
<el-divider content-position="center">您还没有选择人员</el-divider>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="szcyDialogVisible = false">取 消</el-button>
|
||||
<el-button type="warning" @click="active = '1'" v-if="active == '2'">上一步</el-button>
|
||||
<el-button type="primary" @click="active = '2'" v-if="active == '1'">下一步</el-button>
|
||||
<el-button type="primary" @click="szcyDo" v-if="active == '2'">确 定</el-button>
|
||||
</span>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!--查看-->
|
||||
<el-dialog title="查看" class="dia"
|
||||
:visible.sync="infoDialogVisible" custom-class="ViewDialogClass" width="60%" top="3%">
|
||||
|
||||
<el-collapse v-model="activeName" accordion>
|
||||
<el-collapse-item title="协会详细信息" name="1">
|
||||
<el-card>
|
||||
<table style="width: 100%">
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa" colspan="6" style="font-size: 18px;">{{viewData.stmc}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">主要负责人</td>
|
||||
<td class="tpb">{{viewData.username}}</td>
|
||||
<td class="tpa">单位</td>
|
||||
<td class="tpb">{{viewData.name}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">电话</td>
|
||||
<td class="tpb">{{viewData.phone}}</td>
|
||||
<td class="tpa">邮箱</td>
|
||||
<td class="tpb">{{viewData.email}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">最少人数</td>
|
||||
<td class="tpb">{{viewData.cyrs}}</td>
|
||||
<td class="tpa">成立时间</td>
|
||||
<td class="tpb">{{viewData.clsj}}</td>
|
||||
</tr>
|
||||
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa" colspan="6">申请理由</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpc" colspan="6">
|
||||
<div v-html="viewData.sqly"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa" colspan="6">协会介绍</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpc" colspan="6">
|
||||
<div v-html="viewData.stjs"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa" colspan="6">协会章程</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpc" colspan="6">
|
||||
<div v-html="viewData.stzc"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
|
||||
<el-collapse-item title="协会成员列表" name="2">
|
||||
<el-card class="box-card">
|
||||
<el-divider content-position="left">
|
||||
<el-label style="color: #409eff">点击缴费可修改缴费状态</el-label>
|
||||
</el-divider>
|
||||
<el-table :data="ryTableData" size="small" border
|
||||
:header-cell-style="{background:'#F5F5F5',color:'#606266'}">
|
||||
<el-table-column label="人员身份" width="80px" prop="cysf" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-lable v-if="scope.row.cysf=='1'">负责人</el-lable>
|
||||
<el-lable v-if="scope.row.cysf=='2'">成员</el-lable>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" width="120px" prop="username" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="电话" width="120px" prop="mobile" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="是否缴费" width="80px" prop="jnjf" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="success" @click="editJf(scope)" v-if="scope.row.jnjf=='1'" size="small"
|
||||
:underline="false" style="font-size: 12px;">已缴费<i class="el-icon-thumb"></i>
|
||||
</el-link>
|
||||
<el-link type="warning" @click="editJf(scope)" v-if="scope.row.jnjf=='2'" size="small"
|
||||
:underline="false" style="font-size: 12px;">未缴费<i class="el-icon-thumb"></i>
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
/*列表*/
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
},
|
||||
|
||||
/*设置成员*/
|
||||
szcyPageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
unit: "",
|
||||
stid: "",
|
||||
},
|
||||
szcyDialogVisible: false,
|
||||
upTableData: [],
|
||||
downTableData: [],
|
||||
units: [],
|
||||
temp: [],
|
||||
cyrs: "",
|
||||
strs: "",
|
||||
rs: "",
|
||||
|
||||
/*查看*/
|
||||
infoDialogVisible: false,
|
||||
viewData: [],
|
||||
ryTableData: [],
|
||||
activeName: "1",
|
||||
active: "1",
|
||||
multipleSelection: [],
|
||||
formData: {},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
pageData: function () {
|
||||
var self = this;
|
||||
sublime.showLoadingbar();//显示loading
|
||||
$.post(base + "/platform/hd/stgl/stcygl/data", self.pageForm, function (data) {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
if (data.code == 0) {
|
||||
self.tableData = data.data.stxx.list;
|
||||
self.pageForm.totalCount = data.data.stxx.totalCount;
|
||||
self.units = data.data.unit;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
|
||||
/*分页*/
|
||||
pageSizeChange: function (val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange: function (val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
/*分页*/
|
||||
szcypageSizeChange: function (val) {
|
||||
this.szcyPageForm.pageSize = val;
|
||||
this.szcyData();
|
||||
this.closeChecked();
|
||||
},
|
||||
szcypageNumberChange: function (val) {
|
||||
this.szcyPageForm.pageNumber = val;
|
||||
this.szcyData();
|
||||
this.closeChecked();
|
||||
},
|
||||
|
||||
doSearch: function () {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
},
|
||||
szcySearch: function () {
|
||||
this.szcyPageForm.pageNumber = 1;
|
||||
this.szcyData();
|
||||
},
|
||||
|
||||
szcyData: function () {
|
||||
var self = this;
|
||||
|
||||
$.post(base + "/platform/hd/stgl/stcygl/szcyData", self.szcyPageForm, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.upTableData = data.data.user.list;
|
||||
self.szcyPageForm.totalCount = data.data.user.totalCount;
|
||||
self.strs = data.data.strs;
|
||||
self.active = "1";
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
|
||||
/*查看*/
|
||||
openInfo: function (scope) {
|
||||
var self = this;
|
||||
$.post(base + "/platform/hd/stgl/stcygl/findById", {id: scope.row.id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.viewData = data.data.st;
|
||||
self.ryTableData = data.data.ry;
|
||||
self.infoDialogVisible = true;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
openSzcy: function (scope) {
|
||||
var self = this;
|
||||
self.cyrs = scope.row.cyrs;
|
||||
//self.multipleSelection=[];
|
||||
self.rs = scope.row.rs;
|
||||
self.szcyPageForm.pageNumber = 1;
|
||||
self.szcyPageForm.stid = scope.row.id;
|
||||
self.szcyData();
|
||||
self.active = "1";
|
||||
self.szcyDialogVisible = true;
|
||||
},
|
||||
|
||||
handleSelectionChange: function (val) {
|
||||
this.multipleSelection = val;
|
||||
this.multipleSelection.forEach(function (val,index) {
|
||||
vue.$set(vue.multipleSelection[index],'jnjf','1');
|
||||
})
|
||||
},
|
||||
rowKey: function (row) {
|
||||
var self = this;
|
||||
return row.id;
|
||||
},
|
||||
|
||||
szcyDo: function () {
|
||||
var self = this;
|
||||
|
||||
if (self.multipleSelection.length == 0) {
|
||||
self.$message({
|
||||
message: "您还没有选择人员!",
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < self.multipleSelection.length; i++) {
|
||||
if (self.multipleSelection[i].jnjf == null || self.multipleSelection[i].jnjf == "") {
|
||||
self.$message({
|
||||
message: "有人员缴费信息尚未选择!",
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((self.strs * 1 + self.multipleSelection.length * 1) < self.cyrs) {
|
||||
if (self.multipleSelection.length < self.cyrs) {
|
||||
self.$alert("<span>最少人数限制为<span style='color: red'>" + self.cyrs + "</span>人,当前<span style='color: red'>" + self.multipleSelection.length + "</span>人</span>", "温馨提示", {
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning',
|
||||
closeOnPressEscape: true,
|
||||
closeOnClickModal: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var array = new Array();
|
||||
for (var i = 0; i < self.multipleSelection.length; i++) {
|
||||
array.push(
|
||||
{
|
||||
stid: self.szcyPageForm.stid,
|
||||
userid: self.multipleSelection[i].id,
|
||||
rssj: moment().format("YYYY-MM-DD"),
|
||||
jnjf: self.multipleSelection[i].jnjf,
|
||||
cysf: "2",
|
||||
}
|
||||
);
|
||||
}
|
||||
$.post(base + "/platform/hd/stgl/stcygl/szcyDo", {array: JSON.stringify(array)}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.pageData();
|
||||
self.multipleSelection = [];
|
||||
setTimeout(function () {
|
||||
self.$refs.upTable.clearSelection();
|
||||
}, 500)
|
||||
self.szcyDialogVisible = false;
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
|
||||
editJf: function (scope) {
|
||||
var self = this;
|
||||
var flag = 0;
|
||||
|
||||
if (scope.row.jnjf == "1") {
|
||||
self.$confirm("确定要修改为未缴费吗?", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: function (a, b) {
|
||||
if ("confirm" == a) {
|
||||
flag = 2;
|
||||
$.post(base + "/platform/hd/stgl/stcygl/editJf", {
|
||||
stid: scope.row.stid,
|
||||
userid: scope.row.id,
|
||||
jnjf: flag
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.ryTableData = data.data;
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (scope.row.jnjf == "2") {
|
||||
self.$confirm("确定要修改为已缴费吗?", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: function (a, b) {
|
||||
if ("confirm" == a) {
|
||||
flag = 1;
|
||||
$.post(base + "/platform/hd/stgl/stcygl/editJf", {
|
||||
stid: scope.row.stid,
|
||||
userid: scope.row.id,
|
||||
jnjf: flag
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.ryTableData = data.data;
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created: function () {
|
||||
this.pageData();
|
||||
},
|
||||
watch: {},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,977 @@
|
||||
<!--协会信息管理 djx 2019-07-08-->
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
.dia .el-dialog__body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.el-form--label-top .el-form-item__label {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.el-divider--horizontal {
|
||||
margin: 16px 0px;
|
||||
}
|
||||
|
||||
.editor {
|
||||
width: 100%;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
.el-input--suffix .el-input__inner {
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.el-dropdown-menu__item {
|
||||
padding: 0px 15px;
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<!--快捷查询-->
|
||||
<el-row class="header navbar bg-white shadow">
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input style="width:180px;" placeholder="可按协会名称查询" v-model="pageForm.searchKeyword" clearable></el-input>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button size="medium" @click="openAdd" v-if="flag==1"><i class="ti-plus"></i> 创建协会</el-button>
|
||||
</div>
|
||||
|
||||
</el-row>
|
||||
|
||||
<!--表格-->
|
||||
<el-row class="el-table-container">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index">
|
||||
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="协会名称"
|
||||
prop="stmc"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="成立时间" prop="clsj"></el-table-column>
|
||||
<el-table-column align="center" :show-overflow-tooltip="true" header-align="center" label="主要负责人"
|
||||
prop="username"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="负责人单位" prop="name"></el-table-column>
|
||||
<el-table-column align="center" width="120px" header-align="center" label="负责人电话"
|
||||
prop="phone"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="负责人邮箱" prop="email"></el-table-column>
|
||||
<el-table-column align="center" width="80px" header-align="center" label="最少人数"
|
||||
prop="cyrs"></el-table-column>
|
||||
<el-table-column align="center" width="120px" header-align="center" label="状态" prop="shjg">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.shjg != '1' && scope.row.shjg != '2' && scope.row.jsst != '1'">审批中</el-tag>
|
||||
<el-tag v-if="scope.row.shjg == '1' && scope.row.jsst != '1'" type="success">审批通过</el-tag>
|
||||
<el-tag v-if="scope.row.shjg == '2' && scope.row.jsst == '1'" type="danger">审批驳回</el-tag>
|
||||
<i v-if="scope.row.jsst == '1'" class="fa fa-circle text-danger ml5">已解散</i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="openInfo(scope)" size="mini">查看</el-button>
|
||||
<el-button type="primary" @click="openInfo(scope)" v-if="scope.row.shjg!='1' && flag=='1'"
|
||||
size="mini">审核
|
||||
</el-button>
|
||||
<el-button type="primary" @click="openEdit(scope)" v-if="scope.row.shjg!='1'" size="mini">编辑
|
||||
</el-button>
|
||||
|
||||
<!--#if(@shiro.hasRole('sysadmin')){#-->
|
||||
<el-button type="danger" @click="deleteDo(scope)" size="mini"
|
||||
style="margin-left: 9px;">删除
|
||||
</el-button>
|
||||
<!--#}else{#-->
|
||||
<el-button type="danger" @click="deleteDo(scope)" v-if="scope.row.shjg!='1'" size="mini"
|
||||
style="margin-left: 9px;">删除
|
||||
</el-button>
|
||||
<!--#}#-->
|
||||
|
||||
|
||||
<el-button type="danger" @click="jsstDo(scope)"
|
||||
v-if="scope.row.shjg=='1' && flag=='1' && scope.row.jsst!='1'" size="mini">解散协会
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<!--分页-->
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
|
||||
<!--新增-->
|
||||
<el-dialog title="创建协会" width="60%" custom-class="ViewDialogClass" :close-on-click-modal="false" top="3%"
|
||||
class="dia" v-if="addDialogVisible" :visible.sync="addDialogVisible">
|
||||
|
||||
<el-divider content-position="left"><span style="color: rgb(121, 187, 255)">请填写以下协会信息</span></el-divider>
|
||||
<el-form :model="formData" label-position="top" ref="addForm" :rules="formRules" size="small"
|
||||
label-width="86px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="协会名称" prop="stmc">
|
||||
<el-input maxlength="100" placeholder="请输入协会名称"
|
||||
v-model="formData.stmc" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成员人数" prop="cyrs">
|
||||
<el-input maxlength="100" placeholder="请输入最少人数"
|
||||
v-model="formData.cyrs" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主要负责人" prop="fzr">
|
||||
<el-select v-model="formData.fzr" @change="selChange" :remote-method="remoteMethod" filterable
|
||||
remote placeholder="请根据教工号、姓名、单位查询" style="width: 88%">
|
||||
<el-option
|
||||
v-for="item in fzrOptions"
|
||||
:key="item.id"
|
||||
:label="item.display"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人单位" prop="unitname">
|
||||
<el-input maxlength="100" disabled
|
||||
v-model="formData.unitname" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
<el-input style="display: none" v-model="formData.unit" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人电话" prop="phone">
|
||||
<el-input maxlength="100"
|
||||
v-model="formData.phone" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人邮箱" prop="email">
|
||||
<el-input maxlength="100"
|
||||
v-model="formData.email" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件上传">
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
action="****"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChange"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList"
|
||||
:limit="1">
|
||||
<el-button size="small" type="primary">选择文件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请理由">
|
||||
<script id="lyEditor" type="text/plain" class="editor"></script>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="协会介绍">
|
||||
<script id="jsEditor" type="text/plain" class="editor"></script>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="协会章程">
|
||||
<script id="zcEditor" type="text/plain" class="editor"></script>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!--编辑-->
|
||||
<el-dialog title="编辑协会信息" id="editDialog" class="dia" :close-on-click-modal="false"
|
||||
v-if="editDialogVisible" :visible.sync="editDialogVisible" custom-class="ViewDialogClass" width="60%" top="3%">
|
||||
|
||||
<el-divider content-position="left"><span style="color: rgb(121, 187, 255)">请确认以下协会信息</span></el-divider>
|
||||
<el-form :model="editFormData" label-position="top" ref="editForm" :rules="editFormRules" size="small"
|
||||
label-width="86px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="协会名称">
|
||||
<el-input maxlength="100" placeholder="请输入协会名称"
|
||||
v-model="editFormData.stmc" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="成员人数">
|
||||
<el-input maxlength="100" placeholder="请输入最少人数"
|
||||
v-model="editFormData.cyrs" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主要负责人">
|
||||
<el-select v-model="editFormData.fzr" @change="editSelChange" :remote-method="remoteMethod"
|
||||
filterable remote placeholder="请根据教工号、姓名、单位查询" style="width: 88%">
|
||||
<el-option
|
||||
v-for="item in fzrOptions"
|
||||
:key="item.id"
|
||||
:label="item.display"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人单位">
|
||||
<el-input maxlength="100" disabled
|
||||
v-model="editFormData.unitname" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
<el-input style="display: none" v-model="formData.unit" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人电话">
|
||||
<el-input maxlength="100"
|
||||
v-model="editFormData.phone" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人邮箱">
|
||||
<el-input maxlength="100"
|
||||
v-model="editFormData.email" style="width: 88%"
|
||||
auto-complete="off" tabindex="4" type="text"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件上传">
|
||||
<el-upload
|
||||
name="file"
|
||||
ref="upload"
|
||||
action="****"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChange"
|
||||
:on-exceed="handleExceed"
|
||||
:auto-upload="false"
|
||||
:file-list="fileList"
|
||||
:limit="1">
|
||||
<el-button size="small" type="primary">选择文件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请理由">
|
||||
<script id="editlyEditor" v-if="editDialogVisible" type="text/plain" class="editor"></script>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="协会介绍">
|
||||
<script id="editjsEditor" v-if="editDialogVisible" type="text/plain" class="editor"></script>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="协会章程">
|
||||
<script id="editzcEditor" v-if="editDialogVisible" type="text/plain" class="editor"></script>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doEdit">确 定</el-button>
|
||||
</span>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<!--查看-->
|
||||
<el-dialog :title="temp.shjg=='1'?'查看':'审核'" class="dia"
|
||||
:visible.sync="infoDialogVisible" custom-class="ViewDialogClass" width="60%" top="3%">
|
||||
|
||||
<el-collapse v-model="activeName" accordion>
|
||||
<el-collapse-item title="协会详细信息" name="1">
|
||||
<el-card>
|
||||
<table style="width: 100%">
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa" colspan="6" style="font-size: 18px;">{{viewData.stmc}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">主要负责人</td>
|
||||
<td class="tpb">{{viewData.username}}</td>
|
||||
<td class="tpa">单位</td>
|
||||
<td class="tpb">{{viewData.name}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">电话</td>
|
||||
<td class="tpb">{{viewData.phone}}</td>
|
||||
<td class="tpa">邮箱</td>
|
||||
<td class="tpb">{{viewData.email}}</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa">最少人数</td>
|
||||
<td class="tpb">{{viewData.cyrs}}</td>
|
||||
<td class="tpa">成立时间</td>
|
||||
<td class="tpb">{{viewData.clsj}}</td>
|
||||
</tr>
|
||||
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa" colspan="6">申请理由</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpc" colspan="6">
|
||||
<div v-html="viewData.sqly"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa" colspan="6">协会介绍</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpc" colspan="6">
|
||||
<div v-html="viewData.stjs"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpa" colspan="6">协会章程</td>
|
||||
</tr>
|
||||
<tr style="border: 1px solid rgb(220,220,220);">
|
||||
<td class="tpc" colspan="6">
|
||||
<div v-html="viewData.stzc"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
|
||||
<el-collapse-item title="协会成员列表" name="2">
|
||||
<el-card class="box-card">
|
||||
<el-table :data="ryTableData" size="small" border
|
||||
:header-cell-style="{background:'#F5F5F5',color:'#606266'}">
|
||||
<el-table-column label="人员身份" width="80px" prop="cysf" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-lable v-if="scope.row.cysf=='1'">负责人</el-lable>
|
||||
<el-lable v-if="scope.row.cysf=='2'">成员</el-lable>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" width="120px" prop="username" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="电话" width="120px" prop="mobile" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="是否缴费" width="80px" prop="jnjf" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-lable v-if="scope.row.jnjf=='1'">已缴费</el-lable>
|
||||
<el-lable v-if="scope.row.jnjf=='2'">未缴费</el-lable>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<!--<el-button type="primary" v-if="temp.shjg=='1'" @click="infoDialogVisible=false">确 定</el-button>-->
|
||||
<el-button type="danger" v-if="temp.shjg!='1' && flag=='1'" @click="sp(2)">驳 回</el-button>
|
||||
<el-button type="success" v-if="temp.shjg!='1' && flag=='1'" @click="sp(1)">通 过</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
/*列表*/
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
},
|
||||
flag: "",
|
||||
|
||||
/*新增*/
|
||||
addDialogVisible: false,
|
||||
formData: {
|
||||
phone: "",
|
||||
email: "",
|
||||
},
|
||||
formRules: {
|
||||
stmc: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
cyrs: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
fzr: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
unitname: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
phone: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
email: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
fzrOptions: [],
|
||||
visible: false,
|
||||
|
||||
/*编辑*/
|
||||
editDialogVisible: false,
|
||||
editFormData: {
|
||||
phone: "",
|
||||
email: "",
|
||||
},
|
||||
editFormRules: {
|
||||
stmc: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
cyrs: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
fzr: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
unitname: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
phone: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
email: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
|
||||
|
||||
/*查看*/
|
||||
infoDialogVisible: false,
|
||||
viewData: [],
|
||||
ryTableData: [],
|
||||
temp: [],
|
||||
activeName: '1',
|
||||
|
||||
fileList: [],
|
||||
stid: "",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
pageData: function () {
|
||||
|
||||
var self = this;
|
||||
sublime.showLoadingbar();//显示loading
|
||||
$.post(base + "/platform/hd/stgl/stxxgl/data", self.pageForm, function (data) {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
if (data.code == 0) {
|
||||
self.tableData = data.data.stxx.list;
|
||||
self.pageForm.totalCount = data.data.stxx.totalCount;
|
||||
self.flag = data.data.flag;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
|
||||
/*分页*/
|
||||
pageSizeChange: function (val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange: function (val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
|
||||
doSearch: function () {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
},
|
||||
|
||||
/*新增*/
|
||||
openAdd: function () {
|
||||
var self = this;
|
||||
self.formData = {
|
||||
phone: "",
|
||||
email: "",
|
||||
};
|
||||
self.fzrOptions = [];
|
||||
self.fileList = [];
|
||||
self.addDialogVisible = true;
|
||||
|
||||
UM.delEditor('lyEditor')
|
||||
UM.delEditor('jsEditor')
|
||||
UM.delEditor('zcEditor')
|
||||
|
||||
self.$nextTick(function () {
|
||||
//实例化编辑器
|
||||
lyEditor = UM.getEditor('lyEditor', {
|
||||
// toolbar: ['undo redo | bold italic underline'],
|
||||
toolbar: ['removeformat | undo redo | bold italic underline | justifyleft justifyright justifycenter | insertorderedlist insertunorderedlist | cleardoc'],
|
||||
initialFrameWidth: '96%',//设置编辑器高度
|
||||
});
|
||||
jsEditor = UM.getEditor('jsEditor', {
|
||||
// toolbar: ['undo redo | bold italic underline'],
|
||||
toolbar: ['removeformat | undo redo | bold italic underline | justifyleft justifyright justifycenter | insertorderedlist insertunorderedlist | cleardoc'],
|
||||
initialFrameWidth: '96%',//设置编辑器高度
|
||||
});
|
||||
zcEditor = UM.getEditor('zcEditor', {
|
||||
// toolbar: ['undo redo | bold italic underline'],
|
||||
toolbar: ['removeformat | undo redo | bold italic underline | justifyleft justifyright justifycenter | insertorderedlist insertunorderedlist | cleardoc'],
|
||||
initialFrameWidth: '96%',//设置编辑器高度
|
||||
});
|
||||
lyEditor.setContent("");
|
||||
jsEditor.setContent("");
|
||||
zcEditor.setContent("");
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
doAdd: function () {
|
||||
var self = this;
|
||||
self.$refs["addForm"].validate(function (valid) {
|
||||
if (valid) {
|
||||
|
||||
var NewFormData = new FormData(); //以formdata的形式发送到后台
|
||||
|
||||
if (self.fileList != null && self.fileList.length > 0) {
|
||||
self.fileList.forEach(function (val) {
|
||||
if (self.fileList[0].raw.name.split(".")[1] != "doc" && self.fileList[0].raw.name.split(".")[1] != "docx"
|
||||
&& self.fileList[0].raw.name.split(".")[1] != "pdf" && self.fileList[0].raw.name.split(".")[1] != "xls"
|
||||
&& self.fileList[0].raw.name.split(".")[1] != "xlsx"
|
||||
) {
|
||||
self.$message.warning("仅支持.pdf,.doc,.docx类型的文件上传!");
|
||||
return;
|
||||
} else {
|
||||
NewFormData.append("file", val.raw, val.raw.name);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
self.$message.warning("请上传附件!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NewFormData.append("stmc", self.formData.stmc);
|
||||
NewFormData.append("cyrs", self.formData.cyrs);
|
||||
NewFormData.append("fzr", self.formData.fzr);
|
||||
NewFormData.append("unit", self.formData.unit);
|
||||
if (self.formData.phone == "" || self.formData.phone == null) {
|
||||
NewFormData.append("phone", "");
|
||||
} else {
|
||||
NewFormData.append("phone", self.formData.phone);
|
||||
}
|
||||
if (self.formData.email == "" || self.formData.email == null) {
|
||||
NewFormData.append("email", "");
|
||||
} else {
|
||||
NewFormData.append("email", self.formData.email);
|
||||
}
|
||||
NewFormData.append("sqly", lyEditor.getContent());
|
||||
NewFormData.append("stjs", jsEditor.getContent());
|
||||
NewFormData.append("stzc", zcEditor.getContent());
|
||||
|
||||
$.ajax({
|
||||
url: base + "/platform/hd/stgl/stxxgl/addDo",
|
||||
type: "post",
|
||||
data: NewFormData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
self.addDialogVisible = false;
|
||||
self.pageData();
|
||||
self.$message.success("操作成功!");
|
||||
} else if (data.code == -1) {
|
||||
self.$message.error("不允许创建重复协会!");
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
self.$message.error("应用程序出现异常!");
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
remoteMethod: function (obj) {
|
||||
var self = this;
|
||||
$.post(base + "/platform/hd/stgl/stxxgl/findFzr", {obj: obj}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.fzrOptions = data.data;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
selChange: function (obj) {
|
||||
var self = this;
|
||||
for (var i = 0; i < self.fzrOptions.length; i++) {
|
||||
if (self.fzrOptions[i].id == obj) {
|
||||
vue.$set(self.formData,"unitname",self.fzrOptions[i].depname)
|
||||
vue.$set(self.formData,"unit",self.fzrOptions[i].unitid)
|
||||
vue.$set(self.formData,"phone",self.fzrOptions[i].mobile)
|
||||
vue.$set(self.formData,"email",self.fzrOptions[i].email)
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
editSelChange: function (obj) {
|
||||
var self = this;
|
||||
for (var i = 0; i < self.fzrOptions.length; i++) {
|
||||
if (self.fzrOptions[i].id == obj) {
|
||||
vue.$set(self.editFormData,"unitname",self.fzrOptions[i].depname)
|
||||
vue.$set(self.editFormData,"unit",self.fzrOptions[i].unitid)
|
||||
vue.$set(self.editFormData,"phone",self.fzrOptions[i].mobile)
|
||||
vue.$set(self.editFormData,"email",self.fzrOptions[i].email)
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*审批*/
|
||||
sp: function (obj) {
|
||||
var self = this;
|
||||
if (obj == "3") {
|
||||
self.visible = false;
|
||||
self.$alert("状态为已审核不可进行此操作!", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
$.post(base + "/platform/hd/stgl/stxxgl/spSt", {id: self.temp.id, obj: obj}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
});
|
||||
self.pageData();
|
||||
self.infoDialogVisible = false;
|
||||
}
|
||||
}, "json");
|
||||
|
||||
},
|
||||
|
||||
/*编辑*/
|
||||
openEdit: function (scope) {
|
||||
var self = this;
|
||||
self.stid = scope.row.id;
|
||||
if (scope.row.shjg == "1") {
|
||||
self.$alert("状态为审核通过不可进行修改!", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
});
|
||||
return;
|
||||
}
|
||||
self.fileList = [];
|
||||
if (scope.row.wjname != null && scope.row.wjname != "" && scope.row.wjname != "undefined") {
|
||||
$.post(base + "/platform/hd/stgl/stxxgl/findflfgfj", {
|
||||
wjname: scope.row.wjname,
|
||||
id: scope.row.id,
|
||||
url: scope.row.wjurl
|
||||
}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.fileList = data.data;
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
$.post(base + "/platform/hd/stgl/stxxgl/findSt", {id: scope.row.id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.fzrOptions = [{id: data.data.st.fzr, display: data.data.st.display}];
|
||||
self.editFormData = data.data.st;
|
||||
self.editDialogVisible = true;
|
||||
|
||||
UM.delEditor('editlyEditor')
|
||||
UM.delEditor('editjsEditor')
|
||||
UM.delEditor('editzcEditor')
|
||||
|
||||
self.$nextTick(function () {
|
||||
//实例化编辑器
|
||||
editlyEditor = UM.getEditor('editlyEditor', {
|
||||
toolbar: ['removeformat | undo redo | bold italic underline | justifyleft justifyright justifycenter | insertorderedlist insertunorderedlist | cleardoc'],
|
||||
initialFrameWidth: '96%',//设置编辑器高度
|
||||
});
|
||||
editjsEditor = UM.getEditor('editjsEditor', {
|
||||
toolbar: ['removeformat | undo redo | bold italic underline | justifyleft justifyright justifycenter | insertorderedlist insertunorderedlist | cleardoc'],
|
||||
initialFrameWidth: '96%',//设置编辑器高度
|
||||
});
|
||||
editzcEditor = UM.getEditor('editzcEditor', {
|
||||
toolbar: ['removeformat | undo redo | bold italic underline | justifyleft justifyright justifycenter | insertorderedlist insertunorderedlist | cleardoc'],
|
||||
initialFrameWidth: '96%',//设置编辑器高度
|
||||
});
|
||||
|
||||
editlyEditor.ready(function () {
|
||||
if (data.data.st.sqly != "" && data.data.st.sqly != null) {
|
||||
editlyEditor.setContent(data.data.st.sqly);
|
||||
}
|
||||
});
|
||||
editjsEditor.ready(function () {
|
||||
if (data.data.st.stjs != "" && data.data.st.stjs != null) {
|
||||
editjsEditor.setContent(data.data.st.stjs);
|
||||
}
|
||||
});
|
||||
editzcEditor.ready(function () {
|
||||
if (data.data.st.stzc != "" && data.data.st.stzc != null) {
|
||||
editzcEditor.setContent(data.data.st.stzc);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
doEdit: function () {
|
||||
var self = this;
|
||||
self.$refs["editForm"].validate(function (valid) {
|
||||
if (valid) {
|
||||
var NewFormData = new FormData();
|
||||
NewFormData.append("id", self.stid);
|
||||
NewFormData.append("stmc", self.editFormData.stmc);
|
||||
NewFormData.append("cyrs", self.editFormData.cyrs);
|
||||
NewFormData.append("fzr", self.editFormData.fzr);
|
||||
NewFormData.append("unit", self.editFormData.unit);
|
||||
NewFormData.append("phone", self.editFormData.phone);
|
||||
NewFormData.append("email", self.editFormData.email);
|
||||
NewFormData.append("sqly", editlyEditor.getContent());
|
||||
NewFormData.append("stjs", editjsEditor.getContent());
|
||||
NewFormData.append("stzc", editzcEditor.getContent());
|
||||
|
||||
if (self.fileList != null && self.fileList.length > 0) {
|
||||
|
||||
if (self.fileList[0].uid != self.stid) {
|
||||
if (self.fileList[0].raw.name.split(".")[1] != "doc" && self.fileList[0].raw.name.split(".")[1] != "docx"
|
||||
&& self.fileList[0].raw.name.split(".")[1] != "pdf" && self.fileList[0].raw.name.split(".")[1] != "xls"
|
||||
&& self.fileList[0].raw.name.split(".")[1] != "xlsx"
|
||||
) {
|
||||
self.$message.warning("仅支持.pdf,.doc,.docx类型的文件上传!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
self.fileList.forEach(function (val) {
|
||||
if (self.fileid != "" && self.fileid != null && self.fileid != "undefined") {
|
||||
NewFormData.append("fileid", self.fileid);
|
||||
NewFormData.append("fileurl", self.fileurl);
|
||||
NewFormData.append("file", val.raw, val.raw.name);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: base + "/platform/hd/stgl/stxxgl/editDo",
|
||||
type: "post",
|
||||
data: NewFormData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
self.editDialogVisible = false;
|
||||
self.pageData();
|
||||
self.$message.success("操作成功!");
|
||||
}
|
||||
},
|
||||
error: function (data) {
|
||||
self.$message.error("应用程序出现异常!");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
self.$message.warning("请上传附件!");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/*查看*/
|
||||
openInfo: function (scope) {
|
||||
|
||||
var self = this;
|
||||
self.temp = scope.row;
|
||||
$.post(base + "/platform/hd/stgl/stxxgl/findById", {id: scope.row.id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.viewData = data.data.st;
|
||||
self.ryTableData = data.data.ry;
|
||||
self.infoDialogVisible = true;
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
|
||||
/*删除*/
|
||||
deleteDo: function (scope) {
|
||||
var self = this;
|
||||
if ('${@shiro.hasRole("sysadmin")}' == 'false' && scope.row.shjg == "1") {
|
||||
self.$alert("状态为审核通过不可进行删除!", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
});
|
||||
return;
|
||||
}
|
||||
self.$confirm("此操作将永久删除该协会, 是否继续?", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: function (a, b) {
|
||||
if ("confirm" == a) {
|
||||
$.post(base + "/platform/hd/stgl/stxxgl/deleteDo", {id: scope.row.id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.pageData();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleRemove: function (file, fileList) {
|
||||
var self = this;
|
||||
self.fileList = fileList;
|
||||
if (file.status == "success") {
|
||||
self.fileid = file.uid;
|
||||
self.fileurl = file.url;
|
||||
}
|
||||
/*self.formData.stmc = "";*/
|
||||
},
|
||||
handleChange: function (file, fileList) {
|
||||
var self = this;
|
||||
if (file.size == 0) {
|
||||
self.$message.warning("您选择的是空文件!");
|
||||
for (var i = 0; i < fileList.length; i++) {
|
||||
if (file == fileList[i]) {
|
||||
fileList.splice(i, 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/*self.formData.stmc = file.raw.name;*/
|
||||
}
|
||||
self.fileList = fileList;
|
||||
},
|
||||
handleExceed: function (file, fileList) {
|
||||
this.$message.warning("您只能上传一个文件!");
|
||||
},
|
||||
|
||||
jsstDo: function (scope) {
|
||||
var self = this;
|
||||
self.$confirm("您确定要解散此协会吗?", "温馨提示", {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: function (a, b) {
|
||||
if ("confirm" == a) {
|
||||
$.post(base + "/platform/hd/stgl/stxxgl/jsstDo", {id: scope.row.id}, function (data) {
|
||||
if (data.code == 0) {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
self.pageData();
|
||||
} else {
|
||||
self.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
created: function () {
|
||||
this.pageData();
|
||||
},
|
||||
watch: {},
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user