|
|
|
|
@ -172,13 +172,43 @@
|
|
|
|
|
placeholder="请选择资金列支渠道"
|
|
|
|
|
@change="moneyWayChange"
|
|
|
|
|
>
|
|
|
|
|
<el-option v-for="item in planTypes" :key="item.id" :value="item.id" :label="item.value" />
|
|
|
|
|
<el-option v-for="item in planTypes_arr" :key="item.id" :value="item.id" :label="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:extraFormBottom>
|
|
|
|
|
<div style="display: flex;">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="plansSelect.typeName"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请选择预算类型"
|
|
|
|
|
style="width: 200px;margin-right:10px"
|
|
|
|
|
@change="changeType"
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<el-option disabled value="" style="height:150px;overflow: scroll;">
|
|
|
|
|
<el-tree
|
|
|
|
|
class="planselsct"
|
|
|
|
|
ref="tree1"
|
|
|
|
|
style="width:300px"
|
|
|
|
|
default-expand-all
|
|
|
|
|
:default-checked-keys="checkArr"
|
|
|
|
|
:check-strictly="true"
|
|
|
|
|
:data="planTypes"
|
|
|
|
|
show-checkbox
|
|
|
|
|
node-key="id"
|
|
|
|
|
highlight-current
|
|
|
|
|
:props="defaultProps"
|
|
|
|
|
@check="(data, node)=>{return getSelectedNodes(data,node,'tree1')}"
|
|
|
|
|
/>
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
<Input v-model="plansSelect.name" search enter-button="搜 索" placeholder="搜索预算计划.." @on-search="getBudgets" />
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="contract-add-plan" style="min-width: 300px;">
|
|
|
|
|
<template v-if="paymentRegistrationForm.plan.length > 0">
|
|
|
|
|
<Tag v-for="item in paymentRegistrationForm.plan" :key="item.plan_id" closable color="primary" @on-close="delPlan(item)">{{ item.label }}</Tag>
|
|
|
|
|
@ -231,12 +261,23 @@ import {
|
|
|
|
|
} from 'element-ui'
|
|
|
|
|
import {
|
|
|
|
|
parseTime,
|
|
|
|
|
moneyFormatter
|
|
|
|
|
moneyFormatter,
|
|
|
|
|
buildTree
|
|
|
|
|
} from '@/utils'
|
|
|
|
|
import {
|
|
|
|
|
index as getPlanType
|
|
|
|
|
} from '@/api/budget/plantype.js'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
|
|
checkArr: [],
|
|
|
|
|
defaultProps: {
|
|
|
|
|
children: 'children',
|
|
|
|
|
label: 'name'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
planTotal: 0,
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
// 付款登记
|
|
|
|
|
@ -244,6 +285,7 @@ export default {
|
|
|
|
|
contract: {},
|
|
|
|
|
payment: [], // 合同关联的付款登记
|
|
|
|
|
planTypes: [],
|
|
|
|
|
planTypes_arr:[],
|
|
|
|
|
payTable: [{
|
|
|
|
|
label: '申请金额',
|
|
|
|
|
prop: 'apply_money',
|
|
|
|
|
@ -326,7 +368,9 @@ export default {
|
|
|
|
|
plansSelect: {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
name: ''
|
|
|
|
|
name: '',
|
|
|
|
|
type:'',
|
|
|
|
|
typeName:'',
|
|
|
|
|
},
|
|
|
|
|
planTable: [{
|
|
|
|
|
sortable: false,
|
|
|
|
|
@ -340,15 +384,15 @@ export default {
|
|
|
|
|
width: 96
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '分类',
|
|
|
|
|
label: '预算类型',
|
|
|
|
|
width: 136,
|
|
|
|
|
prop: 'type',
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
const res = this.planTypes.filter(item => {
|
|
|
|
|
return item.id === value
|
|
|
|
|
})
|
|
|
|
|
return res[0]?.value || '未知'
|
|
|
|
|
}
|
|
|
|
|
prop: 'type_detail.name',
|
|
|
|
|
// formatter: (cell, data, value) => {
|
|
|
|
|
// const res = this.planTypes.filter(item => {
|
|
|
|
|
// return item.id === value
|
|
|
|
|
// })
|
|
|
|
|
// return res[0]?.value || '未知'
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '科室',
|
|
|
|
|
@ -407,8 +451,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async mounted() {
|
|
|
|
|
// await this.getBudgets()
|
|
|
|
|
await this.getBudgets()
|
|
|
|
|
await this.getPlanTypes()
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
delPlan(val) {
|
|
|
|
|
@ -428,22 +473,22 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 资金列支渠道选择后变化
|
|
|
|
|
moneyWayChange() {
|
|
|
|
|
const page = 1
|
|
|
|
|
const pageSize = this.plansSelect.page_size
|
|
|
|
|
const name = this.plansSelect.name
|
|
|
|
|
this.plansSelect = {
|
|
|
|
|
page: page,
|
|
|
|
|
page_size: pageSize,
|
|
|
|
|
name: name
|
|
|
|
|
}
|
|
|
|
|
// const page = 1
|
|
|
|
|
// const pageSize = this.plansSelect.page_size
|
|
|
|
|
// const name = this.plansSelect.name
|
|
|
|
|
// this.plansSelect = {
|
|
|
|
|
// page: page,
|
|
|
|
|
// page_size: pageSize,
|
|
|
|
|
// name: name
|
|
|
|
|
// }
|
|
|
|
|
if (this.paymentRegistrationForm.moneyWay) {
|
|
|
|
|
const _arr = []
|
|
|
|
|
this.paymentRegistrationForm.moneyWay.forEach((item, index) => {
|
|
|
|
|
_arr.push(item)
|
|
|
|
|
})
|
|
|
|
|
this.plansSelect['type'] = _arr + ''
|
|
|
|
|
// this.plansSelect['type'] = _arr + ''
|
|
|
|
|
}
|
|
|
|
|
this.getBudgets()
|
|
|
|
|
// this.getBudgets()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
inputMoney(e, row) {
|
|
|
|
|
@ -455,11 +500,51 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
async getPlanTypes() {
|
|
|
|
|
const res = await getparameter({
|
|
|
|
|
const res1 = await getparameter({
|
|
|
|
|
number: 'money_way'
|
|
|
|
|
})
|
|
|
|
|
this.planTypes = res.detail
|
|
|
|
|
this.planTypes_arr = res1.detail
|
|
|
|
|
const res = await getPlanType({
|
|
|
|
|
page_size: 999,
|
|
|
|
|
page: 1,
|
|
|
|
|
sort_name: 'sort',
|
|
|
|
|
sort_type: 'asc',
|
|
|
|
|
filter: [{
|
|
|
|
|
key: 'year',
|
|
|
|
|
op: 'eq',
|
|
|
|
|
value: this.$moment().format('YYYY'),
|
|
|
|
|
}]
|
|
|
|
|
})
|
|
|
|
|
this.planTypes = buildTree(res.data)
|
|
|
|
|
},
|
|
|
|
|
changeType(e){
|
|
|
|
|
if(!e){
|
|
|
|
|
this.plansSelect.type = ''
|
|
|
|
|
this.plansSelect.typeName = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getSelectedNodes(data, node, ref) {
|
|
|
|
|
const ref_data = ref || 'tree'
|
|
|
|
|
this.$refs[ref_data].setCheckedKeys([])
|
|
|
|
|
this.checkArr = []
|
|
|
|
|
if (data.children && data.children.length > 0) {
|
|
|
|
|
this.$Message.warning('当前节点不可选择')
|
|
|
|
|
this.form.type = ''
|
|
|
|
|
this.select.type = ''
|
|
|
|
|
this.editorForm.type = ''
|
|
|
|
|
this.$refs[ref_data].setCheckedKeys([])
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.$refs[ref_data].setCheckedKeys([]) // 删除所有选中节点
|
|
|
|
|
this.$refs[ref_data].setCheckedNodes([data]) // 选中已选中节点
|
|
|
|
|
this.plansSelect.type = data.id
|
|
|
|
|
this.plansSelect.typeName = data.name
|
|
|
|
|
this.getBudgets()
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 翻页
|
|
|
|
|
pageChange(e) {
|
|
|
|
|
this.pageIndex = e
|
|
|
|
|
@ -685,4 +770,7 @@ export default {
|
|
|
|
|
z-index: 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
::v-deep .planselsct .el-checkbox__input .el-checkbox__inner {
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|