Commit a1e72a7e by yuzhenWang

Merge branch 'wyz' into 'test'

对接薪资单发测试

See merge request !170
parents e51523a1 b9a9ca92
......@@ -551,6 +551,7 @@ function handleCellChange(row, col, newValue, rowIndex) {
function handleSelectChange(row, col, value, rowIndex) {
const newTableData = [...props.tableData]
const updatedRow = { ...row, [col.prop]: value }
// 处理额外字段赋值
if (col.onChangeExtraFields) {
const options = getSelectOptions(col, row)
......
......@@ -758,6 +758,8 @@ const setCurrentPageSelection = () => {
// 设置当前页应该选中的行
tableData.value.forEach(row => {
console.log('薪资发放row', allSelectedRows.value)
if (allSelectedRows.value.has(row.fortuneAccountBizId)) {
tableRef.value.toggleRowSelection(row, true)
}
......
......@@ -210,7 +210,8 @@ const salaryTableColumns = ref([
keywordField: 'name',
onChangeExtraFields: {
brokerName: 'broker', // 将选项原始对象的 broker 字段赋值给行数据的 brokerName
monthList: 'monthList' // 存储月份列表,供月份列使用
monthList: 'monthList', // 存储月份列表,供月份列使用
splitRatio: 'internalNumber' // 新增:将原始数据的 internalNumber 赋给 splitRatio
}
// debounceWait: 300
},
......@@ -235,7 +236,8 @@ const salaryTableColumns = ref([
editType: 'input',
// required: true,
placeholder: '请输入内部编号',
width: 150
width: 150,
disabled: true
},
{
......@@ -463,7 +465,8 @@ const personSaleryFormConfig = ref([
keywordField: 'name',
onChangeExtraFields: {
brokerName: 'broker', // 将选项原始对象的 broker 字段赋值给行数据的 brokerName
monthList: 'monthList' // 存储月份列表,供月份列使用
monthList: 'monthList', // 存储月份列表,供月份列使用
splitRatio: 'internalNumber' // 新增:将原始数据的 internalNumber 赋给 splitRatio
},
rules: [{ required: true, message: '姓名必填', trigger: 'blur' }]
// debounceWait: 300
......@@ -485,7 +488,9 @@ const personSaleryFormConfig = ref([
label: '内部编号',
type: 'input',
// required: true,
placeholder: '请输入内部编号'
placeholder: '请输入内部编号',
customDisable: true,
disabled: true
},
{
......@@ -560,6 +565,7 @@ const handleSubmitCheck = async () => {
// 调用出账API
await submitCheckApi({ salaryBizId: arr })
clearAllSelection()
const params = searchFormRef.value.getFormData()
loadTableData(params)
ElMessage.success('核对操作成功')
......@@ -600,6 +606,9 @@ const setCurrentPageSelection = () => {
// 设置当前页应该选中的行
tableData.value.forEach(row => {
console.log('====================================')
console.log('(allSelectedRows.value', allSelectedRows.value)
console.log('====================================')
if (allSelectedRows.value.has(row.salaryBizId)) {
tableRef.value.toggleRowSelection(row, true)
}
......@@ -624,7 +633,7 @@ const addSalaryRemittanceRecord = () => {
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]
if (!currentRow) return
let needUpdate = false
......@@ -643,6 +652,7 @@ const handleSalarySelectChange = async ({ prop, value, col, rowIndex }) => {
updatedRow.mpfAmount = 0
updatedRow.otherAmount = 0
updatedRow.paidAmount = res.data
needUpdate = true
} catch (error) {
console.log('应发金额计算失败', error)
......@@ -956,7 +966,10 @@ const handleFormSelectChange = async (prop, value, item) => {
//设置单个薪资单的表单编辑状态
const setSignleSalaryFormStatus = () => {
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
} else {
item.disabled = true
......@@ -1095,18 +1108,19 @@ const handleReset = () => {
const handleQuery = () => {
currentPage.value = 1
clearAllSelection()
const params = searchFormRef.value.getFormData()
loadTableData(params)
}
const visibleDefaultButtons = ref(['add', 'export', 'reset', 'query'])
const visibleDefaultButtons = ref(['add', 'reset', 'query'])
// 按钮配置
const operationBtnList = ref([
{ key: 'add', direction: 'left', label: '批量制作薪资单', click: handleAdd },
{ key: 'singleAdd', direction: 'left', label: '制作薪资单', click: handleSingleAdd },
{ key: 'check', direction: 'left', label: '提交核对', type: 'warning', click: handleSubmitCheck },
// { 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: 'query', direction: 'right', click: handleQuery }
])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment