PutInPoolRemind.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <!-- 待进入公海的客户 -->
  2. <template>
  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>
  105. </template>
  106. <script lang="ts" setup name="PutInPoolRemind">
  107. import * as CustomerApi from '@/api/crm/customer'
  108. import { DICT_TYPE } from '@/utils/dict'
  109. import { dateFormatter } from '@/utils/formatTime'
  110. import { SCENE_TYPES } from './common'
  111. const { push } = useRouter()
  112. const loading = ref(true) // 列表的加载中
  113. const total = ref(0) // 列表的总页数
  114. const list = ref([]) // 列表的数据
  115. const queryParams = ref({
  116. pageNo: 1,
  117. pageSize: 10,
  118. sceneType: 1, // 我负责的
  119. pool: true, // 固定 公海参数为 true
  120. })
  121. const queryFormRef = ref() // 搜索的表单
  122. /** 查询列表 */
  123. const getList = async () => {
  124. loading.value = true
  125. try {
  126. const data = await CustomerApi.getPutInPoolRemindCustomerPage(queryParams.value)
  127. list.value = data.list
  128. total.value = data.total
  129. } finally {
  130. loading.value = false
  131. }
  132. }
  133. /** 搜索按钮操作 */
  134. const handleQuery = () => {
  135. queryParams.value.pageNo = 1
  136. getList()
  137. }
  138. /** 打开客户详情 */
  139. const openDetail = (id: number) => {
  140. push({ name: 'CrmCustomerDetail', params: { id } })
  141. }
  142. /** 初始化 **/
  143. onMounted(() => {
  144. getList()
  145. })
  146. </script>
  147. <style lang="scss"></style>