分包医生

This commit is contained in:
zoujiandong
2024-01-16 14:59:06 +08:00
parent 562d4e9691
commit d5a9339ddd
1060 changed files with 3177 additions and 44707 deletions
@@ -0,0 +1,32 @@
import { API } from '../../../../utils/network/api'
const api = new API()
const app = getApp()
Page({
data: {
nbFrontColor: '#000000',
nbBackgroundColor: '#ffffff',
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '实名认证', //导航栏 中间的标题
},
height: app.globalData.height,
info: {}
},
onLoad() {
console.log(this.data.height)
},
onShow(){
this.setData({
nbLoading: false,
})
api.getPharmacistInfo().then(response => {
console.log(response.data);
this.setData({
info: response.data
})
}).catch(errors => {
console.error(errors);
})
}
})
@@ -0,0 +1,15 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "../../../../commpents/te_navbar/index",
"t-avatar": "tdesign-miniprogram/avatar/avatar",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index",
"van-button": "@vant/weapp/button/index"
},
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "实名认证",
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light"
}
@@ -0,0 +1,18 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<van-cell-group>
<van-cell size="large" title="真实姓名" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.card_name}}" />
<van-cell size="large" title="身份证号" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.card_num}}" />
<van-cell size="large" title="联系邮箱" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="缺少字段" />
<van-cell size="large" title="手机号码" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="缺少字段" />
<van-cell size="large" title="所在医疗机构" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="缺少字段" />
<van-cell size="large" title="所在科室" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.department_custom_name}}" />
<van-cell size="large" title="职称" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.pharmacist_title}}" />
<van-cell size="large" title="医龄" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="缺少字段" />
<van-cell size="large" title="执业经历" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="缺少字段" />
<van-cell size="large" title="擅长" title-width="120rpx" required title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="缺少字段" />
</van-cell-group>
<view class="submit">
<van-button color="linear-gradient(to right, #4CABEA, #64CFE9)" block round type="info">下一步(去干啥?)</van-button>
</view>
</view>
@@ -0,0 +1,4 @@
.submit{
width: 90vw;
margin: 20rpx auto;
}
+144
View File
@@ -0,0 +1,144 @@
import { API } from '../../../../utils/network/api'
const api = new API()
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
active: 0,
active_color: "rgb(116,162,250)",
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '药师端', //导航栏 中间的标题
},
// 此页面 页面内容距最顶部的距离
height: app.globalData.height,
pharmacist: {},
audit_number: 0,
data_list_0: [],
data_list_1: [],
data_list_2: [],
data_list_3: [],
current_page: 0,
total: 0,
per_page: 0,
last_page: 0,
},
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
active: 0, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
})
}
this.getPharmacistPrescription(this.data.active);
},
/**
* 生命周期函数--监听页面显示
*/
onLoad: function () {
api.getPharmacistIndex().then(response => {
this.setData({
pharmacist: response.data.pharmacist,
audit_number: response.data.audit_number
})
}).catch(errors => {
console.error(errors);
})
},
getPharmacistPrescription(active){
let params = {};
let page = this.data.current_page + 1;
let pharmacist_audit_status = 0;
let platform_audit_status = 1;
if(active == 0){
pharmacist_audit_status = 0;
platform_audit_status = 0;
}
if(active == 1){
pharmacist_audit_status = 1;
platform_audit_status = 1;
}
if(active == 2){
pharmacist_audit_status = 2;
platform_audit_status = 0;
}
if(active == 3){
pharmacist_audit_status = 1;
platform_audit_status = 2;
}
params.pharmacist_audit_status = pharmacist_audit_status;
params.platform_audit_status = platform_audit_status;
params.page = page;
let data_name = "data_list_"+active;
let list = this.data[data_name];
api.getPharmacistPrescription(params).then(response => {
this.setData({
[data_name]: 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);
})
},
onHide(){
this.setData({
current_page: 0,
total: 0,
per_page: 0,
last_page: 0,
data_list_0: [],
data_list_1: [],
data_list_2: [],
data_list_3: [],
})
},
onChange(e){
console.log(e)
let data_name = "data_list_"+e.detail.index;
this.setData({
active: e.detail.index,
current_page: 0,
total: 0,
per_page: 0,
last_page: 0,
[data_name]: []
})
this.getPharmacistPrescription(e.detail.index);
},
onReachBottom() {
console.log('===触底了!!===');
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
this.getPharmacistPrescription(this.data.active)
}
},
go(e){
let url = e.currentTarget.dataset.url;
app.go(url)
},
switchStatus(){
let is_online = this.data.pharmacist.is_online;
if(is_online == 0){
is_online = 1
}else if(is_online == 1){
is_online = 0
}
api.putPharmacistOnOff({is_online: is_online}).then(response => {
this.setData({
"pharmacist.is_online": is_online
})
}).catch(errors => {console.error(errors);})
}
})
+12
View File
@@ -0,0 +1,12 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "../../../../commpents/te_navbar/index",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"t-avatar": "tdesign-miniprogram/avatar/avatar",
"van-button": "@vant/weapp/button/index",
"van-empty": "@vant/weapp/empty/index",
"van-divider": "@vant/weapp/divider/index"
}
}
+136
View File
@@ -0,0 +1,136 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<view class="main title">
<view class="photo">
<t-avatar class="avatar-example" width="20" image="{{pharmacist.avatar}}" />
</view>
<view class="name">
<view class="realname">{{pharmacist.user_name}}</view>
<view class="today_num">今日审方 {{audit_number}}</view>
</view>
<view class="status" bindtap="switchStatus">
<view class="status_text {{pharmacist.is_online==1?'status_online':'status_offline'}}">{{pharmacist.is_online==1?'在线':'离线'}}</view>
</view>
</view>
<view class="main content">
<van-tabs color="{{ active_color }}" bind:change="onChange">
<van-tab title="待审核处方">
<view class="item_list" wx:if="{{data_list_0.length>0}}">
<view class="item" wx:for="{{data_list_0}}">
<view class="item_txt">
<view class="pre_content">处方订单号:{{item.prescription_code}}</view>
<view class="end_content">
<!-- <navigator url="/user/pages/yaoshi/medicalrecord/medicalrecord" open-type="navigate" hover-class="other-navigator-hover">
<van-button type="primary" size="small">查看病例</van-button>
</navigator> -->
</view>
</view>
<view class="item_txt">
<view class="pre_content">开方时间:{{item.created_at}}</view>
<view class="end_content" bindtap="go" data-url="/user/pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}&from=1">
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
</view>
</view>
<view class="item_txt">
<view class="pre_content">{{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁</view>
<view class="end_content" bindtap="go" data-url="/user/pages/yaoshi/prescription/prescription?order_prescription_id={{item.order_prescription_id}}">
<van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button>
</view>
</view>
</view>
<van-divider contentPosition="center" wx:if="{{data_list_0.length > 0 && current_page == last_page}}">到底了~</van-divider>
</view>
<van-empty description="暂无数据" wx:if="{{data_list_0.length == 0}}" />
</van-tab>
<van-tab title="已审核处方">
<view class="item_list" wx:if="{{data_list_1.length>0}}">
<view class="item" wx:for="{{data_list_1}}">
<view class="item_txt">
<view class="pre_content">处方订单号:{{item.prescription_code}}</view>
<view class="end_content" bindtap="go" data-url="/user/pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}">
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
</view>
</view>
<view class="item_txt">
<view class="pre_content">开方时间:{{item.created_at}}</view>
<view class="end_content" style="color: #2196f3;">通过</view>
</view>
<view class="item_txt">
<view class="pre_content">{{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁</view>
<view class="end_content">
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
</view>
</view>
</view>
<van-divider contentPosition="center" wx:if="{{data_list_1.length > 0 && current_page == last_page}}">到底了~</van-divider>
</view>
<van-empty description="暂无数据" wx:if="{{data_list_1.length == 0}}" />
</van-tab>
<van-tab title="驳回处方">
<view class="item_list" wx:if="{{data_list_2.length>0}}">
<view class="item" wx:for="{{data_list_2}}">
<view class="item_txt">
<view class="pre_content">处方订单号:{{item.prescription_code}}</view>
<view class="end_content" bindtap="go" data-url="/user/pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}">
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
</view>
</view>
<view class="item_txt">
<view class="pre_content">开方时间:{{item.created_at}}</view>
<view class="end_content" style="color: red;">驳回</view>
</view>
<view class="item_txt">
<view class="pre_content">{{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁</view>
<view class="end_content">
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
</view>
</view>
<view class="item_txt">
<view class="pre_content">驳回时间:{{item.pharmacist_verify_time}}</view>
</view>
<view class="item_txt">
<view class="pre_content">驳回理由:{{item.pharmacist_fail_reason}}</view>
</view>
</view>
<van-divider contentPosition="center" wx:if="{{data_list_2.length > 0 && current_page == last_page}}">到底了~</van-divider>
</view>
<van-empty description="暂无数据" wx:if="{{data_list_2.length == 0}}" />
</van-tab>
<van-tab title="不通过">
<view class="item_list" wx:if="{{data_list_3.length>0}}">
<view class="item" wx:for="{{data_list_3}}">
<view class="item_txt">
<view class="pre_content">处方订单号:{{item.prescription_code}}</view>
<view class="end_content" bindtap="go" data-url="/user/pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}">
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
</view>
</view>
<view class="item_txt">
<view class="pre_content">开方时间:{{item.created_at}}</view>
<view class="end_content" style="color: red;">驳回</view>
</view>
<view class="item_txt">
<view class="pre_content">{{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁</view>
<view class="end_content">
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
</view>
</view>
</view>
<van-divider contentPosition="center" wx:if="{{data_list_3.length > 0 && current_page == last_page}}">到底了~</van-divider>
</view>
<van-empty description="暂无数据" wx:if="{{data_list_3.length == 0}}" />
</van-tab>
</van-tabs>
</view>
<view style="height: 60px;">
<!-- 适配底部tabbar -->
</view>
</view>
+111
View File
@@ -0,0 +1,111 @@
page{
background-color: #F4F5F7;
}
.container{
width: 100vw;
}
.main{
width: 90vw;
margin: 30rpx auto 0 auto;
background-color: #ffffff;
border-radius: 10rpx;
}
.title{
height: 200rpx;
display: flex;
justify-content: center;
align-items: center;
}
.photo{
flex: 1;
/* background-color: cyan; */
}
.name{
display: flex;
flex-direction: column;
flex: 2;
font-size: 30rpx;
line-height: 50rpx;
/* background-color: burlywood; */
}
.today_num{
font-size: 28rpx;
color: rgb(116,162,250);
}
.status{
flex: 1;
/* background-color: #ace247; */
height: 70%;
}
.status_offline{
background-color: #BFBFBF;
}
.status_online{
background-color: rgb(124, 231, 124);
}
.status_text{
padding: 10rpx 20rpx;
border-radius: 20rpx;
float: right;
margin-right: 25rpx;
font-size: 20rpx;
display: flex;
width: 50rpx;
justify-content: space-evenly;
}
.custom-tabs {
margin-bottom: 32rpx;
}
.avatar-example {
display: flex;
justify-content: center;
align-items: center;
}
.external-class-content {
color: #fff;
background-color: #0052d9;
font-weight: 400;
}
.avatar-example--medium:not(:last-child) {
margin-right: 96rpx;
}
.van-tabs__nav{
border-radius: 20rpx !important;
}
.item_list{
padding-bottom: 100rpx;
background-color: #F4F5F7;
border-radius: 20rpx;
}
.item:last-child{
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}
.item{
border-top: solid rgb(187, 185, 185) 1rpx;
width: 100%;
margin: 0 auto;
background-color: #fff;
padding: 20rpx 0;
}
.item_txt{
display: flex;
/* background-color: #0052d9; */
padding: 10rpx 0;
}
.pre_content{
display: flex;
flex: 3;
/* background-color: chartreuse; */
justify-content: flex-start;
align-items: center;
margin-left: 20rpx;
font-size: 28rpx;
}
.end_content{
display: flex;
flex: 1;
justify-content:center;
align-items: center;
/* background-color: coral; */
}
+22
View File
@@ -0,0 +1,22 @@
// Pages/index/index.js
import { API } from '../../../../utils/network/api'
const api = new API()
Page({
data: {
static_host: api.getStaticHost()
},
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
tabBarShow:false, //true/false
})
}
},
toGo(e){
console.log(e.currentTarget.dataset.url)
wx.switchTab({
url: e.currentTarget.dataset.url
})
}
})
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"t-image": "tdesign-miniprogram/image/image"
}
}
+29
View File
@@ -0,0 +1,29 @@
<view class="title">请选择您的身份</view>
<view>
<view class="item">
<t-image
bindtap="toGo" data-url="/Pages/yaoshi/home/home"
class="item_img"
src="{{static_host}}/applet/doctor/static/images/yi.png"
mode="heightFix"
height="220rpx"
aria-label="医师端"
loading="slot"
>
<t-loading slot="loading" theme="circular" size="40rpx" loading />
</t-image>
</view>
<view class="item">
<t-image
bindtap="toGo" data-url="/Pages/yaoshi/my/my"
class="item_img"
src="{{static_host}}/applet/doctor/static/images/yao.png"
mode="heightFix"
height="220rpx"
aria-label="药师端"
loading="slot">
<t-loading slot="loading" theme="circular" size="40rpx" loading />
</t-image>
</view>
</view>
+19
View File
@@ -0,0 +1,19 @@
.title{
margin-top: 250rpx ;
margin-left: 50rpx;
margin-bottom: 100rpx;
font-size: 50rpx;
font-weight: bold;
}
.item{
display: flex;
flex-direction: row;
margin-bottom: 100rpx;
justify-content: center;
align-content: center;
}
.item_img{
flex: 1;
display: flex;
justify-content: center;
}
+30
View File
@@ -0,0 +1,30 @@
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,
info: ""
},
onLoad(options) {
},
onShow(){
api.getPharmacistInfo().then(response => {
console.log(response.data);
this.setData({
info: response.data
})
}).catch(errors => {
console.error(errors);
})
}
})
+14
View File
@@ -0,0 +1,14 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "../../../../commpents/te_navbar/index",
"t-avatar": "tdesign-miniprogram/avatar/avatar",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index"
},
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "基本资料",
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light"
}
+19
View File
@@ -0,0 +1,19 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<view class="top">
<t-avatar class="avatar" size="large" image="{{info.avatar}}" />
<text class="name">{{info.user_name}}</text>
</view>
<view class="content">
<van-cell-group>
<van-cell size="large" title="姓名" title-width="120rpx" title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.user_name}}" />
<van-cell size="large" title="性别" title-width="120rpx" title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.sex==1?'男':'女'}}" />
<van-cell size="large" title="年龄" title-width="120rpx" title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.age}}" />
<van-cell size="large" title="身份证号" title-width="120rpx" title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.card_num}}" />
<!-- <van-cell size="large" title="手机号码" title-width="120rpx" title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.user_name}}" /> -->
<!-- <van-cell size="large" title="我的地址" title-width="120rpx" title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.user_name}}" /> -->
<van-cell size="large" title="科室" title-width="120rpx" title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.department_custom_name}}" />
<van-cell size="large" title="职称" title-width="120rpx" title-style="text-align: justify;text-justify:distribute-all-lines; text-align-last: justify;" value="{{info.pharmacist_title}}" />
</van-cell-group>
</view>
</view>
+23
View File
@@ -0,0 +1,23 @@
page{
background-color: #F4F4F4;
}
.top{
width: 100vw;
background-color: rgb(255, 255, 255);
height: 370rpx;
display: flex;
justify-content: center;
align-items: center;
align-content: center;
flex-direction: column;
margin-bottom: 20rpx;
}
.name{
color: white;
margin-top: 30rpx;
text-align: justify;
text-justify:distribute-all-lines;
text-align-last: justify;
font-size: 28rpx;
width: 180rpx;
}
@@ -0,0 +1,44 @@
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,
order_inquiry_id: "",
order_prescription_id: "",
case_detail: {},
from: ""
},
onLoad(options) {
let order_inquiry_id = options.order_inquiry_id;
let order_prescription_id = options.order_prescription_id;
let from = options.from;
console.log("order_inquiry_id: ", order_inquiry_id);
this.setData({
order_inquiry_id: order_inquiry_id,
order_prescription_id: order_prescription_id,
from: from,
})
},
onShow(){
api.getCase({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
console.log(response.data);
this.setData({
case_detail: response.data
})
}).catch(errors => {
console.error(errors);
})
},
go(e){
let url = e.currentTarget.dataset.url;
app.go(url)
},
})
@@ -0,0 +1,12 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "../../../../commpents/te_navbar/index",
"van-button": "@vant/weapp/button/index"
},
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "患者病历",
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light"
}
@@ -0,0 +1,28 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<view class="user_info">
<view class="user_item">患者信息</view>
<view class="user_item">
<text class="item_title">姓名:</text>{{case_detail.name}}
<text class="item_title">性别:</text>{{case_detail.sex==1?'男':'女'}}
<text class="item_title">年龄:</text>{{case_detail.age}}岁
</view>
</view>
<view class="case_info">
<view class="item">疾病资料</view>
<view class="item"><text class="item_title">病情主要述:</text>{{case_detail.disease_desc}}</view>
<view class="item">
<text class="item_title">用药意向:</text>
<text wx:for="{{case_detail.product}}">{{item}}</text>
</view>
<view class="item"><text class="item_title">体重:</text>{{case_detail.weight}}KG</view>
<view class="item"><text class="item_title">是否服用过您想购买的药品且无相关禁忌症:</text>{{case_detail.is_taboo==0?'否':'是'}}</view>
<view class="item"><text class="item_title">是否有药物过敏史:</text>{{case_detail.is_allergy_history==0?'否':'是'}}</view>
<view class="item"><text class="item_title">您是否处于备孕、妊娠、哺乳期:</text>{{case_detail.is_pregnant==0?'否':'是'}}</view>
<view class="item"><text class="item_title">复诊凭证</text></view>
</view>
<view class="go_check" bindtap="go" data-url="/user/pages/yaoshi/prescription/prescription?order_prescription_id={{order_prescription_id}}">
<van-button wx:if="{{from == '1'}}" color="linear-gradient(to right, #4CABEA, #64CFE9)" block round type="info">前往审方</van-button>
</view>
<view class="bottom"></view>
</view>
@@ -0,0 +1,35 @@
page{
background-color: #F3F5F7;
}
.container{
letter-spacing: 3rpx;
}
.user_info{
background-color: #fff;
margin: 30rpx 0;
padding: 20rpx;
}
.case_info{
background-color: #fff;
padding: 20rpx;
}
.user_item{
padding: 20rpx 0;
}
.item{
padding: 30rpx 0;
border-bottom: 1rpx solid #F1F1F1;
}
.item_title{
color: #909090;
}
.bottom{
text-align: center;
margin: 30rpx 0;
font-size: 20rpx;
letter-spacing: 5rpx;
}
.go_check{
width: 90vw;
margin: 20rpx auto 50rpx auto;
}
+56
View File
@@ -0,0 +1,56 @@
import { API } from '../../../../utils/network/api'
const api = new API()
const app = getApp()
Page({
data: {
navbarData: {
showCapsule: 0, //是否显示左上角图标 1表示显示 0表示不显示
title: '个人中心', //导航栏 中间的标题
},
height: app.globalData.height,
info:{}
},
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
active: 1, //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
})
}
api.getPharmacistInfo().then(response => {
console.log(response.data);
this.setData({
info: response.data
})
}).catch(errors => {
console.error(errors);
})
},
logOut(){
console.log("退出登录");
let usertype = wx.getStorageSync('usertype');
wx.showModal({
title: '确认退出登录',
content: '退出登录后您需要重新登录',
success (res) {
if (res.confirm) {
console.log('用户点击确定')
wx.setStorageSync('AUTH_TOKEN_'+usertype, "");
wx.setStorageSync('user_id_'+usertype, "");
wx.setStorageSync('client_user_id_'+usertype, "");
app.globalData.isLogin=false;
wx.setStorageSync('usertype','')
app.go("/Pages/index/index");
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
go(e){
console.log(e)
let url = e.currentTarget.dataset.url;
app.go(url);
}
})
+14
View File
@@ -0,0 +1,14 @@
{
"component": true,
"usingComponents": {
"t-avatar": "tdesign-miniprogram/avatar/avatar",
"van-icon": "@vant/weapp/icon/index",
"van-button": "@vant/weapp/button/index",
"te-nav-bar": "../../../../commpents/te_navbar/index"
},
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "个人中心",
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light"
}
+18
View File
@@ -0,0 +1,18 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<view class="top">
<t-avatar class="avatar" size="large" image="{{info.avatar}}" />
<text class="name">{{info.user_name}}</text>
</view>
<view class="content">
<view class="my" bindtap="go" data-url="/Pages/yaoshi/info/info">个人中心</view>
<view class="item_list">
<view class="item" bindtap="go" data-url="/Pages/yaoshi/authentication/authentication">
<van-icon name="user-o" size="50rpx" color="#55B0E5"/>
<text class="item_name">实名认证</text>
</view>
</view>
<van-button type="primary" block bindtap="logOut">退出登录</van-button>
</view>
</view>
+39
View File
@@ -0,0 +1,39 @@
.top{
width: 100vw;
background-color: cornflowerblue;
height: 370rpx;
display: flex;
justify-content: center;
align-items: center;
align-content: center;
flex-direction: column;
}
.name{
color: white;
margin-top: 30rpx;
text-align: justify;
text-justify: inter-word;
text-align-last: justify;
font-size: 28rpx;
width: 180rpx;
}
.my{
display: flex;
height: 100rpx;
/* background-color: teal; */
align-items: center;
padding-left: 30rpx;
color: black;
border-bottom: 1px solid rgb(209, 206, 206);
}
.item{
display: flex;
height: 100rpx;
/* background-color: teal; */
align-items: center;
padding-left: 30rpx;
color: black;
}
.item_name{
margin-left: 20rpx;
}
@@ -0,0 +1,97 @@
import Toast from '@vant/weapp/toast/toast'
import { API } from '../../../../utils/network/api'
const api = new API()
const app = getApp()
Page({
data: {
bohuishow: false,
reasonshow: false,
resonText: "请选择驳回理由",
columns: ['用法错误', '超适应症用药', '诊断与用药不符', '抗生素使用不合理', '重复用药'],
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '处方详情', //导航栏 中间的标题
},
// 此页面 页面内容距最顶部的距离
height: app.globalData.height,
order_prescription_id: "",
prescription_img_oss_path: "",
doctor_sign_image: ""
},
onLoad(options) {
let order_prescription_id = options.order_prescription_id;
console.log("order_prescription_id: ", order_prescription_id)
this.setData({
order_prescription_id: order_prescription_id
})
},
onConfirmReason(event) {
const { picker, value, index } = event.detail;
console.log(`当前值:${value}, 当前索引:${index}`);
let _resonText = `${value}`;
this.setData({ resonText: _resonText });
this.setData({ reasonshow: false });
},
onCancelReason() {
this.setData({ reasonshow: false });
},
showPopup() {
this.setData({ bohuishow: true });
},
showReasonPopup(){
console.log(222);
this.setData({ reasonshow: true });
},
onClose() {
console.log(111);
this.setData({ bohuishow: false });
},
onCloseReason(){
this.setData({ reasonshow: false });
},
closePopup(){
this.setData({ bohuishow: false });
},
submitBohui(e) {
console.log(444);
this.putPharmacistPrescriptionVerify(e);
},
submit(){
console.log(555);
},
onShow(){
api.getPharmacistPrescriptioninfo({order_prescription_id: this.data.order_prescription_id}).then(response => {
console.log(response.data);
this.setData({
prescription_img_oss_path: response.data.prescription_img_oss_path,
doctor_sign_image: response.data.doctor_sign_image
})
}).catch(errors => {console.error(errors);})
},
putPharmacistPrescriptionVerify(e){
console.log(e)
let params = {};
params.pharmacist_audit_status = e.currentTarget.dataset.pharmacist_audit_status;
if(params.pharmacist_audit_status == 2){
params.pharmacist_fail_reason = this.data.resonText;
}
params.order_prescription_id = this.data.order_prescription_id;
api.putPharmacistPrescriptionVerify(params).then(response => {
console.log(response.data);
Toast.success("处理成功");
setTimeout(() => {
wx.navigateBack();
}, 1000);
}).catch(errors => {console.error(errors);})
}
})
@@ -0,0 +1,17 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "../../../../commpents/te_navbar/index",
"van-button": "@vant/weapp/button/index",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index",
"van-toast": "@vant/weapp/toast/index",
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index"
},
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "处方详情",
"backgroundColor": "#eeeeee",
"backgroundTextStyle": "light"
}
@@ -0,0 +1,59 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container">
<view class="img_box" wx:if="{{false}}">
<view class="img_content">
<image class="case_img"
src="{{prescription_img_oss_path}}"
mode="widthFix"
/>
<image class="doctor_sign_image"
src="{{doctor_sign_image}}"
mode="widthFix"
/>
</view>
</view>
<view class="imgbox">
<image src="{{prescription_img_oss_path}}" mode="widthFix" class="prescription"></image>
<image src="{{doctor_sign_image}}" mode="widthFix" class="doctorSign"></image>
</view>
<view class="button_group">
<view class="button_item">
<van-button round plain type="danger" bind:click="showPopup">
<text decode="true">&nbsp;&nbsp;&nbsp;&nbsp;驳回&nbsp;&nbsp;&nbsp;&nbsp;</text>
</van-button>
</view>
<view class="button_item" bindtap="putPharmacistPrescriptionVerify" data-pharmacist_audit_status="1">
<van-button round type="primary" bind:click="submit">
<text decode="true">&nbsp;&nbsp;&nbsp;&nbsp;通过&nbsp;&nbsp;&nbsp;&nbsp;</text>
</van-button>
</view>
</view>
<view style="height: 20rpx;">
</view>
<van-popup show="{{ bohuishow }}" bind:close="onClose">
<view class="pop">
<van-cell size="large" title="驳回理由:" is-link value="{{ resonText }}" bind:click="showReasonPopup"/>
<view class="pop_button">
<view class="pop_button_txt" bindtap="closePopup">取消</view>
<view class="pop_button_txt" bindtap="submitBohui" data-pharmacist_audit_status="2">确认驳回</view>
</view>
</view>
</van-popup>
<van-popup
show="{{ reasonshow }}"
position="bottom"
bind:close="onCloseReason"
>
<van-picker show-toolbar
title="请选择"
columns="{{ columns }}"
bind:cancel="onCancelReason"
bind:confirm="onConfirmReason" />
</van-popup>
<van-toast id="van-toast" />
</view>
@@ -0,0 +1,60 @@
page{
background-color: #F3F5F7;
}
.img_box{
width: 90vw;
margin: 20rpx auto;
text-align: center;
}
.case_img{
width: 100%;
}
.img_content{
background-color: #F3F5F7;
padding: 20rpx;
border-radius: 10rpx;
}
.button_group{
display: flex;
justify-content: space-around;
margin-bottom: 50rpx;
}
.button_item{
display:inline-block;
}
.pop{
width: 90vw;
margin-bottom: 30rpx;
}
.pop_button{
margin-top: 30rpx;
display: flex;
justify-content: space-around;
}
.pop_button_txt{
color: red;
}
.imgbox{
width:100%;
height:0;
position:relative;
padding-bottom:141%;
}
.prescription{
position:absolute;
top:0px;
height:100%;
bottom:0px;
width:100%;
}
.doctorSign{
position:absolute;
width:100rpx;
height:53rpx;
left:125rpx;
bottom:126rpx;
}
.van-cell__value{
flex: 1.2 !important;
}