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