|
@@ -1,10 +1,10 @@
|
|
|
-<!-- TODO @puhui999:这个组件的注释加下,方便大家打开就知道哈 -->
|
|
|
+<!-- 合同详情页面组件-->
|
|
|
<template>
|
|
|
<ContractDetailsHeader v-loading="loading" :contract="contract">
|
|
|
<el-button v-if="permissionListRef?.validateWrite" @click="openForm('update', contract.id)">
|
|
|
编辑
|
|
|
</el-button>
|
|
|
- <el-button v-if="permissionListRef?.validateOwnerUser" type="primary" @click="transfer">
|
|
|
+ <el-button v-if="permissionListRef?.validateOwnerUser" type="primary" @click="transferContract">
|
|
|
转移
|
|
|
</el-button>
|
|
|
</ContractDetailsHeader>
|
|
@@ -13,6 +13,9 @@
|
|
|
<el-tab-pane label="详细资料">
|
|
|
<ContractDetailsInfo :contract="contract" />
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="产品">
|
|
|
+ <ContractProductList v-model="contract.productItems" />
|
|
|
+ </el-tab-pane>
|
|
|
<el-tab-pane label="操作日志">
|
|
|
<OperateLogV2 :log-list="logList" />
|
|
|
</el-tab-pane>
|
|
@@ -25,18 +28,11 @@
|
|
|
@quit-team="close"
|
|
|
/>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="商机" lazy>
|
|
|
- <BusinessList
|
|
|
- :biz-id="contract.id!"
|
|
|
- :biz-type="BizTypeEnum.CRM_CONTRACT"
|
|
|
- :customer-id="contract.customerId"
|
|
|
- />
|
|
|
- </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-col>
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
<ContractForm ref="formRef" @success="getContractData" />
|
|
|
- <CrmTransferForm ref="crmTransferFormRef" @success="close" />
|
|
|
+ <CrmTransferForm ref="transferFormRef" @success="close" />
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
|
@@ -44,12 +40,12 @@ import { OperateLogV2VO } from '@/api/system/operatelog'
|
|
|
import * as ContractApi from '@/api/crm/contract'
|
|
|
import ContractDetailsHeader from './ContractDetailsHeader.vue'
|
|
|
import ContractDetailsInfo from './ContractDetailsInfo.vue'
|
|
|
+import ContractProductList from './ContractProductList.vue'
|
|
|
import { BizTypeEnum } from '@/api/crm/permission'
|
|
|
import { getOperateLogPage } from '@/api/crm/operateLog'
|
|
|
import ContractForm from '@/views/crm/contract/ContractForm.vue'
|
|
|
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
|
|
import PermissionList from '@/views/crm/permission/components/PermissionList.vue'
|
|
|
-import BusinessList from '@/views/crm/business/components/BusinessList.vue'
|
|
|
|
|
|
defineOptions({ name: 'CrmContractDetail' })
|
|
|
|
|
@@ -91,10 +87,9 @@ const getOperateLog = async (contractId: number) => {
|
|
|
}
|
|
|
|
|
|
/** 转移 */
|
|
|
-// TODO @puhui999:transferFormRef 简洁一点哈
|
|
|
-const crmTransferFormRef = ref<InstanceType<typeof CrmTransferForm>>() // 合同转移表单 ref
|
|
|
-const transfer = () => {
|
|
|
- crmTransferFormRef.value?.open('合同转移', contract.value.id, ContractApi.transfer)
|
|
|
+const transferFormRef = ref<InstanceType<typeof CrmTransferForm>>() // 合同转移表单 ref
|
|
|
+const transferContract = () => {
|
|
|
+ transferFormRef.value?.open('合同转移', contract.value.id, ContractApi.transferContract)
|
|
|
}
|
|
|
|
|
|
/** 关闭 */
|