see999 3 lat temu
rodzic
commit
aa8eaa37f2

+ 18 - 7
src/xt_pages/hospitalStation/doctorDesk.vue Wyświetl plik

@@ -410,14 +410,25 @@
410 410
         this.$refs.multipleTable3.toggleAllSelection()
411 411
       },
412 412
       printThisPage() {
413
-        const style =
413
+        if(this.org_id == 10138){
414
+          const style =
414 415
           '@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%;}}}'
415
-        printJS({
416
-          printable: 'printMain',
417
-          type: 'html',
418
-          style: style,
419
-          scanStyles: false
420
-        })
416
+          printJS({
417
+            printable: 'printMain',
418
+            type: 'html',
419
+            style: style,
420
+            scanStyles: false
421
+          })
422
+        }else{
423
+          const style =
424
+          '@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;}}'
425
+          printJS({
426
+            printable: 'printMain',
427
+            type: 'html',
428
+            style: style,
429
+            scanStyles: false
430
+          })
431
+        }
421 432
         this.innerVisible = false
422 433
         // this.$nextTick(() => {
423 434
         //   this.$refs.print.printThisPage()

+ 12 - 5
src/xt_pages/hospitalStation/print.vue Wyświetl plik

@@ -12,10 +12,11 @@
12 12
           >
13 13
         </template>
14 14
 
15
-        <div class='dialysisPage' style="padding-top:40px;">
15
+        <div class='dialysisPage'>
16 16
             <div v-if="org_id != 10138">
17
-                <printOne v-if="org_id != 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
-                <printFour v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
17
+                <printOne v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
+                <printFour v-if="org_id == 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
19
+                <printFive v-if="org_id == 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFive>
19 20
             </div>
20 21
             <div v-else>
21 22
                 <printThree v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printThree>
@@ -37,6 +38,7 @@
37 38
   import printOne from "./template/printOne"
38 39
   import printThree from "./template/printThree"
39 40
   import printFour from "./template/printFour"
41
+  import printFive from "./template/printFive"
40 42
   import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
41 43
   export default {
42 44
     name: "dialysisPrintOrder",
@@ -44,7 +46,8 @@
44 46
       BreadCrumb,
45 47
       printOne,
46 48
       printThree,
47
-      printFour
49
+      printFour,
50
+      printFive
48 51
     },
49 52
     props:{
50 53
       paramsObj:Object,
@@ -372,11 +375,15 @@
372 375
 </style>
373 376
 
374 377
 <style lang="scss">
375
-
378
+    .dialysisPage{
379
+      padding-top:40px;
380
+    }
376 381
     .newContainer{
377 382
     .dialysisPage::-webkit-scrollbar {
378 383
         height: 15px;
379 384
     }
385
+    
386
+    
380 387
 
381 388
     .el-date-editor{
382 389
     .el-input__inner{

+ 374 - 0
src/xt_pages/hospitalStation/template/printFive.vue Wyświetl plik

@@ -0,0 +1,374 @@
1
+<template>
2
+  <div id='prescriptionPrint'>
3
+    <div v-for="(item,index) in advicePrint" :key="index">
4
+      <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
5
+          <div class="printTitle" v-if="prescriptions[0].med_type == '1111'">{{orgname}}第一类精神处方笺</div>
6
+          <div class="printTitle"  v-if="prescriptions[0].med_type == '1112'">{{orgname}}第二类精神处方笺</div>
7
+          <div class="printTitle" v-if="prescriptions[0].med_type != '1111' && prescriptions[0].med_type != '1112'">{{orgname}}处方笺</div>
8
+          <div class="NoCell">
9
+              <div><span style="font-size:20px;font-weight:bold;">No</span><div class="underLine" style="width:120px;">{{ (item.prescription_number + (index + 1)).substring(item.prescription_number.length-6) }}</div></div>
10
+              <div style="display:flex;">
11
+                  <div style="display: flex;flex-direction: column-reverse;">开具日期</div>
12
+                  <div class="underLine" style="width:60px;">{{getTime(item.ctime)?getTime(item.ctime).split(' ')[0].slice(0,4):""}}</div><div style="display: flex;flex-direction: column-reverse;">年</div>
13
+                  <div class="underLine" style="width:60px;">{{getTime(item.ctime)?getTime(item.ctime).split(' ')[0].slice(5,7):""}}</div><div style="display: flex;flex-direction: column-reverse;">月</div>
14
+                  <div class="underLine" style="width:60px;">{{getTime(item.ctime)?getTime(item.ctime).split(' ')[0].slice(8,11):""}}</div><div style="display: flex;flex-direction: column-reverse;">日</div>
15
+              </div>
16
+          </div>
17
+          <div class="basicCell">
18
+              <span>透析号</span>
19
+              <span class="underLine" style="width:100px;">{{ item.patient.dialysis_no ? item.patient.dialysis_no : '' }}</span>
20
+              <span>治疗区</span>
21
+              <span class="underLine" style="width:100px;">{{item.info?getDepart(item.info.departments):''}}</span>
22
+              <span>费别</span>
23
+              <span class="underLine" style="width:100px;"></span>
24
+          </div>
25
+          <div class="basicCell">
26
+              <span>姓名</span>
27
+              <span class="underLine" style="width:100px;">{{item.patient.name?item.patient.name:""}}</span>
28
+              <span>性别</span>
29
+              <span class="underLine" style="width:60px;">
30
+                <span v-if="item.patient.gender == 1">男</span>
31
+                <span v-if="item.patient.gender == 2">女</span>
32
+              </span>
33
+              <span>年龄</span>
34
+              <span class="underLine" style="width:60px;">{{getAge(item.patient)?getAge(item.patient):""}}岁</span>
35
+              <span>电话</span>
36
+              <span class="underLine" style="width:120px;">{{item.patient.phone}}</span>
37
+          </div>
38
+          <div class="basicCell" style="margin-bottom:30px;">
39
+              <span>临床诊断</span>
40
+              <span class="underLine" style="width:100%;flex:1;text-align:left;padding-left:10px;">{{getDiagnosis(item.info.diagnosis)}}</span>
41
+          </div>
42
+          <div class="prescriptionBox" style="border-top: 1px solid #000;border-bottom: 1px solid #000;">
43
+              <div class="Rp">Rp:</div>
44
+              <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
45
+                  <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
46
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;<span v-if="it.drug.min_unit != it.drug.dose_unit">{{it.drug.dose}}{{it.drug.dose_unit}}&nbsp;* &nbsp;</span>{{it.drug.min_number}}{{it.drug.min_unit}}/{{it.drug.max_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
47
+                  <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
48
+              </div>
49
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
50
+                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
51
+               </div>
52
+
53
+              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
54
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.type == 2?getProjectName(it.project_id)?getProjectName(it.project_id):"":it.good_info.good_name}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
55
+                  <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
56
+              </div>
57
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
58
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
59
+               </div>
60
+               <div style="text-align:center;" >(以下空白)</div>
61
+
62
+          </div>
63
+          <div class="NoCell" style="margin-top:20px;">
64
+              <div style="display:flex;">
65
+                <span>医师</span>
66
+                <span class="underLine" style="width:100px;">{{item.doctor?item.doctor:""}}</span>
67
+              </div>
68
+              <div style="display:flex;">
69
+                <span>金额</span>
70
+                <span class="underLine" style="width:100px;">{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</span>
71
+              </div>
72
+          </div>
73
+          <div class="NoCell">
74
+              <div style="display:flex;">
75
+                <span>药师(审核、核对、发药)</span>
76
+                <span class="underLine" style="width:100px;"></span>
77
+              </div>
78
+              <div style="display:flex;">
79
+                <span>调配</span>
80
+                <span class="underLine" style="width:100px;"></span>
81
+              </div>
82
+          </div>
83
+          <div style="page-break-after:always"></div>
84
+      </div>
85
+    </div>
86
+
87
+  </div>
88
+
89
+
90
+</template>
91
+<script>
92
+import { jsGetAge, uParseTime } from '@/utils/tools'
93
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
94
+import {getInitData} from "@/api/his/his"
95
+export default {
96
+    props:{
97
+      patient_id:Number,
98
+      record_date:String,
99
+      prescription_id:Number,
100
+      ids:String
101
+    },
102
+    data(){
103
+      return {
104
+        doctorList:[],
105
+        advicePrint:{},
106
+        patient:{},
107
+        tableData:[],
108
+        prescriptionInfo:[],
109
+        hisPatient:{},
110
+        department:[],
111
+        prescriptions:[],
112
+        projectList:[],
113
+        orgname:"",
114
+        diagnoses:[],
115
+        org_id: 0
116
+      }
117
+    },
118
+   methods:{
119
+     getAge(patient){
120
+       var thisLen = patient.id_card_no.length
121
+       var birth = ''
122
+       if (thisLen == 15) {
123
+         birth = '19' + patient.id_card_no.substr(6, 6)
124
+       } else {
125
+         birth = patient.id_card_no.substr(6, 8)
126
+       }
127
+       var births =
128
+         birth.substr(0, 4) +
129
+         '-' +
130
+         birth.substr(4, 2) +
131
+         '-' +
132
+         birth.substr(6, 2)
133
+       return jsGetAge(births, '-')
134
+
135
+     },
136
+
137
+     getAllDoctorList(){
138
+      getAllDoctorList().then(response=>{
139
+        if(response.data.state == 1){
140
+               var doctor =  response.data.data.doctor
141
+
142
+               this.doctorList = doctor
143
+             }
144
+         })
145
+     },
146
+
147
+      getDoctor(id){
148
+        var name = ""
149
+        for(let i=0;i<this.doctorList.length;i++){
150
+          if(id == this.doctorList[i].admin_user_id){
151
+              name = this.doctorList[i].user_name
152
+          }
153
+        }
154
+        return name
155
+      },
156
+      getTime(value, temp) {
157
+        if (value != undefined) {
158
+            return uParseTime(value, temp)
159
+        }
160
+        return ''
161
+     },
162
+       getPrescriptionPrint(){
163
+         var params = {
164
+          // patient_id:this.patient_id,
165
+          // record_date:this.record_date,
166
+          // prescription_id:this.prescription_id,
167
+          patient_id:this.patient_id,
168
+          record_date:this.record_date,
169
+          prescription_id:this.prescription_id,
170
+          ids:this.ids
171
+        }
172
+        console.log("params",params)
173
+       getPrescriptionPrint(params).then(response=>{
174
+         if(response.data.state == 1){
175
+            var advicePrint =  response.data.data.advicePrint
176
+            console.log("adviceprint9999",advicePrint)
177
+            this.advicePrint = advicePrint
178
+            this.prescriptions = advicePrint
179
+            console.log("处方222222",this.prescriptions)
180
+            var hisPatient = response.data.data.hisPatient
181
+            console.log("hisPatient",hisPatient)
182
+            this.hisPatient = hisPatient
183
+            var projectlist =  response.data.data.projectlist
184
+            console.log("所有项目列表",projectlist)
185
+            this.projectList = projectlist
186
+          }
187
+       })
188
+     },
189
+     getHisPatientDetail(){
190
+          const params = {
191
+              patient_id:this.patient_id
192
+          }
193
+       getHisPatientDetail(params).then(response=>{
194
+          if(response.data.state == 1){
195
+             var hisPatient =  response.data.data.hisPatient
196
+             console.log("挂号病人",hisPatient)
197
+             this.hisPatient = hisPatient
198
+          }
199
+       })
200
+     },
201
+     getInitData(){
202
+       getInitData().then(response=>{
203
+          if(response.data.state == 1){
204
+            this.department = response.data.data.department
205
+            this.diagnoses = response.data.data.diagnose
206
+            console.log("争端",this.diagnoses)
207
+          }
208
+       })
209
+     },
210
+     getDepart(id){
211
+         var name = ""
212
+       for(let i=0;i<this.department.length;i++){
213
+           if(id == this.department[i].id){
214
+               name = this.department[i].name
215
+           }
216
+       }
217
+       return name
218
+     },
219
+    getTotalOne(id) {
220
+
221
+        var total = 0
222
+        var addtotal = 0
223
+        for (let i = 0; i < this.prescriptions.length; i++) {
224
+          if(id == this.prescriptions[i].id){
225
+            if (this.prescriptions[i].project != null) {
226
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
227
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
228
+              }
229
+            }
230
+
231
+            if (this.prescriptions[i].additionalcharge != null) {
232
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
233
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
234
+              }
235
+            }
236
+              addtotal =  Math.floor(addtotal * 100) / 100
237
+        }
238
+
239
+       }
240
+
241
+      for (let i = 0; i < this.prescriptions.length; i++) {
242
+          if(id == this.prescriptions[i].id){
243
+            if (this.prescriptions[i].advices != null) {
244
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
245
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
246
+              }
247
+            }
248
+
249
+            if (this.prescriptions[i].additionalcharge != null) {
250
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
251
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
252
+              }
253
+            }
254
+              addtotal =  Math.floor(addtotal * 100) / 100
255
+        }
256
+       }
257
+
258
+        return total + addtotal
259
+      },
260
+
261
+     getProjectName(id){
262
+        var project_name = ""
263
+        for(let i=0;i<this.projectList.length;i++){
264
+           if(id == this.projectList[i].id){
265
+               project_name = this.projectList[i].project_name
266
+           }
267
+        }
268
+        return project_name
269
+     },
270
+
271
+     getDiagnosis(id){
272
+        var name = ""
273
+        for(let i=0;i<this.diagnoses.length;i++){
274
+          if(id == this.diagnoses[i].id){
275
+             name = this.diagnoses[i].class_name
276
+          }
277
+        }
278
+        return name
279
+     }
280
+
281
+   },
282
+   created(){
283
+      this.getAllDoctorList()
284
+      this.getInitData()
285
+      this.getPrescriptionPrint()
286
+      this.getHisPatientDetail()
287
+      var xtuser = this.$store.getters.xt_user;
288
+      this.orgname = xtuser.org.org_name;
289
+      this.org_id = xtuser.org.id
290
+   },
291
+   watch:{
292
+     ids:function(val){
293
+      this.ids = val
294
+      this.getPrescriptionPrint()
295
+    }
296
+   }
297
+}
298
+</script>
299
+
300
+
301
+<style lang="scss" scoped>
302
+.prescription-print{
303
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
304
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
305
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
306
+    margin-bottom: 20px;
307
+    padding:20px 10px;
308
+}
309
+.printTitle{
310
+    font-size: 22px;
311
+    text-align: center;
312
+    font-weight: bold;
313
+}
314
+.infoTitle{
315
+    display: flex;
316
+    border-bottom: 2px solid #000;
317
+    margin-top:10px;
318
+    line-height: 24px;
319
+    padding:0 10px;
320
+}
321
+.infoTitle p{
322
+    width: 200px;
323
+}
324
+.infoMain{
325
+    display: flex;
326
+    flex-wrap: wrap;
327
+    border-bottom: 2px solid #000;
328
+    padding:0 10px;
329
+}
330
+.infoMain div{
331
+    width: 50%;
332
+    line-height: 24px;
333
+}
334
+.prescriptionBox{
335
+    padding:0 10px;
336
+    min-height:450px;
337
+}
338
+.Rp{
339
+    font-size: 22px;
340
+    font-weight: bold;
341
+}
342
+.drugsBox{
343
+    padding-left: 40px;
344
+    margin-bottom: 10px;
345
+}
346
+.drugsBox div{
347
+    line-height: 20px;
348
+}
349
+.drugsOne{
350
+    line-height: 24px;
351
+}
352
+.drugsOne span{
353
+    margin-right: 20px;
354
+}
355
+.doctorBox{
356
+    display: flex;
357
+    justify-content: space-between;
358
+    padding:0 10px;
359
+    line-height: 24px;
360
+    border-bottom: 2px solid #000;
361
+}
362
+.actionBar{
363
+    display: flex;
364
+    justify-content: space-between;
365
+    line-height: 24px;
366
+    padding:0 10px;
367
+}
368
+.actionBar p{
369
+    width:150px;
370
+}
371
+.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}
372
+.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}
373
+.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}
374
+</style>

