Przeglądaj źródła

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

see999 3 lat temu
rodzic
commit
446a4198e1

BIN
src/assets/img/bailinBottom.jpg Wyświetl plik


BIN
src/assets/img/bailinTop.jpg Wyświetl plik


+ 8 - 9
src/xt_pages/data/components/addInspection.vue Wyświetl plik

@@ -46,17 +46,16 @@
46 46
                 </el-form-item>
47 47
 
48 48
                 <el-form-item label="组套明细" style="width:50%;">
49
-                    <el-autocomplete
50
-                            class="inline-input"
51
-                            v-model="form.project_detail"
52
-                            :fetch-suggestions="querySearch"
53
-                            placeholder="请输入内容"
54
-                            @select="handleSelect"
55
-                    ></el-autocomplete>
56
-
49
+                    <el-select v-model="form.project_detail" filterable placeholder="请选择">
50
+                        <el-option
51
+                                v-for="item in projectList"
52
+                                :key="item.id"
53
+                                :label="item.project_name"
54
+                                :value="item.id">
55
+                        </el-option>
56
+                    </el-select>
57 57
                 </el-form-item>
58 58
 
59
-
60 59
                 <el-form-item label="数量" style="width:50%;">
61 60
                     <div style="display:flex;">
62 61
                         <el-input v-model="form.number" style="margin-right:10px;"></el-input>

+ 1 - 1
src/xt_pages/data/components/editInspection.vue Wyświetl plik

@@ -45,7 +45,7 @@
45 45
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
46 46
                 </el-form-item>
47 47
                 <el-form-item label="组套明细" style="width:50%;">
48
-                    <el-select v-model="form.project_detail" placeholder="请选择">
48
+                    <el-select v-model="form.project_detail" filterable placeholder="请选择">
49 49
                         <el-option
50 50
                                 v-for="item,index in projectList"
51 51
                                 :key="index"

+ 22 - 4
src/xt_pages/outpatientCharges/treatPrint.vue Wyświetl plik

@@ -13,7 +13,9 @@
13 13
     </template>
14 14
     <div class="app-container" style="padding-top:40px;">
15 15
         <div class='dialysisPage'>
16
-            <printOne v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printOne>
16
+            <printOne v-if="org_id != 4" v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printOne>
17
+            <printTwo v-else v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printTwo>
18
+
17 19
         </div>
18 20
     </div>
19 21
   </div>
@@ -33,11 +35,13 @@ import { jsGetAge, uParseTime } from "@/utils/tools";
33 35
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
34 36
 import print from "print-js";
35 37
 import printOne from "./treatTemplate/printOne"
38
+import printTwo from "./treatTemplate/printTwo"
36 39
 export default {
37 40
   name: "dialysisPrintOrder",
38 41
   components: {
39 42
     BreadCrumb,
40
-    printOne
43
+    printOne,
44
+    printTwo
41 45
   },
42 46
   props:{
43 47
     paramsObj:Object
@@ -49,7 +53,8 @@ export default {
49 53
         { path: false, name: "打印单" }
50 54
       ],
51 55
       childResponse: {},
52
-      paramsObj:{}
56
+      paramsObj:{},
57
+      org_id:''
53 58
       
54 59
 
55 60
     };
@@ -81,7 +86,17 @@ export default {
81 86
       var ptime = Math.round(new Date().getTime() / 1000);
82 87
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
83 88
 
84
-      const style =
89
+      if(this.org_id == 4){
90
+        const style =
91
+        '@media print {#prescription-print{font-size:12px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}}';
92
+        printJS({
93
+            printable: "prescription-print",
94
+            type: "html",
95
+            style: style,
96
+            scanStyles: false
97
+        });
98
+      }else{
99
+        const style =
85 100
         '@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 101
         printJS({
87 102
             printable: "prescription-print",
@@ -89,6 +104,8 @@ export default {
89 104
             style: style,
90 105
             scanStyles: false
91 106
         });
107
+      }
108
+      
92 109
 
93 110
       // if (this.org_template_info.template_id == 1) {
94 111
       //   printJS({
@@ -101,6 +118,7 @@ export default {
101 118
     },
102 119
   },
103 120
   created() {
121
+    this.org_id = this.$store.getters.xt_user.org_id
104 122
   },
105 123
   watch:{
106 124
     paramsObj:{//深度监听,可监听到对象、数组的变化

+ 395 - 0
src/xt_pages/outpatientCharges/treatTemplate/printTwo.vue Wyświetl plik

@@ -0,0 +1,395 @@
1
+<template>
2
+    <div>
3
+        <div id='prescription-print' class="prescription-print">
4
+            <img style="width:100%;" src="../../../assets/img/bailinTop.jpg" alt="">
5
+            <div class="printTitle">门诊收费清单</div>
6
+            <div style="display:flex;">
7
+                <div>单据号:<span style="display:inline-block;width:200px;"></span></div>
8
+                <div>透析号:<span style="display:inline-block;width:200px;"></span></div>
9
+            </div>
10
+            <div style="display:flex;">
11
+                <div>姓名:<span style="display:inline-block;width:50px;">{{patient.name}}</span></div>
12
+                <div>性别:<span style="display:inline-block;width:30px;">{{patient.gender == 1 ? '男' : '女'}}</span></div>
13
+                <div>年龄:<span style="display:inline-block;width:50px;">{{patient.age}}岁</span></div>
14
+                <div>费别:<span style="display:inline-block;width:80px;"></span></div>
15
+                <div>电脑号:<span style="display:inline-block;width:80px;"></span></div>
16
+                <div>收费日期:<span style="display:inline-block;width:80px;"></span></div>
17
+                <div style="float:right">金额单位:元</div>
18
+            </div>
19
+            <table border='1' style="width:100%;" cellspacing="0">
20
+                <tr>
21
+                    <td width="70">类别</td>
22
+                    <td>项目</td>
23
+                    <td width="80">规格</td>
24
+                    <td width="50">单位</td>
25
+                    <td width="50">数量</td>
26
+                    <td width="60">单价</td>
27
+                    <td width="70">总额</td>
28
+                    <td width="100">小计</td>
29
+                </tr>
30
+                <tr v-for="(item,y) in prescription[0].advices" :key="y"> 
31
+                    <td></td>
32
+                    <td>{{item.advice_name}}</td>
33
+                    <td>{{item.advice_desc}}</td>
34
+                    <td>{{item.single_dose_unit}}</td>
35
+                    <td>{{item.single_dose}}</td>
36
+                    <td>{{item.price}}</td>
37
+                    <td>{{ item.single_dose * item.price }}</td>
38
+                    <td>{{ item.single_dose * item.price }}</td>
39
+                    
40
+                </tr>
41
+                <tr>
42
+                    <td colspan="2">药品费:0.00元</td>
43
+                    <td colspan="2">诊疗费:0.00元</td>
44
+                    <td colspan="3">耗材费:0.00元</td>
45
+                    <td>合计: 0.00元</td>
46
+                </tr>
47
+                <tr>
48
+                    <td colspan="7">
49
+                        <div style="display:flex;flez-wrap:wrap;">
50
+                            <div style="width:33%;">医疗费总额:</div>
51
+                            <div style="width:33%;">基金支付金额:</div>
52
+                            <div style="width:33%;">个人账户支付金额:</div>
53
+                            
54
+                        </div>
55
+                        <div style="display:flex;flez-wrap:wrap;">
56
+                            <div style="width:33%;">个人支付金额:</div>
57
+                            <div style="width:33%;">个人账户金额:</div>
58
+                        </div>
59
+                    </td>
60
+                    <td>合计:0.0元</td>
61
+                </tr>
62
+
63
+            </table>
64
+            <div style="float:right;margin:10px 0;display:flex;">
65
+                <div>操作人:<span style="width:100px;display:inline-block;"></span></div>
66
+                <div>操作日期:<span style="width:100px;display:inline-block;"></span></div>
67
+            </div>
68
+            <img style="width:100%;" src="../../../assets/img/bailinBottom.jpg" alt="">
69
+        </div>
70
+    </div>
71
+
72
+</template>
73
+<script>
74
+  import axios from 'axios'
75
+  import { getChargePrint } from '@/api/project/project'
76
+
77
+  export default {
78
+    data() {
79
+      return {
80
+        list: {},
81
+        prescription: [],
82
+        patient: {},
83
+        orgname: '',
84
+
85
+        result: {},
86
+        org_code: '',
87
+        patient_name: '',
88
+        doctor_code: '',
89
+        doctor_name: '',
90
+
91
+        name_arr: [],
92
+        spec_arr: [],
93
+        count_arr: [],
94
+        price_arr: [],
95
+        total_arr: []
96
+
97
+      }
98
+    },
99
+    props: {
100
+      paramsObj: Object
101
+    },
102
+    methods: {
103
+      getItemName(number) {
104
+        switch (number) {
105
+          case '01':
106
+            return '床位费';
107
+            break;
108
+          case '02':
109
+            return '西药费';
110
+
111
+            break;
112
+          case '03':
113
+            return '中药费';
114
+
115
+            break;
116
+          case '04':
117
+            return '中成药费';
118
+
119
+            break;
120
+          case '05':
121
+            return '中草药费';
122
+
123
+            break;
124
+          case '06':
125
+            return '检查费';
126
+
127
+            break;
128
+          case '07':
129
+            return '治疗费';
130
+
131
+            break;
132
+          case '08':
133
+            return '放射费';
134
+
135
+            break;
136
+          case '09':
137
+            return '手术费';
138
+
139
+            break;
140
+          case '10':
141
+            return '化验费';
142
+
143
+            break;
144
+          case '11':
145
+            return '输血费';
146
+
147
+            break;
148
+          case '12':
149
+            return '输氧费';
150
+
151
+            break;
152
+          case '13':
153
+            return '其它费';
154
+
155
+            break;
156
+          case '14':
157
+            return '麻醉费';
158
+
159
+            break;
160
+          case '15':
161
+            return '材料费';
162
+
163
+            break;
164
+          case '16':
165
+            return '特殊检查费';
166
+
167
+            break;
168
+          case '17':
169
+            return '特殊治疗费';
170
+
171
+            break;
172
+          case '18':
173
+            return '诊疗费(诊查费)';
174
+
175
+            break;
176
+          case '19':
177
+            return '护理费';
178
+
179
+            break;
180
+          case '20':
181
+            return '诊金';
182
+
183
+            break;
184
+          case '21':
185
+            return '检查费(CT)';
186
+
187
+            break;
188
+          case '22':
189
+            return '检查费(MRT)';
190
+
191
+            break;
192
+          case '23':
193
+            return '检查费(其他)';
194
+
195
+            break;
196
+          case '24':
197
+            return '特需服务费';
198
+
199
+            break;
200
+          case '25':
201
+            return '杂费';
202
+
203
+            break;
204
+          case '26':
205
+            return '挂号费';
206
+            break
207
+
208
+        }
209
+
210
+      },
211
+      getChargePrint(record_date, patient_id, prescription_id) {
212
+        var params = {
213
+          record_date: record_date,
214
+          patient_id: patient_id,
215
+          prescription_id: prescription_id
216
+        };
217
+        console.log('params', params);
218
+        getChargePrint(params).then(response => {
219
+          if (response.data.state == 1) {
220
+            var list = response.data.data.list;
221
+            console.log('list9999999999', list);
222
+            this.list = list;
223
+            var prescription = response.data.data.prescription;
224
+            console.log('prescription', prescription);
225
+            this.prescription = prescription;
226
+            var patient = response.data.data.patient;
227
+            console.log('patient', patient);
228
+            this.patient = patient;
229
+            var histpatient = response.data.data.hisPatient;
230
+            console.log('hispatient', histpatient)
231
+          }
232
+        })
233
+      }
234
+    },
235
+    created() {
236
+
237
+      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
238
+        this.orgname = xtuser.org.org_name;
239
+        var form = {
240
+          'order_id': this.paramsObj.order_id,
241
+          'patient_id': this.paramsObj.patient_id,
242
+          'record_time': this.paramsObj.record_date,
243
+          'admin_user_id': this.$store.getters.xt_user.user.id
244
+        };
245
+        var that = this;
246
+        axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
247
+          params: form
248
+        })
249
+          .then(function(response) {
250
+            if (response.data.state == 0) {
251
+              that.$message.error(response.data.msg);
252
+              return false
253
+            } else {
254
+              if (response.data.data.failed_code == -10) {
255
+                // that.$message.error(response.data.data.msg)
256
+                that.$confirm(response.data.data.msg, '医保错误信息', {
257
+                  confirmButtonText: '确 定',
258
+                  type: 'warning'
259
+                }).then(() => {
260
+
261
+                }).catch(() => {
262
+                })
263
+              } else {
264
+                that.result = response.data.data.result;
265
+
266
+                that.org_code = response.data.data.org_code;
267
+                that.patient_name = response.data.data.patient_name;
268
+                that.doctor_code = response.data.data.doctor_code;
269
+                that.doctor_name = response.data.data.doctor_name;
270
+                that.name_arr = [];
271
+                that.spec_arr = [];
272
+                that.count_arr = [];
273
+                that.price_arr = [];
274
+                that.total_arr = [];
275
+                for (let i = 0; i < that.result.transBody.outputlist1.length; i++) {
276
+                  that.name_arr.push(that.result.transBody.outputlist1[i].ake006);
277
+                  that.spec_arr.push(that.result.transBody.outputlist1[i].aka074);
278
+                  that.count_arr.push(that.result.transBody.outputlist1[i].akc226);
279
+                  that.price_arr.push(that.result.transBody.outputlist1[i].akc225);
280
+                  that.total_arr.push(that.result.transBody.outputlist1[i].akc264)
281
+                }
282
+
283
+              }
284
+
285
+            }
286
+          })
287
+          .catch(function(error) {
288
+
289
+          })
290
+
291
+      } else {
292
+        var record_date = this.paramsObj.record_date;
293
+        console.log('record_date', record_date);
294
+        var patient_id = this.paramsObj.patient_id;
295
+        console.log('patient_id', patient_id);
296
+        var prescription_id = this.paramsObj.prescription_id;
297
+        this.getChargePrint(record_date, patient_id, prescription_id);
298
+        var xtuser = this.$store.getters.xt_user;
299
+        this.orgname = xtuser.org.org_name
300
+
301
+      }
302
+
303
+    },
304
+    watch: {
305
+      paramsObj: {//深度监听,可监听到对象、数组的变化
306
+        handler(val, oldVal) {
307
+          this.paramsObj = val;
308
+          this.patient_id = this.paramsObj.patient_id;
309
+          var record_date = this.paramsObj.record;
310
+          this.record_date = record_date;
311
+          var prescription_id = this.paramsObj.prescription_id;
312
+          this.prescription_id = prescription_id
313
+
314
+        },
315
+        deep: true
316
+      }
317
+    }
318
+  }
319
+</script>
320
+
321
+
322
+<style lang="scss" scoped>
323
+    .prescription-print {
324
+        -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
325
+        -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
326
+        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
327
+        margin-bottom: 20px;
328
+        padding: 20px 10px;
329
+    }
330
+
331
+    .printTitle {
332
+        font-size: 22px;
333
+        text-align: center;
334
+        font-weight: bold;
335
+    }
336
+
337
+    .infoMain {
338
+        display: flex;
339
+        flex-wrap: wrap;
340
+        padding: 0 10px;
341
+        margin-top: 10px;
342
+    }
343
+
344
+    .infoMain .infoP {
345
+        width: 33%;
346
+        line-height: 24px;
347
+    }
348
+
349
+    .chargeBox {
350
+        border: 1px solid #000;
351
+    }
352
+
353
+    .chargeUl {
354
+        display: flex;
355
+        justify-content: space-between;
356
+        text-align: center;
357
+    }
358
+
359
+    .chargeUl p {
360
+        height: 40px;
361
+        line-height: 40px;
362
+    }
363
+
364
+    .chargeP {
365
+        height: 40px;
366
+        line-height: 40px;
367
+    }
368
+
369
+    .moneyBox {
370
+        display: flex;
371
+        justify-content: space-between;
372
+        padding: 0 10px;
373
+        background: #eee;
374
+        height: 40px;
375
+        align-items: center;
376
+        border: 1px solid #000;
377
+        border-top: none
378
+    }
379
+
380
+    .actionBar {
381
+        display: flex;
382
+        justify-content: space-between;
383
+        line-height: 24px;
384
+        padding: 0 10px;
385
+    }
386
+
387
+    .actionBar div {
388
+        width: 150px;
389
+    }
390
+    table{
391
+        td{
392
+            padding:0 5px;
393
+        }
394
+    }
395
+</style>

+ 2 - 4
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue Wyświetl plik

@@ -58,7 +58,7 @@
58 58
       },
