csx 4 years ago
parent
commit
d3b7e30440

+ 20 - 0
src/api/his/his.js View File

@@ -322,6 +322,26 @@ export function getChargeHisPatientInfo (params) {
322 322
 }
323 323
 
324 324
 
325
+export function getHisOrderDetail (params) {
326
+  return request({
327
+    url: '/api/orderdetail/get',
328
+    method: 'get',
329
+    params:params,
330
+  })
331
+}
332
+
333
+
334
+
335
+
336
+
337
+
338
+export function getHisOrderDetailCollect (params) {
339
+  return request({
340
+    url: '/api/orderdetaicollect/get',
341
+    method: 'get',
342
+    params:params,
343
+  })
344
+}
325 345
 
326 346
 
327 347
 

+ 2 - 2
src/store/modules/globalConfig.js View File

@@ -495,7 +495,7 @@ const global_config = {
495 495
       // 16: { id: 16, name: 'HD后置换', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
496 496
       // 17: { id: 17, name: 'HDF前置换', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
497 497
       // 18: { id: 18, name: 'HDF后置换', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 }
498
-      19: {
498
+      20: {
499 499
         id: 19,
500 500
         name: 'UF',
501 501
         dialysis_duration: 1,
@@ -1821,7 +1821,7 @@ const global_config = {
1821 1821
       id: 27,
1822 1822
       name: '万u'
1823 1823
     },
1824
-   
1824
+
1825 1825
     ],
1826 1826
     body_fluid: [{
1827 1827
       id: 1,

+ 262 - 36
src/xt_pages/outpatientCharges/allListPrint.vue View File

@@ -8,58 +8,274 @@
8 8
         icon="el-icon-printer"
9 9
         @click="printThisPage"
10 10
         type="primary"
11
-      >打印</el-button
11
+      >打印
12
+      </el-button
12 13
       >
13 14
     </template>
14 15
 
15 16
     <div class='dialysisPage' style="padding-top:40px;">
16
-      <printOne :info="info"></printOne>
17
+      <printOne :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
17 18
     </div>
18 19
   </div>
19 20
 </template>
20 21
 
21 22
 <script>
22
-  import print from "print-js";
23
-  import printOne from "./allListTemplate/printOne"
23
+  import { getHisOrderDetailCollect } from '@/api/his/his'
24
+  import { uParseTime } from '@/utils/tools'
25
+  import printOne from './allListTemplate/printOne'
26
+
24 27
   export default {
25
-    name: "allListPrint",
28
+    name: 'allListPrint',
26 29
     components: {
27 30
       printOne
28 31
     },
29
-    props:{
30
-      paramsObj:Object
32
+    props: {
33
+      paramsObj: Object
31 34
     },
32 35
     data() {
33 36
       return {
34
-      };
37
+        list: [],
38
+        patient: {},
39
+        order: {},
40
+        admin: {}
41
+      }
35 42
     },
36 43
 
37 44
     created() {
45
+      this.getInfo(this.paramsObj.id)
46
+
38 47
     },
39
-    methods:{
40
-        printThisPage() {
41
-
42
-            const style =
43
-            '@media print {.allListTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.allListInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .allListTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;text-align:left;}.allListTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}';
44
-            printJS({
45
-            printable: "allList-print",
46
-            type: "html",
47
-            style: style,
48
-            scanStyles: false
49
-            });
50
-
51
-            // if (this.org_template_info.template_id == 1) {
52
-            //   printJS({
53
-            //     printable: "dialysis-print-box",
54
-            //     type: "html",
55
-            //     style: style,
56
-            //     scanStyles: false
57
-            //   });
58
-            // }
59
-        },
48
+    methods: {
49
+      getTimes(time) {
50
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
51
+      }, getInfo(order_id) {
52
+        let params = {
53
+          id: order_id
54
+        }
55
+        getHisOrderDetailCollect(params).then(response => {
56
+          if (response.data.state == 0) {
57
+            this.$message.error(response.data.msg)
58
+            return false
59
+          } else {
60
+            this.order = response.data.data.order
61
+            this.patient = response.data.data.patient
62
+            this.admin = response.data.data.admin_info
63
+            var order_info = response.data.data.order_info
64
+
65
+            //获取所有项目类型进行去重
66
+            let med_chrgitm_types = []
67
+            for (let i = 0; i < order_info.length; i++) {
68
+              med_chrgitm_types.push(order_info[i].med_chrgitm_type)
69
+            }
70
+            const obj = {}
71
+            med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
72
+              obj[next] ? '' : obj[next] = true && cur.push(next)
73
+              return cur
74
+            }, []) // 设置cur默认类型为数组,并且初始值为空的数组
75
+
76
+            let tempOrderInfo = []
77
+
78
+            for (let i = 0; i < med_chrgitm_types.length; i++) {
79
+              let obj = {
80
+                total: 0,
81
+                details: []
82
+              }
83
+              let tempDetails = []
84
+              for (let b = 0; b < order_info.length; b++) {
85
+                if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
86
+                  tempDetails.push(order_info[b])
87
+                }
88
+              }
89
+
90
+              obj.details = this.setNewData(tempDetails)
91
+              obj.total = this.getTotal(obj.details)
92
+              tempOrderInfo.push(obj)
93
+            }
94
+            this.list = tempOrderInfo
95
+            console.log(this.list)
96
+          }
97
+        })
98
+      }, getTotal:function(items){
99
+        let total = 0
100
+        for(let i = 0; i < items.length; i++){
101
+          total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
102
+        }
103
+        return total.toFixed(2)
104
+      },setNewData(details) {
105
+        let drug_ids = []
106
+        let project_ids = []
107
+
108
+        for (let i = 0; i < details.length; i++) {
109
+          if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
110
+            let obj = {
111
+              id: details[i].advice.drug_id,
112
+              price: details[i].advice.price
113
+            }
114
+            drug_ids.push(obj)
115
+          } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
116
+            let obj = {
117
+              id: details[i].project.project_id,
118
+              price: details[i].project.price
119
+
120
+            }
121
+            project_ids.push(obj)
122
+
123
+          }
124
+
125
+        }
126
+        //
127
+        // console.log('old ids')
128
+        // console.log(drug_ids)
129
+        // console.log(project_ids)
130
+        // console.log('old ids')
131
+
132
+        let new_drug_ids = this.unique(drug_ids)
133
+        let new_project_ids = this.unique(project_ids)
134
+        let list = []
135
+
136
+        console.log('ids')
137
+        console.log(new_drug_ids)
138
+        console.log(new_project_ids)
139
+        console.log('ids')
140
+
141
+        if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
142
+          for (let i = 0; i < new_drug_ids.length; i++) {
143
+            let obj = {}
144
+            let count = 0
145
+            for (let a = 0; a < details.length; a++) {
146
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
147
+                obj['name'] = details[a].advice.advice_name
148
+                obj['spec'] = details[a].advice.drug_spec
149
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
150
+                obj['price'] = parseFloat(details[a].pric)
151
+                count = count + details[a].cnt
152
+              }
153
+            }
154
+            obj['count'] = count
155
+            list.push(obj)
156
+          }
157
+        }
158
+
159
+        if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
160
+          for (let i = 0; i < new_project_ids.length; i++) {
161
+            let obj = {}
162
+            let count = 0
163
+            for (let a = 0; a < details.length; a++) {
164
+              if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
165
+                obj['name'] = details[a].project.project.project_name
166
+                obj['spec'] = '1'
167
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
168
+                obj['price'] = parseFloat(details[a].pric)
169
+                count = count + details[a].cnt
170
+              }
171
+            }
172
+            obj['count'] = count
173
+            list.push(obj)
174
+          }
175
+        }
176
+
177
+        return list
178
+
179
+      }, unique(array) {
180
+        // res用来存储结果
181
+        var res = []
182
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
183
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
184
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
185
+              break
186
+            }
187
+          }
188
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
189
+          if (j === resLen) {
190
+            res.push(array[i])
191
+          }
192
+        }
193
+        return res
194
+      },
195
+
196
+      getType(med_chrgitm_type) {
197
+        switch (med_chrgitm_type) {
198
+          case '01':
199
+            return '床位费'
200
+            break
201
+          case '02':
202
+            return '诊察费'
203
+
204
+            break
205
+          case '03':
206
+            return '检查费'
207
+
208
+            break
209
+          case '04':
210
+            return '化验费'
211
+            break
212
+          case '05':
213
+            return '治疗费'
214
+
215
+            break
216
+          case '06':
217
+            return '手术费'
218
+
219
+            break
220
+          case '07':
221
+            return '护理费'
222
+
223
+            break
224
+          case '08':
225
+            return '材料费'
226
+
227
+            break
228
+          case '09':
229
+            return '西药费'
230
+
231
+            break
232
+          case '10':
233
+            return '中药饮片费'
234
+
235
+            break
236
+          case '11':
237
+            return '中成药费'
238
+
239
+            break
240
+          case '12':
241
+            return '一般诊疗费'
242
+
243
+            break
244
+          case '13':
245
+            return '挂号费'
246
+
247
+            break
248
+          case '14':
249
+            return '其他费'
250
+
251
+            break
252
+
253
+        }
254
+
255
+      },
256
+      printThisPage() {
257
+
258
+        const style =
259
+          '@media print {.allListTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.allListInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .allListTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;text-align:left;}.allListTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
260
+        printJS({
261
+          printable: 'allList-print',
262
+          type: 'html',
263
+          style: style,
264
+          scanStyles: false
265
+        })
266
+
267
+        // if (this.org_template_info.template_id == 1) {
268
+        //   printJS({
269
+        //     printable: "dialysis-print-box",
270
+        //     type: "html",
271
+        //     style: style,
272
+        //     scanStyles: false
273
+        //   });
274
+        // }
275
+      }
60 276
     }
