预算类型查询

master
xy 2 years ago
parent 4337d535a3
commit f24067f30d

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

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

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

Loading…
Cancel
Save