Browse Source

打印单修改

huangyw 3 years ago
parent
commit
18ac32b53a

+ 1 - 1
src/xt_pages/dialysis/dialysisPrintOrder.vue View File

@@ -1269,7 +1269,7 @@ export default {
1269 1269
       const style =
1270 1270
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
1271 1271
       const style2 =
1272
-        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;} .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}';
1272
+        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .print-table{border: none} .print-table tr{page-break-inside:avoid;} .print-table tr td{border: 1px solid #000;}.check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;} .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}';
1273 1273
       const style3 =
1274 1274
         '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:16px;border-color: #000;}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #000;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}.row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line {display: inline-block;border-bottom: 1px solid #000;text-align: center;white-space: nowrap; width: 50%;}';
1275 1275
       // const style3 =

+ 30 - 30
src/xt_pages/outpatientDoctorStation/batch_print_checkTemplate/printOne.vue View File

@@ -38,7 +38,7 @@
38 38
                     <div>检验项目:</div>
39 39
                     <div>
40 40
                         <div v-for="item in getTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.team.project_team }}</div>
41
-                        <div v-for="item in getSingleTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.project.project_name }}</div>
41
+                        <!-- <div v-for="item in getSingleTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.project.project_name }}</div> -->
42 42
                     </div>
43 43
                 </div>
44 44
                 <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;padding:0 10px;">
@@ -87,6 +87,8 @@ export default {
87 87
         singleProjectPrint:[]
88 88
       }
89 89
     },
90
+  
91
+
90 92
    methods:{
91 93
      getAllDoctorList(){
92 94
       getAllDoctorList().then(response=>{
@@ -112,7 +114,9 @@ export default {
112 114
         }
113 115
         return ''
114 116
      },
117
+
115 118
      getTeam(prescriptions){
119
+       console.log(prescriptions,'prescriptions')
116 120
         let projectPrint = []
117 121
         let total = 0
118 122
         prescriptions.map(item => {
@@ -125,7 +129,6 @@ export default {
125 129
                         }
126 130
                     }
127 131
               })
128
-
129 132
           }
130 133
         })
131 134
         let data = []
@@ -134,42 +137,40 @@ export default {
134 137
             let status = data.some(it => (it.team.id == item.team.id))
135 138
             if(!status){
136 139
               data.push(item)
140
+              console.log(data,'oodata')
137 141
             }
138 142
           }
139
-
140 143
         })
141
-
142 144
         this.total = total.toFixed(2)
143 145
         this.projectPrint = data
144 146
         return data
145 147
      },
146
-     getSingleTeam(prescriptions){
147
-        let projectPrint = []
148
-        let total = 0
149
-        prescriptions.map(item => {
150
-          if(item.project.length > 0){
151
-              item.project.map(it => {
152
-                    if(it.type == 2){
153
-                        if(it.project.cost_classify == 3){
154
-                            projectPrint.push(it)
155
-                            total += (it.project.price*parseInt(it.count))
156
-                        }
157
-                    }
158
-              })
159
-
160
-          }
161
-        })
162
-        let data = []
163
-        projectPrint.map(item => {
164
-          if(item.team.id == 0){
165
-                data.push(item)
166
-              }
167 148
 
168
-        })
169 149
 
170
-        this.total = total.toFixed(2)
171
-        return data
172
-     },
150
+    //  getSingleTeam(prescriptions){
151
+    //     let projectPrint = []
152
+    //     let total = 0
153
+    //     prescriptions.map(item => {
154
+    //       if(item.project.length > 0){
155
+    //           item.project.map(it => {
156
+    //                 if(it.type == 2){
157
+    //                     if(it.project.cost_classify == 3){
158
+    //                         projectPrint.push(it)
159
+    //                         total += (it.project.price*parseInt(it.count))
160
+    //                     }
161
+    //                 }
162
+    //           })
163
+    //       }
164
+    //     })
165
+    //     let data = []
166
+    //     projectPrint.map(item => {
167
+    //       if(item.team.id == 0){
168
+    //             data.push(item)
169
+    //           }
170
+    //     })
171
+    //     this.total = total.toFixed(2)
172
+    //     return data
173
+    //  },
173 174
 