59 59
       show() {
60 60
         this.chargeTable = []
61
-       
61
+
62 62
         this.visible = true
63 63
         for (let i = 0; i < this.additions.length; i++) {
64 64
           let obj = {
@@ -83,9 +83,7 @@
83 83
       }
84 84
     },
85 85
     watch: {
86
-      hisPatientInfo: function(val) {
87
-        console.log('患者ID', this)
88
-      }
86
+
89 87
     }
90 88
   }
91 89
 </script>

+ 77 - 77
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Wyświetl plik

@@ -271,18 +271,18 @@
271 271
                                             <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
272 272
                                         </el-table-column>
273 273
                                         <el-table-column label="库存" width="60">
274
-                                            <template slot-scope="scope">{{
275
-                                                stockInCount(scope.row) -
276
-                                                salesReturnCount(scope.row) -
277
-                                                stockOutCount(scope.row) +
278
-                                                cancelStockCount(scope.row)
279
-                                                }}
274
+                                            <template slot-scope="scope">
275
+                                                {{scope.row.total}}{{scope.row.total?scope.row.min_unit:''}} / {{
276
+                                                scope.row.total * (scope.row.dose / scope.row.min_number)}}
277
+                                                {{(scope.row.total * (scope.row.dose /
278
+                                                scope.row.min_number))?scope.row.max_unit:''}}
280 279
                                             </template>
281 280
                                         </el-table-column>
282 281
                                         <el-table-column label="单价" width="40">
283 282
                                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
284 283
                                         </el-table-column>
285 284
                                     </el-table>
285
+                                    <div>{{3*(2/3)}}</div>
286 286
                                 </div>
287 287
 
288 288
                             </el-tab-pane>
@@ -420,11 +420,10 @@
420 420
                                    v-on:cancel="cancel"></next-or-last-prescription>
421 421
 
422 422
 
423
-
424 423
         <!--<next-or-last-prescription ref='next_or_last_prescription' v-on:save="setValue" v-on:cancel="cancel"></next-or-last-prescription>-->
425 424
         <call-prescription ref='call_prescription' v-on:call="call" v-on:call-cancel="callCancel"></call-prescription>
426 425
 
427
-        <
426
+
428 427
     </div>
429 428
 </template>
430 429
 
@@ -432,6 +431,7 @@
432 431
 <script>
433 432
   import MonthPrescriptionTable from '../../outpatientCharges/components/monthPrescriptionTable'
434 433
   import {
434
+    createdTemplate,
435 435
     createHisPrescription,
436 436
     delHisPrescription,
437 437
     editHisPrescription,
@@ -440,8 +440,7 @@
440 440
     getInitData,
441 441
     getNextOrLastHisPrescription,
442 442
     getPatientInfo,
443
-    getSchedulePatientList,
444
-    createdTemplate
443
+    getSchedulePatientList
445 444
   } from '@/api/his/his'
446 445
   import { getDictionaryDataConfig } from '@/utils/data'
447 446
   import prescriptionTable from './prescriptionTable'
@@ -505,7 +504,7 @@
505 504
         ],
506 505
         isLastOrNextVisible: false,
507 506
         multipleTableHeight: '',
508
-        register_type: 1,
507
+        register_type: '',
509 508
         value: '0',
510 509
         search_project_keyword: '',
511 510
         form: {
@@ -573,7 +572,7 @@
573 572
         sick: [],
574 573
         diagnoses: [],
575 574
         diagnose: 1,
576
-        state1: 1,
575
+        state1: '',
577 576
         curTotal: 0,
578 577
         prescription_id: 0,
579 578
         tempDrugs: [],
@@ -685,12 +684,6 @@
685 684
           return cur
686 685
         }, []) // 设置cur默认类型为数组,并且初始值为空的数组
687 686
 
688
-        console.log(drug_ids)
689
-        console.log(project_ids)
690
-        console.log(additions_ids)
691
-
692
-        console.log(additions_ids)
693
-
694 687
         let drugs = []
695 688
         let projects = []
696 689
         let additions = []
