|
|
|
|
@ -160,7 +160,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:extraFormBottom>
|
|
|
|
|
<Input search enter-button="搜 索" placeholder="搜索预算计划.." @on-search="getBudgets" />
|
|
|
|
|
<Input v-model="budgetSelect.name" search enter-button="搜 索" placeholder="搜索预算计划.." @on-search="getBudgets" />
|
|
|
|
|
<div style="min-width: 300px;">
|
|
|
|
|
<template v-if="form.plan_link.length > 0">
|
|
|
|
|
<template v-for="item in form.plan_link">
|
|
|
|
|
@ -168,8 +168,8 @@
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;"
|
|
|
|
|
ref="planTable" @select="selectPlan">
|
|
|
|
|
<xy-table :list="budgets" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;"
|
|
|
|
|
ref="budgetTable" @select="selectPlan">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column label="使用金额" header-align="center" width="140">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
@ -180,8 +180,9 @@
|
|
|
|
|
</xy-table>
|
|
|
|
|
|
|
|
|
|
<div style="display: flex;justify-content: flex-end;">
|
|
|
|
|
<Page :total="planTotal" show-elevator @on-change="e => {
|
|
|
|
|
p
|
|
|
|
|
<Page :total="budgetTotal" show-elevator @on-change="e => {
|
|
|
|
|
budgetSelect.page = e;
|
|
|
|
|
getBudgets();
|
|
|
|
|
}" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -269,6 +270,15 @@ export default {
|
|
|
|
|
list_rows: 10,
|
|
|
|
|
p: 1
|
|
|
|
|
},
|
|
|
|
|
budgets: [],
|
|
|
|
|
budgetTotal: 0,
|
|
|
|
|
budgetSelect: {
|
|
|
|
|
name: "",
|
|
|
|
|
top_pid: '',
|
|
|
|
|
is_tree: 1,
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10
|
|
|
|
|
},
|
|
|
|
|
planOutTable: [
|
|
|
|
|
{
|
|
|
|
|
width: 46,
|
|
|
|
|
@ -513,6 +523,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
async getDetail() {
|
|
|
|
|
const res = await show({ id: this.id });
|
|
|
|
|
for (var m of res.plan_link) {
|
|
|
|
|
m.label = m.plan ? m.plan.name : "无计划名称";
|
|
|
|
|
}
|
|
|
|
|
this.$integrateData(this.form, res);
|
|
|
|
|
this.fileList = res.files_detail.map(i => {
|
|
|
|
|
return {
|
|
|
|
|
@ -528,7 +541,7 @@ export default {
|
|
|
|
|
submit() {
|
|
|
|
|
this.form.outcome_type = this.outcomeType;
|
|
|
|
|
this.form.files = this.fileList.map(i => i.response?.id);
|
|
|
|
|
this.form.contract_plan_act_links = this.form.plan_link;
|
|
|
|
|
this.form.contract_plan_links = this.form.plan_link;
|
|
|
|
|
if (this.type === "add") {
|
|
|
|
|
if (this.form.hasOwnProperty("id")) {
|
|
|
|
|
delete this.form.id;
|
|
|
|
|
@ -586,12 +599,9 @@ export default {
|
|
|
|
|
this.isShowPlan = true;
|
|
|
|
|
},
|
|
|
|
|
async getBudgets() {
|
|
|
|
|
let res = await getBudget({
|
|
|
|
|
top_pid: 1,
|
|
|
|
|
...this.plansSelect
|
|
|
|
|
})
|
|
|
|
|
this.plans = res.list.data
|
|
|
|
|
this.planTotal = res.list.total
|
|
|
|
|
let res = await getBudget(this.budgetSelect)
|
|
|
|
|
this.budgets = res.list.data
|
|
|
|
|
this.budgetTotal = res.list.total
|
|
|
|
|
|
|
|
|
|
this.toggleSelection(this.form.plan_link.map(item => {
|
|
|
|
|
return item.plan_id
|
|
|
|
|
@ -600,16 +610,16 @@ export default {
|
|
|
|
|
//默认选择计划
|
|
|
|
|
toggleSelection(plans) {
|
|
|
|
|
if (plans) {
|
|
|
|
|
this.plans.filter(plan => {
|
|
|
|
|
this.budgets.filter(plan => {
|
|
|
|
|
if (plans.includes(plan.id)) {
|
|
|
|
|
plan.use_money = this.form.plan_link[plans.indexOf(plan.id)].use_money
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}).map(row => {
|
|
|
|
|
this.$refs.planTable.toggleRowSelection(row)
|
|
|
|
|
}).forEach(row => {
|
|
|
|
|
this.$refs.budgetTable.toggleRowSelection(row)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs.planTable.clearSelection()
|
|
|
|
|
this.$refs.budgetTable.clearSelection()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//获取预算计划
|
|
|
|
|
@ -657,6 +667,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
this.getMoneyWay();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|