634 lines
27 KiB
HTML
634 lines
27 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
<style>
|
|
.tpa {
|
|
padding: 10px;
|
|
text-align: center;
|
|
width: 12%;
|
|
background-color: rgb(250, 250, 250);
|
|
border: 1px solid rgb(220, 220, 220);
|
|
}
|
|
|
|
.tpb {
|
|
padding: 10px;
|
|
text-align: center;
|
|
width: 16%;
|
|
border: 1px solid rgb(220, 220, 220);
|
|
}
|
|
|
|
input::-webkit-outer-spin-button,
|
|
input::-webkit-inner-spin-button {
|
|
-webkit-appearance: none;
|
|
}
|
|
|
|
input[type="number"] {
|
|
-moz-appearance: textfield;
|
|
}
|
|
|
|
.el-collapse-item__header {
|
|
background-color: #317fca;
|
|
color: whitesmoke;
|
|
padding-left: 10px;
|
|
height: 35px;
|
|
line-height: 35px;
|
|
font-size: 16px;
|
|
}
|
|
</style>
|
|
<div id="app" v-cloak>
|
|
<el-row class="header navbar bg-white shadow">
|
|
|
|
|
|
<div class="btn-group tool-button mt5">
|
|
<el-date-picker
|
|
v-model="pageForm.year"
|
|
type="year"
|
|
style="width: 100px"
|
|
:clearable="false"
|
|
value-format="yyyy"
|
|
@change="getJjrlp(pageForm.year)"
|
|
placeholder="年度">
|
|
</el-date-picker>
|
|
</div>
|
|
<div class="btn-group tool-button mt5">
|
|
<el-select clearable placeholder="福利项目" @change="change" filterable v-model="pageForm.lp"
|
|
style="width:250px">
|
|
<el-option v-for="lp in lplist" :value="lp.lp_id" :label="lp.lp_ms"></el-option>
|
|
</el-select>
|
|
</div>
|
|
<!-- <div class="btn-group tool-button mt5">-->
|
|
<!-- <el-select clearable placeholder="基层工会"-->
|
|
<!-- @change="getFghBydw(pageForm.fgh);getJjrlp(pageForm.year,pageForm.fgh)" filterable-->
|
|
<!-- v-model="pageForm.fgh" style="width:180px">-->
|
|
<!-- <el-option v-for="dw in fghlist" :value="dw.unionname" :label="dw.unionname"></el-option>-->
|
|
<!-- </el-select>-->
|
|
<!-- </div>-->
|
|
<div class="btn-group tool-button mt5">
|
|
<el-select clearable placeholder="单位名称" filterable v-model="pageForm.ejdw" style="width:210px">
|
|
<el-option v-for="dw in dwlist" :value="dw.name" :label="dw.name"></el-option>
|
|
</el-select>
|
|
</div>
|
|
<div class="btn-group tool-button mt5">
|
|
<el-input type="text" v-model="pageForm.searchName" placeholder="请输入" style="width: 230px"
|
|
class="input-with-select">
|
|
<el-select style="width: 80px" v-model="pageForm.searchKey" slot="prepend" placeholder="请选择">
|
|
<el-option label="工号" value="loginname"></el-option>
|
|
<el-option label="姓名" value="username"></el-option>
|
|
</el-select>
|
|
</el-input>
|
|
</div>
|
|
<!-- <div class="btn-group tool-button mt5">-->
|
|
<!-- <el-select clearable v-model="pageForm.flhy" style="width: 130px" slot="prepend" placeholder="福利会员">-->
|
|
<!-- <el-option value="1" label="有效会员"></el-option>-->
|
|
<!-- <el-option value="0" label="无效会员"></el-option>-->
|
|
<!-- </el-select>-->
|
|
<!-- </div>-->
|
|
<div class="btn-group tool-button mt5">
|
|
<el-select v-model="pageForm.rylx" style="width: 100%" filterable clearable placeholder="人员类型">
|
|
<el-option
|
|
label="在编" value="在编">
|
|
</el-option>
|
|
<el-option
|
|
label="非编" value="非编">
|
|
</el-option>
|
|
<el-option
|
|
label="离退休" value="离退休">
|
|
</el-option>
|
|
</el-select>
|
|
</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">
|
|
新增
|
|
</el-button>
|
|
<el-button size="medium" @click="doAllDel">
|
|
批量删除
|
|
</el-button>
|
|
</div>
|
|
</el-row>
|
|
|
|
|
|
<el-row class="el-table-container">
|
|
<el-table :data="tableData" @sort-change="changeTableSort" size="small">
|
|
<el-table-column label="序号" type="index" header-align="center" align="center">
|
|
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="工号" prop="loginname" header-align="center" align="center"></el-table-column>
|
|
<el-table-column label="姓名" prop="username" header-align="center" align="center"></el-table-column>
|
|
<el-table-column label="单位" sortable prop="ejdw" width="220px" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="福利单位" sortable prop="fgh" width="220px" header-align="center"
|
|
align="center"></el-table-column>
|
|
<el-table-column label="人员类型" sortable prop="rylx" header-align="center" align="center">
|
|
</el-table-column>
|
|
<el-table-column label="状态" sortable prop="ryzt" header-align="center" align="center">
|
|
<template scope="scope">
|
|
<span v-if="scope.row.ryzt==1">待审核</span>
|
|
<span v-if="scope.row.ryzt==2">拒绝</span>
|
|
<span v-if="scope.row.ryzt==3">通过</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="是否签收" sortable prop="sfqs" header-align="center" align="center">
|
|
<template scope="scope">
|
|
<span style="color: #67C23A" v-if="scope.row.sfqs==1">已签收</span>
|
|
<span style="color: #909399" v-else>未签收</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" header-align="center" align="center" width="300">
|
|
<template slot-scope="scope">
|
|
<el-button size="mini" @click="see(scope.row)">查看</el-button>
|
|
<el-button size="mini" type="primary" @click="openEdit(scope.row)">编辑</el-button>
|
|
<el-button size="mini" type="danger" @click="doDel(scope.row.id)">删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-row>
|
|
|
|
<el-row class="el-pagination-container">
|
|
<el-pagination
|
|
@current-change="pageNumberChange"
|
|
:current-page="pageForm.pageNumber"
|
|
layout="total, prev, pager, next, jumper"
|
|
:total="pageForm.totalCount">
|
|
</el-pagination>
|
|
</el-row>
|
|
|
|
|
|
<el-dialog
|
|
title="福利人员信息"
|
|
:visible.sync="viewDialogVisible"
|
|
width="50%">
|
|
<el-collapse v-model="activeNames">
|
|
<el-collapse-item title="基本信息" name="1">
|
|
<div>
|
|
<table style="width: 100%">
|
|
<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.loginname}}</td>
|
|
|
|
</tr>
|
|
<tr style="border: 1px solid rgb(220,220,220);">
|
|
<td class="tpa">单位</td>
|
|
<td class="tpb">{{viewData.name}}</td>
|
|
<td class="tpa">联系电话</td>
|
|
<td class="tpb">{{viewData.mobile}}</td>
|
|
</tr>
|
|
|
|
<tr style="border: 1px solid rgb(220,220,220);">
|
|
<td class="tpa">福利会员</td>
|
|
<td class="tpb">
|
|
<span v-if="viewData.flhy==1">有效会员</span>
|
|
<span v-if="viewData.flhy==0">无效会员</span>
|
|
<!--<span v-if="viewData.jflx==3">自筹经费</span>-->
|
|
</td>
|
|
<td class="tpa">人员类型</td>
|
|
<td class="tpb">{{viewData.rylx}}</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
</el-collapse-item>
|
|
</el-collapse>
|
|
</el-dialog>
|
|
|
|
<!-- 编辑人员 -->
|
|
<el-dialog
|
|
title="编辑"
|
|
top="15px"
|
|
:close-on-click-modal="false"
|
|
:visible.sync="editDialogVisible"
|
|
width="50%">
|
|
<el-form :model="EditFormData" :rules="rules" ref="editForm" label-width="100px">
|
|
<div>
|
|
<div>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="工号" prop="loginname">
|
|
<el-input clearable v-model="EditFormData.loginname"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="姓名" prop="username">
|
|
<el-input clearable v-model="EditFormData.username"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="福利单位" prop="fgh">
|
|
<el-select clearable v-model="EditFormData.fgh" @change="getFghBydw(EditFormData.fgh)"
|
|
style="width: 100%">
|
|
<el-option v-for="dw in fghlist" :value="dw.welfare_unit_name"
|
|
:label="dw.welfare_unit_name"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="单位" prop="ejdw">
|
|
<el-select clearable v-model="EditFormData.ejdw" style="width: 100%">
|
|
<el-option v-for="dw in dwlist" :value="dw.name" :label="dw.name"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="人员类型" prop="rylx">
|
|
<el-select clearable v-model="EditFormData.rylx" style="width: 100%">
|
|
<el-option
|
|
label="在编" value="在编">
|
|
</el-option>
|
|
<el-option
|
|
label="非编" value="非编">
|
|
</el-option>
|
|
<el-option
|
|
label="离退休" value="离退休">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
</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="新增"
|
|
top="15px"
|
|
:close-on-click-modal="false"
|
|
:visible.sync="addDialogVisible"
|
|
width="50%">
|
|
<el-form :model="AddFormData" :rules="rules" ref="addForm" label-width="100px">
|
|
<div>
|
|
<div>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="工号">
|
|
<el-input clearable v-model="AddFormData.loginname"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="姓名" prop="username">
|
|
<el-input clearable v-model="AddFormData.username"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="福利单位" prop="fgh">
|
|
<el-select clearable v-model="AddFormData.fgh" @change="getFghBydw(AddFormData.fgh)"
|
|
style="width: 100%">
|
|
<el-option v-for="dw in fghlist" :value="dw.welfare_unit_name"
|
|
:label="dw.welfare_unit_name"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="单位" prop="ejdw">
|
|
<el-select clearable v-model="AddFormData.ejdw" style="width: 100%"
|
|
@change="unitChange">
|
|
<el-option v-for="dw in dwlist" :value="dw.name" :label="dw.name"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-form-item label="人员类型" prop="rylx">
|
|
<el-select clearable v-model="AddFormData.rylx" style="width: 100%">
|
|
<el-option
|
|
label="在编" value="在编">
|
|
</el-option>
|
|
<el-option
|
|
label="非编" value="非编">
|
|
</el-option>
|
|
<el-option
|
|
label="离退休" value="离退休">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
</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>
|
|
|
|
|
|
</div>
|
|
<script>
|
|
const vue = new Vue({
|
|
el: "#app",
|
|
data: function () {
|
|
|
|
return {
|
|
viewData: {},
|
|
viewDialogVisible: false,
|
|
activeNames: ["1"],
|
|
addDialogVisible: false,
|
|
AddFormData: {},
|
|
editDialogVisible: false,
|
|
EditFormData: {},
|
|
pageForm: {
|
|
pageNumber: 1,
|
|
pageSize: 10,
|
|
totalCount: 0,
|
|
searchName: "",
|
|
year: moment().format('YYYY'),
|
|
sfhz: "",
|
|
searchKey: "username",
|
|
jflx: "",
|
|
rylx: "",
|
|
fgh: "",
|
|
prop: "",
|
|
order: "",
|
|
ejdw: "",
|
|
newhy: "",
|
|
flhy: ""
|
|
},
|
|
tableData: [],
|
|
multipleTable: [],
|
|
drDialogVisible: false,
|
|
fileList: [],
|
|
rows: [],
|
|
hzlist: [],
|
|
year: "",
|
|
dwlist: [],
|
|
rules: {
|
|
username: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
|
loginname: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
unitid: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
jflx: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
rylx: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
unionid: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
year: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
yf: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
order: "",
|
|
prop: "",
|
|
},
|
|
drDialogVisible: false,
|
|
fileList: [],
|
|
year: "",
|
|
yf: "",
|
|
fghlist: [],
|
|
dw: [],
|
|
lp: "",
|
|
lplist: []
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
doSearch: function () {
|
|
this.pageForm.pageNumber = 1;
|
|
this.pageForm.newhy = "";
|
|
this.pageData();
|
|
},
|
|
pageData: function () {
|
|
var self = this;
|
|
$.post(base + "/platform/zgfw/flhy/data", self.pageForm, function (data) {
|
|
if (data.code === 0) {
|
|
self.tableData = data.data.list;
|
|
self.pageForm.totalCount = data.data.totalCount;
|
|
|
|
} else {
|
|
self.$message.error(data.msg);
|
|
}
|
|
});
|
|
},
|
|
pageNumberChange: function (val) {
|
|
this.pageForm.pageNumber = val;
|
|
this.pageData();
|
|
},
|
|
openAdd: function () {
|
|
var self = this;
|
|
self.addDialogVisible = true;
|
|
self.AddFormData = {jflx: '2', year: self.pageForm.year, lpid: self.pageForm.lp};
|
|
if (this.$refs["addForm"])
|
|
this.$refs["addForm"].resetFields();
|
|
},
|
|
async getDw() {
|
|
this.dwlist = await getUnits();
|
|
},
|
|
async getFgh() {
|
|
this.fghlist = await getWelfareUnits();
|
|
},
|
|
unitChange(unitName) {
|
|
let un = this.dwlist.find(v => v.name == unitName)
|
|
this.$set(this.AddFormData, "unit_id", un.id);
|
|
},
|
|
async getFghBydw(welfare_unit_name) {
|
|
let wu = this.fghlist.find(v => v.welfare_unit_name == welfare_unit_name)
|
|
|
|
this.$set(this.AddFormData, "ejdw", "");
|
|
this.$set(this.AddFormData, "union_id", wu.id);
|
|
this.$set(this.EditFormData, "ejdw", "");
|
|
this.$set(this.EditFormData, "union_id", wu.id);
|
|
|
|
if (wu) {
|
|
this.dwlist = await getUnitsByWelfareUnit(wu.id)
|
|
}
|
|
},
|
|
doAdd: function () {
|
|
var self = this;
|
|
this.$refs["addForm"].validate((valid) => {
|
|
if (valid) {
|
|
$.post(base + "/platform/zgfw/flhy/doAdd", self.AddFormData, function (data) {
|
|
if (data.code == 0) {
|
|
self.$message({
|
|
message: data.msg,
|
|
type: 'success'
|
|
});
|
|
self.doSearch();//查询是带条件的,加载新建用户选择的单位用户数据
|
|
self.addDialogVisible = false;
|
|
} else {
|
|
self.$message({
|
|
message: data.msg,
|
|
type: 'error'
|
|
});
|
|
}
|
|
})
|
|
}
|
|
})
|
|
|
|
},
|
|
see: function (scope) {
|
|
var self = this;
|
|
self.viewData = scope;
|
|
self.viewDialogVisible = true;
|
|
},
|
|
openEdit: function (scope) {
|
|
var self = this;
|
|
self.EditFormData = JSON.parse(JSON.stringify(scope));
|
|
self.editDialogVisible = true;
|
|
if (this.$refs["editForm"])
|
|
this.$refs["editForm"].resetFields();
|
|
},
|
|
doEdit: function () {
|
|
var self = this;
|
|
this.$refs["editForm"].validate((valid) => {
|
|
if (valid) {
|
|
$.post(base + "/platform/zgfw/flhy/doEdit", self.EditFormData, function (data) {
|
|
if (data.code == 0) {
|
|
self.$message({
|
|
message: data.msg,
|
|
type: 'success'
|
|
});
|
|
self.doSearch();//查询是带条件的,加载新建用户选择的单位用户数据
|
|
self.editDialogVisible = false;
|
|
} else {
|
|
self.$message({
|
|
message: data.msg,
|
|
type: 'error'
|
|
});
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
doDel: function (id) {
|
|
var self = this;
|
|
self.$confirm('此操作将删除这条数据,确定吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
callback: function (a, b) {
|
|
if ("confirm" == a) {//确认后再执行
|
|
$.post(base + "/platform/zgfw/flhy/doDel", {id: id}, function (data) {
|
|
if (data.code == 0) {
|
|
self.$message({
|
|
message: data.msg,
|
|
type: 'success'
|
|
});
|
|
self.doSearch();
|
|
} else {
|
|
self.$message({
|
|
message: data.msg,
|
|
type: 'error'
|
|
});
|
|
}
|
|
}, "json");
|
|
}
|
|
}
|
|
});
|
|
},
|
|
opendr: function () {
|
|
var self = this;
|
|
self.fileList = [];
|
|
self.year = "";
|
|
self.drDialogVisible = true;
|
|
},
|
|
alldel: function () {
|
|
var self = this;
|
|
self.$confirm('此操作将删除当前所选数据,确定吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
callback: function (a, b) {
|
|
if ("confirm" == a) {//确认后再执行
|
|
$.post(base + "/platform/zgfw/mddr/allDel", self.pageForm, function (data) {
|
|
if (data.code == 0) {
|
|
self.$message({
|
|
message: data.msg,
|
|
type: 'success'
|
|
});
|
|
self.doSearch();
|
|
} else {
|
|
self.$message({
|
|
message: data.msg,
|
|
type: 'error'
|
|
});
|
|
}
|
|
}, "json");
|
|
}
|
|
}
|
|
});
|
|
},
|
|
changeTableSort: function (column) {
|
|
var self = this;
|
|
self.pageForm.prop = column.prop;
|
|
self.pageForm.order = column.order;
|
|
self.pageData();
|
|
},
|
|
getJjrlp: function (year, id) {
|
|
var self = this;
|
|
$.post(base + "/platform/zgfw/mdgl/getJjrlp", {year: year, id: id}, function (data) {
|
|
self.lplist = data.data;
|
|
if (self.lplist.length > 0) {
|
|
self.pageForm.lp = self.lplist[0].lp_id
|
|
}
|
|
if (id == null || id == "") {
|
|
self.pageData();
|
|
}
|
|
|
|
})
|
|
},
|
|
change: function () {
|
|
this.$forceUpdate()
|
|
},
|
|
doAllDel: function () {
|
|
var self = this;
|
|
self.$confirm('此操作将删除当前福利项目下所以数据,确定吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
callback: function (a, b) {
|
|
if ("confirm" == a) {//确认后再执行
|
|
$.post(base + "/platform/zgfw/flhy/doAllDel", {lpid: self.pageForm.lp}, 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.getJjrlp(this.pageForm.year, "");
|
|
this.getDw();
|
|
this.getFgh();
|
|
|
|
}
|
|
});
|
|
</script>
|
|
<!--#
|
|
}
|
|
#--> |