master
xy 3 years ago
parent d213627ac1
commit d96753771c

@ -15,6 +15,36 @@
> >
<template v-slot:btns> </template> <template v-slot:btns> </template>
</xy-table> </xy-table>
<el-popover placement="left" width="200" trigger="click" v-if="plan.year_midst_status == 1">
<div style="margin-bottom: 15px;">确认年中自评确认?</div>
<div style="margin-top:15px; display: flex;justify-content: flex-end;">
<Button type="primary" ghost size="small" @click="() => edit(plan,'year_midst_status')">确认</Button>
</div>
<Button
slot="reference"
type="primary"
class="slot-btns-item"
style="margin: 10px;"
>
年中自评确认
</Button>
</el-popover>
<el-popover placement="left" width="200" trigger="click" v-if="plan.year_end_status == 1">
<div style="margin-bottom: 15px;">确认年末自评确认?</div>
<div style="margin-top:15px; display: flex;justify-content: flex-end;">
<Button type="primary" ghost size="small" @click="() => edit(plan,'year_end_status')">确认</Button>
</div>
<Button
style="margin-right: 5px;"
slot="reference"
type="primary"
class="slot-btns-item"
>
年末自评确认
</Button>
</el-popover>
</el-drawer> </el-drawer>
</div> </div>
</template> </template>
@ -22,8 +52,9 @@
<script> <script>
import { index } from "@/api/budget/planTarget"; import { index } from "@/api/budget/planTarget";
import { save, show, index as evaluateIndex } from "@/api/achievements/evaluate" import { save, show, index as evaluateIndex } from "@/api/achievements/evaluate"
import { resetSelect } from "@/utils"; import { deepCopy, resetSelect } from '@/utils'
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { editorBudget } from '@/api/budget/budget'
export default { export default {
data() { data() {
@ -173,6 +204,7 @@ export default {
page_size: 999, page_size: 999,
plan_id: "", plan_id: "",
}, },
plan: {}
}; };
}, },
methods: { methods: {
@ -188,6 +220,9 @@ export default {
setPlanId(plan_id) { setPlanId(plan_id) {
this.select.plan_id = plan_id; this.select.plan_id = plan_id;
}, },
setPlan (plan) {
this.plan = plan
},
// //
successHandle(response, file, fileList, row) { successHandle(response, file, fileList, row) {
@ -280,6 +315,18 @@ export default {
console.log(this.list); console.log(this.list);
}, },
edit(row, key) {
let rowCopy = deepCopy(row)
rowCopy[key] = 2
editorBudget(rowCopy).then(res => {
this.$message({
type: 'success',
message: '确认成功'
})
this.getList()
})
},
submit() {}, submit() {},
}, },
computed: {}, computed: {},

@ -44,6 +44,12 @@ export default {
}, },
submit() { submit() {
if (this.form.year_midst) {
this.form.year_midst_status = 1
}
if (this.form.year_end) {
this.form.year_end_status = 1
}
editorBudget(this.form).then(res => { editorBudget(this.form).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',

@ -5,6 +5,7 @@
:is-show.sync="isShowDetail" :is-show.sync="isShowDetail"
type="normal" type="normal"
title="详情" title="详情"
class="contract-detail" class="contract-detail"
> >
<template v-slot:default> <template v-slot:default>

File diff suppressed because it is too large Load Diff

@ -1,40 +1,72 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div style="display: flex;justify-content: space-between;align-items: center;"> <div
<span>当前登录人{{user.name}} style="display: flex; justify-content: space-between; align-items: center"
</span> >
<span>当前登录人{{ user.name }} </span>
<el-button type="primary">统计设置</el-button> <el-button type="primary">统计设置</el-button>
</div> </div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="16"> <el-col :span="16">
<el-card class="box-card" style="margin: 20px 0;"> <el-card class="box-card" style="margin: 20px 0">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>预算总体进展情况</span> <span>预算总体进展情况</span>
<DatePicker :value="select.year" placeholder="选择所属年份" placement="bottom" style="width: 130px;float: right;" <DatePicker
type="year" @on-change="changeYear"></DatePicker> :value="select.year"
placeholder="选择所属年份"
placement="bottom"
style="width: 130px; float: right"
type="year"
@on-change="changeYear"
></DatePicker>
</div> </div>
<router-link :to="`/statisticalReport/budgetProgress`"> <router-link :to="`/statisticalReport/budgetProgress`">
<div class="progress-card"> <div class="progress-card">
<div class="progress-card-item"> <div class="progress-card-item">
<div class="progress-card-item__num"> <div class="progress-card-item__num">
{{moneyFormat(statistic.progress ? statistic.progress.money_total_1 : 0)}}</div> {{
moneyFormat(
statistic.progress ? statistic.progress.money_total_1 : 0
)
}}
</div>
<div class="progress-card-item__label">年初预算合计金额</div> <div class="progress-card-item__label">年初预算合计金额</div>
</div> </div>
<div class="progress-card-item"> <div class="progress-card-item">
<div class="progress-card-item__num"> <div class="progress-card-item__num">
{{moneyFormat(statistic.progress ? statistic.progress.money_total_2 : 0)}}</div> {{
moneyFormat(
statistic.progress ? statistic.progress.money_total_2 : 0
)
}}
</div>
<div class="progress-card-item__label">调整后预算合计金额</div> <div class="progress-card-item__label">调整后预算合计金额</div>
</div> </div>
<div class="progress-card-item"> <div class="progress-card-item">
<div class="progress-card-item__num"> <div class="progress-card-item__num">
{{moneyFormat(statistic.progress? statistic.progress.use_money_total : 0)}}</div> {{
moneyFormat(
statistic.progress
? statistic.progress.use_money_total
: 0
)
}}
</div>
<div class="progress-card-item__label">已支付金额</div> <div class="progress-card-item__label">已支付金额</div>
</div> </div>
<div class="progress-card-item"> <div class="progress-card-item">
<div class="progress-card-item__num"> <div class="progress-card-item__num">
{{toper(statistic.progress ? statistic.progress.money_total_1 : 0,statistic.progress ? statistic.progress.money_total_2 : 0,statistic.progress? statistic.progress.use_money_total : 0)}}% {{
toper(
statistic.progress ? statistic.progress.money_total_1 : 0,
statistic.progress ? statistic.progress.money_total_2 : 0,
statistic.progress
? statistic.progress.use_money_total
: 0
)
}}%
</div> </div>
<div class="progress-card-item__label">进展率</div> <div class="progress-card-item__label">进展率</div>
</div> </div>
@ -43,7 +75,12 @@
</el-card> </el-card>
<div ref="lxHeader"> <div ref="lxHeader">
<LxHeader icon="iconfont/icon--kucunguanli" text="待办事项" :custom="true" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <LxHeader
icon="iconfont/icon--kucunguanli"
text="待办事项"
:custom="true"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
<div slot="content" /> <div slot="content" />
<slot> <slot>
<div></div> <div></div>
@ -51,58 +88,113 @@
</LxHeader> </LxHeader>
</div> </div>
<div class="table-tree"> <div class="table-tree">
<el-table :data="list" border class="v-table" style="width: 100%;margin-bottom: 20px;"> <el-table
:data="list"
border
class="v-table"
style="width: 100%; margin-bottom: 20px"
>
<el-table-column type="index" label="序号" align="center" /> <el-table-column type="index" label="序号" align="center" />
<el-table-column prop="type" width="100" label="类型" align="center" :formatter="typeFormatter" /> <el-table-column
prop="type"
width="100"
label="类型"
align="center"
:formatter="typeFormatter"
/>
<el-table-column prop="content" label="内容" align="left" /> <el-table-column prop="content" label="内容" align="left" />
<el-table-column prop="created_at" width="200" label="下发时间" align="center" :formatter="timeFormatter" /> <el-table-column
<el-table-column width="100" label="状态" align="center" prop="read_count"> prop="created_at"
<template slot-scope="{row, $index}"> width="200"
<el-link v-if="row.read_count" type="success" :underline="false"></el-link> label="下发时间"
<Button v-else type="error" size="small" style="margin-left: 10px;" ghost align="center"
@click="readIt(row, $index)">未读</Button> :formatter="timeFormatter"
/>
<el-table-column
width="100"
label="状态"
align="center"
prop="read_count"
>
<template slot-scope="{ row, $index }">
<el-link v-if="row.read_count" type="success" :underline="false"
>已读</el-link
>
<Button
v-else
type="error"
size="small"
style="margin-left: 10px"
ghost
@click="readIt(row, $index)"
>未读</Button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="90" header-align="center" label="操作" align="center"> <el-table-column
<template slot-scope="{row, $index}"> width="90"
<Button type="primary" size="small" style="margin-left: 10px;" ghost @click="toContract(row)"></Button> header-align="center"
label="操作"
align="center"
>
<template slot-scope="{ row, $index }">
<Button
type="primary"
size="small"
style="margin-left: 10px"
ghost
@click="toContract(row)"
>查看</Button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="display: flex;justify-content: flex-end;"> <div style="display: flex; justify-content: flex-end">
<Page :total="total" show-elevator @on-change="pageChange" /> <Page :total="total" show-elevator @on-change="pageChange" />
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card class="box-card" style="margin: 20px 0;"> <el-card class="box-card" style="margin: 20px 0">
<div class="text item"> <div class="text item">
<pie-chart :chartData="rptChartData"></pie-chart> <pie-chart :chartData="rptChartData"></pie-chart>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<div class="demo-split"> <div class="demo-split">
<Split v-model="split" style="height: 440px;"> <Split v-model="split" style="height: 440px">
<template #left> <template #left>
<div class="demo-split-pane" style="padding-right: 5px;"> <div class="demo-split-pane" style="padding-right: 5px">
<div ref="lxHeader" v-if="statistic.departmentList"> <div ref="lxHeader" v-if="statistic.departmentList">
<LxHeader icon="iconfont/icon--kucunguanli" text="科室进展情况" :custom="true" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <LxHeader
icon="iconfont/icon--kucunguanli"
text="科室进展情况"
:custom="true"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
<div slot="content" /> <div slot="content" />
<slot> <slot>
<div style="width: 100%"> <div style="width: 100%">
<xy-table :height="380" :list="statistic.departmentList" :table-item="departmentTable"> <xy-table
:height="380"
:list="statistic.departmentList"
:table-item="departmentTable"
>
<template v-slot:btns> <template v-slot:btns>
<el-table-column :width="80" fixed="right" label="操作" header-align="center" align="center"> <el-table-column
:width="80"
fixed="right"
label="操作"
header-align="center"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<router-link <router-link
:to="`/statisticalReport/budgetProgress?departmentId=${scope.row.plan_department_id}`">查看 :to="`/statisticalReport/budgetProgress?departmentId=${scope.row.plan_department_id}`"
>查看
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
@ -115,17 +207,34 @@
</div> </div>
</template> </template>
<template #right> <template #right>
<div class="demo-split-pane" style="padding-left: 10px;"> <div class="demo-split-pane" style="padding-left: 10px">
<div ref="lxHeader" v-if="statistic.typeList"> <div ref="lxHeader" v-if="statistic.typeList">
<LxHeader icon="iconfont/icon--kucunguanli" text="预算类型进展情况" :custom="true" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <LxHeader
icon="iconfont/icon--kucunguanli"
text="预算类型进展情况"
:custom="true"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
<div slot="content" /> <div slot="content" />
<slot> <slot>
<div style="width: 100%"> <div style="width: 100%">
<xy-table :height="380" :list="statistic.typeList" :table-item="typeTable"> <xy-table
:height="380"
:list="statistic.typeList"
:table-item="typeTable"
>
<template v-slot:btns> <template v-slot:btns>
<el-table-column :width="80" fixed="right" label="操作" header-align="center" align="center"> <el-table-column
:width="80"
fixed="right"
label="操作"
header-align="center"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="`/statisticalReport/budgetProgress?typeId=${scope.row.type}`">查看 <router-link
:to="`/statisticalReport/budgetProgress?typeId=${scope.row.type}`"
>查看
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
@ -138,8 +247,6 @@
</div> </div>
</template> </template>
</Split> </Split>
</div> </div>
<detailContract ref="detailContract"></detailContract> <detailContract ref="detailContract"></detailContract>
@ -147,36 +254,22 @@
</template> </template>
<script> <script>
import detailContract from "@/views/contract/components/detailContract" import detailContract from "@/views/contract/components/detailContract";
import LxHeader from '@/components/LxHeader/index.vue' import LxHeader from "@/components/LxHeader/index.vue";
import Pagination from '@/components/Pagination' import Pagination from "@/components/Pagination";
import PieChart from "./components/PieChart.vue" import PieChart from "./components/PieChart.vue";
import { import { adminDepartmentList } from "../../api/system/department.js";
adminDepartmentList import { adminUserList, getInfo } from "../../api/user.js";
} from '../../api/system/department.js' import { getNotice, readNotice, statistic } from "@/api/dashboard/notice";
import { import { parseTime, moneyFormatter } from "@/utils/index";
adminUserList, import { Message } from "element-ui";
getInfo export default {
} from '../../api/user.js' name: "Manage",
import {
getNotice,
readNotice,
statistic
} from "@/api/dashboard/notice"
import {
parseTime,
moneyFormatter
} from "@/utils/index"
import {
Message
} from "element-ui";
export default {
name: 'Manage',
components: { components: {
LxHeader, LxHeader,
Pagination, Pagination,
detailContract, detailContract,
PieChart PieChart,
}, },
data() { data() {
return { return {
@ -184,9 +277,9 @@
split: 0.5, split: 0.5,
rptChartData: [], rptChartData: [],
select: { select: {
year: '' year: "",
}, },
statistic: '', statistic: "",
department_id: [], department_id: [],
userIds: [], userIds: [],
list: [], list: [],
@ -203,23 +296,24 @@
dialogFormVisible: false, dialogFormVisible: false,
departmentTree: [], departmentTree: [],
userList: [], userList: [],
formLabelWidth: '200px', formLabelWidth: "200px",
user: {}, user: {},
departmentProgress: [], departmentProgress: [],
departmentTable: [{ departmentTable: [
label: '科室', {
label: "科室",
minWidth: 180, minWidth: 180,
prop: 'plan_department.name', prop: "plan_department.name",
sortable: false, sortable: false,
align:"left", align: "left",
fixed: "left" fixed: "left",
}, },
{ {
label: '进展情况', label: "进展情况",
sortable: false, sortable: false,
minWidth: 220, minWidth: 220,
align: 'left', align: "left",
fixed: "right", fixed: "right",
customFn: (row) => { customFn: (row) => {
let m2 = row?.money_total_2; let m2 = row?.money_total_2;
@ -232,56 +326,57 @@
} else if (m1 != 0) { } else if (m1 != 0) {
per = ((m3 / m1) * 100).toFixed(2); per = ((m3 / m1) * 100).toFixed(2);
} }
return ( < div > return (
<el-progress percentage = { <div>
Number(per) <el-progress percentage={Number(per)}> </el-progress>{" "}
}> </el-progress> </div > </div>
) );
} },
}, },
{ {
label: '年初预算合计金额(元)', label: "年初预算合计金额(元)",
width: 260, width: 260,
align: 'right', align: "right",
sortable: false, sortable: false,
prop: 'money_total_1', prop: "money_total_1",
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return moneyFormatter(value) return moneyFormatter(value);
} },
}, },
{ {
label: '调整后预算合计金额(元)', label: "调整后预算合计金额(元)",
width: 260, width: 260,
align: 'right', align: "right",
sortable: false, sortable: false,
prop: 'money_total_2', prop: "money_total_2",
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return moneyFormatter(value) return moneyFormatter(value);
} },
}, },
{ {
label: '已使用(元)', label: "已使用(元)",
width: 120, width: 120,
align: 'right', align: "right",
sortable: false, sortable: false,
prop: 'use_money_total', prop: "use_money_total",
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return moneyFormatter(value) return moneyFormatter(value);
} },
} },
], ],
typeTable: [{ typeTable: [
label: '预算类别', {
label: "预算类别",
width: 100, width: 100,
prop: 'type_text', prop: "type_text",
sortable: false, sortable: false,
fixed: "left", fixed: "left",
}, },
{ {
label: '进展情况', label: "进展情况",
sortable: false, sortable: false,
minWidth: 220, minWidth: 220,
align: 'left', align: "left",
fixed: "right", fixed: "right",
customFn: (row) => { customFn: (row) => {
let m2 = row.money_total_2; let m2 = row.money_total_2;
@ -294,215 +389,228 @@
} else if (m1 != 0) { } else if (m1 != 0) {
per = ((m3 / m1) * 100).toFixed(2); per = ((m3 / m1) * 100).toFixed(2);
} }
return ( < div > return (
<el-progress percentage = { <div>
Number(per) <el-progress percentage={Number(per)}> </el-progress>{" "}
}> </el-progress> </div > </div>
) );
} },
}, },
{ {
label: '年初预算合计金额(元)', label: "年初预算合计金额(元)",
width: 260, width: 260,
align: 'right', align: "right",
sortable: false, sortable: false,
prop: 'money_total_1', prop: "money_total_1",
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return moneyFormatter(value) return moneyFormatter(value);
} },
}, },
{ {
label: '调整后预算合计金额(元)', label: "调整后预算合计金额(元)",
width: 260, width: 260,
align: 'right', align: "right",
sortable: false, sortable: false,
prop: 'money_total_2', prop: "money_total_2",
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return moneyFormatter(value) return moneyFormatter(value);
} },
}, },
{ {
label: '已使用(元)', label: "已使用(元)",
width: 140, width: 140,
align: 'right', align: "right",
sortable: false, sortable: false,
prop: 'use_money_total', prop: "use_money_total",
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return moneyFormatter(value) return moneyFormatter(value);
}
}, },
] },
} ],
};
}, },
created() { created() {
this.select.year = this.$moment().format('YYYY'); this.select.year = this.$moment().format("YYYY");
this.getNotices(); this.getNotices();
this.getStatistic(); this.getStatistic();
getInfo().then(response => { getInfo()
console.log(response) .then((response) => {
this.user = response console.log(response);
}).catch(error => {}) this.user = response;
})
.catch((error) => {});
}, },
methods: { methods: {
changeYear(e) { changeYear(e) {
this.select.year = e; this.select.year = e;
this.getStatistic() this.getStatistic();
}, },
async getStatistic() { async getStatistic() {
const res = await statistic(this.select) const res = await statistic(this.select);
console.log(res) console.log(res);
this.statistic = res; this.statistic = res;
this.rptChartData = { this.rptChartData = {
xArr: ["预算合计金额","预算已执行金额"], xArr: ["预算合计金额", "预算已执行金额"],
radiusArr: '50%', radiusArr: "50%",
yArr: [{ value: res.progress.money_total_1, name: '预算合计金额', yArr: [
label:{ {
show:false//labellabel value: res.progress.money_total_1,
}, name: "预算合计金额",
emphasis:{ label: {
label:{ show: false, //labellabel
show:false//labellabel },
} emphasis: {
} }, label: {
{ value: res.progress.use_money_total, name: '预算已执行金额' }] show: false, //labellabel
} },
},
},
{ value: res.progress.use_money_total, name: "预算已执行金额" },
],
};
}, },
toContract(row) { toContract(row) {
this.$refs['detailContract'].getDetail(row.contract_id) this.$refs["detailContract"].getDetail(row.contract_id);
this.$refs['detailContract'].isShowDetail = true this.$refs["detailContract"].isShowDetail = true;
}, },
pageChange(e) { pageChange(e) {
this.pageIndex = e this.pageIndex = e;
this.getNotices() this.getNotices();
}, },
timeFormatter(cell, data, value) { timeFormatter(cell, data, value) {
return parseTime(new Date(value)) return parseTime(new Date(value));
}, },
typeFormatter(cell, data, value) { typeFormatter(cell, data, value) {
return value === 1 ? '合同流程' : '付款计划' return value === 1 ? "合同流程" : "付款计划";
}, },
toper(m1, m2, m3) { toper(m1, m2, m3) {
if (m2 != 0) { if (m2 != 0) {
return ((m3 / m2) * 100).toFixed(2); return ((m3 / m2) * 100).toFixed(2);
} else if (m1 != 0) { } else if (m1 != 0) {
return ((m3 / m1) * 100).toFixed(2); return ((m3 / m1) * 100).toFixed(2);
} else } else return 0;
return 0
}, },
async getNotices() { async getNotices() {
const res = await getNotice({ const res = await getNotice({
page_size: 10, page_size: 10,
page: this.pageIndex page: this.pageIndex,
}) });
this.list = res.data this.list = res.data;
this.total = res.total this.total = res.total;
}, },
filterChildren(data) { filterChildren(data) {
data.forEach(i => { data.forEach((i) => {
if (i.children && i.children.length > 0) { if (i.children && i.children.length > 0) {
this.filterChildren(i.children) this.filterChildren(i.children);
} else { } else {
delete i.children delete i.children;
} }
}) });
}, },
getList() { getList() {
index(this.listQuery).then(response => { index(this.listQuery)
this.list = response.data .then((response) => {
this.total = response.total this.list = response.data;
}).catch(error => {}) this.total = response.total;
})
.catch((error) => {});
}, },
handleFilter() { handleFilter() {
this.listQuery.page = 1 this.listQuery.page = 1;
this.getList() this.getList();
}, },
readIt(row) { readIt(row) {
readNotice({ readNotice({
id: row.id id: row.id,
}).then(res => { }).then((res) => {
Message({ Message({
type: 'success', type: "success",
message: '已读' message: "已读",
}) });
this.getNotices() this.getNotices();
}) });
// show({id: row.id}).then(r => { this.form = r }).catch(error => {}) // show({id: row.id}).then(r => { this.form = r }).catch(error => {})
// this.list[index].is_read = 1 // this.list[index].is_read = 1
}, },
save() { save() {
this.$refs['dataForm'].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (valid) { if (valid) {
const tempData = Object.assign({}, this.form) const tempData = Object.assign({}, this.form);
tempData.admin_id_list = tempData.ids.map(i => { tempData.admin_id_list = tempData.ids.map((i) => {
return { return {
admin_id: i admin_id: i,
} };
}) });
if (tempData.id) { if (tempData.id) {
save(tempData).then(r => { save(tempData)
this.saved() .then((r) => {
}).catch(error => {}) this.saved();
})
.catch((error) => {});
} else { } else {
store(tempData).then(r => { store(tempData)
this.saved() .then((r) => {
}).catch(error => {}) this.saved();
})
.catch((error) => {});
} }
} }
}) });
}, },
saved() { saved() {
this.handleFilter() this.handleFilter();
this.dialogFormVisible = false this.dialogFormVisible = false;
this.$message.success('保存成功') this.$message.success("保存成功");
}, },
handleDelete(row, index) { handleDelete(row, index) {
this.$confirm('确定要删除吗?', '提示', { this.$confirm("确定要删除吗?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
destroy({ destroy({
id: row.id id: row.id,
}).then(response => { })
this.$message.success('删除成功') .then((response) => {
this.getList() this.$message.success("删除成功");
}).catch(error => {}) this.getList();
}).catch(() => {}); })
.catch((error) => {});
})
.catch(() => {});
}, },
}, },
computed: { computed: {
moneyFormat() { moneyFormat() {
return function(price) { return function (price) {
return moneyFormatter(price) return moneyFormatter(price);
} };
} },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .el-dialog__body { ::v-deep .el-dialog__body {
padding: 8px 20px; padding: 8px 20px;
} }
::v-deep .el-col-5 { ::v-deep .el-col-5 {
width: 20%; width: 20%;
} }
::v-deep .el-card__body { ::v-deep .el-card__body {
padding: 4px 10px !important; padding: 4px 10px !important;
} }
.progress-card { .progress-card {
display: flex; display: flex;
&-item { &-item {
@ -520,18 +628,18 @@
padding: 6px 0; padding: 6px 0;
} }
} }
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.ivu-btn { .ivu-btn {
margin-right: 10px; margin-right: 10px;
} }
.table-tree { .table-tree {
margin-top: 10px; margin-top: 10px;
} }
.v-text { .v-text {
padding: 8px 0; padding: 8px 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
margin-bottom: 20px; margin-bottom: 20px;
@ -539,13 +647,13 @@
.title { .title {
color: #338de3; color: #338de3;
} }
} }
.dataGroup { .dataGroup {
padding: 10px 0; padding: 10px 0;
} }
.grid-content { .grid-content {
border-radius: 5px; border-radius: 5px;
text-align: center; text-align: center;
background: #ffffff; background: #ffffff;
@ -559,30 +667,30 @@
font-weight: 700; font-weight: 700;
font-size: 16px; font-size: 16px;
} }
} }
.bg-org { .bg-org {
border: 2px solid #EF6C24; border: 2px solid #ef6c24;
color: #EF6C24; color: #ef6c24;
} }
.bg-blue { .bg-blue {
border: 2px solid #0800FF; border: 2px solid #0800ff;
color: #0800FF; color: #0800ff;
} }
.bg-green { .bg-green {
border: 2px solid #0F9700; border: 2px solid #0f9700;
color: #0F9700; color: #0f9700;
} }
.bg-black { .bg-black {
border: 2px solid #333; border: 2px solid #333;
color: #333; color: #333;
} }
.bg-pink { .bg-pink {
border: 2px solid #FF0000; border: 2px solid #ff0000;
color: #FF0000; color: #ff0000;
} }
</style> </style>

