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
0
Merge Requests
0
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
8b63a4cd
Commit
8b63a4cd
authored
Jun 30, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into prod
parents
f1c03b86
c5ce49df
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
161 additions
and
429 deletions
+161
-429
src/api/salary/index.js
+9
-0
src/components/Table/editTable.vue
+1
-0
src/views/financialCenter/financialSalary.vue
+2
-0
src/views/financialCenter/receivables.vue
+2
-3
src/views/payslip/electronicSalary.vue
+48
-385
src/views/payslip/wordReferenceSalary.vue
+99
-41
No files found.
src/api/salary/index.js
View file @
8b63a4cd
...
@@ -118,6 +118,15 @@ export function checkSalaryApi(data) {
...
@@ -118,6 +118,15 @@ export function checkSalaryApi(data) {
data
:
data
data
:
data
})
})
}
}
// 电子薪资单导出
export
function
electronicExport
(
data
)
{
return
request
({
url
:
'/csf/api/salary/salary/export'
,
method
:
'post'
,
data
:
data
})
}
// 下载选中的发佣数据
// 下载选中的发佣数据
export
function
downloadPolicyFortune
(
data
)
{
export
function
downloadPolicyFortune
(
data
)
{
...
...
src/components/Table/editTable.vue
View file @
8b63a4cd
...
@@ -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 @
8b63a4cd
...
@@ -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/financialCenter/receivables.vue
View file @
8b63a4cd
...
@@ -783,7 +783,7 @@ const loadTableData = async () => {
...
@@ -783,7 +783,7 @@ const loadTableData = async () => {
try
{
try
{
console
.
log
(
'searchParams.entryDate'
,
searchParams
.
entryDate
)
console
.
log
(
'searchParams.entryDate'
,
searchParams
.
entryDate
)
if
(
searchParams
.
entryDate
.
length
>
0
)
{
if
(
searchParams
.
entryDate
&&
searchParams
.
entryDate
.
length
>
0
)
{
searchParams
.
commissionDateStart
=
`
${
searchParams
.
entryDate
[
0
]}
-01`
searchParams
.
commissionDateStart
=
`
${
searchParams
.
entryDate
[
0
]}
-01`
searchParams
.
commissionDateEnd
=
`
${
searchParams
.
entryDate
[
1
]}
-01`
searchParams
.
commissionDateEnd
=
`
${
searchParams
.
entryDate
[
1
]}
-01`
}
else
{
}
else
{
...
@@ -793,7 +793,6 @@ const loadTableData = async () => {
...
@@ -793,7 +793,6 @@ const loadTableData = async () => {
const
params
=
{
const
params
=
{
...
searchParams
,
...
searchParams
,
commissionDateStart
:
searchParams
.
commissionDateStart
||
undefined
,
commissionDateStart
:
searchParams
.
commissionDateStart
||
undefined
,
commissionDateEnd
:
searchParams
.
commissionDateEnd
||
undefined
,
commissionDateEnd
:
searchParams
.
commissionDateEnd
||
undefined
,
...
@@ -827,7 +826,7 @@ const getStatics = async () => {
...
@@ -827,7 +826,7 @@ const getStatics = async () => {
const
searchParams
=
searchFormRef
.
value
.
getFormData
()
||
{}
const
searchParams
=
searchFormRef
.
value
.
getFormData
()
||
{}
try
{
try
{
if
(
searchParams
.
entryDate
.
length
>
0
)
{
if
(
searchParams
.
entryDate
&&
searchParams
.
entryDate
.
length
>
0
)
{
searchParams
.
commissionDateStart
=
`
${
searchParams
.
entryDate
[
0
]}
-01`
searchParams
.
commissionDateStart
=
`
${
searchParams
.
entryDate
[
0
]}
-01`
searchParams
.
commissionDateEnd
=
`
${
searchParams
.
entryDate
[
1
]}
-01`
searchParams
.
commissionDateEnd
=
`
${
searchParams
.
entryDate
[
1
]}
-01`
}
else
{
}
else
{
...
...
src/views/payslip/electronicSalary.vue
View file @
8b63a4cd
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<!-- 列表区域 -->
<!-- 列表区域 -->
<
template
#
table
>
<
template
#
table
>
<!--
制作
薪资单管理列表 -->
<!--
电子
薪资单管理列表 -->
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
height=
"400"
height=
"400"
...
@@ -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,11 +146,11 @@ import {
...
@@ -168,11 +146,11 @@ import {
calculateTotalAmountApi
,
calculateTotalAmountApi
,
editSingleSalaryApi
,
editSingleSalaryApi
,
addSingleSalaryApi
,
addSingleSalaryApi
,
cancelSalaryApi
,
delSalaryApi
,
delSalaryApi
,
electronicSalaryListApi
,
electronicSalaryListApi
,
pushSalaryApi
,
pushSalaryApi
,
checkSalaryApi
checkSalaryApi
,
electronicExport
}
from
'@/api/salary'
}
from
'@/api/salary'
import
SearchForm
from
'@/components/SearchForm/SearchForm.vue'
import
SearchForm
from
'@/components/SearchForm/SearchForm.vue'
import
{
loadDicts
,
getDictLabel
}
from
'@/utils/useDict'
import
{
loadDicts
,
getDictLabel
}
from
'@/utils/useDict'
...
@@ -185,11 +163,7 @@ const tableRef = ref()
...
@@ -185,11 +163,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 +172,7 @@ const commonDialogType = ref('')
...
@@ -198,203 +172,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 +398,13 @@ const clearAllSelection = () => {
...
@@ -620,128 +398,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
]
...
@@ -869,6 +532,11 @@ const searchParams = ref({})
...
@@ -869,6 +532,11 @@ const searchParams = ref({})
const
searchConfig
=
ref
([
const
searchConfig
=
ref
([
{
{
type
:
'input'
,
type
:
'input'
,
prop
:
'salaryNo'
,
label
:
'发放编号'
},
{
type
:
'input'
,
prop
:
'brokerName'
,
prop
:
'brokerName'
,
label
:
'转介人'
label
:
'转介人'
},
},
...
@@ -876,6 +544,7 @@ const searchConfig = ref([
...
@@ -876,6 +544,7 @@ const searchConfig = ref([
type
:
'month'
,
type
:
'month'
,
prop
:
'month'
,
prop
:
'month'
,
label
:
'薪资年月'
,
label
:
'薪资年月'
,
valueFormat
:
'YYYYMM'
,
startPlaceholder
:
'开始时间'
,
startPlaceholder
:
'开始时间'
,
endPlaceholder
:
'结束时间'
endPlaceholder
:
'结束时间'
},
},
...
@@ -974,14 +643,6 @@ const setSignleSalaryFormStatus = () => {
...
@@ -974,14 +643,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 +651,12 @@ const handleSelect = (e, row) => {
...
@@ -990,33 +651,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 +702,7 @@ const handlePush = async () => {
...
@@ -1062,6 +702,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,17 +713,31 @@ const handlePush = async () => {
...
@@ -1072,17 +713,31 @@ const handlePush = async () => {
}
}
}
}
const
handleImport
=
()
=>
ElMessage
.
info
(
'点击导入按钮'
)
const
handleExport
=
async
()
=>
{
const
handleExport
=
async
()
=>
{
ElMessage
.
info
(
'导出待开发'
)
//
ElMessage.info('导出待开发')
return
//
return
// 获取搜索参数
// 获取搜索参数
const
params
=
searchFormRef
.
value
?.
getFormData
()
||
{}
const
params
=
searchFormRef
.
value
?.
getFormData
()
||
{}
const
response
=
await
exportReceivedFortune
(
params
)
const
response
=
await
electronicExport
(
params
)
console
.
log
(
'response'
,
response
)
// 创建隐藏的下载链接
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
response
.
data
.
url
link
.
target
=
'_blank'
// 新窗口打开
// 设置下载文件名(重要)
// 从URL中提取文件名,或者使用返回的文件名
const
fileName
=
'电子薪资单'
link
.
download
=
fileName
// 触发下载
document
.
body
.
appendChild
(
link
)
link
.
click
()
document
.
body
.
removeChild
(
link
)
// 文件名设置为应收款导出_yyyy-MM-dd hh:mm:ss.xlsx,不需要-,用字符串
// 文件名设置为应收款导出_yyyy-MM-dd hh:mm:ss.xlsx,不需要-,用字符串
const
fileName
=
`应收款
导出_
${
new
Date
().
toLocaleString
().
replace
(
/
\/
/g
,
''
).
replace
(
/:/g
,
''
).
replace
(
/
\s
/g
,
''
)}
.xlsx`
// const fileName = `电子薪资单
导出_${new Date().toLocaleString().replace(/\//g, '').replace(/:/g, '').replace(/\s/g, '')}.xlsx`
await
safeDownload
(
response
,
fileName
,
'application/vnd.ms-excel;charset=utf-8'
)
//
await safeDownload(response, fileName, 'application/vnd.ms-excel;charset=utf-8')
}
}
const
handleReset
=
()
=>
{
const
handleReset
=
()
=>
{
...
@@ -1096,6 +751,7 @@ const handleReset = () => {
...
@@ -1096,6 +751,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
)
}
}
...
@@ -1165,6 +821,13 @@ const formatStatus = (row, column) => {
...
@@ -1165,6 +821,13 @@ const formatStatus = (row, column) => {
const
detailDialogVisible
=
ref
(
false
)
const
detailDialogVisible
=
ref
(
false
)
const
electronicSalaryTableColumns
=
ref
([
const
electronicSalaryTableColumns
=
ref
([
{
{
prop
:
'salaryNo'
,
label
:
'发放编号'
,
sortable
:
true
,
width
:
'150'
,
formatter
:
row
=>
row
.
salaryNo
||
'-'
},
{
prop
:
'status'
,
prop
:
'status'
,
label
:
'薪资单状态'
,
label
:
'薪资单状态'
,
sortable
:
true
,
sortable
:
true
,
...
@@ -1180,7 +843,7 @@ const electronicSalaryTableColumns = ref([
...
@@ -1180,7 +843,7 @@ const electronicSalaryTableColumns = ref([
},
},
{
{
prop
:
'month'
,
prop
:
'month'
,
label
:
'薪资
月份
'
,
label
:
'薪资
年月
'
,
sortable
:
true
,
sortable
:
true
,
width
:
'120'
,
width
:
'120'
,
formatter
:
row
=>
row
.
month
||
'-'
formatter
:
row
=>
row
.
month
||
'-'
...
@@ -1189,21 +852,21 @@ const electronicSalaryTableColumns = ref([
...
@@ -1189,21 +852,21 @@ const electronicSalaryTableColumns = ref([
prop
:
'paidAmount'
,
prop
:
'paidAmount'
,
label
:
'实发金额'
,
label
:
'实发金额'
,
sortable
:
true
,
sortable
:
true
,
width
:
'1
2
0'
,
width
:
'1
5
0'
,
formatter
:
row
=>
formatCurrency
(
row
.
paidAmount
||
0
)
formatter
:
row
=>
formatCurrency
(
row
.
paidAmount
||
0
)
},
},
{
{
prop
:
'grossAmount'
,
prop
:
'grossAmount'
,
label
:
'应发合计'
,
label
:
'应发合计'
,
sortable
:
true
,
sortable
:
true
,
width
:
'1
2
0'
,
width
:
'1
5
0'
,
formatter
:
row
=>
formatCurrency
(
row
.
grossAmount
||
0
)
formatter
:
row
=>
formatCurrency
(
row
.
grossAmount
||
0
)
},
},
{
{
prop
:
'totalDeductions'
,
prop
:
'totalDeductions'
,
label
:
'扣款合计'
,
label
:
'扣款合计'
,
sortable
:
true
,
sortable
:
true
,
width
:
'1
2
0'
,
width
:
'1
5
0'
,
formatter
:
row
=>
formatCurrency
(
row
.
totalDeductions
||
0
)
formatter
:
row
=>
formatCurrency
(
row
.
totalDeductions
||
0
)
},
},
{
{
...
@@ -1215,11 +878,11 @@ const electronicSalaryTableColumns = ref([
...
@@ -1215,11 +878,11 @@ const electronicSalaryTableColumns = ref([
},
},
{
{
prop
:
'
creatorName
'
,
prop
:
'
remark
'
,
label
:
'备注'
,
label
:
'备注'
,
sortable
:
true
,
sortable
:
true
,
width
:
'150'
,
width
:
'150'
,
formatter
:
row
=>
row
.
creatorName
||
'-'
formatter
:
row
=>
row
.
remark
||
'-'
},
},
{
{
prop
:
'creatorName'
,
prop
:
'creatorName'
,
...
...
src/views/payslip/wordReferenceSalary.vue
View file @
8b63a4cd
...
@@ -180,7 +180,7 @@ const allSelectedRows = ref(new Map())
...
@@ -180,7 +180,7 @@ const allSelectedRows = ref(new Map())
const
selectedRows
=
ref
([])
const
selectedRows
=
ref
([])
const
multipAddSalaryDialog
=
ref
(
false
)
const
multipAddSalaryDialog
=
ref
(
false
)
const
addRecordRef
=
ref
(
null
)
const
addRecordRef
=
ref
(
null
)
const
apiSalaryBatchAddDTOList
=
ref
([
{}
])
//批量新增薪资单
const
apiSalaryBatchAddDTOList
=
ref
([])
//批量新增薪资单
const
salaryRemittanceDTOList
=
ref
([{}])
//银行数据
const
salaryRemittanceDTOList
=
ref
([{}])
//银行数据
const
editTableRef
=
ref
(
null
)
const
editTableRef
=
ref
(
null
)
const
bankTableRef
=
ref
(
null
)
const
bankTableRef
=
ref
(
null
)
...
@@ -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'
,
// 存储月份列表,供月份列使用
internalNumber
:
'internalNumber'
}
}
// debounceWait: 300
// debounceWait: 300
},
},
...
@@ -230,12 +231,13 @@ const salaryTableColumns = ref([
...
@@ -230,12 +231,13 @@ const salaryTableColumns = ref([
},
},
{
{
prop
:
'
splitRatio
'
,
prop
:
'
internalNumber
'
,
label
:
'内部编号'
,
label
:
'内部编号'
,
editType
:
'input'
,
editType
:
'input'
,
// required: true,
// required: true,
placeholder
:
'请输入内部编号'
,
placeholder
:
'请输入内部编号'
,
width
:
150
width
:
150
,
disabled
:
true
},
},
{
{
...
@@ -290,7 +292,11 @@ const salaryTableColumns = ref([
...
@@ -290,7 +292,11 @@ const salaryTableColumns = ref([
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
// 固定参数
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
// 固定参数
// 远程搜索配置
// 远程搜索配置
filterable
:
true
,
filterable
:
true
,
keywordField
:
'queryContent'
keywordField
:
'queryContent'
,
onChangeExtraFields
:
{
bank1Name
:
'bankName'
}
// debounceWait: 300
// debounceWait: 300
},
},
{
{
...
@@ -345,7 +351,10 @@ const salaryTableColumns = ref([
...
@@ -345,7 +351,10 @@ const salaryTableColumns = ref([
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
// 固定参数
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
// 固定参数
// 远程搜索配置
// 远程搜索配置
filterable
:
true
,
filterable
:
true
,
keywordField
:
'queryContent'
keywordField
:
'queryContent'
,
onChangeExtraFields
:
{
bank2Name
:
'bankName'
}
// debounceWait: 300
// debounceWait: 300
},
},
{
{
...
@@ -402,7 +411,10 @@ const bankTableColumns = ref([
...
@@ -402,7 +411,10 @@ const bankTableColumns = ref([
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
// 固定参数
requestParams
:
{
pageNo
:
1
,
pageSize
:
20
},
// 固定参数
// 远程搜索配置
// 远程搜索配置
filterable
:
true
,
filterable
:
true
,
keywordField
:
'queryContent'
keywordField
:
'queryContent'
,
onChangeExtraFields
:
{
bankName
:
'bankName'
// 将选项原始对象的 broker 字段赋值给行数据的 brokerName
}
// debounceWait: 300
// debounceWait: 300
},
},
{
{
...
@@ -463,7 +475,8 @@ const personSaleryFormConfig = ref([
...
@@ -463,7 +475,8 @@ const personSaleryFormConfig = ref([
keywordField
:
'name'
,
keywordField
:
'name'
,
onChangeExtraFields
:
{
onChangeExtraFields
:
{
brokerName
:
'broker'
,
// 将选项原始对象的 broker 字段赋值给行数据的 brokerName
brokerName
:
'broker'
,
// 将选项原始对象的 broker 字段赋值给行数据的 brokerName
monthList
:
'monthList'
// 存储月份列表,供月份列使用
monthList
:
'monthList'
,
// 存储月份列表,供月份列使用
internalNumber
:
'internalNumber'
},
},
rules
:
[{
required
:
true
,
message
:
'姓名必填'
,
trigger
:
'blur'
}]
rules
:
[{
required
:
true
,
message
:
'姓名必填'
,
trigger
:
'blur'
}]
// debounceWait: 300
// debounceWait: 300
...
@@ -481,11 +494,13 @@ const personSaleryFormConfig = ref([
...
@@ -481,11 +494,13 @@ const personSaleryFormConfig = ref([
},
},
{
{
prop
:
'
splitRatio
'
,
prop
:
'
internalNumber
'
,
label
:
'内部编号'
,
label
:
'内部编号'
,
type
:
'input'
,
type
:
'input'
,
// required: true,
// required: true,
placeholder
:
'请输入内部编号'
placeholder
:
'请输入内部编号'
,
customDisable
:
true
,
disabled
:
true
},
},
{
{
...
@@ -529,6 +544,12 @@ const personSaleryFormConfig = ref([
...
@@ -529,6 +544,12 @@ const personSaleryFormConfig = ref([
label
:
'实发金额'
,
label
:
'实发金额'
,
inputType
:
'decimalNumber'
inputType
:
'decimalNumber'
// required: true,
// required: true,
},
{
type
:
'input'
,
prop
:
'cancelRemark'
,
label
:
'取消理由'
,
visible
:
formData
=>
formData
.
status
===
'6'
&&
commonDialogType
.
value
==
'view'
}
}
])
])
//单个薪资单的表单配置
//单个薪资单的表单配置
...
@@ -560,6 +581,7 @@ const handleSubmitCheck = async () => {
...
@@ -560,6 +581,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 +622,9 @@ const setCurrentPageSelection = () => {
...
@@ -600,6 +622,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
)
}
}
...
@@ -616,7 +641,10 @@ const clearAllSelection = () => {
...
@@ -616,7 +641,10 @@ const clearAllSelection = () => {
//==============表格复选框结束===========
//==============表格复选框结束===========
const
addSalaryRecord
=
()
=>
{
const
addSalaryRecord
=
()
=>
{
apiSalaryBatchAddDTOList
.
value
.
push
({
apiSalaryBatchAddDTOList
.
value
.
push
({
multipleId
:
Date
.
now
()
+
Math
.
random
()
// 或使用 uuid
multipleId
:
Date
.
now
()
+
Math
.
random
(),
// 或使用 uuid
otherAmount
:
0
,
mpfAmount
:
0
,
grossAmount
:
0
})
})
}
}
const
addSalaryRemittanceRecord
=
()
=>
{
const
addSalaryRemittanceRecord
=
()
=>
{
...
@@ -624,7 +652,7 @@ const addSalaryRemittanceRecord = () => {
...
@@ -624,7 +652,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 +671,7 @@ const handleSalarySelectChange = async ({ prop, value, col, rowIndex }) => {
...
@@ -643,6 +671,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
)
...
@@ -686,7 +715,9 @@ const handleSplitCellChange = async ({ row, col, newValue, oldValue, rowIndex, p
...
@@ -686,7 +715,9 @@ const handleSplitCellChange = async ({ row, col, newValue, oldValue, rowIndex, p
const
updatedRow
=
{
...
currentRow
}
const
updatedRow
=
{
...
currentRow
}
//计算实发金额
//计算实发金额
if
(
prop
===
'grossAmount'
||
prop
===
'mpfAmount'
||
prop
===
'otherAmount'
)
{
if
(
prop
===
'grossAmount'
||
prop
===
'mpfAmount'
||
prop
===
'otherAmount'
)
{
if
(
currentRow
.
grossAmount
&&
currentRow
.
mpfAmount
&&
currentRow
.
otherAmount
)
{
// if (currentRow.grossAmount && currentRow.mpfAmount && currentRow.otherAmount) {
// }
try
{
try
{
let
params
=
{
let
params
=
{
grossAmount
:
currentRow
.
grossAmount
,
grossAmount
:
currentRow
.
grossAmount
,
...
@@ -701,7 +732,6 @@ const handleSplitCellChange = async ({ row, col, newValue, oldValue, rowIndex, p
...
@@ -701,7 +732,6 @@ const handleSplitCellChange = async ({ row, col, newValue, oldValue, rowIndex, p
ElMessage
.
error
(
'实发金额计算失败'
)
ElMessage
.
error
(
'实发金额计算失败'
)
}
}
}
}
}
// 如果用户手动修改了 hkdAmount,不做反向联动(符合需求)
// 如果用户手动修改了 hkdAmount,不做反向联动(符合需求)
if
(
needUpdate
)
{
if
(
needUpdate
)
{
// 更新表格数据(整体替换,触发视图更新)
// 更新表格数据(整体替换,触发视图更新)
...
@@ -807,11 +837,13 @@ const handleSingleSalaryCellChange = async ({ row, col, newValue, oldValue, rowI
...
@@ -807,11 +837,13 @@ const handleSingleSalaryCellChange = async ({ row, col, newValue, oldValue, rowI
}
}
//计算折合港币总金额,改变币种汇率也会改变,所以等表格更新完在更新折合港币总金额
//计算折合港币总金额,改变币种汇率也会改变,所以等表格更新完在更新折合港币总金额
if
(
prop
===
'amount'
||
prop
===
'exchangeRate'
)
{
if
(
prop
===
'amount'
||
prop
===
'exchangeRate'
)
{
if
(
currentRow
.
amount
&&
currentRow
.
exchangeRate
&&
currentRow
.
currency
)
{
// if (currentRow.amount && currentRow.exchangeRate && currentRow.currency) {
// }
try
{
try
{
let
calculateTotalAmountDTOList
=
JSON
.
parse
(
JSON
.
stringify
(
salaryRemittanceDTOList
.
value
))
let
calculateTotalAmountDTOList
=
JSON
.
parse
(
JSON
.
stringify
(
salaryRemittanceDTOList
.
value
))
let
params
=
calculateTotalAmountDTOList
.
reduce
((
acc
,
item
)
=>
{
let
params
=
calculateTotalAmountDTOList
.
reduce
((
acc
,
item
)
=>
{
if
(
item
.
amount
&&
item
.
exchangeRate
&&
item
.
currency
)
{
if
(
item
.
exchangeRate
&&
item
.
currency
)
{
acc
.
push
({
...
item
})
acc
.
push
({
...
item
})
}
}
return
acc
return
acc
...
@@ -823,7 +855,6 @@ const handleSingleSalaryCellChange = async ({ row, col, newValue, oldValue, rowI
...
@@ -823,7 +855,6 @@ const handleSingleSalaryCellChange = async ({ row, col, newValue, oldValue, rowI
ElMessage
.
error
(
'折合港币总金额计算失败'
)
ElMessage
.
error
(
'折合港币总金额计算失败'
)
}
}
}
}
}
}
}
// 单个薪资单的新增,修改
// 单个薪资单的新增,修改
const
handleConfirmSingleSalary
=
async
()
=>
{
const
handleConfirmSingleSalary
=
async
()
=>
{
...
@@ -863,6 +894,11 @@ const searchParams = ref({})
...
@@ -863,6 +894,11 @@ const searchParams = ref({})
const
searchConfig
=
ref
([
const
searchConfig
=
ref
([
{
{
type
:
'input'
,
type
:
'input'
,
prop
:
'salaryNo'
,
label
:
'发放编号'
},
{
type
:
'input'
,
prop
:
'brokerName'
,
prop
:
'brokerName'
,
label
:
'转介人'
label
:
'转介人'
},
},
...
@@ -870,6 +906,7 @@ const searchConfig = ref([
...
@@ -870,6 +906,7 @@ const searchConfig = ref([
type
:
'month'
,
type
:
'month'
,
prop
:
'month'
,
prop
:
'month'
,
label
:
'薪资年月'
,
label
:
'薪资年月'
,
valueFormat
:
'YYYYMM'
,
startPlaceholder
:
'开始时间'
,
startPlaceholder
:
'开始时间'
,
endPlaceholder
:
'结束时间'
endPlaceholder
:
'结束时间'
},
},
...
@@ -893,13 +930,12 @@ const getOperateItems = row => {
...
@@ -893,13 +930,12 @@ const getOperateItems = row => {
const
items
=
[]
const
items
=
[]
// 条件:isPart == 1 时不显示分期出账(使用宽松相等,兼容字符串 '1')
// 条件:isPart == 1 时不显示分期出账(使用宽松相等,兼容字符串 '1')
// if (row.type == 1) {
if
(
row
.
status
!=
'3'
&&
row
.
status
!=
'5'
)
{
// items.push({ label: '设置状态', value: 'setStatus' })
items
.
push
({
label
:
'修改薪资单'
,
value
:
'salaryEdit'
})
// items.push({ label: '更新数据', value: 'updateData' })
}
// }
// 始终显示的菜单项(保持原始顺序)
// 始终显示的菜单项(保持原始顺序)
items
.
push
({
label
:
'修改薪资单'
,
value
:
'salaryEdit'
})
items
.
push
({
label
:
'查看薪资单'
,
value
:
'salaryView'
})
items
.
push
({
label
:
'查看薪资单'
,
value
:
'salaryView'
})
items
.
push
({
label
:
'取消薪资单'
,
value
:
'salaryCancel'
})
items
.
push
({
label
:
'取消薪资单'
,
value
:
'salaryCancel'
})
...
@@ -910,11 +946,13 @@ const handleFormInputChange = async (prop, value, item) => {
...
@@ -910,11 +946,13 @@ const handleFormInputChange = async (prop, value, item) => {
await
nextTick
()
await
nextTick
()
//计算实发金额
//计算实发金额
if
(
prop
===
'grossAmount'
||
prop
===
'mpfAmount'
||
prop
===
'otherAmount'
)
{
if
(
prop
===
'grossAmount'
||
prop
===
'mpfAmount'
||
prop
===
'otherAmount'
)
{
if
(
// if (
personSaleryFormModel
.
value
.
grossAmount
&&
// personSaleryFormModel.value.grossAmount &&
personSaleryFormModel
.
value
.
mpfAmount
&&
// personSaleryFormModel.value.mpfAmount &&
personSaleryFormModel
.
value
.
otherAmount
// personSaleryFormModel.value.otherAmount
)
{
// ) {
// }
try
{
try
{
let
params
=
{
let
params
=
{
grossAmount
:
personSaleryFormModel
.
value
.
grossAmount
,
grossAmount
:
personSaleryFormModel
.
value
.
grossAmount
,
...
@@ -928,7 +966,6 @@ const handleFormInputChange = async (prop, value, item) => {
...
@@ -928,7 +966,6 @@ const handleFormInputChange = async (prop, value, item) => {
ElMessage
.
error
(
'实发金额计算失败'
)
ElMessage
.
error
(
'实发金额计算失败'
)
}
}
}
}
}
}
}
const
handleFormSelectChange
=
async
(
prop
,
value
,
item
)
=>
{
const
handleFormSelectChange
=
async
(
prop
,
value
,
item
)
=>
{
console
.
log
(
'表单选中项改变'
,
prop
,
value
,
item
)
console
.
log
(
'表单选中项改变'
,
prop
,
value
,
item
)
...
@@ -956,7 +993,10 @@ const handleFormSelectChange = async (prop, value, item) => {
...
@@ -956,7 +993,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
...
@@ -975,8 +1015,18 @@ const setSignleSalaryFormStatus = () => {
...
@@ -975,8 +1015,18 @@ const setSignleSalaryFormStatus = () => {
const
handleSingleAdd
=
()
=>
{
const
handleSingleAdd
=
()
=>
{
commonDialogTit
.
value
=
'增加薪资单'
commonDialogTit
.
value
=
'增加薪资单'
commonDialogType
.
value
=
'add'
commonDialogType
.
value
=
'add'
personSaleryFormModel
.
value
=
{
apiSalaryRemittanceFzDTO
:
{}
}
personSaleryFormModel
.
value
=
{
salaryRemittanceDTOList
.
value
=
[]
apiSalaryRemittanceFzDTO
:
{},
otherAmount
:
0
,
mpfAmount
:
0
,
grossAmount
:
0
}
salaryRemittanceDTOList
.
value
=
[
{
amount
:
0
,
signleId
:
Date
.
now
()
+
Math
.
random
()
}
]
setSignleSalaryFormStatus
()
setSignleSalaryFormStatus
()
detailDialogVisible
.
value
=
true
detailDialogVisible
.
value
=
true
}
}
...
@@ -1070,7 +1120,14 @@ const handleAdd = () => {
...
@@ -1070,7 +1120,14 @@ const handleAdd = () => {
if
(
addRecordRef
.
value
)
{
if
(
addRecordRef
.
value
)
{
addRecordRef
.
value
.
resetForm
()
addRecordRef
.
value
.
resetForm
()
}
}
apiSalaryBatchAddDTOList
.
value
=
[{}]
apiSalaryBatchAddDTOList
.
value
=
[
{
multipleId
:
Date
.
now
()
+
Math
.
random
(),
// 或使用 uuid
otherAmount
:
0
,
mpfAmount
:
0
,
grossAmount
:
0
}
]
}
}
const
handleExport
=
async
()
=>
{
const
handleExport
=
async
()
=>
{
...
@@ -1095,18 +1152,19 @@ const handleReset = () => {
...
@@ -1095,18 +1152,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
}
])
])
...
@@ -1174,13 +1232,13 @@ const workSalaryTableColumns = ref([
...
@@ -1174,13 +1232,13 @@ const workSalaryTableColumns = ref([
fixed
:
'left'
,
fixed
:
'left'
,
formatter
:
row
=>
row
.
salaryNo
||
'-'
formatter
:
row
=>
row
.
salaryNo
||
'-'
},
},
{
//
{
prop
:
'salaryBizId'
,
//
prop: 'salaryBizId',
label
:
'业务编号'
,
//
label: '业务编号',
sortable
:
true
,
//
sortable: true,
width
:
'220'
,
//
width: '220',
formatter
:
row
=>
row
.
salaryBizId
||
'-'
//
formatter: row => row.salaryBizId || '-'
},
//
},
{
{
prop
:
'brokerName'
,
prop
:
'brokerName'
,
label
:
'转介人'
,
label
:
'转介人'
,
...
...
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