|
|
|
|
@ -161,6 +161,21 @@
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<span style="padding: 0 6px; word-break: keep-all">预算计划</span>
|
|
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
<Input
|
|
|
|
|
v-model="select.plan_name"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请选择预算计划"
|
|
|
|
|
@on-focus="isShowPlanForSearch = true"
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
@on-clear="select.plan_id = '',select.plan_name = '请选择预算计划'"
|
|
|
|
|
/>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
type="primary"
|
|
|
|
|
@ -286,6 +301,63 @@
|
|
|
|
|
|
|
|
|
|
<detailContract ref="detailContract"></detailContract>
|
|
|
|
|
<paymentRegistration ref="paymentRegistration" @refresh="getList"></paymentRegistration>
|
|
|
|
|
|
|
|
|
|
<!-- 搜索使用 预算计划 -->
|
|
|
|
|
<xy-dialog
|
|
|
|
|
:is-show.sync="isShowPlanForSearch"
|
|
|
|
|
title="预算计划"
|
|
|
|
|
:width="720"
|
|
|
|
|
@on-ok="planSelectForSearch"
|
|
|
|
|
>
|
|
|
|
|
<template>
|
|
|
|
|
<Input
|
|
|
|
|
v-model="planSearch.name"
|
|
|
|
|
search
|
|
|
|
|
enter-button="搜 索"
|
|
|
|
|
placeholder="搜索预算计划.."
|
|
|
|
|
@on-search="planSearch.page = 1,getBudgets()"
|
|
|
|
|
/>
|
|
|
|
|
<div
|
|
|
|
|
style="
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
已选择:<span style="margin-right: 10px">{{
|
|
|
|
|
select.plan_name
|
|
|
|
|
}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<el-link type="success" @click="select.plan_id = '',select.plan_name = '请选择预算计划'"
|
|
|
|
|
>清空选择</el-link
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<xy-table
|
|
|
|
|
:list="plans"
|
|
|
|
|
highlight-current-row
|
|
|
|
|
@rowClick="selectPlanForSearch"
|
|
|
|
|
:show-index="false"
|
|
|
|
|
:table-item="planTableSearch"
|
|
|
|
|
:height="310"
|
|
|
|
|
style="margin-top: 10px"
|
|
|
|
|
:tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }"
|
|
|
|
|
ref="singlePlanTable"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:btns> </template>
|
|
|
|
|
</xy-table>
|
|
|
|
|
|
|
|
|
|
<div style="display: flex; justify-content: flex-end">
|
|
|
|
|
<Page :total="planTotal" show-elevator @on-change="e => { planSearch.page = e;getBudgets() }" />
|
|
|
|
|
</div>
|
|
|
|
|
<el-tag type="warning">点击行进行选择</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:footerContent>
|
|
|
|
|
<Button type="primary" @click="isShowPlanForSearch = false,getList()">确定</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -297,15 +369,60 @@ import { listdeptNoAuth } from "@/api/system/department";
|
|
|
|
|
import addExpenseAccount from "@/views/inOut/component/addExpenseAccount.vue";
|
|
|
|
|
import detailContract from '@/views/contract/components/detailContract.vue';
|
|
|
|
|
import paymentRegistration from '@/views/contract/components/paymentRegistration.vue'
|
|
|
|
|
import { getBudget } from '@/api/budget/budget'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addExpenseAccount,detailContract,paymentRegistration
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isShowPlanForSearch: false,
|
|
|
|
|
planSearch: {
|
|
|
|
|
page_size: 10,
|
|
|
|
|
page: 1,
|
|
|
|
|
top_pid: "1",
|
|
|
|
|
is_tree: "0",
|
|
|
|
|
name: "",
|
|
|
|
|
plan_department_id: "",
|
|
|
|
|
year: ""
|
|
|
|
|
},
|
|
|
|
|
planTableSearch: [
|
|
|
|
|
{
|
|
|
|
|
label: "分类",
|
|
|
|
|
prop: "type_detail.value",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "年份",
|
|
|
|
|
prop: "year",
|
|
|
|
|
align: "center",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "名称",
|
|
|
|
|
prop: "name",
|
|
|
|
|
align: "left",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
label: "计划金额",
|
|
|
|
|
prop: "money",
|
|
|
|
|
align: "right",
|
|
|
|
|
width: 120,
|
|
|
|
|
customFn: (row) => {
|
|
|
|
|
let m1 = row.money;
|
|
|
|
|
let m2 = row.update_money;
|
|
|
|
|
|
|
|
|
|
return m2 == 0 ? m1 : m2;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
plans: [],
|
|
|
|
|
planTotal: 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
otherType: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
select: {
|
|
|
|
|
plan_id: "",
|
|
|
|
|
keyword: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
@ -432,6 +549,42 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//选择计划 搜索
|
|
|
|
|
selectPlanForSearch(sel) {
|
|
|
|
|
if (sel) {
|
|
|
|
|
this.select.plan_id = sel.id;
|
|
|
|
|
this.select.plan_name = sel.name;
|
|
|
|
|
} else {
|
|
|
|
|
this.select.plan_id = "";
|
|
|
|
|
this.select.plan_name = "";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//获取预算计划
|
|
|
|
|
async getBudgets() {
|
|
|
|
|
let res = await getBudget(this.planSearch);
|
|
|
|
|
this.plans = res.list.data;
|
|
|
|
|
|
|
|
|
|
this.planTotal = res.list.total || 0;
|
|
|
|
|
|
|
|
|
|
this.toggleSelection(
|
|
|
|
|
this.plan.map((item) => {
|
|
|
|
|
return item.value.plan_id;
|
|
|
|
|
}),
|
|
|
|
|
1
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
//确认计划选择搜索
|
|
|
|
|
planSelectForSearch() {
|
|
|
|
|
if (!this.select.plan_id) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "warning",
|
|
|
|
|
message: "选择计划不能为空",
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.isShowPlanForSearch = false;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
init() {
|
|
|
|
|
for (let key in this.select) {
|
|
|
|
|
if (this.select[key] instanceof Array) {
|
|
|
|
|
@ -488,6 +641,7 @@ export default {
|
|
|
|
|
this.getDepartment();
|
|
|
|
|
this.getOtherType();
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|