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
654519e7
Commit
654519e7
authored
Jan 14, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保费对账与回执基础版已完成发布测试
parent
cbfe6f9f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
328 additions
and
121 deletions
+328
-121
src/api/sign/policy.js
+39
-1
src/components/SearchForm/SearchForm.vue
+26
-3
src/components/commonDialog/index.vue
+1
-0
src/views/sign/policyReceipts/premiumRecon.vue
+262
-117
No files found.
src/api/sign/policy.js
View file @
654519e7
...
@@ -54,6 +54,14 @@ export function addPremiumReconciliation(data) {
...
@@ -54,6 +54,14 @@ export function addPremiumReconciliation(data) {
data
:
data
data
:
data
})
})
}
}
//编辑提交保费对账
export
function
editPremiumReconciliation
(
data
)
{
return
request
({
url
:
'/csf/api/premiumReconciliation/edit'
,
method
:
'put'
,
data
:
data
})
}
//保费对账编辑单个汇款记录
//保费对账编辑单个汇款记录
export
function
editPremiumRemittance
(
data
)
{
export
function
editPremiumRemittance
(
data
)
{
return
request
({
return
request
({
...
@@ -100,4 +108,34 @@ export function getPremiumRemittanceListApi(data) {
...
@@ -100,4 +108,34 @@ export function getPremiumRemittanceListApi(data) {
data
:
data
data
:
data
})
})
}
}
//检查保单号是否已经提交过保费对账
export
function
getCheckPolicyNoApi
(
policyNo
)
{
return
request
({
url
:
`/csf/api/premiumReconciliation/check/reconciliation/complete?policyNo=
${
policyNo
}
`
,
method
:
'get'
})
}
// 保费对账认定结果计算待付金额
export
function
getRemainingUnpaidAmount
(
data
)
{
return
request
({
url
:
'/csf/api/premiumReconciliation/calculate/remainingUnpaidAmount'
,
method
:
'post'
,
data
:
data
})
}
//提交保费对账认定结果
export
function
submitResult
(
data
)
{
return
request
({
url
:
'/csf/api/premiumReconciliation/edit/result'
,
method
:
'put'
,
data
:
data
})
}
//单个新增保费对账汇款记录
export
function
addSinglePremiumRemittance
(
data
)
{
return
request
({
url
:
'/csf/api/premiumRemittance/add'
,
method
:
'post'
,
data
:
data
})
}
src/components/SearchForm/SearchForm.vue
View file @
654519e7
...
@@ -129,8 +129,17 @@
...
@@ -129,8 +129,17 @@
:on-error=
"(err, file, fileList) => handleUploadError(err, file, fileList, item)"
:on-error=
"(err, file, fileList) => handleUploadError(err, file, fileList, item)"
:on-remove=
"(file, fileList) => handleUploadRemove(file, fileList, item)"
:on-remove=
"(file, fileList) => handleUploadRemove(file, fileList, item)"
>
>
<el-button
size=
"small"
type=
"primary"
:link=
"item.link"
:disabled=
"item.disabled"
>
<el-icon
class=
"iconStyle"
:size=
"20"
v-if=
"item.uploadType === 'image'"
{{
item
.
uploadType
===
'image'
?
'点击上传图片'
:
'点击上传文件'
}}
><Upload
/></el-icon>
<el-button
v-else
size=
"small"
type=
"primary"
:link=
"item.link"
:disabled=
"item.disabled"
>
{{
'点击上传文件'
}}
</el-button>
</el-button>
<template
#
tip
v-if=
"item.maxSize || item.accept"
>
<template
#
tip
v-if=
"item.maxSize || item.accept"
>
<div
class=
"el-upload__tip"
>
<div
class=
"el-upload__tip"
>
...
@@ -206,6 +215,8 @@ function handleUploadSuccess(response, file, fileList, item) {
...
@@ -206,6 +215,8 @@ function handleUploadSuccess(response, file, fileList, item) {
// 触发 model 更新
// 触发 model 更新
handleModelChange
([...
fileList
],
item
)
handleModelChange
([...
fileList
],
item
)
ElMessage
.
success
(
`文件
${
file
.
name
}
上传成功`
)
ElMessage
.
success
(
`文件
${
file
.
name
}
上传成功`
)
console
.
log
(
'上传成功'
,
item
)
}
}
function
handleExceed
(
files
,
fileList
)
{
function
handleExceed
(
files
,
fileList
)
{
ElMessage
.
warning
(
'超出文件数量限制'
)
ElMessage
.
warning
(
'超出文件数量限制'
)
...
@@ -298,7 +309,7 @@ const props = defineProps({
...
@@ -298,7 +309,7 @@ const props = defineProps({
isSearch
:
{
type
:
Boolean
,
default
:
false
}
isSearch
:
{
type
:
Boolean
,
default
:
false
}
})
})
const
emit
=
defineEmits
([
'update:modelValue'
,
'update'
])
const
emit
=
defineEmits
([
'update:modelValue'
,
'update'
,
'selectChange'
,
'uploadSuccess'
])
// ==================== Refs ====================
// ==================== Refs ====================
const
formRef
=
ref
(
null
)
const
formRef
=
ref
(
null
)
...
@@ -507,6 +518,12 @@ function handleModelChange(value, item) {
...
@@ -507,6 +518,12 @@ function handleModelChange(value, item) {
console
.
log
(
'🚫 跳过 emit:认为相等'
)
console
.
log
(
'🚫 跳过 emit:认为相等'
)
}
}
})
})
if
(
item
.
type
===
'select'
)
{
emit
(
'selectChange'
,
item
.
prop
,
value
,
item
)
}
else
if
(
item
.
type
==
'upload'
)
{
// 传给父组件最新的上传值newModel
emit
(
'uploadSuccess'
,
item
.
prop
,
newModel
)
}
console
.
groupEnd
()
console
.
groupEnd
()
}
}
// 辅助函数:浅比较两个对象
// 辅助函数:浅比较两个对象
...
@@ -803,7 +820,13 @@ defineExpose({
...
@@ -803,7 +820,13 @@ defineExpose({
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.formBox
{
box-sizing
:
border-box
;
}
.search-form-item
{
.search-form-item
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.iconStyle
{
color
:
#409eff
;
}
</
style
>
</
style
>
src/components/commonDialog/index.vue
View file @
654519e7
...
@@ -124,6 +124,7 @@ watch(
...
@@ -124,6 +124,7 @@ watch(
}
}
.content
{
.content
{
padding
:
0
15px
;
padding
:
0
15px
;
box-sizing
:
border-box
;
}
}
.dialog-footer
{
.dialog-footer
{
width
:
100%
;
width
:
100%
;
...
...
src/views/sign/policyReceipts/premiumRecon.vue
View file @
654519e7
...
@@ -28,6 +28,12 @@
...
@@ -28,6 +28,12 @@
>
>
<el-table-column
type=
"selection"
width=
"40"
/>
<el-table-column
type=
"selection"
width=
"40"
/>
<el-table-column
prop=
"policyNo"
label=
"保单号"
width=
"150"
fixed=
"left"
/>
<el-table-column
prop=
"policyNo"
label=
"保单号"
width=
"150"
fixed=
"left"
/>
<el-table-column
prop=
"currentIssueNumber"
label=
"当前期数"
width=
"80"
fixed=
"left"
/>
<el-table-column
prop=
"reconciliationType"
label=
"对账类型"
width=
"150"
>
<template
#
default=
"
{ row }">
{{
getDictLabel
(
'reconciliation_type'
,
row
.
reconciliationType
)
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"insuranceCompany"
label=
"保险公司"
width=
"150"
/>
<el-table-column
prop=
"insuranceCompany"
label=
"保险公司"
width=
"150"
/>
<el-table-column
prop=
"policyFollowStatus"
label=
"新单状态"
width=
"150"
>
<el-table-column
prop=
"policyFollowStatus"
label=
"新单状态"
width=
"150"
>
...
@@ -67,9 +73,9 @@
...
@@ -67,9 +73,9 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"paymentMethod"
label=
"缴费方式"
width=
"150"
>
<el-table-column
prop=
"paymentMethod"
label=
"缴费方式"
width=
"150"
>
<
template
#
default=
"{ row }"
>
<
!-- <
template #default="{ row }">
{{ getDictLabel('csf_ap_first_issue', row.paymentMethod) }}
{{ getDictLabel('csf_ap_first_issue', row.paymentMethod) }}
</
template
>
</template>
-->
</el-table-column>
</el-table-column>
<el-table-column
prop=
"recognizedAmount"
label=
"保司认定金额"
width=
"150"
>
<el-table-column
prop=
"recognizedAmount"
label=
"保司认定金额"
width=
"150"
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
...
@@ -81,7 +87,11 @@
...
@@ -81,7 +87,11 @@
{{
getDictLabel
(
'bx_currency_type'
,
row
.
recognizedCurrency
)
}}
{{
getDictLabel
(
'bx_currency_type'
,
row
.
recognizedCurrency
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"payingBank"
label=
"付款银行"
width=
"150"
/>
<el-table-column
label=
"付款银行"
prop=
"payingBank"
width=
"150"
>
<
template
#
default=
"{ row }"
>
{{
changeDictLabel
(
'bank'
,
row
.
payingBank
)
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"payer"
label=
"付款人"
width=
"150"
/>
<el-table-column
prop=
"payer"
label=
"付款人"
width=
"150"
/>
<el-table-column
prop=
"policyHolder"
label=
"投保人"
width=
"150"
/>
<el-table-column
prop=
"policyHolder"
label=
"投保人"
width=
"150"
/>
<el-table-column
prop=
"insured"
label=
"受保人"
width=
"150"
/>
<el-table-column
prop=
"insured"
label=
"受保人"
width=
"150"
/>
...
@@ -99,7 +109,7 @@
...
@@ -99,7 +109,7 @@
<el-table-column
prop=
"reconciliationCompany"
label=
"对账公司"
width=
"150"
>
<el-table-column
prop=
"reconciliationCompany"
label=
"对账公司"
width=
"150"
>
</el-table-column>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"120"
>
<
!-- <
el-table-column fixed="right" label="操作" min-width="120">
<template #default="{ row }">
<template #default="{ row }">
<el-popover placement="right" :width="200" trigger="click">
<el-popover placement="right" :width="200" trigger="click">
<template #reference>
<template #reference>
...
@@ -117,6 +127,27 @@
...
@@ -117,6 +127,27 @@
</el-menu>
</el-menu>
</el-popover>
</el-popover>
</template>
</template>
</el-table-column> -->
<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
v-for=
"item in getMenuItems(row)"
:key=
"item.value"
:index=
"item.value"
>
{{ item.label }}
</el-menu-item>
</el-menu>
</el-popover>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</template>
</template>
...
@@ -135,6 +166,7 @@
...
@@ -135,6 +166,7 @@
ref=
"addCheckRecordFormRef"
ref=
"addCheckRecordFormRef"
:config=
"addCheckRecordConfig"
:config=
"addCheckRecordConfig"
v-model=
"addCheckRecordFormModel"
v-model=
"addCheckRecordFormModel"
@
select-change=
"onSelectChange"
/>
/>
<div>
<div>
<el-button
type=
"primary"
icon=
"plus"
@
click=
"addRemittance"
style=
"margin-bottom: 10px"
<el-button
type=
"primary"
icon=
"plus"
@
click=
"addRemittance"
style=
"margin-bottom: 10px"
...
@@ -194,6 +226,7 @@
...
@@ -194,6 +226,7 @@
:showAction=
"true"
:showAction=
"true"
:showClose=
"true"
:showClose=
"true"
@
close=
"showAffirm = false"
@
close=
"showAffirm = false"
@
confirm=
"confirmAffirm"
>
>
<SearchForm
ref=
"affirmFormRef"
:config=
"affirmConfig"
v-model=
"affirmFormModel"
/>
<SearchForm
ref=
"affirmFormRef"
:config=
"affirmConfig"
v-model=
"affirmFormModel"
/>
</CommonDialog>
</CommonDialog>
...
@@ -219,6 +252,7 @@
...
@@ -219,6 +252,7 @@
ref=
"remittanceFormRef"
ref=
"remittanceFormRef"
:config=
"remittanceConfig"
:config=
"remittanceConfig"
v-model=
"remittanceFormModel"
v-model=
"remittanceFormModel"
@
uploadSuccess=
"handleUploadSuccess"
/>
/>
<div
<div
v-if=
"remittanceFormModel.apiPremiumRemittanceFileDtoList?.length"
v-if=
"remittanceFormModel.apiPremiumRemittanceFileDtoList?.length"
...
@@ -266,7 +300,12 @@ import {
...
@@ -266,7 +300,12 @@ import {
getPremiumRemittanceFileList
,
getPremiumRemittanceFileList
,
editSiglePremiumRemittance
,
editSiglePremiumRemittance
,
getPremiumRemittanceListApi
,
getPremiumRemittanceListApi
,
deletePremiumRemittance
deletePremiumRemittance
,
getCheckPolicyNoApi
,
editPremiumReconciliation
,
getRemainingUnpaidAmount
,
submitResult
,
addSinglePremiumRemittance
}
from
'@/api/sign/policy'
}
from
'@/api/sign/policy'
import
{
getBankList
}
from
'@/api/common'
import
{
getBankList
}
from
'@/api/common'
import
useUserStore
from
'@/store/modules/user'
import
useUserStore
from
'@/store/modules/user'
...
@@ -288,19 +327,20 @@ const remittanceDialogTitle = ref('新增汇款')
...
@@ -288,19 +327,20 @@ const remittanceDialogTitle = ref('新增汇款')
const
showRemittance
=
ref
(
false
)
const
showRemittance
=
ref
(
false
)
const
remittanceFormRef
=
ref
(
null
)
const
remittanceFormRef
=
ref
(
null
)
const
bankOptions
=
ref
([])
//银行options
const
bankOptions
=
ref
([])
//银行options
const
currentRow
=
ref
({})
//银行options
const
searchConfig
=
ref
([
const
searchConfig
=
ref
([
{
{
type
:
'select'
,
type
:
'select'
,
prop
:
'insur
er
'
,
prop
:
'insur
anceCompanyBizId
'
,
label
:
'保险公司'
,
label
:
'保险公司'
,
api
:
'/insurance/base/api/insuranceCompany/page'
,
api
:
'/insurance/base/api/insuranceCompany/page'
,
keywordField
:
'
queryContent
'
,
keywordField
:
'
fullName
'
,
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
placeholder
:
'输入保险公司名称搜索'
,
placeholder
:
'输入保险公司名称搜索'
,
debounceWait
:
500
,
// 自定义防抖时间
debounceWait
:
500
,
// 自定义防抖时间
multiple
:
false
,
multiple
:
false
,
valueKey
:
'insuranceCompanyBizId'
,
valueKey
:
'insuranceCompanyBizId'
,
labelKey
:
'
abbreviation
'
,
labelKey
:
'
fullName
'
,
transform
:
res
=>
{
transform
:
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
return
res
?.
data
.
records
||
[]
return
res
?.
data
.
records
||
[]
...
@@ -308,16 +348,16 @@ const searchConfig = ref([
...
@@ -308,16 +348,16 @@ const searchConfig = ref([
},
},
{
{
type
:
'select'
,
type
:
'select'
,
prop
:
'
insurer
'
,
prop
:
'
payingBank
'
,
label
:
'付款银行'
,
label
:
'付款银行'
,
api
:
'/
insurance/base/api/insuranceCompany
/page'
,
api
:
'/
base/api/bank
/page'
,
keywordField
:
'
queryContent
'
,
keywordField
:
'
bankName
'
,
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
placeholder
:
'输入保险公司名称搜索'
,
placeholder
:
'输入保险公司名称搜索'
,
debounceWait
:
500
,
// 自定义防抖时间
debounceWait
:
500
,
// 自定义防抖时间
multiple
:
false
,
multiple
:
false
,
valueKey
:
'
insuranceCompany
BizId'
,
valueKey
:
'
bank
BizId'
,
labelKey
:
'
abbreviation
'
,
labelKey
:
'
bankName
'
,
transform
:
res
=>
{
transform
:
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
return
res
?.
data
.
records
||
[]
return
res
?.
data
.
records
||
[]
...
@@ -325,7 +365,7 @@ const searchConfig = ref([
...
@@ -325,7 +365,7 @@ const searchConfig = ref([
},
},
{
{
type
:
'input'
,
type
:
'input'
,
prop
:
'
appointmentNo
'
,
prop
:
'
payer
'
,
label
:
'付款人'
label
:
'付款人'
},
},
{
{
...
@@ -335,62 +375,64 @@ const searchConfig = ref([
...
@@ -335,62 +375,64 @@ const searchConfig = ref([
},
},
{
{
type
:
'input'
,
type
:
'input'
,
prop
:
'
policy
No'
,
prop
:
'
appointment
No'
,
label
:
'预约编号'
label
:
'预约编号'
},
},
{
{
type
:
'input'
,
type
:
'input'
,
prop
:
'policy
No
'
,
prop
:
'policy
Holder
'
,
label
:
'投保人'
label
:
'投保人'
},
},
{
{
type
:
'select'
,
type
:
'select'
,
prop
:
'
receiptStatus
'
,
prop
:
'
paymentMethod
'
,
label
:
'缴费方式'
,
label
:
'缴费方式'
,
multiple
:
false
,
multiple
:
false
,
dictType
:
'
receipt_status
'
dictType
:
'
csf_ap_first_issue
'
},
},
{
{
type
:
'select'
,
type
:
'select'
,
prop
:
'
receipt
Status'
,
prop
:
'
policyFollow
Status'
,
label
:
'新单状态'
,
label
:
'新单状态'
,
multiple
:
false
,
multiple
:
false
,
dictType
:
'
receipt_status
'
dictType
:
'
csf_policy_follow_status_new
'
},
},
{
{
type
:
'select'
,
type
:
'select'
,
prop
:
'
receipt
Status'
,
prop
:
'
policy
Status'
,
label
:
'保单状态'
,
label
:
'保单状态'
,
multiple
:
false
,
multiple
:
false
,
dictType
:
'
receipt_status
'
dictType
:
'
csf_policy_status_new
'
},
},
{
{
type
:
'select'
,
type
:
'select'
,
prop
:
'rec
eiptStatus
'
,
prop
:
'rec
onciliationType
'
,
label
:
'对账类型'
,
label
:
'对账类型'
,
multiple
:
false
,
multiple
:
false
,
dictType
:
'rec
eipt_status
'
dictType
:
'rec
onciliation_type
'
},
},
{
{
type
:
'date'
,
type
:
'date'
,
prop
:
'
receip
tDate'
,
prop
:
'
paymen
tDate'
,
label
:
'付款日期'
,
label
:
'付款日期'
,
placeholder
:
'请选择'
,
maxDate
:
'today'
maxDate
:
'today'
}
}
])
])
// 表格操作菜单
// 动态生成操作菜单项
const
dropdownItems
=
[
const
getMenuItems
=
row
=>
{
{
label
:
'设置认定结果'
,
value
:
'settingResult'
},
const
items
=
[{
label
:
'编辑'
,
value
:
'editRecord'
}]
{
label
:
'编辑'
,
value
:
'editRecord'
}
// { label: '查看记录', value: 'viewRecord' }
// 只有 reconciliationStatus 不是 'BS_DZ_CG' 时才显示“设置认定结果”
]
if
(
row
.
reconciliationStatus
!==
'BS_DZ_CG'
)
{
// 应收单类型
items
.
push
({
label
:
'设置认定结果'
,
value
:
'settingResult'
})
const
fortuneBizTypeOptions
=
[
}
{
value
:
'R'
,
label
:
'关联保单应付单'
},
{
value
:
'U'
,
label
:
'非关联保单应付单'
}
// 未来可继续添加其他条件项,例如:
]
// if (row.status === 'xxx') { items.push(...) }
return
items
}
//获取远程搜索下拉框数据,回显数据用
//获取远程搜索下拉框数据,回显数据用
const
getSelectOptions
=
async
()
=>
{
const
getSelectOptions
=
async
()
=>
{
const
params4
=
{
const
params4
=
{
...
@@ -419,10 +461,11 @@ function changeDictLabel(type, value) {
...
@@ -419,10 +461,11 @@ function changeDictLabel(type, value) {
const
showAffirm
=
ref
(
false
)
const
showAffirm
=
ref
(
false
)
const
affirmFormRef
=
ref
(
null
)
const
affirmFormRef
=
ref
(
null
)
const
affirmFormModel
=
ref
({})
const
affirmFormModel
=
ref
({})
const
affirmConfig
=
[
const
affirmConfig
=
[
{
{
type
:
'input'
,
type
:
'input'
,
prop
:
'
payment
Amount'
,
prop
:
'
recognized
Amount'
,
label
:
'保司认定金额'
,
label
:
'保司认定金额'
,
inputType
:
'decimal'
,
inputType
:
'decimal'
,
rules
:
[
rules
:
[
...
@@ -432,7 +475,7 @@ const affirmConfig = [
...
@@ -432,7 +475,7 @@ const affirmConfig = [
},
},
{
{
type
:
'select'
,
type
:
'select'
,
prop
:
'
payment
Currency'
,
prop
:
'
recognized
Currency'
,
label
:
'保司认定币种'
,
label
:
'保司认定币种'
,
dictType
:
'bx_currency_type'
,
dictType
:
'bx_currency_type'
,
rules
:
[{
required
:
true
,
message
:
'请输入认定币种'
,
trigger
:
'blur'
}]
rules
:
[{
required
:
true
,
message
:
'请输入认定币种'
,
trigger
:
'blur'
}]
...
@@ -440,17 +483,87 @@ const affirmConfig = [
...
@@ -440,17 +483,87 @@ const affirmConfig = [
{
{
type
:
'input'
,
type
:
'input'
,
prop
:
'
insured
'
,
prop
:
'
remainingUnpaidAmount
'
,
label
:
'此保单剩余待付金额'
,
label
:
'此保单剩余待付金额'
,
disabled
:
true
disabled
:
true
},
},
{
{
type
:
'
inpu
t'
,
type
:
'
selec
t'
,
prop
:
'
insurede
'
,
prop
:
'
remainingUnpaidCurrency
'
,
label
:
'此保单剩余待付币种'
,
label
:
'此保单剩余待付币种'
,
disabled
:
true
disabled
:
true
,
dictType
:
'bx_currency_type'
},
{
type
:
'date'
,
prop
:
'effectiveDate'
,
label
:
'保单生效日'
,
placeholder
:
'请选择'
,
maxDate
:
'today'
,
visible
:
formData
=>
formData
.
remainingUnpaidAmount
&&
Number
(
formData
.
remainingUnpaidAmount
)
<=
0
,
rules
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}]
},
{
type
:
'date'
,
prop
:
'underwritingDate'
,
label
:
'保单核保日'
,
placeholder
:
'请选择'
,
maxDate
:
'today'
,
rules
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}],
visible
:
formData
=>
formData
.
remainingUnpaidAmount
&&
Number
(
formData
.
remainingUnpaidAmount
)
<=
0
},
{
type
:
'select'
,
prop
:
'status'
,
label
:
'保单状态'
,
dictType
:
'csf_policy_status_new'
,
visible
:
formData
=>
formData
.
remainingUnpaidAmount
&&
Number
(
formData
.
remainingUnpaidAmount
)
<=
0
}
}
]
]
//计算待付金额
const
calculateAmount
=
async
()
=>
{
try
{
const
params
=
{
premiumReconciliationBizId
:
currentRow
.
value
.
premiumReconciliationBizId
,
//保费对账记录表唯一业务ID, //保费对账记录表唯一业务ID
recognizedAmount
:
affirmFormModel
.
value
.
recognizedAmount
,
//当次保司认定金额(客户当次缴纳的金额)
recognizedCurrency
:
affirmFormModel
.
value
.
recognizedCurrency
//当次保司认定币种
}
const
res
=
await
getRemainingUnpaidAmount
(
params
)
affirmFormModel
.
value
.
remainingUnpaidAmount
=
res
.
data
.
remainingUnpaidAmount
affirmFormModel
.
value
.
remainingUnpaidCurrency
=
res
.
data
.
remainingUnpaidCurrency
}
catch
(
error
)
{
console
.
error
(
'加载数据失败:'
,
error
)
ElMessage
.
error
(
error
.
message
||
'加载数据失败'
)
}
}
const
confirmAffirm
=
async
()
=>
{
try
{
const
formData
=
await
affirmFormRef
.
value
.
validate
()
let
newObj
=
JSON
.
parse
(
JSON
.
stringify
(
formData
))
for
(
const
key
in
newObj
)
{
if
(
/Date/
.
test
(
key
))
{
newObj
[
key
]
=
proxy
.
formatToDateTime
(
newObj
[
key
])
}
}
newObj
.
premiumReconciliationBizId
=
currentRow
.
value
.
premiumReconciliationBizId
let
res
=
await
submitResult
(
newObj
)
if
(
res
.
code
==
200
)
{
ElMessage
.
success
(
'认定成功'
)
showAffirm
.
value
=
false
affirmFormModel
.
value
=
{}
affirmFormRef
.
value
.
resetForm
()
loadTableData
()
currentRow
.
value
=
{}
}
}
catch
(
error
)
{
console
.
error
(
'加载数据失败:'
,
error
)
ElMessage
.
error
(
'必填项不能为空'
||
'认定失败'
)
}
}
// ==============设置认定结果结束============
// ==============设置认定结果结束============
// ==============新增对账开始============
// ==============新增对账开始============
const
addCheckRecordFormModel
=
ref
({
apiPremiumRemittanceDtoList
:
[]
})
const
addCheckRecordFormModel
=
ref
({
apiPremiumRemittanceDtoList
:
[]
})
...
@@ -458,6 +571,8 @@ const addCheckRecordFormRef = ref(null)
...
@@ -458,6 +571,8 @@ const addCheckRecordFormRef = ref(null)
// 设置汇款
// 设置汇款
const
remittanceFormModel
=
ref
({
apiPremiumRemittanceFileDtoList
:
[]
})
const
remittanceFormModel
=
ref
({
apiPremiumRemittanceFileDtoList
:
[]
})
const
tempOtherFileList
=
ref
([])
//临时存储其他资料数据
const
tempOtherFileList
=
ref
([])
//临时存储其他资料数据
const
isSubmitReceipts
=
ref
(
false
)
//是否可以提交对账
const
tipTxt
=
ref
(
''
)
//是否可以提交对账
const
deleteObjkeys
=
{
const
deleteObjkeys
=
{
reconciliationType
:
'reconciliationType'
,
reconciliationType
:
'reconciliationType'
,
...
@@ -481,7 +596,18 @@ const remittanceConfig = [
...
@@ -481,7 +596,18 @@ const remittanceConfig = [
inputType
:
'decimal'
,
inputType
:
'decimal'
,
rules
:
[
rules
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
},
{
pattern
:
/^
\d
+$/
,
message
:
'只能输入正整数'
}
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
||
value
==
null
)
{
callback
(
new
Error
(
'请输入付款金额'
))
}
else
if
(
!
/^
\d
+$/
.
test
(
String
(
value
)))
{
callback
(
new
Error
(
'只能输入正整数'
))
}
else
{
callback
()
}
},
trigger
:
'blur'
}
]
]
},
},
{
{
...
@@ -505,13 +631,20 @@ const remittanceConfig = [
...
@@ -505,13 +631,20 @@ const remittanceConfig = [
rules
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}]
rules
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}]
},
},
{
{
type
:
'date'
,
prop
:
'paymentDate'
,
label
:
'付款日期'
,
placeholder
:
'请选择'
,
maxDate
:
'today'
},
{
type
:
'select'
,
type
:
'select'
,
prop
:
'payingBank'
,
prop
:
'payingBank'
,
label
:
'付款银行'
,
label
:
'付款银行'
,
api
:
'/base/api/bank/page'
,
api
:
'/base/api/bank/page'
,
keywordField
:
'policyNo'
,
keywordField
:
'policyNo'
,
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
placeholder
:
'输入转介人名称搜索'
,
debounceWait
:
500
,
// 自定义防抖时间
debounceWait
:
500
,
// 自定义防抖时间
valueKey
:
'bankBizId'
,
valueKey
:
'bankBizId'
,
labelKey
:
'bankName'
,
labelKey
:
'bankName'
,
...
@@ -633,11 +766,42 @@ const remittanceConfig = [
...
@@ -633,11 +766,42 @@ const remittanceConfig = [
showFileList
:
false
showFileList
:
false
}
}
]
]
// 文件上传成功
const
handleUploadSuccess
=
(
prop
,
Model
)
=>
{
if
(
prop
==
'apiPremiumRemittanceFileDtoList'
)
{
let
list
=
[...
Model
.
apiPremiumRemittanceFileDtoList
]
tempOtherFileList
.
value
=
[]
list
.
forEach
(
item
=>
{
// 代表是从新增保单对账开始
if
(
item
.
response
)
{
let
newObj
=
JSON
.
parse
(
JSON
.
stringify
(
item
.
response
.
data
))
;(
item
.
fileName
=
newObj
.
originalName
),
//文件名
(
item
.
fileType
=
newObj
.
fileType
),
//文件类型
(
item
.
fileUrl
=
newObj
.
url
),
//文件URL,
(
item
.
url
=
newObj
.
url
)
}
})
tempOtherFileList
.
value
=
list
}
}
// 下拉框改变
function
onSelectChange
(
prop
,
value
,
item
)
{
console
.
log
(
'【Select 变更】字段:'
,
prop
,
'新值:'
,
value
,
'配置:'
,
item
)
// 示例:你可以在这里做任何事
if
(
prop
===
'policyNo'
)
{
checkPolicyNo
(
value
)
}
}
// 新增汇款
// 新增汇款
const
addRemittance
=
async
()
=>
{
const
addRemittance
=
async
()
=>
{
if
(
tipTxt
.
value
)
{
proxy
.
$modal
.
confirm
(
`
${
tipTxt
.
value
}
`
,
{
showCancel
:
'0'
,
title
:
'填写提示'
})
return
}
try
{
try
{
// 汇款记录详情也需要回显保费对账得一些字段
const
formData
=
await
addCheckRecordFormRef
.
value
.
validate
()
const
formData
=
await
addCheckRecordFormRef
.
value
.
validate
()
// 汇款记录详情也需要回显保费对账得一些字段
remittanceFormModel
.
value
=
{
remittanceFormModel
.
value
=
{
...
formData
...
formData
}
}
...
@@ -654,6 +818,8 @@ const addRemittance = async () => {
...
@@ -654,6 +818,8 @@ const addRemittance = async () => {
// 删除其他资料附件函数
// 删除其他资料附件函数
function
removeOtherFile
(
row
,
index
)
{
function
removeOtherFile
(
row
,
index
)
{
const
list
=
[...
remittanceFormModel
.
value
.
apiPremiumRemittanceFileDtoList
]
const
list
=
[...
remittanceFormModel
.
value
.
apiPremiumRemittanceFileDtoList
]
console
.
log
(
'删除附件'
,
row
)
proxy
.
$modal
proxy
.
$modal
.
confirm
(
'是否确认删除这个附件?'
)
.
confirm
(
'是否确认删除这个附件?'
)
.
then
(
function
()
{
.
then
(
function
()
{
...
@@ -672,27 +838,23 @@ function removeOtherFile(row, index) {
...
@@ -672,27 +838,23 @@ function removeOtherFile(row, index) {
}
}
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
&&
row
.
premiumRemittanceFileBizId
)
{
// 调用附件接口,更新附件列表
// 调用附件接口,更新附件列表
otherFileList
()
otherFileList
()
}
}
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
}
}
//
获取汇款记录列表
//
检查此保单号是否已经提交过保费对账
const
getPremiumRemittanceList
=
async
()
=>
{
const
checkPolicyNo
=
async
policyNo
=>
{
try
{
try
{
const
params
=
{
const
res
=
await
getCheckPolicyNoApi
(
policyNo
)
premiumReconciliationBizId
:
addCheckRecordFormModel
.
value
.
premiumReconciliationBizId
,
if
(
!
res
.
data
)
{
p
ageNo
:
1
,
p
roxy
.
$modal
.
confirm
(
`
${
res
.
msg
}
`
,
{
showCancel
:
'0'
,
title
:
'填写提示'
})
pageSize
:
9999
tipTxt
.
value
=
res
.
msg
}
}
const
res
=
await
getPremiumRemittanceListApi
(
params
)
addCheckRecordFormModel
.
value
.
apiPremiumRemittanceDtoList
=
res
.
data
.
records
isSubmitReceipts
.
value
=
res
.
data
ElMessage
.
success
(
`
${
remittanceDialogTitle
.
value
}
成功`
)
showRemittance
.
value
=
false
// ✅ 校验 & 提交成功后才关闭
remittanceFormRef
.
value
.
resetForm
()
proxy
.
$modal
.
msgSuccess
(
'汇款记录修改成功'
)
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'加载数据失败:'
,
error
)
console
.
error
(
'加载数据失败:'
,
error
)
ElMessage
.
error
(
error
.
message
||
'加载数据失败'
)
ElMessage
.
error
(
error
.
message
||
'加载数据失败'
)
...
@@ -748,9 +910,21 @@ const confirmRemittance = async data => {
...
@@ -748,9 +910,21 @@ const confirmRemittance = async data => {
}
}
}
}
let
res
=
{}
let
res
=
{}
// 编辑状态下修改汇款记录
if
(
currentRow
.
value
.
premiumReconciliationBizId
&&
!
formData
.
premiumRemittanceBizId
)
{
if
(
formData
.
premiumRemittanceBizId
)
{
//编辑保费对账状态下新增汇款记录
//编辑单个对账的先写到这里,等会在对接
const
params
=
{
...
newFormData
,
premiumReconciliationBizId
:
currentRow
.
value
.
premiumReconciliationBizId
}
res
=
await
addSinglePremiumRemittance
(
params
)
if
(
res
.
code
===
200
)
{
// 更新保费对账详情
getPremiumReconciliationDetail
(
addCheckRecordFormModel
.
value
)
}
else
{
ElMessage
.
error
(
res
.
msg
||
`
${
remittanceDialogTitle
.
value
}
失败`
)
}
}
else
if
(
formData
.
premiumRemittanceBizId
)
{
//编辑保费对账状态下修改汇款记录
const
params
=
{
const
params
=
{
...
newFormData
...
newFormData
}
}
...
@@ -758,7 +932,6 @@ const confirmRemittance = async data => {
...
@@ -758,7 +932,6 @@ const confirmRemittance = async data => {
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
// 更新保费对账详情
// 更新保费对账详情
getPremiumReconciliationDetail
(
addCheckRecordFormModel
.
value
)
getPremiumReconciliationDetail
(
addCheckRecordFormModel
.
value
)
// getPremiumRemittanceList()
}
else
{
}
else
{
ElMessage
.
error
(
res
.
msg
||
`
${
remittanceDialogTitle
.
value
}
失败`
)
ElMessage
.
error
(
res
.
msg
||
`
${
remittanceDialogTitle
.
value
}
失败`
)
}
}
...
@@ -863,11 +1036,6 @@ function removeRemittance(row, index) {
...
@@ -863,11 +1036,6 @@ function removeRemittance(row, index) {
.
catch
(()
=>
{})
.
catch
(()
=>
{})
}
}
// ==============新增对账结束============
// ==============新增对账结束============
// 应付单类型通过value转成label
const
getFortuneBizTypeLabel
=
value
=>
{
const
item
=
fortuneBizTypeOptions
.
find
(
item
=>
item
.
value
===
value
)
return
item
?.
label
||
''
}
const
addCheckRecordConfig
=
[
const
addCheckRecordConfig
=
[
{
{
...
@@ -1020,14 +1188,15 @@ const handleCurrentChange = val => {
...
@@ -1020,14 +1188,15 @@ const handleCurrentChange = val => {
// 表格数据
// 表格数据
const
tableData
=
ref
([])
const
tableData
=
ref
([])
const
handleSelect
=
(
e
,
row
)
=>
{
const
handleSelect
=
(
command
,
row
)
=>
{
console
.
log
(
'选中行:'
,
e
,
row
)
selectedRow
.
value
=
row
selectedRow
.
value
=
row
if
(
e
==
'editRecord'
)
{
if
(
command
===
'editRecord'
)
{
currentRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
getPremiumReconciliationDetail
(
row
)
getPremiumReconciliationDetail
(
row
)
}
else
if
(
e
==
'settingResult'
)
{
}
else
if
(
command
=
==
'settingResult'
)
{
affirmFormModel
.
value
=
{}
affirmFormModel
.
value
=
{}
showAffirm
.
value
=
true
showAffirm
.
value
=
true
currentRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
}
}
}
}
const
addReceipts
=
async
()
=>
{
const
addReceipts
=
async
()
=>
{
...
@@ -1043,27 +1212,20 @@ const addReceipts = async () => {
...
@@ -1043,27 +1212,20 @@ const addReceipts = async () => {
apiPremiumReconciliationDto
[
key
]
=
formData
[
key
]
apiPremiumReconciliationDto
[
key
]
=
formData
[
key
]
}
}
}
}
// if (apiPremiumRemittanceDtoList.length > 0) {
// apiPremiumRemittanceDtoList.forEach(item => {
let
params
=
{}
// if (item.paymentVoucherList && item.paymentVoucherList.length > 0) {
// item.paymentVoucherList = item.paymentVoucherList.map(item1 => item1.url)
let
res
=
{}
// }
if
(
formData
.
premiumReconciliationBizId
)
{
// if (item.accountVerificationList && item.accountVerificationList.length > 0)
{
params
=
{
// item.accountVerificationList = item.accountVerificationList.map(item1 => item1.url)
...
apiPremiumReconciliationDto
//
}
}
// }
)
res
=
await
editPremiumReconciliation
(
params
)
// }
}
else
{
const
params
=
{
params
=
{
apiPremiumReconciliationDto
:
apiPremiumReconciliationDto
,
apiPremiumReconciliationDto
:
apiPremiumReconciliationDto
,
apiPremiumRemittanceDtoList
:
apiPremiumRemittanceDtoList
apiPremiumRemittanceDtoList
:
apiPremiumRemittanceDtoList
}
}
// console.log('新增保单对账:', params)
// return
let
res
=
{}
if
(
formData
.
policyReceiptBizId
)
{
params
.
policyReceiptBizId
=
formData
.
policyReceiptBizId
res
=
await
EditPolicyReceipt
(
params
)
}
else
{
res
=
await
addPremiumReconciliation
(
params
)
res
=
await
addPremiumReconciliation
(
params
)
}
}
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
...
@@ -1102,7 +1264,7 @@ const onSubmit = data => {
...
@@ -1102,7 +1264,7 @@ const onSubmit = data => {
// 获取入账状态,字典值转化方法
// 获取入账状态,字典值转化方法
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
try
{
try
{
getSelectOptions
()
await
getSelectOptions
()
await
loadDicts
([
await
loadDicts
([
'csf_ap_first_issue'
,
'csf_ap_first_issue'
,
'csf_policy_follow_status_new'
,
'csf_policy_follow_status_new'
,
...
@@ -1120,35 +1282,18 @@ onMounted(async () => {
...
@@ -1120,35 +1282,18 @@ onMounted(async () => {
loading
.
value
=
false
loading
.
value
=
false
}
}
})
})
watch
(
watch
(
affirmFormModel
,
newVal
=>
{
()
=>
remittanceFormModel
.
value
.
apiPremiumRemittanceFileDtoList
,
if
(
newVal
.
recognizedAmount
&&
newVal
.
recognizedCurrency
)
{
newVal
=>
{
calculateAmount
()
console
.
log
(
'newVal'
,
newVal
)
if
(
newVal
&&
newVal
.
length
>
0
)
{
newVal
.
forEach
(
item
=>
{
// 代表是从新增保单对账开始
if
(
item
.
response
)
{
let
newObj
=
JSON
.
parse
(
JSON
.
stringify
(
item
.
response
.
data
))
// tempOtherFileList这个变量便于其他资料文件表格得展示使用
tempOtherFileList
.
value
.
push
({
fileName
:
newObj
.
originalName
,
//文件名
fileType
:
newObj
.
fileType
,
//文件类型
fileUrl
:
newObj
.
url
,
//文件URL,
url
:
newObj
.
url
//文件URL
})
}
else
{
}
else
{
// 从编辑对账或已经新增过汇款要修改汇款
affirmFormModel
.
value
.
remainingUnpaidAmount
=
0
tempOtherFileList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
newVal
))
affirmFormModel
.
value
.
remainingUnpaidCurrency
=
''
}
}
})
})
}
},
{
deep
:
true
}
)
watch
(
receiptsFlag
,
newVal
=>
{
watch
(
receiptsFlag
,
newVal
=>
{
if
(
!
newVal
)
{
if
(
!
newVal
)
{
isSubmitReceipts
.
value
=
false
tipTxt
.
value
=
''
addCheckRecordFormModel
.
value
=
{}
addCheckRecordFormModel
.
value
=
{}
receiptsDialogTitle
.
value
=
''
receiptsDialogTitle
.
value
=
''
}
}
...
...
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