Browse Source

检验单

huangyw 3 years ago
parent
commit
ff17a2d092

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

@@ -1,151 +1,199 @@
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> -->
82
+            </div>
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
+              }}
51 99
             </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="">-->
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
-  
91
-
92
-   methods:{
93
-     getAllDoctorList(){
94
-      getAllDoctorList().then(response=>{
95
-        if(response.data.state == 1){
96
-               var doctor =  response.data.data.doctor
97
-
98
-               this.doctorList = doctor
99
-             }
100
-         })
101
-     },
102
-     getDoctor(id){
103
-        var name = ""
104
-        for(let i=0;i<this.doctorList.length;i++){
105
-          if(id == this.doctorList[i].admin_user_id){
106
-              name = this.doctorList[i].user_name
107
-          }
108
-        }
109
-        return name
110
-      },
111
-     getTime(value, temp) {
112
-        if (value != undefined) {
113
-            return uParseTime(value, temp)
114
-        }
115
-        return ''
116
-     },
117 166
 
118
-     getTeam(prescriptions){
119
-       console.log(prescriptions,'prescriptions')
120
-        let projectPrint = []
121
-        let total = 0
122
-        prescriptions.map(item => {
123
-          if(item.project.length > 0){
124
-              item.project.map(it => {
125
-                    if(it.type == 2){
126
-                        if(it.project.cost_classify == 3){
127
-                            projectPrint.push(it)
128
-                            total += (it.project.price*parseInt(it.count))
129
-                        }
130
-                    }
131
-              })
132
-          }
133
-        })
134
-        let data = []
135
-        projectPrint.map(item => {
136
-          if(item.team.id != 0){
137
-            let status = data.some(it => (it.team.id == item.team.id))
138
-            if(!status){
139
-              data.push(item)
140
-              console.log(data,'oodata')
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
+              }
141 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");
142 190
           }
143
-        })
144
-        this.total = total.toFixed(2)
145
-        this.projectPrint = data
146
-        return data
147
-     },
148
-
191
+        }
192
+      });
193
+      this.total = total.toFixed(2);
194
+      this.projectPrint = data;
195
+      return data;
196
+    },
149 197
 
150 198
     //  getSingleTeam(prescriptions){
151 199
     //     let projectPrint = []
@@ -172,293 +220,307 @@ export default {
172 220
     //     return data
173 221
     //  },
174 222
 
175
-     getInitData(){
176
-       getInitData().then(response=>{
177
-          if(response.data.state == 1){
178
-            this.department = response.data.data.department
179
-            this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
180
-          }
181
-       })
182
-     },
183
-     getDepart(id){
184
-         var name = ""
185
-       for(let i=0;i<this.department.length;i++){
186
-           if(id == this.department[i].id){
187
-               name = this.department[i].name
188
-           }
189
-       }
190
-       return name
191
-     },
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
+    },
192 240
     getTotalOne(id) {
193
-
194
-        var total = 0
195
-        var addtotal = 0
196
-        for (let i = 0; i < this.prescriptions.length; i++) {
197
-          if(id == this.prescriptions[i].id){
198
-            if (this.prescriptions[i].project != null) {
199
-              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
200
-                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
201
-              }
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;
202 251
             }
252
+          }
203 253
 
204
-            if (this.prescriptions[i].additionalcharge != null) {
205
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
206
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
207
-              }
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;
208 264
             }
209
-              addtotal =  Math.floor(addtotal * 100) / 100
265
+          }
266
+          addtotal = Math.floor(addtotal * 100) / 100;
210 267
         }
211
-
212
-       }
268
+      }
213 269
 
214 270
       for (let i = 0; i < this.prescriptions.length; i++) {
215
-          if(id == this.prescriptions[i].id){
216
-            if (this.prescriptions[i].advices != null) {
217
-              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
218
-                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
219
-              }
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;
220 278
             }
279
+          }
221 280
 
222
-            if (this.prescriptions[i].additionalcharge != null) {
223
-              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
224
-                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
225
-              }
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;
226 291
             }
227
-              addtotal =  Math.floor(addtotal * 100) / 100
292
+          }
293
+          addtotal = Math.floor(addtotal * 100) / 100;
228 294
         }
229
-       }
295
+      }
230 296
 
231
-        return total + addtotal
232
-      },
297
+      return total + addtotal;
298
+    },
233 299
 
234
-     getProjectName(id){
235
-        var project_name = ""
236
-        for(let i=0;i<this.projectList.length;i++){
237
-           if(id == this.projectList[i].id){
238
-               project_name = this.projectList[i].project_name
239
-           }
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;
240 305
         }
241
-        return project_name
242
-     },
306
+      }
307
+      return project_name;
308
+    },
243 309
 
244
-     getDiagnosis(ids){
245
-        let newIds = ids.split(',').sort(function(a,b){
246
-          return a-b;
247
-        })
310
+    getDiagnosis(ids) {
311
+      let newIds = ids.split(",").sort(function (a, b) {
312
+        return a - b;
313
+      });
248 314
 
249
-        let nameArr = []
250
-        for(let i=0;i<this.diagnoses.length;i++){
251
-          if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
252
-            // name += diagnoses[i].class_name + ' '
253
-            nameArr.push(this.diagnoses[i].class_name)
254
-          }
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);
255 320
         }
256
-        let newNameArr = []
257
-        nameArr.map((item,index) => {
258
-          if(item == '尿毒症'){
259
-            newNameArr.push(item)
260
-            nameArr.splice(index,1,'')
261
-          }
262
-        })
263
-        newNameArr.push(...nameArr)
264
-        return newNameArr.join(' ')
265
-     },
266
-     compare(property) {
267
-        return function(a,b){
268
-          var value1 = a[property];
269
-          var value2 = b[property];
270
-          return value1 - value2;//升序排序
321
+      }
322
+      let newNameArr = [];
323
+      nameArr.map((item, index) => {
324
+        if (item == "尿毒症") {
325
+          newNameArr.push(item);
326
+          nameArr.splice(index, 1, "");
271 327
         }
272
-      },
273
-     getPage(){
274
-        this.page = 1
275
-        this.pageArr = []
276
-
277
-        this.advicePrint.map(item => {
278
-          let arr = []
279
-          item.pageArr = []
280
-          if(item.advices.length <= 5){
281
-            this.page = 1
282
-            arr.push(item.advices.length)
283
-            item.pageArr.push(arr)
284
-
285
-          }else if(item.advices.length > 5){
286
-            this.page = parseInt(item.advices.length / 5)
287
-            let num = item.advices.length % 5
288
-            for (var i=0;i<this.page;i++){
289
-              item.pageArr.push([5])
290
-            }
291
-            if(num != 0){
292
-              item.pageArr.push([num])
293
-            }
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]);
294 355
           }
295
-        })
296
-        // console.log('this.pageArr',this.pageArr)
297
-      },
298
-      getName(list) {
299
-        console.log('list',list)
300
-        let new_list = []
301
-        for (let i = 0; i < list.length; i++) {
302
-          if (list[i].aac031 == '1') {
303
-            new_list.push(list[i])
356
+          if (num != 0) {
357
+            item.pageArr.push([num]);
304 358
           }
305 359
         }
306
-
307
-        switch (new_list[0].bcc334) {
308
-          case "A31001":
309
-            return "深圳医保1档"
310
-            break
311
-          case "A31002":
312
-            return "深圳医保2档"
313
-
314
-            break
315
-          case "A31003":
316
-            return "深圳医保3档"
317
-
318
-            break
319
-          case "A31004":
320
-            return "二档(少儿)"
321
-
322
-            break
323
-          case "A31005":
324
-            return "学生二档"
325
-
326
-            break
327
-          case "A31006":
328
-            return "大学生二档"
329
-
330
-            break
331
-          case "A32001":
332
-            return "在职公务员"
333
-            break
334
-          case "A32002":
335
-            return "在职驻深公务员"
336
-
337
-            break
338
-          case "A39301":
339
-            return "家属统筹医疗"
340
-
341
-            break
342
-          case "A41001":
343
-            return "工伤在职"
344
-
345
-            break
346
-          case "A51001":
347
-            return "生育在职"
348
-
349
-            break
350
-          case "A52001":
351
-            return "生育医疗一档"
352
-
353
-            break
354
-          case "A52002":
355
-            return "生育医疗一档"
356
-
357
-            break
358
-          case "C31001":
359
-            return "一档医疗退休"
360
-
361
-            break
362
-          case "C31002":
363
-            return "二档医疗退休"
364
-            break
365
-
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]);
366 369
         }
370
+      }
367 371
 
368
-
369
-
370
-      },
371
-
372
-   },
373
-   created(){
374
-      // this.getAllDoctorList()
375
-      this.getInitData()
376
-      // this.getPrescriptionPrint()
377
-      // this.getHisPatientDetail()
378
-      // this.getPatientCaseHistory()
379
-      var xtuser = this.$store.getters.xt_user;
380
-      this.orgname = xtuser.org.org_name;
381
-      this.org_id = this.$store.getters.xt_user.org_id
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>

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

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
     <div id='prescriptionPrint'>
3
-      <div v-for="(i,index) in printData">
4
-        <div id='prescription-print' class="prescription-print" v-for="(item,index) in i.prescriptions" :key="index">
3
+      <div v-for="(i,index) in printData" :key="index">
4
+        <div id='prescription-print' class="prescription-print" style="page-break-after: always;" v-for="(item,index) in i.prescriptions" :key="index">
5 5
 
6 6
             <div style="display:flex;justify-content: space-between;font-weight:bold;align-items:center;">
7 7
                 <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
@@ -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
 

+ 11 - 2
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

@@ -228,7 +228,16 @@ export default {
228 228
           style: style,
229 229
           scanStyles: false,
230 230
         });
231
-      } else {
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 {
232 241
         const style =
233 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: 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 243
         printJS({
@@ -238,6 +247,7 @@ export default {
238 247
           scanStyles: false,
239 248
         });
240 249
       }
250
+
241 251
       this.innerVisible = false;
242 252
       // this.$nextTick(() => {
243 253
       //   this.$refs.print.printThisPage()
@@ -328,7 +338,6 @@ export default {
328 338
     },
329 339
     batchPrint(type) {
330 340
       this.printType = type;
331
-      console.log(type, "oo");
332 341
       if (this.selecting_schs.length === 0) {
333 342
         this.$message.error("请至少选择一条需要打印的内容");
334 343
         return false;