commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.budwk.app.base.event.role;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:RoleEventListener
|
||||
* @Date 2025/9/3 17:13
|
||||
* @注释
|
||||
*/
|
||||
public interface RoleEventListener {
|
||||
|
||||
void receive(RoleEventMsg message);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.budwk.app.base.event.role;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:RoleEventMsg
|
||||
* @Date 2025/9/3 17:14
|
||||
* @注释
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RoleEventMsg {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private List<String> userIds;
|
||||
|
||||
/**
|
||||
* 角色code
|
||||
*/
|
||||
private String roleCode;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
private String unitId;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
private Integer operationType;
|
||||
|
||||
/**
|
||||
* 添加角色
|
||||
*/
|
||||
public static final int ADD_ROLE = 1;
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
*/
|
||||
public static final int REMOVE_ROLE = 2;
|
||||
|
||||
/**
|
||||
* 更新角色
|
||||
*/
|
||||
public static final int RENEW_ROLE = 3;
|
||||
|
||||
|
||||
public RoleEventMsg(String unitId, String roleCode, Integer operationType){
|
||||
this.unitId = unitId;
|
||||
this.operationType = operationType;
|
||||
}
|
||||
|
||||
public RoleEventMsg(List<String> userIds, String roleCode, Integer operationType){
|
||||
this.userIds = userIds;
|
||||
this.roleCode = roleCode;
|
||||
this.operationType = operationType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.budwk.app.base.event.role;
|
||||
|
||||
import org.nutz.mvc.Mvcs;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:RoleEventPublisher
|
||||
* @Date 2025/9/3 17:14
|
||||
* @注释
|
||||
*/
|
||||
public class RoleEventPublisher {
|
||||
|
||||
public static void broadcast(RoleEventMsg event){
|
||||
String[] names = Mvcs.getIoc().getNamesByType(RoleEventListener.class);
|
||||
for (String name : names) {
|
||||
RoleEventListener listener = Mvcs.getIoc().get(RoleEventListener.class, name);
|
||||
listener.receive(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.budwk.app.sys.listener;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.event.role.RoleEventListener;
|
||||
import com.budwk.app.base.event.role.RoleEventMsg;
|
||||
import com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:SysRoleEventListener
|
||||
* @Date 2025/9/3 17:35
|
||||
* @注释
|
||||
*/
|
||||
@IocBean
|
||||
public class SysRoleEventListener implements RoleEventListener {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void receive(RoleEventMsg message) {
|
||||
if (ObjectUtil.isAllEmpty(message.getUserIds(), message.getUnitId(), message.getRoleCode())) {
|
||||
return;
|
||||
}
|
||||
switch (message.getOperationType()) {
|
||||
case RoleEventMsg.ADD_ROLE -> {
|
||||
addRole(message);
|
||||
}
|
||||
case RoleEventMsg.REMOVE_ROLE -> {
|
||||
removeRole(message);
|
||||
}
|
||||
case RoleEventMsg.RENEW_ROLE -> {
|
||||
removeRole(message);
|
||||
addRole(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加角色
|
||||
* @param message 订阅消息
|
||||
*/
|
||||
private void addRole(RoleEventMsg message) {
|
||||
Sys_role role = dao.fetch(Sys_role.class, Cnd.where("code", "=", message.getRoleCode()));
|
||||
|
||||
if (ObjectUtil.isAllNotEmpty(message.getUserIds(), message.getRoleCode())) {
|
||||
List<Sys_user_role> roleList = message.getUserIds().stream().map(item -> {
|
||||
Sys_user_role userRole = new Sys_user_role();
|
||||
userRole.setUserId(item);
|
||||
userRole.setUnitId(StrUtil.isNotBlank(message.getUnitId()) ? message.getUnitId() : null);
|
||||
userRole.setRoleId(role.getId());
|
||||
return userRole;
|
||||
}).toList();
|
||||
dao.insert(roleList);
|
||||
} else if (ObjectUtil.isAllNotEmpty(message.getUnitId(), message.getRoleCode())) {
|
||||
List<Sys_user> userList = dao.query(Sys_user.class, Cnd.where("unitId", "=", message.getUnitId()));
|
||||
List<Sys_user_role> roleList = userList.stream().map(item -> {
|
||||
Sys_user_role userRole = new Sys_user_role();
|
||||
userRole.setUserId(item.getId());
|
||||
userRole.setUnitId(item.getUnitId());
|
||||
userRole.setRoleId(role.getId());
|
||||
return userRole;
|
||||
}).toList();
|
||||
dao.insert(roleList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
* @param message 订阅消息
|
||||
*/
|
||||
private void removeRole(RoleEventMsg message) {
|
||||
// 判断传过来的东西
|
||||
if (ObjectUtil.isAllNotEmpty(message.getUserIds(), message.getUnitId(), message.getRoleCode())) {
|
||||
dao.clear(Sys_user_role.class,
|
||||
Cnd.where("userId", "in", message.getUserIds())
|
||||
.and("unitId", "=", message.getUnitId())
|
||||
.and("roleCode", "=", message.getRoleCode())
|
||||
);
|
||||
} else if (ObjectUtil.isAllNotEmpty(message.getUserIds(), message.getRoleCode())) {
|
||||
dao.clear(Sys_user_role.class,
|
||||
Cnd.where("userId", "in", message.getUserIds())
|
||||
.and("roleCode", "=", message.getRoleCode())
|
||||
);
|
||||
} else if (ObjectUtil.isAllNotEmpty(message.getUnitId(), message.getUnitId())) {
|
||||
dao.clear(Sys_user_role.class,
|
||||
Cnd.where("unitId", "in", message.getUnitId())
|
||||
.and("roleCode", "=", message.getRoleCode())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,6 +7,8 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.event.role.RoleEventMsg;
|
||||
import com.budwk.app.base.event.role.RoleEventPublisher;
|
||||
import com.budwk.app.base.utils.ConditionGroupUtil;
|
||||
import com.budwk.app.base.utils.PwdUtil;
|
||||
import com.budwk.app.sys.annotation.DataCenterColumn;
|
||||
@@ -16,6 +18,7 @@ import com.budwk.app.sys.services.SysDataUserUpdateService;
|
||||
import com.budwk.app.sys.services.SysDictService;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalConfig;
|
||||
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeOrigin;
|
||||
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeType;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -161,9 +164,9 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
Map<String, Sys_user> userMap = sysUsers.stream().collect(Collectors.toMap(Sys_user::getLoginname, sysUser -> sysUser));
|
||||
|
||||
// 准备数据集合
|
||||
List<Sys_user> needDoUpdateList = new ArrayList<>();
|
||||
List<Sys_user> needInitUserList = new ArrayList<>();
|
||||
List<Sys_user_history> histories = new ArrayList<>();
|
||||
List<Sys_user> needDoUpdateList = new CopyOnWriteArrayList<>();
|
||||
List<Sys_user> needInitUserList = new CopyOnWriteArrayList<>();
|
||||
List<Sys_user_history> histories = new CopyOnWriteArrayList<>();
|
||||
List<String> addMemberUserIds = Collections.synchronizedList(new ArrayList<>());
|
||||
List<String> removeMemberUserIds = Collections.synchronizedList(new ArrayList<>());
|
||||
|
||||
@@ -380,6 +383,13 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
});
|
||||
}
|
||||
|
||||
// 6. 处理其他任务
|
||||
// 6.1 更新提案的校领导角色,发送订阅
|
||||
ProposalConfig config = dao.fetch(ProposalConfig.class, Cnd.where("delFlag", "=", false).desc("updatedAt"));
|
||||
for (String unitId : config.getSchoolLeaderUnitIds()) {
|
||||
RoleEventPublisher.broadcast(new RoleEventMsg(unitId, RoleConstant.PROPOSAL_BRANCH_SCHOOL_LEADER.name(), RoleEventMsg.RENEW_ROLE));
|
||||
}
|
||||
|
||||
long endTime = System.currentTimeMillis();
|
||||
log.info("全量更新用户数据完成,耗时: {} 毫秒", (endTime - startTime));
|
||||
|
||||
|
||||
+1
-2
@@ -137,7 +137,6 @@ public class ActivityDeclareMineController {
|
||||
} else {
|
||||
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = activityDeclareService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
@@ -178,7 +177,7 @@ public class ActivityDeclareMineController {
|
||||
@Ok("void")
|
||||
@SaCheckPermission("activityDeclare.mine")
|
||||
@SLog(tag = "活动申报", msg = "导出活动申报表")
|
||||
public void doExport(@Valid String id, HttpServletResponse response) {
|
||||
public void doExportDeclare(@Valid String id, HttpServletResponse response) {
|
||||
HashMap<String, Object> docData = new HashMap<>();
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
|
||||
+28
-15
@@ -37,6 +37,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -87,9 +88,6 @@ public class ActivityReimbursementApplyController {
|
||||
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
|
||||
.sum();
|
||||
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
|
||||
if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) {
|
||||
activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getId());
|
||||
}
|
||||
dao.insertOrUpdate(activityReimbursementInfo);
|
||||
return Result.success();
|
||||
}
|
||||
@@ -110,9 +108,6 @@ public class ActivityReimbursementApplyController {
|
||||
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
|
||||
.sum();
|
||||
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
|
||||
if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) {
|
||||
activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getId());
|
||||
}
|
||||
dao.insertOrUpdate(activityReimbursementInfo);
|
||||
|
||||
// 开启流程实例
|
||||
@@ -146,9 +141,6 @@ public class ActivityReimbursementApplyController {
|
||||
.mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D))
|
||||
.sum();
|
||||
activityReimbursementInfo.setActualMoney(new BigDecimal(sum));
|
||||
if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) {
|
||||
activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getId());
|
||||
}
|
||||
dao.insertOrUpdate(activityReimbursementInfo);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
@@ -162,14 +154,33 @@ public class ActivityReimbursementApplyController {
|
||||
@At
|
||||
@ApiOperation("获取当前用户活动报销")
|
||||
@SaCheckPermission("activityReimbursement.apply")
|
||||
public Result getActivityReimbursementByUser() {
|
||||
// 查询reimbursement表里面没有,在declare表里面有的申请记录
|
||||
Sql sql = Sqls.create("SELECT declareId FROM activity_reimbursement_info WHERE userId = @userId").setParam("userId", SecurityUtil.getUserId());
|
||||
public Result getActivityReimbursementByUser(String id) {
|
||||
if (StrUtil.isNotBlank(id)) {
|
||||
ActivityReimbursementInfo reimbursementInfo = dao.fetch(ActivityReimbursementInfo.class, id);
|
||||
ActivityDeclareInfo info = dao.fetch(ActivityDeclareInfo.class, reimbursementInfo.getDeclareId());
|
||||
return Result.success().addData(List.of(info));
|
||||
}
|
||||
|
||||
// 查询已经报销成功的记录
|
||||
Sql reiSql = Sqls.create("""
|
||||
SELECT
|
||||
info.declareId
|
||||
FROM
|
||||
activity_reimbursement_info info
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
WHERE
|
||||
userId = @userId
|
||||
AND ins.state IN (10, 20)
|
||||
""").setParam("userId", SecurityUtil.getUserId());
|
||||
reiSql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(reiSql);
|
||||
List<String> reiDecIdList = reiSql.getList(String.class);
|
||||
|
||||
Sql sql = Sqls.create("select declareId from activity_reimbursement_info where userId = @userId").setParam("userId", SecurityUtil.getUserId());
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(sql);
|
||||
List<String> declareIdList = sql.getList(String.class);
|
||||
|
||||
|
||||
Sql applySql = Sqls.create("""
|
||||
SELECT
|
||||
info.*
|
||||
@@ -178,10 +189,12 @@ public class ActivityReimbursementApplyController {
|
||||
LEFT JOIN wf_process_instance ins ON info.id = ins.businessNo
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (Lang.isNotEmpty(declareIdList)) {
|
||||
cnd.and("info.id", "in", declareIdList);
|
||||
cnd.and("info.id", "not in", declareIdList);
|
||||
}
|
||||
if (Lang.isNotEmpty(reiDecIdList)) {
|
||||
cnd.and("info.id", "not in", reiDecIdList);
|
||||
}
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
cnd.and("ins.state", "=", 20);
|
||||
|
||||
+7
@@ -5,6 +5,7 @@ import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityD
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
@@ -22,6 +23,12 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActivityReimbursementInfo extends ActivityDeclareInfo {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("申报id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class MemberStatisticsServiceImpl extends BaseServiceImpl<Sys_user> imple
|
||||
cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
|
||||
}
|
||||
|
||||
if (Lang.isNotEmpty(pageForm.getAge()) && !"0".equals(pageForm.getAge().get(0)) && !"0".equals(pageForm.getAge().get(1))) {
|
||||
if (Lang.isNotEmpty(pageForm.getAge()) && !"0".equals(pageForm.getAge().get(1))) {
|
||||
if (reverseSelection) {
|
||||
cnd.andNot("TIMESTAMPDIFF(YEAR, u.birthday, CURDATE())", "between", pageForm.getAge().toArray());
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ public class MemberPaymentChartSummaryController {
|
||||
) subquery ON subquery.unionId = un.id
|
||||
GROUP BY
|
||||
un.id,
|
||||
un.unionname,
|
||||
un.name,
|
||||
un.unioncode
|
||||
ORDER BY
|
||||
un.unioncode;
|
||||
|
||||
+12
-3
@@ -5,8 +5,10 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
@@ -104,9 +106,9 @@ public class MemberPaymentSummaryController {
|
||||
public Result modify(@Param("ids") String[] ids, String paymentMoney, boolean isPay, String remark) {
|
||||
List<String> idList = Arrays.asList(ids);
|
||||
if (Lang.isNotEmpty(idList)) {
|
||||
if (!isPay) {
|
||||
if (isPay) {
|
||||
//未缴费设为已缴费
|
||||
memberPaymentService.update(Chain.make("paymentMoney", paymentMoney)
|
||||
memberPaymentService.update(Chain.make("paymentMoney", NumberUtil.mul(paymentMoney, "100"))
|
||||
.add("remark", remark).add("isPayment", 1)
|
||||
.add("paymentTime", new Date()),
|
||||
Cnd.where("id", "in", idList));
|
||||
@@ -134,9 +136,16 @@ public class MemberPaymentSummaryController {
|
||||
@ApiOperation("下载导入模版")
|
||||
@SaCheckPermission("member.payment.summary")
|
||||
public void downloadImportTemp(HttpServletResponse response) {
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginname", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "username", 20));
|
||||
exportEntities.add(new ExcelExportEntity("缴纳金额", "paymentBase", 20));
|
||||
exportEntities.add(new ExcelExportEntity("是否缴费", "isPay", 20));
|
||||
exportEntities.add(new ExcelExportEntity("备注", "remark", 20));
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, MemberPaymentTemp.class, new ArrayList<>());
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, new ArrayList<>());
|
||||
CommonDownloadUtil.download("会员缴费导入模版.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.budwk.app.zhgh.user.childManage.h5controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author hqw
|
||||
* @name:H5ChildManageController
|
||||
* @Date 2025/9/4 8:52
|
||||
* @注释
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@At("/platform/childManage/manage/h5")
|
||||
public class H5ChildManageController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childmanage/")
|
||||
@SaCheckPermission("childManage.h5")
|
||||
public void index() {
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,7 @@
|
||||
}
|
||||
"
|
||||
:auto-upload="false"
|
||||
action
|
||||
:limit="1"
|
||||
:file-list="importData.fileList"
|
||||
>
|
||||
|
||||
+3
-3
@@ -93,7 +93,7 @@ layout("/layouts/platform.html"){
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
|
||||
<el-button v-if="row.instanceState === 20" @click="doExport(row)" size="mini" type="primary">导出</el-button>
|
||||
<el-button v-if="row.instanceState === 20" @click="doExportDeclare(row)" size="mini" type="primary">申请表导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -143,8 +143,8 @@ layout("/layouts/platform.html"){
|
||||
'info': INFO
|
||||
},
|
||||
methods: {
|
||||
doExport(row){
|
||||
this.$downLoad('/platform/activityDeclare/mine/doExport?id=' + row.id)
|
||||
doExportDeclare(row){
|
||||
this.$downLoad('/platform/activityDeclare/mine/doExportDeclare?id=' + row.id)
|
||||
},
|
||||
onApply() {
|
||||
window.location.href = '/platform/activityDeclare/apply'
|
||||
|
||||
+50
-15
@@ -13,8 +13,8 @@ layout("/layouts/platform.html"){
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="活动名称">
|
||||
<el-form-item prop="id">
|
||||
<el-select v-model="formData.id"
|
||||
<el-form-item prop="declareId">
|
||||
<el-select v-model="formData.declareId"
|
||||
style="width: 100%;"
|
||||
@change="activityChange"
|
||||
filterable placeholder="请选择活动">
|
||||
@@ -28,7 +28,7 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="formData.id">
|
||||
<template v-if="formData.declareId">
|
||||
<el-descriptions-item label="相关数据">
|
||||
<el-button size="small" type="primary" @click="viewDeclare">查看申报信息</el-button>
|
||||
</el-descriptions-item>
|
||||
@@ -37,7 +37,7 @@ layout("/layouts/platform.html"){
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="实际活动时间" :span="2">
|
||||
<el-descriptions-item label="实际活动时间">
|
||||
<el-form-item prop="activityTime">
|
||||
<el-date-picker
|
||||
start-placeholder="开始日期"
|
||||
@@ -51,6 +51,23 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="活动计划时间">
|
||||
<el-form-item prop="planDate">
|
||||
<el-date-picker
|
||||
readonly
|
||||
start-placeholder="开始日期"
|
||||
range-separator="-"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
v-model="formData.planDate"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="活动预算费用" :span="2">
|
||||
<el-form-item prop="budgets">
|
||||
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 100%">
|
||||
@@ -211,7 +228,9 @@ layout("/layouts/platform.html"){
|
||||
|
||||
formData: {
|
||||
id: GetQueryString("businessId"),
|
||||
activityTime: []
|
||||
activityTime: [],
|
||||
budgets: [],
|
||||
planDate: [],
|
||||
},
|
||||
formRules: {
|
||||
id: [{required: true, message: "必填", trigger: ['change', 'blur']}]
|
||||
@@ -294,7 +313,7 @@ layout("/layouts/platform.html"){
|
||||
viewDeclare() {
|
||||
this.declareDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen({id: this.formData.id})
|
||||
this.$refs.infoRef.onOpen({id: this.formData.declareId})
|
||||
})
|
||||
},
|
||||
|
||||
@@ -315,24 +334,40 @@ layout("/layouts/platform.html"){
|
||||
...data
|
||||
}
|
||||
|
||||
if (data.planStartTime && data.planEndTime) {
|
||||
this.formData.activityTime = [
|
||||
new Date(data.planStartTime),
|
||||
new Date(data.planEndTime)
|
||||
]
|
||||
}
|
||||
this.formData.id = this.bizId ? this.bizId : null
|
||||
|
||||
if (data.planStartTime && data.planEndTime) {
|
||||
this.formData.planDate = [data.planStartTime, data.planEndTime]
|
||||
}
|
||||
}
|
||||
},
|
||||
async getActivityReimbursementByUser() {
|
||||
const {code, data} = await this.$axios.post('/platform/activityReimbursement/apply/getActivityReimbursementByUser');
|
||||
async getActivityReimbursementByUser(id) {
|
||||
const {code, data} = await this.$axios.post('/platform/activityReimbursement/apply/getActivityReimbursementByUser',{id});
|
||||
if (code === 0) {
|
||||
this.activityOptions = data
|
||||
}
|
||||
},
|
||||
findOne(){
|
||||
this.$axios.post('/platform/activityReimbursement/mine/findOne', {id: this.bizId})
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (res.data.planStartTime && res.data.planEndTime) {
|
||||
this.formData.planDate = [res.data.planStartTime, res.data.planEndTime]
|
||||
}
|
||||
if (res.data.startTime && res.data.endTime) {
|
||||
this.formData.activityTime = [res.data.startTime, res.data.endTime]
|
||||
}
|
||||
// this.activityChange(res.data.activityId)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getActivityReimbursementByUser()
|
||||
await this.getActivityReimbursementByUser(this.bizId)
|
||||
if (this.bizId) {
|
||||
this.findOne()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+5
-5
@@ -83,7 +83,7 @@ layout("/layouts/platform.html"){
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<el-table-column label="操作" fixed="right" width="350px" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
|
||||
@@ -93,8 +93,8 @@ layout("/layouts/platform.html"){
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
|
||||
<el-button @click="doExport(row)" size="mini">申请</el-button>
|
||||
<el-button @click="doExportReimbursement(row)" size="mini">报销</el-button>
|
||||
<el-button @click="doExportDeclare(row)" size="mini" type="primary">申请表导出</el-button>
|
||||
<el-button v-if="row.instanceState === 20" @click="doExportReimbursement(row)" size="mini" type="primary">报销凭证导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -144,8 +144,8 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
// 导出示例
|
||||
doExport(row){
|
||||
this.$downLoad('/platform/activityDeclare/mine/doExport?id=' + row.declareId)
|
||||
doExportDeclare(row){
|
||||
this.$downLoad('/platform/activityDeclare/mine/doExportDeclare?id=' + row.declareId)
|
||||
},
|
||||
// 导出报销凭证
|
||||
doExportReimbursement(row){
|
||||
|
||||
+10
-5
@@ -2,8 +2,8 @@ const MEMBER_CHANGE = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-card shadow="never">
|
||||
<div class="process-title">会员变更</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="0" :rules="formRules" size="small">
|
||||
<el-descriptions :column="3" border class="descriptions-form">
|
||||
<el-form :model="formData" ref="formRef" label-width="0" :rules="formRules" size="small" class="flow-task-form">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="工号">
|
||||
<el-form-item prop="loginname">
|
||||
<el-input v-model="formData.loginname" readonly size="small"></el-input>
|
||||
@@ -17,8 +17,8 @@ const MEMBER_CHANGE = {
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item prop="sex">
|
||||
<el-radio-group :disabled="allowFields('sex')" v-model="formData.sex" size="small">
|
||||
<el-radio border label="男"></el-radio>
|
||||
<el-radio border label="女"></el-radio>
|
||||
<el-radio border label="男性"></el-radio>
|
||||
<el-radio border label="女性"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
@@ -515,5 +515,10 @@ const MEMBER_CHANGE = {
|
||||
},
|
||||
created(){
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.el-descriptions-item__label {
|
||||
width: 15% !important;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
@@ -170,7 +170,6 @@ layout("/layouts/platform.html"){
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
dicts: ['USER_SEX', 'USER_STATE', 'PERSON_TYPE', 'MEMBER_CHANGE_TYPE'],
|
||||
data: {
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
|
||||
@@ -1,59 +1,6 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-tabs__content {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.el-dialog__body div div {
|
||||
/*color: #ff0000;*/
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.query-row {
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.query-row:not(:last-child) {
|
||||
border-bottom: 1px dashed rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
.query-row-title {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.query-row > .query-title {
|
||||
width: 100px;
|
||||
max-width: 100px;
|
||||
min-width: 100px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row > .query-content {
|
||||
min-width: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.query-row > .query-content > .el-tag {
|
||||
margin-bottom: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 992px) {
|
||||
.query-row:nth-child(4) .query-content .el-col:not(:last-child) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.query-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ layout("/layouts/platform.html"){
|
||||
<el-option label="无工会" value="false"></el-option>
|
||||
</el-select>
|
||||
|
||||
<el-button icon="el-icon-printer" class="m10" type="primary" style="float: right" size="small" @click="doExport">导出</el-button>
|
||||
<el-button icon="el-icon-printer" type="primary" style="float: right" size="small" @click="doExport">导出</el-button>
|
||||
</table-tool>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
|
||||
+6
-6
@@ -44,7 +44,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="p10">
|
||||
<el-card shadow="never">
|
||||
<div class="top_block" v-loading="top_block_loading">
|
||||
<el-row gutter="60">
|
||||
<el-row :gutter="60">
|
||||
<div style="position: absolute; top: -35px; right: -8px">
|
||||
<el-date-picker
|
||||
class="year"
|
||||
@@ -54,7 +54,7 @@ layout("/layouts/platform.html"){
|
||||
type="year"
|
||||
:clearable="false"
|
||||
value-format="yyyy"
|
||||
@change="if(numForm.endYear){getNumData();}"
|
||||
@change="getNumData()"
|
||||
placeholder="选择年"
|
||||
></el-date-picker>
|
||||
-
|
||||
@@ -66,7 +66,7 @@ layout("/layouts/platform.html"){
|
||||
type="year"
|
||||
:clearable="false"
|
||||
value-format="yyyy"
|
||||
@change="if(numForm.startYear){getNumData();}"
|
||||
@change="getNumData()"
|
||||
placeholder="选择年"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
@@ -101,7 +101,7 @@ layout("/layouts/platform.html"){
|
||||
type="year"
|
||||
:clearable="false"
|
||||
value-format="yyyy"
|
||||
@change="if(oneForm.endYear){getPayProjectChart();getPayMoneyChart();}"
|
||||
@change="getPayProjectChart();getPayMoneyChart()"
|
||||
placeholder="选择年"
|
||||
></el-date-picker>
|
||||
-
|
||||
@@ -113,7 +113,7 @@ layout("/layouts/platform.html"){
|
||||
type="year"
|
||||
:clearable="false"
|
||||
value-format="yyyy"
|
||||
@change="if(oneForm.startYear){getPayProjectChart();getPayMoneyChart();}"
|
||||
@change="getPayProjectChart();getPayMoneyChart()"
|
||||
placeholder="选择年"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
@@ -151,7 +151,7 @@ layout("/layouts/platform.html"){
|
||||
:clearable="false"
|
||||
@change="doSearch"
|
||||
@clear="doSearch"
|
||||
filterable="true"
|
||||
filterable
|
||||
>
|
||||
<el-option v-for="item in paymentProjectList"
|
||||
:label="item.projectName" :value="item.id"></el-option>
|
||||
|
||||
@@ -83,7 +83,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<search-item label="在职状态">
|
||||
<dict-select v-model="pageForm.userState" style="width: 100%" clearable
|
||||
placeholder="在职状态" code="UserState"></dict-select>
|
||||
placeholder="在职状态" code="USER_STATE"></dict-select>
|
||||
</search-item>
|
||||
|
||||
<search-item label="入职时间">
|
||||
@@ -416,9 +416,12 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
openImport() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.viewImport.resetImportData()
|
||||
})
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.$refs.viewImport.resetImportData()
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
successImport() {
|
||||
this.$refs.guava.index()
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-nav-bar title="信息填报" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user