This commit is contained in:
=
2026-06-16 15:49:36 +08:00
parent ec015a66df
commit b45f194355
14 changed files with 255 additions and 44 deletions
@@ -1,6 +1,7 @@
package com.budwk.app.sys.listener;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.event.user.UserChangeEventListener;
import com.budwk.app.base.event.user.UserChangeMsg;
import com.budwk.app.sys.models.Sys_user_role;
@@ -31,9 +32,17 @@ public class SysUserChangeListener implements UserChangeEventListener {
@Aop(TransAop.READ_COMMITTED)
public void receive(UserChangeMsg message) {
if (ObjectUtil.equals(message.getOperationType(), UserChangeMsg.UNIT_CHANGE_OPERATION)) {
if (StrUtil.isBlank(message.getSourceUnitId())) {
return;
}
// 单位变动,删除原单位的角色
dao.clear(Sys_user_role.class, Cnd.where("userId", "in", message.getUserIds()).and("unitId", "=", message.getSourceUnitId()));
if (StrUtil.isBlank(message.getTargetUnitId())) {
return;
}
// 判断这两个单位是不是在一个工会,如果不是,删除原来工会的所有角色
Sql sql = Sqls.create("""
SELECT
@@ -51,8 +60,9 @@ public class SysUserChangeListener implements UserChangeEventListener {
dao.execute(sql);
NutMap result = (NutMap) sql.getResult();
if (!result.getBoolean("result")) {
dao.clear(Sys_user_role.class, Cnd.where("userId", "in", message.getUserIds()).and("unionId", "=", result.getString("sourceUnionId")));
String sourceUnionId = result.getString("sourceUnionId");
if (!result.getBoolean("result") && StrUtil.isNotBlank(sourceUnionId)) {
dao.clear(Sys_user_role.class, Cnd.where("userId", "in", message.getUserIds()).and("unionId", "=", sourceUnionId));
}
}
@@ -294,6 +294,11 @@ public class Sys_user extends BaseModel implements Serializable {
@Default(value = "0")
private Boolean aidFundMember;
@Column
@Comment("大病基金会员类别")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String aidFundMemberType;
@Column
@Comment("家庭主要成员及其工作单位")
@ColDefine(type = ColType.MYSQL_JSON)
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HtmlUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.event.role.RoleEventMsg;
@@ -26,13 +27,14 @@ import lombok.extern.slf4j.Slf4j;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.FieldFilter;
import org.nutz.dao.util.Daos;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.random.R;
import org.nutz.lang.util.NutMap;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.lang.reflect.Field;
@@ -64,6 +66,11 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
private static Map<String, String> unitIdNameMap;
/**
* 数据中心允许更新的用户字段表达式。
*/
private static String dataCenterUpdateFields;
/**
* 字段映射类,用于缓存反射结果
*/
@@ -110,6 +117,24 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
return fieldMappings;
}
/**
* 获取数据中心字段白名单表达式,供批量更新时过滤本地业务字段。
*
* @return 字段过滤表达式
*/
private static String getDataCenterUpdateFields() {
if (dataCenterUpdateFields == null) {
synchronized (SysDataUserAllUpdateServiceImpl.class) {
if (dataCenterUpdateFields == null) {
dataCenterUpdateFields = getFieldMappings().stream()
.map(mapping -> mapping.field.getName())
.collect(Collectors.joining("|", "^(id|", ")$"));
}
}
}
return dataCenterUpdateFields;
}
/**
* 检查用户是否符合会员条件
*
@@ -182,12 +207,8 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
for (Sys_user_source source : sources) {
Sys_user user = userMap.get(source.getLoginname());
// 创建用户对象
Sys_user u = new Sys_user();
BeanUtils.copyProperties(source, u);
// 数据中心可能返回三级单位编码,系统用户统一挂到二级单位。
u.setUnitId(normalizeSecondLevelUnitId(u.getUnitId()));
// 创建只包含数据中心字段的用户对象,避免覆盖本地维护的会员、登录、积分等业务字段。
Sys_user u = buildDataCenterUser(source);
if (user == null) {
// 新增用户,初始化数据
@@ -199,8 +220,6 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
} else {
// 修改现有用户
u.setId(user.getId());
// 全量更新只同步数据中心基础资料,会员状态由会员业务流程维护。
u.setMember(null);
needDoUpdateList.add(u);
}
@@ -244,7 +263,8 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
List<List<Sys_user>> batches = ListUtil.split(needDoUpdateList, 500);
batches.forEach(batch -> {
try {
dao.updateIgnoreNull(batch);
Dao extDao = Daos.ext(dao, FieldFilter.create(Sys_user.class, getDataCenterUpdateFields()));
extDao.updateIgnoreNull(batch);
} catch (Exception e) {
log.error("批量更新用户异常", e);
}
@@ -369,6 +389,53 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
return unitId;
}
/**
* 构建数据中心同步对象,只写入带有DataCenterColumn注解且来源非空的字段。
*
* @param source 数据中心来源用户
* @return 待新增或更新的系统用户
*/
private Sys_user buildDataCenterUser(Sys_user_source source) {
Sys_user user = new Sys_user();
for (FieldMapping mapping : getFieldMappings()) {
try {
Object sourceValue = mapping.field.get(source);
Object updateValue = normalizeDataCenterValue(mapping.field.getName(), sourceValue);
if (updateValue != null) {
mapping.field.set(user, updateValue);
}
} catch (IllegalAccessException e) {
log.error("数据中心字段赋值失败: {}", mapping.field.getName(), e);
}
}
return user;
}
/**
* 数据中心字段更新值归一化,空字符串和空值不参与更新,单位编码统一归一到二级单位。
*
* @param fieldName 字段名
* @param value 来源值
* @return 可更新值
*/
private Object normalizeDataCenterValue(String fieldName, Object value) {
if (value == null) {
return null;
}
if (value instanceof String) {
String strValue = (String) value;
String trimmedValue = StrUtil.trimToNull(strValue);
if (trimmedValue == null) {
return null;
}
if ("unitId".equals(fieldName)) {
return normalizeSecondLevelUnitId(trimmedValue);
}
return trimmedValue;
}
return value;
}
/**
* 构建变更的历史数据
*
@@ -403,14 +470,18 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
}
Object sourceValue = mapping.field.get(source);
Object userValue = mapping.field.get(user);
Object updateValue = normalizeDataCenterValue(mapping.field.getName(), sourceValue);
if (updateValue == null) {
continue;
}
// 如果值不相等,记录变更
if (!ObjectUtil.equals(sourceValue, userValue)) {
if (!ObjectUtil.equals(updateValue, userValue)) {
NutMap change = NutMap.NEW();
change.put("fieldName", mapping.name);
change.put("field", mapping.field.getName());
change.put("sourceValue", userValue == null ? "" : userValue.toString());
change.put("newValue", sourceValue == null ? "" : sourceValue.toString());
change.put("newValue", updateValue.toString());
changeList.add(change);
}
} catch (IllegalAccessException e) {
@@ -436,18 +507,21 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
// 2. 单位变更
String oldUnitId = normalizeSecondLevelUnitId(user.getUnitId());
String newUnitId = normalizeSecondLevelUnitId(source.getUnitId());
if (!ObjectUtil.equals(oldUnitId, newUnitId)) {
if (StrUtil.isNotBlank(newUnitId) && !ObjectUtil.equals(oldUnitId, newUnitId)) {
changeTypes.add(MemberChangeType.UNIT_CHANGE.name());
NutMap change = NutMap.NEW();
change.put("fieldName", "单位");
change.put("field", "unitId");
change.put("sourceValue", unitIdNameMap.get(oldUnitId));
change.put("newValue", unitIdNameMap.get(newUnitId));
change.put("sourceValue", getUnitChangeDisplayValue(oldUnitId));
change.put("newValue", getUnitChangeDisplayValue(newUnitId));
changeList.add(change);
// 单位异动发送订阅消息,清空原单位的所有角色
UserChangePublisher.broadcast(new UserChangeMsg(List.of(user.getId()),
UserChangeMsg.UNIT_CHANGE_OPERATION, oldUnitId, newUnitId));
// 旧单位为空时没有明确的来源单位角色范围,避免清理到全局角色。
if (StrUtil.isNotBlank(oldUnitId)) {
// 单位异动发送订阅消息,清空原单位的所有角色
UserChangePublisher.broadcast(new UserChangeMsg(List.of(user.getId()),
UserChangeMsg.UNIT_CHANGE_OPERATION, oldUnitId, newUnitId));
}
}
// 如果没有任何变更,返回null
@@ -458,8 +532,8 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
// 生成变更信息描述
String changeInfos = changeList.stream()
.map(v -> v.getString("fieldName") + ":" +
HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "→" +
HtmlUtil.cleanHtmlTag(v.getString("newValue")))
cleanChangeValue(v.get("sourceValue")) + "→" +
cleanChangeValue(v.get("newValue")))
.collect(Collectors.joining(";"));
// 设置历史记录信息
@@ -469,4 +543,31 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
return history;
}
/**
* 单位变更历史展示值,优先显示单位名称,单位表缺失时显示单位编码,空单位显示空字符串。
*
* @param unitId 单位编码
* @return 历史记录展示值
*/
private String getUnitChangeDisplayValue(String unitId) {
if (StrUtil.isBlank(unitId)) {
return "";
}
String unitName = unitIdNameMap.get(unitId);
return StrUtil.blankToDefault(unitName, unitId);
}
/**
* 生成变更描述前统一处理空值和HTML标签,避免来源数据为空时生成历史记录失败。
*
* @param value 变更前后值
* @return 清洗后的变更展示值
*/
private String cleanChangeValue(Object value) {
if (value == null) {
return "";
}
return HtmlUtil.cleanHtmlTag(value.toString());
}
}
@@ -210,4 +210,7 @@ public class View_user {
@Column
private Boolean aidFundMember;
@Column
private String aidFundMemberType;
}
@@ -39,6 +39,7 @@ import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@@ -78,6 +79,7 @@ public class FundMemberQueryController {
u.userState,
u.preparedBy,
u.personType,
u.aidFundMemberType,
u.unitName,
u.unionName,
(SELECT changeTime FROM fund_member_change_record WHERE loginName = u.loginName AND isJoin = 1 ORDER BY changeTime DESC limit 1) joinTime
@@ -93,6 +95,14 @@ public class FundMemberQueryController {
return Result.success(pagination);
}
@At
@SaCheckPermission("fundMember.query")
@ApiOperation("修改大病基金会员类别")
public Result updateAidFundMemberType(@Param("loginName") String loginName, @Param("aidFundMemberType") String aidFundMemberType) {
fundMemberService.updateAidFundMemberType(loginName, aidFundMemberType);
return Result.success();
}
@At
@SaCheckPermission("fundMember.query")
@Ok("void")
@@ -25,8 +25,10 @@ public class FundMemberPassInterceptor implements FlowInterceptor {
public void intercept(Execution execution) {
Dao dao = ServiceContext.find(Dao.class);
FundMemberApply fundMemberApply = Json.fromJson(FundMemberApply.class, execution.getArgs().getStr("f_data"));
// 修改基金会员状态
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where(Sys_user::getLoginname, "=", fundMemberApply.getLoginName()));
// 修改基金会员状态,并同步申请时选择的大病基金会员类别。
dao.update(Sys_user.class,
Chain.make("aidFundMember", 1).add("aidFundMemberType", fundMemberApply.getAidFundMemberType()),
Cnd.where(Sys_user::getLoginname, "=", fundMemberApply.getLoginName()));
// 添加到变更记录
FundMemberChangeRecord record = BeanUtil.copyProperties(fundMemberApply, FundMemberChangeRecord.class, "id");
record.setId(null);
@@ -57,6 +57,11 @@ public class FundMemberApply extends BaseModel {
@ColDefine(type = ColType.DATE)
private Date retireTime;
@Column
@Comment("大病基金会员类别")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String aidFundMemberType;
@Column
@Comment("家庭住址")
@ColDefine(type = ColType.VARCHAR, width = 100)
@@ -9,4 +9,12 @@ public interface FundMemberService extends BaseService<FundMemberApply> {
* 验证是否已经申请了
*/
void validateApply();
/**
* 修改大病基金会员类别。
*
* @param loginName 工号
* @param aidFundMemberType 大病基金会员类别
*/
void updateAidFundMemberType(String loginName, String aidFundMemberType);
}
@@ -4,9 +4,11 @@ import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -36,4 +38,17 @@ public class FundMemberServiceImpl extends BaseServiceImpl<FundMemberApply> impl
throw new RuntimeException("您有申请流程正在进行中,请等待流程结束后再次操作");
}
}
@Override
public void updateAidFundMemberType(String loginName, String aidFundMemberType) {
if (StrUtil.isBlank(loginName)) {
throw new RuntimeException("工号不能为空");
}
if (StrUtil.isBlank(aidFundMemberType)) {
throw new RuntimeException("会员类别不能为空");
}
dao().update(Sys_user.class,
Chain.make("aidFundMemberType", aidFundMemberType),
Cnd.where(Sys_user::getLoginname, "=", loginName).and(Sys_user::getAidFundMember, "=", 1));
}
}
@@ -43,6 +43,10 @@ public class FundMemberCommonPageForm extends PageForm {
@ApiModelProperty("教职工类别")
private List<String> personTypes;
// 大病基金会员类别
@ApiModelProperty("大病基金会员类别")
private List<String> aidFundMemberTypes;
public void buildSearch(Cnd cnd, String prefix){
if (cnd == null) {
cnd = Cnd.NEW();
@@ -60,5 +64,6 @@ public class FundMemberCommonPageForm extends PageForm {
cnd.andEX(prefix + "userState", "in", this.getUserStates());
cnd.andEX(prefix + "preparedBy", "in", this.getPreparedBys());
cnd.andEX(prefix + "personType", "in", this.getPersonTypes());
cnd.andEX(prefix + "aidFundMemberType", "in", this.getAidFundMemberTypes());
}
}
@@ -39,10 +39,10 @@ layout("/layouts/platform.html"){
<dict-select v-model="pageForm.personTypes" placeholder="请选择教职工类别" @change="doSearch"
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="编制类别">
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
</search-item>
<!-- <search-item label="编制类别">-->
<!-- <dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"-->
<!-- code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>-->
<!-- </search-item>-->
</search>
</el-card>
<el-card shadow="never">
@@ -106,7 +106,7 @@ layout("/layouts/platform.html"){
{ label: "出生年月", prop: "birthday" },
{ label: "在职状态", prop: "userState", sortable: true },
{ label: "教职工类别", prop: "personType", sortable: true },
{ label: '编制类别', prop: 'preparedBy', sortable: true },
// { label: '编制类别', prop: 'preparedBy', sortable: true },
{ label: "所属工会", prop: "unionName" },
{ label: "所属单位", prop: "unitName" },
],
@@ -163,7 +163,7 @@ layout("/layouts/platform.html"){
const pageForm = clone(this.pageForm)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
// pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
this.$axios.post('/platform/fundMember/batchJoin/pageData', pageForm)
.then(res => {
this.tableData = res.data.list
@@ -3,11 +3,15 @@ const fundMemberInfo = {
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
<el-link type="primary" @click="openChart" v-if="row && row.instanceId">点击查看流程图</el-link>
</div>
<el-descriptions :column="2" border>
<el-descriptions-item label="姓名">{{viewData.userName}}</el-descriptions-item>
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
<el-descriptions-item label="会员类别">{{viewData.aidFundMemberType}}</el-descriptions-item>
<el-descriptions-item label="在职状态">{{viewData.userState}}</el-descriptions-item>
<el-descriptions-item label="所属工会">{{viewData.unionName}}</el-descriptions-item>
<el-descriptions-item label="所属单位">{{viewData.unitName}}</el-descriptions-item>
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
<el-descriptions-item label="出生年月">{{viewData.birthday}}</el-descriptions-item>
<el-descriptions-item label="身份证号码">{{viewData.idCard}}</el-descriptions-item>
@@ -72,21 +76,29 @@ const fundMemberInfo = {
onOpen(row) {
this.row = row
this.visible = true
this.viewData = Object.assign({}, row || {})
this.doneTasks = []
this.getInfo()
this.getDoneTasks()
},
// 获取申请信息
getInfo() {
if (!this.row || !this.row.id) {
return
}
this.$axios.post('/platform/fundMember/common/info', {id: this.row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
this.viewData = Object.assign({}, this.viewData, res.data || {})
}
})
},
// 获取已办任务审批记录
getDoneTasks() {
if (!this.row || !this.row.instanceId) {
return
}
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
@@ -96,6 +108,10 @@ const fundMemberInfo = {
// 查看流程图
openChart() {
if (!this.row || !this.row.instanceId) {
this.$message.warning("暂无流程信息")
return
}
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
}
}
@@ -39,14 +39,14 @@ layout("/layouts/platform.html"){
<dict-select v-model="pageForm.userStates" placeholder="请选择在职状态" @change="doSearch"
code="USER_STATE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="教职工类别">
<dict-select v-model="pageForm.personTypes" placeholder="请选择教职工类别" @change="doSearch"
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
</search-item>
<search-item label="编制类别">
<dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
<search-item label="会员类别">
<dict-select v-model="pageForm.aidFundMemberTypes" placeholder="请选择会员类别" @change="doSearch"
code="USER_AID_FUND_MEMBER_TYPE" multiple collapse-tags></dict-select>
</search-item>
<!-- <search-item label="编制类别">-->
<!-- <dict-select v-model="pageForm.preparedBys" placeholder="请选择编制类别" @change="doSearch"-->
<!-- code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>-->
<!-- </search-item>-->
</search>
</el-card>
<el-card shadow="never">
@@ -78,6 +78,11 @@ layout("/layouts/platform.html"){
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
<el-tag v-else size="small" type="danger">退出</el-tag>
</template>
<template v-else-if="column.prop === 'aidFundMemberType'" scope="{row}">
<dict-select v-model="row.aidFundMemberType" placeholder="请选择会员类别"
code="USER_AID_FUND_MEMBER_TYPE" style="width: 100%"
@change="onAidFundMemberTypeChange(row)"></dict-select>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="{row}">
@@ -113,8 +118,8 @@ layout("/layouts/platform.html"){
{ label: "性别", prop: "sex" },
{ label: "出生年月", prop: "birthday" },
{ label: "在职状态", prop: "userState", sortable: true },
{ label: "教职工类别", prop: "personType", sortable: true },
{ label: '编制类别', prop: 'preparedBy', sortable: true },
{ label: "会员类别", prop: "aidFundMemberType", sortable: true },
// { label: '编制类别', prop: 'preparedBy', sortable: true },
{ label: "所属工会", prop: "unionName" },
{ label: "所属单位", prop: "unitName" },
{ label: "加入时间", prop: "joinTime" },
@@ -151,6 +156,22 @@ layout("/layouts/platform.html"){
})
},
// 修改会员类别
onAidFundMemberTypeChange(row) {
this.$axios.post('/platform/fundMember/query/updateAidFundMemberType', {
loginName: row.loginName,
aidFundMemberType: row.aidFundMemberType
}).then((res) => {
if (res.code === 0) {
this.$message.success('修改成功')
} else {
this.pageData()
}
}).catch(() => {
this.pageData()
})
},
// 备份会员
backup() {
// 此处需要选择年份
@@ -200,8 +221,8 @@ layout("/layouts/platform.html"){
pageData() {
const pageForm = clone(this.pageForm)
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
pageForm.aidFundMemberTypes = JSON.stringify(this.pageForm.aidFundMemberTypes)
// pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
this.$axios.post('/platform/fundMember/query/pageData', pageForm)
.then(res => {
this.tableData = res.data.list
@@ -79,6 +79,15 @@ layout("/layouts/platform.html"){
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="会员类别" prop="aidFundMemberType">
<dict-select v-model="formData.aidFundMemberType" placeholder="请选择会员类别"
code="USER_AID_FUND_MEMBER_TYPE" style="width: 100%"></dict-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="手机号码" prop="mobile">
@@ -134,7 +143,7 @@ layout("/layouts/platform.html"){
sex: [{required: true, message: '请选择性别', trigger: 'blur'}],
idCard: [{required: true, message: '请输入身份证号码', trigger: 'blur'},
{
pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))([0-2][1-9]|3[0-1])\d{3}[Xx\d]$/,
pattern: /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[Xx\d]$/,
message: '请输入正确的身份证号码',
trigger: 'blur'
}
@@ -142,6 +151,7 @@ layout("/layouts/platform.html"){
address: [{required: true, message: '请输入家庭住址', trigger: 'blur'}],
joinWorkTime: [{required: true, message: '请选择参加工作时间', trigger: 'blur'}],
retireTime: [{required: false, message: '请选择退休时间', trigger: 'blur'}],
aidFundMemberType: [{required: true, message: '请选择会员类别', trigger: 'change'}],
mobile: [{required: true, message: '请输入手机号码', trigger: 'blur'},
{
pattern: /^1[3456789]\d{9}$/,