diff --git a/cds-fontend-2025.V1/src/views/mps/market/index.vue b/cds-fontend-2025.V1/src/views/mps/market/index.vue index 35e3c9f..be562e0 100644 --- a/cds-fontend-2025.V1/src/views/mps/market/index.vue +++ b/cds-fontend-2025.V1/src/views/mps/market/index.vue @@ -473,28 +473,6 @@ async function handleDelete(dataId: CommonType.IdType) { } function edit(dataId: CommonType.IdType) { - // // 查找要编辑的数据 - // const rowData = data.value.find(item => item.dataId === dataId); - // - // // 检查数据是否存在 - // if (!rowData) { - // window.$message?.error('未找到要编辑的数据'); - // return; - // } - // - // // 检查日期是否为上月 - // const recordDate = new Date(rowData.date); - // const now = new Date(); - // const lastMonth = new Date(now.getFullYear(), now.getMonth() - 1, 1); - // const lastMonthStart = new Date(lastMonth.getFullYear(), lastMonth.getMonth(), 1); - // const lastMonthEnd = new Date(lastMonth.getFullYear(), lastMonth.getMonth() + 1, 0); - // - // // 判断记录日期是否在上月范围内 - // if (recordDate >= lastMonthStart && recordDate <= lastMonthEnd) { - // handleEdit('dataId', dataId); - // } else { - // window.$message?.warning('只能修改上月的记录'); - // } handleEdit('dataId', dataId); } diff --git a/cds-fontend-2025.V1/src/views/mps/market/modules/market-operate-drawer.vue b/cds-fontend-2025.V1/src/views/mps/market/modules/market-operate-drawer.vue index 689a8c2..324fcf0 100644 --- a/cds-fontend-2025.V1/src/views/mps/market/modules/market-operate-drawer.vue +++ b/cds-fontend-2025.V1/src/views/mps/market/modules/market-operate-drawer.vue @@ -87,7 +87,7 @@ function createDefaultModel(): Model { }; } -type RuleKey = Extract;// 添加手机号验证规则 +type RuleKey = Extract;// 添加手机号验证规则 const phonePatternRule = { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号', @@ -111,37 +111,42 @@ const accountPatternRule = { // 添加综合收单商户号验证规则 const acquiringIdPatternRule = { pattern: /^[a-zA-Z0-9]+$/, - message: '综合收单商户号只能包含数字', + message: '综合收单商户号只能包含数字和字母', trigger: 'change' }; -const custTypeRule = computed(() => { - // 当业务类型不是"公积金缴纳账户"时,客户类型为必填 - if (model.subcategoryName !== '公积金缴纳账户') { - return createRequiredRule('客户类型不能为空'); - } - return []; -}); +// const custTypeRule = computed(() => { +// // 当业务类型不是"公积金缴纳账户"时,客户类型为必填 +// if (model.subcategoryName !== '公积金缴纳账户') { +// return createRequiredRule('客户类型不能为空'); +// } +// return []; +// }); const rules: Record = { subcategoryId: createRequiredRule('业务类型id不能为空'), jbName: createRequiredRule('经办人员名称不能为空'), jbId: createRequiredRule('经办人员营销号不能为空'), + yxName: createRequiredRule('营销人员名称不能为空'), + yxId: createRequiredRule('营销人员营销号不能为空'), subcategoryName: createRequiredRule('业务类型名称不能为空'), date: createRequiredRule('数据日期不能为空'), - custPhoneNo: phonePatternRule, - custId: idCardPatternRule, - custAcctNo: accountPatternRule, - custType: custTypeRule.value, + custName: createRequiredRule('客户名称不能为空'), + custPhoneNo: [phonePatternRule,createRequiredRule('客户手机号不能为空')], + custId: [idCardPatternRule,createRequiredRule('客户手机号不能为空')], + custAcctNo: [accountPatternRule,createRequiredRule('账户号不能为空')], + custType: createRequiredRule('客户类型不能为空'), acquiringId: acquiringIdPatternRule }; -const showMarketingFields = ref(false); +// const showMarketingFields = ref(false); function handleUpdateModelWhenEdit() { if (props.operateType === 'add') { Object.assign(model, createDefaultModel()); - model.jbId = userInfo.user?.userId; + model.jbId = userInfo.user?.mktNo; model.jbName = userInfo.user?.nickName; + model.yxId = userInfo.user?.mktNo; + model.yxName = userInfo.user?.nickName; model.deptId = userInfo.user?.deptId; model.deptName = userInfo.user?.deptName; return; @@ -165,11 +170,11 @@ function handleUpdateModelWhenEdit() { } Object.assign(model, createDefaultModel(), props.rowData); // 根据是否有营销人员信息决定是否勾选复选框 - if (model.yxName || model.yxId) { - showMarketingFields.value = true; - } else { - showMarketingFields.value = false; - } + // if (model.yxName || model.yxId) { + // showMarketingFields.value = true; + // } else { + // showMarketingFields.value = false; + // } } } @@ -340,13 +345,13 @@ function handleSubcategoryNameUpdate(value: string, option: CommonType.Option { - if (!newValue) { - // 清空营销人员相关字段 - model.yxName = ''; - model.yxId = ''; - } -}); +// watch(showMarketingFields, newValue => { +// if (!newValue) { +// // 清空营销人员相关字段 +// model.yxName = ''; +// model.yxId = ''; +// } +// }); // 监听客户类型变化,当切换为对公时清空电话和身份证号 watch( @@ -366,6 +371,7 @@ watch( // 判断业务类型 const isdisplaycustinfo = ref(false); +const isdisplaycustTypeinfo = ref(false); const isdisplaymagneticCardList = ref(false); const isdisplayacquiringName = ref(false); const isdisplayacquiringId = ref(false); @@ -378,6 +384,16 @@ const isdisplayheatingNo = ref(false); watch( () => model.subcategoryName, newVal => { + // 判断客户类型 + if(newVal === '新增综合收单商户(首月)'){ + isdisplaycustTypeinfo.value = true; + }else if(newVal === '智e通(企业版)'){ + model.custType = '2'; + isdisplaycustTypeinfo.value = false; + }else{ + model.custType = '1'; + isdisplaycustTypeinfo.value = false; + } switch (newVal) { case '公积金缴纳账户': isdisplaycustinfo.value = false; @@ -398,6 +414,7 @@ watch( break; case '磁条卡更换金融IC卡': isdisplaycustinfo.value = true; + model.custType = '1'; isdisplaymagneticCardList.value = true; isdisplayacquiringName.value = false; isdisplayacquiringId.value = false; @@ -478,7 +495,7 @@ watch( model.magneticCardList = []; model.acquiringName = ''; model.acquiringId = ''; - model.internetChannel = ''; + model.internetChannel = []; model.trafficList = []; model.workplace = ''; model.surplusAccountName = ''; @@ -558,13 +575,14 @@ watch(visible, () => { filterable placeholder="选择经办人员" :options="operatorIdOptions" + :disabled="true" @update:value="handleJbNameUpdate" /> - + @@ -572,25 +590,26 @@ watch(visible, () => { - - - 勾选以填写营销人员信息 - - - + + + + + + - + - + @@ -607,6 +626,7 @@ watch(visible, () => { placeholder="选择业务类型" :options="subcategoryIdOptions" :disabled="operateType === 'edit'" + clearable @update:value="handleSubcategoryNameUpdate" /> @@ -634,7 +654,7 @@ watch(visible, () => {
客户信息 - + @@ -787,4 +807,9 @@ watch(visible, () => { - + diff --git a/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/MpsMarket.java b/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/MpsMarket.java index 27ee615..4b62ba5 100644 --- a/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/MpsMarket.java +++ b/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/MpsMarket.java @@ -80,7 +80,7 @@ public class MpsMarket extends TenantEntity { /** * 部门id */ - private Integer deptId; + private Long deptId; /** * 客户类型(1-个人,2-对公) diff --git a/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/bo/MpsMarketBo.java b/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/bo/MpsMarketBo.java index 8c4ed11..424a827 100644 --- a/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/bo/MpsMarketBo.java +++ b/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/bo/MpsMarketBo.java @@ -46,6 +46,7 @@ public class MpsMarketBo extends BaseEntity { /** * 营销人员名称 */ + @NotBlank(message = "营销人员名称不能为空", groups = { AddGroup.class, EditGroup.class }) private String yxName; /** @@ -57,6 +58,7 @@ public class MpsMarketBo extends BaseEntity { /** * 营销人员营销号 */ + @NotBlank(message = "营销人员营销号不能为空", groups = { AddGroup.class, EditGroup.class }) private String yxId; /** @@ -80,7 +82,7 @@ public class MpsMarketBo extends BaseEntity { /** * 部门id */ - private Integer deptId; + private Long deptId; /** * 客户类型(1-个人,2-对公) @@ -130,8 +132,9 @@ public class MpsMarketBo extends BaseEntity { /** * 网上支付开通渠道 */ - @AutoMapping(target = "internetChannel", expression = "java(java.lang.String.join(\",\", source.getInternetChannel()))") + @AutoMapping(target = "internetChannel", expression = "java(source.getInternetChannel()==null ? null : java.lang.String.join(\",\", source.getInternetChannel()))") private List internetChannel; +// private String internetChannel; /** * 交警处罚决定书 diff --git a/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/vo/MpsMarketVo.java b/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/vo/MpsMarketVo.java index fa29375..772d4bf 100644 --- a/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/vo/MpsMarketVo.java +++ b/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/domain/vo/MpsMarketVo.java @@ -92,7 +92,7 @@ public class MpsMarketVo implements Serializable { * 部门id */ @ExcelProperty(value = "部门id") - private Integer deptId; + private Long deptId; /** * 客户类型(1-个人,2-对公) diff --git a/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/service/impl/MpsMarketServiceImpl.java b/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/service/impl/MpsMarketServiceImpl.java index 0e8c207..1c2ba8c 100644 --- a/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/service/impl/MpsMarketServiceImpl.java +++ b/cds-platform-2025.V1/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/mps/service/impl/MpsMarketServiceImpl.java @@ -101,8 +101,21 @@ public class MpsMarketServiceImpl implements IMpsMarketService { LambdaQueryWrapper lqw = buildQueryWrapper(bo); // PageDTO result = baseMapper.selectVoPage(pageQuery.build(), lqw); Page result = baseMapper.selectPageMpsMarketList(pageQuery.build(), lqw); - result.getRecords().forEach(r -> r.setMagneticCardList(magneticcardMapper.selectVoList(new LambdaQueryWrapper().eq(MpsMagneticcard::getMagneticCardId, r.getMagneticCardId())))); - result.getRecords().forEach(r -> r.setTrafficList(TrafficMapper.selectVoList(new LambdaQueryWrapper().eq(MpsTraffic::getTrafficId, r.getTrafficId())))); + result.getRecords().forEach(r -> { + if (r.getMagneticCardId() != null) { + r.setMagneticCardList(magneticcardMapper.selectVoList( + new LambdaQueryWrapper() + .eq(MpsMagneticcard::getMagneticCardId, r.getMagneticCardId()) + )); + } + if (r.getTrafficId() != null) { + r.setTrafficList(TrafficMapper.selectVoList( + new LambdaQueryWrapper() + .eq(MpsTraffic::getTrafficId, r.getTrafficId()) + )); + } + }); +// result.getRecords().forEach(r -> r.setTrafficList(TrafficMapper.selectVoList(new LambdaQueryWrapper().eq(MpsTraffic::getTrafficId, r.getTrafficId())))); return TableDataInfo.build(result); } @@ -192,21 +205,21 @@ public class MpsMarketServiceImpl implements IMpsMarketService { */ private void validEntityBeforeAdd(MpsMarket entity){ //TODO 做一些数据校验,如唯一约束,非空校验 - if (StringUtils.isEmpty(entity.getSubcategoryName())) { - throw new ServiceException("请填写业务子类名称"); - } - if (null == entity.getSubcategoryId()) { - throw new ServiceException("请填写业务子类ID"); - } - if (StringUtils.isEmpty(entity.getJbName())) { - throw new ServiceException("请填写经办人员名称"); - } - if (StringUtils.isEmpty(entity.getJbId())) { - throw new ServiceException("请填写经办人员ID"); - } - if (entity.getDate() == null) { - throw new ServiceException("请填写日期"); - } +// if (StringUtils.isEmpty(entity.getSubcategoryName())) { +// throw new ServiceException("请填写业务子类名称"); +// } +// if (null == entity.getSubcategoryId()) { +// throw new ServiceException("请填写业务子类ID"); +// } +// if (StringUtils.isEmpty(entity.getJbName())) { +// throw new ServiceException("请填写经办人员名称"); +// } +// if (StringUtils.isEmpty(entity.getJbId())) { +// throw new ServiceException("请填写经办人员ID"); +// } +// if (entity.getDate() == null) { +// throw new ServiceException("请填写日期"); +// } //判重 //客户类型(1-个人,2-对公) //个人判断身份证号,对公判断账户号