+ 18 - 18
src/xt_pages/outpatientCharges/components/prescriptionTable.vue Wyświetl plik

@@ -3,8 +3,8 @@
3 3
     <el-table v-if="prescription.type == 1" :data="prescription.advices" border style="width: 99%;"
4 4
               :row-style="{ color: '#303133' }"
5 5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
-      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7
-      <el-table-column align="center" prop="name" label="名称">
6
+      <el-table-column fixed align="center" type="index" width="40" label="序号"></el-table-column>
7
+      <el-table-column fixed align="center" prop="name" label="名称">
8 8
         <template slot-scope="scope"><span :title='scope.row.drug_name'>{{ scope.row.drug_name }}</span></template>
9 9
       </el-table-column>
10 10
 
@@ -48,14 +48,14 @@
48 48
       </el-table-column>
49 49
 
50 50
 
51
-      <el-table-column align="center" prop="name" width="60" label="医保编码">
51
+      <el-table-column align="center" prop="name" width="120" label="医保编码">
52 52
         <template slot-scope="scope">
53 53
           <div> {{scope.row.code}}</div>
54 54
         </template>
55 55
       </el-table-column>
56 56
 
57 57
 
58
-      <el-table-column align="center" prop="name" width="60" label="规格/型号">
58
+      <el-table-column align="center" prop="name" width="80" label="规格/型号">
59 59
         <template slot-scope="scope">
