预算类型查询

master
xy 2 years ago
parent 4337d535a3
commit f24067f30d

@ -19,7 +19,7 @@
</tr>
<tr>
<th>{{ type === 1 ? '年中' : '年度' }}绩效目标完成情况</th>
<td colspan="8"></td>
<td colspan="8">{{ type === 1 ? detail.middle_result : detail.end_result }}</td>
</tr>
<!-- <tr>-->
<!-- <th>单位名称</th>-->

@ -880,11 +880,14 @@ export default {
handleTypePick(e) {
if (e.length === 1) {
this.select.type_pid = e[0] || ''
this.select.type = ''
}
else if (e.length === 2) {
this.select.type_pid = e[1] || ''
this.select.type = ''
}
else if (e.length === 3) {
this.select.type_pid = ''
this.select.type = e[e.length - 1] || ''
} else {
this.select.type = ''

@ -10,23 +10,21 @@
@on-change="(e)=>select.year = e"></DatePicker>
</span>
<span style="padding: 0 6px;">
预算类型
</span>
<span style="padding: 0 6px"> 预算类型 </span>
<span>
<el-cascader
:options="types"
:props="{
checkStrictly: false,
<el-cascader
:options="types"
:props="{
checkStrictly: true,
label: 'name',
value: 'id',
}"
:value="select.type"
clearable
size="small"
style="width: 300px"
@change="(e) => (select.type = e[e.length - 1] || '')"
/>
:value="select.type"
clearable
size="small"
style="width: 200px"
@change="handleTypePick"
/>
</span>
<span style="padding: 0 6px;">
@ -101,7 +99,7 @@
listdeptNoAuth
} from "@/api/system/department"
import {
getparameter
getparameter, getparameterTree
} from '@/api/system/dictionary'
import {
moneyFormatter,
@ -235,6 +233,7 @@
page: 1,
year: "",
type: "",
type_pid: "",
department: "",
},
departments: [], //
@ -245,11 +244,43 @@
}
},
methods: {
handleTypePick(e) {
if (e.length === 1) {
this.select.type_pid = e[0] || ''
this.select.type = ''
}
else if (e.length === 2) {
this.select.type_pid = e[1] || ''
this.select.type = ''
}
else if (e.length === 3) {
this.select.type_pid = ''
this.select.type = e[e.length - 1] || ''
} else {
this.select.type = ''
this.select.type_pid = ''
}
console.log(this.select)
},
async getTypes() {
const res = await getparameter({
number: 'money_way'
})
this.types = res.detail
const res = await getparameterTree({
id: 3
});
const dataHandler = (data) => {
data.forEach(i => {
if (i.hasOwnProperty('detail')) {
i.children = i.detail.map(j => {
j.name = j.value
return j;
})
} else {
dataHandler(i['children'])
}
})
return data;
}
this.types = dataHandler(res?.children) || []
}, //
objectSpanMethod({
row,
@ -316,6 +347,7 @@
year: this.select.year,
type: this.select.type,
plan_department_id: this.select.department,
type_pid: this.select.type_pid,
//top_pid: 1,
is_auth: 1,
is_tree: 1

Loading…
Cancel
Save