Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 3 years ago
parent
commit
9487c49a28

+ 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 =

+ 1 - 1
src/xt_pages/outpatientCharges/statementTemplate/printOne.vue View File

@@ -22,7 +22,7 @@
22 22
         <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
23 23
         <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
24 24
         <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
25
-        <td width="100" v-if="!info.hosp_lv"></td>
25
+        <td width="100" v-else></td>
26 26
 
27 27
       </tr>
28 28
       <tr>

+ 1 - 1
src/xt_pages/outpatientCharges/statementTemplate/test.vue View File

@@ -22,7 +22,7 @@
22 22
         <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
23 23
         <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
24 24
         <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
25
-        <td width="100" v-if="!info.hosp_lv"></td>
25
+        <td width="100" v-else></td>
26 26
 
27 27
       </tr>
28 28
       <tr>

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

@@ -1,148 +1,200 @@
1 1
 <template>
2
-    <div>
3
-        <div id='prescription-print3' class="prescription-print">
4
-          <div v-for="(i,index) in printData">
5
-<!--            <img style="width:100%;height:80px" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">-->
6
-<!--/*             <img style="width:100%;height:80px" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">*/-->
7
-            <div class="printTitle">检验申请单</div>
8
-
9
-            <div style="border:1px solid #000;">
10
-                <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
11
-                    <div>是否急诊:否</div>
12
-                    <div>结算方式:{{ i.his_patient.id != 0 ? i.his_patient.balance_accounts_type == 1 ? '医保' : '自费' : '' }}</div>
13
-                    <div>金额:{{ total }}</div>
14
-                </div>
15
-                <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;padding:0 10px;">
16
-                    <div>姓名:{{i.his_patient.id != 0?i.his_patient.name:i.name}}</div>
17
-                    <div>性别:
18
-                        <span v-if="i.his_patient.id != 0">
19
-                          <span v-if="i.his_patient.gend == 1">男</span>
20
-                          <span v-if="i.his_patient.gend == 2">女</span>
21
-                        </span>
22
-                        <span v-else>
23
-                          <span v-if="i.gender == 1">男</span>
24
-                          <span v-if="i.gender == 2">女</span>
25
-                        </span>
26
-                    </div>
27
-                    <div>年龄:{{i.age?i.age:""}}岁</div>
28
-                </div>
29
-                <!-- <div style="margin-bottom:20px;padding:10px 10px 0;">病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div> -->
30
-                <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
2
+  <div id="prescriptionPrint" class="prescription-print">
3
+    <div v-for="(i, index) in printData" :key="index" style="box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;">
4
+      <!--            <img style="width:100%;height:80px" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/bltotle.jpg" alt="">-->
5
+      <!--/*             <img style="width:100%;height:80px" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">*/-->
6
+      <div
7
+        id="prescription-print"
8
+        class="prescription-print"
9
+        style="page-break-after: always"
10
+        v-for="(item, index) in i.prescriptions"
11
+        :key="index"
12
+      >
13
+        <div class="printTitle">检验申请单</div>
14
+
15
+        <div style="border: 1px solid #000">
16
+          <div
17
+            style="
18
+              display: flex;
19
+              justify-content: space-between;
20
+              border-bottom: 1px solid #000;
21
+              line-height: 40px;
22
+              padding: 0 10px;
23
+            "
24
+          >
25
+            <div>是否急诊:否</div>
26
+            <div>
27
+              结算方式:{{
28
+                i.his_patient.id != 0
29
+                  ? i.his_patient.balance_accounts_type == 1
30
+                    ? "医保"
31
+                    : "自费"
32
+                  : ""
33
+              }}
34
+            </div>
35
+            <div>金额:{{ total }}</div>
36
+          </div>
37
+          <div
38
+            style="
39
+              display: flex;
40
+              justify-content: space-between;
41
+              border-bottom: 1px solid #000;
42
+              line-height: 40px;
43
+              padding: 0 10px;
44
+            "
45
+          >
46
+            <div>
47
+              姓名:{{ i.his_patient.id != 0 ? i.his_patient.name : i.name }}
48
+            </div>
49
+            <div>
50
+              性别:
51
+              <span v-if="i.his_patient.id != 0">
52
+                <span v-if="i.his_patient.gend == 1">男</span>
53
+                <span v-if="i.his_patient.gend == 2">女</span>
54
+              </span>
55
+              <span v-else>
56
+                <span v-if="i.gender == 1">男</span>
57
+                <span v-if="i.gender == 2">女</span>
58
+              </span>
59
+            </div>
60
+            <div>年龄:{{ i.age ? i.age : "" }}岁</div>
61
+          </div>
62
+          <!-- <div style="margin-bottom:20px;padding:10px 10px 0;">病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div> -->
63
+          <!-- <div style="margin-bottom:20px;padding:0 10px;">体格检查:
31 64
                     <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
