123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
- <template>
- <view class="content">
- <view class="top-fixed">
- <u-tabs
- :scrollable="false"
- :list="tabs"
- lineColor="#C39A58"
- @change="tabChange">
- </u-tabs>
- </view>
- <mescroll-body top="88rpx" bottom="0" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
- <view class="prescribe-list">
- <view v-for="(item,index) in dataList" :key="index" class="item" @click="navTo('/pages_order/prescribeDetails?prescribeId='+item.prescribeId)">
- <view class="ordersn-box">
- <view class="num">处方单号:{{item.prescribeCode}}</view>
- <view class="status-box">
- <text class="text info" v-if="item.status==0">待开方</text>
- <text class="text success" v-if="item.status==1">已开方</text>
- <text class="text black" v-if="item.status==2">已拒绝</text>
- </view>
- </view>
- <view class="ask-text" >诊断结果:{{item.diagnose}}</view>
- <view class="drug-list" >
- <view class="drug-item" v-for="(subItme,index) in item.drugs" >
- <view class="drug-info" >
- <view class="name-box ellipsis">
- <view class="tag">{{index+1}}</view>{{subItme.drugName}}
- </view>
- </view>
- </view>
- </view>
- <view class="ask-text">审核结果:{{item.auditReason}}</view>
- <view class="patient-text">患者:{{item.patientName}} {{item.patientAge}}岁 {{item.patientGender==1?'男':'女'}} </view>
- <view class="ask-time" v-if="item.createTime!=null">提交时间:{{item.createTime}}</view>
- <view class="ask-time" v-if="item.auditTime!=null">审核时间:{{item.auditTime}}</view>
- </view>
- </view>
- </mescroll-body>
- </view>
- </template>
- <script>
- import {getPrescribeList} from '@/api/prescribe.js'
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- data() {
- return {
- status:0,
- tabs:[
- {
- id:0,
- name:'待开方'
- },
- {
- id:1,
- name:'已开方'
- },
- {
- id:2,
- name:'已拒绝'
- }
-
- ],
- mescroll:null,
- // 上拉加载的配置
- upOption: {
- onScroll:false,
- use: true, // 是否启用上拉加载; 默认true
- page: {
- pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
- size: 10 // 每页数据的数量,默认10
- },
- noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
- textNoMore:"已经到底了",
- empty: {
- icon:'https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png',
- tip: '暂无数据'
- }
- },
- // 列表数据
- dataList: []
- }
- },
- onLoad() {
-
- },
- methods: {
- tabChange(item){
- this.status=item.id
- console.log(item)
- this.mescroll.resetUpScroll()
- },
- navTo(url){
- uni.navigateTo({
- url: url
- })
- },
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
- /*下拉刷新的回调 */
- downCallback(mescroll) {
- mescroll.resetUpScroll()
- },
- upCallback(page) {
- //联网加载数据
- var that = this;
- var data = {
- status:this.status,
- pageNum: page.num,
- pageSize: page.size
- };
- getPrescribeList(data).then(res => {
- if(res.code==200){
- //设置列表数据
- if (page.num == 1) {
- that.dataList = res.data.list;
- } else {
- that.dataList = that.dataList.concat(res.data.list);
- }
- that.mescroll.endBySize(res.data.list.length, res.data.total);
-
- }else{
- uni.showToast({
- icon:'none',
- title: "请求失败",
- });
- that.dataList = null;
- that.mescroll.endErr();
- }
- });
- },
- showImg(item) {
- var imgArr = [];
- imgArr.push(item.rpUrl)
- //预览图片
- uni.previewImage({
- urls: imgArr,
- current: imgArr[0]
- });
- }
- }
- }
- </script>
- <style lang="scss">
- .content{
- .top-fixed{
- width: 100%;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 10;
- height: 88upx;
- background-color: #fff;
- }
- .prescribe-list{
- padding: 20upx;
- .item{
- background: #FFFFFF;
- border-radius: 16upx;
- padding: 30upx;
- position: relative;
- margin-bottom: 20upx;
- .ordersn-box{
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0upx 0 10upx;
- .num{
- font-size: 26upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 1;
- }
- .status-box{
- display: flex;
- align-items: center;
- .text{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- line-height: 1;
- &.success{
- color: #2BC7B9;
- }
- &.black{
- color: #111111;
- }
- &.info{
- color: #999999;
- }
- }
- }
- }
- .doctor-info{
- display: flex;
- align-items: center;
- .img-box{
- width: 80upx;
- height: 80upx;
- background: #E0FFF8;
- border-radius: 50%;
- overflow: hidden;
- margin-right: 20upx;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .name{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 48upx;
- text{
- margin-right: 10upx;
- }
- }
- }
- .ask-text{
- margin: 24rpx 0rpx;
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 42upx;
- }
- .patient-text{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- margin-bottom: 15upx;
- }
- .ask-time{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- }
-
- }
- }
- }
- .drug-list{
- .drug-item{
- padding: 10upx 0;
- border-bottom: 1px soli #F0F0F0;
- display: flex;
- align-items: center;
- .drug-info{
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .name-box{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 40upx;
- .tag{
- display: inline-block;
- padding: 0 6upx;
- height: 30upx;
- background: linear-gradient(90deg, #C39A58 0%, #E2C99E 100%);
- border-radius: 4upx;
- margin-right: 10upx;
- font-size: 22upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- line-height: 30upx;
- float: left;
- margin-top: 7upx;
- }
- }
-
-
- }
- }
- }
- </style>
|