[update] 收入合同关联项目组件拆分,普通项目管理module验证
This commit is contained in:
@@ -14,12 +14,26 @@
|
||||
<template v-if="projectType === 1">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="科室" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入科室" v-model="queryParam.chargeCompanyTemporaryName"></a-input>
|
||||
<!-- :disabled="pack === 0" -->
|
||||
<a-tree-select
|
||||
style="width:100%"
|
||||
:dropdownStyle="{ maxHeight: '200px',maxWidth:'100px','overflow-x':'hidden',' overflow-y': 'auto' }"
|
||||
:treeData="treeDepartData"
|
||||
v-model="queryParam.departId"
|
||||
placeholder="请选择科室"
|
||||
@change="departChange">
|
||||
</a-tree-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-principal placeholder="请选择负责人" v-model="queryParam.principalId"></select-principal>
|
||||
<a-select v-model="queryParam.principalId"
|
||||
show-search
|
||||
placeholder="请选择负责人"
|
||||
option-filter-prop="children"
|
||||
:filter-option="filterOption">
|
||||
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ item.realname }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
@@ -112,17 +126,23 @@
|
||||
|
||||
<script>
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||
import SelectPrincipal from '../../../../components/company/SelectPrincipal'
|
||||
import JYearDate from '../../../../components/jero/JYearDate'
|
||||
import GeneralProjectModule from '../../../projectManagement/modules/GeneralProjectModule'
|
||||
import StatusSlot from '../../../../components/tools/StatusSlot'
|
||||
import { associatedProject } from '../../../../api/incomePaymentsApi'
|
||||
import { associatedProject, queryUserByDepartId } from '../../../../api/incomePaymentsApi'
|
||||
import WorkingGroupMemberUnitModule from '../../../projectManagement/modules/WorkingGroupMemberUnitModule'
|
||||
import ProgressBar from '../../../../components/ProgressBar'
|
||||
import { queryDepartTreeList } from '../../../../api/api'
|
||||
|
||||
export default {
|
||||
name: 'SelectProjectModule',
|
||||
components: { SelectPrincipal, JYearDate, GeneralProjectModule, StatusSlot, WorkingGroupMemberUnitModule, ProgressBar },
|
||||
components: {
|
||||
JYearDate,
|
||||
GeneralProjectModule,
|
||||
StatusSlot,
|
||||
WorkingGroupMemberUnitModule,
|
||||
ProgressBar
|
||||
},
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
return {
|
||||
@@ -144,15 +164,38 @@ export default {
|
||||
contractId: '', // 收入合同id
|
||||
url: {
|
||||
list: ''
|
||||
}
|
||||
},
|
||||
pack: null,// 是否打包
|
||||
treeDepartData: [], // 部门列表
|
||||
userList: [] // 用户列表
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.loadData()
|
||||
this.loadDepartTreeData()
|
||||
this.visible = true
|
||||
},
|
||||
/**
|
||||
* 获取科室(部门)数据
|
||||
*/
|
||||
loadDepartTreeData() {
|
||||
queryDepartTreeList().then((res) => {
|
||||
if (res.success) {
|
||||
this.treeDepartData = []
|
||||
let treeList = res.result
|
||||
for (let a = 0; a < treeList.length; a++) {
|
||||
let temp = treeList[a]
|
||||
temp.isLeaf = temp.leaf
|
||||
this.treeDepartData.push(temp)
|
||||
}
|
||||
} else {
|
||||
console.log(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.queryParam = {}
|
||||
this.visible = false
|
||||
},
|
||||
handleOk() {
|
||||
@@ -199,6 +242,28 @@ export default {
|
||||
this.$refs.workingGroupMemberForm.disableSubmit = false
|
||||
break
|
||||
}
|
||||
},
|
||||
// 下拉框的搜索
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
)
|
||||
},
|
||||
/**
|
||||
* 部门变化,负责人列表变化
|
||||
* @param value
|
||||
*/
|
||||
departChange(value) {
|
||||
let param = {
|
||||
departId: value
|
||||
}
|
||||
queryUserByDepartId(param).then(res => {
|
||||
if (res.success) {
|
||||
this.userList = res.result
|
||||
} else {
|
||||
console.log(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user