32 65
                     <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
33 66
                     <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
34 67
                     <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
35 68
                 </div> -->
36
-                <div style="margin:20px 0;padding:0 10px;">临床诊断:{{getDiagnosis(i.info.diagnosis)}}</div>
37
-                <div style="display:flex;margin-bottom:20px;padding:0 10px;">
38
-                    <div>检验项目:</div>
39
-                    <div>
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>
42
-                    </div>
43
-                </div>
44
-                <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;padding:0 10px;">
45
-                    <div>开单医生:{{ i.info.doctor ? i.info.doctor : '' }}</div>
46
-                    <div>开单日期:
47
-                        {{getTime(i.info.ctime) ? getTime(i.info.ctime).split(' ')[0] : ''}}
48
-                    </div>
49
-                    <div>医生签字:{{ i.info.doctor ? i.info.doctor : '' }}</div>
50
-                </div>
69
+          <div style="margin: 20px 0; padding: 0 10px">
70
+            临床诊断:{{ getDiagnosis(i.info.diagnosis) }}
71
+          </div>
72
+          <div style="display: flex; margin-bottom: 20px; padding: 0 10px">
73
+            <div>检验项目:</div>
74
+            <div>
75
+              <div
76
+                v-for="item in getTeam(i.prescriptions)"
77
+                style="margin-bottom: 10px"
78
+              >
79
+                {{ item.team.project_team }}
80
+              </div>
81
+              <div v-for="item in getSingleTeam(i.prescriptions)" style="margin-bottom:10px;">{{ item.project.project_name }}</div>
51 82
             </div>
52
-<!--            <img style="width:100%;" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">-->
53
-<!--            <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">-->
83
+          </div>
84
+          <div
85
+            style="
86
+              display: flex;
87
+              justify-content: space-between;
88
+              border-top: 1px solid #000;
89
+              line-height: 40px;
90
+              padding: 0 10px;
91
+            "
92
+          >
93
+            <div>开单医生:{{ i.info.doctor ? i.info.doctor : "" }}</div>
94
+            <div>
95
+              开单日期:
96
+              {{
97
+                getTime(i.info.ctime) ? getTime(i.info.ctime).split(" ")[0] : ""
98
+              }}
99
+            </div>
100
+            <div>医生签字:{{ i.info.doctor ? i.info.doctor : "" }}</div>
101
+          </div>
54 102
         </div>
103
+        <!--            <img style="width:100%;" v-if="org_id == 10138" src="https://kuyi.shengws.com/bailin/blend.jpg" alt="">-->
104
+        <!--            <img style="width:100%;" v-if="org_id == 10278" src="https://kuyi.shengws.com/bailinbeier.png" alt="">-->
55 105
       </div>
56 106
     </div>
57
-
107
+  </div>
58 108
 </template>
59 109
 <script>
