|
@@ -62,17 +62,22 @@
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px">
|
|
|
<el-col
|
|
|
- :span="20"
|
|
|
+ :span="23"
|
|
|
>
|
|
|
<div class="collapseBox">
|
|
|
- <el-collapse>
|
|
|
+ <el-collapse accordion>
|
|
|
<el-collapse-item
|
|
|
- v-for="item in comprehensive.descriptions"
|
|
|
+ v-for="item in messageList"
|
|
|
:key="item.ID"
|
|
|
- :title="item.node.nodeName"
|
|
|
:name="item.ID"
|
|
|
>
|
|
|
- <div>
|
|
|
+ <template #title>
|
|
|
+ <el-text
|
|
|
+ class="collapseBox-title"
|
|
|
+ type="info"
|
|
|
+ >{{ item.optionResult }}</el-text>
|
|
|
+ </template>
|
|
|
+ <div class="collapseBox-content">
|
|
|
{{ item.approvalOpinion }}
|
|
|
</div>
|
|
|
</el-collapse-item>
|
|
@@ -92,6 +97,16 @@
|
|
|
@click="supplyFile"
|
|
|
>补充文件</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col
|
|
|
+ v-show="comprehensive.isBack"
|
|
|
+ :span="5"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ icon="Check"
|
|
|
+ type="primary"
|
|
|
+ @click="supplementFinish"
|
|
|
+ >补充完毕</el-button>
|
|
|
+ </el-col>
|
|
|
<el-col
|
|
|
v-show="detailType === 'inspect'"
|
|
|
:span="5"
|
|
@@ -107,7 +122,7 @@
|
|
|
>
|
|
|
<el-button
|
|
|
icon="Right"
|
|
|
- @click="passThrough"
|
|
|
+ @click="ratifyShow = true"
|
|
|
>审核通过</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -115,8 +130,6 @@
|
|
|
style="margin-top: 30px"
|
|
|
height="620px"
|
|
|
:data="fileList"
|
|
|
- border
|
|
|
- stripe
|
|
|
>
|
|
|
<el-table-column
|
|
|
label="ID"
|
|
@@ -139,6 +152,7 @@
|
|
|
<el-form style="margin-top: 20px">
|
|
|
<el-form-item>
|
|
|
<el-input
|
|
|
+ v-model="returnContent"
|
|
|
placeholder="请输入打回申请的理由以便申请人补充文件"
|
|
|
type="textarea"
|
|
|
:rows="5"
|
|
@@ -153,20 +167,44 @@
|
|
|
>确认</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ v-model="ratifyShow"
|
|
|
+ title="通过申请"
|
|
|
+ >
|
|
|
+ <el-form style="margin-top: 20px">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input
|
|
|
+ v-model="ratifyContent"
|
|
|
+ placeholder="请输入通过申请的留言(选填)"
|
|
|
+ type="textarea"
|
|
|
+ :rows="5"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="large"
|
|
|
+ @click="passThrough"
|
|
|
+ >确认</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import moment from 'moment/moment'
|
|
|
+
|
|
|
defineOptions({
|
|
|
name: 'ApproveDetail'
|
|
|
})
|
|
|
import { onMounted, reactive, ref } from 'vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
-import { getProjectProcessId } from '@/api/process'
|
|
|
-import { processApproval } from '@/api/approver'
|
|
|
+import { getProjectProcessId, supplyFinish } from '@/api/process'
|
|
|
import { queryFileList } from '@/api/file'
|
|
|
-import { ElMessageBox } from 'element-plus'
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import sign from '@/assets/sign.png'
|
|
|
+import { processApproval } from '@/api/approver'
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
|
onMounted(() => {
|
|
@@ -184,6 +222,8 @@ const fileCondition = reactive({
|
|
|
})
|
|
|
// 项目流程信息
|
|
|
const comprehensive = reactive({})
|
|
|
+// 消息数组
|
|
|
+const messageList = reactive([])
|
|
|
// 节点数组
|
|
|
const nodeList = reactive([])
|
|
|
// 步骤进度
|
|
@@ -194,6 +234,20 @@ const applyPeople = ref('')
|
|
|
const checkPeople = ref('')
|
|
|
// 文件列表
|
|
|
const fileList = reactive([])
|
|
|
+// 审核数据
|
|
|
+const approvalData = reactive({
|
|
|
+ projectProcess: {},
|
|
|
+ description: {
|
|
|
+ projectProcessId: 0,
|
|
|
+ approvalOpinion: '',
|
|
|
+ nodeId: 2,
|
|
|
+ approvalTime: '2024-09-23',
|
|
|
+ optionResult: '通过'
|
|
|
+ }
|
|
|
+})
|
|
|
+// 打回内容
|
|
|
+const returnContent = ref('')
|
|
|
+
|
|
|
const queryProjectProcessById = () => {
|
|
|
const id = route.query.id
|
|
|
getProjectProcessId(id).then(res => {
|
|
@@ -201,16 +255,21 @@ const queryProjectProcessById = () => {
|
|
|
const data = res.data
|
|
|
nodeList.length = 0
|
|
|
nodeList.push(...data.process.nodes)
|
|
|
- nodeList.forEach(item => {
|
|
|
- if (item.ID === data.node.ID) {
|
|
|
- infoSteps.value = item.order - 1
|
|
|
- }
|
|
|
- })
|
|
|
+ infoSteps.value = data.node.order
|
|
|
Object.assign(comprehensive, data)
|
|
|
+ console.log(data)
|
|
|
+ Object.assign(approvalData.projectProcess, data)
|
|
|
+ approvalData.description.projectProcessId = data.ID
|
|
|
+ approvalData.description.nodeId = data.node.ID
|
|
|
+ // 反转消息列表
|
|
|
+ messageList.length = 0
|
|
|
+ for (let index = data.descriptions.length - 1; index >= 0; index--) {
|
|
|
+ messageList.push(data.descriptions[index])
|
|
|
+ }
|
|
|
// 申请人、审核人
|
|
|
applyPeople.value = data.user.nickName
|
|
|
checkPeople.value = data.node.approver.nickName
|
|
|
- fileCondition.code = comprehensive.code
|
|
|
+ fileCondition.code = data.code
|
|
|
queryFileList(fileCondition).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
// console.log(res.data.list)
|
|
@@ -231,16 +290,21 @@ const repulseShow = ref(false)
|
|
|
const openRepulse = () => {
|
|
|
repulseShow.value = true
|
|
|
}
|
|
|
-// 审核数据
|
|
|
-const approvalData = reactive({
|
|
|
- projectProcess: {},
|
|
|
- description: {}
|
|
|
-})
|
|
|
// 确认打回
|
|
|
const repulseApply = () => {
|
|
|
+ if (returnContent.value.length === 0) {
|
|
|
+ ElMessage.error('请输入打回申请的理由')
|
|
|
+ }
|
|
|
+ const date = moment()
|
|
|
+ approvalData.description.approvalOpinion = returnContent.value
|
|
|
+ approvalData.description.approvalTime = date.format('YYYY-MM-DD')
|
|
|
+ approvalData.description.optionResult = '打回'
|
|
|
processApproval(approvalData).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
- console.log(res.data)
|
|
|
+ ElMessage.success('打回成功')
|
|
|
+ queryProjectProcessById()
|
|
|
+ returnContent.value = ''
|
|
|
+ repulseShow.value = false
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -251,24 +315,38 @@ const supplyFile = () => {
|
|
|
|
|
|
// 详情类型
|
|
|
const detailType = route.query.type
|
|
|
-
|
|
|
+// 审核通过
|
|
|
+const ratifyContent = ref('')
|
|
|
const passThrough = () => {
|
|
|
- ElMessageBox.confirm(
|
|
|
- '确认审批通过吗?',
|
|
|
- '确认',
|
|
|
- {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
+ const date = moment()
|
|
|
+ approvalData.description.approvalOpinion = ratifyContent.value
|
|
|
+ approvalData.description.approvalTime = date.format('YYYY-MM-DD')
|
|
|
+ approvalData.description.optionResult = '通过'
|
|
|
+ processApproval(approvalData).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ ElMessage.success('审核完成')
|
|
|
+ queryProjectProcessById()
|
|
|
+ ratifyContent.value = ''
|
|
|
+ ratifyShow.value = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 补充完成
|
|
|
+const supplementFinish = () => {
|
|
|
+ supplyFinish(comprehensive.ID).then(res => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ ElMessageBox.alert('申请已再次发送请等待审核结果', '提示', {
|
|
|
+ confirmButtonText: '确认'
|
|
|
+ })
|
|
|
}
|
|
|
- )
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {})
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
+const ratifyShow = ref(false)
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style scoped lang="scss">
|
|
|
.basicInformation{
|
|
|
height: 40px;
|
|
|
background-color: #f8fafd;
|
|
@@ -280,6 +358,14 @@ const passThrough = () => {
|
|
|
height: 400px;
|
|
|
padding: 10px;
|
|
|
overflow: scroll;
|
|
|
+ .collapseBox-title{
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 550;
|
|
|
+ }
|
|
|
+ .collapseBox-content{
|
|
|
+ margin-top: 10px;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.peopleInfo{
|