CRM:合同的 code review

(cherry picked from commit 956f19d9d0)
This commit is contained in:
YunaiV
2024-02-01 13:38:14 +08:00
committed by shizhong
parent 82fbaa16a3
commit ff84ef64a5
15 changed files with 75 additions and 28 deletions

View File

@ -1,3 +1,4 @@
<!-- TODO @puhui999这个组件的注释加下方便大家打开就知道哈 -->
<template>
<div>
<div class="flex items-start justify-between">

View File

@ -1,3 +1,4 @@
<!-- TODO @puhui999这个组件的注释加下方便大家打开就知道哈 -->
<template>
<ContentWrap>
<el-collapse v-model="activeNames">

View File

@ -1,3 +1,4 @@
<!-- TODO @puhui999这个组件的注释加下方便大家打开就知道哈 -->
<template>
<ContractDetailsHeader v-loading="loading" :contract="contract">
<el-button v-if="permissionListRef?.validateWrite" @click="openForm('update', contract.id)">
@ -57,11 +58,14 @@ const message = useMessage()
const contractId = ref(0) // 编号
const loading = ref(true) // 加载中
const contract = ref<ContractApi.ContractVO>({} as ContractApi.ContractVO) // 详情
const permissionListRef = ref<InstanceType<typeof PermissionList>>() // 团队成员列表 Ref
/** 编辑 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 获取详情 */
const getContractData = async () => {
loading.value = true
@ -86,18 +90,21 @@ const getOperateLog = async (contractId: number) => {
logList.value = data.list
}
/** 转移 */
// TODO @puhui999transferFormRef 简洁一点哈
const crmTransferFormRef = ref<InstanceType<typeof CrmTransferForm>>() // 合同转移表单 ref
const transfer = () => {
crmTransferFormRef.value?.open('合同转移', contract.value.id, ContractApi.transfer)
}
const permissionListRef = ref<InstanceType<typeof PermissionList>>() // 团队成员列表 Ref
/** 初始化 */
/** 关闭 */
const { delView } = useTagsViewStore() // 视图操作
const { currentRoute } = useRouter() // 路由
const close = () => {
delView(unref(currentRoute))
}
/** 初始化 */
onMounted(async () => {
const id = route.params.id
if (!id) {