|
|
|
@ -285,11 +285,11 @@ |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
v-if="row.id" |
|
|
|
|
v-if="row.id && !row.isConfirm" |
|
|
|
|
style="padding: 0" |
|
|
|
|
text |
|
|
|
|
v-hasPermi="['home:salary:sealup']" |
|
|
|
|
@click="handleSave(row)" |
|
|
|
|
@click="handleSealup(row)" |
|
|
|
|
> |
|
|
|
|
封存 |
|
|
|
|
</el-button> |
|
|
|
@ -316,6 +316,8 @@ import DialogSalaryImport from './Comp/DialogSalaryImport.vue' |
|
|
|
|
import { removeNullField } from '@/utils' |
|
|
|
|
import * as SalaryApi from '@/api/home/salary.js' |
|
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
|
|
|
|
|
|
const searchForm = ref({ |
|
|
|
|
name: undefined, |
|
|
|
|
period: undefined, |
|
|
|
@ -357,7 +359,7 @@ async function getList() { |
|
|
|
|
tableList.value = data.list.map((it, index) => ({ |
|
|
|
|
...it, |
|
|
|
|
id: index + 1, |
|
|
|
|
edit: '0' |
|
|
|
|
edit: it.isConfirm ? '2' : '0' |
|
|
|
|
})) |
|
|
|
|
} |
|
|
|
|
total.value = data.total |
|
|
|
@ -395,9 +397,29 @@ function handleEdit(row) { |
|
|
|
|
row.userSalaryGrantRespVOList.forEach((it) => (it.edit = true)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleSave(row) { |
|
|
|
|
async function handleSave(row) { |
|
|
|
|
row.edit = '0' |
|
|
|
|
row.userSalaryGrantRespVOList.forEach((it) => (it.edit = false)) |
|
|
|
|
loading.value = true |
|
|
|
|
await SalaryApi.updateSalarySlip(row.userSalaryGrantRespVOList) |
|
|
|
|
message.success('保存成功!') |
|
|
|
|
getList() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function handleSealup(row) { |
|
|
|
|
try { |
|
|
|
|
// 二次确认 |
|
|
|
|
await message.confirm('确认要封存"' + row.period + '"工资条吗?') |
|
|
|
|
// 发起修改状态 |
|
|
|
|
await SalaryApi.sealupSalarySlip({ |
|
|
|
|
grantIdList: row.userSalaryGrantRespVOList.map((it) => it.grantId), |
|
|
|
|
period: row.period |
|
|
|
|
}) |
|
|
|
|
// 刷新列表 |
|
|
|
|
await getList() |
|
|
|
|
} catch (err) { |
|
|
|
|
console.log(err) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|