prescribeOrder.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <view class="content">
  3. <view class="consu-list">
  4. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
  5. <view v-for="(item,index) in dataList" :key="index" class="item" @click="showImg(item)">
  6. <view class="ordersn-box">
  7. <view class="num">处方单号:{{item.rpId}}</view>
  8. <view class="status-box">
  9. <text class="text info" v-if="item.status==0">待开方</text>
  10. <text class="text success" v-if="item.status==1">已开方</text>
  11. <text class="text black" v-if="item.status==2">已拒绝</text>
  12. </view>
  13. </view>
  14. <view class="drug-list" >
  15. <view class="drug-item" v-for="(subItme,index) in item.items" >
  16. <view class="drug-info" >
  17. <view class="name-box ellipsis2">
  18. <view class="tag">处方药</view>{{subItme.drugName}}
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="ask-text" v-if="item.status==1">诊断结果:{{item.diagnose}}</view>
  24. <view class="ask-text" v-if="item.status==2">审核结果:{{item.auditReason}}</view>
  25. <view class="patient-text" v-if="item.status==1">医生:{{item.doctorName}} </view>
  26. <view class="patient-text">患者:{{item.patientName}} {{item.patientAge}}岁 {{item.patientGender==1?'男':'女'}} </view>
  27. <view class="ask-time" v-if="item.createTime!=null">提交时间:{{item.createTime}}</view>
  28. <view class="ask-time" v-if="item.rpCreateTime!=null">开方时间:{{item.rpCreateTime}}</view>
  29. </view>
  30. </mescroll-body>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import {getMyPrescribeList} from '@/api/prescribe.js'
  36. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  37. export default {
  38. mixins: [MescrollMixin],
  39. data() {
  40. return {
  41. mescroll:null,
  42. // 上拉加载的配置
  43. upOption: {
  44. onScroll:true,
  45. use: true, // 是否启用上拉加载; 默认true
  46. page: {
  47. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  48. size: 10 // 每页数据的数量,默认10
  49. },
  50. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  51. empty: {
  52. icon:'/static/images/no_data.png',
  53. tip: '暂无数据'
  54. }
  55. },
  56. // 列表数据
  57. dataList: []
  58. }
  59. },
  60. onLoad() {
  61. },
  62. methods: {
  63. mescrollInit(mescroll) {
  64. this.mescroll = mescroll;
  65. },
  66. /*下拉刷新的回调 */
  67. downCallback(mescroll) {
  68. mescroll.resetUpScroll()
  69. },
  70. upCallback(page) {
  71. //联网加载数据
  72. var that = this;
  73. var data = {
  74. page: page.num,
  75. pageSize: page.size
  76. };
  77. getMyPrescribeList(data).then(res => {
  78. if(res.code==200){
  79. //设置列表数据
  80. res.data.list.forEach(function(element) {
  81. element.items=JSON.parse(element.drugs);
  82. });
  83. if (page.num == 1) {
  84. that.dataList = res.data.list;
  85. } else {
  86. that.dataList = that.dataList.concat(res.data.list);
  87. }
  88. that.mescroll.endBySize(res.data.list.length, res.data.total);
  89. }else{
  90. uni.showToast({
  91. icon:'none',
  92. title: "请求失败",
  93. });
  94. that.dataList = null;
  95. that.mescroll.endErr();
  96. }
  97. });
  98. },
  99. showImg(item) {
  100. var imgArr = [];
  101. imgArr.push(item.rpUrl)
  102. //预览图片
  103. uni.previewImage({
  104. urls: imgArr,
  105. current: imgArr[0]
  106. });
  107. }
  108. }
  109. }
  110. </script>
  111. <style lang="scss">
  112. .content{
  113. padding: 20upx;
  114. .top-fixed{
  115. width: 100%;
  116. position: fixed;
  117. top: 0;
  118. left: 0;
  119. z-index: 10;
  120. }
  121. .pub-tab-box{
  122. box-sizing: border-box;
  123. width: 100%;
  124. padding: 0 40upx;
  125. background-color: #FFFFFF;
  126. .tab-inner{
  127. height: 88upx;
  128. line-height: 88upx;
  129. display: flex;
  130. align-items: center;
  131. justify-content: space-between;
  132. overflow-x: auto;
  133. }
  134. .item{
  135. font-size: 28upx;
  136. white-space: nowrap;
  137. line-height: 1;
  138. font-family: PingFang SC;
  139. font-weight: 500;
  140. color: #666666;
  141. margin-right: 60upx;
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. &:last-child{
  146. margin-right: 0;
  147. }
  148. &.active{
  149. font-weight: bold;
  150. color: #333333;
  151. }
  152. .text{
  153. position: relative;
  154. z-index: 1;
  155. }
  156. .tab-bg{
  157. width: 72upx;
  158. height: 28upx;
  159. position: absolute;
  160. top: 17upx;
  161. left: 50%;
  162. transform: translateX(-36upx);
  163. z-index: -1;
  164. }
  165. }
  166. }
  167. .consu-list{
  168. .item{
  169. background: #FFFFFF;
  170. border-radius: 16upx;
  171. padding: 40upx 30upx;
  172. position: relative;
  173. margin-bottom: 20upx;
  174. .ordersn-box{
  175. display: flex;
  176. align-items: center;
  177. justify-content: space-between;
  178. padding: 0upx 0 10upx;
  179. .num{
  180. font-size: 26upx;
  181. font-family: PingFang SC;
  182. font-weight: 500;
  183. color: #999999;
  184. line-height: 1;
  185. }
  186. .status-box{
  187. display: flex;
  188. align-items: center;
  189. .recom-box{
  190. width: 108upx;
  191. height: 30upx;
  192. line-height: 30upx;
  193. text-align: left;
  194. padding-left: 8upx;
  195. font-size: 22upx;
  196. font-family: PingFang SC;
  197. font-weight: 500;
  198. color: #FFFFFF;
  199. background-image: url(../../static/images/recom.png);
  200. background-repeat: no-repeat;
  201. background-size: 100% 100%;
  202. margin-right: 8upx;
  203. }
  204. .text{
  205. font-size: 28upx;
  206. font-family: PingFang SC;
  207. font-weight: 500;
  208. line-height: 1;
  209. &.success{
  210. color: #018C39;
  211. }
  212. &.black{
  213. color: #111111;
  214. }
  215. &.info{
  216. color: #999999;
  217. }
  218. }
  219. }
  220. }
  221. .doctor-info{
  222. display: flex;
  223. align-items: center;
  224. .img-box{
  225. width: 80upx;
  226. height: 80upx;
  227. background: #E0FFF8;
  228. border-radius: 50%;
  229. overflow: hidden;
  230. margin-right: 20upx;
  231. image{
  232. width: 100%;
  233. height: 100%;
  234. }
  235. }
  236. .name{
  237. font-size: 28upx;
  238. font-family: PingFang SC;
  239. font-weight: 500;
  240. color: #666666;
  241. line-height: 48upx;
  242. text{
  243. margin-right: 10upx;
  244. }
  245. }
  246. }
  247. .ask-text{
  248. margin: 24rpx 0rpx;
  249. font-size: 30upx;
  250. font-family: PingFang SC;
  251. font-weight: 500;
  252. color: #111111;
  253. line-height: 42upx;
  254. }
  255. .patient-text{
  256. font-size: 24upx;
  257. font-family: PingFang SC;
  258. font-weight: 500;
  259. color: #999999;
  260. margin-bottom: 15upx;
  261. }
  262. .ask-time{
  263. font-size: 24upx;
  264. font-family: PingFang SC;
  265. font-weight: 500;
  266. color: #999999;
  267. }
  268. }
  269. }
  270. }
  271. .drug-list{
  272. .drug-item{
  273. padding: 10upx 0;
  274. border-bottom: 1px soli #F0F0F0;
  275. display: flex;
  276. align-items: center;
  277. .drug-info{
  278. width: 100%;
  279. display: flex;
  280. flex-direction: column;
  281. justify-content: space-between;
  282. .name-box{
  283. font-size: 28upx;
  284. font-family: PingFang SC;
  285. font-weight: 500;
  286. color: #111111;
  287. line-height: 40upx;
  288. .tag{
  289. display: inline-block;
  290. padding: 0 6upx;
  291. height: 30upx;
  292. background: linear-gradient(90deg, #66b2ef 0%, #018C39 100%);
  293. border-radius: 4upx;
  294. margin-right: 10upx;
  295. font-size: 22upx;
  296. font-family: PingFang SC;
  297. font-weight: bold;
  298. color: #FFFFFF;
  299. line-height: 30upx;
  300. float: left;
  301. margin-top: 7upx;
  302. }
  303. }
  304. }
  305. }
  306. }
  307. </style>