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
3fdb591d
Commit
3fdb591d
authored
Nov 10, 2025
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改预计来佣和入账公司的对账公司
parent
622794c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
275 additions
and
132 deletions
+275
-132
src/views/financialCenter/financialIncome.vue
+99
-77
src/views/sign/underwritingMain/components/expectedCommission.vue
+176
-55
No files found.
src/views/financialCenter/financialIncome.vue
View file @
3fdb591d
...
@@ -11,7 +11,11 @@
...
@@ -11,7 +11,11 @@
</el-col>
</el-col>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"对账公司"
>
<el-form-item
label=
"对账公司"
>
<el-select
v-model=
"searchForm.reconciliationCompany"
placeholder=
"请选择对账公司"
clearable
>
<el-select
v-model=
"searchForm.reconciliationCompany"
placeholder=
"请选择对账公司"
clearable
>
<el-option
<el-option
v-for=
"item in companyOptions"
v-for=
"item in companyOptions"
:key=
"item.value"
:key=
"item.value"
...
@@ -51,11 +55,11 @@
...
@@ -51,11 +55,11 @@
<el-card
class=
"import-card"
>
<el-card
class=
"import-card"
>
<div
class=
"import-content"
>
<div
class=
"import-content"
>
<div
class=
"import-actions"
>
<div
class=
"import-actions"
>
<FileUpload
:fileType=
"['xlsx', 'xls']"
<FileUpload
:fileType=
"['xlsx', 'xls']"
:action=
"'/csf/api/commission/upload/excel'"
:action=
"'/csf/api/commission/upload/excel'"
@
uploadEnd =
'getUploadFileFunc'
@
uploadEnd=
"getUploadFileFunc"
:responseType=
"'onlyStatus'"
:responseType=
"'onlyStatus'"
/>
/>
<el-button
text
@
click=
"downloadTemplate"
size=
"small"
class=
"download-template-btn"
>
<el-button
text
@
click=
"downloadTemplate"
size=
"small"
class=
"download-template-btn"
>
...
@@ -78,8 +82,18 @@
...
@@ -78,8 +82,18 @@
>
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
prop=
"policyNo"
label=
"保单号"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"policyNo"
label=
"保单号"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"reconciliationCompany"
label=
"对账公司"
min-width=
"120"
align=
"center"
/>
<el-table-column
<el-table-column
prop=
"commissionPeriod"
label=
"当前入账期数"
min-width=
"100"
align=
"center"
/>
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=
"totalPeriod"
label=
"预计总期数"
min-width=
"100"
align=
"center"
/>
<el-table-column
prop=
"commissionName"
label=
"入账项目"
min-width=
"120"
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=
"amount"
label=
"入账金额"
min-width=
"100"
align=
"center"
/>
...
@@ -87,14 +101,24 @@
...
@@ -87,14 +101,24 @@
<el-table-column
prop=
"commissionDate"
label=
"入账日期"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"commissionDate"
label=
"入账日期"
min-width=
"120"
align=
"center"
/>
<el-table-column
prop=
"status"
label=
"比对状态"
min-width=
"100"
align=
"center"
>
<el-table-column
prop=
"status"
label=
"比对状态"
min-width=
"100"
align=
"center"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<span>
{{
convertStatusToDict
(
scope
.
row
.
status
)
}}
</span>
<span>
{{
convertStatusToDict
(
scope
.
row
.
status
)
}}
</span>
</
template
>
</
template
>
</el-table-column
</el-table-column>
>
>
>
<el-table-column
prop=
"remark"
label=
"备注"
min-width=
"150"
align=
"center"
show-overflow-tooltip
/>
<el-table-column
prop=
"remark"
label=
"备注"
min-width=
"150"
align=
"center"
show-overflow-tooltip
/>
<el-table-column
label=
"操作"
width=
"180"
align=
"center"
fixed=
"right"
>
<el-table-column
label=
"操作"
width=
"180"
align=
"center"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
text
size=
"small"
type=
"primary"
@
click=
"handleEdit(scope.row)"
>
编辑
</el-button>
<el-button
text
size=
"small"
type=
"primary"
@
click=
"handleEdit(scope.row)"
<el-button
text
size=
"small"
type=
"danger"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
>
编辑
</el-button
>
<el-button
text
size=
"small"
type=
"danger"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -125,7 +149,7 @@
...
@@ -125,7 +149,7 @@
</el-button>
</el-button>
</div>
</div>
<!-- 编辑对话框 -->
<!-- 编辑对话框 -->
<!-- 入账记录对话框(新增/编辑共用) -->
<!-- 入账记录对话框(新增/编辑共用) -->
<el-dialog
<el-dialog
v-model=
"incomeDialogVisible"
v-model=
"incomeDialogVisible"
:title=
"incomeDialogTitle"
:title=
"incomeDialogTitle"
...
@@ -222,49 +246,55 @@
...
@@ -222,49 +246,55 @@
import
{
ref
,
reactive
,
onMounted
}
from
'vue'
import
{
ref
,
reactive
,
onMounted
}
from
'vue'
import
{
Search
,
RefreshLeft
,
UploadFilled
,
Plus
,
Document
}
from
'@element-plus/icons-vue'
import
{
Search
,
RefreshLeft
,
UploadFilled
,
Plus
,
Document
}
from
'@element-plus/icons-vue'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
*
as
XLSX
from
'xlsx'
// 导入有关来佣的接口
// 导入有关来佣的接口
import
{
getPolicyCommissionList
,
downloadPolicyFortune
,
generateCommissionRecord
,
updatePolicyCommission
}
from
"@/api/financial/commission"
import
{
getPolicyCommissionList
,
import
FileUpload
from
"@/components/FileUpload/index"
downloadPolicyFortune
,
generateCommissionRecord
,
updatePolicyCommission
}
from
'@/api/financial/commission'
import
FileUpload
from
'@/components/FileUpload/index'
import
{
useRouter
}
from
'vue-router'
import
{
useRouter
}
from
'vue-router'
const
router
=
useRouter
()
const
router
=
useRouter
()
import
{
listType
}
from
'@/api/system/dict/type'
import
{
listType
}
from
'@/api/system/dict/type'
// 通过dictType=csf_commission_status获取比对状态字典值,获取对象中的dictItemList
// 通过dictType=csf_commission_status获取比对状态字典值,获取对象中的dictItemList
const
dictLists
=
ref
([])
;
const
dictLists
=
ref
([])
const
currencyTypeOptions
=
ref
([])
const
currencyTypeOptions
=
ref
([])
const
getLists
=
()
=>
{
const
getLists
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
listType
({
typeList
:
[
'csf_commission_status'
,
'bx_currency_type'
]}).
then
(
res
=>
{
listType
({
typeList
:
[
'csf_commission_status'
,
'bx_currency_type'
]
})
.
then
(
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
)
{
if
(
res
.
code
===
200
&&
res
.
data
)
{
const
dictData
=
res
.
data
.
find
(
item
=>
item
.
dictType
===
'csf_commission_status'
);
const
dictData
=
res
.
data
.
find
(
item
=>
item
.
dictType
===
'csf_commission_status'
)
dictLists
.
value
=
dictData
?.
dictItemList
||
[];
dictLists
.
value
=
dictData
?.
dictItemList
||
[]
// 处理币种字典值
// 处理币种字典值
const
currencyData
=
res
.
data
.
find
(
item
=>
item
.
dictType
===
'bx_currency_type'
);
const
currencyData
=
res
.
data
.
find
(
item
=>
item
.
dictType
===
'bx_currency_type'
)
currencyTypeOptions
.
value
=
currencyData
?.
dictItemList
||
[];
currencyTypeOptions
.
value
=
currencyData
?.
dictItemList
||
[]
console
.
log
(
'获取到的币种字典数据:'
,
currencyTypeOptions
.
value
);
console
.
log
(
'获取到的币种字典数据:'
,
currencyTypeOptions
.
value
)
resolve
(
dictLists
.
value
,
currencyTypeOptions
.
value
);
resolve
(
dictLists
.
value
,
currencyTypeOptions
.
value
)
}
else
{
}
else
{
dictLists
.
value
=
[];
dictLists
.
value
=
[]
currencyTypeOptions
.
value
=
[];
currencyTypeOptions
.
value
=
[]
resolve
([],[]);
resolve
([],
[])
}
}
}).
catch
(
error
=>
{
})
console
.
error
(
'获取状态列表失败:'
,
error
);
.
catch
(
error
=>
{
dictLists
.
value
=
[];
console
.
error
(
'获取状态列表失败:'
,
error
)
reject
(
error
);
dictLists
.
value
=
[]
});
reject
(
error
)
});
})
})
}
}
// 返回数据中状态需要转换为字典值
// 返回数据中状态需要转换为字典值
const
convertStatusToDict
=
(
status
)
=>
{
const
convertStatusToDict
=
status
=>
{
const
dictItem
=
dictLists
.
value
.
find
(
item
=>
item
.
itemValue
==
status
);
const
dictItem
=
dictLists
.
value
.
find
(
item
=>
item
.
itemValue
==
status
)
return
dictItem
?.
itemLabel
??
status
;
return
dictItem
?.
itemLabel
??
status
}
}
// 增加通过表格排序,排序字段sortField,升降序sortOrder
// 增加通过表格排序,排序字段sortField,升降序sortOrder
const
handleSortChange
=
(
column
)
=>
{
const
handleSortChange
=
column
=>
{
pagination
.
sortField
=
column
.
prop
pagination
.
sortField
=
column
.
prop
pagination
.
sortOrder
=
column
.
order
===
'ascending'
?
'ascend'
:
'descend'
pagination
.
sortOrder
=
column
.
order
===
'ascending'
?
'ascend'
:
'descend'
fetchTableData
()
fetchTableData
()
...
@@ -282,16 +312,17 @@ const searchForm = reactive({
...
@@ -282,16 +312,17 @@ const searchForm = reactive({
const
companyOptions
=
ref
([])
const
companyOptions
=
ref
([])
// 获取对账公司列表
// 获取对账公司列表
import
{
getReconciliationCompanyList
}
from
'@/api/financial/commission'
import
{
getReconciliationCompanyList
}
from
'@/api/financial/commission'
import
{
getAllCompanys
}
from
'@/api/common'
const
fetchReconciliationCompanyList
=
async
()
=>
{
const
fetchReconciliationCompanyList
=
async
()
=>
{
try
{
try
{
const
response
=
await
get
ReconciliationCompanyList
({
const
response
=
await
get
AllCompanys
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
1000
pageSize
:
1000
})
})
if
(
response
.
code
===
200
)
{
if
(
response
.
code
===
200
)
{
companyOptions
.
value
=
response
.
data
.
records
.
map
(
item
=>
({
companyOptions
.
value
=
response
.
data
.
records
.
map
(
item
=>
({
label
:
item
.
company
Name
,
label
:
item
.
dept
Name
,
value
:
item
.
reconciliationCompany
BizId
value
:
item
.
dept
BizId
}))
}))
}
else
{
}
else
{
ElMessage
.
error
(
response
.
msg
)
ElMessage
.
error
(
response
.
msg
)
...
@@ -313,25 +344,23 @@ const pagination = reactive({
...
@@ -313,25 +344,23 @@ const pagination = reactive({
total
:
0
total
:
0
})
})
onMounted
(()
=>
{
onMounted
(()
=>
{
// 获取字典值后,再调用接口获取来佣列表
// 获取字典值后,再调用接口获取来佣列表
initialData
();
initialData
()
})
})
const
initialData
=
async
()
=>
{
const
initialData
=
async
()
=>
{
await
getLists
();
await
getLists
()
fetchTableData
();
fetchTableData
()
fetchReconciliationCompanyList
()
fetchReconciliationCompanyList
()
}
}
const
getUploadFileFunc
=
data
=>
{
const
getUploadFileFunc
=
(
data
)
=>
{
console
.
log
(
data
)
console
.
log
(
data
)
if
(
data
===
200
)
{
if
(
data
===
200
)
{
ElMessage
.
success
(
'上传成功'
)
;
ElMessage
.
success
(
'上传成功'
)
fetchTableData
()
fetchTableData
()
}
else
{
}
else
{
ElMessage
.
error
(
'上传失败'
)
ElMessage
.
error
(
'上传失败'
)
}
}
}
}
...
@@ -375,34 +404,33 @@ const resetForm = () => {
...
@@ -375,34 +404,33 @@ const resetForm = () => {
}
}
// 处理分页大小变化
// 处理分页大小变化
const
handleSizeChange
=
(
val
)
=>
{
const
handleSizeChange
=
val
=>
{
pagination
.
pageSize
=
val
pagination
.
pageSize
=
val
fetchTableData
()
fetchTableData
()
}
}
// 处理分页页码变化
// 处理分页页码变化
const
handleCurrentChange
=
(
val
)
=>
{
const
handleCurrentChange
=
val
=>
{
pagination
.
currentPage
=
val
pagination
.
currentPage
=
val
fetchTableData
()
fetchTableData
()
}
}
// 处理表格选择变化
// 处理表格选择变化
const
handleSelectionChange
=
(
rows
)
=>
{
const
handleSelectionChange
=
rows
=>
{
selectedRows
.
value
=
rows
selectedRows
.
value
=
rows
}
}
// 下载模板
// 下载模板
const
downloadTemplate
=
()
=>
{
const
downloadTemplate
=
()
=>
{
// 下载地址
// 下载地址
const
templateUrl
=
'https://yd-ali-oss.oss-cn-shanghai-finance-1-pub.aliyuncs.com/xlsx/2025/10/14/54ce715eabab4f1abd8652ba0fca0c51.xlsx'
const
templateUrl
=
'https://yd-ali-oss.oss-cn-shanghai-finance-1-pub.aliyuncs.com/xlsx/2025/10/14/54ce715eabab4f1abd8652ba0fca0c51.xlsx'
// 修改下载文件名
// 修改下载文件名
const
fileName
=
'对账单导入模板.xlsx'
const
fileName
=
'对账单导入模板.xlsx'
// 下载文件
// 下载文件
window
.
open
(
templateUrl
,
'_blank'
,
`download=
${
fileName
}
-
${
new
Date
().
getTime
()}
`
)
window
.
open
(
templateUrl
,
'_blank'
,
`download=
${
fileName
}
-
${
new
Date
().
getTime
()}
`
)
}
}
// 新增入账
// 新增入账
const
handleAdd
=
()
=>
{
const
handleAdd
=
()
=>
{
incomeDialogTitle
.
value
=
'新增入账记录'
incomeDialogTitle
.
value
=
'新增入账记录'
...
@@ -430,30 +458,27 @@ const handleAdd = () => {
...
@@ -430,30 +458,27 @@ const handleAdd = () => {
incomeDialogVisible
.
value
=
true
incomeDialogVisible
.
value
=
true
}
}
import
{
deletePolicyCommission
}
from
'@/api/financial/commission'
import
{
deletePolicyCommission
}
from
'@/api/financial/commission'
// 删除
// 删除
const
handleDelete
=
(
row
)
=>
{
const
handleDelete
=
row
=>
{
ElMessageBox
.
confirm
(
ElMessageBox
.
confirm
(
`确定要删除保单
${
row
.
policyNo
}
的入账记录吗?`
,
'删除确认'
,
{
`确定要删除保单
${
row
.
policyNo
}
的入账记录吗?`
,
'删除确认'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}
}).
then
(()
=>
{
).
then
(()
=>
{
// 调用删除接口
// 调用删除接口
deletePolicyCommission
({
deletePolicyCommission
({
commissionBizId
:
row
.
commissionBizId
commissionBizId
:
row
.
commissionBizId
}).
then
((
res
)
=>
{
})
if
(
res
.
code
===
200
){
.
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
ElMessage
.
success
(
'删除成功'
)
ElMessage
.
success
(
'删除成功'
)
fetchTableData
()
fetchTableData
()
}
else
{
}
else
{
ElMessage
.
error
(
'删除失败'
)
ElMessage
.
error
(
'删除失败'
)
}
}
}).
catch
(()
=>
{
})
.
catch
(()
=>
{
ElMessage
.
error
(
'删除失败'
)
ElMessage
.
error
(
'删除失败'
)
})
})
})
})
...
@@ -509,9 +534,8 @@ const incomeFormRules = {
...
@@ -509,9 +534,8 @@ const incomeFormRules = {
commissionDate
:
[{
required
:
true
,
message
:
'请选择入账日期'
,
trigger
:
'change'
}]
commissionDate
:
[{
required
:
true
,
message
:
'请选择入账日期'
,
trigger
:
'change'
}]
}
}
// 编辑入账记录
// 编辑入账记录
const
handleEdit
=
(
row
)
=>
{
const
handleEdit
=
row
=>
{
incomeDialogTitle
.
value
=
`编辑入账记录 -
${
row
.
policyNo
}
`
incomeDialogTitle
.
value
=
`编辑入账记录 -
${
row
.
policyNo
}
`
isEditMode
.
value
=
true
isEditMode
.
value
=
true
...
@@ -537,7 +561,6 @@ const handleEdit = (row) => {
...
@@ -537,7 +561,6 @@ const handleEdit = (row) => {
incomeDialogVisible
.
value
=
true
incomeDialogVisible
.
value
=
true
}
}
// 提交入账表单(新增/编辑共用)
// 提交入账表单(新增/编辑共用)
import
{
addPolicyCommission
}
from
'@/api/financial/commission'
import
{
addPolicyCommission
}
from
'@/api/financial/commission'
const
submitIncomeForm
=
async
()
=>
{
const
submitIncomeForm
=
async
()
=>
{
...
@@ -582,7 +605,7 @@ const submitIncomeForm = async () => {
...
@@ -582,7 +605,7 @@ const submitIncomeForm = async () => {
}
}
// 关闭对话框处理
// 关闭对话框处理
const
handleCloseDialog
=
(
done
)
=>
{
const
handleCloseDialog
=
done
=>
{
if
(
incomeLoading
.
value
)
{
if
(
incomeLoading
.
value
)
{
ElMessage
.
info
(
'正在保存,请稍候...'
)
ElMessage
.
info
(
'正在保存,请稍候...'
)
return
return
...
@@ -590,13 +613,12 @@ const handleCloseDialog = (done) => {
...
@@ -590,13 +613,12 @@ const handleCloseDialog = (done) => {
ElMessageBox
.
confirm
(
'确定要关闭吗?未保存的修改将会丢失'
,
'提示'
,
{
ElMessageBox
.
confirm
(
'确定要关闭吗?未保存的修改将会丢失'
,
'提示'
,
{
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
})
.
then
(()
=>
{
done
()
done
()
}).
catch
(()
=>
{})
})
.
catch
(()
=>
{})
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/sign/underwritingMain/components/expectedCommission.vue
View file @
3fdb591d
<
template
>
<
template
>
<div>
<div>
<div>
<div>
<!--
<el-row>
<el-col
:span=
"12"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
>
<el-form-item
label=
"保单号"
prop=
"policyNo"
label-width=
"60px"
>
<el-input
v-model=
"queryParams.policyNo"
placeholder=
"请输入保单号"
clearable
@
keyup
.
enter=
"getTableList"
/>
</el-form-item>
</el-form>
</el-col>
</el-row>
-->
<el-row>
<el-row>
<el-col
:span=
"24"
style=
"display: flex; justify-content: flex-start; margin-bottom: 10px"
>
<el-col
:span=
"24"
style=
"display: flex; justify-content: flex-start; margin-bottom: 10px"
>
<el-button
<el-button
style=
"margin-top: 10px"
type=
"primary"
icon=
"Plus"
@
click=
"addChildren"
:disabled=
"editStatus"
style=
"margin-top: 10px"
type=
"primary"
icon=
"Plus"
@
click=
"addChildren"
>
添加
</el-button
>
添加
</el-button
>
>
</el-col>
</el-col>
<el-table
:data=
"tableList"
border
@
sort-change=
"sortChange"
>
<el-table
:data=
"tableList"
border
@
sort-change=
"sortChange"
>
<el-table-column
type=
"index"
width=
"60"
label=
"序号"
/>
<el-table-column
type=
"index"
width=
"60"
label=
"序号"
/>
<el-table-column
label=
"保单号"
prop=
"policyNo"
align=
"center"
width=
"120"
>
<!--
<el-table-column
label=
"保单号"
prop=
"policyNo"
align=
"center"
width=
"120"
>
</el-table-column>
<template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.policyNo"
size=
"default"
type=
"text"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
-->
<el-table-column
label=
"来佣名称"
prop=
"commissionName"
align=
"center"
width=
"180"
>
<el-table-column
label=
"来佣名称"
prop=
"commissionName"
align=
"center"
width=
"180"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.commissionName"
size=
"default"
type=
"text"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"来佣金额"
sortable
prop=
"amount"
align=
"center"
width=
"120"
>
<!-- sortable -->
<el-table-column
label=
"来佣金额"
prop=
"amount"
align=
"center"
width=
"120"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.amount"
size=
"default"
type=
"number"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<!-- sortable -->
label=
"佣金期数"
<el-table-column
label=
"佣金期数"
prop=
"commissionPeriod"
align=
"center"
width=
"120"
>
sortable
<
template
#
default=
"scope"
>
prop=
"commissionPeriod"
<el-input
align=
"center"
v-model=
"scope.row.commissionPeriod"
width=
"120"
size=
"default"
>
type=
"number"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"预计来佣日期"
prop=
"commissionDate"
align=
"center"
width=
"150"
>
<el-table-column
label=
"预计来佣日期"
prop=
"commissionDate"
align=
"center"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-date-picker
style=
"width: 100%"
v-model=
"scope.row.commissionDate"
type=
"date"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"来佣币种"
prop=
"currency"
align=
"center"
width=
"160"
>
<el-table-column
label=
"来佣币种"
prop=
"currency"
align=
"center"
width=
"160"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<dict-tag
:options=
"fetchDictData('bx_currency_type')"
:value=
"scope.row.currency"
/>
<el-select
v-model=
"scope.row.currency"
placeholder=
"请选择"
>
<el-option
v-for=
"item in fetchDictData('bx_currency_type')"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<!-- sortable -->
label=
"对账公司"
<el-table-column
label=
"对账公司"
prop=
"reconciliationCompany"
align=
"center"
width=
"150"
>
sortable
<
template
#
default=
"scope"
>
prop=
"reconciliationCompany"
<el-select
align=
"center"
v-model=
"scope.row.reconciliationCompany"
width=
"150"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词搜索"
:remote-method=
"query => searchSelectList(query, 'reconciliationCompany')"
:loading=
"searchLoadingStates['reconciliationCompany']"
>
>
<el-option
v-for=
"item in searchOptions['reconciliationCompany'] || []"
:key=
"item.id"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"总来佣期数"
prop=
"totalPeriod"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"总来佣期数"
prop=
"totalPeriod"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.totalPeriod"
size=
"default"
type=
"number"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remark"
align=
"center"
width=
"150"
>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remark"
align=
"center"
width=
"150"
>
<
template
#
default=
"scope"
>
<el-input
v-model=
"scope.row.remark"
size=
"default"
type=
"textarea"
placeholder=
"请输入"
/>
</
template
>
</el-table-column>
<el-table-column
width=
"120px"
align=
"center"
label=
"操作"
fixed=
"right"
>
<el-table-column
width=
"120px"
align=
"center"
label=
"操作"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
link
@
click=
"handleEdit(scope.row)"
>
编辑
</el-button>
<el-button
v-if=
"scope.row.commissionExpectedBizId"
type=
"primary"
link
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button
>
<el-button
type=
"danger"
link
@
click=
"handleDetele(scope.row, scope.$index)"
<el-button
type=
"danger"
link
@
click=
"handleDetele(scope.row, scope.$index)"
>
删除
</el-button
>
删除
</el-button
>
>
...
@@ -80,6 +141,9 @@
...
@@ -80,6 +141,9 @@
@
pagination=
"getTableList"
@
pagination=
"getTableList"
/>
/>
</el-col>
</el-col>
<el-col
:span=
"24"
align=
"center"
style=
"margin-top: 10px"
>
<el-button
type=
"success"
size=
"large"
@
click=
"submitTable"
>
提交
</el-button>
</el-col>
</el-row>
</el-row>
<el-dialog
:title=
"commissionTitle"
v-model=
"editCommission"
width=
"800px"
append-to-body
>
<el-dialog
:title=
"commissionTitle"
v-model=
"editCommission"
width=
"800px"
append-to-body
>
<div>
<div>
...
@@ -310,14 +374,37 @@ const fetchDictData = dictType => {
...
@@ -310,14 +374,37 @@ const fetchDictData = dictType => {
// 添加表单子级dom
// 添加表单子级dom
const
addChildren
=
()
=>
{
const
addChildren
=
()
=>
{
form
.
value
=
{}
// form.value = {}
editCommission
.
value
=
true
// editCommission.value = true
commissionTitle
.
value
=
'添加来佣'
// commissionTitle.value = '添加来佣'
let
obj
=
{
policyNo
:
props
.
policyNo
,
commissionPeriod
:
''
,
commissionDate
:
''
,
reconciliationCompany
:
''
,
remark
:
''
,
totalPeriod
:
''
,
commissionName
:
''
,
amount
:
''
,
currency
:
''
}
if
(
tableList
.
value
.
length
==
0
)
{
tableList
.
value
.
push
(
obj
)
}
else
{
obj
.
reconciliationCompany
=
tableList
.
value
[
0
].
reconciliationCompany
obj
.
commissionPeriod
=
tableList
.
value
[
0
].
commissionPeriod
obj
.
totalPeriod
=
tableList
.
value
[
0
].
totalPeriod
// obj.amount = tableList.value[0].amount
obj
.
currency
=
tableList
.
value
[
0
].
currency
tableList
.
value
.
push
(
obj
)
}
total
.
value
=
total
.
value
+
1
}
}
// 处理单个提交
// 处理单个提交
const
handleUpdate
=
()
=>
{
const
handleUpdate
=
row
=>
{
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
form
.
value
))
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
if
(
obj
.
commissionDate
)
{
if
(
obj
.
commissionDate
)
{
obj
.
commissionDate
=
proxy
.
formatToDate
(
obj
.
commissionDate
)
obj
.
commissionDate
=
proxy
.
formatToDate
(
obj
.
commissionDate
)
}
}
...
@@ -330,26 +417,60 @@ const handleUpdate = () => {
...
@@ -330,26 +417,60 @@ const handleUpdate = () => {
obj
.
reconciliationCompanyBizId
=
item
.
value
obj
.
reconciliationCompanyBizId
=
item
.
value
}
}
})
})
if
(
obj
.
commissionExpectedBizId
)
{
editSigalCommission
(
obj
).
then
(
res
=>
{
editSigalCommission
(
obj
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
proxy
.
$message
.
success
(
'提交成功'
)
proxy
.
$message
.
success
(
'提交成功'
)
editCommission
.
value
=
false
form
.
value
=
{}
getTableList
()
getTableList
()
}
}
})
})
}
else
{
// if (obj.commissionExpectedBizId) {
obj
.
policyNo
=
props
.
policyNo
// editSigalCommission(obj).then(res => {
editMultipleCommission
({
commissionExpectedAddDtoList
:
[
obj
]
}).
then
(
res
=>
{
// if (res.code == 200) {
// proxy.$message.success('提交成功')
// editCommission.value = false
// form.value = {}
// getTableList()
// }
// })
// }
// else {
// obj.policyNo = props.policyNo
// editMultipleCommission({ commissionExpectedAddDtoList: [obj] }).then(res => {
// if (res.code == 200) {
// proxy.$message.success('添加成功')
// editCommission.value = false
// form.value = {}
// getTableList()
// }
// })
// }
}
const
submitTable
=
()
=>
{
if
(
tableList
.
value
.
length
==
0
)
{
proxy
.
$message
.
warning
(
'请先添加来佣'
)
return
}
let
result
=
JSON
.
parse
(
JSON
.
stringify
(
tableList
.
value
))
result
.
forEach
(
item
=>
{
if
(
item
.
commissionDate
)
{
item
.
commissionDate
=
proxy
.
formatToDate
(
item
.
commissionDate
)
}
if
(
item
.
commissionName
)
{
item
.
commissionType
=
item
.
commissionName
}
dictStore
.
insureCompanyList
.
forEach
(
item1
=>
{
if
(
item
.
reconciliationCompany
&&
item
.
reconciliationCompany
==
item1
.
value
)
{
item
.
reconciliationCompany
=
item1
.
label
item
.
reconciliationCompanyBizId
=
item1
.
value
}
})
})
editMultipleCommission
({
commissionExpectedAddDtoList
:
result
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
proxy
.
$message
.
success
(
'添加成功'
)
proxy
.
$message
.
success
(
'提交成功'
)
editCommission
.
value
=
false
form
.
value
=
{}
getTableList
()
getTableList
()
}
}
})
})
}
}
}
const
handleDetele
=
(
row
,
index
)
=>
{
const
handleDetele
=
(
row
,
index
)
=>
{
if
(
row
.
commissionExpectedBizId
)
{
if
(
row
.
commissionExpectedBizId
)
{
...
...
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