This commit is contained in:
haomingming
2023-03-06 17:57:39 +08:00
parent 3794faceae
commit 1066e37c96
4230 changed files with 193453 additions and 0 deletions
+82
View File
@@ -0,0 +1,82 @@
import { API } from './../../../utils/network/api'
const api = new API()
const app = getApp()
Page({
data: {
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '处方管理', //导航栏 中间的标题
},
height: app.globalData.height,
stickyProps: {
offsetTop: app.globalData.height*2 + 20,
zIndex: 99
},
prescription_status: 0,
chufang_list_0: [],
chufang_list_2: [],
current_page: 0,
total: 0,
per_page: 0,
last_page: 0,
},
onShow(){
this.getList();
},
onTabsChange(e) {
console.log(e);
let list_name = "chufang_list_" + e.detail.value;
console.log(list_name)
this.setData({
prescription_status: e.detail.value,
current_page: 0,
last_page: 0,
[list_name]: []
})
this.getList()
},
onTabsClick(event) {
console.log(`Click tab, tab-panel value is ${event.detail.value}.`);
},
onStickyScroll(event) {
// console.log(event.detail);
},
onPullDownRefresh(){
console.log('===下拉动作===');
this.setData({
current_page: 0,
})
this.getList();
},
onReachBottom() {
console.log('===触底了!!===');
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
this.getList()
}
},
getList(){
//获取处方列表
let params = {};
params.prescription_status = this.data.prescription_status;//处方审核状态(0:审核中 2:审核驳回)
params.page = this.data.current_page + 1;
api.getDoctorPrescription(params).then(response => {
console.log(response);
if(response.data.total > 0){
let list_name = "chufang_list_" + this.data.prescription_status;
console.log(list_name);
let apprise_list = this.data[list_name];
this.setData({
[list_name]: apprise_list.concat(response.data.data),
current_page: response.data.current_page,
total: response.data.total,
per_page: response.data.per_page,
last_page: response.data.last_page,
})
}
}).catch(errors => {console.error(errors);})
}
})
+8
View File
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel"
}
}
+154
View File
@@ -0,0 +1,154 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<view class="tabs">
<t-tabs
defaultValue="{{0}}"
sticky
stickyProps="{{ stickyProps }}"
bind:change="onTabsChange"
bind:click="onTabsClick"
bind:scroll="onStickyScroll"
t-class="custom-tabs"
>
<t-tab-panel label="审核中" value="0" style="overflow: scroll;">
<view class="item_list" style="overflow: scroll;">
<view class="item" wx:for="{{chufang_list_0}}">
<!-- 头部 -->
<view class="item_top">
<view class="item_top_name">{{item.patient_name}}</view>
<view class="item_top_sex">{{item.patient_sex==1?'男':'女'}} | {{item.patient_age}}岁</view>
<view class="item_top_status_box">
<!-- 药师审核状态(0:审核中 1:审核成功 2:审核驳回) -->
<view class="item_top_status">
{{item.pharmacist_audit_status==0?'审核中':item.pharmacist_audit_status==1?'审核成功':'审核驳回'}}
</view>
</view>
</view>
<!-- 中间内容部分 -->
<view class="item_content">
<view class="item_content_li">
<view class="item_content_li_title">开方时间:</view>
<view class="item_content_li_txt">{{item.created_at}}</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">病情描述:</view>
<view class="item_content_li_txt">{{item.disease_desc}}</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">确诊日期:</view>
<view class="item_content_li_txt">{{item.diagnosis_date}}</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">病情诊断:</view>
<view class="item_content_li_txt">
<text wx:for="{{item.order_prescription_icd}}" wx:for-item="icd">{{icd.icd_name}};</text>
</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="item_bottom">
<view class="item_bottom_btn">问诊记录</view>
</view>
</view>
</view>
</t-tab-panel>
<!-- 驳回面板 -->
<t-tab-panel label="驳回" value="2" >
<view class="item_list">
<view class="item" wx:for="{{chufang_list_2}}">
<!-- 头部 -->
<view class="item_top">
<view class="item_top_name">{{item.patient_name}}</view>
<view class="item_top_sex">{{item.patient_sex==1?'男':'女'}} | {{item.patient_age}}岁</view>
<view class="item_top_status_box">
<!-- 药师审核状态(0:审核中 1:审核成功 2:审核驳回) -->
<view class="item_top_status item_top_status_no">
{{item.pharmacist_audit_status==0?'审核中':item.pharmacist_audit_status==1?'审核成功':'审核驳回'}}
</view>
</view>
</view>
<!-- 中间内容部分 -->
<view class="item_content">
<view class="item_content_li">
<view class="item_content_li_title">开方时间:</view>
<view class="item_content_li_txt">{{item.created_at}}</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">病情描述:</view>
<view class="item_content_li_txt">{{item.disease_desc}}</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">确诊日期:</view>
<view class="item_content_li_txt">{{item.diagnosis_date}}</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">病情诊断:</view>
<view class="item_content_li_txt">{{item.icd_name}}</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">驳回原因:</view>
<view class="item_content_li_txt">{{item.platform_fail_reason}}</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="item_bottom">
<view class="item_bottom_btn">问诊记录</view>
<view class="item_bottom_btn item_bottom_btn_repeat">
<navigator url="/Pages/yishi/onlinechufang/index" open-type="navigate" hover-class="other-navigator-hover">
重开处方
</navigator>
</view>
</view>
</view>
<view class="item">
<!-- 头部 -->
<view class="item_top">
<view class="item_top_name">张三三4</view>
<view class="item_top_sex">男 | 30岁</view>
<view class="item_top_status_box">
<view class="item_top_status item_top_status_no">驳回</view>
</view>
</view>
<!-- 中间内容部分 -->
<view class="item_content">
<view class="item_content_li">
<view class="item_content_li_title">病情诊断:</view>
<view class="item_content_li_txt">4年</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">病情诊断:</view>
<view class="item_content_li_txt">头疼,腰疼、肩膀酸、等症状已经困</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">病情诊断:</view>
<view class="item_content_li_txt">新冠病毒</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">处方时间:</view>
<view class="item_content_li_txt">2022年12月23日 12:45</view>
</view>
<view class="item_content_li">
<view class="item_content_li_title">驳回原因:</view>
<view class="item_content_li_txt">图片不清晰</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="item_bottom">
<view class="item_bottom_btn">问诊记录</view>
<view class="item_bottom_btn item_bottom_btn_repeat">
<navigator url="/Pages/yishi/onlinechufang/index" open-type="navigate" hover-class="other-navigator-hover">
重开处方
</navigator>
</view>
</view>
</view>
</view>
</t-tab-panel>
</t-tabs>
</view>
</view>
+105
View File
@@ -0,0 +1,105 @@
.container{
width: 100vw;
height: 100vh;
background-color: #F6F6F6;
}
.t-tabs__content{
background-color: #F6F6F6;
}
.t-tabs__item--active{
color: #49B9AD !important;
}
.t-tabs__track{
background-color: var(--td-tab-track-color, var(--td-primary-color, #49B9AD)) !important;
}
.item_list{
width: 90vw;
margin: 0 auto;
}
.item{
width: 100%;
border-radius: 20rpx;
background-color: #fff;
margin: 20rpx 0;
}
.item_top{
position: relative;
height: 100rpx;
display: flex;
align-items: center;
padding: 0 32rpx;
}
.item_top::after {
position: absolute;
box-sizing: border-box;
content: ' ';
pointer-events: none;
right: 32rpx;
left: 32rpx;
bottom: 0;
border-bottom: 1px dashed var(--td-cell-border-color, var(--td-gray-color-3, #999));
transform: scaleY(0.5);
}
.item_top_name{
flex: 1;
color: #3CC7C0;
font-size: 34rpx;
}
.item_top_sex{
flex: 3;
font-size: 34rpx;
color: #666;
}
.item_top_status_box{
flex: 1;
}
.item_top_status{
padding: 10rpx;
color: #FA541C;
background-color: #FFF2E8;
text-align: center;
border-radius: 10rpx;
font-size: 24rpx;
}
.item_top_status_no{
color: #fff;
background-color: #999;
}
.item_content{
padding: 20rpx 32rpx 0rpx 32rpx;
}
.item_content_li{
display: flex;
padding-bottom: 20rpx;
}
.item_content_li_title{
font-size: 30rpx;
}
.item_content_li_txt{
margin-left: 10rpx;
flex: 1;
color: #666666;
font-size: 28rpx;
}
.item_bottom{
height: 120rpx;
}
.item_bottom_btn{
position: relative;
top: 50%;
transform: translateY(-50%);
margin-right: 32rpx;
float: right;
text-align: center;
color: #fff;
padding: 15rpx 20rpx 15rpx 20rpx;
width: 150rpx;
background: linear-gradient(305deg, #FF931A 0%, #FCB75D 100%);
border-radius: 50rpx;
letter-spacing: 5rpx;
font-size: 28rpx;
}
.item_bottom_btn_repeat{
background: linear-gradient(129deg, #13DFD5 0%, #31C9C1 100%);
}