缴费
This commit is contained in:
+24
@@ -1,14 +1,21 @@
|
||||
package io.v.nutz.zhgh.memberCost.controller.payment;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.zhgh.memberCost.model.MemberPaymentConfig;
|
||||
import io.v.nutz.zhgh.memberCost.service.MemberPaymentService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
|
||||
@IocBean
|
||||
@@ -26,6 +33,23 @@ public class MemberPaymentConfigController {
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("member.payment.config")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "name", required = false) String name) {
|
||||
Sql sql = Sqls.create("select * from member_payment_config $condition");
|
||||
CndPlus cnd = CndPlus.create();
|
||||
|
||||
if (Strings.isNotBlank(name)) {
|
||||
cnd.and(Cnd.likeEX("name", name));
|
||||
}
|
||||
// cnd.desc("project.`year`");
|
||||
cnd.desc("createdAt");
|
||||
sql.setCondition(cnd);
|
||||
return memberPaymentService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getPaymentConfig(){
|
||||
|
||||
+11
-24
@@ -23,9 +23,7 @@ import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
@@ -43,22 +41,22 @@ import java.util.stream.Collectors;
|
||||
@IocBean
|
||||
@Slf4j
|
||||
@Ok("json:full")
|
||||
@At("/platform/member/payment/manage")
|
||||
public class MemberPaymentManageController {
|
||||
@At("/platform/member/payment/project")
|
||||
public class MemberPaymentProjectController {
|
||||
|
||||
@Inject
|
||||
private MemberPaymentService memberPaymentService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/memberCost/payment/manage.html")
|
||||
@RequiresPermissions("member.payment.manage")
|
||||
@Ok("beetl:/platform/memberCost/payment/project.html")
|
||||
@RequiresPermissions("member.payment.project")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("member.payment.manage")
|
||||
@RequiresPermissions("member.payment.project")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "year", required = false) String year,
|
||||
@Param(value = "projectName", required = false) String projectName) {
|
||||
@@ -83,7 +81,7 @@ public class MemberPaymentManageController {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("member.payment.manage")
|
||||
@RequiresPermissions("member.payment.project")
|
||||
public Object openClosedProject(String id) {
|
||||
//位运算 取反
|
||||
memberPaymentService.dao().update(MemberPaymentProject.class,
|
||||
@@ -101,7 +99,7 @@ public class MemberPaymentManageController {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("member.payment.manage")
|
||||
@RequiresPermissions("member.payment.project")
|
||||
public Object doSave(MemberPaymentProject paymentProject) {
|
||||
memberPaymentService.insertOrUpdate(paymentProject);
|
||||
return null;
|
||||
@@ -117,7 +115,7 @@ public class MemberPaymentManageController {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("member.payment.manage")
|
||||
@RequiresPermissions("member.payment.project")
|
||||
public Object doSetPayment(String id, Boolean isRenew) {
|
||||
//如果不是更新缴费人员,就删除该项目下的所有待缴费信息,再重新设置
|
||||
if (!isRenew) {
|
||||
@@ -143,7 +141,7 @@ public class MemberPaymentManageController {
|
||||
//获取缴费项目
|
||||
MemberPaymentProject project = memberPaymentService.dao().fetch(MemberPaymentProject.class, id);
|
||||
//该项目的缴费月份是几月到几月,转为数组,判断新入职教工应缴费几个月
|
||||
String[] strings = project.getPaymentMonth().substring(0, project.getPaymentMonth().length() - 1).split("-");
|
||||
String[] strings = project.getPaymentStartMonth().substring(0, project.getPaymentStartMonth().length() - 1).split("-");
|
||||
DateTime beginDate = DateUtil.parse(project.getYear() + "-" + strings[0] + "-01");
|
||||
//获取月份的最后一天
|
||||
DateTime endDate = DateUtil.endOfMonth(DateUtil.parse(project.getYear() + "-" + strings[1] + "-01"));
|
||||
@@ -205,7 +203,7 @@ public class MemberPaymentManageController {
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@RequiresPermissions("member.payment.manage")
|
||||
@RequiresPermissions("member.payment.project")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doRemove(String id) {
|
||||
int paymentCount = memberPaymentService.count(Cnd.where("paymentProjectId", "=", id).and("isPayment", "=", 1));
|
||||
@@ -226,7 +224,7 @@ public class MemberPaymentManageController {
|
||||
*/
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("member.payment.manage")
|
||||
@RequiresPermissions("member.payment.project")
|
||||
public Object getAllProject(String year) {
|
||||
CndPlus cnd = CndPlus.create();
|
||||
cnd.and("isDisabled", "=", 0);
|
||||
@@ -246,16 +244,5 @@ public class MemberPaymentManageController {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("member.payment.manage")
|
||||
public Object isMonthCreatedByYear(@Param("year") String year, @Param("monthSelect") String monthSelect, @Param("id") String projectId) {
|
||||
List<NutMap> nutMapList = Json.fromJsonAsList(NutMap.class, monthSelect);
|
||||
for (NutMap nutMap : nutMapList) {
|
||||
int count = memberPaymentService.dao().count(MemberPaymentProject.class, Cnd.where("`year`", "=", year).and("paymentMonth", "=", nutMap.getString("label")));
|
||||
nutMap.setv("code", count > 0 ? 1 : 0);
|
||||
}
|
||||
return nutMapList;
|
||||
}
|
||||
|
||||
}
|
||||
+16
-5
@@ -75,7 +75,7 @@ public class MemberPaymentSummaryController {
|
||||
public Sql dataSql(String pageOrderName, String pageOrderBy, String searchName, String searchKeyword,
|
||||
String unionId, String unitId, String threeUnitId, String unionGroupId,
|
||||
String personType, String userState, String paymentProjectId, String year,
|
||||
String isPay) {
|
||||
String isPay,String schoolTime,String retireDate) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
mpi.*,
|
||||
@@ -95,7 +95,12 @@ public class MemberPaymentSummaryController {
|
||||
u.threeUnitCode,
|
||||
u.unionGroupName,
|
||||
u.mobile,
|
||||
u.birthday
|
||||
u.birthday,
|
||||
u.schoolTime,
|
||||
u.retireDate,
|
||||
u.workDate,
|
||||
startSalaryDate,
|
||||
renewTime
|
||||
FROM
|
||||
`member_payment_info` mpi
|
||||
LEFT JOIN `user` u ON u.id = mpi.userId
|
||||
@@ -124,6 +129,8 @@ public class MemberPaymentSummaryController {
|
||||
cnd.andEX("u.unionGroupId", "=", unionGroupId);
|
||||
cnd.andEX("u.personType", "=", personType);
|
||||
cnd.andEX("u.userState", "=", userState);
|
||||
cnd.andEX("u.schoolTime", "=", schoolTime);
|
||||
cnd.andEX("u.retireDate", "=", retireDate);
|
||||
cnd.groupBy("u.id");
|
||||
|
||||
if (StrUtil.isNotBlank(pageOrderName) && StrUtil.isNotBlank(pageOrderBy)) {
|
||||
@@ -150,10 +157,12 @@ public class MemberPaymentSummaryController {
|
||||
@Param(value = "userState", required = false) String userState,
|
||||
@Param(value = "paymentProjectId", required = false) String paymentProjectId,
|
||||
@Param(value = "year", required = false) String year,
|
||||
@Param(value = "isPay", required = false) String isPay) {
|
||||
@Param(value = "isPay", required = false) String isPay,
|
||||
@Param(value = "schoolTime", required = false) String schoolTime,
|
||||
@Param(value = "retireDate", required = false) String retireDate) {
|
||||
Sql sql = this.dataSql(pageForm.getPageOrderName(), pageForm.getPageOrderBy(), pageForm.getSearchName(),
|
||||
pageForm.getSearchKeyword(), unionId, unitId, threeUnitId, unionGroupId,
|
||||
personType, userState, paymentProjectId, year, isPay);
|
||||
personType, userState, paymentProjectId, year, isPay,schoolTime,retireDate);
|
||||
return memberPaymentService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@@ -285,9 +294,11 @@ public class MemberPaymentSummaryController {
|
||||
@Param(value = "paymentProjectId", required = false) String paymentProjectId,
|
||||
@Param(value = "year", required = false) String year,
|
||||
@Param(value = "isPay", required = false) String isPay,
|
||||
@Param(value = "isPay", required = false) String schoolTime,
|
||||
@Param(value = "isPay", required = false) String retireDate,
|
||||
boolean isZip, HttpServletResponse response) {
|
||||
Sql sql = this.dataSql(null, null, searchName, searchKeyword, unionId, unitId, threeUnitId,
|
||||
unionGroupId, personType, userState, paymentProjectId, year, isPay);
|
||||
unionGroupId, personType, userState, paymentProjectId, year, isPay,schoolTime,retireDate);
|
||||
|
||||
List<NutMap> list = memberPaymentService.listMap(sql);
|
||||
NutMap nutMap = list.stream().findFirst().orElse(null);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.v.nutz.zhgh.memberCost.model;
|
||||
|
||||
import io.v.nutz.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
@@ -10,7 +11,7 @@ import java.util.List;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
public class MemberPaymentConfig {
|
||||
public class MemberPaymentConfig extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@@ -19,6 +20,11 @@ public class MemberPaymentConfig {
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("缴费配置名称")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 50)
|
||||
private String name;
|
||||
|
||||
@Column
|
||||
@Comment("缴费标准")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
@@ -39,6 +45,10 @@ public class MemberPaymentConfig {
|
||||
@ColDefine(type = ColType.VARCHAR,width = 10)
|
||||
private String paidDuration;
|
||||
|
||||
@Column
|
||||
@Comment("是否开启")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private boolean isDisabled;
|
||||
|
||||
@Data
|
||||
public static class PayStandards implements Serializable {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.v.nutz.zhgh.memberCost.model;
|
||||
|
||||
import io.v.nutz.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
@@ -8,7 +9,7 @@ import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table
|
||||
public class MemberPaymentProject {
|
||||
public class MemberPaymentProject extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@@ -39,7 +40,22 @@ public class MemberPaymentProject {
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("缴费月份")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String paymentMonth;
|
||||
@Comment("开始缴费月份")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String paymentStartMonth;
|
||||
|
||||
@Column
|
||||
@Comment("结束缴费月份")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String paymentEndMonth;
|
||||
|
||||
@Column
|
||||
@Comment("开始缴费时间")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
private String startTime;
|
||||
|
||||
@Column
|
||||
@Comment("结束缴费时间")
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
private String endTime;
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ layout("/layouts/platform.html"){
|
||||
style="width: 100%" v-model="pageForm.searchKeyword">
|
||||
<el-select slot="prepend" style="width: 80px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="姓名" value="u.username"></el-option>
|
||||
<el-option label="工号" value="u.loginname"></el-option>
|
||||
<el-option label="姓名" value="hcu.username"></el-option>
|
||||
<el-option label="工号" value="hcu.loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
@@ -217,7 +217,7 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
searchName: "u.username",
|
||||
searchName: "hcu.username",
|
||||
},
|
||||
threeUnits: [],
|
||||
unionGroups: [],
|
||||
|
||||
@@ -10,14 +10,103 @@ layout("/layouts/platform.html"){
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<h3 style="color: rgb(24, 103, 176);font-family: Microsoft YaHei;">缴费配置</h3>
|
||||
</div>
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">缴费配置:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.projectName">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="缴费配置列表">
|
||||
<template #func>
|
||||
<el-button @click="openAdd" size="small" type="primary">
|
||||
新增缴费配置
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize"
|
||||
@sort-change="pageOrder"
|
||||
class="vi-table"
|
||||
ref="table" row-key="id" style="width: 100%"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop==='isDisabled'">
|
||||
<el-switch
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
@change="(val)=>{projectStatusChange(row.id)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作"
|
||||
width="100px">
|
||||
<template scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button :loading="submitLoading" plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'remove',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
<template #view>
|
||||
|
||||
|
||||
<el-form :model="formData" ref="addForm" :rules="rules"
|
||||
label-width="120px"
|
||||
style="margin: 10px 0 0 0">
|
||||
<vi-title title="缴费配置"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="配置名称" prop="paidDuration">
|
||||
<el-input v-model="formData.paidDuration"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title title="缴纳标准"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
@@ -39,43 +128,62 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item :prop="'payStandards.'+$index+'.payPersonnel'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="100" placeholder="请输入缴费人员"
|
||||
v-model="row.payPersonnel"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="缴费模式" prop="payMode" width="200">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item :prop="'payStandards.'+$index+'.payMode'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-select placeholder="请选择缴费模式" v-model="row.payMode"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in payModeList" :label="item.value" :value="item.code"></el-option>
|
||||
<!-- <el-input clearable maxlength="100" placeholder="请输入缴费人员"
|
||||
v-model="row.payPersonnel"></el-input>-->
|
||||
<el-select placeholder="请选择人员类型" v-model="row.payPersonnel"
|
||||
style="width: 100%" clearable>
|
||||
<el-option v-for="item in memberTypeList" :label="item.name" :value="item.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人员类型" prop="personTypes" width="300">
|
||||
<el-table-column label="人员类型" prop="personType" >
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-select multiple placeholder="请选择人员类型" v-model="row.personTypes"
|
||||
style="width: 100%" clearable>
|
||||
<el-select @change="row.payMode=null" placeholder="请选择人员类型" v-model="row.personType"
|
||||
style="width: 100%" clearable>
|
||||
<el-option v-for="item in personTypeList" :label="item.name" :value="item.code"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="缴费标准" prop="payModeValue">
|
||||
<el-table-column label="缴费模式" prop="payMode" >
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item :prop="'payStandards.'+$index+'.payMode'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-select placeholder="请选择缴费模式" v-model="row.payMode"
|
||||
style="width: 100%">
|
||||
<el-option :disabled="row.personType!='非编'" label="固定金额缴纳" value="1"></el-option>
|
||||
<el-option :disabled="row.personType!='在编'" label="按比例缴纳" value="2"></el-option>
|
||||
<el-option label="导入" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="在职状态" prop="userState" >
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-select placeholder="请选择在职状态" v-model="row.userState"
|
||||
style="width: 100%" clearable>
|
||||
<el-option v-for="item in userStateList" :label="item.name" :value="item.code"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="缴费标准" prop="payModeValue" width="650">
|
||||
<template scope="{row,$index}">
|
||||
|
||||
<div v-if="row.payMode=='2'">
|
||||
<el-form-item :prop="'payStandards.'+$index+'.payModeValueList'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<div style="display:flex;justify-content: space-between;margin-left: 30px">
|
||||
<div style="display:flex;justify-content: space-between;margin-left: 30px">
|
||||
(
|
||||
<template v-for="(o,i) in row.payModeValueList">
|
||||
<el-input placeholder="请输入" style="width: 120px;"
|
||||
v-model="o.name">
|
||||
<template v-for="(o,i) in row.payModeValueList" >
|
||||
<el-input maxlength="5" placeholder="" style="width: 200px;"
|
||||
v-model="o.value">
|
||||
<el-select style="width: 105px;" v-model="o.name" slot="prepend" placeholder="请选择">
|
||||
<el-option label="岗位工资" value="1"></el-option>
|
||||
<el-option label="薪级工资" value="2"></el-option>
|
||||
</el-select>
|
||||
<el-button @click="row.payModeValueList.splice(i, 1)" slot="append" style="padding: 0 7px;"
|
||||
icon="el-icon-circle-close"></el-button>
|
||||
</el-input>
|
||||
@@ -96,7 +204,7 @@ layout("/layouts/platform.html"){
|
||||
label-width="0">
|
||||
|
||||
<div v-if="row.payMode == '1'">
|
||||
<el-input clearable maxlength="100" type="number" placeholder="请输入缴费金额"
|
||||
<el-input clearable maxlength="5" type="number" placeholder="请输入缴费金额"
|
||||
v-model="row.payModeValue"></el-input>
|
||||
</div>
|
||||
<div v-if="row.payMode == '3'" style="text-align: center">
|
||||
@@ -125,7 +233,7 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title title="退会标准"></vi-title>
|
||||
<!-- <vi-title title="退会标准"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="未缴费退会时间" prop="unPaidExitDuration">
|
||||
@@ -161,17 +269,17 @@ layout("/layouts/platform.html"){
|
||||
<div style="margin-top: 10px">
|
||||
<span style="color: red">说明:多长时间缴费一次。</span>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-row>-->
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt10" justify="center" type="flex">
|
||||
<el-button @click="doSubmit" style="width: 300px" type="primary">保存
|
||||
<div>
|
||||
<el-button @click="doSubmit" v-if="isSubmit" v-loading="submitLoading" style="float: right"
|
||||
type="primary">
|
||||
提交
|
||||
</el-button>
|
||||
<el-button @click="doSubmit" style="width: 300px" type="primary">提交
|
||||
</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
@@ -183,15 +291,30 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
payModeList:[{code:'1',value:'固定金额缴纳'},{code:'2',value:'按比例缴纳'},{code:'3',value:'导入'}],
|
||||
formData: {
|
||||
payStandards: [{payPersonnel: null, payMode: '1', personTypes: null, payModeValue: null,payModeValueList:[{name:'',value:''}]}]
|
||||
payStandards: [{payPersonnel: null, payMode: null, personTypes: null, payModeValue: null,payModeValueList:[{name:'',value:''}]}]
|
||||
},
|
||||
rules: {
|
||||
exit: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
personTypeList:[],
|
||||
userStateList:[],
|
||||
memberTypeList:[],
|
||||
pageForm:{},
|
||||
tableData:[],
|
||||
tableColumns:[
|
||||
{prop: 'name', label: '配置名称'},
|
||||
{prop: 'unPaidExitDuration', label: '未缴费退会时长'},
|
||||
{prop: 'exitMode', label: '退会模式'},
|
||||
{prop: 'paidDuration', label: '缴费时长'},
|
||||
{prop: 'isDisabled', label: '开启状态'},
|
||||
],
|
||||
isSubmit: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd(){
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
async doSubmit(){
|
||||
const formData = clone(this.formData)
|
||||
formData.payStandards = JSON.stringify(this.formData.payStandards)
|
||||
@@ -216,8 +339,13 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
this.personTypeList = await getDictOptions('UserType')
|
||||
await this.getPaymentConfig()
|
||||
//在职状态
|
||||
this.userStateList = await getDictOptions('UserState')
|
||||
//会员类型
|
||||
this.memberTypeList = await getDictOptions('memberType')
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+43
-47
@@ -83,6 +83,9 @@ layout("/layouts/platform.html"){
|
||||
v-model="row.isDisabled">
|
||||
</el-switch>
|
||||
</template>
|
||||
<template scope="{row}" v-if="column.prop==='paymentMonth'">
|
||||
<span>{{row.paymentStartMonth}} 至 {{row.paymentEndMonth}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
@@ -132,20 +135,19 @@ layout("/layouts/platform.html"){
|
||||
<el-input maxlength="100" placeholder="项目名称" v-model="formData.projectName"></el-input>
|
||||
</el-form-item>
|
||||
<el-row :gutter="20">
|
||||
<el-col span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="缴费年度" prop="year">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
placeholder="选择年度"
|
||||
type="year" style="width: 100%"
|
||||
v-model="formData.year"
|
||||
@change="isMonthCreatedByYear"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="创建日期" prop="createTime">
|
||||
<el-date-picker
|
||||
placeholder="创建日期"
|
||||
@@ -160,12 +162,34 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="缴费月份" prop="paymentMonth" size="medium">
|
||||
<el-radio-group v-model="formData.paymentMonth">
|
||||
<!--<el-radio-group v-model="formData.paymentMonth">
|
||||
<el-radio-button v-for="item in monthSelect" :label="item.label"
|
||||
:disabled="item.code===1"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-radio-group>-->
|
||||
<el-date-picker
|
||||
v-model="formData.paymentMonth"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="缴费时间" prop="paymentTime" size="medium">
|
||||
<el-date-picker
|
||||
v-model="formData.paymentTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
style="width: 100%"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -196,6 +220,9 @@ layout("/layouts/platform.html"){
|
||||
tableColumns: [
|
||||
{prop: 'year', label: '年度', sortable: true},
|
||||
{prop: 'projectName', label: '项目名称', sortable: true},
|
||||
{prop: 'paymentMonth', label: '缴费月份', sortable: true},
|
||||
{prop: 'startTime', label: '缴费开始时间', sortable: true},
|
||||
{prop: 'endTime', label: '缴费截止时间', sortable: true},
|
||||
{prop: 'createTime', label: '创建时间', sortable: true},
|
||||
{prop: 'isDisabled', label: '开启状态'},
|
||||
],
|
||||
@@ -206,6 +233,7 @@ layout("/layouts/platform.html"){
|
||||
projectName: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
year: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
paymentMonth: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
paymentTime: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
paymentConfig: {},
|
||||
monthSelect: []
|
||||
@@ -243,7 +271,11 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
openEdit(data) {
|
||||
this.formData = {}
|
||||
this.formData = {...data}
|
||||
this.formData = {
|
||||
...data,
|
||||
paymentMonth:[data.paymentStartMonth, data.paymentEndMonth],
|
||||
paymentTime:[data.startTime, data.endTime],
|
||||
}
|
||||
this.isSubmit = true
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
@@ -324,7 +356,6 @@ layout("/layouts/platform.html"){
|
||||
year: moment().format('YYYY'),
|
||||
}
|
||||
this.$refs.guava.view()
|
||||
this.isMonthCreatedByYear()
|
||||
},
|
||||
async doSave() {
|
||||
const formValid = await this.$refs["form"].validate()
|
||||
@@ -336,15 +367,11 @@ layout("/layouts/platform.html"){
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
this.formData.startTime=this.formData.paymentTime[0]
|
||||
this.formData.endTime=this.formData.paymentTime[1]
|
||||
this.formData.paymentStartMonth=this.formData.paymentMonth[0]
|
||||
this.formData.paymentEndMonth=this.formData.paymentMonth[1]
|
||||
const formData = clone(this.formData)
|
||||
const o = this.monthSelect.find(v => v.label === formData.paymentMonth)
|
||||
if (o.code === 1) {
|
||||
this.notifyWarning("该年份下的此月份已创建了项目,请选择其他月份!")
|
||||
loading.close()
|
||||
this.submitLoading = false
|
||||
return
|
||||
}
|
||||
const resp = await $.post(loc() + '/doSave', formData)
|
||||
loading.close()
|
||||
this.submitLoading = false
|
||||
@@ -366,40 +393,9 @@ layout("/layouts/platform.html"){
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async getPaymentConfig() {
|
||||
const resp = await $.get('/platform/member/payment/config/getPaymentConfig')
|
||||
if (resp.code === 0) {
|
||||
this.paymentConfig = resp.data
|
||||
const arr = []
|
||||
let monthHalve = this.paymentConfig.paidDuration
|
||||
let halve = 12 / monthHalve
|
||||
|
||||
for (let i = 1; i <= halve; i++) {
|
||||
let value = (Number(i) - 1) * monthHalve + 1;
|
||||
let followValue = i * monthHalve
|
||||
if (i === 1) {
|
||||
arr.push({label: i + '-' + monthHalve + '月', code: 0})
|
||||
} else {
|
||||
arr.push({label: value + '-' + followValue + '月', code: 0})
|
||||
}
|
||||
}
|
||||
this.monthSelect = arr
|
||||
}
|
||||
},
|
||||
async isMonthCreatedByYear() {
|
||||
console.log(this.formData.year)
|
||||
const resp = await $.post(loc() + '/isMonthCreatedByYear', {
|
||||
year: this.formData.year,
|
||||
monthSelect: JSON.stringify(this.monthSelect)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.monthSelect = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
await this.getPaymentConfig();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -143,6 +143,32 @@ layout("/layouts/platform.html"){
|
||||
></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">入职时间:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="pageForm.schoolTime"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">退休时间:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="pageForm.retireDate"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
@@ -267,8 +293,9 @@ layout("/layouts/platform.html"){
|
||||
tableColumns: [
|
||||
{ prop: "loginname", label: "工号", sortable: true },
|
||||
{ prop: "username", label: "姓名" },
|
||||
{ prop: "sex", label: "性别" },
|
||||
{ prop: "mobile", label: "联系电话" },
|
||||
{ prop: "schoolTime", label: "入职时间" },
|
||||
{ prop: "retireDate", label: "退休时间" },
|
||||
{ prop: "personType", label: "人员类型", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "unionname", label: "所属工会", sortable: true },
|
||||
@@ -491,7 +518,7 @@ layout("/layouts/platform.html"){
|
||||
this.checkUsers = val
|
||||
},
|
||||
async getProjectList() {
|
||||
const resp = await $.get("/platform/member/payment/manage/getAllProject", { year: this.pageForm.year })
|
||||
const resp = await $.get("/platform/member/payment/project/getAllProject", { year: this.pageForm.year })
|
||||
if (resp.code === 0) {
|
||||
this.paymentProjectList = resp.data
|
||||
this.$set(this.pageForm, "paymentProjectId", this.paymentProjectList ? this.paymentProjectList[0].id : null)
|
||||
|
||||
@@ -93,8 +93,8 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column show-overflow-tooltip label="所在单位" prop="be_unitname" header-align="center"
|
||||
sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="联系方式" prop="mobile" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<!-- <el-table-column show-overflow-tooltip label="联系方式" prop="mobile" header-align="center"-->
|
||||
<!-- align="center"></el-table-column>-->
|
||||
<el-table-column label="慰问类型" prop="type_name" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="慰问方式" prop="way" header-align="center"
|
||||
|
||||
@@ -101,9 +101,9 @@ layout("/layouts/platform.html"){
|
||||
header-align="center"
|
||||
sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="联系方式" prop="mobile"
|
||||
header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<!-- <el-table-column show-overflow-tooltip label="联系方式" prop="mobile"-->
|
||||
<!-- header-align="center"-->
|
||||
<!-- align="center"></el-table-column>-->
|
||||
<el-table-column label="慰问类型" prop="type_name" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<!-- <el-table-column label="慰问方式" prop="way" header-align="center"
|
||||
|
||||
Reference in New Issue
Block a user