Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yuzhenWang
yd-csf-front
Commits
43a80971
Commit
43a80971
authored
Apr 08, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加薪资拆分出账
parent
679e9f3f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
611 additions
and
47 deletions
+611
-47
src/api/financial/commission.js
+72
-21
src/utils/common.js
+4
-0
src/utils/usePositiveDecimal.js
+35
-0
src/views/financialCenter/financialSalary.vue
+496
-24
src/views/sign/policyReceipts/premiumRecon.vue
+4
-2
No files found.
src/api/financial/commission.js
View file @
43a80971
...
@@ -9,7 +9,6 @@ export function getPolicyCommissionList(data) {
...
@@ -9,7 +9,6 @@ export function getPolicyCommissionList(data) {
})
})
}
}
// 生成可出账记录
// 生成可出账记录
export
function
generateCommissionRecord
(
data
)
{
export
function
generateCommissionRecord
(
data
)
{
return
request
({
return
request
({
...
@@ -55,7 +54,7 @@ export function downloadPolicyFortuneAccount(data) {
...
@@ -55,7 +54,7 @@ export function downloadPolicyFortuneAccount(data) {
return
request
({
return
request
({
url
:
'/csf/api/fortune/download/account'
,
url
:
'/csf/api/fortune/download/account'
,
method
:
'post'
,
method
:
'post'
,
data
:
data
,
data
:
data
})
})
}
}
...
@@ -257,7 +256,6 @@ export function commissionEntryEditRecords(data) {
...
@@ -257,7 +256,6 @@ export function commissionEntryEditRecords(data) {
})
})
}
}
// 获取保单发佣列表
// 获取保单发佣列表
export
function
policyNoCommissionPayRecord
(
data
)
{
export
function
policyNoCommissionPayRecord
(
data
)
{
return
request
({
return
request
({
...
@@ -303,7 +301,7 @@ export function updateCommissionExpected(data) {
...
@@ -303,7 +301,7 @@ export function updateCommissionExpected(data) {
}
}
// 修改出账状态
// 修改出账状态
export
function
updataPayrollStatus
(
data
){
export
function
updataPayrollStatus
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/fortune/update/status'
,
url
:
'/csf/api/fortune/update/status'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -312,7 +310,7 @@ export function updataPayrollStatus(data){
...
@@ -312,7 +310,7 @@ export function updataPayrollStatus(data){
}
}
// 批量新增检核记录
// 批量新增检核记录
export
function
addPayrollCheckRecord
(
data
){
export
function
addPayrollCheckRecord
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/commission/addBatch'
,
url
:
'/csf/api/commission/addBatch'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -321,7 +319,7 @@ export function addPayrollCheckRecord(data){
...
@@ -321,7 +319,7 @@ export function addPayrollCheckRecord(data){
}
}
// 新增应收款
// 新增应收款
export
function
addReceivedFortune
(
data
){
export
function
addReceivedFortune
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/CommissionExpected/add'
,
url
:
'/csf/api/CommissionExpected/add'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -330,7 +328,7 @@ export function addReceivedFortune(data){
...
@@ -330,7 +328,7 @@ export function addReceivedFortune(data){
}
}
// 新增出账记录
// 新增出账记录
export
function
addPayRecord
(
data
){
export
function
addPayRecord
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/expectedFortune/add'
,
url
:
'/csf/api/expectedFortune/add'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -338,14 +336,14 @@ export function addPayRecord(data){
...
@@ -338,14 +336,14 @@ export function addPayRecord(data){
})
})
}
}
// 获取销售员详情
// 获取销售员详情
export
function
userSaleExpandDetail
(
data
){
export
function
userSaleExpandDetail
(
data
)
{
return
request
({
return
request
({
url
:
'/insurance/base/api/userSaleExpand/detail?userSaleBizId='
+
data
,
url
:
'/insurance/base/api/userSaleExpand/detail?userSaleBizId='
+
data
,
method
:
'get'
,
method
:
'get'
})
})
}
}
// 更新比对状态
// 更新比对状态
export
function
updateCompareStatus
(
data
){
export
function
updateCompareStatus
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/commission/updateCompareStatus'
,
url
:
'/csf/api/commission/updateCompareStatus'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -354,7 +352,7 @@ export function updateCompareStatus(data){
...
@@ -354,7 +352,7 @@ export function updateCompareStatus(data){
}
}
// 更新数据
// 更新数据
export
function
updateCommissionRecord
(
data
){
export
function
updateCommissionRecord
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/commission/update'
,
url
:
'/csf/api/commission/update'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -363,7 +361,7 @@ export function updateCommissionRecord(data){
...
@@ -363,7 +361,7 @@ export function updateCommissionRecord(data){
}
}
// 新增出账检核记录
// 新增出账检核记录
export
function
addCheckRecordaddBatch
(
data
){
export
function
addCheckRecordaddBatch
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/fortune/addBatch'
,
url
:
'/csf/api/fortune/addBatch'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -372,7 +370,7 @@ export function addCheckRecordaddBatch(data){
...
@@ -372,7 +370,7 @@ export function addCheckRecordaddBatch(data){
}
}
// 设置本期出账金额
// 设置本期出账金额
export
function
updatePayoutAmount
(
data
){
export
function
updatePayoutAmount
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/fortune/update'
,
url
:
'/csf/api/fortune/update'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -381,7 +379,7 @@ export function updatePayoutAmount(data){
...
@@ -381,7 +379,7 @@ export function updatePayoutAmount(data){
}
}
// 同步预计来佣
// 同步预计来佣
export
function
syncExpectedCommission
(
data
){
export
function
syncExpectedCommission
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/commission/addToExpected'
,
url
:
'/csf/api/commission/addToExpected'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -389,7 +387,7 @@ export function syncExpectedCommission(data){
...
@@ -389,7 +387,7 @@ export function syncExpectedCommission(data){
})
})
}
}
// 更新出账记录
// 更新出账记录
export
function
updatePayRecord
(
data
){
export
function
updatePayRecord
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/expectedFortune/update'
,
url
:
'/csf/api/expectedFortune/update'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -406,10 +404,10 @@ export function exportPayRecord(data) {
...
@@ -406,10 +404,10 @@ export function exportPayRecord(data) {
})
})
}
}
// 入账检核重新比对
// 入账检核重新比对
export
function
compareCommissionEntry
(
data
){
export
function
compareCommissionEntry
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/commission/compare?commissionBizId='
+
data
,
url
:
'/csf/api/commission/compare?commissionBizId='
+
data
,
method
:
'get'
,
method
:
'get'
})
})
}
}
...
@@ -418,7 +416,7 @@ export function payableReport(data) {
...
@@ -418,7 +416,7 @@ export function payableReport(data) {
return
request
({
return
request
({
url
:
'/csf/api/expectedFortune/payable_report'
,
url
:
'/csf/api/expectedFortune/payable_report'
,
method
:
'post'
,
method
:
'post'
,
data
:
data
,
data
:
data
})
})
}
}
...
@@ -434,7 +432,7 @@ export function receivableReport(data) {
...
@@ -434,7 +432,7 @@ export function receivableReport(data) {
// 薪资拆分应发信息汇总列表
// 薪资拆分应发信息汇总列表
export
function
salarySummary
(
data
)
{
export
function
salarySummary
(
data
)
{
return
request
({
return
request
({
url
:
'csf/api/salarySplit/summary/page'
,
url
:
'csf/api/salarySplit/summary/page'
,
method
:
'post'
,
method
:
'post'
,
data
:
data
data
:
data
})
})
...
@@ -443,8 +441,61 @@ export function salarySummary(data) {
...
@@ -443,8 +441,61 @@ export function salarySummary(data) {
// 薪资拆分应发信息汇总列表下载---待提供
// 薪资拆分应发信息汇总列表下载---待提供
export
function
exportPayRoll
(
data
)
{
export
function
exportPayRoll
(
data
)
{
return
request
({
return
request
({
url
:
'csf/api/salarySplit/export/summary/list'
,
url
:
'csf/api/salarySplit/export/summary/list'
,
method
:
'post'
,
method
:
'post'
,
data
:
data
,
data
:
data
})
}
// 拆分出账列表
export
function
salarySplitList
(
data
)
{
return
request
({
url
:
'csf/api/salarySplit/page'
,
method
:
'post'
,
data
:
data
})
}
// 拆分出账查询-原币种剩余总金额和原币种
export
function
billSplitRemaining
(
data
)
{
return
request
({
url
:
'csf/api/salarySplit/query/remaining'
,
method
:
'post'
,
data
:
data
})
}
// 获取转介人详情
export
function
borkerDetail
(
data
)
{
return
request
({
url
:
'/insurance/base/api/userSaleExpand/detail?clientUserBizId='
+
data
,
method
:
'get'
})
}
// 拆分出账查询-原币种和原币种金额——>目标币种即时汇率和目标币种金额
export
function
billSplitRate
(
data
)
{
return
request
({
url
:
'csf/api/salarySplit/query/rate'
,
method
:
'post'
,
data
:
data
})
}
// 拆分出账查询-批量保存-薪资拆分应发信息列表
export
function
billBatchSave
(
data
)
{
return
request
({
url
:
'csf/api/salarySplit/batch/save'
,
method
:
'post'
,
data
:
data
})
}
// 拆分出账查询-计算目标金额
export
function
billCalculateToAmount
(
data
)
{
return
request
({
url
:
'csf/api/salarySplit/calculate/toAmount'
,
method
:
'post'
,
data
:
data
})
})
}
}
src/utils/common.js
View file @
43a80971
...
@@ -75,3 +75,7 @@ export function processUserName(users) {
...
@@ -75,3 +75,7 @@ export function processUserName(users) {
}
}
})
})
}
}
export
function
generateId
()
{
return
`
${
Date
.
now
()}
_
${
Math
.
random
().
toString
(
36
).
substr
(
2
,
8
)}
`
}
src/utils/usePositiveDecimal.js
0 → 100644
View file @
43a80971
import
{
ref
}
from
'vue'
export
function
usePositiveDecimal
(
defaultPlaces
=
2
)
{
// 实时过滤(返回过滤后的字符串)
const
filterInput
=
(
value
,
decimalPlaces
=
defaultPlaces
)
=>
{
if
(
value
===
undefined
||
value
===
null
)
return
''
let
str
=
String
(
value
)
// 1. 只保留数字和小数点
str
=
str
.
replace
(
/
[^\d
.
]
/g
,
''
)
// 2. 限制只有一个小数点
const
parts
=
str
.
split
(
'.'
)
if
(
parts
.
length
>
2
)
{
str
=
parts
[
0
]
+
'.'
+
parts
.
slice
(
1
).
join
(
''
)
}
// 3. 限制小数位数
if
(
parts
.
length
===
2
&&
parts
[
1
].
length
>
decimalPlaces
)
{
str
=
parts
[
0
]
+
'.'
+
parts
[
1
].
slice
(
0
,
decimalPlaces
)
}
return
str
}
// 失焦时格式化(补零 / 截断)
const
formatBlur
=
(
value
,
decimalPlaces
=
defaultPlaces
)
=>
{
if
(
value
===
''
||
value
===
null
||
value
===
undefined
)
{
return
''
}
let
num
=
parseFloat
(
value
)
if
(
isNaN
(
num
)
||
num
<
0
)
{
return
''
}
return
num
.
toFixed
(
decimalPlaces
)
}
return
{
filterInput
,
formatBlur
}
}
src/views/financialCenter/financialSalary.vue
View file @
43a80971
<
template
>
<
template
>
<div
class=
'app-container'
>
<div
class=
"app-container"
>
<CommonPage
:operationBtnList=
'operationBtnList'
:visibleDefaultButtons=
'visibleDefaultButtons'
<CommonPage
:showSearchForm=
'true'
:show-pagination=
'true'
:total=
'pageTotal'
:current-page=
'currentPage'
:operationBtnList=
"operationBtnList"
:page-size=
'pageSize'
@
size-change=
'handleSizeChange'
@
current-change=
'handleCurrentChange'
>
:visibleDefaultButtons=
"visibleDefaultButtons"
:showSearchForm=
"true"
:show-pagination=
"true"
:total=
"pageTotal"
:current-page=
"currentPage"
:page-size=
"pageSize"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
>
<!-- 搜索区域 -->
<!-- 搜索区域 -->
<template
#
searchForm
>
<template
#
searchForm
>
<SearchForm
ref=
"searchFormRef"
:config=
"searchConfig"
/>
<SearchForm
ref=
"searchFormRef"
:config=
"searchConfig"
/>
...
@@ -13,21 +21,32 @@
...
@@ -13,21 +21,32 @@
<div
class=
"statistics-container"
>
<div
class=
"statistics-container"
>
<el-row
:gutter=
"16"
>
<el-row
:gutter=
"16"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"6"
class=
"text-center mb-4"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"6"
class=
"text-center mb-4"
>
<el-statistic
title=
"总金额"
:value=
"statisticInfo.totalAmount"
/>
<el-statistic
title=
"总金额"
:value=
"statisticInfo.totalAmount"
:formatter=
"value => formatCurrency(value, '', 4)"
/>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"6"
class=
"text-center mb-4"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"6"
class=
"text-center mb-4"
>
<el-statistic
title=
"总人数"
:value=
"statisticInfo.brokerCount"
/>
<el-statistic
title=
"总人数"
:value=
"statisticInfo.brokerCount"
/>
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
<el-table
:data=
"tableData"
@
selection-change=
"handleSelectionChange"
v-loading=
"loading"
ref=
"tableRef"
<el-table
row-key=
"fortuneAccountBizId"
:reserve-selection=
"true"
:border=
"true"
>
:data=
"tableData"
@
selection-change=
"handleSelectionChange"
v-loading=
"loading"
ref=
"tableRef"
row-key=
"fortuneAccountBizId"
:reserve-selection=
"true"
:border=
"true"
>
<el-table-column
type=
"selection"
width=
"55"
:reserve-selection=
"true"
/>
<el-table-column
type=
"selection"
width=
"55"
:reserve-selection=
"true"
/>
<el-table-column
prop=
"broker"
label=
"转介人"
min-width=
"120"
sortable
/>
<el-table-column
prop=
"broker"
label=
"转介人"
min-width=
"120"
sortable
/>
<el-table-column
prop=
"team"
label=
"所属团队"
min-width=
"120"
sortable
/>
<el-table-column
prop=
"team"
label=
"所属团队"
min-width=
"120"
sortable
/>
<el-table-column
prop=
"hkdAmount"
label=
"出账金额"
width=
"120"
sortable
>
<el-table-column
prop=
"hkdAmount"
label=
"出账金额"
width=
"120"
sortable
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
{{
formatCurrency
(
scope
.
row
.
hkdAmount
)
}}
{{
formatCurrency
(
scope
.
row
.
hkdAmount
,
''
,
4
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"currency"
label=
"出账币种"
width=
"120"
sortable
>
<el-table-column
prop=
"currency"
label=
"出账币种"
width=
"120"
sortable
>
...
@@ -42,14 +61,202 @@
...
@@ -42,14 +61,202 @@
</el-tag>
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"fortuneAccountDate"
label=
"出账日"
min-width=
"150"
show-overflow-tooltip
/>
<el-table-column
prop=
"fortuneAccountDate"
label=
"出账日"
min-width=
"150"
show-overflow-tooltip
/>
<el-table-column
prop=
"remark"
label=
"备注"
min-width=
"150"
show-overflow-tooltip
/>
<el-table-column
prop=
"remark"
label=
"备注"
min-width=
"150"
show-overflow-tooltip
/>
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"120"
>
<
template
#
default=
"{ row }"
>
<el-popover
placement=
"right"
:width=
"200"
trigger=
"click"
>
<template
#
reference
>
<el-icon>
<MoreFilled
/>
</el-icon>
</
template
>
<el-menu
@
select=
"handleSelect($event, row)"
popper-class=
"custom-menu"
>
<el-menu-item
:index=
"item.value"
v-for=
"item in dropdownItems"
:key=
"item.value"
>
{{ item.label }}
</el-menu-item
>
</el-menu>
</el-popover>
</template>
</el-table-column>
</el-table>
</el-table>
</template>
</template>
</CommonPage>
</CommonPage>
<!-- 拆分出账 -->
<CommonDialog
dialogTitle=
"拆分出账"
dialogWidth=
"90%"
confirmText=
"批量保存"
:openDialog=
"showBillingFlag"
:showAction=
"true"
:showClose=
"true"
@
close=
"showBillingFlag = false"
@
confirm=
"handleBillConfirm"
>
<!-- 统计数据 -->
<div
class=
"statistics-container"
>
<el-row
:gutter=
"16"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"6"
class=
"text-center mb-4"
>
<el-statistic
title=
"原币种金额"
:value=
"currentRow.hkdAmount"
:formatter=
"value => formatCurrency(value, '', 4)"
/>
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"6"
class=
"text-center mb-4"
>
<el-statistic
title=
"剩余原币种金额"
:value=
"billStatistic.beSplitAmount"
:formatter=
"value => formatCurrency(value, '', 4)"
/>
</el-col>
</el-row>
</div>
<el-button
style=
"margin: 10px 0"
@
click=
"handleAddBill"
:loading=
"addBillLoading"
type=
"primary"
:icon=
"Plus"
>
新增拆分
</el-button
>
<el-table
v-loading=
"billLoading"
:data=
"billTableList"
border
ref=
"billTableRef"
height=
"450px"
>
<el-table-column
label=
"序号 "
width=
"55"
align=
"center"
type=
"index"
fixed=
"left"
></el-table-column>
<el-table-column
label=
"发放编号"
prop=
"salarySplitNo"
width=
"150"
fixed=
"left"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.salarySplitNo"
placeholder=
"请输入"
clearable
/>
</
template
>
</el-table-column>
<el-table-column
label=
"转介人"
prop=
"brokerName"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.brokerName"
placeholder=
"请输入"
clearable
:disabled=
"true"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"转介人内部编号"
prop=
"internalNumber"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.internalNumber"
placeholder=
"请输入"
clearable
:disabled=
"true"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"出账机构"
prop=
"billOrg"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.billOrg"
placeholder=
"请输入"
clearable
/>
</
template
>
</el-table-column>
<el-table-column
label=
"原币种金额"
prop=
"fromAmount"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.fromAmount"
placeholder=
"请输入"
clearable
@
clear=
"clearInput('fromAmount', scope.row)"
@
input=
"val => (scope.row.fromAmount = amountInput.filterInput(val, 4))"
@
blur=
"billInputBlur('fromAmount', scope.row)"
:formatter=
"value => `$
{value}`.replace(/\d(?=(\d{3})+\.)/g, '$
&
,')"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"目标币种"
prop=
"toCurrency"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-select
v-model=
"scope.row.toCurrency"
style=
"width: 100%"
placeholder=
"请选择"
clearable
@
clear=
"clearInput('toCurrency', scope.row)"
@
change=
"changeToCurrency(scope.row)"
>
<el-option
v-for=
"item in bx_currency_type"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"汇率(%)"
prop=
"exchangeRate"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.exchangeRate"
placeholder=
"请输入"
clearable
@
clear=
"clearInput('exchangeRate', scope.row)"
@
blur=
"billInputBlur('exchangeRate', scope.row)"
@
input=
"val => (scope.row.exchangeRate = amountInput.filterInput(val, 4))"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"目标金额"
prop=
"toAmount"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.toAmount"
placeholder=
"请输入"
clearable
@
input=
"val => (scope.row.toAmount = amountInput.filterInput(val, 4))"
:formatter=
"value => `$
{value}`.replace(/\d(?=(\d{3})+\.)/g, '$
&
,')"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remark"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.remark"
type=
"textarea"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"150"
align=
"center"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<div
class=
"btnCon"
>
<el-button
size=
"small"
type=
"danger"
@
click=
"handleDeleteBill(scope.row, scope.$index)"
>
删除
</el-button
>
</div>
</
template
>
</el-table-column>
</el-table>
</CommonDialog>
<!-- 弹窗-->
<!-- 弹窗-->
<CommonDialog
dialogTitle=
'出账完成'
dialogWidth=
'80%'
:openDialog=
billingCompleteDialogVisible
:showAction=
'false'
<CommonDialog
:showClose=
'true'
@
close=
'billingCompleteDialogVisible = false'
>
dialogTitle=
"出账完成"
dialogWidth=
"80%"
:openDialog=
"billingCompleteDialogVisible"
:showAction=
"false"
:showClose=
"true"
@
close=
"billingCompleteDialogVisible = false"
>
<div
style=
"text-align: center"
>
<div
style=
"text-align: center"
>
<el-icon
size=
"48"
color=
"#67C23A"
>
<el-icon
size=
"48"
color=
"#67C23A"
>
<SuccessFilled
/>
<SuccessFilled
/>
...
@@ -57,8 +264,14 @@
...
@@ -57,8 +264,14 @@
<p
style=
"margin-top: 16px; font-size: 16px"
>
出账操作已完成!
</p>
<p
style=
"margin-top: 16px; font-size: 16px"
>
出账操作已完成!
</p>
</div>
</div>
</CommonDialog>
</CommonDialog>
<CommonDialog
dialogTitle=
'修订记录'
dialogWidth=
'80%'
:openDialog=
showReviseRecord
:showAction=
'false'
<CommonDialog
:showClose=
'true'
@
close=
'showReviseRecord = false'
>
dialogTitle=
"修订记录"
dialogWidth=
"80%"
:openDialog=
"showReviseRecord"
:showAction=
"false"
:showClose=
"true"
@
close=
"showReviseRecord = false"
>
<el-table
:data=
"reviseList"
border
>
<el-table
:data=
"reviseList"
border
>
<el-table-column
prop=
"createTime"
label=
"修订时间"
align=
"center"
width=
"180"
>
<el-table-column
prop=
"createTime"
label=
"修订时间"
align=
"center"
width=
"180"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
...
@@ -78,13 +291,26 @@
...
@@ -78,13 +291,26 @@
import
{
ref
,
reactive
}
from
'vue'
import
{
ref
,
reactive
}
from
'vue'
import
CommonPage
from
'@/components/commonPage'
import
CommonPage
from
'@/components/commonPage'
import
CommonDialog
from
'@/components/commonDialog'
import
CommonDialog
from
'@/components/commonDialog'
import
{
Plus
}
from
'@element-plus/icons-vue'
import
{
import
{
getReferrerFortuneList
,
getReferrerFortuneList
,
salaryStatistics
,
salaryStatistics
,
salarySplitList
,
billSplitRemaining
,
borkerDetail
,
billSplitRate
,
billBatchSave
,
billCalculateToAmount
}
from
'@/api/financial/commission'
}
from
'@/api/financial/commission'
import
{
formatCurrency
}
from
'@/utils/number'
import
{
formatCurrency
,
formatThousands
}
from
'@/utils/number'
import
{
generateId
}
from
'@/utils/common'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
SearchForm
from
'@/components/SearchForm/SearchForm.vue'
import
SearchForm
from
'@/components/SearchForm/SearchForm.vue'
import
{
usePositiveDecimal
}
from
'@/utils/usePositiveDecimal'
const
amountInput
=
usePositiveDecimal
(
4
)
// 默认2位小数
const
{
proxy
}
=
getCurrentInstance
()
const
{
bx_currency_type
}
=
proxy
.
useDict
(
'bx_currency_type'
)
const
searchFormRef
=
ref
(
null
)
const
searchFormRef
=
ref
(
null
)
const
searchParams
=
ref
({})
const
searchParams
=
ref
({})
const
searchConfig
=
ref
([
const
searchConfig
=
ref
([
...
@@ -100,7 +326,7 @@ const searchConfig = ref([
...
@@ -100,7 +326,7 @@ const searchConfig = ref([
valueKey
:
'clientUserBizId'
,
valueKey
:
'clientUserBizId'
,
labelKey
:
'realName'
,
labelKey
:
'realName'
,
multiple
:
true
,
multiple
:
true
,
transform
:
(
res
)
=>
{
transform
:
res
=>
{
return
res
?.
data
.
records
||
[]
return
res
?.
data
.
records
||
[]
}
}
},
},
...
@@ -117,7 +343,7 @@ const searchConfig = ref([
...
@@ -117,7 +343,7 @@ const searchConfig = ref([
label
:
'出账状态'
,
label
:
'出账状态'
,
dictType
:
'csf_expected_fortune_status'
,
dictType
:
'csf_expected_fortune_status'
,
multiple
:
true
,
multiple
:
true
,
defaultValue
:
[
'6'
]
,
//默认查询待出账,已检核的数据
defaultValue
:
[
'6'
]
//默认查询待出账,已检核的数据
}
}
])
])
// 添加表格引用
// 添加表格引用
...
@@ -144,14 +370,237 @@ const billingCompleteDialogVisible = ref(false)
...
@@ -144,14 +370,237 @@ const billingCompleteDialogVisible = ref(false)
const
currentPage
=
ref
(
1
)
const
currentPage
=
ref
(
1
)
const
pageSize
=
ref
(
10
)
const
pageSize
=
ref
(
10
)
const
pageTotal
=
ref
(
0
)
const
pageTotal
=
ref
(
0
)
let
showBillingFlag
=
ref
(
false
)
let
currentRow
=
ref
(
null
)
let
billTableList
=
ref
([{
salarySplitNo
:
'1'
}])
let
billLoading
=
ref
(
false
)
let
billPageTotal
=
ref
(
0
)
let
billCurrentPage
=
ref
(
1
)
let
billPageSize
=
ref
(
999
)
let
billStatistic
=
ref
({
beSplitAmount
:
0
,
beSplitCurrency
:
0
})
let
saleInfo
=
ref
({})
let
addBillLoading
=
ref
(
false
)
let
submitBillLoading
=
ref
(
false
)
// 表格操作菜单
const
dropdownItems
=
[
{
label
:
'拆分出账'
,
value
:
'splitBilling'
}
// { label: '更新', value: 'editRecord' },
// { label: '查看记录', value: 'viewRecord' }
]
//=============拆分出账开始================
const
clearInput
=
(
key
,
row
)
=>
{
if
(
key
==
'fromAmount'
||
key
==
'toCurrency'
)
{
row
.
exchangeRate
=
'0.00'
row
.
toAmount
=
'0.00'
}
else
if
(
key
==
'exchangeRate'
)
{
row
.
toAmount
=
'0.00'
}
}
const
billInputBlur
=
(
type
,
row
)
=>
{
if
(
type
==
'fromAmount'
)
{
if
(
row
.
fromAmount
)
{
changeRate
(
row
)
}
}
else
if
(
type
==
'exchangeRate'
)
{
if
(
row
.
exchangeRate
)
{
changeToAmount
(
row
)
}
}
}
// 改变汇率
const
changeRate
=
async
row
=>
{
try
{
if
(
row
.
toCurrency
&&
row
.
fromAmount
)
{
const
params
=
{
fortuneAccountBizId
:
currentRow
.
value
.
fortuneAccountBizId
,
//出账记录业务id(关联出账记录表)
fromCurrency
:
currentRow
.
value
.
currency
,
//原币种
fromAmount
:
row
.
fromAmount
,
//原币种金额
toCurrency
:
row
.
toCurrency
//目标币种
}
const
response
=
await
billSplitRate
(
params
)
if
(
response
.
data
)
{
row
.
exchangeRate
=
response
.
data
.
exchangeRate
?
(
response
.
data
.
exchangeRate
*
100
).
toFixed
(
4
)
:
''
row
.
toAmount
=
Number
(
response
.
data
.
convertedAmount
).
toFixed
(
4
)
}
}
else
{
}
}
catch
(
error
)
{
ElMessage
.
error
(
'获取汇率失败'
)
}
}
//改变目标金额
const
changeToAmount
=
async
row
=>
{
try
{
if
(
row
.
exchangeRate
&&
row
.
fromAmount
)
{
const
params
=
{
fromAmount
:
row
.
fromAmount
,
//原币种金额
exchangeRate
:
row
.
exchangeRate
//汇率
}
const
response
=
await
billCalculateToAmount
(
params
)
if
(
response
.
data
)
{
row
.
toAmount
=
Number
(
response
.
data
.
toAmount
).
toFixed
(
4
)
}
}
}
catch
(
error
)
{
ElMessage
.
error
(
'获取目标金额失败'
)
}
}
const
handleBillConfirm
=
async
()
=>
{
submitBillLoading
.
value
=
true
try
{
const
params
=
{
fortuneAccountBizId
:
currentRow
.
value
.
fortuneAccountBizId
,
apiSalarySplitBatchSaveDtoList
:
billTableList
.
value
}
const
response
=
await
billBatchSave
(
params
)
if
(
response
.
code
==
200
)
{
ElMessage
.
success
(
'拆分出账新增保存成功'
)
showBillingFlag
.
value
=
false
submitBillLoading
.
value
=
false
}
}
catch
(
error
)
{
submitBillLoading
.
value
=
false
ElMessage
.
error
(
'拆分出账新增保存失败'
)
}
}
const
changeToCurrency
=
row
=>
{
if
(
row
.
toCurrency
)
{
changeRate
(
row
)
}
else
{
row
.
exchangeRate
=
''
row
.
toAmount
=
''
}
}
const
handleBillSizeChange
=
val
=>
{
billPageSize
.
value
=
val
getSplitTableList
()
}
const
handleBillCurrentChange
=
val
=>
{
billCurrentPage
.
value
=
val
getSplitTableList
()
}
// 新增拆分出账
const
handleAddBill
=
async
()
=>
{
addBillLoading
.
value
=
true
try
{
const
params
=
{
fortuneAccountBizId
:
currentRow
.
value
.
fortuneAccountBizId
,
//出账记录业务id(关联出账记录表)
fromAmountList
:
billTableList
.
value
.
map
(
item
=>
{
return
item
.
fromAmount
})
}
const
response
=
await
billSplitRemaining
(
params
)
console
.
log
(
'===================================='
)
console
.
log
(
'新增拆分'
,
response
)
console
.
log
(
'===================================='
)
if
(
response
.
data
)
{
if
(
response
.
data
.
fromAmount
>
0
)
{
billTableList
.
value
.
push
({
brokerName
:
currentRow
.
value
.
broker
,
fromAmount
:
Number
(
response
.
data
.
fromAmount
).
toFixed
(
4
),
internalNumber
:
saleInfo
.
value
.
internalNumber
?
saleInfo
.
value
.
internalNumber
:
''
,
id
:
generateId
()
})
addBillLoading
.
value
=
false
billPageTotal
.
value
=
billTableList
.
value
.
length
}
else
{
addBillLoading
.
value
=
false
ElMessage
.
error
(
'剩余金额不足,不能新增拆分出账'
)
}
}
}
catch
(
error
)
{
addBillLoading
.
value
=
false
ElMessage
.
error
(
'获取剩余金额失败'
)
}
}
// 删除拆分出账
const
handleDeleteBill
=
(
row
,
index
)
=>
{
console
.
log
(
'===================================='
)
console
.
log
(
'删除拆分'
,
row
)
console
.
log
(
'===================================='
)
ElMessageBox
.
confirm
(
'确定删除此行?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
billTableList
.
value
.
splice
(
index
,
1
)
})
.
catch
(()
=>
{})
}
// 获取数据列表
const
getSplitTableList
=
async
(
searchParams
=
{})
=>
{
billLoading
.
value
=
true
try
{
const
params
=
{
...
searchParams
,
pageNo
:
billCurrentPage
.
value
,
pageSize
:
billPageSize
.
value
,
fortuneAccountBizId
:
currentRow
.
value
.
fortuneAccountBizId
}
const
userSale
=
await
borkerDetail
(
currentRow
.
value
.
brokerBizId
)
if
(
userSale
.
data
)
{
saleInfo
.
value
=
userSale
.
data
}
const
response
=
await
salarySplitList
(
params
)
if
(
response
.
data
.
page
)
{
billTableList
.
value
=
response
.
data
.
page
.
records
if
(
billTableList
.
value
.
length
==
0
)
{
billTableList
.
value
=
[
{
brokerName
:
currentRow
.
value
.
broker
,
fromAmount
:
Number
(
currentRow
.
value
.
hkdAmount
).
toFixed
(
4
),
internalNumber
:
userSale
.
data
?
userSale
.
data
.
internalNumber
:
''
,
id
:
generateId
(),
exchangeRate
:
'0.00'
,
toAmount
:
'0.00'
}
]
billPageTotal
.
value
=
billTableList
.
value
.
length
}
else
{
billTableList
.
value
=
billTableList
.
value
.
map
(
item
=>
{
item
.
brokerName
=
currentRow
.
value
.
broker
item
.
internalNumber
=
userSale
.
data
?
userSale
.
data
.
internalNumber
:
''
return
item
})
billPageTotal
.
value
=
response
.
data
.
page
.
total
}
billLoading
.
value
=
false
showBillingFlag
.
value
=
true
}
if
(
response
.
data
.
statisticsDto
)
{
billStatistic
.
value
=
response
.
data
.
statisticsDto
}
}
catch
(
error
)
{
billLoading
.
value
=
false
// ElMessage.error('获取数据失败')
}
}
//=============拆分出账结束================
const
handleSelect
=
(
e
,
row
)
=>
{
console
.
log
(
'选中行:'
,
e
,
row
)
currentRow
.
value
=
row
if
(
e
===
'splitBilling'
)
{
billPageSize
.
value
=
10
billCurrentPage
.
value
=
1
billTableList
.
value
=
[]
getSplitTableList
()
}
}
// 分页事件
// 分页事件
const
handleSizeChange
=
(
val
)
=>
{
const
handleSizeChange
=
val
=>
{
pageSize
.
value
=
val
pageSize
.
value
=
val
getList
()
getList
()
}
}
const
handleCurrentChange
=
(
val
)
=>
{
const
handleCurrentChange
=
val
=>
{
currentPage
.
value
=
val
currentPage
.
value
=
val
getList
()
getList
()
}
}
...
@@ -219,7 +668,6 @@ const clearAllSelection = () => {
...
@@ -219,7 +668,6 @@ const clearAllSelection = () => {
}
}
}
}
// 获取数据列表
// 获取数据列表
const
getList
=
async
(
searchParams
=
{})
=>
{
const
getList
=
async
(
searchParams
=
{})
=>
{
loading
.
value
=
true
loading
.
value
=
true
...
@@ -228,7 +676,7 @@ const getList = async (searchParams = {}) => {
...
@@ -228,7 +676,7 @@ const getList = async (searchParams = {}) => {
...
searchParams
,
...
searchParams
,
accountDateStart
:
searchParams
.
payoutDate
?.[
0
]
||
undefined
,
accountDateStart
:
searchParams
.
payoutDate
?.[
0
]
||
undefined
,
accountDateEnd
:
searchParams
.
payoutDate
?.[
1
]
||
undefined
,
accountDateEnd
:
searchParams
.
payoutDate
?.[
1
]
||
undefined
,
payoutDate
:
undefined
,
payoutDate
:
undefined
,
pageNo
:
currentPage
.
value
,
pageNo
:
currentPage
.
value
,
pageSize
:
pageSize
.
value
pageSize
:
pageSize
.
value
}
}
...
@@ -242,6 +690,7 @@ const getList = async (searchParams = {}) => {
...
@@ -242,6 +690,7 @@ const getList = async (searchParams = {}) => {
if
(
response
.
data
.
statisticsVO
)
{
if
(
response
.
data
.
statisticsVO
)
{
statisticInfo
.
value
=
response
.
data
.
statisticsVO
statisticInfo
.
value
=
response
.
data
.
statisticsVO
}
}
// 数据加载完成后,设置当前页的选中状态
// 数据加载完成后,设置当前页的选中状态
nextTick
(()
=>
{
nextTick
(()
=>
{
setCurrentPageSelection
()
setCurrentPageSelection
()
...
@@ -250,6 +699,7 @@ const getList = async (searchParams = {}) => {
...
@@ -250,6 +699,7 @@ const getList = async (searchParams = {}) => {
loading
.
value
=
false
loading
.
value
=
false
// ElMessage.error('获取数据失败')
// ElMessage.error('获取数据失败')
}
}
// tableData.value = [{}]
}
}
getList
()
getList
()
...
@@ -286,8 +736,6 @@ const handleSelectionChange = selection => {
...
@@ -286,8 +736,6 @@ const handleSelectionChange = selection => {
updateAllSelectedRows
()
updateAllSelectedRows
()
}
}
// 完成出账
// 完成出账
const
completeBilling
=
async
()
=>
{
const
completeBilling
=
async
()
=>
{
if
(
selectedRows
.
value
.
length
===
0
)
{
if
(
selectedRows
.
value
.
length
===
0
)
{
...
@@ -370,10 +818,9 @@ const fetchCompletePolicyFortune = async row => {
...
@@ -370,10 +818,9 @@ const fetchCompletePolicyFortune = async row => {
}
else
{
}
else
{
ElMessage
.
error
(
res
.
msg
)
ElMessage
.
error
(
res
.
msg
)
}
}
}
catch
(
error
)
{
}
}
catch
(
error
)
{}
}
}
const
visibleDefaultButtons
=
ref
([
'reset'
,
'query'
])
const
visibleDefaultButtons
=
ref
([
'reset'
,
'query'
])
// 按钮配置
// 按钮配置
const
operationBtnList
=
ref
([
const
operationBtnList
=
ref
([
...
@@ -398,6 +845,31 @@ const operationBtnList = ref([
...
@@ -398,6 +845,31 @@ const operationBtnList = ref([
}
}
])
])
const
formatAmount
=
value
=>
{
if
(
value
===
null
||
value
===
undefined
||
value
===
''
)
{
return
''
}
// 转换为数字
let
num
=
typeof
value
===
'number'
?
value
:
parseFloat
(
value
)
if
(
isNaN
(
num
))
{
return
''
// 无效值返回空字符串
}
// 保留两位小数
let
fixed
=
num
.
toFixed
(
2
)
// 拆分整数和小数部分
let
parts
=
fixed
.
split
(
'.'
)
// 整数部分添加千位分隔符
parts
[
0
]
=
parts
[
0
].
replace
(
/
\B(?=(\d{3})
+
(?!\d))
/g
,
','
)
return
parts
.
join
(
'.'
)
}
// 解析器(配合 formatter,保持数据一致性)
const
parseAmount
=
value
=>
{
if
(
!
value
)
return
null
// 移除千位分隔符
const
cleaned
=
value
.
replace
(
/,/g
,
''
)
const
num
=
parseFloat
(
cleaned
)
return
isNaN
(
num
)
?
null
:
num
}
</
script
>
</
script
>
<
style
scoped
></
style
>
<
style
scoped
></
style
>
src/views/sign/policyReceipts/premiumRecon.vue
View file @
43a80971
...
@@ -582,9 +582,11 @@ const confirmAffirm = async () => {
...
@@ -582,9 +582,11 @@ const confirmAffirm = async () => {
currentRow
.
value
=
{}
currentRow
.
value
=
{}
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
'error'
,
error
)
settingAffirmLoading
.
value
=
false
settingAffirmLoading
.
value
=
false
console
.
error
(
'加载数据失败:'
,
error
)
if
(
error
.
message
&&
error
.
message
.
includes
(
'Validation'
))
{
ElMessage
.
error
(
'必填项不能为空'
||
'认定失败'
)
ElMessage
.
error
(
'必填项不能为空'
)
}
}
}
}
}
// ==============设置认定结果结束============
// ==============设置认定结果结束============
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment