prescribeListAll.vue 8.2 KB

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