Browse Source

批量打印

XMLWAN 4 years ago
parent
commit
f478edd19c

+ 6 - 3
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

@@ -12,8 +12,8 @@
12 12
               <p>年龄:{{item.patient.age?item.patient.age:""}}岁</p>
13 13
           </div>
14 14
           <div class="infoMain">
15
-              <div style="margin-bottom: 10px;">门诊号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
16
-              <div style="margin-bottom: 10px;">科室:{{getDepart(item.hisPatient.departments?item.hisPatient.departments:"")}}</div>
15
+              <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
16
+              <div style="margin-bottom: 10px;">科室:{{getDepart(hisPatient.departments)?getDepart(hisPatient.departments):''}}</div>
17 17
               <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
18 18
               <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
19 19
               <div>地址:{{item.patient.home_address}}</div>
@@ -70,7 +70,7 @@ export default {
70 70
         hisPatient:{},
71 71
         department:[],
72 72
         prescriptions:[]
73
-
73
+        
74 74
       }
75 75
     },
76 76
    methods:{
@@ -117,6 +117,9 @@ export default {
117 117
             console.log("adviceprint9999",advicePrint)
118 118
             this.advicePrint = advicePrint
119 119
             this.prescriptions = advicePrint
120
+            var hisPatient = response.data.data.hisPatient
121
+            console.log("hisPatient",hisPatient)
122
+            this.hisPatient = hisPatient
120 123
           }
121 124
        })
122 125
      },

+ 47 - 6
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue View File

@@ -30,7 +30,7 @@
30 30
             <div style="margin-bottom: 10px;width:25%">年龄:
31 31
                 <span>{{item.patient.age}}</span>
32 32
             </div>
33
-            <div style="margin-bottom: 10px;width:25%">参保类型:</div>
33
+            <div style="margin-bottom: 10px;width:25%">参保类型:{{hisPatient.social_type?hisPatient.social_type:''}}</div>
34 34
             <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
35 35
             <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
36 36
             <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
@@ -59,6 +59,18 @@
59 59
                     <td>{{it.day}}</td>
60 60
 
61 61
                 </tr>
62
+
63
+                <tr v-for="(it,index) in item.advices" :key="index">
64
+                    <td>{{index+1}}</td>
65
+                    <td>{{it.advice_name?it.advice_name:''}}</td>
66
+                    <td>{{it.single_dose?it.single_dose:''}}</td>
67
+                    <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
68
+                    <td>{{it.price}}</td>
69
+                    <td></td>
70
+                    <td>{{it.remark}}</td>
71
+                    <td>{{it.day}}</td>
72
+
73
+                </tr>
62 74
             </table>
63 75
         </div>
64 76
 
@@ -224,7 +236,18 @@ export default {
224 236
         tableData:[],
225 237
         prescriptionInfo:[],
226 238
         projectList:[],
227
-        prescriptions:[]
239
+        prescriptions:[],
240
+        settlement: 
241
+         [
242
+          {value: 1,label: '医保'},
243
+          {value: 2,label: '自费'},
244
+          {value: 3,label:'公费'},
245
+          {value: 4,label:'农保'},
246
+          {value: 5,label:'会员'},
247
+          {value: 6,label:'职工'},
248
+          {value: 7,label:'合同'}
249
+         ],
250
+         hisPatient:{}
228 251
       }
229 252
     },
230 253
    methods:{
@@ -268,9 +291,6 @@ export default {
268 291
      },
269 292
      getPrescriptionPrint(){
270 293
          var params = {
271
-        //   patient_id:this.patient_id,
272
-        //   record_date:this.record_date,
273
-        //   prescription_id:this.prescription_id,
274 294
           patient_id:this.patient_id,
275 295
           record_date:this.record_date,
276 296
           prescription_id:this.prescription_id,
@@ -286,6 +306,8 @@ export default {
286 306
             var projectlist =  response.data.data.projectlist
287 307
             console.log("所有项目列表",projectlist)
288 308
             this.projectList = projectlist
309
+            console.log("hisPatient",hisPatient)
310
+            this.hisPatient = hisPatient
289 311
 
290 312
           }
291 313
        })
@@ -328,8 +350,27 @@ export default {
328 350
             }
329 351
               addtotal =  Math.floor(addtotal * 100) / 100
330 352
         }
331
-        return total + addtotal
353
+       
332 354
        }
355
+
356
+      for (let i = 0; i < this.prescriptions.length; i++) {
357
+          if(id == this.prescriptions[i].id){
358
+            if (this.prescriptions[i].advices != null) {
359
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
360
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
361
+              }
362
+            }
363
+          
364
+            if (this.prescriptions[i].additionalcharge != null) {
365
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
366
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
367
+              }
368
+            }
369
+              addtotal =  Math.floor(addtotal * 100) / 100
370
+        }
371
+       }
372
+
373
+        return total + addtotal
333 374
       },
334 375
    },
335 376
    created(){