61 277
 
62
-  };
278
+  }
63 279
 </script>
64 280
 
65 281
 <style>
@@ -189,21 +405,26 @@
189 405
     text-align: left;
190 406
     padding-left: 10px !important;
191 407
   }
408
+
192 409
   .title-box-pro-tr {
193 410
     border: 0 #fff;
194 411
   }
412
+
195 413
   .text-align-left {
196 414
     text-align: left !important;
197 415
     padding-left: 10px !important;
198 416
     font-size: 14px !important;
199 417
     line-height: 25px;
200 418
   }
419
+
201 420
   .print-table-tr-new td {
202 421
     line-height: 20px !important;
203 422
   }
423
+
204 424
   .border-top-solid {
205 425
     border: solid 1px #000;
206 426
   }
427
+
207 428
   .print-template-two tr {
208 429
     line-height: 30px;
209 430
   }
@@ -215,6 +436,7 @@
215 436
     font-size: 14px;
216 437
     border-collapse: collapse;
217 438
   }
439
+
218 440
   .table-box1 tr {
219 441
     border-bottom: 1px solid #000;
220 442
   }
@@ -222,21 +444,25 @@
222 444
 
223 445
 <style lang="scss">
224 446
 
225
-  .newContainer{
447
+  .newContainer {
448
+
226 449
   .dialysisPage::-webkit-scrollbar {
227 450
     height: 15px;
228 451
   }
229 452
 
230
-  .el-date-editor{
231
-  .el-input__inner{
232
-    padding-right:0px;
453
+  .el-date-editor {
454
+
455
+  .el-input__inner {
456
+    padding-right: 0px;
233 457
   }
458
+
234 459
   }
235
-  .el-table td, .el-table th{
460
+  .el-table td, .el-table th {
236 461
     text-align: center;
237 462
   }
463
+
238 464
   }
239
-  .newContainer::-webkit-scrollbar{
465
+  .newContainer::-webkit-scrollbar {
240 466
     height: 15px !important;
241 467
   }
242 468
 </style>

+ 77 - 18
src/xt_pages/outpatientCharges/allListTemplate/printOne.vue View File

@@ -2,11 +2,12 @@
2 2
     <div id="allList-print" class="allList-print">
3 3
         <div class="allListTitle">翁源沅胜透析中心费用汇总</div>
4 4
         <div class="allListInfo">
5
-            <div>患者姓名:邓红平</div>
6
-            <div>透析号:21000022</div>
7
-            <div>性别:女</div>
8
-            <div>年龄:45  岁</div>
9
-            <div>日期:2020-11-22 至 2020-11-22</div>
5
+          <div>患者姓名:{{patient.name}}</div>
6
+          <div>透析号:{{patient.dialysis_no}}</div>
7
+          <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
8
+          <div>年龄:{{patient.age}}  岁</div>
9
+          <div>收费日期:{{getTimes(order.settle_start_time)}} 至 {{getTimes(order.settle_end_time)}}</div>
10
+
10 11
         </div>
11 12
         <table class="allListTable" border="1">
12 13
             <tr>
@@ -17,28 +18,86 @@
17 18
                 <td style="width:10%">数量</td>
18 19
                 <td style="width:10%">金额(元)</td>
19 20
             </tr>
20
-            <template v-for='i in 2'>
21
-                <tr v-for="item in 8">
22
-                    <td style="width:10%">化验费</td>
23
-                    <td style="width:50%">血清葡萄糖测定(化学法或酶法)</td>
24
-                    <td style="width:10%">1</td>
25
-                    <td style="width:10%">23.00</td>
26
-                    <td style="width:10%">1次</td>
27
-                    <td style="width:10%">23.00</td>
21
+            <template v-for='item in list'>
22
+                <tr v-for="sub_item in item.details">
23
+                    <td style="width:10%">{{sub_item.med_chrgitm_type}}</td>
24
+                    <td style="width:50%">{{sub_item.name}}</td>
25
+                    <td style="width:10%">{{sub_item.spec}}</td>
26
+                    <td style="width:10%">{{(sub_item.price).toFixed(2)}}</td>
27
+                    <td style="width:10%">{{sub_item.count}}</td>
28
+                    <td style="width:10%">{{(sub_item.price * sub_item.count).toFixed(2)}}</td>
28 29
                 </tr>
29 30
                 <tr>
30
-                    <td colspan="6" style="text-align:right;">合计:212.22元</td>
31
+                    <td colspan="6" style="text-align:right;">合计:{{item.total}}元</td>
31 32
                 </tr>
32 33
             </template>
33 34
         </table>
34 35
         <div class="tableBottom">
35
-            <div class="tableBottomOne">制表人:指标人</div>
36
-            <div class="tableBottomOne">制表日期:2020-12-12 12:12:12</div>
37
-            <div class="tableBottomOne">总费用:12323.90元</div>
36
+          <div class="tableBottomOne">制表人:{{admin.user_name}}</div>
37
+          <div class="tableBottomOne">制表日期:{{ getNowTime()}}</div>
38
+          <div class="tableBottomOne">总费用:{{order.medfee_sumamt}}元</div>
38 39
         </div>
39 40
     </div>
40 41
 </template>
41 42
 
43
+<script>
44
+  import { uParseTime } from '@/utils/tools'
45
+
46
+  export default {
47
+    props: {
48
+      list: {
49
+        type: Array,
50
+        default: function () {
51
+          return [];
52
+        }
53
+      }, patient: {
54
+        type: Object,
55
+        default: function () {
56
+          return {};
57
+        }
58
+      }, order: {
59
+        type: Object,
60
+        default: function () {
61
+          return {};
62
+        }
63
+      }, admin: {
64
+        type: Object,
65
+        default: function () {
66
+          return {};
67
+        }
68
+      },
69
+    },methods:{
70
+      getNowTime: function () {
71
+        let dateTime
72
+        let yy = new Date().getFullYear()
73
+        let mm = new Date().getMonth() + 1
74
+        let dd = new Date().getDate()
75
+        let hh = new Date().getHours()
76
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
77
+          :
78
+          new Date().getMinutes()
79
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
80
+          :
81
+          new Date().getSeconds()
82
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
83
+        return dateTime
84
+      },
85
+      getTimes(time) {
86
+        return uParseTime(time, '{y}-{m}-{d}')
87
+      },getTotal:function(items){
88
+        let total = 0
89
+        for(let i = 0; i < items.length; i++){
90
+          total = total + (items[i].count * items[i].price).toFixed(2)
91
+        }
92
+        return total
93
+
94
+      }
95
+
96
+    }
97
+  }
98
+
99
+
100
+</script>
42 101
 
43 102
 <style lang="scss" scoped>
44 103
 .allList-print{
@@ -80,4 +139,4 @@
80 139
 .tableBottomOne{
81 140
     margin-right: 40px;
82 141
 }
83
-</style>
142
+</style>

+ 160 - 37
src/xt_pages/outpatientCharges/listPrint.vue View File

@@ -8,58 +8,171 @@
8 8
         icon="el-icon-printer"
9 9
         @click="printThisPage"
10 10
         type="primary"
11
-      >打印</el-button
11
+      >打印
12
+      </el-button
12 13
       >
13 14
     </template>
14 15
 
15 16
     <div class='dialysisPage' style="padding-top:40px;">
16
-      <printOne :info="info"></printOne>
17
+      <printOne :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
17 18
     </div>
18 19
   </div>
19 20
 </template>
20 21
 
21 22
 <script>
22
-  import print from "print-js";
23
-  import printOne from "./listTemplate/printOne"
23
+  import printOne from './listTemplate/printOne'
24
+  import { getHisOrderDetail } from '@/api/his/his'
25
+  import { uParseTime } from '@/utils/tools'
26
+
24 27
   export default {
25
-    name: "listPrint",
28
+    name: 'listPrint',
26 29
     components: {
27 30
       printOne
28 31
     },
29
-    props:{
30
-      paramsObj:Object
32
+    props: {
33
+      paramsObj: Object
31 34
     },
32 35
     data() {
33 36
       return {
34
-      };
37
+        list: [],
38
+        patient:{},
39
+        order:{},
40
+        admin:{},
41
+      }
35 42
     },
36
-
37 43
     created() {
44
+      this.getInfo(this.paramsObj.id)
38 45
     },
39
-    methods:{
40
-        printThisPage() {
41
-
42
-            const style =
43
-            '@media print {.listTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}';
44
-            printJS({
45
-            printable: "list-print",
46
-            type: "html",
47
-            style: style,
48
-            scanStyles: false
49
-            });
50
-
51
-            // if (this.org_template_info.template_id == 1) {
52
-            //   printJS({
53
-            //     printable: "dialysis-print-box",
54
-            //     type: "html",
55
-            //     style: style,
56
-            //     scanStyles: false
57
-            //   });
58
-            // }
59
-        },
46
+
47
+    methods: {
48
+      getTimes(time) {
49
+        return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
50
+      },
51
+      getInfo(order_id) {
52
+        let params = {
53
+          id: order_id
54
+        }
55
+        getHisOrderDetail(params).then(response => {
56
+          if (response.data.state == 0) {
57
+            this.$message.error(response.data.msg)
58
+            return false
59
+          } else {
60
+            this.order = response.data.data.order
61
+            this.patient = response.data.data.patient
62
+            console.log(this.patient)
63
+            this.admin = response.data.data.admin_info
64
+
65
+
66
+            for (let i = 0; i < response.data.data.order_info.length; i++) {
67
+              var infos = response.data.data.order_info[i]
68
+              let obj = {
69
+                med_chrgitm_type: this.getType(infos.med_chrgitm_type),
70
+                price: infos.pric,
71
+                count: infos.cnt
72
+              }
73
+              if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
74
+                obj['p_time'] = this.getTimes(infos.project.prescription.ctime)
75
+                obj['name'] = infos.project.project.project_name
76
+                obj['spec'] = 1
77
+              }
78
+
79
+              if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
80
+                obj['p_time'] = this.getTimes(infos.advice.prescription.ctime)
81
+                obj['name'] = infos.advice.advice_name
82
+                obj['spec'] = infos.advice.drug_spec
83
+              }
84
+              this.list.push(obj)
85
+              this.list.sort(function(a, b) {
86
+                return b.p_time < a.p_time ? 1 : -1
87
+              })
88
+
89
+            }
90
+          }
91
+        })
92
+      },
93
+      getType(med_chrgitm_type) {
94
+        switch (med_chrgitm_type) {
95
+          case '01':
96
+            return '床位费'
97
+            break
98
+          case '02':
99
+            return '诊察费'
100
+
101
+            break
102
+          case '03':
103
+            return '检查费'
104
+
105
+            break
106
+          case '04':
107
+            return '化验费'
108
+            break
109
+          case '05':
110
+            return '治疗费'
111
+
112
+            break
113
+          case '06':
114
+            return '手术费'
115
+
116
+            break
117
+          case '07':
118
+            return '护理费'
119
+
120
+            break
121
+          case '08':
122
+            return '材料费'
123
+
124
+            break
125
+          case '09':
126
+            return '西药费'
127
+
128
+            break
129
+          case '10':
130
+            return '中药饮片费'
131
+
132
+            break
133
+          case '11':
134
+            return '中成药费'
135
+
136
+            break
137
+          case '12':
138
+            return '一般诊疗费'
139
+
140
+            break
141
+          case '13':
142
+            return '挂号费'
143
+
144
+            break
145
+          case '14':
146
+            return '其他费'
147
+
148
+            break
149
+
150
+        }
151
+
152
+      },
153
+      printThisPage() {
154
+
155
+        const style =
156
+          '@media print {.listTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.listInfo{display: flex;font-size: 16px;justify-content: space-between;margin: 10px 0;} .listTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 20px;}.tableBottomOne{margin-right: 40px;}}'
157
+        printJS({
158
+          printable: 'list-print',
159
+          type: 'html',
160
+          style: style,
161
+          scanStyles: false
162
+        })
163
+
164
+        // if (this.org_template_info.template_id == 1) {
165
+        //   printJS({
166
+        //     printable: "dialysis-print-box",
167
+        //     type: "html",
168
+        //     style: style,
169
+        //     scanStyles: false
170
+        //   });
171
+        // }
172
+      }
60 173
     }
61 174
 
62
-  };
175
+  }
63 176
 </script>
64 177
 
65 178
 <style>
@@ -189,21 +302,26 @@
189 302
     text-align: left;
190 303
     padding-left: 10px !important;
191 304
   }
305
+
192 306
   .title-box-pro-tr {
193 307
     border: 0 #fff;
194 308
   }
309
+
195 310
   .text-align-left {
196 311
     text-align: left !important;
197 312
     padding-left: 10px !important;
198 313
     font-size: 14px !important;
199 314
     line-height: 25px;
200 315
   }
316
+
201 317
   .print-table-tr-new td {
202 318
     line-height: 20px !important;
203 319
   }
320
+
204 321
   .border-top-solid {
205 322
     border: solid 1px #000;
206 323
   }
324
+
207 325
   .print-template-two tr {
208 326
     line-height: 30px;
209 327
   }
@@ -215,6 +333,7 @@
215 333
     font-size: 14px;
216 334
     border-collapse: collapse;
217 335
   }
336
+
218 337
   .table-box1 tr {
219 338
     border-bottom: 1px solid #000;
220 339
   }
@@ -222,21 +341,25 @@
222 341
 
223 342
 <style lang="scss">
224 343
 
225
-  .newContainer{
344
+  .newContainer {
345
+
226 346
   .dialysisPage::-webkit-scrollbar {
227 347
     height: 15px;
228 348
   }
229 349
 
230
-  .el-date-editor{
231
-  .el-input__inner{
232
-    padding-right:0px;
350
+  .el-date-editor {
351
+
352
+  .el-input__inner {
353
+    padding-right: 0px;
233 354
   }
355
+
234 356
   }
235
-  .el-table td, .el-table th{
357
+  .el-table td, .el-table th {
236 358
     text-align: center;
237 359
   }
360
+
238 361
   }
239
-  .newContainer::-webkit-scrollbar{
362
+  .newContainer::-webkit-scrollbar {
240 363
     height: 15px !important;
241 364
   }
242 365
 </style>

+ 70 - 17
src/xt_pages/outpatientCharges/listTemplate/printOne.vue View File

@@ -2,11 +2,13 @@
2 2
     <div id="list-print" class="list-print">
3 3
         <div class="listTitle">翁源沅胜透析中心费用清单</div>
4 4
         <div class="listInfo">
5
-            <div>患者姓名:邓红平</div>
6
-            <div>透析号:21000022</div>
7
-            <div>性别:女</div>
8
-            <div>年龄:45  岁</div>
9
-            <div>日期:2020-11-22 至 2020-11-22</div>
5
+
6
+            <div>患者姓名:{{patient.name}}</div>
7
+            <div>透析号:{{patient.dialysis_no}}</div>
8
+            <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
9
+            <div>年龄:{{patient.age}}  岁</div>
10
+            <div>收费日期:{{getTimes(order.settle_start_time)}} 至 {{getTimes(order.settle_end_time)}}</div>
11
+
10 12
         </div>
11 13
         <table class="listTable" border="1">
12 14
             <tr>
@@ -18,24 +20,75 @@
18 20
                 <td style="width:6%">数量</td>
19 21
                 <td style="width:10%">金额(元)</td>
20 22
             </tr>
21
-            <tr v-for="item in 8">
22
-                <td style="width:19%">2020-12-12 13:11</td>
23
-                <td style="width:10%">化验费</td>
24
-                <td style="width:35%">血清葡萄糖测定(化学法或酶法)</td>
25
-                <td style="width:10%">1</td>
26
-                <td style="width:10%">23.00</td>
27
-                <td style="width:6%">1次</td>
28
-                <td style="width:10%">23.00</td>
23
+            <tr v-for="item in list">
24
+                <td style="width:19%">{{item.p_time}}</td>
25
+                <td style="width:10%">{{item.med_chrgitm_type}}</td>
26
+                <td style="width:35%">{{item.name}}</td>
27
+                <td style="width:10%">{{item.spec}}</td>
28
+                <td style="width:10%">{{(item.price).toFixed(2)}}</td>
29
+                <td style="width:6%">{{item.count}}</td>
30
+                <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
29 31
             </tr>
30 32
         </table>
31 33
         <div class="tableBottom">
32
-            <div class="tableBottomOne">制表人:指标人</div>
33
-            <div class="tableBottomOne">制表日期:2020-12-12 12:12:12</div>
34
-            <div class="tableBottomOne">总费用:12323.90元</div>
34
+            <div class="tableBottomOne">制表人:{{admin.user_name}}</div>
35
+            <div class="tableBottomOne">制表日期:{{ getNowTime()}}</div>
36
+            <div class="tableBottomOne">总费用:{{order.medfee_sumamt}}元</div>
35 37
         </div>
36 38
     </div>
37 39
 </template>
38 40
 
41
+<script>
42
+  import { uParseTime } from '@/utils/tools'
43
+
44
+  export default {
45
+    props: {
46
+      list: {
47
+        type: Array,
48
+        default: function () {
49
+          return [];
50
+        }
51
+      }, patient: {
52
+        type: Object,
53
+        default: function () {
54
+          return {};
55
+        }
56
+      }, order: {
57
+        type: Object,
58
+        default: function () {
59
+          return {};
60
+        }
61
+      }, admin: {
62
+        type: Object,
63
+        default: function () {
64
+          return {};
65
+        }
66
+      },
67
+    },methods:{
68
+      getNowTime: function () {
69
+        let dateTime
70
+        let yy = new Date().getFullYear()
71
+        let mm = new Date().getMonth() + 1
72
+        let dd = new Date().getDate()
73
+        let hh = new Date().getHours()
74
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
75
+          :
76
+          new Date().getMinutes()
77
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
78
+          :
79
+          new Date().getSeconds()
80
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
81
+        return dateTime
82
+      },
83
+      getTimes(time) {
84
+        return uParseTime(time, '{y}-{m}-{d}')
85
+      },
86
+
87
+    }
88
+  }
89
+
90
+
91
+</script>
39 92
 
40 93
 <style lang="scss" scoped>
41 94
 .list-print{
@@ -77,4 +130,4 @@
77 130
 .tableBottomOne{
78 131
     margin-right: 40px;
79 132
 }
80
-</style>
133
+</style>

+ 8 - 1
src/xt_pages/outpatientCharges/newStatementPrint.vue View File

@@ -13,7 +13,7 @@
13 13
     </template>
14 14
 
15 15
     <div class='dialysisPage' style="padding-top:40px;">
16
-      <printOne :info="info"></printOne>
16
+      <printOne :info="info" :p_admin="p_admin" :charge_admin="charge_admin"></printOne>
17 17
     </div>
18 18
   </div>
19 19
 </template>
@@ -57,6 +57,8 @@
57 57
         prescription_id:0,
58 58
         ids:'',
59 59
         info:null,
60
+        p_admin:{},
61
+        charge_admin:{},
60 62
       };
61 63
     },
62 64
     methods:{
@@ -157,6 +159,7 @@
157 159
           axios.get('http://127.0.0.1:9532/api/settle/query', {
158 160
             params: {
159 161
               order_id: order_id,
162
+              admin_user_id:that.$store.getters.xt_user.user.id
160 163
             }
161 164
           })
162 165
             .then(function (response) {
@@ -168,6 +171,10 @@
168 171
 
169 172
                 console.log(response.data.data.info)
170 173
                 that.info = response.data.data.info
174
+                that.p_admin = response.data.data.printor_admin
175
+                that.charge_admin = response.data.data.charge_admin
176
+
177
+
171 178
                 console.log(that.info)
172 179
 
173 180
                 that.info['bed_cost_total'] = response.data.data.bedCostTotal

+ 50 - 41
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -75,7 +75,7 @@
75 75
           </el-button>
76 76
 
77 77
           <el-button size="small" @click="open(5)" type="primary"
78
-               v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2" >退费
78
+                     v-if="this.hisPatientInfo.id > 0 && this.order.id > 0 &&  this.order.order_status == 2">退费
79 79
           </el-button>
80 80
           <!-- <el-button size="small" @click="open(5)" type="primary"
81 81
                     >退费
@@ -95,7 +95,7 @@
95 95
           </el-button>
96 96
 
97 97
           <!--<el-button v-if="this.$store.getters.xt_user.org_id == 9919"-->
98
-                     <!--size="small" @click="open(10)" type="primary"-->
98
+          <!--size="small" @click="open(10)" type="primary"-->
99 99
           <!--&gt;退号-->
100 100
           <!--</el-button>-->
101 101
 
@@ -114,10 +114,9 @@
114 114
           <!--&gt;查待遇-->
115 115
           <!--</el-button>-->
116 116
 
117
-          <el-button  size="small" @click="query" type="primary"
118
-          >查询
119
-          </el-button>
120
-
117
+          <!--<el-button  size="small" @click="query" type="primary"-->
118
+          <!--&gt;查询-->
119
+          <!--</el-button>-->
121 120
 
122 121
 
123 122
         </div>
@@ -469,7 +468,7 @@
469 468
       this.getPatientList()
470 469
     },
471 470
     methods: {
472
-      query(){
471
+      query() {
473 472
         if (this.$store.getters.xt_user.org_id == 4) {
474 473
           var that = this
475 474
           axios.get('http://127.0.0.1:9532/api/org/info', {
@@ -1751,7 +1750,8 @@
1751 1750
 
1752 1751
           }
1753 1752
         })
1754
-      }, setMonthPrescription(month_prescriptions) {
1753
+      },
1754
+      setMonthPrescription(month_prescriptions) {
1755 1755
         this.month_prescriptions = []
1756 1756
 
1757 1757
         let drug_month_prescriptions = {
@@ -1773,47 +1773,45 @@
1773 1773
         for (let i = 0; i < month_prescriptions.length; i++) {
1774 1774
           if (month_prescriptions[i].type == 1) { //药品
1775 1775
             for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
1776
-              drug_ids.push(month_prescriptions[i].advices[a].drug_id)
1776
+              let obj = {
1777
+                id: month_prescriptions[i].advices[a].drug_id,
1778
+                price: month_prescriptions[i].advices[a].price
1779
+
1780
+              }
1781
+              drug_ids.push(obj)
1782
+              // drug_ids.push(month_prescriptions[i].advices[a].drug_id)
1783
+
1777 1784
               drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
1778 1785
             }
1779 1786
 
1780 1787
           } else if (month_prescriptions[i].type == 2) { //项目
1781 1788
             for (let a = 0; a < month_prescriptions[i].project.length; a++) {
1782
-              project_ids.push(month_prescriptions[i].project[a].project_id)
1789
+              let obj = {
1790
+                id: month_prescriptions[i].project[a].project_id,
1791
+                price: month_prescriptions[i].project[a].price
1792
+
1793
+              }
1794
+              project_ids.push(obj)
1783 1795
               project_month_prescriptions.project.push(month_prescriptions[i].project[a])
1784 1796
             }
1785 1797
           }
1786 1798
           //附加收费
1787 1799
           for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
1788
-            additions_ids.push(month_prescriptions[i].addition[a].item_id)
1800
+            let obj = {
1801
+              id: month_prescriptions[i].addition[a].item_id,
1802
+              price: month_prescriptions[i].addition[a].price
1803
+
1804
+            }
1805
+            additions_ids.push(obj)
1789 1806
             addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
1790 1807
 
1791 1808
           }
1792 1809
 
1793 1810
         }
1794 1811
 
1795
-        const obj = {}
1796
-        const obj1 = {}
1797
-        const obj2 = {}
1798
-
1799
-        drug_ids = drug_ids.reduce((cur, next) => {
1800
-          obj[next] ? '' : obj[next] = true && cur.push(next)
1801
-          return cur
1802
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1803
-        project_ids = project_ids.reduce((cur, next) => {
1804
-          obj1[next] ? '' : obj1[next] = true && cur.push(next)
1805
-          return cur
1806
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1807
-        additions_ids = additions_ids.reduce((cur, next) => {
1808
-          obj2[next] ? '' : obj2[next] = true && cur.push(next)
1809
-          return cur
1810
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1811
-
1812
-        console.log(drug_ids)
1813
-        console.log(project_ids)
1814
-        console.log(additions_ids)
1815
-
1816
-        console.log(additions_ids)
1812
+        drug_ids = this.unique_two(drug_ids)
1813
+        project_ids = this.unique_two(project_ids)
1814
+        additions_ids = this.unique_two(additions_ids)
1817 1815
 
1818 1816
         let drugs = []
1819 1817
         let projects = []
@@ -1823,7 +1821,8 @@
1823 1821
           let obj = {}
1824 1822
           let count = 0
1825 1823
           for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
1826
-            if (drug_ids[i] == drug_month_prescriptions.advices[a].drug_id) {
1824
+            if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
1825
+
1827 1826
               obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
1828 1827
               obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
1829 1828
               obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
@@ -1847,7 +1846,7 @@
1847 1846
           let obj = {}
1848 1847
           let count = 0
1849 1848
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
1850
-            if (project_ids[i] == project_month_prescriptions.project[a].project_id) {
1849
+            if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
1851 1850
               obj['project_name'] = project_month_prescriptions.project[a].project.project_name
1852 1851
               obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
1853 1852
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose
@@ -1870,10 +1869,9 @@
1870 1869
         for (let i = 0; i < additions_ids.length; i++) {
1871 1870
           let obj = {}
1872 1871
           let count = 0
1873
-          console.log(addition_month_prescriptions.addition)
1874 1872
           if (addition_month_prescriptions.addition) {
1875 1873
             for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
1876
-              if (project_ids[i] == addition_month_prescriptions.addition[a].item_id) {
1874
+              if (additions_ids[i].price == addition_month_prescriptions.addition[a].price &&additions_ids[i].id == addition_month_prescriptions.addition[a].item_id) {
1877 1875
                 obj['item_name'] = addition_month_prescriptions.addition[a].item_name
1878 1876
                 obj['id'] = addition_month_prescriptions.addition[a].id
1879 1877
                 obj['item_id'] = addition_month_prescriptions.addition[a].item_id
@@ -1886,10 +1884,6 @@
1886 1884
           }
1887 1885
         }
1888 1886
 
1889
-        console.log(drugs)
1890
-        console.log(projects)
1891
-        console.log(additions)
1892
-
1893 1887
         let p1 = {
1894 1888
           name: '处方' + 1,
1895 1889
           advices: drugs,
@@ -1913,6 +1907,21 @@
1913 1907
 
1914 1908
         this.curMonthPrescriptions = this.month_prescriptions[0]
1915 1909
 
1910
+      }, unique_two(array) {
1911
+        // res用来存储结果
1912
+        var res = []
1913
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
1914
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
1915
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
1916
+              break
1917
+            }
1918
+          }
1919
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
1920
+          if (j === resLen) {
1921
+            res.push(array[i])
1922
+          }
1923
+        }
1924
+        return res
1916 1925
       },
1917 1926
 
1918 1927
       unique(arr) {

+ 315 - 243
src/xt_pages/outpatientCharges/statementTemplate/printOne.vue View File

@@ -1,251 +1,322 @@
1 1
 <template>
2
-    <div id="statement-print" class="statement-print">
3
-        <div class="statementTitle">广东省社会医疗保险医疗费用结算单</div>
4
-        <table class="statementTable" border="1">
5
-            <tr>
6
-                <td width="80">机构名称</td>
7
-                <td colspan="4">{{info.fixmedins_name}}</td>
8
-                <td width="80">机构编码</td>
9
-                <td colspan="4">{{info.fixmedins_code}}</td>
10
-                <td width="100">医保结算级别</td>
11
-                <td width="100"></td>
12
-            </tr>
13
-            <tr>
14
-                <td width="90">就医登记号</td>
15
-                <td colspan="11">{{info.psn_no}}</td>
16
-            </tr>
17
-            <tr>
18
-                <td width="80">姓名</td>
19
-                <td width="80">{{info.psn_name}}</td>
20
-                <td width="80">性别</td>
21
-                <td width="50" v-if="info.gend == '1'">男</td>
22
-              <td width="50" v-if="info.gend == '2'">女</td>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle">广东省社会医疗保险医疗费用结算单</div>
4
+    <table class="statementTable" border="1">
5
+      <tr>
6
+        <td width="80">机构名称</td>
7
+        <td colspan="4">{{info.fixmedins_name}}</td>
8
+        <td width="80">机构编码</td>
9
+        <td colspan="4">{{info.fixmedins_code}}</td>
10
+        <td width="100">医保结算级别</td>
11
+        <td width="100" v-if="info.hosp_lv == '1'">三级特等</td>
12
+        <td width="100" v-if="info.hosp_lv == '2'">三级甲等</td>
13
+        <td width="100" v-if="info.hosp_lv == '3'">三级乙等</td>
14
+        <td width="100" v-if="info.hosp_lv == '4'">三级丙等</td>
15
+        <td width="100" v-if="info.hosp_lv == '5'">二级甲等</td>
16
+        <td width="100" v-if="info.hosp_lv == '6'">二级乙等</td>
17
+        <td width="100" v-if="info.hosp_lv == '7'">二级丙等</td>
18
+        <td width="100" v-if="info.hosp_lv == '8'">一级甲等</td>
19
+        <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
20
+        <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
21
+        <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
23 22
 
24
-              <td width="80">出生日期</td>
25
-                <td width="100">{{info.brdy}}</td>
26
-                <td width="90">个人电脑号</td>
27
-                <td width="110"></td>
28
-                <td width="80">人员类别</td>
29
-                <td colspan="3"></td>
30
-            </tr>
31
-            <tr>
32
-                <td>单位名称</td>
33
-                <td colspan="5">{{info.emp_name}}</td>
34
-                <td width="80">联系电话</td>
35
-                <td width="110"></td>
36
-                <td width="80">身份证号</td>
37
-                <td colspan="3">{{info.certno}}</td>
38
-            </tr>
39
-            <tr>
40
-                <td>住院号</td>
41
-                <td></td>
42
-                <td>科别</td>
43
-                <td width="100"></td>
44
-                <td>床号</td>
45
-                <td></td>
46
-                <td>入院日期</td>
47
-                <td></td>
48
-                <td>出院日期</td>
49
-                <td width="100"></td>
50
-                <td>住院天数</td>
51
-                <td></td>
52
-            </tr>
53
-            <tr>
54
-                <td>险种</td>
55
-                  <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
56
-                  <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
57
-                  <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
58
-                  <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
59
-                  <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
60
-                  <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
61
-                  <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
62 23
 
24
+      </tr>
25
+      <tr>
26
+        <td width="90">就医登记号</td>
27
+        <td colspan="11">{{info.psn_no}}</td>
28
+      </tr>
29
+      <tr>
30
+        <td width="80">姓名</td>
31
+        <td width="80">{{info.psn_name}}</td>
32
+        <td width="80">性别</td>
33
+        <td width="50" v-if="info.gend == '1'">男</td>
34
+        <td width="50" v-if="info.gend == '2'">女</td>
63 35
 
64
-              <td>入院第一诊断</td>
65
-                <td colspan="3"></td>
66
-                <td>出院第一诊断</td>
67
-                <td colspan="4"></td>
68
-            </tr>
69
-            <tr>
70
-                <td>业务类别</td>
71
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
72
-                 <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
73
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
74
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊特殊病</td>
75
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
76
-                <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>
77
-              <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
36
+        <td width="80">出生日期</td>
37
+        <td width="100">{{info.brdy}}</td>
38
+        <td width="90">个人电脑号</td>
39
+        <td width="110"></td>
40
+        <td width="80">人员类别</td>
41
+        <td colspan="3" v-if="info.psn_type == '11'">在职</td>
42
+        <td colspan="3" v-if="info.psn_type == '21'">退休</td>
43
+        <td colspan="3" v-if="info.psn_type == '31'">离休</td>
44
+        <td colspan="3" v-if="info.psn_type == '32'">老红军</td>
45
+        <td colspan="3" v-if="info.psn_type == '33'">一至六级残废军人</td>
46
+        <td colspan="3" v-if="info.psn_type == '34'">医疗照顾人员</td>
47
+        <td colspan="3" v-if="info.psn_type == '41'">学龄前儿童</td>
48
+        <td colspan="3" v-if="info.psn_type == '42'">中小学生</td>
49
+        <td colspan="3" v-if="info.psn_type == '43'">大学生</td>
50
+        <td colspan="3" v-if="info.psn_type == '50'">成年居民(非从业)</td>
51
+        <td colspan="3" v-if="info.psn_type == '60'">老年居民</td>
52
+        <td colspan="3" v-if="info.psn_type == '91'">其他人员</td>
78 53
 
79
-              <td>结算时间</td>
80
-                <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time}}</td>
81
-            </tr>
82
-            <tr>
83
-                <td colspan="12" style="text-align:left;padding-left:10px;">
84
-                    本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
85
-                </td>
86
-            </tr>
87
-            <tr>
88
-                <td>费用名称</td>
89
-                <td colspan="2">总费用</td>
90
-                <td>自费</td>
91
-                <td colspan="2">部分项目自付</td>
92
-                <td>费用名称</td>
93
-                <td colspan="2">总费用</td>
94
-                <td>自费</td>
95
-                <td colspan="2">部分项目自付</td>
96
-            </tr>
97
-            <tr>
98
-                <td>床位费</td>
99
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
100
-                <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
101
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
102
-                <td>西成药</td>
103
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
104
-                <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
105
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
106
-            </tr>
107
-            <tr>
108
-                <td>中药费</td>
109
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
110
-                <td style="text-align:right;padding-right:10px;">0</td>
111
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
112
-                <td>中成药</td>
113
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}</td>
114
-                <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
115
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_part_self_total}}</td>
116
-            </tr>
117
-            <tr>
118
-                <td>中草药</td>
119
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
120
-                <td style="text-align:right;padding-right:10px;">0</td>
121
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
122
-                <td>检查费</td>
123
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
124
-                <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
125
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
126
-            </tr>
127
-            <tr>
128
-                <td>治疗费</td>
129
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
130
-              <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
131
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
132
-                <td>放射费</td>
133
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
134
-                <td style="text-align:right;padding-right:10px;">0</td>
135
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
136
-            </tr>
137
-            <tr>
138
-                <td>手术费</td>
139
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
140
-              <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
141
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
142
-                <td>化验费</td>
143
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
144
-              <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
145
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
146
-            </tr>
147
-            <tr>
148
-                <td>输血费</td>
149
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
150
-                <td style="text-align:right;padding-right:10px;">0</td>
151
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
152
-                <td>输氧费</td>
153
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
154
-                <td style="text-align:right;padding-right:10px;">0</td>
155
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
156
-            </tr>
157
-            <tr>
158
-                <td>其他</td>
159
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
160
-              <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
161
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
162
-                <td>麻醉费</td>
163
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
164
-                <td style="text-align:right;padding-right:10px;">0</td>
165
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
166
-            </tr>
167
-            <tr>
168
-                <td>材料费</td>
169
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
170
-              <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
171
-              <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
172
-                <td>特殊检查费</td>
173
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
174
-                <td style="text-align:right;padding-right:10px;">0</td>
175
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
176
-            </tr>
177
-            <tr>
178
-                <td>特殊治疗费</td>
179
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
180
-                <td style="text-align:right;padding-right:10px;">0</td>
181
-                <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
182
-                <td style="text-align:right;padding-right:10px;"></td>
183
-                <td colspan="2" style="text-align:right;padding-right:10px;"></td>
184
-                <td style="text-align:right;padding-right:10px;"></td>
185
-                <td colspan="2" style="text-align:right;padding-right:10px;"></td>
186
-            </tr>
187
-            <tr>
188
-                <td>合计</td>
189
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) + parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) + parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) + parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) + parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}</td>
190
-                <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+ parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) + parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) + parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) + parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}</td>
191
-                <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) + parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) + parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) + parseFloat(info.chinese_traditional_medicine_cost_part_self_total) + parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) + parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}</td>
192
-                <td style="text-align:right;padding-right:10px;"></td>
193
-                <td colspan="2" style="text-align:right;padding-right:10px;"></td>
194
-                <td style="text-align:right;padding-right:10px;"></td>
195
-                <td colspan="2" style="text-align:right;padding-right:10px;"></td>
196
-            </tr>
197
-            <tr>
198
-                <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
199
-                <td colspan="3">{{info.hifp_pay}}</td>
200
-                <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
201
-                <td colspan="3">{{info.hifob_pay}}</td>
202
-            </tr>
203
-            <tr>
204
-                <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
205
-                <td colspan="3">{{info.hifmi_pay}}</td>
206
-                <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
207
-                <td colspan="3">{{info.hifes_pay}}</td>
208
-            </tr>
209
-            <tr>
210
-                <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
211
-                <td colspan="3">{{info.maf_pay}}</td>
212
-                <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
213
-                <td colspan="3">{{info.cvlserv_pay}}</td>
214
-            </tr>
215
-            <tr>
216
-                <td>收款人:</td>
217
-                <td colspan="2"></td>
218
-                <td>审核人:</td>
219
-                <td colspan="2"></td>
220
-                <td>制单人:</td>
221
-                <td colspan="2"></td>
222
-                <td>打印日期</td>
223
-                <td colspan="2"></td>
224
-            </tr>
225
-            <tr>
226
-                <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
227
-                    注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br />
228
-                    &ensp;&ensp;&ensp;2、此表由医院打印。<br />
229
-                    &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
230
-                </td>
231
-            </tr>
232
-            <tr>
233
-                <td colspan="12" style="text-align:left;padding-left:10px;">
234
-                    病人家属签字:
235
-                </td>
236
-            </tr>
237
-        </table>
238
-    </div>
54
+
55
+      </tr>
56
+      <tr>
57
+        <td>单位名称</td>
58
+        <td colspan="5">{{info.emp_name}}</td>
59
+        <td width="80">联系电话</td>
60
+        <td width="110"></td>
61
+        <td width="80">身份证号</td>
62
+        <td colspan="3">{{info.certno}}</td>
63
+      </tr>
64
+      <tr>
65
+        <td>住院号</td>
66
+        <td></td>
67
+        <td>科别</td>
68
+        <td width="100"></td>
69
+        <td>床号</td>
70
+        <td></td>
71
+        <td>入院日期</td>
72
+        <td></td>
73
+        <td>出院日期</td>
74
+        <td width="100"></td>
75
+        <td>住院天数</td>
76
+        <td></td>
77
+      </tr>
78
+      <tr>
79
+        <td>险种</td>
80
+        <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
81
+        <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
82
+        <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
83
+        <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
84
+        <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
85
+        <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
86
+        <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
87
+
88
+
89
+        <td>入院第一诊断</td>
90
+        <td colspan="3"></td>
91
+        <td>出院第一诊断</td>
92
+        <td colspan="4"></td>
93
+      </tr>
94
+      <tr>
95
+        <td>业务类别</td>
96
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
97
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
98
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
99
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊特殊病</td>
100
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
101
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>
102
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
103
+
104
+        <td>结算时间</td>
105
+        <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time}}</td>
106
+      </tr>
107
+      <tr>
108
+        <td colspan="12" style="text-align:left;padding-left:10px;">
109
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
110
+        </td>
111
+      </tr>
112
+      <tr>
113
+        <td>费用名称</td>
114
+        <td colspan="2">总费用</td>
115
+        <td>自费</td>
116
+        <td colspan="2">部分项目自付</td>
117
+        <td>费用名称</td>
118
+        <td colspan="2">总费用</td>
119
+        <td>自费</td>
120
+        <td colspan="2">部分项目自付</td>
121
+      </tr>
122
+      <tr>
123
+        <td>床位费</td>
124
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
125
+        <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
126
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
127
+        <td>西成药</td>
128
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
129
+        <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
130
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
131
+      </tr>
132
+      <tr>
133
+        <td>中药费</td>
134
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
135
+        <td style="text-align:right;padding-right:10px;">0</td>
136
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
137
+        <td>中成药</td>
138
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
139
+        </td>
140
+        <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
141
+        <td colspan="2" style="text-align:right;padding-right:10px;">
142
+          {{info.chinese_traditional_medicine_cost_part_self_total}}
143
+        </td>
144
+      </tr>
145
+      <tr>
146
+        <td>中草药</td>
147
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
148
+        <td style="text-align:right;padding-right:10px;">0</td>
149
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
150
+        <td>检查费</td>
151
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
152
+        <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
153
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
154
+      </tr>
155
+      <tr>
156
+        <td>治疗费</td>
157
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
158
+        <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
159
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
160
+        <td>放射费</td>
161
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
162
+        <td style="text-align:right;padding-right:10px;">0</td>
163
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
164
+      </tr>
165
+      <tr>
166
+        <td>手术费</td>
167
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
168
+        <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
169
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
170
+        <td>化验费</td>
171
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
172
+        <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
173
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
174
+      </tr>
175
+      <tr>
176
+        <td>输血费</td>
177
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
178
+        <td style="text-align:right;padding-right:10px;">0</td>
179
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
180
+        <td>输氧费</td>
181
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
182
+        <td style="text-align:right;padding-right:10px;">0</td>
183
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
184
+      </tr>
185
+      <tr>
186
+        <td>其他</td>
187
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
188
+        <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
189
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
190
+        <td>麻醉费</td>
191
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
192
+        <td style="text-align:right;padding-right:10px;">0</td>
193
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
194
+      </tr>
195
+      <tr>
196
+        <td>材料费</td>
197
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
198
+        <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
199
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
200
+        <td>特殊检查费</td>
201
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
202
+        <td style="text-align:right;padding-right:10px;">0</td>
203
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
204
+      </tr>
205
+      <tr>
206
+        <td>特殊治疗费</td>
207
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
208
+        <td style="text-align:right;padding-right:10px;">0</td>
209
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
210
+        <td style="text-align:right;padding-right:10px;"></td>
211
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
212
+        <td style="text-align:right;padding-right:10px;"></td>
213
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
214
+      </tr>
215
+      <tr>
216
+        <td>合计</td>
217
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
218
+          parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
219
+          parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
220
+          parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
221
+          parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
222
+        </td>
223
+        <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
224
+          parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
225
+          parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
226
+          parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
227
+          parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
228
+        </td>
229
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
230
+          parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
231
+          parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
232
+          parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
233
+          parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
234
+          parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
235
+        </td>
236
+        <td style="text-align:right;padding-right:10px;"></td>
237
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
238
+        <td style="text-align:right;padding-right:10px;"></td>
239
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
240
+      </tr>
241
+      <tr>
242
+        <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
243
+        <td colspan="3">{{info.hifp_pay}}</td>
244
+        <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
245
+        <td colspan="3">{{info.hifob_pay}}</td>
246
+      </tr>
247
+      <tr>
248
+        <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
249
+        <td colspan="3">{{info.hifmi_pay}}</td>
250
+        <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
251
+        <td colspan="3">{{info.hifes_pay}}</td>
252
+      </tr>
253
+      <tr>
254
+        <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
255
+        <td colspan="3">{{info.maf_pay}}</td>
256
+        <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
257
+        <td colspan="3">{{info.cvlserv_pay}}</td>
258
+      </tr>
259
+      <tr>
260
+        <td>收款人:</td>
261
+        <td colspan="2">{{charge_admin.user_name}}</td>
262
+        <td>审核人:</td>
263
+        <td colspan="2"></td>
264
+        <td>制单人:</td>
265
+        <td colspan="2">{{p_admin.user_name}}</td>
266
+        <td>打印日期</td>
267
+        <td colspan="2">{{getNowTime()}}</td>
268
+      </tr>
269
+      <tr>
270
+        <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
271
+          注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
272
+          &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
273
+          &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
274
+        </td>
275
+      </tr>
276
+      <tr>
277
+        <td colspan="12" style="text-align:left;padding-left:10px;">
278
+          病人家属签字:
279
+        </td>
280
+      </tr>
281
+    </table>
282
+  </div>
239 283
 </template>