60 60
           <div> {{scope.row.spec}}</div>
61 61
         </template>
@@ -68,7 +68,7 @@
68 68
       </el-table-column>
69 69
 
70 70
 
71
-      <el-table-column align="center" prop="name" width="60" label="生产厂家">
71
+      <el-table-column align="center" prop="name" width="120" label="生产厂家">
72 72
         <template slot-scope="scope">
73 73
           <div> {{getName(scope.row.name_id)}}</div>
74 74
         </template>
@@ -76,7 +76,7 @@
76 76
 
77 77
 
78 78
 
79
-      <el-table-column align="center" prop="name" width="60" label="全自费金额">
79
+      <el-table-column align="center" prop="name" width="90" label="全自费金额">
80 80
         <template slot-scope="scope">
81 81
           <div> {{scope.row.fulamt_ownpay_amt}}元</div>
82 82
         </template>
@@ -84,21 +84,21 @@
84 84
 
85 85
 
86 86
 
87
-      <el-table-column align="center" prop="name" width="60" label="超限价金额">
87
+      <el-table-column align="center" prop="name" width="90" label="超限价金额">
88 88
         <template slot-scope="scope">
89 89
           <div> {{scope.row.overlmt_amt}}元</div>
90 90
         </template>
91 91
       </el-table-column>
