| | |
| | | import { ref } from 'vue'; |
| | | import { useRouter } from 'vue-router'; |
| | | |
| | | import { DocAlert, Page, useVbenModal } from '..\..\..\packages\effects\common-ui\src'; |
| | | import { downloadFileFromBlobPart } from '..\..\..\packages\utils\src'; |
| | | import { Page, useVbenModal } from '@vben/common-ui'; |
| | | import { downloadFileFromBlobPart } from '@vben/utils'; |
| | | |
| | | import { Button, message, Tabs } from 'ant-design-vue'; |
| | | import { Button, message, Tabs, Tag } from 'ant-design-vue'; |
| | | |
| | | import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { |
| | |
| | | |
| | | const { push } = useRouter(); |
| | | const sceneType = ref('1'); |
| | | |
| | | const STATUS_COLORS: Record<string, string> = { |
| | | 拜访: 'default', |
| | | 初步接触: 'processing', |
| | | 需求确认: 'cyan', |
| | | 方案报价: 'orange', |
| | | 商务谈判: 'volcano', |
| | | 合同签订: 'success', |
| | | 赢单: 'success', |
| | | 输单: 'error', |
| | | 无效: 'default', |
| | | }; |
| | | |
| | | function getStatusColor(name: string): string { |
| | | return STATUS_COLORS[name] || 'blue'; |
| | | } |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <Page auto-content-height> |
| | | <template #doc> |
| | | <DocAlert |
| | | title="【商机】商机管理、商机状态" |
| | | url="https://doc.iocoder.cn/crm/business/" |
| | | /> |
| | | <DocAlert |
| | | title="【通用】数据权限" |
| | | url="https://doc.iocoder.cn/crm/permission/" |
| | | /> |
| | | </template> |
| | | |
| | | <FormModal @success="handleRefresh" /> |
| | | <Page auto-content-height><FormModal @success="handleRefresh" /> |
| | | <Grid> |
| | | <template #toolbar-actions> |
| | | <Tabs class="w-full" @change="handleChangeSceneType"> |
| | |
| | | {{ row.customerName }} |
| | | </Button> |
| | | </template> |
| | | <template #statusName="{ row }"> |
| | | <Tag v-if="row.statusName" :color="getStatusColor(row.statusName)">{{ row.statusName }}</Tag> |
| | | </template> |
| | | <template #actions="{ row }"> |
| | | <TableAction |
| | | :actions="[ |