60
-import { jsGetAge, uParseTime } from '@/utils/tools'
61
-import {getAllDoctorList} from "@/api/project/project"
62
-import {getInitData} from "@/api/his/his"
110
+import { jsGetAge, uParseTime } from "@/utils/tools";
111
+import { getAllDoctorList } from "@/api/project/project";
112
+import { getInitData } from "@/api/his/his";
63 113
 export default {
64
-    props:{
65
-      printData:Array
114
+  props: {
115
+    printData: Array,
116
+  },
117
+  data() {
118
+    return {
119
+      doctorList: [],
120
+      advicePrint: {},
121
+      patient: {},
122
+      tableData: [],
123
+      prescriptionInfo: [],
124
+      hisPatient: {},
125
+      department: [],
126
+      prescriptions: [],
127
+      projectList: [],
128
+      orgname: "",
129
+      diagnoses: [],
130
+      pageArr: [],
131
+      faber: {},
132
+      total: 0,
133
+      projectPrint: [],
134
+      time: "",
135
+      doctor: "",
136
+      org_id: "",
137
+      singleProjectPrint: [],
138
+    };
139
+  },
140
+
141
+  methods: {
142
+    getAllDoctorList() {
143
+      getAllDoctorList().then((response) => {
144
+        if (response.data.state == 1) {
145
+          var doctor = response.data.data.doctor;
146
+
147
+          this.doctorList = doctor;
148
+        }
149
+      });
66 150
     },
67
-    data(){
68
-      return {
69
-        doctorList:[],
70
-        advicePrint:{},
71
-        patient:{},
72
-        tableData:[],
73
-        prescriptionInfo:[],
74
-        hisPatient:{},
75
-        department:[],
76
-        prescriptions:[],
77
-        projectList:[],
78
-        orgname:"",
79
-        diagnoses:[],
80
-        pageArr:[],
81
-        faber:{},
82
-        total:0,
83
-        projectPrint:[],
84
-        time:'',
85
-        doctor:'',
86
-        org_id:'',
87
-        singleProjectPrint:[]
151
+    getDoctor(id) {
152
+      var name = "";
153
+      for (let i = 0; i < this.doctorList.length; i++) {
154
+        if (id == this.doctorList[i].admin_user_id) {
155
+          name = this.doctorList[i].user_name;
156
+        }
88 157
       }
158
+      return name;
159
+    },
160
+    getTime(value, temp) {
161
+      if (value != undefined) {
162
+        return uParseTime(value, temp);
163
+      }
164
+      return "";
89 165
     },
90
-   methods:{
91
-     getAllDoctorList(){
92
-      getAllDoctorList().then(response=>{
93
-        if(response.data.state == 1){
94
-               var doctor =  response.data.data.doctor
95
-
96
-               this.doctorList = doctor
97
-             }
98
-         })
99
-     },
100
-     getDoctor(id){
101
-        var name = ""
102
-        for(let i=0;i<this.doctorList.length;i++){
103
-          if(id == this.doctorList[i].admin_user_id){
104
-              name = this.doctorList[i].user_name
105
-          }
106
-        }
107
-        return name
108
-      },
109
-     getTime(value, temp) {
110
-        if (value != undefined) {
111
-            return uParseTime(value, temp)
112
-        }
113
-        return ''
114
-     },
115
-     getTeam(prescriptions){
116
-        let projectPrint = []
117
-        let total = 0
118
-        prescriptions.map(item => {
119
-          if(item.project.length > 0){
120
-              item.project.map(it => {
121
-                    if(it.type == 2){
122
-                        if(it.project.cost_classify == 3){
123
-                            projectPrint.push(it)
124
-                            total += (it.project.price*parseInt(it.count))
125
-                        }
126
-                    }
127
-              })
128 166
 
129
-          }
130
-        })
131
-        let data = []
132
-        projectPrint.map(item => {
133
-          if(item.team.id != 0){
134
-            let status = data.some(it => (it.team.id == item.team.id))
135
-            if(!status){
136
-              data.push(item)
167
+    getTeam(prescriptions) {
168
+      // console.log(prescriptions, "prescriptions");
169
+      let projectPrint = [];
170
+      let total = 0;
171
+      prescriptions.map((item) => {
172
+        if (item.project.length > 0) {
173
+          item.project.map((it) => {
174
+            if (it.type == 2) {
175
+              if (it.project.cost_classify == 3) {
176
+                projectPrint.push(it);
177
+                total += it.project.price * parseInt(it.count);
178
+              }
137 179
             }
180
+          });
181
+        }
182
+      });
183
+      let data = [];
184
+      projectPrint.map((item) => {
185
+        if (item.team.id != 0) {
186
+          let status = data.some((it) => it.team.id == item.team.id);
187
+          if (!status) {
188
+            data.push(item);
189
+            console.log(data, "oodata");
138 190
           }
191
+        }
192
+      });
193
+      this.total = total.toFixed(2);
194
+      this.projectPrint = data;
195
+      return data;
196
+    },
139 197
 
140
-        })
141
-
142
-        this.total = total.toFixed(2)
143
-        this.projectPrint = data
144
-        return data
145
-     },
146 198
      getSingleTeam(prescriptions){
147 199
         let projectPrint = []
148 200
         let total = 0
@@ -156,7 +208,6 @@ export default {
156 208
                         }
157 209
                     }
158 210
               })
159
-
160 211
           }
161 212
         })
162 213
         let data = []
@@ -164,301 +215,312 @@ export default {
164 215
           if(item.team.id == 0){
165 216
                 data.push(item)
166 217
               }
167
-
168 218
         })
169
-
170 219
         this.total = total.toFixed(2)
171 220
         return data
172 221
      },
173 222
 
174
-     getInitData(){
175
-       getInitData().then(response=>{
176
-          if(response.data.state == 1){
177
-            this.department = response.data.data.department
178
-            this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
179
-          }
180
-       })
181
-     },
182
-     getDepart(id){
183
-         var name = ""
184
-       for(let i=0;i<this.department.length;i++){
185
-           if(id == this.department[i].id){
186
-               name = this.department[i].name
187
-           }
188
-       }
189
-       return name
190
-     },
223
+    getInitData() {
224
+      getInitData().then((response) => {
225
+        if (response.data.state == 1) {
226
+          this.department = response.data.data.department;
227
+          this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
228
+        }
229
+      });
230
+    },
231
+    getDepart(id) {
232
+      var name = "";
233
+      for (let i = 0; i < this.department.length; i++) {
234
+        if (id == this.department[i].id) {
235
+          name = this.department[i].name;
236
+        }
237
+      }
238
+      return name;
239
+    },
191 240
     getTotalOne(id) {
192
-
193
-        var total = 0
194
-        var addtotal = 0
195
-        for (let i = 0; i < this.prescriptions.length; i++) {
196
-          if(id == this.prescriptions[i].id){
197
-            if (this.prescriptions[i].project != null) {
198
-              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
199
-                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
200
-              }
241
+      var total = 0;
242
+      var addtotal = 0;
243
+      for (let i = 0; i < this.prescriptions.length; i++) {
244
+        if (id == this.prescriptions[i].id) {
245
+          if (this.prescriptions[i].project != null) {
246
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
247
+              total =
248
+                total +
249
+                this.prescriptions[i].project[a].price *
250
+                  this.prescriptions[i].project[a].count;
201 251
             }
252
+          }
202 253
 
203
-            if (this.prescriptions[i].additionalcharge != null) {
204
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
205
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
206
-              }
254
+          if (this.prescriptions[i].additionalcharge != null) {
255
+            for (
256
+              let a = 0;
257
+              a < this.prescriptions[i].additionalcharge.length;
258
+              a++
259
+            ) {
260
+              addtotal =
261
+                addtotal +
262
+                this.prescriptions[i].additionalcharge[a].price *
263
+                  this.prescriptions[i].additionalcharge[a].count;
207 264
             }
208
-              addtotal =  Math.floor(addtotal * 100) / 100
265
+          }
266
+          addtotal = Math.floor(addtotal * 100) / 100;
209 267
         }
210
-
211
-       }
268
+      }
212 269
 
213 270
       for (let i = 0; i < this.prescriptions.length; i++) {
214
-          if(id == this.prescriptions[i].id){
215
-            if (this.prescriptions[i].advices != null) {
216
-              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
217
-                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
218
-              }
271
+        if (id == this.prescriptions[i].id) {
272
+          if (this.prescriptions[i].advices != null) {
273
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
274
+              total =
275
+                total +
276
+                this.prescriptions[i].advices[a].price *
277
+                  this.prescriptions[i].advices[a].prescribing_number;
219 278
             }
279
+          }
220 280
 
221
-            if (this.prescriptions[i].additionalcharge != null) {
222
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
223
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
224
-              }
281
+          if (this.prescriptions[i].additionalcharge != null) {
282
+            for (
283
+              let a = 0;
284
+              a < this.prescriptions[i].additionalcharge.length;
285
+              a++
286
+            ) {
287
+              addtotal =
288
+                addtotal +
289
+                this.prescriptions[i].additionalcharge[a].price *
290
+                  this.prescriptions[i].additionalcharge[a].count;
225 291
             }
226
-              addtotal =  Math.floor(addtotal * 100) / 100
292
+          }
293
+          addtotal = Math.floor(addtotal * 100) / 100;
227 294
         }
228
-       }
295
+      }
229 296
 
230
-        return total + addtotal
231
-      },
297
+      return total + addtotal;
298
+    },
232 299
 
