"use strict";var r=require("../common/vendor.js"),u=require("../api/prescribe.js");require("../common/request.js");const p={data(){return{doctor:null,drugs:[],prescribe:null,prescribeId:null,usage:{}}},onLoad(c){if(c.prescribeId!=null)this.prescribeId=c.prescribeId;else if(c.hasOwnProperty("q")&&c.q){const i=decodeURIComponent(c.q),o=this.$urlToObj(i);this.prescribeId=o.prescribeId}},onShow(){this.getPrescribeById()},methods:{navTo(c){r.index.navigateTo({url:c})},copyOrderSn(){r.index.setClipboardData({data:this.order.orderSn,success:function(){r.index.showToast({title:"\u590D\u5236\u6210\u529F",icon:"none"})}})},getPrescribeById(){var c={prescribeId:this.prescribeId};u.getPrescribeById(c).then(i=>{i.code==200&&(this.prescribe=i.data.prescribe,this.drugs=i.data.drugs,this.doctor=i.data.doctor,this.usage=JSON.parse(this.prescribe.usageJson))},i=>{})},navTo(c){r.index.navigateTo({url:c})}}};function n(c,i,o,g,e,t){return r.e({a:e.prescribe!=null},e.prescribe!=null?r.e({b:r.t(e.doctor.doctorName),c:r.t(e.prescribe.patientName),d:r.t(e.prescribe.patientAge),e:r.t(e.prescribe.patientGender==1?"\u7537":"\u5973"),f:r.t(e.prescribe.prescribeCode),g:r.t(e.prescribe.createTime),h:r.t(e.prescribe.diagnose),i:e.prescribe.status==2},e.prescribe.status==2?{j:r.t(e.prescribe.auditReason)}:{},{k:r.f(e.drugs,(s,d,l)=>r.e({a:s.drugImgUrl==""?"/static/images/drug.svg":s.drugImgUrl,b:r.t(s.drugName),c:r.t(s.drugSpec),d:s.drugType==1},s.drugType==1?{e:r.t(s.drugNum)}:{},{f:s.drugType==1},s.drugType==1?{g:r.t(s.usageFrequencyUnit),h:r.t(s.usagePerUseCount),i:r.t(s.usageMethod),j:r.t(s.remark)}:{})),l:e.prescribe.prescribeType==2},e.prescribe.prescribeType==2?{m:r.t(e.usage.counts),n:r.t(e.usage.usageFrequencyUnit),o:r.t(e.usage.usagePerUseCount),p:r.t(e.usage.usageMethod),q:r.t(e.usage.remark)}:{},{r:e.prescribe.status==1},e.prescribe.status==1?{s:e.prescribe.doctorSignUrl,t:e.prescribe.prescribeDoctorSignUrl,v:e.prescribe.drugDoctorSignUrl}:{},{w:e.prescribe.storeOrderId!=null&&e.prescribe.storeOrderId>0&&e.prescribe.status==1},e.prescribe.storeOrderId!=null&&e.prescribe.storeOrderId>0&&e.prescribe.status==1?{x:r.o(s=>t.navTo("/pages_order/storeOrderDetail?orderId="+e.prescribe.storeOrderId))}:{}):{})}var b=r._export_sfc(p,[["render",n],["__scopeId","data-v-a41e98c2"],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_order/prescribeDetails.vue"]]);wx.createPage(b);
