From 3180c33500a8b592efe34208a716122e8e03d26f Mon Sep 17 00:00:00 2001 From: wkc <978997012@qq.com> Date: Wed, 29 Apr 2026 14:13:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7=E5=8F=B7?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=B9=B6=E5=9B=9E=E5=A1=AB=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eport-2026-04-29-customer-map-selection.md | 60 ++++++++++ .../src/main/resources/application-dev.yml | 4 + .../src/main/resources/application-pro.yml | 5 + .../src/main/resources/application-uat.yml | 4 + .../LoanPricingWorkflowController.java | 24 ++++ .../LoanRatePricingMockController.java | 46 ++++++++ .../domain/vo/CustomerMapRecordVO.java | 35 ++++++ .../LoanPricingCustomerMapService.java | 89 +++++++++++++++ ruoyi-ui/src/api/loanPricing/workflow.js | 18 +++ .../components/CorporateCreateDialog.vue | 26 +++-- .../components/CustomerMapSelector.vue | 103 ++++++++++++++++++ .../components/PersonalCreateDialog.vue | 26 +++-- .../src/views/loanPricing/workflow/index.vue | 56 +++++++++- 13 files changed, 474 insertions(+), 22 deletions(-) create mode 100644 doc/implementation-report-2026-04-29-customer-map-selection.md create mode 100644 ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/domain/vo/CustomerMapRecordVO.java create mode 100644 ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/service/LoanPricingCustomerMapService.java create mode 100644 ruoyi-ui/src/views/loanPricing/workflow/components/CustomerMapSelector.vue diff --git a/doc/implementation-report-2026-04-29-customer-map-selection.md b/doc/implementation-report-2026-04-29-customer-map-selection.md new file mode 100644 index 0000000..f53f6c1 --- /dev/null +++ b/doc/implementation-report-2026-04-29-customer-map-selection.md @@ -0,0 +1,60 @@ +# 2026-04-29 客户号查询选择客户内码实施记录 + +## 修改内容 + +- 后端新增个人/企业客户号映射业务接口: + - `GET /loanPricing/workflow/customer-map/personal?custId=...` + - `GET /loanPricing/workflow/customer-map/corporate?custId=...` +- 后端新增个人/企业客户号映射 mock 接口: + - `GET /rate/pricing/mock/customer-map/personal?cust_id=...` + - `GET /rate/pricing/mock/customer-map/corporate?cust_id=...` +- 配置文件新增 `customer-map` 个人/企业地址,并在 `dev`、`uat`、`pro` profile 中统一指向本项目 mock。 +- 前端新增客户号查询选择弹窗。 +- 客户号查询选择弹窗宽度调整为窗口宽度的 `80%`。 +- 客户号查询输入值在查询前去除前后空格;后端转发个人/企业客户号映射接口前同步去除前后空格,并对下游 `cust_id` 查询参数做 URI 编码,避免尾随空格进入 request target 触发 TongWeb `HTTP Status 400`。 +- 选中客户号查询结果后,返回参数 `cust_id` 去除前三位后自动回填到新增弹窗基础信息的 `证件号码` 字段。 +- 个人/企业新增流程改为先查询客户号、选择客户内码,再打开新增弹窗。 +- 新增弹窗客户内码和客户名称由选中记录自动带入并只读。 + +## 验证结果 + +- 后端针对性测试:通过。 + - 命令:`mvn -pl ruoyi-loan-pricing -am -Dtest=CustomerMapRecordVOTest,LoanPricingCustomerMapServiceTest,LoanRatePricingMockControllerCustomerMapTest,LoanPricingWorkflowControllerCustomerMapTest -Dsurefire.failIfNoSpecifiedTests=false test` + - 结果:`Tests run: 8, Failures: 0, Errors: 0, Skipped: 0`。 +- 客户号空格 400 修复补充测试:通过。 + - 命令:`mvn -pl ruoyi-loan-pricing -am -Dtest=LoanPricingCustomerMapServiceTest,LoanRatePricingMockControllerCustomerMapTest -Dsurefire.failIfNoSpecifiedTests=false test` + - 结果:`Tests run: 6, Failures: 0, Errors: 0, Skipped: 0`。 +- 后端打包与启动验证:通过。 + - 命令:`mvn -pl ruoyi-admin -am -DskipTests package` + - 命令:`java -jar ruoyi-admin/target/ruoyi-admin.jar --spring.profiles.active=dev` + - 结果:后端以 `dev` profile 启动成功,端口 `63310` 可用。 +- 接口验证:通过。 + - `GET /rate/pricing/mock/customer-map/personal?cust_id=P001` 返回随机个人客户映射列表,字段为 `cust_id`、`cust_isn`、`cust_name`、`faith_day`、`balance_avg`、`loan_count_his`、`last_loan_date`。 + - `GET /rate/pricing/mock/customer-map/corporate?cust_id=C001` 返回随机企业客户映射列表,字段同上。 + - `GET /rate/pricing/mock/customer-map/personal?cust_id=` 返回 `客户号不能为空`。 + - 登录后调用 `GET /loanPricing/workflow/customer-map/personal?custId=P001` 和 `GET /loanPricing/workflow/customer-map/corporate?custId=C001` 均返回对应映射列表。 + - 登录后调用 `GET /loanPricing/workflow/customer-map/personal?custId=` 返回 `客户号不能为空`。 + - 补充验证:以最新后端临时端口 `63311` 调用 `GET /loanPricing/workflow/customer-map/personal?custId=1w0xc20xb7%20` 返回 `code=200`,返回 `cust_id` 为 `1w0xc20xb7`;调用 `GET /loanPricing/workflow/customer-map/corporate?custId=C001%20` 返回 `code=200`,返回 `cust_id` 为 `C001`;调用 `GET /loanPricing/workflow/customer-map/personal?custId=%20` 返回 `客户号不能为空`。 +- 前端针对性测试:通过。 + - 命令:`zsh -lic 'nvm use 14.21.3 >/dev/null && node ruoyi-ui/tests/customer-map-selection.test.js && npm --prefix ruoyi-ui run test:personal-create-input-params && npm --prefix ruoyi-ui run test:corporate-create-input-params && node ruoyi-ui/tests/workflow-index-refresh.test.js'` + - 结果:`customer map selection assertions passed`、`personal create input params assertions passed`、`corporate create input params assertions passed`、`workflow-index-refresh test passed`。 + - 补充命令:`zsh -lic 'nvm use 14.21.3 >/dev/null && node ruoyi-ui/tests/customer-map-selection.test.js'` + - 补充结果:`customer map selection assertions passed`,覆盖客户号去前三位回填证件号码断言。 + - 补充回归命令:`zsh -lic 'nvm use 14.21.3 >/dev/null && node ruoyi-ui/tests/customer-map-selection.test.js && npm --prefix ruoyi-ui run test:personal-create-input-params && npm --prefix ruoyi-ui run test:corporate-create-input-params && node ruoyi-ui/tests/id-number-validation-removal.test.js'` + - 补充回归结果:`customer map selection assertions passed`、`personal create input params assertions passed`、`corporate create input params assertions passed`、`id number validation removal assertions passed`。 +- 前端生产构建:通过。 + - 命令:`zsh -lic 'nvm use 14.21.3 >/dev/null && npm --prefix ruoyi-ui run build:prod'` + - 结果:构建成功;输出 2 个既有体积 warning。 +- 真实页面验证:通过。 + - 启动前端 `http://localhost:18080/`,登录后进入真实页面 `http://localhost:18080/loanPricing/workflow`。 + - 个人客户:点击 `新增` -> `个人客户` -> 客户号查询输入 `PTEST003` -> 返回多条客户映射 -> 选择首行 -> 打开 `新增个人利率定价流程`,客户内码自动带入 `81000450472`,客户名称自动带入 `个人客户1`,两个字段均为 `readonly`。 + - 企业客户:点击 `新增` -> `企业客户` -> 客户号查询输入 `CTEST001` -> 返回多条客户映射 -> 选择首行 -> 打开 `新增企业利率定价流程`,客户内码自动带入 `81000448819`,客户名称自动带入 `企业客户1`,两个字段均为 `readonly`。 + - 弹窗宽度补充验证:点击 `新增` -> `个人客户` 后,`客户号查询` 弹窗 DOM 样式为 `margin-top: 15vh; width: 80%;`。 + - 客户号空格补充验证:点击 `新增` -> `个人客户`,客户号输入 `1w0xc20xb7 ` 后查询,输入框显示为 `1w0xc20xb7`,列表正常返回客户映射,页面未出现 `400` 或 `Bad Request`。 + - 客户号到证件号码补充验证:点击 `新增` -> `个人客户`,客户号输入 `ABC123456789` 并选择返回行后,新增个人弹窗基础信息的 `证件号码` 自动填入 `123456789`。 + - 页面验证仅验证查询选择与自动回填链路,未提交新增表单,避免写入额外流程测试数据。 +- 回归补充说明: + - `LoanPricingModelServiceTest` 已通过。 + - 组合回归命令包含 `LoanPricingWorkflowServiceImplTest` 时,当前本机 Oracle JDK 21 环境下 Mockito inline/Byte Buddy self-attach 失败,属于既有测试环境限制,不是本次客户号映射功能断言失败。 +- 进程清理:已关闭本次启动的后端和前端进程。 +- 本次宽度与客户号空格补充验证结束后,`18080`、`63311` 无监听;`63310` 为验证前已存在的后端进程,未处理。 diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index b77858f..2e58238 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -82,6 +82,10 @@ model: personal-url: http://localhost:63310/rate/pricing/mock/invokeModel/personal corporate-url: http://localhost:63310/rate/pricing/mock/invokeModel/corporate +customer-map: + personal-url: http://localhost:63310/rate/pricing/mock/customer-map/personal + corporate-url: http://localhost:63310/rate/pricing/mock/customer-map/corporate + security: password-transfer: key: "1234567890abcdef" diff --git a/ruoyi-admin/src/main/resources/application-pro.yml b/ruoyi-admin/src/main/resources/application-pro.yml index 6872549..aace1da 100644 --- a/ruoyi-admin/src/main/resources/application-pro.yml +++ b/ruoyi-admin/src/main/resources/application-pro.yml @@ -81,6 +81,11 @@ spring: model: personal-url: http://64.202.32.40:8083/api/service/interface/invokeService/syllcs corporate-url: http://64.202.32.40:8083/api/service/interface/invokeService/sydgllcs + +customer-map: + personal-url: http://552f7aff0acd4c09ac3b83dbfee57fa0.apigateway.res.dc-pdt-zj96596.com/shangyu_lilvcesuan_ind_idmapno?appCode=1a89fa84abda480ba93ed73fd01ffd07&cust_id= + corporate-url: http://552f7aff0acd4c09ac3b83dbfee57fa0.apigateway.res.dc-pdt-zj96596.com/shangyu_lilvcesuan_ent_idmapno?appCode=1a89fa84abda480ba93ed73fd01ffd07&cust_id= + security: password-transfer: key: "1234567890abcdef" diff --git a/ruoyi-admin/src/main/resources/application-uat.yml b/ruoyi-admin/src/main/resources/application-uat.yml index b06d5ec..77756e5 100644 --- a/ruoyi-admin/src/main/resources/application-uat.yml +++ b/ruoyi-admin/src/main/resources/application-uat.yml @@ -82,6 +82,10 @@ model: personal-url: http://localhost:63310/rate/pricing/mock/invokeModel/personal corporate-url: http://localhost:63310/rate/pricing/mock/invokeModel/corporate +customer-map: + personal-url: http://localhost:63310/rate/pricing/mock/customer-map/personal + corporate-url: http://localhost:63310/rate/pricing/mock/customer-map/corporate + security: password-transfer: key: "1234567890abcdef" diff --git a/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanPricingWorkflowController.java b/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanPricingWorkflowController.java index 615d98c..fc465ff 100644 --- a/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanPricingWorkflowController.java +++ b/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanPricingWorkflowController.java @@ -15,6 +15,7 @@ import com.ruoyi.loanpricing.domain.entity.LoanPricingWorkflow; import com.ruoyi.loanpricing.domain.vo.LoanPricingWorkflowListVO; import com.ruoyi.loanpricing.domain.vo.LoanPricingWorkflowVO; import com.ruoyi.loanpricing.service.ILoanPricingWorkflowService; +import com.ruoyi.loanpricing.service.LoanPricingCustomerMapService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -38,6 +39,9 @@ public class LoanPricingWorkflowController extends BaseController @Autowired private ILoanPricingWorkflowService loanPricingWorkflowService; + @Autowired + private LoanPricingCustomerMapService customerMapService; + /** * 发起个人客户利率定价流程 */ @@ -61,6 +65,26 @@ public class LoanPricingWorkflowController extends BaseController return success(result); } + /** + * 查询个人客户号映射 + */ + @Operation(summary = "查询个人客户号映射") + @GetMapping("/customer-map/personal") + public AjaxResult queryPersonalCustomerMap(@RequestParam("custId") String custId) + { + return success(customerMapService.queryPersonal(custId)); + } + + /** + * 查询企业客户号映射 + */ + @Operation(summary = "查询企业客户号映射") + @GetMapping("/customer-map/corporate") + public AjaxResult queryCorporateCustomerMap(@RequestParam("custId") String custId) + { + return success(customerMapService.queryCorporate(custId)); + } + /** * 查询利率定价流程列表 */ diff --git a/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanRatePricingMockController.java b/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanRatePricingMockController.java index 09bf49b..b8d5cc5 100644 --- a/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanRatePricingMockController.java +++ b/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/controller/LoanRatePricingMockController.java @@ -6,15 +6,22 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.exception.ServiceException; import com.ruoyi.loanpricing.domain.dto.ModelInvokeDTO; +import com.ruoyi.loanpricing.domain.vo.CustomerMapRecordVO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.core.io.ClassPathResource; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import java.io.InputStream; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ThreadLocalRandom; /** @@ -40,6 +47,22 @@ public class LoanRatePricingMockController extends BaseController { return new AjaxResult(10000, "success", loadJsonFromResource("data/corp_output.json")); } + @Anonymous + @Operation(summary = "模拟个人客户号映射查询") + @GetMapping("/customer-map/personal") + public AjaxResult queryPersonalCustomerMap(@RequestParam("cust_id") String custId) + { + return success(randomCustomerMapRecords(custId, "个人客户")); + } + + @Anonymous + @Operation(summary = "模拟企业客户号映射查询") + @GetMapping("/customer-map/corporate") + public AjaxResult queryCorporateCustomerMap(@RequestParam("cust_id") String custId) + { + return success(randomCustomerMapRecords(custId, "企业客户")); + } + private ObjectNode loadJsonFromResource(String resourcePath){ ClassPathResource classPathResource = new ClassPathResource(resourcePath); try (InputStream inputStream = classPathResource.getInputStream();){ @@ -51,5 +74,28 @@ public class LoanRatePricingMockController extends BaseController { } } + private List randomCustomerMapRecords(String custId, String namePrefix) + { + String normalizedCustId = StringUtils.trimWhitespace(custId); + if (!StringUtils.hasText(normalizedCustId)) + { + throw new ServiceException("客户号不能为空"); + } + int count = ThreadLocalRandom.current().nextInt(1, 4); + List records = new ArrayList<>(); + for (int i = 1; i <= count; i++) + { + CustomerMapRecordVO record = new CustomerMapRecordVO(); + record.setCustId(normalizedCustId); + record.setCustIsn(String.valueOf(81000000000L + ThreadLocalRandom.current().nextInt(1000000))); + record.setCustName(namePrefix + i); + record.setFaithDay(String.valueOf(ThreadLocalRandom.current().nextInt(1, 365))); + record.setBalanceAvg(String.valueOf(ThreadLocalRandom.current().nextInt(10000, 900000))); + record.setLoanCountHis(String.valueOf(ThreadLocalRandom.current().nextInt(0, 10))); + record.setLastLoanDate(LocalDate.now().minusDays(ThreadLocalRandom.current().nextInt(1, 800)).toString()); + records.add(record); + } + return records; + } } diff --git a/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/domain/vo/CustomerMapRecordVO.java b/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/domain/vo/CustomerMapRecordVO.java new file mode 100644 index 0000000..297bb15 --- /dev/null +++ b/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/domain/vo/CustomerMapRecordVO.java @@ -0,0 +1,35 @@ +package com.ruoyi.loanpricing.domain.vo; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.Serializable; +import lombok.Data; + +/** + * 客户号与客户内码映射记录。 + */ +@Data +public class CustomerMapRecordVO implements Serializable +{ + private static final long serialVersionUID = 1L; + + @JsonProperty("cust_id") + private String custId; + + @JsonProperty("cust_isn") + private String custIsn; + + @JsonProperty("cust_name") + private String custName; + + @JsonProperty("faith_day") + private String faithDay; + + @JsonProperty("balance_avg") + private String balanceAvg; + + @JsonProperty("loan_count_his") + private String loanCountHis; + + @JsonProperty("last_loan_date") + private String lastLoanDate; +} diff --git a/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/service/LoanPricingCustomerMapService.java b/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/service/LoanPricingCustomerMapService.java new file mode 100644 index 0000000..3f50e51 --- /dev/null +++ b/ruoyi-loan-pricing/src/main/java/com/ruoyi/loanpricing/service/LoanPricingCustomerMapService.java @@ -0,0 +1,89 @@ +package com.ruoyi.loanpricing.service; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.loanpricing.domain.vo.CustomerMapRecordVO; +import java.net.URI; +import java.util.Collections; +import java.util.List; +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.util.UriComponentsBuilder; + +/** + * 客户号与客户内码映射查询服务。 + */ +@Service +public class LoanPricingCustomerMapService +{ + private final RestTemplate restTemplate; + + @Value("${customer-map.personal-url}") + private String personalUrl; + + @Value("${customer-map.corporate-url}") + private String corporateUrl; + + public LoanPricingCustomerMapService() + { + this(new RestTemplate()); + } + + LoanPricingCustomerMapService(RestTemplate restTemplate) + { + this.restTemplate = restTemplate; + } + + LoanPricingCustomerMapService(RestTemplate restTemplate, String personalUrl, String corporateUrl) + { + this.restTemplate = restTemplate; + this.personalUrl = personalUrl; + this.corporateUrl = corporateUrl; + } + + public List queryPersonal(String custId) + { + return query(personalUrl, custId); + } + + public List queryCorporate(String custId) + { + return query(corporateUrl, custId); + } + + private List query(String url, String custId) + { + String normalizedCustId = StringUtils.trimWhitespace(custId); + if (!StringUtils.hasText(normalizedCustId)) + { + throw new ServiceException("客户号不能为空"); + } + URI uri = UriComponentsBuilder.fromHttpUrl(url) + .queryParam("cust_id", normalizedCustId) + .build() + .encode() + .toUri(); + CustomerMapResponse response = restTemplate.getForObject(uri, CustomerMapResponse.class); + if (response == null) + { + throw new ServiceException("客户号映射接口无返回"); + } + if (response.getCode() != null && response.getCode() != 200) + { + throw new ServiceException(StringUtils.hasText(response.getMsg()) ? response.getMsg() : "客户号映射查询失败"); + } + return response.getData() == null ? Collections.emptyList() : response.getData(); + } + + @Data + @JsonIgnoreProperties(ignoreUnknown = true) + static class CustomerMapResponse + { + private Integer code; + private String msg; + private List data; + } +} diff --git a/ruoyi-ui/src/api/loanPricing/workflow.js b/ruoyi-ui/src/api/loanPricing/workflow.js index b314a8d..edf967b 100644 --- a/ruoyi-ui/src/api/loanPricing/workflow.js +++ b/ruoyi-ui/src/api/loanPricing/workflow.js @@ -35,6 +35,24 @@ export function createCorporateWorkflow(data) { }) } +// 查询个人客户号映射 +export function queryPersonalCustomerMap(custId) { + return request({ + url: '/loanPricing/workflow/customer-map/personal', + method: 'get', + params: { custId: custId } + }) +} + +// 查询企业客户号映射 +export function queryCorporateCustomerMap(custId) { + return request({ + url: '/loanPricing/workflow/customer-map/corporate', + method: 'get', + params: { custId: custId } + }) +} + // 设定执行利率 export function setExecuteRate(serialNum, executeRate) { return request({ diff --git a/ruoyi-ui/src/views/loanPricing/workflow/components/CorporateCreateDialog.vue b/ruoyi-ui/src/views/loanPricing/workflow/components/CorporateCreateDialog.vue index 537d768..c658f9f 100644 --- a/ruoyi-ui/src/views/loanPricing/workflow/components/CorporateCreateDialog.vue +++ b/ruoyi-ui/src/views/loanPricing/workflow/components/CorporateCreateDialog.vue @@ -7,12 +7,12 @@ - + - + @@ -109,6 +109,10 @@ export default { visible: { type: Boolean, default: false + }, + customerMap: { + type: Object, + default: null } }, data() { @@ -150,10 +154,10 @@ export default { form: { orgCode: '892000', runType: '1', - custIsn: undefined, - custName: undefined, + custIsn: this.customerMap ? this.customerMap.cust_isn : undefined, + custName: this.customerMap ? this.customerMap.cust_name : undefined, idType: undefined, - idNum: undefined, + idNum: this.customerMap ? (this.customerMap.cust_id || '').substring(3) : undefined, guarType: undefined, applyAmt: undefined, loanTerm: undefined, @@ -232,10 +236,10 @@ export default { this.form = { orgCode: '892000', runType: '1', - custIsn: undefined, - custName: undefined, + custIsn: this.customerMap ? this.customerMap.cust_isn : undefined, + custName: this.customerMap ? this.customerMap.cust_name : undefined, idType: undefined, - idNum: undefined, + idNum: this.customerMap ? (this.customerMap.cust_id || '').substring(3) : undefined, guarType: undefined, applyAmt: undefined, loanTerm: undefined, @@ -245,7 +249,11 @@ export default { collThirdParty: false } this.submitting = false - this.resetForm("form") + this.$nextTick(() => { + if (this.$refs.form) { + this.$refs.form.clearValidate() + } + }) }, /** 对话框关闭处理 */ handleClose() { diff --git a/ruoyi-ui/src/views/loanPricing/workflow/components/CustomerMapSelector.vue b/ruoyi-ui/src/views/loanPricing/workflow/components/CustomerMapSelector.vue new file mode 100644 index 0000000..ac84940 --- /dev/null +++ b/ruoyi-ui/src/views/loanPricing/workflow/components/CustomerMapSelector.vue @@ -0,0 +1,103 @@ + + + diff --git a/ruoyi-ui/src/views/loanPricing/workflow/components/PersonalCreateDialog.vue b/ruoyi-ui/src/views/loanPricing/workflow/components/PersonalCreateDialog.vue index 2ce148a..a7282bd 100644 --- a/ruoyi-ui/src/views/loanPricing/workflow/components/PersonalCreateDialog.vue +++ b/ruoyi-ui/src/views/loanPricing/workflow/components/PersonalCreateDialog.vue @@ -7,12 +7,12 @@ - + - + @@ -114,6 +114,10 @@ export default { visible: { type: Boolean, default: false + }, + customerMap: { + type: Object, + default: null } }, data() { @@ -141,10 +145,10 @@ export default { form: { orgCode: '892000', runType: '1', - custIsn: undefined, - custName: undefined, + custIsn: this.customerMap ? this.customerMap.cust_isn : undefined, + custName: this.customerMap ? this.customerMap.cust_name : undefined, idType: undefined, - idNum: undefined, + idNum: this.customerMap ? (this.customerMap.cust_id || '').substring(3) : undefined, guarType: undefined, applyAmt: undefined, loanPurpose: undefined, @@ -224,10 +228,10 @@ export default { this.form = { orgCode: '892000', runType: '1', - custIsn: undefined, - custName: undefined, + custIsn: this.customerMap ? this.customerMap.cust_isn : undefined, + custName: this.customerMap ? this.customerMap.cust_name : undefined, idType: undefined, - idNum: undefined, + idNum: this.customerMap ? (this.customerMap.cust_id || '').substring(3) : undefined, guarType: undefined, applyAmt: undefined, loanPurpose: undefined, @@ -238,7 +242,11 @@ export default { collThirdParty: false } this.submitting = false - this.resetForm("form") + this.$nextTick(() => { + if (this.$refs.form) { + this.$refs.form.clearValidate() + } + }) }, /** 对话框关闭处理 */ handleClose() { diff --git a/ruoyi-ui/src/views/loanPricing/workflow/index.vue b/ruoyi-ui/src/views/loanPricing/workflow/index.vue index 360231b..793a673 100644 --- a/ruoyi-ui/src/views/loanPricing/workflow/index.vue +++ b/ruoyi-ui/src/views/loanPricing/workflow/index.vue @@ -81,17 +81,33 @@ + + + - + - +