240 284
 <script>
241 285
   export default {
242 286
     props: {
243 287
       info: {
244 288
         type: Object,
245
-        default: function () {
246
-          return {};
289
+        default: function() {
290
+          return {}
291
+        }
292
+      }, p_admin: {
293
+        type: Object,
294
+        default: function() {
295
+          return {}
296
+        }
297
+      }, charge_admin: {
298
+        type: Object,
299
+        default: function() {
300
+          return {}
247 301
         }
302
+      }
303
+    },methods:{
304
+      getNowTime: function () {
305
+        let dateTime
306
+        let yy = new Date().getFullYear()
307
+        let mm = new Date().getMonth() + 1
308
+        let dd = new Date().getDate()
309
+        let hh = new Date().getHours()
310
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
311
+          :
312
+          new Date().getMinutes()
313
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
314
+          :
315
+          new Date().getSeconds()
316
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
317
+        return dateTime
248 318
       },
319
+
249 320
     }
250 321
   }
251 322
 
@@ -253,27 +324,28 @@
253 324
 </script>
254 325
 
255 326
 
256
-
257 327
 <style lang="scss" scoped>
258
-.statement-print{
328
+  .statement-print {
259 329
     -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
260 330
     -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
261 331
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
262 332
     margin-bottom: 20px;
263
-    padding:20px 10px;
264
-}
265
-.statementTitle{
333
+    padding: 20px 10px;
334
+  }
335
+
336
+  .statementTitle {
266 337
     font-size: 28px;
267 338
     text-align: center;
268 339
     font-weight: bold;
269 340
     margin-bottom: 10px;
270
-}
271
-.statementTable{
341
+  }
342
+
343
+  .statementTable {
272 344
     width: 100%;
273 345
     text-align: center;
274 346
     border-collapse: collapse;
275 347
     line-height: 40px;
276 348
     font-size: 14px;
277 349
     border-color: #000;
278
-}
350
+  }
279 351
 </style>

+ 2 - 15
src/xt_pages/outpatientCharges/summary.vue View File

@@ -122,20 +122,7 @@
122 122
       <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
123 123
     <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
124 124
     </el-dialog>
125
-    <el-dialog
126
-      class="centerDialog"
127
-      width="900px"
128
-      title="打印"
129
-      :visible.sync="listVisible">
130
-      <listPrint :paramsObj='paramsObj'></listPrint>
131
-    </el-dialog>
132
-    <el-dialog
133
-      class="centerDialog"
134
-      width="900px"
135
-      title="打印"
136
-      :visible.sync="allListVisible">
137
-      <allListPrint :paramsObj='paramsObj'></allListPrint>
138
-    </el-dialog>
125
+
139 126
 
140 127
 
141 128
   </div>
@@ -328,7 +315,7 @@
328 315
         return uParseTime(time, "{y}-{m}-{d}");
329 316
       },
