diff --git a/src/api/lease/apply.js b/src/api/lease/apply.js index c50c6c99..d316ef7b 100644 --- a/src/api/lease/apply.js +++ b/src/api/lease/apply.js @@ -53,6 +53,14 @@ export function getListUnite(data) { data: data, }) } +//领料申请租赁单位下拉框 +export function getAgreementUnitListApi(data) { + return request({ + url: '/material/select/getAgreementUnitList', + method: 'post', + data: data, + }) +} // 项目部-下拉 export function getListDepartApi(data) { diff --git a/src/views/material/lease/protocol/index.vue b/src/views/material/lease/protocol/index.vue index a1f62d4f..e078257f 100644 --- a/src/views/material/lease/protocol/index.vue +++ b/src/views/material/lease/protocol/index.vue @@ -493,7 +493,7 @@ import { getToken } from '@/utils/auth' import { Base64 } from 'js-base64' import { forEach } from 'jszip' import { listUser } from '@/api/system/user' -import { getListProject, getListUnite, getListDepartApi } from '@/api/lease/apply' +import { getListProject, getAgreementUnitListApi, getListDepartApi } from '@/api/lease/apply' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' @@ -841,7 +841,7 @@ export default { }, //获取单位类型 ,getUnitList, getProjectList getUnitList() { - getListUnite({ projectId: null }).then(response => { + getAgreementUnitListApi({ projectId: this.form.projectId }).then(response => { this.uniteList = response.data }) }, @@ -868,7 +868,9 @@ export default { handleSelectPro(val) { console.log('🚀 ~ val:', val) this.form.projectUnitId = '' + this.form.unitId = '' this.departList = null + this.getUnitList() this.getListDepart(val.name) }, projectChange(val) {