diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index 6d9bcf7..ee0cec0 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -1571,7 +1571,7 @@ export default { }) this.getPurchaseType() this.getContracts() - this.getDepartment() + this.getDepartment(-1) this.getPurchaseWay() this.getMoneyWay() @@ -1972,8 +1972,12 @@ export default { this.getBudgets() }, // 获取科室 - async getDepartment() { - this.departments = await listdeptNoAuth() + async getDepartment(status) { + const params = { show_tree: 1,sort_name:'sortnumber',sort_type:'asc' } + if (status !== undefined) { + params.status = status + } + this.departments = await listdeptNoAuth(params) }, // 获取购买形式列表 async getPurchaseType() { @@ -3467,9 +3471,11 @@ export default { // 添加按分类新增合同的方法 async handleAddContractByCategory(type) { this.formType = type - this.loading = true - try { - // 1. 获取当前用户所在部门id + this.loading = true + try { + // 0. 先获取最新执行部门信息 + await this.getDepartment() + // 1. 获取当前用户所在部门id const userDeptId = this.$store.state.user.info.department_id // 2. 显示弹窗、初始化表单 this.isShowAdd = true