patientxq.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. <template>
  2. <view style="width: 100%;height: 100%;">
  3. <!-- 表单弹窗 -->
  4. <u-popup v-model="formshow" mode="center" border-radius="14" :closeable="false">
  5. <view style="width: 75vw;height: auto;margin: 30rpx 0;height: 50vh;">
  6. <view class="flex justify-center align-center" style=";font-size: 34rpx;font-weight: bold;margin-bottom:80rpx ;">修改备注</view>
  7. <view style="padding: 0 40rpx;margin-bottom: 40rpx;height: 60%;">
  8. <!-- 病症 -->
  9. <view style="margin-bottom: 20rpx;font-weight: 500;font-size: 28rpx;">备注:</view>
  10. <view style="border: 1rpx solid #C0C0C0;margin-bottom: 20rpx;height: 240rpx;border-radius: 12rpx;padding: 15rpx;">
  11. <input placeholder="请填写备注" @input="bzblur" />
  12. </view>
  13. </view>
  14. <!-- 两个按钮 -->
  15. <view style="display: flex;justify-content: center;align-items: center">
  16. <view style="display:flex;justify-content: center;align-items: center;width: 50%;">
  17. <u-button shape="shape" size="medium" @click="formshow = false">取消</u-button>
  18. </view>
  19. <view style="display:flex;justify-content: center;align-items: center ;width: 50%;">
  20. <u-button shape="shape" size="medium" type="primary" @click="qr">确认</u-button>
  21. </view>
  22. </view>
  23. </view>
  24. </u-popup>
  25. <view class="header-content">
  26. <image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/mybanner.png" style="width:100%;height:260rpx;"></image>
  27. </view>
  28. <view style="padding: 50rpx 30rpx;">
  29. <!-- 头像 名字 按钮 -->
  30. <view class="flex" style="margin-bottom: 50rpx;">
  31. <!-- 头像 -->
  32. <view style="width: 20%;display: flex;align-items: center;">
  33. <image :src="img" mode="aspectFit" style="height: 100rpx;width: 100rpx;border-radius: 50%;"></image>
  34. </view>
  35. <!-- 名字 -->
  36. <view style="width: 52%;color: #FFFFFF;display: grid;align-items: center;">
  37. <view style="font-weight: bold;font-size: 36rpx;">{{name}}</view>
  38. <view style="font-size: 26rpx;">{{bz}}</view>
  39. </view>
  40. <!-- 按钮 -->
  41. <view style="width: 25%;display: flex;align-items: center;">
  42. <u-button shape="circle" :custom-style="customStyle" :hair-line="false" @click="formshow = true">设置备注</u-button>
  43. </view>
  44. </view>
  45. <!-- 用户资料 -->
  46. <view class="zl">
  47. <view>
  48. <view class="flex justify-center" style="font-size: 36rpx;font-weight: 600;margin-bottom: 20rpx;">
  49. <text>{{fwb}}</text>
  50. </view>
  51. <view>服务包数量</view>
  52. </view>
  53. <view>
  54. <view class="flex justify-center" style="font-size: 36rpx;font-weight: 600;margin-bottom: 20rpx;">
  55. <text>{{dd}}</text>
  56. </view>
  57. <view>订单数量</view>
  58. </view>
  59. <view>
  60. <view class="flex justify-center" style="font-size: 36rpx;font-weight: 600;margin-bottom: 20rpx;">
  61. <text>{{da}}</text>
  62. </view>
  63. <view>档案数量</view>
  64. </view>
  65. </view>
  66. <!-- 已购服务 -->
  67. <view>
  68. <view style="font-size: 30rpx;font-weight: bold;margin-bottom: 20rpx;">已购服务</view>
  69. <view v-for="(item,index) in tclist" :key="index" style="margin-bottom: 20rpx;">
  70. <view class="taocan">
  71. <view class="tc_left">
  72. {{item.pack_name}}
  73. </view>
  74. <view class="tc_right">
  75. <view>
  76. <view style="margin-bottom: 20rpx;">{{item.pack_intro}}</view>
  77. <!-- <view style="margin-bottom: 30rpx;">{{item.dd}}</view> -->
  78. <view>有效期:{{item.start_time}}至{{item.end_time}}</view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <!-- 历史问诊 -->
  85. <view style="margin-bottom: 50rpx;">
  86. <!-- 标题 -->
  87. <view style="font-size: 30rpx;font-weight: bold;margin-bottom: 20rpx;">历史问诊</view>
  88. <!-- 卡片 -->
  89. <view class="lswz_card" v-for="(ritem,index) in recordlist" :key="index">
  90. <!-- 上部分 完成 问诊渠道-->
  91. <view style="display: flex;margin-bottom: 25rpx;">
  92. <view style="width: 70%;display: flex;color: #666666;align-items:center;">
  93. <!-- 小点 -->
  94. <view style="height: 12rpx;width: 12rpx;background-color: #666666;border-radius: 50%;margin: 0 10rpx;"></view>
  95. <!-- true为已完成 false未完成 -->
  96. <text v-if="ritem.order_status==1">未支付</text>
  97. <text v-else-if="ritem.order_status==2">待接单</text>
  98. <text v-else-if="ritem.order_status==3">进行中</text>
  99. <text v-else-if="ritem.order_status==4">已完成</text>
  100. <text v-else>已取消</text>
  101. </view>
  102. <view style="width: 30%;display: flex;align-items: center;justify-content: center;">
  103. <u-button size="mini" shape="circle" v-if="ritem.product_type == 1">电话咨询</u-button>
  104. <u-button size="mini" shape="circle" v-else-if="ritem.product_type == 2">图文咨询</u-button>
  105. <u-button size="mini" shape="circle" v-else-if="ritem.product_type == 3">门诊预约</u-button>
  106. <u-button size="mini" shape="circle" v-else-if="ritem.product_type == 4">疫苗接种预约</u-button>
  107. <u-button size="mini" shape="circle" v-else-if="ritem.product_type == 5">儿保预约</u-button>
  108. <u-button size="mini" shape="circle" v-else-if="ritem.product_type == 6">服务包</u-button>
  109. <u-button size="mini" shape="circle" v-else>充值</u-button>
  110. </view>
  111. </view>
  112. <u-line color="#EFEFEF" />
  113. <!-- 下部分 资料 -->
  114. <view style="margin-top: 15rpx;">
  115. <view style="font-size: 26rpx;">
  116. <view style="margin-bottom: 10rpx;display: flex;">
  117. <view style="width: 20%;color: #666666;">患者:</view>
  118. <view style="width: 80%;">{{ritem.name}}</view>
  119. </view>
  120. <view style="margin-bottom: 10rpx;display: flex;">
  121. <view style="width: 20%;color: #666666;">年龄:</view>
  122. <view style="width: 80%;">{{ritem.birthday}}</view>
  123. </view>
  124. <view style="margin-bottom: 10rpx;display: flex;">
  125. <view style="width: 20%;color: #666666;">订单号:</view>
  126. <view style="width: 80%;">{{ritem.order_sn}}</view>
  127. </view>
  128. <view style="margin-bottom: 10rpx;display: flex;">
  129. <view style="width: 20%;color: #666666;">下单时间:</view>
  130. <view style="width: 80%;">{{ritem.created_at}}</view>
  131. </view>
  132. <view style="margin-bottom: 10rpx;display: flex;">
  133. <view style="width: 20%;color: #666666;">结束时间:</view>
  134. <view style="width: 80%;">{{ritem.outtime}}</view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. <!-- 患者档案 -->
  141. <view style="margin-bottom: 200rpx;">
  142. <!-- 标题 -->
  143. <view style="font-size: 30rpx;font-weight: bold;margin-bottom: 20rpx;">患者档案</view>
  144. <!-- 列表 -->
  145. <view class="hzda_list" v-for="(ditem,index) in dalist" @click="clickda" :id='ditem.id' :key='index' :data-index="index">
  146. <!-- 头像 -->
  147. <view class="flex align-center justify-start " style="width: 18%;">
  148. <image :src="ditem.avatar" style="height: 72rpx;width: 72rpx;border-radius: 50%;"></image>
  149. </view>
  150. <!-- 信息 -->
  151. <view style="width: 70%">
  152. <view style="font-size: 30rpx;color: #333333;font-weight: bold;">{{ditem.name}}</view>
  153. <view style="color: #999999;font-size: 26rpx;">
  154. <text style="margin-right: 20rpx;">{{ditem.sex}}</text>
  155. <text>{{ditem.age}}</text>
  156. </view>
  157. </view>
  158. <!-- 箭头 -->
  159. <view class="flex align-center justify-end" style="width: 10%;">
  160. <u-icon name="arrow-right" color="#C0C0C0"></u-icon>
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. <!-- 按钮 -->
  166. <view class="bottomButton">
  167. <view class="b">
  168. <u-button shape="circle" :custom-style="bStyle" @click="phone">电话随访</u-button>
  169. </view>
  170. <view class="b">
  171. <u-button shape="circle" :custom-style="btStyle" v-if="!guanzhu" @click="gzclick">关注</u-button>
  172. <u-button shape="circle" :custom-style="bfStyle" v-else @click="gzclick">已关注</u-button>
  173. </view>
  174. </view>
  175. </view>
  176. </template>
  177. <script>
  178. export default {
  179. data() {
  180. return {
  181. guanzhu: false,
  182. //底部按钮样式
  183. bStyle: {
  184. width: '100%',
  185. height: '100%',
  186. fontSize: '28rpx',
  187. },
  188. btStyle: {
  189. width: '100%',
  190. height: '100%',
  191. fontSize: '28rpx',
  192. color: '#0B73B9',
  193. backgroundColor: '#FFFFFF'
  194. },
  195. bfStyle: {
  196. width: '100%',
  197. height: '100%',
  198. fontSize: '28rpx',
  199. color: '#ffffff',
  200. backgroundColor: '#0B73B9'
  201. },
  202. //收藏按钮样式
  203. customStyle: {
  204. width: '100%',
  205. height: '80rpx',
  206. backgroundColor: '#3a8fc5',
  207. color: '#FFFFFF',
  208. fontSize: '28rpx',
  209. display: 'flex',
  210. alignItems: 'center',
  211. justifyContent: 'center',
  212. border: '1rpx solid #3a8fc5'
  213. },
  214. //头像路径
  215. img: 'https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/头像.png',
  216. //名字
  217. name: '用户名',
  218. bz: '备注',
  219. user_id: 0,
  220. //已购服务
  221. tclist: [],
  222. //历史问诊
  223. recordlist: [],
  224. dalist: [],
  225. //列表
  226. fwb: '1', //服务包
  227. dd: '2', //订单
  228. da: '3', //档案
  229. //装设置备注值
  230. formshow: false,
  231. inputbz: ''
  232. }
  233. },
  234. onLoad(options) {
  235. console.log("ID",options.id);
  236. this.detailres(options.id)
  237. this.getguanzhu();
  238. },
  239. mounted() {
  240. },
  241. methods: {
  242. phone:async function(){
  243. //打电话
  244. let res = await this.$request.post("patient/callPhoneSure",{'user_id':this.user_id});
  245. if(res.status==0){
  246. let phone = res.data;
  247. // 去拨打电话即可
  248. uni.makePhoneCall({
  249. // 手机号
  250. phoneNumber: phone,
  251. // 成功回调
  252. success: (res) => {
  253. console.log('调用成功!')
  254. },
  255. // 失败回调
  256. fail: (res) => {
  257. uni.showModal({
  258. title:"拨打电话调用失败",
  259. })
  260. }
  261. });
  262. }else{
  263. uni.showToast({
  264. title:res.message,
  265. icon:'none',
  266. duration:3000
  267. })
  268. }
  269. },
  270. //点击档案
  271. clickda(e) {
  272. console.log(this.dalist[e.currentTarget.dataset.index])
  273. let idda = e.currentTarget.id
  274. uni.navigateTo({
  275. url: 'patientda?id=' + idda
  276. })
  277. },
  278. //点击关注
  279. gzclick: async function(e) {
  280. if (this.guanzhu) {
  281. console.log('取消关注')
  282. let res = await this.$request.post("doctor/userFollow", {
  283. 'user_id': this.user_id,
  284. 'is_ley': 1
  285. })
  286. this.guanzhu = false
  287. } else {
  288. let res = await this.$request.post("doctor/userFollow", {
  289. 'user_id': this.user_id,
  290. 'is_ley': 2
  291. })
  292. this.guanzhu = true
  293. }
  294. },
  295. detailres: async function(e) {
  296. let idXq = e
  297. console.log("给接口的ID",e)
  298. let res = await this.$request.post("doctor/userListDetile", {
  299. user_id: idXq
  300. })
  301. console.log("请求接口后数据",res)
  302. if (res.status == 0) {
  303. let user_arr = res.data.user_arr
  304. this.user_id = user_arr.id
  305. this.img = user_arr.avatar
  306. this.name = user_arr.nickname
  307. this.bz = user_arr.remark
  308. this.recordlist = res.data.order_arr //历史问诊
  309. this.dalist = res.data.patients_arr //患者档案
  310. this.getguanzhu(user_arr.id);
  311. this.fwb = res.data.nums.fuwu_num;
  312. this.dd = res.data.nums.order_num;
  313. this.da = res.data.nums.pati_num;
  314. // tclist渲染服务包
  315. this.tclist = res.data.fuwu_arr
  316. }else{
  317. uni.showToast({
  318. title:"请求失败",
  319. icon:'none'
  320. })
  321. }
  322. },
  323. getguanzhu: async function(id) {
  324. let res = await this.$request.post('doctor/getFollows', {
  325. 'user_id': id
  326. });
  327. if (res.status == 0) {
  328. this.guanzhu = res.data
  329. }
  330. },
  331. bzblur(e) {
  332. this.inputbz = e.detail.value
  333. },
  334. qr: async function(e) {
  335. if (this.inputbz != '') {
  336. let res = await this.$request.post("doctor/remacks", {
  337. 'id': this.user_id,
  338. 'remak': this.inputbz
  339. });
  340. if (res.status == 0) {
  341. uni.showToast({
  342. title: '设置成功!'
  343. })
  344. this.bz = this.inputbz
  345. this.formshow = false
  346. } else {
  347. uni.showToast({
  348. title: '设置失败!',
  349. icon: "none"
  350. })
  351. }
  352. } else {
  353. uni.showToast({
  354. title: '请填写备注',
  355. icon: 'none'
  356. })
  357. }
  358. }
  359. }
  360. };
  361. </script>
  362. <style scoped lang="scss">
  363. .header-content {
  364. position: absolute;
  365. top: 0;
  366. right: 0;
  367. bottom: 0;
  368. left: 0;
  369. width: 100%;
  370. z-index: -1;
  371. overflow: hidden;
  372. box-sizing: border-box;
  373. }
  374. .custom-style {
  375. width: 100%;
  376. height: 80rpx;
  377. backgroundolor: #3a8fc5;
  378. color: #FFFFFF;
  379. font-size: 28rpx;
  380. border-radius: 10%;
  381. display: flex;
  382. align-items: center;
  383. justify-content: center;
  384. }
  385. // 资料
  386. .zl {
  387. display: flex;
  388. align-items: center;
  389. justify-content: space-around;
  390. padding: 34rpx 28rpx;
  391. background-color: #ffffff;
  392. border-radius: 10rpx;
  393. text-indent: 2em;
  394. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.04);
  395. margin-bottom: 30rpx;
  396. font-size: 26rpx;
  397. }
  398. // 套餐
  399. .taocan {
  400. width: 710rpx;
  401. height: 230rpx;
  402. position: relative;
  403. display: flex;
  404. border-radius: 10rpx;
  405. background: radial-gradient(circle at right top, transparent 15rpx, #ffffff 0) top left / 152rpx 51% no-repeat,
  406. radial-gradient(circle at right bottom, transparent 15rpx, #ffffff 0) bottom left /152rpx 51% no-repeat,
  407. radial-gradient(circle at left top, transparent 15rpx, #ffffff 0) top right /560rpx 51% no-repeat,
  408. radial-gradient(circle at left bottom, transparent 15rpx, #ffffff 0) bottom right /560rpx 51% no-repeat;
  409. filter: drop-shadow(0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.04));
  410. }
  411. //套餐左
  412. .tc_left {
  413. display: flex;
  414. justify-content: center;
  415. align-items: center;
  416. width: 151rpx;
  417. font-size: 30rpx;
  418. font-weight: bold;
  419. border-right: 1rpx dashed #f6f6f6;
  420. }
  421. // 套餐右
  422. .tc_right {
  423. display: flex;
  424. align-items: center;
  425. width: 550rpx;
  426. padding: 30rpx 20rpx;
  427. font-size: 20rpx;
  428. }
  429. //lswz_card历史问诊的卡片
  430. .lswz_card {
  431. width: 100%;
  432. background-color: #FFFFFF;
  433. border-radius: 15rpx;
  434. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.04);
  435. padding: 30rpx;
  436. margin-bottom: 20rpx;
  437. }
  438. //hzda_list患者档案的列表
  439. .hzda_list {
  440. background-color: #FFFFFF;
  441. display: flex;
  442. border-radius: 10rpx;
  443. padding: 30rpx;
  444. margin-bottom: 20rpx;
  445. box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.04);
  446. }
  447. //底部按钮
  448. .bottomButton {
  449. position: fixed;
  450. bottom: 0;
  451. left: 0;
  452. width: 100%;
  453. height: 100rpx;
  454. display: flex;
  455. align-items: center;
  456. justify-content: flex-end;
  457. background-color: #FFFFFF;
  458. z-index: 1;
  459. .b {
  460. margin-right: 30rpx;
  461. padding: 20rpx 0rpx;
  462. height: 100%;
  463. width: 150rpx;
  464. }
  465. }
  466. </style>