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
b9a9ca92
Commit
b9a9ca92
authored
Jun 23, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接薪资单发测试
parent
4d237a20
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
380 deletions
+30
-380
src/components/Table/editTable.vue
+1
-0
src/views/financialCenter/financialSalary.vue
+2
-0
src/views/payslip/electronicSalary.vue
+5
-372
src/views/payslip/wordReferenceSalary.vue
+22
-8
No files found.
src/components/Table/editTable.vue
View file @
b9a9ca92
...
@@ -551,6 +551,7 @@ function handleCellChange(row, col, newValue, rowIndex) {
...
@@ -551,6 +551,7 @@ function handleCellChange(row, col, newValue, rowIndex) {
function
handleSelectChange
(
row
,
col
,
value
,
rowIndex
)
{
function
handleSelectChange
(
row
,
col
,
value
,
rowIndex
)
{
const
newTableData
=
[...
props
.
tableData
]
const
newTableData
=
[...
props
.
tableData
]
const
updatedRow
=
{
...
row
,
[
col
.
prop
]:
value
}
const
updatedRow
=
{
...
row
,
[
col
.
prop
]:
value
}
// 处理额外字段赋值
// 处理额外字段赋值
if
(
col
.
onChangeExtraFields
)
{
if
(
col
.
onChangeExtraFields
)
{
const
options
=
getSelectOptions
(
col
,
row
)
const
options
=
getSelectOptions
(
col
,
row
)
...
...
src/views/financialCenter/financialSalary.vue
View file @
b9a9ca92
...
@@ -758,6 +758,8 @@ const setCurrentPageSelection = () => {
...
@@ -758,6 +758,8 @@ const setCurrentPageSelection = () => {
// 设置当前页应该选中的行
// 设置当前页应该选中的行
tableData
.
value
.
forEach
(
row
=>
{
tableData
.
value
.
forEach
(
row
=>
{
console
.
log
(
'薪资发放row'
,
allSelectedRows
.
value
)
if
(
allSelectedRows
.
value
.
has
(
row
.
fortuneAccountBizId
))
{
if
(
allSelectedRows
.
value
.
has
(
row
.
fortuneAccountBizId
))
{
tableRef
.
value
.
toggleRowSelection
(
row
,
true
)
tableRef
.
value
.
toggleRowSelection
(
row
,
true
)
}
}
...
...
src/views/payslip/electronicSalary.vue
View file @
b9a9ca92
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
/>
/>
<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"
v-if=
"row.status == '2'"
>
<template
#
reference
>
<template
#
reference
>
<el-icon>
<el-icon>
<MoreFilled
/>
<MoreFilled
/>
...
@@ -116,27 +116,6 @@
...
@@ -116,27 +116,6 @@
/>
/>
</div>
</div>
</CommonDialog>
</CommonDialog>
<!-- '批量制作薪资单 -->
<CommonDialog
dialogTitle=
"批量制作薪资单"
dialogWidth=
"95%"
:openDialog=
"multipAddSalaryDialog"
@
close=
"((multipAddSalaryDialog = false), resetAddReceivablesForm())"
@
confirm=
"handleConfirmAddSalary"
>
<editTable
ref=
"editTableRef"
addBtnTxt=
"添加薪资单"
v-model:table-data=
"apiSalaryBatchAddDTOList"
:columns=
"salaryTableColumns"
row-id-key=
"multipleId"
show-operation
@
delete=
"handleMultipDelete"
@
add=
"addSalaryRecord"
@
cell-change=
"handleSplitCellChange"
@
selectChange=
"handleSalarySelectChange"
/>
</CommonDialog>
<!-- 取消薪资单 -->
<!-- 取消薪资单 -->
<CommonDialog
<CommonDialog
dialogTitle=
"退回修改"
dialogTitle=
"退回修改"
...
@@ -160,7 +139,6 @@ import { ElMessage, ElMessageBox } from 'element-plus'
...
@@ -160,7 +139,6 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import
{
MoreFilled
}
from
'@element-plus/icons-vue'
import
{
MoreFilled
}
from
'@element-plus/icons-vue'
import
{
exportReceivedFortune
}
from
'@/api/financial/commission'
import
{
exportReceivedFortune
}
from
'@/api/financial/commission'
import
{
import
{
batchAddSalary
,
calculatePaidAmount
,
calculatePaidAmount
,
getExchangeRate
,
getExchangeRate
,
grossAmountApi
,
grossAmountApi
,
...
@@ -168,7 +146,6 @@ import {
...
@@ -168,7 +146,6 @@ import {
calculateTotalAmountApi
,
calculateTotalAmountApi
,
editSingleSalaryApi
,
editSingleSalaryApi
,
addSingleSalaryApi
,
addSingleSalaryApi
,
cancelSalaryApi
,
delSalaryApi
,
delSalaryApi
,
electronicSalaryListApi
,
electronicSalaryListApi
,
pushSalaryApi
,
pushSalaryApi
,
...
@@ -185,11 +162,7 @@ const tableRef = ref()
...
@@ -185,11 +162,7 @@ const tableRef = ref()
// 存储所有选中的行数据(用于跨页保持选择)
// 存储所有选中的行数据(用于跨页保持选择)
const
allSelectedRows
=
ref
(
new
Map
())
const
allSelectedRows
=
ref
(
new
Map
())
const
selectedRows
=
ref
([])
const
selectedRows
=
ref
([])
const
multipAddSalaryDialog
=
ref
(
false
)
const
addRecordRef
=
ref
(
null
)
const
apiSalaryBatchAddDTOList
=
ref
([{}])
//批量新增薪资单
const
salaryRemittanceDTOList
=
ref
([{}])
//银行数据
const
salaryRemittanceDTOList
=
ref
([{}])
//银行数据
const
editTableRef
=
ref
(
null
)
const
bankTableRef
=
ref
(
null
)
const
bankTableRef
=
ref
(
null
)
const
singleSalaryFormRef
=
ref
(
null
)
const
singleSalaryFormRef
=
ref
(
null
)
const
personSaleryFormModel
=
ref
({
apiSalaryRemittanceFzDTO
:
{}
})
const
personSaleryFormModel
=
ref
({
apiSalaryRemittanceFzDTO
:
{}
})
...
@@ -198,203 +171,7 @@ const commonDialogType = ref('')
...
@@ -198,203 +171,7 @@ const commonDialogType = ref('')
const
returnDialogVisible
=
ref
(
false
)
const
returnDialogVisible
=
ref
(
false
)
const
returnFormRef
=
ref
(
null
)
const
returnFormRef
=
ref
(
null
)
const
returnFormModel
=
ref
({})
const
returnFormModel
=
ref
({})
// 批量薪资单表格配置
const
salaryTableColumns
=
ref
([
{
prop
:
'brokerBizId'
,
label
:
'姓名'
,
editType
:
'select'
,
api
:
'/csf/api/salary/broker/list'
,
// 接口地址 这个是get请求,目前表格是post请求,所以需要在完善一下表格的请求方式以及请求参数
method
:
'get'
,
// ← 指定请求方式为 GET
valueKey
:
'brokerBizId'
,
// 选项 value 字段名
labelKey
:
'broker'
,
// 选项 label 字段名
preload
:
true
,
// 初始化时自动加载
width
:
150
,
requestParams
:
{
name
:
''
},
// 固定参数
// 远程搜索配置
filterable
:
true
,
keywordField
:
'name'
,
onChangeExtraFields
:
{
brokerName
:
'broker'
,
// 将选项原始对象的 broker 字段赋值给行数据的 brokerName
monthList
:
'monthList'
// 存储月份列表,供月份列使用
}
// debounceWait: 300
},
{
editType
:
'select'
,
prop
:
'month'
,
label
:
'薪资月份'
,
// options: [],//根据选择得转介人数据动态获取
// placeholder: monthList.value.length > 0 ? '请选择月份' : '请先选择转介人',
width
:
150
,
// 动态选项,依赖行数据中的 monthList
options
:
row
=>
{
const
list
=
row
.
monthList
||
[]
return
list
.
map
(
m
=>
({
value
:
m
,
label
:
m
}))
// 格式:{ value, label }
}
// rules: [{ required: true, message: '必填项', trigger: 'blur' }]
},
// {
// prop: 'splitRatio',
// label: '内部编号',
// editType: 'input',
// // required: true,
// placeholder: '请输入内部编号',
// width: 150
// },
{
editType
:
'input'
,
prop
:
'grossAmount'
,
label
:
'应发金额'
,
inputType
:
'decimalNumber'
,
// required: true,
width
:
150
},
{
prop
:
'mpfAmount'
,
label
:
'MPF事项'
,
editType
:
'input'
,
// required: true,
placeholder
:
'请输入MPF事项'
,
width
:
150
},
{
editType
:
'input'
,
prop
:
'otherAmount'
,
label
:
'其他调整总金额'
,
inputType
:
'decimalNumber'
,
// required: true,
width
:
150
},
{
prop
:
'otherRemark'
,
label
:
'备注'
,
editType
:
'input'
,
// required: true,
placeholder
:
'请输入备注'
,
width
:
150
},
{
editType
:
'input'
,
prop
:
'paidAmount'
,
label
:
'实发金额'
,
inputType
:
'decimalNumber'
,
// required: true,
width
:
150
},
{
prop
:
'bank1'
,
label
:
'收款银行1'
,
editType
:
'select'
,
api
:
'/base/api/bank/page'
,
// 接口地址
valueKey
:
'bankBizId'
,
// 选项 value 字段名
labelKey
:
'bankName'
,
// 选项 label 字段名
preload
:
true
,
// 初始化时自动加载
width
:
150
,
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
// 固定参数
// 远程搜索配置
filterable
:
true
,
keywordField
:
'queryContent'
// debounceWait: 300
},
{
prop
:
'accountEndNo1'
,
label
:
'账户尾号1'
,
editType
:
'input'
,
// required: true,
placeholder
:
'请输入'
,
width
:
150
},
{
editType
:
'select'
,
prop
:
'currency1'
,
label
:
'币种1'
,
dictType
:
'bx_currency_type'
,
width
:
150
// rules: [{ required: true, message: '必填项', trigger: 'blur' }]
},
{
editType
:
'input'
,
prop
:
'amount1'
,
label
:
'发放金额1'
,
inputType
:
'decimalNumber'
,
// required: true,
width
:
150
},
{
editType
:
'input'
,
prop
:
'exchangeRate1'
,
label
:
'汇率1'
,
inputType
:
'decimal'
,
// required: true,
width
:
150
},
{
prop
:
'remark1'
,
label
:
'备注1'
,
editType
:
'input'
,
// required: true,
placeholder
:
'请输入'
,
width
:
180
},
{
prop
:
'bank2'
,
label
:
'收款银行2'
,
editType
:
'select'
,
api
:
'/base/api/bank/page'
,
// 接口地址
valueKey
:
'bankBizId'
,
// 选项 value 字段名
labelKey
:
'bankName'
,
// 选项 label 字段名
preload
:
true
,
// 初始化时自动加载
width
:
150
,
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
// 固定参数
// 远程搜索配置
filterable
:
true
,
keywordField
:
'queryContent'
// debounceWait: 300
},
{
prop
:
'accountEndNo2'
,
label
:
'账户尾号2'
,
editType
:
'input'
,
// required: true,
placeholder
:
'请输入'
,
width
:
150
},
{
editType
:
'select'
,
prop
:
'currency2'
,
label
:
'币种2'
,
width
:
150
,
dictType
:
'bx_currency_type'
// rules: [{ required: true, message: '必填项', trigger: 'blur' }]
},
{
editType
:
'input'
,
prop
:
'amount2'
,
label
:
'发放金额2'
,
inputType
:
'decimalNumber'
,
// required: true,
width
:
150
},
{
editType
:
'input'
,
prop
:
'exchangeRate2'
,
label
:
'汇率2'
,
inputType
:
'decimal'
,
// required: true,
width
:
150
},
{
prop
:
'remark2'
,
label
:
'备注2'
,
editType
:
'input'
,
// required: true,
placeholder
:
'请输入'
,
width
:
180
}
])
//单个薪资单的表格配置
//单个薪资单的表格配置
const
bankTableColumns
=
ref
([
const
bankTableColumns
=
ref
([
{
{
...
@@ -620,128 +397,13 @@ const clearAllSelection = () => {
...
@@ -620,128 +397,13 @@ const clearAllSelection = () => {
}
}
}
}
//==============表格复选框结束===========
//==============表格复选框结束===========
const
addSalaryRecord
=
()
=>
{
apiSalaryBatchAddDTOList
.
value
.
push
({
multipleId
:
Date
.
now
()
+
Math
.
random
()
// 或使用 uuid
})
}
const
addSalaryRemittanceRecord
=
()
=>
{
const
addSalaryRemittanceRecord
=
()
=>
{
salaryRemittanceDTOList
.
value
.
push
({
salaryRemittanceDTOList
.
value
.
push
({
signleId
:
Date
.
now
()
+
Math
.
random
()
// 或使用 uuid
signleId
:
Date
.
now
()
+
Math
.
random
()
// 或使用 uuid
})
})
}
}
const
handleSalarySelectChange
=
async
({
prop
,
value
,
col
,
rowIndex
})
=>
{
const
currentRow
=
apiSalaryBatchAddDTOList
.
value
[
rowIndex
]
if
(
!
currentRow
)
return
let
needUpdate
=
false
const
updatedRow
=
{
...
currentRow
}
//计算应发金额
if
(
prop
===
'month'
||
prop
===
'brokerBizId'
)
{
if
(
currentRow
.
brokerBizId
&&
currentRow
.
month
)
{
try
{
let
params
=
{
brokerBizId
:
currentRow
.
brokerBizId
,
month
:
currentRow
.
month
}
const
res
=
await
grossAmountApi
(
params
)
updatedRow
.
grossAmount
=
res
.
data
updatedRow
.
mpfAmount
=
0
updatedRow
.
otherAmount
=
0
updatedRow
.
paidAmount
=
res
.
data
needUpdate
=
true
}
catch
(
error
)
{
console
.
log
(
'应发金额计算失败'
,
error
)
ElMessage
.
error
(
'应发金额计算失败'
)
}
}
}
if
(
prop
===
'currency1'
||
prop
===
'currency2'
)
{
if
(
value
)
{
try
{
let
params
=
{
fromCurrency
:
value
,
toCurrency
:
'HKD'
}
const
res
=
await
getExchangeRate
(
params
)
if
(
prop
===
'currency1'
)
{
updatedRow
.
exchangeRate1
=
res
.
data
}
else
if
(
prop
===
'currency2'
)
{
updatedRow
.
exchangeRate2
=
res
.
data
}
needUpdate
=
true
}
catch
(
error
)
{
console
.
log
(
'汇率计算失败'
,
error
)
ElMessage
.
error
(
'汇率计算失败'
)
}
}
}
if
(
needUpdate
)
{
// 更新表格数据(整体替换,触发视图更新)
const
newData
=
[...
apiSalaryBatchAddDTOList
.
value
]
newData
[
rowIndex
]
=
updatedRow
apiSalaryBatchAddDTOList
.
value
=
newData
}
}
const
handleSplitCellChange
=
async
({
row
,
col
,
newValue
,
oldValue
,
rowIndex
,
prop
})
=>
{
console
.
log
(
'单元格改变'
,
row
,
col
,
newValue
,
oldValue
,
rowIndex
,
prop
)
const
currentRow
=
apiSalaryBatchAddDTOList
.
value
[
rowIndex
]
if
(
!
currentRow
)
return
let
needUpdate
=
false
const
updatedRow
=
{
...
currentRow
}
//计算实发金额
if
(
prop
===
'grossAmount'
||
prop
===
'mpfAmount'
||
prop
===
'otherAmount'
)
{
if
(
currentRow
.
grossAmount
&&
currentRow
.
mpfAmount
&&
currentRow
.
otherAmount
)
{
try
{
let
params
=
{
grossAmount
:
currentRow
.
grossAmount
,
mpfAmount
:
currentRow
.
mpfAmount
,
otherAmount
:
currentRow
.
otherAmount
}
const
res
=
await
calculatePaidAmount
(
params
)
updatedRow
.
paidAmount
=
res
.
data
needUpdate
=
true
}
catch
(
error
)
{
console
.
log
(
'实发金额计算失败'
,
error
)
ElMessage
.
error
(
'实发金额计算失败'
)
}
}
}
// 如果用户手动修改了 hkdAmount,不做反向联动(符合需求)
if
(
needUpdate
)
{
// 更新表格数据(整体替换,触发视图更新)
const
newData
=
[...
apiSalaryBatchAddDTOList
.
value
]
newData
[
rowIndex
]
=
updatedRow
apiSalaryBatchAddDTOList
.
value
=
newData
}
}
// 弹窗表单重置
const
resetAddReceivablesForm
=
()
=>
{
// addRecordRef.value.resetForm()
}
const
handleConfirmAddSalary
=
async
()
=>
{
// 调用组件的校验方法
const
isValid
=
await
editTableRef
.
value
.
validateAndShow
()
if
(
isValid
)
{
try
{
let
params
=
{
apiSalaryBatchAddDTOList
:
apiSalaryBatchAddDTOList
.
value
}
const
res
=
await
batchAddSalary
(
params
)
multipAddSalaryDialog
.
value
=
false
ElMessage
.
success
(
'批量添加薪资单成功'
)
const
searchParams
=
searchFormRef
.
value
.
getFormData
()
loadTableData
(
searchParams
)
}
catch
(
error
)
{
multipAddSalaryDialog
.
value
=
true
console
.
log
(
'批量添加薪资单错误'
,
error
)
ElMessage
.
error
(
'批量添加薪资单失败'
)
}
}
}
// 单个薪资单下拉框改变
// 单个薪资单下拉框改变
const
handleBankSelectChange
=
async
({
prop
,
value
,
col
,
rowIndex
})
=>
{
const
handleBankSelectChange
=
async
({
prop
,
value
,
col
,
rowIndex
})
=>
{
const
currentRow
=
salaryRemittanceDTOList
.
value
[
rowIndex
]
const
currentRow
=
salaryRemittanceDTOList
.
value
[
rowIndex
]
...
@@ -974,14 +636,6 @@ const setSignleSalaryFormStatus = () => {
...
@@ -974,14 +636,6 @@ const setSignleSalaryFormStatus = () => {
return
item
return
item
})
})
}
}
const
handleSingleAdd
=
()
=>
{
commonDialogTit
.
value
=
'增加薪资单'
commonDialogType
.
value
=
'add'
personSaleryFormModel
.
value
=
{
apiSalaryRemittanceFzDTO
:
{}
}
salaryRemittanceDTOList
.
value
=
[]
setSignleSalaryFormStatus
()
detailDialogVisible
.
value
=
true
}
const
handleSelect
=
(
e
,
row
)
=>
{
const
handleSelect
=
(
e
,
row
)
=>
{
console
.
log
(
'选中行:'
,
e
,
row
)
console
.
log
(
'选中行:'
,
e
,
row
)
selectedRow
.
value
=
row
selectedRow
.
value
=
row
...
@@ -990,33 +644,12 @@ const handleSelect = (e, row) => {
...
@@ -990,33 +644,12 @@ const handleSelect = (e, row) => {
commonDialogType
.
value
=
'preview'
commonDialogType
.
value
=
'preview'
detailDialogVisible
.
value
=
true
detailDialogVisible
.
value
=
true
setSignleSalaryFormStatus
()
setSignleSalaryFormStatus
()
//
updateSalary(row)
updateSalary
(
row
)
}
else
if
(
e
===
'retreat'
)
{
}
else
if
(
e
===
'retreat'
)
{
handleReturn
()
handleReturn
()
}
}
}
}
const
handleMultipDelete
=
async
row
=>
{
try
{
// 弹出确认框
await
ElMessageBox
.
confirm
(
'确定要删除该记录吗?'
,
'删除确认'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
// 用户点击确定 → 执行删除逻辑
const
index
=
apiSalaryBatchAddDTOList
.
value
.
findIndex
(
item
=>
item
.
multipleId
==
row
.
multipleId
)
if
(
index
!==
-
1
)
{
apiSalaryBatchAddDTOList
.
value
.
splice
(
index
,
1
)
ElMessage
.
success
(
'删除成功'
)
}
}
catch
{
// 用户取消或关闭弹窗,不做任何操作
console
.
log
(
'取消删除'
)
}
}
const
handleBankDelete
=
async
row
=>
{
const
handleBankDelete
=
async
row
=>
{
try
{
try
{
// 弹出确认框
// 弹出确认框
...
@@ -1062,6 +695,7 @@ const handlePush = async () => {
...
@@ -1062,6 +695,7 @@ const handlePush = async () => {
const
arr
=
selectedRows
.
value
.
map
(
item
=>
item
.
salaryBizId
).
join
(
','
)
const
arr
=
selectedRows
.
value
.
map
(
item
=>
item
.
salaryBizId
).
join
(
','
)
await
pushSalaryApi
({
salaryBizId
:
arr
})
await
pushSalaryApi
({
salaryBizId
:
arr
})
clearAllSelection
()
const
params
=
searchFormRef
.
value
.
getFormData
()
const
params
=
searchFormRef
.
value
.
getFormData
()
loadTableData
(
params
)
loadTableData
(
params
)
ElMessage
.
success
(
'推送操作成功'
)
ElMessage
.
success
(
'推送操作成功'
)
...
@@ -1072,8 +706,6 @@ const handlePush = async () => {
...
@@ -1072,8 +706,6 @@ const handlePush = async () => {
}
}
}
}
const
handleImport
=
()
=>
ElMessage
.
info
(
'点击导入按钮'
)
const
handleExport
=
async
()
=>
{
const
handleExport
=
async
()
=>
{
ElMessage
.
info
(
'导出待开发'
)
ElMessage
.
info
(
'导出待开发'
)
return
return
...
@@ -1096,6 +728,7 @@ const handleReset = () => {
...
@@ -1096,6 +728,7 @@ const handleReset = () => {
const
handleQuery
=
()
=>
{
const
handleQuery
=
()
=>
{
currentPage
.
value
=
1
currentPage
.
value
=
1
clearAllSelection
()
const
params
=
searchFormRef
.
value
.
getFormData
()
const
params
=
searchFormRef
.
value
.
getFormData
()
loadTableData
(
params
)
loadTableData
(
params
)
}
}
...
...
src/views/payslip/wordReferenceSalary.vue
View file @
b9a9ca92
...
@@ -210,7 +210,8 @@ const salaryTableColumns = ref([
...
@@ -210,7 +210,8 @@ const salaryTableColumns = ref([
keywordField
:
'name'
,
keywordField
:
'name'
,
onChangeExtraFields
:
{
onChangeExtraFields
:
{
brokerName
:
'broker'
,
// 将选项原始对象的 broker 字段赋值给行数据的 brokerName
brokerName
:
'broker'
,
// 将选项原始对象的 broker 字段赋值给行数据的 brokerName
monthList
:
'monthList'
// 存储月份列表,供月份列使用
monthList
:
'monthList'
,
// 存储月份列表,供月份列使用
splitRatio
:
'internalNumber'
// 新增:将原始数据的 internalNumber 赋给 splitRatio
}
}
// debounceWait: 300
// debounceWait: 300
},
},
...
@@ -235,7 +236,8 @@ const salaryTableColumns = ref([
...
@@ -235,7 +236,8 @@ const salaryTableColumns = ref([
editType
:
'input'
,
editType
:
'input'
,
// required: true,
// required: true,
placeholder
:
'请输入内部编号'
,
placeholder
:
'请输入内部编号'
,
width
:
150
width
:
150
,
disabled
:
true
},
},
{
{
...
@@ -463,7 +465,8 @@ const personSaleryFormConfig = ref([
...
@@ -463,7 +465,8 @@ const personSaleryFormConfig = ref([
keywordField
:
'name'
,
keywordField
:
'name'
,
onChangeExtraFields
:
{
onChangeExtraFields
:
{
brokerName
:
'broker'
,
// 将选项原始对象的 broker 字段赋值给行数据的 brokerName
brokerName
:
'broker'
,
// 将选项原始对象的 broker 字段赋值给行数据的 brokerName
monthList
:
'monthList'
// 存储月份列表,供月份列使用
monthList
:
'monthList'
,
// 存储月份列表,供月份列使用
splitRatio
:
'internalNumber'
// 新增:将原始数据的 internalNumber 赋给 splitRatio
},
},
rules
:
[{
required
:
true
,
message
:
'姓名必填'
,
trigger
:
'blur'
}]
rules
:
[{
required
:
true
,
message
:
'姓名必填'
,
trigger
:
'blur'
}]
// debounceWait: 300
// debounceWait: 300
...
@@ -485,7 +488,9 @@ const personSaleryFormConfig = ref([
...
@@ -485,7 +488,9 @@ const personSaleryFormConfig = ref([
label
:
'内部编号'
,
label
:
'内部编号'
,
type
:
'input'
,
type
:
'input'
,
// required: true,
// required: true,
placeholder
:
'请输入内部编号'
placeholder
:
'请输入内部编号'
,
customDisable
:
true
,
disabled
:
true
},
},
{
{
...
@@ -560,6 +565,7 @@ const handleSubmitCheck = async () => {
...
@@ -560,6 +565,7 @@ const handleSubmitCheck = async () => {
// 调用出账API
// 调用出账API
await
submitCheckApi
({
salaryBizId
:
arr
})
await
submitCheckApi
({
salaryBizId
:
arr
})
clearAllSelection
()
const
params
=
searchFormRef
.
value
.
getFormData
()
const
params
=
searchFormRef
.
value
.
getFormData
()
loadTableData
(
params
)
loadTableData
(
params
)
ElMessage
.
success
(
'核对操作成功'
)
ElMessage
.
success
(
'核对操作成功'
)
...
@@ -600,6 +606,9 @@ const setCurrentPageSelection = () => {
...
@@ -600,6 +606,9 @@ const setCurrentPageSelection = () => {
// 设置当前页应该选中的行
// 设置当前页应该选中的行
tableData
.
value
.
forEach
(
row
=>
{
tableData
.
value
.
forEach
(
row
=>
{
console
.
log
(
'===================================='
)
console
.
log
(
'(allSelectedRows.value'
,
allSelectedRows
.
value
)
console
.
log
(
'===================================='
)
if
(
allSelectedRows
.
value
.
has
(
row
.
salaryBizId
))
{
if
(
allSelectedRows
.
value
.
has
(
row
.
salaryBizId
))
{
tableRef
.
value
.
toggleRowSelection
(
row
,
true
)
tableRef
.
value
.
toggleRowSelection
(
row
,
true
)
}
}
...
@@ -624,7 +633,7 @@ const addSalaryRemittanceRecord = () => {
...
@@ -624,7 +633,7 @@ const addSalaryRemittanceRecord = () => {
signleId
:
Date
.
now
()
+
Math
.
random
()
// 或使用 uuid
signleId
:
Date
.
now
()
+
Math
.
random
()
// 或使用 uuid
})
})
}
}
const
handleSalarySelectChange
=
async
({
prop
,
value
,
col
,
rowIndex
})
=>
{
const
handleSalarySelectChange
=
async
({
prop
,
value
,
col
,
rowIndex
,
options
})
=>
{
const
currentRow
=
apiSalaryBatchAddDTOList
.
value
[
rowIndex
]
const
currentRow
=
apiSalaryBatchAddDTOList
.
value
[
rowIndex
]
if
(
!
currentRow
)
return
if
(
!
currentRow
)
return
let
needUpdate
=
false
let
needUpdate
=
false
...
@@ -643,6 +652,7 @@ const handleSalarySelectChange = async ({ prop, value, col, rowIndex }) => {
...
@@ -643,6 +652,7 @@ const handleSalarySelectChange = async ({ prop, value, col, rowIndex }) => {
updatedRow
.
mpfAmount
=
0
updatedRow
.
mpfAmount
=
0
updatedRow
.
otherAmount
=
0
updatedRow
.
otherAmount
=
0
updatedRow
.
paidAmount
=
res
.
data
updatedRow
.
paidAmount
=
res
.
data
needUpdate
=
true
needUpdate
=
true
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
'应发金额计算失败'
,
error
)
console
.
log
(
'应发金额计算失败'
,
error
)
...
@@ -956,7 +966,10 @@ const handleFormSelectChange = async (prop, value, item) => {
...
@@ -956,7 +966,10 @@ const handleFormSelectChange = async (prop, value, item) => {
//设置单个薪资单的表单编辑状态
//设置单个薪资单的表单编辑状态
const
setSignleSalaryFormStatus
=
()
=>
{
const
setSignleSalaryFormStatus
=
()
=>
{
personSaleryFormConfig
.
value
=
personSaleryFormConfig
.
value
.
map
(
item
=>
{
personSaleryFormConfig
.
value
=
personSaleryFormConfig
.
value
.
map
(
item
=>
{
if
(
commonDialogType
.
value
==
'add'
||
commonDialogType
.
value
==
'edit'
)
{
if
(
(
commonDialogType
.
value
==
'add'
||
commonDialogType
.
value
==
'edit'
)
&&
!
item
.
customDisable
)
{
item
.
disabled
=
false
item
.
disabled
=
false
}
else
{
}
else
{
item
.
disabled
=
true
item
.
disabled
=
true
...
@@ -1095,18 +1108,19 @@ const handleReset = () => {
...
@@ -1095,18 +1108,19 @@ const handleReset = () => {
const
handleQuery
=
()
=>
{
const
handleQuery
=
()
=>
{
currentPage
.
value
=
1
currentPage
.
value
=
1
clearAllSelection
()
const
params
=
searchFormRef
.
value
.
getFormData
()
const
params
=
searchFormRef
.
value
.
getFormData
()
loadTableData
(
params
)
loadTableData
(
params
)
}
}
const
visibleDefaultButtons
=
ref
([
'add'
,
'
export'
,
'
reset'
,
'query'
])
const
visibleDefaultButtons
=
ref
([
'add'
,
'reset'
,
'query'
])
// 按钮配置
// 按钮配置
const
operationBtnList
=
ref
([
const
operationBtnList
=
ref
([
{
key
:
'add'
,
direction
:
'left'
,
label
:
'批量制作薪资单'
,
click
:
handleAdd
},
{
key
:
'add'
,
direction
:
'left'
,
label
:
'批量制作薪资单'
,
click
:
handleAdd
},
{
key
:
'singleAdd'
,
direction
:
'left'
,
label
:
'制作薪资单'
,
click
:
handleSingleAdd
},
{
key
:
'singleAdd'
,
direction
:
'left'
,
label
:
'制作薪资单'
,
click
:
handleSingleAdd
},
{
key
:
'check'
,
direction
:
'left'
,
label
:
'提交核对'
,
type
:
'warning'
,
click
:
handleSubmitCheck
},
{
key
:
'check'
,
direction
:
'left'
,
label
:
'提交核对'
,
type
:
'warning'
,
click
:
handleSubmitCheck
},
// { key: 'import', direction: 'left', click: handleImport },
// { key: 'import', direction: 'left', click: handleImport },
{
key
:
'export'
,
direction
:
'right'
,
click
:
handleExport
},
//
{ key: 'export', direction: 'right', click: handleExport },
{
key
:
'reset'
,
direction
:
'right'
,
click
:
handleReset
},
{
key
:
'reset'
,
direction
:
'right'
,
click
:
handleReset
},
{
key
:
'query'
,
direction
:
'right'
,
click
:
handleQuery
}
{
key
:
'query'
,
direction
:
'right'
,
click
:
handleQuery
}
])
])
...
...
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