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
220d00dc
Commit
220d00dc
authored
Dec 23, 2025
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂存
parent
c58ec623
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
563 additions
and
1808 deletions
+563
-1808
src/api/financial/commission.js
+19
-1
src/api/search.ts
+24
-36
src/views/financialCenter/financialIncome.vue
+161
-1259
src/views/financialCenter/financialSalary.vue
+116
-172
src/views/financialCenter/payables.vue
+73
-167
src/views/financialCenter/receivables.vue
+170
-173
No files found.
src/api/financial/commission.js
View file @
220d00dc
...
@@ -226,7 +226,7 @@ export function policyData(data) {
...
@@ -226,7 +226,7 @@ export function policyData(data) {
// 应付款管理列表
// 应付款管理列表
export
function
expectedFortuneList
(
data
)
{
export
function
expectedFortuneList
(
data
)
{
return
request
({
return
request
({
url
:
'/csf/api/expectedFortune/
list
'
,
url
:
'/csf/api/expectedFortune/
page
'
,
method
:
'post'
,
method
:
'post'
,
data
:
data
data
:
data
})
})
...
@@ -272,3 +272,21 @@ export function commissionEntryEditRecords(data) {
...
@@ -272,3 +272,21 @@ export function commissionEntryEditRecords(data) {
data
:
data
data
:
data
})
})
}
}
// 出账记录查询
export
function
payRecordList
(
data
)
{
return
request
({
url
:
'/csf/api/fortune/list/page/fortuneAccount'
,
method
:
'post'
,
data
:
data
})
}
// 获取保单发佣列表
export
function
policyNoCommissionPayRecord
(
data
)
{
return
request
({
url
:
'/csf/api/fortune/list/page/vo'
,
method
:
'post'
,
data
:
data
})
}
src/api/search.ts
View file @
220d00dc
// src/api/search.ts
// src/api/search.ts
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
// 通用搜索接口
export
function
commonSearch
(
params
:
{
// 特定模块搜索
module
:
string
keyword
?:
string
// 搜索保险公司
pageSize
?:
number
export
function
searchInsurers
(
params
)
{
})
{
return
request
({
return
request
({
url
:
'/
common/search
'
,
url
:
'/
insurance/base/api/insuranceCompany/page
'
,
method
:
'
get
'
,
method
:
'
POST
'
,
params
params
})
})
}
}
// 特定模块搜索
// 搜索产品
export
function
searchCompanies
(
params
:
{
export
function
searchProducts
(
params
)
{
type
?:
string
keyword
?:
string
pageSize
?:
number
})
{
return
request
({
return
request
({
url
:
'/
company
/search'
,
url
:
'/
product/base/api/product
/search'
,
method
:
'
get
'
,
method
:
'
POST
'
,
params
params
})
})
}
}
export
function
searchCommissionTypes
(
params
:
{
// 获取对账公司
keyword
?:
string
export
function
searchReconciliationCompanies
(
params
)
{
pageSize
?:
number
})
{
return
request
({
return
request
({
url
:
'/
commission/type/search
'
,
url
:
'/
insurance/base/api/insuranceReconciliationCompany/page
'
,
method
:
'
get
'
,
method
:
'
POST
'
,
params
params
})
})
}
}
export
function
searchInsurers
(
params
:
{
// 获取签单员列表
keyword
?:
string
export
function
searchSigners
(
params
)
{
pageSize
?:
number
})
{
return
request
({
return
request
({
url
:
'/insur
er/search
'
,
url
:
'/insur
ance/base/api/userSignExpand/page
'
,
method
:
'
get
'
,
method
:
'
POST
'
,
params
params
})
})
}
}
export
function
searchProducts
(
params
:
{
// 获取转介人列表
keyword
?:
string
export
function
searchIntermediaries
(
params
)
{
pageSize
?:
number
})
{
return
request
({
return
request
({
url
:
'/
product/search
'
,
url
:
'/
insurance/base/api/userSaleExpand/page
'
,
method
:
'
get
'
,
method
:
'
POST
'
,
params
params
})
})
}
}
\ No newline at end of file
src/views/financialCenter/financialIncome.vue
View file @
220d00dc
<
template
>
<
template
>
<div
class=
"financial-income-page"
>
<div
class=
'container'
>
<!-- 查询区域 -->
<CommonPage
:operationBtnList=
'operationBtnList'
:showSearchForm=
'true'
:show-pagination=
'true'
:total=
'pageTotal'
<el-card
class=
"search-card"
>
:current-page=
'currentPage'
:page-size=
'pageSize'
@
size-change=
'handleSizeChange'
<el-form
:model=
"searchForm"
label-width=
"100px"
>
@
current-change=
'handleCurrentChange'
>
<el-row
:gutter=
"20"
>
<!-- 搜索区域 -->
<el-col
:span=
"8"
>
<template
#
searchForm
>
<el-form-item
label=
"保单号"
>
<SearchForm
ref=
"searchFormRef"
v-model=
"searchFormData"
:fields=
"searchFields"
label-position=
"top"
<el-input
v-model=
"searchForm.policyNo"
placeholder=
"请输入保单号"
clearable
/>
:label-width=
"null"
:inline=
"false"
:gutter=
"20"
class=
"custom-search-form"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"对账公司"
>
<el-select
v-model=
"searchForm.reconciliationCompany"
placeholder=
"请选择对账公司"
clearable
>
<el-option
v-for=
"item in companyOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.label"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"入账日期"
>
<el-date-picker
v-model=
"searchForm.incomeDateRange"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"YYYY-MM-DD"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"预计入账日期"
>
<el-date-picker
v-model=
"searchForm.expectedDate"
type=
"date"
value-format=
"YYYY-MM-DD"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"比对状态"
prop=
"status"
>
<el-select
v-model=
"searchForm.status"
placeholder=
"请选择状态"
>
<el-option
v-for=
"item in dictLists"
:key=
"item.itemValue"
:label=
"item.itemLabel"
:value=
"item.itemValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<div
class=
"search-buttons"
>
<el-button
type=
"primary"
:icon=
"Search"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:icon=
"RefreshLeft"
@
click=
"resetForm"
>
重置
</el-button>
</div>
</el-col>
</el-row>
</el-form>
</el-card>
<!-- 操作区域 -->
<div
class=
"action-area"
>
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新增入账
</el-button>
<!-- 导入区域 -->
<el-card
class=
"import-card"
>
<div
class=
"import-content"
>
<div
class=
"import-actions"
>
<FileUpload
:fileType=
"['xlsx', 'xls']"
:action=
"'/csf/api/commission/upload/excel'"
@
uploadEnd=
"getUploadFileFunc"
:responseType=
"'onlyStatus'"
/>
<el-button
text
@
click=
"downloadTemplate"
size=
"small"
class=
"download-template-btn"
>
下载模板
</el-button>
</div>
</div>
</el-card>
</div>
<!-- 列表区域 -->
<el-card
class=
"table-card"
>
<div
class=
"totalData"
v-if=
"getAllSelectedRows().length > 0 || isSearch"
>
<span
v-for=
"(item, index) in statisticList"
>
<span
:style=
"
{ marginLeft: index == 0 ? ' 0' : '20px' }">
{{
item
.
name
}}
:
</span>
<span>
{{
item
.
format
?
formatCurrency
(
item
.
value
)
:
item
.
value
}}
</span>
</span>
</div>
<el-table
ref=
"tableRef"
v-loading=
"tableLoading"
:data=
"tableData"
border
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
@
sort-change=
"handleSortChange"
row-key=
"commissionBizId"
:reserve-selection=
"true"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
:reserve-selection=
"true"
></el-table-column
>
/>
<el-table-column
prop=
"policyNo"
label=
"保单号"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"expectedAmount"
label=
"总金额"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"currentCommissionRatio"
label=
"当前来佣比例"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"periodPaidRatio"
label=
"已入账来佣比例"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"periodPendingRatio"
label=
"当期剩余来佣比例"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"paidAmount"
label=
"已入账金额"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"pendingAmount"
label=
"待入账金额"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"reconciliationCompany"
label=
"对账公司"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"commissionPeriod"
label=
"当前入账期数"
min-width=
"100"
align=
"center"
/>
<el-table-column
prop=
"totalPeriod"
label=
"预计总期数"
min-width=
"100"
align=
"center"
/>
<el-table-column
prop=
"commissionName"
label=
"入账项目"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"amount"
label=
"入账金额"
min-width=
"100"
align=
"center"
/>
<el-table-column
prop=
"currency"
label=
"入账币种"
min-width=
"80"
align=
"center"
>
<template
#
default=
"scope"
>
<dict-tag
:options=
"currencyTypeOptions"
:value=
"scope.row.currency"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"commissionDate"
label=
"入账日期"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"status"
label=
"比对状态"
min-width=
"100"
align=
"center"
>
<
template
#
default=
"scope"
>
<span>
{{
convertStatusToDict
(
scope
.
row
.
status
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"remark"
label=
"备注"
min-width=
"150"
align=
"center"
show-overflow-tooltip
/>
<el-table-column
label=
"操作"
width=
"220"
align=
"center"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<div
class=
"btnCon"
>
<el-button
text
size=
"small"
type=
"primary"
@
click=
"handleEdit(scope.row)"
>
编辑
</el-button
>
<el-button
text
size=
"small"
type=
"danger"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button
>
<el-dropdown
placement=
"bottom"
style=
"margin-left: 10px"
>
<el-button
type=
"primary"
link
size=
"small"
>
更多
<el-icon><ArrowDown
/></el-icon
></el-button>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item
@
click=
"handleAlignment(scope.row)"
>
比对记录
</el-dropdown-item
>
<el-dropdown-item
@
click=
"operationRecord(scope.row)"
>
操作记录
</el-dropdown-item
>
</el-dropdown-menu>
</
template
>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div
class=
"pagination"
>
<el-pagination
v-model:current-page=
"pagination.currentPage"
v-model:page-size=
"pagination.pageSize"
:page-sizes=
"[10, 20, 50, 100]"
:total=
"pagination.total"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</el-card>
<!-- 底部确认按钮 -->
<div
class=
"footer-actions"
v-if=
"selectedRows.length > 0"
>
<el-button
type=
"primary"
size=
"large"
@
click=
"handleGenerateBilling"
:disabled=
"selectedRows.length === 0"
>
确认生成可出账记录
</el-button>
</div>
<!-- 编辑对话框 -->
<!-- 入账记录对话框(新增/编辑共用) -->
<el-dialog
v-model=
"incomeDialogVisible"
:title=
"incomeDialogTitle"
width=
"600px"
:before-close=
"handleCloseDialog"
>
<el-form
:model=
"incomeForm"
label-width=
"100px"
:rules=
"incomeFormRules"
ref=
"incomeFormRef"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"保单号"
prop=
"policyNo"
>
<el-select
v-model=
"incomeForm.policyNo"
filterable
remote
reserve-keyword
placeholder=
"请输入保单号"
:remote-method=
"searchPolicy"
:loading=
"policyLoading"
@
change=
"plilcyChange"
remote-show-suffix
>
<el-option
v-if=
"policyOptions.length === 0"
disabled
value=
""
label=
"暂无数据"
style=
"color: #909399; text-align: center"
/>
<el-option
v-for=
"item in policyOptions"
:key=
"item.policyBizId"
:label=
"item.policyNo"
:value=
"item.policyNo"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"对账公司"
prop=
"reconciliationCompany"
>
<el-select
v-model=
"incomeForm.reconciliationCompany"
placeholder=
"请选择对账公司"
>
<el-option
v-for=
"item in companyOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.label"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"当前期数"
prop=
"commissionPeriod"
>
<el-input-number
v-model=
"incomeForm.commissionPeriod"
:min=
"1"
@
change=
"periodChange"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"总期数"
prop=
"totalPeriod"
>
<el-input-number
v-model=
"incomeForm.totalPeriod"
:min=
"1"
:disabled=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"入账项目"
prop=
"commissionName"
>
<el-input
v-model=
"incomeForm.commissionName"
placeholder=
"请输入入账项目"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"入账金额"
prop=
"amount"
>
<el-input
v-model=
"incomeForm.amount"
placeholder=
"请输入金额"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"币种"
prop=
"currency"
>
<el-select
v-model=
"incomeForm.currency"
placeholder=
"请选择币种"
>
<el-option
v-for=
"item in currencyTypeOptions"
:key=
"item.itemValue"
:label=
"item.itemLabel"
:value=
"item.itemValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"入账日期"
prop=
"commissionDate"
>
<el-date-picker
v-model=
"incomeForm.commissionDate"
type=
"date"
placeholder=
"选择日期"
value-format=
"YYYY-MM-DD"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"结算汇率"
prop=
"exchangeRate"
>
<el-input
v-model=
"incomeForm.exchangeRate"
placeholder=
"请输入汇率"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"保费"
prop=
"premium"
>
<el-input
v-model=
"incomeForm.premium"
placeholder=
"请输入保费"
/>
</el-form-item>
</el-col>
<
template
v-if=
"editStatus == 'edit'"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"比对状态"
prop=
"status"
>
<el-select
v-model=
"incomeForm.status"
placeholder=
"请选择状态"
>
<el-option
v-for=
"item in dictLists"
:key=
"item.itemValue"
:label=
"item.itemLabel"
:value=
"item.itemValue"
/>
</el-select>
</el-form-item>
</el-col>
</
template
>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"incomeForm.remark"
type=
"textarea"
:rows=
"3"
placeholder=
"请输入备注信息"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"incomeDialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitIncomeForm"
:loading=
"incomeLoading"
>
{{
isEditMode
?
'更新'
:
'新增'
}}
</el-button>
</span>
</
template
>
</
template
>
</el-dialog>
<!-- 列表区域 -->
<el-dialog
title=
"比对记录"
v-model=
"showAlignmentRecord"
width=
"1000px"
append-to-body
>
<
template
#
table
>
<el-table
:data=
"alignmentList"
border
>
<el-table-column
prop=
"createTime"
label=
"比对时间"
align=
"center"
width=
"150"
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"佣金期数"
prop=
"commissionPeriod"
align=
"center"
fixed=
"left"
>
</el-table-column>
<el-table-column
label=
"总期数"
prop=
"totalPeriod"
align=
"center"
></el-table-column>
<el-table-column
prop=
"status"
label=
"比对状态"
min-width=
"100"
align=
"center"
>
<
template
#
default=
"scope"
>
<span>
{{
convertStatusToDict
(
scope
.
row
.
status
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"来佣币种"
prop=
"currency"
align=
"center"
><
template
#
default=
"scope"
>
<dict-tag
:options=
"currencyTypeOptions"
:value=
"scope.row.currency"
/>
</
template
></el-table-column>
<el-table-column
label=
"入账金额"
prop=
"amount"
align=
"center"
></el-table-column>
<el-table-column
label=
"结算汇率"
prop=
"exchangeRate"
align=
"center"
></el-table-column>
</el-table>
<el-pagination
v-show=
"alignmentPages.total >= 0"
:total=
"alignmentPages.total"
:current-page=
"alignmentPages.pageNo"
:page-size=
"alignmentPages.pageSize"
:page-sizes=
"[5, 10, 20, 50]"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleAlignmentSizeChange"
@
current-change=
"handleAlignmentCurrentChange"
style=
"margin-top: 10px"
/>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
关 闭
</el-button>
</div>
</
template
>
</el-dialog>
<el-dialog
title=
"操作记录"
v-model=
"showOperationRecord"
width=
"1000px"
append-to-body
>
<el-table
:data=
"operationList"
border
>
<el-table-column
label=
"变更字段"
prop=
"field"
align=
"center"
width=
"150"
></el-table-column>
<el-table-column
label=
"变更前信息"
prop=
"beforeChange"
align=
"center"
width=
"200"
></el-table-column>
<el-table-column
label=
"变更后信息"
prop=
"afterChange"
align=
"center"
width=
"200"
>
</el-table-column>
<el-table-column
label=
"变更人"
prop=
"userName"
align=
"center"
width=
"150"
>
</el-table-column>
<el-table-column
prop=
"createTime"
label=
"变更时间"
align=
"center"
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
</el-table>
<el-pagination
v-show=
"operationPages.total >= 0"
:total=
"operationPages.total"
:current-page=
"operationPages.pageNo"
:page-size=
"operationPages.pageSize"
:page-sizes=
"[5, 10, 20, 50]"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleOperationSizeChange"
@
current-change=
"handleOperationCurrentChange"
style=
"margin-top: 10px"
/>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
关 闭
</el-button>
</div>
</
template
>
</
template
>
</el-dialog>
</CommonPage>
<!-- 弹窗-->
<CommonDialog
dialogTitle=
'弹窗'
dialogWidth=
'80%'
:openDialog=
dialogFlag
:showAction=
'false'
:showClose=
'true'
@
close=
'dialogFlag = false'
>
</CommonDialog>
</div>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
ref
,
reactive
,
onMounted
,
nextTick
}
from
'vue'
import
{
ref
,
reactive
}
from
'vue'
import
{
Search
,
RefreshLeft
,
UploadFilled
,
Plus
,
Document
}
from
'@element-plus/icons-vue'
import
CommonPage
from
'@/components/commonPage'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
CommonDialog
from
'@/components/commonDialog'
// 导入有关来佣的接口
import
SearchForm
from
'@/components/searchForm'
import
{
getPolicyCommissionList
,
// 接口
downloadPolicyFortune
,
import
{
getPolicyCommissionList
}
from
'@/api/financial/commission'
generateCommissionRecord
,
updatePolicyCommission
,
// 分页相关
incomeStatistics
,
const
currentPage
=
ref
(
1
)
incomeEditRecords
,
const
pageSize
=
ref
(
10
)
incomeCompareRecords
,
const
pageTotal
=
ref
(
0
)
policyData
const
loading
=
ref
(
false
)
}
from
'@/api/financial/commission'
// 搜索表单数据
const
searchFormData
=
reactive
({
import
FileUpload
from
'@/components/FileUpload/index'
import
{
useRouter
}
from
'vue-router'
const
{
proxy
}
=
getCurrentInstance
()
const
router
=
useRouter
()
import
{
listType
}
from
'@/api/system/dict/type'
// 添加表格引用
const
tableRef
=
ref
()
const
statisticList
=
ref
([
{
name
:
'合计应入账金额'
,
value
:
'0'
,
key
:
'totalAmount'
,
format
:
true
},
{
name
:
'合计实际入账金额'
,
value
:
'0'
,
key
:
'totalPaidAmount'
,
format
:
true
},
{
name
:
'待入账金额'
,
value
:
'0'
,
key
:
'pendingPaidAmount'
,
format
:
true
},
{
name
:
'已入账比例'
,
value
:
'0'
,
key
:
'paidAmountRatio'
,
format
:
false
},
{
name
:
'总保单数'
,
value
:
'0'
,
key
:
'totalPolicyCount'
,
format
:
false
}
])
// 存储所有选中的行数据(用于跨页保持选择)
const
allSelectedRows
=
ref
(
new
Map
())
const
alignmentList
=
ref
([])
//比对记录列表
const
operationList
=
ref
([])
//操作记录列表
const
showAlignmentRecord
=
ref
(
false
)
// 是否显示比对记录列表
const
showOperationRecord
=
ref
(
false
)
// 是否显示比对记录列表
// 通过dictType=csf_commission_status获取比对状态字典值,获取对象中的dictItemList
const
dictLists
=
ref
([])
const
currencyTypeOptions
=
ref
([])
const
alignmentPages
=
reactive
({
total
:
0
,
pageNo
:
1
,
pageSize
:
5
})
})
const
operationPages
=
reactive
({
// 弹窗相关
total
:
0
,
const
dialogFlag
=
ref
(
false
)
pageNo
:
1
,
pageSize
:
5
})
const
currentRowOperation
=
ref
({})
const
isSearch
=
ref
(
false
)
const
editStatus
=
ref
(
'add'
)
const
policyLoading
=
ref
(
false
)
const
policyOptions
=
ref
([])
// 搜索保单方法
const
searchPolicy
=
query
=>
{
policyLoading
.
value
=
true
try
{
const
params
=
{
policyNo
:
query
,
pageNo
:
1
,
pageSize
:
10
}
policyData
(
params
).
then
(
response
=>
{
policyOptions
.
value
=
response
.
data
.
records
})
}
catch
(
error
)
{
console
.
error
(
'保单号搜索失败'
,
error
)
policyOptions
.
value
=
[]
}
finally
{
policyLoading
.
value
=
false
}
}
const
plilcyChange
=
()
=>
{
policyOptions
.
value
.
forEach
(
item
=>
{
if
(
incomeForm
.
policyNo
==
item
.
policyNo
)
{
incomeForm
.
premium
=
item
.
premium
incomeForm
.
totalPeriod
=
item
.
totalPeriod
}
})
}
const
periodChange
=
()
=>
{
if
(
incomeForm
.
totalPeriod
&&
incomeForm
.
commissionPeriod
&&
incomeForm
.
commissionPeriod
>
incomeForm
.
totalPeriod
)
{
ElMessage
.
error
(
'当前期数不能大于总期数'
)
incomeForm
.
commissionPeriod
=
'1'
}
}
const
getAlignmentData
=
()
=>
{
let
data
=
{
commissionBizId
:
currentRowOperation
.
value
.
commissionBizId
,
pageNo
:
alignmentPages
.
pageNo
,
pageSize
:
alignmentPages
.
pageSize
}
incomeCompareRecords
(
data
).
then
(
response
=>
{
if
(
response
.
code
==
200
)
{
alignmentList
.
value
=
response
.
data
.
records
alignmentPages
.
total
=
response
.
data
.
total
showAlignmentRecord
.
value
=
true
}
else
{
ElMessage
.
error
(
response
.
msg
)
showAlignmentRecord
.
value
=
false
alignmentPages
.
total
=
0
alignmentList
.
value
=
[]
}
})
}
const
getOperationData
=
()
=>
{
let
data
=
{
commissionBizId
:
currentRowOperation
.
value
.
commissionBizId
,
pageNo
:
operationPages
.
pageNo
,
pageSize
:
operationPages
.
pageSize
}
incomeEditRecords
(
data
).
then
(
response
=>
{
if
(
response
.
code
==
200
)
{
operationList
.
value
=
response
.
data
.
records
operationPages
.
total
=
response
.
data
.
total
showOperationRecord
.
value
=
true
}
else
{
ElMessage
.
error
(
response
.
msg
)
showOperationRecord
.
value
=
false
operationPages
.
total
=
0
operationList
.
value
=
[]
}
})
}
// 比对记录分页事件
const
handleAlignmentSizeChange
=
val
=>
{
alignmentPages
.
pageSize
=
val
alignmentPages
.
pageNo
=
1
getAlignmentData
()
}
const
handleAlignmentCurrentChange
=
val
=>
{
// 按钮事件处理
alignmentPages
.
pageNo
=
val
const
handleAdd
=
()
=>
{
getAlignmentData
()
ElMessage
.
info
(
'点击新增按钮'
)
}
// 操作记录分页事件
const
handleOperationSizeChange
=
val
=>
{
operationPages
.
pageSize
=
val
operationPages
.
pageNo
=
1
getOperationData
()
}
const
handleOperationCurrentChange
=
val
=>
{
operationPages
.
pageNo
=
val
getOperationData
()
}
const
closeDialog
=
()
=>
{
showAlignmentRecord
.
value
=
false
alignmentList
.
value
=
[]
alignmentPages
.
value
=
{
pageNo
:
1
,
pageSize
:
5
,
total
:
0
}
showOperationRecord
.
value
=
false
operationList
.
value
=
[]
operationPages
.
value
=
{
pageNo
:
1
,
pageSize
:
5
,
total
:
0
}
}
// 设置当前页的选中状态
const
setCurrentPageSelection
=
()
=>
{
if
(
!
tableRef
.
value
)
return
// 清除当前页的选择
// tableRef.value.clearSelection()
// 设置当前页应该选中的行
tableData
.
value
.
forEach
(
row
=>
{
if
(
allSelectedRows
.
value
.
has
(
row
.
commissionBizId
))
{
tableRef
.
value
.
toggleRowSelection
(
row
,
true
)
}
})
}
}
// 获取所有选中的行(包含跨页选择的)
const
handleImport
=
()
=>
{
const
getAllSelectedRows
=
()
=>
{
ElMessage
.
info
(
'点击导入按钮'
)
return
Array
.
from
(
allSelectedRows
.
value
.
values
())
}
}
// 更新全局选中状态
const
handleExport
=
()
=>
{
const
updateAllSelectedRows
=
()
=>
{
ElMessage
.
info
(
'点击导出按钮'
)
// 获取当前页的所有行的 key(commissionBizId)
const
currentPageKeys
=
tableData
.
value
.
map
(
row
=>
row
.
commissionBizId
)
// 从全局选中中移除当前页不再存在的行
// for (const key of allSelectedRows.value.keys()) {
// if (!currentPageKeys.includes(key)) {
// allSelectedRows.value.delete(key)
// }
// }
// 更新当前页的选中状态
tableData
.
value
.
forEach
(
row
=>
{
const
isSelected
=
selectedRows
.
value
.
some
(
selectedRow
=>
selectedRow
.
commissionBizId
===
row
.
commissionBizId
)
if
(
isSelected
)
{
allSelectedRows
.
value
.
set
(
row
.
commissionBizId
,
row
)
}
else
{
allSelectedRows
.
value
.
delete
(
row
.
commissionBizId
)
}
})
getStatistics
()
}
}
const
getStatistics
=
async
()
=>
{
const
handleReset
=
()
=>
{
try
{
// 重置搜索表单
let
commissionIds
=
getAllSelectedRows
().
map
(
item
=>
item
.
id
)
Object
.
keys
(
searchFormData
).
forEach
(
key
=>
{
if
(
commissionIds
.
length
>
0
)
{
if
(
Array
.
isArray
(
searchFormData
[
key
]))
{
// 调用接口获取来佣列表
searchFormData
[
key
]
=
[]
const
res
=
await
incomeStatistics
({
commissionIds
:
commissionIds
})
if
(
res
.
data
)
{
statisticList
.
value
.
forEach
(
item
=>
{
item
.
value
=
res
.
data
[
item
.
key
]
})
}
}
else
{
}
else
{
isSearch
.
value
=
false
searchFormData
[
key
]
=
''
}
}
}
catch
(
error
)
{
console
.
error
(
'获取数据失败:'
,
error
)
ElMessage
.
error
(
'统计失败'
)
}
}
// 清空所有选择
const
clearAllSelection
=
()
=>
{
allSelectedRows
.
value
.
clear
()
selectedRows
.
value
=
[]
if
(
tableRef
.
value
)
{
tableRef
.
value
.
clearSelection
()
}
}
// 格式化金额
const
formatCurrency
=
amount
=>
{
return
new
Intl
.
NumberFormat
(
'zh-CN'
,
{
style
:
'currency'
,
currency
:
'CNY'
}).
format
(
amount
)
}
const
getLists
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
listType
({
typeList
:
[
'csf_commission_status'
,
'bx_currency_type'
]
})
.
then
(
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
)
{
const
dictData
=
res
.
data
.
find
(
item
=>
item
.
dictType
===
'csf_commission_status'
)
dictLists
.
value
=
dictData
?.
dictItemList
||
[]
// 处理币种字典值
const
currencyData
=
res
.
data
.
find
(
item
=>
item
.
dictType
===
'bx_currency_type'
)
if
(
currencyData
)
{
currencyData
?.
dictItemList
.
forEach
(
item
=>
{
item
.
value
=
item
.
itemValue
item
.
label
=
item
.
itemLabel
})
}
currencyTypeOptions
.
value
=
currencyData
?.
dictItemList
||
[]
resolve
(
dictLists
.
value
,
currencyTypeOptions
.
value
)
}
else
{
dictLists
.
value
=
[]
currencyTypeOptions
.
value
=
[]
resolve
([],
[])
}
})
.
catch
(
error
=>
{
console
.
error
(
'获取状态列表失败:'
,
error
)
dictLists
.
value
=
[]
reject
(
error
)
})
})
})
}
ElMessage
.
success
(
'搜索条件已重置'
)
// 返回数据中状态需要转换为字典值
// 重新加载数据
const
convertStatusToDict
=
status
=>
{
loadTableData
()
const
dictItem
=
dictLists
.
value
.
find
(
item
=>
item
.
itemValue
==
status
)
}
return
dictItem
?.
itemLabel
??
status
const
handleQuery
=
async
()
=>
{
}
loadTableData
()
}
// 增加通过表格排序,排序字段sortField,升降序sortOrder
// 按钮配置
const
handleSortChange
=
column
=>
{
const
operationBtnList
=
ref
([
pagination
.
sortField
=
column
.
prop
{
pagination
.
sortOrder
=
column
.
order
===
'ascending'
?
'ascend'
:
'descend'
key
:
'add'
,
fetchTableData
()
direction
:
'left'
,
}
click
:
handleAdd
},
// 搜索表单数据
{
const
searchForm
=
reactive
({
key
:
'import'
,
policyNo
:
''
,
direction
:
'left'
,
reconciliationCompany
:
''
,
click
:
handleImport
incomeDateRange
:
[],
},
status
:
''
,
{
expectedDate
:
''
key
:
'export'
,
})
direction
:
'right'
,
click
:
handleExport
// 对账公司选项
},
{
const
companyOptions
=
ref
([])
key
:
'reset'
,
// 获取对账公司列表
direction
:
'right'
,
import
{
getReconciliationCompanyList
}
from
'@/api/financial/commission'
click
:
handleReset
import
{
getAllCompanys
}
from
'@/api/common'
},
const
fetchReconciliationCompanyList
=
async
()
=>
{
{
try
{
key
:
'query'
,
const
response
=
await
getAllCompanys
({
direction
:
'right'
,
pageNo
:
1
,
click
:
handleQuery
pageSize
:
1000
})
if
(
response
.
code
===
200
)
{
companyOptions
.
value
=
response
.
data
.
records
.
map
(
item
=>
({
label
:
item
.
deptName
,
value
:
item
.
deptBizId
}))
}
else
{
ElMessage
.
error
(
response
.
msg
)
}
}
catch
(
error
)
{
ElMessage
.
error
(
'获取对账公司列表失败'
)
}
}
// 表格数据
const
tableData
=
ref
([])
const
tableLoading
=
ref
(
false
)
const
selectedRows
=
ref
([])
// 分页数据
const
pagination
=
reactive
({
currentPage
:
1
,
pageSize
:
10
,
total
:
0
})
onMounted
(()
=>
{
// 获取字典值后,再调用接口获取来佣列表
initialData
()
})
const
initialData
=
async
()
=>
{
await
getLists
()
fetchTableData
()
fetchReconciliationCompanyList
()
}
const
getUploadFileFunc
=
data
=>
{
console
.
log
(
data
)
if
(
data
===
200
)
{
ElMessage
.
success
(
'上传成功'
)
fetchTableData
()
}
else
{
ElMessage
.
error
(
'上传失败'
)
}
}
}
])
// 获取列表数据
// 加载表格数据
// 调用接口获取入账列表
const
loadTableData
=
async
()
=>
{
const
fetchTableData
=
async
()
=>
{
loading
.
value
=
true
tableLoading
.
value
=
true
try
{
try
{
// 调用接口获取来佣列表
const
res
=
await
getPolicyCommissionList
({
const
res
=
await
getPolicyCommissionList
({
pageNo
:
pagination
.
currentPage
,
pageNo
:
currentPage
.
value
,
pageSize
:
pagination
.
pageSize
,
pageSize
:
pageSize
.
value
,
policyNo
:
searchForm
.
policyNo
,
...
searchFormData
status
:
searchForm
.
status
,
expectedDate
:
searchForm
.
expectedDate
?
proxy
.
parseTime
(
searchForm
.
expectedDate
)
:
''
,
reconciliationCompany
:
searchForm
.
reconciliationCompany
,
startTime
:
searchForm
.
incomeDateRange
[
0
]
?
`
${
searchForm
.
incomeDateRange
[
0
]}
00:00:00`
:
''
,
endTime
:
searchForm
.
incomeDateRange
[
1
]
?
`
${
searchForm
.
incomeDateRange
[
1
]}
23:59:59`
:
''
})
})
if
(
res
.
data
.
page
)
{
if
(
res
.
code
===
200
)
{
tableData
.
value
=
res
.
data
.
page
.
records
tableData
.
value
=
res
.
data
.
records
||
[]
pagination
.
total
=
res
.
data
.
page
.
total
pageTotal
.
value
=
res
.
data
.
total
||
0
}
}
else
{
if
(
res
.
data
.
commissionStatisticsVO
&&
isSearch
.
value
)
{
ElMessage
.
error
(
res
.
msg
||
'加载数据失败'
)
statisticList
.
value
.
forEach
(
item
=>
{
item
.
value
=
res
.
data
.
commissionStatisticsVO
[
item
.
key
]
})
}
}
// 数据加载完成后,设置当前页的选中状态
nextTick
(()
=>
{
setCurrentPageSelection
()
})
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'获取数据失败:'
,
error
)
ElMessage
.
error
(
error
.
message
||
'加载数据失败'
)
ElMessage
.
error
(
'获取数据失败'
)
}
finally
{
}
finally
{
tableL
oading
.
value
=
false
l
oading
.
value
=
false
}
}
}
}
// 处理查询
// 分页事件
const
handleSearch
=
()
=>
{
const
handleSizeChange
=
(
val
)
=>
{
pagination
.
currentPage
=
1
pageSize
.
value
=
val
Object
.
values
(
searchForm
).
some
(
value
=>
{
loadTableData
()
if
(
Array
.
isArray
(
value
)
&&
value
.
length
>
0
)
{
isSearch
.
value
=
true
}
if
(
value
!==
''
&&
value
!=
null
)
{
isSearch
.
value
=
true
}
})
clearAllSelection
()
fetchTableData
()
ElMessage
.
success
(
'查询成功'
)
}
// 重置表单
const
resetForm
=
()
=>
{
searchForm
.
policyNo
=
''
searchForm
.
reconciliationCompany
=
''
searchForm
.
status
=
''
searchForm
.
expectedDate
=
''
searchForm
.
incomeDateRange
=
[]
isSearch
.
value
=
false
pagination
.
currentPage
=
1
pagination
.
pageSize
=
10
// 清空选择
clearAllSelection
()
ElMessage
.
success
(
'已重置筛选条件'
)
fetchTableData
()
}
// 处理分页大小变化
const
handleSizeChange
=
val
=>
{
pagination
.
pageSize
=
val
fetchTableData
()
}
}
const
handleCurrentChange
=
(
val
)
=>
{
// 处理分页页码变化
currentPage
.
value
=
val
const
handleCurrentChange
=
val
=>
{
loadTableData
()
pagination
.
currentPage
=
val
fetchTableData
()
}
// 处理表格选择变化
const
handleSelectionChange
=
rows
=>
{
selectedRows
.
value
=
rows
// 更新全局选中状态
updateAllSelectedRows
()
}
// 下载模板
const
downloadTemplate
=
()
=>
{
// 下载地址
const
templateUrl
=
'https://yd-ali-oss.oss-cn-shanghai-finance-1-pub.aliyuncs.com/xlsx/2025/10/14/54ce715eabab4f1abd8652ba0fca0c51.xlsx'
// 修改下载文件名
const
fileName
=
'对账单导入模板.xlsx'
// 下载文件
window
.
open
(
templateUrl
,
'_blank'
,
`download=
${
fileName
}
-
${
new
Date
().
getTime
()}
`
)
}
// 新增入账
const
handleAdd
=
()
=>
{
incomeDialogTitle
.
value
=
'新增入账记录'
isEditMode
.
value
=
false
editStatus
.
value
=
'add'
// 重置表单数据
Object
.
assign
(
incomeForm
,
{
commissionBizId
:
''
,
policyNo
:
''
,
reconciliationCompany
:
''
,
commissionPeriod
:
1
,
totalPeriod
:
1
,
commissionName
:
''
,
amount
:
0
,
currency
:
'HKD'
,
commissionDate
:
''
,
remark
:
''
,
exchangeRate
:
'7.80'
,
premium
:
''
,
status
:
''
})
// 重置表单验证
if
(
incomeFormRef
.
value
)
{
incomeFormRef
.
value
.
clearValidate
()
}
incomeDialogVisible
.
value
=
true
}
}
// 表格数据
const
tableData
=
ref
([])
import
{
deletePolicyCommission
}
from
'@/api/financial/commission'
// 搜索表单字段
// 删除
const
searchFields
=
ref
([
const
handleDelete
=
row
=>
{
{
ElMessageBox
.
confirm
(
`确定要删除保单
${
row
.
policyNo
}
的入账记录吗?`
,
'删除确认'
,
{
type
:
'input'
,
confirmButtonText
:
'确定'
,
field
:
'policyNo'
,
cancelButtonText
:
'取消'
,
label
:
'保单号'
,
type
:
'warning'
placeholder
:
'请输入保单号'
,
}).
then
(()
=>
{
colSpan
:
6
,
// 调用删除接口
clearable
:
true
,
deletePolicyCommission
({
rules
:
[
commissionBizId
:
row
.
commissionBizId
{
max
:
50
,
message
:
'保单号长度不能超过50个字符'
,
trigger
:
'blur'
}
})
]
.
then
(
res
=>
{
},
if
(
res
.
code
===
200
)
{
{
ElMessage
.
success
(
'删除成功'
)
type
:
'select'
,
fetchTableData
()
field
:
'status'
,
}
else
{
label
:
'比对状态'
,
ElMessage
.
error
(
'删除失败'
)
placeholder
:
'请选择比对状态'
,
colSpan
:
6
,
options
:
[
{
label
:
'已比对'
,
value
:
'1'
},
{
label
:
'部分来佣'
,
value
:
'0'
},
{
label
:
'部分入账'
,
value
:
'2'
}
]
},
{
type
:
'select'
,
field
:
'reconciliationCompany'
,
label
:
'对账公司'
,
placeholder
:
'请输入关键词搜索'
,
colSpan
:
6
,
remoteConfig
:
{
type
:
'company'
,
defaultOptions
:
[]
}
}
})
},
.
catch
(()
=>
{
{
ElMessage
.
error
(
'删除失败'
)
type
:
'date'
,
})
field
:
'expectedDate'
,
})
label
:
'预计入账日'
,
}
placeholder
:
'请选择预计入账日'
,
colSpan
:
6
,
// 生成可出账记录
},
// 调用generateCommissionRecord接口
{
const
handleGenerateBilling
=
async
()
=>
{
type
:
'input'
,
if
(
selectedRows
.
value
.
length
===
0
)
{
field
:
'insurerBizId'
,
ElMessage
.
warning
(
'请选择要生成可出账记录的记录'
)
label
:
'保险公司'
,
return
placeholder
:
'请输入关键词搜索保险公司'
,
}
colSpan
:
6
,
try
{
},
console
.
log
(
selectedRows
.
value
)
{
await
generateCommissionRecord
({
type
:
'date'
,
commissionBizIdList
:
selectedRows
.
value
.
map
(
row
=>
row
.
commissionBizId
)
field
:
'productLaunchBizId'
,
})
label
:
'检核年月'
,
ElMessage
.
success
(
'生成成功'
)
placeholder
:
'请选择检核年月'
,
// 这里可以添加路由跳转到 financialBilling 组件
colSpan
:
6
,
// router.push('/financialCenter/financial/billing')
}
catch
(
error
)
{
console
.
error
(
'生成失败:'
,
error
)
ElMessage
.
error
(
'生成失败'
)
}
}
// 入账记录对话框相关
const
incomeDialogVisible
=
ref
(
false
)
const
incomeDialogTitle
=
ref
(
'入账记录'
)
const
incomeLoading
=
ref
(
false
)
const
isEditMode
=
ref
(
false
)
const
incomeFormRef
=
ref
()
// 入账表单数据
const
incomeForm
=
reactive
({
commissionBizId
:
''
,
policyNo
:
''
,
reconciliationCompany
:
''
,
commissionPeriod
:
1
,
totalPeriod
:
1
,
commissionName
:
''
,
amount
:
0
,
currency
:
'CNY'
,
commissionDate
:
''
,
remark
:
''
,
expectedDate
:
''
,
exchangeRate
:
''
,
premium
:
''
,
status
:
''
})
// 表单验证规则
const
incomeFormRules
=
{
policyNo
:
[{
required
:
true
,
message
:
'请输入保单号'
,
trigger
:
'blur'
}],
reconciliationCompany
:
[{
required
:
true
,
message
:
'请选择对账公司'
,
trigger
:
'change'
}],
commissionName
:
[{
required
:
true
,
message
:
'请输入入账项目'
,
trigger
:
'blur'
}],
amount
:
[{
required
:
true
,
message
:
'请输入金额'
,
trigger
:
'blur'
}],
commissionDate
:
[{
required
:
true
,
message
:
'请选择入账日期'
,
trigger
:
'change'
}]
}
// 编辑入账记录
const
handleEdit
=
row
=>
{
incomeDialogTitle
.
value
=
`编辑入账记录 -
${
row
.
policyNo
}
`
isEditMode
.
value
=
true
editStatus
.
value
=
'edit'
console
.
log
(
'row'
,
row
)
// 填充表单数据
Object
.
assign
(
incomeForm
,
{
commissionBizId
:
row
.
commissionBizId
,
policyNo
:
row
.
policyNo
,
reconciliationCompany
:
row
.
reconciliationCompany
,
commissionPeriod
:
row
.
commissionPeriod
||
1
,
totalPeriod
:
row
.
totalPeriod
||
1
,
commissionName
:
row
.
commissionName
,
amount
:
row
.
amount
,
currency
:
row
.
currency
||
'CNY'
,
commissionDate
:
row
.
commissionDate
,
remark
:
row
.
remark
||
''
,
exchangeRate
:
row
.
exchangeRate
||
''
,
premium
:
row
.
premium
||
''
,
status
:
row
.
status
||
''
})
// 重置表单验证
if
(
incomeFormRef
.
value
)
{
incomeFormRef
.
value
.
clearValidate
()
}
incomeDialogVisible
.
value
=
true
}
const
handleAlignment
=
row
=>
{
currentRowOperation
.
value
=
row
getAlignmentData
()
}
const
operationRecord
=
row
=>
{
currentRowOperation
.
value
=
row
getOperationData
()
}
// 提交入账表单(新增/编辑共用)
import
{
addPolicyCommission
}
from
'@/api/financial/commission'
import
{
computed
}
from
'vue'
const
submitIncomeForm
=
async
()
=>
{
if
(
!
incomeFormRef
.
value
)
{
ElMessage
.
error
(
'请先初始化表单'
)
return
}
try
{
// 表单验证
const
valid
=
await
incomeFormRef
.
value
.
validate
()
if
(
!
valid
)
{
ElMessage
.
warning
(
'请完善表单信息'
)
return
}
incomeLoading
.
value
=
true
if
(
isEditMode
.
value
)
{
// 编辑模式 - 调用更新接口
await
updatePolicyCommission
(
incomeForm
)
ElMessage
.
success
(
'更新成功'
)
}
else
{
// 新增模式 - 调用新增接口
// 注意:这里需要根据实际的新增API进行调整
await
addPolicyCommission
(
incomeForm
)
ElMessage
.
success
(
'新增成功'
)
}
}
])
incomeDialogVisible
.
value
=
false
fetchTableData
()
// 刷新表格数据
}
catch
(
error
)
{
if
(
error
&&
error
.
errorFields
)
{
ElMessage
.
warning
(
'请完善表单信息'
)
}
else
{
console
.
error
(
isEditMode
.
value
?
'更新失败:'
:
'新增失败:'
,
error
)
ElMessage
.
error
(
isEditMode
.
value
?
'更新失败'
:
'新增失败'
)
}
}
finally
{
incomeLoading
.
value
=
false
}
}
// 关闭对话框处理
const
handleCloseDialog
=
done
=>
{
if
(
incomeLoading
.
value
)
{
ElMessage
.
info
(
'正在保存,请稍候...'
)
return
}
ElMessageBox
.
confirm
(
'确定要关闭吗?未保存的修改将会丢失'
,
'提示'
,
{
type
:
'warning'
})
.
then
(()
=>
{
done
()
})
.
catch
(()
=>
{})
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
></
style
>
.btnCon
{
\ No newline at end of file
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.financial-income-page
{
padding
:
20px
;
max-width
:
1600px
;
margin
:
0
auto
;
}
.search-card
{
margin-bottom
:
20px
;
padding
:
15px
20px
;
}
.search-buttons
{
display
:
flex
;
gap
:
10px
;
align-items
:
center
;
height
:
32px
;
}
.action-area
{
margin-bottom
:
20px
;
display
:
flex
;
flex-direction
:
column
;
gap
:
15px
;
}
.import-card
{
padding
:
20px
;
background-color
:
#f6ffed
;
border
:
1px
solid
#b7eb8f
;
}
.import-content
{
display
:
flex
;
flex-direction
:
column
;
gap
:
15px
;
}
.import-actions
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
}
.upload-excel
{
display
:
inline-block
;
}
/* 文件信息显示样式 */
.file-info
{
margin-top
:
15px
;
padding
:
12px
16px
;
background-color
:
#f5f7fa
;
border-radius
:
4px
;
border
:
1px
solid
#e4e7ed
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.file-info-content
{
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
}
.file-info-content
.el-icon
{
color
:
#409eff
;
font-size
:
16px
;
}
.file-name
{
font-weight
:
500
;
color
:
#303133
;
}
.file-size
{
color
:
#909399
;
font-size
:
12px
;
}
.confirm-import-btn
{
margin-left
:
12px
;
}
/* 下载模板按钮样式 */
.download-template-btn
{
color
:
#409eff
;
font-size
:
12px
;
padding
:
8px
12px
;
}
.download-template-btn
:hover
{
background-color
:
#ecf5ff
;
}
.table-card
{
padding
:
15px
20px
;
}
.totalData
{
margin-bottom
:
10px
;
font-size
:
14px
;
color
:
#000
;
}
.pagination
{
margin-top
:
15px
;
text-align
:
right
;
}
.footer-actions
{
position
:
fixed
;
bottom
:
20px
;
right
:
20px
;
z-index
:
1000
;
}
/* 响应式调整 */
@media
(
max-width
:
1200px
)
{
.import-actions
{
flex-wrap
:
wrap
;
}
.download-template-btn
{
margin-top
:
10px
;
}
.file-info
{
flex-direction
:
column
;
align-items
:
flex-start
;
gap
:
12px
;
}
.confirm-import-btn
{
margin-left
:
0
;
align-self
:
flex-end
;
}
}
@media
(
max-width
:
992px
)
{
.search-card
.el-col
{
margin-bottom
:
15px
;
}
.search-buttons
{
justify-content
:
flex-start
;
}
}
@media
(
max-width
:
768px
)
{
.search-card
.el-col
{
width
:
100%
;
}
.import-actions
{
flex-direction
:
column
;
align-items
:
flex-start
;
}
.download-template-btn
{
margin-top
:
10px
;
}
}
</
style
>
src/views/financialCenter/financialSalary.vue
View file @
220d00dc
<
template
>
<
template
>
<div
class=
"financial-salary-page"
>
<div
class=
'app-container'
>
<!-- 查询区域 -->
<CommonPage
:operationBtnList=
'operationBtnList'
:showSearchForm=
'true'
:show-pagination=
'true'
:total=
'pageTotal'
<el-card
class=
"search-card"
>
:current-page=
'currentPage'
:page-size=
'pageSize'
@
size-change=
'handleSizeChange'
<el-form
:model=
"queryParams"
label-width=
"80px"
>
@
current-change=
'handleCurrentChange'
>
<el-row
:gutter=
"20"
>
<!-- 搜索区域 -->
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
<template
#
searchForm
>
<el-form-item
label=
"保单号"
>
<el-form
:model=
"queryParams"
label-width=
"80px"
>
<el-input
v-model=
"queryParams.policyNo"
placeholder=
"请输入保单号"
clearable
/>
<el-row
:gutter=
"20"
>
</el-form-item>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
</el-col>
<el-form-item
label=
"保单号"
label-position=
"top"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
<el-input
v-model=
"queryParams.policyNo"
placeholder=
"请输入保单号"
clearable
/>
<el-form-item
label=
"转介人"
>
</el-form-item>
<el-input
v-model=
"queryParams.broker"
placeholder=
"请输入转介人"
clearable
/>
</el-col>
</el-form-item>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
</el-col>
<el-form-item
label=
"转介人"
label-position=
"top"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
<el-input
v-model=
"queryParams.broker"
placeholder=
"请输入转介人"
clearable
/>
<el-form-item
label=
"出账日期"
>
</el-form-item>
<el-date-picker
</el-col>
v-model=
"queryParams.accountDate"
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
type=
"daterange"
<el-form-item
label=
"出账日期"
label-position=
"top"
>
range-separator=
"-"
<el-date-picker
v-model=
"queryParams.accountDate"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"YYYY-MM-DD"
/>
end-placeholder=
"结束日期"
</el-form-item>
value-format=
"YYYY-MM-DD"
</el-col>
/>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
</el-form-item>
<el-form-item
label=
"出账状态"
label-position=
"top"
>
</el-col>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
<el-option
v-for=
"item in dictLists"
:key=
"item.itemValue"
:label=
"item.itemLabel"
<el-form-item
label=
"出账状态"
>
:value=
"item.itemValue"
/>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
>
</el-select>
<el-option
</el-form-item>
v-for=
"item in dictLists"
</el-col>
:key=
"item.itemValue"
</el-row>
:label=
"item.itemLabel"
</el-form>
:value=
"item.itemValue"
</
template
>
/>
<!-- 列表区域 -->
</el-select>
<
template
#
table
>
</el-form-item>
<el-table
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"8"
:lg=
"6"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<!-- 操作区域 -->
<el-card
class=
"operation-card"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-button
type=
"primary"
@
click=
"handleCreate"
>
新建薪资记录
</el-button>
<el-button
@
click=
"handleImport"
>
批量导入
</el-button>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right"
>
<el-button
type=
"success"
:disabled=
"selectedRows.length === 0"
@
click=
"completeBilling"
>
完成出账
</el-button>
</el-col>
</el-row>
</el-card>
<!-- 数据表格 -->
<el-card>
<div
class=
"totalData"
v-if=
"getAllSelectedRows().length > 0 || isSearch"
>
<span
v-for=
"(item, index) in statisticList"
>
<span
:style=
"
{ marginLeft: index == 0 ? ' 0' : '20px' }">
{{
item
.
name
}}
:
</span>
<span>
{{
item
.
format
?
formatCurrency
(
item
.
value
)
:
item
.
value
}}
</span>
</span>
</div>
<el-table
:data=
"tableData"
:data=
"tableData"
@
selection-change=
"handleSelectionChange"
@
selection-change=
"handleSelectionChange"
v-loading=
"loading"
v-loading=
"loading"
...
@@ -92,7 +57,7 @@
...
@@ -92,7 +57,7 @@
<dict-tag
:options=
"currencyTypeOptions"
:value=
"scope.row.currency"
/>
<dict-tag
:options=
"currencyTypeOptions"
:value=
"scope.row.currency"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"status"
label=
"出账状态"
width=
"1
0
0"
>
<el-table-column
prop=
"status"
label=
"出账状态"
width=
"1
5
0"
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
<el-tag
:type=
"getStatusType(row.status)"
>
<el-tag
:type=
"getStatusType(row.status)"
>
{{
convertStatusToDict
(
row
.
status
)
}}
{{
convertStatusToDict
(
row
.
status
)
}}
...
@@ -109,21 +74,11 @@
...
@@ -109,21 +74,11 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</template>
<!-- 分页 -->
</CommonPage>
<el-pagination
<!-- 弹窗-->
v-model:current-page=
"queryParams.pageNo"
<CommonDialog
dialogTitle=
'新建薪资记录'
dialogWidth=
'80%'
:openDialog=
createDialogVisible
:showAction=
'false'
:showClose=
'true'
v-model:page-size=
"queryParams.pageSize"
@
close=
'createDialogVisible = false'
>
:total=
"total"
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"getList"
@
current-change=
"getList"
/>
</el-card>
<!-- 新建薪资记录对话框 -->
<el-dialog
title=
"新建薪资记录"
v-model=
"createDialogVisible"
width=
"500px"
>
<el-form
:model=
"createFormData"
label-width=
"100px"
>
<el-form
:model=
"createFormData"
label-width=
"100px"
>
<el-form-item
label=
"转介人"
required
>
<el-form-item
label=
"转介人"
required
>
<el-select
v-model=
"createFormData.referrer"
placeholder=
"请选择转介人"
>
<el-select
v-model=
"createFormData.referrer"
placeholder=
"请选择转介人"
>
...
@@ -155,27 +110,21 @@
...
@@ -155,27 +110,21 @@
/>
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<
template
#
footer
>
</CommonDialog>
<el-button
@
click=
"createDialogVisible = false"
>
取消
</el-button>
<CommonDialog
<el-button
type=
"primary"
@
click=
"submitCreateForm"
>
确认
</el-button>
dialogTitle=
'出账完成'
dialogWidth=
'80%'
:openDialog=
billingCompleteDialogVisible
:showAction=
'false'
:showClose=
'true'
</
template
>
@
close=
'billingCompleteDialogVisible = false'
>
</el-dialog>
<!-- 出账完成弹窗 -->
<el-dialog
title=
"出账完成"
v-model=
"billingCompleteDialogVisible"
width=
"400px"
>
<div
style=
"text-align: center"
>
<div
style=
"text-align: center"
>
<el-icon
size=
"48"
color=
"#67C23A"
>
<el-icon
size=
"48"
color=
"#67C23A"
>
<SuccessFilled
/>
<SuccessFilled
/>
</el-icon>
</el-icon>
<p
style=
"margin-top: 16px; font-size: 16px"
>
出账操作已完成!
</p>
<p
style=
"margin-top: 16px; font-size: 16px"
>
出账操作已完成!
</p>
</div>
</div>
<
template
#
footer
>
</CommonDialog>
<!--
<el-button
type=
"primary"
@
click=
"generateSalarySlips"
>
生成薪资单
</el-button>
-->
<CommonDialog
<el-button
@
click=
"billingCompleteDialogVisible = false"
>
关闭
</el-button>
dialogTitle=
'修订记录'
dialogWidth=
'80%'
:openDialog=
showReviseRecord
:showAction=
'false'
:showClose=
'true'
</
template
>
@
close=
'showReviseRecord = false'
>
</el-dialog>
<el-table
:data=
"reviseList"
border
>
<el-dialog
title=
"修订记录"
v-model=
"showReviseRecord"
width=
"1000px"
append-to-body
>
<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"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
...
@@ -186,33 +135,21 @@
...
@@ -186,33 +135,21 @@
<el-table-column
label=
"修订内容"
prop=
"editContent"
align=
"center"
></el-table-column>
<el-table-column
label=
"修订内容"
prop=
"editContent"
align=
"center"
></el-table-column>
</el-table>
</el-table>
<pagination
</CommonDialog>
v-show=
"revisePages.total >= 0"
:total=
"revisePages.total"
v-model:page=
"revisePages.pageNo"
v-model:limit=
"revisePages.pageSize"
@
pagination=
"getReviseData"
/>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog"
>
关 闭
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
ref
,
reactive
,
onMounted
,
nextTick
}
from
'vue'
import
{
ref
,
reactive
,
computed
,
watch
}
from
'vue'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus
'
import
CommonPage
from
'@/components/commonPage
'
import
{
SuccessFilled
}
from
'@element-plus/icons-vue
'
import
CommonDialog
from
'@/components/commonDialog
'
import
{
import
{
getReferrerFortuneList
,
getReferrerFortuneList
,
updatePolicyFortuneStatus
,
updatePolicyFortuneStatus
,
salaryStatistics
,
salaryStatistics
,
salaryEditRecords
salaryEditRecords
}
from
'@/api/financial/commission'
}
from
'@/api/financial/commission'
import
{
searchIntermediaries
}
from
'@/api/search'
// 添加表格引用
// 添加表格引用
const
tableRef
=
ref
()
const
tableRef
=
ref
()
// 存储所有选中的行数据(用于跨页保持选择)
// 存储所有选中的行数据(用于跨页保持选择)
...
@@ -234,7 +171,6 @@ const queryParams = reactive({
...
@@ -234,7 +171,6 @@ const queryParams = reactive({
sortField
:
''
,
sortField
:
''
,
sortOrder
:
'desc'
sortOrder
:
'desc'
})
})
// 表格数据
// 表格数据
const
tableData
=
ref
([])
const
tableData
=
ref
([])
const
total
=
ref
(
0
)
const
total
=
ref
(
0
)
...
@@ -251,7 +187,10 @@ const revisePages = reactive({
...
@@ -251,7 +187,10 @@ const revisePages = reactive({
// 对话框相关
// 对话框相关
const
createDialogVisible
=
ref
(
false
)
const
createDialogVisible
=
ref
(
false
)
const
billingCompleteDialogVisible
=
ref
(
false
)
const
billingCompleteDialogVisible
=
ref
(
false
)
// 分页相关
const
currentPage
=
ref
(
1
)
const
pageSize
=
ref
(
10
)
const
pageTotal
=
ref
(
0
)
// 新建表单数据
// 新建表单数据
const
createFormData
=
reactive
({
const
createFormData
=
reactive
({
referrer
:
''
,
referrer
:
''
,
...
@@ -260,6 +199,28 @@ const createFormData = reactive({
...
@@ -260,6 +199,28 @@ const createFormData = reactive({
remark
:
''
remark
:
''
})
})
// 按钮事件处理
const
handleAdd
=
()
=>
{
ElMessage
.
info
(
'点击新增按钮'
)
}
const
handleExport
=
()
=>
{
ElMessage
.
info
(
'点击导出按钮'
)
}
// 批量导入
const
handleImport
=
()
=>
{
ElMessage
.
info
(
'批量导入功能待实现'
)
}
// 分页事件
const
handleSizeChange
=
(
val
)
=>
{
pageSize
.
value
=
val
getList
()
}
const
handleCurrentChange
=
(
val
)
=>
{
currentPage
.
value
=
val
getList
()
}
// 转介人选项
// 转介人选项
const
referrerOptions
=
[
const
referrerOptions
=
[
{
label
:
'张三'
,
value
:
'zhangsan'
},
{
label
:
'张三'
,
value
:
'zhangsan'
},
...
@@ -431,7 +392,7 @@ const handleQuery = () => {
...
@@ -431,7 +392,7 @@ const handleQuery = () => {
}
}
// 重置查询
// 重置查询
const
resetQuery
=
()
=>
{
const
handleReset
=
()
=>
{
Object
.
assign
(
queryParams
,
{
Object
.
assign
(
queryParams
,
{
broker
:
''
,
broker
:
''
,
accountDateStart
:
''
,
accountDateStart
:
''
,
...
@@ -499,10 +460,7 @@ const handleDelete = async row => {
...
@@ -499,10 +460,7 @@ const handleDelete = async row => {
}
}
}
}
// 批量导入
const
handleImport
=
()
=>
{
ElMessage
.
info
(
'批量导入功能待实现'
)
}
// 完成出账
// 完成出账
const
completeBilling
=
async
()
=>
{
const
completeBilling
=
async
()
=>
{
...
@@ -667,51 +625,36 @@ const deleteFortune = async row => {
...
@@ -667,51 +625,36 @@ const deleteFortune = async row => {
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
</
script
>
<
style
scoped
>
.totalData
{
margin-bottom
:
10px
;
font-size
:
14px
;
color
:
#000
;
}
.financial-salary-page
{
padding
:
20px
;
}
.search-card
{
margin-bottom
:
20px
;
}
.operation-card
{
margin-bottom
:
20px
;
}
.el-table
{
margin-bottom
:
20px
;
}
.el-pagination
{
justify-content
:
flex-end
;
margin-top
:
20px
;
}
/* 响应式设计 */
@media
(
max-width
:
768px
)
{
.financial-salary-page
{
padding
:
10px
;
}
.search-card
{
// 按钮配置
margin-bottom
:
15px
;
const
operationBtnList
=
ref
([
{
key
:
'add'
,
direction
:
'left'
,
click
:
handleAdd
},
{
key
:
'import'
,
direction
:
'left'
,
click
:
handleImport
},
{
key
:
'export'
,
direction
:
'right'
,
click
:
handleExport
},
{
key
:
'reset'
,
direction
:
'right'
,
click
:
handleReset
},
{
key
:
'query'
,
direction
:
'right'
,
click
:
handleQuery
}
}
])
.operation-card
{
</
script
>
margin-bottom
:
15px
;
}
.el-col
{
<
style
scoped
></
style
>
margin-bottom
:
10px
;
\ No newline at end of file
}
}
</
style
>
src/views/financialCenter/payables.vue
View file @
220d00dc
<
template
>
<
template
>
<CommonPage
<div>
<CommonPage
:operationBtnList=
"operationBtnList"
:operationBtnList=
"operationBtnList"
:showSearchForm=
"true"
:showSearchForm=
"true"
:show-pagination=
"true"
:show-pagination=
"true"
...
@@ -11,16 +12,7 @@
...
@@ -11,16 +12,7 @@
>
>
<!-- 搜索区域 -->
<!-- 搜索区域 -->
<template
#
searchForm
>
<template
#
searchForm
>
<SearchForm
ref=
"searchFormRef"
v-model=
"searchFormData"
:fields=
"searchFields"
label-position=
"top"
:label-width=
"null"
:inline=
"false"
:gutter=
"20"
class=
"custom-search-form"
/>
</
template
>
</
template
>
<!-- 列表区域 -->
<!-- 列表区域 -->
<
template
#
table
>
<
template
#
table
>
...
@@ -44,23 +36,23 @@
...
@@ -44,23 +36,23 @@
</el-tag>
</el-tag>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"
commission
Period"
label=
"出账期数"
width=
"120"
sortable
/>
<el-table-column
prop=
"
fortune
Period"
label=
"出账期数"
width=
"120"
sortable
/>
<el-table-column
prop=
"
t
otalPeriod"
label=
"出账总期数"
width=
"120"
sortable
/>
<el-table-column
prop=
"
fortuneT
otalPeriod"
label=
"出账总期数"
width=
"120"
sortable
/>
<el-table-column
prop=
"
commission
Type"
label=
"出账项目"
width=
"120"
sortable
/>
<el-table-column
prop=
"
fortune
Type"
label=
"出账项目"
width=
"120"
sortable
/>
<el-table-column
prop=
"pay
men
tDate"
label=
"出账日(估)"
width=
"120"
sortable
/>
<el-table-column
prop=
"pay
ou
tDate"
label=
"出账日(估)"
width=
"120"
sortable
/>
<el-table-column
prop=
"commissionRatio"
label=
"出账比例(估)"
width=
"140"
sortable
>
<el-table-column
prop=
"commissionRatio"
label=
"出账比例(估)"
width=
"140"
sortable
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
{{
(
row
.
commissionRatio
||
0
)
+
'%'
}}
{{
(
row
.
commissionRatio
||
0
)
+
'%'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"
expectedA
mount"
label=
"出账金额(估)"
width=
"140"
sortable
>
<el-table-column
prop=
"
a
mount"
label=
"出账金额(估)"
width=
"140"
sortable
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
{{
formatCurrency
(
row
.
expectedAmount
)
}}
{{
formatCurrency
(
row
.
expectedAmount
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"paid
Amount
Ratio"
label=
"已出账比例"
width=
"120"
sortable
>
<el-table-column
prop=
"paidRatio"
label=
"已出账比例"
width=
"120"
sortable
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
{{
(
row
.
paid
Amount
Ratio
||
0
)
+
'%'
}}
{{
(
row
.
paidRatio
||
0
)
+
'%'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"paidAmount"
label=
"已出账金额"
width=
"120"
sortable
>
<el-table-column
prop=
"paidAmount"
label=
"已出账金额"
width=
"120"
sortable
>
...
@@ -73,9 +65,9 @@
...
@@ -73,9 +65,9 @@
{{
(
row
.
pendingRatio
||
0
)
+
'%'
}}
{{
(
row
.
pendingRatio
||
0
)
+
'%'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"
pendingP
aidAmount"
label=
"待出账金额(估)"
width=
"160"
sortable
>
<el-table-column
prop=
"
unp
aidAmount"
label=
"待出账金额(估)"
width=
"160"
sortable
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
{{
formatCurrency
(
row
.
pendingP
aidAmount
)
}}
{{
formatCurrency
(
row
.
unp
aidAmount
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"insurerBizId"
label=
"保险公司"
width=
"120"
sortable
/>
<el-table-column
prop=
"insurerBizId"
label=
"保险公司"
width=
"120"
sortable
/>
...
@@ -86,6 +78,22 @@
...
@@ -86,6 +78,22 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"remark"
label=
"备注"
width=
"150"
/>
<el-table-column
prop=
"remark"
label=
"备注"
width=
"150"
/>
<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>
...
@@ -142,6 +150,15 @@
...
@@ -142,6 +150,15 @@
</el-col>
</el-col>
</el-row>
</el-row>
</div>
</div>
<!-- 出账记录表格弹窗-->
<CommonDialog
dialogTitle=
"出账记录"
dialogWidth=
"80%"
:openDialog=
"payRecordDialogTableVisible"
:showAction=
"false"
:showClose=
"true"
@
close=
"payRecordDialogTableVisible = false"
>
<el-table
:data=
"payRecordDialogTableData"
border
style=
"width: 100%"
>
<el-table-column
v-for=
"item in payRecordDialogTableColumns"
:key=
"item.property"
:property=
"item.property"
:label=
"item.label"
:width=
"item.width"
/>
</el-table>
</CommonDialog>
</div>
</template>
</template>
<
script
setup
name=
"Payables"
>
<
script
setup
name=
"Payables"
>
...
@@ -149,15 +166,17 @@ import CommonPage from '@/components/commonPage'
...
@@ -149,15 +166,17 @@ import CommonPage from '@/components/commonPage'
import
{
ref
,
reactive
,
onMounted
,
watch
}
from
'vue'
import
{
ref
,
reactive
,
onMounted
,
watch
}
from
'vue'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
formatCurrency
}
from
'@/utils/number'
import
{
formatCurrency
}
from
'@/utils/number'
import
{
expectedFortuneList
}
from
'@/api/financial/commission'
import
{
expectedFortuneList
,
payRecordList
}
from
'@/api/financial/commission'
import
SearchForm
from
'@/components/SearchForm/index.vue'
import
{
searchCompanies
,
searchCommissionTypes
}
from
'@/api/search'
// 分页相关
// 分页相关
const
currentPage
=
ref
(
1
)
const
currentPage
=
ref
(
1
)
const
pageSize
=
ref
(
10
)
const
pageSize
=
ref
(
10
)
const
pageTotal
=
ref
(
0
)
const
pageTotal
=
ref
(
0
)
const
loading
=
ref
(
false
)
const
loading
=
ref
(
false
)
// 表格操作菜单
const
dropdownItems
=
[
{
label
:
'出账记录'
,
value
:
'payRecord'
},
{
label
:
'设置状态'
,
value
:
'setStatus'
}
]
// 搜索表单数据 - 修正字段名
// 搜索表单数据 - 修正字段名
const
searchFormData
=
reactive
({
const
searchFormData
=
reactive
({
...
@@ -172,132 +191,6 @@ const searchFormData = reactive({
...
@@ -172,132 +191,6 @@ const searchFormData = reactive({
teamBizId
:
''
,
teamBizId
:
''
,
})
})
const
searchFields
=
ref
([
{
type
:
'input'
,
field
:
'policyNo'
,
label
:
'保单号'
,
placeholder
:
'请输入保单号'
,
colSpan
:
6
,
clearable
:
true
,
rules
:
[
{
max
:
50
,
message
:
'保单号长度不能超过50个字符'
,
trigger
:
'blur'
}
]
},
{
type
:
'daterange'
,
field
:
'incomeDateRange'
,
label
:
'入账日期'
,
startPlaceholder
:
'开始日期'
,
endPlaceholder
:
'结束日期'
,
colSpan
:
6
,
dateFormat
:
'YYYY-MM-DD'
,
props
:
{
valueFormat
:
'YYYY-MM-DD'
,
style
:
'width: 100%'
}
},
{
type
:
'multi-select'
,
field
:
'statusList'
,
label
:
'入账状态'
,
placeholder
:
'请选择入账状态'
,
colSpan
:
6
,
options
:
[
{
label
:
'已入账'
,
value
:
'1'
},
{
label
:
'待入账'
,
value
:
'0'
},
{
label
:
'部分入账'
,
value
:
'2'
}
]
},
{
type
:
'remote-multi-select'
,
field
:
'commissionNameList'
,
label
:
'入账项目'
,
placeholder
:
'请输入关键词搜索'
,
colSpan
:
6
,
remoteConfig
:
{
type
:
'commissionType'
,
apiMethod
:
searchCommissionTypes
,
formatResult
:
(
data
)
=>
data
.
map
(
item
=>
({
label
:
item
.
typeName
,
value
:
item
.
typeCode
,
remark
:
item
.
remark
})),
defaultOptions
:
[
{
label
:
'佣金'
,
value
:
'COMMISSION'
},
{
label
:
'服务费'
,
value
:
'SERVICE_FEE'
}
]
}
},
{
type
:
'remote-multi-select'
,
field
:
'reconciliationCompanyList'
,
label
:
'对账公司'
,
placeholder
:
'请输入关键词搜索'
,
colSpan
:
6
,
remoteConfig
:
{
type
:
'company'
,
apiMethod
:
(
params
)
=>
searchCompanies
({
...
params
,
type
:
'reconciliation'
}),
defaultOptions
:
[]
}
},
{
type
:
'input'
,
field
:
'commissionPeriod'
,
label
:
'入账期数'
,
placeholder
:
'请输入期数'
,
colSpan
:
6
,
},
{
type
:
'remote-multi-select'
,
field
:
'insurerBizId'
,
label
:
'保险公司'
,
placeholder
:
'请输入关键词搜索保险公司'
,
colSpan
:
6
,
remoteConfig
:
{
type
:
'insurer'
,
apiMethod
:
(
params
)
=>
searchCompanies
({
...
params
,
type
:
'insurer'
}),
defaultOptions
:
[]
}
},
{
type
:
'remote-multi-select'
,
field
:
'productLaunchBizId'
,
label
:
'产品计划'
,
placeholder
:
'请输入关键词搜索产品计划'
,
colSpan
:
6
,
remoteConfig
:
{
type
:
'product'
,
apiMethod
:
(
params
)
=>
searchCompanies
({
...
params
,
type
:
'product'
}),
defaultOptions
:
[]
}
},
{
type
:
'select'
,
field
:
'commissionBizType'
,
label
:
'应收款类型'
,
placeholder
:
'请选择应收款类型'
,
colSpan
:
6
,
options
:
[
{
label
:
'全部'
,
value
:
''
},
{
label
:
'关联保单应收单'
,
value
:
'1'
},
{
label
:
'非关联保单应收单'
,
value
:
'2'
}
]
},
{
type
:
'remote-multi-select'
,
field
:
'teamBizId'
,
label
:
'出单团队'
,
placeholder
:
'请输入关键词搜索出单团队'
,
colSpan
:
6
,
remoteConfig
:
{
type
:
'team'
,
apiMethod
:
(
params
)
=>
searchCompanies
({
...
params
,
type
:
'team'
}),
defaultOptions
:
[]
}
}
])
// 表格数据
// 表格数据
const
tableData
=
ref
([])
const
tableData
=
ref
([])
...
@@ -339,15 +232,9 @@ const handleReset = () => {
...
@@ -339,15 +232,9 @@ const handleReset = () => {
}
}
const
handleQuery
=
async
()
=>
{
const
handleQuery
=
async
()
=>
{
// 表单验证
// const valid = await proxy.$refs.searchFormRef.validate()
// if (!valid) return
ElMessage
.
info
(
'执行查询操作'
)
loadTableData
()
loadTableData
()
}
}
// 控制要显示的默认按钮
// const visibleDefaultButtons = ref(['add', 'import', 'export']) // 只显示新增和查询两个默认按钮
// 按钮配置
// 按钮配置
const
operationBtnList
=
ref
([
const
operationBtnList
=
ref
([
{
{
...
@@ -393,14 +280,16 @@ const loadTableData = async () => {
...
@@ -393,14 +280,16 @@ const loadTableData = async () => {
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
params
=
{
const
params
=
{
...
searchFormData
,
// ...searchFormData,
currentPage
:
currentPage
.
value
,
// payoutDateStart: searchFormData.incomeDateRange[0],
// payoutDateEnd: searchFormData.incomeDateRange[1],
pageNo
:
currentPage
.
value
,
pageSize
:
pageSize
.
value
pageSize
:
pageSize
.
value
}
}
const
response
=
await
expectedFortuneList
(
params
)
const
response
=
await
expectedFortuneList
(
params
)
tableData
.
value
=
response
.
data
.
page
.
records
tableData
.
value
=
response
.
data
.
records
pageTotal
.
value
=
response
.
data
.
page
.
total
pageTotal
.
value
=
response
.
data
.
total
pageSize
.
value
=
response
.
data
.
page
.
size
pageSize
.
value
=
response
.
data
.
size
// 统计信息
// 统计信息
statisticsData
.
value
=
{
statisticsData
.
value
=
{
...
@@ -414,18 +303,35 @@ const loadTableData = async () => {
...
@@ -414,18 +303,35 @@ const loadTableData = async () => {
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'加载数据失败:'
,
error
)
console
.
error
(
'加载数据失败:'
,
error
)
ElMessage
.
error
(
'加载数据失败'
)
//
ElMessage.error('加载数据失败')
}
finally
{
}
finally
{
loading
.
value
=
false
loading
.
value
=
false
}
}
}
}
// 出账记录查询
const
loadPayRecordTableData
=
async
()
=>
{
loading
.
value
=
true
try
{
const
params
=
{
}
const
response
=
await
payRecordList
(
params
)
payRecordDialogTableData
.
value
=
response
.
data
.
records
pageTotal
.
value
=
response
.
data
.
total
pageSize
.
value
=
response
.
data
.
size
}
catch
(
error
)
{
console
.
error
(
'加载数据失败:'
,
error
)
// ElMessage.error('加载数据失败')
}
finally
{
loading
.
value
=
false
}
}
// 初始化加载数据
onMounted
(()
=>
{
loadTableData
()
loadTableData
()
})
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
...
...
src/views/financialCenter/receivables.vue
View file @
220d00dc
statistics-cards
<
template
>
<
template
>
<CommonPage
:operationBtnList=
"operationBtnList"
:showSearchForm=
"true"
:show-pagination=
"true"
:total=
"pageTotal"
<div>
:current-page=
"currentPage"
:page-size=
"pageSize"
@
size-change=
"handleSizeChange"
<CommonPage
:operationBtnList=
"operationBtnList"
:showSearchForm=
"true"
:show-pagination=
"true"
@
current-change=
"handleCurrentChange"
>
:total=
"pageTotal"
:current-page=
"currentPage"
:page-size=
"pageSize"
@
size-change=
"handleSizeChange"
<!-- 搜索区域 -->
@
current-change=
"handleCurrentChange"
>
<template
#
searchForm
>
<!-- 搜索区域 -->
<SearchForm
ref=
"searchFormRef"
v-model=
"searchFormData"
:fields=
"searchFields"
label-position=
"top"
<template
#
searchForm
>
:label-width=
"null"
:inline=
"false"
:gutter=
"20"
class=
"custom-search-form"
/>
<SearchForm
ref=
"searchFormRef"
v-model=
"searchFormData"
:fields=
"searchFields"
label-position=
"top"
</
template
>
:label-width=
"null"
:inline=
"false"
:gutter=
"20"
class=
"custom-search-form"
/>
<!-- 列表区域 -->
{{
searchFormData
}}
<
template
#
table
>
</
template
>
<!-- 统计信息卡片 -->
<!-- 列表区域 -->
<div
class=
"statistics-cards"
v-if=
"statisticsData.totalPolicyCount > 0"
>
<
template
#
table
>
<el-row
:gutter=
"20"
>
<!-- 统计信息卡片 -->
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<div
class=
"statistics-cards"
v-if=
"statisticsData.totalPolicyCount > 0"
>
<el-statistic
title=
"应收款总金额"
:value=
"statisticsData.totalAmount"
/>
<el-row
:gutter=
"20"
>
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<el-statistic
title=
"应收款总金额"
:value=
"statisticsData.totalAmount"
/>
<el-statistic
title=
"已入账金额"
:value=
"statisticsData.totalPaidAmount"
/>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<el-statistic
title=
"已入账金额"
:value=
"statisticsData.totalPaidAmount"
/>
<el-statistic
title=
"待入账金额(估)"
:value=
"statisticsData.pendingPaidAmount"
/>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<el-statistic
title=
"待入账金额(估)"
:value=
"statisticsData.pendingPaidAmount"
/>
<el-statistic
title=
"已入账比例"
:value=
"statisticsData.paidAmountRatio"
/>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
<el-statistic
title=
"已入账比例"
:value=
"statisticsData.paidAmountRatio"
/>
<el-statistic
title=
"总保单数"
:value=
"statisticsData.totalPolicyCount"
/>
</el-col>
</el-col>
<el-col
:xs=
"24"
:sm=
"12"
:md=
"4"
class=
"text-center mb-4"
>
</el-row>
<el-statistic
title=
"总保单数"
:value=
"statisticsData.totalPolicyCount"
/>
</div>
</el-col>
<!-- 应收款管理列表 -->
</el-row>
<el-table
:data=
"tableData"
height=
"400"
border
highlight-current-row
style=
"width: 100%"
</div>
v-loading=
"loading"
>
<!-- 应收款管理列表 -->
<el-table-column
prop=
"commissionBizType"
label=
"应收款类型"
width=
"120"
fixed=
"left"
sortable
/>
<el-table
:data=
"tableData"
height=
"400"
border
highlight-current-row
style=
"width: 100%"
<el-table-column
prop=
"receivableNo"
label=
"应收款编号"
width=
"120"
/>
v-loading=
"loading"
>
<el-table-column
prop=
"policyNo"
label=
"保单号"
width=
"120"
/>
<el-table-column
prop=
"commissionBizType"
label=
"应收款类型"
width=
"120"
fixed=
"left"
sortable
/>
<el-table-column
prop=
"reconciliationCompany"
label=
"对账公司"
width=
"120"
sortable
/>
<el-table-column
prop=
"receivableNo"
label=
"应收款编号"
width=
"120"
/>
<el-table-column
prop=
"status"
label=
"入账状态"
width=
"120"
sortable
>
<el-table-column
prop=
"policyNo"
label=
"保单号"
width=
"120"
/>
<template
#
default=
"
{ row }">
<el-table-column
prop=
"reconciliationCompany"
label=
"对账公司"
width=
"120"
sortable
/>
<el-tag
:type=
"row.status === '1' ? 'success' : 'warning'"
>
<el-table-column
prop=
"status"
label=
"入账状态"
width=
"120"
sortable
>
{{
row
.
status
===
'1'
?
'已入账'
:
'待入账'
}}
<template
#
default=
"
{ row }">
</el-tag>
<el-tag
:type=
"row.status === '1' ? 'success' : 'warning'"
>
</
template
>
{{
row
.
status
===
'1'
?
'已入账'
:
'待入账'
}}
</el-table-column>
</el-tag>
<el-table-column
prop=
"commissionPeriod"
label=
"入账期数"
width=
"120"
sortable
/>
</
template
>
<el-table-column
prop=
"totalPeriod"
label=
"入账总期数"
width=
"120"
sortable
/>
</el-table-column>
<el-table-column
prop=
"commissionType"
label=
"入账项目"
width=
"120"
sortable
/>
<el-table-column
prop=
"commissionPeriod"
label=
"入账期数"
width=
"120"
sortable
/>
<el-table-column
prop=
"commissionDate"
label=
"入账日(估)"
width=
"120"
sortable
/>
<el-table-column
prop=
"totalPeriod"
label=
"入账总期数"
width=
"120"
sortable
/>
<el-table-column
prop=
"commissionRatio"
label=
"入账比例(估)"
width=
"140"
sortable
>
<el-table-column
prop=
"commissionType"
label=
"入账项目"
width=
"120"
sortable
/>
<
template
#
default=
"{ row }"
>
<el-table-column
prop=
"commissionDate"
label=
"入账日(估)"
width=
"120"
sortable
/>
{{
(
row
.
commissionRatio
||
0
)
+
'%'
}}
<el-table-column
prop=
"commissionRatio"
label=
"入账比例(估)"
width=
"140"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
(
row
.
commissionRatio
||
0
)
+
'%'
}}
<el-table-column
prop=
"expectedAmount"
label=
"入账金额(估)"
width=
"140"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
formatCurrency
(
row
.
expectedAmount
)
}}
<el-table-column
prop=
"expectedAmount"
label=
"入账金额(估)"
width=
"140"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
formatCurrency
(
row
.
expectedAmount
)
}}
<el-table-column
prop=
"paidAmountRatio"
label=
"已入账比例"
width=
"120"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
(
row
.
paidAmountRatio
||
0
)
+
'%'
}}
<el-table-column
prop=
"paidAmountRatio"
label=
"已入账比例"
width=
"120"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
(
row
.
paidAmountRatio
||
0
)
+
'%'
}}
<el-table-column
prop=
"paidAmount"
label=
"已入账金额"
width=
"120"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
formatCurrency
(
row
.
paidAmount
)
}}
<el-table-column
prop=
"paidAmount"
label=
"已入账金额"
width=
"120"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
formatCurrency
(
row
.
paidAmount
)
}}
<el-table-column
prop=
"pendingRatio"
label=
"待入账比例"
width=
"120"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
(
row
.
pendingRatio
||
0
)
+
'%'
}}
<el-table-column
prop=
"pendingRatio"
label=
"待入账比例"
width=
"120"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
(
row
.
pendingRatio
||
0
)
+
'%'
}}
<el-table-column
prop=
"pendingPaidAmount"
label=
"待入账金额(估)"
width=
"160"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
formatCurrency
(
row
.
pendingPaidAmount
)
}}
<el-table-column
prop=
"pendingPaidAmount"
label=
"待入账金额(估)"
width=
"160"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
formatCurrency
(
row
.
pendingPaidAmount
)
}}
<el-table-column
prop=
"defaultExchangeRate"
label=
"结算汇率(估)"
width=
"120"
/>
</
template
>
<el-table-column
prop=
"insurerBizId"
label=
"保险公司"
width=
"120"
sortable
/>
</el-table-column>
<el-table-column
prop=
"productLaunchBizId"
label=
"产品计划"
width=
"120"
sortable
/>
<el-table-column
prop=
"defaultExchangeRate"
label=
"结算汇率(估)"
width=
"120"
/>
<el-table-column
prop=
"premium"
label=
"期交保费"
width=
"120"
sortable
>
<el-table-column
prop=
"insurerBizId"
label=
"保险公司"
width=
"120"
sortable
/>
<
template
#
default=
"{ row }"
>
<el-table-column
prop=
"productLaunchBizId"
label=
"产品计划"
width=
"120"
sortable
/>
{{
formatCurrency
(
row
.
premium
)
}}
<el-table-column
prop=
"premium"
label=
"期交保费"
width=
"120"
sortable
>
</
template
>
<
template
#
default=
"{ row }"
>
</el-table-column>
{{
formatCurrency
(
row
.
premium
)
}}
<el-table-column
prop=
"remark"
label=
"备注"
width=
"150"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"remark"
label=
"备注"
width=
"150"
/>
<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>
</template>
</CommonPage>
<!-- 比对状态表格弹窗-->
<CommonDialog
dialogTitle=
"入账记录"
dialogWidth=
"80%"
:openDialog=
"entryRecordDialogTableVisible"
:showAction=
"false"
:showClose=
"true"
@
close=
"entryRecordDialogTableVisible = false"
>
<el-table
:data=
"entryRecordDialogTableData"
border
style=
"width: 100%"
>
<el-table-column
v-for=
"item in entryRecordDialogTableColumns"
:key=
"item.property"
:property=
"item.property"
:label=
"item.label"
:width=
"item.width"
/>
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"120"
>
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"120"
>
<
template
#
default=
"{ row }"
>
<
template
#
default
>
<el-popover
placement=
"right"
:width=
"200"
trigger=
"click"
>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"handleClick"
>
<template
#
reference
>
查看比对记录
<el-icon>
</el-button>
<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
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</template>
</CommonDialog>
</CommonPage>
<!-- 比对状态表格弹窗-->
<!-- 操作记录表格弹窗-->
<CommonDialog
dialogTitle=
"入账记录"
dialogWidth=
"80%"
:openDialog=
"entryRecordDialogTableVisible"
:showAction=
"false"
:showClose=
"true"
@
close=
"entryRecordDialogTableVisible=false"
>
<CommonDialog
dialogTitle=
"操作记录"
dialogWidth=
"80%"
:openDialog=
"actionRecordsDialogVisible"
:showAction=
"false"
<el-table
:data=
"entryRecordDialogTableData"
border
style=
"width: 100%"
>
:showClose=
"true"
@
close=
"actionRecordsDialogVisible = false"
>
<el-table-column
v-for=
"item in entryRecordDialogTableColumns"
:key=
"item.property"
<el-table
:data=
"actionRecordsDialogTableData"
border
style=
"width: 100%"
>
:property=
"item.property"
:label=
"item.label"
:width=
"item.width"
/>
<el-table-column
v-for=
"item in actionRecordsDialogTableColumns"
:key=
"item.property"
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"120"
>
:property=
"item.property"
:label=
"item.label"
:width=
"item.width"
/>
<
template
#
default
>
</el-table>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"handleClick"
>
</CommonDialog>
查看比对记录
<!-- 设置状态 弹窗-->
<CommonDialog
dialogTitle=
"设置入账状态"
dialogWidth=
"80%"
:openDialog=
"setStatusDialogTableVisible"
@
close=
"setStatusDialogTableVisible = false"
@
confirm=
"setStatusDialogTableVisible = false"
>
<el-form
:model=
"form"
>
<el-form-item
label=
"入账状态"
label-width=
"120"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择入账状态"
>
<el-option
label=
"Zone No.1"
value=
"shanghai"
/>
<el-option
label=
"Zone No.2"
value=
"beijing"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"修改理由"
:label-width=
"120"
>
<el-input
v-model=
"form.desc"
type=
"textarea"
/>
</el-form-item>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"setStatusDialogTableVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"setStatusDialogTableVisible = false"
>
确认
</el-button>
</el-button>
</
template
>
</
div
>
</
el-table-column
>
</
template
>
</
el-table
>
</
CommonDialog
>
</CommonDialog
>
</div
>
<!-- 操作记录表格弹窗-->
<CommonDialog
dialogTitle=
"操作记录"
dialogWidth=
"80%"
:openDialog=
"actionRecordsDialogVisible"
:showAction=
"false"
:showClose=
"true"
@
close=
"actionRecordsDialogVisible=false"
>
<el-table
:data=
"actionRecordsDialogTableData"
border
style=
"width: 100%"
>
<el-table-column
v-for=
"item in actionRecordsDialogTableColumns"
:key=
"item.property"
:property=
"item.property"
:label=
"item.label"
:width=
"item.width"
/>
</el-table>
</CommonDialog>
<!-- 设置状态 弹窗-->
<CommonDialog
dialogTitle=
"设置入账状态"
dialogWidth=
"80%"
:openDialog=
"setStatusDialogTableVisible"
@
close=
"setStatusDialogTableVisible=false"
@
confirm=
"setStatusDialogTableVisible=false"
>
<el-form
:model=
"form"
>
<el-form-item
label=
"入账状态"
label-width=
"120"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择入账状态"
>
<el-option
label=
"Zone No.1"
value=
"shanghai"
/>
<el-option
label=
"Zone No.2"
value=
"beijing"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"修改理由"
:label-width=
"120"
>
<el-input
v-model=
"form.desc"
type=
"textarea"
/>
</el-form-item>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"setStatusDialogTableVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"setStatusDialogTableVisible = false"
>
确认
</el-button>
</div>
</
template
>
</CommonDialog>
</template>
</template>
<
script
setup
name=
"Receivables"
>
<
script
setup
name=
"Receivables"
>
import
CommonPage
from
'@/components/commonPage'
import
CommonPage
from
'@/components/commonPage'
import
CommonDialog
from
'@/components/commonDialog'
import
CommonDialog
from
'@/components/commonDialog'
import
{
ref
,
reactive
,
onMounted
,
watch
}
from
'vue'
import
{
ref
,
reactive
}
from
'vue'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
formatCurrency
}
from
'@/utils/number'
import
{
formatCurrency
}
from
'@/utils/number'
import
{
receivedFortuneList
,
commissionEntryRecord
,
commissionEntryEditRecords
}
from
'@/api/financial/commission'
import
{
receivedFortuneList
,
commissionEntryRecord
,
commissionEntryEditRecords
}
from
'@/api/financial/commission'
import
SearchForm
from
'@/components/SearchForm/index.vue'
import
SearchForm
from
'@/components/SearchForm/index.vue'
import
{
searchCompanies
,
searchCommissionTypes
}
from
'@/api/search'
// 分页相关
// 分页相关
const
currentPage
=
ref
(
1
)
const
currentPage
=
ref
(
1
)
const
pageSize
=
ref
(
10
)
const
pageSize
=
ref
(
10
)
...
@@ -186,9 +194,9 @@ const form = reactive({
...
@@ -186,9 +194,9 @@ const form = reactive({
const
selectedRow
=
ref
(
null
)
const
selectedRow
=
ref
(
null
)
const
handleSelect
=
(
e
,
row
)
=>
{
const
handleSelect
=
(
e
,
row
)
=>
{
console
.
log
(
e
,
row
)
selectedRow
.
value
=
row
selectedRow
.
value
=
row
if
(
e
===
'entryRecord'
)
{
if
(
e
===
'entryRecord'
)
{
// 入账记录
entryRecordDialogTableVisible
.
value
=
true
entryRecordDialogTableVisible
.
value
=
true
entryRecordDialogTableColumns
.
value
=
[
entryRecordDialogTableColumns
.
value
=
[
{
property
:
'commissionPeriod'
,
label
:
'佣金期数'
,
width
:
'100'
},
{
property
:
'commissionPeriod'
,
label
:
'佣金期数'
,
width
:
'100'
},
...
@@ -202,6 +210,7 @@ const handleSelect = (e, row) => {
...
@@ -202,6 +210,7 @@ const handleSelect = (e, row) => {
]
]
// 加载入账记录-假数据等待接口修改
// 加载入账记录-假数据等待接口修改
loadEntryRecordData
(
selectedRow
.
value
.
commissionExpectedBizId
).
then
(
records
=>
{
loadEntryRecordData
(
selectedRow
.
value
.
commissionExpectedBizId
).
then
(
records
=>
{
console
.
log
(
records
)
entryRecordDialogTableData
.
value
=
records
=
entryRecordDialogTableData
.
value
=
records
=
[{
[{
commissionPeriod
:
'2023-08-01'
,
commissionPeriod
:
'2023-08-01'
,
...
@@ -290,20 +299,11 @@ const searchFields = ref([
...
@@ -290,20 +299,11 @@ const searchFields = ref([
label
:
'入账状态'
,
label
:
'入账状态'
,
placeholder
:
'请选择入账状态'
,
placeholder
:
'请选择入账状态'
,
colSpan
:
6
,
colSpan
:
6
,
remoteConfig
:
{
options
:
[
type
:
'commissionType'
,
{
label
:
'已入账'
,
value
:
'1'
},
apiMethod
:
searchCommissionTypes
,
{
label
:
'待入账'
,
value
:
'0'
},
formatResult
:
(
data
)
=>
data
.
map
(
item
=>
({
{
label
:
'部分入账'
,
value
:
'2'
}
label
:
item
.
typeName
,
]
value
:
item
.
typeCode
,
remark
:
item
.
remark
})),
defaultOptions
:
[
{
label
:
'已入账'
,
value
:
'1'
},
{
label
:
'待入账'
,
value
:
'0'
},
{
label
:
'部分入账'
,
value
:
'2'
}
]
}
},
},
{
{
type
:
'input'
,
type
:
'input'
,
...
@@ -320,7 +320,6 @@ const searchFields = ref([
...
@@ -320,7 +320,6 @@ const searchFields = ref([
colSpan
:
6
,
colSpan
:
6
,
remoteConfig
:
{
remoteConfig
:
{
type
:
'company'
,
type
:
'company'
,
apiMethod
:
(
params
)
=>
searchCompanies
({
...
params
,
type
:
'reconciliation'
}),
defaultOptions
:
[]
defaultOptions
:
[]
}
}
},
},
...
@@ -352,7 +351,6 @@ const searchFields = ref([
...
@@ -352,7 +351,6 @@ const searchFields = ref([
placeholder
:
'请选择应收款类型'
,
placeholder
:
'请选择应收款类型'
,
colSpan
:
6
,
colSpan
:
6
,
options
:
[
options
:
[
{
label
:
'全部'
,
value
:
''
},
{
label
:
'关联保单应收单'
,
value
:
'1'
},
{
label
:
'关联保单应收单'
,
value
:
'1'
},
{
label
:
'非关联保单应收单'
,
value
:
'2'
}
{
label
:
'非关联保单应收单'
,
value
:
'2'
}
]
]
...
@@ -409,8 +407,7 @@ const handleReset = () => {
...
@@ -409,8 +407,7 @@ const handleReset = () => {
const
handleQuery
=
async
()
=>
{
const
handleQuery
=
async
()
=>
{
loadTableData
()
loadTableData
()
}
}
// 控制要显示的默认按钮
const
visibleDefaultButtons
=
ref
([
'add'
,
'import'
,
'export'
])
// 只显示新增和查询两个默认按钮
// 按钮配置
// 按钮配置
const
operationBtnList
=
ref
([
const
operationBtnList
=
ref
([
{
{
...
@@ -453,6 +450,7 @@ const handleCurrentChange = (val) => {
...
@@ -453,6 +450,7 @@ const handleCurrentChange = (val) => {
// 加载表格数据
// 加载表格数据
const
loadTableData
=
async
()
=>
{
const
loadTableData
=
async
()
=>
{
console
.
log
(
searchFormData
)
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
params
=
{
const
params
=
{
...
@@ -461,9 +459,9 @@ const loadTableData = async () => {
...
@@ -461,9 +459,9 @@ const loadTableData = async () => {
pageSize
:
pageSize
.
value
pageSize
:
pageSize
.
value
}
}
const
response
=
await
receivedFortuneList
(
params
)
const
response
=
await
receivedFortuneList
(
params
)
tableData
.
value
=
response
.
data
.
page
.
records
tableData
.
value
=
response
.
data
.
page
.
records
||
[]
pageTotal
.
value
=
response
.
data
.
page
.
total
pageTotal
.
value
=
response
.
data
.
page
.
total
||
0
pageSize
.
value
=
response
.
data
.
page
.
size
pageSize
.
value
=
response
.
data
.
page
.
size
||
10
// 统计信息
// 统计信息
statisticsData
.
value
=
{
statisticsData
.
value
=
{
...
@@ -521,18 +519,17 @@ const loadEntryEditRecordData = async (cbd) => {
...
@@ -521,18 +519,17 @@ const loadEntryEditRecordData = async (cbd) => {
// 初始化加载数据
// 初始化加载数据
onMounted
(()
=>
{
loadTableData
()
loadTableData
()
})
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.statistics-cards
{
.statistics-cards
{
margin-bottom
:
5px
;
margin-bottom
:
5px
;
background
:
RGBA
(
0
,
82
,
217
,
0.03
);
background
:
RGBA
(
0
,
82
,
217
,
0.03
);
border-radius
:
8px
;
border-radius
:
8px
;
padding
:
10px
20px
;
padding
:
10px
20px
;
}
}
.page-search-container
{
.page-search-container
{
padding
:
20px
;
padding
:
20px
;
background
:
#fff
;
background
:
#fff
;
...
...
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