Compare commits

..

4 Commits

Author SHA1 Message Date
qsh d1c4632f72 sc 3 months ago
qsh 70dcf5bc28 sc 3 months ago
qsh 2af1282718 tj 3 months ago
qsh a97f5bf79e sc 3 months ago
  1. 5
      src/api/home/salary.js
  2. 43
      src/views/Home/Salary/index.vue

@ -49,3 +49,8 @@ export const getLinkHistorySalary = async () => {
url: '/admin-api/oa/user-salary-grant/get-import-template/history' url: '/admin-api/oa/user-salary-grant/get-import-template/history'
}) })
} }
// 查询提成明细
export const getCommissionDetail = async (params) => {
return await request.get({ url: '/admin-api/oa/user-salary-grant/detail', params })
}

@ -70,6 +70,19 @@
<span v-else> {{ row.baseSalary }}</span> <span v-else> {{ row.baseSalary }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="绩效" min-width="90px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.meritsSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.meritsSalary }}</span>
</template>
</el-table-column>
<el-table-column label="补贴" min-width="90px"> <el-table-column label="补贴" min-width="90px">
<template #default="{ row }"> <template #default="{ row }">
<el-input-number <el-input-number
@ -138,19 +151,6 @@
<el-table-column label="小计" prop="salaryTotal" min-width="90px" /> <el-table-column label="小计" prop="salaryTotal" min-width="90px" />
</el-table-column> </el-table-column>
<el-table-column label="应扣工资" align="center"> <el-table-column label="应扣工资" align="center">
<el-table-column label="绩效" min-width="90px">
<template #default="{ row }">
<el-input-number
v-if="row.edit"
v-model="row.meritsSalary"
:min="0"
:controls="false"
size="small"
style="width: 65px"
/>
<span v-else> {{ row.meritsSalary }}</span>
</template>
</el-table-column>
<el-table-column label="请假" min-width="90px"> <el-table-column label="请假" min-width="90px">
<template #default="{ row }"> <template #default="{ row }">
<el-input-number <el-input-number
@ -295,6 +295,9 @@
<span v-if="row.status == 0">封存</span> <span v-if="row.status == 0">封存</span>
<span v-else-if="row.status == 1">已封存</span> <span v-else-if="row.status == 1">已封存</span>
</el-button> </el-button>
<el-button type="primary" v-if="row.grantId" text @click="handleDetail(row)">
提成明细
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -423,6 +426,20 @@ async function handleSealup(row) {
console.log(err) console.log(err)
} }
} }
async function handleDetail(row) {
try {
const data = await SalaryApi.getCommissionDetail({ id: row.grantId })
if (data) {
message.alert(data)
} else {
message.info('该员工未配置提成方案!')
}
} catch (error) {
message.error(error)
console.log(error)
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Loading…
Cancel
Save