master
parent
6494086e5e
commit
10d27d4d0a
@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div>
|
||||
<Modal
|
||||
v-model="isShow"
|
||||
title="审核确认">
|
||||
<div>
|
||||
<p style="line-height: 3;font-weight: 600;">意见或建议</p>
|
||||
|
||||
<el-input v-model="reason" type="textarea" :autosize="{ minRows: 4 }"></el-input>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div>
|
||||
<Button style="border: none;" @click="hide">取消</Button>
|
||||
<Button type="error" @click="submit(true)">驳回</Button>
|
||||
<Button type="primary" @click="submit(false)">审核通过</Button>
|
||||
</div>
|
||||
</template>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { editorBudget as save } from "@/api/budget/budget";
|
||||
export default {
|
||||
props: {
|
||||
//1年中
|
||||
type: Number
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
reason: "",
|
||||
isShow: false,
|
||||
planId: '',
|
||||
planLogs: [],
|
||||
operateAuth: ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setOperateAuth (operateAuth) {
|
||||
this.operateAuth = operateAuth;
|
||||
},
|
||||
setPlanLogs (logs) {
|
||||
this.planLogs = logs
|
||||
},
|
||||
setPlanId (planId) {
|
||||
this.planId = planId;
|
||||
},
|
||||
show () {
|
||||
this.isShow = true;
|
||||
},
|
||||
hide () {
|
||||
this.isShow = false;
|
||||
},
|
||||
|
||||
submit (isBack = false) {
|
||||
let status = 1;
|
||||
let temp;
|
||||
if (this.role.find(i => i === '系统管理员')) {
|
||||
temp = this.operateAuth
|
||||
} else {
|
||||
temp = this.role.find(i => i === this.operateAuth)
|
||||
}
|
||||
switch (temp) {
|
||||
case '部门负责人':
|
||||
status = isBack ? -1 : 2;
|
||||
break
|
||||
case '中心分管主任':
|
||||
status = isBack ? -2 : 3;
|
||||
break
|
||||
case '财务':
|
||||
status = isBack ? -3 : 4;
|
||||
break
|
||||
}
|
||||
let form = {
|
||||
id: this.planId,
|
||||
plan_logs: [{ reason: `${temp}${this.reason}` }],
|
||||
}
|
||||
if (this.type === 1) {
|
||||
form.year_middle_audit = status;
|
||||
} else {
|
||||
form.year_end_audit = status;
|
||||
}
|
||||
save(form).then(res => {
|
||||
this.hide();
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type:'success'
|
||||
});
|
||||
this.$emit('refresh');
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
role () {
|
||||
return this.$store.state.user.myroles?.map(i => i.name)
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .ivu-modal-body {
|
||||
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue