分包医生

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,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;
}