Skip to content

Commit cec8582

Browse files
committed
crm:code review 客户详情
1 parent 324d1e8 commit cec8582

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed

src/views/crm/clue/ClueForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<el-form-item label="线索名称" prop="name">
1111
<el-input v-model="formData.name" placeholder="请输入线索名称" />
1212
</el-form-item>
13+
<!-- TODO 芋艿:后续客户的选择 -->
1314
<el-form-item label="客户" prop="customerId">
1415
<el-select v-model="formData.customerId" clearable placeholder="请选择客户">
1516
<el-option

src/views/crm/config/customerLimitConfig/customerLimitConfig.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/views/crm/customer/detail/CustomerBasicInfo.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
<script setup lang="ts">
1313
import * as CustomerApi from '@/api/crm/customer'
1414
15-
const { customer } = defineProps<{ customer: CustomerApi.CustomerVO }>()
15+
const { customer } = defineProps<{
16+
customer: CustomerApi.CustomerVO
17+
}>()
1618
</script>

src/views/crm/customer/detail/CustomerDetails.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ import * as CustomerApi from '@/api/crm/customer'
8787
import { DICT_TYPE } from '@/utils/dict'
8888
import { formatDate } from '@/utils/formatTime'
8989
90-
const { customer } = defineProps<{ customer: CustomerApi.CustomerVO }>()
90+
const { customer } = defineProps<{
91+
customer: CustomerApi.CustomerVO
92+
}>()
9193
9294
// 展示的折叠面板
9395
const activeNames = ref(['basicInfo', 'systemInfo'])

src/views/crm/customer/detail/CustomerDetailsTop.vue renamed to src/views/crm/customer/detail/CustomerDetailsHeader.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div>
88
<div>
99
<!-- 右上:按钮 -->
10-
<el-button v-hasPermi="['crm:customer:update']" @click="openForm('update', customer.id)">
10+
<el-button v-hasPermi="['crm:customer:update']" @click="openForm(customer.id)">
1111
编辑
1212
</el-button>
1313
<el-button>更改成交状态</el-button>
@@ -70,16 +70,20 @@
7070
<script setup lang="ts">
7171
import * as CustomerApi from '@/api/crm/customer'
7272
import { DICT_TYPE } from '@/utils/dict'
73+
// TODO @wanwan:是不是把 CustomerBasicInfo 也放进来。
7374
import CustomerBasicInfo from '@/views/crm/customer/detail/CustomerBasicInfo.vue'
7475
import CustomerForm from '@/views/crm/customer/CustomerForm.vue'
7576
76-
const { customer, loading } = defineProps<{ customer: CustomerApi.CustomerVO; loading: boolean }>()
77-
78-
const openForm = (type: string, id?: number) => {
79-
formRef.value.open(type, id)
80-
}
77+
const { customer, loading } = defineProps<{
78+
customer: CustomerApi.CustomerVO
79+
loading: boolean
80+
}>()
8181
82+
/** 修改操作 */
8283
const formRef = ref()
84+
const openForm = (id?: number) => {
85+
formRef.value.open('update', id)
86+
}
8387
8488
const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
8589
</script>

src/views/crm/customer/detail/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<CustomerDetailsTop :customer="customer" :loading="loading" @refresh="getCustomerData(id)" />
2+
<CustomerDetailsHeader :customer="customer" :loading="loading" @refresh="getCustomerData(id)" />
33
<el-col>
44
<el-tabs>
55
<el-tab-pane label="详细资料">
@@ -66,7 +66,7 @@ const loading = ref(true) // 加载中
6666
/**
6767
* 获取详情
6868
*
69-
* @param id
69+
* @param id 客户编号
7070
*/
7171
const customer = ref<CustomerApi.CustomerVO>({} as CustomerApi.CustomerVO) // 客户详情
7272
const getCustomerData = async (id: number) => {

0 commit comments

Comments
 (0)