master
xy 2 years ago
parent d213627ac1
commit d96753771c

@ -15,6 +15,36 @@
>
<template v-slot:btns> </template>
</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>
</div>
</template>
@ -22,8 +52,9 @@
<script>
import { index } from "@/api/budget/planTarget";
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 { editorBudget } from '@/api/budget/budget'
export default {
data() {
@ -173,6 +204,7 @@ export default {
page_size: 999,
plan_id: "",
},
plan: {}
};
},
methods: {
@ -188,6 +220,9 @@ export default {
setPlanId(plan_id) {
this.select.plan_id = plan_id;
},
setPlan (plan) {
this.plan = plan
},
//
successHandle(response, file, fileList, row) {
@ -280,6 +315,18 @@ export default {
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() {},
},
computed: {},

@ -44,6 +44,12 @@ export default {
},
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 => {
this.$message({
type: 'success',

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -46,6 +46,7 @@
@click="
() => {
$refs['addPlanEvaluate'].type = 1;
$refs['addPlanEvaluate'].setPlan(scope.row);
$refs['addPlanEvaluate'].setPlanId(scope.row.id);
$refs['addPlanEvaluate'].show();
}
@ -60,6 +61,7 @@
@click="
() => {
$refs['addPlanEvaluate'].type = 2;
$refs['addPlanEvaluate'].setPlan(scope.row);
$refs['addPlanEvaluate'].setPlanId(scope.row.id);
$refs['addPlanEvaluate'].show();
}
@ -67,47 +69,6 @@
>
年末目标
</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>
</el-table-column>
</template>
@ -128,7 +89,7 @@
}" />
</div>
<addEvaluate ref="addEvaluate" @refresh="getList"></addEvaluate>
<addPlanEvaluate ref="addPlanEvaluate"></addPlanEvaluate>
</div>
</template>
@ -138,12 +99,11 @@ import { getBudget, editorBudget } from "@/api/budget/budget";
import { index, destroy } from "@/api/achievements/evaluate";
import { deepCopy, moneyFormatter, parseTime } from '@/utils'
import { getparameter } from "@/api/system/dictionary";
import addEvaluate from '@/views/achievements/components/addEvaluate.vue'
import addPlanEvaluate from '@/views/achievements/components/addPlanEvaluate.vue'
export default {
components: {
addPlanEvaluate, addEvaluate
addPlanEvaluate
},
data() {
return {
@ -175,16 +135,26 @@ export default {
},
{
label: '年中自评',
prop: 'year_midst',
prop: 'year_midst_status',
formatter: (cell, data, value) => {
return value ? "" : "待完成"
let map = new Map([
[0,'待完成'],
[1,'已完成'],
[2,'已确认']
])
return map.get(value)
}
},
{
label: '年末自评',
prop: 'year_end',
prop: 'year_end_status',
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() {
const res = await getBudget(this.select);
this.list = res.list.data;
this.total = res.list.total
},
edit(row, key) {
let rowCopy = deepCopy(row)
row[key] = 2
rowCopy[key] = 2
editorBudget(rowCopy).then(res => {
this.$message({
type: 'success',

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

Loading…
Cancel
Save