index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <template>
  2. <div class="main_container">
  3. <TopBackNav>
  4. <template #topRight>
  5. <div class="header_content">
  6. <span>{{ customerBaseMsg.schoolName }}</span>
  7. <el-tag type="success" effect="light" size="small" :disable-transitions="true" class="status_tag">
  8. {{ customerBaseMsg.customerType }}
  9. </el-tag>
  10. </div>
  11. <div class="desc">
  12. <span>学段:{{ customerBaseMsg.educationStage }}</span>
  13. <span>省份:{{ customerBaseMsg.province }}</span>
  14. <span>地区:{{ customerBaseMsg.district }}</span>
  15. <span>地址:{{ customerBaseMsg.address }}</span>
  16. <span>归属人:{{ customerBaseMsg.owner }}</span>
  17. <span>认领时间:{{ customerBaseMsg.claimTime }}</span>
  18. <span>上次跟进时间:{{ customerBaseMsg.lastFollowUpTime }}</span>
  19. </div>
  20. <div class="action">
  21. <el-button class="button_background" @click="OpenFollowlFormDialog"><img :src="peopleEditIcon" alt=""> 写跟进</el-button>
  22. <el-button class="button_border" @click="OpenConcactPeoplelFormDialog"><img :src="addIcon" alt=""> 新增联系人</el-button>
  23. <el-button class="button_refresh" @click="OpenSchoolFormDialog"><img :src="editIcon" alt="" > 编辑</el-button>
  24. <el-button class="button_refresh"><img :src="poepleMoveIcon" alt=""> 转至公海</el-button>
  25. <el-button class="button_refresh" @click="OpenTransferFormDialog"><img :src="exchangeIcon" alt="" > 转让</el-button>
  26. <el-button class="button_refresh" @click="OpenOperationRecordDialog"><img :src="logIcon" alt=""> 操作记录</el-button>
  27. </div>
  28. </template>
  29. </TopBackNav>
  30. <div class="page_item bottom_detail end_item">
  31. <TabSearch :defaultTabKey="defaultShowTab"
  32. tabType="line" :tabList="tabList"
  33. @tabChange="HandleTabChange"
  34. />
  35. <div class="page_solid_line" />
  36. <div class="page_jg_20" style="flex-shrink: 0 !important;"></div>
  37. <!-- 联系人详情 -->
  38. <ContactDetail v-if="defaultShowTab === 'contactDetails'"/>
  39. <CustomerStatusOverview v-if="defaultShowTab === 'messageOverview'"/>
  40. </div>
  41. <!-- 转让 弹窗 -->
  42. <FormDialog
  43. v-if="transferFormDialogVisible"
  44. title="转让" :visible="transferFormDialogVisible"
  45. :submit-loading="transferFormDialogSubmitLoading"
  46. :default-form-data="transferDefaultFormData"
  47. :formItemList="formItemList"
  48. @close="CloseTransferFormDialog"
  49. @confirm="HandleTransferFormDialogConfirm">
  50. </FormDialog>
  51. <!-- 操作记录 弹窗 -->
  52. <PreviewDialog
  53. v-if="operationRecordDialogVisible"
  54. class="operation_dialog"
  55. title="操作记录"
  56. :previewVisible="operationRecordDialogVisible"
  57. :customFooter="true"
  58. @close="CloseOperationRecordDialog">
  59. <SearchBlock :searchList="operationRecordSearchList"></SearchBlock>
  60. <FollowCard :card-list="finalOperationLogRenderData">
  61. <template #operation><i></i></template>
  62. </FollowCard>
  63. <Pagination :currentPage="currentPage" :pageSize="pageSize" :totalNum="totalNum"></Pagination>
  64. <template #close>
  65. <el-button @click="CloseOperationRecordDialog" class="button_background" >关闭</el-button>
  66. </template>
  67. <template #confirm><i></i></template>
  68. </PreviewDialog>
  69. <!-- 编辑学校弹窗 -->
  70. <SchoolFormDialog
  71. v-if="schoolVisible"
  72. v-model:visible="schoolVisible"
  73. :defaultFormData="schoolDefaultFormData">
  74. </SchoolFormDialog>
  75. <!-- 新增联系人弹窗 -->
  76. <ConcactPeopleFormDialog
  77. v-if="concactPeopleVisible"
  78. v-model:visible="concactPeopleVisible"
  79. title="新增联系人"
  80. :default-form-data="concactPeopleDefaultFormData">
  81. </ConcactPeopleFormDialog>
  82. <!-- 写跟进弹窗 -->
  83. <FollowFormDialog
  84. v-if="followVisible"
  85. v-model:visible="followVisible"
  86. :defaultFormData="followDefaultFormData">
  87. </FollowFormDialog>
  88. </div>
  89. </template>
  90. <script setup lang="ts">
  91. import { ref, computed } from 'vue';
  92. import TopBackNav from '@/baseComponents/TopBackNav.vue';
  93. import addIcon from '@/assets/icon/add.svg';
  94. import peopleEditIcon from '@/assets/icon/people_edit.png'
  95. import poepleMoveIcon from '@/assets/icon/people_move.png'
  96. import editIcon from '@/assets/icon/edit.svg'
  97. import exchangeIcon from '@/assets/icon/exchange.png'
  98. import logIcon from '@/assets/icon/log.png'
  99. import TabSearch from '@/baseComponents/TabSearch.vue';
  100. import {tabList} from './tabSearch'
  101. import FormDialog from '@/baseComponents/FormDialog.vue';
  102. import {formItemList} from './formDialog'
  103. import ContactDetail from './contactDetail/index.vue'
  104. import CustomerStatusOverview from './customerStatusOverview/index.vue'
  105. import PreviewDialog from '@/baseComponents/PreviewDialog.vue';
  106. import SearchBlock from '@/baseComponents/SearchBlock.vue';
  107. import {operationRecordSearchList} from './searchBlock'
  108. import FollowCard from '@/components/FollowCard.vue';
  109. import Pagination from '@/baseComponents/Pagination.vue';
  110. import SchoolFormDialog from '@/components/SchoolFormDialog/index.vue'
  111. import ConcactPeopleFormDialog from './components/ConcactPeopleFormDialog/index.vue'
  112. import FollowFormDialog from './components/FollowFormDialog/index.vue'
  113. const customerBaseMsg = ref({
  114. schoolName: '北京市第一零九中学',
  115. customerType: '首单客户',
  116. educationStage: '九年一贯',
  117. province: '北京',
  118. district: '东城区',
  119. address: '北京市东城区葱店西街56号',
  120. owner: '张三',
  121. claimTime: '2024-09-20',
  122. lastFollowUpTime: '2025-03-12'
  123. });
  124. // 默认列表的tab切换
  125. const defaultShowTab = ref('messageOverview')
  126. const HandleTabChange = (val)=>{
  127. defaultShowTab.value = val
  128. }
  129. /** 转让弹窗相关内容及操作 */
  130. const transferFormDialogVisible = ref(false)
  131. const transferFormDialogSubmitLoading = ref(false)
  132. const transferDefaultFormData = ref({
  133. schoolName: '北京市第一零九中学',
  134. currentOwner: '张三',
  135. newOwner:'',
  136. })
  137. const OpenTransferFormDialog=()=>{
  138. console.log('打开转让弹窗')
  139. transferFormDialogVisible.value = true
  140. GetOwnerList()
  141. }
  142. const CloseTransferFormDialog=()=>{
  143. transferFormDialogVisible.value = false
  144. }
  145. const HandleTransferFormDialogConfirm = ()=>{
  146. CloseTransferFormDialog()
  147. }
  148. // 获取归属人列表
  149. const GetOwnerList = ()=>{
  150. formItemList.value = formItemList.value.map(item=>{
  151. if(item.key == 'newOwner'){
  152. let list = [
  153. {
  154. label:'李四',
  155. value:'1'
  156. },
  157. {
  158. label:'王五',
  159. value:'2'
  160. },
  161. {
  162. label:'赵六',
  163. value:'3'
  164. },
  165. ]
  166. item.selectList = [...list]
  167. }
  168. return item
  169. })
  170. }
  171. /** 操作记录相关内容及操作 */
  172. const operationRecordDialogVisible = ref(false)
  173. const OpenOperationRecordDialog=()=>{
  174. console.log('打开操作记录弹窗')
  175. operationRecordDialogVisible.value = true
  176. }
  177. const CloseOperationRecordDialog=()=>{
  178. operationRecordDialogVisible.value = false
  179. }
  180. /** 操作记录有关数据 */
  181. const operationLogList = ref([
  182. {
  183. id:1,
  184. operationTime: '26-02-19 19:00',
  185. operatorName: '张安顺',
  186. schoolName: '北京师达学校',
  187. operationType: '编辑学校信息',
  188. operationContent: '学校名称【北京109中学】学段【初中】调整为学校名称【北京一零九中学】学段【九年一贯】。'
  189. },
  190. {
  191. id:2,
  192. operationTime: '26-02-19 19:00',
  193. operatorName: '张安顺',
  194. schoolName: '北京师达学校',
  195. operationType: '删除联系人',
  196. operationContent: '删除 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
  197. },
  198. {
  199. id:3,
  200. operationTime: '26-02-19 19:00',
  201. operatorName: '张安顺',
  202. schoolName: '北京师达学校',
  203. operationType: '新增联系人',
  204. operationContent: '新增 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
  205. },
  206. {
  207. id:4,
  208. operationTime: '26-02-19 19:00',
  209. operatorName: '张安顺',
  210. schoolName: '北京师达学校',
  211. operationType: '编辑联系人',
  212. operationContent: '联系人姓名【张三】职务【校长】手机电话【17820681226】备注【文案文案】调整为 联系人姓名【李四】职务【校长】手机电话【17820681226】备注【文案文案】。'
  213. },
  214. {
  215. id:5,
  216. operationTime: '26-02-19 19:00',
  217. operatorName: '张安顺',
  218. schoolName: '北京师达学校',
  219. operationType: '转至公海',
  220. operationContent: '将客户转至公海。'
  221. }
  222. ]);
  223. const finalOperationLogRenderData = computed(()=>{
  224. return operationLogList.value.map(item=>{
  225. return {
  226. headerTitleList:[
  227. item.operationTime,
  228. item.operatorName,
  229. item.schoolName,
  230. item.operationType
  231. ],
  232. headerTags:[],
  233. middleDesc:[],
  234. bottomDesc:`操作内容:${item.operationContent}`
  235. }
  236. })
  237. })
  238. // 分页参数 有关数据 *
  239. const currentPage = ref(1)
  240. const pageSize = ref(20)
  241. const totalNum = ref(0)
  242. /** 编辑学校 有关数据 及操作 */
  243. const schoolVisible = ref(false)
  244. const schoolDefaultFormData = ref({})
  245. const OpenSchoolFormDialog = ()=>{
  246. schoolVisible.value = true
  247. schoolDefaultFormData.value = {
  248. id: 1,
  249. customerType: '首单客户',
  250. schoolName: '流星花园学校',
  251. schoolStage: 'middle',
  252. province:'beijing',
  253. provinceName: '北京市',
  254. city:'dongcheng',
  255. cityName: '东城区',
  256. detailAddress:'通州北苑',
  257. groupName: '小组',
  258. owner: '张三',
  259. claimTime: '2026-03-11',
  260. lastFollowUpTime: '2026-03-11',
  261. provinceArea:{
  262. province:'beijing',
  263. district:'dongcheng',
  264. }
  265. }
  266. }
  267. /** 新增联系人有关数据 及操作 */
  268. const concactPeopleVisible = ref(false)
  269. const concactPeopleDefaultFormData = ref({})
  270. const OpenConcactPeoplelFormDialog = ()=>{
  271. concactPeopleVisible.value = true
  272. concactPeopleDefaultFormData.value = {}
  273. }
  274. /** 写跟进 弹窗有关数据 及操作 */
  275. const followVisible = ref(false)
  276. const followDefaultFormData = ref({})
  277. const OpenFollowlFormDialog = ()=>{
  278. followVisible.value = true
  279. followDefaultFormData.value = {
  280. school:customerBaseMsg.value.schoolName,
  281. }
  282. }
  283. </script>
  284. <style lang="scss" scoped>
  285. .main_container{
  286. gap:16px;
  287. :deep(.top_right){
  288. flex: 1 1;
  289. .header_content{
  290. display: flex;
  291. align-items: center;
  292. gap:10px;
  293. font-weight: 600;
  294. font-size: 20px;
  295. color: #333333;
  296. line-height: 28px;
  297. .status_tag{
  298. height: 25px;
  299. border-radius: 4px ;
  300. padding:0 8px;
  301. font-weight: 400;
  302. font-size: 12px;
  303. color: #2E64FA;
  304. background: rgba(46,100,250,0.1);
  305. }
  306. }
  307. .desc{
  308. display: flex;
  309. gap:5px 16px;
  310. flex-wrap: wrap;
  311. font-size: 12px;
  312. color: #999999;
  313. margin-top: 8px;
  314. margin-bottom: 16px;
  315. }
  316. .action{
  317. display: flex;
  318. gap:16px;
  319. .el-button{
  320. margin:0;
  321. img{
  322. width: 16px;
  323. height: 16px;
  324. margin-right: 4px;
  325. }
  326. }
  327. }
  328. }
  329. .bottom_detail{
  330. overflow: auto;
  331. }
  332. }
  333. .operation_dialog{
  334. .follow_card{
  335. margin-top: 16px;
  336. }
  337. }
  338. </style>