ui调整
This commit is contained in:
45
openspec/changes/add-execute-rate-ui/proposal.md
Normal file
45
openspec/changes/add-execute-rate-ui/proposal.md
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# 提案: 添加执行利率设定前端功能
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
后端已经实现了执行利率设定接口 `PUT /loanPricing/workflow/{serialNum}/executeRate`,并且详情接口 `GET /loanPricing/workflow/{serialNum}` 已经返回 `executeRate` 字段。但前端缺少相应的 UI 交互功能,业务人员无法通过界面设定执行利率。
|
||||||
|
|
||||||
|
## 问题
|
||||||
|
|
||||||
|
1. 议价池组件中只显示议价池数据,没有执行利率输入框
|
||||||
|
2. 前端缺少调用设定执行利率接口的 API 方法
|
||||||
|
3. 用户无法通过界面设定或更新执行利率
|
||||||
|
|
||||||
|
## 提案概述
|
||||||
|
|
||||||
|
在流程详情页面的议价池组件中添加执行利率设定功能,允许业务人员输入执行利率并提交。
|
||||||
|
|
||||||
|
### 功能范围
|
||||||
|
|
||||||
|
1. **API 方法**
|
||||||
|
- 在 `ruoyi-ui/src/api/loanPricing/workflow.js` 中添加 `setExecuteRate` 方法
|
||||||
|
|
||||||
|
2. **议价池组件更新**
|
||||||
|
- 在 `BargainingPoolDisplay.vue` 中添加执行利率输入框和提交按钮
|
||||||
|
- 添加执行利率显示/编辑状态的切换
|
||||||
|
- 支持显示已设定的执行利率值
|
||||||
|
- 添加表单验证(利率格式)
|
||||||
|
|
||||||
|
3. **详情页面更新**
|
||||||
|
- 在 `detail.vue` 中传递 `executeRate` 和 `serialNum` 给议价池组件
|
||||||
|
- 添加提交成功后刷新详情的处理
|
||||||
|
|
||||||
|
## 影响范围
|
||||||
|
|
||||||
|
- 前端 API: `ruoyi-ui/src/api/loanPricing/workflow.js`
|
||||||
|
- 前端组件: `ruoyi-ui/src/views/loanPricing/workflow/components/BargainingPoolDisplay.vue`
|
||||||
|
- 前端页面: `ruoyi-ui/src/views/loanPricing/workflow/detail.vue`
|
||||||
|
- 规范: `loan-pricing-workflow-ui` (添加新需求)
|
||||||
|
|
||||||
|
## 设计考虑
|
||||||
|
|
||||||
|
1. **UI 位置**: 在议价池组件中添加新行,保持与现有议价池数据显示的一致性
|
||||||
|
2. **输入验证**: 利率格式验证(数字,可含小数点,范围合理)
|
||||||
|
3. **状态管理**: 编辑/查看状态切换,提交成功后显示最新值
|
||||||
|
4. **用户反馈**: 提交成功/失败的提示消息
|
||||||
|
5. **权限控制**: 后端接口无需特殊权限,前端暂不添加权限控制
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
## ADDED Requirements
|
||||||
|
|
||||||
|
### Requirement: 执行利率设定
|
||||||
|
|
||||||
|
系统 SHALL 在流程详情页面的议价池组件中提供执行利率设定功能,允许用户输入并提交执行利率。
|
||||||
|
|
||||||
|
#### Scenario: 显示未设定的执行利率
|
||||||
|
|
||||||
|
- **WHEN** 用户在流程详情页面查看议价池组件,且该流程尚未设定执行利率
|
||||||
|
- **THEN** 系统在议价池组件中显示"执行利率"行,当前值显示为"-"
|
||||||
|
|
||||||
|
#### Scenario: 显示已设定的执行利率
|
||||||
|
|
||||||
|
- **WHEN** 用户在流程详情页面查看议价池组件,且该流程已设定执行利率
|
||||||
|
- **THEN** 系统在议价池组件中显示"执行利率"行,显示当前设定的执行利率值
|
||||||
|
|
||||||
|
#### Scenario: 进入编辑模式
|
||||||
|
|
||||||
|
- **WHEN** 用户在议价池组件中点击"执行利率"行的编辑按钮
|
||||||
|
- **THEN** 系统切换到编辑模式,显示输入框(预填充当前值或空)、提交按钮和取消按钮
|
||||||
|
|
||||||
|
#### Scenario: 提交执行利率成功
|
||||||
|
|
||||||
|
- **WHEN** 用户在编辑模式下输入有效的执行利率值并点击提交按钮
|
||||||
|
- **THEN** 系统调用 `PUT /loanPricing/workflow/{serialNum}/executeRate` 接口,成功后更新显示值为新设定的利率,显示成功提示消息,并退出编辑模式
|
||||||
|
|
||||||
|
#### Scenario: 提交执行利率失败
|
||||||
|
|
||||||
|
- **WHEN** 用户在编辑模式下提交执行利率,但后端接口返回错误
|
||||||
|
- **THEN** 系统保持编辑模式,显示错误提示消息
|
||||||
|
|
||||||
|
#### Scenario: 取消编辑
|
||||||
|
|
||||||
|
- **WHEN** 用户在编辑模式下点击取消按钮
|
||||||
|
- **THEN** 系统退出编辑模式,恢复显示模式,显示原来的执行利率值
|
||||||
|
|
||||||
|
#### Scenario: 输入验证
|
||||||
|
|
||||||
|
- **WHEN** 用户在编辑模式下输入非法的执行利率值(非数字、超出合理范围)
|
||||||
|
- **THEN** 系统在提交前进行验证,显示错误提示,阻止提交
|
||||||
|
|
||||||
|
#### Scenario: API 接口调用
|
||||||
|
|
||||||
|
- **WHEN** 用户提交执行利率
|
||||||
|
- **THEN** 前端调用 `setExecuteRate(serialNum, executeRate)` API 方法,该方法发送 `PUT /loanPricing/workflow/{serialNum}/executeRate` 请求
|
||||||
85
openspec/changes/add-execute-rate-ui/tasks.md
Normal file
85
openspec/changes/add-execute-rate-ui/tasks.md
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# 实施任务
|
||||||
|
|
||||||
|
## 任务清单
|
||||||
|
|
||||||
|
1. **添加 API 方法**
|
||||||
|
- 文件: `ruoyi-ui/src/api/loanPricing/workflow.js`
|
||||||
|
- 操作: 添加 `setExecuteRate(serialNum, executeRate)` 方法
|
||||||
|
- 请求: `PUT /loanPricing/workflow/{serialNum}/executeRate`
|
||||||
|
- 验证: 方法添加成功
|
||||||
|
|
||||||
|
2. **更新议价池组件 - Props**
|
||||||
|
- 文件: `ruoyi-ui/src/views/loanPricing/workflow/components/BargainingPoolDisplay.vue`
|
||||||
|
- 操作: 添加 `executeRate` 和 `serialNum` props
|
||||||
|
- 验证: props 定义成功
|
||||||
|
|
||||||
|
3. **更新议价池组件 - UI**
|
||||||
|
- 文件: `ruoyi-ui/src/views/loanPricing/workflow/components/BargainingPoolDisplay.vue`
|
||||||
|
- 操作: 在 el-descriptions 中添加"执行利率"行,包含:
|
||||||
|
- 显示模式: 显示当前执行利率值(若无则显示"-")
|
||||||
|
- 编辑模式: 输入框 + 提交按钮 + 取消按钮
|
||||||
|
- 编辑按钮: 在显示模式下点击进入编辑模式
|
||||||
|
- 验证: UI 更新成功
|
||||||
|
|
||||||
|
4. **更新议价池组件 - 数据和逻辑**
|
||||||
|
- 文件: `ruoyi-ui/src/views/loanPricing/workflow/components/BargainingPoolDisplay.vue`
|
||||||
|
- 操作:
|
||||||
|
- 添加 `isEditing` 状态变量
|
||||||
|
- 添加 `tempExecuteRate` 临时输入值
|
||||||
|
- 添加 `handleEdit` 方法进入编辑模式
|
||||||
|
- 添加 `handleSubmit` 方法调用 API 并处理响应
|
||||||
|
- 添加 `handleCancel` 方法取消编辑
|
||||||
|
- 添加输入验证(数字格式、范围检查)
|
||||||
|
- 验证: 逻辑实现完整
|
||||||
|
|
||||||
|
5. **更新议价池组件 - API 调用**
|
||||||
|
- 文件: `ruoyi-ui/src/views/loanPricing/workflow/components/BargainingPoolDisplay.vue`
|
||||||
|
- 操作: 引入 `setExecuteRate` API 方法
|
||||||
|
- 验证: 引入成功
|
||||||
|
|
||||||
|
6. **更新详情页面 - 传递 Props**
|
||||||
|
- 文件: `ruoyi-ui/src/views/loanPricing/workflow/detail.vue`
|
||||||
|
- 操作: 在 BargainingPoolDisplay 组件上传递:
|
||||||
|
- `:execute-rate="workflowDetail.executeRate"`
|
||||||
|
- `:serial-num="workflowDetail.serialNum"`
|
||||||
|
- `@execute-rate-updated="handleExecuteRateUpdated"`
|
||||||
|
- 验证: props 传递正确
|
||||||
|
|
||||||
|
7. **前端功能验证**
|
||||||
|
- 操作:
|
||||||
|
- 启动前端服务
|
||||||
|
- 打开流程详情页面
|
||||||
|
- 测试首次设定执行利率
|
||||||
|
- 测试更新已设定的执行利率
|
||||||
|
- 测试输入验证
|
||||||
|
- 测试取消编辑
|
||||||
|
- 验证:
|
||||||
|
- 未设定时显示"-"
|
||||||
|
- 已设定时显示当前值
|
||||||
|
- 点击编辑按钮进入编辑模式
|
||||||
|
- 输入框显示当前值
|
||||||
|
- 提交成功后显示新值并显示成功提示
|
||||||
|
- 取消编辑恢复显示模式
|
||||||
|
- 输入非法值时显示错误提示
|
||||||
|
|
||||||
|
## 依赖关系
|
||||||
|
|
||||||
|
- 任务 1 必须首先执行(API 方法)
|
||||||
|
- 任务 2-5 依次执行(Props -> UI -> 数据逻辑 -> API 调用)
|
||||||
|
- 任务 6 依赖任务 2
|
||||||
|
- 任务 7 在所有代码任务完成后执行
|
||||||
|
|
||||||
|
## 验收标准
|
||||||
|
|
||||||
|
- [x] API 方法 `setExecuteRate` 添加成功
|
||||||
|
- [x] 议价池组件添加 `executeRate` 和 `serialNum` props
|
||||||
|
- [x] 议价池组件显示执行利率行
|
||||||
|
- [x] 未设定时显示"-"
|
||||||
|
- [x] 已设定时显示当前值
|
||||||
|
- [x] 编辑按钮切换到编辑模式
|
||||||
|
- [x] 输入框显示当前值
|
||||||
|
- [x] 提交按钮调用 API 成功
|
||||||
|
- [x] 提交成功后更新显示并显示成功提示
|
||||||
|
- [x] 取消按钮恢复显示模式
|
||||||
|
- [x] 输入验证正确工作
|
||||||
|
- [x] 详情页面正确传递 props
|
||||||
@@ -25,3 +25,12 @@ export function createWorkflow(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设定执行利率
|
||||||
|
export function setExecuteRate(serialNum, executeRate) {
|
||||||
|
return request({
|
||||||
|
url: '/loanPricing/workflow/' + serialNum + '/executeRate',
|
||||||
|
method: 'put',
|
||||||
|
data: { executeRate: executeRate }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div slot="header" class="card-header">
|
<div slot="header" class="card-header">
|
||||||
<span class="card-title">议价池</span>
|
<span class="card-title">议价池</span>
|
||||||
</div>
|
</div>
|
||||||
<el-descriptions :column="4" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="网点议价池">
|
<el-descriptions-item label="网点议价池">
|
||||||
{{ displayBranchPool }}
|
{{ displayBranchPool }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<template v-if="custType === '个人' && retailOutput">
|
<template v-if="custType === '个人' && retailOutput">
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<el-tab-pane label="基本信息" name="retail-basic">
|
<el-tab-pane label="基本信息" name="retail-basic">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="客户内码">{{ retailOutput.custIsn || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="客户内码">{{ retailOutput.custIsn || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="客户名称">{{ retailOutput.custName || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="客户名称">{{ retailOutput.custName || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="证件类型">{{ retailOutput.idType || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="证件类型">{{ retailOutput.idType || '-' }}</el-descriptions-item>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<!-- 忠诚度分析 -->
|
<!-- 忠诚度分析 -->
|
||||||
<el-tab-pane label="忠诚度分析" name="retail-loyalty">
|
<el-tab-pane label="忠诚度分析" name="retail-loyalty">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="我行首贷客户">{{ formatBoolean(retailOutput.isFirstLoan) }}</el-descriptions-item>
|
<el-descriptions-item label="我行首贷客户">{{ formatBoolean(retailOutput.isFirstLoan) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="用信天数">{{ retailOutput.faithDay || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="用信天数">{{ retailOutput.faithDay || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="客户年龄">{{ retailOutput.custAge || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="客户年龄">{{ retailOutput.custAge || '-' }}</el-descriptions-item>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<!-- 贡献度分析 -->
|
<!-- 贡献度分析 -->
|
||||||
<el-tab-pane label="贡献度分析" name="retail-contribution">
|
<el-tab-pane label="贡献度分析" name="retail-contribution">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="存款年日均">{{ retailOutput.balanceAvg || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="存款年日均">{{ retailOutput.balanceAvg || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="贷款年日均">{{ retailOutput.loanAvg || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="贷款年日均">{{ retailOutput.loanAvg || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="派生率">{{ retailOutput.derivationRate || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="派生率">{{ retailOutput.derivationRate || '-' }}</el-descriptions-item>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<!-- 关联度分析 -->
|
<!-- 关联度分析 -->
|
||||||
<el-tab-pane label="关联度分析" name="retail-relevance">
|
<el-tab-pane label="关联度分析" name="retail-relevance">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="中间业务_个人_信用卡">{{ formatBoolean(retailOutput.midPerCard) }}</el-descriptions-item>
|
<el-descriptions-item label="中间业务_个人_信用卡">{{ formatBoolean(retailOutput.midPerCard) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="中间业务_个人_一码通">{{ formatBoolean(retailOutput.midPerPass) }}</el-descriptions-item>
|
<el-descriptions-item label="中间业务_个人_一码通">{{ formatBoolean(retailOutput.midPerPass) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="中间业务_个人_丰收互联">{{ formatBoolean(retailOutput.midPerHarvest) }}</el-descriptions-item>
|
<el-descriptions-item label="中间业务_个人_丰收互联">{{ formatBoolean(retailOutput.midPerHarvest) }}</el-descriptions-item>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<!-- 贷款特征 -->
|
<!-- 贷款特征 -->
|
||||||
<el-tab-pane label="贷款特征" name="retail-loan">
|
<el-tab-pane label="贷款特征" name="retail-loan">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="申请金额">{{ retailOutput.applyAmt || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="申请金额">{{ retailOutput.applyAmt || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="BP_贷款额度"><span class="bp-value">{{ retailOutput.bpLoanAmount || '-' }}</span></el-descriptions-item>
|
<el-descriptions-item label="BP_贷款额度"><span class="bp-value">{{ retailOutput.bpLoanAmount || '-' }}</span></el-descriptions-item>
|
||||||
<el-descriptions-item label="贷款用途">{{ formatLoanPurpose(retailOutput.loanPurpose) }}</el-descriptions-item>
|
<el-descriptions-item label="贷款用途">{{ formatLoanPurpose(retailOutput.loanPurpose) }}</el-descriptions-item>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
<!-- 风险度分析 -->
|
<!-- 风险度分析 -->
|
||||||
<el-tab-pane label="风险度分析" name="retail-risk">
|
<el-tab-pane label="风险度分析" name="retail-risk">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="灰名单客户">{{ formatBoolean(retailOutput.greyCust) }}</el-descriptions-item>
|
<el-descriptions-item label="灰名单客户">{{ formatBoolean(retailOutput.greyCust) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="本金逾期">{{ formatBoolean(retailOutput.prinOverdue) }}</el-descriptions-item>
|
<el-descriptions-item label="本金逾期">{{ formatBoolean(retailOutput.prinOverdue) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="利息逾期">{{ formatBoolean(retailOutput.interestOverdue) }}</el-descriptions-item>
|
<el-descriptions-item label="利息逾期">{{ formatBoolean(retailOutput.interestOverdue) }}</el-descriptions-item>
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
<!-- 测算结果 -->
|
<!-- 测算结果 -->
|
||||||
<el-tab-pane label="测算结果" name="retail-result">
|
<el-tab-pane label="测算结果" name="retail-result">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="浮动BP"><span class="total-bp-value">{{ retailOutput.totalBp || '-' }}</span></el-descriptions-item>
|
<el-descriptions-item label="浮动BP"><span class="total-bp-value">{{ retailOutput.totalBp || '-' }}</span></el-descriptions-item>
|
||||||
<el-descriptions-item label="测算利率"><span class="calculate-rate">{{ retailOutput.calculateRate || '-' }}</span> %</el-descriptions-item>
|
<el-descriptions-item label="测算利率"><span class="calculate-rate">{{ retailOutput.calculateRate || '-' }}</span> %</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<template v-else-if="custType === '企业' && corpOutput">
|
<template v-else-if="custType === '企业' && corpOutput">
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<el-tab-pane label="基本信息" name="corp-basic">
|
<el-tab-pane label="基本信息" name="corp-basic">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="客户内码">{{ corpOutput.custIsn || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="客户内码">{{ corpOutput.custIsn || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="客户名称">{{ corpOutput.custName || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="客户名称">{{ corpOutput.custName || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="证件类型">{{ corpOutput.idType || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="证件类型">{{ corpOutput.idType || '-' }}</el-descriptions-item>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
|
|
||||||
<!-- 忠诚度分析 -->
|
<!-- 忠诚度分析 -->
|
||||||
<el-tab-pane label="忠诚度分析" name="corp-loyalty">
|
<el-tab-pane label="忠诚度分析" name="corp-loyalty">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="我行首贷客户">{{ formatBoolean(corpOutput.isFirstLoan) }}</el-descriptions-item>
|
<el-descriptions-item label="我行首贷客户">{{ formatBoolean(corpOutput.isFirstLoan) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="用信天数">{{ corpOutput.faithDay || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="用信天数">{{ corpOutput.faithDay || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="BP_首贷"><span class="bp-value">{{ corpOutput.bpFirstLoan || '-' }}</span></el-descriptions-item>
|
<el-descriptions-item label="BP_首贷"><span class="bp-value">{{ corpOutput.bpFirstLoan || '-' }}</span></el-descriptions-item>
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
|
|
||||||
<!-- 贡献度分析 -->
|
<!-- 贡献度分析 -->
|
||||||
<el-tab-pane label="贡献度分析" name="corp-contribution">
|
<el-tab-pane label="贡献度分析" name="corp-contribution">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="存款年日均">{{ corpOutput.balanceAvg || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="存款年日均">{{ corpOutput.balanceAvg || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="贷款年日均">{{ corpOutput.loanAvg || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="贷款年日均">{{ corpOutput.loanAvg || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="派生率">{{ corpOutput.derivationRate || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="派生率">{{ corpOutput.derivationRate || '-' }}</el-descriptions-item>
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
<!-- 关联度分析 -->
|
<!-- 关联度分析 -->
|
||||||
<el-tab-pane label="关联度分析" name="corp-relevance">
|
<el-tab-pane label="关联度分析" name="corp-relevance">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="中间业务_企业_企业互联">{{ formatBoolean(corpOutput.midEntConnect) }}</el-descriptions-item>
|
<el-descriptions-item label="中间业务_企业_企业互联">{{ formatBoolean(corpOutput.midEntConnect) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="中间业务_企业_有效价值客户">{{ formatBoolean(corpOutput.midEntEffect) }}</el-descriptions-item>
|
<el-descriptions-item label="中间业务_企业_有效价值客户">{{ formatBoolean(corpOutput.midEntEffect) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="中间业务_企业_国际业务">{{ formatBoolean(corpOutput.midEntInter) }}</el-descriptions-item>
|
<el-descriptions-item label="中间业务_企业_国际业务">{{ formatBoolean(corpOutput.midEntInter) }}</el-descriptions-item>
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
|
|
||||||
<!-- 企业类别 -->
|
<!-- 企业类别 -->
|
||||||
<el-tab-pane label="企业类别" name="corp-category">
|
<el-tab-pane label="企业类别" name="corp-category">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="净身企业">{{ formatBoolean(corpOutput.isCleanEnt) }}</el-descriptions-item>
|
<el-descriptions-item label="净身企业">{{ formatBoolean(corpOutput.isCleanEnt) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="开立基本结算账户">{{ formatBoolean(corpOutput.hasSettleAcct) }}</el-descriptions-item>
|
<el-descriptions-item label="开立基本结算账户">{{ formatBoolean(corpOutput.hasSettleAcct) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="省农担担保贷款">{{ formatBoolean(corpOutput.isAgriGuar) }}</el-descriptions-item>
|
<el-descriptions-item label="省农担担保贷款">{{ formatBoolean(corpOutput.isAgriGuar) }}</el-descriptions-item>
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
|
|
||||||
<!-- 贷款特征 -->
|
<!-- 贷款特征 -->
|
||||||
<el-tab-pane label="贷款特征" name="corp-loan">
|
<el-tab-pane label="贷款特征" name="corp-loan">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="贷款期限">{{ corpOutput.loanTerm || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="贷款期限">{{ corpOutput.loanTerm || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="BP_贷款期限"><span class="bp-value">{{ corpOutput.bpLoanTerm || '-' }}</span></el-descriptions-item>
|
<el-descriptions-item label="BP_贷款期限"><span class="bp-value">{{ corpOutput.bpLoanTerm || '-' }}</span></el-descriptions-item>
|
||||||
<el-descriptions-item label="申请金额">{{ corpOutput.applyAmt || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="申请金额">{{ corpOutput.applyAmt || '-' }}</el-descriptions-item>
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
|
|
||||||
<!-- 风险度分析 -->
|
<!-- 风险度分析 -->
|
||||||
<el-tab-pane label="风险度分析" name="corp-risk">
|
<el-tab-pane label="风险度分析" name="corp-risk">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="灰名单客户">{{ formatBoolean(corpOutput.greyCust) }}</el-descriptions-item>
|
<el-descriptions-item label="灰名单客户">{{ formatBoolean(corpOutput.greyCust) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="本金逾期">{{ formatBoolean(corpOutput.prinOverdue) }}</el-descriptions-item>
|
<el-descriptions-item label="本金逾期">{{ formatBoolean(corpOutput.prinOverdue) }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="利息逾期">{{ formatBoolean(corpOutput.interestOverdue) }}</el-descriptions-item>
|
<el-descriptions-item label="利息逾期">{{ formatBoolean(corpOutput.interestOverdue) }}</el-descriptions-item>
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
|
|
||||||
<!-- 测算结果 -->
|
<!-- 测算结果 -->
|
||||||
<el-tab-pane label="测算结果" name="corp-result">
|
<el-tab-pane label="测算结果" name="corp-result">
|
||||||
<el-descriptions :column="3" border size="small">
|
<el-descriptions :column="2" border size="small">
|
||||||
<el-descriptions-item label="浮动BP"><span class="total-bp-value">{{ corpOutput.totalBp || '-' }}</span></el-descriptions-item>
|
<el-descriptions-item label="浮动BP"><span class="total-bp-value">{{ corpOutput.totalBp || '-' }}</span></el-descriptions-item>
|
||||||
<el-descriptions-item label="测算利率"><span class="calculate-rate">{{ corpOutput.calculateRate || '-' }}</span> %</el-descriptions-item>
|
<el-descriptions-item label="测算利率"><span class="calculate-rate">{{ corpOutput.calculateRate || '-' }}</span> %</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|||||||
@@ -28,6 +28,25 @@
|
|||||||
<el-descriptions-item label="测算利率">
|
<el-descriptions-item label="测算利率">
|
||||||
<span class="calculate-rate">{{ getCalculateRate() }}</span> %
|
<span class="calculate-rate">{{ getCalculateRate() }}</span> %
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<!-- 执行利率输入区域 -->
|
||||||
|
<el-descriptions-item label="执行利率" :class="'execute-rate-item'">
|
||||||
|
<div class="execute-rate-input-wrapper">
|
||||||
|
<el-input
|
||||||
|
v-model="executeRateInput"
|
||||||
|
class="execute-rate-input"
|
||||||
|
placeholder="请输入执行利率"
|
||||||
|
>
|
||||||
|
<template slot="append">%</template>
|
||||||
|
</el-input>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleSetExecuteRate"
|
||||||
|
>
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@@ -115,7 +134,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getWorkflow } from "@/api/loanPricing/workflow"
|
import { getWorkflow, setExecuteRate } from "@/api/loanPricing/workflow"
|
||||||
import ModelOutputDisplay from "./components/ModelOutputDisplay.vue"
|
import ModelOutputDisplay from "./components/ModelOutputDisplay.vue"
|
||||||
import BargainingPoolDisplay from "./components/BargainingPoolDisplay.vue"
|
import BargainingPoolDisplay from "./components/BargainingPoolDisplay.vue"
|
||||||
|
|
||||||
@@ -132,7 +151,16 @@ export default {
|
|||||||
retailOutput: null,
|
retailOutput: null,
|
||||||
corpOutput: null,
|
corpOutput: null,
|
||||||
bargainingPool: null,
|
bargainingPool: null,
|
||||||
activeTab: 'basic'
|
activeTab: 'basic',
|
||||||
|
executeRateInput: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'workflowDetail.executeRate': {
|
||||||
|
handler(newVal) {
|
||||||
|
this.executeRateInput = newVal || ''
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -202,6 +230,35 @@ export default {
|
|||||||
return this.corpOutput.calculateRate || '-'
|
return this.corpOutput.calculateRate || '-'
|
||||||
}
|
}
|
||||||
return '-'
|
return '-'
|
||||||
|
},
|
||||||
|
/** 设定执行利率 */
|
||||||
|
handleSetExecuteRate() {
|
||||||
|
// 验证输入
|
||||||
|
const value = this.executeRateInput
|
||||||
|
if (value === null || value === undefined || value === '') {
|
||||||
|
this.$modal.msgError("请输入执行利率")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证是否为有效数字
|
||||||
|
const numValue = parseFloat(value)
|
||||||
|
if (isNaN(numValue)) {
|
||||||
|
this.$modal.msgError("请输入有效的数字")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (numValue < 0 || numValue > 100) {
|
||||||
|
this.$modal.msgError("执行利率必须在 0 到 100 之间")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用 API
|
||||||
|
setExecuteRate(this.workflowDetail.serialNum, value.toString()).then(() => {
|
||||||
|
this.$modal.msgSuccess("执行利率设定成功")
|
||||||
|
// 重新获取详情数据
|
||||||
|
this.getDetail()
|
||||||
|
}).catch(error => {
|
||||||
|
this.$modal.msgError("设定失败:" + (error.msg || error.message || "未知错误"))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -257,6 +314,18 @@ export default {
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 执行利率输入区域
|
||||||
|
.execute-rate-input-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.execute-rate-input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 利率值样式
|
// 利率值样式
|
||||||
.rate-value {
|
.rate-value {
|
||||||
color: #67c23a;
|
color: #67c23a;
|
||||||
|
|||||||
Reference in New Issue
Block a user