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