prescribeDetails.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. "use strict";
  2. var common_vendor = require("../common/vendor.js");
  3. var api_prescribe = require("../api/prescribe.js");
  4. require("../common/request.js");
  5. const _sfc_main = {
  6. data() {
  7. return {
  8. doctor: null,
  9. drugs: [],
  10. prescribe: null,
  11. prescribeId: null,
  12. usage: {}
  13. };
  14. },
  15. onLoad(options) {
  16. if (options.prescribeId != null) {
  17. this.prescribeId = options.prescribeId;
  18. } else if (options.hasOwnProperty("q") && options.q) {
  19. const url = decodeURIComponent(options.q);
  20. const obj = this.$urlToObj(url);
  21. this.prescribeId = obj.prescribeId;
  22. }
  23. },
  24. onShow() {
  25. this.getPrescribeById();
  26. },
  27. methods: {
  28. navTo(url) {
  29. common_vendor.index.navigateTo({
  30. url
  31. });
  32. },
  33. copyOrderSn() {
  34. common_vendor.index.setClipboardData({
  35. data: this.order.orderSn,
  36. success: function() {
  37. common_vendor.index.showToast({
  38. title: "\u590D\u5236\u6210\u529F",
  39. icon: "none"
  40. });
  41. }
  42. });
  43. },
  44. getPrescribeById() {
  45. var data = { prescribeId: this.prescribeId };
  46. api_prescribe.getPrescribeById(data).then((res) => {
  47. if (res.code == 200) {
  48. this.prescribe = res.data.prescribe;
  49. this.drugs = res.data.drugs;
  50. this.doctor = res.data.doctor;
  51. this.usage = JSON.parse(this.prescribe.usageJson);
  52. }
  53. }, (err) => {
  54. });
  55. },
  56. navTo(url) {
  57. common_vendor.index.navigateTo({
  58. url
  59. });
  60. }
  61. }
  62. };
  63. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  64. return common_vendor.e({
  65. a: $data.prescribe != null
  66. }, $data.prescribe != null ? common_vendor.e({
  67. b: common_vendor.t($data.doctor.doctorName),
  68. c: common_vendor.t($data.prescribe.patientName),
  69. d: common_vendor.t($data.prescribe.patientAge),
  70. e: common_vendor.t($data.prescribe.patientGender == 1 ? "\u7537" : "\u5973"),
  71. f: common_vendor.t($data.prescribe.prescribeCode),
  72. g: common_vendor.t($data.prescribe.createTime),
  73. h: common_vendor.t($data.prescribe.diagnose),
  74. i: $data.prescribe.status == 2
  75. }, $data.prescribe.status == 2 ? {
  76. j: common_vendor.t($data.prescribe.auditReason)
  77. } : {}, {
  78. k: common_vendor.f($data.drugs, (item, k0, i0) => {
  79. return common_vendor.e({
  80. a: item.drugImgUrl == "" ? "/static/images/drug.svg" : item.drugImgUrl,
  81. b: common_vendor.t(item.drugName),
  82. c: common_vendor.t(item.drugSpec),
  83. d: item.drugType == 1
  84. }, item.drugType == 1 ? {
  85. e: common_vendor.t(item.drugNum)
  86. } : {}, {
  87. f: item.drugType == 1
  88. }, item.drugType == 1 ? {
  89. g: common_vendor.t(item.usageFrequencyUnit),
  90. h: common_vendor.t(item.usagePerUseCount),
  91. i: common_vendor.t(item.usageMethod),
  92. j: common_vendor.t(item.remark)
  93. } : {});
  94. }),
  95. l: $data.prescribe.prescribeType == 2
  96. }, $data.prescribe.prescribeType == 2 ? {
  97. m: common_vendor.t($data.usage.counts),
  98. n: common_vendor.t($data.usage.usageFrequencyUnit),
  99. o: common_vendor.t($data.usage.usagePerUseCount),
  100. p: common_vendor.t($data.usage.usageMethod),
  101. q: common_vendor.t($data.usage.remark)
  102. } : {}, {
  103. r: $data.prescribe.status == 1
  104. }, $data.prescribe.status == 1 ? {
  105. s: $data.prescribe.doctorSignUrl,
  106. t: $data.prescribe.prescribeDoctorSignUrl,
  107. v: $data.prescribe.drugDoctorSignUrl
  108. } : {}, {
  109. w: $data.prescribe.storeOrderId != null && $data.prescribe.storeOrderId > 0 && $data.prescribe.status == 1
  110. }, $data.prescribe.storeOrderId != null && $data.prescribe.storeOrderId > 0 && $data.prescribe.status == 1 ? {
  111. x: common_vendor.o(($event) => $options.navTo("/pages_order/storeOrderDetail?orderId=" + $data.prescribe.storeOrderId))
  112. } : {}) : {});
  113. }
  114. 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"]]);
  115. wx.createPage(MiniProgramPage);