This commit is contained in:
qsh
2025-04-22 15:18:08 +08:00
parent 5098a5cf01
commit ff3f4d9e47
4 changed files with 37 additions and 2 deletions

View File

@@ -308,9 +308,24 @@
<span v-if="row.status == 0">封存</span>
<span v-else-if="row.status == 1">已封存</span>
</el-button>
<el-button type="primary" v-if="row.grantId" text @click="handleDetail(row)">
<el-button
type="primary"
v-if="row.grantId"
style="padding: 0"
text
@click="handleDetail(row)"
>
提成明细
</el-button>
<el-button
type="primary"
text
v-hasPermi="['home:salary:send']"
style="padding: 0"
@click="handelSendNotic(row)"
>
发送工资条
</el-button>
</template>
</el-table-column>
</el-table>
@@ -468,6 +483,20 @@ async function handleDetail(row) {
console.log(error)
}
}
function handelSendNotic(row) {
const name = row.grantId ? row.name : row.period
const params = row.grantId ? { grantId: row.grantId } : { period: row.period }
message.confirm('确认要发送"' + name + '"工资条吗?').then(async () => {
try {
await SalaryApi.sendSalaryNotice(params)
message.success('发送成功!')
} catch (error) {
message.error(error)
console.log(error)
}
})
}
</script>
<style lang="scss" scoped>