@@ -761,7 +754,6 @@
761 754
         for (let i = 0; i < additions_ids.length; i++) {
762 755
           let obj = {}
763 756
           let count = 0
764
-          console.log(addition_month_prescriptions.addition)
765 757
           if (addition_month_prescriptions.addition) {
766 758
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
767 759
               if (additions_ids[i].price == addition_month_prescriptions.addition[a].price) {
@@ -777,14 +769,13 @@
777 769
           }
778 770
         }
779 771
 
780
-
781 772
         let p1 = {
782 773
           name: '处方' + 1,
783 774
           advices: drugs,
784 775
           project: [],
785 776
           type: 1,
786 777
           addition: additions
787
-        };
778
+        }
788 779
         let p2 = {
789 780
           name: '处方' + 2,
790 781
           type: 2,
@@ -792,12 +783,10 @@
792 783
           advices: [],
793 784
           addition: []
794 785
 
795
-        };
796
-        console.log(this.month_prescriptions);
797
-        console.log(this.curMonthPrescriptions);
786
+        }
798 787
 
799
-        this.month_prescriptions.push(p1);
800
-        this.month_prescriptions.push(p2);
788
+        this.month_prescriptions.push(p1)
789
+        this.month_prescriptions.push(p2)
801 790
 
802 791
         this.curMonthPrescriptions = this.month_prescriptions[0]
803 792
 
@@ -1034,7 +1023,7 @@
1034 1023
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1035 1024
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1036 1025
                       id: prescription.advices[b].drug_id,
1037
-                      drug:prescription.advices[b].drug,
1026
+                      drug: prescription.advices[b].drug
1038 1027
                     }
1039 1028
                     tempAdvice.push(obj)
1040 1029
                   }
@@ -1123,8 +1112,6 @@
1123 1112
         }
1124 1113
         getDayOrMonthHisPrescription(params).then(response => {
1125 1114
           if (response.data.state == 1) {
1126
-            console.log(val)
1127
-            console.log(this.end_time)
1128 1115
             this.month_prescriptions = []
1129 1116
             if (val == this.start_time) {
1130 1117
               var day_prescription = response.data.data.day_prescription
@@ -1153,7 +1140,7 @@
1153 1140
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1154 1141
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1155 1142
                       id: prescription.advices[b].drug_id,
1156
-                      drug:prescription.advices[b].drug,
1143
+                      drug: prescription.advices[b].drug
1157 1144
                     }
1158 1145
                     tempAdvice.push(obj)
1159 1146
                   }
@@ -1226,28 +1213,25 @@
1226 1213
           }
1227 1214
         })
1228 1215
 
