clientDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. <template>
  2. <view class="content">
  3. <view class="user-info2">
  4. <view class="align-center justify-between">
  5. <view class="left">
  6. <view class="head-img">
  7. <image :src="user.avatar==null?'../static/images/health/my_heads.png':user.avatar"
  8. mode="aspectFill"></image>
  9. </view>
  10. <view class="name-phone">
  11. <view class="name">{{user.username||'微信用户'}}</view>
  12. <view class="phone-box" v-if="user!=null">
  13. <image class="w32 h32" src="../static/images/company/address_icon.png" mode=""></image>
  14. <view class="address">
  15. {{user.city||'-'}}
  16. </view>
  17. <view class="phone">
  18. {{user.phone?utils.parsePhone(user.phone):'-'}}
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <image class="w80 h80" src="../static/images/company/phone_icon.png" mode=""></image>
  24. </view>
  25. <view class="tag-box">
  26. <view class="align-center justify-between mb32">
  27. <view class="title">他的标签</view>
  28. <view class="title2">编辑标签</view>
  29. </view>
  30. <view class="align-start wrap">
  31. <view class="tag" v-for="(item,index) in tags" :key="index">{{item}}</view>
  32. <!-- <view class="tag">高血压</view> -->
  33. <view class="add-tag">
  34. <image class="w24 h24" src="../static/images/company/add_blue_icon.png" mode=""></image>
  35. <view>添加标签</view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="demands">
  40. <view class="title">健康诉求</view>
  41. <view class="text">{{user.problemsToSolve||'-'}}</view>
  42. </view>
  43. </view>
  44. <view class="used-tools2">
  45. <view class="title">管理</view>
  46. <view class="tools-list">
  47. <view class="item" @click="toHealth()">
  48. <image src="../static/images/company/health_records_icon.png" mode=""></image>
  49. <text class="text">健康档案</text>
  50. </view>
  51. <view class="item" @click="toReport()">
  52. <image src="../static/images/company/physical_examination_icon.png" mode=""></image>
  53. <text class="text">体检信息</text>
  54. </view>
  55. <view class="item" @click="navgetTo()">
  56. <image src="../static/images/company/execution_record_icon.png" mode=""></image>
  57. <text class="text">执行记录</text>
  58. </view>
  59. <view class="item" @click="navgetTo()">
  60. <image src="../static/images/company/return_records_icon.png" mode=""></image>
  61. <text class="text">回访记录</text>
  62. </view>
  63. <view class="item" @click="toOrder()">
  64. <image src="../static/images/company/consumables_mall_icon.png" mode=""></image>
  65. <text class="text">购买信息</text>
  66. </view>
  67. <view class="item" @click="toData()">
  68. <image src="../static/images/company/comparison_indicators_icon.png" mode=""></image>
  69. <text class="text">指标对比</text>
  70. </view>
  71. <view class="item" @click="navgetTo()">
  72. <image src="../static/images/company/evaluation_record_icon.png" mode=""></image>
  73. <text class="text">测评记录</text>
  74. </view>
  75. <view class="item" @click="navgetTo()">
  76. <image src="../static/images/company/follow_up_records_icon.png" mode=""></image>
  77. <text class="text">跟进记录</text>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="used-tools2">
  82. <view class="title">备注信息</view>
  83. <view class="tools-list">
  84. <view class="remark">暂无</view>
  85. </view>
  86. </view>
  87. </view>
  88. </template>
  89. <script>
  90. import {
  91. getUserInfo,
  92. getQrImg
  93. } from '@/api/companyUser'
  94. import {
  95. getInfo,
  96. homeInfo
  97. } from '@/api/health.js'
  98. export default {
  99. data() {
  100. return {
  101. statusBarHeight: '',
  102. top: 0,
  103. // user:{
  104. // nickName:'健康管家小左',
  105. // phonenumber:'13996660261',
  106. // deptName:'测试企业',
  107. // avatar:null
  108. // },
  109. tags: [],
  110. user: null,
  111. info: null
  112. };
  113. },
  114. computed: {
  115. // 计算属性的 getter
  116. bgColor: function() {
  117. var top = this.top / 30;
  118. return 'rgba(11,179,242, ' + top + ')';
  119. },
  120. },
  121. onLoad(options) {
  122. this.userId = options.userId;
  123. this.companyId = options.companyId;
  124. this.companyUserId = options.companyUserId;
  125. uni.$on('refreshClientDetail', () => {
  126. this.mescroll.resetUpScroll()
  127. // this.getUserInfo()
  128. })
  129. },
  130. onShow() {
  131. console.log("onshow")
  132. this.getUserInfo()
  133. // this.getHome()
  134. },
  135. methods: {
  136. getUserInfo() {
  137. // var data={token:uni.getStorageSync('CompanyUserToken')}
  138. getInfo({
  139. userId: this.userId
  140. }).then(
  141. res => {
  142. if (res.code == 200) {
  143. this.user = res.data;
  144. this.getHome()
  145. } else {
  146. uni.showToast({
  147. icon: 'none',
  148. title: res.msg,
  149. });
  150. }
  151. },
  152. rej => {}
  153. );
  154. },
  155. alipay() {
  156. // var url="http://alipay.yjf.runtzh.com/#/?companyId="+this.user.companyId+"&companyUserId="+this.user.userId
  157. // uni.setClipboardData({
  158. // data:url,
  159. // success:()=>{
  160. // uni.showToast({
  161. // title:'收款地址已复制到剪切板',
  162. // icon:'none'
  163. // })
  164. // }
  165. // });
  166. uni.navigateTo({
  167. url: '/pages_company/alipayImg'
  168. })
  169. },
  170. toHealth() {
  171. uni.navigateTo({
  172. url: '/pages_company/addDoc?userId=' + this.userId + "&companyUserId=" + this.companyUserId
  173. })
  174. },
  175. toReport() {
  176. uni.navigateTo({
  177. url: '/pages_user/user/reportList?userId=' + this.userId + "&companyUserId=" + this
  178. .companyUserId
  179. })
  180. },
  181. toRecord() {
  182. uni.navigateTo({
  183. url: '/pages_company/executionRecord?userId=' + this.userId + "&companyUserId=" + this
  184. .companyUserId
  185. })
  186. },
  187. toData() {
  188. uni.navigateTo({
  189. url: '/pages_user/user/dataAnalysis?userId=' + this.userId + "&companyUserId=" + this
  190. .companyUserId
  191. })
  192. },
  193. toCard() {
  194. uni.navigateTo({
  195. url: '/pages_company/card?cardId=' + this.user.cardId
  196. })
  197. },
  198. toCreateOrder() {
  199. uni.navigateTo({
  200. url: '/pages_company/order/productList'
  201. })
  202. },
  203. toPay() {
  204. uni.navigateTo({
  205. url: '/pages_user/user/pay?companyId=' + this.user.companyId + "&companyUserId=" + this.user
  206. .userId
  207. })
  208. },
  209. toOrder() {
  210. uni.navigateTo({
  211. url: '/pages_company/buyOrder?userId=' + this.user.userId + "&companyUserId=" + this
  212. .companyUserId
  213. })
  214. },
  215. toPackage() {
  216. uni.navigateTo({
  217. url: '/pages_company/storeProductPackage?companyId=' + this.user.companyId +
  218. "&companyUserId=" + this.user.userId
  219. })
  220. },
  221. toCoupon() {
  222. uni.navigateTo({
  223. url: '/pages_company/coupon'
  224. })
  225. },
  226. toCreateCoupon() {
  227. uni.navigateTo({
  228. url: '/pages_company/order/coupon'
  229. })
  230. },
  231. toCreateOrderCoupon() {
  232. uni.navigateTo({
  233. url: '/pages_company/order/coupon'
  234. })
  235. },
  236. getHome() {
  237. // var data={token:uni.getStorageSync('CompanyUserToken')}
  238. homeInfo({
  239. userId: this.userId
  240. }).then(
  241. res => {
  242. if (res.code == 200) {
  243. this.info = res.data;
  244. this.tags = res.data.otherMedicalHistory?res.data.otherMedicalHistory.split('、') :[];
  245. } else {
  246. uni.showToast({
  247. icon: 'none',
  248. title: res.msg,
  249. });
  250. }
  251. },
  252. rej => {}
  253. );
  254. },
  255. logout() {
  256. uni.showModal({
  257. title: "提示",
  258. content: "确认退出登录吗?",
  259. showCancel: true,
  260. cancelText: '取消',
  261. confirmText: '确定',
  262. success: res => {
  263. if (res.confirm) {
  264. uni.setStorageSync('CompanyUserToken', null);
  265. uni.navigateBack({
  266. delta: -1
  267. })
  268. } else {}
  269. }
  270. })
  271. },
  272. // 跳转页面
  273. navgetTo(url) {
  274. uni.showToast({
  275. icon: 'none',
  276. title: '暂无更多',
  277. });
  278. // this.utils.isLogin().then(res => {
  279. // // if(res){
  280. // // uni.navigateTo({
  281. // // url: url+'?companyId='+this.companyId+"&companyUserId="+this.companyUserId
  282. // // })
  283. // // }
  284. // })
  285. },
  286. }
  287. }
  288. </script>
  289. <style lang="scss">
  290. .bg {
  291. width: 100%;
  292. height: 380rpx;
  293. position: absolute;
  294. top: 0;
  295. left: 0;
  296. z-index: -1;
  297. }
  298. .content {
  299. padding: 20upx;
  300. background: linear-gradient(180deg, #008FD3 0%, #EFF3F7 24%, #EFF3F7 100%);
  301. height: 100vh;
  302. box-sizing: border-box;
  303. padding-top: 32rpx;
  304. .user-info2 {
  305. box-sizing: border-box;
  306. background: #FFFFFF;
  307. border-radius: 16upx;
  308. padding: 40upx 30upx;
  309. margin-bottom: 20rpx;
  310. .left {
  311. position: relative;
  312. display: flex;
  313. .head-img {
  314. width: 112upx;
  315. height: 112upx;
  316. border-radius: 50%;
  317. overflow: hidden;
  318. margin-right: 30upx;
  319. image {
  320. width: 100%;
  321. height: 100%;
  322. }
  323. }
  324. .name-phone {
  325. // padding-top: 15upx;
  326. display: flex;
  327. flex-direction: column;
  328. justify-content: center;
  329. .name {
  330. font-size: 36upx;
  331. font-family: PingFang SC;
  332. font-weight: bold;
  333. color: #111111;
  334. // line-height: 1;
  335. }
  336. .phone-box {
  337. display: flex;
  338. align-items: center;
  339. margin-top: 14rpx;
  340. .phone {
  341. font-family: PingFang SC;
  342. font-weight: 400;
  343. font-size: 24rpx;
  344. color: #626468;
  345. line-height: 36rpx;
  346. }
  347. .address {
  348. font-family: PingFang SC;
  349. font-weight: 400;
  350. font-size: 24rpx;
  351. color: #626468;
  352. margin-left: 8rpx;
  353. margin-right: 30rpx;
  354. }
  355. }
  356. }
  357. }
  358. .tag-box {
  359. padding-top: 40rpx;
  360. padding-bottom: 40rpx;
  361. border-bottom: 1rpx solid #ECECEC;
  362. .title {
  363. font-family: PingFang SC;
  364. font-weight: 500;
  365. font-size: 32rpx;
  366. color: #222426;
  367. }
  368. .title2 {
  369. font-family: PingFang SC;
  370. font-weight: 400;
  371. font-size: 24rpx;
  372. color: #626468;
  373. }
  374. .tag {
  375. margin-right: 16rpx;
  376. min-width: 112rpx;
  377. height: 56rpx;
  378. padding: 0 10rpx;
  379. margin-bottom: 10rpx;
  380. line-height: 56rpx;
  381. text-align: center;
  382. background: #F0FAFF;
  383. border-radius: 8rpx 8rpx 8rpx 8rpx;
  384. font-size: 24rpx;
  385. color: #008FD3;
  386. }
  387. .add-tag {
  388. display: flex;
  389. align-items: center;
  390. justify-content: center;
  391. width: 160rpx;
  392. height: 56rpx;
  393. background: #FFFFFF;
  394. border-radius: 8rpx 8rpx 8rpx 8rpx;
  395. border: 1rpx solid #008FD3;
  396. font-size: 22rpx;
  397. color: #008FD3;
  398. image {
  399. margin-right: 8rpx;
  400. }
  401. }
  402. }
  403. .demands {
  404. .title {
  405. font-family: PingFang SC;
  406. font-weight: 500;
  407. font-size: 32rpx;
  408. color: #222426;
  409. padding: 28rpx 0;
  410. }
  411. .text {
  412. font-weight: 400;
  413. font-size: 28rpx;
  414. color: #898E91;
  415. }
  416. }
  417. .msg-box {
  418. width: 144rpx;
  419. height: 56rpx;
  420. line-height: 56rpx;
  421. font-family: PingFang SC;
  422. font-weight: 400;
  423. font-size: 24rpx;
  424. color: #FFFFFF;
  425. text-align: center;
  426. background: linear-gradient(90deg, #FEA501 0%, #FECB8A 100%);
  427. border-radius: 28rpx 28rpx 28rpx 28rpx;
  428. border: 1rpx solid #FEDDB9;
  429. }
  430. }
  431. .used-tools2 {
  432. box-sizing: border-box;
  433. background: #FFFFFF;
  434. border-radius: 16upx;
  435. padding: 40upx 30upx;
  436. margin-bottom: 20rpx;
  437. .title {
  438. font-size: 32upx;
  439. font-family: PingFang SC;
  440. font-weight: bold;
  441. color: #222222;
  442. line-height: 1;
  443. }
  444. .tools-list {
  445. margin-top: 50upx;
  446. display: flex;
  447. flex-wrap: wrap;
  448. width: 100%;
  449. .item {
  450. box-sizing: border-box;
  451. width: 25%;
  452. display: flex;
  453. flex-direction: column;
  454. align-items: center;
  455. justify-content: center;
  456. margin-bottom: 50upx;
  457. position: relative;
  458. image {
  459. width: 44upx;
  460. height: 44upx;
  461. }
  462. .text {
  463. font-size: 24upx;
  464. font-family: PingFang SC;
  465. font-weight: 500;
  466. color: #111111;
  467. line-height: 1;
  468. margin-top: 20upx;
  469. }
  470. .contact-btn {
  471. display: inline-block;
  472. position: absolute;
  473. top: 0;
  474. left: 0;
  475. width: 100%;
  476. height: 100%;
  477. opacity: 0;
  478. }
  479. }
  480. .remark {
  481. font-family: PingFang SC;
  482. font-weight: 400;
  483. font-size: 28rpx;
  484. color: #898E91;
  485. text-align: left;
  486. }
  487. }
  488. .index-box {
  489. margin-top: 30rpx;
  490. display: flex;
  491. align-items: center;
  492. justify-content: space-between;
  493. .box-title {
  494. font-family: PingFang SC;
  495. font-weight: 400;
  496. font-size: 24rpx;
  497. color: #626468;
  498. margin: 0 14rpx;
  499. }
  500. .prop {
  501. font-family: Roboto Slab;
  502. font-weight: 500;
  503. font-size: 48rpx;
  504. color: #222426;
  505. }
  506. .task {
  507. width: 311rpx;
  508. height: 142rpx;
  509. background: #EBF8FF;
  510. border-radius: 16rpx 16rpx 16rpx 16rpx;
  511. display: flex;
  512. flex-direction: column;
  513. justify-content: center;
  514. align-items: center;
  515. }
  516. .work {
  517. width: 311rpx;
  518. height: 142rpx;
  519. background: #FFF3DE;
  520. border-radius: 16rpx 16rpx 16rpx 16rpx;
  521. display: flex;
  522. flex-direction: column;
  523. justify-content: center;
  524. align-items: center;
  525. }
  526. }
  527. }
  528. .log-out {
  529. height: 80upx;
  530. line-height: 80upx;
  531. text-align: center;
  532. font-size: 28upx;
  533. font-family: PingFang SC;
  534. font-weight: 500;
  535. color: #666666;
  536. background: #FFFFFF;
  537. border-radius: 16upx;
  538. margin-top: 20upx;
  539. }
  540. }
  541. </style>