233
-     getProjectName(id){
234
-        var project_name = ""
235
-        for(let i=0;i<this.projectList.length;i++){
236
-           if(id == this.projectList[i].id){
237
-               project_name = this.projectList[i].project_name
238
-           }
300
+    getProjectName(id) {
301
+      var project_name = "";
302
+      for (let i = 0; i < this.projectList.length; i++) {
303
+        if (id == this.projectList[i].id) {
304
+          project_name = this.projectList[i].project_name;
239 305
         }
240
-        return project_name
241
-     },
306
+      }
307
+      return project_name;
308
+    },
242 309
 
243
-     getDiagnosis(ids){
244
-        let newIds = ids.split(',').sort(function(a,b){
245
-          return a-b;
246
-        })
310
+    getDiagnosis(ids) {
311
+      let newIds = ids.split(",").sort(function (a, b) {
312
+        return a - b;
313
+      });
247 314
 
248
-        let nameArr = []
249
-        for(let i=0;i<this.diagnoses.length;i++){
250
-          if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
251
-            // name += diagnoses[i].class_name + ' '
252
-            nameArr.push(this.diagnoses[i].class_name)
253
-          }
315
+      let nameArr = [];
316
+      for (let i = 0; i < this.diagnoses.length; i++) {
317
+        if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
318
+          // name += diagnoses[i].class_name + ' '
319
+          nameArr.push(this.diagnoses[i].class_name);
254 320
         }
255
-        let newNameArr = []
256
-        nameArr.map((item,index) => {
257
-          if(item == '尿毒症'){
258
-            newNameArr.push(item)
259
-            nameArr.splice(index,1,'')
260
-          }
261
-        })
262
-        newNameArr.push(...nameArr)
263
-        return newNameArr.join(' ')
264
-     },
265
-     compare(property) {
266
-        return function(a,b){
267
-          var value1 = a[property];
268
-          var value2 = b[property];
269
-          return value1 - value2;//升序排序
321
+      }
322
+      let newNameArr = [];
323
+      nameArr.map((item, index) => {
324
+        if (item == "尿毒症") {
325
+          newNameArr.push(item);
326
+          nameArr.splice(index, 1, "");
270 327
         }
271
-      },
272
-     getPage(){
273
-        this.page = 1
274
-        this.pageArr = []
275
-
276
-        this.advicePrint.map(item => {
277
-          let arr = []
278
-          item.pageArr = []
279
-          if(item.advices.length <= 5){
280
-            this.page = 1
281
-            arr.push(item.advices.length)
282
-            item.pageArr.push(arr)
283
-
284
-          }else if(item.advices.length > 5){
285
-            this.page = parseInt(item.advices.length / 5)
286
-            let num = item.advices.length % 5
287
-            for (var i=0;i<this.page;i++){
288
-              item.pageArr.push([5])
289
-            }
290
-            if(num != 0){
291
-              item.pageArr.push([num])
292
-            }
328
+      });
329
+      newNameArr.push(...nameArr);
330
+      return newNameArr.join(" ");
331
+    },
332
+    compare(property) {
333
+      return function (a, b) {
334
+        var value1 = a[property];
335
+        var value2 = b[property];
336
+        return value1 - value2; //升序排序
337
+      };
338
+    },
339
+    getPage() {
340
+      this.page = 1;
341
+      this.pageArr = [];
342
+
343
+      this.advicePrint.map((item) => {
344
+        let arr = [];
345
+        item.pageArr = [];
346
+        if (item.advices.length <= 5) {
347
+          this.page = 1;
348
+          arr.push(item.advices.length);
349
+          item.pageArr.push(arr);
350
+        } else if (item.advices.length > 5) {
351
+          this.page = parseInt(item.advices.length / 5);
352
+          let num = item.advices.length % 5;
353
+          for (var i = 0; i < this.page; i++) {
354
+            item.pageArr.push([5]);
293 355
           }
294
-        })
295
-        // console.log('this.pageArr',this.pageArr)
296
-      },
297
-      getName(list) {
298
-        console.log('list',list)
299
-        let new_list = []
300
-        for (let i = 0; i < list.length; i++) {
301
-          if (list[i].aac031 == '1') {
302
-            new_list.push(list[i])
356
+          if (num != 0) {
357
+            item.pageArr.push([num]);
303 358
           }
304 359
         }
305
-
306
-        switch (new_list[0].bcc334) {
307
-          case "A31001":
308
-            return "深圳医保1档"
309
-            break
310
-          case "A31002":
311
-            return "深圳医保2档"
312
-
313
-            break
314
-          case "A31003":
315
-            return "深圳医保3档"
316
-
317
-            break
318
-          case "A31004":
319
-            return "二档(少儿)"
320
-
321
-            break
322
-          case "A31005":
323
-            return "学生二档"
324
-
325
-            break
326
-          case "A31006":
327
-            return "大学生二档"
328
-
329
-            break
330
-          case "A32001":
331
-            return "在职公务员"
332
-            break
333
-          case "A32002":
334
-            return "在职驻深公务员"
335
-
336
-            break
337
-          case "A39301":
338
-            return "家属统筹医疗"
339
-
340
-            break
341
-          case "A41001":
342
-            return "工伤在职"
343
-
344
-            break
345
-          case "A51001":
346
-            return "生育在职"
347
-
348
-            break
349
-          case "A52001":
350
-            return "生育医疗一档"
351
-
352
-            break
353
-          case "A52002":
354
-            return "生育医疗一档"
355
-
356
-            break
357
-          case "C31001":
358
-            return "一档医疗退休"
359
-
360
-            break
361
-          case "C31002":
362
-            return "二档医疗退休"
363
-            break
364
-
360
+      });
361
+      // console.log('this.pageArr',this.pageArr)
362
+    },
363
+    getName(list) {
364
+      console.log("list", list);
365
+      let new_list = [];
366
+      for (let i = 0; i < list.length; i++) {
367
+        if (list[i].aac031 == "1") {
368
+          new_list.push(list[i]);
365 369
         }
370
+      }
366 371
 
367
-
368
-
369
-      },
370
-
371
-   },
372
-   created(){
373
-      // this.getAllDoctorList()
374
-      this.getInitData()
375
-      // this.getPrescriptionPrint()
376
-      // this.getHisPatientDetail()
377
-      // this.getPatientCaseHistory()
378
-      var xtuser = this.$store.getters.xt_user;
379
-      this.orgname = xtuser.org.org_name;
380
-      this.org_id = this.$store.getters.xt_user.org_id
381
-
382
-   },
383
-   watch:{
384
-     ids:function(val){
385
-      this.ids = val
386
-      this.getPrescriptionPrint()
387
-    }
388
-   }
389
-}
372
+      switch (new_list[0].bcc334) {
373
+        case "A31001":
374
+          return "深圳医保1档";
375
+          break;
376
+        case "A31002":
377
+          return "深圳医保2档";
378
+
379
+          break;
380
+        case "A31003":
381
+          return "深圳医保3档";
382
+
383
+          break;
384
+        case "A31004":
385
+          return "二档(少儿)";
386
+
387
+          break;
388
+        case "A31005":
389
+          return "学生二档";
390
+
391
+          break;
392
+        case "A31006":
393
+          return "大学生二档";
394
+
395
+          break;
396
+        case "A32001":
397
+          return "在职公务员";
398
+          break;
399
+        case "A32002":
400
+          return "在职驻深公务员";
401
+
402
+          break;
403
+        case "A39301":
404
+          return "家属统筹医疗";
405
+
406
+          break;
407
+        case "A41001":
408
+          return "工伤在职";
409
+
410
+          break;
411
+        case "A51001":
412
+          return "生育在职";
413
+
414
+          break;
415
+        case "A52001":
416
+          return "生育医疗一档";
417
+
418
+          break;
419
+        case "A52002":
420
+          return "生育医疗一档";
421
+
422
+          break;
423
+        case "C31001":
424
+          return "一档医疗退休";
425
+
426
+          break;
427
+        case "C31002":
428
+          return "二档医疗退休";
429
+          break;
430
+      }
431
+    },
432
+  },
433
+  created() {
434
+    // this.getAllDoctorList()
435
+    this.getInitData();
436
+    // this.getPrescriptionPrint()
437
+    // this.getHisPatientDetail()
438
+    // this.getPatientCaseHistory()
439
+    var xtuser = this.$store.getters.xt_user;
440
+    this.orgname = xtuser.org.org_name;
441
+    this.org_id = this.$store.getters.xt_user.org_id;
442
+  },
443
+  watch: {
444
+    ids: function (val) {
445
+      this.ids = val;
446
+      this.getPrescriptionPrint();
447
+    },
448
+  },
449
+};
390 450
 </script>
391 451
 
392 452
 
393 453
 <style lang="scss" scoped>
394
-.prescription-print{
395
-  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
396
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
397
-    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
398
-    margin-bottom: 20px;
399
-    padding:20px 10px;
454
+.prescription-print {
455
+  // -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
456
+  //   0 0 60px rgba(0, 0, 0, 0.06) inset;
457
+  // -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
458
+  //   0 0 40px rgba(0, 0, 0, 0.06) inset;
459
+  // box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
460
+  margin-bottom: 20px;
461
+  padding: 20px 10px;
400 462
 }
401
-.printTitle{
402
-    font-size: 22px;
403
-    text-align: center;
404
-    font-weight: bold;
405
-    margin-bottom: 10px;
463
+.printTitle {
464
+  font-size: 22px;
465
+  text-align: center;
466
+  font-weight: bold;
467
+  margin-bottom: 10px;
406 468
 }
407
-.infoTitle{
408
-    display: flex;
409
-    margin-top:10px;
410
-    line-height: 24px;
469
+.infoTitle {
470
+  display: flex;
471
+  margin-top: 10px;
472
+  line-height: 24px;
411 473
 }
412
-.infoTitle div{
413
-    width: 200px;
474
+.infoTitle div {
475
+  width: 200px;
414 476
 }
415
-.infoMain{
416
-    display: flex;
417
-    flex-wrap: wrap;
418
-    margin-top:10px;
477
+.infoMain {
478
+  display: flex;
479
+  flex-wrap: wrap;
480
+  margin-top: 10px;
419 481
 }
420
-.infoMain div{
421
-    width: 50%;
422
-    line-height: 24px;
482
+.infoMain div {
483
+  width: 50%;
484
+  line-height: 24px;
423 485
 }
424
-.prescriptionBox{
425
-    padding:0 10px;
426
-    min-height:400px;
486
+.prescriptionBox {
487
+  padding: 0 10px;
488
+  min-height: 400px;
427 489
 }
428
-.Rp{
429
-    font-size: 22px;
430
-    font-weight: bold;
490
+.Rp {
491
+  font-size: 22px;
492
+  font-weight: bold;
431 493
 }
432
-.drugsBox{
433
-    padding-left: 40px;
434
-    margin-bottom: 10px;
494
+.drugsBox {
495
+  padding-left: 40px;
496
+  margin-bottom: 10px;
435 497
 }
436
-.drugsBox div{
437
-    line-height: 20px;
498
+.drugsBox div {
499
+  line-height: 20px;
438 500
 }
439
-.drugsOne{
440
-    line-height: 24px;
501
+.drugsOne {
502
+  line-height: 24px;
441 503
 }
442
-.drugsOne span{
443
-    margin-right: 20px;
504
+.drugsOne span {
505
+  margin-right: 20px;
444 506
 }
445
-.doctorBox{
446
-    display: flex;
447
-    justify-content: space-between;
448
-    padding:0 10px;
449
-    line-height: 24px;
450
-    border-bottom: 2px solid #000;
507
+.doctorBox {
508
+  display: flex;
509
+  justify-content: space-between;
510
+  padding: 0 10px;
511
+  line-height: 24px;
512
+  border-bottom: 2px solid #000;
451 513
 }
452
-.actionBar{
453
-    display: flex;
454
-    justify-content: space-between;
455
-    line-height: 24px;
456
-    padding:0 10px;
514
+.actionBar {
515
+  display: flex;
516
+  justify-content: space-between;
517
+  line-height: 24px;
518
+  padding: 0 10px;
457 519
 }
458
-.actionBar p{
459
-    width:150px;
520
+.actionBar p {
521
+  width: 150px;
460 522
 }
461
-.under_line{
523
+.under_line {
462 524
   display: inline-block;
463 525
   border-bottom: 1px solid #000;
464 526
   flex: 1;

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

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div id='prescriptionPrint'>
3
-    <div v-for="(i,index) in printData">
3
+    <div v-for="(i,index) in printData" :key="index">
4 4
       <div v-for="(item,index) in i.prescriptions" :key="index">
5 5
         <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
6 6
             <div class="printTitle" v-if="item.med_type == '1111'">{{orgname}}第一类精神处方笺</div>

+ 308 - 224
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,247 @@
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-if="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
+      }if(this.printType == 3){
232
+        const style =
233
+          "@media print {html {zoom: 80%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}#prescriptionPrint div{box-shadow:none;}.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
+        });
240
+      }else {
241
+        const style =
242
+          "@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: 80%;}}#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;}}";
243
+        printJS({
244
+          printable: "printMain",
245
+          type: "html",
246
+          style: style,
247
+          scanStyles: false,
248
+        });
130 249
       }
131
-    },
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 250
 
172
-      },
173
-      handleCurrentChange(page) {
174
-        this.page = page;
175
-        this.getHisPrescriptionList()
176
-
177
-      },
178
-
179
-      handleSizeChange(limit) {
180
-        this.limit = limit;
181
-        this.getHisPrescriptionList()
251
+      this.innerVisible = false;
252
+      // this.$nextTick(() => {
253
+      //   this.$refs.print.printThisPage()
254
+      //   this.$refs.treatPrint.printThisPage()
255
+      //   this.$refs.checkPrint.printThisPage()
256
+      // })
257
+    },
182 258
 
259
+    searchAction() {
260
+      this.page = 1;
261
+      this.limit = 10;
262
+      this.getHisPrescriptionList();
263
+    },
264
+    handleScheduleDateChange() {
265
+      this.page = 1;
266
+      this.limit = 10;
267
+      this.getHisPrescriptionList();
268
+    },
269
+    handleCurrentChange(page) {
270
+      this.page = page;
271
+      this.getHisPrescriptionList();
272
+    },
183 273
 
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
274
+    handleSizeChange(limit) {
275
+      this.limit = limit;
276
+      this.getHisPrescriptionList();
277
+    },
278
+    getTimes(time) {
279
+      return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
280
+    },
281
+    handerShowDetail(row) {
282
+      if (row.id == 0) {
283
+        this.$message.error("未就诊");
284
+        return;
285
+      }
286
+      this.$refs.inquiriesDetail.show(row.id);
287
+    },
288
+    getHisPrescriptionList() {
289
+      let params = {
290
+        record_date: this.record_date,
291
+        page: this.page,
292
+        limit: this.limit,
293
+        keywords: this.keywords,
294
+      };
295
+      getHisPrescriptionList(params).then((response) => {
296
+        if (response.data.state == 0) {
297
+          this.$message.error(response.data.msg);
298
+          return false;
299
+        } else {
300
+          this.tableData = response.data.data.order;
301
+          this.total = response.data.data.total;
302
+          this.$nextTick(() => {
303
+            this.$refs.table.doLayout(); //解决表格错位
304
+          });
192 305
         }
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,
306
+      });
307
+    },
308
+    getInitData() {
309
+      getInitData().then((response) => {
310
+        if (response.data.state == 0) {
311
+          this.$message.error(response.data.msg);
312
+          return false;
313
+        } else {
314
+          this.diagnoses = response.data.data.diagnose;
315
+          console.log("诊断列表", this.diagnoses);
200 316
         }
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
-              }
317
+      });
318
+    },
319
+    getDiagnosis(id) {
320
+      let ids = id.split(",");
321
+      var name = "";
322
+      for (let i = 0; i < ids.length; i++) {
323
+        for (let b = 0; b < this.diagnoses.length; b++) {
324
+          if (parseInt(ids[i]) == this.diagnoses[b].id) {
325
+            if (name.length == 0) {
326
+              name = this.diagnoses[b].class_name;
327
+            } else {
328
+              name = name + "," + this.diagnoses[b].class_name;
239 329
             }
240 330
           }
241
-
242
-        }
243
-
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 331
         }
260
-        this.innerVisible = true
332
+      }
333
+      return name;
334
+    },
335
+    handleSelectionChange(val) {
336
+      this.selecting_schs = val;
337
+    },
338
+    batchPrint(type) {
339
+      this.printType = type;
340
+      if (this.selecting_schs.length === 0) {
341
+        this.$message.error("请至少选择一条需要打印的内容");
342
+        return false;
343
+      } else {
261 344
         var sch_ids = [];
262
-
263 345
         for (let index = 0; index < this.selecting_schs.length; index++) {
264 346
           sch_ids.push(this.selecting_schs[index].patient_id);
265 347
         }
266
-        console.log('sch_ids',sch_ids)
348
+        console.log("sch_ids", sch_ids);
267 349
         let params = {
268 350
           record_date: this.record_date,
269 351
           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
-        })
352
+          type: type,
353
+        };
354
+        getBatchPrint(params).then((res) => {
355
+          let printData = res.data.data.patients;
356
+          this.printData = printData;
357
+          console.log("res", printData);
358
+        });
277 359
       }
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)
289
-
290
-      this.org_id = this.$store.getters.xt_user.template_info.org_id
360
+      this.innerVisible = true;
361
+    },
362
+  },
363
+  created() {
364
+    var nowDate = new Date();
365
+    var nowYear = nowDate.getFullYear();
366
+    var nowMonth = nowDate.getMonth() + 1;
367
+    var nowDay = nowDate.getDate();
368
+    this.record_date =
369
+      nowYear +
370
+      "-" +
371
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
372
+      "-" +
373
+      (nowDay < 10 ? "0" + nowDay : nowDay);
291 374
 
292
-      this.getHisPrescriptionList()
293
-      this.getInitData()
375
+    this.org_id = this.$store.getters.xt_user.template_info.org_id;
294 376
 
295
-    }
296
-  }
377
+    this.getHisPrescriptionList();
378
+    this.getInitData();
379
+  },
380
+};
297 381
 </script>