Browse Source

瓶贴打印

zengfanwei 2 months ago
parent
commit
db82a37041

+ 10 - 3
src/components/inpatient/nurse-module/BottleCard.vue

@@ -8,7 +8,10 @@
           {{patInfo.bedNo}} 
           {{patInfo.patName}}
         </th>
-        <th colspan="4" style="text-align: right">
+        <th colspan="1" style="text-align: center">
+          {{bottleGroup}}&nbsp;
+        </th>
+        <th colspan="3" style="text-align: right">
           {{patInfo.patGender}}&nbsp;
           {{patInfo.ageLabel}}&nbsp;
           {{simpleYzDate}}
@@ -24,10 +27,10 @@
       </tr>
       <tr v-for="item in drugs">
         <td colspan="5" style="width: 100%;height: 100%;position: relative">
-            <div style="position: absolute;left: 2px;top: 2px;">
+            <div style="position: absolute;left: 2px;top: 2px;width:90%">
               {{item.drugName}}
             </div>
-            <div style="position: absolute;right: 2px;top: 2px; font-weight: bolder">
+            <div style="position: absolute;right: 2px;top: 50%; font-weight: bolder">
               {{item.specification}}
             </div>
         </td>
@@ -72,6 +75,10 @@ const props = defineProps({
   yzDate: {
     type: String,
     required: true
+  },
+  bottleGroup: {
+    type: String,
+    required: true
   }
 })
 

+ 16 - 0
src/views/hospitalization/nurse-module/PrintInfusionCard.vue

@@ -91,6 +91,7 @@
                 :drugs="item.bottleCardDrugs"
                 :pat-info="item.patInfo"
                 :yz-date="queryParams.executeDate"
+                :bottle-group="item.bottleGroup"
                 style="margin-bottom: 10px;"
               >
               </bottle-card>
@@ -110,6 +111,7 @@
                   :drugs="item.bottleCardDrugs"
                   :pat-info="item.patInfo"
                   :yz-date="queryParams.executeDate"
+                  :bottle-group="item.bottleGroup"
                   style="margin-bottom: 10px;"
               >
                   </bottle-card>
@@ -202,6 +204,20 @@ const executeQuery = () => {
   })
   queryInfusionCardOrBottleCard(queryParams).then(res => {
     patientInfusionInfos.value = res
+    if(queryParams.cardType !== 'INFUSION_CARD' && patientInfusionInfos.value.length > 0) {
+      //瓶贴分配药品组号
+      patientInfusionInfos.value.forEach(item => {
+        let group = patientInfusionInfos.value.filter(citem => citem.patInfo.patNo === item.patInfo.patNo)
+        group.forEach((v,vindex) => {
+          let target = patientInfusionInfos.value.find(citem => citem.bottleCardDrugs[0].actOrderNo === v.bottleCardDrugs[0].actOrderNo)
+          target.bottleGroup = vindex + 1 + "/" + group.length
+          // console.log("target",target)
+        })
+        // console.log("group",group)
+        // console.log("index")
+      })
+      // console.log("patientInfusionInfo  s",patientInfusionInfos.value)
+    }
     // for (let i = 0; i < 2; i++) {
     //   patientInfusionInfos.value = [...patientInfusionInfos.value, ...res]
     // }