|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <ProductDetailsHeader :product="product" :loading="loading" @refresh="getProductData(id)" />
|
|
|
+ <ProductDetailsHeader :loading="loading" :product="product" @refresh="getProductData(id)" />
|
|
|
<el-col>
|
|
|
<el-tabs>
|
|
|
<el-tab-pane label="详细资料">
|
|
@@ -11,16 +11,19 @@
|
|
|
</el-tabs>
|
|
|
</el-col>
|
|
|
</template>
|
|
|
-<script setup lang="ts">
|
|
|
+<script lang="ts" setup>
|
|
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
|
|
import { OperateLogV2VO } from '@/api/system/operatelog'
|
|
|
import * as ProductApi from '@/api/crm/product'
|
|
|
import ProductDetailsHeader from '@/views/crm/product/detail/ProductDetailsHeader.vue'
|
|
|
import ProductDetailsInfo from '@/views/crm/product/detail/ProductDetailsInfo.vue'
|
|
|
+import { BizTypeEnum } from '@/api/crm/permission'
|
|
|
+import { getOperateLogPage } from '@/api/crm/operateLog'
|
|
|
|
|
|
defineOptions({ name: 'CrmProductDetail' })
|
|
|
|
|
|
const route = useRoute()
|
|
|
+const message = useMessage()
|
|
|
const id = Number(route.params.id) // 编号
|
|
|
const loading = ref(true) // 加载中
|
|
|
const product = ref<ProductApi.ProductVO>({} as ProductApi.ProductVO) // 详情
|
|
@@ -42,7 +45,8 @@ const getOperateLog = async (productId: number) => {
|
|
|
if (!productId) {
|
|
|
return
|
|
|
}
|
|
|
- const data = await ProductApi.getOperateLogPage({
|
|
|
+ const data = await getOperateLogPage({
|
|
|
+ bizType: BizTypeEnum.CRM_PRODUCT,
|
|
|
bizId: productId
|
|
|
})
|
|
|
logList.value = data.list
|
|
@@ -53,7 +57,7 @@ const { delView } = useTagsViewStore() // 视图操作
|
|
|
const { currentRoute } = useRouter() // 路由
|
|
|
onMounted(async () => {
|
|
|
if (!id) {
|
|
|
- ElMessage.warning('参数错误,产品不能为空!')
|
|
|
+ message.warning('参数错误,产品不能为空!')
|
|
|
delView(unref(currentRoute))
|
|
|
return
|
|
|
}
|