Skip to content

Commit cf7036d

Browse files
committed
✨ CRM:完善商机产品的展示列表
1 parent 8512fe6 commit cf7036d

File tree

3 files changed

+83
-0
lines changed

3 files changed

+83
-0
lines changed

src/api/crm/business/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ export interface BusinessVO {
2727
creatorName?: string // 创建人名称
2828
createTime: Date // 创建时间
2929
updateTime: Date // 更新时间
30+
products?: [
31+
{
32+
id: number
33+
productId: number
34+
productName: string
35+
productNo: string
36+
productUnit: number
37+
productPrice: number
38+
businessPrice: number
39+
count: number
40+
totalPrice: number
41+
}
42+
]
3043
}
3144

3245
// 查询 CRM 商机列表
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<template>
2+
<ContentWrap>
3+
<el-table :data="business.products" :stripe="true" :show-overflow-tooltip="true">
4+
<el-table-column
5+
align="center"
6+
label="产品名称"
7+
fixed="left"
8+
prop="productName"
9+
min-width="160"
10+
>
11+
<template #default="scope">
12+
{{ scope.row.productName }}
13+
</template>
14+
</el-table-column>
15+
<el-table-column label="产品条码" align="center" prop="productNo" min-width="120" />
16+
<el-table-column align="center" label="产品单位" prop="productUnit" min-width="160">
17+
<template #default="{ row }">
18+
<dict-tag :type="DICT_TYPE.CRM_PRODUCT_UNIT" :value="row.productUnit" />
19+
</template>
20+
</el-table-column>
21+
<el-table-column
22+
label="产品价格(元)"
23+
align="center"
24+
prop="productPrice"
25+
min-width="140"
26+
:formatter="erpPriceTableColumnFormatter"
27+
/>
28+
<el-table-column
29+
label="合同价格(元)"
30+
align="center"
31+
prop="businessPrice"
32+
min-width="140"
33+
:formatter="erpPriceTableColumnFormatter"
34+
/>
35+
<el-table-column
36+
align="center"
37+
label="数量"
38+
prop="count"
39+
min-width="100px"
40+
:formatter="erpPriceTableColumnFormatter"
41+
/>
42+
<el-table-column
43+
label="合计金额(元)"
44+
align="center"
45+
prop="totalPrice"
46+
min-width="140"
47+
:formatter="erpPriceTableColumnFormatter"
48+
/>
49+
</el-table>
50+
<el-row class="mt-10px" justify="end">
51+
<el-col :span="3"> 整单折扣:{{ erpPriceInputFormatter(business.discountPercent) }}% </el-col>
52+
<el-col :span="4">
53+
产品总金额:{{ erpPriceInputFormatter(business.totalProductPrice) }} 元
54+
</el-col>
55+
</el-row>
56+
</ContentWrap>
57+
</template>
58+
<script setup lang="ts">
59+
import * as BusinessApi from '@/api/crm/business'
60+
import { erpPriceInputFormatter, erpPriceTableColumnFormatter } from '@/utils'
61+
import { DICT_TYPE } from '@/utils/dict'
62+
63+
const { business } = defineProps<{
64+
business: BusinessApi.BusinessVO
65+
}>()
66+
</script>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
:customer-id="business.customerId"
2424
/>
2525
</el-tab-pane>
26+
<!-- TODO 合同 -->
27+
<el-tab-pane label="产品">
28+
<BusinessProductList :business="business" />
29+
</el-tab-pane>
2630
<el-tab-pane label="操作日志">
2731
<OperateLogV2 :log-list="logList" />
2832
</el-tab-pane>

0 commit comments

Comments
 (0)