1229
-      },saveTemplate(val){
1230
-        let params ={
1231
-          name:val.name,
1232
-          mode:val.mode,
1233
-          patient_id:this.patientInfo.id
1216
+      }, saveTemplate(val) {
1217
+        let params = {
1218
+          name: val.name,
1219
+          mode: val.mode,
1220
+          patient_id: this.patientInfo.id
1234 1221
         }
1235 1222
         let data = {
1236
-          "prescriptions":val.prescriptions,
1223
+          'prescriptions': val.prescriptions
1237 1224
         }
1238
-
1239
-        createdTemplate(params,data).then(response => {
1225
+        createdTemplate(params, data).then(response => {
1240 1226
           if (response.data.state == 1) {
1241 1227
             this.$refs.saveTemplate.hide()
1242 1228
 
1243
-            this.$message.success("保存成功")
1229
+            this.$message.success('保存成功')
1244 1230
           } else {
1245 1231
             this.$message.error(response.data.msg)
1246 1232
           }
1247 1233
         })
1248 1234
 
1249
-
1250
-
1251 1235
       },
1252 1236
       call(val) {
1253 1237
         this.prescriptions = []
@@ -1704,15 +1688,12 @@
1704 1688
 
1705 1689
       },
1706 1690
       monthTabclickEvent(val) {
1707
-        console.log(val)
1708
-        console.log(this.month_prescriptions)
1709 1691
 
1710 1692
         for (let i = 0; i < this.month_prescriptions.length; i++) {
1711 1693
           if (this.month_prescriptions[i].name == val.name) {
1712 1694
             if (this.dayorMonth == 'month') {
1713 1695
               if (this.isShowDayPrescription) {
1714 1696
                 this.curDayPrescriptions = this.month_prescriptions[i]
1715
-                console.log(this.curDayPrescriptions)
1716 1697
                 //用来区分处方属于项目还是药品
1717 1698
                 if (this.curDayPrescriptions.advices.length > 0 && this.curDayPrescriptions.project.length == 0) {
1718 1699
                   this.monthCustomTabIndex = 1
@@ -1807,23 +1788,21 @@
1807 1788
 
1808 1789
       },
1809 1790
       setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data) {
1791
+        this.curMonthPrescriptions = {}
1792
+        this.curPrescriptions = {}
1810 1793
 
1794
+        console.log(doctors)
1811 1795
         for (let i = 0; i < doctors.length; i++) {
1812 1796
           if (doctors[i].user_type == 1) {
1813 1797
             doctors.splice(i, 1)
1814 1798
           }
1815 1799
         }
1816 1800
 
1817
-        this.curMonthPrescriptions = {}
1818
-        this.curPrescriptions = {}
1819
-
1820 1801
         this.prescription_id = data[0].id
1821 1802
         this.editableTabsValue = '处方1'
1822 1803
         this.dayorMonth = 'day'
1823 1804
         this.$emit('event1', this.prescription_id)
1824 1805
         this.curStatus = 0
1825
-        this.curPrescriptions = {}
1826
-        this.curMonthPrescriptions = {}
1827 1806
         if (month_data && month_data.length > 0) {
1828 1807
 
1829 1808
           this.curMonthPrescriptions = month_data[0]
@@ -1925,6 +1904,7 @@
1925 1904
             }
1926 1905
           }
1927 1906
         }
1907
+        console.log(info.register_type)
1928 1908
         if (info.register_type == 0) {
1929 1909
           for (let i = 0; i < this.register.length; i++) {
1930 1910
             this.register_type = this.register[0].value
@@ -1937,8 +1917,24 @@
1937 1917
         if (tab == 'more') {
1938 1918
           return false
1939 1919
         }
1940
-      },open_three(){
1941
-       this.$refs.saveTemplate.show(this.prescriptions)
1920
+      }, open_three() {
1921
+        for (let i = 0; i < this.prescriptions.length; i++) {
1922
+          for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
1923
+            if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {
1924
+              this.$message.error('药品处方总量不能为0')
1925
+              return
1926
+            }
1927
+          }
1928
+        }
1929
+        for (let i = 0; i < this.prescriptions.length; i++) {
1930
+          for (let b = 0; b < this.prescriptions[i].project.length; b++) {
1931
+            if (this.prescriptions[i].project[b].total == 0 || this.prescriptions[i].project[b].total == '') {
1932
+              this.$message.error('项目处方总量不能为0')
1933
+              return
1934
+            }
1935
+          }
1936
+        }
1937
+        this.$refs.saveTemplate.show(this.prescriptions)
1942 1938
       }, open_two() {
1943 1939
         if (this.dayorMonth == 'day') {
1944 1940
           if (this.patientInfo == null || this.patientInfo.id == 0) {
@@ -1968,34 +1964,48 @@
1968 1964
         if (this.dayorMonth == 'day') {
1969 1965
 
1970 1966
           if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
1971
-            this.$message.error('请先开处方');
1967
+            this.$message.error('请先开处方')
1972 1968
             return
1973 1969
           }
1974 1970
         }
1975 1971
 
1976 1972
         if (this.dayorMonth == 'day') {
1977 1973
           if (this.curPrescriptions.order_status == 2) {
1978
-            this.$message.error('当前处方已经结算,无法保存');
1974
+            this.$message.error('当前处方已经结算,无法保存')
1979 1975
             return
1980 1976
           }
1981 1977
           if (this.doctorValue.length <= 0) {
1982
-            this.$message.error('医生不能为空');
1978
+            this.$message.error('医生不能为空')
1983 1979
             return
1984 1980
           }
1985 1981
 
1986 1982
           if (this.departmentValue.length <= 0) {
1987
-            this.$message.error('科室不能为空');
1983
+            this.$message.error('科室不能为空')
1988 1984
             return
1989 1985
           }
1990
-
1991
-          if (this.state1  <= 0) {
1992
-            this.$message.error('疾病类型不能为空');
1986
+          if (this.state1 <= 0) {
1987
+            this.$message.error('疾病类型不能为空')
1993 1988
             return
1994 1989
           }
1995
-
1990
+          for (let i = 0; i < this.prescriptions.length; i++) {
1991
+            for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
1992
+              if (this.prescriptions[i].advices[b].prescribing_number == 0 || this.prescriptions[i].advices[b].prescribing_number == '') {
1993
+                this.$message.error('药品处方总量不能为0')
1994
+                return
1995
+              }
1996
+            }
1997
+          }
1998
+          for (let i = 0; i < this.prescriptions.length; i++) {
1999
+            for (let b = 0; b < this.prescriptions[i].project.length; b++) {
2000
+              if (this.prescriptions[i].project[b].total == 0 || this.prescriptions[i].project[b].total == '') {
2001
+                this.$message.error('项目处方总量不能为0')
2002
+                return
2003
+              }
2004
+            }
2005
+          }
1996 2006
           if (index == 1) {
1997 2007
             let params = {
1998
-              p_type:2,
2008
+              p_type: 2,
1999 2009
               patient_id: this.patientInfo.id,
2000 2010
               diagnose: this.diagnose,
2001 2011
               sick_type: this.state1,
@@ -2046,6 +2056,8 @@
2046 2056
               if (response.data.state == 1) {
2047 2057
                 this.$emit('change', this.patientInfo.id)
2048 2058
                 this.$message.success('保存成功')
2059
+              } else {
2060
+                this.$message.error(response.data.msg)
2049 2061
               }
2050 2062
             })
2051 2063
           } else if (index == 2) {
@@ -2104,7 +2116,6 @@
2104 2116
                 }
2105 2117
 
2106 2118
                 for (let b = 0; b < month_prescriptions[i].project.length; b++) {
2107
-                  console.log('~~~~~~~')
2108 2119
                   month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
2109 2120
                   month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
2110 2121
                   month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
@@ -2376,7 +2387,6 @@
2376 2387
       },
2377 2388
 
2378 2389
       comfirm() {
2379
-        console.log('222222222222', this.curPrescriptions)
2380 2390
 
2381 2391
         // if (this.curPrescriptions.order_status == 2) {
2382 2392
         //   this.$message.error('该处方已经结算,无法继续添加药品或者项目')
@@ -2416,9 +2426,6 @@
2416 2426
           }
2417 2427
         }
2418 2428
 
2419
-        console.log(this.curDrugs)
2420
-        console.log(this.curPrescriptions.advices)
2421
-
2422 2429
         for (let i = 0; i < this.curDrugs.length; i++) {
2423 2430
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
2424 2431
             if (this.curDrugs[i].id == this.curPrescriptions.advices[a].id) {
@@ -2495,8 +2502,8 @@
2495 2502
                   single_dose_unit: temp[b].min_unit,
2496 2503
                   prescribing_number_unit: temp[b].max_unit,
2497 2504
                   medical_insurance_number: temp[b].medical_insurance_number,
2498
-                  drug: temp[b],
2499
-                };
2505
+                  drug: temp[b]
2506
+                }
2500 2507
 
2501 2508
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
2502 2509
                   obj.prescribing_number = 1
@@ -2518,7 +2525,6 @@
2518 2525
             //  }
2519 2526
 
2520 2527
             if (temp2.length > 0) {
2521
-              console.log('temp2222222222', temp2)
2522 2528
               for (let b = 0; b < temp2.length; b++) {
2523 2529
                 let obj = {
2524 2530
                   id: 0,
@@ -2536,14 +2542,13 @@
2536 2542
                   unit: temp2[b].unit,
2537 2543
                   type: temp2[b].type
2538 2544
                 }
2539
-                if (obj.total == 0) {
2545
+                if (obj.total == 0 || obj.total == undefined) {
2540 2546
                   obj.total = 1
2541 2547
                 }
2542 2548
                 if (obj.type == 3) {
2543 2549
                   obj.single_dose = 1
2544 2550
                 }
2545 2551
 
2546
-                console.log(obj)
2547 2552
                 this.prescriptions[i].project.push(obj)
2548 2553
               }
2549 2554
               this.curStatus = 2
@@ -2637,14 +2642,12 @@
2637 2642
         getAllProjectTeam().then(response => {
2638 2643
           if (response.data.state == 1) {
2639 2644
             var team = response.data.data.team
2640
-            console.log('team2222', team)
2641 2645
             this.tabPrjectTeam = team
2642 2646
             this.projectList = team
2643 2647
           }
2644 2648
         })
2645 2649
       },
2646 2650
       selectTeam(row) {
2647
-        console.log('row', row)
2648 2651
         var arr = []
2649 2652
         for (let i = 0; i < row.length; i++) {
2650 2653
           arr.push(row[i].item_id)
@@ -2692,7 +2695,7 @@
2692 2695
                   unit: project[i].project.unit,
2693 2696
                   type: project[i].type
2694 2697
                 }
2695
-                if (obj.total == 0) {
2698
+                if (obj.total == 0 || obj.total == undefined) {
2696 2699
                   obj.total = 1
2697 2700
                 }
2698 2701
 
@@ -2713,13 +2716,11 @@
2713 2716
                   unit: project[i].good_info.unit,
2714 2717
                   type: project[i].type
2715 2718
                 }
2716
-                if (obj.total == 0) {
2719
+                if (obj.total == 0 || obj.total == undefined) {
2717 2720
                   obj.total = 1
2718 2721
                 }
2719 2722
                 this.teamList.push(obj)
2720 2723
 
2721
-                console.log(this.teamList)
2722
-
2723 2724
               }
2724 2725
             }
2725 2726
 
@@ -2749,7 +2750,6 @@
2749 2750
         getAllProjectList().then(response => {
2750 2751
           if (response.data.state == 1) {
2751 2752
             var hisprojectlist = response.data.data.hisprojectlist
2752
-            console.log('hisprojectlist', hisprojectlist)
2753 2753
             this.hisList = hisprojectlist
2754 2754
           }
2755 2755
         })

+ 43 - 65
src/xt_pages/outpatientDoctorStation/components/saveTemplate.vue Wyświetl plik

@@ -6,17 +6,14 @@
6 6
             :before-close="_close"
7 7
     >
8 8
         <div>
9
-            <el-form :model="form" class="adviceForm" ref="form" label-width="100px"
10
-                     style="display: flex;flex-wrap: wrap;justify-content: space-between;">
9
+            <el-form :model="form" class="adviceForm" :rules="rules" ref="form" label-width="100px"
10
+                     >
11 11
 
12
-                <!--<el-form-item label="处方模板类别 : " style="width: 100%;margin-bottom:0;">-->
13
-                <!--<el-radio v-model="radio" label="1">临时</el-radio>-->
14
-                <!--<el-radio v-model="radio" label="2">长期</el-radio>-->
15
-                <!--</el-form-item>-->
16
-                <el-form-item label="处方模板名称:" style="width: 60%;margin-bottom:0;">
17
-                    <el-input v-model="form.name" placeholder=""></el-input>
12
+                <el-form-item label="模板名称:"  prop="name" style="width: 100%;margin-bottom:0;">
13
+                    <el-input v-model="form.name"  placeholder=""></el-input>
18 14
                 </el-form-item>
19
-                <el-form-item label="透析模式 : " style="width: 60%;">
15
+
16
+                <el-form-item label="透析模式 : " style="width: 100%;margin-top: 20px" prop="mode">
20 17
                     <el-select v-model="form.mode" style="width:100%;" placeholder="请选择">
21 18
                         <el-option
22 19
                                 v-for="item in modeOptions"
@@ -30,9 +27,7 @@
30 27
 
31 28
 
32 29
             <div v-for="(item,index) in allPrescription" :key="index">
33
-                <el-checkbox-group v-model="item.check_group">
34 30
                     <div v-for="(subItem,index2) in item.prescriptions" :key="index2">
35
-                        <el-checkbox style="margin:10px 0;" :label="subItem.id">{{'处方' + (index2+ 1)}}</el-checkbox>
36 31
                         <el-table v-if="subItem.advices.length > 0" :data="subItem.advices" border style="width: 99%;"
37 32
                                   :row-style="{ color: '#303133' }"
38 33
                                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
@@ -146,14 +141,13 @@
146 141
                             </el-table-column>
147 142
                         </el-table>
148 143
                     </div>
149
-                </el-checkbox-group>
150 144
             </div>
151 145
 
152 146
 
153 147
         </div>
154 148
         <div slot="footer" class="dialog-footer">
155 149
             <el-button @click="hide">取 消</el-button>
156
-            <el-button type="primary" @click="submitAction()">保 存</el-button>
150
+            <el-button type="primary" @click="submitAction('form')">保 存</el-button>
157 151
         </div>
158 152
     </el-dialog>
159 153
 </template>
@@ -164,6 +158,10 @@
164 158
   export default {
165 159
     data() {
166 160
       return {
161
+        rules: {
162
+          name: [{required: true, message: "模版名字不能为空", trigger: 'blur'}],
163
+          mode: [{required: true, message: "请选择透析模式", trigger: 'blur'}],
164
+        },
167 165
         visible: false,
168 166
         modeOptions: {},
169 167
         allPrescription: [],
@@ -197,65 +195,45 @@
197 195
         this.form.name = ''
198 196
         this.form.intro = ''
199 197
       }, submitAction() {
200
-
201
-        let checkGroup = []
202
-        let allPrescriptions = []
203
-        let targetPrescriptions = []
204
-        let prescriptions = []
205
-        for (let i = 0; i < this.allPrescription.length; i++) {
206
-          for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
207
-            checkGroup.push(this.allPrescription[i].check_group[a])
208
-          }
209
-          for (let a = 0; a < this.allPrescription[i].prescriptions.length; a++) {
210
-            allPrescriptions.push(this.allPrescription[i].prescriptions[a])
211
-          }
212
-        }
213
-        for (let i = 0; i < allPrescriptions.length; i++) {
214
-          for (let a = 0; a < checkGroup.length; a++) {
215
-            if (allPrescriptions[i].id == checkGroup[a]) {
216
-              targetPrescriptions.push(allPrescriptions[i])
198
+        this.$refs['form'].validate((valid) => {
199
+          if (valid) {
200
+            let checkGroup = []
201
+            let allPrescriptions = []
202
+            let targetPrescriptions = []
203
+            for (let i = 0; i < allPrescriptions.length; i++) {
204
+                  targetPrescriptions.push(allPrescriptions[i])
217 205
             }
206
+            for(let i = 0; i < targetPrescriptions.length; i++){
207
+              if(targetPrescriptions[i].advices.length > 0 && targetPrescriptions[i].project.length == 0){
208
+                targetPrescriptions[i]["type"] = 1
209
+              } else if(targetPrescriptions[i].advices.length == 0 && targetPrescriptions[i].project.length > 0){
210
+                targetPrescriptions[i]["type"] = 2
211
+              }
212
+              for (let b = 0; b < targetPrescriptions[i].advices.length; b++) {
213
+                targetPrescriptions[i].advices[b].single_dose = targetPrescriptions[i].advices[b].single_dose.toString()
214
+                targetPrescriptions[i].advices[b].prescribing_number =targetPrescriptions[i].advices[b].prescribing_number.toString()
215
+                targetPrescriptions[i].advices[b].retail_price = targetPrescriptions[i].advices[b].retail_price.toString()
216
+                targetPrescriptions[i].advices[b].day = parseInt(targetPrescriptions[i].advices[b].day)
217
+              }
218
+              for (let b = 0; b < targetPrescriptions[i].project.length; b++) {
219
+                targetPrescriptions[i].project[b].price =targetPrescriptions[i].project[b].price.toString()
220
+                targetPrescriptions[i].project[b].total =targetPrescriptions[i].project[b].total.toString()
221
+                targetPrescriptions[i].project[b].delivery_way =targetPrescriptions[i].project[b].delivery_way.toString()
222
+              }
223
+            }
224
+            let params = {
225
+              name: this.form.name,
226
+              mode: this.form.mode,
227
+              prescriptions: targetPrescriptions,
228
+            }
229
+            this.$emit('save_template', params)
218 230
           }
219
-        }
220
-
221
-
222
-        for(let i = 0; i < targetPrescriptions.length; i++){
223
-          if(targetPrescriptions[i].advices.length > 0 && targetPrescriptions[i].project.length == 0){
224
-            targetPrescriptions[i]["type"] = 1
225
-          } else if(targetPrescriptions[i].advices.length == 0 && targetPrescriptions[i].project.length > 0){
226
-            targetPrescriptions[i]["type"] = 2
227
-          }
228
-          for (let b = 0; b < targetPrescriptions[i].advices.length; b++) {
229
-            targetPrescriptions[i].advices[b].single_dose = targetPrescriptions[i].advices[b].single_dose.toString()
230
-            targetPrescriptions[i].advices[b].prescribing_number =targetPrescriptions[i].advices[b].prescribing_number.toString()
231
-            targetPrescriptions[i].advices[b].retail_price = targetPrescriptions[i].advices[b].retail_price.toString()
232
-            targetPrescriptions[i].advices[b].day = parseInt(targetPrescriptions[i].advices[b].day)
233
-          }
234
-          for (let b = 0; b < targetPrescriptions[i].project.length; b++) {
235
-            targetPrescriptions[i].project[b].price =targetPrescriptions[i].project[b].price.toString()
236
-            targetPrescriptions[i].project[b].total =targetPrescriptions[i].project[b].total.toString()
237
-            targetPrescriptions[i].project[b].delivery_way =targetPrescriptions[i].project[b].delivery_way.toString()
238
-          }
239
-        }
240
-
241
-        let params = {
242
-          name: this.form.name,
243
-          mode: this.form.mode,
244
-          prescriptions: targetPrescriptions,
245
-        }
246
-        this.$emit('save_template', params)
231
+        })
247 232
       },
248 233
       show(prescriptions) {
249
-        for (let i = 0; i < prescriptions.length; i++) {
250
-          if (prescriptions[i].id == 0) {
251
-            prescriptions[i].id = Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * Math.pow(10, 10 - 1))
252
-          }
253
-        }
254
-
255 234
         this.allPrescription = []
256 235
         this.modeOptions = this.$store.getters.treatment_mode
257 236
         let obj = {
258
-          check_group: [],
259 237
           prescriptions: prescriptions
260 238
         }
261 239
         this.allPrescription.push(obj)

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

@@ -341,8 +341,6 @@
341 341
                 }
342 342
               }
343 343
             }
344
-            console.log(this.un_cure_data)
345
-            console.log(this.cure_data)
346 344
             //排班
347 345
             for (let i = 0; i < response.data.data.list_two.length; i++) {
348 346
               //未就诊
@@ -584,31 +582,97 @@
584 582
           'record_date': this.record_date,
585 583
           'type': this.radio,
586 584
           'sch_type':this.schedule_type,
587
-        };
588
-        this.patientTableData = [];
585
+        }
586
+        this.un_cure_data = []
587
+        this.cure_data = []
588
+        this.all_data = []
589 589
 
590 590
         getSchedulePatientList(params).then(response => {
591 591
           if (response.data.state == 0) {
592 592
             this.$message.error(response.data.msg);
593 593
             return false
594 594
           } else {
595
-            this.patientTableData = response.data.data.list;
596
-            this.patientTableDataTwo = response.data.data.list;
597
-            this.cal_one = response.data.data.total_one;
598
-            this.cal_two = response.data.data.total_two;
599
-            this.admin_info = response.data.data.info;
595
+            //挂号
596
+            for (let i = 0; i < response.data.data.list.length; i++) {
597
+              for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
598
+                //未就诊
599
+                if (response.data.data.list[i].his_patient[b].prescription.length == 0) {
600
+                  let obj = {
601
+                    name: response.data.data.list[i].his_patient[b].name,
602
+                    number: response.data.data.list[i].his_patient[b].number,
603
+                    id: response.data.data.list[i].id,
604
+                    his_patient_id: response.data.data.list[i].his_patient[b].id
605
+                  }
606
+                  this.un_cure_data.push(obj)
607
+                }
608
+                //已就诊
609
+                if (response.data.data.list[i].his_patient[b].prescription.length > 0) {
610
+                  let obj = {
611
+                    name: response.data.data.list[i].his_patient[b].name,
612
+                    number: response.data.data.list[i].his_patient[b].number,
613
+                    id: response.data.data.list[i].id,
614
+                    his_patient_id: response.data.data.list[i].his_patient[b].id
615
+                  }
616
+                  this.cure_data.push(obj)
617
+                }
618
+              }
619
+            }
600 620
 
601
-            if (this.patientTableData.length > 0) {
602
-              this.$refs.tab.setCurrentRow(this.patientTableData[0]);
603
-              this.oldCurrentRow = this.patientTableData[0];
621
+            //排班
622
+            for (let i = 0; i < response.data.data.list_two.length; i++) {
623
+              //未就诊
624
+              if (response.data.data.list_two[i].prescription.length == 0 && response.data.data.list_two[i].his_patient.id == 0) {
625
+                let obj = {
626
+                  name: response.data.data.list_two[i].name,
627
+                  number: response.data.data.list_two[i].his_patient.number,
628
+                  id: response.data.data.list_two[i].id,
629
+                  his_patient_id: response.data.data.list_two[i].his_patient.id
630
+                }
631
+                this.un_cure_data.push(obj)
632
+              }
604 633
 
605
-              this.getPatientInfo(this.patientTableData[0])
634
+              //已就诊
635
+              if (response.data.data.list_two[i].prescription.length > 0 && response.data.data.list_two[i].his_patient.id == 0) {
636
+                let obj = {
637
+                  name: response.data.data.list_two[i].name,
638
+                  number: response.data.data.list_two[i].his_patient.number,
639
+                  id: response.data.data.list_two[i].id,
640
+                  his_patient_id: response.data.data.list_two[i].his_patient.id
641
+                }
642
+                this.cure_data.push(obj)
643
+              }
606 644
             }
607 645
 
608
-            this.prescriptionList = response.data.data.list.prescription
646
+            this.all_data = this.all_data.concat(this.cure_data)
647
+            this.all_data = this.all_data.concat(this.un_cure_data)
609 648
 
610
-            // this.patientid = this.patientTableData[0].patient_id
649
+            this.cure_data_two = this.cure_data
650
+            this.un_cure_data_two =this.un_cure_data
651
+            this.all_data_two = this.all_data
611 652
 
653
+            this.cal_one = this.un_cure_data.length
654
+            this.cal_two = this.cure_data.length
655
+            this.admin_info = response.data.data.info
656
+            if (this.un_cure_data.length > 0) {
657
+              if(this.radio == 0){
658
+                this.$refs.tab.setCurrentRow(this.all_data[0])
659
+                this.oldCurrentRow = this.all_data[0]
660
+                this.getPatientInfo(this.all_data[0])
661
+              }else if(this.radio == 1){
662
+
663
+                this.$refs.tab.setCurrentRow(this.un_cure_data[0])
664
+                this.oldCurrentRow = this.un_cure_data[0]
665
+                this.getPatientInfo(this.un_cure_data[0])
666
+
667
+              }else if(this.radio == 2){
668
+
669
+                this.$refs.tab.setCurrentRow(this.cure_data[0])
670
+                this.oldCurrentRow = this.cure_data[0]
671
+                this.getPatientInfo(this.cure_data[0])
672
+
673
+              }
674
+
675
+            }
612 676
           }
613 677
         })
614 678
       },
@@ -761,7 +825,6 @@
761 825
         for (let i = 0; i < additions_ids.length; i++) {
762 826
           let obj = {}
763 827
           let count = 0
764
-          console.log(addition_month_prescriptions.addition)
765 828
           if (addition_month_prescriptions.addition) {
766 829
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
767 830
               if (project_ids[i].price == addition_month_prescriptions.addition[a].price) {
@@ -777,9 +840,6 @@
777 840
           }
778 841
         }
779 842
 
780
-        console.log(drugs)
781
-        console.log(projects)
782
-        console.log(additions)
783 843
 
784 844
         let p1 = {
785 845
           name: '处方' + 1,
@@ -1004,8 +1064,6 @@
1004 1064
                 }
1005 1065
               }
1006 1066
             }
1007
-            console.log(this.un_cure_data)
1008
-            console.log(this.cure_data)
1009 1067
 
1010 1068
 
1011 1069
             //排班
@@ -1091,7 +1149,6 @@
1091 1149
             this.patientInfo = response.data.data.xt_info
1092 1150
             this.hisPatientInfo = response.data.data.his_info
1093 1151
             this.case_history = response.data.data.case_history
1094
-            console.log('病历222222', this.case_history)
1095 1152
             this.info = response.data.data.info
1096 1153
             this.doctors = response.data.data.doctors
1097 1154
             this.department = response.data.data.department
@@ -1451,9 +1508,7 @@
1451 1508
       },
1452 1509
 
1453 1510
       choosePatient(val) {
1454
-        console.log(111111,val);
1455 1511
         if(this.titleType == '电子病历'){
1456
-          console.log('this.$refs.child.watchSign',this.$refs.child.watchSign);
1457 1512
           if(this.$refs.child.watchSign > 2){
1458 1513
             this.$confirm('是否保存当前病例', '保存', {
1459 1514
               confirmButtonText: '确 定',
@@ -1488,7 +1543,6 @@
1488 1543
                   this.patientInfo = response.data.data.xt_info;
1489 1544
                   this.hisPatientInfo = response.data.data.his_info;
1490 1545
                   this.case_history = response.data.data.case_history;
1491
-                  console.log("数据是22222多少",this.case_history);
1492 1546
                   this.info = response.data.data.info;
1493 1547
                   this.doctors = response.data.data.doctors;
1494 1548
                   this.department = response.data.data.department;
@@ -1868,7 +1922,6 @@
1868 1922
                   this.patientInfo = response.data.data.xt_info;
1869 1923
                   this.hisPatientInfo = response.data.data.his_info;
1870 1924
                   this.case_history = response.data.data.case_history;
1871
-                  console.log("数据是22222多少",this.case_history);
1872 1925
                   this.info = response.data.data.info;
1873 1926
                   this.doctors = response.data.data.doctors;
1874 1927
                   this.department = response.data.data.department;
@@ -2249,7 +2302,6 @@
2249 2302
                   this.patientInfo = response.data.data.xt_info;
2250 2303
                   this.hisPatientInfo = response.data.data.his_info;
2251 2304
                   this.case_history = response.data.data.case_history;
2252
-                  console.log("数据是22222多少",this.case_history);
2253 2305
                   this.info = response.data.data.info;
2254 2306
                   this.doctors = response.data.data.doctors;
2255 2307
                   this.department = response.data.data.department;
@@ -2603,7 +2655,8 @@
2603 2655
               });
2604 2656
             this.$refs.child.watchSign = 0
2605 2657
           }
2606
-        }else{
2658
+        }
2659
+        else{
2607 2660
         var nowDate = new Date();
2608 2661
         var nowYear = nowDate.getFullYear();
2609 2662
         var nowMonth = nowDate.getMonth() + 1;
@@ -2638,9 +2691,9 @@
2638 2691
         }
2639 2692
 
2640 2693
         if (isShowDailog) {
2641
-          this.patientTableData.map((item, index) => {
2642
-            if (item.patient_id == this.oldCurrentRow.patient_id) {
2643
-              this.$refs.tab.setCurrentRow(this.patientTableData[index])
2694
+          this.all_data.map((item, index) => {
2695
+            if (item.id == this.oldCurrentRow.id) {
2696
+              this.$refs.tab.setCurrentRow(this.all_data[index])
2644 2697
               return
2645 2698
             }
2646 2699
           })
@@ -2651,11 +2704,12 @@
2651 2704
           }).then(() => {
2652 2705
             this.open(1)
2653 2706
           }).catch(() => {
2654
-            this.patientTableData.map((item, index) => {
2655
-              if (item.patient_id == val.patient_id) {
2656
-                this.$refs.tab.setCurrentRow(this.patientTableData[index])
2707
+
2708
+            for(let i = 0; i < this.all_data.length; i++){
2709
+              if(this.all_data[i].id == val.id){
2710
+                this.$refs.tab.setCurrentRow(this.all_data[i])
2657 2711
               }
2658
-            })
2712
+            }
2659 2713
 
2660 2714
             this.patientid = val.id
2661 2715
             let params = {
@@ -2671,12 +2725,16 @@
2671 2725
                 this.$message.error(response.data.msg)
2672 2726
                 return false
2673 2727
               } else {
2728
+                for(let i = 0;i < this.all_data.length; i++){
2729
+                  if(this.all_data[i].id == val.id){
2730
+                    this.oldCurrentRow =  this.all_data[i]
2731
+                  }
2732
+                }
2674 2733
 
2675 2734
                 this.prescriptions = []
2676 2735
                 this.patientInfo = response.data.data.xt_info
2677 2736
                 this.hisPatientInfo = response.data.data.his_info
2678 2737
                 this.case_history = response.data.data.case_history
2679
-                console.log('数据列表是多少', this.case_history)
2680 2738
                 var month_prescriptions = response.data.data.month_prescriptions
2681 2739
                 this.setMonthPrescription(month_prescriptions)
2682 2740
                 this.doctors = response.data.data.doctors
@@ -2688,7 +2746,7 @@
2688 2746
                   }
2689 2747
                 }
2690 2748
 
2691
-                this.case_history = case_history
2749
+                this.case_history = response.data.data.case_history
2692 2750
                 this.info = response.data.data.info
2693 2751
                 this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
2694 2752
                 if (this.case_history.breathing <= 0) {
@@ -3059,7 +3117,6 @@
3059 3117
               this.patientInfo = response.data.data.xt_info
3060 3118
               this.hisPatientInfo = response.data.data.his_info
3061 3119
               this.case_history = response.data.data.case_history
3062
-              console.log('数据是22222多少', this.case_history)
3063 3120
               this.info = response.data.data.info
3064 3121
               this.doctors = response.data.data.doctors
3065 3122
               this.department = response.data.data.department
@@ -3413,17 +3470,10 @@
3413 3470
 
3414 3471
         }
3415 3472
         }
3416
-
3417
-
3418
-
3419
-
3420
-
3421 3473
       },
3422 3474
       currentChange(currentRow, oldCurrentRow) {
3423 3475
         this.newPatientId = oldCurrentRow.id;
3424
-        console.log('老数据',oldCurrentRow.id);
3425 3476
         this.patientid = oldCurrentRow.id;
3426
-
3427 3477
         let isShowDailog = false
3428 3478
         for (let i = 0; i < this.prescriptions.length; i++) {
3429 3479
           if ((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)) {
@@ -3434,14 +3484,10 @@
3434 3484
           this.oldCurrentRow = currentRow
3435 3485
           return
3436 3486
         }
3437
-
3438
-
3439 3487
       }, open_two() {
3440 3488
         this.$refs.prescriptions.open_two()
3441 3489
       },open_three(){
3442 3490
         this.$refs.prescriptions.open_three()
3443
-
3444
-
3445 3491
       },
3446 3492
       open(index) {
3447 3493
 
@@ -3504,7 +3550,6 @@
3504 3550
           if (response.data.state == 1) {
3505 3551
             this.centerDialogVisible = true
3506 3552
             var list = response.data.data.list
3507
-            console.log('list2222222', list)
3508 3553
             for (let i = 0; i < list.length; i++) {
3509 3554
               list[i].prescription_number = list[i].prescription_number + i
3510 3555
             }
@@ -3514,9 +3559,11 @@
3514 3559
       },
3515 3560
       handleSelectionChange(val) {
3516 3561
         this.selecting_schs = val
3517
-        // console.log("99999",this.selecting_schs)
3518 3562
       },
3519 3563
       handleClick() {
3564
+        if(this.titleType == "电子处方"){
3565
+          this.getPatientInfo()
3566
+        }
3520 3567
 
3521 3568
       },
3522 3569
       savePrint() {

+ 22 - 5
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue Wyświetl plik

@@ -7,15 +7,15 @@
7 7
         </div>
8 8
         <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
9 9
             <div class="mainLeft">
10
-                <!--<div class="mainCell" style="margin-bottom:10px;">-->
11
-                    <!--<el-input size="small" placeholder="请输入姓名" @input="searchAction"-->
12
-                              <!--@keyup.enter.native='searchAction'-->
13
-                              <!--v-model="search_input" class="filter-item"/>-->
10
+                <div class="mainCell" style="margin-bottom:10px;">
11
+                    <el-input size="small" placeholder="请输入姓名或者透析号"
12
+                              v-model="search_input" class="filter-item" @input="searchAction"
13
+                              @keyup.enter.native='searchAction'/>
14 14
                     <!--<el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"-->
15 15
                                <!--@click="searchAction">-->
16 16
                         <!--搜索-->
17 17
                     <!--</el-button>-->
18
-                <!--</div>-->
18
+                </div>
19 19
                 <div>
20 20
                     <el-table :data="data" :height="tableHeight" @row-click='choosePatient'
21 21
                                border style="width: 100%;"
@@ -91,6 +91,7 @@
91 91
         fullHeight: document.documentElement.clientHeight,
92 92
         isloading: false,
93 93
         data: [],
94
+        all_data:[],
94 95
         page: 1,
95 96
         limit: 10,
96 97
         patient_id: 0,
@@ -98,6 +99,20 @@
98 99
       }
99 100
     },
100 101
     methods: {
102
+      searchAction() {
103
+        this.data = []
104
+        if (this.search_input.length == 0) {
105
+          this.data = this.all_data
106
+        } else {
107
+
108
+          for(let i = 0; i < this.all_data.length; i++){
109
+            if(this.all_data[i].name.indexOf(this.search_input)  != -1 || this.all_data[i].dialysis_no.indexOf(this.search_input)  != -1){
110
+              this.data.push(this.all_data[i])
111
+            }
112
+          }
113
+        }
114
+      },
115
+
101 116
       deleteTemplate(row) {
102 117
         this.$confirm('处方模版删除后不可恢复,是否确认删除', '删除', {
103 118
           confirmButtonText: '确 定',
@@ -172,6 +187,8 @@
172 187
         getPatientList().then(response => {
173 188
           if (response.data.state == 1) {
174 189
             this.data = response.data.data.list
190
+            this.all_data = response.data.data.list
191
+
175 192
             this.$refs.tab.setCurrentRow(this.data[0])
176 193
             // this.patient_id = this.data[0].id
177 194
             // this.GetPrescriptionTemplateList()

+ 8 - 4
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue Wyświetl plik

@@ -111,6 +111,7 @@
111 111
 
112 112
                             </el-tabs>
113 113
                         </div>
114
+                        <div style="height:100%;" v-show="showTwo">
114 115
                         <div style="height:100%;" v-show="showTwo">
115 116
                             <el-tabs class="rightTabs" v-model="activeName">
116 117
                                 <el-tab-pane label="项目列表" name="1">
@@ -174,8 +175,11 @@
174 175
                                 </el-tab-pane>
175 176
                             </el-tabs>
176 177
                         </div>
178
+                        </div>
177 179
                     </el-tabs>
178
-                    <template>
180
+
181
+
182
+                <template>
179 183
 
180 184
 
181 185
                         <div class="comfirmBox">
@@ -1350,7 +1354,7 @@
1350 1354
                   unit: temp2[b].unit,
1351 1355
                   type: temp2[b].type
1352 1356
                 }
1353
-                if (obj.total == 0) {
1357
+                if (obj.total == 0 || obj.total == undefined) {
1354 1358
                   obj.total = 1
1355 1359
                 }
1356 1360
                 if (obj.type == 3) {
@@ -1618,7 +1622,7 @@
1618 1622
                   unit: project[i].project.unit,
1619 1623
                   type: project[i].type
1620 1624
                 }
1621
-                if (obj.total == 0) {
1625
+                if (obj.total == 0 || obj.total == undefined) {
1622 1626
                   obj.total = 1
1623 1627
                 }
1624 1628
 
@@ -1639,7 +1643,7 @@
1639 1643
                   unit: project[i].good_info.unit,
1640 1644
                   type: project[i].type
1641 1645
                 }
1642
-                if (obj.total == 0) {
1646
+                if (obj.total == 0 || obj.total == undefined) {
1643 1647
                   obj.total = 1
1644 1648
                 }
1645 1649
                 this.teamList.push(obj)

+ 30 - 10
src/xt_pages/outpatientDoctorStation/print.vue Wyświetl plik

@@ -13,8 +13,13 @@
13 13
       </template>
14 14
             
15 15
     <div class='dialysisPage' style="padding-top:40px;">
16
-      <printOne v-if="org_id != 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
17
-      <printFour v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
16
+      <div v-if="org_id != 4">
17
+        <printOne v-if="org_id != 10088" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
18
+        <printFour v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printFour>
19
+      </div>
20
+      <div>
21
+        <printThree v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printThree>
22
+      </div>
18 23
     </div>
19 24
   </div>
20 25
 </template>
@@ -30,6 +35,7 @@ import { jsGetAge, uParseTime } from "@/utils/tools";
30 35
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
31 36
 import print from "print-js";
32 37
 import printOne from "./template/printOne"
38
+import printThree from "./template/printThree"
33 39
 import printFour from "./template/printFour"
34 40
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
35 41
 export default {
@@ -37,6 +43,7 @@ export default {
37 43
   components: {
38 44
     BreadCrumb,
39 45
     printOne,
46
+    printThree,
40 47
     printFour
41 48
   },
42 49
   props:{
@@ -67,15 +74,28 @@ export default {
67 74
     printThisPage() {
68 75
       var ptime = Math.round(new Date().getTime() / 1000);
69 76
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
70
-
71
-      const style =
77
+      
78
+      if(this.org_id == 4){
79
+        
80
+        const style =
81
+        '@media print {#prescription-print{font-size:14px;}.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;}}';
82
+        printJS({
83
+          printable: "prescriptionPrint",
84
+          type: "html",
85
+          style: style,
86
+          scanStyles: false
87
+        });
88
+      }else{
89
+        const style =
72 90
         '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;font-size:14px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{padding:0 10px;min-height:450px;}.Rp{font-size: 22px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;} .drugsOne{line-height: 1px;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
73
-      printJS({
74
-        printable: "prescriptionPrint",
75
-        type: "html",
76
-        style: style,
77
-        scanStyles: false
78
-      });
91
+        printJS({
92
+          printable: "prescriptionPrint",
93
+          type: "html",
94
+          style: style,
95
+          scanStyles: false
96
+        });
97
+      }
98
+      
79 99
 
80 100
       // if (this.org_template_info.template_id == 1) {
81 101
       //   printJS({

+ 382 - 0
src/xt_pages/outpatientDoctorStation/template/printThree.vue Wyświetl plik

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

+ 26 - 9
src/xt_pages/outpatientDoctorStation/treatPrint.vue Wyświetl plik

@@ -13,7 +13,8 @@
13 13
       </template>
14 14
             
15 15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <printOne 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>
16
+        <printOne v-if="org_id != 4" 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 20
 </template>
@@ -29,12 +30,14 @@ import { jsGetAge, uParseTime } from "@/utils/tools";
29 30
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
30 31
 import print from "print-js";
31 32
 import printOne from "./treatTemplate/printOne"
33
+import printTwo from "./treatTemplate/printTwo"
32 34
 import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
33 35
 export default {
34 36
   name: "dialysisPrintOrder",
35 37
   components: {
36 38
     BreadCrumb,
37
-    printOne
39
+    printOne,
40
+    printTwo
38 41
   },
39 42
   props:{
40 43
     paramsObj:Object
@@ -62,14 +65,27 @@ export default {
62 65
       var ptime = Math.round(new Date().getTime() / 1000);
63 66
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
64 67
 
65
-      const style =
68
+      if(this.org_id == 4){
69
+        
70
+        const style =
71
+        '@media print {#prescription-print{font-size:14px;}.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;}}';
72
+        printJS({
73
+          printable: "prescriptionPrint",
74
+          type: "html",
75
+          style: style,
76
+          scanStyles: false
77
+        });
78
+      }else{
79
+        const style =
66 80
         '@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;}}';
67
-      printJS({
68
-        printable: "prescriptionPrint",
69
-        type: "html",
70
-        style: style,
71
-        scanStyles: false
72
-      });
81
+        printJS({
82
+          printable: "prescriptionPrint",
83
+          type: "html",
84
+          style: style,
85
+          scanStyles: false
86
+        });
87
+      }
88
+      
73 89
 
74 90
       // if (this.org_template_info.template_id == 1) {
75 91
       //   printJS({
@@ -151,6 +167,7 @@ export default {
151 167
   },
152 168
 
153 169
   created() {
170
+    this.org_id = this.$store.getters.xt_user.org_id
154 171
     this.getAllDoctorList()
155 172
     var record_date = this.paramsObj.record
156 173
     this.record_date = record_date

+ 482 - 0
src/xt_pages/outpatientDoctorStation/treatTemplate/printTwo.vue Wyświetl plik

@@ -0,0 +1,482 @@
1
+<template>
2
+   <div id='prescriptionPrint'>
3
+    <div id='prescription-print' class="prescription-print" v-for="(item,index) in advicePrint" :key="index">
4
+
5
+        <img src="../../../assets/img/bailinTop.jpg" alt="">
6
+        <div class="printTitle">治疗单</div>
7
+        <div style="display:flex;">
8
+            <div style="width:33%;display:flex;">费别:<span class="under_line">深圳医保1档</span></div>
9
+            <div style="width:33%;display:flex;">电脑号:<span class="under_line">1111111</span></div>
10
+            <div style="width:33%;display:flex;">处方编号:<span class="under_line">8972392771</span></div>
11
+        </div>
12
+
13
+
14
+        <div class="infoTitle">
15
+            <div>姓名:{{item.patient.name?item.patient.name:""}}</div>
16
+            <div>性别:
17
+            <span v-if="item.patient.gender == 1">男</span>
18
+            <span v-if="item.patient.gender == 2">女</span>
19
+            </div>
20
+            <div>年龄:{{item.patient.age?item.patient.age:""}}岁</div>
21
+        </div>
22
+        <div class="infoMain">
23
+            <div style="margin-bottom: 10px;display:flex;">门诊号码:<span class="under_line">{{hisPatient.number?hisPatient.number:""}}</span></div>
24
+            <div style="margin-bottom: 10px;display:flex;">科别:<span class="under_line">{{item.info?getDepart(item.info.departments):''}}</span></div>
25
+            <div style="margin-bottom: 10px;display:flex;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
26
+            <div style="margin-bottom: 10px;display:flex;">自费药品签名:<span class="under_line"></span></div>
27
+            <!-- <div style="margin-bottom: 10px;display:flex;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div> -->
28
+            <div style="margin-bottom: 10px;display:flex;">联系方式:<span class="under_line">{{item.patient.phone}}</span></div>
29
+            <div style="margin-bottom: 10px;display:flex;">开具日期:<span class="under_line">{{getTime(item.pre_time) ? getTime(item.pre_time).split(' ')[0] : ''}}</span></div>
30
+            <!-- <div>地址:{{item.patient.home_address}}</div> -->
31
+            <!-- <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div> -->
32
+        </div>
33
+
34
+        <!-- <div class="prescriptionBox">
35
+            <table style="width:100%;text-align:center;line-height:25px;">
36
+                <tr>
37
+                    <td>序号</td>
38
+                    <td>项目名称</td>
39
+                    <td>数量</td>
40
+                    <td>单位</td>
41
+                    <td>单价</td>
42
+                    <td>部位</td>
43
+                    <td>备注</td>
44
+                    <td>天数</td>
45
+                </tr>
46
+                <tr v-for="(it,index) in item.project" :key="index">
47
+                    <td>{{index+1}}</td>
48
+                    <td>{{it.type == 2 ?getProjectName(it.project_id):it.good_info.good_name}}</td>
49
+                    <td>{{it.single_dose}}</td>
50
+                    <td>{{getUnit(it.unit)}}</td>
51
+                    <td>{{it.price}}</td>
52
+                    <td></td>
53
+                    <td>{{it.remark}}</td>
54
+                    <td>{{it.day}}</td>
55
+
56
+                </tr>
57
+
58
+                <tr v-for="(it,index) in item.advices" :key="index">
59
+                    <td>{{index+1}}</td>
60
+                    <td>{{it.advice_name?it.advice_name:''}}</td>
61
+                    <td>{{it.single_dose?it.single_dose:''}}</td>
62
+                    <td>{{it.single_dose_unit?it.single_dose_unit:''}}</td>
63
+                    <td>{{it.price}}</td>
64
+                    <td></td>
65
+                    <td>{{it.remark}}</td>
66
+                    <td>{{it.day}}</td>
67
+
68
+                </tr>
69
+            </table>
70
+        </div> -->
71
+        <div class="prescriptionBox">
72
+              <div class="Rp">Rp:</div>
73
+              <div class="drugsBox" v-for="(it,index) in item.advices" :key="index">
74
+                  <!-- <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> -->
75
+                  <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>
76
+              </div>
77
+              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
78
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
79
+              </div>
80
+              <div style="text-align:center;" >(以下空白)</div>
81
+        </div>
82
+        <div style="display:flex;">
83
+            <div>医&nbsp;&nbsp;&nbsp;&nbsp;师:<span style="width:100px;display:inline-block;">{{item.doctor?item.doctor:""}}</span></div>
84
+            <div>药品金额:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}</div>
85
+          </div>
86
+          <div style="display:flex;">
87
+            <div style="display:flex;">核对护士:</div>
88
+          </div>
89
+          <div style="display:flex;">
90
+            打印时间:<span style="border-bottom:1px solid #000;">{{getTime(new Date())?getTime(new Date()):""}}</span>
91
+          </div>
92
+          <img src="../../../assets/img/bailinBottom.jpg" alt="">
93
+          <div style="page-break-after:always"></div>
94
+     </div>
95
+
96
+
97
+    <!-- <div id='prescriptionPrint'>
98
+
99
+        <div v-for="(item,index) in advicePrint" :key="index">
100
+            <div id='prescription-print' class="prescription-print" style="page-break-after: always;">
101
+                <div style="display:flex;justify-content: space-between;font-weight:bold;">
102
+                    <div style="width:200px;display:flex;justify-content: space-between;font-weight:bold;">
103
+                        <span>费别</span>
104
+                        <span>自费</span>
105
+                        <span>公费</span>
106
+                        <span>保险</span>
107
+                        <span>其他</span>
108
+                    </div>
109
+                    <div>就诊日期:{{getTime(item.ctime)}}</div>
110
+                </div>
111
+
112
+                <div class="printTitle">血液透析中心</div>
113
+
114
+                <div class="printTitle">处方、治疗单</div>
115
+
116
+                <div class="infoTitle">
117
+                    <div>门诊编号:</div>
118
+                    <div>电脑号:</div>
119
+                </div>
120
+
121
+                <div class="infoMain">
122
+                    <div style="margin-bottom: 10px;width:25%">姓名:{{item.patient.name}}</div>
123
+                    <div style="margin-bottom: 10px;width:25%">性别:
124
+                        <span v-if="item.patient.gender == 1">男</span>
125
+                        <span v-if="item.patient.gender == 2">女</span>
126
+                    </div>
127
+                    <div style="margin-bottom: 10px;width:25%">年龄:
128
+                        <span>{{item.patient.age}}</span>
129
+                    </div>
130
+                    <div style="margin-bottom: 10px;width:25%">参保类型:</div>
131
+                    <div style="margin-bottom: 10px;width:50%;">联系电话:{{item.patient.phone}}</div>
132
+                    <div style="width:50%;">地址:{{item.patient.unit_address}}</div>
133
+                    <div style="width:100%;">诊断:{{item.patient.diagnose}}</div>
134
+                </div>
135
+
136
+                <div class="prescriptionBox">
137
+                    <table style="width:100%;text-align:center;line-height:25px;">
138
+                        <tr>
139
+                            <td>序号</td>
140
+                            <td>项目名称</td>
141
+                            <td>数量</td>
142
+                            <td>单位</td>
143
+                            <td>单价</td>
144
+                            <td>部位</td>
145
+                            <td>备注</td>
146
+                            <td>天数</td>
147
+                        </tr>
148
+                        <tr v-for="(it,index) in item.project" :key="index">
149
+                            <td>{{index+1}}</td>
150
+                            <td>{{getProjectName(it.project_id)}}</td>
151
+                            <td>{{it.single_dose}}</td>
152
+                            <td>{{getUnit(it.unit)}}</td>
153
+                            <td>{{it.price}}</td>
154
+                            <td></td>
155
+                            <td>{{it.remark}}</td>
156
+                            <td>{{it.day}}</td>
157
+
158
+                        </tr>
159
+                    </table>
160
+                </div>
161
+                <div class="infoTitle">
162
+                    <div>开单医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
163
+                    <div>签章:</div>
164
+                </div>
165
+                <div class="actionBar">
166
+                    <div>执行医生:{{getDoctor(item.doctor)?getDoctor(item.doctor):""}}</div>
167
+                    <div>费用:</div>
168
+                </div>
169
+                <table style="width:100%;text-align:center;line-height:25px;border-collapse: collapse;" border="1">
170
+                    <tr>
171
+                        <td style="width:16%;">治疗时间</td>
172
+                        <td style="width:16%;"></td>
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
+                    </tr>
178
+                    <tr>
179
+                        <td style="width:16%;">医生签字</td>
180
+                        <td style="width:16%;"></td>
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
+                    </tr>
186
+                    <tr>
187
+                        <td style="width:16px;">患者签字</td>
188
+                        <td style="width:16px;"></td>
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
+                    </tr>
194
+                </table>
195
+            </div>
196
+
197
+        </div>
198
+
199
+    </div> -->
200
+  </div>
201
+</template>
202
+<script>
203
+import { jsGetAge, uParseTime } from '@/utils/tools'
204
+import {getAllDoctorList,getPrescriptionPrint} from "@/api/project/project"
205
+import {getInitData} from "@/api/his/his"
206
+export default {
207
+    props:{
208
+      patient_id:Number,
209
+      record_date:String,
210
+      prescription_id:Number,
211
+      ids:String
212
+    },
213
+    data(){
214
+      return {
215
+        doctorList:[],
216
+        advicePrint:{},
217
+        patient:{},
218
+        tableData:[],
219
+        prescriptionInfo:[],
220
+        projectList:[],
221
+        prescriptions:[],
222
+        settlement:
223
+         [
224
+          {value: 1,label: '医保'},
225
+          {value: 2,label: '自费'},
226
+          {value: 3,label:'公费'},
227
+          {value: 4,label:'农保'},
228
+          {value: 5,label:'会员'},
229
+          {value: 6,label:'职工'},
230
+          {value: 7,label:'合同'}
231
+         ],
232
+         hisPatient:{},
233
+         diagnoses:[],
234
+         department:[],
235
+      }
236
+    },
237
+   methods:{
238
+     printThisPage() {
239
+      var ptime = Math.round(new Date().getTime() / 1000);
240
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
241
+
242
+      const style =
243
+        '@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;}}';
244
+      printJS({
245
+        printable: "prescription-print",
246
+        type: "html",
247
+        style: style,
248
+        scanStyles: false
249
+      });
250
+    },
251
+    getDepart(id){
252
+        var name = ""
253
+        for(let i=0;i<this.department.length;i++){
254
+            if(id == this.department[i].id){
255
+                name = this.department[i].name
256
+            }
257
+        }
258
+        return name
259
+    },
260
+     getAllDoctorList(){
261
+      getAllDoctorList().then(response=>{
262
+        if(response.data.state == 1){
263
+               var doctor =  response.data.data.doctor
264
+
265
+               this.doctorList = doctor
266
+             }
267
+         })
268
+     },
269
+
270
+      getDoctor(id){
271
+        var name = ""
272
+        for(let i=0;i<this.doctorList.length;i++){
273
+          if(id == this.doctorList[i].admin_user_id){
274
+              name = this.doctorList[i].user_name
275
+          }
276
+        }
277
+        return name
278
+      },
279
+      getTime(value, temp) {
280
+        if (value != undefined) {
281
+            return uParseTime(value, temp)
282
+        }
283
+        return ''
284
+     },
285
+     getPrescriptionPrint(){
286
+         var params = {
287
+          patient_id:this.patient_id,
288
+          record_date:this.record_date,
289
+          prescription_id:this.prescription_id,
290
+          ids:this.ids,
291
+        }
292
+        console.log("999999",params)
293
+       getPrescriptionPrint(params).then(response=>{
294
+         if(response.data.state == 1){
295
+            var advicePrint =  response.data.data.advicePrint
296
+            console.log("adviceprint",advicePrint)
297
+            this.advicePrint = advicePrint
298
+            this.prescriptions = advicePrint
299
+            var projectlist =  response.data.data.projectlist
300
+            console.log("所有项目列表",projectlist)
301
+            this.projectList = projectlist
302
+            this.hisPatient = response.data.data.hisPatient
303
+
304
+          }
305
+       })
306
+     },
307
+     getProjectName(id){
308
+        var project_name = ""
309
+        for(let i=0;i<this.projectList.length;i++){
310
+           if(id == this.projectList[i].id){
311
+               project_name = this.projectList[i].project_name
312
+           }
313
+        }
314
+        return project_name
315
+     },
316
+     getUnit(id){
317
+        var unit=""
318
+       for(let i=0;i<this.projectList.length;i++){
319
+           if(id == this.projectList[i].id){
320
+               unit = this.projectList[i].unit
321
+           }
322
+        }
323
+        return unit
324
+     },
325
+
326
+       getTotalOne(id) {
327
+
328
+        var total = 0
329
+        var addtotal = 0
330
+        for (let i = 0; i < this.prescriptions.length; i++) {
331
+          if(id == this.prescriptions[i].id){
332
+            if (this.prescriptions[i].project != null) {
333
+              for (let a = 0; a < this.prescriptions[i].project.length; a++) {
334
+                total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
335
+              }
336
+            }
337
+
338
+            if (this.prescriptions[i].additionalcharge != null) {
339
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
340
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
341
+              }
342
+            }
343
+              addtotal =  Math.floor(addtotal * 100) / 100
344
+        }
345
+
346
+       }
347
+
348
+      for (let i = 0; i < this.prescriptions.length; i++) {
349
+          if(id == this.prescriptions[i].id){
350
+            if (this.prescriptions[i].advices != null) {
351
+              for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
352
+                total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
353
+              }
354
+            }
355
+
356
+            if (this.prescriptions[i].additionalcharge != null) {
357
+              for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
358
+                addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
359
+              }
360
+            }
361
+              addtotal =  Math.floor(addtotal * 100) / 100
362
+        }
363
+       }
364
+
365
+        return total + addtotal
366
+      },
367
+     getInitData(){
368
+       getInitData().then(response=>{
369
+          if(response.data.state == 1){
370
+            this.department = response.data.data.department
371
+            this.diagnoses = response.data.data.diagnose
372
+            console.log("争端",this.diagnoses)
373
+          }
374
+       })
375
+     },
376
+     getDiagnosis(id){
377
+        var name = ""
378
+        for(let i=0;i<this.diagnoses.length;i++){
379
+          if(id == this.diagnoses[i].id){
380
+             name = this.diagnoses[i].class_name
381
+          }
382
+        }
383
+        return name
384
+     }
385
+   },
386
+   created(){
387
+      this.getInitData()
388
+      this.getAllDoctorList()
389
+      this.getPrescriptionPrint()
390
+      var xtuser = this.$store.getters.xt_user
391
+      this.orgname = xtuser.org.org_name
392
+
393
+   },
394
+   watch:{
395
+     patient_id:function(val){
396
+       console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
397
+    //    this.getPrescriptionPrint()
398
+     },
399
+     ids:function(val){
400
+         this.ids = val
401
+         console.log('this.idsids',this.ids)
402
+         this.getPrescriptionPrint()
403
+     }
404
+   }
405
+}
406
+</script>
407
+
408
+
409
+<style lang="scss" scoped>
410
+.prescription-print{
411
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
412
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
413
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
414
+    margin-bottom: 20px;
415
+    padding:20px 10px;
416
+}
417
+.printTitle{
418
+    font-size: 22px;
419
+    text-align: center;
420
+    font-weight: bold;
421
+    margin-bottom: 10px;
422
+}
423
+.infoTitle{
424
+    display: flex;
425
+    margin-top:10px;
426
+    line-height: 24px;
427
+}
428
+.infoTitle div{
429
+    width: 200px;
430
+}
431
+.infoMain{
432
+    display: flex;
433
+    flex-wrap: wrap;
434
+    margin-top:10px;
435
+}
436
+.infoMain div{
437
+    width: 50%;
438
+    line-height: 24px;
439
+}
440
+.prescriptionBox{
441
+    padding:0 10px;
442
+    min-height:400px;
443
+}
444
+.Rp{
445
+    font-size: 22px;
446
+    font-weight: bold;
447
+}
448
+.drugsBox{
449
+    padding-left: 40px;
450
+    margin-bottom: 10px;
451
+}
452
+.drugsBox div{
453
+    line-height: 20px;
454
+}
455
+.drugsOne{
456
+    line-height: 24px;
457
+}
458
+.drugsOne span{
459
+    margin-right: 20px;
460
+}
461
+.doctorBox{
462
+    display: flex;
463
+    justify-content: space-between;
464
+    padding:0 10px;
465
+    line-height: 24px;
466
+    border-bottom: 2px solid #000;
467
+}
468
+.actionBar{
469
+    display: flex;
470
+    justify-content: space-between; 
471
+    line-height: 24px;
472
+    padding:0 10px;
473
+}
474
+.actionBar p{
475
+    width:150px;
476
+}
477
+.under_line{
478
+  display: inline-block;
479
+  border-bottom: 1px solid #000;
480
+  flex: 1;
481
+}
482
+</style>