优化
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import Toast from '@vant/weapp/toast/toast';
|
||||
import Toast from '@vant/weapp/toast/toast'
|
||||
import { API } from './../../../utils/network/api'
|
||||
const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
@@ -12,10 +14,15 @@ Page({
|
||||
},
|
||||
|
||||
// 此页面 页面内容距最顶部的距离
|
||||
height: app.globalData.height,
|
||||
height: app.globalData.height,
|
||||
order_prescription_id: ""
|
||||
},
|
||||
onLoad() {
|
||||
console.log(this.data.height)
|
||||
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) {
|
||||
@@ -27,7 +34,6 @@ Page({
|
||||
},
|
||||
|
||||
onCancelReason() {
|
||||
Toast('取消');
|
||||
this.setData({ reasonshow: false });
|
||||
},
|
||||
|
||||
@@ -53,21 +59,34 @@ Page({
|
||||
this.setData({ bohuishow: false });
|
||||
},
|
||||
|
||||
submitBohui() {
|
||||
submitBohui(e) {
|
||||
console.log(444);
|
||||
Toast.loading({
|
||||
message: '加载中...',
|
||||
forbidClick: true,
|
||||
onClose: () => {
|
||||
console.log('执行OnClose函数');
|
||||
this.setData({ bohuishow: false });
|
||||
},
|
||||
});
|
||||
|
||||
this.putPharmacistPrescriptionVerify(e);
|
||||
},
|
||||
|
||||
submit(){
|
||||
console.log(555);
|
||||
},
|
||||
onShow(){
|
||||
api.getPharmacistPrescriptioninfo({order_prescription_id: this.data.order_prescription_id}).then(response => {
|
||||
console.log(response.data);
|
||||
}).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);})
|
||||
}
|
||||
|
||||
})
|
||||
@@ -14,19 +14,22 @@
|
||||
<text decode="true"> 驳回 </text>
|
||||
</van-button>
|
||||
</view>
|
||||
<view class="button_item">
|
||||
<view class="button_item" bindtap="putPharmacistPrescriptionVerify" data-pharmacist_audit_status="1">
|
||||
<van-button round type="primary" bind:click="submit">
|
||||
<text decode="true"> 通过 </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">确认驳回</view>
|
||||
<view class="pop_button_txt" bindtap="submitBohui" data-pharmacist_audit_status="2">确认驳回</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
.container{
|
||||
page{
|
||||
|
||||
background-color: #F3F5F7;
|
||||
}
|
||||
|
||||
.img_box{
|
||||
width: 90vw;
|
||||
margin: 20rpx auto;
|
||||
|
||||
Reference in New Issue
Block a user