123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- "use strict";
- var common_vendor = require("../common/vendor.js");
- var store_index = require("../store/index.js");
- var api_inquiryOrder = require("../api/inquiryOrder.js");
- var api_common = require("../api/common.js");
- require("../store/modules.js");
- require("../store/modules/timStore.js");
- require("../common/request.js");
- const _sfc_main = {
- data() {
- return {
- report: null,
- patient: null,
- hospital: null,
- department: null,
- doctor: null,
- order: null,
- orderId: null,
- orderStatusOptions: [],
- orderTypeOptions: [],
- inquiryTypeOptions: [],
- reportImages: [],
- tongueImages: [],
- faceImages: [],
- forms: []
- };
- },
- onLoad(options) {
- this.orderId = options.orderId;
- this.getDictByKey("sys_inquiry_order_type");
- this.getDictByKey("sys_inquiry_type");
- this.getDictByKey("sys_inquiry_status");
- },
- onShow() {
- this.getCompanyUserInquiryOrderById();
- },
- methods: {
- cancel() {
- var that = this;
- common_vendor.index.showModal({
- title: "\u63D0\u793A",
- content: "\u786E\u8BA4\u53D6\u6D88\u8BA2\u5355\u5417?",
- showCancel: true,
- cancelText: "\u53D6\u6D88",
- confirmText: "\u786E\u5B9A",
- success: (res) => {
- if (res.confirm) {
- var data = { orderId: this.orderId };
- api_inquiryOrder.cancel(data).then((res2) => {
- if (res2.code == 200) {
- that.getMyInquiryOrderById();
- common_vendor.index.showToast({
- icon: "success",
- title: "\u64CD\u4F5C\u6210\u529F"
- });
- } else {
- common_vendor.index.showToast({
- icon: "none",
- title: res2.msg
- });
- }
- }, (rej) => {
- });
- }
- }
- });
- },
- ping() {
- common_vendor.index.navigateTo({
- url: "/pages_order/pingOrder?orderId=" + this.orderId + "&doctorId=" + this.order.doctorId
- });
- },
- pay() {
- common_vendor.index.navigateTo({
- url: "/pages_order/inquiryPay?orderId=" + this.orderId
- });
- },
- toIM() {
- var that = this;
- var id = "C2CD-" + this.doctor.doctorId;
- console.log(common_vendor.index.$TUIKit.TUIConversationServer);
- store_index.store.commit("timStore/setConversationID", id);
- common_vendor.index.$TUIKit.TUIConversationServer.setMessageRead(id);
- common_vendor.index.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
- var _a;
- common_vendor.index.$TUIKit.TUIConversationServer.setConversationValue(id, that.orderId).then((res2) => {
- console.log("\u66F4\u65B0order");
- }).catch((err) => {
- });
- console.log(res);
- const { conversation } = res.data;
- store_index.store.commit("timStore/setImType", 1);
- store_index.store.commit("timStore/setConversation", conversation);
- let url = "/pages/TUIKit/TUIPages/TUIChat/index";
- conversation.userProfile;
- url = `${url}?conversationName=${((_a = conversation.userProfile.nick) == null ? void 0 : _a.nick) || conversation.userProfile.userID}`;
- common_vendor.index.redirectTo({ url });
- }).catch((err) => {
- console.warn("\u83B7\u53D6 group profile \u5F02\u5E38 = ", err);
- });
- },
- 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"
- });
- }
- });
- },
- getCompanyUserInquiryOrderById() {
- var that = this;
- var data = { orderId: this.orderId };
- api_inquiryOrder.getCompanyUserInquiryOrderById(data).then((res) => {
- if (res.code == 200) {
- this.order = res.data.order;
- this.report = res.data.report;
- this.patient = JSON.parse(res.data.order.patientJson);
- if (this.report != null && this.report.formJson != null) {
- this.forms = JSON.parse(this.report.formJson);
- }
- if (that.patient.reportImages != null) {
- that.reportImages = that.patient.reportImages.split(",");
- }
- if (that.patient.tongueImages != null) {
- that.tongueImages = that.patient.tongueImages.split(",");
- }
- if (that.patient.faceImages != null) {
- that.faceImages = that.patient.faceImages.split(",");
- }
- this.doctor = res.data.doctor;
- this.department = res.data.department;
- this.hospital = res.data.hospital;
- }
- }, (err) => {
- });
- },
- getDictByKey(key) {
- var data = { key };
- api_common.getDictByKey(data).then((res) => {
- if (res.code == 200) {
- if (key == "sys_inquiry_order_type") {
- this.orderTypeOptions = res.data;
- }
- if (key == "sys_inquiry_type") {
- this.inquiryTypeOptions = res.data;
- }
- if (key == "sys_inquiry_status") {
- this.orderStatusOptions = res.data;
- }
- }
- }, (err) => {
- });
- },
- navTo(url) {
- common_vendor.index.navigateTo({
- url
- });
- }
- }
- };
- if (!Array) {
- const _easycom_u_rate2 = common_vendor.resolveComponent("u-rate");
- const _easycom_u_album2 = common_vendor.resolveComponent("u-album");
- const _easycom_u_tag2 = common_vendor.resolveComponent("u-tag");
- (_easycom_u_rate2 + _easycom_u_album2 + _easycom_u_tag2)();
- }
- const _easycom_u_rate = () => "../uni_modules/uview-plus/components/u-rate/u-rate.js";
- const _easycom_u_album = () => "../uni_modules/uview-plus/components/u-album/u-album.js";
- const _easycom_u_tag = () => "../uni_modules/uview-plus/components/u-tag/u-tag.js";
- if (!Math) {
- (_easycom_u_rate + _easycom_u_album + _easycom_u_tag)();
- }
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: $data.order != null
- }, $data.order != null ? common_vendor.e({
- b: common_vendor.t(_ctx.$getDictLabelName($data.inquiryTypeOptions, $data.order.inquiryType)),
- c: common_vendor.t(_ctx.$getDictLabelName($data.orderTypeOptions, $data.order.orderType)),
- d: $data.order.status == 1
- }, $data.order.status == 1 ? {
- e: common_vendor.t(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status))
- } : {}, {
- f: $data.order.status == 2
- }, $data.order.status == 2 ? {
- g: common_vendor.t(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status))
- } : {}, {
- h: $data.order.status == 3
- }, $data.order.status == 3 ? {
- i: common_vendor.t(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status))
- } : {}, {
- j: $data.order.status == 4
- }, $data.order.status == 4 ? {
- k: common_vendor.t(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status))
- } : {}, {
- l: $data.order.status < 0
- }, $data.order.status < 0 ? {
- m: common_vendor.t(_ctx.$getDictLabelName($data.orderStatusOptions, $data.order.status))
- } : {}) : {}, {
- n: $data.doctor != null
- }, $data.doctor != null ? {
- o: common_vendor.t($data.doctor.doctorName),
- p: common_vendor.o(($event) => $data.doctor.pingStar = $event),
- q: common_vendor.p({
- activeColor: "#ffc603",
- count: "5",
- readonly: true,
- modelValue: $data.doctor.pingStar
- }),
- r: common_vendor.t($data.department.deptName),
- s: common_vendor.t($data.doctor.position),
- t: common_vendor.t($data.hospital.hospitalName),
- v: common_vendor.t($data.doctor.speciality),
- w: common_vendor.o(($event) => $options.navTo("/pages/doctor/doctorDetails?doctorId=" + $data.doctor.doctorId))
- } : {}, {
- x: $data.patient != null && $data.order.inquiryType == 1
- }, $data.patient != null && $data.order.inquiryType == 1 ? {
- y: common_vendor.t($data.patient.patientName),
- z: common_vendor.t($data.patient.sex == 1 ? "\u7537" : "\u5973"),
- A: common_vendor.t($data.patient.age),
- B: common_vendor.t($data.patient.title),
- C: common_vendor.t($data.patient.duration),
- D: common_vendor.t($data.patient.isVisit)
- } : {}, {
- E: $data.patient != null && $data.order.inquiryType == 2
- }, $data.patient != null && $data.order.inquiryType == 2 ? {
- F: common_vendor.t($data.patient.patientName),
- G: common_vendor.t($data.patient.sex == 1 ? "\u7537" : "\u5973"),
- H: common_vendor.t($data.patient.age),
- I: common_vendor.t($data.patient.height),
- J: common_vendor.t($data.patient.weight),
- K: common_vendor.t($data.patient.mobile),
- L: common_vendor.t($data.patient.study),
- M: common_vendor.t($data.patient.usage),
- N: common_vendor.t($data.patient.title),
- O: common_vendor.t($data.patient.drugs),
- P: common_vendor.t($data.patient.duration),
- Q: common_vendor.t($data.patient.isVisit),
- R: common_vendor.p({
- urls: $data.tongueImages
- }),
- S: common_vendor.p({
- urls: $data.faceImages
- }),
- T: common_vendor.p({
- urls: $data.reportImages
- })
- } : {}, {
- U: $data.patient != null && $data.order.inquiryType == 3
- }, $data.patient != null && $data.order.inquiryType == 3 ? {
- V: common_vendor.t($data.patient.patientName),
- W: common_vendor.t($data.patient.sex == 1 ? "\u7537" : "\u5973"),
- X: common_vendor.t($data.patient.age),
- Y: common_vendor.t($data.patient.title),
- Z: common_vendor.t($data.patient.drugs),
- aa: common_vendor.t($data.patient.duration),
- ab: common_vendor.t($data.patient.isVisit),
- ac: common_vendor.p({
- urls: $data.reportImages
- }),
- ad: common_vendor.p({
- urls: $data.tongueImages
- }),
- ae: common_vendor.p({
- urls: $data.faceImages
- })
- } : {}, {
- af: $data.report != null && $data.order.status >= 3
- }, $data.report != null && $data.order.status >= 3 ? {
- ag: common_vendor.f($data.forms, (item, k0, i0) => {
- return {
- a: common_vendor.t(item.title),
- b: common_vendor.f(item.option, (tag, k1, i1) => {
- return {
- a: "50609d60-7-" + i0 + "-" + i1,
- b: common_vendor.p({
- size: "mini",
- plain: true,
- type: "success",
- text: tag
- })
- };
- })
- };
- })
- } : {}, {
- ah: $data.order != null
- }, $data.order != null ? {
- ai: common_vendor.t($data.order.orderSn),
- aj: common_vendor.o((...args) => $options.copyOrderSn && $options.copyOrderSn(...args)),
- ak: common_vendor.t($data.order.createTime),
- al: common_vendor.t($data.order.money.toFixed(2)),
- am: common_vendor.t($data.order.discountMoney.toFixed(2)),
- an: common_vendor.t($data.order.payMoney.toFixed(2))
- } : {}, {
- ao: $data.order != null
- }, $data.order != null ? common_vendor.e({
- ap: $data.report != null && $data.order.status >= 3
- }, $data.report != null && $data.order.status >= 3 ? {
- aq: common_vendor.o(($event) => $options.navTo("/pages_order/inquiryOrderReport?orderId=" + $data.order.orderId))
- } : {}) : {});
- }
- var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-50609d60"], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_company/inquiryOrderDetails.vue"]]);
- wx.createPage(MiniProgramPage);
|