92 92
 
93 93
 
94
-      <el-table-column align="center" prop="name" width="60" label="先行自付金额">
94
+      <el-table-column align="center" prop="name" width="90" label="先行自付金额">
95 95
         <template slot-scope="scope">
96 96
           <div> {{scope.row.preselfpay_amt}}元</div>
97 97
         </template>
98 98
       </el-table-column>
99 99
 
100 100
 
101
-      <el-table-column align="center" prop="name" width="60" label="符合正常范围金额">
101
+      <el-table-column align="center" prop="name" width="90" label="符合正常范围金额">
102 102
         <template slot-scope="scope">
103 103
           <div> {{scope.row.inscp_scp_amt}}元</div>
104 104
         </template>
@@ -120,8 +120,8 @@
120 120
     <el-table v-if="prescription.type == 2" :data="prescription.project" border style="width: 99%;"
121 121
               :row-style="{ color: '#303133' }"
122 122
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
123
-      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
124
-      <el-table-column align="center" prop="project_name" label="名称">
123
+      <el-table-column fixed align="center" type="index" width="40" label="序号"></el-table-column>
124
+      <el-table-column fixed align="center" prop="project_name" label="名称">
125 125
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
126 126
       </el-table-column>
127 127
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
@@ -152,14 +152,14 @@
152 152
 
