index.vue 12 KB

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