From 8544ad5024c46f25e25f5426c8f6bf7c2a845836 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 28 十月 2024 09:22:56 +0800
Subject: [PATCH] remove pay-related icons
---
src/views/ecg/doctor/components/DevInstallPanel.vue | 61 ++++++++++++++++++------------
1 files changed, 37 insertions(+), 24 deletions(-)
diff --git a/src/views/ecg/doctor/components/DevInstallPanel.vue b/src/views/ecg/doctor/components/DevInstallPanel.vue
index 442d30e..729ee2f 100644
--- a/src/views/ecg/doctor/components/DevInstallPanel.vue
+++ b/src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -15,7 +15,7 @@
<el-input v-model="formData.patName" placeholder="璇疯緭鍏ユ偅鑰呭悕绉�" />
</el-form-item>
<el-form-item label="鎮h�呮弿杩�" prop="patDeptDesc">
- 绉戝: {{formData.patDeptDesc}} 鐥呭尯: {{formData.patWardDesc}} 搴婁綅: {{formData.patBedNo}}
+ {{formData.patDetails}}
</el-form-item>
<el-form-item label="瑁呮満鏃堕棿" prop="rentTime">
<el-date-picker
@@ -116,11 +116,28 @@
import {isStringEmpty} from "@/utils/stringUtil";
import {curDayEnd, curDayStart} from "@/utils/dateUtil";
import {DeviceApi} from "@/api/ecg/devmanage";
+import {QueueVO} from "@/api/ecg/queue";
+import {RoomBedVO} from "@/api/ecg/doctor";
-/** 瑁呮満 琛ㄥ崟 */
-defineOptions({ name: 'DevrInstall' })
+/** 璁惧瑁呮満 琛ㄥ崟 */
+defineComponent({ name: 'DevInstallPanel' })
+
+const props = defineProps({
+ room: {
+ type: Object as PropType<RoomBedVO>,
+ required: true
+ }
+})
const emit = defineEmits(['event_dev_install']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
+
+const setPatient = (queueVO: QueueVO | undefined) => {
+ resetForm()
+ formData.value.patId = queueVO?.patId
+ formData.value.patName = queueVO?.patName
+ getReadyRentInfo()
+}
+defineExpose({ setPatient }) // 鎻愪緵 setPatient 鏂规硶锛岀敤浜庤缃偅鑰�
const { t } = useI18n() // 鍥介檯鍖�
const message = useMessage() // 娑堟伅寮圭獥
@@ -132,8 +149,10 @@
const formData = ref({})
const formRules = reactive({
- // devId: [{ required: true, message: '璁惧缂栧彿涓嶈兘涓虹┖', trigger: 'blur' }],
+ devId: [{ required: true, message: '璁惧缂栧彿涓嶈兘涓虹┖', trigger: 'blur' }],
rentTime: [{ required: true, message: '璇烽�夋嫨瑁呮満鏃ユ湡', trigger: 'blur' }],
+ patId: [{ required: true, message: '鎮h�呬笉鑳戒负绌�', trigger: 'blur' }],
+ patName: [{ required: true, message: '鎮h�呭悕涓嶈兘涓虹┖', trigger: 'blur' }]
})
const formRef = ref() // 琛ㄥ崟 Ref
@@ -144,8 +163,9 @@
// 鎻愪氦璇锋眰
formLoading.value = true
try {
+ formData.value.roomId = props.room.roomId
+ formData.value.bedNo = props.room.bedNo
const data = formData.value as unknown as DevRentVO
- //await DevRentApi.updateDevRent(data)
await DevRentApi.devInstall(data)
message.success(t('鎿嶄綔鎴愬姛'))
dialogVisible.value = false
@@ -198,18 +218,6 @@
formData.value.model = data === null ? "" : data.model
}
-/*
-const getRentInfoByDevId = () => {
- const tempDevId = formData.value.devId;
- resetForm()
- if (isStringEmpty(tempDevId))
- return
-
- formData.value.devId = tempDevId;
- getRentInfo()
-}
-*/
-
const getRentInfoByPatId = () => {
const tempPatId = formData.value.patId;
resetForm()
@@ -217,19 +225,22 @@
return
formData.value.patId = tempPatId;
- getRentInfo()
+ getReadyRentInfo(formData.value)
}
-const getRentInfo = async () => {
- const data = await DevRentApi.getReadyRent(formData.value)
+const getReadyRentInfo = async (devRentVO) => {
+ const data = await DevRentApi.getReadyRent(devRentVO)
if (null === data)
return
- formData.value = data
- if (data.returnTime === null)
- data.returnTime = new Date().getTime()
+ // formData.value = data //涓嶈兘鏁翠釜璧嬪�硷紝 榛樿瑁呮満鏃堕棿琚竻绌�
+ formData.value.id = data.id;
+ formData.value.devId = data.devId
+ formData.value.category = data.category
+ formData.value.brand = data.brand
+ formData.value.model = data.model
+ formData.value.patDetails = data.patDetails
}
-
const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
const list = ref<JobRecordVO[]>([]) // 鍒楄〃鐨勬暟鎹�
@@ -270,6 +281,8 @@
}
const cancelInstall = async () => {
+ formData.value.roomId = props.room.roomId
+ formData.value.bedNo = props.room.bedNo
const data = formData.value as unknown as DevRentVO
if (formData.value.id === null || formData.value.id === undefined) {
const result = await DevRentApi.devInstallCancel(data)
--
Gitblit v1.9.3