项目详情、合同详情互相跳转

This commit is contained in:
zhaoxiao
2021-10-18 10:16:31 +08:00
parent a45fe9b544
commit 77a06f524f
2 changed files with 71 additions and 55 deletions
+63 -50
View File
@@ -37,61 +37,62 @@
<!-- 表格区域-->
<div>
<a-spin :spinning="loading">
<project-table :column-data="columns" :table-data="dataSource" @change="handlePageChange">
<!-- 打包需要发票-->
<template v-slot:status-pack="{record, text}">
<status-slot :statu-obj="record" :status-no="text"></status-slot>
</template>
<!-- 到账-->
<template v-slot:status="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
</template>
<!-- 开票-->
<template v-slot:status-bill="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot>
</template>
<!-- 邮寄-->
<template v-slot:status-mail="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="mail"></status-slot>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record}">
<div @click="openDetailModal(record)" class="project-name">
{{ record.chargeProject }}
</div>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record}">
<div @click="openDetailModal(record)" class="project-name">
<j-ellipsis style="font-size: 14px" :value="record.projectName" :length="20"></j-ellipsis>
</div>
</template>
<!-- 需要tooltip的文本-->
<template v-slot:text="{record,text}">
<a-tooltip>
<template slot="title">
<project-table :column-data="columns" :table-data="dataSource" @change="handlePageChange">
<!-- 打包需要发票-->
<template v-slot:status-pack="{record, text}">
<status-slot :statu-obj="record" :status-no="text"></status-slot>
</template>
<!-- 到账-->
<template v-slot:status="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
</template>
<!-- 开票-->
<template v-slot:status-bill="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot>
</template>
<!-- 邮寄-->
<template v-slot:status-mail="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="mail"></status-slot>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record}">
<div @click="openDetailModal(record)" class="project-name">
{{ record.chargeProject }}
</div>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record}">
<div @click="openDetailModal(record)" class="project-name">
<j-ellipsis style="font-size: 14px" :value="record.projectName" :length="20"></j-ellipsis>
</div>
</template>
<!-- 需要tooltip的文本-->
<template v-slot:text="{record,text}">
<a-tooltip>
<template slot="title">
{{ text }}
</template>
{{ text }}
</template>
{{ text }}
</a-tooltip>
</template>
<!-- 金额-->
<template v-slot:money="{record,text}">
<a-tooltip>
<template slot="title">
</a-tooltip>
</template>
<!-- 金额-->
<template v-slot:money="{record,text}">
<a-tooltip>
<template slot="title">
{{ text }}
</template>
{{ text }}
</template>
{{ text }}
</a-tooltip>
</template>
</project-table>
</a-tooltip>
</template>
</project-table>
</a-spin>
</div>
<!-- 表格区域end-->
</a-card>
<project-detail-modal ref="projectDetail"></project-detail-modal>
<project-detail-modal ref="projectDetail" @openContractModule="handleOpenContractModule"></project-detail-modal>
<mine-contract-module :contract-id="contractId" :visible.sync="contractModuleVisible" @openProjectDetail="openDetailModal"></mine-contract-module>
</div>
</template>
<script>
@@ -99,11 +100,12 @@ import { JeroListMixin } from '@/mixins/JeroListMixin'
import ProjectTable from '@comp/table/ProjectTable'
import ProjectDetailModal from '@views/MessagePage/ProjectDetailModal'
import StatusSlot from '@comp/tools/StatusSlot'
import JEllipsis from "@comp/jero/JEllipsis"
import JEllipsis from '@comp/jero/JEllipsis'
import MineContractModule from '@views/mineContract/modules/MineContractModule'
export default {
name: 'DataMember',
components: { ProjectTable, ProjectDetailModal,StatusSlot,JEllipsis },
components: { ProjectTable, ProjectDetailModal, StatusSlot, JEllipsis, MineContractModule },
mixins: [JeroListMixin],
data() {
return {
@@ -156,7 +158,10 @@ export default {
col: 2
}
],
loading:false,
loading: false,
// 合同详情
contractModuleVisible: false,
contractId: '',
url: {
list: '/jero/memberProjectSubitem/pageCompany'
}
@@ -171,6 +176,14 @@ export default {
this.ipagination.current = pagination.current
this.ipagination.pageSize = pagination.pageSize
this.loadData()
},
/**
* 打开合同详情
* @param contractId
*/
handleOpenContractModule(contractId) {
this.contractId = contractId
this.contractModuleVisible = true
}
}
}
+8 -5
View File
@@ -36,7 +36,7 @@
<template slot="title">
{{ text }}
</template>
<div @click="openDetail(record)" class="project-name">
<div @click="openDetail(record.id)" class="project-name">
{{ text }}
</div>
</a-tooltip>
@@ -56,7 +56,8 @@
<!-- 表格区域end-->
</a-card>
<mine-contract-module :visible.sync="detailVisible" :contract-id="contractId"></mine-contract-module>
<project-detail-modal ref="projectDetail" @openContractModule="openDetail"></project-detail-modal>
<mine-contract-module :visible.sync="detailVisible" :contract-id="contractId" @openProjectDetail="openDetailModal"></mine-contract-module>
</div>
</template>
<script>
@@ -65,10 +66,11 @@ import ProjectTable from '@comp/table/ProjectTable'
import MineContractModule from '@views/mineContract/modules/MineContractModule'
import StatusSlot from '@comp/tools/StatusSlot'
import { getContractDetailById } from '@api/incomePaymentsApi'
import ProjectDetailModal from '@views/MessagePage/ProjectDetailModal'
export default {
name: 'MineContract',
components: { ProjectTable, MineContractModule, StatusSlot },
components: { ProjectTable, MineContractModule, StatusSlot, ProjectDetailModal },
mixins: [JeroListMixin],
data() {
return {
@@ -105,6 +107,7 @@ export default {
},
contractId: '',
detailVisible: false,
projectType: null
}
},
methods: {
@@ -118,8 +121,8 @@ export default {
this.ipagination.pageSize = pagination.pageSize
this.loadData()
},
openDetail(record) {
this.contractId = record.id
openDetail(id) {
this.contractId = id
this.detailVisible = true
}
}