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
1a827ce0
Commit
1a827ce0
authored
Jan 14, 2026
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into sw
parents
d10bafcd
462a8b7d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
372 additions
and
138 deletions
+372
-138
src/api/sign/policy.js
+39
-0
src/components/SearchForm/SearchForm.vue
+26
-3
src/components/commonDialog/index.vue
+1
-0
src/views/sign/appointment/components/productPlan.vue
+2
-8
src/views/sign/policyReceipts/premiumRecon.vue
+304
-127
No files found.
src/api/sign/policy.js
View file @
1a827ce0
...
...
@@ -54,6 +54,14 @@ export function addPremiumReconciliation(data) {
data
:
data
})
}
//编辑提交保费对账
export
function
editPremiumReconciliation
(
data
)
{
return
request
({
url
:
'/csf/api/premiumReconciliation/edit'
,
method
:
'put'
,
data
:
data
})
}
//保费对账编辑单个汇款记录
export
function
editPremiumRemittance
(
data
)
{
return
request
({
...
...
@@ -100,3 +108,34 @@ export function getPremiumRemittanceListApi(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 @
1a827ce0
...
...
@@ -129,8 +129,17 @@
:on-error=
"(err, file, fileList) => handleUploadError(err, file, fileList, item)"
:on-remove=
"(file, fileList) => handleUploadRemove(file, fileList, item)"
>
<el-button
size=
"small"
type=
"primary"
:link=
"item.link"
:disabled=
"item.disabled"
>
{{
item
.
uploadType
===
'image'
?
'点击上传图片'
:
'点击上传文件'
}}
<el-icon
class=
"iconStyle"
:size=
"20"
v-if=
"item.uploadType === 'image'"
><Upload
/></el-icon>
<el-button
v-else
size=
"small"
type=
"primary"
:link=
"item.link"
:disabled=
"item.disabled"
>
{{
'点击上传文件'
}}
</el-button>
<template
#
tip
v-if=
"item.maxSize || item.accept"
>
<div
class=
"el-upload__tip"
>
...
...
@@ -206,6 +215,8 @@ function handleUploadSuccess(response, file, fileList, item) {
// 触发 model 更新
handleModelChange
([...
fileList
],
item
)
ElMessage
.
success
(
`文件
${
file
.
name
}
上传成功`
)
console
.
log
(
'上传成功'
,
item
)
}
function
handleExceed
(
files
,
fileList
)
{
ElMessage
.
warning
(
'超出文件数量限制'
)
...
...
@@ -298,7 +309,7 @@ const props = defineProps({
isSearch
:
{
type
:
Boolean
,
default
:
false
}
})
const
emit
=
defineEmits
([
'update:modelValue'
,
'update'
])
const
emit
=
defineEmits
([
'update:modelValue'
,
'update'
,
'selectChange'
,
'uploadSuccess'
])
// ==================== Refs ====================
const
formRef
=
ref
(
null
)
...
...
@@ -507,6 +518,12 @@ function handleModelChange(value, item) {
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
()
}
// 辅助函数:浅比较两个对象
...
...
@@ -803,7 +820,13 @@ defineExpose({
</
script
>
<
style
scoped
>
.formBox
{
box-sizing
:
border-box
;
}
.search-form-item
{
margin-bottom
:
20px
;
}
.iconStyle
{
color
:
#409eff
;
}
</
style
>
src/components/commonDialog/index.vue
View file @
1a827ce0
...
...
@@ -124,6 +124,7 @@ watch(
}
.content
{
padding
:
0
15px
;
box-sizing
:
border-box
;
}
.dialog-footer
{
width
:
100%
;
...
...
src/views/sign/appointment/components/productPlan.vue
View file @
1a827ce0
...
...
@@ -407,10 +407,7 @@ const handleSearchSelectChange = (father, key) => {
dialogForm
.
value
[
'productLaunchBizId'
]
=
item1
.
value
}
item1
.
apiAttributeSettingDtoList
.
forEach
(
item2
=>
{
if
(
item2
.
attributeSettingBizId
==
'attribute_setting_okpcuc8tlXRfVIAy'
&&
item
.
key
==
'issueNumber'
)
{
if
(
item2
.
fieldBizId
==
'field_eWCnuwS3WPKog5kZ'
&&
item
.
key
==
'issueNumber'
)
{
if
(
item2
.
value
)
{
item
.
options
=
item2
.
value
.
split
(
/
[
,,;;
\s]
+/
)
...
...
@@ -435,10 +432,7 @@ const handleSearchSelectChange = (father, key) => {
form
.
value
[
father
.
key
][
'productLaunchBizId'
]
=
item1
.
value
}
item1
.
apiAttributeSettingDtoList
.
forEach
(
item2
=>
{
if
(
item2
.
attributeSettingBizId
==
'attribute_setting_okpcuc8tlXRfVIAy'
&&
item
.
key
==
'issueNumber'
)
{
if
(
item2
.
fieldBizId
==
'field_eWCnuwS3WPKog5kZ'
&&
item
.
key
==
'issueNumber'
)
{
if
(
item2
.
value
)
{
item
.
options
=
item2
.
value
.
split
(
/
[
,,;;
\s]
+/
)
...
...
src/views/sign/policyReceipts/premiumRecon.vue
View file @
1a827ce0
...
...
@@ -28,6 +28,12 @@
>
<el-table-column
type=
"selection"
width=
"40"
/>
<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=
"policyFollowStatus"
label=
"新单状态"
width=
"150"
>
...
...
@@ -67,9 +73,9 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"paymentMethod"
label=
"缴费方式"
width=
"150"
>
<
template
#
default=
"{ row }"
>
<
!-- <
template #default="{ row }">
{{ getDictLabel('csf_ap_first_issue', row.paymentMethod) }}
</
template
>
</template>
-->
</el-table-column>
<el-table-column
prop=
"recognizedAmount"
label=
"保司认定金额"
width=
"150"
>
<
template
#
default=
"{ row }"
>
...
...
@@ -81,7 +87,11 @@
{{
getDictLabel
(
'bx_currency_type'
,
row
.
recognizedCurrency
)
}}
</
template
>
</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=
"policyHolder"
label=
"投保人"
width=
"150"
/>
<el-table-column
prop=
"insured"
label=
"受保人"
width=
"150"
/>
...
...
@@ -99,7 +109,7 @@
<el-table-column
prop=
"reconciliationCompany"
label=
"对账公司"
width=
"150"
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"120"
>
<
!-- <
el-table-column fixed="right" label="操作" min-width="120">
<template #default="{ row }">
<el-popover placement="right" :width="200" trigger="click">
<template #reference>
...
...
@@ -117,6 +127,27 @@
</el-menu>
</el-popover>
</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>
</template>
...
...
@@ -135,6 +166,7 @@
ref=
"addCheckRecordFormRef"
:config=
"addCheckRecordConfig"
v-model=
"addCheckRecordFormModel"
@
select-change=
"onSelectChange"
/>
<div>
<el-button
type=
"primary"
icon=
"plus"
@
click=
"addRemittance"
style=
"margin-bottom: 10px"
...
...
@@ -166,7 +198,11 @@
</
template
>
</el-table-column>
<el-table-column
label=
"付款人"
prop=
"payer"
/>
<el-table-column
label=
"付款银行"
prop=
"payingBank"
/>
<el-table-column
label=
"付款银行"
prop=
"payingBank"
>
<
template
#
default=
"{ row }"
>
{{
changeDictLabel
(
'bank'
,
row
.
payingBank
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"付款账号"
prop=
"paymentAccount"
/>
<el-table-column
label=
"操作"
width=
"100"
>
<
template
#
default=
"{ row, $index }"
>
...
...
@@ -190,6 +226,7 @@
:showAction=
"true"
:showClose=
"true"
@
close=
"showAffirm = false"
@
confirm=
"confirmAffirm"
>
<SearchForm
ref=
"affirmFormRef"
:config=
"affirmConfig"
v-model=
"affirmFormModel"
/>
</CommonDialog>
...
...
@@ -215,6 +252,7 @@
ref=
"remittanceFormRef"
:config=
"remittanceConfig"
v-model=
"remittanceFormModel"
@
uploadSuccess=
"handleUploadSuccess"
/>
<div
v-if=
"remittanceFormModel.apiPremiumRemittanceFileDtoList?.length"
...
...
@@ -251,8 +289,7 @@ import CommonDialog from '@/components/commonDialog'
import
SearchForm
from
'@/components/SearchForm/SearchForm.vue'
import
{
ElMessage
}
from
'element-plus'
import
{
formatCurrency
}
from
'@/utils/number'
// 接口
import
{
updatePayoutAmount
}
from
'@/api/financial/commission'
import
{
premiumReconciliationList
,
EditPolicyReceipt
,
...
...
@@ -262,8 +299,15 @@ import {
deletePremiumRemittanceFile
,
getPremiumRemittanceFileList
,
editSiglePremiumRemittance
,
getPremiumRemittanceListApi
getPremiumRemittanceListApi
,
deletePremiumRemittance
,
getCheckPolicyNoApi
,
editPremiumReconciliation
,
getRemainingUnpaidAmount
,
submitResult
,
addSinglePremiumRemittance
}
from
'@/api/sign/policy'
import
{
getBankList
}
from
'@/api/common'
import
useUserStore
from
'@/store/modules/user'
import
{
loadDicts
,
getDictLabel
}
from
'@/utils/useDict'
import
{
getToken
}
from
'@/utils/auth'
...
...
@@ -282,20 +326,21 @@ const receiptsDialogTitle = ref('新增保单回执')
const
remittanceDialogTitle
=
ref
(
'新增汇款'
)
const
showRemittance
=
ref
(
false
)
const
remittanceFormRef
=
ref
(
null
)
const
bankOptions
=
ref
([])
//银行options
const
currentRow
=
ref
({})
//银行options
const
searchConfig
=
ref
([
{
type
:
'select'
,
prop
:
'insur
er
'
,
prop
:
'insur
anceCompanyBizId
'
,
label
:
'保险公司'
,
api
:
'/insurance/base/api/insuranceCompany/page'
,
keywordField
:
'
queryContent
'
,
keywordField
:
'
fullName
'
,
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
placeholder
:
'输入保险公司名称搜索'
,
debounceWait
:
500
,
// 自定义防抖时间
multiple
:
false
,
valueKey
:
'insuranceCompanyBizId'
,
labelKey
:
'
abbreviation
'
,
labelKey
:
'
fullName
'
,
transform
:
res
=>
{
console
.
log
(
res
)
return
res
?.
data
.
records
||
[]
...
...
@@ -303,16 +348,16 @@ const searchConfig = ref([
},
{
type
:
'select'
,
prop
:
'
insurer
'
,
prop
:
'
payingBank
'
,
label
:
'付款银行'
,
api
:
'/
insurance/base/api/insuranceCompany
/page'
,
keywordField
:
'
queryContent
'
,
api
:
'/
base/api/bank
/page'
,
keywordField
:
'
bankName
'
,
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
placeholder
:
'输入保险公司名称搜索'
,
debounceWait
:
500
,
// 自定义防抖时间
multiple
:
false
,
valueKey
:
'
insuranceCompany
BizId'
,
labelKey
:
'
abbreviation
'
,
valueKey
:
'
bank
BizId'
,
labelKey
:
'
bankName
'
,
transform
:
res
=>
{
console
.
log
(
res
)
return
res
?.
data
.
records
||
[]
...
...
@@ -320,7 +365,7 @@ const searchConfig = ref([
},
{
type
:
'input'
,
prop
:
'
appointmentNo
'
,
prop
:
'
payer
'
,
label
:
'付款人'
},
{
...
...
@@ -330,80 +375,107 @@ const searchConfig = ref([
},
{
type
:
'input'
,
prop
:
'
policy
No'
,
prop
:
'
appointment
No'
,
label
:
'预约编号'
},
{
type
:
'input'
,
prop
:
'policy
No
'
,
prop
:
'policy
Holder
'
,
label
:
'投保人'
},
{
type
:
'select'
,
prop
:
'
receiptStatus
'
,
prop
:
'
paymentMethod
'
,
label
:
'缴费方式'
,
multiple
:
false
,
dictType
:
'
receipt_status
'
dictType
:
'
csf_ap_first_issue
'
},
{
type
:
'select'
,
prop
:
'
receipt
Status'
,
prop
:
'
policyFollow
Status'
,
label
:
'新单状态'
,
multiple
:
false
,
dictType
:
'
receipt_status
'
dictType
:
'
csf_policy_follow_status_new
'
},
{
type
:
'select'
,
prop
:
'
receipt
Status'
,
prop
:
'
policy
Status'
,
label
:
'保单状态'
,
multiple
:
false
,
dictType
:
'
receipt_status
'
dictType
:
'
csf_policy_status_new
'
},
{
type
:
'select'
,
prop
:
'rec
eiptStatus
'
,
prop
:
'rec
onciliationType
'
,
label
:
'对账类型'
,
multiple
:
false
,
dictType
:
'rec
eipt_status
'
dictType
:
'rec
onciliation_type
'
},
{
type
:
'date'
,
prop
:
'
receip
tDate'
,
prop
:
'
paymen
tDate'
,
label
:
'付款日期'
,
placeholder
:
'请选择'
,
maxDate
:
'today'
}
])
// 表格操作菜单
const
dropdownItems
=
[
{
label
:
'设置认定结果'
,
value
:
'settingResult'
},
{
label
:
'编辑'
,
value
:
'editRecord'
}
// { label: '查看记录', value: 'viewRecord' }
]
// 应收单类型
const
fortuneBizTypeOptions
=
[
{
value
:
'R'
,
label
:
'关联保单应付单'
},
{
value
:
'U'
,
label
:
'非关联保单应付单'
}
]
// 动态生成操作菜单项
const
getMenuItems
=
row
=>
{
const
items
=
[{
label
:
'编辑'
,
value
:
'editRecord'
}]
// 只有 reconciliationStatus 不是 'BS_DZ_CG' 时才显示“设置认定结果”
if
(
row
.
reconciliationStatus
!==
'BS_DZ_CG'
)
{
items
.
push
({
label
:
'设置认定结果'
,
value
:
'settingResult'
})
}
// 未来可继续添加其他条件项,例如:
// if (row.status === 'xxx') { items.push(...) }
return
items
}
//获取远程搜索下拉框数据,回显数据用
const
getSelectOptions
=
async
()
=>
{
const
params4
=
{
pageNo
:
1
,
pageSize
:
99999
}
const
response4
=
await
getBankList
(
params4
)
if
(
response4
.
code
==
200
)
{
response4
.
data
.
records
=
response4
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
bankName
,
value
:
item
.
bankBizId
}
})
bankOptions
.
value
=
response4
.
data
.
records
}
}
function
changeDictLabel
(
type
,
value
)
{
if
(
type
==
'bank'
)
{
const
bank
=
bankOptions
.
value
.
find
(
opt
=>
opt
.
value
===
value
)
return
bank
?
bank
.
label
:
value
||
''
}
}
// ==============设置认定结果开始============
const
showAffirm
=
ref
(
false
)
const
affirmFormRef
=
ref
(
null
)
const
affirmFormModel
=
ref
({})
const
affirmConfig
=
[
{
type
:
'input'
,
prop
:
'
payment
Amount'
,
prop
:
'
recognized
Amount'
,
label
:
'保司认定金额'
,
inputType
:
'decimal'
,
rules
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
},
{
pattern
:
/^
\d
+$/
,
message
:
'只能输入正整数'
,
trigger
:
'blur'
}
{
pattern
:
/^
\d
+$/
,
message
:
'只能输入正整数'
}
]
},
{
type
:
'select'
,
prop
:
'
payment
Currency'
,
prop
:
'
recognized
Currency'
,
label
:
'保司认定币种'
,
dictType
:
'bx_currency_type'
,
rules
:
[{
required
:
true
,
message
:
'请输入认定币种'
,
trigger
:
'blur'
}]
...
...
@@ -411,17 +483,87 @@ const affirmConfig = [
{
type
:
'input'
,
prop
:
'
insured
'
,
prop
:
'
remainingUnpaidAmount
'
,
label
:
'此保单剩余待付金额'
,
disabled
:
true
},
{
type
:
'
inpu
t'
,
prop
:
'
insurede
'
,
type
:
'
selec
t'
,
prop
:
'
remainingUnpaidCurrency
'
,
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
:
[]
})
...
...
@@ -429,6 +571,8 @@ const addCheckRecordFormRef = ref(null)
// 设置汇款
const
remittanceFormModel
=
ref
({
apiPremiumRemittanceFileDtoList
:
[]
})
const
tempOtherFileList
=
ref
([])
//临时存储其他资料数据
const
isSubmitReceipts
=
ref
(
false
)
//是否可以提交对账
const
tipTxt
=
ref
(
''
)
//是否可以提交对账
const
deleteObjkeys
=
{
reconciliationType
:
'reconciliationType'
,
...
...
@@ -452,7 +596,18 @@ const remittanceConfig = [
inputType
:
'decimal'
,
rules
:
[
{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
},
{
pattern
:
/^
\d
+$/
,
message
:
'只能输入正整数'
,
trigger
:
'blur'
}
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
||
value
==
null
)
{
callback
(
new
Error
(
'请输入付款金额'
))
}
else
if
(
!
/^
\d
+$/
.
test
(
String
(
value
)))
{
callback
(
new
Error
(
'只能输入正整数'
))
}
else
{
callback
()
}
},
trigger
:
'blur'
}
]
},
{
...
...
@@ -476,13 +631,20 @@ const remittanceConfig = [
rules
:
[{
required
:
true
,
message
:
'请输入'
,
trigger
:
'blur'
}]
},
{
type
:
'date'
,
prop
:
'paymentDate'
,
label
:
'付款日期'
,
placeholder
:
'请选择'
,
maxDate
:
'today'
},
{
type
:
'select'
,
prop
:
'payingBank'
,
label
:
'付款银行'
,
api
:
'/base/api/bank/page'
,
keywordField
:
'policyNo'
,
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
placeholder
:
'输入转介人名称搜索'
,
debounceWait
:
500
,
// 自定义防抖时间
valueKey
:
'bankBizId'
,
labelKey
:
'bankName'
,
...
...
@@ -604,11 +766,42 @@ const remittanceConfig = [
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
()
=>
{
if
(
tipTxt
.
value
)
{
proxy
.
$modal
.
confirm
(
`
${
tipTxt
.
value
}
`
,
{
showCancel
:
'0'
,
title
:
'填写提示'
})
return
}
try
{
// 汇款记录详情也需要回显保费对账得一些字段
const
formData
=
await
addCheckRecordFormRef
.
value
.
validate
()
// 汇款记录详情也需要回显保费对账得一些字段
remittanceFormModel
.
value
=
{
...
formData
}
...
...
@@ -625,6 +818,8 @@ const addRemittance = async () => {
// 删除其他资料附件函数
function
removeOtherFile
(
row
,
index
)
{
const
list
=
[...
remittanceFormModel
.
value
.
apiPremiumRemittanceFileDtoList
]
console
.
log
(
'删除附件'
,
row
)
proxy
.
$modal
.
confirm
(
'是否确认删除这个附件?'
)
.
then
(
function
()
{
...
...
@@ -643,27 +838,23 @@ function removeOtherFile(row, index) {
}
})
.
then
(
res
=>
{
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
&&
row
.
premiumRemittanceFileBizId
)
{
// 调用附件接口,更新附件列表
otherFileList
()
}
})
.
catch
(()
=>
{})
}
//
获取汇款记录列表
const
getPremiumRemittanceList
=
async
()
=>
{
//
检查此保单号是否已经提交过保费对账
const
checkPolicyNo
=
async
policyNo
=>
{
try
{
const
params
=
{
premiumReconciliationBizId
:
addCheckRecordFormModel
.
value
.
premiumReconciliationBizId
,
p
ageNo
:
1
,
pageSize
:
9999
const
res
=
await
getCheckPolicyNoApi
(
policyNo
)
if
(
!
res
.
data
)
{
p
roxy
.
$modal
.
confirm
(
`
${
res
.
msg
}
`
,
{
showCancel
:
'0'
,
title
:
'填写提示'
})
tipTxt
.
value
=
res
.
msg
}
const
res
=
await
getPremiumRemittanceListApi
(
params
)
addCheckRecordFormModel
.
value
.
apiPremiumRemittanceDtoList
=
res
.
data
.
records
ElMessage
.
success
(
`
${
remittanceDialogTitle
.
value
}
成功`
)
showRemittance
.
value
=
false
// ✅ 校验 & 提交成功后才关闭
remittanceFormRef
.
value
.
resetForm
()
proxy
.
$modal
.
msgSuccess
(
'汇款记录修改成功'
)
isSubmitReceipts
.
value
=
res
.
data
}
catch
(
error
)
{
console
.
error
(
'加载数据失败:'
,
error
)
ElMessage
.
error
(
error
.
message
||
'加载数据失败'
)
...
...
@@ -719,9 +910,21 @@ const confirmRemittance = async data => {
}
}
let
res
=
{}
// 编辑状态下修改汇款记录
if
(
formData
.
premiumRemittanceBizId
)
{
//编辑单个对账的先写到这里,等会在对接
if
(
currentRow
.
value
.
premiumReconciliationBizId
&&
!
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
=
{
...
newFormData
}
...
...
@@ -729,7 +932,6 @@ const confirmRemittance = async data => {
if
(
res
.
code
===
200
)
{
// 更新保费对账详情
getPremiumReconciliationDetail
(
addCheckRecordFormModel
.
value
)
// getPremiumRemittanceList()
}
else
{
ElMessage
.
error
(
res
.
msg
||
`
${
remittanceDialogTitle
.
value
}
失败`
)
}
...
...
@@ -791,10 +993,9 @@ const editRemittance = row => {
})
}
}
console
.
log
(
'===================================='
)
console
.
log
(
'汇款修改'
,
newObj
)
console
.
log
(
'===================================='
)
remittanceFormModel
.
value
=
newObj
showRemittance
.
value
=
true
}
// 删除汇款记录
...
...
@@ -827,17 +1028,14 @@ function removeRemittance(row, index) {
.
then
(
res
=>
{
if
(
res
&&
res
.
code
==
200
)
{
proxy
.
$modal
.
msgSuccess
(
'汇款删除成功'
)
// 重新获取详情拿到最新数据
getPremiumReconciliationDetail
(
addCheckRecordFormModel
.
value
)
// 删除成功要调用保费对账的详情接口,重新汇款记录数据,这里还没做等会做
}
})
.
catch
(()
=>
{})
}
// ==============新增对账结束============
// 应付单类型通过value转成label
const
getFortuneBizTypeLabel
=
value
=>
{
const
item
=
fortuneBizTypeOptions
.
find
(
item
=>
item
.
value
===
value
)
return
item
?.
label
||
''
}
const
addCheckRecordConfig
=
[
{
...
...
@@ -990,14 +1188,15 @@ const handleCurrentChange = val => {
// 表格数据
const
tableData
=
ref
([])
const
handleSelect
=
(
e
,
row
)
=>
{
console
.
log
(
'选中行:'
,
e
,
row
)
const
handleSelect
=
(
command
,
row
)
=>
{
selectedRow
.
value
=
row
if
(
e
==
'editRecord'
)
{
if
(
command
===
'editRecord'
)
{
currentRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
getPremiumReconciliationDetail
(
row
)
}
else
if
(
e
==
'settingResult'
)
{
}
else
if
(
command
=
==
'settingResult'
)
{
affirmFormModel
.
value
=
{}
showAffirm
.
value
=
true
currentRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
}
}
const
addReceipts
=
async
()
=>
{
...
...
@@ -1013,27 +1212,20 @@ const addReceipts = async () => {
apiPremiumReconciliationDto
[
key
]
=
formData
[
key
]
}
}
// if (apiPremiumRemittanceDtoList.length > 0) {
// apiPremiumRemittanceDtoList.forEach(item => {
// if (item.paymentVoucherList && item.paymentVoucherList.length > 0) {
// item.paymentVoucherList = item.paymentVoucherList.map(item1 => item1.url)
// }
// if (item.accountVerificationList && item.accountVerificationList.length > 0) {
// item.accountVerificationList = item.accountVerificationList.map(item1 => item1.url)
// }
// })
// }
const
params
=
{
apiPremiumReconciliationDto
:
apiPremiumReconciliationDto
,
apiPremiumRemittanceDtoList
:
apiPremiumRemittanceDtoList
}
// console.log('新增保单对账:', params)
// return
let
params
=
{}
let
res
=
{}
if
(
formData
.
policyReceiptBizId
)
{
params
.
policyReceiptBizId
=
formData
.
policyReceiptBizId
res
=
await
EditPolicyReceipt
(
params
)
if
(
formData
.
premiumReconciliationBizId
)
{
params
=
{
...
apiPremiumReconciliationDto
}
res
=
await
editPremiumReconciliation
(
params
)
}
else
{
params
=
{
apiPremiumReconciliationDto
:
apiPremiumReconciliationDto
,
apiPremiumRemittanceDtoList
:
apiPremiumRemittanceDtoList
}
res
=
await
addPremiumReconciliation
(
params
)
}
if
(
res
.
code
===
200
)
{
...
...
@@ -1072,6 +1264,7 @@ const onSubmit = data => {
// 获取入账状态,字典值转化方法
onMounted
(
async
()
=>
{
try
{
await
getSelectOptions
()
await
loadDicts
([
'csf_ap_first_issue'
,
'csf_policy_follow_status_new'
,
...
...
@@ -1081,6 +1274,7 @@ onMounted(async () => {
'reconciliation_type'
,
'rel_pay_policy'
])
loadTableData
()
}
catch
(
error
)
{
console
.
error
(
'字典加载失败'
,
error
)
...
...
@@ -1088,35 +1282,18 @@ onMounted(async () => {
loading
.
value
=
false
}
})
watch
(
()
=>
remittanceFormModel
.
value
.
apiPremiumRemittanceFileDtoList
,
newVal
=>
{
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
{
// 从编辑对账或已经新增过汇款要修改汇款
tempOtherFileList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
newVal
))
}
})
}
},
{
deep
:
true
}
)
watch
(
affirmFormModel
,
newVal
=>
{
if
(
newVal
.
recognizedAmount
&&
newVal
.
recognizedCurrency
)
{
calculateAmount
()
}
else
{
affirmFormModel
.
value
.
remainingUnpaidAmount
=
0
affirmFormModel
.
value
.
remainingUnpaidCurrency
=
''
}
})
watch
(
receiptsFlag
,
newVal
=>
{
if
(
!
newVal
)
{
isSubmitReceipts
.
value
=
false
tipTxt
.
value
=
''
addCheckRecordFormModel
.
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