|
@@ -10,7 +10,7 @@
|
|
|
:class="{ active: currentTab === item['key'] }"
|
|
|
@click="switchTabHandle(item)"
|
|
|
>
|
|
|
- {{ item['name'] }}
|
|
|
+ {{ item['name'] }}({{ item['value'] }})
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="tableBox">
|
|
@@ -27,17 +27,18 @@
|
|
|
height: '50px'
|
|
|
}"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
- v-loading="loading"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55" />
|
|
|
+ <el-table-column v-if="currentTab === '0'" type="selection" width="55" />
|
|
|
<el-table-column label="序号" width="100" align="center">
|
|
|
<template #default="scope">{{ scope.$index + 1 }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="xmmc" label="项目名称" width="280" />
|
|
|
- <el-table-column :show-overflow-tooltip="true" prop="xmbm" label="项目部门" width="250" />
|
|
|
- <el-table-column label="项目经理" prop="xmjl" width="160" />
|
|
|
- <el-table-column label="项目状态" width="120" align="center">
|
|
|
- <template #default="scope">{{ getCustomerType(scope.row.xmzt) }}</template>
|
|
|
+ <el-table-column :show-overflow-tooltip="true" prop="xmbm" label="项目部门" width="160" />
|
|
|
+ <el-table-column label="项目经理" prop="xmjl" width="100" />
|
|
|
+ <el-table-column label="项目状态" width="100" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ getDictLabel(DICT_TYPE.PROJECT_STATUS, scope.row.xmzt) }}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="合同额(万元)" width="140" align="center">
|
|
|
<template #default="scope">{{ scope.row.virtualAmount }}</template>
|
|
@@ -46,11 +47,11 @@
|
|
|
<template #default="scope">{{ scope.row.returnAmount }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="本年初始进度" width="140" align="center">
|
|
|
- <template #default="scope">{{ scope.row.finishProgress }}</template>
|
|
|
+ <template #default="scope">{{ scope.row.finishProgress * 100 }}%</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="现进度" width="220" align="center">
|
|
|
+ <el-table-column label="现进度" width="120" align="center">
|
|
|
<template #default="scope">
|
|
|
- <span>{{ scope.row.reportProgress }}</span>
|
|
|
+ <span>{{ scope.row.reportProgress }}%</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="进度说明" width="220" align="center">
|
|
@@ -73,10 +74,14 @@
|
|
|
<template #default="scope">{{ scope.row.periodCheckValue }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" width="140" align="center">
|
|
|
- <template #default="scope">{{ scope.row.periodCheckValue }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" fixed="right" width="260">
|
|
|
<template #default="scope">
|
|
|
+ <span :style="{ color: scope.row.reportStatus === '11' ? 'red' : '' }">
|
|
|
+ {{ getDictLabel(DICT_TYPE.PROJECT_REPORT_STATUS, scope.row.reportStatus) }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" fixed="right" :width="currentTab === '0' ? '160' : '100'">
|
|
|
+ <template v-if="currentTab === '0'" #default="scope">
|
|
|
<dialog-confirm
|
|
|
title="确认审核通过吗?"
|
|
|
confirmButtonText="确定"
|
|
@@ -93,6 +98,17 @@
|
|
|
驳回
|
|
|
</el-button>
|
|
|
</template>
|
|
|
+ <template v-else #default="scope">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.reportStatus && scope.row.reportStatus !== '00'"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ round
|
|
|
+ @click="getProjectReportAuditList(scope.row)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
@@ -113,11 +129,36 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="审核记录" v-model="auditorVisiabled" width="600px" append-to-body>
|
|
|
+ <div class="timeLineBox" v-if="activities.length > 0">
|
|
|
+ <el-timeline style="max-width: 600px">
|
|
|
+ <el-timeline-item
|
|
|
+ v-for="(activity, index) in activities"
|
|
|
+ :key="index"
|
|
|
+ type="primary"
|
|
|
+ :hollow="true"
|
|
|
+ :timestamp="convertTimeToDate(activity.auditDate)"
|
|
|
+ >
|
|
|
+ <p>
|
|
|
+ <span style="margin-right: 20px">审核人:{{ activity.auditor }}</span>
|
|
|
+ <span>
|
|
|
+ 状态:<span :style="{ color: activity.auditStatus === '11' ? 'red' : '' }">
|
|
|
+ {{ getDictLabel(DICT_TYPE.PROJECT_REPORT_STATUS, activity.auditStatus) }}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
+ <p> {{ activity.comments }}</p>
|
|
|
+ </el-timeline-item>
|
|
|
+ </el-timeline>
|
|
|
+ </div>
|
|
|
+ <div v-else style="text-align: center"> 暂无审核记录 </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import request from '@/config/axios'
|
|
|
-import { getDictOptions } from '@/utils/dict'
|
|
|
+import { convertTimeToDate } from '@/utils/formatTime'
|
|
|
+import { DICT_TYPE, getDictLabel } from '@/utils/dict'
|
|
|
|
|
|
defineOptions({ name: 'ProjectCheck' })
|
|
|
|
|
@@ -126,16 +167,19 @@ const dataSource = ref([])
|
|
|
type TabType = {
|
|
|
name: string
|
|
|
key: string
|
|
|
+ value: number
|
|
|
}
|
|
|
const currentTab = ref<string>('0')
|
|
|
const tabList = ref<TabType[]>([
|
|
|
{
|
|
|
name: '待审核',
|
|
|
- key: '0'
|
|
|
+ key: '0',
|
|
|
+ value: 0
|
|
|
},
|
|
|
{
|
|
|
name: '已审核',
|
|
|
- key: '1'
|
|
|
+ key: '1',
|
|
|
+ value: 0
|
|
|
}
|
|
|
])
|
|
|
const switchTabHandle = (item: TabType) => {
|
|
@@ -151,31 +195,43 @@ const tableRef: any = ref(null)
|
|
|
const tableHeight: any = ref(0)
|
|
|
const message = useMessage()
|
|
|
|
|
|
-const loading = ref(false)
|
|
|
-const getProjectCheckByList = async () => {
|
|
|
- loading.value = true
|
|
|
+//待审核
|
|
|
+const getProjectCheckListAjax = async () => {
|
|
|
const result: any = await request.get(
|
|
|
{
|
|
|
url: '/projectReport/list-check'
|
|
|
},
|
|
|
'/business'
|
|
|
)
|
|
|
+ return result
|
|
|
+}
|
|
|
+const getProjectCheckByList = async () => {
|
|
|
+ const result: any = await getProjectCheckListAjax()
|
|
|
dataSource.value = result ?? []
|
|
|
- loading.value = false
|
|
|
}
|
|
|
-
|
|
|
-const getProjectCheckedByList = async () => {
|
|
|
- loading.value = true
|
|
|
- const result: any = await request.get(
|
|
|
+const getProjectCheckByCount = async () => {
|
|
|
+ const result: any = await getProjectCheckListAjax()
|
|
|
+ result && (tabList.value[0]['value'] = result.length)
|
|
|
+}
|
|
|
+//已审核
|
|
|
+const getProjectCheckedListAjax = async () => {
|
|
|
+ return await request.get(
|
|
|
{
|
|
|
url: '/projectReport/list-checked'
|
|
|
},
|
|
|
'/business'
|
|
|
)
|
|
|
+}
|
|
|
+const getProjectCheckedByList = async () => {
|
|
|
+ const result: any = await getProjectCheckedListAjax()
|
|
|
dataSource.value = result ?? []
|
|
|
- loading.value = false
|
|
|
}
|
|
|
-
|
|
|
+const getProjectCheckedByCount = async () => {
|
|
|
+ const result: any = await getProjectCheckedListAjax()
|
|
|
+ result && (tabList.value[1]['value'] = result.length)
|
|
|
+}
|
|
|
+getProjectCheckByCount()
|
|
|
+getProjectCheckedByCount()
|
|
|
const passProjectReportHandle = async (data: any) => {
|
|
|
const result: any = await request.post(
|
|
|
{
|
|
@@ -187,26 +243,37 @@ const passProjectReportHandle = async (data: any) => {
|
|
|
if (result) {
|
|
|
message.success('通过成功!')
|
|
|
getProjectCheckByList()
|
|
|
+ getProjectCheckByCount()
|
|
|
+ getProjectCheckedByCount()
|
|
|
}
|
|
|
}
|
|
|
-const selections = ref<any>()
|
|
|
+const selections = ref<any>([])
|
|
|
const passBatchProjectReportHandle = async () => {
|
|
|
+ if (selections.value.length === 0) {
|
|
|
+ message.error('请至少选择一条数据!')
|
|
|
+ return
|
|
|
+ }
|
|
|
const data = selections.value.map((item) => {
|
|
|
return {
|
|
|
id: item['auditId'],
|
|
|
reportId: item['reportId']
|
|
|
}
|
|
|
})
|
|
|
+ const sendData = {
|
|
|
+ passList: data
|
|
|
+ }
|
|
|
const result: any = await request.post(
|
|
|
{
|
|
|
url: '/projectReport/pass-batch',
|
|
|
- data
|
|
|
+ data: sendData
|
|
|
},
|
|
|
'/business'
|
|
|
)
|
|
|
if (result) {
|
|
|
message.success('批量审核成功!')
|
|
|
getProjectCheckByList()
|
|
|
+ getProjectCheckByCount()
|
|
|
+ getProjectCheckedByCount()
|
|
|
}
|
|
|
}
|
|
|
const handleSelectionChange = (arr) => {
|
|
@@ -240,15 +307,31 @@ const rejectProjectReportHandle = async () => {
|
|
|
if (result) {
|
|
|
message.success('驳回成功!')
|
|
|
getProjectCheckByList()
|
|
|
+ getProjectCheckByCount()
|
|
|
+ getProjectCheckedByCount()
|
|
|
}
|
|
|
}
|
|
|
-const customerType: any = ref([])
|
|
|
-const getCustomerType = (str) => {
|
|
|
- return customerType.value.find((item) => item.value == str)?.label ?? str
|
|
|
-}
|
|
|
+const auditorVisiabled = ref<boolean>(false)
|
|
|
|
|
|
+//审核记录
|
|
|
+const activities = ref<any[]>([])
|
|
|
+const getProjectReportAuditList = async (row: { reportId: string }) => {
|
|
|
+ const result: any = await request.get(
|
|
|
+ {
|
|
|
+ url: '/projectReportAudit/list',
|
|
|
+ params: {
|
|
|
+ reportId: row.reportId
|
|
|
+ }
|
|
|
+ },
|
|
|
+ '/business'
|
|
|
+ )
|
|
|
+ result.reverse()
|
|
|
+ auditorVisiabled.value = true
|
|
|
+ if (result && result.length > 0) {
|
|
|
+ activities.value = result
|
|
|
+ }
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
- customerType.value = getDictOptions('customer_type')
|
|
|
tableHeight.value = tableRef.value.clientHeight
|
|
|
getProjectCheckByList()
|
|
|
})
|
|
@@ -271,6 +354,7 @@ onMounted(() => {
|
|
|
.btnBox {
|
|
|
position: absolute;
|
|
|
right: 20px;
|
|
|
+ z-index: 999;
|
|
|
}
|
|
|
.tabs {
|
|
|
margin-bottom: 10px;
|