csx před 4 roky
rodič
revize
ba09b1a82a

+ 415 - 0
src/xt_pages/outpatientCharges/newStatementPrint.vue Zobrazit soubor

@@ -0,0 +1,415 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+      >打印</el-button
12
+      >
13
+    </template>
14
+
15
+    <div class='dialysisPage' style="padding-top:40px;">
16
+      <printOne :info="info"></printOne>
17
+    </div>
18
+  </div>
19
+</template>
20
+
21
+<script>
22
+
23
+
24
+  import { parseTime } from "@/utils";
25
+  import { getDialysisRecord } from "@/api/dialysis";
26
+  import { getDataConfig } from "@/utils/data";
27
+  import { jsGetAge, uParseTime } from "@/utils/tools";
28
+  import axios from 'axios'
29
+
30
+  import BreadCrumb from "@/xt_pages/components/bread-crumb";
31
+  import print from "print-js";
32
+  import printOne from "./statementTemplate/printOne"
33
+  import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
34
+  export default {
35
+    name: "newStatementPrint",
36
+    components: {
37
+      BreadCrumb,
38
+      printOne
39
+    },
40
+    props:{
41
+      paramsObj:Object
42
+    },
43
+    data() {
44
+      return {
45
+        crumbs: [
46
+          { path: false, name: '门诊医生站' },
47
+          { path: false, name: '打印' }
48
+        ],
49
+        record_date:"",
50
+        patientTableData:[],
51
+        advicePrint:[],
52
+        hisPatient:{},
53
+        patient:{},
54
+        search_input:"",
55
+        loading:false,
56
+        patient_id:0,
57
+        prescription_id:0,
58
+        ids:'',
59
+        info:null,
60
+      };
61
+    },
62
+    methods:{
63
+      printThisPage() {
64
+        var ptime = Math.round(new Date().getTime() / 1000);
65
+        this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
66
+
67
+        const style =
68
+          '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}';
69
+        printJS({
70
+          printable: "statement-print",
71
+          type: "html",
72
+          style: style,
73
+          scanStyles: false
74
+        });
75
+
76
+        // if (this.org_template_info.template_id == 1) {
77
+        //   printJS({
78
+        //     printable: "dialysis-print-box",
79
+        //     type: "html",
80
+        //     style: style,
81
+        //     scanStyles: false
82
+        //   });
83
+        // }
84
+      },
85
+      getAllDoctorList(){
86
+        getAllDoctorList().then(response=>{
87
+          if(response.data.state == 1){
88
+            var doctor =  response.data.data.doctor
89
+
90
+            this.doctorList = doctor
91
+          }
92
+        })
93
+      },
94
+      getAllHisPatientList(){
95
+        const params = {
96
+          record_date:this.record_date
97
+        }
98
+        getAllHisPatientList(params).then(response=>{
99
+          if(response.data.state == 1){
100
+            this.patientTableData = response.data.data.list
101
+            this.patientTableDataTwo = response.data.data.list
102
+
103
+            console.log('222', this.patientTableData)
104
+            let cal_one = 0
105
+            let cal_two = 0
106
+            for (let i = 0; i < response.data.data.list.length; i++) {
107
+              if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
108
+                cal_one = cal_one + 1
109
+              }
110
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
111
+                cal_two = cal_two + 1
112
+              }
113
+            }
114
+            // this.$refs.tab.setCurrentRow(this.patientTableData[0])
115
+            // console.log(this.patientTableData[0])
116
+            // this.choosePatient(this.patientTableData[0])
117
+            this.cal_one = cal_one
118
+            this.cal_two = cal_two
119
+          }
120
+        })
121
+      },
122
+
123
+      changePatient(row){
124
+        console.log("row",row)
125
+        this.patient_id = row.patient_id
126
+        this.record_date = this.record_date
127
+        this.prescription_id = this.prescription_id
128
+        //   var params = {
129
+        //     patient_id:row.patient_id,
130
+        //     record_date:this.record_date,
131
+        //     prescription_id:this.prescription_id,
132
+        //   }
133
+        // getPrescriptionPrint(params).then(response=>{
134
+        //     if(response.data.state == 1){
135
+        //       var advicePrint =  response.data.data.advicePrint
136
+        //       console.log("adviceprint",advicePrint)
137
+        //       this.advicePrint = advicePrint
138
+        //       // var hisPatient =  response.data.data.hisPatient
139
+        //       // console.log("hispatient",hisPatient)
140
+        //       // this.hisPatient = hisPatient
141
+        //       var patient =  response.data.data.patient
142
+        //       console.log("patient",patient)
143
+        //       this.patient = patient
144
+        //       var doctorPorject = response.data.data.doctorPorject
145
+        //       console.log("doctorporject",doctorPorject)
146
+        //     }
147
+        // })
148
+      },
149
+      searchAction(){
150
+
151
+      },
152
+      getInfo(order_id) {
153
+        if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919) {
154
+
155
+          var that = this
156
+
157
+          axios.get('http://127.0.0.1:9532/api/settle/query', {
158
+            params: {
159
+              order_id: order_id,
160
+            }
161
+          })
162
+            .then(function (response) {
163
+              if (response.data.state == 0) {
164
+                this.$message.error(response.data.msg)
165
+                return false
166
+              } else {
167
+                console.log("logloglog")
168
+
169
+                console.log(response.data.data.info)
170
+                that.info = response.data.data.info
171
+                console.log(that.info)
172
+
173
+                that.info['bed_cost_total'] = response.data.data.bedCostTotal
174
+                that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal
175
+                that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal
176
+
177
+                that.info['operation_cost_total'] = response.data.data.operationCostTotal
178
+                that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal
179
+                that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal
180
+
181
+                that.info['other_cost_total'] = response.data.data.otherCostTotal
182
+                that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal
183
+                that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal
184
+
185
+                that.info['material_cost_total'] = response.data.data.materialCostTotal
186
+                that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal
187
+                that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal
188
+
189
+                that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal
190
+                that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal
191
+                that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal
192
+
193
+                that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal
194
+                that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal
195
+                that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal
196
+
197
+
198
+                that.info['check_cost_total'] = response.data.data.checkCostTotal
199
+                that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal
200
+                that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal
201
+
202
+
203
+                that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal
204
+                that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal
205
+                that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal
206
+
207
+                that.info['treat_cost_total'] = response.data.data.treatCostTotal
208
+                that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal
209
+                that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal
210
+                console.log(this.info)
211
+              }
212
+            })
213
+            .catch(function (error) {
214
+
215
+            });
216
+        }
217
+      }
218
+
219
+    },
220
+
221
+    created() {
222
+      this.getInfo(this.paramsObj.order_id)
223
+    },
224
+    watch:{
225
+      paramsObj:{//深度监听,可监听到对象、数组的变化
226
+        handler(val, oldVal){
227
+          this.paramsObj = val
228
+          this.getInfo(this.paramsObj.order_id)
229
+
230
+        },
231
+        deep:true
232
+      }
233
+    }
234
+
235
+  };
236
+</script>
237
+
238
+<style>
239
+  .dialysis-print-order {
240
+    width: 960px;
241
+    margin: 0 auto;
242
+  }
243
+
244
+  .dialysis-print-order .order-yy-name {
245
+    margin: auto;
246
+    text-align: center;
247
+    font-size: 20px;
248
+    letter-spacing: 5px;
249
+  }
250
+
251
+  .dialysis-print-order .order-title {
252
+    margin: auto;
253
+    font-weight: 600;
254
+    text-align: center;
255
+    font-size: 22px;
256
+    padding: 10px;
257
+  }
258
+
259
+  .dialysis-print-order .table-box {
260
+    width: 100%;
261
+    line-height: 23px;
262
+    font-size: 14px;
263
+  }
264
+
265
+  .dialysis-print-order .print-table {
266
+    width: 100%;
267
+    text-align: center;
268
+    border-collapse: collapse;
269
+    line-height: 40px;
270
+    font-size: 14px;
271
+    border-color: #000;
272
+  }
273
+
274
+  .dialysis-print-order .print-table-no {
275
+    width: 100%;
276
+    text-align: center;
277
+    border-collapse: collapse;
278
+    font-size: 14px;
279
+  }
280
+
281
+  .dialysis-print-order .under-line {
282
+    border-bottom: 1px solid #999;
283
+    width: 95%;
284
+    text-align: center;
285
+    margin-left: 2px;
286
+  }
287
+
288
+  .dialysis-print-order .title-box {
289
+    text-align: center;
290
+    font-size: 16px;
291
+  }
292
+
293
+  .dialysis-print-order .radio-lebel-box {
294
+    font-weight: 400;
295
+    cursor: pointer;
296
+  }
297
+
298
+  .dialysis-print-order .radio-no {
299
+    opacity: 0;
300
+    outline: none;
301
+    position: absolute;
302
+    margin: 0;
303
+    width: 0;
304
+    height: 0;
305
+    z-index: -1;
306
+  }
307
+
308
+  .dialysis-print-order .radio-inner {
309
+    white-space: nowrap;
310
+    cursor: pointer;
311
+    outline: none;
312
+    display: inline-block;
313
+    line-height: 1;
314
+    position: relative;
315
+    vertical-align: middle;
316
+  }
317
+
318
+  .dialysis-print-order .radio-fang {
319
+    display: inline-block;
320
+    position: relative;
321
+    border: 1px solid #000;
322
+    box-sizing: border-box;
323
+    width: 14px;
324
+    height: 14px;
325
+    background-color: #fff;
326
+    z-index: 1;
327
+    transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
328
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
329
+  }
330
+
331
+  .dialysis-print-order .is-checked-radio::after {
332
+    content: "√";
333
+    font-size: 15px;
334
+  }
335
+
336
+  .dialysis-print-order .print-table-no tr td {
337
+    padding: 8px 5px;
338
+    line-height: 25px;
339
+  }
340
+
341
+  .dialysis-print-order .print-table tr td {
342
+    padding: 1px 1px;
343
+    /*line-height: 25px;*/
344
+  }
345
+
346
+  .es-img {
347
+    height: 30px;
348
+  }
349
+
350
+  .advice-name {
351
+    text-align: left;
352
+  }
353
+
354
+  .advice-children {
355
+    display: flex;
356
+  }
357
+
358
+  .title-box-pro {
359
+    border: 0 #fff;
360
+    line-height: 25px;
361
+    height: 25px;
362
+    text-align: left;
363
+    padding-left: 10px !important;
364
+  }
365
+  .title-box-pro-tr {
366
+    border: 0 #fff;
367
+  }
368
+  .text-align-left {
369
+    text-align: left !important;
370
+    padding-left: 10px !important;
371
+    font-size: 14px !important;
372
+    line-height: 25px;
373
+  }
374
+  .print-table-tr-new td {
375
+    line-height: 20px !important;
376
+  }
377
+  .border-top-solid {
378
+    border: solid 1px #000;
379
+  }
380
+  .print-template-two tr {
381
+    line-height: 30px;
382
+  }
383
+
384
+  .table-box1 {
385
+    border: 1px solid #000;
386
+    width: 100%;
387
+    line-height: 30px;
388
+    font-size: 14px;
389
+    border-collapse: collapse;
390
+  }
391
+  .table-box1 tr {
392
+    border-bottom: 1px solid #000;
393
+  }
394
+</style>
395
+
396
+<style lang="scss">
397
+
398
+  .newContainer{
399
+  .dialysisPage::-webkit-scrollbar {
400
+    height: 15px;
401
+  }
402
+
403
+  .el-date-editor{
404
+  .el-input__inner{
405
+    padding-right:0px;
406
+  }
407
+  }
408
+  .el-table td, .el-table th{
409
+    text-align: center;
410
+  }
411
+  }
412
+  .newContainer::-webkit-scrollbar{
413
+    height: 15px !important;
414
+  }
415
+</style>

+ 4 - 1
src/xt_pages/outpatientCharges/summary.vue Zobrazit soubor

@@ -108,7 +108,8 @@
108 108
       width="1200px"
109 109
       title="打印"
110 110
       :visible.sync="statementVisible">
111
-      <statementPrint ref="print" :paramsObj='orderObj'></statementPrint>
111
+      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
112
+    <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
112 113
     </el-dialog>
113 114
 
114 115
 
@@ -121,10 +122,12 @@
121 122
   import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
122 123
   import { uParseTime } from '@/utils/tools'
123 124
   import statementPrint from './statementPrint'
125
+  import NewStatementPrint from './newStatementPrint'
124 126
 
125 127
 
126 128
   export default {
127 129
     components: {
130
+      NewStatementPrint,
128 131
       BreadCrumb
129 132
     },
130 133
     data() {