diff --git a/src/components/home/index/InventoryAlert.vue b/src/components/home/index/InventoryAlert.vue index 34623fc..fdf154f 100644 --- a/src/components/home/index/InventoryAlert.vue +++ b/src/components/home/index/InventoryAlert.vue @@ -186,7 +186,7 @@ const getInventoryWarning = () => { .item-right { width: 70px; display: flex; - margin-right: 16px; + margin-right: 10px; font-weight: bold; font-style: normal; font-size: 28px; diff --git a/src/components/home/index/ValidityWarning.vue b/src/components/home/index/ValidityWarning.vue index 697b44c..233f775 100644 --- a/src/components/home/index/ValidityWarning.vue +++ b/src/components/home/index/ValidityWarning.vue @@ -49,7 +49,7 @@ const getExpiryDateWarning = () => { }}{{ expireDateWarningList[0].min_packaging_unit }} -
+
已过期{{ Math.abs(expireDateWarningList[0].remaining_days) }}天 @@ -75,7 +75,7 @@ const getExpiryDateWarning = () => { }}{{ expireDateWarningList[1].min_packaging_unit }}
-
+
已过期{{ Math.abs(expireDateWarningList[1].remaining_days) }}天 @@ -101,7 +101,7 @@ const getExpiryDateWarning = () => { }}{{ expireDateWarningList[2].min_packaging_unit }}
-
+
已过期{{ Math.abs(expireDateWarningList[2].remaining_days) }}天 @@ -127,7 +127,7 @@ const getExpiryDateWarning = () => { }}{{ expireDateWarningList[3].min_packaging_unit }}
-
+
已过期{{ Math.abs(expireDateWarningList[3].remaining_days) }}天 @@ -147,20 +147,19 @@ const getExpiryDateWarning = () => { height: 100%; display: flex; flex-direction: column; + margin-right: 24px; .box { - display: flex; - flex-wrap: wrap; - .item { float: left; - width: 48%; + width:48%; height: 58px; box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1); border-radius: 8px; display: flex; align-items: center; - + justify-content: space-between; + flex: 1 1 calc(50% - 8px); //每行显示2个 item,每个 item 占据 33.33% 减去间距 .image { width: 34px; height: 34px; @@ -178,24 +177,25 @@ const getExpiryDateWarning = () => { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + } + .item-name-font { + font-weight: 400; + font-size: 12px; + color: #999999; + font-style: normal; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } - - .item-right { - width: 56px; - margin-right: 16px; - font-weight: 400; - font-size: 10px; - color: #333333; - font-style: normal; - - .item-right-num { - font-weight: bold; + .item-right{ + width: 70px; + .item-right-num{ font-size: 28px; color: #FF282E; + font-weight: bold; font-style: normal; - } } @@ -211,15 +211,16 @@ const getExpiryDateWarning = () => { margin-top: 8px !important; } } - .item1 { float: right; + width:48%; height: 58px; box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1); border-radius: 8px; display: flex; align-items: center; - + justify-content: space-between; + flex: 1 1 calc(50% - 8px); //每行显示2个 item,每个 item 占据 33.33% 减去间距 .image { width: 34px; height: 34px; @@ -237,24 +238,27 @@ const getExpiryDateWarning = () => { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + } + .item-name-font { + font-weight: 400; + font-size: 12px; + color: #999999; + font-style: normal; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } - .item-right { - width: 56px; - margin-right: 16px; - font-weight: 400; - font-size: 10px; - color: #333333; - font-style: normal; - .item-right-num { - font-weight: bold; + .item-right{ + width: 70px; + .item-right-num{ font-size: 28px; color: #FF282E; + font-weight: bold; font-style: normal; - } } diff --git a/src/components/outpatient/MedicalHistory.vue b/src/components/outpatient/MedicalHistory.vue index ddd7e35..3be39e9 100644 --- a/src/components/outpatient/MedicalHistory.vue +++ b/src/components/outpatient/MedicalHistory.vue @@ -38,7 +38,10 @@ const init = (patientId: any) => { list.value = res }) } -defineExpose({init}) +const clearList = () => { + list.value = [] +} +defineExpose({init,clearList}) \ No newline at end of file diff --git a/src/views/outpatient/index.vue b/src/views/outpatient/index.vue index 0a1ed7a..3218be3 100644 --- a/src/views/outpatient/index.vue +++ b/src/views/outpatient/index.vue @@ -6,20 +6,21 @@
- +
- +
-
- +
@@ -121,25 +122,28 @@ const deleteItem = () => { } const getStatus = (e: any) => { status.value = e + formData.value = {} + goodsList.value = [] + itemList.value = [] + patientRegistration.value = {} + nextTick(() => { + medicalHistoryRef.value?.clearList(); + }) } -const edit=()=>{ +const edit = () => { post('registration/changeStatus', {id: registerId.value, status: 2}).then((res: any) => { status.value = 2 }) } // 使用 watch 监听 goodsList 和 itemList 的变化 -watch([()=>goodsList.value, itemList,status], ([newGoodsList, newItemList,newStatus]) => { +watch([() => goodsList.value, itemList], ([newGoodsList, newItemList]) => { const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => { return pre + cur.unitPrice }, 0); const serviceTotalAmount = newGoodsList.reduce((pre: any, cur: any) => { - - return pre + cur.selectNum * cur.selectedPrice + return pre + cur.selectedNum * cur.selectedPrice }, 0); totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount; - if (newStatus) { - registerId.value='' - } }, {deep: true});