|
1 | 1 | <!-- 待进入公海的客户 -->
|
2 |
| -<!-- TODO: 后续再统一改名字 --> |
3 | 2 | <template>
|
4 |
| - <div> |
5 |
| - TODO: 待进入公海的客户 |
6 |
| - </div> |
| 3 | + <ContentWrap> |
| 4 | + <div class="pb-5 text-xl"> 待进入公海的客户 </div> |
| 5 | + <!-- 搜索工作栏 --> |
| 6 | + <el-form |
| 7 | + ref="queryFormRef" |
| 8 | + :inline="true" |
| 9 | + :model="queryParams" |
| 10 | + class="-mb-15px" |
| 11 | + label-width="68px" |
| 12 | + > |
| 13 | + <el-form-item label="归属" prop="sceneType"> |
| 14 | + <el-select |
| 15 | + v-model="queryParams.sceneType" |
| 16 | + class="!w-240px" |
| 17 | + placeholder="归属" |
| 18 | + @change="handleQuery" |
| 19 | + > |
| 20 | + <el-option |
| 21 | + v-for="(option, index) in SCENE_TYPES" |
| 22 | + :label="option.label" |
| 23 | + :value="option.value" |
| 24 | + :key="index" |
| 25 | + /> |
| 26 | + </el-select> |
| 27 | + </el-form-item> |
| 28 | + </el-form> |
| 29 | + </ContentWrap> |
| 30 | + <ContentWrap> |
| 31 | + <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true"> |
| 32 | + <el-table-column align="center" label="编号" prop="id" /> |
| 33 | + <el-table-column align="center" label="客户名称" prop="name" width="160"> |
| 34 | + <template #default="scope"> |
| 35 | + <el-link :underline="false" type="primary" @click="openDetail(scope.row.id)"> |
| 36 | + {{ scope.row.name }} |
| 37 | + </el-link> |
| 38 | + </template> |
| 39 | + </el-table-column> |
| 40 | + <el-table-column align="center" label="手机" prop="mobile" width="120" /> |
| 41 | + <el-table-column align="center" label="电话" prop="telephone" width="120" /> |
| 42 | + <el-table-column align="center" label="客户来源" prop="source" width="100"> |
| 43 | + <template #default="scope"> |
| 44 | + <dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="scope.row.source" /> |
| 45 | + </template> |
| 46 | + </el-table-column> |
| 47 | + <el-table-column align="center" label="所属行业" prop="industryId" width="120"> |
| 48 | + <template #default="scope"> |
| 49 | + <dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" /> |
| 50 | + </template> |
| 51 | + </el-table-column> |
| 52 | + <el-table-column align="center" label="客户等级" prop="level" width="120"> |
| 53 | + <template #default="scope"> |
| 54 | + <dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="scope.row.level" /> |
| 55 | + </template> |
| 56 | + </el-table-column> |
| 57 | + <el-table-column align="center" label="网址" prop="website" width="200" /> |
| 58 | + <el-table-column |
| 59 | + :formatter="dateFormatter" |
| 60 | + align="center" |
| 61 | + label="下次联系时间" |
| 62 | + prop="contactNextTime" |
| 63 | + width="180px" |
| 64 | + /> |
| 65 | + <el-table-column align="center" label="备注" prop="remark" width="200" /> |
| 66 | + <el-table-column align="center" label="成交状态" prop="dealStatus"> |
| 67 | + <template #default="scope"> |
| 68 | + <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" /> |
| 69 | + </template> |
| 70 | + </el-table-column> |
| 71 | + <el-table-column align="center" label="距进入公海天数" prop="poolDay" width="100px" /> |
| 72 | + <el-table-column |
| 73 | + :formatter="dateFormatter" |
| 74 | + align="center" |
| 75 | + label="最后跟进时间" |
| 76 | + prop="contactLastTime" |
| 77 | + width="180px" |
| 78 | + /> |
| 79 | + <el-table-column |
| 80 | + :formatter="dateFormatter" |
| 81 | + align="center" |
| 82 | + label="创建时间" |
| 83 | + prop="updateTime" |
| 84 | + width="180px" |
| 85 | + /> |
| 86 | + <el-table-column |
| 87 | + :formatter="dateFormatter" |
| 88 | + align="center" |
| 89 | + label="创建时间" |
| 90 | + prop="createTime" |
| 91 | + width="180px" |
| 92 | + /> |
| 93 | + <el-table-column align="center" label="负责人" prop="ownerUserName" width="100px" /> |
| 94 | + <el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" /> |
| 95 | + <el-table-column align="center" label="创建人" prop="creatorName" width="100px" /> |
| 96 | + </el-table> |
| 97 | + <!-- 分页 --> |
| 98 | + <Pagination |
| 99 | + v-model:limit="queryParams.pageSize" |
| 100 | + v-model:page="queryParams.pageNo" |
| 101 | + :total="total" |
| 102 | + @pagination="getList" |
| 103 | + /> |
| 104 | + </ContentWrap> |
7 | 105 | </template>
|
8 | 106 |
|
9 |
| -<script setup lang="ts" name="PutInPoolRemind"> |
| 107 | +<script lang="ts" setup name="PutInPoolRemind"> |
| 108 | +import * as CustomerApi from '@/api/crm/customer' |
| 109 | +import { DICT_TYPE } from '@/utils/dict' |
| 110 | +import { dateFormatter } from '@/utils/formatTime' |
| 111 | +import { SCENE_TYPES } from './common' |
10 | 112 |
|
11 |
| -</script> |
| 113 | +const { push } = useRouter() |
| 114 | +
|
| 115 | +const loading = ref(true) // 列表的加载中 |
| 116 | +const total = ref(0) // 列表的总页数 |
| 117 | +const list = ref([]) // 列表的数据 |
| 118 | +const queryParams = ref({ |
| 119 | + pageNo: 1, |
| 120 | + pageSize: 10, |
| 121 | + sceneType: 1, // 我负责的 |
| 122 | + pool: true, // 固定 公海参数为 true |
| 123 | +}) |
| 124 | +const queryFormRef = ref() // 搜索的表单 |
| 125 | +
|
| 126 | +/** 查询列表 */ |
| 127 | +const getList = async () => { |
| 128 | + loading.value = true |
| 129 | + try { |
| 130 | + const data = await CustomerApi.getPutInPoolRemindCustomerPage(queryParams.value) |
| 131 | + list.value = data.list |
| 132 | + total.value = data.total |
| 133 | + } finally { |
| 134 | + loading.value = false |
| 135 | + } |
| 136 | +} |
12 | 137 |
|
13 |
| -<style scoped> |
| 138 | +/** 搜索按钮操作 */ |
| 139 | +const handleQuery = () => { |
| 140 | + queryParams.value.pageNo = 1 |
| 141 | + getList() |
| 142 | +} |
| 143 | +
|
| 144 | +/** 打开客户详情 */ |
| 145 | +const openDetail = (id: number) => { |
| 146 | + push({ name: 'CrmCustomerDetail', params: { id } }) |
| 147 | +} |
| 148 | +
|
| 149 | +/** 初始化 **/ |
| 150 | +onMounted(() => { |
| 151 | + getList() |
| 152 | +}) |
| 153 | +</script> |
14 | 154 |
|
15 |
| -</style> |
| 155 | +<style lang="scss"></style> |
0 commit comments