index.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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"><img :src="peopleEditIcon" alt=""> 写跟进</el-button>
  22. <el-button class="button_border"><img :src="addIcon" alt=""> 新增联系人</el-button>
  23. <el-button class="button_refresh"><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. </div>
  42. <!-- 转让 弹窗 -->
  43. <FormDialog title="转让" :visible="transferFormDialogVisible"
  44. :submit-loading="transferFormDialogSubmitLoading"
  45. :default-form-data="transferDefaultFormData"
  46. :formItemList="formItemList"
  47. @close="CloseTransferFormDialog"
  48. @confirm="HandleTransferFormDialogConfirm">
  49. </FormDialog>
  50. <!-- 操作记录 弹窗 -->
  51. <PreviewDialog
  52. class="operation_dialog"
  53. title="操作记录"
  54. :previewVisible="operationRecordDialogVisible"
  55. :customFooter="true"
  56. @close="CloseOperationRecordDialog">
  57. <SearchBlock :searchList="operationRecordSearchList"></SearchBlock>
  58. <FollowCard :card-list="finalOperationLogRenderData">
  59. <template #operation><i></i></template>
  60. </FollowCard>
  61. <Pagination :currentPage="currentPage" :pageSize="pageSize" :totalNum="totalNum"></Pagination>
  62. <template #close>
  63. <el-button @click="CloseOperationRecordDialog" class="button_background" >关闭</el-button>
  64. </template>
  65. <template #confirm><i></i></template>
  66. </PreviewDialog>
  67. </template>
  68. <script setup lang="ts">
  69. import { ref, computed } from 'vue';
  70. import TopBackNav from '@/baseComponents/TopBackNav.vue';
  71. import addIcon from '@/assets/icon/add.svg';
  72. import peopleEditIcon from '@/assets/icon/people_edit.png'
  73. import poepleMoveIcon from '@/assets/icon/people_move.png'
  74. import editIcon from '@/assets/icon/edit.svg'
  75. import exchangeIcon from '@/assets/icon/exchange.png'
  76. import logIcon from '@/assets/icon/log.png'
  77. import TabSearch from '@/baseComponents/TabSearch.vue';
  78. import {tabList} from './tabSearch'
  79. import FormDialog from '@/baseComponents/FormDialog.vue';
  80. import {formItemList} from './formDialog'
  81. import ContactDetail from './contactDetail/index.vue'
  82. import CustomerStatusOverview from './customerStatusOverview/index.vue'
  83. import PreviewDialog from '@/baseComponents/PreviewDialog.vue';
  84. import SearchBlock from '@/baseComponents/SearchBlock.vue';
  85. import {operationRecordSearchList} from './searchBlock'
  86. import FollowCard from '@/components/FollowCard.vue';
  87. import Pagination from '@/baseComponents/Pagination.vue';
  88. const customerBaseMsg = ref({
  89. schoolName: '北京市第一零九中学',
  90. customerType: '首单客户',
  91. educationStage: '九年一贯',
  92. province: '北京',
  93. district: '东城区',
  94. address: '北京市东城区葱店西街56号',
  95. owner: '张三',
  96. claimTime: '2024-09-20',
  97. lastFollowUpTime: '2025-03-12'
  98. });
  99. // 默认列表的tab切换
  100. const defaultShowTab = ref('messageOverview')
  101. const HandleTabChange = (val)=>{
  102. defaultShowTab.value = val
  103. }
  104. /** 转让弹窗相关内容及操作 */
  105. const transferFormDialogVisible = ref(false)
  106. const transferFormDialogSubmitLoading = ref(false)
  107. const transferDefaultFormData = ref({
  108. schoolName: '北京市第一零九中学',
  109. currentOwner: '张三',
  110. newOwner:'',
  111. })
  112. const OpenTransferFormDialog=()=>{
  113. console.log('打开转让弹窗')
  114. transferFormDialogVisible.value = true
  115. GetOwnerList()
  116. }
  117. const CloseTransferFormDialog=()=>{
  118. transferFormDialogVisible.value = false
  119. }
  120. const HandleTransferFormDialogConfirm = ()=>{
  121. CloseTransferFormDialog()
  122. }
  123. // 获取归属人列表
  124. const GetOwnerList = ()=>{
  125. formItemList.value = formItemList.value.map(item=>{
  126. if(item.key == 'newOwner'){
  127. let list = [
  128. {
  129. label:'李四',
  130. value:'1'
  131. },
  132. {
  133. label:'王五',
  134. value:'2'
  135. },
  136. {
  137. label:'赵六',
  138. value:'3'
  139. },
  140. ]
  141. item.selectList = [...list]
  142. }
  143. return item
  144. })
  145. }
  146. /** 操作记录相关内容及操作 */
  147. const operationRecordDialogVisible = ref(false)
  148. const OpenOperationRecordDialog=()=>{
  149. console.log('打开操作记录弹窗')
  150. operationRecordDialogVisible.value = true
  151. }
  152. const CloseOperationRecordDialog=()=>{
  153. operationRecordDialogVisible.value = false
  154. }
  155. /** 操作日志有关数据 */
  156. const operationLogList = ref([
  157. {
  158. id:1,
  159. operationTime: '26-02-19 19:00',
  160. operatorName: '张安顺',
  161. schoolName: '北京师达学校',
  162. operationType: '编辑学校信息',
  163. operationContent: '学校名称【北京109中学】学段【初中】调整为学校名称【北京一零九中学】学段【九年一贯】。'
  164. },
  165. {
  166. id:2,
  167. operationTime: '26-02-19 19:00',
  168. operatorName: '张安顺',
  169. schoolName: '北京师达学校',
  170. operationType: '删除联系人',
  171. operationContent: '删除 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
  172. },
  173. {
  174. id:3,
  175. operationTime: '26-02-19 19:00',
  176. operatorName: '张安顺',
  177. schoolName: '北京师达学校',
  178. operationType: '新增联系人',
  179. operationContent: '新增 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
  180. },
  181. {
  182. id:4,
  183. operationTime: '26-02-19 19:00',
  184. operatorName: '张安顺',
  185. schoolName: '北京师达学校',
  186. operationType: '编辑联系人',
  187. operationContent: '联系人姓名【张三】职务【校长】手机电话【17820681226】备注【文案文案】调整为 联系人姓名【李四】职务【校长】手机电话【17820681226】备注【文案文案】。'
  188. },
  189. {
  190. id:5,
  191. operationTime: '26-02-19 19:00',
  192. operatorName: '张安顺',
  193. schoolName: '北京师达学校',
  194. operationType: '转至公海',
  195. operationContent: '将客户转至公海。'
  196. }
  197. ]);
  198. const finalOperationLogRenderData = computed(()=>{
  199. return operationLogList.value.map(item=>{
  200. return {
  201. headerTitleList:[
  202. item.operationTime,
  203. item.operatorName,
  204. item.schoolName,
  205. item.operationType
  206. ],
  207. headerTags:[],
  208. middleDesc:[],
  209. bottomDesc:`操作内容:${item.operationContent}`
  210. }
  211. })
  212. })
  213. /** 分页参数 有关数据 */
  214. const currentPage = ref(1)
  215. const pageSize = ref(20)
  216. const totalNum = ref(0)
  217. </script>
  218. <style lang="scss" scoped>
  219. .main_container{
  220. // 公共样式不生效了
  221. gap:16px;
  222. padding: 20px;
  223. flex: 1 1;
  224. overflow: auto;
  225. :deep(.top_right){
  226. flex: 1 1;
  227. .header_content{
  228. display: flex;
  229. align-items: center;
  230. gap:10px;
  231. font-weight: 600;
  232. font-size: 20px;
  233. color: #333333;
  234. line-height: 28px;
  235. .status_tag{
  236. height: 25px;
  237. border-radius: 4px ;
  238. padding:0 8px;
  239. font-weight: 400;
  240. font-size: 12px;
  241. color: #2E64FA;
  242. background: rgba(46,100,250,0.1);
  243. }
  244. }
  245. .desc{
  246. display: flex;
  247. gap:5px 16px;
  248. flex-wrap: wrap;
  249. font-size: 12px;
  250. color: #999999;
  251. margin-top: 8px;
  252. margin-bottom: 16px;
  253. }
  254. .action{
  255. display: flex;
  256. gap:16px;
  257. .el-button{
  258. margin:0;
  259. img{
  260. width: 16px;
  261. height: 16px;
  262. margin-right: 4px;
  263. }
  264. }
  265. }
  266. }
  267. .bottom_detail{
  268. overflow: auto;
  269. }
  270. }
  271. .operation_dialog{
  272. .follow_card{
  273. margin-top: 16px;
  274. }
  275. }
  276. </style>