see999 3 years ago
parent
commit
7467f686cb

+ 2 - 2
src/xt_pages/outpatientDoctorStation/checkPrint.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-       <template>
3
+       <!-- <template>
4
         <el-button
4
         <el-button
5
           style="float:right;"
5
           style="float:right;"
6
           :loading="loading"
6
           :loading="loading"
10
           type="primary"
10
           type="primary"
11
           >打印</el-button
11
           >打印</el-button
12
         >
12
         >
13
-      </template>
13
+      </template> -->
14
             
14
             
15
       <div class='dialysisPage' style="padding-top:40px;">
15
       <div class='dialysisPage' style="padding-top:40px;">
16
         <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
16
         <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>

+ 31 - 8
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

245
                     title="打印"
245
                     title="打印"
246
                     :visible.sync="innerVisible"
246
                     :visible.sync="innerVisible"
247
                     append-to-body>
247
                     append-to-body>
248
-                <print ref="print" v-if="selecting_schs1.length > 0" :paramsObj='paramsObj'></print>
249
-                <treatPrint ref="treatPrint" v-if="selecting_schs2.length > 0" :paramsObj='paramsObj2'></treatPrint>
250
-                <checkPrint ref="checkPrint" v-if="selecting_schs3.length > 0" :paramsObj='paramsObj3'></checkPrint>
248
+                  <template>
249
+                    <el-button
250
+                      style="float:right;"
251
+                      :loading="loading"
252
+                      size="small"
253
+                      icon="el-icon-printer"
254
+                      @click="printThisPage"
255
+                      type="primary"
256
+                      >打印</el-button
257
+                    >
258
+                  </template>  
259
+                  <div id='printMain'>
260
+                    <print ref="print" v-if="selecting_schs1.length > 0" :paramsObj='paramsObj'></print>
261
+                    <treatPrint ref="treatPrint" v-if="selecting_schs2.length > 0" :paramsObj='paramsObj2'></treatPrint>
262
+                    <checkPrint ref="checkPrint" v-if="selecting_schs3.length > 0" :paramsObj='paramsObj3'></checkPrint>
263
+                  </div>
264
+                
251
             </el-dialog>
265
             </el-dialog>
252
             <span slot="footer" class="dialog-footer">
266
             <span slot="footer" class="dialog-footer">
253
         <el-button @click="centerDialogVisible = false">取 消</el-button>
267
         <el-button @click="centerDialogVisible = false">取 消</el-button>
383
         this.getPrescriptionList(this.patientInfo.id)
397
         this.getPrescriptionList(this.patientInfo.id)
384
       },
398
       },
385
       printThisPage(){
399
       printThisPage(){
386
-        this.$nextTick(() => {
387
-          this.$refs.print.printThisPage()
388
-          this.$refs.treatPrint.printThisPage()
389
-          this.$refs.checkPrint.printThisPage()
390
-        })
400
+        const style =
401
+          '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 90%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 90%;}}}';
402
+        printJS({
403
+          printable: "printMain",
404
+          type: "html",
405
+          style: style,
406
+          scanStyles: false
407
+        });
408
+        this.innerVisible = false
409
+        // this.$nextTick(() => {
410
+        //   this.$refs.print.printThisPage()
411
+        //   this.$refs.treatPrint.printThisPage()
412
+        //   this.$refs.checkPrint.printThisPage()
413
+        // })
391
       },
414
       },
392
       changeOther(patient_id){
415
       changeOther(patient_id){
393
         this.radio = 2;
416
         this.radio = 2;

+ 2 - 2
src/xt_pages/outpatientDoctorStation/print.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-      <template>
3
+      <!-- <template>
4
         <el-button
4
         <el-button
5
           style="float:right;"
5
           style="float:right;"
6
           :loading="loading"
6
           :loading="loading"
10
           type="primary"
10
           type="primary"
11
           >打印</el-button
11
           >打印</el-button
12
         >
12
         >
13
-      </template>
13
+      </template> -->
14
 
14
 
15
     <div class='dialysisPage' style="padding-top:40px;">
15
     <div class='dialysisPage' style="padding-top:40px;">
16
       <div v-if="org_id != 10138">
16
       <div v-if="org_id != 10138">

+ 2 - 2
src/xt_pages/outpatientDoctorStation/treatPrint.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-       <template>
3
+       <!-- <template>
4
         <el-button
4
         <el-button
5
           style="float:right;"
5
           style="float:right;"
6
           :loading="loading"
6
           :loading="loading"
10
           type="primary"
10
           type="primary"
11
           >打印</el-button
11
           >打印</el-button
12
         >
12
         >
13
-      </template>
13
+      </template> -->
14
             
14
             
15
       <div class='dialysisPage' style="padding-top:40px;">
15
       <div class='dialysisPage' style="padding-top:40px;">
16
         <printOne v-if="org_id != 10138" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
16
         <printOne v-if="org_id != 10138" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>