@ -46,6 +46,7 @@
@click=" @click="
() => { () => {
$refs['addPlanEvaluate'].type = 1; $refs['addPlanEvaluate'].type = 1;
$refs['addPlanEvaluate'].setPlan(scope.row);
$refs['addPlanEvaluate'].setPlanId(scope.row.id); $refs['addPlanEvaluate'].setPlanId(scope.row.id);
$refs['addPlanEvaluate'].show(); $refs['addPlanEvaluate'].show();
} }
@ -60,6 +61,7 @@
@click=" @click="
() => { () => {
$refs['addPlanEvaluate'].type = 2; $refs['addPlanEvaluate'].type = 2;
$refs['addPlanEvaluate'].setPlan(scope.row);
$refs['addPlanEvaluate'].setPlanId(scope.row.id); $refs['addPlanEvaluate'].setPlanId(scope.row.id);
$refs['addPlanEvaluate'].show(); $refs['addPlanEvaluate'].show();
} }
@ -67,47 +69,6 @@
> >
年末目标 年末目标
</Button> </Button>
<el-popover placement="left" width="200" trigger="click">
<div style="margin-bottom: 15px;">确认年中自评确认?</div>
<div style="margin-top:15px; display: flex;justify-content: flex-end;">
<Button @click="" type="primary" ghost size="small">确认</Button>
</div>
<Button
slot="reference"
size="small"
type="primary"
class="slot-btns-item"
style="margin-right: 5px;"
@click="
() => {
}
"
>
年中确认
</Button>
</el-popover>
<el-popover placement="left" width="200" trigger="click">
<div style="margin-bottom: 15px;">确认年末自评确认?</div>
<div style="margin-top:15px; display: flex;justify-content: flex-end;">
<Button @click="" type="primary" ghost size="small">确认</Button>
</div>
<Button
style="margin-right: 5px;"
slot="reference"
size="small"
type="primary"
class="slot-btns-item"
@click="
() => {
}
"
>
年末确认
</Button>
</el-popover>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@ -128,7 +89,7 @@
}" /> }" />
</div> </div>
<addEvaluate ref="addEvaluate" @refresh="getList"></addEvaluate>
<addPlanEvaluate ref="addPlanEvaluate"></addPlanEvaluate> <addPlanEvaluate ref="addPlanEvaluate"></addPlanEvaluate>
</div> </div>
</template> </template>
@ -138,12 +99,11 @@ import { getBudget, editorBudget } from "@/api/budget/budget";
import { index, destroy } from "@/api/achievements/evaluate"; import { index, destroy } from "@/api/achievements/evaluate";
import { deepCopy, moneyFormatter, parseTime } from '@/utils' import { deepCopy, moneyFormatter, parseTime } from '@/utils'
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
import addEvaluate from '@/views/achievements/components/addEvaluate.vue'
import addPlanEvaluate from '@/views/achievements/components/addPlanEvaluate.vue' import addPlanEvaluate from '@/views/achievements/components/addPlanEvaluate.vue'
export default { export default {
components: { components: {
addPlanEvaluate, addEvaluate addPlanEvaluate
}, },
data() { data() {
return { return {
@ -175,16 +135,26 @@ export default {
}, },
{ {
label: '年中自评', label: '年中自评',
prop: 'year_midst', prop: 'year_midst_status',
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return value ? "" : "待完成" let map = new Map([
[0,'待完成'],
[1,'已完成'],
[2,'已确认']
])
return map.get(value)
} }
}, },
{ {
label: '年末自评', label: '年末自评',
prop: 'year_end', prop: 'year_end_status',
formatter: (cell, data, value) => { formatter: (cell, data, value) => {
return value ? "" : "待完成" let map = new Map([
[0,'待完成'],
[1,'已完成'],
[2,'已确认']
])
return map.get(value)
} }
}, },
{ {
@ -246,11 +216,12 @@ export default {
async getList() { async getList() {
const res = await getBudget(this.select); const res = await getBudget(this.select);
this.list = res.list.data; this.list = res.list.data;
this.total = res.list.total
}, },
edit(row, key) { edit(row, key) {
let rowCopy = deepCopy(row) let rowCopy = deepCopy(row)
row[key] = 2 rowCopy[key] = 2
editorBudget(rowCopy).then(res => { editorBudget(rowCopy).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',

@ -235,7 +235,7 @@ export default {
page: 1, page: 1,
page_size: 10, page_size: 10,
start_created_at: "", start_created_at: "",
end_created_at: "", end_created_at: undefined,
start_plan_price: "", start_plan_price: "",
end_plan_price: "", end_plan_price: "",
department_id: "", department_id: "",
@ -277,21 +277,39 @@ export default {
}, },
{ {
prop: "money", prop: "money",
label: "报销金额(元)", label: this.$route.path.split("_")[1] == 2 ? "报销金额(元)" : "支出金额(元)",
width: 140, width: 140,
align: "right", align: "right",
}, },
{ {
prop: "use_money_total", prop: "use_money_total",
label: "实际报销金额(元)", label: this.$route.path.split("_")[1] == 2 ? "实际报销金额(元)" : "实际支出金额(元)",
width: 140, width: 140,
align: "right", align: "right",
customFn:row => {
let total = 0
row.plans?.forEach(i => {
total += Number(i.money) || 0
})
return (
<span>{ total }</span>
)
}
}, },
{ {
prop: "has_money_total", prop: "has_money_total",
label: "已付金额", label: "已付金额",
width: 140, width: 140,
align: "right", align: "right",
customFn:row => {
let total = 0
row.plans?.forEach(i => {
total += Number(i.end_money) || 0
})
return (
<span>{ total }</span>
)
}
}, },
{ {
prop: "department.name", prop: "department.name",

Loading…
Cancel
Save