feat(部门): 添加获取部门及其子部门列表的接口
在leave.vue和goout.vue中使用新接口listDeptWithChildren替换原有的listDept
This commit is contained in:
@@ -58,3 +58,13 @@ export function treeselect() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function listDeptWithChildren(deptId) {
|
||||||
|
if (!deptId) {
|
||||||
|
return Promise.reject(new Error('deptId is required'))
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/system/dept/list/' + deptId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getOutRequest, addOutRequest, updateOutRequest } from "@/api/wms/outRequest";
|
import { getOutRequest, addOutRequest, updateOutRequest } from "@/api/wms/outRequest";
|
||||||
import { listApproval, updateApproval } from "@/api/wms/approval"
|
import { listApproval, updateApproval } from "@/api/wms/approval"
|
||||||
import { listDept } from "@/api/system/dept"
|
import { listDeptWithChildren } from "@/api/system/dept"
|
||||||
import FileUpload from '@/components/FileUpload'
|
import FileUpload from '@/components/FileUpload'
|
||||||
import DictSelect from '@/components/DictSelect'
|
import DictSelect from '@/components/DictSelect'
|
||||||
import OutLabelPrinter from '../components/outLabelPrinter'
|
import OutLabelPrinter from '../components/outLabelPrinter'
|
||||||
@@ -183,7 +183,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDeptList() {
|
getDeptList() {
|
||||||
listDept().then(response => {
|
listDeptWithChildren("2009923867307630594").then(response => {
|
||||||
this.deptOptions = response.data
|
this.deptOptions = response.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getLeaveRequest, addLeaveRequest, updateLeaveRequest } from "@/api/wms/leaveRequest";
|
import { getLeaveRequest, addLeaveRequest, updateLeaveRequest } from "@/api/wms/leaveRequest";
|
||||||
import { listApproval, updateApproval } from "@/api/wms/approval"
|
import { listApproval, updateApproval } from "@/api/wms/approval"
|
||||||
import { listDept } from "@/api/system/dept"
|
import { listDeptWithChildren } from "@/api/system/dept"
|
||||||
import FileUpload from '@/components/FileUpload'
|
import FileUpload from '@/components/FileUpload'
|
||||||
import DictSelect from '@/components/DictSelect'
|
import DictSelect from '@/components/DictSelect'
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDeptList() {
|
getDeptList() {
|
||||||
listDept().then(response => {
|
listDeptWithChildren("2009923867307630594").then(response => {
|
||||||
this.deptOptions = response.data
|
this.deptOptions = response.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user