client-detail.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375
  1. <template>
  2. <view class="client-detail" :class="{ 'dark-mode': isDarkTheme }">
  3. <!-- 顶部导航栏 -->
  4. <view class="header">
  5. <view class="back-icon" @click="handleBack"></view>
  6. <text class="header-title">客户信息</text>
  7. <view class="header-right"></view>
  8. </view>
  9. <!-- 客户基本信息 -->
  10. <view class="client-basic-info">
  11. <image :src="clientInfo.avatar" class="client-avatar" mode="aspectFill"></image>
  12. <view class="basic-info">
  13. <text class="client-name">{{ clientInfo.gender }} · {{ clientInfo.name }}</text>
  14. <view class="status-tag-wrapper">
  15. <text class="status-tag register-tag registered">已注册</text>
  16. <text class="status-tag match-tag" :class="{ 'matched': followForm.matchStatus === 1, 'unmatched': followForm.matchStatus === 0 || followForm.matchStatus === null }">
  17. {{ followForm.matchStatus === 1 ? '已匹配' : '未匹配' }}
  18. </text>
  19. </view>
  20. <view class="client-tags">
  21. <text class="tag" v-for="(tag, index) in clientInfo.tags" :key="index">{{ tag }}</text>
  22. </view>
  23. </view>
  24. </view>
  25. <!-- 择偶要求 -->
  26. <view class="requirement-section">
  27. <view class="section-title">
  28. <text class="title-icon">💑</text>
  29. <text class="title-text">择偶要求</text>
  30. </view>
  31. <text class="requirement-content">{{ clientInfo.requirement }}</text>
  32. </view>
  33. <!-- 联系方式 -->
  34. <view class="contact-section">
  35. <view class="contact-item">
  36. <text class="contact-label">联系方式</text>
  37. <view class="contact-value">
  38. <text class="contact-number">{{ clientInfo.contact }}</text>
  39. <text class="copy-btn" @click="handleCopy(clientInfo.contact)">复制</text>
  40. </view>
  41. </view>
  42. <view class="contact-item" v-if="clientInfo.backupContact">
  43. <text class="contact-label">备用联系方式</text>
  44. <view class="contact-value">
  45. <text class="contact-number">{{ clientInfo.backupContact }}</text>
  46. <text class="copy-btn" @click="handleCopy(clientInfo.backupContact)">复制</text>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 跟进统计 -->
  51. <view class="stats-section">
  52. <text class="stats-title">跟进统计</text>
  53. <view class="stats-grid">
  54. <view class="stat-item">
  55. <text class="stat-value">{{ clientInfo.stats.followTimes }}</text>
  56. <text class="stat-label">跟进次数</text>
  57. </view>
  58. <view class="stat-item">
  59. <text class="stat-value">{{ clientInfo.stats.matchCount }}</text>
  60. <text class="stat-label">匹配对象</text>
  61. </view>
  62. <view class="stat-item">
  63. <text class="stat-value">{{ clientInfo.stats.phoneCalls }}</text>
  64. <text class="stat-label">电话沟通</text>
  65. </view>
  66. <view class="stat-item">
  67. <text class="stat-value">{{ clientInfo.stats.interviews }}</text>
  68. <text class="stat-label">面谈次数</text>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 标签切换 -->
  73. <view class="tabs-section">
  74. <text class="tab" :class="{ active: activeTab === 'details' }" @click="switchTab('details')">详细信息</text>
  75. <text class="tab" :class="{ active: activeTab === 'follow' }" @click="switchTab('follow')">跟进</text>
  76. </view>
  77. <!-- 详细信息 -->
  78. <scroll-view scroll-y class="details-section" v-if="activeTab === 'details'">
  79. <!-- 基本信息 -->
  80. <view class="detail-item">
  81. <text class="detail-label">婚姻状况:</text>
  82. <text class="detail-value">{{ clientInfo.details.maritalStatus }}</text>
  83. </view>
  84. <view class="detail-item">
  85. <text class="detail-label">学历:</text>
  86. <text class="detail-value">{{ clientInfo.details.education }}</text>
  87. </view>
  88. <view class="detail-item">
  89. <text class="detail-label">职业:</text>
  90. <text class="detail-value">{{ clientInfo.details.occupation }}</text>
  91. </view>
  92. <view class="detail-item">
  93. <text class="detail-label">收入:</text>
  94. <text class="detail-value">
  95. {{ clientInfo.details.income }}
  96. <text v-if="clientInfo.details.income && clientInfo.details.income !== '未知'">万元/年</text>
  97. </text>
  98. </view>
  99. <view class="detail-item">
  100. <text class="detail-label">购房情况:</text>
  101. <text class="detail-value">{{ clientInfo.details.housing }}</text>
  102. </view>
  103. <!-- 择偶要求详情 -->
  104. <view class="sub-section-title requirement-section-title">择偶详细要求</view>
  105. <view class="detail-item">
  106. <text class="detail-label">年龄范围:</text>
  107. <text class="detail-value">{{ clientInfo.details.requirement.ageRange }}</text>
  108. </view>
  109. <view class="detail-item">
  110. <text class="detail-label">身高要求:</text>
  111. <text class="detail-value">{{ clientInfo.details.requirement.height }}</text>
  112. </view>
  113. <view class="detail-item">
  114. <text class="detail-label">婚姻状况:</text>
  115. <text class="detail-value">{{ clientInfo.details.requirement.maritalStatus }}</text>
  116. </view>
  117. <view class="detail-item">
  118. <text class="detail-label">学历要求:</text>
  119. <text class="detail-value">{{ clientInfo.details.requirement.education }}</text>
  120. </view>
  121. <view class="detail-item" v-if="clientInfo.details.requirement.other">
  122. <text class="detail-label">其他要求:</text>
  123. <text class="detail-value">{{ clientInfo.details.requirement.other }}</text>
  124. </view>
  125. <!-- 客户标签 -->
  126. <view class="sub-section-title tags-section-title">客户标签</view>
  127. <view class="client-tags">
  128. <text class="tag" v-for="(tag, index) in clientInfo.tags" :key="index">{{ tag }}</text>
  129. </view>
  130. </scroll-view>
  131. <!-- 跟进信息 -->
  132. <scroll-view scroll-y class="follow-section" v-else>
  133. <!-- 跟进方式 -->
  134. <view class="follow-group">
  135. <text class="group-label">跟进方式</text>
  136. <view class="follow-type-options">
  137. <view class="follow-type-item" :class="{ active: followForm.type === 'phone' }" @click="followForm.type = 'phone'">
  138. <text class="radio-circle"></text>
  139. <text class="option-text">电话</text>
  140. </view>
  141. <view class="follow-type-item" :class="{ active: followForm.type === 'meet' }" @click="followForm.type = 'meet'">
  142. <text class="radio-circle"></text>
  143. <text class="option-text">面谈</text>
  144. </view>
  145. <view class="follow-type-item" :class="{ active: followForm.type === 'other' }" @click="followForm.type = 'other'">
  146. <text class="radio-circle"></text>
  147. <text class="option-text">其他</text>
  148. </view>
  149. </view>
  150. </view>
  151. <!-- 匹配状态 -->
  152. <view class="follow-group">
  153. <text class="group-label">匹配状态</text>
  154. <view class="status-tags-row">
  155. <view class="status-tag" :class="{ active: followForm.matchStatus === 0 }" @click="handleMatchStatusChange(0)">未匹配</view>
  156. <view class="status-tag" :class="{ active: followForm.matchStatus === 1 }" @click="handleMatchStatusChange(1)">已匹配</view>
  157. </view>
  158. </view>
  159. <!-- 跟进进度 -->
  160. <view class="follow-group">
  161. <text class="group-label">跟进进度</text>
  162. <view class="status-tags-row">
  163. <view class="status-tag" :class="{ active: followForm.progress === 'notMet' }" @click="followForm.progress = 'notMet'">未见面</view>
  164. <view class="status-tag" :class="{ active: followForm.progress === 'communicating' }" @click="followForm.progress = 'communicating'">沟通中</view>
  165. <view class="status-tag" :class="{ active: followForm.invitationStatus === 0 }" @click="handleInvitationStatusChange(0)">未邀约</view>
  166. <view class="status-tag" :class="{ active: followForm.invitationStatus === 1 }" @click="handleInvitationStatusChange(1)">已邀约</view>
  167. </view>
  168. </view>
  169. <!-- 邀约时间 -->
  170. <view class="follow-group">
  171. <text class="group-label">邀约时间</text>
  172. <view class="input-like">
  173. <picker mode="date" :value="followForm.inviteDate" @change="onInviteDateChange">
  174. <view class="picker-inner">{{ followForm.inviteDate || '请选择日期' }}</view>
  175. </picker>
  176. </view>
  177. </view>
  178. <!-- 跟进备注 -->
  179. <view class="follow-group">
  180. <text class="group-label">跟进备注</text>
  181. <textarea class="textarea" v-model="followForm.remark" placeholder="请输入跟进备注详细信息..." placeholder-style="color:#C5A4D8" />
  182. </view>
  183. <!-- 提交按钮(预留) -->
  184. <view class="follow-submit-btn" @click="handleSubmitFollow">保存跟进</view>
  185. </scroll-view>
  186. </view>
  187. </template>
  188. <script>
  189. export default {
  190. name: 'client-detail',
  191. data() {
  192. return {
  193. activeTab: 'details',
  194. followForm: {
  195. type: 'phone',
  196. progress: 'matched',
  197. matchStatus: 0, // 0-未匹配,1-已匹配
  198. invitationStatus: 0, // 0-未邀约,1-已邀约
  199. inviteDate: '',
  200. remark: ''
  201. },
  202. resourceId: null, // 资源ID
  203. clientInfo: {
  204. id: 1,
  205. name: '',
  206. gender: '男',
  207. status: '已匹配',
  208. tags: [],
  209. avatar: '',
  210. requirement: '暂无要求',
  211. contact: '',
  212. backupContact: '',
  213. originalPhone: '', // 保存原始手机号用于复制
  214. originalBackupPhone: '', // 保存原始备用手机号用于复制
  215. stats: {
  216. followTimes: 0,
  217. matchCount: 0,
  218. phoneCalls: 0,
  219. interviews: 0
  220. },
  221. details: {
  222. maritalStatus: '',
  223. education: '',
  224. occupation: '',
  225. income: '',
  226. housing: '',
  227. requirement: {
  228. ageRange: '',
  229. height: '',
  230. maritalStatus: '',
  231. education: '',
  232. other: ''
  233. }
  234. }
  235. },
  236. isDarkTheme: false
  237. }
  238. },
  239. onShow() {
  240. const stored = uni.getStorageSync('matchmakerDarkMode')
  241. if (stored === true || stored === false) {
  242. this.isDarkTheme = stored
  243. }
  244. // 如果已经有resourceId,刷新统计数据
  245. if (this.resourceId) {
  246. this.loadFollowStatistics(this.resourceId)
  247. }
  248. },
  249. onLoad(options) {
  250. console.log('=== 客户详情页面 onLoad ===')
  251. console.log('options:', JSON.stringify(options, null, 2))
  252. // 从URL参数获取资源ID
  253. let resourceId = null
  254. if (options.resourceId) {
  255. resourceId = options.resourceId
  256. console.log('从resourceId参数获取:', resourceId)
  257. } else if (options.id) {
  258. // 兼容旧的id参数
  259. resourceId = options.id
  260. console.log('从id参数获取 (兼容):', resourceId)
  261. }
  262. if (resourceId) {
  263. // 确保resourceId是数字类型
  264. resourceId = parseInt(resourceId)
  265. if (isNaN(resourceId) || resourceId <= 0) {
  266. console.error('资源ID无效:', resourceId)
  267. uni.showToast({
  268. title: '资源ID无效',
  269. icon: 'none'
  270. })
  271. return
  272. }
  273. console.log('最终使用的resourceId:', resourceId, '类型:', typeof resourceId)
  274. this.resourceId = resourceId
  275. this.loadClientInfo(resourceId)
  276. } else {
  277. console.error('未获取到资源ID')
  278. uni.showToast({
  279. title: '未获取到资源ID',
  280. icon: 'none'
  281. })
  282. }
  283. },
  284. methods: {
  285. // 返回上一页
  286. handleBack() {
  287. uni.navigateBack()
  288. },
  289. // 复制联系方式
  290. handleCopy(contact) {
  291. // 如果传入的是脱敏的手机号,使用原始手机号
  292. let phoneToCopy = contact
  293. if (contact === this.clientInfo.contact && this.clientInfo.originalPhone) {
  294. phoneToCopy = this.clientInfo.originalPhone
  295. } else if (contact === this.clientInfo.backupContact && this.clientInfo.originalBackupPhone) {
  296. phoneToCopy = this.clientInfo.originalBackupPhone
  297. } else {
  298. // 尝试从脱敏号码中提取
  299. phoneToCopy = contact.replace(/\*+/g, '')
  300. }
  301. uni.setClipboardData({
  302. data: phoneToCopy,
  303. success: () => {
  304. uni.showToast({
  305. title: '复制成功',
  306. icon: 'success'
  307. })
  308. },
  309. fail: () => {
  310. uni.showToast({
  311. title: '复制失败',
  312. icon: 'none'
  313. })
  314. }
  315. })
  316. },
  317. // 切换标签
  318. switchTab(tab) {
  319. this.activeTab = tab
  320. },
  321. // 邀约日期变更
  322. onInviteDateChange(e) {
  323. this.followForm.inviteDate = e.detail.value
  324. },
  325. // 匹配状态变更
  326. handleMatchStatusChange(status) {
  327. this.followForm.matchStatus = status
  328. },
  329. // 邀约状态变更
  330. handleInvitationStatusChange(status) {
  331. this.followForm.invitationStatus = status
  332. // 如果选择已邀约且没有设置邀约时间,提示用户选择
  333. if (status === 1 && !this.followForm.inviteDate) {
  334. uni.showToast({
  335. title: '请选择邀约时间',
  336. icon: 'none'
  337. })
  338. }
  339. },
  340. // 加载最新的跟进信息,更新表单字段
  341. async loadLatestFollowInfo(resourceId) {
  342. try {
  343. const baseUrl = process.env.NODE_ENV === 'development'
  344. ? 'http://localhost:8083/api' // 开发环境 - 通过网关
  345. : 'https://your-domain.com/api' // 生产环境
  346. // 获取最新的跟进记录
  347. const [error, res] = await uni.request({
  348. url: `${baseUrl}/my-resource/latest-follow/${resourceId}`,
  349. method: 'GET',
  350. header: {
  351. 'Content-Type': 'application/json'
  352. }
  353. })
  354. if (error) {
  355. console.error('加载最新跟进信息失败:', error)
  356. return
  357. }
  358. if (res.statusCode === 200 && res.data && res.data.code === 200) {
  359. const followUp = res.data.data
  360. if (followUp) {
  361. // 更新跟进方式(1-电话,2-面谈,3-其他)
  362. if (followUp.followType !== null && followUp.followType !== undefined) {
  363. const followType = followUp.followType
  364. if (followType === 1) {
  365. this.followForm.type = 'phone'
  366. } else if (followType === 2) {
  367. this.followForm.type = 'meet'
  368. } else if (followType === 3) {
  369. this.followForm.type = 'other'
  370. }
  371. }
  372. // 更新跟进进度(1-已匹配,2-未见面,3-沟通中)
  373. if (followUp.followProgress !== null && followUp.followProgress !== undefined) {
  374. const progress = followUp.followProgress
  375. if (progress === 1) {
  376. this.followForm.progress = 'matched'
  377. } else if (progress === 2) {
  378. this.followForm.progress = 'notMet'
  379. } else if (progress === 3) {
  380. this.followForm.progress = 'communicating'
  381. }
  382. }
  383. // 更新匹配状态
  384. if (followUp.isMatch !== null && followUp.isMatch !== undefined) {
  385. this.followForm.matchStatus = parseInt(followUp.isMatch) || 0
  386. }
  387. // 更新邀约状态
  388. if (followUp.isInvitation !== null && followUp.isInvitation !== undefined) {
  389. this.followForm.invitationStatus = parseInt(followUp.isInvitation) || 0
  390. }
  391. // 更新邀约时间
  392. if (followUp.invitationTime) {
  393. const date = new Date(followUp.invitationTime)
  394. const year = date.getFullYear()
  395. const month = String(date.getMonth() + 1).padStart(2, '0')
  396. const day = String(date.getDate()).padStart(2, '0')
  397. this.followForm.inviteDate = `${year}-${month}-${day}`
  398. } else {
  399. this.followForm.inviteDate = ''
  400. }
  401. // 更新备注
  402. if (followUp.remark !== null && followUp.remark !== undefined) {
  403. this.followForm.remark = followUp.remark || ''
  404. } else {
  405. this.followForm.remark = ''
  406. }
  407. console.log('表单字段已更新:', {
  408. type: this.followForm.type,
  409. progress: this.followForm.progress,
  410. matchStatus: this.followForm.matchStatus,
  411. invitationStatus: this.followForm.invitationStatus,
  412. inviteDate: this.followForm.inviteDate,
  413. remark: this.followForm.remark
  414. })
  415. } else {
  416. console.log('暂无跟进记录,保持表单当前值')
  417. }
  418. }
  419. } catch (e) {
  420. console.error('加载最新跟进信息异常:', e)
  421. }
  422. },
  423. // 加载跟进统计数据
  424. async loadFollowStatistics(resourceId) {
  425. try {
  426. const baseUrl = process.env.NODE_ENV === 'development'
  427. ? 'http://localhost:8083/api' // 开发环境 - 通过网关
  428. : 'https://your-domain.com/api' // 生产环境
  429. const [error, res] = await uni.request({
  430. url: `${baseUrl}/my-resource/follow-statistics/${resourceId}`,
  431. method: 'GET',
  432. header: {
  433. 'Content-Type': 'application/json'
  434. }
  435. })
  436. if (error) {
  437. console.error('加载统计数据失败:', error)
  438. return
  439. }
  440. if (res.statusCode === 200 && res.data && res.data.code === 200) {
  441. const statistics = res.data.data
  442. console.log('=== 统计数据响应 ===')
  443. console.log('完整响应:', JSON.stringify(res.data, null, 2))
  444. console.log('统计数据对象:', statistics)
  445. console.log('followCount:', statistics?.followCount, statistics?.follow_count)
  446. console.log('matchCount:', statistics?.matchCount, statistics?.match_count)
  447. console.log('phoneCount:', statistics?.phoneCount, statistics?.phone_count)
  448. console.log('interviewCount:', statistics?.interviewCount, statistics?.interview_count)
  449. // 更新统计数据(支持驼峰和下划线两种字段名格式)
  450. if (this.clientInfo && this.clientInfo.stats) {
  451. const followCount = statistics?.followCount ?? statistics?.follow_count ?? 0
  452. const matchCount = statistics?.matchCount ?? statistics?.match_count ?? 0
  453. const phoneCount = statistics?.phoneCount ?? statistics?.phone_count ?? 0
  454. const interviewCount = statistics?.interviewCount ?? statistics?.interview_count ?? 0
  455. this.clientInfo.stats.followTimes = followCount
  456. this.clientInfo.stats.matchCount = matchCount
  457. this.clientInfo.stats.phoneCalls = phoneCount
  458. this.clientInfo.stats.interviews = interviewCount
  459. console.log('更新后的统计数据:', {
  460. followTimes: this.clientInfo.stats.followTimes,
  461. matchCount: this.clientInfo.stats.matchCount,
  462. phoneCalls: this.clientInfo.stats.phoneCalls,
  463. interviews: this.clientInfo.stats.interviews
  464. })
  465. } else {
  466. console.warn('clientInfo或stats不存在')
  467. }
  468. } else {
  469. console.error('统计数据接口返回错误:', res.data)
  470. }
  471. } catch (e) {
  472. console.error('加载统计数据异常:', e)
  473. }
  474. },
  475. // 提交跟进
  476. async handleSubmitFollow() {
  477. if (!this.resourceId) {
  478. uni.showToast({
  479. title: '资源ID不存在',
  480. icon: 'none'
  481. })
  482. return
  483. }
  484. try {
  485. uni.showLoading({
  486. title: '保存中...'
  487. })
  488. const baseUrl = process.env.NODE_ENV === 'development'
  489. ? 'http://localhost:8083/api' // 开发环境 - 通过网关
  490. : 'https://your-domain.com/api' // 生产环境
  491. // 准备请求数据
  492. // 跟进方式转换:phone->1, meet->2, other->3
  493. let followType = 1 // 默认电话
  494. if (this.followForm.type === 'meet') {
  495. followType = 2
  496. } else if (this.followForm.type === 'other') {
  497. followType = 3
  498. }
  499. // 跟进进度转换:matched->1, notMet->2, communicating->3
  500. let progress = 1 // 默认已匹配
  501. if (this.followForm.progress === 'notMet') {
  502. progress = 2
  503. } else if (this.followForm.progress === 'communicating') {
  504. progress = 3
  505. }
  506. const requestData = {
  507. followType: followType,
  508. progress: this.followForm.progress, // 保持字符串格式,后端会转换
  509. matchStatus: this.followForm.matchStatus,
  510. invitationStatus: this.followForm.invitationStatus,
  511. invitationTime: this.followForm.inviteDate || null,
  512. remark: this.followForm.remark || '' // 添加备注字段
  513. }
  514. console.log('保存跟进数据:', requestData)
  515. const [error, res] = await uni.request({
  516. url: `${baseUrl}/my-resource/update-follow/${this.resourceId}`,
  517. method: 'PUT',
  518. data: requestData,
  519. header: {
  520. 'Content-Type': 'application/json'
  521. }
  522. })
  523. uni.hideLoading()
  524. if (error) {
  525. console.error('保存跟进失败:', error)
  526. uni.showToast({
  527. title: '保存失败',
  528. icon: 'none'
  529. })
  530. return
  531. }
  532. if (res.statusCode === 200 && res.data && res.data.code === 200) {
  533. uni.showToast({
  534. title: '跟进已保存',
  535. icon: 'success'
  536. })
  537. // 刷新统计数据
  538. if (this.resourceId) {
  539. this.loadFollowStatistics(this.resourceId)
  540. }
  541. // 重新加载最新的跟进信息,更新表单字段
  542. if (this.resourceId) {
  543. this.loadLatestFollowInfo(this.resourceId)
  544. }
  545. // 触发资源列表刷新事件
  546. uni.$emit('refreshResourceList')
  547. } else {
  548. const errorMsg = res.data?.message || '保存失败'
  549. uni.showToast({
  550. title: errorMsg,
  551. icon: 'none'
  552. })
  553. }
  554. } catch (e) {
  555. uni.hideLoading()
  556. console.error('保存跟进异常:', e)
  557. uni.showToast({
  558. title: '保存失败,请稍后重试',
  559. icon: 'none'
  560. })
  561. }
  562. },
  563. // 从API加载客户信息
  564. async loadClientInfo(resourceId) {
  565. try {
  566. console.log('=== 开始加载客户信息 ===')
  567. console.log('resourceId:', resourceId, '类型:', typeof resourceId)
  568. uni.showLoading({
  569. title: '加载中...'
  570. })
  571. const baseUrl = process.env.NODE_ENV === 'development'
  572. ? 'http://localhost:8083/api' // 开发环境 - 通过网关
  573. : 'https://your-domain.com/api' // 生产环境
  574. const requestUrl = `${baseUrl}/my-resource/client-detail/${resourceId}`
  575. console.log('请求URL:', requestUrl)
  576. const [error, res] = await uni.request({
  577. url: requestUrl,
  578. method: 'GET',
  579. timeout: 30000, // 设置30秒超时
  580. header: {
  581. 'Content-Type': 'application/json'
  582. }
  583. })
  584. console.log('请求结果 - error:', error)
  585. console.log('请求结果 - res:', res)
  586. uni.hideLoading()
  587. if (error) {
  588. console.error('加载客户信息失败:', error)
  589. let errorMsg = '加载失败'
  590. if (error.errMsg) {
  591. if (error.errMsg.includes('timeout') || error.errMsg.includes('超时')) {
  592. errorMsg = '请求超时,请检查网络连接'
  593. } else if (error.errMsg.includes('fail')) {
  594. errorMsg = '网络连接失败,请检查服务器是否启动'
  595. }
  596. }
  597. uni.showToast({
  598. title: errorMsg,
  599. icon: 'none',
  600. duration: 3000
  601. })
  602. return
  603. }
  604. if (res.statusCode === 200 && res.data && res.data.code === 200) {
  605. const data = res.data.data
  606. console.log('=== 客户详情数据 ===')
  607. console.log('完整数据:', JSON.stringify(data, null, 2))
  608. // 支持驼峰和下划线两种字段名格式
  609. const resourceId = data.resourceId || data.resource_id
  610. const avatarUrl = data.avatarUrl || data.avatar_url
  611. const backupPhone = data.backupPhone || data.backup_phone
  612. const marrStatus = data.marrStatus !== undefined ? data.marrStatus : data.marr_status
  613. // 择偶要求从my_resource表的mate_selection_criteria字段获取
  614. const mateSelectionCriteria = data.mateSelectionCriteria || data.mate_selection_criteria
  615. // 择偶要求详情字段(从partner_requirement表,用于详情页)
  616. const minAge = data.minAge !== undefined ? data.minAge : data.min_age
  617. const maxAge = data.maxAge !== undefined ? data.maxAge : data.max_age
  618. const minHeight = data.minHeight !== undefined ? data.minHeight : data.min_height
  619. const maxHeight = data.maxHeight !== undefined ? data.maxHeight : data.max_height
  620. const educationLevel = data.educationLevel !== undefined ? data.educationLevel : data.education_level
  621. const salaryRange = data.salaryRange !== undefined ? data.salaryRange : data.salary_range
  622. const houseRequirement = data.houseRequirement !== undefined ? data.houseRequirement : data.house_requirement
  623. const carRequirement = data.carRequirement !== undefined ? data.carRequirement : data.car_requirement
  624. const maritalStatusRequirement = data.maritalStatusRequirement !== undefined ? data.maritalStatusRequirement : data.marital_status_requirement
  625. const preferredCity = data.preferredCity || data.preferred_city
  626. const otherRequirements = data.otherRequirements || data.other_requirements
  627. console.log('资源ID:', resourceId)
  628. console.log('姓名:', data.name)
  629. console.log('头像URL:', avatarUrl)
  630. console.log('备用手机号:', backupPhone)
  631. console.log('择偶要求(mate_selection_criteria):', mateSelectionCriteria)
  632. console.log('择偶要求详情数据:', {
  633. minAge, maxAge, minHeight, maxHeight,
  634. educationLevel, salaryRange, houseRequirement,
  635. carRequirement, maritalStatusRequirement,
  636. preferredCity, otherRequirements
  637. })
  638. // 处理标签列表(从后端返回的tags字段,如果没有则使用星座和职业)
  639. let clientTags = []
  640. if (data.tags && Array.isArray(data.tags) && data.tags.length > 0) {
  641. // 使用后端返回的标签
  642. clientTags = data.tags
  643. } else {
  644. // 如果没有tags,使用星座和职业作为标签
  645. if (data.constellation) {
  646. clientTags.push(data.constellation)
  647. }
  648. if (data.occupation) {
  649. clientTags.push(data.occupation)
  650. }
  651. }
  652. // 加载匹配状态和邀约状态
  653. const isMatch = data.isMatch !== null && data.isMatch !== undefined ? data.isMatch :
  654. (data.is_match !== null && data.is_match !== undefined ? data.is_match : 0)
  655. const isInvitation = data.isInvitation !== null && data.isInvitation !== undefined ? data.isInvitation :
  656. (data.is_Invitation !== null && data.is_Invitation !== undefined ? data.is_Invitation : 0)
  657. const invitationTime = data.invitationTime || data.Invitation_time
  658. this.followForm.matchStatus = parseInt(isMatch) || 0
  659. this.followForm.invitationStatus = parseInt(isInvitation) || 0
  660. if (invitationTime) {
  661. // 将日期转换为YYYY-MM-DD格式
  662. const date = new Date(invitationTime)
  663. const year = date.getFullYear()
  664. const month = String(date.getMonth() + 1).padStart(2, '0')
  665. const day = String(date.getDate()).padStart(2, '0')
  666. this.followForm.inviteDate = `${year}-${month}-${day}`
  667. }
  668. // 映射数据到clientInfo
  669. this.clientInfo = {
  670. id: resourceId,
  671. name: data.name || '',
  672. gender: data.gender === 1 ? '男' : data.gender === 2 ? '女' : '未知',
  673. status: '已匹配', // 可以根据实际字段判断
  674. tags: clientTags, // 使用处理后的标签列表
  675. avatar: avatarUrl || '',
  676. requirement: mateSelectionCriteria || '暂无要求', // 择偶要求显示my_resource表的mate_selection_criteria字段
  677. contact: data.phone ? data.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : '',
  678. backupContact: backupPhone ? backupPhone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : '',
  679. originalPhone: data.phone || '', // 保存原始手机号
  680. originalBackupPhone: backupPhone || '', // 保存原始备用手机号
  681. stats: {
  682. followTimes: 0, // 将从统计数据接口获取
  683. matchCount: 0,
  684. phoneCalls: 0,
  685. interviews: 0
  686. },
  687. details: {
  688. maritalStatus: this.formatMaritalStatus(marrStatus),
  689. education: data.diploma || '未知',
  690. occupation: data.occupation || '未知',
  691. income: data.income || '未知',
  692. housing: data.house === 1 ? '已购房' : data.house === 0 ? '未购房' : '未知',
  693. requirement: {
  694. ageRange: minAge && maxAge ? `${minAge}-${maxAge}岁` : '不限',
  695. height: minHeight ? `${minHeight}cm以上` : '不限',
  696. maritalStatus: this.formatMaritalStatusRequirement(maritalStatusRequirement),
  697. education: this.formatEducationLevel(educationLevel),
  698. other: otherRequirements || ''
  699. }
  700. }
  701. }
  702. // 标签已经在上面处理过了,这里不需要再添加
  703. console.log('=== 映射后的clientInfo ===')
  704. console.log('clientInfo:', JSON.stringify(this.clientInfo, null, 2))
  705. // 加载跟进统计数据
  706. this.loadFollowStatistics(resourceId)
  707. } else {
  708. uni.showToast({
  709. title: res.data.message || '加载失败',
  710. icon: 'none'
  711. })
  712. }
  713. } catch (e) {
  714. uni.hideLoading()
  715. console.error('加载客户信息失败:', e)
  716. uni.showToast({
  717. title: '加载失败',
  718. icon: 'none'
  719. })
  720. }
  721. },
  722. // 格式化婚姻状况
  723. formatMaritalStatus(status) {
  724. if (status === null || status === undefined) return '未知'
  725. switch (status) {
  726. case 0: return '未婚'
  727. case 1: return '离异'
  728. case 2: return '丧偶'
  729. default: return '未知'
  730. }
  731. },
  732. // 格式化婚姻状况要求
  733. formatMaritalStatusRequirement(status) {
  734. if (status === null || status === undefined) return '不限'
  735. switch (status) {
  736. case 0: return '不限'
  737. case 1: return '未婚'
  738. case 2: return '离异'
  739. case 3: return '丧偶'
  740. default: return '不限'
  741. }
  742. },
  743. // 格式化学历要求
  744. formatEducationLevel(level) {
  745. if (level === null || level === undefined) return '不限'
  746. switch (level) {
  747. case 0: return '不限'
  748. case 1: return '高中及以上'
  749. case 2: return '专科及以上'
  750. case 3: return '本科及以上'
  751. case 4: return '硕士及以上'
  752. case 5: return '博士及以上'
  753. default: return '不限'
  754. }
  755. }
  756. }
  757. }
  758. </script>
  759. <style lang="scss" scoped>
  760. .client-detail {
  761. min-height: 100vh;
  762. background: linear-gradient(180deg, #FFF5F8 0%, #F8E8F0 50%, #FFF9F9 100%);
  763. padding-top: 90rpx;
  764. }
  765. /* 顶部导航栏 */
  766. .header {
  767. position: fixed;
  768. top: 0;
  769. left: 0;
  770. right: 0;
  771. height: 90rpx;
  772. display: flex;
  773. align-items: center;
  774. justify-content: space-between;
  775. padding: 0 20rpx;
  776. background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
  777. z-index: 999;
  778. .back-icon {
  779. width: 44rpx;
  780. height: 44rpx;
  781. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>');
  782. background-size: contain;
  783. background-repeat: no-repeat;
  784. background-position: center;
  785. }
  786. .header-title {
  787. font-size: 38rpx;
  788. font-weight: bold;
  789. color: #333;
  790. }
  791. .header-right {
  792. width: 44rpx;
  793. }
  794. }
  795. /* 客户基本信息 */
  796. .client-basic-info {
  797. display: flex;
  798. align-items: flex-start;
  799. padding: 35rpx;
  800. background: linear-gradient(135deg, #FFFFFF 0%, #FFFBFD 100%);
  801. margin: 20rpx;
  802. border-radius: 24rpx;
  803. box-shadow: 0 8rpx 24rpx rgba(156, 39, 176, 0.12), 0 2rpx 8rpx rgba(156, 39, 176, 0.08);
  804. border: 1rpx solid rgba(243, 229, 245, 0.8);
  805. .client-avatar {
  806. width: 160rpx;
  807. height: 160rpx;
  808. border-radius: 50%;
  809. margin-right: 30rpx;
  810. background-color: #F5F5F5;
  811. }
  812. .basic-info {
  813. flex: 1;
  814. .client-name {
  815. font-size: 38rpx;
  816. font-weight: 600;
  817. color: #2C2C2C;
  818. margin-bottom: 12rpx;
  819. letter-spacing: 0.5rpx;
  820. display: block;
  821. }
  822. .status-tag-wrapper {
  823. display: flex;
  824. align-items: center;
  825. gap: 10rpx;
  826. margin-bottom: 18rpx;
  827. }
  828. .status-tag {
  829. display: inline-block;
  830. padding: 4rpx 12rpx;
  831. border-radius: 12rpx;
  832. font-size: 22rpx;
  833. font-weight: 500;
  834. &.register-tag {
  835. &.registered {
  836. background: #E8F5E9;
  837. color: #4CAF50;
  838. }
  839. }
  840. &.match-tag {
  841. &.matched {
  842. background: #E3F2FD;
  843. color: #2196F3;
  844. }
  845. &.unmatched {
  846. background: #FFF3E0;
  847. color: #FF9800;
  848. }
  849. }
  850. }
  851. .client-status {
  852. font-size: 26rpx;
  853. color: #FF6B8A;
  854. margin-bottom: 18rpx;
  855. display: inline-block;
  856. padding: 4rpx 16rpx;
  857. background: linear-gradient(135deg, #FFE5EB 0%, #FFF0F5 100%);
  858. border-radius: 12rpx;
  859. font-weight: 500;
  860. }
  861. .client-tags {
  862. display: flex;
  863. flex-wrap: wrap;
  864. gap: 10rpx;
  865. .tag {
  866. padding: 10rpx 22rpx;
  867. background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
  868. color: #7B1FA2;
  869. border-radius: 24rpx;
  870. font-size: 24rpx;
  871. font-weight: 600;
  872. box-shadow: 0 2rpx 8rpx rgba(156, 39, 176, 0.15);
  873. border: 1rpx solid rgba(156, 39, 176, 0.2);
  874. }
  875. }
  876. }
  877. }
  878. /* 择偶要求 */
  879. .requirement-section {
  880. padding: 35rpx;
  881. background: linear-gradient(135deg, #FFFFFF 0%, #FFFBFD 100%);
  882. margin: 0 20rpx 20rpx;
  883. border-radius: 24rpx;
  884. box-shadow: 0 8rpx 24rpx rgba(156, 39, 176, 0.12), 0 2rpx 8rpx rgba(156, 39, 176, 0.08);
  885. border: 1rpx solid rgba(243, 229, 245, 0.8);
  886. .section-title {
  887. display: flex;
  888. align-items: center;
  889. margin-bottom: 20rpx;
  890. .title-icon {
  891. font-size: 28rpx;
  892. margin-right: 10rpx;
  893. }
  894. .title-text {
  895. font-size: 30rpx;
  896. font-weight: 600;
  897. color: #2C2C2C;
  898. letter-spacing: 0.5rpx;
  899. }
  900. }
  901. .requirement-content {
  902. font-size: 28rpx;
  903. color: #555;
  904. line-height: 1.8;
  905. font-weight: 400;
  906. }
  907. }
  908. /* 联系方式 */
  909. .contact-section {
  910. padding: 35rpx;
  911. background: linear-gradient(135deg, #FFFFFF 0%, #FFFBFD 100%);
  912. margin: 0 20rpx 20rpx;
  913. border-radius: 24rpx;
  914. box-shadow: 0 8rpx 24rpx rgba(156, 39, 176, 0.12), 0 2rpx 8rpx rgba(156, 39, 176, 0.08);
  915. border: 1rpx solid rgba(243, 229, 245, 0.8);
  916. .contact-item {
  917. display: flex;
  918. justify-content: space-between;
  919. align-items: center;
  920. margin-bottom: 25rpx;
  921. &:last-child {
  922. margin-bottom: 0;
  923. }
  924. .contact-label {
  925. font-size: 28rpx;
  926. color: #2C2C2C;
  927. font-weight: 500;
  928. }
  929. .contact-value {
  930. display: flex;
  931. align-items: center;
  932. gap: 20rpx;
  933. .contact-number {
  934. font-size: 28rpx;
  935. color: #555;
  936. font-weight: 400;
  937. }
  938. .copy-btn {
  939. padding: 10rpx 24rpx;
  940. background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
  941. color: #7B1FA2;
  942. border-radius: 24rpx;
  943. font-size: 24rpx;
  944. font-weight: 600;
  945. box-shadow: 0 2rpx 8rpx rgba(156, 39, 176, 0.2);
  946. border: 1rpx solid rgba(156, 39, 176, 0.2);
  947. transition: all 0.3s;
  948. &:active {
  949. transform: scale(0.95);
  950. box-shadow: 0 1rpx 4rpx rgba(156, 39, 176, 0.3);
  951. }
  952. }
  953. }
  954. }
  955. }
  956. /* 跟进统计 */
  957. .stats-section {
  958. padding: 30rpx;
  959. background-color: #FFFFFF;
  960. margin: 0 20rpx 20rpx;
  961. border-radius: 20rpx;
  962. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
  963. .stats-title {
  964. font-size: 28rpx;
  965. font-weight: bold;
  966. color: #333;
  967. margin-bottom: 25rpx;
  968. }
  969. .stats-grid {
  970. display: grid;
  971. grid-template-columns: repeat(4, 1fr);
  972. gap: 20rpx;
  973. .stat-item {
  974. display: flex;
  975. flex-direction: column;
  976. align-items: center;
  977. justify-content: center;
  978. padding: 20rpx;
  979. background-color: #FFF3F5;
  980. border-radius: 15rpx;
  981. .stat-value {
  982. font-size: 48rpx;
  983. font-weight: bold;
  984. color: #FF6B8A;
  985. margin-bottom: 10rpx;
  986. }
  987. .stat-label {
  988. font-size: 22rpx;
  989. color: #666;
  990. }
  991. }
  992. }
  993. }
  994. /* 标签切换 */
  995. .tabs-section {
  996. display: flex;
  997. padding: 0 20rpx;
  998. background: linear-gradient(135deg, #FFFFFF 0%, #FFFBFD 100%);
  999. margin: 0 20rpx 20rpx;
  1000. border-radius: 24rpx;
  1001. box-shadow: 0 8rpx 24rpx rgba(156, 39, 176, 0.12), 0 2rpx 8rpx rgba(156, 39, 176, 0.08);
  1002. border: 1rpx solid rgba(243, 229, 245, 0.8);
  1003. .tab {
  1004. flex: 1;
  1005. text-align: center;
  1006. padding: 24rpx 0;
  1007. font-size: 30rpx;
  1008. color: #888;
  1009. font-weight: 500;
  1010. transition: all 0.3s;
  1011. position: relative;
  1012. &.active {
  1013. color: #7B1FA2;
  1014. font-weight: 600;
  1015. &::after {
  1016. content: '';
  1017. position: absolute;
  1018. bottom: 0;
  1019. left: 50%;
  1020. transform: translateX(-50%);
  1021. width: 60rpx;
  1022. height: 6rpx;
  1023. background: linear-gradient(90deg, #9C27B0 0%, #E1BEE7 100%);
  1024. border-radius: 3rpx;
  1025. }
  1026. }
  1027. }
  1028. }
  1029. /* 详细信息滚动区域 */
  1030. .details-section {
  1031. padding: 35rpx 25rpx 100rpx;
  1032. background: linear-gradient(135deg, #FFFFFF 0%, #FFFBFD 100%);
  1033. margin: 0 20rpx 20rpx;
  1034. border-radius: 24rpx;
  1035. box-shadow: 0 8rpx 24rpx rgba(156, 39, 176, 0.12), 0 2rpx 8rpx rgba(156, 39, 176, 0.08);
  1036. border: 1rpx solid rgba(243, 229, 245, 0.8);
  1037. box-sizing: border-box;
  1038. position: relative;
  1039. .detail-item {
  1040. display: flex;
  1041. margin-bottom: 28rpx;
  1042. padding: 12rpx 0;
  1043. border-bottom: 1rpx solid rgba(240, 240, 240, 0.6);
  1044. &:last-of-type {
  1045. border-bottom: none;
  1046. }
  1047. .detail-label {
  1048. width: 200rpx;
  1049. font-size: 28rpx;
  1050. color: #2C2C2C;
  1051. font-weight: 500;
  1052. letter-spacing: 0.3rpx;
  1053. }
  1054. .detail-value {
  1055. flex: 1;
  1056. font-size: 28rpx;
  1057. color: #555;
  1058. font-weight: 400;
  1059. text-align: right;
  1060. }
  1061. }
  1062. .sub-section-title {
  1063. font-size: 32rpx;
  1064. font-weight: 600;
  1065. color: #2C2C2C;
  1066. margin: 30rpx 0 20rpx;
  1067. padding-bottom: 12rpx;
  1068. border-bottom: 2rpx solid rgba(240, 240, 240, 0.8);
  1069. letter-spacing: 0.5rpx;
  1070. }
  1071. /* 择偶详细要求部分 - 添加明显的上分隔 */
  1072. .requirement-section-title {
  1073. margin-top: 60rpx;
  1074. padding: 32rpx 24rpx 20rpx;
  1075. border-top: 3rpx solid rgba(156, 39, 176, 0.15);
  1076. border-bottom: 2rpx solid rgba(156, 39, 176, 0.1);
  1077. position: relative;
  1078. background: linear-gradient(135deg, #F8F4F9 0%, #FFFBFD 100%);
  1079. border-radius: 16rpx 16rpx 0 0;
  1080. }
  1081. .requirement-section-title::before {
  1082. content: '';
  1083. position: absolute;
  1084. left: 0;
  1085. top: 0;
  1086. width: 8rpx;
  1087. height: 100%;
  1088. background: linear-gradient(180deg, #9C27B0 0%, #BA68C8 50%, #E1BEE7 100%);
  1089. border-radius: 0 4rpx 4rpx 0;
  1090. box-shadow: 2rpx 0 8rpx rgba(156, 39, 176, 0.2);
  1091. }
  1092. /* 客户标签部分 - 添加明显的上分隔 */
  1093. .tags-section-title {
  1094. margin-top: 60rpx;
  1095. padding: 32rpx 24rpx 20rpx;
  1096. border-top: 3rpx solid rgba(156, 39, 176, 0.15);
  1097. border-bottom: 2rpx solid rgba(156, 39, 176, 0.1);
  1098. position: relative;
  1099. background: linear-gradient(135deg, #F8F4F9 0%, #FFFBFD 100%);
  1100. border-radius: 16rpx 16rpx 0 0;
  1101. }
  1102. .tags-section-title::before {
  1103. content: '';
  1104. position: absolute;
  1105. left: 0;
  1106. top: 0;
  1107. width: 8rpx;
  1108. height: 100%;
  1109. background: linear-gradient(180deg, #9C27B0 0%, #BA68C8 50%, #E1BEE7 100%);
  1110. border-radius: 0 4rpx 4rpx 0;
  1111. box-shadow: 2rpx 0 8rpx rgba(156, 39, 176, 0.2);
  1112. }
  1113. .client-tags {
  1114. display: flex;
  1115. flex-wrap: wrap;
  1116. gap: 12rpx;
  1117. padding: 20rpx 0;
  1118. .tag {
  1119. padding: 12rpx 24rpx;
  1120. background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
  1121. color: #7B1FA2;
  1122. border-radius: 24rpx;
  1123. font-size: 26rpx;
  1124. font-weight: 600;
  1125. box-shadow: 0 2rpx 8rpx rgba(156, 39, 176, 0.15);
  1126. border: 1rpx solid rgba(156, 39, 176, 0.2);
  1127. transition: all 0.3s;
  1128. &:active {
  1129. transform: scale(0.95);
  1130. }
  1131. }
  1132. }
  1133. }
  1134. /* 跟进信息 */
  1135. .follow-section {
  1136. background-color: #FFFFFF;
  1137. margin: 0 20rpx 20rpx;
  1138. border-radius: 20rpx;
  1139. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
  1140. padding: 30rpx 20rpx 40rpx;
  1141. max-height: 700rpx;
  1142. box-sizing: border-box;
  1143. }
  1144. .follow-group {
  1145. margin-bottom: 30rpx;
  1146. .group-label {
  1147. font-size: 28rpx;
  1148. color: #333;
  1149. font-weight: bold;
  1150. margin-bottom: 16rpx;
  1151. display: block;
  1152. }
  1153. }
  1154. /* 跟进方式单选 */
  1155. .follow-type-options {
  1156. display: flex;
  1157. align-items: center;
  1158. gap: 30rpx;
  1159. .follow-type-item {
  1160. display: flex;
  1161. align-items: center;
  1162. gap: 10rpx;
  1163. font-size: 26rpx;
  1164. color: #666;
  1165. .radio-circle {
  1166. width: 26rpx;
  1167. height: 26rpx;
  1168. border-radius: 50%;
  1169. border: 2rpx solid #C5A4D8;
  1170. box-sizing: border-box;
  1171. }
  1172. &.active {
  1173. color: #D81B60;
  1174. .radio-circle {
  1175. background-color: #D81B60;
  1176. border-color: #D81B60;
  1177. }
  1178. }
  1179. }
  1180. }
  1181. /* 跟进进度标签 */
  1182. .status-tags-row {
  1183. display: flex;
  1184. flex-wrap: wrap;
  1185. gap: 16rpx;
  1186. .status-tag {
  1187. min-width: 140rpx;
  1188. text-align: center;
  1189. padding: 14rpx 20rpx;
  1190. border-radius: 20rpx;
  1191. border: 2rpx solid #E1BEE7;
  1192. font-size: 26rpx;
  1193. color: #9C27B0;
  1194. background-color: #FAF5FF;
  1195. box-sizing: border-box;
  1196. &.active {
  1197. background-color: #F8BBD0;
  1198. border-color: #F06292;
  1199. color: #FFFFFF;
  1200. }
  1201. }
  1202. }
  1203. /* 邀约状态/时间 等输入类展示 */
  1204. .input-like {
  1205. width: 100%;
  1206. padding: 18rpx 22rpx;
  1207. border-radius: 16rpx;
  1208. background-color: #FAF5FF;
  1209. font-size: 26rpx;
  1210. color: #666;
  1211. box-sizing: border-box;
  1212. }
  1213. .picker-inner {
  1214. font-size: 26rpx;
  1215. color: #666;
  1216. }
  1217. /* 备注输入框 */
  1218. .textarea {
  1219. width: 100%;
  1220. min-height: 160rpx;
  1221. padding: 18rpx 22rpx;
  1222. border-radius: 16rpx;
  1223. background-color: #FAF5FF;
  1224. font-size: 26rpx;
  1225. color: #333;
  1226. box-sizing: border-box;
  1227. }
  1228. /* 保存按钮 */
  1229. .follow-submit-btn {
  1230. margin-top: 10rpx;
  1231. width: 100%;
  1232. padding: 22rpx 0;
  1233. text-align: center;
  1234. border-radius: 26rpx;
  1235. background: linear-gradient(135deg, #F48FB1 0%, #EC407A 100%);
  1236. color: #FFFFFF;
  1237. font-size: 30rpx;
  1238. font-weight: bold;
  1239. }
  1240. </style>