Files
UNION_HUTB/target/classes/views/platform/hd/stgl/stcyglindex.html
T
2026-09-09 09:14:28 +08:00

589 lines
25 KiB
HTML

<!--协会信息管理 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'">&emsp;</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>
<!--#
}
#-->