clientDetail.vue 12 KB

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