|
@@ -65,23 +65,37 @@
|
|
|
<el-table-column label="序号" width="60">
|
|
|
<template #default="scope">{{ scope.$index + 1 }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :show-overflow-tooltip="true" prop="contractName" label="合同名称" />
|
|
|
- <el-table-column :show-overflow-tooltip="true" prop="applyType" label="合同类型">
|
|
|
- <template #default="scope">{{ contractType[scope.row.applyType] }}</template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="projectName" label="项目名称" />
|
|
|
- <el-table-column :show-overflow-tooltip="true" prop="projectNumber" label="项目编号" />
|
|
|
<el-table-column prop="zrbm" label="责任部门" width="180" />
|
|
|
- <el-table-column prop="contractAmount" label="分/外包合同额" width="160" />
|
|
|
- <el-table-column prop="client" label="供应商" width="160" />
|
|
|
<el-table-column prop="applyWorker" label="申请人" width="160" />
|
|
|
+ <el-table-column :show-overflow-tooltip="true" prop="applyType" label="申请类型">
|
|
|
+ <template #default="scope">{{
|
|
|
+ scope.row.applyType === 1 ? '分包合同' : scope.row.applyType === 2 ? '外包合同' : ''
|
|
|
+ }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="applyDate" label="申请时间" width="160" />
|
|
|
+ <el-table-column prop="client" label="供应商" width="160" />
|
|
|
+ <el-table-column prop="contractAmount" label="申请金额" width="160" />
|
|
|
<el-table-column label="是否签合同" width="120">
|
|
|
<template #default="scope">{{ isSignType[scope.row.isSign] }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" fixed="right" width="80">
|
|
|
+ <el-table-column label="状态" width="120">
|
|
|
+ <template #default="scope">{{
|
|
|
+ scope.row.isSign == 1
|
|
|
+ ? getDictLabel(DICT_TYPE.CONTRACT_SIGN_STATUS, scope.row.contractSubFlowStatus)
|
|
|
+ : ''
|
|
|
+ }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" fixed="right">
|
|
|
<template #default="scope">
|
|
|
- <div class="operateBtn" @click="operateClick(scope.row)">
|
|
|
- <span>查看</span>
|
|
|
+ <div class="operateBtn" style="width: 100%">
|
|
|
+ <span @click="openFlowPage(scope.row)">查看申请流程</span>
|
|
|
+ <span
|
|
|
+ @click="operateClick(scope.row)"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ v-if="scope.row.isSign == 1 && scope.row.contractSubFlowStatus == 1"
|
|
|
+ >查看合同</span
|
|
|
+ >
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -104,8 +118,9 @@
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
import { PageParam } from '@/interface/common'
|
|
|
-import { openFlow } from '@/utils/flow'
|
|
|
+import { openFlow, openProcessFlow } from '@/utils/flow'
|
|
|
import request from '@/config/axios'
|
|
|
+import { DICT_TYPE, getDictLabel } from '@/utils/dict'
|
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
|
|
|
|
|
defineOptions({ name: 'ProjectBook' })
|
|
@@ -117,12 +132,6 @@ if (routeName === 'MyContractSubOut') {
|
|
|
const user = wsCache.get(CACHE_KEY.USER)
|
|
|
userId = user.user.id ? user.user.id : ''
|
|
|
}
|
|
|
-const contractType = {
|
|
|
- 1: '分包合同',
|
|
|
- 2: '外包合同'
|
|
|
-} as {
|
|
|
- [key: number]: string
|
|
|
-}
|
|
|
const isSignType = {
|
|
|
1: '是',
|
|
|
0: '否'
|
|
@@ -184,6 +193,7 @@ const currentProcess = ref<{
|
|
|
contractId: string
|
|
|
applyType: number
|
|
|
isSign: number
|
|
|
+ contractSubFlowStatus: number
|
|
|
projectId?: string
|
|
|
clientId?: string
|
|
|
} | null>(null)
|
|
@@ -195,6 +205,7 @@ const handleSelectionChange = (arrs) => {
|
|
|
contractId: item.contractId,
|
|
|
applyType: item.applyType,
|
|
|
isSign: item.isSign,
|
|
|
+ contractSubFlowStatus: item.contractSubFlowStatus,
|
|
|
projectId: item.projectId
|
|
|
}
|
|
|
}
|
|
@@ -208,6 +219,14 @@ const processSubmit = async (): Promise<void> => {
|
|
|
ElMessage.warning('该合同不能签合同,无法发起合同签订!')
|
|
|
return
|
|
|
}
|
|
|
+ if (currentProcess.value?.contractSubFlowStatus === 2) {
|
|
|
+ ElMessage.warning('该合同签订中,无法再发起合同签订!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (currentProcess.value?.contractSubFlowStatus === 1) {
|
|
|
+ ElMessage.warning('该合同已签合同,无法再发起合同签订!')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (currentProcess.value?.applyType === 1) {
|
|
|
urlApi = `/subcontract/process`
|
|
|
} else if (currentProcess.value?.applyType === 2) {
|
|
@@ -226,8 +245,21 @@ const processSubmit = async (): Promise<void> => {
|
|
|
})
|
|
|
}
|
|
|
const useMoneySubmit = (): void => {
|
|
|
+ if (currentProcess.value?.isSign == 1) {
|
|
|
+ ElMessageBox.alert('是否前往合同详情页面发起用款申请!', '发起用款', {
|
|
|
+ confirmButtonText: '发起',
|
|
|
+ callback: (action: any) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
+ operateClick({
|
|
|
+ projectId: currentProcess.value?.projectId,
|
|
|
+ contractId: currentProcess.value?.contractId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
const urlApi: string = '/UseMoney/contractProcess'
|
|
|
- console.log(currentProcess.value)
|
|
|
request
|
|
|
.get(
|
|
|
{
|
|
@@ -258,6 +290,11 @@ const operateClick = (row: any) => {
|
|
|
query: { id: row.projectId, contractId: row.contractId }
|
|
|
})
|
|
|
}
|
|
|
+const openFlowPage = (row: any) => {
|
|
|
+ openProcessFlow(router, row.instanceId, {
|
|
|
+ title: '查看申请流程'
|
|
|
+ })
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
tableHeight.value = tableRef.value.clientHeight
|
|
|
})
|