add file
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
import Toast from '@vant/weapp/toast/toast';
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
bohuishow: false,
|
||||
reasonshow: false,
|
||||
resonText: "请选择驳回理由",
|
||||
columns: ['用法错误', '超适应症用药', '诊断与用药不符', '抗生素使用不合理', '重复用药'],
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '处方详情', //导航栏 中间的标题
|
||||
},
|
||||
|
||||
// 此页面 页面内容距最顶部的距离
|
||||
height: app.globalData.height,
|
||||
},
|
||||
onLoad() {
|
||||
console.log(this.data.height)
|
||||
},
|
||||
|
||||
onConfirmReason(event) {
|
||||
const { picker, value, index } = event.detail;
|
||||
console.log(`当前值:${value}, 当前索引:${index}`);
|
||||
let _resonText = `${value}`;
|
||||
this.setData({ resonText: _resonText });
|
||||
this.setData({ reasonshow: false });
|
||||
},
|
||||
|
||||
onCancelReason() {
|
||||
Toast('取消');
|
||||
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() {
|
||||
console.log(444);
|
||||
Toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
onClose: () => {
|
||||
console.log('执行OnClose函数');
|
||||
this.setData({ bohuishow: false });
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
submit(){
|
||||
console.log(555);
|
||||
}
|
||||
|
||||
})
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"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,48 @@
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="img_box">
|
||||
<view class="img_content">
|
||||
<image class="case_img"
|
||||
src="https://gdxz-hospital.oss-cn-chengdu.aliyuncs.com/applet/doctor/static/images/prescription_demo.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="button_group">
|
||||
<view class="button_item">
|
||||
<van-button round plain type="danger" bind:click="showPopup">
|
||||
<text decode="true"> 驳回 </text>
|
||||
</van-button>
|
||||
</view>
|
||||
<view class="button_item">
|
||||
<van-button round type="primary" bind:click="submit">
|
||||
<text decode="true"> 通过 </text>
|
||||
</van-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-popup show="{{ bohuishow }}" bind:close="onClose">
|
||||
<view class="pop">
|
||||
<van-cell 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">确认驳回</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,36 @@
|
||||
.container{
|
||||
background-color: #F3F5F7;
|
||||
}
|
||||
.img_box{
|
||||
width: 90vw;
|
||||
margin: 20rpx auto;
|
||||
text-align: center;
|
||||
}
|
||||
.case_img{
|
||||
width: 100%;
|
||||
}
|
||||
.img_content{
|
||||
background-color: #F1F1F3;
|
||||
padding: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.button_group{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
.button_item{
|
||||
display:inline-block;
|
||||
}
|
||||
.pop{
|
||||
width: 80vw;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.pop_button{
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.pop_button_txt{
|
||||
color: red;
|
||||
}
|
||||
Reference in New Issue
Block a user