master
xy 2 years ago
parent ee0858fde3
commit 4337d535a3

@ -82,9 +82,14 @@ export default {
<el-form <el-form
ref={`expand-form${$index}`} ref={`expand-form${$index}`}
props={{ model: row._form }} props={{ model: row._form }}
rules={{
socre: [{ required: true, message: "请输入自评值", trigger: "blur" }],
evaluation_main: [{ required: true, message: "请输入评价要点及评分规则", trigger: "blur" }],
result: [{ required: true, message: "请输入实际完成值", trigger: "blur" }],
}}
label-width="120px" label-width="120px"
> >
<el-form-item label="评价要点及评分规则"> <el-form-item label="评价要点及评分规则" prop="evaluation_main" required={true}>
<el-input <el-input
type="textarea" type="textarea"
autosize={{ autosize={{
@ -96,7 +101,7 @@ export default {
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="实际完成值" required={true}> <el-form-item label="实际完成值" prop="result" required={true}>
<el-input <el-input
type="textarea" type="textarea"
autosize={{ autosize={{
@ -108,7 +113,7 @@ export default {
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="得分" required={true}> <el-form-item label="得分" prop="socre" required={true}>
<el-input-number <el-input-number
precision={2} precision={2}
controls={false} controls={false}
@ -132,7 +137,7 @@ export default {
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文件"> <el-form-item label="文件" required={true}>
<el-upload <el-upload
style="width: 300px" style="width: 300px"
ref={`expand-form-upload${$index}`} ref={`expand-form-upload${$index}`}
@ -159,7 +164,7 @@ export default {
<div slot="tip" className="el-upload__tip"> <div slot="tip" className="el-upload__tip">
支持文件格式.rar .zip .doc .docx .xlsx .pdf .png .jpg 支持文件格式.rar .zip .doc .docx .xlsx .pdf .png .jpg
<br /> <br />
单个文件不能超过2Mb 单个文件不能超过50Mb
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -169,14 +174,25 @@ export default {
type="primary" type="primary"
on={{ on={{
["click"]: (e) => { ["click"]: (e) => {
row._form.file_ids = row._fileList?.map(i => i.response.id) this.$refs[`expand-form${$index}`].validate((valid) => {
save(row._form).then(res => { if (valid) {
this.$message({ if (!row._fileList || row._fileList.length === 0) {
type: "success", this.$message({
message: "操作成功" type: "warning",
}) message: "请上传文件",
});
return
}
row._form.file_ids = row._fileList?.map(i => i.response.id)
save(row._form).then(res => {
this.$message({
type: "success",
message: "操作成功"
})
this.getList() this.getList()
})
}
}) })
}, },
}} }}
@ -264,10 +280,10 @@ export default {
row._fileList = fileList; row._fileList = fileList;
}, },
uploadBefore(file) { uploadBefore(file) {
if (file.size / 1024 > 500) { if ((file.size / 1024 / 1024) > 50) {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "上传文件大小超过500kb", message: "上传文件大小超过50Mb",
}); });
return false; return false;
} }

@ -12,6 +12,8 @@
</el-form-item> </el-form-item>
<el-form-item :label="(type === 1 ? '年中' : '年末') + '绩效目标'"> <el-form-item :label="(type === 1 ? '年中' : '年末') + '绩效目标'">
<el-input :value="type === 1 ? form.year_midst : form.year_end" <el-input :value="type === 1 ? form.year_midst : form.year_end"
type="textarea"
:autosize="{ minRows: 2 }"
placeholder="绩效目标" placeholder="绩效目标"
@input="e => { @input="e => {
type === 1 ? form.year_midst = e : form.year_end = e type === 1 ? form.year_midst = e : form.year_end = e
@ -19,6 +21,8 @@
</el-form-item> </el-form-item>
<el-form-item :label="(type === 1 ? '年中' : '年末') + '绩效目标完成情况'"> <el-form-item :label="(type === 1 ? '年中' : '年末') + '绩效目标完成情况'">
<el-input :value="type === 1 ? form.middle_result : form.end_result" <el-input :value="type === 1 ? form.middle_result : form.end_result"
type="textarea"
:autosize="{ minRows: 2 }"
placeholder="绩效目标完成情况" placeholder="绩效目标完成情况"
@input="e => { @input="e => {
type === 1 ? form.middle_result = e : form.end_result = e type === 1 ? form.middle_result = e : form.end_result = e
@ -27,8 +31,8 @@
<el-form-item :label="(type === 1 ? '年中' : '年末') + '成效(通过绩效评价总结的成效)'"> <el-form-item :label="(type === 1 ? '年中' : '年末') + '成效(通过绩效评价总结的成效)'">
<el-input :value="type === 1 ? form.middle_effect : form.end_effect" <el-input :value="type === 1 ? form.middle_effect : form.end_effect"
type="textarea" type="textarea"
placeholder="(请结合项目年度绩效目标进行阐述,需有真实的数据和事实等材料支撑)"
:autosize="{ minRows: 2 }" :autosize="{ minRows: 2 }"
placeholder="(请结合项目年度绩效目标进行阐述,需有真实的数据和事实等材料支撑)"
@input="e => { @input="e => {
type === 1 ? form.middle_effect = e : form.end_effect = e type === 1 ? form.middle_effect = e : form.end_effect = e
}"></el-input> }"></el-input>
@ -119,9 +123,9 @@ export default {
submit() { submit() {
this.form.id = this.id this.form.id = this.id
if (this.type === 1) { if (this.type === 1) {
this.form.year_middle_audit = (this.form.year_middle_audit && this.form.year_middle_audit < 0) ? Math.abs(this.form.year_middle_audit) : 1 this.form.year_middle_audit = (this.form.year_middle_audit && this.form.year_middle_audit < 0) ? Math.abs(this.form.year_middle_audit) : 0
} else { } else {
this.form.year_end_audit = (this.form.year_end_audit && this.form.year_end_audit < 0) ? Math.abs(this.form.year_end_audit) : 1 this.form.year_end_audit = (this.form.year_end_audit && this.form.year_end_audit < 0) ? Math.abs(this.form.year_end_audit) : 0
} }
editorBudget({ editorBudget({
...this.form, ...this.form,

@ -45,17 +45,17 @@
<!-- 实际支出数--> <!-- 实际支出数-->
<!-- </th>--> <!-- </th>-->
<!-- </tr>--> <!-- </tr>-->
<tr v-for="(item, index) in contractList"> <!-- <tr v-for="(item, index) in contractList">-->
<td colspan="2"> <!-- <td colspan="2">-->
{{ item.name }} <!-- {{ item.name }}-->
</td> <!-- </td>-->
<td colspan="3"> <!-- <td colspan="3">-->
{{ item.plan_price }} <!-- {{ item.plan_price }}-->
</td> <!-- </td>-->
<td colspan="2"> <!-- <td colspan="2">-->
{{ item.money}} <!-- {{ item.money}}-->
</td> <!-- </td>-->
</tr> <!-- </tr>-->
<tr> <tr>
<th>一级指标</th> <th>一级指标</th>
<th>二级指标</th> <th>二级指标</th>
@ -175,7 +175,7 @@ export default {
}, },
async getPlanTarget() { async getPlanTarget() {
const list = (await index({ plan_id: this.planId },true)).data const list = (await index({ plan_id: this.planId },true))?.data?.sort((a,b) => a.target.target_type_id - b.target.target_type_id)
this.pos = this.pos1 = 0; this.pos = this.pos1 = 0;
this.spanArr = []; this.spanArr = [];
this.spanArr1 = []; this.spanArr1 = [];

@ -57,7 +57,9 @@
width="260" width="260"
> >
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-dropdown @command="command => { <template v-if="!(scope.row.year_middle_audit > 0) || !(scope.row.year_end_audit > 0)">
<el-dropdown
@command="command => {
if (command === 'yearMiddle') { if (command === 'yearMiddle') {
$refs['addPlanEvaluate'].type = 1; $refs['addPlanEvaluate'].type = 1;
$refs['addPlanEvaluate'].setPlanId(scope.row.id); $refs['addPlanEvaluate'].setPlanId(scope.row.id);
@ -68,16 +70,19 @@
$refs['addPlanEvaluate'].show(); $refs['addPlanEvaluate'].show();
} }
}"> }">
<Button style="margin-left: 4px;" size="small" type="primary"> <Button style="margin-left: 4px;" size="small" type="primary">
填报绩效指标<i class="el-icon-arrow-down el-icon--right"></i> 填报绩效指标<i class="el-icon-arrow-down el-icon--right"></i>
</Button> </Button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="yearMiddle">填报年中绩效指标</el-dropdown-item> <el-dropdown-item command="yearMiddle" v-if="!(scope.row.year_middle_audit > 0)"></el-dropdown-item>
<el-dropdown-item command="yearEnd">填报年末绩效指标</el-dropdown-item> <el-dropdown-item command="yearEnd" v-if="!(scope.row.year_end_audit > 0)"></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template>
<el-dropdown @command="command => { <template v-if="!(scope.row.year_middle_audit > 0) || !(scope.row.year_end_audit > 0)">
<el-dropdown
@command="command => {
if (command === 'yearMiddle') { if (command === 'yearMiddle') {
$refs['addSelfEvaluationForm'].setId(scope.row.id); $refs['addSelfEvaluationForm'].setId(scope.row.id);
$refs['addSelfEvaluationForm'].setType(1); $refs['addSelfEvaluationForm'].setType(1);
@ -88,18 +93,19 @@
$refs['addSelfEvaluationForm'].show(); $refs['addSelfEvaluationForm'].show();
} }
}"> }">
<Button style="margin-left: 4px;" size="small" type="primary"> <Button style="margin-left: 4px;" size="small" type="primary">
填报自评表<i class="el-icon-arrow-down el-icon--right"></i> 填报自评表<i class="el-icon-arrow-down el-icon--right"></i>
</Button> </Button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="yearMiddle"> <el-dropdown-item command="yearMiddle" v-if="!(scope.row.year_middle_audit > 0)">
<span :style="{'color': scope.row.year_middle_audit < 0 ? 'red' : '' }">填报年中自评表</span> <span :style="{'color': scope.row.year_middle_audit < 0 ? 'red' : '' }">填报年中自评表</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item command="yearEnd"> <el-dropdown-item command="yearEnd" v-if="!(scope.row.year_end_audit > 0)">
<span :style="{'color': scope.row.year_end_audit < 0 ? 'red' : '' }">填报年末自评表</span> <span :style="{'color': scope.row.year_end_audit < 0 ? 'red' : '' }">填报年末自评表</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template>
<el-dropdown @command="command => { <el-dropdown @command="command => {
if (command === 'yearMiddle') { if (command === 'yearMiddle') {
@ -124,6 +130,22 @@
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<template v-if="scope.row.year_middle_audit === 0 || scope.row.year_end_audit === 0">
<el-dropdown @command="command => sendExamine(command,scope.row)">
<Button style="margin-left: 4px;" size="small" type="primary">
送审<i class="el-icon-arrow-down el-icon--right"></i>
</Button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="yearMiddle" v-if="scope.row.year_middle_audit === 0">
<span>送审年中绩效</span>
</el-dropdown-item>
<el-dropdown-item command="yearEnd" v-if="scope.row.year_end_audit === 0">
<span>送审年末绩效</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@ -151,7 +173,7 @@
</template> </template>
<script> <script>
import { getBudget } from "@/api/budget/budget"; import { getBudget, editorBudget } from "@/api/budget/budget";
import { index, destroy } from "@/api/achievements/evaluate"; import { index, destroy } from "@/api/achievements/evaluate";
import { moneyFormatter, parseTime } from "@/utils"; import { moneyFormatter, parseTime } from "@/utils";
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
@ -249,6 +271,112 @@ export default {
align: "left", align: "left",
sortable: false, sortable: false,
}, },
{
label: "年中绩效审核状态",
multiHd: [
{
label: "部门负责人",
prop: "year_middle_audit",
customFn: row => {
const val = row.year_middle_audit
if (val === -1) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 1 || val < -1) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
},
{
label: "分管领导",
prop: "year_middle_audit",
customFn: row => {
const val = row.year_middle_audit
if (val === -2) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 2 || val < -2) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
},
{
label: "财务",
prop: "year_middle_audit",
customFn: row => {
const val = row.year_middle_audit
if (val === -3) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 3) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
}
]
},
{
label: "年末绩效审核状态",
multiHd: [
{
label: "部门负责人",
prop: "year_end_audit",
customFn: row => {
const val = row.year_end_audit
if (val === -1) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 1 || val < -1) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
},
{
label: "分管领导",
prop: "year_end_audit",
customFn: row => {
const val = row.year_end_audit
if (val === -2) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 2 || val < -2) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
},
{
label: "财务",
prop: "year_end_audit",
customFn: row => {
const val = row.year_end_audit
if (val === -3) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 3) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
}
]
},
{ {
label: "自评意见", label: "自评意见",
width: 100, width: 100,
@ -271,6 +399,35 @@ export default {
}; };
}, },
methods: { methods: {
sendExamine (command, row) {
this.$confirm("确认要送审?","提示",{
}).then(_ => {
if (command === 'yearMiddle') {
editorBudget({
id: row.id,
year_middle_audit: 1
}).then((res) => {
this.$message({
type: "success",
message: "送审成功",
});
this.getList();
})
} else {
editorBudget({
id: row.id,
year_end_audit: 1
}).then((res) => {
this.$message({
type: "success",
message: "送审成功",
});
this.getList();
})
}
})
},
async getBudgetTypes() { async getBudgetTypes() {
const res = await getparameter({ const res = await getparameter({
number: "money_way", number: "money_way",

@ -170,11 +170,25 @@ export default {
label: "半年(程)指标值", label: "半年(程)指标值",
prop: "target.half_target", prop: "target.half_target",
width: 180, width: 180,
customFn: row => {
if (row.target?.unit_detail?.value !== '无') {
return `${row.target?.symbol_detail?.value}${row.target?.half_target}${row.target?.unit_detail?.value}`
} else {
return row.target?.half_target
}
}
}, },
{ {
label: "全年(程)指标值", label: "全年(程)指标值",
prop: "target.year_target", prop: "target.year_target",
width: 180, width: 180,
customFn: row => {
if (row.target?.unit_detail?.value !== '无') {
return `${row.target?.symbol_detail?.value}${row.target?.year_target}${row.target?.unit_detail?.value}`
} else {
return row.target?.year_target
}
}
}, },
{ {
label: "创建时间", label: "创建时间",

@ -99,7 +99,7 @@
> >
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
支持文件格式.rar .zip .doc .docx .pdf 支持文件格式.rar .zip .doc .docx .pdf
<br />单个文件不能超过500kb <br />单个文件不能超过2Mb
</div> </div>
</el-upload> </el-upload>
</div> </div>
@ -188,10 +188,10 @@ export default {
}, },
uploadBefore(file) { uploadBefore(file) {
console.log(file); console.log(file);
if (file.size / 1000 > 500) { if ((file.size / 1024 / 1024) > 2) {
this.$message({ this.$message({
type: "warning", type: "warning",
message: "上传文件大小超过500kb", message: "上传文件大小超过2Mb",
}); });
return false; return false;
} }

Loading…
Cancel
Save