prescribeDetails.vue 12 KB

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