| | |
| | | require("../../stores/user.js"); |
| | | if (!Array) { |
| | | const _easycom_u_input2 = common_vendor.resolveComponent("u-input"); |
| | | const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon"); |
| | | const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon"); |
| | | const _easycom_u_textarea2 = common_vendor.resolveComponent("u-textarea"); |
| | | const _easycom_u_button2 = common_vendor.resolveComponent("u-button"); |
| | | const _easycom_u_datetime_picker2 = common_vendor.resolveComponent("u-datetime-picker"); |
| | | const _easycom_u_picker2 = common_vendor.resolveComponent("u-picker"); |
| | | const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon"); |
| | | (_easycom_u_input2 + _easycom_u_icon2 + _easycom_u_textarea2 + _easycom_u_button2 + _easycom_u_datetime_picker2 + _easycom_u_picker2 + _easycom_u_loading_icon2)(); |
| | | (_easycom_u_input2 + _easycom_up_icon2 + _easycom_u_textarea2 + _easycom_u_button2 + _easycom_u_datetime_picker2 + _easycom_u_picker2 + _easycom_u_loading_icon2)(); |
| | | } |
| | | const _easycom_u_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js"; |
| | | const _easycom_u_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js"; |
| | | const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js"; |
| | | const _easycom_u_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js"; |
| | | const _easycom_u_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js"; |
| | | const _easycom_u_datetime_picker = () => "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.js"; |
| | | const _easycom_u_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js"; |
| | | const _easycom_u_loading_icon = () => "../../uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.js"; |
| | | if (!Math) { |
| | | (_easycom_u_input + _easycom_u_icon + _easycom_u_textarea + _easycom_u_button + common_vendor.unref(attachmentUpload) + _easycom_u_datetime_picker + _easycom_u_picker + _easycom_u_loading_icon)(); |
| | | (_easycom_u_input + _easycom_up_icon + _easycom_u_textarea + _easycom_u_button + common_vendor.unref(attachmentUpload) + _easycom_u_datetime_picker + _easycom_u_picker + _easycom_u_loading_icon)(); |
| | | } |
| | | const attachmentUpload = () => "../../components/attachment/index.js"; |
| | | const _sfc_main = { |
| | |
| | | throw new Error(res.msg || "数据加载失败"); |
| | | } |
| | | } catch (error) { |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:491", "加载转运单失败:", error); |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:493", "加载转运单失败:", error); |
| | | common_vendor.index.showToast({ |
| | | title: "数据加载失败,请重试", |
| | | icon: "none" |
| | |
| | | }; |
| | | const initNewTransport = async (caseId, caseNo) => { |
| | | try { |
| | | const now = /* @__PURE__ */ new Date(); |
| | | const year = now.getFullYear(); |
| | | const month = String(now.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(now.getDate()).padStart(2, "0"); |
| | | const hours = String(now.getHours()).padStart(2, "0"); |
| | | const minutes = String(now.getMinutes()).padStart(2, "0"); |
| | | const seconds = String(now.getSeconds()).padStart(2, "0"); |
| | | transportData.value.transportStartTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | if (caseId) { |
| | | const res = await common_vendor.index.$uapi.get( |
| | | `/project/donatebaseinforeport/getInfo/${caseId}` |
| | | ); |
| | | if (res.data) { |
| | | const caseData = res.data; |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:511", caseData); |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:522", caseData); |
| | | transportData.value = { |
| | | ...transportData.value, |
| | | caseNo: caseData.caseNo || "", |
| | |
| | | transportStartPlace: caseData.treatmenthospitalname || "", |
| | | contactPerson: caseData.coordinatorName || "" |
| | | }; |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:527", transportData.value, "transportData.value"); |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:538", transportData.value, "transportData.value"); |
| | | } |
| | | } else { |
| | | transportData.value = { |
| | |
| | | }; |
| | | } |
| | | } catch (error) { |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:536", "初始化转运单失败:", error); |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:547", "初始化转运单失败:", error); |
| | | } |
| | | }; |
| | | const getTransportStatusText = (status) => { |
| | |
| | | }; |
| | | const onTimeConfirm = (e) => { |
| | | const date = new Date(e.value); |
| | | transportData.value.transportStartTime = `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")} ${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}:${date.getSeconds().toString().padStart(2, "0")}`; |
| | | transportData.value.transportStartTime = `${date.getFullYear()}-${String( |
| | | date.getMonth() + 1 |
| | | ).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")} ${String( |
| | | date.getHours() |
| | | ).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}:${String( |
| | | date.getSeconds() |
| | | ).padStart(2, "0")}`; |
| | | showTimePicker.value = false; |
| | | }; |
| | | const handleStatusClick = () => { |
| | | if (!isEdit.value) |
| | | return; |
| | | statusPickerVisible.value = true; |
| | | }; |
| | | const onStatusPickerConfirm = (e) => { |
| | | const index = e.indexs[0]; |
| | |
| | | if (transportId.value) { |
| | | res = await common_vendor.index.$uapi.post("/project/transport/edit", submitData); |
| | | } else { |
| | | submitData.createBy = "移动端用户"; |
| | | submitData.transitStatus = 2; |
| | | res = await common_vendor.index.$uapi.post("/project/transport/add", submitData); |
| | | } |
| | | if (res.code === 200) { |
| | |
| | | throw new Error(res.msg || "操作失败"); |
| | | } |
| | | } catch (error) { |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:720", "保存失败:", error); |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:725", "保存失败:", error); |
| | | common_vendor.index.showToast({ |
| | | title: error.message || (transportId.value ? "修改失败" : "新增失败"), |
| | | icon: "none" |
| | |
| | | const res = await common_vendor.index.$uapi.post("/project/transport/edit", updateData); |
| | | if (res.code === 200) { |
| | | common_vendor.index.showToast({ title: `${actionName}成功`, icon: "success" }); |
| | | if (newStatus === 3) { |
| | | try { |
| | | const reportId = transportData.value.reportId; |
| | | if (reportId) { |
| | | const caseRes = await common_vendor.index.$uapi.get( |
| | | `/project/donatebaseinforeport/getInfo/${reportId}` |
| | | ); |
| | | if (caseRes && caseRes.data) { |
| | | const caseData = caseRes.data; |
| | | caseData.isDonate = 1; |
| | | const editRes = await common_vendor.index.$uapi.post( |
| | | "/project/donatebaseinforeport/edit", |
| | | caseData |
| | | ); |
| | | if (editRes && editRes.code == 200) { |
| | | common_vendor.index.showToast({ |
| | | title: "对应上报案例已进入正式案例流程", |
| | | icon: "success" |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } catch (caseError) { |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:830", "更新案例状态失败:", caseError); |
| | | common_vendor.index.showToast({ |
| | | title: "案例状态更新失败,请联系管理员", |
| | | icon: "none" |
| | | }); |
| | | } |
| | | } |
| | | await loadTransportData(transportId.value); |
| | | } else { |
| | | throw new Error(res.msg || `${actionName}失败`); |
| | | } |
| | | } catch (error) { |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:799", `${actionName}失败:`, error); |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:844", `${actionName}失败:`, error); |
| | | common_vendor.index.showToast({ title: `${actionName}失败`, icon: "none" }); |
| | | } |
| | | }; |
| | | const handleBaseUpload = (file) => { |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:806", "基础附件上传成功:", file); |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:851", "基础附件上传成功:", file); |
| | | attachments.value.push(file); |
| | | }; |
| | | const handleFilesUpdate = (files) => { |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:812", files, "files"); |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:857", files, "files"); |
| | | attachments.value = files.map((file) => ({ |
| | | ...file |
| | | // 确保只存储半路径 |
| | |
| | | // ? file.url.replace(baseUrlHt, "") |
| | | // : file.url, |
| | | })); |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:821", attachments.value); |
| | | common_vendor.index.__f__("log", "at pagesSub/case/transferinfo.vue:866", attachments.value); |
| | | }; |
| | | const handlePreview = (file) => { |
| | | const fullUrl = file.url.startsWith("http") ? file.url : baseUrlHt + (file.url.startsWith("/") ? "" : "/") + file.url; |
| | |
| | | }); |
| | | }, |
| | | fail: (err) => { |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:852", "打开文档失败:", err); |
| | | common_vendor.index.__f__("error", "at pagesSub/case/transferinfo.vue:897", "打开文档失败:", err); |
| | | common_vendor.index.showToast({ title: "打开文件失败", icon: "none" }); |
| | | } |
| | | }); |
| | |
| | | customStyle: inputStyle(!transportData.value.transportStartPlace), |
| | | modelValue: transportData.value.transportStartPlace |
| | | }), |
| | | l: isEdit.value |
| | | l: common_vendor.t(transportData.value.transportStartTime || "请选择出发时间"), |
| | | m: isEdit.value |
| | | }, isEdit.value ? { |
| | | m: common_vendor.p({ |
| | | name: "arrow-down", |
| | | color: "#86868b" |
| | | }) |
| | | } : {}, { |
| | | n: common_vendor.o(($event) => isEdit.value && (showTimePicker.value = true)), |
| | | o: common_vendor.o(($event) => transportData.value.transportStartTime = $event), |
| | | p: common_vendor.p({ |
| | | placeholder: "请选择出发时间", |
| | | readonly: true, |
| | | border: "none", |
| | | disabled: !isEdit.value, |
| | | customStyle: inputStyle(!transportData.value.transportStartTime), |
| | | modelValue: transportData.value.transportStartTime |
| | | }), |
| | | q: common_vendor.t(getTransportStatusText(transportData.value.transitStatus)), |
| | | r: isEdit.value |
| | | }, isEdit.value ? { |
| | | s: common_vendor.p({ |
| | | n: common_vendor.p({ |
| | | name: "arrow-down", |
| | | size: "16", |
| | | color: "#999" |
| | | }) |
| | | } : {}, { |
| | | t: common_vendor.o(($event) => isEdit.value && handleStatusClick()), |
| | | v: !isEdit.value ? 1 : "", |
| | | w: common_vendor.o(($event) => transportData.value.contactPerson = $event), |
| | | x: common_vendor.p({ |
| | | o: common_vendor.o(($event) => isEdit.value && (showTimePicker.value = true)), |
| | | p: common_vendor.o(($event) => transportData.value.contactPerson = $event), |
| | | q: common_vendor.p({ |
| | | placeholder: "请输入协调员姓名", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | customStyle: inputStyle(!transportData.value.contactPerson), |
| | | modelValue: transportData.value.contactPerson |
| | | }), |
| | | y: transportData.value.createTime |
| | | r: transportData.value.createTime |
| | | }, transportData.value.createTime ? { |
| | | z: common_vendor.o(($event) => transportData.value.createTime = $event), |
| | | A: common_vendor.p({ |
| | | s: common_vendor.o(($event) => transportData.value.createTime = $event), |
| | | t: common_vendor.p({ |
| | | placeholder: "自动生成", |
| | | disabled: true, |
| | | disabledColor: disabledColor.value, |
| | |
| | | modelValue: transportData.value.createTime |
| | | }) |
| | | } : {}, { |
| | | B: transportData.value.createBy |
| | | v: transportData.value.createBy |
| | | }, transportData.value.createBy ? { |
| | | C: common_vendor.o(($event) => transportData.value.createBy = $event), |
| | | D: common_vendor.p({ |
| | | w: common_vendor.o(($event) => transportData.value.createBy = $event), |
| | | x: common_vendor.p({ |
| | | placeholder: "自动获取", |
| | | disabled: true, |
| | | disabledColor: disabledColor.value, |
| | |
| | | modelValue: transportData.value.createBy |
| | | }) |
| | | } : {}, { |
| | | E: common_vendor.o(($event) => transportData.value.doctor = $event), |
| | | F: common_vendor.p({ |
| | | placeholder: "请输入急诊科医生", |
| | | y: common_vendor.o(($event) => transportData.value.doctor = $event), |
| | | z: common_vendor.p({ |
| | | placeholder: "请输入出诊医生", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | modelValue: transportData.value.doctor |
| | | }), |
| | | G: common_vendor.o(($event) => transportData.value.doctorPhone = $event), |
| | | H: common_vendor.p({ |
| | | placeholder: "请输入医生手机号", |
| | | type: "number", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | modelValue: transportData.value.doctorPhone |
| | | }), |
| | | I: common_vendor.o(($event) => transportData.value.nurse = $event), |
| | | J: common_vendor.p({ |
| | | placeholder: "请输入护士姓名", |
| | | A: common_vendor.o(($event) => transportData.value.nurse = $event), |
| | | B: common_vendor.p({ |
| | | placeholder: "请输入出诊护士姓名", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | modelValue: transportData.value.nurse |
| | | }), |
| | | K: common_vendor.o(($event) => transportData.value.nursePhone = $event), |
| | | L: common_vendor.p({ |
| | | placeholder: "请输入护士手机号", |
| | | type: "number", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | modelValue: transportData.value.nursePhone |
| | | }), |
| | | M: common_vendor.o(($event) => transportData.value.driver = $event), |
| | | N: common_vendor.p({ |
| | | C: common_vendor.o(($event) => transportData.value.driver = $event), |
| | | D: common_vendor.p({ |
| | | placeholder: "请输入驾驶员姓名", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | modelValue: transportData.value.driver |
| | | }), |
| | | O: common_vendor.o(($event) => transportData.value.driverPhone = $event), |
| | | P: common_vendor.p({ |
| | | placeholder: "请输入驾驶员手机号", |
| | | type: "number", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | modelValue: transportData.value.driverPhone |
| | | }), |
| | | Q: common_vendor.o(($event) => transportData.value.icuDoctor = $event), |
| | | R: common_vendor.p({ |
| | | E: common_vendor.o(($event) => transportData.value.icuDoctor = $event), |
| | | F: common_vendor.p({ |
| | | placeholder: "请输入ICU评估医生", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | modelValue: transportData.value.icuDoctor |
| | | }), |
| | | S: common_vendor.o(($event) => transportData.value.icuDoctorPhone = $event), |
| | | T: common_vendor.p({ |
| | | G: common_vendor.o(($event) => transportData.value.icuDoctorPhone = $event), |
| | | H: common_vendor.p({ |
| | | placeholder: "请输入ICU医生手机号", |
| | | type: "number", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | | modelValue: transportData.value.icuDoctorPhone |
| | | }), |
| | | U: common_vendor.o(($event) => transportData.value.remark = $event), |
| | | V: common_vendor.p({ |
| | | I: common_vendor.o(($event) => transportData.value.remark = $event), |
| | | J: common_vendor.p({ |
| | | placeholder: "请输入备注信息", |
| | | border: "none", |
| | | readonly: !isEdit.value, |
| | |
| | | height: "150", |
| | | modelValue: transportData.value.remark |
| | | }), |
| | | W: !isEdit.value |
| | | K: !isEdit.value |
| | | }, !isEdit.value ? common_vendor.e({ |
| | | X: common_vendor.o(goBack), |
| | | Y: canEdit.value |
| | | L: common_vendor.o(goBack), |
| | | M: canEdit.value |
| | | }, canEdit.value ? { |
| | | Z: common_vendor.o(handleEdit) |
| | | N: common_vendor.o(handleEdit) |
| | | } : {}, { |
| | | aa: canStartTransport.value |
| | | O: canStartTransport.value |
| | | }, canStartTransport.value ? { |
| | | ab: common_vendor.o(handleStartTransport) |
| | | P: common_vendor.o(handleStartTransport) |
| | | } : {}, { |
| | | ac: canCompleteTransport.value |
| | | Q: canCompleteTransport.value |
| | | }, canCompleteTransport.value ? { |
| | | ad: common_vendor.o(handleCompleteTransport) |
| | | R: common_vendor.o(handleCompleteTransport) |
| | | } : {}) : { |
| | | ae: common_vendor.o(cancelEdit), |
| | | af: common_vendor.o(handleSave), |
| | | ag: common_vendor.p({ |
| | | S: common_vendor.o(cancelEdit), |
| | | T: common_vendor.o(handleSave), |
| | | U: common_vendor.p({ |
| | | disabled: !isFormValid.value, |
| | | loading: saving.value |
| | | }) |
| | | }, { |
| | | ah: common_vendor.sr("attachment", "f9362fa1-22"), |
| | | ai: common_vendor.o(handleFilesUpdate), |
| | | aj: common_vendor.o(handleBaseUpload), |
| | | ak: common_vendor.o(handlePreview), |
| | | al: common_vendor.p({ |
| | | V: common_vendor.sr("attachment", "f9362fa1-17"), |
| | | W: common_vendor.o(handleFilesUpdate), |
| | | X: common_vendor.o(handleBaseUpload), |
| | | Y: common_vendor.o(handlePreview), |
| | | Z: common_vendor.p({ |
| | | files: attachments.value, |
| | | readonly: isReadonly.value, |
| | | maxCount: 5 |
| | | }), |
| | | am: common_vendor.o(onTimeConfirm), |
| | | an: common_vendor.o(($event) => showTimePicker.value = false), |
| | | ao: common_vendor.o(($event) => departureTimeValue.value = $event), |
| | | ap: common_vendor.p({ |
| | | aa: common_vendor.o(onTimeConfirm), |
| | | ab: common_vendor.o(($event) => showTimePicker.value = false), |
| | | ac: common_vendor.o(($event) => departureTimeValue.value = $event), |
| | | ad: common_vendor.p({ |
| | | show: showTimePicker.value, |
| | | mode: "datetime", |
| | | title: "选择出发时间", |
| | | modelValue: departureTimeValue.value |
| | | }), |
| | | aq: common_vendor.o(onStatusPickerConfirm), |
| | | ar: common_vendor.o(($event) => statusPickerVisible.value = false), |
| | | as: common_vendor.p({ |
| | | ae: common_vendor.o(onStatusPickerConfirm), |
| | | af: common_vendor.o(($event) => statusPickerVisible.value = false), |
| | | ag: common_vendor.p({ |
| | | show: statusPickerVisible.value, |
| | | columns: [statusLabels.value], |
| | | defaultIndex: [statusCurrentIndex.value], |
| | | keyName: "label", |
| | | title: "请选择转运状态" |
| | | }), |
| | | at: common_vendor.p({ |
| | | ah: common_vendor.p({ |
| | | show: loading.value, |
| | | text: loadingText.value |
| | | }), |
| | | av: common_vendor.gei(_ctx, "") |
| | | ai: common_vendor.gei(_ctx, "") |
| | | }); |
| | | }; |
| | | } |