caolin 22 hours ago
commit 8bf29d968a
  1. 5
      src/api/home/salary.js
  2. 2
      src/views/Basic/Dept/DeptForm.vue
  3. 31
      src/views/Home/Salary/index.vue
  4. 2
      src/views/OKR/Management/Components/AllTarget.vue
  5. 1
      src/views/OKR/Management/Components/DialogOkrInfo.vue
  6. 43
      src/views/OKR/Management/Components/ObjectList.vue

@ -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>

@ -86,6 +86,7 @@ function handleSearchPeroid() {
}
function nodeChange(nodeId) {
if (nodeId) {
searchForm.value.nodeId = nodeId
getOkrList()
const currentNode = findNode(peroidList.value, (node) => {
@ -97,6 +98,7 @@ function nodeChange(nodeId) {
} else {
isCurrentLeafNode.value = false
}
}
}
function getOkrList() {

@ -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('是否按照当前节点所选的多个执行人自动新增对应的员工节点?', {

@ -30,9 +30,11 @@
</div>
<vue3-tree-org
ref="treeOrgRef"
:data="dataList"
center
collapsable
:default-expand-keys="lastExpendKeys"
:props="treeProps"
@on-node-click="handleClickNode"
>
@ -74,7 +76,7 @@
</template>
</vue3-tree-org>
<DialogOkr ref="dialogOkr" @edit="handleEditOkr" />
<DialogOkrInfo ref="dialogOkrInfo" @close="openOkr" />
<DialogOkrInfo ref="dialogOkrInfo" @close="openOkr" @success="resetTreeData" />
</div>
</template>
@ -89,6 +91,7 @@ import { listToTree } from '@/utils/tree'
const dataList = ref({})
const helpDataList = ref([])
const lastExpendKeys = ref([])
const treeProps = {
children: 'children',
label: 'nodeName',
@ -106,6 +109,7 @@ const peroidList = ref([])
handleSearchPeroid()
function handleSearchPeroid() {
lastExpendKeys.value = []
getOkrRelationTree().then((resp) => {
peroidList.value = resp
if (resp && resp.length && !searchForm.value.nodeId) {
@ -116,6 +120,43 @@ function handleSearchPeroid() {
})
}
const treeOrgRef = ref(null)
function resetTreeData() {
if (treeOrgRef.value) {
lastExpendKeys.value = treeOrgRef.value.getExpandKeys()
}
// tree
getOkrRelationTree().then((resp) => {
peroidList.value = resp
if (resp && resp.length) {
if (!searchForm.value.nodeId) {
searchForm.value.nodeId = resp[0].nodeId
searchForm.value.nodeName = resp[0].nodeName
}
getOkrRelationTreeChildren({
nodeId: searchForm.value.nodeId
}).then((resp) => {
const tree = listToTree(resp, {
id: 'nodeId',
pid: 'parentId',
children: 'children'
})
// // keys
// if (treeOrgRef.value) {
// treeOrgRef.value.setExpandKeys(lastExpendKeys.value)
// }
helpDataList.value = resp
if (tree && tree.length) {
dataList.value = tree[0]
} else {
dataList.value = {}
}
})
}
})
}
function getOkrList() {
getOkrRelationTreeChildren({
nodeId: searchForm.value.nodeId

Loading…
Cancel
Save