Quellcode durchsuchen

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

csx vor 3 Jahren
Ursprung
Commit
6358a77250

+ 2 - 2
src/xt_pages/hospitalStation/doctorDesk.vue Datei anzeigen

@@ -403,7 +403,7 @@
403 403
       },
404 404
       openPrint() {
405 405
         // this.centerDialogVisible = true
406
-        this.getPrescriptionList(this.patientInfo.id, this.record_date)
406
+        this.getPrescriptionList(this.patientInfo.id,this.record_date)
407 407
       },
408 408
       allCheck() {
409 409
         this.$refs.multipleTable1.toggleAllSelection()
@@ -4010,7 +4010,7 @@
4010 4010
       },
4011 4011
 
4012 4012
       getPrescriptionList(id, record_date, type, checkType) {
4013
-        getPrescriptionList(id, 2, record_date).then(response => {
4013
+        getPrescriptionList(id, 1, record_date).then(response => {
4014 4014
           if (response.data.state == 1) {
4015 4015
             if (checkType != 3) {
4016 4016
               this.centerDialogVisible = true

+ 17 - 0
src/xt_pages/hospitalStation/outpatientChargesManagement.vue Datei anzeigen

@@ -6,6 +6,20 @@
6 6
         <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
7 7
             <div class="mainLeft">
8 8
 
9
+                <el-date-picker
10
+                        v-model="record_date"
11
+                        prefix-icon="el-icon-date"
12
+                        @change="changeTimeTwo"
13
+                        :editable="false"
14
+                        style="width: 100%;"
15
+                        type="date"
16
+                        :picker-options="pickerOptions"
17
+                        placeholder="选择开始时间"
18
+                        align="right"
19
+                        format="yyyy-MM-dd"
20
+                        value-format="yyyy-MM-dd">
21
+                </el-date-picker>
22
+
9 23
                 <!-- <div class="mainCell" style="justify-content: space-between;font-size:14px;">
10 24
                  <p >未收费:<span style="color: red">{{cal_one}}</span>人</p>
11 25
                  <p>已收费:<span  style="color: red">{{cal_two}}</span>人</p>
@@ -542,6 +556,9 @@
542 556
       this.getPatientList()
543 557
     },
544 558
     methods: {
559
+      changeTimeTwo() {
560
+        this.getPatientList()
561
+      },
545 562
       query() {
546 563
         if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
547 564
           var that = this

Datei-Diff unterdrückt, da er zu groß ist
+ 339 - 1131
src/xt_pages/hospitalStation/print.vue


+ 347 - 0
src/xt_pages/hospitalStation/template/printFour.vue Datei anzeigen

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

+ 277 - 37
src/xt_pages/hospitalStation/template/printOne.vue Datei anzeigen

@@ -1,47 +1,287 @@
1 1
 <template>
2
-    <div id='prescription-print' class="prescription-print">
3
-        <div class="printTitle">血液透析中心处方笺</div>
4
-        <div class="infoTitle">
5
-            <p>姓名:阿萨德</p>
6
-            <p>性别:男</p>
7
-            <p>年龄:12岁</p>
8
-        </div>
9
-        <div class="infoMain">
10
-            <div style="margin-bottom: 10px;">门诊号:111111111111</div>
11
-            <div style="margin-bottom: 10px;">科室:全科</div>
12
-            <div style="margin-bottom: 10px;">医保卡号:111111111111</div>
13
-            <div style="margin-bottom: 10px;">电话:111111111111</div>
14
-            <div>地址:加上来看待就卢萨卡的及拉丝机的了</div>
15
-            <div>临床诊断:拉胯手机上的拉丝机的</div>
16
-        </div>
17
-        <div class="prescriptionBox">
18
-            <div class="Rp">Rp:</div>
19
-            <div class="drugsBox">
20
-                <div class="drugsOne">重组人促红素(CHO细胞)注射液&nbsp;&nbsp;0.5毫升&nbsp;×&nbsp; 2支</div>
21
-                <div style="margin-left:100px;"><span>用法:0.5毫升</span>&nbsp;&nbsp;<span>一天一次</span>&nbsp;&nbsp;<span>静脉注射</span></div>
22
-            </div>
23
-            <div class="drugsBox">
24
-                <div class="drugsOne">重组人促红素(CHO细胞)注射液&nbsp;&nbsp;0.5毫升&nbsp;×&nbsp; 2支</div>
25
-                <div style="margin-left:100px;"><span>用法:0.5毫升</span>&nbsp;&nbsp;<span>一天一次</span>&nbsp;&nbsp;<span>静脉注射</span></div>
26
-            </div>
27
-        </div>
28
-        <div class="doctorBox">
29
-            <p>医师:高华</p>
30
-            <p>日期:2020-11-14 09:12:32</p>
31
-        </div>
32
-        <div class="actionBar">
33
-            <p>审核:</p>
34
-            <p>配对:</p>
35
-            <p>核对:</p>
36
-            <p>发药:</p>
37
-            <p>药费:</p>
38
-        </div> b
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">{{orgname}}处方笺</div>
6
+          <div class="infoTitle">
7
+              <p>姓名:{{item.patient.name?item.patient.name:""}}</p>
8
+              <p>性别:
9
+                <span v-if="item.patient.gender == 1">男</span>
10
+                <span v-if="item.patient.gender == 2">女</span>
11
+              </p>
12
+              <p>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</p>
13
+          </div>
14
+          <div class="infoMain">
15
+              <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
16
+              <div style="margin-bottom: 10px;">科室:{{item.info?getDepart(item.info.departments):''}}</div>
17
+              <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
18
+              <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
19
+              <div>地址:{{item.patient.home_address}}</div>
20
+              <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
21
+          </div>
22
+          <div class="prescriptionBox">
23
+              <div class="Rp">Rp:</div>
24
+              <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
25
+                  <!-- <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> -->
26
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.drug.drug_spec}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div>
27
+                  <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>
28
+              </div>
29
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
30
+                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
31
+               </div>
32
+
33
+              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
34
+                  <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>
35
+                  <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>
36
+              </div>
37
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
38
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
39
+               </div>
40
+               <div style="text-align:center;" >(以下空白)</div>
41
+
42
+          </div>
43
+          <div class="doctorBox">
44
+              <p>医师:{{item.doctor?item.doctor:""}}</p>
45
+              <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
46
+          </div>
47
+          <div class="actionBar">
48
+                 <!-- <p>审核:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
49
+                 <p>配对:</p>
50
+                 <p>核对:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</p>
51
+                 <p>发药:{{getDoctor(item.advices[0].execution_staff)?getDoctor(item.advices[0].execution_staff):""}}</p>
52
+                 <p>药费:{{getTotalOne(item.id)?getTotalOne(item.id):0}}元</p> -->
53
+
54
+                 <p>审核:</p>
55
+                 <p>配对:</p>
56
+                 <p>核对:</p>
57
+                 <p>发药:</p>
58
+                 <p>药费:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</p>
59
+          </div>
60
+          <div style="page-break-after:always"></div>
61
+      </div>
39 62
     </div>
63
+
64
+  </div>
65
+
66
+
40 67
 </template>
68
+<script>
69
+import { jsGetAge, uParseTime } from '@/utils/tools'
70
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
71
+import {getInitData} from "@/api/his/his"
72
+export default {
73
+    props:{
74
+      patient_id:Number,
75
+      record_date:String,
76
+      prescription_id:Number,
77
+      ids:String
78
+    },
79
+    data(){
80
+      return {
81
+        doctorList:[],
82
+        advicePrint:{},
83
+        patient:{},
84
+        tableData:[],
85
+        prescriptionInfo:[],
86
+        hisPatient:{},
87
+        department:[],
88
+        prescriptions:[],
89
+        projectList:[],
90
+        orgname:"",
91
+        diagnoses:[],
92
+      }
93
+    },
94
+   methods:{
95
+     getAge(patient){
96
+       var thisLen = patient.id_card_no.length
97
+       var birth = ''
98
+       if (thisLen == 15) {
99
+         birth = '19' + patient.id_card_no.substr(6, 6)
100
+       } else {
101
+         birth = patient.id_card_no.substr(6, 8)
102
+       }
103
+       var births =
104
+         birth.substr(0, 4) +
105
+         '-' +
106
+         birth.substr(4, 2) +
107
+         '-' +
108
+         birth.substr(6, 2)
109
+       return jsGetAge(births, '-')
110
+
111
+     },
112
+
113
+     getAllDoctorList(){
114
+      getAllDoctorList().then(response=>{
115
+        if(response.data.state == 1){
116
+               var doctor =  response.data.data.doctor
117
+
118
+               this.doctorList = doctor
119
+             }
120
+         })
121
+     },
122
+
123
+      getDoctor(id){
124
+        var name = ""
125
+        for(let i=0;i<this.doctorList.length;i++){
126
+          if(id == this.doctorList[i].admin_user_id){
127
+              name = this.doctorList[i].user_name
128
+          }
129
+        }
130
+        return name
131
+      },
132
+      getTime(value, temp) {
133
+        if (value != undefined) {
134
+            return uParseTime(value, temp)
135
+        }
136
+        return ''
137
+     },
138
+       getPrescriptionPrint(){
139
+         var params = {
140
+          // patient_id:this.patient_id,
141
+          // record_date:this.record_date,
142
+          // prescription_id:this.prescription_id,
143
+          patient_id:this.patient_id,
144
+          record_date:this.record_date,
145
+          prescription_id:this.prescription_id,
146
+          ids:this.ids
147
+        }
148
+        console.log("params",params)
149
+       getPrescriptionPrint(params).then(response=>{
150
+         if(response.data.state == 1){
151
+            var advicePrint =  response.data.data.advicePrint
152
+            console.log("adviceprint9999",advicePrint)
153
+            this.advicePrint = advicePrint
154
+            this.prescriptions = advicePrint
155
+            console.log("处方222222",this.prescriptions)
156
+            var hisPatient = response.data.data.hisPatient
157
+            console.log("hisPatient",hisPatient)
158
+            this.hisPatient = hisPatient
159
+            var projectlist =  response.data.data.projectlist
160
+            console.log("所有项目列表",projectlist)
161
+            this.projectList = projectlist
162
+          }
163
+       })
164
+     },
165
+     getHisPatientDetail(){
166
+          const params = {
167
+              patient_id:this.patient_id
168
+          }
169
+       getHisPatientDetail(params).then(response=>{
170
+          if(response.data.state == 1){
171
+             var hisPatient =  response.data.data.hisPatient
172
+             console.log("挂号病人",hisPatient)
173
+             this.hisPatient = hisPatient
174
+          }
175
+       })
176
+     },
177
+     getInitData(){
178
+       getInitData().then(response=>{
179
+          if(response.data.state == 1){
180
+            this.department = response.data.data.department
181
+            this.diagnoses = response.data.data.diagnose
182
+            console.log("争端",this.diagnoses)
183
+          }
184
+       })
185
+     },
186
+     getDepart(id){
187
+         var name = ""
188
+       for(let i=0;i<this.department.length;i++){
189
+           if(id == this.department[i].id){
190
+               name = this.department[i].name
191
+           }
192
+       }
193
+       return name
194
+     },
195
+    getTotalOne(id) {
196
+
197
+        var total = 0
198
+        var addtotal = 0
199
+        for (let i = 0; i < this.prescriptions.length; i++) {
200
+          if(id == this.prescriptions[i].id){
201
+            if (this.prescriptions[i].project != null) {
202
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
203
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
204
+              }
205
+            }
41 206
 
207
+            if (this.prescriptions[i].additionalcharge != null) {
208
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
209
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
210
+              }
211
+            }
212
+              addtotal =  Math.floor(addtotal * 100) / 100
213
+        }
214
+
215
+       }
216
+
217
+      for (let i = 0; i < this.prescriptions.length; i++) {
218
+          if(id == this.prescriptions[i].id){
219
+            if (this.prescriptions[i].advices != null) {
220
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
221
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
222
+              }
223
+            }
224
+
225
+            if (this.prescriptions[i].additionalcharge != null) {
226
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
227
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
228
+              }
229
+            }
230
+              addtotal =  Math.floor(addtotal * 100) / 100
231
+        }
232
+       }
233
+
234
+        return total + addtotal
235
+      },
236
+
237
+     getProjectName(id){
238
+        var project_name = ""
239
+        for(let i=0;i<this.projectList.length;i++){
240
+           if(id == this.projectList[i].id){
241
+               project_name = this.projectList[i].project_name
242
+           }
243
+        }
244
+        return project_name
245
+     },
246
+
247
+     getDiagnosis(id){
248
+        var name = ""
249
+        for(let i=0;i<this.diagnoses.length;i++){
250
+          if(id == this.diagnoses[i].id){
251
+             name = this.diagnoses[i].class_name
252
+          }
253
+        }
254
+        return name
255
+     }
256
+
257
+   },
258
+   created(){
259
+      this.getAllDoctorList()
260
+      this.getInitData()
261
+      this.getPrescriptionPrint()
262
+      this.getHisPatientDetail()
263
+      var xtuser = this.$store.getters.xt_user;
264
+      this.orgname = xtuser.org.org_name;
265
+
266
+   },
267
+   watch:{
268
+     ids:function(val){
269
+      this.ids = val
270
+      this.getPrescriptionPrint()
271
+    }
272
+   }
273
+}
274
+</script>
42 275
 
43 276
 
44 277
 <style lang="scss" scoped>
278
+.prescription-print{
279
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
280
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
281
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
282
+    margin-bottom: 20px;
283
+    padding:20px 10px;
284
+}
45 285
 .printTitle{
46 286
     font-size: 22px;
47 287
     text-align: center;

+ 508 - 0
src/xt_pages/hospitalStation/template/printThree.vue Datei anzeigen

@@ -0,0 +1,508 @@
1
+<template>
2
+<div>
3
+  <div id='prescriptionPrint1'>
4
+    <div v-for="(item,index) in advicePrint" :key="index">
5
+      <div id='prescription-print' v-if="item.project.length == 0" v-for='(i,pageIndex) in item.pageArr.length' :key="pageIndex" class="prescription-print" style="page-break-after: always;">
6
+          <img src="https://kuyi.shengws.com/bailin/bltotle.jpg" style="width:100%" alt="">
7
+          <div class="printTitle">
8
+            处方笺
9
+            <span v-if="item.med_type == '1111'" style="margin-left: 50px;border: 1px solid #000;">精一</span>
10
+            <span v-if="item.med_type == '1112'" style="margin-left: 50px;border: 1px solid #000;">精二</span>
11
+          </div>
12
+          <div style="display:flex;">
13
+            <div style="width:33%;display:flex;">费别:<span class="under_line"><span>{{ faber && faber.transBody ? getName(faber.transBody.outputlist1) : '自费' }}</span></span></div>
14
+            <div style="width:33%;display:flex;">电脑号:<span class="under_line">{{ faber && faber.transBody ? faber.transBody.aac999 : ''  }}</span></div>
15
+            <div style="width:33%;display:flex;">处方编号:<span class="under_line">{{ item.prescription_number.substring(item.prescription_number.length-6) }}</span></div>
16
+          </div>
17
+
18
+
19
+          <div class="infoTitle">
20
+              <div>姓名:{{item.patient.name? item.patient.name.indexOf("(") > -1 ? item.patient.name.substring(0,item.patient.name.indexOf("(")) : item.patient.name :""}}</div>
21
+              <div>性别:
22
+                <span v-if="item.patient.gender == 1">男</span>
23
+                <span v-if="item.patient.gender == 2">女</span>
24
+              </div>
25
+              <div>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</div>
26
+          </div>
27
+          <div class="infoMain">
28
+              <div style="margin-bottom: 10px;display:flex;">门诊号码:<span class="under_line" v-if="hisPatient.number">{{hisPatient.number?hisPatient.number:""}}</span></div>
29
+              <div style="margin-bottom: 10px;display:flex;">科别:<span class="under_line" v-if="item.info">{{item.info?getDepart(item.info.departments):''}}</span></div>
30
+              <div style="margin-bottom: 10px;display:flex;">临床诊断:{{ item.info.diagnosis ? getDiagnosis(item.info.diagnosis) : ''}}</div>
31
+              <div style="margin-bottom: 10px;display:flex;">自费药品签名:<span class="under_line"></span></div>
32
+              <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
33
+              <div style="margin-bottom: 10px;display:flex;">联系方式:<span class="under_line">{{item.patient.phone}}</span></div>
34
+              <div style="margin-bottom: 10px;display:flex;">开具日期:<span class="under_line">{{getTime(item.pre_time) ? getTime(item.pre_time).split(' ')[0] : ''}}</span></div>
35
+              <!-- <div>地址:{{item.patient.home_address}}</div> -->
36
+              <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
37
+          </div>
38
+          <div class="prescriptionBox">
39
+              <div class="Rp">Rp:</div>
40
+              <div class="drugsBox" v-for="(it,index) in item.advices.slice(pageIndex * 5,(pageIndex * 5) + item.pageArr[pageIndex])" :key="index">
41
+                  <!-- <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> -->
42
+                  <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>
43
+                  <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>
44
+              </div>
45
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
46
+                <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
47
+              </div>
48
+
49
+              <!-- <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
50
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{ it.type == 2 ? it.project.project_name : it.good_info.good_name }}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
51
+                  <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>
52
+              </div>
53
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
54
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
55
+              </div> -->
56
+              <div style="text-align:center;" >(以下空白)</div>
57
+
58
+          </div>
59
+          <div style="display:flex;">
60
+            <div>医&nbsp;&nbsp;&nbsp;&nbsp;师:<span style="width:100px;display:inline-block;">{{item.doctor?item.doctor:""}}</span></div>
61
+            <!-- <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}</div> -->
62
+          </div>
63
+          <div style="display:flex;">
64
+            <div style="display:flex;">审核药师:<span style="width:100px" class="under_line"></span></div>
65
+            <div style="display:flex;">调剂药师:<span style="width:100px" class="under_line"></span></div>
66
+            <div style="display:flex;">核对/发药药师:<span style="width:100px" class="under_line"></span></div>
67
+          </div>
68
+          <div>
69
+            打印日期:{{getTime(new Date())?getTime(new Date()):""}}
70
+          </div>
71
+          <div>*处方当日有效,特殊情况可适当延长,一般不超过3天</div>
72
+          <div>*药品属于特殊商品,非质量问题不允许退换</div>
73
+          <img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt="">
74
+          <!-- <div class="doctorBox">
75
+              <p>医师:{{item.doctor?item.doctor:""}}</p>
76
+              <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
77
+          </div>
78
+          <div class="actionBar">
79
+
80
+                <p>审核:</p>
81
+                <p>配对:</p>
82
+                <p>核对:</p>
83
+                <p>发药:</p>
84
+                <p>药费:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):0}}元</p>
85
+          </div> -->
86
+          <div style="page-break-after:always"></div>
87
+      </div>
88
+    </div>
89
+
90
+  </div>
91
+</div>
92
+
93
+</template>
94
+<script>
95
+import { jsGetAge, uParseTime } from '@/utils/tools'
96
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
97
+import {getInitData} from "@/api/his/his"
98
+export default {
99
+    props:{
100
+      patient_id:Number,
101
+      record_date:String,
102
+      prescription_id:Number,
103
+      ids:String
104
+    },
105
+    data(){
106
+      return {
107
+        doctorList:[],
108
+        advicePrint:{},
109
+        patient:{},
110
+        tableData:[],
111
+        prescriptionInfo:[],
112
+        hisPatient:{},
113
+        department:[],
114
+        prescriptions:[],
115
+        projectList:[],
116
+        orgname:"",
117
+        diagnoses:[],
118
+        pageArr:[],
119
+        faber:{}
120
+      }
121
+    },
122
+   methods:{
123
+     getAge(patient){
124
+       var thisLen = patient.id_card_no.length
125
+       var birth = ''
126
+       if (thisLen == 15) {
127
+         birth = '19' + patient.id_card_no.substr(6, 6)
128
+       } else {
129
+         birth = patient.id_card_no.substr(6, 8)
130
+       }
131
+       var births =
132
+         birth.substr(0, 4) +
133
+         '-' +
134
+         birth.substr(4, 2) +
135
+         '-' +
136
+         birth.substr(6, 2)
137
+       return jsGetAge(births, '-')
138
+
139
+     },
140
+
141
+     getAllDoctorList(){
142
+      getAllDoctorList().then(response=>{
143
+        if(response.data.state == 1){
144
+               var doctor =  response.data.data.doctor
145
+
146
+               this.doctorList = doctor
147
+             }
148
+         })
149
+     },
150
+
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
+          }
157
+        }
158
+        return name
159
+      },
160
+      getTime(value, temp) {
161
+        if (value != undefined) {
162
+            return uParseTime(value, temp)
163
+        }
164
+        return ''
165
+     },
166
+       getPrescriptionPrint(){
167
+         var params = {
168
+          // patient_id:this.patient_id,
169
+          // record_date:this.record_date,
170
+          // prescription_id:this.prescription_id,
171
+          patient_id:this.patient_id,
172
+          record_date:this.record_date,
173
+          prescription_id:this.prescription_id,
174
+          ids:this.ids
175
+        }
176
+        console.log("params",params)
177
+       getPrescriptionPrint(params).then(response=>{
178
+         if(response.data.state == 1){
179
+            var advicePrint =  response.data.data.advicePrint
180
+            console.log("adviceprint9999",advicePrint)
181
+            this.advicePrint = advicePrint
182
+            this.getPage()
183
+            this.prescriptions = advicePrint
184
+            console.log("处方222222",this.prescriptions)
185
+            var hisPatient = response.data.data.hisPatient
186
+            console.log("hisPatient",hisPatient)
187
+            this.hisPatient = hisPatient
188
+            var projectlist =  response.data.data.projectlist
189
+            console.log("所有项目列表",projectlist)
190
+            this.projectList = projectlist
191
+
192
+            let outputlist1Name = response.data.data.his.patient_info ? JSON.parse(response.data.data.his.patient_info) : {};
193
+            this.faber = outputlist1Name
194
+
195
+
196
+          }
197
+       })
198
+     },
199
+     getHisPatientDetail(){
200
+          const params = {
201
+              patient_id:this.patient_id
202
+          }
203
+       getHisPatientDetail(params).then(response=>{
204
+          if(response.data.state == 1){
205
+             var hisPatient =  response.data.data.hisPatient
206
+             console.log("挂号病人",hisPatient)
207
+             this.hisPatient = hisPatient
208
+          }
209
+       })
210
+     },
211
+     getInitData(){
212
+       getInitData().then(response=>{
213
+          if(response.data.state == 1){
214
+            this.department = response.data.data.department
215
+            this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
216
+            console.log("争端",this.diagnoses)
217
+          }
218
+       })
219
+     },
220
+     getDepart(id){
221
+         var name = ""
222
+       for(let i=0;i<this.department.length;i++){
223
+           if(id == this.department[i].id){
224
+               name = this.department[i].name
225
+           }
226
+       }
227
+       return name
228
+     },
229
+    getTotalOne(id) {
230
+        console.log('id',id)
231
+        var total = 0
232
+        var addtotal = 0
233
+        for (let i = 0; i < this.prescriptions.length; i++) {
234
+          if(id == this.prescriptions[i].id){
235
+            if (this.prescriptions[i].project != null) {
236
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
237
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
238
+              }
239
+            }
240
+
241
+            if (this.prescriptions[i].additionalcharge != null) {
242
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
243
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
244
+              }
245
+            }
246
+              addtotal =  Math.floor(addtotal * 100) / 100
247
+        }
248
+
249
+       }
250
+
251
+      for (let i = 0; i < this.prescriptions.length; i++) {
252
+          if(id == this.prescriptions[i].id){
253
+            if (this.prescriptions[i].advices != null) {
254
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
255
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
256
+              }
257
+            }
258
+
259
+            if (this.prescriptions[i].additionalcharge != null) {
260
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
261
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
262
+              }
263
+            }
264
+              addtotal =  Math.floor(addtotal * 100) / 100
265
+        }
266
+       }
267
+
268
+        return total + addtotal
269
+      },
270
+
271
+     getProjectName(id){
272
+        var project_name = ""
273
+        for(let i=0;i<this.projectList.length;i++){
274
+           if(id == this.projectList[i].id){
275
+               project_name = this.projectList[i].project_name
276
+           }
277
+        }
278
+        return project_name
279
+     },
280
+
281
+     getDiagnosis(ids){
282
+        let newIds = ids.split(',').sort(function(a,b){
283
+          return a-b;
284
+        })
285
+        var name = ""
286
+        let nameArr = []
287
+        for(let i=0;i<this.diagnoses.length;i++){
288
+          // if(id == this.diagnoses[i].id){
289
+          //    name = this.diagnoses[i].class_name
290
+          // }
291
+
292
+          if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
293
+            // name += diagnoses[i].class_name + ' '
294
+            nameArr.push(this.diagnoses[i].class_name)
295
+          }
296
+        }
297
+        let newNameArr = []
298
+        nameArr.map((item,index) => {
299
+          if(item == '尿毒症'){
300
+            newNameArr.push(item)
301
+            nameArr.splice(index,1,'')
302
+          }
303
+        })
304
+        newNameArr.push(...nameArr)
305
+        return newNameArr.join(' ')
306
+     },
307
+     compare(property) {
308
+        return function(a,b){
309
+          var value1 = a[property];
310
+          var value2 = b[property];
311
+          return value1 - value2;//升序排序
312
+        }
313
+      },
314
+     getPage(){
315
+        this.page = 1
316
+        this.pageArr = []
317
+
318
+        this.advicePrint.map(item => {
319
+          let arr = []
320
+          item.pageArr = []
321
+          if(item.advices.length <= 5){
322
+            this.page = 1
323
+            arr.push(item.advices.length)
324
+            item.pageArr.push(arr)
325
+
326
+          }else if(item.advices.length > 5){
327
+            this.page = parseInt(item.advices.length / 5)
328
+            let num = item.advices.length % 5
329
+            for (var i=0;i<this.page;i++){
330
+              item.pageArr.push([5])
331
+            }
332
+            if(num != 0){
333
+              item.pageArr.push([num])
334
+            }
335
+          }
336
+        })
337
+        // console.log('this.pageArr',this.pageArr)
338
+      },
339
+      getName(list) {
340
+        console.log('list',list)
341
+        let new_list = []
342
+        for (let i = 0; i < list.length; i++) {
343
+          if (list[i].aac031 == '1') {
344
+            new_list.push(list[i])
345
+          }
346
+        }
347
+
348
+        switch (new_list[0].bcc334) {
349
+          case "A31001":
350
+            return "深圳医保1档"
351
+            break
352
+          case "A31002":
353
+            return "深圳医保2档"
354
+
355
+            break
356
+          case "A31003":
357
+            return "深圳医保3档"
358
+
359
+            break
360
+          case "A31004":
361
+            return "二档(少儿)"
362
+
363
+            break
364
+          case "A31005":
365
+            return "学生二档"
366
+
367
+            break
368
+          case "A31006":
369
+            return "大学生二档"
370
+
371
+            break
372
+          case "A32001":
373
+            return "在职公务员"
374
+            break
375
+          case "A32002":
376
+            return "在职驻深公务员"
377
+
378
+            break
379
+          case "A39301":
380
+            return "家属统筹医疗"
381
+
382
+            break
383
+          case "A41001":
384
+            return "工伤在职"
385
+
386
+            break
387
+          case "A51001":
388
+            return "生育在职"
389
+
390
+            break
391
+          case "A52001":
392
+            return "生育医疗一档"
393
+
394
+            break
395
+          case "A52002":
396
+            return "生育医疗一档"
397
+
398
+            break
399
+          case "C31001":
400
+            return "一档医疗退休"
401
+
402
+            break
403
+          case "C31002":
404
+            return "二档医疗退休"
405
+            break
406
+
407
+        }
408
+
409
+
410
+
411
+      },
412
+
413
+   },
414
+   created(){
415
+      this.getPrescriptionPrint()
416
+      this.getAllDoctorList()
417
+      this.getInitData()
418
+
419
+      this.getHisPatientDetail()
420
+      var xtuser = this.$store.getters.xt_user;
421
+      this.orgname = xtuser.org.org_name;
422
+
423
+   },
424
+   watch:{
425
+     ids:function(val){
426
+       console.log('val1111111111111111111111111111',val)
427
+      this.ids = val
428
+      this.getPrescriptionPrint()
429
+    }
430
+   }
431
+}
432
+</script>
433
+
434
+
435
+<style lang="scss" scoped>
436
+.prescription-print{
437
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
438
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
439
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
440
+    margin-bottom: 20px;
441
+    padding:20px 10px;
442
+}
443
+.printTitle{
444
+    font-size: 22px;
445
+    text-align: center;
446
+    font-weight: bold;
447
+    margin-bottom: 10px;
448
+}
449
+.infoTitle{
450
+    display: flex;
451
+    margin-top:10px;
452
+    line-height: 24px;
453
+}
454
+.infoTitle div{
455
+    width: 200px;
456
+}
457
+.infoMain{
458
+    display: flex;
459
+    flex-wrap: wrap;
460
+    margin-top:10px;
461
+}
462
+.infoMain div{
463
+    width: 50%;
464
+    line-height: 24px;
465
+}
466
+.prescriptionBox{
467
+    padding:0 10px;
468
+    min-height:400px;
469
+}
470
+.Rp{
471
+    font-size: 22px;
472
+    font-weight: bold;
473
+}
474
+.drugsBox{
475
+    padding-left: 40px;
476
+    margin-bottom: 10px;
477
+}
478
+.drugsBox div{
479
+    line-height: 20px;
480
+}
481
+.drugsOne{
482
+    line-height: 24px;
483
+}
484
+.drugsOne span{
485
+    margin-right: 20px;
486
+}
487
+.doctorBox{
488
+    display: flex;
489
+    justify-content: space-between;
490
+    padding:0 10px;
491
+    line-height: 24px;
492
+    border-bottom: 2px solid #000;
493
+}
494
+.actionBar{
495
+    display: flex;
496
+    justify-content: space-between;
497
+    line-height: 24px;
498
+    padding:0 10px;
499
+}
500
+.actionBar p{
501
+    width:150px;
502
+}
503
+.under_line{
504
+  display: inline-block;
505
+  border-bottom: 1px solid #000;
506
+  flex: 1;
507
+}
508
+</style>

