prescribeDetails.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. <template>
  2. <view class="content">
  3. <view class="cont" v-if="prescribe!=null">
  4. <view class="other-info" >
  5. <view class="title">御君方互联网医院处方笺</view>
  6. <view class="item">
  7. <view class="left">
  8. <text class="label">医生姓名:</text>
  9. <text class="text">{{doctor.doctorName}} </text>
  10. </view>
  11. </view>
  12. <view class="item">
  13. <view class="left">
  14. <text class="label">患者姓名:</text>
  15. <text class="text">{{prescribe.patientName}} </text>
  16. </view>
  17. </view>
  18. <view class="item">
  19. <view class="left">
  20. <text class="label">患者年龄:</text>
  21. <text class="text">{{prescribe.patientAge}}岁 </text>
  22. </view>
  23. </view>
  24. <view class="item">
  25. <view class="left">
  26. <text class="label">患者性别:</text>
  27. <text class="text">{{prescribe.patientGender==1?"男":"女"}} </text>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="other-info " >
  32. <view class="item">
  33. <view class="left">
  34. <text class="label">处方单号:</text>
  35. <text class="text">{{prescribe.prescribeCode}}</text>
  36. </view>
  37. </view>
  38. <view class="item">
  39. <view class="left">
  40. <text class="label">开方时间:</text>
  41. <text class="text">{{prescribe.createTime}}</text>
  42. </view>
  43. </view>
  44. <view class="item">
  45. <view class="left">
  46. <text class="label">医生诊断:</text>
  47. <view class="text">{{prescribe.diagnose}}</view>
  48. </view>
  49. </view>
  50. <view class="item">
  51. <view class="left">
  52. <text class="label">审核意见:</text>
  53. <text class="text" v-if="prescribe.status==2">{{prescribe.auditReason}}</text>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="drug-cont" >
  58. <view class="title">药品信息</view>
  59. <view class="drug-item" v-for="(item) in drugs">
  60. <view class="drug">
  61. <view class="left">
  62. <image :src="item.drugImgUrl==''?'/static/images/drug.svg':item.drugImgUrl" ></image>
  63. <view class="name-cont">
  64. <view class="name-box">
  65. <!-- <view class="tag" v-if="item.drugType==1">西药</view>
  66. <view class="tag" v-if="item.drugType==2">中药</view> -->
  67. <view class="name">{{item.drugName}}</view>
  68. </view>
  69. <view class="spec">{{item.drugSpec}}</view>
  70. <view class="price">
  71. <view class="left">
  72. <!-- {{item.drugPrice}}元 -->
  73. </view>
  74. <view class="num" v-if="item.drugType==1">X{{item.drugNum}}</view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="drug-use" v-if="item.drugType==1">
  80. <view class="name">用药频率:{{item.usageFrequencyUnit}}</view>
  81. <view class="name">单次用量:{{item.usagePerUseCount}}</view>
  82. <view class="name">用药方法:{{item.usageMethod}}</view>
  83. <view class="name">备注:{{item.remark}} </view>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="other-info" v-if="prescribe.prescribeType==2" >
  88. <view class="title left">用药说明</view>
  89. <view class="item">
  90. <view class="left">
  91. <text class="label">用药数量:</text>
  92. <text class="text"> {{usage.counts}}</text>
  93. </view>
  94. </view>
  95. <view class="item">
  96. <view class="left">
  97. <text class="label">用药频率:</text>
  98. <text class="text"> {{usage.usageFrequencyUnit}}</text>
  99. </view>
  100. </view>
  101. <view class="item">
  102. <view class="left">
  103. <text class="label">单次用量:</text>
  104. <text class="text">{{usage.usagePerUseCount}} </text>
  105. </view>
  106. </view>
  107. <view class="item">
  108. <view class="left">
  109. <text class="label">用药方法:</text>
  110. <text class="text">{{usage.usageMethod}} </text>
  111. </view>
  112. </view>
  113. <view class="item">
  114. <view class="left">
  115. <text class="label">备注:</text>
  116. <text class="text">{{usage.remark}} </text>
  117. </view>
  118. </view>
  119. </view>
  120. <view v-if="prescribe.status==1" class="other-info">
  121. <view class="sign">
  122. 出方医生签名
  123. <image :src="prescribe.doctorSignUrl"></image>
  124. </view>
  125. <view class="sign">
  126. 处方医生签名
  127. <image :src="prescribe.prescribeDoctorSignUrl"></image>
  128. </view>
  129. <view class="sign">
  130. 药师签名
  131. <image :src="prescribe.drugDoctorSignUrl"></image>
  132. </view>
  133. </view>
  134. <view class="btn-box">
  135. <view class="btn pay" v-if="prescribe.storeOrderId!=null&&prescribe.storeOrderId>0&&prescribe.status==1" @click="navTo('/pages_order/storeOrderDetail?orderId='+prescribe.storeOrderId)">药品订单</view>
  136. </view>
  137. </view>
  138. </view>
  139. </template>
  140. <script >
  141. import {getPrescribeById} from '@/api/prescribe.js'
  142. export default {
  143. data() {
  144. return {
  145. doctor:null,
  146. drugs:[],
  147. prescribe:null,
  148. prescribeId:null,
  149. usage:{}
  150. }
  151. },
  152. onLoad(options) {
  153. if(options.prescribeId!=null){
  154. this.prescribeId=options.prescribeId;
  155. }
  156. else if (options.hasOwnProperty('q') && options.q) {
  157. // 通过下面这步解码,可以拿到url的值
  158. const url = decodeURIComponent(options.q)
  159. // // 对url中携带的参数提取处理
  160. const obj = this.$urlToObj(url)
  161. this.prescribeId=obj.prescribeId;
  162. }
  163. },
  164. onShow() {
  165. this.getPrescribeById();
  166. },
  167. methods: {
  168. navTo(url){
  169. uni.navigateTo({
  170. url: url
  171. })
  172. },
  173. copyOrderSn() {
  174. uni.setClipboardData({
  175. data: this.order.orderSn,
  176. success: function () {
  177. uni.showToast({
  178. title:'复制成功',
  179. icon:'none'
  180. })
  181. }
  182. })
  183. },
  184. getPrescribeById(){
  185. var data={prescribeId:this.prescribeId}
  186. getPrescribeById(data).then(
  187. res => {
  188. if(res.code==200){
  189. this.prescribe=res.data.prescribe;
  190. this.drugs=res.data.drugs;
  191. this.doctor=res.data.doctor;
  192. this.usage=JSON.parse(this.prescribe.usageJson)
  193. }
  194. },
  195. err => {
  196. }
  197. );
  198. },
  199. navTo(url){
  200. uni.navigateTo({
  201. url: url
  202. })
  203. }
  204. }
  205. }
  206. </script>
  207. <style lang="scss">
  208. page{
  209. background: #f6f6f6;
  210. }
  211. </style>
  212. <style scoped lang="scss">
  213. .content{
  214. position: relative;
  215. .cont{
  216. position: relative;
  217. padding: 0rpx 20rpx 120rpx;
  218. z-index: 999;
  219. width: 100%;
  220. display: flex;
  221. flex-direction: column;
  222. }
  223. .other-info{
  224. margin-top: 20upx;
  225. background-color: #fff;
  226. border-radius: 20upx;
  227. padding: 0 30upx;
  228. .title{
  229. text-align: center;
  230. height: 80upx;
  231. line-height: 80upx;
  232. font-size: 32upx;
  233. color: #000;
  234. font-weight: bold;
  235. }
  236. .left{
  237. text-align: left;
  238. }
  239. .item{
  240. min-height: 80upx;
  241. display: flex;
  242. align-items: center;
  243. justify-content: space-between;
  244. &:last-child{
  245. border-bottom: none;
  246. }
  247. .left{
  248. flex: 1;
  249. display: flex;
  250. align-items: center;
  251. .label{
  252. min-width: 140rpx;
  253. font-size: 28upx;
  254. color: #000;
  255. }
  256. .text{
  257. font-size: 28upx;
  258. color: #1b1b1b;
  259. }
  260. }
  261. }
  262. .sign{
  263. width: 100%;
  264. display: flex;
  265. align-items: center;
  266. justify-content: flex-start;
  267. margin: 15rpx 0rpx;
  268. color: #9B9B9B;
  269. font-size: 24rpx;
  270. image{
  271. margin-left: 20rpx;
  272. width: 240rpx;
  273. height: 100rpx;
  274. }
  275. }
  276. }
  277. .drug-cont{
  278. margin-top: 20upx;
  279. background-color: #fff;
  280. border-radius: 20upx;
  281. padding: 0 30upx 30rpx;
  282. .title{
  283. height: 80upx;
  284. line-height: 80upx;
  285. font-size: 30upx;
  286. color: #000;
  287. font-weight: bold;
  288. border-bottom: 1upx solid #eeeeee;
  289. margin-bottom: 10rpx;
  290. }
  291. .drug-item{
  292. padding: 15rpx;
  293. background-color: #f8f8f8;
  294. display: flex;
  295. flex-direction: column;
  296. align-items: flex-start;
  297. justify-content: flex-start;
  298. margin-bottom: 10rpx;
  299. &:last-child{
  300. margin-bottom: 0rpx;
  301. }
  302. .drug{
  303. width: 100%;
  304. display: flex;
  305. align-items: flex-start;
  306. justify-content: space-between;
  307. .left{
  308. width:100%;
  309. display: flex;
  310. align-items: flex-start;
  311. justify-content: flex-start;
  312. image{
  313. border-radius: 5rpx;
  314. width:100rpx;
  315. height:100rpx;
  316. }
  317. .name-cont{
  318. width: calc(100% - 110rpx);
  319. margin-left: 10rpx;
  320. display: flex;
  321. flex-direction: column;
  322. align-items: flex-start;
  323. justify-content: space-between;
  324. .name-box{
  325. width: 100%;
  326. display: flex;
  327. align-items: flex-start;
  328. justify-content: flex-start;
  329. .tag{
  330. width: 80rpx;
  331. display: flex;
  332. align-items: center;
  333. justify-content: center;
  334. border-radius: 5rpx;
  335. font-size: 24rpx;
  336. border: 1rpx solid #C39A58;
  337. color: #C39A58;
  338. background-color: #f6fefb;
  339. }
  340. .name{
  341. width: calc(100% - 85rpx );
  342. margin-left: 5rpx;
  343. font-size: 30rpx;
  344. color: #111;
  345. }
  346. }
  347. .spec{
  348. font-size: 24rpx;
  349. color: #bfbfbf;
  350. }
  351. .price{
  352. width: 100%;
  353. display: flex;
  354. align-items: center;
  355. justify-content: space-between;
  356. .left{
  357. font-size: 24rpx;
  358. color: red;
  359. }
  360. .num{
  361. font-size: 26rpx;
  362. color: #111;
  363. }
  364. }
  365. }
  366. }
  367. }
  368. .drug-use{
  369. margin: 10rpx 0rpx;
  370. .name{
  371. margin-top: 10rpx;
  372. font-size: 24rpx;
  373. color: #bfbfbf;
  374. }
  375. }
  376. .btns{
  377. width: 100%;
  378. display: flex;
  379. align-items: center;
  380. justify-content: flex-end;
  381. .btn{
  382. margin-left: 10rpx;
  383. border-radius: 30rpx;
  384. border: 1rpx solid #C39A58;
  385. color: #C39A58;
  386. font-size: 26rpx;
  387. padding: 5rpx 15rpx;
  388. }
  389. .red{
  390. border: 1rpx solid red;
  391. color: red;
  392. }
  393. .green{
  394. border: 1rpx solid #C39A58;
  395. color: #C39A58;
  396. }
  397. }
  398. }
  399. }
  400. .btn-box{
  401. height: 100rpx;
  402. z-index: 9999;
  403. width: 100%;
  404. padding: 0rpx 30upx;
  405. position: fixed;
  406. bottom: 0;
  407. left: 0;
  408. box-sizing: border-box;
  409. background-color: #ffffff;
  410. display: flex;
  411. align-items: center;
  412. justify-content: flex-end;
  413. .btn{
  414. padding: 15rpx 30rpx;
  415. margin-left: 10rpx;
  416. text-align: center;
  417. font-size: 28upx;
  418. font-family: PingFang SC;
  419. color: #FFFFFF;
  420. background: #C39A58;
  421. border-radius: 45upx;
  422. }
  423. .red{
  424. border: 1rpx solid #db5053;
  425. background: #db5053;
  426. color: #FFFFFF;
  427. }
  428. }
  429. }
  430. </style>