174 175
      getInitData(){
175 176
        getInitData().then(response=>{
@@ -378,7 +379,6 @@ export default {
378 379
       var xtuser = this.$store.getters.xt_user;
379 380
       this.orgname = xtuser.org.org_name;
380 381
       this.org_id = this.$store.getters.xt_user.org_id
381
-
382 382
    },
383 383
    watch:{
384 384
      ids:function(val){

+ 1 - 1
src/xt_pages/outpatientDoctorStation/batch_print_treatTemplate/printOne.vue View File

@@ -18,7 +18,7 @@
18 18
             <div class="printTitle">处方、治疗单</div>
19 19
 
20 20
             <div class="infoTitle">
21
-                <div>门诊编号:</div>
21
+                <div>门诊编号:</div> 
22 22
                 <div>电脑号:</div>
23 23
             </div>
24 24
 

+ 302 - 223
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

@@ -1,45 +1,116 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <bread-crumb :crumbs='crumbs'></bread-crumb>
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
     </div>
6 6
     <div class="app-container">
7 7
       <div class="cell clearfix">
8
-        <el-input size="small" style="width:150px;" v-model="keywords"
9
-                  class="filter-item"/>
10
-        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
8
+        <el-input
9
+          size="small"
10
+          style="width: 150px"
11
+          v-model="keywords"
12
+          class="filter-item"
13
+        />
14
+        <el-button
15
+          size="small"
16
+          style="margin: 0 10px"
17
+          class="filter-item"
18
+          type="primary"
19
+          @click="searchAction"
20
+          >搜索
11 21
         </el-button>
12
-        <el-date-picker v-model="record_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
13
-                        :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
14
-                        format="yyyy-MM-dd"
15
-                        value-format="yyyy-MM-dd"
16
-                        placeholder="选择日期时间" align="right"></el-date-picker>
17
-       <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(1)">处方筏批量打印</el-button>
18
-        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(2)">治疗单批量打印</el-button>
19
-        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="batchPrint(3)">检验单批量打印</el-button>
22
+        <el-date-picker
23
+          v-model="record_date"
24
+          prefix-icon="el-icon-date"
25
+          @change="handleScheduleDateChange"
26
+          :editable="false"
27
+          :clearable="false"
28
+          style="width: 196px; margin-right: 10px"
29
+          type="date"
30
+          format="yyyy-MM-dd"
31
+          value-format="yyyy-MM-dd"
32
+          placeholder="选择日期时间"
33
+          align="right"
34
+        ></el-date-picker>
35
+        <el-button
36
+          size="small"
37
+          style="margin: 0 10px"
38
+          class="filter-item"
39
+          type="primary"
40
+          @click="batchPrint(1)"
41
+          >处方筏批量打印</el-button
42
+        >
43
+        <el-button
44
+          size="small"
45
+          style="margin: 0 10px"
46
+          class="filter-item"
47
+          type="primary"
48
+          @click="batchPrint(2)"
49
+          >治疗单批量打印</el-button
50
+        >
51
+        <el-button
52
+          size="small"
53
+          style="margin: 0 10px"
54
+          class="filter-item"
55
+          type="primary"
56
+          @click="batchPrint(3)"
57
+          >检验单批量打印</el-button
58
+        >
20 59
       </div>
21
-      <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }" @selection-change="handleSelectionChange"
22
-                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
23
-        <el-table-column align="center" type="selection" width="55"></el-table-column>
24
-        <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
60
+      <el-table
61
+        :data="tableData"
62
+        border
63
+        ref="table"
64
+        style="width: 100%"
65
+        :row-style="{ color: '#303133' }"
66
+        @selection-change="handleSelectionChange"
67
+        :header-cell-style="{
68
+          backgroundColor: 'rgb(245, 247, 250)',
69
+          color: '#606266',
70
+        }"
71
+        highlight-current-row
72
+      >
73
+        <el-table-column
74
+          align="center"
75
+          type="selection"
76
+          width="55"
77
+        ></el-table-column>
78
+        <el-table-column
79
+          align="center"
80
+          label="序号"
81
+          width="60"
82
+          type="index"
83
+        ></el-table-column>
25 84
         <el-table-column align="center" prop="name" label="姓名" width="100">
26
-          <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
85
+          <template slot-scope="scope">{{
86
+            scope.row.patients ? scope.row.patients.name : ""
87
+          }}</template>
27 88
         </el-table-column>
28
-        <el-table-column align="center" prop="name" label="处方日期" width="200">
29
-          <template slot-scope="scope"> {{getTimes(scope.row.ctime)}}</template>
30
-
89
+        <el-table-column
90
+          align="center"
91
+          prop="name"
92
+          label="处方日期"
93
+          width="200"
94
+        >
95
+          <template slot-scope="scope">
96
+            {{ getTimes(scope.row.ctime) }}</template
97
+          >
31 98
         </el-table-column>
32 99
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
33
-          <!--<template slot-scope="scope">{{}}</template>-->
100
+        <!--<template slot-scope="scope">{{}}</template>-->
34 101
         <!--</el-table-column>-->
35 102
         <el-table-column align="center" prop="name" label="处方号">
36
-          <template slot-scope="scope">{{scope.row.prescription_number}}</template>
103
+          <template slot-scope="scope">{{
104
+            scope.row.prescription_number
105
+          }}</template>
37 106
         </el-table-column>
38 107
         <el-table-column align="center" prop="name" label="开立医生">
39
-          <template slot-scope="scope">{{scope.row.doctor}}</template>
108
+          <template slot-scope="scope">{{ scope.row.doctor }}</template>
40 109
         </el-table-column>
41 110
         <el-table-column align="center" prop="name" label="诊断">
42
-          <template slot-scope="scope">{{getDiagnosis(scope.row.diagnosis)}}</template>
111
+          <template slot-scope="scope">{{
112
+            getDiagnosis(scope.row.diagnosis)
113
+          }}</template>
43 114
         </el-table-column>
44 115
         <el-table-column align="center" prop="name" label="状态" width="100">
45 116
           <template slot-scope="scope">
@@ -49,7 +120,12 @@
49 120
         </el-table-column>
50 121
         <el-table-column align="center" prop="name" label="操作" width="100">
51 122
           <template slot-scope="scope">
52
-            <el-button size="mini" type="primary" @click="handerShowDetail(scope.row)">详情</el-button>
123
+            <el-button
124
+              size="mini"
125
+              type="primary"
126
+              @click="handerShowDetail(scope.row)"
127
+              >详情</el-button
128
+            >
53 129
           </template>
54 130
         </el-table-column>
55 131
       </el-table>
@@ -59,239 +135,242 @@
59 135
         :page-sizes="[10, 50, 100]"
60 136
         :page-size="10"
61 137
         background
62
-        style="margin-top:20px;float: right"
138
+        style="margin-top: 20px; float: right"
63 139
         layout="total, sizes, prev, pager, next, jumper"
64 140
         :total="total"
65 141
       >
66 142
       </el-pagination>
67 143
       <inquiries-detail ref="inquiriesDetail"></inquiries-detail>
68 144
       <el-dialog
69
-          class="centerDialog"
70
-          width="600px"
71
-          title="打印"
72
-          :visible.sync="innerVisible"
73
-          append-to-body>
145
+        class="centerDialog"
146
+        width="600px"
147
+        title="打印"
148
+        :visible.sync="innerVisible"
149
+        append-to-body
150
+      >
74 151
         <template>
75 152
           <el-button
76
-              style="float:right;"
77
-              size="small"
78
-              icon="el-icon-printer"
79
-              @click="printThisPage"
80
-              type="primary"
81
-          >打印
153
+            style="float: right"
154
+            size="small"
155
+            icon="el-icon-printer"
156
+            @click="printThisPage"
157
+            type="primary"
158
+            >打印
82 159
           </el-button>
83 160
         </template>
84
-        <div id='printMain'>
85
-          <print ref="print" v-if="printType == 1" :printData='printData'></print>
86
-          <treatPrint ref="treatPrint" v-if="printType == 2" :printData='printData'></treatPrint>
87
-          <checkPrint ref="checkPrint" v-if="printType == 3" :printData='printData'></checkPrint>
161
+        <div id="printMain">
162
+          <print
163
+            ref="print"
164
+            v-if="printType == 1"
165
+            :printData="printData"
166
+          ></print>
167
+          <treatPrint
168
+            ref="treatPrint"
169
+            v-if="printType == 2"
170
+            :printData="printData"
171
+          ></treatPrint>
172
+          <checkPrint
173
+            ref="checkPrint"
174
+            v-show="printType == 3"
175
+            :printData="printData"
176
+          ></checkPrint>
88 177
         </div>
89
-
90 178
       </el-dialog>
91 179
     </div>
92 180
   </div>
93 181
 </template>
94 182
 
95 183
 <script>
96
-  import BreadCrumb from '@/xt_pages/components/bread-crumb'
97
-  import inquiriesDetail from './components/inquiriesDetail'
98
-  import { getHisPrescriptionList } from '@/api/his/his'
99
-  import { uParseTime } from '@/utils/tools'
100
-  import { getInitData, getBatchPrint } from '@/api/his/his'
101
-  import print from './batch_print_template/index'
102
-  import treatPrint from './batch_print_treatTemplate/index'
103
-  import checkPrint from './batch_print_checkTemplate/index'
104
-  export default {
105
-    components: {
106
-      BreadCrumb,
107
-      inquiriesDetail,
108
-      print,
109
-      treatPrint,
110
-      checkPrint
111
-    },
112
-    data() {
113
-      return {
114
-        keywords:"",
115
-        total:0,
116
-        record_date:"",
117
-        page:1,
118
-        limit:10,
119
-        crumbs: [
120
-          { path: false, name: '门诊医生站' },
121
-          { path: false, name: '既往查询' }
122
-        ],
123
-        tableData: [],
124
-        diagnoses:[],
125
-        innerVisible: false,
126
-        selecting_schs:[],
127
-        printData:[],
128
-        printType: 0,
129
-        org_id:'',
184
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
185
+import inquiriesDetail from "./components/inquiriesDetail";
186
+import { getHisPrescriptionList } from "@/api/his/his";
187
+import { uParseTime } from "@/utils/tools";
188
+import { getInitData, getBatchPrint } from "@/api/his/his";
189
+import print from "./batch_print_template/index";
190
+import treatPrint from "./batch_print_treatTemplate/index";
191
+import checkPrint from "./batch_print_checkTemplate/index";
192
+export default {
193
+  components: {
194
+    BreadCrumb,
195
+    inquiriesDetail,
196
+    print,
197
+    treatPrint,
198
+    checkPrint,
199
+  },
200
+  data() {
201
+    return {
202
+      keywords: "",
203
+      total: 0,
204
+      record_date: "",
205
+      page: 1,
206
+      limit: 10,
207
+      crumbs: [
208
+        { path: false, name: "门诊医生站" },
209
+        { path: false, name: "既往查询" },
210
+      ],
211
+      tableData: [],
212
+      diagnoses: [],
213
+      innerVisible: false,
214
+      selecting_schs: [],
215
+      printData: [],
216
+      printType: 0,
217
+      org_id: "",
218
+    };
219
+  },
220
+  methods: {
221
+    printThisPage() {
222
+      if (this.org_id == 10138) {
223
+        const style =
224
+          "@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: 88%;}}#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: 87%;}}}";
225
+        printJS({
226
+          printable: "printMain",
227
+          type: "html",
228
+          style: style,
229
+          scanStyles: false,
230
+        });
231
+      } else {
232
+        const style =
233
+          "@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.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: 82%;}}#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: 20px;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.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;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}";
234
+        printJS({
235
+          printable: "printMain",
236
+          type: "html",
237
+          style: style,
238
+          scanStyles: false,
239
+        });
130 240
       }
241
+      this.innerVisible = false;
242
+      // this.$nextTick(() => {
243
+      //   this.$refs.print.printThisPage()
244
+      //   this.$refs.treatPrint.printThisPage()
245
+      //   this.$refs.checkPrint.printThisPage()
246
+      // })
131 247
     },
132
-    methods: {
133
-      printThisPage() {
134
-        if(this.org_id == 10138){
135
-          const style =
136
-              '@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: 88%;}}#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: 87%;}}}'
137
-          printJS({
138
-            printable: 'printMain',
139
-            type: 'html',
140
-            style: style,
141
-            scanStyles: false
142
-          })
143
-        }else{
144
-          const style =
145
-              '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:450px;}.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: 88%;}}#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:450px;}.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;}.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}}'
146
-          printJS({
147
-            printable: 'printMain',
148
-            type: 'html',
149
-            style: style,
150
-            scanStyles: false
151
-          })
152
-        }
153
-        this.innerVisible = false
154
-        // this.$nextTick(() => {
155
-        //   this.$refs.print.printThisPage()
156
-        //   this.$refs.treatPrint.printThisPage()
157
-        //   this.$refs.checkPrint.printThisPage()
158
-        // })
159
-      },
160
-
161
-      searchAction(){
162
-        this.page = 1;
163
-        this.limit = 10;
164
-        this.getHisPrescriptionList()
165
-
166
-      },
167
-      handleScheduleDateChange(){
168
-        this.page = 1;
169
-        this.limit = 10;
170
-        this.getHisPrescriptionList()
171
-
172
-      },
173
-      handleCurrentChange(page) {
174
-        this.page = page;
175
-        this.getHisPrescriptionList()
176
-
177
-      },
178
-
179
-      handleSizeChange(limit) {
180
-        this.limit = limit;
181
-        this.getHisPrescriptionList()
182 248
 
249
+    searchAction() {
250
+      this.page = 1;
251
+      this.limit = 10;
252
+      this.getHisPrescriptionList();
253
+    },
254
+    handleScheduleDateChange() {
255
+      this.page = 1;
256
+      this.limit = 10;
257
+      this.getHisPrescriptionList();
258
+    },
259
+    handleCurrentChange(page) {
260
+      this.page = page;
261
+      this.getHisPrescriptionList();
262
+    },
183 263
 
184
-      },
185
-      getTimes(time) {
186
-        return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
187
-      },
188
-      handerShowDetail(row) {
189
-        if(row.id == 0){
190
-          this.$message.error("未就诊")
191
-          return
264
+    handleSizeChange(limit) {
265
+      this.limit = limit;
266
+      this.getHisPrescriptionList();
267
+    },
268
+    getTimes(time) {
269
+      return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
270
+    },
271
+    handerShowDetail(row) {
272
+      if (row.id == 0) {
273
+        this.$message.error("未就诊");
274
+        return;
275
+      }
276
+      this.$refs.inquiriesDetail.show(row.id);
277
+    },
278
+    getHisPrescriptionList() {
279
+      let params = {
280
+        record_date: this.record_date,
281
+        page: this.page,
282
+        limit: this.limit,
283
+        keywords: this.keywords,
284
+      };
285
+      getHisPrescriptionList(params).then((response) => {
286
+        if (response.data.state == 0) {
287
+          this.$message.error(response.data.msg);
288
+          return false;
289
+        } else {
290
+          this.tableData = response.data.data.order;
291
+          this.total = response.data.data.total;
292
+          this.$nextTick(() => {
293
+            this.$refs.table.doLayout(); //解决表格错位
294
+          });
192 295
         }
193
-        this.$refs.inquiriesDetail.show(row.id)
194
-      }, getHisPrescriptionList() {
195
-        let params = {
196
-          record_date:this.record_date,
197
-          page: this.page,
198
-          limit: this.limit,
199
-          keywords: this.keywords,
296
+      });
297
+    },
298
+    getInitData() {
299
+      getInitData().then((response) => {
300
+        if (response.data.state == 0) {
301
+          this.$message.error(response.data.msg);
302
+          return false;
303
+        } else {
304
+          this.diagnoses = response.data.data.diagnose;
305
+          console.log("诊断列表", this.diagnoses);
200 306
         }
201
-        getHisPrescriptionList(params).then(response => {
202
-          if (response.data.state == 0) {
203
-            this.$message.error(response.data.msg)
204
-            return false
205
-          } else {
206
-            this.tableData = response.data.data.order
207
-            this.total = response.data.data.total
208
-            this.$nextTick(() => {
209
-              this.$refs.table.doLayout(); //解决表格错位
210
-            });
211
-          }
212
-        })
213
-
214
-      },
215
-       getInitData() {
216
-        getInitData().then(response => {
217
-          if (response.data.state == 0) {
218
-            this.$message.error(response.data.msg)
219
-            return false
220
-          } else {
221
-            this.diagnoses = response.data.data.diagnose
222
-            console.log("诊断列表",this.diagnoses)
223
-          }
224
-        })
225
-      },
226
-      getDiagnosis(id){
227
-        let ids = id.split(",")
228
-        var name = ""
229
-        for(let i = 0; i < ids.length; i++){
230
-
231
-          for(let b=0;b<this.diagnoses.length;b++){
232
-            if(parseInt(ids[i]) == this.diagnoses[b].id){
233
-              if(name.length == 0){
234
-                name = this.diagnoses[b].class_name
235
-              }else{
236
-                name = name +"," + this.diagnoses[b].class_name
237
-
238
-              }
307
+      });
308
+    },
309
+    getDiagnosis(id) {
310
+      let ids = id.split(",");
311
+      var name = "";
312
+      for (let i = 0; i < ids.length; i++) {
313
+        for (let b = 0; b < this.diagnoses.length; b++) {
314
+          if (parseInt(ids[i]) == this.diagnoses[b].id) {
315
+            if (name.length == 0) {
316
+              name = this.diagnoses[b].class_name;
317
+            } else {
318
+              name = name + "," + this.diagnoses[b].class_name;
239 319
             }
240 320
           }
241
-
242 321
         }
322
+      }
243 323
 
244
-
245
-
246
-
247
-        return name
248
-      },
249
-      handleSelectionChange(val) {
250
-
251
-        this.selecting_schs = val;
252
-
253
-      },
254
-      batchPrint(type){
255
-        this.printType = type
256
-        if (this.selecting_schs.length === 0) {
257
-          this.$message.error("请至少选择一条需要打印的内容");
258
-          return false;
259
-        }
260
-        this.innerVisible = true
324
+      return name;
325
+    },
326
+    handleSelectionChange(val) {
327
+      this.selecting_schs = val;
328
+    },
329
+    batchPrint(type) {
330
+      this.printType = type;
331
+      console.log(type, "oo");
332
+      if (this.selecting_schs.length === 0) {
333
+        this.$message.error("请至少选择一条需要打印的内容");
334
+        return false;
335
+      } else {
261 336
         var sch_ids = [];
262
-
263 337
         for (let index = 0; index < this.selecting_schs.length; index++) {
264 338
           sch_ids.push(this.selecting_schs[index].patient_id);
265 339
         }
266
-        console.log('sch_ids',sch_ids)
340
+        console.log("sch_ids", sch_ids);
267 341
         let params = {
268 342
           record_date: this.record_date,
269 343
           patient_ids: sch_ids.join(","),
270
-          type: type
271
-        }
272
-        getBatchPrint(params).then(res => {
273
-          console.log('res',res)
274
-          let printData = res.data.data.patients
275
-          this.printData = printData
276
-        })
277
-      }
278
-    }, created() {
279
-      var nowDate = new Date()
280
-      var nowYear = nowDate.getFullYear()
281
-      var nowMonth = nowDate.getMonth() + 1
282
-      var nowDay = nowDate.getDate()
283
-      this.record_date =
284
-        nowYear +
285
-        '-' +
286
-        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
287
-        '-' +
288
-        (nowDay < 10 ? '0' + nowDay : nowDay)
344
+          type: type,
345
+        };
346
+        getBatchPrint(params).then((res) => {
347
+          let printData = res.data.data.patients;
348
+          this.printData = printData;
289 349
 
290
-      this.org_id = this.$store.getters.xt_user.template_info.org_id
350
+          console.log("res", printData);
351
+        });
352
+      }
353
+      this.innerVisible = true;
354
+    //  this.$refs.checkPrint.getTeam_1();
355
+      
356
+    },
357
+  },
358
+  created() {
359
+    var nowDate = new Date();
360
+    var nowYear = nowDate.getFullYear();
361
+    var nowMonth = nowDate.getMonth() + 1;
362
+    var nowDay = nowDate.getDate();
363
+    this.record_date =
364
+      nowYear +
365
+      "-" +
366
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
367
+      "-" +
368
+      (nowDay < 10 ? "0" + nowDay : nowDay);
291 369
 
292
-      this.getHisPrescriptionList()
293
-      this.getInitData()
370
+    this.org_id = this.$store.getters.xt_user.template_info.org_id;
294 371
 
295
-    }
296
-  }
372
+    this.getHisPrescriptionList();
373
+    this.getInitData();
374
+  },
375
+};
297 376
 </script>