+ 43 - 26
src/xt_pages/hospitalStation/template/printTwo.vue Datei anzeigen

@@ -7,7 +7,7 @@
7 7
                <span v-if="patient.gender == 1">男</span>
8 8
                <span v-if="patient.gender == 2">女</span>
9 9
             </p>
10
-            <p>年龄:{{patient.age}}岁</p>
10
+            <p>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</p>
11 11
         </div>
12 12
         <div class="infoMain">
13 13
             <div style="margin-bottom: 10px;">门诊号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
@@ -62,11 +62,28 @@ export default {
62 62
       }
63 63
     },
64 64
    methods:{
65
+     getAge(patient){
66
+       var thisLen = patient.id_card_no.length
67
+       var birth = ''
68
+       if (thisLen == 15) {
69
+         birth = '19' + patient.id_card_no.substr(6, 6)
70
+       } else {
71
+         birth = patient.id_card_no.substr(6, 8)
72
+       }
73
+       var births =
74
+         birth.substr(0, 4) +
75
+         '-' +
76
+         birth.substr(4, 2) +
77
+         '-' +
78
+         birth.substr(6, 2)
79
+       return jsGetAge(births, '-')
80
+
81
+     },
65 82
 
66 83
      getAllDoctorList(){
67 84
       getAllDoctorList().then(response=>{
68 85
         if(response.data.state == 1){
69
-               var doctor =  response.data.data.doctor;
86
+               var doctor =  response.data.data.doctor
70 87
 
71 88
                this.doctorList = doctor
72 89
              }
@@ -74,7 +91,7 @@ export default {
74 91
      },
75 92
 
76 93
       getDoctor(id){
77
-        var name = "";
94
+        var name = ""
78 95
         for(let i=0;i<this.doctorList.length;i++){
79 96
           if(id == this.doctorList[i].admin_user_id){
80 97
               name = this.doctorList[i].user_name
@@ -93,27 +110,27 @@ export default {
93 110
           patient_id:this.patient_id,
94 111
           record_date:this.record_date,
95 112
           prescription_id:this.prescription_id,
96
-        };
97
-        console.log("params---",params);
113
+        }
114
+        console.log("params---",params)
98 115
        getPrescriptionPrint(params).then(response=>{
99 116
          if(response.data.state == 1){
100
-            var advicePrint =  response.data.data.advicePrint;
101
-            console.log("adviceprint",advicePrint);
102
-            this.advicePrint = advicePrint;
103
-            var patient =  response.data.data.patient;
104
-            console.log("patient",patient);
105
-            this.patient = patient;
106
-            var doctorPorject = response.data.data.doctorPorject;
117
+            var advicePrint =  response.data.data.advicePrint
118
+            console.log("adviceprint",advicePrint)
119
+            this.advicePrint = advicePrint
120
+            var patient =  response.data.data.patient
121
+            console.log("patient",patient)
122
+            this.patient = patient
123
+            var doctorPorject = response.data.data.doctorPorject
107 124
 
108
-            var arr = doctorPorject.project;
109
-              console.log("我的中谷歌",arr);
125
+            var arr = doctorPorject.project
126
+              console.log("我的中谷歌",arr)
110 127
             for(let i=0;i<arr.length;i++){
111 128
               console.log("arr",arr[i].project_name)
112 129
             }
113
-            this.tableData = arr;
114
-            console.log("3333",this.tableData);
115
-            var prescriptioninfo = response.data.data.prescriptionInfo;
116
-            console.log("prescriptioninfo",prescriptioninfo);
130
+            this.tableData = arr
131
+            console.log("3333",this.tableData)
132
+            var prescriptioninfo = response.data.data.prescriptionInfo
133
+            console.log("prescriptioninfo",prescriptioninfo)
117 134
             this.prescriptionInfo = prescriptioninfo
118 135
           }
119 136
        })
@@ -121,11 +138,11 @@ export default {
121 138
      getHisPatientDetail(){
122 139
           const params = {
123 140
               patient_id:this.patient_id
124
-          };
141
+          }
125 142
        getHisPatientDetail(params).then(response=>{
126 143
           if(response.data.state == 1){
127
-             var hisPatient =  response.data.data.hisPatient;
128
-             console.log("挂号病人",hisPatient);
144
+             var hisPatient =  response.data.data.hisPatient
145
+             console.log("挂号病人",hisPatient)
129 146
              this.hisPatient = hisPatient
130 147
           }
131 148
        })
@@ -139,7 +156,7 @@ export default {
139 156
        })
140 157
      },
141 158
      getDepart(id){
142
-         var name = "";
159
+         var name = ""
143 160
        for(let i=0;i<this.department.length;i++){
144 161
            if(id == this.department[i].id){
145 162
                name = this.department[i].name
@@ -149,15 +166,15 @@ export default {
149 166
      }
150 167
    },
151 168
    created(){
152
-      this.getAllDoctorList();
153
-      this.getInitData();
169
+      this.getAllDoctorList()
170
+      this.getInitData()
154 171
       var xtuser = this.$store.getters.xt_user;
155 172
       this.orgname = xtuser.org.org_name;
156 173
    },
157 174
    watch:{
158 175
      patient_id:function(val){
159
-       console.log("999999888888",this.patient_id,this.record_date,this.prescription_id);
160
-       this.getPrescriptionPrint();
176
+       console.log("999999888888",this.patient_id,this.record_date,this.prescription_id)
177
+       this.getPrescriptionPrint()
161 178
        this.getHisPatientDetail()
162 179
      }
163 180
    }

+ 361 - 153
src/xt_pages/hospitalStation/treatPrint.vue Datei anzeigen

@@ -1,170 +1,378 @@
1 1
 <template>
2
-  <div>
3
-    <template>
4
-      <el-button
5
-        style="position:fixed;right:25px;z-index:999"
6
-        :loading="loading"
7
-        size="small"
8
-        icon="el-icon-printer"
9
-        @click="printThisPage"
10
-        type="primary"
11
-        >打印</el-button
12
-      >
13
-    </template>
14
-    <div class="app-container" style="padding-top:40px;">
15
-        <div class='dialysisPage'>
16
-            <printOne v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printOne>
2
+    <div>
3
+        <!-- <template>
4
+         <el-button
5
+           style="float:right;"
6
+           :loading="loading"
7
+           size="small"
8
+           icon="el-icon-printer"
9
+           @click="printThisPage"
10
+           type="primary"
11
+           >打印</el-button
12
+         >
13
+       </template> -->
14
+
15
+        <div class='dialysisPage' style="padding-top:40px;">
16
+            <printOne v-if="org_id != 10138" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17
+            <printTwo v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printTwo>
17 18
         </div>
18 19
     </div>
19
-  </div>
20 20
 </template>
21 21
 
22 22
 <script>
23 23
 
24
-import {
25
-  getDialysisRecordInitData,
26
-  getDialysisSchedules
27
-} from "@/api/dialysis_record";
28
-import { parseTime } from "@/utils";
29
-import { getDialysisRecord } from "@/api/dialysis";
30
-import { getDataConfig } from "@/utils/data";
31
-import { jsGetAge, uParseTime } from "@/utils/tools";
32
-// import LabelBox from "./printItem/LabelBox";
33
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
34
-import print from "print-js";
35
-import printOne from "./treatTemplate/printOne"
36
-export default {
37
-  name: "dialysisPrintOrder",
38
-  components: {
39
-    BreadCrumb,
40
-    printOne
41
-  },
42
-  props:{
43
-    paramsObj:Object
44
-  },
45
-  data() {
46
-    return {
47
-      crumbs: [
48
-        { path: false, name: "透析管理" },
49
-        { path: false, name: "打印单" }
50
-      ],
51
-      childResponse: {},
52
-      paramsObj:{}
53
-      
54
-
55
-    };
56
-  },
57
-  methods: {
58
-    getAdminUser(id) {
59
-      if (id == 0) {
60
-        return "";
61
-      }
62
-      if (id == undefined) {
63
-        return "";
64
-      }
65
-      for (let i = 0; i < this.adminUser.length; i++) {
66
-        if (this.adminUser[i].id == id) {
67
-          return this.adminUser[i].name;
68
-        }
69
-      }
24
+
25
+  import { parseTime } from "@/utils";
26
+  import { getDialysisRecord } from "@/api/dialysis";
27
+  import { getDataConfig } from "@/utils/data";
28
+  import { jsGetAge, uParseTime } from "@/utils/tools";
29
+
30
+  import BreadCrumb from "@/xt_pages/components/bread-crumb";
31
+  import print from "print-js";
32
+  import printOne from "./treatTemplate/printOne"
33
+  import printTwo from "./treatTemplate/printTwo"
34
+  import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
35
+  export default {
36
+    name: "dialysisPrintOrder",
37
+    components: {
38
+      BreadCrumb,
39
+      printOne,
40
+      printTwo
70 41
     },
71
-    getTime(value, temp) {
72
-      if (value == 0) {
73
-        return "";
74
-      }
75
-      if (value != undefined) {
76
-        return uParseTime(value, temp);
77
-      }
78
-      return "";
42
+    props:{
43
+      paramsObj:Object
79 44
     },
80
-    printThisPage() {
81
-      var ptime = Math.round(new Date().getTime() / 1000);
82
-      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
83
-
84
-      const style =
85
-        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
86
-        printJS({
87
-            printable: "prescription-print",
45
+    data() {
46
+      return {
47
+        crumbs: [
48
+          { path: false, name: '门诊医生站' },
49
+          { path: false, name: '打印' }
50
+        ],
51
+        record_date:"",
52
+        patientTableData:[],
53
+        advicePrint:[],
54
+        hisPatient:{},
55
+        patient:{},
56
+        search_input:"",
57
+        loading:false,
58
+        patient_id:0,
59
+        prescription_id:0,
60
+        ids:''
61
+      };
62
+    },
63
+    methods:{
64
+      printThisPage() {
65
+        var ptime = Math.round(new Date().getTime() / 1000);
66
+        this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
67
+
68
+        if(this.org_id == 10138){
69
+          setTimeout(() => {
70
+            const style =
71
+              '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 90%;}}}';
72
+            printJS({
73
+              printable: "prescriptionPrint2",
74
+              type: "html",
75
+              style: style,
76
+              scanStyles: false
77
+            });
78
+          },500)
79
+
80
+        }else{
81
+          const style =
82
+            '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.prescription-print{font-size: 14px;}.printTitle{font-size: 18px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:5px;padding:0 10px;}.infoTitle div{width: 300px;margin-bottom:5px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;}.prescriptionBox{padding:0 10px;min-height:380px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; padding:0 10px;margin:5px 0;} .actionBar div{width:150px;}}';
83
+          printJS({
84
+            printable: "prescriptionPrint",
88 85
             type: "html",
89 86
             style: style,
90 87
             scanStyles: false
91
-        });
92
-
93
-      // if (this.org_template_info.template_id == 1) {
94
-      //   printJS({
95
-      //     printable: "dialysis-print-box",
96
-      //     type: "html",
97
-      //     style: style,
98
-      //     scanStyles: false
99
-      //   });
100
-      // }
101
-    },
102
-  },
103
-  created() {
104
-  },
105
-  watch:{
106
-    paramsObj:{//深度监听,可监听到对象、数组的变化
107
-      handler(val, oldVal){
108
-        this.paramsObj = val
109
-        
88
+          });
89
+        }
90
+
91
+
92
+        // if (this.org_template_info.template_id == 1) {
93
+        //   printJS({
94
+        //     printable: "dialysis-print-box",
95
+        //     type: "html",
96
+        //     style: style,
97
+        //     scanStyles: false
98
+        //   });
99
+        // }
100
+      },
101
+      getAllDoctorList(){
102
+        getAllDoctorList().then(response=>{
103
+          if(response.data.state == 1){
104
+            var doctor =  response.data.data.doctor
105
+
106
+            this.doctorList = doctor
107
+          }
108
+        })
109
+      },
110
+      getAllHisPatientList(){
111
+        const params = {
112
+          record_date:this.record_date
113
+        }
114
+        getAllHisPatientList(params).then(response=>{
115
+          if(response.data.state == 1){
116
+            this.patientTableData = response.data.data.list
117
+            this.patientTableDataTwo = response.data.data.list
118
+
119
+            console.log('222', this.patientTableData)
120
+            let cal_one = 0
121
+            let cal_two = 0
122
+            for (let i = 0; i < response.data.data.list.length; i++) {
123
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
124
+                cal_one = cal_one + 1
125
+              }
126
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
127
+                cal_two = cal_two + 1
128
+              }
129
+            }
130
+            // this.$refs.tab.setCurrentRow(this.patientTableData[0])
131
+            // console.log(this.patientTableData[0])
132
+            // this.choosePatient(this.patientTableData[0])
133
+            this.cal_one = cal_one
134
+            this.cal_two = cal_two
135
+          }
136
+        })
137
+      },
138
+
139
+      changePatient(row){
140
+        console.log("row",row)
141
+        this.patient_id = row.patient_id
142
+        this.record_date = this.record_date
143
+        this.prescription_id = this.prescription_id
144
+        //   var params = {
145
+        //     patient_id:row.patient_id,
146
+        //     record_date:this.record_date,
147
+        //     prescription_id:this.prescription_id,
148
+        //   }
149
+        // getPrescriptionPrint(params).then(response=>{
150
+        //     if(response.data.state == 1){
151
+        //       var advicePrint =  response.data.data.advicePrint
152
+        //       console.log("adviceprint",advicePrint)
153
+        //       this.advicePrint = advicePrint
154
+        //       // var hisPatient =  response.data.data.hisPatient
155
+        //       // console.log("hispatient",hisPatient)
156
+        //       // this.hisPatient = hisPatient
157
+        //       var patient =  response.data.data.patient
158
+        //       console.log("patient",patient)
159
+        //       this.patient = patient
160
+        //       var doctorPorject = response.data.data.doctorPorject
161
+        //       console.log("doctorporject",doctorPorject)
162
+        //     }
163
+        // })
110 164
       },
111
-      deep:true
165
+      searchAction(){
166
+
167
+      }
168
+
169
+    },
170
+
171
+    created() {
172
+      this.org_id = this.$store.getters.xt_user.org_id
173
+      this.getAllDoctorList()
174
+      var record_date = this.paramsObj.record
175
+      this.record_date = record_date
176
+      console.log("record_date",record_date)
177
+      this.prescription_id = this.paramsObj.prescription_id
178
+      this.patient_id = this.paramsObj.patient_id
179
+      this.ids = this.paramsObj.ids
180
+      this.getAllHisPatientList(record_date)
181
+    },
182
+    watch:{
183
+      paramsObj:{//深度监听,可监听到对象、数组的变化
184
+        handler(val, oldVal){
185
+          this.paramsObj = val
186
+          this.patient_id = this.paramsObj.patient_id
187
+          var record_date = this.paramsObj.record
188
+          this.record_date = record_date
189
+          var prescription_id = this.paramsObj.prescription_id
190
+          this.prescription_id = prescription_id
191
+          this.ids = this.paramsObj.ids
192
+
193
+        },
194
+        deep:true
195
+      }
112 196
     }
113
-  }
114
-};
197
+
198
+  };
115 199
 </script>
116 200
 
117
-<style lang="scss" scoped>
118
-.printTitle{
119
-    font-size: 22px;
120
-    text-align: center;
121
-    font-weight: bold;
122
-}
123
-.infoMain{
124
-    display: flex;
125
-    flex-wrap: wrap;
126
-    border-bottom: 2px solid #000;
127
-    padding:0 10px;
128
-}
129
-.infoMain .infoP{
130
-    width: 33%;
131
-    line-height: 24px;
132
-}
133
-.prescriptionBox{
134
-    padding:0 10px;
135
-    height:600px;
136
-}
137
-.Rp{
138
-    font-size: 22px;
139
-    font-weight: bold;
140
-}
141
-.drugsBox{
142
-    padding-left: 40px;
143
-    margin-bottom: 10px;
144
-}
145
-.drugsBox p{
146
-    line-height: 30px;
147
-}
148
-.drugsOne{
149
-    line-height: 24px;
150
-}
151
-.drugsOne span{
152
-    margin-right: 20px;
153
-}
154
-.doctorBox{
155
-    display: flex;
156
-    justify-content: space-between;
157
-    padding:0 10px;
158
-    line-height: 24px;
159
-    border-bottom: 2px solid #000;
160
-}
161
-.actionBar{
162
-    display: flex;
163
-    justify-content: space-between; 
164
-    line-height: 24px;
165
-    padding:0 10px;
166
-}
167
-.actionBar p{
168
-    width:150px;
169
-}
201
+<style>
202
+    .dialysis-print-order {
203
+        width: 960px;
204
+        margin: 0 auto;
205
+    }
206
+
207
+    .dialysis-print-order .order-yy-name {
208
+        margin: auto;
209
+        text-align: center;
210
+        font-size: 20px;
211
+        letter-spacing: 5px;
212
+    }
213
+
214
+    .dialysis-print-order .order-title {
215
+        margin: auto;
216
+        font-weight: 600;
217
+        text-align: center;
218
+        font-size: 22px;
219
+        padding: 10px;
220
+    }
221
+
222
+    .dialysis-print-order .table-box {
223
+        width: 100%;
224
+        line-height: 23px;
225
+        font-size: 14px;
226
+    }
227
+
228
+    .dialysis-print-order .print-table {
229
+        width: 100%;
230
+        text-align: center;
231
+        border-collapse: collapse;
232
+        line-height: 40px;
233
+        font-size: 14px;
234
+        border-color: #000;
235
+    }
236
+
237
+    .dialysis-print-order .print-table-no {
238
+        width: 100%;
239
+        text-align: center;
240
+        border-collapse: collapse;
241
+        font-size: 14px;
242
+    }
243
+
244
+    .dialysis-print-order .under-line {
245
+        border-bottom: 1px solid #999;
246
+        width: 95%;
247
+        text-align: center;
248
+        margin-left: 2px;
249
+    }
250
+
251
+    .dialysis-print-order .title-box {
252
+        text-align: center;
253
+        font-size: 16px;
254
+    }
255
+
256
+    .dialysis-print-order .radio-lebel-box {
257
+        font-weight: 400;
258
+        cursor: pointer;
259
+    }
260
+
261
+    .dialysis-print-order .radio-no {
262
+        opacity: 0;
263
+        outline: none;
264
+        position: absolute;
265
+        margin: 0;
266
+        width: 0;
267
+        height: 0;
268
+        z-index: -1;
269
+    }
270
+
271
+    .dialysis-print-order .radio-inner {
272
+        white-space: nowrap;
273
+        cursor: pointer;
274
+        outline: none;
275
+        display: inline-block;
276
+        line-height: 1;
277
+        position: relative;
278
+        vertical-align: middle;
279
+    }
280
+
281
+    .dialysis-print-order .radio-fang {
282
+        display: inline-block;
283
+        position: relative;
284
+        border: 1px solid #000;
285
+        box-sizing: border-box;
286
+        width: 14px;
287
+        height: 14px;
288
+        background-color: #fff;
289
+        z-index: 1;
290
+        transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
291
+        background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
292
+    }
293
+
294
+    .dialysis-print-order .is-checked-radio::after {
295
+        content: "√";
296
+        font-size: 15px;
297
+    }
298
+
299
+    .dialysis-print-order .print-table-no tr td {
300
+        padding: 8px 5px;
301
+        line-height: 25px;
302
+    }
303
+
304
+    .dialysis-print-order .print-table tr td {
305
+        padding: 1px 1px;
306
+        /*line-height: 25px;*/
307
+    }
308
+
309
+    .es-img {
310
+        height: 30px;
311
+    }
312
+
313
+    .advice-name {
314
+        text-align: left;
315
+    }
316
+
317
+    .advice-children {
318
+        display: flex;
319
+    }
320
+
321
+    .title-box-pro {
322
+        border: 0 #fff;
323
+        line-height: 25px;
324
+        height: 25px;
325
+        text-align: left;
326
+        padding-left: 10px !important;
327
+    }
328
+    .title-box-pro-tr {
329
+        border: 0 #fff;
330
+    }
331
+    .text-align-left {
332
+        text-align: left !important;
333
+        padding-left: 10px !important;
334
+        font-size: 14px !important;
335
+        line-height: 25px;
336
+    }
337
+    .print-table-tr-new td {
338
+        line-height: 20px !important;
339
+    }
340
+    .border-top-solid {
341
+        border: solid 1px #000;
342
+    }
343
+    .print-template-two tr {
344
+        line-height: 30px;
345
+    }
346
+
347
+    .table-box1 {
348
+        border: 1px solid #000;
349
+        width: 100%;
350
+        line-height: 30px;
351
+        font-size: 14px;
352
+        border-collapse: collapse;
353
+    }
354
+    .table-box1 tr {
355
+        border-bottom: 1px solid #000;
356
+    }
357
+</style>
358
+
359
+<style lang="scss">
360
+
361
+    .newContainer{
362
+    .dialysisPage::-webkit-scrollbar {
363
+        height: 15px;
364
+    }
365
+
366
+    .el-date-editor{
367
+    .el-input__inner{
368
+        padding-right:0px;
369
+    }
370
+    }
371
+    .el-table td, .el-table th{
372
+        text-align: center;
373
+    }
374
+    }
375
+    .newContainer::-webkit-scrollbar{
376
+        height: 15px !important;
377
+    }
170 378
 </style>

+ 423 - 405
src/xt_pages/hospitalStation/treatTemplate/printOne.vue Datei anzeigen

@@ -1,429 +1,434 @@
1 1
 <template>
2
-    <div>
3
-        <div id='prescription-print' class="prescription-print">
4
-            <div v-if=" this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138">
5
-                <div class="printTitle">{{orgname}}&nbsp;&nbsp;医药费收据及收费项目清单</div>
6
-                <div class="infoMain">
7
-                    <div class="infoP">医院(药店)编号:{{org_code}}</div>
8
-                    <div class="infoP">名称:{{orgname}}</div>
9
-                    <div class="infoP">医生工号:{{doctor_code}}</div>
10
-                    <div class="infoP">门诊流水号:{{result.transBody.akc190}}</div>
11
-                    <div class="infoP">科别:{{全科}}</div>
12
-                    <div class="infoP">处方单据号:</div>
13
-                    <div class="infoP">姓名:{{patient_name}}</div>
14
-                    <div class="infoP">医疗账号:</div>
15
-                    <div class="infoP">医疗类别:普通</div>
2
+    <div id='prescriptionPrint'>
3
+        <div id='prescription-print' class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
4
+
5
+            <div style="display:flex;justify-content: space-between;font-weight:bold;align-items:center;">
6
+                <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
7
+                    <span>费别</span>
8
+                    <span>自费</span>
9
+                    <span>公费</span>
10
+                    <span>保险</span>
11
+                    <span>其他</span>
16 12
                 </div>
17
-                <div class="chargeBox">
18
-                    <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;">
19
-                        <div class="chargeUl" style="width:20%;">
20
-                            <p style="width:50%;border-right:1px solid #000;">费用类型</p>
21
-                            <p style="width:50%;border-right:1px solid #000;">金额</p>
22
-                        </div>
23
-                        <div class="chargeUl" style="width:80%;">
24
-                            <p style="width:40%;border-right:1px solid #000;">明细名称</p>
25
-                            <p style="width:15%;border-right:1px solid #000;">规格</p>
26
-                            <p style="width:15%;border-right:1px solid #000;">数量</p>
27
-                            <p style="width:15%;border-right:1px solid #000;">单价</p>
28
-                            <p style="width:15%;">金额</p>
29
-                        </div>
30
-                    </div>
31
-                    <div style="display:flex;justify-content: space-between;">
32
-                        <div style="width:20%;">
33
-                            <div class="chargeUl" v-for="(item,index) in result.transBody.outputlist2" :key="index">
34
-                                <p style="width:50%;">{{getItemName(item.aka111)}}</p>
35
-                                <p style="width:50%;">{{item.bka058}}</p>
36
-                            </div>
37
-                            <div class="chargeUl" style="border-top:1px solid #000;">
38
-                                <p style="width:50%;">费用合计</p>
39
-                                <p style="width:50%;">{{result.transBody.akc264}}</p>
40
-                            </div>
41
-                            <div class="chargeUl" style="border-top:1px solid #000;">
42
-                                <p style="width:50%;">记账支付</p>
43
-                                <p style="width:50%;">{{result.transBody.akb068}}</p>
44
-                            </div>
45
-                            <div class="chargeUl" style="border-top:1px solid #000;">
46
-                                <p style="width:50%;">个人账号</p>
47
-                                <p style="width:50%;">{{result.transBody.akc264}}</p>
48
-                            </div>
49
-                            <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
50
-                                <p style="width:50%;">现金支付</p>
51
-                                <p style="width:50%;">{{result.transBody.akb067}}</p>
52
-                            </div>
53
-                        </div>
54
-                        <div style="width:80%;display:flex;height:300px;">
55
-
56
-                            <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
57
-                                <p v-for="(item,i) in name_arr" :key="i" class="chargeP">
58
-                                    {{item}}</p>
59
-                            </div>
60
-                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
61
-                                <p v-for="(item,y) in spec_arr" :key="y" class="chargeP">
62
-                                    {{item}}</p>
63
-                            </div>
64
-                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
65
-                                <p v-for="(item,z) in count_arr" :key="z" class="chargeP">
66
-                                    {{item}}次</p>
67
-                            </div>
68
-                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
69
-                                <p v-for="(item,f) in price_arr" :key="f" class="chargeP">{{item}}</p>
70
-                            </div>
71
-                            <div style="width:15%;text-align:center;">
72
-                                <p v-for="(item,d) in total_arr" :key="d" class="chargeP">{{item}}</p>
73
-                            </div>
74
-                        </div>
75
-                    </div>
13
+                <div>就诊日期:{{getTime(item.ctime,'{y}-{m}-{d}')}}</div>
14
+            </div>
15
+
16
+            <div class="printTitle">{{orgname}}</div>
17
+            <div class="printTitle">处方、治疗单</div>
76 18
 
19
+            <div class="infoTitle">
20
+                <div>门诊编号:</div>
21
+                <div>电脑号:</div>
22
+            </div>
23
+
24
+            <div class="infoMain">
25
+                <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
26
+                <div style="margin-bottom: 10px;width:25%">性别:
27
+                    <span v-if="item.patient.gender == 1">男</span>
28
+                    <span v-if="item.patient.gender == 2">女</span>
77 29
                 </div>
78
-                <div class="moneyBox">
79
-                    <p>实收金:{{result.transBody.akc264}}</p>
80
-                    <p>记账前金额:{{0.00}}</p>
81
-                    <p>扣款金额:{{0.00}}</p>
82
-                    <p>记账后金额:{{0.00}}</p>
83
-                    <p>找赎金:{{0.00}}</p>
30
+                <div style="margin-bottom: 10px;width:25%">年龄:
31
+                    <span>{{getAge(item.patient)?getAge(item.patient):""}}</span>
84 32
                 </div>
85
-                <div class="actionBar">
86
-                    <div>收费员:{{doctor_name}}</div>
87
-                    <div>日期:{{this.$route.query.record_date}}</div>
33
+                <div style="margin-bottom: 10px;width:25%">参保类型:{{hisPatient.social_type?hisPatient.social_type:''}}
88 34
                 </div>
35
+                <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
36
+                <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
37
+                <div style="width:100%;">诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
89 38
             </div>
90 39
 
91
-            <div v-else>
92
-                <div class="printTitle">{{orgname}}&nbsp;&nbsp;医药费收据及收费项目清单</div>
93
-                <div class="infoMain">
94
-                    <div class="infoP">医院(药店)编号:</div>
95
-                    <div class="infoP">名称:{{orgname}}</div>
96
-                    <div class="infoP">医生工号:</div>
97
-                    <div class="infoP">门诊流水号:</div>
98
-                    <div class="infoP">科别:{{list.p_info.departments?list.p_info.departments:''}}</div>
99
-                    <div class="infoP">处方单据号:</div>
100
-                    <div class="infoP">姓名:{{patient.name}}</div>
101
-                    <div class="infoP">医疗账号:</div>
102
-                    <div class="infoP">医疗类别:普通</div>
103
-                </div>
104
-                <div class="chargeBox">
105
-                    <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;">
106
-                        <div class="chargeUl" style="width:20%;">
107
-                            <p style="width:50%;border-right:1px solid #000;">费用类型</p>
108
-                            <p style="width:50%;border-right:1px solid #000;">金额</p>
109
-                        </div>
110
-                        <div class="chargeUl" style="width:80%;">
111
-                            <p style="width:40%;border-right:1px solid #000;">明细名称</p>
112
-                            <p style="width:15%;border-right:1px solid #000;">规格</p>
113
-                            <p style="width:15%;border-right:1px solid #000;">数量</p>
114
-                            <p style="width:15%;border-right:1px solid #000;">单价</p>
115
-                            <p style="width:15%;">金额</p>
40
+            <div class="prescriptionBox">
41
+                <table style="width:100%;text-align:center;line-height:25px;">
42
+                    <tr>
43
+                        <td>序号</td>
44
+                        <td>项目名称</td>
45
+                        <td>数量</td>
46
+                        <td>单位</td>
47
+                        <td>单价</td>
48
+                        <td>部位</td>
49
+                        <td>备注</td>
50
+                        <td>天数</td>
51
+                    </tr>
52
+                    <tr v-for="(it,index) in item.project" :key="index">
53
+                        <td>{{index+1}}</td>
54
+                        <td>{{it.type == 2 ? it.project.project_name : it.good_info.good_name}}</td>
55
+                        <td>{{it.single_dose}}</td>
56
+                        <td>{{getUnit(it.unit)}}</td>
57
+                        <td>{{it.price}}</td>
58
+                        <td></td>
59
+                        <td>{{it.remark}}</td>
60
+                        <td>{{it.day}}</td>
61
+
62
+                    </tr>
63
+
64
+                    <tr v-for="(it,index) in item.advices" :key="index">
65
+                        <td>{{index+1}}</td>
66
+                        <td>{{it.advice_name?it.advice_name:''}}</td>
67
+                        <td>{{it.single_dose?it.single_dose:''}}</td>
68
+                        <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
69
+                        <td>{{it.price}}</td>
70
+                        <td></td>
71
+                        <td>{{it.remark}}</td>
72
+                        <td>{{it.day}}</td>
73
+
74
+                    </tr>
75
+                </table>
76
+            </div>
77
+
78
+            <div class="infoTitle">
79
+                <div>开单医生:{{item.doctor?item.doctor:''}}</div>
80
+                <div>签章:</div>
81
+            </div>
82
+
83
+            <div class="actionBar">
84
+                <div>执行医生:{{item.doctor?item.doctor:''}}</div>
85
+                <div>费用:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}元</div>
86
+            </div>
87
+
88
+            <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
89
+                <tr>
90
+                    <td style="width:16%;">治疗时间</td>
91
+                    <td style="width:16%;"></td>
92
+                    <td style="width:16%;"></td>
93
+                    <td style="width:16%;"></td>
94
+                    <td style="width:16%;"></td>
95
+                    <td style="width:16%;"></td>
96
+                </tr>
97
+                <tr>
98
+                    <td style="width:16%;">医生签字</td>
99
+                    <td style="width:16%;"></td>
100
+                    <td style="width:16%;"></td>
101
+                    <td style="width:16%;"></td>
102
+                    <td style="width:16%;"></td>
103
+                    <td style="width:16%;"></td>
104
+                </tr>
105
+                <tr>
106
+                    <td style="width:16px;">患者签字</td>
107
+                    <td style="width:16px;"></td>
108
+                    <td style="width:16px;"></td>
109
+                    <td style="width:16px;"></td>
110
+                    <td style="width:16px;"></td>
111
+                    <td style="width:16px;"></td>
112
+                </tr>
113
+            </table>
114
+        </div>
115
+
116
+
117
+        <!-- <div id='prescriptionPrint'>
118
+
119
+            <div v-for="(item,index) in advicePrint" :key="index">
120
+                <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
121
+                    <div style="display:flex;justify-content: space-between;font-weight:bold;">
122
+                        <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
123
+                            <span>费别</span>
124
+                            <span>自费</span>
125
+                            <span>公费</span>
126
+                            <span>保险</span>
127
+                            <span>其他</span>
116 128
                         </div>
129
+                        <div>就诊日期:{{getTime(item.ctime)}}</div>
117 130
                     </div>
118
-                    <div style="display:flex;justify-content: space-between;">
119
-                        <div style="width:20%;">
120
-                            <div class="chargeUl" v-for="(item,index) in 1" :key="index">
121
-                                <p style="width:50%;">材料费</p>
122
-                                <p style="width:50%;"></p>
123
-                            </div>
124
-                            <div class="chargeUl" style="border-top:1px solid #000;">
125
-                                <p style="width:50%;">费用合计</p>
126
-                                <p style="width:50%;">
127
-                                    {{list.order_info.medfee_sumamt?list.order_info.medfee_sumamt:''}}</p>
128
-                            </div>
129
-                            <div class="chargeUl" style="border-top:1px solid #000;">
130
-                                <p style="width:50%;">记账支付</p>
131
-                                <p style="width:50%;"></p>
132
-                            </div>
133
-                            <div class="chargeUl" style="border-top:1px solid #000;">
134
-                                <p style="width:50%;">个人账号</p>
135
-                                <p style="width:50%;"></p>
136
-                            </div>
137
-                            <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
138
-                                <p style="width:50%;">现金支付</p>
139
-                                <p style="width:50%;">{{list.order_info.psn_cash_pay}}</p>
140
-                            </div>
131
+
132
+                    <div class="printTitle">血液透析中心</div>
133
+
134
+                    <div class="printTitle">处方、治疗单</div>
135
+
136
+                    <div class="infoTitle">
137
+                        <div>门诊编号:</div>
138
+                        <div>电脑号:</div>
139
+                    </div>
140
+
141
+                    <div class="infoMain">
142
+                        <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
143
+                        <div style="margin-bottom: 10px;width:25%">性别:
144
+                            <span v-if="item.patient.gender == 1">男</span>
145
+                            <span v-if="item.patient.gender == 2">女</span>
141 146
                         </div>
142
-                        <div style="width:80%;display:flex;height:300px;">
143
-
144
-                            <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
145
-                                <p v-for="(item,i) in prescription[0].advices" :key="i" class="chargeP">
146
-                                    {{item.advice_name}}</p>
147
-                            </div>
148
-                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
149
-                                <p v-for="(item,y) in prescription[0].advices" :key="y" class="chargeP">
150
-                                    {{item.advice_desc}}</p>
151
-                            </div>
152
-                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
153
-                                <p v-for="(item,z) in prescription[0].advices" :key="z" class="chargeP">
154
-                                    {{item.single_dose}}个</p>
155
-                            </div>
156
-                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
157
-                                <p v-for="(item,f) in prescription[0].advices" :key="f" class="chargeP">
158
-                                    {{item.price}}</p>
159
-                            </div>
160
-                            <div style="width:15%;text-align:center;">
161
-                                <p v-for="(item,d) in prescription[0].advices" :key="d" class="chargeP">
162
-                                    {{item.single_dose *
163
-                                    item.price}}</p>
164
-                            </div>
147
+                        <div style="margin-bottom: 10px;width:25%">年龄:
148
+                            <span>{{item.patient.age}}</span>
165 149
                         </div>
150
+                        <div style="margin-bottom: 10px;width:25%">参保类型:</div>
151
+                        <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
152
+                        <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
153
+                        <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
166 154
                     </div>
167 155
 
156
+                    <div class="prescriptionBox">
157
+                        <table style="width:100%;text-align:center;line-height:25px;">
158
+                            <tr>
159
+                                <td>序号</td>
160
+                                <td>项目名称</td>
161
+                                <td>数量</td>
162
+                                <td>单位</td>
163
+                                <td>单价</td>
164
+                                <td>部位</td>
165
+                                <td>备注</td>
166
+                                <td>天数</td>
167
+                            </tr>
168
+                            <tr v-for="(it,index) in item.project" :key="index">
169
+                                <td>{{index+1}}</td>
170
+                                <td>{{getProjectName(it.project_id)}}</td>
171
+                                <td>{{it.single_dose}}</td>
172
+                                <td>{{getUnit(it.unit)}}</td>
173
+                                <td>{{it.price}}</td>
174
+                                <td></td>
175
+                                <td>{{it.remark}}</td>
176
+                                <td>{{it.day}}</td>
177
+
178
+                            </tr>
179
+                        </table>
180
+                    </div>
181
+                    <div class="infoTitle">
182
+                        <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
183
+                        <div>签章:</div>
184
+                    </div>
185
+                    <div class="actionBar">
186
+                        <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
187
+                        <div>费用:</div>
188
+                    </div>
189
+                    <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
190
+                        <tr>
191
+                            <td style="width:16%;">治疗时间</td>
192
+                            <td style="width:16%;"></td>
193
+                            <td style="width:16%;"></td>
194
+                            <td style="width:16%;"></td>
195
+                            <td style="width:16%;"></td>
196
+                            <td style="width:16%;"></td>
197
+                        </tr>
198
+                        <tr>
199
+                            <td style="width:16%;">医生签字</td>
200
+                            <td style="width:16%;"></td>
201
+                            <td style="width:16%;"></td>
202
+                            <td style="width:16%;"></td>
203
+                            <td style="width:16%;"></td>
204
+                            <td style="width:16%;"></td>
205
+                        </tr>
206
+                        <tr>
207
+                            <td style="width:16px;">患者签字</td>
208
+                            <td style="width:16px;"></td>
209
+                            <td style="width:16px;"></td>
210
+                            <td style="width:16px;"></td>
211
+                            <td style="width:16px;"></td>
212
+                            <td style="width:16px;"></td>
213
+                        </tr>
214
+                    </table>
168 215
                 </div>
169
-                <div class="moneyBox">
170
-                    <p>实收金:{{list.order_info.medfee_sumamt?list.order_info.medfee_sumamt:''}}</p>
171
-                    <p>记账前金额:{{list.order_info.preselfpay_amt?list.order_info.preselfpay_amt:''}}</p>
172
-                    <p>扣款金额:</p>
173
-                    <p>记账后金额:</p>
174
-                    <p>找赎金:</p>
175
-                </div>
176
-                <div class="actionBar">
177
-                    <div>收费员:{{}}</div>
178
-                    <div>日期:{{this.$route.query.record_date}}</div>
179
-                </div>
216
+
180 217
             </div>
181
-        </div>
182
-    </div>
183 218
 
219
+        </div> -->
220
+    </div>
184 221
 </template>
185 222
 <script>
186
-  import axios from 'axios'
187
-  import { getChargePrint } from '@/api/project/project'
223
+  import { jsGetAge, uParseTime } from '@/utils/tools'
224
+  import { getAllDoctorList, getPrescriptionPrint } from '@/api/project/project'
225
+  import { getInitData } from '@/api/his/his'
188 226
 
189 227
   export default {
228
+    props: {
229
+      patient_id: Number,
230
+      record_date: String,
231
+      prescription_id: Number,
232
+      ids: String
233
+    },
190 234
     data() {
191 235
       return {
192
-        list: {},
193
-        prescription: [],
236
+        doctorList: [],
237
+        advicePrint: {},
194 238
         patient: {},
195
-        orgname: '',
196
-
197
-        result: {},
198
-        org_code: '',
199
-        patient_name: '',
200
-        doctor_code: '',
201
-        doctor_name: '',
202
-
203
-        name_arr: [],
204
-        spec_arr: [],
205
-        count_arr: [],
206
-        price_arr: [],
207
-        total_arr: []
208
-
239
+        tableData: [],
240
+        prescriptionInfo: [],
241
+        projectList: [],
242
+        prescriptions: [],
243
+        settlement:
244
+          [
245
+            { value: 1, label: '医保' },
246
+            { value: 2, label: '自费' },
247
+            { value: 3, label: '公费' },
248
+            { value: 4, label: '农保' },
249
+            { value: 5, label: '会员' },
250
+            { value: 6, label: '职工' },
251
+            { value: 7, label: '合同' },
252
+            { value: 8, label: '医保自费' }
253
+
254
+          ],
255
+        hisPatient: {},
256
+        diagnoses: []
209 257
       }
210 258
     },
211
-    props: {
212
-      paramsObj: Object
213
-    },
214 259
     methods: {
215
-      getItemName(number) {
216
-        switch (number) {
217
-          case '01':
218
-            return '床位费';
219
-            break;
220
-          case '02':
221
-            return '西药费';
222
-
223
-            break;
224
-          case '03':
225
-            return '中药费';
226
-
227
-            break;
228
-          case '04':
229
-            return '中成药费';
230
-
231
-            break;
232
-          case '05':
233
-            return '中草药费';
234
-
235
-            break;
236
-          case '06':
237
-            return '检查费';
238
-
239
-            break;
240
-          case '07':
241
-            return '治疗费';
242
-
243
-            break;
244
-          case '08':
245
-            return '放射费';
246
-
247
-            break;
248
-          case '09':
249
-            return '手术费';
250
-
251
-            break;
252
-          case '10':
253
-            return '化验费';
254
-
255
-            break;
256
-          case '11':
257
-            return '输血费';
258
-
259
-            break;
260
-          case '12':
261
-            return '输氧费';
262
-
263
-            break;
264
-          case '13':
265
-            return '其它费';
266
-
267
-            break;
268
-          case '14':
269
-            return '麻醉费';
270
-
271
-            break;
272
-          case '15':
273
-            return '材料费';
274
-
275
-            break;
276
-          case '16':
277
-            return '特殊检查费';
278
-
279
-            break;
280
-          case '17':
281
-            return '特殊治疗费';
282
-
283
-            break;
284
-          case '18':
285
-            return '诊疗费(诊查费)';
286
-
287
-            break;
288
-          case '19':
289
-            return '护理费';
290
-
291
-            break;
292
-          case '20':
293
-            return '诊金';
294
-
295
-            break;
296
-          case '21':
297
-            return '检查费(CT)';
298
-
299
-            break;
300
-          case '22':
301
-            return '检查费(MRT)';
302
-
303
-            break;
304
-          case '23':
305
-            return '检查费(其他)';
306
-
307
-            break;
308
-          case '24':
309
-            return '特需服务费';
310
-
311
-            break;
312
-          case '25':
313
-            return '杂费';
314
-
315
-            break;
316
-          case '26':
317
-            return '挂号费';
318
-            break
319
-
260
+      getAge(patient){
261
+        var thisLen = patient.id_card_no.length
262
+        var birth = ''
263
+        if (thisLen == 15) {
264
+          birth = '19' + patient.id_card_no.substr(6, 6)
265
+        } else {
266
+          birth = patient.id_card_no.substr(6, 8)
320 267
         }
268
+        var births =
269
+          birth.substr(0, 4) +
270
+          '-' +
271
+          birth.substr(4, 2) +
272
+          '-' +
273
+          birth.substr(6, 2)
274
+        return jsGetAge(births, '-')
321 275
 
322 276
       },
323
-      getChargePrint(record_date, patient_id, prescription_id) {
324
-        var params = {
325
-          record_date: record_date,
326
-          patient_id: patient_id,
327
-          prescription_id: prescription_id
328
-        };
329
-        console.log('params', params);
330
-        getChargePrint(params).then(response => {
277
+      printThisPage() {
278
+        var ptime = Math.round(new Date().getTime() / 1000)
279
+        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
280
+
281
+        const style =
282
+          '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 1px;padding:0 10px;}.infoTitle p{width: 200px;}.otherInfo{display: flex;margin-top:10px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle p{width: 200px;}}'
283
+        printJS({
284
+          printable: 'prescription-print',
285
+          type: 'html',
286
+          style: style,
287
+          scanStyles: false
288
+        })
289
+      },
290
+      getAllDoctorList() {
291
+        getAllDoctorList().then(response => {
331 292
           if (response.data.state == 1) {
332
-            var list = response.data.data.list;
333
-            console.log('list9999999999', list);
334
-            this.list = list;
335
-            var prescription = response.data.data.prescription;
336
-            console.log('prescription', prescription);
337
-            this.prescription = prescription;
338
-            var patient = response.data.data.patient;
339
-            console.log('patient', patient);
340
-            this.patient = patient;
341
-            var histpatient = response.data.data.hisPatient;
342
-            console.log('hispatient', histpatient)
293
+            var doctor = response.data.data.doctor
294
+
295
+            this.doctorList = doctor
343 296
           }
344 297
         })
345
-      }
346
-    },
347
-    created() {
298
+      },
348 299
 
349
-      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
350
-        this.orgname = xtuser.org.org_name;
351
-        var form = {
352
-          'order_id': this.paramsObj.order_id,
353
-          'patient_id': this.paramsObj.patient_id,
354
-          'record_time': this.paramsObj.record_date,
355
-          'admin_user_id': this.$store.getters.xt_user.user.id
356
-        };
357
-        var that = this;
358
-        axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
359
-          params: form
300
+      getDoctor(id) {
301
+        var name = ''
302
+        for (let i = 0; i < this.doctorList.length; i++) {
303
+          if (id == this.doctorList[i].admin_user_id) {
304
+            name = this.doctorList[i].user_name
305
+          }
306
+        }
307
+        return name
308
+      },
309
+      getTime(value, temp) {
310
+        if (value != undefined) {
311
+          return uParseTime(value, temp)
312
+        }
313
+        return ''
314
+      },
315
+      getPrescriptionPrint() {
316
+        var params = {
317
+          patient_id: this.patient_id,
318
+          record_date: this.record_date,
319
+          prescription_id: this.prescription_id,
320
+          ids: this.ids
321
+        }
322
+        console.log('999999', params)
323
+        getPrescriptionPrint(params).then(response => {
324
+          if (response.data.state == 1) {
325
+            var advicePrint = response.data.data.advicePrint
326
+            console.log('adviceprint', advicePrint)
327
+            this.advicePrint = advicePrint
328
+            this.prescriptions = advicePrint
329
+            var projectlist = response.data.data.projectlist
330
+            console.log('所有项目列表', projectlist)
331
+            this.projectList = projectlist
332
+            this.hisPatient = response.data.data.hisPatient
333
+
334
+          }
360 335
         })
361
-          .then(function(response) {
362
-            if (response.data.state == 0) {
363
-              // that.$message.error(response.data.msg);
364
-              return false
365
-            } else {
366
-              if (response.data.data.failed_code == -10) {
367
-                that.$confirm(response.data.data.msg, '医保错误信息', {
368
-                  confirmButtonText: '确 定',
369
-                  type: 'warning'
370
-                }).then(() => {
371
-
372
-                }).catch(() => {
373
-                })
374
-              } else {
375
-                that.result = response.data.data.result;
376
-
377
-                that.org_code = response.data.data.org_code;
378
-                that.patient_name = response.data.data.patient_name;
379
-                that.doctor_code = response.data.data.doctor_code;
380
-                that.doctor_name = response.data.data.doctor_name;
381
-                that.name_arr = [];
382
-                that.spec_arr = [];
383
-                that.count_arr = [];
384
-                that.price_arr = [];
385
-                that.total_arr = [];
386
-                for (let i = 0; i < that.result.transBody.outputlist1.length; i++) {
387
-                  that.name_arr.push(that.result.transBody.outputlist1[i].ake006);
388
-                  that.spec_arr.push(that.result.transBody.outputlist1[i].aka074);
389
-                  that.count_arr.push(that.result.transBody.outputlist1[i].akc226);
390
-                  that.price_arr.push(that.result.transBody.outputlist1[i].akc225);
391
-                  that.total_arr.push(that.result.transBody.outputlist1[i].akc264)
392
-                }
336
+      },
337
+      getProjectName(id) {
338
+        var project_name = ''
339
+        for (let i = 0; i < this.projectList.length; i++) {
340
+          if (id == this.projectList[i].id) {
341
+            project_name = this.projectList[i].project_name
342
+          }
343
+        }
344
+        return project_name
345
+      },
346
+      getUnit(id) {
347
+        var unit = ''
348
+        for (let i = 0; i < this.projectList.length; i++) {
349
+          if (id == this.projectList[i].id) {
350
+            unit = this.projectList[i].unit
351
+          }
352
+        }
353
+        return unit
354
+      },
393 355
 
356
+      getTotalOne(id) {
357
+
358
+        var total = 0
359
+        var addtotal = 0
360
+        for (let i = 0; i < this.prescriptions.length; i++) {
361
+          if (id == this.prescriptions[i].id) {
362
+            if (this.prescriptions[i].project != null) {
363
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
364
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
394 365
               }
366
+            }
395 367
 
368
+            if (this.prescriptions[i].additionalcharge != null) {
369
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
370
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
371
+              }
396 372
             }
397
-          })
398
-          .catch(function(error) {
373
+            addtotal = Math.floor(addtotal * 100) / 100
374
+          }
399 375
 
400
-          })
376
+        }
401 377
 
402
-      } else {
403
-        var record_date = this.paramsObj.record_date;
404
-        console.log('record_date', record_date);
405
-        var patient_id = this.paramsObj.patient_id;
406
-        console.log('patient_id', patient_id);
407
-        var prescription_id = this.paramsObj.prescription_id;
408
-        this.getChargePrint(record_date, patient_id, prescription_id);
409
-        var xtuser = this.$store.getters.xt_user;
410
-        this.orgname = xtuser.org.org_name
378
+        for (let i = 0; i < this.prescriptions.length; i++) {
379
+          if (id == this.prescriptions[i].id) {
380
+            if (this.prescriptions[i].advices != null) {
381
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
382
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
383
+              }
384
+            }
385
+
386
+            if (this.prescriptions[i].additionalcharge != null) {
387
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
388
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
389
+              }
390
+            }
391
+            addtotal = Math.floor(addtotal * 100) / 100
392
+          }
393
+        }
411 394
 
395
+        return total + addtotal
396
+      },
397
+      getInitData() {
398
+        getInitData().then(response => {
399
+          if (response.data.state == 1) {
400
+            this.diagnoses = response.data.data.diagnose
401
+            console.log('争端', this.diagnoses)
402
+          }
403
+        })
404
+      },
405
+      getDiagnosis(id) {
406
+        var name = ''
407
+        for (let i = 0; i < this.diagnoses.length; i++) {
408
+          if (id == this.diagnoses[i].id) {
409
+            name = this.diagnoses[i].class_name
410
+          }
411
+        }
412
+        return name
412 413
       }
414
+    },
415
+    created() {
416
+      this.getInitData()
417
+      this.getAllDoctorList()
418
+      this.getPrescriptionPrint()
419
+      var xtuser = this.$store.getters.xt_user
420
+      this.orgname = xtuser.org.org_name
413 421
 
414 422
     },
415 423
     watch: {
416
-      paramsObj: {//深度监听,可监听到对象、数组的变化
417
-        handler(val, oldVal) {
418
-          this.paramsObj = val;
419
-          this.patient_id = this.paramsObj.patient_id;
420
-          var record_date = this.paramsObj.record;
421
-          this.record_date = record_date;
422
-          var prescription_id = this.paramsObj.prescription_id;
423
-          this.prescription_id = prescription_id
424
-
425
-        },
426
-        deep: true
424
+      patient_id: function(val) {
425
+        console.log('101000010101010', this.patient_id, this.record_date, this.prescription_id)
426
+        //    this.getPrescriptionPrint()
427
+      },
428
+      ids: function(val) {
429
+        this.ids = val
430
+        console.log('this.idsids', this.ids)
431
+        this.getPrescriptionPrint()
427 432
       }
428 433
     }
429 434
   }
@@ -439,53 +444,66 @@
439 444
         padding: 20px 10px;
440 445
     }
441 446
 
447
+    .prescription-print {
448
+        font-size: 14px;
449
+    }
450
+
442 451
     .printTitle {
443
-        font-size: 22px;
452
+        font-size: 18px;
444 453
         text-align: center;
445 454
         font-weight: bold;
455
+        margin-top: 10px;
456
+    }
457
+
458
+    .infoTitle {
459
+        display: flex;
460
+        border-bottom: 2px solid #000;
461
+        margin-top: 10px;
462
+        line-height: 24px;
463
+        padding: 0 10px;
464
+    }
465
+
466
+    .infoTitle div {
467
+        width: 300px;
446 468
     }
447 469
 
448 470
     .infoMain {
449 471
         display: flex;
450 472
         flex-wrap: wrap;
473
+        border-bottom: 2px solid #000;
451 474
         padding: 0 10px;
452
-        margin-top: 10px;
453 475
     }
454 476
 
455
-    .infoMain .infoP {
456
-        width: 33%;
477
+    .infoMain div {
478
+        width: 50%;
457 479
         line-height: 24px;
458 480
     }
459 481
 
460
-    .chargeBox {
461
-        border: 1px solid #000;
482
+    .prescriptionBox {
483
+        padding: 0 10px;
484
+        min-height: 600px;
462 485
     }
463 486
 
464
-    .chargeUl {
465
-        display: flex;
466
-        justify-content: space-between;
467
-        text-align: center;
487
+    .Rp {
488
+        font-size: 22px;
489
+        font-weight: bold;
468 490
     }
469 491
 
470
-    .chargeUl p {
471
-        height: 40px;
472
-        line-height: 40px;
492
+    .drugsBox {
493
+        padding-left: 40px;
494
+        margin-bottom: 10px;
473 495
     }
474 496
 
475
-    .chargeP {
476
-        height: 40px;
477
-        line-height: 40px;
497
+    .drugsBox p {
498
+        line-height: 30px;
478 499
     }
479 500
 
480
-    .moneyBox {
481
-        display: flex;
482
-        justify-content: space-between;
483
-        padding: 0 10px;
484
-        background: #eee;
485
-        height: 40px;
486
-        align-items: center;
487
-        border: 1px solid #000;
488
-        border-top: none
501
+    .drugsOne {
502
+        line-height: 24px;
503
+    }
504
+
505
+    .drugsOne span {
506
+        margin-right: 20px;
489 507
     }
490 508
 
491 509
     .actionBar {

+ 618 - 0
src/xt_pages/hospitalStation/treatTemplate/printTwo.vue Datei anzeigen

@@ -0,0 +1,618 @@
1
+<template>
2
+   <div id='prescriptionPrint2'>
3
+    <div id='prescription-print' v-if="item.advices.length == 0" class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
4
+
5
+        <img src="https://kuyi.shengws.com/bailin/bltotle.jpg" style="width:100%" alt="">
6
+        <div class="printTitle">治疗单
7
+          <span v-if="item.med_type == '1111'" style="margin-left: 50px;border: 1px solid #000;">精一</span>
8
+          <span v-if="item.med_type == '1112'" style="margin-left: 50px;border: 1px solid #000;">精二</span>
9
+        </div>
10
+        <div style="display:flex;">
11
+            <div style="width:33%;display:flex;">费别:<span class="under_line">{{ faber && faber.transBody ? getName(faber.transBody.outputlist1) : '自费' }}</span></div>
12
+            <div style="width:33%;display:flex;">电脑号:<span class="under_line">{{ faber && faber.transBody ? faber.transBody.aac999 : ''  }}</span></div>
13
+            <div style="width:33%;display:flex;">处方编号:<span class="under_line">{{ item.prescription_number.substring(item.prescription_number.length-6) }}</span></div>
14
+        </div>
15
+
16
+
17
+        <div class="infoTitle">
18
+            <div>姓名:{{item.patient.name? item.patient.name.indexOf("(") > -1 ? item.patient.name.substring(0,item.patient.name.indexOf("(")) : item.patient.name :""}}</div>
19
+            <div>性别:
20
+            <span v-if="item.patient.gender == 1">男</span>
21
+            <span v-if="item.patient.gender == 2">女</span>
22
+            </div>
23
+            <div>年龄:{{getAge(item.patient)?getAge(item.patient):""}}岁</div>
24
+        </div>
25
+        <div class="infoMain">
26
+            <div style="margin-bottom: 10px;display:flex;">门诊号码:<span class="under_line">{{hisPatient.number?hisPatient.number:""}}</span></div>
27
+            <div style="margin-bottom: 10px;display:flex;">科别:<span class="under_line">{{item.info?getDepart(item.info.departments):''}}</span></div>
28
+            <div style="margin-bottom: 10px;display:flex;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
29
+            <div style="margin-bottom: 10px;display:flex;">自费药品签名:<span class="under_line"></span></div>
30
+            <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
31
+            <div style="margin-bottom: 10px;display:flex;">联系方式:<span class="under_line">{{item.patient.phone}}</span></div>
32
+            <div style="margin-bottom: 10px;display:flex;">开具日期:<span class="under_line">{{getTime(item.pre_time) ? getTime(item.pre_time).split(' ')[0] : ''}}</span></div>
33
+            <!-- <div>地址:{{item.patient.home_address}}</div> -->
34
+            <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
35
+        </div>
36
+
37
+        <!-- <div class="prescriptionBox">
38
+            <table style="width:100%;text-align:center;line-height:25px;">
39
+                <tr>
40
+                    <td>序号</td>
41
+                    <td>项目名称</td>
42
+                    <td>数量</td>
43
+                    <td>单位</td>
44
+                    <td>单价</td>
45
+                    <td>部位</td>
46
+                    <td>备注</td>
47
+                    <td>天数</td>
48
+                </tr>
49
+                <tr v-for="(it,index) in item.project" :key="index">
50
+                    <td>{{index+1}}</td>
51
+                    <td>{{it.type == 2 ?getProjectName(it.project_id):it.good_info.good_name}}</td>
52
+                    <td>{{it.single_dose}}</td>
53
+                    <td>{{getUnit(it.unit)}}</td>
54
+                    <td>{{it.price}}</td>
55
+                    <td></td>
56
+                    <td>{{it.remark}}</td>
57
+                    <td>{{it.day}}</td>
58
+
59
+                </tr>
60
+
61
+                <tr v-for="(it,index) in item.advices" :key="index">
62
+                    <td>{{index+1}}</td>
63
+                    <td>{{it.advice_name?it.advice_name:''}}</td>
64
+                    <td>{{it.single_dose?it.single_dose:''}}</td>
65
+                    <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
66
+                    <td>{{it.price}}</td>
67
+                    <td></td>
68
+                    <td>{{it.remark}}</td>
69
+                    <td>{{it.day}}</td>
70
+
71
+                </tr>
72
+            </table>
73
+        </div> -->
74
+        <div class="prescriptionBox">
75
+              <div class="Rp">Rp:</div>
76
+              <!-- <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
77
+                  <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>
78
+              </div> -->
79
+              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
80
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{ it.type == 2 ? it.project.project_name : it.good_info.good_name }}&nbsp;&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
81
+              </div>
82
+              <div style="text-align:center;" >(以下空白)</div>
83
+        </div>
84
+        <div style="display:flex;">
85
+            <div>医&nbsp;&nbsp;&nbsp;&nbsp;师:<span style="width:100px;display:inline-block;">{{item.doctor?item.doctor:""}}</span></div>
86
+            <!-- <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}</div> -->
87
+          </div>
88
+          <div style="display:flex;">
89
+            <div style="display:flex;">核对护士:</div>
90
+          </div>
91
+          <div style="display:flex;">
92
+            打印时间:<span style="border-bottom:1px solid #000;">{{getTime(new Date())?getTime(new Date()):""}}</span>
93
+          </div>
94
+          <img src="https://kuyi.shengws.com/bailin/blend.jpg" style="width:100%" alt="">
95
+          <div style="page-break-after:always"></div>
96
+     </div>
97
+
98
+
99
+    <!-- <div id='prescriptionPrint'>
100
+
101
+        <div v-for="(item,index) in advicePrint" :key="index">
102
+            <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
103
+                <div style="display:flex;justify-content: space-between;font-weight:bold;">
104
+                    <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
105
+                        <span>费别</span>
106
+                        <span>自费</span>
107
+                        <span>公费</span>
108
+                        <span>保险</span>
109
+                        <span>其他</span>
110
+                    </div>
111
+                    <div>就诊日期:{{getTime(item.ctime)}}</div>
112
+                </div>
113
+
114
+                <div class="printTitle">血液透析中心</div>
115
+
116
+                <div class="printTitle">处方、治疗单</div>
117
+
118
+                <div class="infoTitle">
119
+                    <div>门诊编号:</div>
120
+                    <div>电脑号:</div>
121
+                </div>
122
+
123
+                <div class="infoMain">
124
+                    <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
125
+                    <div style="margin-bottom: 10px;width:25%">性别:
126
+                        <span v-if="item.patient.gender == 1">男</span>
127
+                        <span v-if="item.patient.gender == 2">女</span>
128
+                    </div>
129
+                    <div style="margin-bottom: 10px;width:25%">年龄:
130
+                        <span>{{item.patient.age}}</span>
131
+                    </div>
132
+                    <div style="margin-bottom: 10px;width:25%">参保类型:</div>
133
+                    <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
134
+                    <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
135
+                    <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
136
+                </div>
137
+
138
+                <div class="prescriptionBox">
139
+                    <table style="width:100%;text-align:center;line-height:25px;">
140
+                        <tr>
141
+                            <td>序号</td>
142
+                            <td>项目名称</td>
143
+                            <td>数量</td>
144
+                            <td>单位</td>
145
+                            <td>单价</td>
146
+                            <td>部位</td>
147
+                            <td>备注</td>
148
+                            <td>天数</td>
149
+                        </tr>
150
+                        <tr v-for="(it,index) in item.project" :key="index">
151
+                            <td>{{index+1}}</td>
152
+                            <td>{{getProjectName(it.project_id)}}</td>
153
+                            <td>{{it.single_dose}}</td>
154
+                            <td>{{getUnit(it.unit)}}</td>
155
+                            <td>{{it.price}}</td>
156
+                            <td></td>
157
+                            <td>{{it.remark}}</td>
158
+                            <td>{{it.day}}</td>
159
+
160
+                        </tr>
161
+                    </table>
162
+                </div>
163
+                <div class="infoTitle">
164
+                    <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
165
+                    <div>签章:</div>
166
+                </div>
167
+                <div class="actionBar">
168
+                    <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
169
+                    <div>费用:</div>
170
+                </div>
171
+                <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
172
+                    <tr>
173
+                        <td style="width:16%;">治疗时间</td>
174
+                        <td style="width:16%;"></td>
175
+                        <td style="width:16%;"></td>
176
+                        <td style="width:16%;"></td>
177
+                        <td style="width:16%;"></td>
178
+                        <td style="width:16%;"></td>
179
+                    </tr>
180
+                    <tr>
181
+                        <td style="width:16%;">医生签字</td>
182
+                        <td style="width:16%;"></td>
183
+                        <td style="width:16%;"></td>
184
+                        <td style="width:16%;"></td>
185
+                        <td style="width:16%;"></td>
186
+                        <td style="width:16%;"></td>
187
+                    </tr>
188
+                    <tr>
189
+                        <td style="width:16px;">患者签字</td>
190
+                        <td style="width:16px;"></td>
191
+                        <td style="width:16px;"></td>
192
+                        <td style="width:16px;"></td>
193
+                        <td style="width:16px;"></td>
194
+                        <td style="width:16px;"></td>
195
+                    </tr>
196
+                </table>
197
+            </div>
198
+
199
+        </div>
200
+
201
+    </div> -->
202
+  </div>
203
+</template>
204
+<script>
205
+import { jsGetAge, uParseTime } from '@/utils/tools'
206
+import {getAllDoctorList,getPrescriptionPrint} from "@/api/project/project"
207
+import {getInitData} from "@/api/his/his"
208
+export default {
209
+    props:{
210
+      patient_id:Number,
211
+      record_date:String,
212
+      prescription_id:Number,
213
+      ids:String
214
+    },
215
+    data(){
216
+      return {
217
+        doctorList:[],
218
+        advicePrint:{},
219
+        patient:{},
220
+        tableData:[],
221
+        prescriptionInfo:[],
222
+        projectList:[],
223
+        prescriptions:[],
224
+        settlement:
225
+         [
226
+          {value: 1,label: '医保'},
227
+          {value: 2,label: '自费'},
228
+          {value: 3,label:'公费'},
229
+          {value: 4,label:'农保'},
230
+          {value: 5,label:'会员'},
231
+          {value: 6,label:'职工'},
232
+          {value: 7,label:'合同'}
233
+         ],
234
+         hisPatient:{},
235
+         diagnoses:[],
236
+         department:[],
237
+         faber:{},
238
+      }
239
+    },
240
+   methods:{
241
+     getAge(patient){
242
+       var thisLen = patient.id_card_no.length
243
+       var birth = ''
244
+       if (thisLen == 15) {
245
+         birth = '19' + patient.id_card_no.substr(6, 6)
246
+       } else {
247
+         birth = patient.id_card_no.substr(6, 8)
248
+       }
249
+       var births =
250
+         birth.substr(0, 4) +
251
+         '-' +
252
+         birth.substr(4, 2) +
253
+         '-' +
254
+         birth.substr(6, 2)
255
+       return jsGetAge(births, '-')
256
+
257
+     },
258
+     printThisPage() {
259
+      var ptime = Math.round(new Date().getTime() / 1000);
260
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
261
+
262
+      const style =
263
+        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 1px;padding:0 10px;}.infoTitle p{width: 200px;}.otherInfo{display: flex;margin-top:10px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle p{width: 200px;}}';
264
+      printJS({
265
+        printable: "prescription-print",
266
+        type: "html",
267
+        style: style,
268
+        scanStyles: false
269
+      });
270
+    },
271
+    getDepart(id){
272
+        var name = ""
273
+        for(let i=0;i<this.department.length;i++){
274
+            if(id == this.department[i].id){
275
+                name = this.department[i].name
276
+            }
277
+        }
278
+        return name
279
+    },
280
+     getAllDoctorList(){
281
+      getAllDoctorList().then(response=>{
282
+        if(response.data.state == 1){
283
+               var doctor =  response.data.data.doctor
284
+
285
+               this.doctorList = doctor
286
+             }
287
+         })
288
+     },
289
+
290
+      getDoctor(id){
291
+        var name = ""
292
+        for(let i=0;i<this.doctorList.length;i++){
293
+          if(id == this.doctorList[i].admin_user_id){
294
+              name = this.doctorList[i].user_name
295
+          }
296
+        }
297
+        return name
298
+      },
299
+      getTime(value, temp) {
300
+        if (value != undefined) {
301
+            return uParseTime(value, temp)
302
+        }
303
+        return ''
304
+     },
305
+     getPrescriptionPrint(){
306
+         var params = {
307
+          patient_id:this.patient_id,
308
+          record_date:this.record_date,
309
+          prescription_id:this.prescription_id,
310
+          ids:this.ids,
311
+        }
312
+        console.log("999999",params)
313
+       getPrescriptionPrint(params).then(response=>{
314
+         if(response.data.state == 1){
315
+            var advicePrint =  response.data.data.advicePrint
316
+            console.log("adviceprint",advicePrint)
317
+            this.advicePrint = advicePrint
318
+            this.prescriptions = advicePrint
319
+            var projectlist =  response.data.data.projectlist
320
+            console.log("所有项目列表",projectlist)
321
+            this.projectList = projectlist
322
+            this.hisPatient = response.data.data.hisPatient
323
+
324
+            let projectPrint = []
325
+            let total = 0
326
+            this.advicePrint.map(item => {
327
+              console.log(item.project.length)
328
+              if(item.project.length > 0){
329
+                for(var i=item.project.length-1;i>=0;i--){
330
+                  if(item.project[i].type==2){
331
+                    if(item.project[i].project.cost_classify == 3){
332
+                      item.project.splice(i,1);
333
+                    }
334
+                  }
335
+                }
336
+              }
337
+            })
338
+
339
+            let outputlist1Name = JSON.parse(response.data.data.his.patient_info);
340
+            this.faber = outputlist1Name
341
+
342
+          }
343
+       })
344
+     },
345
+     getProjectName(id){
346
+        var project_name = ""
347
+        for(let i=0;i<this.projectList.length;i++){
348
+           if(id == this.projectList[i].id){
349
+               project_name = this.projectList[i].project_name
350
+           }
351
+        }
352
+        return project_name
353
+     },
354
+     getUnit(id){
355
+        var unit=""
356
+       for(let i=0;i<this.projectList.length;i++){
357
+           if(id == this.projectList[i].id){
358
+               unit = this.projectList[i].unit
359
+           }
360
+        }
361
+        return unit
362
+     },
363
+
364
+       getTotalOne(id) {
365
+
366
+        var total = 0
367
+        var addtotal = 0
368
+        for (let i = 0; i < this.prescriptions.length; i++) {
369
+          if(id == this.prescriptions[i].id){
370
+            if (this.prescriptions[i].project != null) {
371
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
372
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
373
+              }
374
+            }
375
+
376
+            if (this.prescriptions[i].additionalcharge != null) {
377
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
378
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
379
+              }
380
+            }
381
+              addtotal =  Math.floor(addtotal * 100) / 100
382
+        }
383
+
384
+       }
385
+
386
+      for (let i = 0; i < this.prescriptions.length; i++) {
387
+          if(id == this.prescriptions[i].id){
388
+            if (this.prescriptions[i].advices != null) {
389
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
390
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
391
+              }
392
+            }
393
+
394
+            if (this.prescriptions[i].additionalcharge != null) {
395
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
396
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
397
+              }
398
+            }
399
+              addtotal =  Math.floor(addtotal * 100) / 100
400
+        }
401
+       }
402
+
403
+        return total + addtotal
404
+      },
405
+     getInitData(){
406
+       getInitData().then(response=>{
407
+          if(response.data.state == 1){
408
+            this.department = response.data.data.department
409
+            this.diagnoses = response.data.data.diagnose.sort(this.compare('id'))
410
+            console.log("争端",this.diagnoses)
411
+          }
412
+       })
413
+     },
414
+     getDiagnosis(ids){
415
+        let newIds = ids.split(',').sort(function(a,b){
416
+          return a-b;
417
+        })
418
+
419
+        var name = ""
420
+        let nameArr = []
421
+        for(let i=0;i<this.diagnoses.length;i++){
422
+          // if(id == this.diagnoses[i].id){
423
+          //    name = this.diagnoses[i].class_name
424
+          // }
425
+
426
+          if(newIds.indexOf(this.diagnoses[i].id.toString()) > -1){
427
+            // name += diagnoses[i].class_name + ' '
428
+            nameArr.push(this.diagnoses[i].class_name)
429
+          }
430
+        }
431
+        let newNameArr = []
432
+        nameArr.map((item,index) => {
433
+          if(item == '尿毒症'){
434
+            newNameArr.push(item)
435
+            nameArr.splice(index,1,'')
436
+          }
437
+        })
438
+        newNameArr.push(...nameArr)
439
+        return newNameArr.join(' ')
440
+     },
441
+     compare(property) {
442
+        return function(a,b){
443
+          var value1 = a[property];
444
+          var value2 = b[property];
445
+          return value1 - value2;//升序排序
446
+        }
447
+      },
448
+     getName(list) {
449
+        console.log('list22',list)
450
+        let new_list = []
451
+        for (let i = 0; i < list.length; i++) {
452
+          if (list[i].aac031 == '1') {
453
+            new_list.push(list[i])
454
+          }
455
+        }
456
+
457
+        switch (new_list[0].bcc334) {
458
+          case "A31001":
459
+            return "深圳医保1档"
460
+            break
461
+          case "A31002":
462
+            return "深圳医保2档"
463
+
464
+            break
465
+          case "A31003":
466
+            return "深圳医保3档"
467
+
468
+            break
469
+          case "A31004":
470
+            return "二档(少儿)"
471
+
472
+            break
473
+          case "A31005":
474
+            return "学生二档"
475
+
476
+            break
477
+          case "A31006":
478
+            return "大学生二档"
479
+
480
+            break
481
+          case "A32001":
482
+            return "在职公务员"
483
+            break
484
+          case "A32002":
485
+            return "在职驻深公务员"
486
+
487
+            break
488
+          case "A39301":
489
+            return "家属统筹医疗"
490
+
491
+            break
492
+          case "A41001":
493
+            return "工伤在职"
494
+
495
+            break
496
+          case "A51001":
497
+            return "生育在职"
498
+
499
+            break
500
+          case "A52001":
501
+            return "生育医疗一档"
502
+
503
+            break
504
+          case "A52002":
505
+            return "生育医疗一档"
506
+
507
+            break
508
+          case "C31001":
509
+            return "一档医疗退休"
510
+
511
+            break
512
+          case "C31002":
513
+            return "二档医疗退休"
514
+            break
515
+
516
+        }
517
+
518
+
519
+
520
+      },
521
+   },
522
+   created(){
523
+      this.getInitData()
524
+      this.getAllDoctorList()
525
+      this.getPrescriptionPrint()
526
+      var xtuser = this.$store.getters.xt_user
527
+      this.orgname = xtuser.org.org_name
528
+
529
+   },
530
+   watch:{
531
+     patient_id:function(val){
532
+       console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
533
+    //    this.getPrescriptionPrint()
534
+     },
535
+     ids:function(val){
536
+         this.ids = val
537
+         console.log('this.idsids',this.ids)
538
+         this.getPrescriptionPrint()
539
+     }
540
+   }
541
+}
542
+</script>
543
+
544
+
545
+<style lang="scss" scoped>
546
+.prescription-print{
547
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
548
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
549
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
550
+    margin-bottom: 20px;
551
+    padding:20px 10px;
552
+}
553
+.printTitle{
554
+    font-size: 22px;
555
+    text-align: center;
556
+    font-weight: bold;
557
+    margin-bottom: 10px;
558
+}
559
+.infoTitle{
560
+    display: flex;
561
+    margin-top:10px;
562
+    line-height: 24px;
563
+}
564
+.infoTitle div{
565
+    width: 200px;
566
+}
567
+.infoMain{
568
+    display: flex;
569
+    flex-wrap: wrap;
570
+    margin-top:10px;
571
+}
572
+.infoMain div{
573
+    width: 50%;
574
+    line-height: 24px;
575
+}
576
+.prescriptionBox{
577
+    padding:0 10px;
578
+    min-height:400px;
579
+}
580
+.Rp{
581
+    font-size: 22px;
582
+    font-weight: bold;
583
+}
584
+.drugsBox{
585
+    padding-left: 40px;
586
+    margin-bottom: 10px;
587
+}
588
+.drugsBox div{
589
+    line-height: 20px;
590
+}
591
+.drugsOne{
592
+    line-height: 24px;
593
+}
594
+.drugsOne span{
595
+    margin-right: 20px;
596
+}
597
+.doctorBox{
598
+    display: flex;
599
+    justify-content: space-between;
600
+    padding:0 10px;
601
+    line-height: 24px;
602
+    border-bottom: 2px solid #000;
603
+}
604
+.actionBar{
605
+    display: flex;
606
+    justify-content: space-between;
607
+    line-height: 24px;
608
+    padding:0 10px;
609
+}
610
+.actionBar p{
611
+    width:150px;
612
+}
613
+.under_line{
614
+  display: inline-block;
615
+  border-bottom: 1px solid #000;
616
+  flex: 1;
617
+}
618
+</style>