153 153
 
154 154
 
155
-      <el-table-column align="center" prop="name" width="60" label="医保编码">
155
+      <el-table-column align="center" prop="name" width="120" label="医保编码">
156 156
         <template slot-scope="scope">
157 157
           <div> {{scope.row.medical_code}}</div>
158 158
         </template>
159 159
       </el-table-column>
160 160
 
161 161
 
162
-      <el-table-column align="center" prop="name" width="60" label="规格/型号">
162
+      <el-table-column align="center" prop="name" width="80" label="规格/型号">
163 163
         <template slot-scope="scope">
164 164
           <div> {{scope.row.spec}}</div>
165 165
         </template>
@@ -172,7 +172,7 @@
172 172
       </el-table-column>
173 173
 
174 174
 
175
-      <el-table-column align="center" prop="name" width="60" label="生产厂家">
175
+      <el-table-column align="center" prop="name" width="120" label="生产厂家">
176 176
         <template slot-scope="scope">
177 177
           <div> {{getName(scope.row.name_id)}}</div>
178 178
         </template>
@@ -180,7 +180,7 @@
180 180
 
181 181
 
182 182
 
183
-      <el-table-column align="center" prop="name" width="60" label="全自费金额">
183
+      <el-table-column align="center" prop="name" width="90" label="全自费金额">
184 184
         <template slot-scope="scope">
185 185
           <div> {{scope.row.fulamt_ownpay_amt}}元</div>
186 186
         </template>
@@ -188,21 +188,21 @@
188 188
 
189 189
 
190 190
 
191
-      <el-table-column align="center" prop="name" width="60" label="超限价金额">
191
+      <el-table-column align="center" prop="name" width="90" label="超限价金额">
192 192
         <template slot-scope="scope">
193 193
           <div> {{scope.row.overlmt_amt}}元</div>
194 194
         </template>
195 195
       </el-table-column>
196 196
 
197 197
 
198
-      <el-table-column align="center" prop="name" width="60" label="先行自付金额">
198
+      <el-table-column align="center" prop="name" width="90" label="先行自付金额">
199 199
         <template slot-scope="scope">
200 200
           <div> {{scope.row.preselfpay_amt}}元</div>
201 201
         </template>
202 202
       </el-table-column>
203 203
 
204 204
 
205
-      <el-table-column align="center" prop="name" width="60" label="符合正常范围金额">
205
+      <el-table-column align="center" prop="name" width="90" label="符合正常范围金额">
206 206
         <template slot-scope="scope">
207 207
           <div> {{scope.row.inscp_scp_amt}}元</div>
208 208
         </template>

+ 4 - 1
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue Wyświetl plik

@@ -4238,7 +4238,7 @@
4238 4238
 
4239 4239
     .settlementTabs {
4240 4240
         flex: 1;
4241
-
4241
+        width: 100%;
4242 4242
     .el-tab-pane {
4243 4243
         height: 100%;
4244 4244
     }
@@ -4322,5 +4322,8 @@
4322 4322
     }
4323 4323
 
4324 4324
     }
4325
+    ::-webkit-scrollbar {
4326
+      height: 20px;
4327
+    }
4325 4328
 </style>
4326 4329
 

+ 1 - 1
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Wyświetl plik

@@ -453,7 +453,7 @@
453 453
           })
