sc
This commit is contained in:
@@ -54,3 +54,8 @@ export const getLinkHistorySalary = async () => {
|
||||
export const getCommissionDetail = async (params) => {
|
||||
return await request.get({ url: '/admin-api/oa/user-salary-grant/detail', params })
|
||||
}
|
||||
|
||||
// 发送工资条通知
|
||||
export const sendSalaryNotice = (data) => {
|
||||
return request.post({ url: '/admin-api/oa/user-salary-grant/pushUserSalaryGrantDetail', data })
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ const resetForm = () => {
|
||||
/** 获得部门树 */
|
||||
const getTree = async () => {
|
||||
deptTree.value = []
|
||||
const data = await DeptApi.getSimpleDeptList({ allFlag: false })
|
||||
const data = await DeptApi.getSimpleDeptList({ allFlag: true })
|
||||
let dept: Tree = { id: 0, name: '顶级部门', children: [] }
|
||||
dept.children = handleTree(data)
|
||||
deptTree.value.push(dept)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -521,6 +521,7 @@ async function handleSave() {
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
|
||||
form.value.executor = form.value.executor || []
|
||||
if (form.value.executor.length > 1) {
|
||||
message
|
||||
.confirm('是否按照当前节点所选的多个执行人自动新增对应的员工节点?', {
|
||||
|
||||
Reference in New Issue
Block a user