330 317
       toDetail(row) {
331
-        this.$router.push('/outpatientCharges/summaryDetail?patient_id='+row.patient.id+"&number="+row.number)
318
+        this.$router.push('/outpatientCharges/summaryDetail?patient_id='+row.patient.id+"&number="+row.number+"&id="+row.id)
332 319
       }, getTime(value, temp) {
333 320
         if (value != undefined) {
334 321
           return uParseTime(value, temp)

+ 73 - 25
src/xt_pages/outpatientCharges/summaryDetail.vue View File

@@ -3,6 +3,15 @@
3 3
         <div class="position">
4 4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
         </div>
6
+      <el-popover
7
+        placement="bottom"
8
+        width="210"
9
+        trigger="click">
10
+        <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
11
+        <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
12
+        <el-button  slot="reference" style="margin:10px 10px;float: right" type="primary" size="small" >打印</el-button>
13
+
14
+      </el-popover>
6 15
         <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
7 16
             <div class="mainCenter">
8 17
                 <div class="centerLeft">
@@ -112,6 +121,28 @@
112 121
                 </div>
113 122
             </div>
114 123
         </div>
124
+
125
+      <div v-if="listVisible">
126
+      <el-dialog
127
+        class="centerDialog"
128
+        width="900px"
129
+        title="打印"
130
+        :visible.sync="listVisible">
131
+        <list-print  :paramsObj='paramsObj'></list-print>
132
+      </el-dialog>
133
+      </div>
134
+
135
+      <div v-if="allListVisible">
136
+      <el-dialog
137
+        class="centerDialog"
138
+        width="900px"
139
+        title="打印"
140
+        :visible.sync="allListVisible">
141
+        <all-list-print :paramsObj='paramsObj'></all-list-print>
142
+      </el-dialog>
143
+      </div>
144
+
145
+
115 146
     </div>
116 147
 </template>
117 148
 
@@ -121,15 +152,24 @@ import BreadCrumb from '@/xt_pages/components/bread-crumb'
121 152
 import { getHisOrder } from '@/api/his/his'
122 153
 import prescriptionTable from './components/prescriptionTable'
123 154
 import { getDictionaryDataConfig} from "@/utils/data";
155
+import ListPrint from './listPrint'
156
+import AllListPrint from './allListPrint'
124 157
 
125 158
 export default {
126 159
     components:{
160
+      AllListPrint,
161
+      ListPrint,
127 162
         BreadCrumb,
128 163
       prescriptionTable,
129 164
 
130 165
     },
131 166
     data(){
132 167
         return{
168
+          listVisible:false,
169
+          allListVisible:false,
170
+          paramsObj:{
171
+            id:this.$route.query.id
172
+          },
133 173
             crumbs: [
134 174
                 { path: false, name: '门诊收费' },
135 175
                 { path: false, name: '项目消费明细汇总详情' }
@@ -165,6 +205,16 @@ export default {
165 205
     },created(){
166 206
       this.GetOrderDetail()
167 207
   },methods:{
208
+      open(val){
209
+        if(val == 1){
210
+          this.paramsObj.id == this.$route.query.id
211
+          this.listVisible = true
212
+
213
+        }else if(val == 2){
214
+          this.paramsObj.id == this.$route.query.id
215
+          this.allListVisible = true
216
+        }
217
+      },
168 218
     // getTotal() {
169 219
     //   var total = 0
170 220
     //   for (let i = 0; i < this.prescriptions.length; i++) {
@@ -220,7 +270,6 @@ export default {
220 270
     },  getGroup(id){
221 271
       var name = ""
222 272
       var statistics_category =  getDictionaryDataConfig('system','statistics_category')
223
-      console.log("2235",statistics_category)
224 273
       for(let i=0;i<statistics_category.length;i++){
225 274
         if(id == statistics_category[i].id){
226 275
           name = statistics_category[i].name
@@ -248,7 +297,23 @@ export default {
248 297
       if (tab == 'more') {
249 298
         return false
250 299
       }
251
-    },   setMonthPrescription(month_prescriptions) {
300
+    },  unique(array) {
301
+      // res用来存储结果
302
+      var res = []
303
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
304
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
305
+          if (array[i].id === res[j].id && array[i].price === res[j].price) {
306
+            break
307
+          }
308
+        }
309
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
310
+        if (j === resLen) {
311
+          res.push(array[i])
312
+        }
313
+      }
314
+      return res
315
+    },
316
+    setMonthPrescription(month_prescriptions) {
252 317
       console.log(month_prescriptions)
253 318
       let drug_month_prescriptions = {
254 319
         advices: []
@@ -302,28 +367,11 @@ export default {
302 367
         }
303 368
 
304 369
       }
305
-      console.log(drug_ids)
306
-      console.log(project_ids)
307
-      console.log(additions_ids)
308
-
309
-
310 370
 
311
-      const obj = {}
312
-      const obj1 = {}
313
-      const obj2 = {}
371
+      drug_ids = this.unique(drug_ids)
372
+      project_ids= this.unique(project_ids)
373
+      additions_ids= this.unique(additions_ids)
314 374
 
315
-      drug_ids = drug_ids.reduce((cur, next) => {
316
-        obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
317
-        return cur
318
-      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
319
-      project_ids = project_ids.reduce((cur, next) => {
320
-        obj1[next.price] ? '' : obj1[next.price] = true && cur.push(next)
321
-        return cur
322
-      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
323
-      additions_ids = additions_ids.reduce((cur, next) => {
324
-        obj2[next.price] ? '' : obj2[next.price] = true && cur.push(next)
325
-        return cur
326
-      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
327 375
 
328 376
 
329 377
 
@@ -332,7 +380,7 @@ export default {
332 380
         let obj = {}
333 381
         let count = 0
334 382
         for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
335
-          if (drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
383
+          if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
336 384
             obj['name'] = drug_month_prescriptions.advices[a].advice_name
337 385
             obj['statistical_classification'] = ''
338 386
             obj['type'] = 1
@@ -355,7 +403,7 @@ export default {
355 403
         let obj = {}
356 404
         let count = 0
357 405
         for (let a = 0; a < project_month_prescriptions.project.length; a++) {
358
-          if (project_ids[i].price == project_month_prescriptions.project[a].price) {
406
+          if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
359 407
             obj['name'] = project_month_prescriptions.project[a].project.project_name
360 408
             obj['statistical_classification'] = ''
361 409
             obj['single_dose'] = project_month_prescriptions.project[a].single_dose
@@ -383,7 +431,7 @@ export default {
383 431
         console.log(addition_month_prescriptions.addition)
384 432
         if (addition_month_prescriptions.addition) {
385 433
           for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
386
-            if (additions_ids[i].price == addition_month_prescriptions.addition[a].price) {
434
+            if (additions_ids[i].price == addition_month_prescriptions.addition[a].price &&additions_ids[i].id == addition_month_prescriptions.addition[a].item_id) {
387 435
               obj['item_name'] = addition_month_prescriptions.addition[a].item_name
388 436
               count = count + addition_month_prescriptions.addition[a].count
389 437
               obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)