454 454
         }else{
455 455
           const style =
456
-          '@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;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;}}'
456
+          '@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;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;}}'
457 457
           printJS({
458 458
             printable: 'printMain',
459 459
             type: 'html',

+ 6 - 3
src/xt_pages/outpatientDoctorStation/print.vue Wyświetl plik

@@ -14,8 +14,9 @@
14 14
 
15 15
     <div class='dialysisPage' style="padding-top:40px;">
16 16
       <div v-if="org_id != 10138">
17
-        <printOne v-if="org_id != 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
-        <printFour v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
17
+        <printOne v-if="org_id != 10088 && org_id != 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
+        <printFour v-if="org_id == 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
19
+        <printFive v-if="org_id == 10215" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFive>
19 20
       </div>
20 21
       <div v-else>
21 22
         <printThree v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printThree>
@@ -37,6 +38,7 @@ import print from "print-js";
37 38
 import printOne from "./template/printOne"
38 39
 import printThree from "./template/printThree"
39 40
 import printFour from "./template/printFour"
41
+import printFive from "./template/printFive"
40 42
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
41 43
 export default {
42 44
   name: "dialysisPrintOrder",
@@ -44,7 +46,8 @@ export default {
44 46
     BreadCrumb,
45 47
     printOne,
46 48
     printThree,
47
-    printFour
49
+    printFour,
50
+    printFive
48 51
   },
49 52
   props:{
50 53
     paramsObj:Object

+ 374 - 0
src/xt_pages/outpatientDoctorStation/template/printFive.vue Wyświetl plik

@@ -0,0 +1,374 @@
1
+<template>
2
+  <div id='prescriptionPrint'>
3
+    <div v-for="(item,index) in advicePrint" :key="index">
4
+      <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
5
+          <div class="printTitle" v-if="prescriptions[0].med_type == '1111'">{{orgname}}第一类精神处方笺</div>
6
+          <div class="printTitle"  v-if="prescriptions[0].med_type == '1112'">{{orgname}}第二类精神处方笺</div>
7
+          <div class="printTitle" v-if="prescriptions[0].med_type != '1111' && prescriptions[0].med_type != '1112'">{{orgname}}处方笺</div>
8
+          <div class="NoCell">
9
+              <div><span style="font-size:20px;font-weight:bold;">No</span><div class="underLine" style="width:120px;"></div></div>
10
+              <div style="display:flex;">
11
+                  <div style="display: flex;flex-direction: column-reverse;">开具日期</div>
12
+                  <div class="underLine" style="width:60px;">{{getTime(item.ctime)?getTime(item.ctime).split(' ')[0].slice(0,4):""}}</div><div style="display: flex;flex-direction: column-reverse;">年</div>
13
+                  <div class="underLine" style="width:60px;">{{getTime(item.ctime)?getTime(item.ctime).split(' ')[0].slice(5,7):""}}</div><div style="display: flex;flex-direction: column-reverse;">月</div>
14
+                  <div class="underLine" style="width:60px;">{{getTime(item.ctime)?getTime(item.ctime).split(' ')[0].slice(8,11):""}}</div><div style="display: flex;flex-direction: column-reverse;">日</div>
15
+              </div>
16
+          </div>
17
+          <div class="basicCell">
18
+              <span>透析号</span>
19
+              <span class="underLine" style="width:100px;">{{ item.patient.dialysis_no ? item.patient.dialysis_no : '' }}</span>
20
+              <span>治疗区</span>
21
+              <span class="underLine" style="width:100px;">{{item.info?getDepart(item.info.departments):''}}</span>
22
+              <span>费别</span>
23
+              <span class="underLine" style="width:100px;"></span>
24
+          </div>
25
+          <div class="basicCell">
26
+              <span>姓名</span>
27
+              <span class="underLine" style="width:100px;">{{item.patient.name?item.patient.name:""}}</span>
28
+              <span>性别</span>
29
+              <span class="underLine" style="width:60px;">
30
+                <span v-if="item.patient.gender == 1">男</span>
31
+                <span v-if="item.patient.gender == 2">女</span>
32
+              </span>
33
+              <span>年龄</span>
34
+              <span class="underLine" style="width:60px;">{{getAge(item.patient)?getAge(item.patient):""}}岁</span>
35
+              <span>电话</span>
36
+              <span class="underLine" style="width:120px;">{{item.patient.phone}}</span>
37
+          </div>
38
+          <div class="basicCell" style="margin-bottom:30px;">
39
+              <span>临床诊断</span>
40
+              <span class="underLine" style="width:100%;flex:1;text-align:left;padding-left:10px;">{{getDiagnosis(item.info.diagnosis)}}</span>
41
+          </div>
42
+          <div class="prescriptionBox" style="border-top: 1px solid #000;border-bottom: 1px solid #000;">
43
+              <div class="Rp">Rp:</div>
44
+              <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
45
+                  <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
46
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;<span v-if="it.drug.min_unit != it.drug.dose_unit">{{it.drug.dose}}{{it.drug.dose_unit}}&nbsp;* &nbsp;</span>{{it.drug.min_number}}{{it.drug.min_unit}}/{{it.drug.max_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
47
+                  <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.execution_frequency}}&nbsp;{{it.delivery_way}}&nbsp;</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
48
+              </div>
49
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
50
+                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
51
+               </div>
52
+
53
+              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
54
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.type == 2?getProjectName(it.project_id)?getProjectName(it.project_id):"":it.good_info.good_name}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
55
+                  <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
56
+              </div>
57
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
58
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
59
+               </div>
60
+               <div style="text-align:center;" >(以下空白)</div>
61
+
62
+          </div>
63
+          <div class="NoCell" style="margin-top:20px;">
64
+              <div style="display:flex;">
65
+                <span>医师</span>
66
+                <span class="underLine" style="width:100px;">{{item.doctor?item.doctor:""}}</span>
67
+              </div>
68
+              <div style="display:flex;">
69
+                <span>金额</span>
70
+                <span class="underLine" style="width:100px;">{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</span>
71
+              </div>
72
+          </div>
73
+          <div class="NoCell">
74
+              <div style="display:flex;">
75
+                <span>药师(审核、核对、发药)</span>
76
+                <span class="underLine" style="width:100px;"></span>
77
+              </div>
78
+              <div style="display:flex;">
79
+                <span>调配</span>
80
+                <span class="underLine" style="width:100px;"></span>
81
+              </div>
82
+          </div>
83
+          <div style="page-break-after:always"></div>
84
+      </div>
85
+    </div>
86
+
87
+  </div>
88
+
89
+
90
+</template>
91
+<script>
92
+import { jsGetAge, uParseTime } from '@/utils/tools'
93
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
94
+import {getInitData} from "@/api/his/his"
95
+export default {
96
+    props:{
97
+      patient_id:Number,
98
+      record_date:String,
99
+      prescription_id:Number,
100
+      ids:String
101
+    },
102
+    data(){
103
+      return {
104
+        doctorList:[],
105
+        advicePrint:{},
106
+        patient:{},
107
+        tableData:[],
108
+        prescriptionInfo:[],
109
+        hisPatient:{},
110
+        department:[],
111
+        prescriptions:[],
112
+        projectList:[],
113
+        orgname:"",
114
+        diagnoses:[],
115
+        org_id: 0
116
+      }
117
+    },
118
+   methods:{
119
+     getAge(patient){
120
+       var thisLen = patient.id_card_no.length
121
+       var birth = ''
122
+       if (thisLen == 15) {
123
+         birth = '19' + patient.id_card_no.substr(6, 6)
124
+       } else {
125
+         birth = patient.id_card_no.substr(6, 8)
126
+       }
127
+       var births =
128
+         birth.substr(0, 4) +
129
+         '-' +
130
+         birth.substr(4, 2) +
131
+         '-' +
132
+         birth.substr(6, 2)
133
+       return jsGetAge(births, '-')
134
+
135
+     },
136
+
137
+     getAllDoctorList(){
138
+      getAllDoctorList().then(response=>{
139
+        if(response.data.state == 1){
140
+               var doctor =  response.data.data.doctor
141
+
142
+               this.doctorList = doctor
143
+             }
144
+         })
145
+     },
146
+
147
+      getDoctor(id){
148
+        var name = ""
149
+        for(let i=0;i<this.doctorList.length;i++){
150
+          if(id == this.doctorList[i].admin_user_id){
151
+              name = this.doctorList[i].user_name
152
+          }
153
+        }
154
+        return name
155
+      },
156
+      getTime(value, temp) {
157
+        if (value != undefined) {
158
+            return uParseTime(value, temp)
159
+        }
160
+        return ''
161
+     },
162
+       getPrescriptionPrint(){
163
+         var params = {
164
+          // patient_id:this.patient_id,
165
+          // record_date:this.record_date,
166
+          // prescription_id:this.prescription_id,
167
+          patient_id:this.patient_id,
168
+          record_date:this.record_date,
169
+          prescription_id:this.prescription_id,
170
+          ids:this.ids
171
+        }
172
+        console.log("params",params)
173
+       getPrescriptionPrint(params).then(response=>{
174
+         if(response.data.state == 1){
175
+            var advicePrint =  response.data.data.advicePrint
176
+            console.log("adviceprint9999",advicePrint)
177
+            this.advicePrint = advicePrint
178
+            this.prescriptions = advicePrint
179
+            console.log("处方222222",this.prescriptions)
180
+            var hisPatient = response.data.data.hisPatient
181
+            console.log("hisPatient",hisPatient)
182
+            this.hisPatient = hisPatient
183
+            var projectlist =  response.data.data.projectlist
184
+            console.log("所有项目列表",projectlist)
185
+            this.projectList = projectlist
186
+          }
187
+       })
188
+     },
189
+     getHisPatientDetail(){
190
+          const params = {
191
+              patient_id:this.patient_id
192
+          }
193
+       getHisPatientDetail(params).then(response=>{
194
+          if(response.data.state == 1){
195
+             var hisPatient =  response.data.data.hisPatient
196
+             console.log("挂号病人",hisPatient)
197
+             this.hisPatient = hisPatient
198
+          }
199
+       })
200
+     },
201
+     getInitData(){
202
+       getInitData().then(response=>{
203
+          if(response.data.state == 1){
204
+            this.department = response.data.data.department
205
+            this.diagnoses = response.data.data.diagnose
206
+            console.log("争端",this.diagnoses)
207
+          }
208
+       })
209
+     },
210
+     getDepart(id){
211
+         var name = ""
212
+       for(let i=0;i<this.department.length;i++){
213
+           if(id == this.department[i].id){
214
+               name = this.department[i].name
215
+           }
216
+       }
217
+       return name
218
+     },
219
+    getTotalOne(id) {
220
+
221
+        var total = 0
222
+        var addtotal = 0
223
+        for (let i = 0; i < this.prescriptions.length; i++) {
224
+          if(id == this.prescriptions[i].id){
225
+            if (this.prescriptions[i].project != null) {
226
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
227
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
228
+              }
229
+            }
230
+
231
+            if (this.prescriptions[i].additionalcharge != null) {
232
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
233
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
234
+              }
235
+            }
236
+              addtotal =  Math.floor(addtotal * 100) / 100
237
+        }
238
+
239
+       }
240
+
241
+      for (let i = 0; i < this.prescriptions.length; i++) {
242
+          if(id == this.prescriptions[i].id){
243
+            if (this.prescriptions[i].advices != null) {
244
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
245
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
246
+              }
247
+            }
248
+
249
+            if (this.prescriptions[i].additionalcharge != null) {
250
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
251
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
252
+              }
253
+            }
254
+              addtotal =  Math.floor(addtotal * 100) / 100
255
+        }
256
+       }
257
+
258
+        return total + addtotal
259
+      },
260
+
261
+     getProjectName(id){
262
+        var project_name = ""
263
+        for(let i=0;i<this.projectList.length;i++){
264
+           if(id == this.projectList[i].id){
265
+               project_name = this.projectList[i].project_name
266
+           }
267
+        }
268
+        return project_name
269
+     },
270
+
271
+     getDiagnosis(id){
272
+        var name = ""
273
+        for(let i=0;i<this.diagnoses.length;i++){
274
+          if(id == this.diagnoses[i].id){
275
+             name = this.diagnoses[i].class_name
276
+          }
277
+        }
278
+        return name
279
+     }
280
+
281
+   },
282
+   created(){
283
+      this.getAllDoctorList()
284
+      this.getInitData()
285
+      this.getPrescriptionPrint()
286
+      this.getHisPatientDetail()
287
+      var xtuser = this.$store.getters.xt_user;
288
+      this.orgname = xtuser.org.org_name;
289
+      this.org_id = xtuser.org.id
290
+   },
291
+   watch:{
292
+     ids:function(val){
293
+      this.ids = val
294
+      this.getPrescriptionPrint()
295
+    }
296
+   }
297
+}
298
+</script>
299
+
300
+
301
+<style lang="scss" scoped>
302
+.prescription-print{
303
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
304
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
305
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
306
+    margin-bottom: 20px;
307
+    padding:20px 10px;
308
+}
309
+.printTitle{
310
+    font-size: 22px;
311
+    text-align: center;
312
+    font-weight: bold;
313
+}
314
+.infoTitle{
315
+    display: flex;
316
+    border-bottom: 2px solid #000;
317
+    margin-top:10px;
318
+    line-height: 24px;
319
+    padding:0 10px;
320
+}
321
+.infoTitle p{
322
+    width: 200px;
323
+}
324
+.infoMain{
325
+    display: flex;
326
+    flex-wrap: wrap;
327
+    border-bottom: 2px solid #000;
328
+    padding:0 10px;
329
+}
330
+.infoMain div{
331
+    width: 50%;
332
+    line-height: 24px;
333
+}
334
+.prescriptionBox{
335
+    padding:0 10px;
336
+    min-height:450px;
337
+}
338
+.Rp{
339
+    font-size: 22px;
340
+    font-weight: bold;
341
+}
342
+.drugsBox{
343
+    padding-left: 40px;
344
+    margin-bottom: 10px;
345
+}
346
+.drugsBox div{
347
+    line-height: 20px;
348
+}
349
+.drugsOne{
350
+    line-height: 24px;
351
+}
352
+.drugsOne span{
353
+    margin-right: 20px;
354
+}
355
+.doctorBox{
356
+    display: flex;
357
+    justify-content: space-between;
358
+    padding:0 10px;
359
+    line-height: 24px;
360
+    border-bottom: 2px solid #000;
361
+}
362
+.actionBar{
363
+    display: flex;
364
+    justify-content: space-between;
365
+    line-height: 24px;
366
+    padding:0 10px;
367
+}
368
+.actionBar p{
369
+    width:150px;
370
+}
371
+.NoCell{display: flex;justify-content: space-between;margin-bottom: 10px;}
372
+.underLine{display: inline-block;border-bottom: 1px solid #000;text-align: center;line-height: 24px;}
373
+.basicCell{display: flex;} .basicCell span{line-height: 24px;margin-bottom: 10px;}
374
+</style>