|
|
|
@ -1,6 +1,7 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<xy-dialog
|
|
|
|
<xy-dialog
|
|
|
|
|
|
|
|
:width="64"
|
|
|
|
ref="dialog"
|
|
|
|
ref="dialog"
|
|
|
|
:is-show.sync="isShow"
|
|
|
|
:is-show.sync="isShow"
|
|
|
|
type="form"
|
|
|
|
type="form"
|
|
|
|
@ -11,15 +12,45 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template v-slot:plan_id>
|
|
|
|
<template v-slot:plan_id>
|
|
|
|
<div class="xy-table-item">
|
|
|
|
<div class="xy-table-item">
|
|
|
|
<div class="xy-table-item-label">项目 :</div>
|
|
|
|
<div class="xy-table-item-label">隶属项目 :</div>
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
<el-input
|
|
|
|
{{ plan.pid_info_name }}
|
|
|
|
readonly
|
|
|
|
</div>
|
|
|
|
:value="rowName"
|
|
|
|
</div>
|
|
|
|
clearable
|
|
|
|
<div class="xy-table-item">
|
|
|
|
placeholder="请输入项目"
|
|
|
|
<div class="xy-table-item-label">项目名称 :</div>
|
|
|
|
style="width: 300px"
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
></el-input>
|
|
|
|
{{ plan.name }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
|
|
|
<div class="xy-table-item-label">预算类型 :</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
|
|
|
{{ types.find(i => i.id === plan.type) ? types.find(i => i.id === plan.type).value : '' }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
|
|
|
<div class="xy-table-item-label">所属年份 :</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
|
|
|
{{ plan.year }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
|
|
|
<div class="xy-table-item-label">年初预算金额(元) :</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
|
|
|
{{ isNaN(Number(plan.money)) ? '0.00' : Number(plan.money).toFixed(2) }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
|
|
|
<div class="xy-table-item-label">调整后预算金额(元) :</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
|
|
|
{{ isNaN(Number(plan.update_money)) ? '0.00' : Number(plan.update_money).toFixed(2) }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
|
|
|
<div class="xy-table-item-label">描述 :</div>
|
|
|
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
|
|
|
{{ plan.content }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -56,7 +87,9 @@
|
|
|
|
import { paidSave, paidIndex, paidStore, paidDestroy } from "@/api/budget/budget"
|
|
|
|
import { paidSave, paidIndex, paidStore, paidDestroy } from "@/api/budget/budget"
|
|
|
|
import { statistic } from "@/api/dashboard/notice";
|
|
|
|
import { statistic } from "@/api/dashboard/notice";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
props: {},
|
|
|
|
props: {
|
|
|
|
|
|
|
|
types: Array
|
|
|
|
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
rowType: "",
|
|
|
|
rowType: "",
|
|
|
|
@ -67,6 +100,23 @@ export default {
|
|
|
|
type: "",
|
|
|
|
type: "",
|
|
|
|
|
|
|
|
|
|
|
|
itemTable: [
|
|
|
|
itemTable: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
width: 200,
|
|
|
|
|
|
|
|
label: "占比",
|
|
|
|
|
|
|
|
sortable: false,
|
|
|
|
|
|
|
|
customFn: row => {
|
|
|
|
|
|
|
|
row._total = this.formList.reduce((pre, cur) => {
|
|
|
|
|
|
|
|
if (cur.paid_plan_date === row.paid_plan_date) {
|
|
|
|
|
|
|
|
return pre + (isNaN(Number(cur.paid_money)) ? 0 : Number(cur.paid_money))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return pre
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},0)
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<el-progress percentage={(isNaN(Number(row.paid_money)) || row._total === 0) ? 0 : Math.round((Number(row.paid_money) / row._total * 100)*100)/100 }></el-progress>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prop: "paid_money",
|
|
|
|
prop: "paid_money",
|
|
|
|
label: "付款金额",
|
|
|
|
label: "付款金额",
|
|
|
|
@ -150,43 +200,57 @@ export default {
|
|
|
|
sortable: false,
|
|
|
|
sortable: false,
|
|
|
|
customFn: (row, scope) => {
|
|
|
|
customFn: (row, scope) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Poptip
|
|
|
|
<div>
|
|
|
|
confirm={true}
|
|
|
|
<Poptip
|
|
|
|
transfer={true}
|
|
|
|
confirm={true}
|
|
|
|
placement="bottom"
|
|
|
|
transfer={true}
|
|
|
|
title="确认要删除吗"
|
|
|
|
placement="bottom"
|
|
|
|
on={{
|
|
|
|
title="确认要删除吗"
|
|
|
|
["on-ok"]: (_) => {
|
|
|
|
on={{
|
|
|
|
if (!row.id) {
|
|
|
|
["on-ok"]: (_) => {
|
|
|
|
this.formList.splice(scope.$index, 1);
|
|
|
|
if (!row.id) {
|
|
|
|
} else {
|
|
|
|
this.formList.splice(scope.$index, 1);
|
|
|
|
paidDestroy({
|
|
|
|
} else {
|
|
|
|
id: row.id
|
|
|
|
paidDestroy({
|
|
|
|
}).then(res => {
|
|
|
|
id: row.id
|
|
|
|
this.$message({
|
|
|
|
}).then(res => {
|
|
|
|
type: 'success',
|
|
|
|
this.$message({
|
|
|
|
message: '删除成功'
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
message: '删除成功'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.getDetail();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.getDetail();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
},
|
|
|
|
>
|
|
|
|
}}
|
|
|
|
<Button
|
|
|
|
>
|
|
|
|
style="margin-left: 4px;"
|
|
|
|
<Button
|
|
|
|
ghost
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="error"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
删除
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</Poptip>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
<Button
|
|
|
|
style="margin-left: 4px;"
|
|
|
|
style="margin-left: 4px;"
|
|
|
|
ghost
|
|
|
|
ghost
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="error"
|
|
|
|
type="primary"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
删除
|
|
|
|
确认
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</Poptip>
|
|
|
|
*/
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
rowName: "",
|
|
|
|
plan: {},
|
|
|
|
formList: [],
|
|
|
|
formList: [],
|
|
|
|
editId: [],
|
|
|
|
editId: [],
|
|
|
|
form: {
|
|
|
|
form: {
|
|
|
|
@ -338,7 +402,6 @@ export default {
|
|
|
|
this.typeList = arr;
|
|
|
|
this.typeList = arr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//this.split = Array.from({ length: Math.ceil(this.typeList/2) },() => 0.5)
|
|
|
|
//this.split = Array.from({ length: Math.ceil(this.typeList/2) },() => 0.5)
|
|
|
|
console.log(123, this.typeList);
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
@ -368,8 +431,13 @@ export default {
|
|
|
|
::v-deep .el-input__inner {
|
|
|
|
::v-deep .el-input__inner {
|
|
|
|
text-align: left;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
::v-deep .el-progress {
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
}
|
|
|
|
.xy-table-item-label {
|
|
|
|
.xy-table-item-label {
|
|
|
|
width: 150px;
|
|
|
|
width: 200px;
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.select {
|
|
|
|
.select {
|
|
|
|
|