parent
a9d1f93311
commit
06a6fae1a8
13 changed files with 314 additions and 216 deletions
After Width: | Height: | Size: 2.5 KiB |
@ -0,0 +1,140 @@ |
||||
<template> |
||||
<div class="max-h-[calc(100vh-280px)] overflow-auto"> |
||||
<el-form ref="formRef" |
||||
label-width="100px" |
||||
label-suffix=":" |
||||
class="form" |
||||
status-icon> |
||||
<h6 class="title">单个银行账户</h6> |
||||
<el-form-item label="收益计算"> |
||||
<div> |
||||
<p class="text leading-[32px] ">收入 = 收回的本金 + 利息</p> |
||||
<p class="text leading-[32px] ">成本 = 贷出去未收回的本金 + 购买渠道金额</p> |
||||
<p class="text leading-[32px] ">收益 = 收入 - 成本</p> |
||||
</div> |
||||
</el-form-item> |
||||
<el-form-item label="银行资产"> |
||||
<div class="flex-1"> |
||||
<div class="flex items-center"> |
||||
<span class="text">起始金额</span> |
||||
<el-input class="w-[140px] mx-2" |
||||
v-model="form[0].startingAmount"></el-input> |
||||
<span class="text">万元</span> |
||||
</div> |
||||
<p class="text mt-4">银行账户金额 = 起始金额 + 累计收益</p> |
||||
</div> |
||||
</el-form-item> |
||||
|
||||
<h6 class="title">单个保险账户</h6> |
||||
<el-form-item label="收益计算"> |
||||
<div> |
||||
<p class="text leading-[32px] ">收入 = 收到的保费</p> |
||||
<p class="text leading-[32px] ">成本 = 赔偿金 + 购买渠道金额</p> |
||||
<p class="text leading-[32px] ">收益 = 收入 - 成本</p> |
||||
</div> |
||||
</el-form-item> |
||||
<el-form-item label="保险资产"> |
||||
<div class="flex-1"> |
||||
<div class="flex items-center"> |
||||
<span class="text">起始金额</span> |
||||
<el-input class="w-[140px] mx-2" |
||||
v-model="form[1].startingAmount"></el-input> |
||||
<span class="text">万元</span> |
||||
</div> |
||||
<p class="text mt-4">保险账户金额 = 起始金额 + 累计收益</p> |
||||
</div> |
||||
</el-form-item> |
||||
|
||||
<h6 class="title">单个基金账户</h6> |
||||
<el-form-item label="冻结账户"> |
||||
<div> |
||||
<p class="text leading-[32px] ">冻结账户金额 = 申购金额 + 赎回金额</p> |
||||
<p class="text leading-[32px] ">(基金申购以及赎回确认份额期间)</p> |
||||
</div> |
||||
</el-form-item> |
||||
<el-form-item label="收益计算"> |
||||
<div> |
||||
<p class="text leading-[32px] ">收入 = 申购费用 + 管理费用 + 托管费用 + 销售服务费用 + 赎回费用</p> |
||||
<p class="text leading-[32px] ">成本 = 购买渠道金额</p> |
||||
<p class="text leading-[32px] ">收益 = 申购费用 + 管理费用 + 托管费用 + 销售服务费用 + 赎回费用</p> |
||||
</div> |
||||
</el-form-item> |
||||
<el-form-item label="基金资产:"> |
||||
<div class="flex-1"> |
||||
<div class="flex items-center"> |
||||
<span class="text">起始金额:</span> |
||||
<el-input class="w-[140px] mx-2" |
||||
v-model="form[2].startingAmount"></el-input> |
||||
<span class="text">万元</span> |
||||
</div> |
||||
<p class="text mt-4">基金账户金额 = 所有基金资产净值+起始金额 + 累计收益 - 购买渠道金额</p> |
||||
</div> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
|
||||
<div class="flex justify-end"> |
||||
<div class="submit" |
||||
@click="submit">保存修改</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup lang="ts"> |
||||
import { ref, onMounted } from 'vue'; |
||||
import { ElMessage } from 'element-plus'; |
||||
import { financialMarketFind, financialMarketSave } from '@/api/config'; |
||||
|
||||
const form = ref<Record<string, any>[]>([ |
||||
{ |
||||
accountTypeId: 1, |
||||
distinguish: 2, |
||||
startingAmount: '', |
||||
}, |
||||
{ |
||||
accountTypeId: 2, |
||||
distinguish: 2, |
||||
startingAmount: '', |
||||
}, |
||||
{ |
||||
accountTypeId: 3, |
||||
distinguish: 2, |
||||
startingAmount: '', |
||||
}, |
||||
]); |
||||
|
||||
const getInfo = async () => { |
||||
const { data } = await financialMarketFind(); |
||||
// res1.list.map((e) => { |
||||
// e.startingAmount = ''; |
||||
// }); |
||||
if (data.length) form.value = data; |
||||
}; |
||||
|
||||
const submit = async () => { |
||||
if (form.value[0].startingAmount === '' || isNaN(form.value[0].startingAmount)) return ElMessage.error('请输入合理的银行起始金额'); |
||||
if (form.value[1].startingAmount === '' || isNaN(form.value[1].startingAmount)) return ElMessage.error('请输入合理的保险起始金额'); |
||||
if (form.value[2].startingAmount === '' || isNaN(form.value[2].startingAmount)) return ElMessage.error('请输入合理的基金起始金额'); |
||||
|
||||
await financialMarketSave({ moneyAllocationList: form.value }); |
||||
ElMessage.success('保存成功!'); |
||||
getInfo(); |
||||
}; |
||||
|
||||
onMounted(() => { |
||||
getInfo(); |
||||
}); |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
@import url(../../styles/form.scss); |
||||
.title { |
||||
@apply flex items-center mb-5 text-base text-[#222D42] font-semibold; |
||||
&:before { |
||||
content: ''; |
||||
@apply w-1 h-4 mr-2 bg-[#006BFF] rounded-sm; |
||||
} |
||||
} |
||||
.text { |
||||
@apply whitespace-nowrap text-sm text-[#333]; |
||||
} |
||||
</style> |
Loading…
Reference in new issue