feat : 年度计划生成功能及分摊汇总导出功能

This commit is contained in:
2024-07-06 02:21:26 +08:00
parent fce1708f5c
commit 8180c248ac
11 changed files with 471 additions and 38 deletions

View File

@@ -148,7 +148,7 @@
:file-list-show="fileListShow"/>
</el-col>
<el-col :span="24">
<div v-if="data.taskId">
<div v-if="data.taskId||data.state==='5'">
<baseTitle title="审核意见"></baseTitle>
<el-form-item prop="_value">
<el-input
@@ -180,6 +180,11 @@
</div>
</div>
</el-form>
<div class="oper-page-btn" v-if="data.state==='5'">
<el-button type="danger" @click="handleRejectPlan">驳回年度计划</el-button>
<el-button color="#DED0B2" @click="handleAgreePlan">通过年度计划</el-button>
</div>
</div>
</template>
@@ -193,6 +198,8 @@ import {getFundOption} from "@/api/special-fund";
import {useCacheStore} from '@/stores/cache.js'
import {getSubCompOpt} from "@/api/user/user";
import FileComponent from "./FileComponent.vue";
import {ElNotification} from "element-plus";
import {approvePlan} from "@/api/project-demand/summary";
const emit = defineEmits(['update:value'])
const tagsViewStore = useTagsView()
@@ -225,6 +232,7 @@ const props = defineProps({
})
const changeDiagram = ref(false)
const localFormData = ref({})
const route = useRoute()
const router = useRouter()
const fundOption = ref([])
const companyOption = ref([])
@@ -240,6 +248,46 @@ const _value = computed({
emit("update:value", val);
}
})
const handleRejectPlan = async () => {
// const values = form.value.getValues()
console.log('route',route.query.projectId)
if (!_value.value) {
ElNotification({
title: '提示',
message: '请填写审核意见',
type: 'warning'
})
return
}
const params = {
auditOpinion:_value.value,
projectId:parseInt(route.query.projectId),
state:false
}
console.log('params', params)
const res = await approvePlan(params)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
}
const handleAgreePlan = async () => {
const params = {
auditOpinion:_value.value,
projectId:parseInt(route.query.projectId),
state:true
}
console.log('params', params)
const res = await approvePlan(params)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
}
const filterDict = (data, value) => {
if (data === undefined || value === undefined) return;
let label = ''