Commit 455aec65 authored by wangxl's avatar wangxl

444

parent d921e71b
...@@ -8,19 +8,19 @@ ...@@ -8,19 +8,19 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="24" style="padding-top:6px;border-bottom:0px;"> <a-col :span="24" style="margin-top: 6px;text-align: center;">
<a-form-model-item prop="auditContent"> <a-form-model-item prop="auditContent">
<a-textarea v-model="auditObj.auditContent" :auto-size="{ minRows: 5, maxRows: 8 }" :max-length="500" style="width: 60%" /> <a-textarea v-model="auditObj.auditContent" :auto-size="{ minRows: 5, maxRows: 8 }" :max-length="500" style="width: 60%;height: 115px;" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24" style="text-align: center;">
<a-form-model-item prop="auditResult"> <a-form-model-item prop="auditResult">
<a-radio-group v-model="auditObj.auditResult" @change="onChange"> <a-radio-group v-model="auditObj.auditResult" @change="onChange">
<a-radio :value="10" :disabled="disabledBtns.btnPassed">通过</a-radio> <a-radio :value="10">通过</a-radio>
<a-radio :value="30" :disabled="disabledBtns.btnReturn">返回修改</a-radio> <a-radio :value="30">返回修改</a-radio>
<a-radio :value="20" :disabled="disabledBtns.btnUnpassed">不通过</a-radio> <a-radio :value="20">不通过</a-radio>
</a-radio-group> </a-radio-group>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -40,29 +40,9 @@ export default { ...@@ -40,29 +40,9 @@ export default {
return null; return null;
}, },
}, },
disabledBtns: {
btnPassed: {
type: Boolean,
default () {
return false
}
},
btnReturn: {
type: Boolean,
default () {
return false
}
},
btnUnpassed: {
type: Boolean,
default () {
return false
}
}
}
}, },
created () { created () {
}, },
methods: { methods: {
onChange (e) { }, onChange (e) { },
......
...@@ -47,22 +47,12 @@ ...@@ -47,22 +47,12 @@
</template> </template>
</a-table> </a-table>
<a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" />
<s-modal title="项目审核" v-model="visibleAudit" v-if="visibleAudit" ref="s_modal"> <a-modal v-model="visibleAudit" v-if="visibleAudit" title="审核" :footer="null" width="94%" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<div slot="content" class="s_modal_content"> <audit v-model="id" :objId="objectId" @close="closeWindow" @changeScroll="() => {this.$refs.s_modal.changeScroll()}"></audit>
<audit v-model="id" :objId="objectId" :disabledBtns="disabledBtns" @closeWindow="closeAuditWindow" @onDisabled="onDisabled" @changeScroll="() => {this.$refs.s_modal.changeScroll()}" ref="projAudit"></audit> </a-modal>
</div> <a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<template slot="footer"> <project-view v-model="objectId" @close="closeWindow"></project-view>
<!-- <a-button @click="() => visibleAudit = false"> </a-modal>
取消
</a-button> -->
<a-button type="primary" @click="() => {this.$refs.projAudit.submit()}" :disabled="disabledSubmit" style="margin-left:16px;">提交</a-button>
</template>
</s-modal>
<s-modal title="项目详情" v-model="visibleView" v-if="visibleView">
<div slot="content">
<project-view v-model="objectId" @close="() => this.visibleView = false"></project-view>
</div>
</s-modal>
<a-modal v-model="taskFileInfoView" title="项目任务书" :width="'60%'" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> <a-modal v-model="taskFileInfoView" title="项目任务书" :width="'60%'" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal">
<task-file-info v-model="selectProjId" @close="closeTaskFileInfoWindow" /> <task-file-info v-model="selectProjId" @close="closeTaskFileInfoWindow" />
</a-modal> </a-modal>
...@@ -138,12 +128,6 @@ export default { ...@@ -138,12 +128,6 @@ export default {
description: '', description: '',
id: null, id: null,
objectId: null, objectId: null,
disabledBtns: {
btnPassed: true,
btnReturn: true,
btnUnpassed: true
},
disabledSubmit: false,
taskFileInfoView: false, taskFileInfoView: false,
selectProjId: null, selectProjId: null,
}; };
...@@ -172,15 +156,14 @@ export default { ...@@ -172,15 +156,14 @@ export default {
if (data) { if (data) {
this.isButten = data.disabled this.isButten = data.disabled
this.description = data.description this.description = data.description
this.disabledBtns.btnPassed = data.btnPassed
this.disabledBtns.btnReturn = data.btnReturn
this.disabledBtns.btnUnpassed = data.btnUnpassed
this.searchForm.reportYear = data.year this.searchForm.reportYear = data.year
console.log('1')
this.getListByPage() this.getListByPage()
} }
}).catch(() => { }) }).catch(() => { })
}, },
getListByPage () { getListByPage () {
console.log('2')
this.getCount() this.getCount()
this.loading = true; this.loading = true;
let pars = isEmptyParams(this.searchForm); let pars = isEmptyParams(this.searchForm);
...@@ -210,23 +193,23 @@ export default { ...@@ -210,23 +193,23 @@ export default {
change () { change () {
this.getListByPage(); this.getListByPage();
}, },
knowledgeChange(value) { knowledgeChange (value) {
this.searchForm.knowledgeParentId = value this.searchForm.knowledgeParentId = value
}, },
showSizeChange (current, pageSize) { showSizeChange (current, pageSize) {
this.pagination.pageSize = pageSize this.pagination.pageSize = pageSize
this.getListByPage() this.getListByPage()
}, },
closeAuditWindow (value) { closeWindow (value) {
if (value === 'audit') { if (value === 'audit') {
this.getListByPage() this.getListByPage()
this.visibleAudit = false this.visibleAudit = false
} } else if (value === 'error') {
else if (value === 'auditcel') { this.id = null
this.objectId = null
this.visibleAudit = false this.visibleAudit = false
}
else
this.visibleView = false this.visibleView = false
}
}, },
recordClick (record, type) { recordClick (record, type) {
if (type === 'view') { if (type === 'view') {
...@@ -248,7 +231,7 @@ export default { ...@@ -248,7 +231,7 @@ export default {
onDisabled (value) { onDisabled (value) {
this.disabledSubmit = value this.disabledSubmit = value
}, },
closeTaskFileInfoWindow() { closeTaskFileInfoWindow () {
this.taskFileInfoView = true this.taskFileInfoView = true
}, },
exportData () { exportData () {
......
<template> <template>
<div> <div class="app-content" style="height: 76vh;overflow: auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;"> <a-spin :spinning="loading" style="width: 100%;height: 100%;">
<project-view v-model="objId" /> <div class="page-content" ref="main">
<a-form-model ref="form" :model="auditObj" :rules="rules" class="from-table"> <div class="x_modal_content">
<audit-edit :auditObj.sync="auditObj" :disabledBtns.sync="disabledBtns" /> <project-info v-model="projectInfo" v-if="projType" />
</a-form-model> <project-info-Key v-model="projectInfo" v-else />
<a-form-model ref="form" :model="auditObj" :rules="rules" class="from-table font-line-space">
<audit-edit :auditObj.sync="auditObj" />
</a-form-model>
</div>
</div>
<div class="page-footer">
<a-button type="primary" @click="submit" style="margin-left:16px;">提交</a-button>
</div>
</a-spin> </a-spin>
</div> </div>
</template> </template>
<script> <script>
import { isEmptyParams } from "@/views/utils/common"; import { isEmptyParams } from "@/views/utils/common";
import { budgetList } from '@/views/report/project/config' import { budgetList } from '@/views/report/project/config'
import ProjectView from '@/views/report/project/components/projectView' import { getType } from '@/views/utils/auth'
import projectInfo from '@/views/report/project/components/projectInfo'
import projectInfoKey from "@/views/report/project/components/keyProject/projectInfo"
import AuditList from '@/views/audit/components/auditInfo' import AuditList from '@/views/audit/components/auditInfo'
import AuditEdit from '@/views/audit/components/auditEdit' import AuditEdit from '@/views/audit/components/auditEdit'
export default { export default {
name: "Audit", name: "Audit",
components: { components: {
ProjectView, AuditList, AuditEdit projectInfo, projectInfoKey, AuditList, AuditEdit
}, },
data () { data () {
return { return {
projectInfo: { projectInfo: {
projName: '', id: null,
startDate: '', organizationCode: null,
endDate: '', address: null,
applyMoney: '', registeredAddress: null,
projClassName: '', postCode: null,
appPersonName: '', legalPerson: null,
sex: '', workforce: null,
titleName: '', specializedPersonnel: null,
degreeName: '', researchPersonnel: null,
specName: '', depositBank: null,
jobUnit: '', bankAccount: null,
mobile: '', depositBankAddress: null,
address: '', interbankNumber: null,
appUnitName: '', researchTotal: null,
linkName: '', isResearchActive: null,
linkEmail: '', researchCount: null,
linkTel: '', researchPersonCount: null,
knowledgeName: '', projName: null,
projContent: '', leadUnit: null,
projTarget: '', recommendUnit: null,
projKeywords: '', startDate: null,
// 合作单位 endDate: null,
together: [{ unitName: '', unitAddress: '', projectWork: '' }, { unitName: '', unitAddress: '', projectWork: '' }], technologyInnovationBase: null,
// 项目组成员 knowledgeId: null,
totalFunding: null,
govFunding: null,
linkName: null,
linkMobile: null,
linkEmail: null,
projAbstract: null,
projKeywords: null,
researchContent: null,
memResume: null,
researchProgress: null,
researchContent: null,
technologyTarget: null,
economyTarget: null,
achievementTarget: null,
otherTarget: null,
cooperativeUnits: [],
members: [], members: [],
// 经费 budget: [],
budget: budgetList(), equipments: [],
projDoc: null, projectSubList: [],
fileList: [{ fileName: '', url: '', remarks: '', id: '' }], managementRuleList: [],
auditList: [{ result: '', unit: '', time: '' }], fileList: [],
}, },
auditObj: { id: this.value, auditObjectId: this.objId, auditResult: null, auditType: 1, auditContent: '' }, auditObj: { id: this.value, auditObjectId: this.objId, auditResult: null, auditType: 1, auditContent: '' },
rules: { rules: {
...@@ -60,6 +86,7 @@ export default { ...@@ -60,6 +86,7 @@ export default {
auditResult: { required: true, message: '请选择审核结果', trigger: 'change' }, auditResult: { required: true, message: '请选择审核结果', trigger: 'change' },
}, },
loading: false, loading: false,
projType: getType() == "1"
}; };
}, },
props: { props: {
...@@ -75,22 +102,12 @@ export default { ...@@ -75,22 +102,12 @@ export default {
return null return null
} }
}, },
disabledBtns: {
type: Object,
default () {
return {
btnPassed: false,
btnReturn: true,
btnUnpassed: false,
}
}
}
}, },
created () { created () {
this.load() this.loadProject()
}, },
methods: { methods: {
load () { loadProject () {
let pars = { id: this.objId } let pars = { id: this.objId }
if (this.objId != null) { if (this.objId != null) {
this.loading = true this.loading = true
...@@ -98,18 +115,14 @@ export default { ...@@ -98,18 +115,14 @@ export default {
if (data) { if (data) {
this.projectInfo = data this.projectInfo = data
this.loading = false this.loading = false
} } else
this.$emit('onDisabled', false) this.$emit('close', 'error')
}).catch(() => { }) }).catch(() => { this.$emit('close', 'error') })
} }
}, },
cancel () {
this.$emit('closeWindow', 'auditcel')
},
submit () { submit () {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
this.$emit('onDisabled', true)
this.loading = true this.loading = true
let pars = isEmptyParams(this.auditObj) let pars = isEmptyParams(this.auditObj)
let par = { ...pars } let par = { ...pars }
...@@ -119,25 +132,42 @@ export default { ...@@ -119,25 +132,42 @@ export default {
this.$message.info('项目上报已经到达上限!') this.$message.info('项目上报已经到达上限!')
} else { } else {
this.$message.success('审核成功!') this.$message.success('审核成功!')
this.$emit('closeWindow', 'audit') this.$emit('close', 'audit')
} }
} }
this.loading = false this.loading = false
this.$emit('onDisabled', false) }).catch(() => { this.loading = false })
}).catch(() => {
this.loading = false
this.$emit('onDisabled', false)
})
} else { } else {
this.$emit('changeScroll') this.changeScroll()
this.$message.error('请选择审核结果或填写审核意见!') this.$message.error('请选择审核结果或填写审核意见!')
return false return false
} }
}) })
}, },
changeScroll () {
this.$refs.main.scrollTop = document.getElementsByClassName('x_modal_content')[0].offsetHeight
}
}, },
} }
</script> </script>
<style lang="less" scoped> <style scoped lang="less">
::v-deep .ant-spin-container {
width: 100%;
height: 100%;
}
::v-deep .page-content {
width: 100%;
height: calc(100% - 40px);
overflow: auto;
}
::v-deep .page-footer {
width: 100%;
height: 40px;
line-height: 40px;
background: rgb(248, 248, 248);
text-align: center;
}
textarea {
height: 115px;
}
</style> </style>
...@@ -56,26 +56,14 @@ ...@@ -56,26 +56,14 @@
<a-modal v-model="assignInfoVisible" title="分配详情" width="85%" :dialog-style="{ top: '8%' }" :footer="null" destroyOnClose> <a-modal v-model="assignInfoVisible" title="分配详情" width="85%" :dialog-style="{ top: '8%' }" :footer="null" destroyOnClose>
<project-assign-detail v-model="objectId" @close="() => this.assignInfoVisible = false" /> <project-assign-detail v-model="objectId" @close="() => this.assignInfoVisible = false" />
</a-modal> </a-modal>
<s-modal title="项目审核" v-model="visibleAudit" v-if="visibleAudit"> <a-modal v-model="visibleAudit" v-if="visibleAudit" title="审核" :footer="null" width="94%" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<div slot="content"> <audit v-model="id" :objId="objectId" @close="closeWindow" @changeScroll="() => {this.$refs.s_modal.changeScroll()}"></audit>
<audit v-model="id" :objId="objectId" @closeWindow="closeAuditWindow" ref="projAudit"></audit> </a-modal>
</div> <a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<template slot="footer"> <project-view v-model="objectId" @close="closeWindow"></project-view>
<a-button @click="() => visibleAudit = false"> </a-modal>
取消
</a-button>
<a-button type="primary" @click="() => this.$refs.projAudit.submit()" style="margin-left:16px;">
提交
</a-button>
</template>
</s-modal>
<s-modal title="项目详情" v-model="visibleView" v-if="visibleView">
<div slot="content">
<project-view v-model="objectId" @close="() => this.visibleView = false"></project-view>
</div>
</s-modal>
<a-modal v-model="taskFileInfoView" title="查看项目任务书" :width="'60%'" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal"> <a-modal v-model="taskFileInfoView" title="查看项目任务书" :width="'60%'" :maskClosable="false" :footer="null" destroyOnClose class="sc_modal">
<task-file-info v-model="ProjId" @close="() => this.taskFileInfoView = false" /> <task-file-info v-model="ProjId" @close="() => this.taskFileInfoView = false" />
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -239,16 +227,16 @@ export default { ...@@ -239,16 +227,16 @@ export default {
this.pagination.pageSize = pageSize this.pagination.pageSize = pageSize
this.getListByPage() this.getListByPage()
}, },
closeAuditWindow (value) { closeWindow (value) {
if (value === 'audit') { if (value === 'audit') {
this.getListByPage() this.getListByPage()
this.visibleAudit = false this.visibleAudit = false
} } else if (value === 'error') {
else if (value === 'auditcel') { this.id = null
this.objectId = null
this.visibleAudit = false this.visibleAudit = false
}
else
this.visibleView = false this.visibleView = false
}
}, },
recordClick (record, type) { recordClick (record, type) {
if (type === 'view') { if (type === 'view') {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
</div> </div>
</template> </template>
<script> <script>
import { budgetList } from '@/views/report/project/config' import { budgetList } from '@/views/report/project/config'
import { getType } from '@/views/utils/auth' import { getType } from '@/views/utils/auth'
import projectInfo from '@/views/report/project/components/projectInfo' import projectInfo from '@/views/report/project/components/projectInfo'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment