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
6d6b77eb
Commit
6d6b77eb
authored
Oct 14, 2025
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增来佣接口对接
parent
af056850
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
54 deletions
+123
-54
src/api/financial/commission.js
+11
-0
src/views/financialCenter/financialIncome.vue
+111
-54
src/views/financialCenter/financialSalary.vue
+1
-0
No files found.
src/api/financial/commission.js
View file @
6d6b77eb
...
...
@@ -159,6 +159,17 @@ export function deletePolicyFortuneAccount(data) {
})
}
// 新建来佣
// /csf/api/commission/add
export
function
addPolicyCommission
(
data
)
{
return
request
({
url
:
'/csf/api/commission/add'
,
method
:
'post'
,
data
:
data
})
}
...
...
src/views/financialCenter/financialIncome.vue
View file @
6d6b77eb
...
...
@@ -45,7 +45,7 @@
<!-- 操作区域 -->
<div
class=
"action-area"
>
<
!--
<el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新增入账
</el-button>
--
>
<
el-button
type=
"primary"
:icon=
"Plus"
@
click=
"handleAdd"
>
新增入账
</el-button
>
<!-- 导入区域 -->
<el-card
class=
"import-card"
>
...
...
@@ -125,64 +125,68 @@
</el-button>
</div>
<!-- 编辑对话框 -->
<el-dialog
v-model=
"editDialogVisible"
:title=
"editDialogTitle"
<!-- 入账记录对话框(新增/编辑共用) -->
<el-dialog
v-model=
"incomeDialogVisible"
:title=
"incomeDialogTitle"
width=
"600px"
:before-close=
"handleCloseDialog"
>
<el-form
:model=
"
editForm"
label-width=
"100px"
:rules=
"editFormRules"
ref=
"edit
FormRef"
>
<el-form
:model=
"
incomeForm"
label-width=
"100px"
:rules=
"incomeFormRules"
ref=
"income
FormRef"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"保单号"
prop=
"policyNo"
>
<el-input
v-model=
"
edit
Form.policyNo"
placeholder=
"请输入保单号"
/>
<el-input
v-model=
"
income
Form.policyNo"
placeholder=
"请输入保单号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"对账公司"
prop=
"reconciliationCompany"
>
<el-select
v-model=
"
edit
Form.reconciliationCompany"
placeholder=
"请选择对账公司"
>
<el-select
v-model=
"
income
Form.reconciliationCompany"
placeholder=
"请选择对账公司"
>
<el-option
v-for=
"item in companyOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.
value
"
: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=
"
edit
Form.commissionPeriod"
:min=
"1"
/>
<el-input-number
v-model=
"
income
Form.commissionPeriod"
:min=
"1"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"总期数"
prop=
"totalPeriod"
>
<el-input-number
v-model=
"
edit
Form.totalPeriod"
:min=
"1"
/>
<el-input-number
v-model=
"
income
Form.totalPeriod"
:min=
"1"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"入账项目"
prop=
"commissionName"
>
<el-input
v-model=
"
edit
Form.commissionName"
placeholder=
"请输入入账项目"
/>
<el-input
v-model=
"
income
Form.commissionName"
placeholder=
"请输入入账项目"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"入账金额"
prop=
"amount"
>
<el-input
v-model=
"
edit
Form.amount"
placeholder=
"请输入金额"
/>
<el-input
v-model=
"
income
Form.amount"
placeholder=
"请输入金额"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"币种"
prop=
"currency"
>
<el-select
v-model=
"editForm.currency"
placeholder=
"请选择币种"
>
<el-option
label=
"人民币"
value=
"CNY"
/>
<el-option
label=
"港币"
value=
"HKD"
/>
<el-option
label=
"美元"
value=
"USD"
/>
<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=
"24"
>
<el-form-item
label=
"入账日期"
prop=
"commissionDate"
>
<el-date-picker
v-model=
"
edit
Form.commissionDate"
v-model=
"
income
Form.commissionDate"
type=
"date"
placeholder=
"选择日期"
value-format=
"YYYY-MM-DD"
...
...
@@ -192,7 +196,7 @@
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"
edit
Form.remark"
v-model=
"
income
Form.remark"
type=
"textarea"
:rows=
"3"
placeholder=
"请输入备注信息"
...
...
@@ -204,9 +208,9 @@
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"
edit
DialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submit
EditForm"
:loading=
"edit
Loading"
>
确认
<el-button
@
click=
"
income
DialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submit
IncomeForm"
:loading=
"income
Loading"
>
{{
isEditMode
?
'更新'
:
'新增'
}}
</el-button>
</span>
</
template
>
...
...
@@ -229,17 +233,22 @@ const router = useRouter()
import
{
listType
}
from
'@/api/system/dict/type'
// 通过dictType=csf_commission_status获取比对状态字典值,获取对象中的dictItemList
const
dictLists
=
ref
([]);
const
currencyTypeOptions
=
ref
([])
const
getLists
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
listType
({
typeList
:
[
'csf_commission_status'
]}).
then
(
res
=>
{
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
||
[];
console
.
log
(
'获取到的字典数据:'
,
dictLists
.
value
);
resolve
(
dictLists
.
value
);
// 处理币种字典值
const
currencyData
=
res
.
data
.
find
(
item
=>
item
.
dictType
===
'bx_currency_type'
);
currencyTypeOptions
.
value
=
currencyData
?.
dictItemList
||
[];
console
.
log
(
'获取到的币种字典数据:'
,
currencyTypeOptions
.
value
);
resolve
(
dictLists
.
value
,
currencyTypeOptions
.
value
);
}
else
{
dictLists
.
value
=
[];
resolve
([]);
currencyTypeOptions
.
value
=
[];
resolve
([],[]);
}
}).
catch
(
error
=>
{
console
.
error
(
'获取状态列表失败:'
,
error
);
...
...
@@ -304,9 +313,6 @@ const pagination = reactive({
total
:
0
})
// Excel导入相关
const
selectedFile
=
ref
(
null
)
const
importLoading
=
ref
(
false
)
onMounted
(()
=>
{
// 获取字典值后,再调用接口获取来佣列表
...
...
@@ -413,9 +419,32 @@ const downloadTemplate = () => {
// 新增入账
const
handleAdd
=
()
=>
{
ElMessage
.
info
(
'打开新增入账对话框'
)
incomeDialogTitle
.
value
=
'新增入账记录'
isEditMode
.
value
=
false
// 重置表单数据
Object
.
assign
(
incomeForm
,
{
commissionBizId
:
''
,
policyNo
:
''
,
reconciliationCompany
:
''
,
commissionPeriod
:
1
,
totalPeriod
:
1
,
commissionName
:
''
,
amount
:
0
,
currency
:
'HKD'
,
commissionDate
:
''
,
remark
:
''
})
// 重置表单验证
if
(
incomeFormRef
.
value
)
{
incomeFormRef
.
value
.
clearValidate
()
}
incomeDialogVisible
.
value
=
true
}
import
{
deletePolicyCommission
}
from
'@/api/financial/commission'
// 删除
const
handleDelete
=
(
row
)
=>
{
...
...
@@ -465,18 +494,19 @@ const handleGenerateBilling = async () => {
}
}
// 编辑对话框相关
const
editDialogVisible
=
ref
(
false
)
const
editDialogTitle
=
ref
(
'编辑入账记录'
)
const
editLoading
=
ref
(
false
)
const
editFormRef
=
ref
()
// 入账记录对话框相关
const
incomeDialogVisible
=
ref
(
false
)
const
incomeDialogTitle
=
ref
(
'入账记录'
)
const
incomeLoading
=
ref
(
false
)
const
isEditMode
=
ref
(
false
)
const
incomeFormRef
=
ref
()
//
编辑
表单数据
const
edit
Form
=
reactive
({
//
入账
表单数据
const
income
Form
=
reactive
({
commissionBizId
:
''
,
policyNo
:
''
,
reconciliationCompany
:
''
,
c
urrent
Period
:
1
,
c
ommission
Period
:
1
,
totalPeriod
:
1
,
commissionName
:
''
,
amount
:
0
,
...
...
@@ -484,9 +514,8 @@ const editForm = reactive({
commissionDate
:
''
,
remark
:
''
})
// 表单验证规则
const
edit
FormRules
=
{
const
income
FormRules
=
{
policyNo
:
[{
required
:
true
,
message
:
'请输入保单号'
,
trigger
:
'blur'
}],
reconciliationCompany
:
[{
required
:
true
,
message
:
'请选择对账公司'
,
trigger
:
'change'
}],
commissionName
:
[{
required
:
true
,
message
:
'请输入入账项目'
,
trigger
:
'blur'
}],
...
...
@@ -494,12 +523,14 @@ const editFormRules = {
commissionDate
:
[{
required
:
true
,
message
:
'请选择入账日期'
,
trigger
:
'change'
}]
}
// 编辑入账记录
const
handleEdit
=
(
row
)
=>
{
editDialogTitle
.
value
=
`编辑入账记录 -
${
row
.
policyNo
}
`
incomeDialogTitle
.
value
=
`编辑入账记录 -
${
row
.
policyNo
}
`
isEditMode
.
value
=
true
// 填充表单数据
Object
.
assign
(
edit
Form
,
{
Object
.
assign
(
income
Form
,
{
commissionBizId
:
row
.
commissionBizId
,
policyNo
:
row
.
policyNo
,
reconciliationCompany
:
row
.
reconciliationCompany
,
...
...
@@ -512,37 +543,61 @@ const handleEdit = (row) => {
remark
:
row
.
remark
||
''
})
editDialogVisible
.
value
=
true
// 重置表单验证
if
(
incomeFormRef
.
value
)
{
incomeFormRef
.
value
.
clearValidate
()
}
incomeDialogVisible
.
value
=
true
}
// 提交编辑表单
const
submitEditForm
=
async
()
=>
{
// 提交入账表单(新增/编辑共用)
import
{
addPolicyCommission
}
from
'@/api/financial/commission'
const
submitIncomeForm
=
async
()
=>
{
if
(
!
incomeFormRef
.
value
)
{
ElMessage
.
error
(
'请先初始化表单'
)
return
}
try
{
await
editFormRef
.
value
.
validate
()
// 表单验证
const
valid
=
await
incomeFormRef
.
value
.
validate
()
if
(
!
valid
)
{
ElMessage
.
warning
(
'请完善表单信息'
)
return
}
editLoading
.
value
=
true
console
.
log
(
editForm
)
// 调用更新接口
await
updatePolicyCommission
(
editForm
)
incomeLoading
.
value
=
true
if
(
isEditMode
.
value
)
{
// 编辑模式 - 调用更新接口
await
updatePolicyCommission
(
incomeForm
)
ElMessage
.
success
(
'更新成功'
)
editDialogVisible
.
value
=
false
}
else
{
// 新增模式 - 调用新增接口
// 注意:这里需要根据实际的新增API进行调整
await
addPolicyCommission
(
incomeForm
)
ElMessage
.
success
(
'新增成功'
)
}
incomeDialogVisible
.
value
=
false
fetchTableData
()
// 刷新表格数据
}
catch
(
error
)
{
if
(
error
&&
error
.
errorFields
)
{
ElMessage
.
warning
(
'请完善表单信息'
)
}
else
{
console
.
error
(
'更新
失败:'
,
error
)
ElMessage
.
error
(
'更新
失败'
)
console
.
error
(
isEditMode
.
value
?
'更新失败:'
:
'新增
失败:'
,
error
)
ElMessage
.
error
(
isEditMode
.
value
?
'更新失败'
:
'新增
失败'
)
}
}
finally
{
edit
Loading
.
value
=
false
income
Loading
.
value
=
false
}
}
// 关闭对话框处理
const
handleCloseDialog
=
(
done
)
=>
{
if
(
edit
Loading
.
value
)
{
if
(
income
Loading
.
value
)
{
ElMessage
.
info
(
'正在保存,请稍候...'
)
return
}
...
...
@@ -554,6 +609,8 @@ const handleCloseDialog = (done) => {
}).
catch
(()
=>
{})
}
</
script
>
<
style
scoped
>
...
...
src/views/financialCenter/financialSalary.vue
View file @
6d6b77eb
...
...
@@ -461,6 +461,7 @@ const getDictLists = () => {
resolve
(
dictLists
.
value
,
currencyTypeOptions
.
value
);
}
else
{
currencyTypeOptions
.
value
=
[];
dictLists
.
value
=
[];
resolve
([],[]);
}
}).
catch
(
error
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment