Browse Source

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

csx 3 years ago
parent
commit
075df0db7e
68 changed files with 26370 additions and 67 deletions
  1. 37 1
      src/api/his/his.js
  2. 6 1
      src/lang/zh.js
  3. 11 7
      src/router/index.js
  4. 82 0
      src/router/modules/hospitalStation.js
  5. 19 19
      src/views/layout/Layout.vue
  6. 39 39
      src/views/layout/components/Sidebar/index.vue
  7. 515 0
      src/xt_pages/hospitalStation/11.vue
  8. 82 0
      src/xt_pages/hospitalStation/advancePayment.vue
  9. 481 0
      src/xt_pages/hospitalStation/allListPrint.vue
  10. 174 0
      src/xt_pages/hospitalStation/allListTemplate/printOne.vue
  11. 208 0
      src/xt_pages/hospitalStation/components/ChargePrescriptionTable.vue
  12. 69 0
      src/xt_pages/hospitalStation/components/additionalCharges.vue
  13. 135 0
      src/xt_pages/hospitalStation/components/advice.vue
  14. 355 0
      src/xt_pages/hospitalStation/components/callPrescription.vue
  15. 257 0
      src/xt_pages/hospitalStation/components/chargeDialog.vue
  16. 208 0
      src/xt_pages/hospitalStation/components/chargeMonthPrescriptionTable.vue
  17. 166 0
      src/xt_pages/hospitalStation/components/charged.vue
  18. 425 0
      src/xt_pages/hospitalStation/components/dayPrescriptionTable.vue
  19. 2865 0
      src/xt_pages/hospitalStation/components/deskPrescription.vue
  20. 657 0
      src/xt_pages/hospitalStation/components/deskRecord.vue
  21. 387 0
      src/xt_pages/hospitalStation/components/inquiriesDetail.vue
  22. 106 0
      src/xt_pages/hospitalStation/components/inspection.vue
  23. 165 0
      src/xt_pages/hospitalStation/components/medicalInsuranceRefund.vue
  24. 169 0
      src/xt_pages/hospitalStation/components/medicalRecord.vue
  25. 297 0
      src/xt_pages/hospitalStation/components/monthPrescriptionTable.vue
  26. 201 0
      src/xt_pages/hospitalStation/components/newPrescriptionTable.vue
  27. 417 0
      src/xt_pages/hospitalStation/components/nextOrLastPrescription.vue
  28. 165 0
      src/xt_pages/hospitalStation/components/noCharge.vue
  29. 151 0
      src/xt_pages/hospitalStation/components/prescription.vue
  30. 464 0
      src/xt_pages/hospitalStation/components/prescriptionTable.vue
  31. 105 0
      src/xt_pages/hospitalStation/components/recordHistoryDetail.vue
  32. 378 0
      src/xt_pages/hospitalStation/components/recordTemplateDetail.vue
  33. 562 0
      src/xt_pages/hospitalStation/components/registerDialog.vue
  34. 537 0
      src/xt_pages/hospitalStation/components/registerDialog9504.vue
  35. 136 0
      src/xt_pages/hospitalStation/components/saveRecordTemplate.vue
  36. 89 0
      src/xt_pages/hospitalStation/components/saveTemplate.vue
  37. 96 0
      src/xt_pages/hospitalStation/components/selectTemplate.vue
  38. 97 0
      src/xt_pages/hospitalStation/components/templateDetail.vue
  39. 625 0
      src/xt_pages/hospitalStation/costComparison.vue
  40. 2230 0
      src/xt_pages/hospitalStation/doctorDesk.vue
  41. 329 0
      src/xt_pages/hospitalStation/incomeStatistics.vue
  42. 674 0
      src/xt_pages/hospitalStation/index.vue
  43. 152 0
      src/xt_pages/hospitalStation/invoicePrint.vue
  44. 222 0
      src/xt_pages/hospitalStation/invoiceTemplate/printOne.vue
  45. 86 0
      src/xt_pages/hospitalStation/labelPrinting.vue
  46. 369 0
      src/xt_pages/hospitalStation/listPrint.vue
  47. 172 0
      src/xt_pages/hospitalStation/listTemplate/printOne.vue
  48. 422 0
      src/xt_pages/hospitalStation/newStatementPrint.vue
  49. 358 0
      src/xt_pages/hospitalStation/newStatementPrintTwo.vue
  50. 340 0
      src/xt_pages/hospitalStation/newTreatTemplate/printOne.vue
  51. 2945 0
      src/xt_pages/hospitalStation/outpatientChargesManagement.vue
  52. 77 0
      src/xt_pages/hospitalStation/outpatientInvoice.vue
  53. 1184 0
      src/xt_pages/hospitalStation/print.vue
  54. 350 0
      src/xt_pages/hospitalStation/printtwo.vue
  55. 352 0
      src/xt_pages/hospitalStation/recordPrint.vue
  56. 239 0
      src/xt_pages/hospitalStation/recordTemplate/printOne.vue
  57. 162 0
      src/xt_pages/hospitalStation/settlementPrint.vue
  58. 461 0
      src/xt_pages/hospitalStation/settlementTemplate/printOne.vue
  59. 426 0
      src/xt_pages/hospitalStation/statementPrint.vue
  60. 371 0
      src/xt_pages/hospitalStation/statementTemplate/printOne.vue
  61. 181 0
      src/xt_pages/hospitalStation/statementTemplate/printTwo.vue
  62. 576 0
      src/xt_pages/hospitalStation/summary.vue
  63. 652 0
      src/xt_pages/hospitalStation/summaryDetail.vue
  64. 107 0
      src/xt_pages/hospitalStation/template/printOne.vue
  65. 231 0
      src/xt_pages/hospitalStation/template/printTwo.vue
  66. 99 0
      src/xt_pages/hospitalStation/templateManagement.vue
  67. 170 0
      src/xt_pages/hospitalStation/treatPrint.vue
  68. 495 0
      src/xt_pages/hospitalStation/treatTemplate/printOne.vue

+ 37 - 1
src/api/his/his.js View File

@@ -21,7 +21,7 @@ export function getPatientInfo(params) {
21 21
 
22 22
 
23 23
 export function createCaseHistory(params) {
24
-  console.log("params",params)
24
+  console.log("params",params);
25 25
   return request({
26 26
     url: "/api/doctorworkstation/casehistory/create",
27 27
     method: "get",
@@ -376,6 +376,42 @@ export function getCheckAccountFormData (params) {
376 376
 
377 377
 
378 378
 
379
+export function getHospitalPatientList (params) {
380
+  return request({
381
+    url: '/api/hishospitalpatient/list',
382
+    method: 'get',
383
+    params:params,
384
+  })
385
+}
386
+
387
+
388
+
389
+
390
+
391
+
392
+export function GetHisHospitalChargePatientList (params) {
393
+  return request({
394
+    url: '/api/hospitalcharge/list',
395
+    method: 'get',
396
+    params:params,
397
+  })
398
+}
399
+
400
+
401
+
402
+export function GetHisHospitalChargePatientInfo (params) {
403
+  return request({
404
+    url: '/api/hospotalcharge/info',
405
+    method: 'get',
406
+    params:params,
407
+  })
408
+}
409
+
410
+
411
+
412
+
413
+
414
+
379 415
 
380 416
 
381 417
 

+ 6 - 1
src/lang/zh.js View File

@@ -208,6 +208,8 @@ export default {
208 208
     incomeStatistics:'收入统计',
209 209
     outpatientRegistration:'门诊挂号',
210 210
     outpatientRegistrationIndex:'门诊挂号',
211
+    hospitalIndex:'住院登记',
212
+    hospitalChargesManagement:"住院收费管理",
211 213
     outpatientRegistrationRegistrationHistory:'挂号历史',
212 214
     outpatientDoctorStation:"门诊医生站",
213 215
     outpatientDoctorStationDoctorDesk:'医生工作台',
@@ -239,7 +241,10 @@ export default {
239 241
     histemplate:'处方模版',
240 242
     outpatientSickRecord:"人员定点病种备案",
241 243
     airDisinfect:'空气消毒',
242
-    objectTableDisinfect:'物表消毒'
244
+    objectTableDisinfect:'物表消毒',
245
+
246
+
247
+    hospitalStation:"住院工作站"
243 248
 
244 249
   },
245 250
   navbar: {

+ 11 - 7
src/router/index.js View File

@@ -27,6 +27,9 @@ import outpatientRegistration from './modules/outpatientRegistration'
27 27
 import outpatientDoctorStation from './modules/outpatientDoctorStation'
28 28
 import outpatientCharges from './modules/outpatientCharges'
29 29
 import outpatientPharmacy from './modules/outpatientPharmacy'
30
+import hospitalStation from './modules/hospitalStation'
31
+
32
+
30 33
 import outpatientRecord from './modules/outpatientRecord'
31 34
 import kuyiShopping from './modules/kuyiShopping'
32 35
 import createPatient from './modules/createPatient'
@@ -46,7 +49,7 @@ import templateManagement from './modules/templateManagement'
46 49
 import DepartManage from './modules/DepartManage'
47 50
 import basicConfig from './modules/basicConfig'
48 51
 
49
-Vue.use(Router)
52
+Vue.use(Router);
50 53
 
51 54
 /** note: submenu only apppear when children.length>=1
52 55
  *   detail see  https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
@@ -131,7 +134,7 @@ service
131 134
   // device,
132 135
   // role,
133 136
   // org
134
-]
137
+];
135 138
 
136 139
 var _asy_router_map = [
137 140
   patient,
@@ -166,6 +169,7 @@ var _asy_router_map = [
166 169
   dataDruguse,
167 170
   dataShowconfig,
168 171
   dataPrint,
172
+  hospitalStation,
169 173
   outpatientRegistration,
170 174
   outpatientDoctorStation,
171 175
   outpatientCharges,
@@ -174,18 +178,18 @@ var _asy_router_map = [
174 178
   // kuyiShopping,
175 179
   integration,
176 180
   basicConfig
177
-]
181
+];
178 182
 
179
-var is_asy_router = process.env.NODE_ENV === 'production' // true; 设置为 true 强制进行路由验证
183
+var is_asy_router = process.env.NODE_ENV === 'production'; // true; 设置为 true 强制进行路由验证
180 184
 if (!is_asy_router) {
181
-  _constant_router_map = _constant_router_map.concat(_asy_router_map)
185
+  _constant_router_map = _constant_router_map.concat(_asy_router_map);
182 186
   _asy_router_map = []
183 187
 } else {
184 188
 
185 189
 }
186 190
 
187
-export const xt_constantRouterMap = _constant_router_map
188
-export const xt_asyncRouterMap = _asy_router_map
191
+export const xt_constantRouterMap = _constant_router_map;
192
+export const xt_asyncRouterMap = _asy_router_map;
189 193
 
190 194
 export default new Router({
191 195
   // mode: 'history', // require service support

+ 82 - 0
src/router/modules/hospitalStation.js View File

@@ -0,0 +1,82 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+  path: '/hospitalStation',
5
+  component: Layout,
6
+  redirect: 'noredirect',
7
+  name: 'hospitalStation',
8
+  alwaysShow: true,
9
+  meta: {
10
+    title: 'hospitalStation',
11
+    icon: 'outpatientDoctorStation',
12
+    isChild: true
13
+  },
14
+  children: [
15
+    {
16
+      path: '/hospitalStation/index',
17
+      component: () => import('@/xt_pages/hospitalStation/index'),
18
+      name: 'hospitalIndex',
19
+      meta: { title: 'hospitalIndex', noCache: true }
20
+    },
21
+    {
22
+      path: '/hospitalStation/doctorDesk',
23
+      component: () => import('@/xt_pages/hospitalStation/doctorDesk'),
24
+      name: 'outpatientDoctorStationDoctorDesk',
25
+      meta: { title: 'outpatientDoctorStationDoctorDesk', noCache: true }
26
+    },
27
+    {
28
+      path: '/hospitalStation/outpatientChargesManagement',
29
+      component: () => import('@/xt_pages/hospitalStation/outpatientChargesManagement'),
30
+      name: 'hospitalChargesManagement',
31
+      meta: { title: 'hospitalChargesManagement', noCache: true }
32
+    },
33
+
34
+    // {
35
+    //   path: '/hospitalStation/templateManagement',
36
+    //   component: () => import('@/xt_pages/hospitalStation/templateManagement'),
37
+    //   name: 'outpatientDoctorStationTemplateManagement',
38
+    //   meta: { title: 'outpatientDoctorStationTemplateManagement', noCache: true }
39
+    // },
40
+    {
41
+      path: '/hospitalStation/print',
42
+      component: () => import('@/xt_pages/hospitalStation/print'),
43
+      hidden: true,
44
+      is_menu: false,
45
+      name: 'outpatientDoctorStationPrint',
46
+      meta: { title: 'outpatientDoctorStationPrint', noCache: true }
47
+    },
48
+    {
49
+      path: '/hospitalStation/printtwo',
50
+      component: () => import('@/xt_pages/hospitalStation/printtwo'),
51
+      hidden: true,
52
+      is_menu: false,
53
+      name: 'outpatientDoctorStationPrint',
54
+      meta: { title: 'outpatientDoctorStationPrint', noCache: true }
55
+    },
56
+    {
57
+      path: '/hospitalStation/recordPrint',
58
+      component: () => import('@/xt_pages/hospitalStation/recordPrint'),
59
+      hidden: true,
60
+      is_menu: false,
61
+      name: 'outpatientDoctorStationRecordPrint',
62
+      meta: { title: 'outpatientDoctorStationRecordPrint', noCache: true }
63
+    },
64
+    {
65
+      path: '/hospitalStation/treatPrint',
66
+      component: () => import('@/xt_pages/hospitalStation/treatPrint'),
67
+      hidden: true,
68
+      is_menu: false,
69
+      name: 'outpatientDoctorStationTreatPrint',
70
+      meta: { title: 'outpatientDoctorStationTreatPrint', noCache: true }
71
+    },
72
+
73
+    {
74
+      path: '/hospitalStation/printone',
75
+      component: () => import('@/xt_pages/hospitalStation/template/printOne'),
76
+      hidden: true,
77
+      is_menu: false,
78
+      name: 'outpatientDoctorStationPrint',
79
+      meta: { title: 'outpatientDoctorStationPrint', noCache: true }
80
+    },
81
+  ]
82
+}

+ 19 - 19
src/views/layout/Layout.vue View File

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="app-wrapper" :class="classObj">
3 3
     <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"></div>
4
-    
4
+
5 5
     <div class="mainBox">
6 6
       <div class="navLeft">
7 7
         <div v-if="menzhenShow" :class="index == 0 ? 'navOne navActive' : 'navOne'" @click="clickActive(0,'门诊管理')">
@@ -24,7 +24,7 @@
24 24
           <i class="iconfont icon-shangcheng-1 navIcon"></i>
25 25
           <p>酷医商城</p>
26 26
         </div>
27
-        
27
+
28 28
         <div class="navOne" @click="open">
29 29
           <i class="iconfont icon-manage_fill navIcon"></i>
30 30
           <p>更多</p>
@@ -33,7 +33,7 @@
33 33
       <sidebar :navTitle="navTitle" v-show="navShow" class="sidebar-container" @func="show"></sidebar>
34 34
       <div class="main-container new-main-container" style="flex:1;margin-top:50px;">
35 35
         <navbar></navbar>
36
-        
36
+
37 37
         <!-- <tags-view></tags-view> -->
38 38
         <app-main></app-main>
39 39
       </div>
@@ -122,19 +122,19 @@ export default {
122 122
     }
123 123
   },
124 124
   created(){
125
-    console.log('permission_routers',this.permission_routers)
126
-    let menzhen = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord']
127
-    let bingli = ['User','createPatient']
128
-    let touxi = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control']
129
-    let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement']
130
-    let peizhi = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig']
131
-    let kuyishopping = ['kuyiShopping']
132
-    let menzhenArr = []
133
-    let bingliArr = []
134
-    let touxiArr = []
135
-    let kucunArr = []
136
-    let peizhiArr = []
137
-    let kuyishoppingArr = []
125
+    console.log('permission_routers',this.permission_routers);
126
+    let menzhen = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord','hospitalStation'];
127
+    let bingli = ['User','createPatient'];
128
+    let touxi = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control'];
129
+    let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement'];
130
+    let peizhi = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig'];
131
+    let kuyishopping = ['kuyiShopping'];
132
+    let menzhenArr = [];
133
+    let bingliArr = [];
134
+    let touxiArr = [];
135
+    let kucunArr = [];
136
+    let peizhiArr = [];
137
+    let kuyishoppingArr = [];
138 138
     this.permission_routers.map(item => {
139 139
       if(menzhen.indexOf(item.name) > -1){
140 140
         menzhenArr.push(item)
@@ -149,7 +149,7 @@ export default {
149 149
       }else if(kuyishopping.indexOf(item.name) > -1){
150 150
         kuyishoppingArr.push(item)
151 151
       }
152
-    })
152
+    });
153 153
     // console.log('menzhenArr.length',menzhenArr.length)
154 154
     // console.log('bingliArr.length',bingliArr.length)
155 155
     // console.log('touxiArr.length',touxiArr.length)
@@ -198,8 +198,8 @@ export default {
198 198
       }else if(index == 6){
199 199
         this.CDMWebsit()
200 200
       }
201
-      this.index = index
202
-      this.navTitle = title
201
+      this.index = index;
202
+      this.navTitle = title;
203 203
       this.sign = false
204 204
     },
205 205
     open(){

+ 39 - 39
src/views/layout/components/Sidebar/index.vue View File

@@ -48,19 +48,19 @@ export default {
48 48
   },
49 49
   created(){
50 50
     if(this.navTitle == '透析管理'){
51
-      let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control']
51
+      let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control'];
52 52
       // console.log('permission_routers',this.permission_routers)
53
-      let routerArr = []
53
+      let routerArr = [];
54 54
       this.permission_routers.map(item => {
55 55
         if(nameArr.indexOf(item.name) > -1){
56 56
           routerArr.push(item)
57 57
         }
58
-      })
58
+      });
59 59
       this.arr = routerArr
60 60
     }else if(this.navTitle == '电子病历'){
61 61
       this.arr = []
62 62
     }
63
-    
63
+
64 64
     // let a = this.permission_routers
65 65
     // this.arr = a.slice(0,10)
66 66
     // console.log('this.arr',this.arr)
@@ -69,98 +69,98 @@ export default {
69 69
     navTitle:{
70 70
       handler(newVal,oldVal){
71 71
         if(newVal == '门诊管理'){
72
-          let nameArr = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord']
72
+          let nameArr = ['outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord','hospitalStation'];
73 73
           // console.log('permission_routers',this.permission_routers)
74
-          let routerArr = []
74
+          let routerArr = [];
75 75
           this.permission_routers.map(item => {
76 76
             if(nameArr.indexOf(item.name) > -1){
77 77
               routerArr.push(item)
78 78
             }
79
-          })
80
-          this.arr = routerArr
79
+          });
80
+          this.arr = routerArr;
81 81
           if(this.arr.length > 0){
82
-            let a = true
82
+            let a = true;
83 83
             this.$emit('func',a)
84 84
           }else{
85
-            let a = false
85
+            let a = false;
86 86
             this.$emit('func',a)
87 87
           }
88 88
         }else if(newVal == '电子病历'){
89
-          let nameArr = ['User','createPatient']
89
+          let nameArr = ['User','createPatient'];
90 90
           // console.log('permission_routers',this.permission_routers)
91
-          let routerArr = []
91
+          let routerArr = [];
92 92
           this.permission_routers.map(item => {
93 93
             if(nameArr.indexOf(item.name) > -1){
94 94
               routerArr.push(item)
95 95
             }
96
-          })
97
-          this.arr = routerArr
96
+          });
97
+          this.arr = routerArr;
98 98
           if(this.arr.length > 0){
99
-            let a = true
99
+            let a = true;
100 100
             this.$emit('func',a)
101 101
           }else{
102
-            let a = false
102
+            let a = false;
103 103
             this.$emit('func',a)
104 104
           }
105 105
         }else if(newVal == '透析管理'){
106
-          let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control']
106
+          let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control'];
107 107
           // console.log('permission_routers',this.permission_routers)
108
-          let routerArr = []
108
+          let routerArr = [];
109 109
           this.permission_routers.map(item => {
110 110
             if(nameArr.indexOf(item.name) > -1){
111 111
               routerArr.push(item)
112 112
             }
113
-          })
114
-          console.log('routerArr',routerArr)
115
-          this.arr = routerArr
113
+          });
114
+          console.log('routerArr',routerArr);
115
+          this.arr = routerArr;
116 116
           if(this.arr.length > 0){
117
-            let a = true
117
+            let a = true;
118 118
             this.$emit('func',a)
119 119
           }else{
120
-            let a = false
120
+            let a = false;
121 121
             this.$emit('func',a)
122 122
           }
123 123
         }else if(newVal == '库房管理'){
124
-          let nameArr = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement']
124
+          let nameArr = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement'];
125 125
           // console.log('permission_routers',this.permission_routers)
126
-          let routerArr = []
126
+          let routerArr = [];
127 127
           this.permission_routers.map(item => {
128 128
             if(nameArr.indexOf(item.name) > -1){
129 129
               routerArr.push(item)
130 130
             }
131
-          })
132
-          this.arr = routerArr
131
+          });
132
+          this.arr = routerArr;
133 133
           if(this.arr.length > 0){
134
-            let a = true
134
+            let a = true;
135 135
             this.$emit('func',a)
136 136
           }else{
137
-            let a = false
137
+            let a = false;
138 138
             this.$emit('func',a)
139 139
           }
140 140
         }else if(newVal == '配置管理'){
141
-          let nameArr = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig']
141
+          let nameArr = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig'];
142 142
           // console.log('permission_routers',this.permission_routers)
143
-          let routerArr = []
143
+          let routerArr = [];
144 144
           this.permission_routers.map(item => {
145 145
             if(nameArr.indexOf(item.name) > -1){
146 146
               routerArr.push(item)
147 147
             }
148
-          })
149
-          this.arr = routerArr
148
+          });
149
+          this.arr = routerArr;
150 150
           if(this.arr.length > 0){
151
-            let a = true
151
+            let a = true;
152 152
             this.$emit('func',a)
153 153
           }else{
154
-            let a = false
154
+            let a = false;
155 155
             this.$emit('func',a)
156 156
           }
157 157
         }else {
158
-          this.arr = []
158
+          this.arr = [];
159 159
           if(this.arr.length > 0){
160
-            let a = true
160
+            let a = true;
161 161
             this.$emit('func',a)
162 162
           }else{
163
-            let a = false
163
+            let a = false;
164 164
             this.$emit('func',a)
165 165
           }
166 166
         }
@@ -196,7 +196,7 @@ export default {
196 196
     -o-object-position: center;
197 197
     object-position: center;
198 198
     }
199
-  } 
199
+  }
200 200
   .title {
201 201
     font-size: 14px;
202 202
     color: #bfcbd9;

+ 515 - 0
src/xt_pages/hospitalStation/11.vue View File

@@ -0,0 +1,515 @@
1
+<template>
2
+  <div class="main-contain outpatientChargesManagement">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
7
+      <div class="mainLeft">
8
+        <!--<div class="mainCell" style="justify-content: space-between;">-->
9
+        <!--<p>未就诊:<span>1</span>人</p>-->
10
+        <!--<p>已就诊:<span>0</span>人</p>-->
11
+        <!--</div>-->
12
+        <!--<div class="mainCell">-->
13
+        <!--<el-radio-group v-model="radio" @change="changeRadio">-->
14
+        <!--<el-radio :label=1>未就诊</el-radio>-->
15
+        <!--<el-radio :label=2>已就诊</el-radio>-->
16
+        <!--<el-radio :label=3>全部</el-radio>-->
17
+        <!--</el-radio-group>-->
18
+        <!--</div>-->
19
+        <div class="mainCell" style="margin-bottom:10px;">
20
+          <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
21
+          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
22
+            搜索
23
+          </el-button>
24
+        </div>
25
+        <div style="flex:1;overflow-y:auto;">
26
+          <el-table :data="patientTableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
27
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
28
+                    highlight-current-row ref="tab"
29
+                    @current-change="handleCurrentChange">
30
+            <el-table-column align="center" prop="name" label="患者姓名">
31
+              <template slot-scope="scope">{{ scope.row.patients.name }}</template>
32
+            </el-table-column>
33
+            <el-table-column align="center" prop="name" label="就诊号" width="90">
34
+              <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
35
+            </el-table-column>
36
+          </el-table>
37
+        </div>
38
+      </div>
39
+      <div class="mainRight">
40
+        <div class="mainCell" style="margin-bottom:10px;flex-direction: row-reverse;">
41
+          <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
42
+          <el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
43
+          <el-button size="small" @click="open(3)" type="primary">打印</el-button>
44
+          <el-button v-loading="loadingone" v-if="hisPatientInfo == null || hisPatientInfo.id == 0 " size="small" @click="open(6)"
45
+                     type="primary">挂号
46
+          </el-button>
47
+          <el-button v-loading="loadingtwo" v-if="hisPatientInfo != null && hisPatientInfo.id > 0 " size="small" @click="open(4)"
48
+                     type="primary">收费
49
+          </el-button>
50
+          <el-button size="small" @click="open(5)" type="primary">退费</el-button>
51
+        </div>
52
+        <div class="mainCenter">
53
+          <div class="centerLeft">
54
+            <div class="tabsBox">
55
+              <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
56
+              <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
57
+                <el-tab-pane
58
+                  v-for="(item, index) in prescriptions"
59
+                  :key="index"
60
+                  :label="item.name"
61
+                  :name="item.name"
62
+                >
63
+                </el-tab-pane>
64
+                <div class="RP">Rp</div>
65
+                <prescription-table ref="prescription_tables" :prescription="curPrescriptions"></prescription-table>
66
+              </el-tabs>
67
+
68
+            </div>
69
+            <div class="costBox">
70
+              <span>当前处方总费用:<span style="color:red;">{{ getTotal() }}元</span></span>
71
+              <span>{{ state }}</span>
72
+            </div>
73
+          </div>
74
+          <div class="centerRight">
75
+            <p class="centerRightTitle">人员信息</p>
76
+            <div style="display:flex;justify-content: space-between;line-height:30px;">
77
+              <span style="font-size:14px;">人员编码:</span>
78
+              <span style="font-size:14px;">日期:{{record_date}}</span>
79
+            </div>
80
+            <ul class="basicUl">
81
+              <li style="width:50%;">姓名:{{patientInfo.name}}</li>
82
+              <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
83
+              <li style="width:50%;">年龄:{{patientInfo.age }}</li>
84
+              <li style="width:50%;">身高:{{patientInfo.height}}</li>
85
+              <li style="width:50%;">体重:{{patientInfo.weight}}</li>
86
+              <li style="width:50%;">电话:{{patientInfo.phone}}</li>
87
+              <li style="width:100%;">地址:{{patientInfo.home_address}}</li>
88
+            </ul>
89
+            <p class="centerRightTitle">诊断信息</p>
90
+            <div style="display:flex;justify-content: space-between;line-height:30px;">
91
+              <span style="font-size:14px;">门诊编号:676273816287361</span>
92
+            </div>
93
+            <ul class="basicUl">
94
+              <li style="width:50%;">医生:{{ }}</li>
95
+              <li style="width:50%;">科室:{{ }}</li>
96
+              <li style="width:100%;">费用:{{ }}元</li>
97
+              <li style="width:100%;">判断结果:</li>
98
+              <li style="width:100%;">是否有传染病:</li>
99
+              <li style="width:100%;">血压:</li>
100
+            </ul>
101
+          </div>
102
+        </div>
103
+      </div>
104
+    </div>
105
+    <!--<additionalCharges ref='additionalCharges'></additionalCharges>-->
106
+  </div>
107
+</template>
108
+
109
+
110
+<script>
111
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
112
+  import noCharge from './components/noCharge'
113
+  import charged from './components/charged'
114
+  import medicalInsuranceRefund from './components/medicalInsuranceRefund'
115
+  import prescriptionTable from './components/prescriptionTable'
116
+  import additionalCharges from './components/additionalCharges'
117
+  import { getPatientInformation, getPatientList } from '@/api/project/project'
118
+  import { getPatientInfo, getSchedulePatientList, register,upload } from '@/api/his/his'
119
+
120
+  const moment = require('moment');
121
+  export default {
122
+    components: {
123
+      BreadCrumb,
124
+      noCharge,
125
+      charged,
126
+      medicalInsuranceRefund,
127
+      prescriptionTable,
128
+      additionalCharges
129
+    },
130
+    data() {
131
+      return {
132
+        crumbs: [
133
+          { path: false, name: '门诊收费' },
134
+          { path: false, name: '门诊收费管理' }
135
+        ],
136
+        curPrescriptions: {},
137
+        prescriptions: [],
138
+        record_date: '',
139
+        tableData: [],
140
+        editableTabsValue: '1',
141
+        loadingone:false,
142
+        editableTabs: [{
143
+          title: '处方1',
144
+          name: '1'
145
+        }],
146
+        tabIndex: 1,
147
+        hisPatientInfo: {},
148
+        loadingtwo:false,
149
+        patientTableData: [{
150
+          name: '杨美英',
151
+          mdtrt_id: '1709946'
152
+        }],
153
+        patientInfo: { id: 0 },
154
+        doctor: {},
155
+        total: 0,
156
+        state: '未收费',
157
+        radio: 1,
158
+        radioStatus: 1,
159
+        search_input: '',
160
+        start_time: moment().locale('zh-cn').format('YYYY-MM-DD')
161
+      }
162
+    },
163
+    created() {
164
+      var nowDate = new Date();
165
+      var nowYear = nowDate.getFullYear();
166
+      var nowMonth = nowDate.getMonth() + 1;
167
+      var nowDay = nowDate.getDate();
168
+      this.record_date =
169
+        nowYear +
170
+        '-' +
171
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
172
+        '-' +
173
+        (nowDay < 10 ? '0' + nowDay : nowDay);
174
+
175
+      //获取患者信息
176
+      this.getPatientList()
177
+    },
178
+    methods: {
179
+      tabclickEvent(val) {
180
+        for (let i = 0; i < this.prescriptions.length; i++) {
181
+          if (this.prescriptions[i].name == val.name) {
182
+            this.curPrescriptions = {};
183
+            var temp = this.deepClone(this.prescriptions[i]);
184
+            this.curPrescriptions = temp;
185
+            console.log(this.curPrescriptions)
186
+          }
187
+        }
188
+      }, deepClone(source) {
189
+        if (!source && typeof source !== 'object') {
190
+          throw new Error('error arguments', 'shallowClone')
191
+        }
192
+        const targetObj = source.constructor === Array ? [] : {};
193
+        Object.keys(source).forEach((keys) => {
194
+          if (source[keys] && typeof source[keys] === 'object') {
195
+            targetObj[keys] = this.deepClone(source[keys])
196
+          } else {
197
+            targetObj[keys] = source[keys]
198
+          }
199
+        });
200
+        return targetObj
201
+      },
202
+      getTotal() {
203
+        var total = 0;
204
+        console.log(this.prescriptions);
205
+        for (let i = 0; i < this.prescriptions.length; i++) {
206
+          if (this.prescriptions[i].advices != null) {
207
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
208
+              total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
209
+            }
210
+          }
211
+          if (this.prescriptions[i].project != null) {
212
+            for (let b = 0; b < this.prescriptions[i].project.length; b++) {
213
+              total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].count
214
+            }
215
+          }
216
+        }
217
+        return total
218
+      },
219
+      moreState(tab, event) {
220
+        if (tab == 'more') {
221
+          return false
222
+        }
223
+      },
224
+      open(index) {
225
+        if (index == 1) {
226
+        } else if (index == 2) {
227
+
228
+        } else if (index == 4) {
229
+
230
+          let params = {
231
+            'id': this.patientInfo.id,
232
+            'record_time': this.record_date
233
+          };
234
+          this.loadingtwo = true;
235
+          upload(params).then(response => {
236
+            if (response.data.state == 0) {
237
+              this.$message.error(response.data.msg);
238
+              this.loadingtwo = false;
239
+
240
+              return false
241
+
242
+            } else {
243
+              this.loadingtwo = false
244
+
245
+            }
246
+          });
247
+
248
+          this.state = '已收费';
249
+          this.$message({ message: '收费成功', type: 'success' })
250
+        } else if (index == 5) {
251
+          this.$message({ message: '退费成功', type: 'success' })
252
+        } else if (index == 6) {
253
+
254
+          if (this.patientInfo.id == 0) {
255
+            this.$message.error('请先选择要挂号的病人');
256
+            return
257
+          }
258
+          let params = {
259
+            'id': this.patientInfo.id,
260
+            'record_time': this.record_date
261
+          };
262
+          this.loadingone = true;
263
+          register(params).then(response => {
264
+            if (response.data.state == 0) {
265
+              this.$message.error(response.data.msg);
266
+              this.loadingone = false;
267
+
268
+              return false
269
+
270
+            } else {
271
+              this.loadingone = false;
272
+              var his_info = response.data.data.his_info;
273
+              this.hisPatientInfo = his_info
274
+            }
275
+          })
276
+        }
277
+      },
278
+      addTab(targetName) {
279
+        let newTabName = ++this.tabIndex + '';
280
+        this.editableTabs.push({
281
+          title: '处方' + this.tabIndex,
282
+          name: newTabName
283
+        });
284
+        this.editableTabsValue = newTabName
285
+      },
286
+      removeTab(targetName) {
287
+        let tabs = this.editableTabs;
288
+        let activeName = this.editableTabsValue;
289
+        if (activeName === targetName) {
290
+          tabs.forEach((tab, index) => {
291
+            if (tab.name === targetName) {
292
+              let nextTab = tabs[index + 1] || tabs[index - 1];
293
+              if (nextTab) {
294
+                activeName = nextTab.name
295
+              }
296
+            }
297
+          })
298
+        }
299
+
300
+        this.editableTabsValue = activeName;
301
+        this.editableTabs = tabs.filter(tab => tab.name !== targetName)
302
+      },
303
+      addCharges() {
304
+        this.$refs.additionalCharges.show()
305
+      },
306
+      choosePatient() {
307
+
308
+      },
309
+      changeRadio(id) {
310
+        console.log(id);
311
+        this.radioStatus = id;
312
+        this.getPatientList()
313
+      },
314
+
315
+      //患者列表
316
+      getPatientList() {
317
+        let params = {
318
+          'record_date': this.record_date
319
+        };
320
+        getSchedulePatientList(params).then(response => {
321
+          if (response.data.state == 0) {
322
+            this.$message.error(response.data.msg);
323
+            return false
324
+          } else {
325
+            this.patientTableData = [];
326
+            // let cal_one = 0
327
+            // let cal_two = 0
328
+            for (let i = 0; i < response.data.data.list.length; i++) {
329
+              // if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
330
+              //   // cal_one = cal_one + 1
331
+              // }
332
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
333
+                // cal_two = cal_two + 1
334
+                this.patientTableData.push(response.data.data.list[i])
335
+              }
336
+            }
337
+
338
+            // this.cal_one = cal_one
339
+            // this.cal_two = cal_two
340
+          }
341
+        })
342
+      },
343
+
344
+      unique(arr) {
345
+        const res = new Map();
346
+        return arr.filter((arr) => !res.has(arr.id_card_no) && res.set(arr.id_card_no, 1))
347
+      },
348
+      handleCurrentChange(val) {
349
+        this.getPatientInformation(val.patients.id)
350
+      }, //获取患者的基本信息
351
+      getPatientInformation(id) {
352
+        let params = {
353
+          'record_date': this.record_date,
354
+          'patient_id': id
355
+        };
356
+        getPatientInfo(params).then(response => {
357
+          if (response.data.state == 0) {
358
+            this.$message.error(response.data.msg);
359
+            return false
360
+          } else {
361
+            this.patientInfo = response.data.data.xt_info;
362
+            this.hisPatientInfo = response.data.data.his_info;
363
+            this.prescriptions = [];
364
+            for (let i = 0; i < response.data.data.prescription.length; i++) {
365
+              var prescription = response.data.data.prescription[i];
366
+              let index = i + 1;
367
+              let obj = {
368
+                name: '处方' + index,
369
+                advices: prescription.advices,
370
+                project: prescription.project,
371
+                type: response.data.data.prescription[i].type
372
+              };
373
+              this.prescriptions.push(obj);
374
+              this.curPrescriptions = this.prescriptions[0]
375
+
376
+            }
377
+            // this.$refs.prescriptions.setData(this.prescriptions)
378
+          }
379
+        })
380
+      }
381
+    }
382
+  }
383
+</script>
384
+
385
+<style lang="scss" scoped>
386
+  .app-container {
387
+    height: 100%;
388
+  }
389
+
390
+  .outpatientChargesManagement {
391
+    height: 100%;
392
+    display: flex;
393
+    flex-direction: column;
394
+
395
+  .mainLeft {
396
+    width: 200px;
397
+    height: 100%;
398
+    display: flex;
399
+    flex-direction: column;
400
+
401
+  .el-radio {
402
+    margin-right: 5px;
403
+  }
404
+
405
+  }
406
+  .mainCell {
407
+    height: 36px;
408
+    display: flex;
409
+    align-items: center;
410
+  }
411
+
412
+  .mainRight {
413
+    margin-left: 20px;
414
+    flex: 1;
415
+    height: 100%;
416
+    display: flex;
417
+    flex-direction: column;
418
+    overflow-y: auto;
419
+
420
+  .cellSpan {
421
+    min-width: 80px;
422
+    display: inline-block;
423
+    margin-right: 10px;
424
+  }
425
+
426
+  }
427
+  .tabsBox {
428
+    position: relative;
429
+    height: 90%;
430
+    overflow-y: auto;
431
+    margin-bottom: 60px;
432
+
433
+  .el-tabs__item {
434
+    padding: 0 10px;
435
+  }
436
+
437
+  }
438
+  .addTab {
439
+    position: absolute;
440
+    right: 0;
441
+    top: 6px;
442
+    z-index: 20;
443
+  }
444
+
445
+  .mainCenter {
446
+    display: flex;
447
+    flex: 1;
448
+  }
449
+
450
+  .costBox {
451
+    width: 100%;
452
+    height: 60px;
453
+    background: #fff;
454
+    position: absolute;
455
+    bottom: 0;
456
+    display: flex;
457
+    align-items: center;
458
+    justify-content: space-between;
459
+  }
460
+
461
+  .centerLeft {
462
+    flex: 1;
463
+    display: flex;
464
+    flex-direction: column;
465
+    position: relative;
466
+  }
467
+
468
+  .centerRight {
469
+    width: 300px;
470
+    margin-left: 5px;
471
+    display: flex;
472
+    flex-direction: column;
473
+  }
474
+
475
+  .RP {
476
+    color: #409EFF;
477
+    font-size: 20px;
478
+    margin-bottom: 5px;
479
+  }
480
+
481
+  .centerRightTitle {
482
+    color: #409EFF;
483
+    padding-top: 10px;;
484
+  }
485
+
486
+  .basicUl {
487
+    border-top: 1px solid #e5e5e5;
488
+    border-left: 1px solid #e5e5e5;
489
+    display: flex;
490
+    flex-wrap: wrap;
491
+
492
+  li {
493
+    border-bottom: 1px solid #e5e5e5;
494
+    border-right: 1px solid #e5e5e5;
495
+    width: 100%;
496
+    height: 38px;
497
+    line-height: 38px;
498
+    text-indent: 5px;
499
+    font-size: 14px;
500
+  }
501
+
502
+  }
503
+  }
504
+</style>
505
+
506
+<style lang="scss">
507
+  #tab-more {
508
+
509
+  .el-icon-close {
510
+    display: none;
511
+  }
512
+
513
+  }
514
+</style>
515
+

+ 82 - 0
src/xt_pages/hospitalStation/advancePayment.vue View File

@@ -0,0 +1,82 @@
1
+<template>
2
+    <div class="main-contain outpatientChargesManagement">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+        <div class="app-container">
7
+            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+                <div>
9
+                    <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
10
+                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
11
+                </div>
12
+                <el-button size="small" type="primary">预交金查询</el-button>
13
+            </div>
14
+            <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
15
+                <el-table-column type="selection" width="55" align="center"></el-table-column>
16
+                <el-table-column align="center" prop="name" label="序号">
17
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
18
+                </el-table-column>
19
+                <el-table-column align="center" prop="name" label="患者姓名">
20
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
21
+                </el-table-column>
22
+                <el-table-column align="center" prop="name" label="证件号码">
23
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
24
+                </el-table-column>
25
+                <el-table-column align="center" prop="name" label="患者类型">
26
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
27
+                </el-table-column>
28
+                <el-table-column align="center" prop="name" label="地址">
29
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
30
+                </el-table-column>
31
+                <el-table-column align="center" prop="name" label="预交金余额(元)">
32
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
33
+                </el-table-column>
34
+                <el-table-column align="center" prop="name" label="已交金额(元)">
35
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
36
+                </el-table-column>
37
+                <el-table-column align="center" prop="name" label="操作" width="300">
38
+                    <template slot-scope="scope">
39
+                        <el-button size="mini" type="primary">交款</el-button>
40
+                        <el-button size="mini" type="danger">删除</el-button>
41
+                        <el-button size="mini" type="primary">结算</el-button>
42
+                    </template>
43
+                </el-table-column>
44
+            </el-table>
45
+        </div>
46
+    </div>
47
+</template>
48
+
49
+
50
+<script>
51
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
52
+export default {
53
+    components:{
54
+        BreadCrumb,
55
+    },
56
+    data(){
57
+        return{
58
+            crumbs: [
59
+                { path: false, name: '门诊收费' },
60
+                { path: false, name: '预交金' }
61
+            ],
62
+            tableData: [{
63
+            date: '2016-05-02',
64
+            name: '王小虎',
65
+            address: '上海市普陀区金沙江路 1518 弄'
66
+            }, {
67
+            date: '2016-05-04',
68
+            name: '王小虎',
69
+            address: '上海市普陀区金沙江路 1517 弄'
70
+            }, {
71
+            date: '2016-05-01',
72
+            name: '王小虎',
73
+            address: '上海市普陀区金沙江路 1519 弄'
74
+            }, {
75
+            date: '2016-05-03',
76
+            name: '王小虎',
77
+            address: '上海市普陀区金沙江路 1516 弄'
78
+            }]
79
+        }
80
+    }
81
+}
82
+</script>

+ 481 - 0
src/xt_pages/hospitalStation/allListPrint.vue View File

@@ -0,0 +1,481 @@
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
+      >打印
12
+      </el-button
13
+      >
14
+    </template>
15
+
16
+    <div class='dialysisPage' style="padding-top:40px;">
17
+      <printOne :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+  import { getHisOrderDetailCollect } from '@/api/his/his'
24
+  import { uParseTime } from '@/utils/tools'
25
+  import printOne from './allListTemplate/printOne'
26
+
27
+  export default {
28
+    name: 'allListPrint',
29
+    components: {
30
+      printOne
31
+    },
32
+    props: {
33
+      paramsObj: Object
34
+    },
35
+    data() {
36
+      return {
37
+        list: [],
38
+        patient: {},
39
+        order: {},
40
+        admin: {}
41
+      }
42
+    },
43
+
44
+    created() {
45
+      this.getInfo(this.paramsObj.id)
46
+
47
+    },
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
+
93
+              obj.details.push({
94
+                total: obj.total,
95
+                is_total: 1,
96
+              });
97
+              this.list =  this.list.concat(obj.details)
98
+            }
99
+
100
+
101
+
102
+
103
+          }
104
+        })
105
+      }, getTotal:function(items){
106
+        let total = 0;
107
+        for(let i = 0; i < items.length; i++){
108
+          total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
109
+        }
110
+        return total.toFixed(2)
111
+      },setNewData(details) {
112
+        let drug_ids = [];
113
+        let project_ids = [];
114
+
115
+        for (let i = 0; i < details.length; i++) {
116
+          if (details[i].advice && details[i].advice.id > 0 && details[i].advice.prescription && details[i].advice.prescription.type == 1) { //药品
117
+            let obj = {
118
+              id: details[i].advice.drug_id,
119
+              price: details[i].advice.price
120
+            };
121
+            drug_ids.push(obj)
122
+          } else if (details[i].project && details[i].project.id > 0 && details[i].project.prescription && details[i].project.prescription.type == 2) { //项目
123
+            let obj = {
124
+              id: details[i].project.project_id,
125
+              price: details[i].project.price
126
+
127
+            };
128
+            project_ids.push(obj)
129
+
130
+          }
131
+
132
+        }
133
+        //
134
+        // console.log('old ids')
135
+        // console.log(drug_ids)
136
+        // console.log(project_ids)
137
+        // console.log('old ids')
138
+
139
+        let new_drug_ids = this.unique(drug_ids);
140
+        let new_project_ids = this.unique(project_ids);
141
+        let list = [];
142
+
143
+        console.log('ids');
144
+        console.log(new_drug_ids);
145
+        console.log(new_project_ids);
146
+        console.log('ids');
147
+
148
+        if (new_drug_ids.length > 0 && new_project_ids.length == 0) {
149
+          for (let i = 0; i < new_drug_ids.length; i++) {
150
+            let obj = {};
151
+            let count = 0;
152
+            for (let a = 0; a < details.length; a++) {
153
+              if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
154
+                obj['name'] = details[a].advice.advice_name;
155
+                obj['spec'] = details[a].advice.drug.drug_spec;
156
+                obj['unit'] = details[a].advice.drug.max_unit;
157
+
158
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type);
159
+                obj['price'] = parseFloat(details[a].pric);
160
+                obj['is_total'] = 2;
161
+                count = count + details[a].cnt
162
+              }
163
+            }
164
+            obj['count'] = count;
165
+            list.push(obj)
166
+          }
167
+        }
168
+
169
+        if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
170
+          for (let i = 0; i < new_project_ids.length; i++) {
171
+            let obj = {};
172
+            let count = 0;
173
+            for (let a = 0; a < details.length; a++) {
174
+              if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
175
+                obj['name'] = details[a].project.project.project_name;
176
+                obj['spec'] = '1';
177
+                obj['unit'] = details[a].project.project.unit;
178
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type);
179
+                obj['price'] = parseFloat(details[a].pric);
180
+                obj['is_total'] = 2;
181
+
182
+                count = count + details[a].cnt
183
+              }
184
+            }
185
+            obj['count'] = count;
186
+            list.push(obj)
187
+          }
188
+        }
189
+
190
+        return list
191
+
192
+      }, unique(array) {
193
+        // res用来存储结果
194
+        var res = [];
195
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
196
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
197
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
198
+              break
199
+            }
200
+          }
201
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
202
+          if (j === resLen) {
203
+            res.push(array[i])
204
+          }
205
+        }
206
+        return res
207
+      },
208
+
209
+      getType(med_chrgitm_type) {
210
+        switch (med_chrgitm_type) {
211
+          case '01':
212
+            return '床位费';
213
+            break;
214
+          case '02':
215
+            return '诊察费';
216
+
217
+            break;
218
+          case '03':
219
+            return '检查费';
220
+
221
+            break;
222
+          case '04':
223
+            return '化验费';
224
+            break;
225
+          case '05':
226
+            return '治疗费';
227
+
228
+            break;
229
+          case '06':
230
+            return '手术费';
231
+
232
+            break;
233
+          case '07':
234
+            return '护理费';
235
+
236
+            break;
237
+          case '08':
238
+            return '材料费';
239
+
240
+            break;
241
+          case '09':
242
+            return '西药费';
243
+
244
+            break;
245
+          case '10':
246
+            return '中药饮片费';
247
+
248
+            break;
249
+          case '11':
250
+            return '中成药费';
251
+
252
+            break;
253
+          case '12':
254
+            return '一般诊疗费';
255
+
256
+            break;
257
+          case '13':
258
+            return '挂号费';
259
+
260
+            break;
261
+          case '14':
262
+            return '其他费';
263
+
264
+            break
265
+
266
+        }
267
+
268
+      },
269
+      printThisPage() {
270
+
271
+        const style =
272
+          '@media print {.allListTitle{font-size: 24px;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: 14px;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;}}';
273
+        printJS({
274
+          printable: 'allList-print',
275
+          type: 'html',
276
+          style: style,
277
+          scanStyles: false
278
+        })
279
+
280
+        // if (this.org_template_info.template_id == 1) {
281
+        //   printJS({
282
+        //     printable: "dialysis-print-box",
283
+        //     type: "html",
284
+        //     style: style,
285
+        //     scanStyles: false
286
+        //   });
287
+        // }
288
+      }
289
+    }
290
+
291
+  }
292
+</script>
293
+
294
+<style>
295
+  .dialysis-print-order {
296
+    width: 960px;
297
+    margin: 0 auto;
298
+  }
299
+
300
+  .dialysis-print-order .order-yy-name {
301
+    margin: auto;
302
+    text-align: center;
303
+    font-size: 20px;
304
+    letter-spacing: 5px;
305
+  }
306
+
307
+  .dialysis-print-order .order-title {
308
+    margin: auto;
309
+    font-weight: 600;
310
+    text-align: center;
311
+    font-size: 22px;
312
+    padding: 10px;
313
+  }
314
+
315
+  .dialysis-print-order .table-box {
316
+    width: 100%;
317
+    line-height: 23px;
318
+    font-size: 14px;
319
+  }
320
+
321
+  .dialysis-print-order .print-table {
322
+    width: 100%;
323
+    text-align: center;
324
+    border-collapse: collapse;
325
+    line-height: 40px;
326
+    font-size: 14px;
327
+    border-color: #000;
328
+  }
329
+
330
+  .dialysis-print-order .print-table-no {
331
+    width: 100%;
332
+    text-align: center;
333
+    border-collapse: collapse;
334
+    font-size: 14px;
335
+  }
336
+
337
+  .dialysis-print-order .under-line {
338
+    border-bottom: 1px solid #999;
339
+    width: 95%;
340
+    text-align: center;
341
+    margin-left: 2px;
342
+  }
343
+
344
+  .dialysis-print-order .title-box {
345
+    text-align: center;
346
+    font-size: 16px;
347
+  }
348
+
349
+  .dialysis-print-order .radio-lebel-box {
350
+    font-weight: 400;
351
+    cursor: pointer;
352
+  }
353
+
354
+  .dialysis-print-order .radio-no {
355
+    opacity: 0;
356
+    outline: none;
357
+    position: absolute;
358
+    margin: 0;
359
+    width: 0;
360
+    height: 0;
361
+    z-index: -1;
362
+  }
363
+
364
+  .dialysis-print-order .radio-inner {
365
+    white-space: nowrap;
366
+    cursor: pointer;
367
+    outline: none;
368
+    display: inline-block;
369
+    line-height: 1;
370
+    position: relative;
371
+    vertical-align: middle;
372
+  }
373
+
374
+  .dialysis-print-order .radio-fang {
375
+    display: inline-block;
376
+    position: relative;
377
+    border: 1px solid #000;
378
+    box-sizing: border-box;
379
+    width: 14px;
380
+    height: 14px;
381
+    background-color: #fff;
382
+    z-index: 1;
383
+    transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
384
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
385
+  }
386
+
387
+  .dialysis-print-order .is-checked-radio::after {
388
+    content: "√";
389
+    font-size: 15px;
390
+  }
391
+
392
+  .dialysis-print-order .print-table-no tr td {
393
+    padding: 8px 5px;
394
+    line-height: 25px;
395
+  }
396
+
397
+  .dialysis-print-order .print-table tr td {
398
+    padding: 1px 1px;
399
+    /*line-height: 25px;*/
400
+  }
401
+
402
+  .es-img {
403
+    height: 30px;
404
+  }
405
+
406
+  .advice-name {
407
+    text-align: left;
408
+  }
409
+
410
+  .advice-children {
411
+    display: flex;
412
+  }
413
+
414
+  .title-box-pro {
415
+    border: 0 #fff;
416
+    line-height: 25px;
417
+    height: 25px;
418
+    text-align: left;
419
+    padding-left: 10px !important;
420
+  }
421
+
422
+  .title-box-pro-tr {
423
+    border: 0 #fff;
424
+  }
425
+
426
+  .text-align-left {
427
+    text-align: left !important;
428
+    padding-left: 10px !important;
429
+    font-size: 14px !important;
430
+    line-height: 25px;
431
+  }
432
+
433
+  .print-table-tr-new td {
434
+    line-height: 20px !important;
435
+  }
436
+
437
+  .border-top-solid {
438
+    border: solid 1px #000;
439
+  }
440
+
441
+  .print-template-two tr {
442
+    line-height: 30px;
443
+  }
444
+
445
+  .table-box1 {
446
+    border: 1px solid #000;
447
+    width: 100%;
448
+    line-height: 30px;
449
+    font-size: 14px;
450
+    border-collapse: collapse;
451
+  }
452
+
453
+  .table-box1 tr {
454
+    border-bottom: 1px solid #000;
455
+  }
456
+</style>
457
+
458
+<style lang="scss">
459
+
460
+  .newContainer {
461
+
462
+  .dialysisPage::-webkit-scrollbar {
463
+    height: 15px;
464
+  }
465
+
466
+  .el-date-editor {
467
+
468
+  .el-input__inner {
469
+    padding-right: 0px;
470
+  }
471
+
472
+  }
473
+  .el-table td, .el-table th {
474
+    text-align: center;
475
+  }
476
+
477
+  }
478
+  .newContainer::-webkit-scrollbar {
479
+    height: 15px !important;
480
+  }
481
+</style>

+ 174 - 0
src/xt_pages/hospitalStation/allListTemplate/printOne.vue View File

@@ -0,0 +1,174 @@
1
+<template>
2
+    <div id="allList-print" class="allList-print">
3
+        <div v-for='(i,index) in pageArr.length' :key="index">
4
+            <div class="allListTitle">{{$store.getters.xt_user.org.org_name}}费用汇总</div>
5
+            <div class="allListInfo">
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
+
12
+            </div>
13
+            <table class="allListTable" border="1">
14
+                <tr>
15
+                    <td style="width:10%">类别</td>
16
+                    <td style="width:50%">项目名称</td>
17
+                    <td style="width:10%">规格</td>
18
+                    <td style="width:10%">单价(元)</td>
19
+                    <td style="width:10%">数量</td>
20
+                    <td style="width:10%">金额(元)</td>
21
+                </tr>
22
+                <template v-for='item in list.slice(index * 13,(index * 13) + pageArr[index])'>
23
+                    <tr v-if="item.is_total == 2">
24
+                        <td style="width:10%">{{item.med_chrgitm_type}}</td>
25
+                        <td style="width:50%">{{item.name}}</td>
26
+                        <td style="width:10%">{{item.spec}}</td>
27
+                        <td style="width:10%">{{(item.price).toFixed(2)}}</td>
28
+                        <td style="width:10%">{{item.count}}{{item.unit}}</td>
29
+                        <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
30
+                    </tr>
31
+                    <tr>
32
+                        <td colspan="6" style="text-align:right;" v-if="item.is_total == 1">合计:{{item.total}}元</td>
33
+                    </tr>
34
+                </template>
35
+            </table>
36
+            <div class="tableBottom">
37
+            <div class="tableBottomOne">制表人:{{admin.user_name}}</div>
38
+            <div class="tableBottomOne">制表日期:{{ getNowTime()}}</div>
39
+            <div class="tableBottomOne">总费用:{{order.medfee_sumamt}}元</div>
40
+            </div>
41
+        </div>
42
+    </div>
43
+</template>
44
+
45
+<script>
46
+  import { uParseTime } from '@/utils/tools'
47
+
48
+  export default {
49
+    props: {
50
+      list: {
51
+        type: Array,
52
+        default: function () {
53
+          return [];
54
+        }
55
+      }, patient: {
56
+        type: Object,
57
+        default: function () {
58
+          return {};
59
+        }
60
+      }, order: {
61
+        type: Object,
62
+        default: function () {
63
+          return {};
64
+        }
65
+      }, admin: {
66
+        type: Object,
67
+        default: function () {
68
+          return {};
69
+        }
70
+      },
71
+    },
72
+    data(){
73
+        return{
74
+            page:1,
75
+            pageArr:[],
76
+        }
77
+    },
78
+    methods:{
79
+      getNowTime: function () {
80
+        let dateTime;
81
+        let yy = new Date().getFullYear();
82
+        let mm = new Date().getMonth() + 1;
83
+        let dd = new Date().getDate();
84
+        let hh = new Date().getHours();
85
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
86
+          :
87
+          new Date().getMinutes();
88
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
89
+          :
90
+          new Date().getSeconds();
91
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
92
+        return dateTime
93
+      },
94
+      getTimes(time) {
95
+        return uParseTime(time, '{y}-{m}-{d}')
96
+      },getTotal:function(items){
97
+        let total = 0;
98
+        for(let i = 0; i < items.length; i++){
99
+          total = total + (items[i].count * items[i].price).toFixed(2)
100
+        }
101
+        return total
102
+
103
+      },
104
+      getPage(){
105
+        if(this.list.length <= 13){
106
+            this.page = 1;
107
+            this.pageArr.push(this.list.length)
108
+        }else if(this.list.length > 13){
109
+            this.page = parseInt(this.list.length / 13);
110
+            let num = this.list.length % 13;
111
+            for (var i=0;i<this.page;i++){
112
+                this.pageArr.push(13)
113
+            }
114
+            if(num != 0){
115
+                this.pageArr.push(num)
116
+            }
117
+        }
118
+      }
119
+
120
+    },
121
+    watch:{
122
+        list: {
123
+            handler(newVal) {
124
+                this.getPage()
125
+            },
126
+            deep: true
127
+        }
128
+    }
129
+  }
130
+
131
+
132
+</script>
133
+
134
+<style lang="scss" scoped>
135
+.allList-print{
136
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
137
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
138
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
139
+    margin-bottom: 20px;
140
+    padding:20px 10px;
141
+}
142
+.allListTitle{
143
+    font-size: 24px;
144
+    text-align: center;
145
+    font-weight: bold;
146
+    margin-bottom: 10px;
147
+}
148
+.allListInfo{
149
+    display: flex;
150
+    font-size: 16px;
151
+    justify-content: space-between;
152
+    margin: 10px 0;
153
+}
154
+.allListTable{
155
+    width: 100%;
156
+    text-align: center;
157
+    border-collapse: collapse;
158
+    line-height: 40px;
159
+    font-size: 14px;
160
+    border-color: #000;
161
+    text-align: left;
162
+}
163
+.allListTable tr td {
164
+    padding: 0 5px;
165
+}
166
+.tableBottom{
167
+    font-size: 16px;
168
+    display: flex;
169
+    margin-top: 20px;
170
+}
171
+.tableBottomOne{
172
+    margin-right: 40px;
173
+}
174
+</style>

+ 208 - 0
src/xt_pages/hospitalStation/components/ChargePrescriptionTable.vue View File

@@ -0,0 +1,208 @@
1
+<template>
2
+  <div class="prescriptionTable">
3
+    <el-table v-if="prescription.type == 1" :data="prescription.advices" border style="width: 99%;"
4
+              :row-style="{ color: '#303133' }"
5
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7
+      <el-table-column align="center" prop="name" label="名称">
8
+        <template slot-scope="scope"><span :title='scope.row.drug_name'>{{ scope.row.drug_name }}</span></template>
9
+      </el-table-column>
10
+
11
+      <el-table-column align="center" prop="name" width="90" label="单次用量">
12
+        <template slot-scope="scope">
13
+          <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
14
+          <div>{{scope.row.single_dose}}&nbsp;&nbsp;{{scope.row.single_dose_unit}}</div>
15
+        </template>
16
+      </el-table-column>
17
+      <el-table-column align="center" prop="name" width="100" label="用法">
18
+        <template slot-scope="scope">
19
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
20
+          <div> {{scope.row.delivery_way}}</div>
21
+
22
+        </template>
23
+      </el-table-column>
24
+      <el-table-column align="center" prop="name" width="100" label="频率">
25
+        <template slot-scope="scope">
26
+          <div> {{scope.row.execution_frequency}}</div>
27
+
28
+          <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
29
+        </template>
30
+      </el-table-column>
31
+
32
+      <el-table-column align="center" prop="day" width="50" label="天数">
33
+        <template slot-scope="scope">{{scope.row.day}}天</template>
34
+      </el-table-column>
35
+
36
+      <el-table-column align="center" prop="name" width="100" label="总量">
37
+        <template slot-scope="scope">
38
+          <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
39
+          <div>{{scope.row.prescribing_number}}&nbsp;&nbsp;{{scope.row.prescribing_number_unit}}</div>
40
+        </template>
41
+      </el-table-column>
42
+      <el-table-column align="center" prop="name" width="60" label="单价">
43
+        <template slot-scope="scope">
44
+          <div> {{scope.row.retail_price}}元</div>
45
+
46
+          <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
47
+        </template>
48
+      </el-table-column>
49
+      <el-table-column align="center" prop="name" width="50" label="备注">
50
+        <template slot-scope="scope">
51
+          <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
52
+          <div> {{scope.row.remark}}</div>
53
+        </template>
54
+      </el-table-column>
55
+    </el-table>
56
+    <el-table v-if="prescription.type == 2" :data="prescription.project" border style="width: 99%;"
57
+              :row-style="{ color: '#303133' }"
58
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
59
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
60
+      <el-table-column align="center" prop="project_name" label="名称">
61
+        <template slot-scope="scope">{{ scope.row.project_name }}</template>
62
+      </el-table-column>
63
+      <el-table-column align="center" prop="statistical_classification" width="100" label="组">
64
+        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
65
+      </el-table-column>
66
+      <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
67
+        <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>
68
+
69
+      </el-table-column>
70
+      <el-table-column align="center" prop="delivery_way" width="80" label="用法">
71
+        <template slot-scope="scope">
72
+          <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
73
+          {{scope.row.delivery_way}}
74
+
75
+        </template>
76
+      </el-table-column>
77
+      <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
78
+        <template slot-scope="scope">
79
+          <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
80
+          {{scope.row.execution_frequency}}
81
+
82
+        </template>
83
+      </el-table-column>
84
+      <el-table-column align="center" prop="number_days" width="50" label="天数">
85
+        <template slot-scope="scope">
86
+          <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
87
+          {{scope.row.number_days}}天
88
+
89
+        </template>
90
+
91
+      </el-table-column>
92
+      <el-table-column align="center" prop="total" width="50" label="总量">
93
+        <template slot-scope="scope">
94
+          <div style="display:flex;">
95
+            <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
96
+            {{scope.row.total}}
97
+
98
+            <div>{{scope.row.unit}}</div>
99
+
100
+          </div>
101
+        </template>
102
+      </el-table-column>
103
+      <el-table-column align="center" prop="name" width="50" label="单价">
104
+        <template slot-scope="scope">
105
+          <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
106
+          {{scope.row.price}}元
107
+
108
+        </template>
109
+      </el-table-column>
110
+      <el-table-column align="center" prop="name" width="50" label="备注">
111
+        <template slot-scope="scope">
112
+          <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
113
+          {{scope.row.remark}}
114
+
115
+        </template>
116
+      </el-table-column>
117
+    </el-table>
118
+
119
+    <div class="additionalBox">
120
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
121
+        <span :title="item.item_name">{{item.item_name}}</span>
122
+        <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
123
+        共
124
+        <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
125
+        次
126
+        <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
127
+      </div>
128
+    </div>
129
+  </div>
130
+</template>
131
+
132
+<script>
133
+  import { getInitData } from '@/api/his/his'
134
+  import { getDictionaryDataConfig} from "@/utils/data";
135
+
136
+  export default {
137
+    props: {
138
+      prescription: Object
139
+    },
140
+    data() {
141
+      return {
142
+        drugways: [],
143
+        efs: []
144
+      }
145
+    }, mounted() {
146
+      getInitData().then(response => {
147
+        if (response.data.state == 0) {
148
+          this.$message.error(response.data.msg);
149
+          return false
150
+        } else {
151
+          this.drugways = response.data.data.drugways;
152
+          this.efs = response.data.data.efs
153
+        }
154
+      })
155
+    }, methods:  {
156
+
157
+
158
+      getGroup(id){
159
+        var name = "";
160
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category');
161
+        console.log("2235",statistics_category);
162
+        for(let i=0;i<statistics_category.length;i++){
163
+          if(id == statistics_category[i].id){
164
+            name = statistics_category[i].name
165
+          }
166
+        }
167
+        return name
168
+      },
169
+
170
+
171
+    }
172
+  }
173
+</script>
174
+
175
+<style lang="scss">
176
+  .prescriptionTable{
177
+  .additionalBox{
178
+    margin-top: 20px;
179
+    display: flex;
180
+    flex-wrap: wrap;
181
+  .additionalOne{
182
+    margin-right:20px;
183
+    margin-bottom:10px;
184
+    display: flex;
185
+    align-items: center;
186
+  >span{
187
+    white-space: nowrap;
188
+    overflow: hidden;
189
+    text-overflow: ellipsis;
190
+    width:80px;
191
+    display: inline-block;
192
+    font-size: 14px;
193
+  }
194
+  }
195
+  .deleteIcon{
196
+    color:red;
197
+    margin-left:5px;
198
+  }
199
+  }
200
+  .el-table th .cell, .el-table td .cell{
201
+    padding: 0 2px;
202
+    white-space: pre-line;
203
+  }
204
+  .el-icon-delete{
205
+    color:red;
206
+  }
207
+  }
208
+</style>

+ 69 - 0
src/xt_pages/hospitalStation/components/additionalCharges.vue View File

@@ -0,0 +1,69 @@
1
+<template>
2
+    <el-dialog
3
+        title="附加收费"
4
+        width="300px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+    >
8
+        <el-table :data="addtions_charge" border style="width: 100%;" height="300"
9
+         :row-style="{ color: '#303133' }"
10
+         :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
11
+          highlight-current-row
12
+          >
13
+            <el-table-column align="center" prop="name" label="名称" width="100">
14
+                <template slot-scope="scope">{{ scope.row.item_name }}</template>
15
+            </el-table-column>
16
+            <el-table-column align="center" prop="name" label="金额(元)">
17
+                <template slot-scope="scope">
18
+            {{ scope.row.price }}
19
+                </template>
20
+            </el-table-column>
21
+        </el-table>
22
+        <div slot="footer" class="dialog-footer">
23
+            <el-button @click="hide">取 消</el-button>
24
+        </div>
25
+    </el-dialog>
26
+</template>
27
+
28
+<script>
29
+import { saveCharges } from "@/api/project/project"
30
+export default {
31
+  props: {
32
+    addtions_charge: Array
33
+
34
+  },
35
+    data(){
36
+        return{
37
+            visible:false,
38
+            form:{
39
+                name:''
40
+            },
41
+            tableData:[
42
+
43
+            ],
44
+            patient_id:0,
45
+            chargeTable:[]
46
+        }
47
+    },
48
+    methods:{
49
+        _close: function(done) {
50
+            done()
51
+        },
52
+        clear: function() {
53
+            this.form.id = 0;
54
+            this.form.name = "";
55
+            this.form.intro = "";
56
+        },
57
+        show() {
58
+           this.visible = true
59
+        },
60
+        hide() {
61
+           this.visible = false
62
+        },
63
+
64
+
65
+    },
66
+
67
+}
68
+</script>
69
+

+ 135 - 0
src/xt_pages/hospitalStation/components/advice.vue View File

@@ -0,0 +1,135 @@
1
+<template>
2
+    <el-dialog
3
+        title="新增医嘱"
4
+        width="1000px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+    >
8
+        <div>
9
+            <el-form :model="form" :rules="rules" class="adviceForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
10
+                <el-form-item class="width50" label="开嘱医生 : " prop="name">
11
+                    张三
12
+                </el-form-item>
13
+                <el-form-item class="width50" label="开嘱时间 : " prop="name">
14
+                    张三
15
+                </el-form-item>
16
+                <el-form-item label="医嘱内容: " prop="name" style="width:100%;">
17
+                    <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"></el-input>
18
+                </el-form-item>
19
+                <el-form-item class="width50" label="药品规格 : " prop="name">
20
+                    <el-input v-model="form.name" placeholder="" style="width:180px;"></el-input>
21
+                    <el-select v-model="value" style="width:180px;margin-left:9px;" placeholder="请选择">
22
+                        <el-option
23
+                        v-for="item in options"
24
+                        :key="item.value"
25
+                        :label="item.label"
26
+                        :value="item.value">
27
+                        </el-option>
28
+                    </el-select>
29
+                </el-form-item>
30
+                <el-form-item class="width50" label="总量 : " prop="name">
31
+                    <el-input v-model="form.name" placeholder="" style="width:180px;"></el-input>
32
+                    <el-select v-model="value" style="width:180px;margin-left:9px;" placeholder="请选择">
33
+                        <el-option
34
+                        v-for="item in options"
35
+                        :key="item.value"
36
+                        :label="item.label"
37
+                        :value="item.value">
38
+                        </el-option>
39
+                    </el-select>
40
+                </el-form-item>
41
+                <el-form-item class="width50" label="每次量 : " prop="name">
42
+                    <el-input v-model="form.name" placeholder="" style="width:180px;"></el-input>
43
+                    <el-select v-model="value" style="width:180px;margin-left:9px;" placeholder="请选择">
44
+                        <el-option
45
+                        v-for="item in options"
46
+                        :key="item.value"
47
+                        :label="item.label"
48
+                        :value="item.value">
49
+                        </el-option>
50
+                    </el-select>
51
+                </el-form-item>
52
+                <el-form-item class="width50" label="用法 : " prop="name">
53
+                    <el-select v-model="value" style="width:100%;" placeholder="请选择">
54
+                        <el-option
55
+                        v-for="item in options"
56
+                        :key="item.value"
57
+                        :label="item.label"
58
+                        :value="item.value">
59
+                        </el-option>
60
+                    </el-select>
61
+                </el-form-item>
62
+                <el-form-item class="width50" label="执行频率 : " prop="name">
63
+                    <el-select v-model="value" style="width:100%;" placeholder="请选择">
64
+                        <el-option
65
+                        v-for="item in options"
66
+                        :key="item.value"
67
+                        :label="item.label"
68
+                        :value="item.value">
69
+                        </el-option>
70
+                    </el-select>
71
+                </el-form-item>
72
+                <el-form-item class="width50" label="天数 : " prop="name">
73
+                    <el-input v-model="form.name" placeholder=""></el-input>
74
+                </el-form-item>
75
+                <el-form-item label="限制说明 : " prop="name" style="width:100%;">
76
+                    <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"></el-input>
77
+                </el-form-item>
78
+            </el-form>
79
+        </div>
80
+        <div slot="footer" class="dialog-footer">
81
+            <el-button @click="hide">取 消</el-button>
82
+            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
83
+        </div>
84
+    </el-dialog>         
85
+</template>
86
+
87
+<script>
88
+export default {
89
+    data(){
90
+        return{
91
+            visible:false,
92
+            form:{
93
+                name:''
94
+            },
95
+        }
96
+    },
97
+    methods:{
98
+        _close: function(done) {
99
+            // this.clear()
100
+            done()
101
+        },
102
+        clear: function() {
103
+            this.form.id = 0;
104
+            this.form.name = "";
105
+            this.form.intro = "";
106
+        },
107
+        show() {
108
+            // this.clear()
109
+            this.visible = true
110
+        },
111
+        hide() {
112
+            // this.clear()
113
+            this.visible = false
114
+        },
115
+    }
116
+}
117
+</script>
118
+
119
+<style lang="scss" scoped>
120
+.adviceForm{
121
+    .width33{
122
+        width:33%;
123
+    }
124
+    .width50{
125
+        width:50%;
126
+    }
127
+    .width100{
128
+        width:100%;
129
+    }
130
+    .el-radio{
131
+        margin-right:2px;
132
+    }
133
+}
134
+</style>
135
+

+ 355 - 0
src/xt_pages/hospitalStation/components/callPrescription.vue View File

@@ -0,0 +1,355 @@
1
+<template>
2
+  <el-dialog
3
+    :title="name"
4
+    :visible.sync="isLastOrNextVisible"
5
+    @close="hide"
6
+    width="1010px"
7
+    class="callPrescription"
8
+    :modal-append-to-body="false"
9
+  >
10
+    <el-date-picker
11
+      v-model="start_time"
12
+      prefix-icon="el-icon-date"
13
+      @change="changeTime"
14
+      :editable="false"
15
+      style="width: 150px;"
16
+      type="date"
17
+      placeholder="选择日期时间"
18
+      align="right"
19
+      format="yyyy-MM-dd"
20
+      value-format="yyyy-MM-dd"
21
+    ></el-date-picker>
22
+    <span class>-</span>
23
+    <el-date-picker
24
+      v-model="end_time"
25
+      prefix-icon="el-icon-date"
26
+      @change="changeEndTime"
27
+      :editable="false"
28
+      style="width: 150px;"
29
+      type="date"
30
+      placeholder="选择日期时间"
31
+      align="right"
32
+      format="yyyy-MM-dd"
33
+      value-format="yyyy-MM-dd"
34
+    ></el-date-picker>
35
+
36
+
37
+    <div v-for="(item,index) in allPrescription" :key="index">
38
+      <div class="quote" v-if="item.prescriptions.length > 0">引用 {{getTime(item.record_date, '{y}年{m}月{d}日')}} 的处方</div>
39
+      <el-checkbox-group v-model="item.check_group">
40
+        <div v-for="(subItem,index2) in item.prescriptions" :key="index2">
41
+          <el-checkbox style="margin:10px 0;" :label="subItem.id">{{'处方' + (index2+ 1)}}</el-checkbox>
42
+          <el-table v-if="subItem.type  == 1" :data="subItem.doctor_advice" border style="width: 99%;"
43
+                    :row-style="{ color: '#303133' }"
44
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
45
+            <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
46
+            <el-table-column align="center" prop="drug_name"  width="160" label="名称">
47
+              <template slot-scope="scope">
48
+                <span>{{ scope.row.advice_name }}</span>
49
+              </template>
50
+            </el-table-column>
51
+
52
+            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
53
+              <template slot-scope="scope">
54
+                <div>{{scope.row.single_dose}}{{scope.row.single_dose_unit}}</div>
55
+              </template>
56
+            </el-table-column>
57
+            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
58
+              <template slot-scope="scope">
59
+                {{scope.row.delivery_way}}
60
+              </template>
61
+            </el-table-column>
62
+            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
63
+              <template slot-scope="scope">
64
+                {{scope.row.execution_frequency}}
65
+              </template>
66
+            </el-table-column>
67
+
68
+            <el-table-column align="center" prop="day" width="60" label="天数">
69
+              <template slot-scope="scope">
70
+                {{scope.row.day}}
71
+              </template>
72
+            </el-table-column>
73
+
74
+            <el-table-column align="center" prop="prescribing_number" width="100" label="总量">
75
+              <template slot-scope="scope">
76
+                <div>{{scope.row.prescribing_number}} {{scope.row.prescribing_number_unit}}</div>
77
+              </template>
78
+            </el-table-column>
79
+            <el-table-column align="center" prop="retail_price" width="80" label="单价">
80
+              <template slot-scope="scope">
81
+                <div>{{scope.row.price}}元</div>
82
+              </template>
83
+            </el-table-column>
84
+            <el-table-column align="center" prop="remark" label="备注">
85
+              <template slot-scope="scope">
86
+                <div>{{scope.row.remark}}</div>
87
+              </template>
88
+            </el-table-column>
89
+          </el-table>
90
+          <el-table v-if="subItem.type == 2" :data="subItem.project" border style="width: 99%;"
91
+                    :row-style="{ color: '#303133' }"
92
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
93
+            <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
94
+            <el-table-column align="center" prop="project_name" width="160" label="名称">
95
+              <template slot-scope="scope">
96
+                <span>{{ scope.row.project.project_name }}</span>
97
+              </template>
98
+            </el-table-column>
99
+            <el-table-column align="center" prop="statistical_classification" width="100" label="组">
100
+              <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
101
+            </el-table-column>
102
+            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
103
+              <template slot-scope="scope">
104
+                <!--<el-input v-model="scope.row.single_dose" placeholder=""></el-input>-->
105
+                <span>{{ scope.row.single_dose }}</span>
106
+
107
+              </template>
108
+            </el-table-column>
109
+            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
110
+              <template slot-scope="scope">
111
+                <!--<el-input v-model="scope.row.delivery_way" placeholder=""></el-input>-->
112
+                <span>{{ scope.row.delivery_way }}</span>
113
+
114
+              </template>
115
+            </el-table-column>
116
+            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
117
+              <template slot-scope="scope">
118
+                <!--<el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>-->
119
+                <span>{{ scope.row.execution_frequency }}</span>
120
+
121
+              </template>
122
+            </el-table-column>
123
+            <el-table-column align="center" prop="number_days" width="70" label="天数">
124
+              <template slot-scope="scope">
125
+                <!--<el-input v-model="scope.row.number_days" placeholder=""></el-input>-->
126
+                <span>{{ scope.row.number_days }}</span>
127
+
128
+              </template>
129
+            </el-table-column>
130
+            <el-table-column align="center" prop="total" width="70" label="总量">
131
+              <template slot-scope="scope">
132
+                <div>{{ scope.row.count }}{{scope.row.unit}}</div>
133
+              </template>
134
+            </el-table-column>
135
+            <el-table-column align="center" prop="name" width="60" label="单价">
136
+              <template slot-scope="scope">
137
+                <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
138
+                <span>{{ scope.row.price }}</span>
139
+
140
+              </template>
141
+            </el-table-column>
142
+            <el-table-column align="center" prop="name" label="备注">
143
+              <template slot-scope="scope">
144
+                <!--<el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>-->
145
+                <span>{{ scope.row.remark }}</span>
146
+
147
+              </template>
148
+            </el-table-column>
149
+          </el-table>
150
+        </div>
151
+      </el-checkbox-group>
152
+
153
+    </div>
154
+
155
+
156
+    <div slot="footer" class="dialog-footer">
157
+      <el-button @click="isLastOrNextVisible = false">取 消</el-button>
158
+      <el-button type="primary" @click="save">保存</el-button>
159
+    </div>
160
+  </el-dialog>
161
+
162
+
163
+</template>
164
+
165
+<script>
166
+  import { uParseTime } from '@/utils/tools'
167
+  import { getDictionaryDataConfig} from "@/utils/data";
168
+
169
+  import {
170
+    getCallHisPrescription
171
+  } from '@/api/his/his'
172
+  export default {
173
+    name: "callPrescription",
174
+    data() {
175
+      return {
176
+        start_time:"",
177
+        end_time:"",
178
+        srcPrescriptions:[],
179
+        name:"",
180
+        request_record_date:'',
181
+        patient_id:0,
182
+        allPrescription: [],
183
+        isLastOrNextVisible: false,
184
+
185
+      }
186
+    }, methods: {
187
+      changeTime(){
188
+        let params={
189
+          patient_id:this.patient_id,
190
+          start_time: this.start_time,
191
+          end_time:this.end_time
192
+        };
193
+        this.GetCallHisPrescription(params)
194
+      },changeEndTime(){
195
+        let params={
196
+          patient_id:this.patient_id,
197
+          start_time: this.start_time,
198
+          end_time:this.end_time
199
+        };
200
+        this.GetCallHisPrescription(params)
201
+      },
202
+      GetCallHisPrescription(params){
203
+        getCallHisPrescription(params).then(response => {
204
+          if (response.data.state == 1) {
205
+            this.allPrescription = response.data.data.prescriptions;
206
+            for (let i = 0; i < this.allPrescription.length; i++){
207
+              this.allPrescription[i].check_group = []
208
+            }
209
+            this.request_record_date = uParseTime(response.data.data.prescriptions[0].record_date, '{y}-{m}-{d}')
210
+          } else {
211
+            this.$message.error(response.data.msg)
212
+
213
+          }
214
+        })
215
+      },
216
+      save() {
217
+        let replace_one = [];
218
+        let replace_two = [];
219
+
220
+        let checkGroup = [];
221
+        let allPrescriptions = [];
222
+        let targetPrescriptions = [];
223
+        let prescriptions = [];
224
+        for (let i = 0; i < this.allPrescription.length; i++) {
225
+          for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
226
+            checkGroup.push(this.allPrescription[i].check_group[a])
227
+          }
228
+          for (let a = 0; a < this.allPrescription[i].prescriptions.length; a++) {
229
+            allPrescriptions.push(this.allPrescription[i].prescriptions[a])
230
+          }
231
+        }
232
+        for (let i = 0; i < allPrescriptions.length; i++){
233
+          for (let a = 0; a < checkGroup.length; a++){
234
+            if(allPrescriptions[i].id == checkGroup[a]){
235
+              targetPrescriptions.push(allPrescriptions[i])
236
+            }
237
+          }
238
+        }
239
+
240
+        if (targetPrescriptions.length > 0) {
241
+          for (let i = 0; i < targetPrescriptions.length; i++) {
242
+            var prescription = targetPrescriptions[i];
243
+            let tempAdvice = [];
244
+            let tempProject = [];
245
+            let tempAddition = [];
246
+            for (let b = 0; b < prescription.doctor_advice.length; b++) {
247
+              let obj = {
248
+                advice_id: 0,
249
+                drug_name: prescription.doctor_advice[b].advice_name,
250
+                single_dose: prescription.doctor_advice[b].single_dose,
251
+                delivery_way: prescription.doctor_advice[b].delivery_way,
252
+                execution_frequency: prescription.doctor_advice[b].execution_frequency,
253
+                retail_price: prescription.doctor_advice[b].price.toString(),
254
+                remark: prescription.doctor_advice[b].remark,
255
+                day:prescription.doctor_advice[b].day,
256
+                prescribing_number:prescription.doctor_advice[b].prescribing_number.toString(),
257
+                single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
258
+                prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
259
+                medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
260
+                id:prescription.doctor_advice[b].drug_id
261
+              };
262
+              tempAdvice.push(obj)
263
+
264
+            }
265
+
266
+
267
+            for (let b = 0; b < prescription.project.length; b++) {
268
+              let obj = {
269
+                id: 0,
270
+                project_id: prescription.project[b].project_id,
271
+                project_name: prescription.project[b].project.project_name,
272
+                statistical_classification: prescription.project[b].project.statistical_classification,
273
+                single_dose: prescription.project[b].single_dose,
274
+                delivery_way: prescription.project[b].delivery_way,
275
+                execution_frequency: prescription.project[b].execution_frequency,
276
+                number_days: prescription.project[b].day,
277
+                total:prescription.project[b].count,
278
+                price:prescription.project[b].price,
279
+                remark:prescription.project[b].remark,
280
+                medical_code:prescription.project[b].project.medical_code,
281
+              };
282
+              tempProject.push(obj)
283
+            }
284
+            let obj = {
285
+              id: 0,
286
+              advices: tempAdvice,
287
+              project: tempProject,
288
+              addition:tempAddition,
289
+              type:prescription.type,
290
+              order_status:0,
291
+            };
292
+            prescriptions.push(obj)
293
+          }
294
+        }
295
+
296
+        if(this.srcPrescriptions.length == 1){
297
+          if(this.srcPrescriptions[0].advices.length == 0 && this.srcPrescriptions[0].project.length == 0){
298
+            this.srcPrescriptions = [];
299
+            this.srcPrescriptions = prescriptions;
300
+            this.$emit('call', this.srcPrescriptions)
301
+          }else{
302
+
303
+            this.srcPrescriptions =  this.srcPrescriptions.concat(prescriptions);
304
+            this.$emit('call', this.srcPrescriptions)
305
+          }
306
+        }else{
307
+          this.srcPrescriptions =  this.srcPrescriptions.concat(prescriptions);
308
+          this.$emit('call', this.srcPrescriptions)
309
+        }
310
+      },show(name,id,end_time, start_time,srcPrescriptions,prescriptions){
311
+        this.srcPrescriptions = srcPrescriptions;
312
+        this.start_time  = start_time;
313
+        this.end_time = end_time;
314
+        this.patient_id = id;
315
+        this.name = '处方调用' + '('+name +')';
316
+        this.allPrescription = prescriptions;
317
+        for (let i = 0; i < this.allPrescription.length; i++){
318
+          this.allPrescription[i].check_group = []
319
+        }
320
+        this.isLastOrNextVisible = true
321
+      },close(){
322
+        this.isLastOrNextVisible = false
323
+      },hide(){
324
+        this.$emit('callCancel')
325
+
326
+      },getTime(time, template){
327
+        return uParseTime(time,template)
328
+
329
+      }, getGroup(id){
330
+        var name = "";
331
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category');
332
+        for(let i=0;i<statistics_category.length;i++){
333
+          if(id == statistics_category[i].id){
334
+            name = statistics_category[i].name
335
+          }
336
+        }
337
+        return name
338
+      },   getDictionaryDataConfig(module, filed_name) {
339
+        return getDictionaryDataConfig(module, filed_name)
340
+      },
341
+    }
342
+  }
343
+</script>
344
+
345
+<style lang="scss">
346
+.callPrescription{
347
+  .el-dialog__body{
348
+    padding:0px 20px 30px;
349
+  }
350
+  .quote{
351
+    margin-top: 10px;
352
+    font-size: 14px;
353
+  }
354
+}
355
+</style>

+ 257 - 0
src/xt_pages/hospitalStation/components/chargeDialog.vue View File

@@ -0,0 +1,257 @@
1
+<template>
2
+  <el-dialog width="854px" title="收费单" class="chargeDialog" :visible.sync="visibility" :close-on-click-modal="isClose"
3
+             :close-on-press-escape="isClose">
4
+
5
+    <el-form :model="form"  ref="formValue" label-width="100px">
6
+
7
+      <el-form-item label="日期:" style="width:100%;">
8
+        <div>{{record_date}}</div>
9
+      </el-form-item>
10
+
11
+      <el-form-item label="总计:" prop="name" :validate-event="is_Name" style="width:33%;">
12
+        <el-input type="number" v-model="form.total" :disabled="true"></el-input>
13
+      </el-form-item>
14
+      <el-form-item label="医保:" prop="name" :validate-event="is_Name" style="width:33%;">
15
+        <el-input type="number" v-model="form.medical_insurance_price" :disabled="true"></el-input>
16
+      </el-form-item>
17
+
18
+
19
+      <el-form-item label="自费:" prop="age" :validate-event="is_Name" style="width:33%;">
20
+        <el-input type="number" v-model="form.private_price" :disabled="true"></el-input>
21
+      </el-form-item>
22
+
23
+
24
+      <el-form-item label="支付方式:" style="width:100%;">
25
+        <!-- <el-select v-model="form.pay_way" placeholder="请选择">
26
+          <el-option
27
+            v-for="(item,index) in payWays"
28
+            :key="index"
29
+            :label="item.label"
30
+            :value="item.value">
31
+          </el-option>
32
+        </el-select> -->
33
+        <el-radio-group v-model="form.pay_way">
34
+          <el-radio :label="index" v-for="(item,index) in payWays" :key="index">{{ item.label }}</el-radio>
35
+        </el-radio-group>
36
+      </el-form-item>
37
+
38
+
39
+      <el-form-item label="付款金额:" prop="id_card" :validate-event="is_Name">
40
+        <el-input type="number" v-model="form.pay_price" :disabled="true"></el-input>
41
+      </el-form-item>
42
+
43
+
44
+      <el-form-item label="付款卡号:" prop="id_card" :validate-event="is_Name">
45
+        <el-input v-model="form.pay_card_no"></el-input>
46
+      </el-form-item>
47
+
48
+      <el-form-item class="specialFormItem" label="折扣金额:">
49
+        <div style="display:flex;">
50
+          <el-input v-model="form.discount_price" :disabled="form.preferential_price != 0" @change="changeDiscountPrice"></el-input>
51
+        </div>
52
+      </el-form-item>
53
+      <el-form-item class="specialFormItem" label="优惠金额:">
54
+        <div style="display:flex;">
55
+          <el-input v-model="form.preferential_price" :disabled="form.discount_price != 0" @change="changePreferentialPrice"></el-input>
56
+        </div>
57
+      </el-form-item>
58
+      <el-form-item label="实收金额:">
59
+        <div style="display:flex;">
60
+          <el-input v-model="form.reality_price" @change="realityPrice"></el-input>
61
+        </div>
62
+      </el-form-item>
63
+      <el-form-item label="找回金额:">
64
+        <div style="display:flex;">
65
+          <el-input v-model.number="form.found_price"></el-input>
66
+        </div>
67
+      </el-form-item>
68
+
69
+      <el-form-item label="发票编码:">
70
+        <div style="display:flex;">
71
+          <el-input v-model.number="form.fapiao_code"></el-input>
72
+        </div>
73
+      </el-form-item>
74
+
75
+
76
+      <el-form-item label="发票号码:">
77
+        <div style="display:flex;">
78
+          <el-input v-model.number="form.fapiao_number"></el-input>
79
+        </div>
80
+      </el-form-item>
81
+
82
+    </el-form>
83
+
84
+    <span slot="footer" class="dialog-footer">
85
+    <el-button v-loading="loadingtwo" @click="cancel('formValue')">取 消</el-button>
86
+    <el-button v-loading="loadingtwo" type="primary" @click="confirm('formValue')">确 定</el-button>
87
+  </span>
88
+  </el-dialog>
89
+
90
+</template>
91
+
92
+<script>
93
+  import { uParseTime } from '@/utils/tools'
94
+
95
+  export default {
96
+    name: 'chargeDialog',
97
+
98
+    data() {
99
+
100
+      return {
101
+        record_date:'',
102
+        form: {
103
+          medical_insurance_price:0,
104
+          private_price:'',
105
+          pay_way:'',
106
+          pay_price:'',
107
+          pay_card_no:'',
108
+          discount_price:'',
109
+          preferential_price:'',
110
+          reality_price:'',
111
+          found_price:'',
112
+          total:0,
113
+          fapiao_code:"",
114
+          fapiao_number:""
115
+
116
+
117
+        },
118
+        payWays: [
119
+          {value: 1, label: '现金'},
120
+          {value: 2, label: '银行卡'},
121
+          {value: 3, label: '微信'},
122
+          {value: 4, label: '支付宝'},
123
+        ],
124
+        total:"",
125
+
126
+        visibility: false,
127
+        labelPosition: 'right',
128
+        isClose: false,
129
+
130
+        resetForm: {
131
+          medical_insurance_price:'',
132
+          private_price:'',
133
+          pay_way:'',
134
+          pay_price:'',
135
+          pay_card_no:'',
136
+          discount_price:'',
137
+          preferential_price:'',
138
+          reality_price:'',
139
+          found_price:'',
140
+          fapiao_code:"",
141
+          fapiao_number:""
142
+        },
143
+
144
+      }
145
+    },
146
+    props: {
147
+
148
+      titles: {
149
+        type: String,
150
+        default: ''
151
+      },
152
+      formValue: {
153
+        type: Object
154
+      },
155
+      type: {
156
+        type: Number,
157
+        default: 1
158
+
159
+      },
160
+      isCreated: {
161
+        type: Number,
162
+        default: 1
163
+
164
+      }
165
+    },
166
+    methods: {
167
+      show: function (total) {
168
+        this.total = total;
169
+        this.form.private_price = total;
170
+        this.form.pay_price = total;
171
+        this.form.total = total + this.form.medical_insurance_price;
172
+        this.form.discount_price = 0.0;
173
+        this.form.preferential_price = 0.0;
174
+
175
+        this.form.fapiao_code ="";
176
+        this.form.fapiao_number = "";
177
+
178
+
179
+
180
+        this.visibility = true
181
+
182
+      }, hide: function () {
183
+        this.form = Object.assign({}, this.resetForm);
184
+        this.loadingtwo = false;
185
+        this.visibility = false
186
+      }, cancel: function (formName) {
187
+        this.$emit('cancel', this.getValue());
188
+        this.$refs['formValue'].resetFields()
189
+      },
190
+      confirm: function (formName) {
191
+        this.$refs['formValue'].validate((valid) => {
192
+          if (valid) {
193
+            let value = {};
194
+            value = this.getValue();
195
+            this.$emit('confirm', value);
196
+            this.loadingtwo = true
197
+          }
198
+        })
199
+      },
200
+      getValue: function () {
201
+        let form = {};
202
+        form = this.form;
203
+        return form
204
+      },
205
+      realityPrice(val){
206
+        if(val < (this.form.total - this.form.discount_price - this.form.preferential_price)){
207
+          this.$message.error('实收金额不能小于收费金额');
208
+          return
209
+        }
210
+        this.form.found_price = parseInt(val) - parseInt(this.form.total) + parseInt(this.form.discount_price) + parseInt(this.form.preferential_price)
211
+      },
212
+      changeDiscountPrice(val){
213
+        if(val > this.form.total){
214
+          this.$message.error('折扣金额不能超过费用总额');
215
+          return
216
+        }
217
+        this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.preferential_price)
218
+      },
219
+      changePreferentialPrice(val){
220
+        if(val > this.form.total){
221
+          this.$message.error('优惠金额不能超过费用总额');
222
+          return
223
+        }
224
+        this.form.reality_price = parseInt(this.form.total) - parseInt(val) - parseInt(this.form.discount_price)
225
+      }
226
+    },mounted() {
227
+      var nowDate = new Date();
228
+      var nowYear = nowDate.getFullYear();
229
+      var nowMonth = nowDate.getMonth() + 1;
230
+      var nowDay = nowDate.getDate();
231
+
232
+      var nowHours = nowDate.getHours();
233
+      var nowMin = nowDate.getMinutes();
234
+      var nowSecond = nowDate.getSeconds();
235
+
236
+      this.record_date =
237
+        nowYear +
238
+        '-' +
239
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
240
+        '-' +
241
+        (nowDay < 10 ? '0' + nowDay : nowDay)+" "+(nowHours < 10 ? '0' + nowHours : nowHours)+":"+(nowMin < 10 ? '0' + nowMin : nowMin)
242
+    }
243
+
244
+  }
245
+</script>
246
+
247
+<style lang="scss" scoped>
248
+.chargeDialog{
249
+  .el-form{
250
+    display: flex;
251
+    flex-wrap: wrap;
252
+  }
253
+  .el-form-item{
254
+    width:50%;
255
+  }
256
+}
257
+</style>

+ 208 - 0
src/xt_pages/hospitalStation/components/chargeMonthPrescriptionTable.vue View File

@@ -0,0 +1,208 @@
1
+<template>
2
+  <div class="prescriptionTable">
3
+    <el-table v-if="prescription.type == 1" :data="prescription.advices" border style="width: 99%;"
4
+              :row-style="{ color: '#303133' }"
5
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7
+      <el-table-column align="center" prop="name" label="名称">
8
+        <template slot-scope="scope"><span :title='scope.row.drug_name'>{{ scope.row.drug_name }}</span></template>
9
+      </el-table-column>
10
+
11
+      <el-table-column align="center" prop="name" width="90" label="单次用量">
12
+        <template slot-scope="scope">
13
+          <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
14
+          <div>{{scope.row.single_dose}}&nbsp;&nbsp;{{scope.row.single_dose_unit}}</div>
15
+        </template>
16
+      </el-table-column>
17
+      <el-table-column align="center" prop="name" width="100" label="用法">
18
+        <template slot-scope="scope">
19
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
20
+          <div> {{scope.row.delivery_way}}</div>
21
+
22
+        </template>
23
+      </el-table-column>
24
+      <el-table-column align="center" prop="name" width="100" label="频率">
25
+        <template slot-scope="scope">
26
+          <div> {{scope.row.execution_frequency}}</div>
27
+
28
+          <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
29
+        </template>
30
+      </el-table-column>
31
+
32
+      <el-table-column align="center" prop="day" width="50" label="天数">
33
+        <template slot-scope="scope">{{scope.row.day}}天</template>
34
+      </el-table-column>
35
+
36
+      <el-table-column align="center" prop="name" width="100" label="总量">
37
+        <template slot-scope="scope">
38
+          <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
39
+          <div>{{scope.row.prescribing_number}}&nbsp;&nbsp;{{scope.row.prescribing_number_unit}}</div>
40
+        </template>
41
+      </el-table-column>
42
+      <el-table-column align="center" prop="name" width="60" label="单价">
43
+        <template slot-scope="scope">
44
+          <div> {{scope.row.retail_price}}元</div>
45
+
46
+          <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
47
+        </template>
48
+      </el-table-column>
49
+      <el-table-column align="center" prop="name" width="50" label="备注">
50
+        <template slot-scope="scope">
51
+          <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
52
+          <div> {{scope.row.remark}}</div>
53
+        </template>
54
+      </el-table-column>
55
+    </el-table>
56
+    <el-table v-if="prescription.type == 2" :data="prescription.project" border style="width: 99%;"
57
+              :row-style="{ color: '#303133' }"
58
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
59
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
60
+      <el-table-column align="center" prop="project_name" label="名称">
61
+        <template slot-scope="scope">{{ scope.row.project_name }}</template>
62
+      </el-table-column>
63
+      <el-table-column align="center" prop="statistical_classification" width="100" label="组">
64
+        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
65
+      </el-table-column>
66
+      <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
67
+        <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>
68
+
69
+      </el-table-column>
70
+      <el-table-column align="center" prop="delivery_way" width="80" label="用法">
71
+        <template slot-scope="scope">
72
+          <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
73
+          {{scope.row.delivery_way}}
74
+
75
+        </template>
76
+      </el-table-column>
77
+      <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
78
+        <template slot-scope="scope">
79
+          <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
80
+          {{scope.row.execution_frequency}}
81
+
82
+        </template>
83
+      </el-table-column>
84
+      <el-table-column align="center" prop="number_days" width="50" label="天数">
85
+        <template slot-scope="scope">
86
+          <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
87
+          {{scope.row.number_days}}天
88
+
89
+        </template>
90
+
91
+      </el-table-column>
92
+      <el-table-column align="center" prop="total" width="50" label="总量">
93
+        <template slot-scope="scope">
94
+          <div style="display:flex;">
95
+            <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
96
+            {{scope.row.total}}
97
+
98
+            <div>{{scope.row.unit}}</div>
99
+
100
+          </div>
101
+        </template>
102
+      </el-table-column>
103
+      <el-table-column align="center" prop="name" width="50" label="单价">
104
+        <template slot-scope="scope">
105
+          <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
106
+          {{scope.row.price}}元
107
+
108
+        </template>
109
+      </el-table-column>
110
+      <el-table-column align="center" prop="name" width="50" label="备注">
111
+        <template slot-scope="scope">
112
+          <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
113
+          {{scope.row.remark}}
114
+
115
+        </template>
116
+      </el-table-column>
117
+    </el-table>
118
+
119
+    <div class="additionalBox">
120
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
121
+        <span :title="item.item_name">{{item.item_name}}</span>
122
+        <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
123
+        共
124
+        <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
125
+        次
126
+        <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
127
+      </div>
128
+    </div>
129
+  </div>
130
+</template>
131
+
132
+<script>
133
+  import { getInitData } from '@/api/his/his'
134
+  import { getDictionaryDataConfig} from "@/utils/data";
135
+
136
+  export default {
137
+    props: {
138
+      prescription: Object
139
+    },
140
+    data() {
141
+      return {
142
+        drugways: [],
143
+        efs: []
144
+      }
145
+    }, mounted() {
146
+      getInitData().then(response => {
147
+        if (response.data.state == 0) {
148
+          this.$message.error(response.data.msg);
149
+          return false
150
+        } else {
151
+          this.drugways = response.data.data.drugways;
152
+          this.efs = response.data.data.efs
153
+        }
154
+      })
155
+    }, methods:  {
156
+
157
+
158
+      getGroup(id){
159
+        var name = "";
160
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category');
161
+        console.log("2235",statistics_category);
162
+        for(let i=0;i<statistics_category.length;i++){
163
+          if(id == statistics_category[i].id){
164
+            name = statistics_category[i].name
165
+          }
166
+        }
167
+        return name
168
+      },
169
+
170
+
171
+    }
172
+  }
173
+</script>
174
+
175
+<style lang="scss">
176
+  .prescriptionTable{
177
+  .additionalBox{
178
+    margin-top: 20px;
179
+    display: flex;
180
+    flex-wrap: wrap;
181
+  .additionalOne{
182
+    margin-right:20px;
183
+    margin-bottom:10px;
184
+    display: flex;
185
+    align-items: center;
186
+  >span{
187
+    white-space: nowrap;
188
+    overflow: hidden;
189
+    text-overflow: ellipsis;
190
+    width:80px;
191
+    display: inline-block;
192
+    font-size: 14px;
193
+  }
194
+  }
195
+  .deleteIcon{
196
+    color:red;
197
+    margin-left:5px;
198
+  }
199
+  }
200
+  .el-table th .cell, .el-table td .cell{
201
+    padding: 0 2px;
202
+    white-space: pre-line;
203
+  }
204
+  .el-icon-delete{
205
+    color:red;
206
+  }
207
+  }
208
+</style>

+ 166 - 0
src/xt_pages/hospitalStation/components/charged.vue View File

@@ -0,0 +1,166 @@
1
+<template>
2
+    <div style="display:flex;">
3
+        <div class="noChargeLeft">
4
+            <div class="mainCell" style="margin-bottom:10px;">
5
+                <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
6
+                <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
7
+            </div>
8
+            <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
9
+                <el-table-column align="center" prop="name" label="处方号" width="100">
10
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
11
+                </el-table-column>
12
+                <el-table-column align="center" prop="name" label="姓名" width="99">
13
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
14
+                </el-table-column>
15
+            </el-table>
16
+        </div>
17
+        <div style="flex:1;overflow-x: hidden;">
18
+            <div class="noChargeRight">
19
+                <div class="chargeInfo">
20
+                    <p>姓名:<span></span></p>
21
+                    <p>性别:<span></span></p>
22
+                    <p>年龄:<span></span></p>
23
+                    <p>证件号:<span></span></p>
24
+                    <p>挂号类型:<span></span></p>
25
+                    <p>上一个发票号:<span></span></p>
26
+                    <p>下一个发票号:<span></span></p>
27
+                </div>
28
+                <div class="chargeBox">
29
+                    <p>医疗费用总额:<span></span></p>
30
+                    <p>基金支付金额:<span></span></p>
31
+                    <p>个人账户支付金额:<span></span></p>
32
+                    <p>个人支付金额:<span></span></p>
33
+                    <p>个人账号金额:<span></span></p>
34
+                </div>
35
+                <p class='chargeTitle'>药品信息</p>
36
+                <el-table :data="tableData" border height="200" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
37
+                    <el-table-column align="center" prop="name" label="名称">
38
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
39
+                    </el-table-column>
40
+                    <el-table-column align="center" prop="name" label="单位">
41
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
42
+                    </el-table-column>
43
+                    <el-table-column align="center" prop="name" label="单价(元)">
44
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
45
+                    </el-table-column>
46
+                    <el-table-column align="center" prop="name" label="数量">
47
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
48
+                    </el-table-column>
49
+                    <el-table-column align="center" prop="name" label="总价">
50
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
51
+                    </el-table-column>
52
+                    <el-table-column align="center" prop="name" label="自付比例">
53
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
54
+                    </el-table-column>
55
+                </el-table>
56
+                <p class='chargeTitle'>项目信息</p>
57
+                <el-table :data="tableData" border height="200" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
58
+                    <el-table-column align="center" prop="name" label="名称">
59
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
60
+                    </el-table-column>
61
+                    <el-table-column align="center" prop="name" label="科室">
62
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
63
+                    </el-table-column>
64
+                    <el-table-column align="center" prop="name" label="单价(元)">
65
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
66
+                    </el-table-column>
67
+                    <el-table-column align="center" prop="name" label="数量">
68
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
69
+                    </el-table-column>
70
+                    <el-table-column align="center" prop="name" label="总价">
71
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
72
+                    </el-table-column>
73
+                    <el-table-column align="center" prop="name" label="自付比例">
74
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
75
+                    </el-table-column>
76
+                </el-table>
77
+                <div class='chargeBtn'>
78
+                    <p>总金额:0元</p>
79
+                    <div>
80
+                        <el-button>收费清单打印</el-button>
81
+                        <el-button type="primary">处方查询</el-button>
82
+                        <el-button type="danger">退费</el-button>
83
+                    </div>
84
+                </div>
85
+            </div>
86
+        </div>
87
+    </div>
88
+</template>
89
+
90
+<script>
91
+export default {
92
+    data(){
93
+        return{
94
+            tableData: [{
95
+            date: '2016-05-02',
96
+            name: '王小虎',
97
+            address: '上海市普陀区金沙江路 1518 弄'
98
+            }, {
99
+            date: '2016-05-04',
100
+            name: '王小虎',
101
+            address: '上海市普陀区金沙江路 1517 弄'
102
+            }, {
103
+            date: '2016-05-01',
104
+            name: '王小虎',
105
+            address: '上海市普陀区金沙江路 1519 弄'
106
+            }, {
107
+            date: '2016-05-03',
108
+            name: '王小虎',
109
+            address: '上海市普陀区金沙江路 1516 弄'
110
+            }]
111
+        }
112
+    }
113
+}
114
+</script>
115
+
116
+
117
+<style lang="scss" scoped>
118
+.noChargeLeft{
119
+    width:200px;
120
+    .mainCell{
121
+        display: flex;
122
+    }
123
+}
124
+.noChargeRight{
125
+    margin-left:20px;
126
+    // flex: 1;
127
+    .chargeInfo{
128
+        display: flex;
129
+        justify-content: space-between;
130
+        align-items: center;
131
+        height: 32px;
132
+        margin-bottom: 10px;
133
+        >p{
134
+            display: flex;
135
+        }
136
+        >p>span{
137
+            display: inline-block;
138
+            min-width: 50px;
139
+        }
140
+    }
141
+    .chargeBox{
142
+        height:42px;
143
+        border: 1px solid #EBEEF5;
144
+        display: flex;
145
+        justify-content: space-between;
146
+        background-color: rgb(245, 247, 250);
147
+        color: rgb(96, 98, 102);
148
+        align-items: center;
149
+        padding: 0 20px;
150
+        >p>span{
151
+            display: inline-block;
152
+            min-width: 50px;
153
+        }
154
+    }
155
+    .chargeTitle{
156
+        line-height: 32px;
157
+        height: 32px;
158
+    }
159
+    .chargeBtn{
160
+        display: flex;
161
+        justify-content: space-between;
162
+        align-items: center;
163
+        margin-top: 20px;
164
+    }
165
+}
166
+</style>

+ 425 - 0
src/xt_pages/hospitalStation/components/dayPrescriptionTable.vue View File

@@ -0,0 +1,425 @@
1
+<template>
2
+  <div class="prescriptionTable">
3
+    <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
4
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
6
+      <el-table-column align="center" prop="drug_name" label="名称">
7
+        <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
8
+      </el-table-column>
9
+
10
+      <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
11
+        <template slot-scope="scope">
12
+          <div style="display:flex;align-items:center;">
13
+            <el-input v-model="scope.row.single_dose" style="width:65%;"></el-input>
14
+            <div>{{scope.row.single_dose_unit}}</div>
15
+          </div>
16
+        </template>
17
+      </el-table-column>
18
+      <el-table-column align="center" prop="delivery_way" width="100" label="用法">
19
+        <template slot-scope="scope">
20
+          <el-select v-model="scope.row.delivery_way" placeholder="请选择">
21
+            <el-option
22
+              v-for="(item,index) in drugways"
23
+              :key="index"
24
+              :label="item.name"
25
+              :value="item.name">
26
+            </el-option>
27
+          </el-select>
28
+        </template>
29
+      </el-table-column>
30
+      <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
31
+        <template slot-scope="scope">
32
+          <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
33
+            <el-option
34
+              v-for="item,index in efs"
35
+              :key="index"
36
+              :label="item.name"
37
+              :value="item.name">
38
+            </el-option>
39
+          </el-select>
40
+        </template>
41
+      </el-table-column>
42
+
43
+
44
+      <el-table-column align="center" prop="day" width="50" label="天数">
45
+        <template slot-scope="scope">
46
+          <el-input v-model="scope.row.day" placeholder=""></el-input>
47
+          <div>{{'天'}}</div>
48
+        </template>
49
+      </el-table-column>
50
+
51
+      <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
52
+        <template slot-scope="scope">
53
+          <div style="display:flex;align-items:center;">
54
+            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
55
+            <div> {{scope.row.prescribing_number_unit}}</div>
56
+          </div>
57
+        </template>
58
+      </el-table-column>
59
+      <el-table-column align="center" prop="retail_price" width="60" label="单价">
60
+        <template slot-scope="scope">
61
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
62
+          <div>{{'元'}}</div>
63
+
64
+        </template>
65
+      </el-table-column>
66
+      <el-table-column align="center" prop="remark" width="50" label="备注">
67
+        <template slot-scope="scope">
68
+          <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
69
+        </template>
70
+      </el-table-column>
71
+      <el-table-column align="center" width="40" prop="name" label="操作">
72
+        <template slot-scope="scope">
73
+          <i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>
74
+        </template>
75
+      </el-table-column>
76
+    </el-table>
77
+
78
+    <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
79
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
80
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
81
+      <el-table-column align="center" prop="project_name" label="名称">
82
+        <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
83
+      </el-table-column>
84
+      <el-table-column align="center" prop="statistical_classification" width="100" label="组">
85
+        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
86
+      </el-table-column>
87
+      <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
88
+        <template slot-scope="scope">
89
+          <el-input v-model="scope.row.single_dose" placeholder=""></el-input>
90
+          <div>{{scope.row.unit}}</div>
91
+
92
+        </template>
93
+      </el-table-column>
94
+      <el-table-column align="center" prop="delivery_way" width="80" label="用法">
95
+        <template slot-scope="scope">
96
+          <el-autocomplete
97
+            style="width:100%;"
98
+            class="inline-input"
99
+            v-model="scope.row.delivery_way"
100
+            :fetch-suggestions="querySearch2"
101
+            placeholder="请输入内容"
102
+          ></el-autocomplete>
103
+        </template>
104
+      </el-table-column>
105
+      <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
106
+        <template slot-scope="scope">
107
+          <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
108
+        </template>
109
+      </el-table-column>
110
+      <el-table-column align="center" prop="number_days" width="50" label="天数">
111
+        <template slot-scope="scope">
112
+          <el-input v-model="scope.row.number_days" placeholder=""></el-input>
113
+          <div>{{'天'}}</div>
114
+        </template>
115
+      </el-table-column>
116
+      <el-table-column align="center" prop="total" width="70" label="总量">
117
+        <template slot-scope="scope">
118
+          <div style="display:flex;align-items:center;">
119
+            <el-input v-model="scope.row.total" style="width:60%" placeholder=""></el-input>
120
+            <div>{{scope.row.unit}}</div>
121
+
122
+          </div>
123
+        </template>
124
+      </el-table-column>
125
+      <el-table-column align="center" prop="name" width="50" label="单价">
126
+        <template slot-scope="scope">
127
+          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
128
+          <div>{{'元'}}</div>
129
+
130
+        </template>
131
+      </el-table-column>
132
+      <el-table-column align="center" prop="name" width="50" label="备注">
133
+        <template slot-scope="scope">
134
+          <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
135
+        </template>
136
+      </el-table-column>
137
+      <el-table-column align="center" width="40" prop="name" label="操作">
138
+        <template slot-scope="scope">
139
+          <i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>
140
+        </template>
141
+      </el-table-column>
142
+    </el-table>
143
+
144
+    <div class="additionalBox">
145
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
146
+        <span :title="item.item_name">{{item.item_name}}</span>
147
+        <el-input v-model="item.price" placeholder="" style="width:50px;"></el-input>
148
+        共
149
+        <el-input v-model="item.count" placeholder="" style="width:50px;"></el-input>
150
+        次
151
+        <i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>
152
+      </div>
153
+    </div>
154
+  </div>
155
+</template>
156
+
157
+<script>
158
+  import { getDictionaryDataConfig} from "@/utils/data";
159
+  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
160
+
161
+  export default {
162
+    props: {
163
+      preDrugs: Array,
164
+      activeType: Number,
165
+      addtions_charge:Array,
166
+      prescription:{
167
+        type:Object,
168
+        default: function () {
169
+          return {
170
+            name:"",
171
+            advices:[],
172
+            project:[],
173
+            drugways:[],
174
+            efs:[],
175
+          };
176
+        }
177
+      },
178
+    },
179
+    data() {
180
+      return {
181
+        advices:[],
182
+        tableData: [],
183
+        newoptions: [{
184
+          value: '1',
185
+          label: '1'
186
+        }, {
187
+          value: '2',
188
+          label: '2'
189
+        }, {
190
+          value: '3',
191
+          label: '3'
192
+        }, {
193
+          value: '4',
194
+          label: '4'
195
+        }, {
196
+          value: '5',
197
+          label: '5'
198
+        }],
199
+        value: '1',
200
+        input: 1,
201
+      }
202
+    },
203
+    methods:{
204
+      createFilter(queryString) {
205
+        return (restaurant) => {
206
+          return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
207
+        }
208
+      },
209
+      querySearch2(queryString, cb) {
210
+        var restaurants = this.getDictionaryDataConfig("system","project_use");
211
+        restaurants.map(item => {
212
+          item.value = item.name
213
+        });
214
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
215
+        // 调用 callback 返回建议列表的数据
216
+        cb(results)
217
+      },
218
+      delAddition(index, addition){
219
+        if(this.prescription.order_status == 2){
220
+          this.$message.error('该处方已经结算,无法删除');
221
+          return
222
+        }
223
+        this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
224
+          confirmButtonText: "确 定",
225
+          cancelButtonText: "取 消",
226
+          type: "warning"
227
+        }).then(() => {
228
+          this.$nextTick(function(){
229
+            if(addition.id == 0){
230
+              this.prescription.addition.splice(index, 1)
231
+            }else{
232
+              let params = {
233
+                'id': addition.id,
234
+              };
235
+              delHisAddition(params).then(response => {
236
+                if (response.data.state == 0) {
237
+                  this.$message.error(response.data.msg);
238
+                  return false
239
+                } else {
240
+                  var temp2 = this.deepClone(this.prescription.addition);
241
+                  temp2.splice(index, 1);
242
+                  this.prescription.addition = temp2;
243
+                  this.$message.success(response.data.data.msg)
244
+                }
245
+              })
246
+            }
247
+          });
248
+
249
+        })
250
+          .catch(() => {});
251
+
252
+      },
253
+      getInitData(){
254
+        getInitData().then(response => {
255
+          if (response.data.state == 0) {
256
+            this.$message.error(response.data.msg);
257
+            return false
258
+          } else {
259
+            this.drugways = response.data.data.drugways;
260
+            this.efs = response.data.data.efs
261
+          }
262
+        })
263
+
264
+      },deleteDrug:function(index, row){
265
+        if(this.prescription.order_status == 2){
266
+          this.$message.error('该处方已经结算,无法删除');
267
+          return
268
+        }
269
+        this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
270
+          confirmButtonText: "确 定",
271
+          cancelButtonText: "取 消",
272
+          type: "warning"
273
+        }).then(() => {
274
+          this.$nextTick(function(){
275
+            if(row.advice_id == 0){
276
+              this.prescription.advices.splice(index, 1)
277
+            }else{
278
+              let params = {
279
+                'id': row.advice_id,
280
+              };
281
+              delHisAdvice(params).then(response => {
282
+                if (response.data.state == 0) {
283
+                  this.$message.error(response.data.msg);
284
+                  return false
285
+                } else {
286
+                  var temp2 = this.deepClone(this.prescription.advices);
287
+                  temp2.splice(index, 1);
288
+                  this.prescription.advices = temp2;
289
+                  this.$message.success(response.data.data.msg)
290
+                }
291
+              })
292
+
293
+
294
+            }
295
+
296
+          });
297
+
298
+
299
+        })
300
+          .catch(() => {});
301
+
302
+
303
+
304
+
305
+
306
+      },deepClone(source) {
307
+        if (!source && typeof source !== 'object') {
308
+          throw new Error('error arguments', 'shallowClone')
309
+        }
310
+        const targetObj = source.constructor === Array ? [] : {};
311
+        Object.keys(source).forEach((keys) => {
312
+          if (source[keys] && typeof source[keys] === 'object') {
313
+            targetObj[keys] = this.deepClone(source[keys])
314
+          } else {
315
+            targetObj[keys] = source[keys]
316
+          }
317
+        });
318
+        return targetObj
319
+      },
320
+
321
+      setNewData:function(data){
322
+        this.prescription = data
323
+
324
+        // this.prescription.advices = data.advices
325
+      },
326
+      getDictionaryDataConfig(module, filed_name) {
327
+        return getDictionaryDataConfig(module, filed_name)
328
+      },
329
+      getGroup(id){
330
+        var name = "";
331
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category');
332
+        console.log("2235",statistics_category);
333
+        for(let i=0;i<statistics_category.length;i++){
334
+          if(id == statistics_category[i].id){
335
+            name = statistics_category[i].name
336
+          }
337
+        }
338
+        return name
339
+      },
340
+      deleteProject(row,i){
341
+        if(this.prescription.order_status == 2){
342
+          this.$message.error('该处方已经结算,无法删除');
343
+          return
344
+        }
345
+        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
346
+          confirmButtonText: "确 定",
347
+          cancelButtonText: "取 消",
348
+          type: "warning"
349
+        }).then(() => {
350
+          if(row.id == 0){
351
+            this.prescription.project.splice(i, 1)
352
+
353
+          }else{
354
+            let params = {
355
+              'id': row.id,
356
+            };
357
+            delHisProject(params).then(response => {
358
+              if (response.data.state == 0) {
359
+                this.$message.error(response.data.msg);
360
+                return false
361
+              } else {
362
+                for (let i = 0; i < this.prescription.project.length; i++){
363
+                  if(this.prescription.project[i].id == row.id){
364
+                    this.prescription.project.splice(i, 1)
365
+                  }
366
+                }
367
+                this.$message.success(response.data.data.msg)
368
+              }
369
+            })
370
+          }
371
+        })
372
+          .catch(() => {});
373
+
374
+      },
375
+    },mounted(){
376
+      this.getInitData()
377
+    },
378
+  }
379
+</script>
380
+
381
+<style lang="scss">
382
+  .prescriptionTable {
383
+
384
+  .el-input__inner {
385
+    padding: 0 5px;
386
+  }
387
+
388
+  .additionalBox {
389
+    margin-top: 20px;
390
+    display: flex;
391
+    flex-wrap: wrap;
392
+
393
+  .additionalOne {
394
+    margin-right: 20px;
395
+    margin-bottom: 10px;
396
+    display: flex;
397
+    align-items: center;
398
+
399
+  > span {
400
+    white-space: nowrap;
401
+    overflow: hidden;
402
+    text-overflow: ellipsis;
403
+    width: 80px;
404
+    display: inline-block;
405
+    font-size: 14px;
406
+  }
407
+
408
+  .deleteIcon {
409
+    color: red;
410
+    margin-left: 5px;
411
+  }
412
+
413
+  }
414
+  .el-table th .cell, .el-table td .cell {
415
+    padding: 0 2px;
416
+    white-space: pre-line;
417
+  }
418
+
419
+  .el-icon-delete {
420
+    color: red;
421
+  }
422
+
423
+  }
424
+  }
425
+</style>

File diff suppressed because it is too large
+ 2865 - 0
src/xt_pages/hospitalStation/components/deskPrescription.vue


+ 657 - 0
src/xt_pages/hospitalStation/components/deskRecord.vue View File

@@ -0,0 +1,657 @@
1
+<template>
2
+  <div class="deskRecord" style="margin-top:56px;">
3
+    <!-- <div style="overflow:hidden;border-top:1px solid #e5e5e5;margin-top:5px;">
4
+      <div class="mainCell" style="margin-bottom:10px;float:right">
5
+        <el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
6
+        <el-button size="small" @click="open(2)" type="primary">打印</el-button>
7
+        <el-button size="small" @click="open(3)" type="primary">病历调用</el-button>
8
+        <el-button size="small" @click="open(4)" type="primary">存模板</el-button>
9
+      </div>
10
+    </div> -->
11
+    <div class="mainTitle">基本信息:</div>
12
+    <el-form class="basicForm" :model="patientInfo" ref="form" label-width="120px">
13
+      <el-form-item label="姓名:" prop="name">
14
+        <el-input v-model="patientInfo.name" placeholder="" :disabled="true"></el-input>
15
+      </el-form-item>
16
+      <el-form-item label="性别: " prop="name">
17
+        <el-input v-model="patientInfo.gender" placeholder="" :disabled="true"></el-input>
18
+      </el-form-item>
19
+      <el-form-item label="年龄: " prop="name">
20
+        <el-input v-model="patientInfo.age" placeholder="" :disabled="true"></el-input>
21
+      </el-form-item>
22
+      <el-form-item label="证件号:" prop="name">
23
+        <el-input v-model="patientInfo.id_card_no" placeholder="" :disabled="true"></el-input>
24
+      </el-form-item>
25
+      <el-form-item label="出生日期: " prop="name">
26
+        <el-date-picker
27
+          style="width:100%;"
28
+          v-model="patientInfo.birth"
29
+          type="date"
30
+          :disabled="true"
31
+          placeholder="选择日期">
32
+        </el-date-picker>
33
+      </el-form-item>
34
+      <el-form-item label="联系电话: " prop="name">
35
+        <el-input v-model="patientInfo.phone" placeholder="" :disabled="true"></el-input>
36
+      </el-form-item>
37
+      <el-form-item label="医保类型: " prop="name">
38
+        <el-select v-model="delivery_way" style="width:100%;" placeholder="请选择">
39
+         <el-option
40
+            v-for="item in wayOptions"
41
+           :key="item.id"
42
+           :label="item.name"
43
+           :value="item.id"
44
+          />
45
+        </el-select>
46
+      </el-form-item>
47
+      <el-form-item label="医保证号: " prop="name">
48
+        <el-input v-model="patientInfo.health_care_no" placeholder="" :disabled="true"></el-input>
49
+      </el-form-item>
50
+      <el-form-item label="家庭住址: " prop="name">
51
+        <el-input v-model="patientInfo.home_address" placeholder="" :disabled="true"></el-input>
52
+      </el-form-item>
53
+      <el-form-item label="过敏史: " prop="name">
54
+        <el-input v-model="allergic_history" placeholder=""></el-input>
55
+      </el-form-item>
56
+    </el-form>
57
+    <div class="mainTitle">体格信息:</div>
58
+    <el-form class="physiqueForm" :model="case_history" ref="form" label-width="80px">
59
+      <el-form-item label="体温:" prop="temperature">
60
+        <el-input v-model="case_history.temperature" placeholder=""></el-input>
61
+        <span>℃</span>
62
+      </el-form-item>
63
+      <el-form-item label="脉搏: " prop="pulse">
64
+        <el-input v-model="case_history.pulse" placeholder=""></el-input>
65
+        (次/分)
66
+      </el-form-item>
67
+      <el-form-item label="呼吸: " prop="breathing">
68
+        <el-input v-model="case_history.breathing" placeholder=""></el-input>
69
+        (次/分)
70
+      </el-form-item>
71
+      <el-form-item label="血压:" prop="name">
72
+        <el-input v-model="case_history.sbp" placeholder=""></el-input>
73
+        /
74
+        <el-input v-model="case_history.dbp" placeholder=""></el-input>
75
+        mmHg
76
+      </el-form-item>
77
+    </el-form>
78
+    <div class="mainTitle">病历信息:</div>
79
+    <el-form class="recordForm" :model="case_history" ref="form" label-width="80px">
80
+     <el-form-item label="疾病类型: " prop="name" style="width:49%;">
81
+        <el-select v-model="case_history.sick" style="width:100%;" placeholder="请选择">
82
+          <el-option
83
+            v-for="(item,index) in sick"
84
+            :key="index"
85
+            :label="item.class_name"
86
+            :value="item.id">
87
+          </el-option>
88
+        </el-select>
89
+      </el-form-item>
90
+      <el-form-item label="诊断: " prop="name" style="width:49%;">
91
+        <el-select style="width:100%;" v-model="case_history.diagnose" placeholder="">
92
+          <el-option
93
+            v-for="(item,index) in diagnoses"
94
+            :key="index"
95
+            :label="item.class_name"
96
+            :value="item.id">
97
+          </el-option>
98
+        </el-select>
99
+      </el-form-item>
100
+
101
+      <el-form-item label="发病日期: " prop="name" style="width:49%;">
102
+        <el-date-picker
103
+          style="width:100%;"
104
+          v-model="start_time"
105
+          type="date"
106
+          placeholder="选择日期"
107
+           :picker-options="pickerOptions0">
108
+        </el-date-picker>
109
+      </el-form-item>
110
+      <el-form-item label="" prop="name" style="width:49%;">
111
+        <el-checkbox v-model="case_history.is_infect">是否传染</el-checkbox>
112
+      </el-form-item>
113
+      <el-form-item label="主诉:" style="width:49%;">
114
+        <el-select @change="changeMainTemplate" v-model="value" style="width:100%;margin-bottom:10px;">
115
+            <el-option
116
+              v-for="(item, index) in tabledata"
117
+              :label="item.title"
118
+              :value="item.content"
119
+              :key="index"
120
+            ></el-option>
121
+        </el-select>
122
+        <el-input
123
+          type="textarea"
124
+          :rows="2"
125
+          placeholder="请输入内容"
126
+          v-model="case_history.chief_conplaint">
127
+        </el-input>
128
+      </el-form-item>
129
+      <el-form-item label="现病史:" style="width:49%;">
130
+        <el-select @change="changeMainTemplateOne" v-model="valueOne" style="width:100%;margin-bottom:10px;">
131
+          <el-option
132
+            v-for="(item, index) in tabledataOne"
133
+            :label="item.title"
134
+            :value="item.content"
135
+            :key="index"
136
+          ></el-option>
137
+        </el-select>
138
+        <el-input
139
+          type="textarea"
140
+          :rows="2"
141
+          placeholder="请输入内容"
142
+          v-model="case_history.history_of_present_illness">
143
+        </el-input>
144
+      </el-form-item>
145
+      <el-form-item label="既往史:" style="width:49%;">
146
+        <el-select @change="changeMainTemplateTwo" v-model="valueTwo" style="width:100%;margin-bottom:10px;">
147
+          <el-option
148
+            v-for="(item, index) in tabledataTwo"
149
+            :label="item.title"
150
+            :value="item.content"
151
+            :key="index"
152
+          ></el-option>
153
+        </el-select>
154
+        <el-input
155
+          type="textarea"
156
+          :rows="2"
157
+          placeholder="请输入内容"
158
+          v-model="case_history.past_history">
159
+        </el-input>
160
+      </el-form-item>
161
+      <el-form-item label="个人史:" style="width:49%;">
162
+        <el-select @change="changeMainTemplateThree" v-model="valueThree" style="width:100%;margin-bottom:10px;">
163
+          <el-option
164
+            v-for="(item, index) in tabledataThree"
165
+            :label="item.title"
166
+            :value="item.content"
167
+            :key="index"
168
+          ></el-option>
169
+        </el-select>
170
+        <el-input
171
+          type="textarea"
172
+          :rows="2"
173
+          placeholder="请输入内容"
174
+          v-model="case_history.personal_history">
175
+        </el-input>
176
+      </el-form-item>
177
+      <el-form-item  label="家族史:" style="width:49%;">
178
+        <el-select @change="changeMainTemplateFour" v-model="valueFour" style="width:100%;margin-bottom:10px;">
179
+          <el-option
180
+            v-for="(item, index) in tabledataFour"
181
+            :label="item.title"
182
+            :value="item.content"
183
+            :key="index"
184
+          ></el-option>
185
+        </el-select>
186
+        <el-input
187
+          type="textarea"
188
+          :rows="2"
189
+          placeholder="请输入内容"
190
+          v-model="case_history.family_history">
191
+        </el-input>
192
+      </el-form-item>
193
+      <el-form-item label="诊断信息:" style="width:49%;">
194
+        <el-select @change="changeMainTemplateFive" v-model="valueFive" style="width:100%;margin-bottom:10px;">
195
+          <el-option
196
+            v-for="(item, index) in tabledataFive"
197
+            :label="item.title"
198
+            :value="item.content"
199
+            :key="index"
200
+          ></el-option>
201
+        </el-select>
202
+        <el-input
203
+          type="textarea"
204
+          :rows="2"
205
+          placeholder="请输入内容"
206
+          v-model="case_history.diagnostic">
207
+        </el-input>
208
+      </el-form-item>
209
+
210
+      <el-form-item label="医嘱:" style="width:49%;">
211
+        <el-select @change="changeMainTemplateSix" v-model="valueSix" style="width:100%;margin-bottom:10px;">
212
+          <el-option
213
+            v-for="(item, index) in tabledataSix"
214
+            :label="item.title"
215
+            :value="item.content"
216
+            :key="index"
217
+          ></el-option>
218
+        </el-select>
219
+        <el-input
220
+          type="textarea"
221
+          :rows="2"
222
+          placeholder="请输入内容"
223
+          v-model="case_history.doctor_advice">
224
+        </el-input>
225
+      </el-form-item>
226
+
227
+      <el-form-item label ="备注"  prop="name" style="width:49%;">
228
+        <el-input
229
+          type="textarea"
230
+          :rows="2"
231
+          placeholder="请输入内容"
232
+          v-model="case_history.remark">
233
+        </el-input>
234
+      </el-form-item>
235
+    </el-form>
236
+
237
+  </div>
238
+</template>
239
+
240
+<script>
241
+  const moment = require('moment');
242
+  import medicalRecord from './medicalRecord'
243
+  import saveRecordTemplate from './saveRecordTemplate'
244
+  import { getDictionaryDataConfig } from "@/utils/data";
245
+  import {  createCaseHistory,getInitData } from '@/api/his/his'
246
+  import { getDataConfig } from "@/utils/data";
247
+  import { getTemplateDetail,getMedicalTemplateList } from "@/api/project/project"
248
+  export default {
249
+    props: {
250
+      case_history: Object,
251
+      patientInfo: Object,
252
+      hisPatientInfo: Object,
253
+      record_date:String,
254
+      detalid:Number,
255
+    },
256
+    components: {
257
+      medicalRecord,
258
+      saveRecordTemplate
259
+    },
260
+    data() {
261
+      return {
262
+        id:0,
263
+        delivery_way:"",
264
+        // case_history:{
265
+        //   sick_type:'',
266
+        //   symptom:"",
267
+        //   sick_date:"",
268
+        //   is_infect:"",
269
+        //   chief_conplaint:"",
270
+        //   history_of_present_illness:"",
271
+        //   past_history:"",
272
+        //   diagnostic:"",
273
+        //   personal_history:"",
274
+        //   family_history:"",
275
+
276
+        // },
277
+          pickerOptions0: {
278
+          disabledDate(time) {
279
+            return time.getTime() < Date.now() - 8.64e7;
280
+          }
281
+        },
282
+        formValue:{
283
+          temperature:"",
284
+          blood_sugar:"",
285
+          pulse:"",
286
+          sbp:"",
287
+          dbp:"",
288
+          height:"",
289
+          blood_fat:"",
290
+        },
291
+        form: {
292
+          name: ''
293
+        },
294
+        wayOptions:[],
295
+        start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
296
+        doctor_advice:"",
297
+        remark:"",
298
+        tabledata:[],
299
+        tabledataOne:[],
300
+        tabledataTwo:[],
301
+        tabledataThree:[],
302
+        tabledataFour:[],
303
+        tabledataFive:[],
304
+        tabledataSix:[],
305
+        tabledataSeven:[],
306
+        value:'',
307
+        valueOne:'',
308
+        valueTwo:'',
309
+        valueThree:'',
310
+        valueFour:'',
311
+        valueFive:'',
312
+        valueSix:'',
313
+        valueSeven:'',
314
+        diagnoses:[],
315
+        sick:[],
316
+        allergic_history:"",
317
+        form:{
318
+          id:0,
319
+        },
320
+        watchSign:0
321
+      }
322
+    },
323
+    methods: {
324
+      getDictionaryDataConfig(module, filed_name) {
325
+        return getDictionaryDataConfig(module, filed_name)
326
+
327
+      },
328
+      // setData(case_history,patientInfo,hisPatientInfo){
329
+      //   this.form.name = patientInfo.name
330
+
331
+
332
+
333
+      // },
334
+      createCaseHistory(id) {
335
+          if(this.patientInfo.id == undefined){
336
+            this.$message.error("请先选择病人");
337
+            return
338
+          }
339
+          if(this.case_history.is_infect == true){
340
+            this.case_history.is_infect = 1
341
+          }
342
+          if(this.case_history.is_infect == false){
343
+             this.case_history.is_infect = 2
344
+          }
345
+          let params = {
346
+            "his_patient_id":this.hisPatientInfo.id,
347
+            "delivery_way":this.delivery_way?"":0,
348
+            "patient_id":id ? id : this.patientInfo.id,
349
+            "temperature":this.case_history.temperature,
350
+            "blood_sugar":this.case_history.blood_sugar,
351
+            "pulse":this.case_history.pulse,
352
+            "sbp":this.case_history.sbp,
353
+            "dbp":this.case_history.dbp,
354
+            "blood_fat":this.case_history.blood_fat,
355
+            "height":this.case_history.height,
356
+            "sick_type":this.case_history.sick_type,
357
+            "symptom":this.case_history.symptom,
358
+            "sick_date":this.start_time,
359
+            "is_infect":this.case_history.is_infect,
360
+            "chief_conplaint":this.case_history.chief_conplaint,
361
+            "history_of_present_illness":this.case_history.history_of_present_illness,
362
+            "past_history":this.case_history.past_history,
363
+            "personal_history":this.case_history.personal_history,
364
+            "family_history":this.case_history.family_history,
365
+            "record_date":this.record_date,
366
+            "diagnostic":this.case_history.diagnostic,
367
+            "breathing":this.case_history.breathing,
368
+            "doctor_advice":this.case_history.doctor_advice,
369
+            "remark":this.case_history.remark,
370
+            "sick":this.case_history.sick,
371
+            "diagnose":this.case_history.diagnose,
372
+            "allergic_history":this.allergic_history,
373
+            "id":this.form.id,
374
+          };
375
+          console.log("prams222",params);
376
+          createCaseHistory(params).then(response => {
377
+            if (response.data.state == 0) {
378
+              this.$message.error("患者病历已存在");
379
+              this.watchSign = 0;
380
+              return false
381
+            } else {
382
+              var caseHistory = response.data.data.caseHistory;
383
+              console.log("caseHistory",caseHistory);
384
+              this.$message.success("保存成功");
385
+              this.doctor_advice = "";
386
+              this.remark = "";
387
+              this.watchSign = 0
388
+            }
389
+          })
390
+
391
+
392
+      },
393
+
394
+
395
+      getTemplateDetail(id){
396
+
397
+          getTemplateDetail(id).then(response=>{
398
+              if(response.data.state == 1){
399
+                var templatedetail =  response.data.data.templateDetail;
400
+                console.log("templatedetail",templatedetail);
401
+
402
+                this.case_history.chief_conplaint =  templatedetail.chief_conplaint;
403
+                this.case_history.history_of_present_illness =  templatedetail.history_of_present_illness;
404
+                this.case_history.past_history =  templatedetail.past_history;
405
+                this.case_history.personal_history =    templatedetail.personal_history;
406
+                this.case_history.family_history = templatedetail.family_history;
407
+                this.case_history.diagnostic = templatedetail.diagnostic;
408
+                this.case_history.doctor_advice = templatedetail.doctor_advice;
409
+                this.case_history.remark = templatedetail.remark;
410
+                this.case_history.sick = templatedetail.sick;
411
+                this.case_history.diagnose = templatedetail.diagnose
412
+
413
+              }
414
+          })
415
+        },
416
+
417
+        getlist(){
418
+           getMedicalTemplateList().then(response=>{
419
+           if(response.data.state == 1){
420
+             var list =  response.data.data.list;
421
+             console.log("list",list);
422
+             this.tabledata = list;
423
+             this.tabledataOne =  response.data.data.listOne;
424
+             this.tabledataTwo = response.data.data.listTwo;
425
+             this.tabledataThree = response.data.data.listThree;
426
+             this.tabledataFour =  response.data.data.listFour;
427
+             this.tabledataFive = response.data.data.listFive;
428
+             this.tabledataSix = response.data.data.listSix;
429
+             this.tabledataSeven =  response.data.data.listSeven
430
+           }
431
+        })
432
+       },
433
+
434
+       changeMainTemplate(values){
435
+         if(this.case_history.chief_conplaint == ''){
436
+           this.case_history.chief_conplaint = values
437
+         } else {
438
+          if (this.case_history.chief_conplaint.indexOf(values) == -1) {
439
+            if (this.case_history.chief_conplaint.charAt(this.case_history.chief_conplaint.length - 1).indexOf('。') == -1) {
440
+              this.case_history.chief_conplaint = this.case_history.chief_conplaint + ',' + values
441
+            } else {
442
+              this.case_history.chief_conplaint = this.case_history.chief_conplaint + values
443
+            }
444
+          }
445
+        }
446
+       },
447
+       changeMainTemplateOne(values){
448
+          if(this.case_history.history_of_present_illness == ''){
449
+           this.case_history.history_of_present_illness = values
450
+         } else {
451
+          if (this.case_history.history_of_present_illness.indexOf(values) == -1) {
452
+            if (this.case_history.history_of_present_illness.charAt(this.case_history.history_of_present_illness.length - 1).indexOf('。') == -1) {
453
+              this.case_history.history_of_present_illness = this.case_history.history_of_present_illness + ',' + values
454
+            } else {
455
+              this.case_history.history_of_present_illness = this.case_history.history_of_present_illness + values
456
+            }
457
+          }
458
+        }
459
+      },
460
+      changeMainTemplateTwo(values){
461
+         if(this.case_history.past_history == ''){
462
+           this.case_history.past_history = values
463
+         } else {
464
+          if (this.case_history.past_history.indexOf(values) == -1) {
465
+            if (this.case_history.past_history.charAt(this.case_history.past_history.length - 1).indexOf('。') == -1) {
466
+              this.case_history.past_history = this.case_history.past_history + ',' + values
467
+            } else {
468
+              this.case_history.past_history = this.case_history.past_history + values
469
+            }
470
+          }
471
+        }
472
+      },
473
+      changeMainTemplateThree(values){
474
+         if(this.case_history.personal_history == ''){
475
+           this.case_history.personal_history = values
476
+         } else {
477
+          if (this.case_history.personal_history.indexOf(values) == -1) {
478
+            if (this.case_history.personal_history.charAt(this.case_history.personal_history.length - 1).indexOf('。') == -1) {
479
+              this.case_history.personal_history = this.case_history.personal_history + ',' + values
480
+            } else {
481
+              this.case_history.personal_history = this.case_history.personal_history + values
482
+            }
483
+          }
484
+        }
485
+      },
486
+      changeMainTemplateFour(values){
487
+          if(this.case_history.family_history == ''){
488
+           this.case_history.family_history = values
489
+         } else {
490
+          if (this.case_history.family_history.indexOf(values) == -1) {
491
+            if (this.case_history.family_history.charAt(this.case_history.family_history.length - 1).indexOf('。') == -1) {
492
+              this.case_history.family_history = this.case_history.family_history + ',' + values
493
+            } else {
494
+              this.case_history.family_history = this.case_history.family_history + values
495
+            }
496
+          }
497
+        }
498
+      },
499
+
500
+      changeMainTemplateFive(values){
501
+          if(this.case_history.diagnostic == ''){
502
+           this.case_history.diagnostic = values
503
+         } else {
504
+          if (this.case_history.diagnostic.indexOf(values) == -1) {
505
+            if (this.case_history.diagnostic.charAt(this.case_history.diagnostic.length - 1).indexOf('。') == -1) {
506
+              this.case_history.diagnostic = this.case_history.diagnostic + ',' + values
507
+            } else {
508
+              this.case_history.diagnostic = this.case_history.diagnostic + values
509
+            }
510
+          }
511
+        }
512
+      },
513
+      changeMainTemplateSix(values){
514
+          if(this.case_history.doctor_advice == ''){
515
+           this.case_history.doctor_advice = values
516
+         } else {
517
+          if (this.case_history.doctor_advice.indexOf(values) == -1) {
518
+            if (this.case_history.doctor_advice.charAt(this.case_history.doctor_advice.length - 1).indexOf('。') == -1) {
519
+              this.case_history.doctor_advice = this.case_history.doctor_advice + ',' + values
520
+            } else {
521
+              this.case_history.doctor_advice = this.case_history.doctor_advice + values
522
+            }
523
+          }
524
+        }
525
+      },
526
+      getInitData() {
527
+        getInitData().then(response => {
528
+          if (response.data.state == 0) {
529
+            this.$message.error(response.data.msg);
530
+            return false
531
+          } else {
532
+            this.sick = response.data.data.sick;
533
+            this.diagnoses = response.data.data.diagnose
534
+
535
+          }
536
+        })
537
+
538
+      },
539
+    },
540
+    created(){
541
+       this.getlist();
542
+       this.getInitData();
543
+       this.wayOptions = getDataConfig("patient", "reimbursement_ways");
544
+       console.log("232322323",this);
545
+       if(this.patientInfo.gender = 1){
546
+         this.patientInfo.gender = '男'
547
+       }else if(this.patientInfo.gender = 2){
548
+          this.patientInfo.gender = '女'
549
+        }
550
+
551
+    },
552
+    watch:{
553
+      detalid:function(val){
554
+        this.getTemplateDetail(val)
555
+      },
556
+      'patientInfo.gender':{
557
+        handler(newName, oldName){
558
+          console.log('newName',newName);
559
+          if(newName == 1){
560
+            this.patientInfo.gender = '男'
561
+          }else if(newName == 2){
562
+            this.patientInfo.gender = '女'
563
+          }
564
+        },
565
+        immediate: true,
566
+        deep: true
567
+      },
568
+      case_history:{
569
+        handler(val){
570
+          console.log("南京人明",this.case_history);
571
+          if(this.case_history.breathing == 0){
572
+            this.case_history.breathing = ""
573
+          }
574
+          if(this.case_history.sick == 0){
575
+            this.case_history.sick = ""
576
+          }
577
+          if(this.case_history.diagnose == 0){
578
+            this.case_history.diagnose = ""
579
+          }
580
+          this.form.id = this.case_history.id;
581
+          this.allergic_history = this.case_history.allergic_history;
582
+          this.watchSign++
583
+        },
584
+        deep:true
585
+      },
586
+      allergic_history:function(){
587
+        this.watchSign++
588
+      }
589
+    }
590
+  }
591
+</script>
592
+
593
+
594
+<style lang="scss" scoped>
595
+  .mainTitle {
596
+    font-size: 18px;
597
+    font-weight: bold;
598
+    margin-bottom: 10px;
599
+    color:#409EFF;
600
+  }
601
+
602
+  .backColor {
603
+    background: #f6f8f9;
604
+    height: 5px;
605
+    margin-bottom: 5px;
606
+  }
607
+
608
+  .deskRecord {
609
+
610
+  .basicForm {
611
+    display: flex;
612
+    flex-wrap: wrap;
613
+
614
+  .el-form-item {
615
+    width: 32%;
616
+    margin-right: 1%;
617
+  }
618
+
619
+  }
620
+  .physiqueForm {
621
+    display: flex;
622
+    flex-wrap: wrap;
623
+
624
+  .el-form-item {
625
+    width: 24%;
626
+    margin-right: 1%;
627
+  }
628
+
629
+  }
630
+  .recordForm {
631
+    display: flex;
632
+    flex-wrap: wrap;
633
+
634
+  .el-form-item {
635
+    width: 24%;
636
+    margin-right: 1%;
637
+  }
638
+
639
+  }
640
+
641
+  }
642
+</style>
643
+
644
+<style lang="scss">
645
+  .physiqueForm {
646
+
647
+  .el-form-item__content {
648
+    display: flex;
649
+  }
650
+
651
+  .el-input {
652
+    width: 80px;
653
+    margin-right: 5px;
654
+  }
655
+
656
+  }
657
+</style>

+ 387 - 0
src/xt_pages/hospitalStation/components/inquiriesDetail.vue View File

@@ -0,0 +1,387 @@
1
+<template>
2
+<div>
3
+  <el-dialog
4
+    title="详情"
5
+    width="1000px"
6
+    :visible.sync="visible"
7
+    :before-close="_close"
8
+    class="detailDialog"
9
+  >
10
+    <div style="position: absolute;right:20px;z-index:99">
11
+      <el-button v-if="activeName == 'first'" @click="open(1)" type="primary">打印</el-button>
12
+      <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
13
+    </div>
14
+    <el-tabs v-model="activeName">
15
+
16
+      <el-tab-pane label="处方详情" name="first">
17
+        <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
18
+          <el-tab-pane
19
+            v-for="(item, index) in prescriptions"
20
+            :key="index"
21
+            :label="item.name"
22
+            :name="item.name"
23
+          >
24
+          </el-tab-pane>
25
+
26
+          <div class="RP">
27
+            Rp
28
+          </div>
29
+          <new-prescription-table ref="prescription_tables" :prescription="curPrescriptions"></new-prescription-table>
30
+        </el-tabs>
31
+
32
+      </el-tab-pane>
33
+      <el-tab-pane label="病历详情" name="second">
34
+        <div class="commonCell">
35
+          <p style="color:#409EFF;">基本信息</p>
36
+          <div class="detailMain">
37
+            <span style="width:270px;">处方号:{{order.prescription_number}}</span>
38
+            <span style="width:180px;">姓名:{{order.patient.name}}</span>
39
+            <span style="width:240px;">证件号:{{order.patient.id_card_no}}</span>
40
+            <span style="width:180px;">联系电话:{{order.patient.phone}}</span>
41
+            <span style="width:270px;">医生:{{order.doctor}}</span>
42
+            <span style="width:180px;">科室:{{getDepartMent(order.departments)}}</span>
43
+            <span style="width:240px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
44
+            <!-- <span style="width:180px;">疾病名称:{{case_history.diagnostic}}</span>
45
+            <span style="width:180px;">症状:{{case_history.diagnostic}}</span> -->
46
+
47
+
48
+          </div>
49
+        </div>
50
+        <div class="commonCell">
51
+          <p style="color:#409EFF;">体格信息</p>
52
+          <div class="detailMain">
53
+            <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
54
+            <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
55
+
56
+            <span style="width:140px;">脉搏:{{case_history.pulse}} 次/分</span>
57
+            <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
58
+          </div>
59
+        </div>
60
+        <div class="commonCell">
61
+          <p style="color:#409EFF;">病历信息</p>
62
+          <div class="detailMain">
63
+            <span style="width:260px;" v-if="case_history.is_infect== 1">是否传染:是</span>
64
+            <span style="width:260px;" v-if="case_history.is_infect != 1">是否传染:否</span>
65
+            <span style="width:180px;">发病日期:{{getTimes(case_history.sick_date,"{y}-{m}-{d}")}}</span>
66
+          </div>
67
+        </div>
68
+        <div class="commonCell">
69
+          <p>主诉</p>
70
+          <div>{{case_history.chief_conplaint}}</div>
71
+        </div>
72
+        <div class="commonCell">
73
+          <p>现病史</p>
74
+          <div>{{case_history.history_of_present_illness}}</div>
75
+        </div>
76
+        <div class="commonCell">
77
+          <p>门诊诊断</p>
78
+          <div>{{case_history.diagnostic}}</div>
79
+        </div>
80
+        <div class="commonCell">
81
+          <p>门诊医嘱</p>
82
+          <div>{{case_history.doctor_advice}}</div>
83
+        </div>
84
+        <div class="commonCell">
85
+          <p>过敏史</p>
86
+          <div>{{case_history.past_history}}</div>
87
+        </div>
88
+        <div class="commonCell">
89
+          <p>既往史</p>
90
+          <div>{{case_history.past_history}}</div>
91
+        </div>
92
+        <div class="commonCell">
93
+          <p>个人史</p>
94
+          <div>{{case_history.personal_history}}</div>
95
+        </div>
96
+        <div class="commonCell">
97
+          <p>家族史</p>
98
+          <div>{{case_history.family_history}}</div>
99
+        </div>
100
+      </el-tab-pane>
101
+    </el-tabs>
102
+    <div slot="footer" class="dialog-footer">
103
+      <el-button @click="hide">取 消</el-button>
104
+      <!--<el-button type="primary" :loading="submitLoading" @click="hide">确定</el-button>-->
105
+    </div>
106
+    <el-dialog
107
+      class="centerDialog detailDialog"
108
+      width="600px"
109
+      title="打印"
110
+      :visible.sync="innerVisible"
111
+      append-to-body>
112
+
113
+      <print v-if="activeName == 'first'" :paramsObj='paramsObj'></print>
114
+      <recordPrint v-if="activeName == 'second'" :patientid="patientid"></recordPrint>
115
+    </el-dialog>
116
+  </el-dialog>
117
+</div>
118
+</template>
119
+
120
+
121
+
122
+<script>
123
+  import { getDictionaryDataConfig} from "@/utils/data";
124
+  import { getHisPrescriptionInfo } from '@/api/his/his'
125
+  import NewPrescriptionTable from './newPrescriptionTable'
126
+  import { uParseTime } from '@/utils/tools'
127
+  import { getAllDoctorList } from "@/api/project/project"
128
+  import moment from 'moment';
129
+  import print from '../print'
130
+  import recordPrint from '../recordPrint'
131
+
132
+  export default {
133
+    components: { NewPrescriptionTable,print,recordPrint },
134
+    data() {
135
+      return {
136
+        visible: false,
137
+        activeName: 'first',
138
+        curPrescriptions: {},
139
+        prescriptions: [],
140
+        record_date: '',
141
+        editableTabsValue: '处方1',
142
+        loadingone: false,
143
+        editableTabs: [{
144
+          title: '处方1',
145
+          name: '1'
146
+        }],
147
+        tabIndex: 1,
148
+        hisPatientInfo: {},
149
+        loadingtwo: false,
150
+        patientTableData: [{
151
+          name: '杨美英',
152
+          mdtrt_id: '1709946'
153
+        }],
154
+        patientInfo: { id: 0 },
155
+        doctor: {},
156
+        total: 0,
157
+        state: '未收费',
158
+        radio: 1,
159
+        radioStatus: 1,
160
+        search_input: '',
161
+        case_history:{},
162
+        order:{},
163
+        doctorList:[],
164
+        departmentList:[],
165
+        innerVisible:false,
166
+        paramsObj:{},
167
+        patientid:''
168
+      }
169
+    },
170
+    methods: {
171
+      open(index){
172
+        if(index == 1){
173
+           var arr= [];
174
+           for(let i=0;i<this.prescriptions.length;i++){
175
+              arr.push(this.prescriptions[i].id)
176
+           }
177
+           var prescription_id = arr[0];
178
+           var record_date = this.format(this.order.record_date);
179
+           var ids = arr.toString();
180
+
181
+           let obj = {
182
+             record:record_date,
183
+             prescription_id:prescription_id,
184
+             ids:ids,
185
+             patient_id:this.patientInfo.id
186
+           };
187
+           this.paramsObj = obj;
188
+           this.innerVisible = true
189
+          //  this.$router.push("/outpatientDoctorStation/print?record="+record_date+"&prescription_id="+prescription_id+"&ids="+ids+"&patient_id="+this.patientInfo.id)
190
+
191
+        }else if(index == 2){
192
+          var record_date = this.format(this.case_history.sick_date);
193
+          this.patientid = this.patientInfo.id;
194
+          this.innerVisible = true
195
+          // this.$router.push("/outpatientDoctorStation/recordPrint?record="+record_date+"&patient_id="+this.case_history.patient_id)
196
+        }
197
+      },
198
+      getTimes(time,temp) {
199
+        return uParseTime(time, temp);
200
+      },
201
+      tabclickEvent(val) {
202
+        for (let i = 0; i < this.prescriptions.length; i++) {
203
+          if (this.prescriptions[i].name == val.name) {
204
+            this.curPrescriptions = {};
205
+            var temp = this.deepClone(this.prescriptions[i]);
206
+            this.curPrescriptions = temp
207
+          }
208
+        }
209
+      },
210
+      deepClone(source) {
211
+        if (!source && typeof source !== 'object') {
212
+          throw new Error('error arguments', 'shallowClone')
213
+        }
214
+        const targetObj = source.constructor === Array ? [] : {};
215
+        Object.keys(source).forEach((keys) => {
216
+          if (source[keys] && typeof source[keys] === 'object') {
217
+            targetObj[keys] = this.deepClone(source[keys])
218
+          } else {
219
+            targetObj[keys] = source[keys]
220
+          }
221
+        });
222
+        return targetObj
223
+      },
224
+
225
+      moreState(tab, event) {
226
+        if (tab == 'more') {
227
+          return false
228
+        }
229
+      },
230
+
231
+      _close: function(done) {
232
+        // this.clear()
233
+        done()
234
+      },
235
+      clear: function() {
236
+        this.form.id = 0;
237
+        this.form.name = '';
238
+        this.form.intro = ''
239
+      },
240
+      show(id) {
241
+        let params={
242
+          id:id,
243
+        };
244
+        getHisPrescriptionInfo(params).then(response => {
245
+          if (response.data.state == 0) {
246
+            this.$message.error(response.data.msg);
247
+            return false
248
+          } else {
249
+            this.patientInfo = response.data.data.order.patient;
250
+            console.log("患者信息",this.patientInfo);
251
+            this.hisPatientInfo = response.data.data.order.his_patient;
252
+            this.case_history = response.data.data.order.case_history;
253
+            console.log("历史详情",this.case_history);
254
+            this.order = response.data.data.order;
255
+            console.log('this.order',this.order);
256
+
257
+
258
+            this.prescriptions = [];
259
+            for (let i = 0; i < response.data.data.prescription.length; i++) {
260
+              var prescription = response.data.data.prescription[i];
261
+              let tempAdvice = [];
262
+              let tempProject = [];
263
+              for (let b = 0; b < prescription.advices.length; b++) {
264
+                let obj = {
265
+                  advice_id: prescription.advices[b].id,
266
+                  drug_name: prescription.advices[b].advice_name,
267
+                  single_dose: prescription.advices[b].single_dose,
268
+                  delivery_way: prescription.advices[b].delivery_way,
269
+                  execution_frequency: prescription.advices[b].execution_frequency,
270
+                  retail_price: prescription.advices[b].price.toString(),
271
+                  remark: prescription.advices[b].remark,
272
+                  day: prescription.advices[b].day,
273
+                  prescribing_number: prescription.advices[b].prescribing_number.toString(),
274
+                  single_dose_unit: prescription.advices[b].single_dose_unit,
275
+                  prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
276
+                  medical_insurance_number: prescription.advices[b].med_list_codg
277
+
278
+                };
279
+                tempAdvice.push(obj)
280
+              }
281
+
282
+              for (let b = 0; b < prescription.project.length; b++) {
283
+                let obj = {
284
+                  id: prescription.project[b].id,
285
+                  project_id: prescription.project[b].project.id,
286
+                  project_name: prescription.project[b].project.project_name,
287
+                  statistical_classification: prescription.project[b].project.statistical_classification,
288
+                  single_dose: prescription.project[b].single_dose,
289
+                  delivery_way: prescription.project[b].delivery_way,
290
+                  execution_frequency: prescription.project[b].execution_frequency,
291
+                  number_days: prescription.project[b].day,
292
+                  total: prescription.project[b].count.toString(),
293
+                  price: prescription.project[b].price,
294
+                  remark: prescription.project[b].remark,
295
+                  medical_code: prescription.project[b].project.medical_code,
296
+                  unit:prescription.project[b].project.unit,
297
+                };
298
+                tempProject.push(obj)
299
+              }
300
+              let index = i + 1;
301
+              let obj = {
302
+                id: prescription.id,
303
+                name: '处方' + index,
304
+                advices: tempAdvice,
305
+                project: tempProject,
306
+                type: response.data.data.prescription[i].type
307
+              };
308
+              this.prescriptions.push(obj);
309
+              console.log(this.prescriptions);
310
+
311
+              this.curPrescriptions = this.prescriptions[0]
312
+            }
313
+          }
314
+        });
315
+        // this.clear()
316
+        this.visible = true
317
+
318
+
319
+
320
+      },
321
+      hide() {
322
+        // this.clear()
323
+        this.visible = false
324
+      },
325
+     getAllDoctorList(){
326
+      getAllDoctorList().then(response=>{
327
+        if(response.data.state == 1){
328
+            var doctor =  response.data.data.doctor;
329
+            this.doctorList = doctor;
330
+             var department = response.data.data.department;
331
+             console.log("department",department);
332
+             this.departmentList = department
333
+            }
334
+         })
335
+      },
336
+      getDepartMent(id){
337
+         var name = "";
338
+         for(let i=0;i<this.departmentList.length;i++){
339
+           if(id == this.departmentList[i].id){
340
+              name = this.departmentList[i].name
341
+           }
342
+         }
343
+         return name
344
+      },
345
+
346
+      format(time){
347
+        moment.locale();
348
+        var times = time*1000;
349
+        times = moment(times).format('YYYY-MM-DD');
350
+        return times
351
+      }
352
+    },
353
+    created(){
354
+      this.getAllDoctorList()
355
+    }
356
+  }
357
+</script>
358
+
359
+<style lang="scss">
360
+  .detailDialog {
361
+
362
+  .el-dialog__body {
363
+    padding: 0 20px 30px;
364
+    position: relative;
365
+  }
366
+
367
+  .detailMain {
368
+    flex: 1;
369
+  span {
370
+    display: inline-block;
371
+  }
372
+
373
+  }
374
+  .commonCell {
375
+    display: flex;
376
+    line-height: 40px;
377
+
378
+  > p {
379
+    font-weight: bold;
380
+    color: #000;
381
+    width: 80px;
382
+  }
383
+
384
+  }
385
+  }
386
+</style>
387
+

+ 106 - 0
src/xt_pages/hospitalStation/components/inspection.vue View File

@@ -0,0 +1,106 @@
1
+<template>
2
+    <el-dialog
3
+        title="选择模板"
4
+        width="1000px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+    >
8
+        <div class="inspectionTitle">
9
+            <p>姓名:<span>张三</span></p>
10
+            <p>证件号:<span>张三</span></p>
11
+            <p>性别:<span>张三</span></p>
12
+            <p>类型:<span>张三</span></p>
13
+            <p>金额:<span>张三</span></p>
14
+        </div>
15
+        <div style="margin:10px 0;">
16
+           <el-input v-model="name" placeholder="" style="width:150px;"></el-input> 
17
+        </div>
18
+        <div style="display:flex;">
19
+            <div style="width: 151px;">
20
+                <el-table :data="tableData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
21
+                    <el-table-column align="center" prop="name" label="模板名称" width="150">
22
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
23
+                    </el-table-column>
24
+                </el-table> 
25
+            </div>
26
+            <el-table :data="tableData" border height="300" style="flex:1;margin-left:20px;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
27
+                <el-table-column type="selection" width="55" align="center"></el-table-column>
28
+                <el-table-column align="center" prop="name" label="项目名称">
29
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
30
+                </el-table-column>
31
+                <el-table-column align="center" prop="name" label="数量">
32
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
33
+                </el-table-column>
34
+                <el-table-column align="center" prop="name" label="单位">
35
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
36
+                </el-table-column>
37
+                <el-table-column align="center" prop="name" label="金额">
38
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
39
+                </el-table-column>
40
+            </el-table> 
41
+        </div>
42
+        <div slot="footer" class="dialog-footer">
43
+            <el-button @click="hide">取 消</el-button>
44
+            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
45
+        </div>
46
+    </el-dialog>         
47
+</template>
48
+
49
+<script>
50
+export default {
51
+    data(){
52
+        return{
53
+            visible:false,
54
+            tableData: [{
55
+            date: '2016-05-02',
56
+            name: '王小虎',
57
+            address: '上海市普陀区金沙江路 1518 弄'
58
+            }, {
59
+            date: '2016-05-04',
60
+            name: '王小虎',
61
+            address: '上海市普陀区金沙江路 1517 弄'
62
+            }, {
63
+            date: '2016-05-01',
64
+            name: '王小虎',
65
+            address: '上海市普陀区金沙江路 1519 弄'
66
+            }, {
67
+            date: '2016-05-03',
68
+            name: '王小虎',
69
+            address: '上海市普陀区金沙江路 1516 弄'
70
+            }]
71
+        }
72
+    },
73
+    methods:{
74
+        _close: function(done) {
75
+            // this.clear()
76
+            done()
77
+        },
78
+        clear: function() {
79
+            this.form.id = 0;
80
+            this.form.name = "";
81
+            this.form.intro = "";
82
+        },
83
+        show() {
84
+            // this.clear()
85
+            this.visible = true
86
+        },
87
+        hide() {
88
+            // this.clear()
89
+            this.visible = false
90
+        },
91
+    }
92
+}
93
+</script>
94
+
95
+<style lang="scss" scoped>
96
+.inspectionTitle{
97
+    display:flex;
98
+    justify-content: space-between;
99
+    span{
100
+        min-width:80px;
101
+        display:inline-block;
102
+        
103
+    }
104
+}
105
+</style>
106
+

+ 165 - 0
src/xt_pages/hospitalStation/components/medicalInsuranceRefund.vue View File

@@ -0,0 +1,165 @@
1
+<template>
2
+    <div style="display:flex;">
3
+        <div class="noChargeLeft">
4
+            <div class="mainCell" style="margin-bottom:10px;">
5
+                <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
6
+                <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
7
+            </div>
8
+            <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
9
+                <el-table-column align="center" prop="name" label="处方号" width="100">
10
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
11
+                </el-table-column>
12
+                <el-table-column align="center" prop="name" label="姓名" width="99">
13
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
14
+                </el-table-column>
15
+            </el-table>
16
+        </div>
17
+        <div style="flex:1;overflow-x: hidden;">
18
+            <div class="noChargeRight">
19
+                <div class="chargeInfo">
20
+                    <p>姓名:<span></span></p>
21
+                    <p>性别:<span></span></p>
22
+                    <p>年龄:<span></span></p>
23
+                    <p>证件号:<span></span></p>
24
+                    <p>挂号类型:<span></span></p>
25
+                    <p>上一个发票号:<span></span></p>
26
+                    <p>下一个发票号:<span></span></p>
27
+                </div>
28
+                <div class="chargeBox">
29
+                    <p>医疗费用总额:<span></span></p>
30
+                    <p>基金支付金额:<span></span></p>
31
+                    <p>个人账户支付金额:<span></span></p>
32
+                    <p>个人支付金额:<span></span></p>
33
+                    <p>个人账号金额:<span></span></p>
34
+                </div>
35
+                <p class='chargeTitle'>药品信息</p>
36
+                <el-table :data="tableData" border height="200" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
37
+                    <el-table-column align="center" prop="name" label="名称">
38
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
39
+                    </el-table-column>
40
+                    <el-table-column align="center" prop="name" label="单位">
41
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
42
+                    </el-table-column>
43
+                    <el-table-column align="center" prop="name" label="单价(元)">
44
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
45
+                    </el-table-column>
46
+                    <el-table-column align="center" prop="name" label="数量">
47
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
48
+                    </el-table-column>
49
+                    <el-table-column align="center" prop="name" label="总价">
50
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
51
+                    </el-table-column>
52
+                    <el-table-column align="center" prop="name" label="自付比例">
53
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
54
+                    </el-table-column>
55
+                </el-table>
56
+                <p class='chargeTitle'>项目信息</p>
57
+                <el-table :data="tableData" border height="200" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
58
+                    <el-table-column align="center" prop="name" label="名称">
59
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
60
+                    </el-table-column>
61
+                    <el-table-column align="center" prop="name" label="科室">
62
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
63
+                    </el-table-column>
64
+                    <el-table-column align="center" prop="name" label="单价(元)">
65
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
66
+                    </el-table-column>
67
+                    <el-table-column align="center" prop="name" label="数量">
68
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
69
+                    </el-table-column>
70
+                    <el-table-column align="center" prop="name" label="总价">
71
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
72
+                    </el-table-column>
73
+                    <el-table-column align="center" prop="name" label="自付比例">
74
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
75
+                    </el-table-column>
76
+                </el-table>
77
+                <div class='chargeBtn'>
78
+                    <p>总金额:0元</p>
79
+                    <div>
80
+                        <el-button type="primary">处方查询</el-button>
81
+                        <el-button type="danger">退单</el-button>
82
+                    </div>
83
+                </div>
84
+            </div>
85
+        </div>
86
+    </div>
87
+</template>
88
+
89
+<script>
90
+export default {
91
+    data(){
92
+        return{
93
+            tableData: [{
94
+            date: '2016-05-02',
95
+            name: '王小虎',
96
+            address: '上海市普陀区金沙江路 1518 弄'
97
+            }, {
98
+            date: '2016-05-04',
99
+            name: '王小虎',
100
+            address: '上海市普陀区金沙江路 1517 弄'
101
+            }, {
102
+            date: '2016-05-01',
103
+            name: '王小虎',
104
+            address: '上海市普陀区金沙江路 1519 弄'
105
+            }, {
106
+            date: '2016-05-03',
107
+            name: '王小虎',
108
+            address: '上海市普陀区金沙江路 1516 弄'
109
+            }]
110
+        }
111
+    }
112
+}
113
+</script>
114
+
115
+
116
+<style lang="scss" scoped>
117
+.noChargeLeft{
118
+    width:200px;
119
+    .mainCell{
120
+        display: flex;
121
+    }
122
+}
123
+.noChargeRight{
124
+    margin-left:20px;
125
+    // flex: 1;
126
+    .chargeInfo{
127
+        display: flex;
128
+        justify-content: space-between;
129
+        align-items: center;
130
+        height: 32px;
131
+        margin-bottom: 10px;
132
+        >p{
133
+            display: flex;
134
+        }
135
+        >p>span{
136
+            display: inline-block;
137
+            min-width: 50px;
138
+        }
139
+    }
140
+    .chargeBox{
141
+        height:42px;
142
+        border: 1px solid #EBEEF5;
143
+        display: flex;
144
+        justify-content: space-between;
145
+        background-color: rgb(245, 247, 250);
146
+        color: rgb(96, 98, 102);
147
+        align-items: center;
148
+        padding: 0 20px;
149
+        >p>span{
150
+            display: inline-block;
151
+            min-width: 50px;
152
+        }
153
+    }
154
+    .chargeTitle{
155
+        line-height: 32px;
156
+        height: 32px;
157
+    }
158
+    .chargeBtn{
159
+        display: flex;
160
+        justify-content: space-between;
161
+        align-items: center;
162
+        margin-top: 20px;
163
+    }
164
+}
165
+</style>

+ 169 - 0
src/xt_pages/hospitalStation/components/medicalRecord.vue View File

@@ -0,0 +1,169 @@
1
+<template>
2
+    <el-dialog
3
+        title="病历调用"
4
+        width="1000px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+        class="recordDialog"
8
+    >
9
+        <div>
10
+            <el-tabs v-model="activeName">
11
+                <el-tab-pane label="病历模板" name="first">
12
+                    <div style="display:flex;align-items: center;margin-bottom:10px;">
13
+                        <el-input size="small"  v-model.trim="search_input" class="filter-item" style="width:140px;"/>
14
+                        <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary"  @click="searchAction">搜索</el-button>
15
+                        <span>日期:</span>
16
+                        <el-date-picker
17
+                        size="small"
18
+                        style="width:140px;margin:0 10px;"
19
+                        v-model="start_time"
20
+                        type="date"
21
+                        placeholder="选择日期"
22
+                        @change="changeStarTime">
23
+                        </el-date-picker>
24
+                        <el-date-picker
25
+                        style="width:140px;"
26
+                        size="small"
27
+                        v-model="end_time"
28
+                        type="date"
29
+                        placeholder="选择日期"
30
+                        @change="changeEndTime">
31
+                        </el-date-picker>
32
+                    </div>
33
+                    <el-table :data="tempalateData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
34
+                        <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
35
+                        <el-table-column align="center" prop="name" width="60" label="病历编号">
36
+                            <template slot-scope="scope">{{ scope.row.id }}</template>
37
+                        </el-table-column>
38
+                        <el-table-column align="center" prop="name" label="名称">
39
+                            <template slot-scope="scope">{{ scope.row.template_name }}</template>
40
+                        </el-table-column>
41
+                        <el-table-column align="center" prop="name" label="创建人">
42
+                            <template slot-scope="scope">{{ scope.row.user_name }}</template>
43
+                        </el-table-column>
44
+                        <el-table-column align="center" prop="name" label="创建日期">
45
+                            <template slot-scope="scope">{{getTimes(scope.row.record_date) }}</template>
46
+                        </el-table-column>
47
+                        <el-table-column align="center" prop="name" label="模板说明">
48
+                            <template slot-scope="scope">{{ scope.row.template_remark }}</template>
49
+                        </el-table-column>
50
+                        <el-table-column align="center" prop="name" label="操作" width='200'>
51
+                            <template slot-scope="scope">
52
+                                <el-button type="primary" size="mini" @click="totemplateDetailTwo(scope.row.id)">调用</el-button>
53
+                                <el-button type="primary" size="mini" @click="totemplateDetail(scope.row.id)">详情</el-button>
54
+                            </template>
55
+                        </el-table-column>
56
+                    </el-table>
57
+                </el-tab-pane>
58
+            </el-tabs>
59
+        </div>
60
+        <record-history-detail ref="recordHistoryDetail"></record-history-detail>
61
+        <record-template-detail ref="recordTemplateDetail"></record-template-detail>
62
+        <div slot="footer" class="dialog-footer">
63
+            <el-button @click="hide">取 消</el-button>
64
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
65
+        </div>
66
+    </el-dialog>
67
+</template>
68
+
69
+<script>
70
+import recordHistoryDetail from './recordHistoryDetail'
71
+import recordTemplateDetail from './recordTemplateDetail'
72
+import { getHistoryTemplate } from "@/api/project/project"
73
+import { uParseTime } from '@/utils/tools'
74
+export default {
75
+    components:{
76
+        recordHistoryDetail,
77
+        recordTemplateDetail
78
+    },
79
+    data(){
80
+        return{
81
+            visible:false,
82
+            activeName:'first',
83
+            form:{
84
+                name:''
85
+            },
86
+            tableData: [],
87
+            tempalateData:[],
88
+            value1:"",
89
+            search_input:"",
90
+            start_time:"",
91
+            end_time:"",
92
+            mode_status:0,
93
+        }
94
+    },
95
+    methods:{
96
+        _close: function(done) {
97
+            // this.clear()
98
+            done()
99
+        },
100
+        clear: function() {
101
+            this.form.id = 0;
102
+            this.form.name = "";
103
+            this.form.intro = "";
104
+        },
105
+        show(id) {
106
+            this.mode_status = id;
107
+            this.getlist();
108
+            this.visible = true
109
+        },
110
+        hide() {
111
+            // this.clear()
112
+            this.visible = false
113
+        },
114
+        toHistoryDetail(){
115
+            this.$refs.recordHistoryDetail.show()
116
+        },
117
+        totemplateDetail(id){
118
+            this.$refs.recordTemplateDetail.show(id)
119
+        },
120
+        totemplateDetailTwo(id){
121
+         this.$emit('func',id);
122
+         this.visible = false
123
+        },
124
+        //获取历史数据历史模板
125
+        getlist(){
126
+
127
+            const params = {
128
+               keyword:this.search_input,
129
+               start_time:this.start_time,
130
+               end_time:this.end_time
131
+            };
132
+
133
+          getHistoryTemplate(params).then(response=>{
134
+            if(response.data.state == 1){
135
+              var template =  response.data.data.template;
136
+              console.log("templagte",template);
137
+              this.tempalateData = template
138
+            }
139
+          })
140
+        },
141
+        searchAction(){
142
+          this.getlist()
143
+        },
144
+        changeStarTime(){
145
+           this.getlist()
146
+        },
147
+        changeEndTime(){
148
+          this.getlist()
149
+        },
150
+        getTimes(time) {
151
+        return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
152
+      },
153
+    },
154
+    created(){
155
+       this.getlist()
156
+    },
157
+
158
+
159
+}
160
+</script>
161
+
162
+<style lang="scss">
163
+.recordDialog{
164
+    .el-dialog__body{
165
+        padding-top:0;
166
+    }
167
+}
168
+</style>
169
+

+ 297 - 0
src/xt_pages/hospitalStation/components/monthPrescriptionTable.vue View File

@@ -0,0 +1,297 @@
1
+<template>
2
+  <div class="prescriptionTable">
3
+    <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
4
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
6
+      <el-table-column align="center" prop="drug_name" label="名称">
7
+        <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
8
+      </el-table-column>
9
+      <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
10
+        <template slot-scope="scope">
11
+          <div style="display:flex;align-items:center;">
12
+            <el-input v-model="scope.row.single_dose" style="width:65%;"></el-input>
13
+            <div>{{scope.row.single_dose_unit}}</div>
14
+          </div>
15
+        </template>
16
+      </el-table-column>
17
+      <el-table-column align="center" prop="delivery_way" width="100" label="用法">
18
+        <template slot-scope="scope">
19
+          <el-select v-model="scope.row.delivery_way" placeholder="请选择">
20
+            <el-option
21
+              readonly
22
+              v-for="(item,index) in drugways"
23
+              :key="index"
24
+              :label="item.name"
25
+              :value="item.name">
26
+            </el-option>
27
+          </el-select>
28
+        </template>
29
+      </el-table-column>
30
+      <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
31
+        <template slot-scope="scope">
32
+          <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
33
+            <el-option
34
+              readonly
35
+              v-for="item,index in efs"
36
+              :key="index"
37
+              :label="item.name"
38
+              :value="item.name">
39
+            </el-option>
40
+          </el-select>
41
+        </template>
42
+      </el-table-column>
43
+
44
+
45
+      <el-table-column align="center" prop="day" width="50" label="天数">
46
+        <template slot-scope="scope">
47
+          <el-input v-model="scope.row.day" placeholder="" readonly></el-input>
48
+          <div>{{'天'}}</div>
49
+        </template>
50
+      </el-table-column>
51
+
52
+      <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
53
+        <template slot-scope="scope">
54
+          <div style="display:flex;align-items:center;">
55
+            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder="" readonly></el-input>
56
+            <div> {{scope.row.prescribing_number_unit}}</div>
57
+          </div>
58
+        </template>
59
+      </el-table-column>
60
+      <el-table-column align="center" prop="retail_price" width="60" label="单价">
61
+        <template slot-scope="scope">
62
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
63
+          <div>{{'元'}}</div>
64
+        </template>
65
+      </el-table-column>
66
+      <el-table-column align="center" prop="remark" width="50" label="备注">
67
+        <template slot-scope="scope">
68
+          <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>
69
+        </template>
70
+      </el-table-column>
71
+    </el-table>
72
+
73
+    <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
74
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
75
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
76
+      <el-table-column align="center" prop="project_name" label="名称">
77
+        <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
78
+      </el-table-column>
79
+      <el-table-column align="center" prop="statistical_classification" width="100" label="组">
80
+        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
81
+      </el-table-column>
82
+      <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
83
+        <template slot-scope="scope">
84
+          <el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>
85
+          <div>{{scope.row.unit}}</div>
86
+
87
+        </template>
88
+      </el-table-column>
89
+      <el-table-column align="center" prop="delivery_way" width="80" label="用法">
90
+        <template slot-scope="scope">
91
+          <el-autocomplete
92
+            readonly
93
+            style="width:100%;"
94
+            class="inline-input"
95
+            v-model="scope.row.delivery_way"
96
+            :fetch-suggestions="querySearch2"
97
+            placeholder="请输入内容"
98
+          ></el-autocomplete>
99
+        </template>
100
+      </el-table-column>
101
+      <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
102
+        <template slot-scope="scope">
103
+          <el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>
104
+        </template>
105
+      </el-table-column>
106
+      <el-table-column align="center" prop="number_days" width="50" label="天数">
107
+        <template slot-scope="scope">
108
+          <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
109
+          <div>{{'天'}}</div>
110
+        </template>
111
+      </el-table-column>
112
+      <el-table-column align="center" prop="total" width="70" label="总量">
113
+        <template slot-scope="scope">
114
+          <div style="display:flex;align-items:center;">
115
+            <el-input v-model="scope.row.total" style="width:60%" placeholder="" readonly></el-input>
116
+            <div>{{scope.row.unit}}</div>
117
+          </div>
118
+        </template>
119
+      </el-table-column>
120
+      <el-table-column align="center" prop="name" width="50" label="单价">
121
+        <template slot-scope="scope">
122
+          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
123
+          <div>{{'元'}}</div>
124
+        </template>
125
+      </el-table-column>
126
+      <el-table-column align="center" prop="name" width="50" label="备注">
127
+        <template slot-scope="scope">
128
+          <el-input v-model="scope.row.remark" :title="scope.row.remark" readonly></el-input>
129
+        </template>
130
+      </el-table-column>
131
+    </el-table>
132
+    <div class="additionalBox">
133
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
134
+        <span :title="item.item_name">{{item.item_name}}</span>
135
+        <el-input v-model="item.price" placeholder="" style="width:50px;"></el-input>
136
+        共
137
+        <el-input v-model="item.count" placeholder="" style="width:50px;"></el-input>
138
+        次
139
+        <i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>
140
+      </div>
141
+    </div>
142
+  </div>
143
+</template>
144
+
145
+<script>
146
+  import { getDictionaryDataConfig} from "@/utils/data";
147
+  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
148
+
149
+  export default {
150
+    props: {
151
+      preDrugs: Array,
152
+      activeType: Number,
153
+      addtions_charge:Array,
154
+      prescription:{
155
+        type:Object,
156
+        default: function () {
157
+          return {
158
+            name:"",
159
+            advices:[],
160
+            project:[],
161
+            drugways:[],
162
+            efs:[],
163
+          };
164
+        }
165
+      },
166
+    },
167
+    data() {
168
+      return {
169
+        advices:[],
170
+        tableData: [],
171
+        newoptions: [{
172
+          value: '1',
173
+          label: '1'
174
+        }, {
175
+          value: '2',
176
+          label: '2'
177
+        }, {
178
+          value: '3',
179
+          label: '3'
180
+        }, {
181
+          value: '4',
182
+          label: '4'
183
+        }, {
184
+          value: '5',
185
+          label: '5'
186
+        }],
187
+        value: '1',
188
+        input: 1,
189
+      }
190
+    },
191
+    methods:{
192
+      createFilter(queryString) {
193
+        return (restaurant) => {
194
+          return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
195
+        }
196
+      },
197
+      querySearch2(queryString, cb) {
198
+        var restaurants = this.getDictionaryDataConfig("system","project_use");
199
+        restaurants.map(item => {
200
+          item.value = item.name
201
+        });
202
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
203
+        // 调用 callback 返回建议列表的数据
204
+        cb(results)
205
+      },
206
+      getInitData(){
207
+        getInitData().then(response => {
208
+          if (response.data.state == 0) {
209
+            this.$message.error(response.data.msg);
210
+            return false
211
+          } else {
212
+            this.drugways = response.data.data.drugways;
213
+            this.efs = response.data.data.efs
214
+          }
215
+        })
216
+      },
217
+      deepClone(source) {
218
+        if (!source && typeof source !== 'object') {
219
+          throw new Error('error arguments', 'shallowClone')
220
+        }
221
+        const targetObj = source.constructor === Array ? [] : {};
222
+        Object.keys(source).forEach((keys) => {
223
+          if (source[keys] && typeof source[keys] === 'object') {
224
+            targetObj[keys] = this.deepClone(source[keys])
225
+          } else {
226
+            targetObj[keys] = source[keys]
227
+          }
228
+        });
229
+        return targetObj
230
+      },
231
+      setNewData:function(data){
232
+        this.prescription = data
233
+      },
234
+      getDictionaryDataConfig(module, filed_name) {
235
+        return getDictionaryDataConfig(module, filed_name)
236
+      },
237
+      getGroup(id){
238
+        var name = "";
239
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category');
240
+        for(let i=0;i<statistics_category.length;i++){
241
+          if(id == statistics_category[i].id){
242
+            name = statistics_category[i].name
243
+          }
244
+        }
245
+        return name
246
+      },
247
+    },mounted(){
248
+      this.getInitData()
249
+    },
250
+  }
251
+</script>
252
+
253
+<style lang="scss">
254
+  .prescriptionTable {
255
+
256
+  .el-input__inner {
257
+    padding: 0 5px;
258
+  }
259
+
260
+  .additionalBox {
261
+    margin-top: 20px;
262
+    display: flex;
263
+    flex-wrap: wrap;
264
+
265
+  .additionalOne {
266
+    margin-right: 20px;
267
+    margin-bottom: 10px;
268
+    display: flex;
269
+    align-items: center;
270
+
271
+  > span {
272
+    white-space: nowrap;
273
+    overflow: hidden;
274
+    text-overflow: ellipsis;
275
+    width: 80px;
276
+    display: inline-block;
277
+    font-size: 14px;
278
+  }
279
+
280
+  .deleteIcon {
281
+    color: red;
282
+    margin-left: 5px;
283
+  }
284
+
285
+  }
286
+  .el-table th .cell, .el-table td .cell {
287
+    padding: 0 2px;
288
+    white-space: pre-line;
289
+  }
290
+
291
+  .el-icon-delete {
292
+    color: red;
293
+  }
294
+
295
+  }
296
+  }
297
+</style>

+ 201 - 0
src/xt_pages/hospitalStation/components/newPrescriptionTable.vue View File

@@ -0,0 +1,201 @@
1
+<template>
2
+  <div class="prescriptionTable">
3
+    <el-table v-if="prescription.type == 1" :data="prescription.advices" border style="width: 100%;"
4
+              :row-style="{ color: '#303133' }"
5
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7
+      <el-table-column align="center" prop="name" label="名称">
8
+        <template slot-scope="scope">{{ scope.row.drug_name }}</template>
9
+      </el-table-column>
10
+
11
+      <el-table-column align="center" prop="name" width="100" label="单次用量">
12
+        <template slot-scope="scope">
13
+          <div>{{ scope.row.single_dose }} &nbsp;&nbsp; {{scope.row.single_dose_unit}}</div>
14
+        </template>
15
+      </el-table-column>
16
+      <el-table-column align="center" prop="name" width="90" label="用法">
17
+        <template slot-scope="scope">
18
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
19
+          <div> {{scope.row.delivery_way}}</div>
20
+
21
+
22
+        </template>
23
+      </el-table-column>
24
+      <el-table-column align="center" prop="name" width="90" label="频率">
25
+        <template slot-scope="scope">
26
+          <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
27
+          <div> {{scope.row.execution_frequency}}</div>
28
+
29
+        </template>
30
+      </el-table-column>
31
+      <el-table-column align="center" prop="day" width="50" label="天数">
32
+        <template slot-scope="scope">
33
+          <div>{{ scope.row.day }}天</div>
34
+        </template>
35
+      </el-table-column>
36
+
37
+      <el-table-column align="center" prop="name" width="100" label="总量">
38
+        <template slot-scope="scope">
39
+          <div>{{scope.row.prescribing_number}} {{scope.row.prescribing_number_unit}}</div>
40
+        </template>
41
+      </el-table-column>
42
+      <el-table-column align="center" prop="name" width="80" label="单价">
43
+        <template slot-scope="scope">
44
+          <div> {{scope.row.retail_price}}元</div>
45
+
46
+          <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
47
+        </template>
48
+      </el-table-column>
49
+      <el-table-column align="center" prop="name" width="80" label="备注">
50
+        <template slot-scope="scope">
51
+          <!--<el-input v-model="scope.row.remark" style="width:50%" placeholder="" readonly></el-input>-->
52
+          <div> {{scope.row.remark}}</div>
53
+
54
+        </template>
55
+      </el-table-column>
56
+    </el-table>
57
+    <el-table v-if="prescription.type == 2" :data="prescription.project" border style="width: 99%;"
58
+              :row-style="{ color: '#303133' }"
59
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
60
+
61
+      <el-table-column align="center" prop="project_name" label="名称">
62
+        <template slot-scope="scope">{{ scope.row.project_name }}</template>
63
+      </el-table-column>
64
+      <el-table-column align="center" prop="statistical_classification" width="100" label="组">
65
+        <template slot-scope="scope">
66
+          <div>{{getGroup(scope.row.statistical_classification)}}</div>
67
+        </template>
68
+      </el-table-column>
69
+      <el-table-column align="center" prop="single_dose" width="100" label="单次用量">
70
+        <template slot-scope="scope">
71
+          <!--<el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>-->
72
+          <div> {{scope.row.single_dose}}{{scope.row.unit}}</div>
73
+
74
+        </template>
75
+      </el-table-column>
76
+      <el-table-column align="center" prop="delivery_way" width="130" label="用法">
77
+        <template slot-scope="scope">
78
+          <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
79
+          <div> {{scope.row.delivery_way}}</div>
80
+
81
+        </template>
82
+      </el-table-column>
83
+      <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
84
+        <template slot-scope="scope">
85
+          <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
86
+          <div> {{scope.row.execution_frequency}}</div>
87
+
88
+        </template>
89
+      </el-table-column>
90
+      <el-table-column align="center" prop="number_days" width="100" label="天数">
91
+        <template slot-scope="scope">
92
+          <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
93
+          <div> {{scope.row.number_days}}天</div>
94
+
95
+        </template>
96
+      </el-table-column>
97
+      <el-table-column align="center" prop="total" width="80" label="总量">
98
+        <template slot-scope="scope">
99
+            <div> {{scope.row.total}}{{scope.row.unit}}</div>
100
+        </template>
101
+      </el-table-column>
102
+      <el-table-column align="center" prop="name" width="70" label="单价">
103
+        <template slot-scope="scope">
104
+          <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
105
+          <div> {{scope.row.price}}元</div>
106
+
107
+        </template>
108
+      </el-table-column>
109
+      <el-table-column align="center" prop="name" width="120" label="备注">
110
+        <template slot-scope="scope">
111
+          <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
112
+          <div> {{scope.row.remark}}</div>
113
+
114
+        </template>
115
+      </el-table-column>
116
+    </el-table>
117
+  </div>
118
+
119
+
120
+
121
+
122
+
123
+</template>
124
+
125
+<script>
126
+  import { getInitData } from '@/api/his/his'
127
+  import { getDictionaryDataConfig} from "@/utils/data";
128
+
129
+  export default {
130
+    props: {
131
+      prescription: Object
132
+    },
133
+    data() {
134
+      return {
135
+        drugways: [],
136
+        efs: []
137
+      }
138
+    }, mounted() {
139
+      getInitData().then(response => {
140
+        if (response.data.state == 0) {
141
+          this.$message.error(response.data.msg);
142
+          return false
143
+        } else {
144
+          this.drugways = response.data.data.drugways;
145
+          this.efs = response.data.data.efs
146
+        }
147
+      })
148
+    }, methods:  {
149
+
150
+
151
+      getGroup(id){
152
+        var name = "";
153
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category');
154
+        console.log("2235",statistics_category);
155
+        for(let i=0;i<statistics_category.length;i++){
156
+          if(id == statistics_category[i].id){
157
+            name = statistics_category[i].name
158
+          }
159
+        }
160
+        return name
161
+      },
162
+
163
+
164
+    }
165
+  }
166
+</script>
167
+
168
+<style lang="scss">
169
+  .prescriptionTable{
170
+  .additionalBox{
171
+    margin-top: 20px;
172
+    display: flex;
173
+    flex-wrap: wrap;
174
+  .additionalOne{
175
+    margin-right:20px;
176
+    margin-bottom:10px;
177
+    display: flex;
178
+    align-items: center;
179
+  >span{
180
+    white-space: nowrap;
181
+    overflow: hidden;
182
+    text-overflow: ellipsis;
183
+    width:60px;
184
+    display: inline-block;
185
+    font-size: 14px;
186
+  }
187
+  }
188
+  .deleteIcon{
189
+    color:red;
190
+    margin-left:5px;
191
+  }
192
+  }
193
+  .el-table th .cell, .el-table td .cell{
194
+    padding: 0 2px;
195
+    white-space: pre-line;
196
+  }
197
+  .el-icon-delete{
198
+    color:red;
199
+  }
200
+  }
201
+</style>

+ 417 - 0
src/xt_pages/hospitalStation/components/nextOrLastPrescription.vue View File

@@ -0,0 +1,417 @@
1
+<template>
2
+  <el-dialog
3
+    :title="name"
4
+    :visible.sync="isLastOrNextVisible"
5
+    @close="hide"
6
+    width="1010px"
7
+    :modal-append-to-body="false"
8
+    class="isLastOrNext"
9
+  >
10
+    <div class="txsj" style="text-align:center;">
11
+      <el-button
12
+        round
13
+
14
+        @click="openLast(3)"
15
+      >上一方
16
+      </el-button>
17
+
18
+      <el-button
19
+        round
20
+        @click="openNext(4)"
21
+      >下一方
22
+      </el-button>
23
+    </div>
24
+
25
+    <div v-for="(item,index) in allPrescription" :key="index">
26
+      <div class="quote">引用 {{getTime(item.record_date, '{y}年{m}月{d}日')}} 的处方</div>
27
+      <el-checkbox-group v-model="item.check_group">
28
+        <div v-for="(subItem,index2) in item.prescriptions" :key="index2">
29
+          <el-checkbox style="margin:10px 0;" :label="subItem.id">{{'处方' + (index2+ 1)}}</el-checkbox>
30
+          <el-table v-if="subItem.type  == 1" :data="subItem.doctor_advice" border style="width: 99%;"
31
+                    :row-style="{ color: '#303133' }"
32
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
33
+            <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
34
+            <el-table-column align="center" prop="drug_name"  width="160" label="名称">
35
+              <template slot-scope="scope">
36
+                <span>{{ scope.row.advice_name }}</span>
37
+              </template>
38
+            </el-table-column>
39
+
40
+            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
41
+              <template slot-scope="scope">
42
+                  <div>{{scope.row.single_dose}}{{scope.row.single_dose_unit}}</div>
43
+              </template>
44
+            </el-table-column>
45
+            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
46
+              <template slot-scope="scope">
47
+                {{scope.row.delivery_way}}
48
+              </template>
49
+            </el-table-column>
50
+            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
51
+              <template slot-scope="scope">
52
+                {{scope.row.execution_frequency}}
53
+              </template>
54
+            </el-table-column>
55
+
56
+            <el-table-column align="center" prop="day" width="60" label="天数">
57
+              <template slot-scope="scope">
58
+                {{scope.row.day}}
59
+              </template>
60
+            </el-table-column>
61
+
62
+            <el-table-column align="center" prop="prescribing_number" width="100" label="总量">
63
+              <template slot-scope="scope">
64
+                <div>{{scope.row.prescribing_number}} {{scope.row.prescribing_number_unit}}</div>
65
+              </template>
66
+            </el-table-column>
67
+            <el-table-column align="center" prop="retail_price" width="80" label="单价">
68
+              <template slot-scope="scope">
69
+                <div>{{scope.row.retail_price}}</div>
70
+              </template>
71
+            </el-table-column>
72
+            <el-table-column align="center" prop="remark" label="备注">
73
+              <template slot-scope="scope">
74
+                <div>{{scope.row.remark}}</div>
75
+              </template>
76
+            </el-table-column>
77
+          </el-table>
78
+          <el-table v-if="subItem.type == 2" :data="subItem.project" border style="width: 99%;"
79
+                    :row-style="{ color: '#303133' }"
80
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
81
+            <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
82
+            <el-table-column align="center" prop="project_name" width="160" label="名称">
83
+              <template slot-scope="scope">
84
+                <span>{{ scope.row.project.project_name }}</span>
85
+              </template>
86
+            </el-table-column>
87
+            <el-table-column align="center" prop="statistical_classification" width="100" label="组">
88
+              <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
89
+            </el-table-column>
90
+            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
91
+              <template slot-scope="scope">
92
+                <!--<el-input v-model="scope.row.single_dose" placeholder=""></el-input>-->
93
+                <span>{{ scope.row.single_dose }}</span>
94
+
95
+              </template>
96
+            </el-table-column>
97
+            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
98
+              <template slot-scope="scope">
99
+                <!--<el-input v-model="scope.row.delivery_way" placeholder=""></el-input>-->
100
+                <span>{{ scope.row.delivery_way }}</span>
101
+
102
+              </template>
103
+            </el-table-column>
104
+            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
105
+              <template slot-scope="scope">
106
+                <!--<el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>-->
107
+                <span>{{ scope.row.execution_frequency }}</span>
108
+
109
+              </template>
110
+            </el-table-column>
111
+            <el-table-column align="center" prop="number_days" width="70" label="天数">
112
+              <template slot-scope="scope">
113
+                <!--<el-input v-model="scope.row.number_days" placeholder=""></el-input>-->
114
+                <span>{{ scope.row.number_days }}</span>
115
+
116
+              </template>
117
+            </el-table-column>
118
+            <el-table-column align="center" prop="total" width="70" label="总量">
119
+              <template slot-scope="scope">
120
+                  <div>{{ scope.row.total }}{{scope.row.unit}}</div>
121
+              </template>
122
+            </el-table-column>
123
+            <el-table-column align="center" prop="name" width="60" label="单价">
124
+              <template slot-scope="scope">
125
+                <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
126
+                <span>{{ scope.row.price }}</span>
127
+
128
+              </template>
129
+            </el-table-column>
130
+            <el-table-column align="center" prop="name" label="备注">
131
+              <template slot-scope="scope">
132
+                <!--<el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>-->
133
+                <span>{{ scope.row.remark }}</span>
134
+
135
+              </template>
136
+            </el-table-column>
137
+          </el-table>
138
+        </div>
139
+      </el-checkbox-group>
140
+
141
+    </div>
142
+
143
+
144
+    <div slot="footer" class="dialog-footer">
145
+      <el-button @click="isLastOrNextVisible = false">取 消</el-button>
146
+      <el-button type="primary" @click="save">保存</el-button>
147
+    </div>
148
+  </el-dialog>
149
+
150
+
151
+</template>
152
+
153
+<script>
154
+  import { uParseTime } from '@/utils/tools'
155
+  import { getDictionaryDataConfig} from "@/utils/data";
156
+
157
+  import {
158
+    getNextOrLastHisPrescription
159
+  } from '@/api/his/his'
160
+  export default {
161
+    name: "nextOrLastPrescription",
162
+    data() {
163
+      return {
164
+        srcPrescriptions:[],
165
+        name:"",
166
+        request_record_date:'',
167
+        patient_id:0,
168
+         allPrescription: [
169
+          {
170
+            check_group: [],
171
+            prescriptions: [
172
+              {
173
+                id: 5,
174
+
175
+                type: 1,
176
+                doctor_advice: [],
177
+                project: [],
178
+              },
179
+              {
180
+                id: 8,
181
+                type: 1,
182
+                doctor_advice: [],
183
+                project: [],
184
+              },
185
+              {
186
+                id: 6,
187
+
188
+                type: 2,
189
+                doctor_advice: [],
190
+                project: [],
191
+              },
192
+              {
193
+                id: 7,
194
+                type: 2,
195
+                doctor_advice: [],
196
+                project: [],
197
+              },
198
+            ],
199
+          }, {
200
+            check_group: [],
201
+            prescriptions: [
202
+              {
203
+                id: 1,
204
+                type: 2,
205
+                doctor_advice: [],
206
+                project: [],
207
+              },
208
+              {
209
+
210
+                id: 2,
211
+                type: 2,
212
+                doctor_advice: [],
213
+                project: [],
214
+              },
215
+              {
216
+                id: 3,
217
+
218
+                type: 1,
219
+                doctor_advice: [],
220
+                project: [],
221
+              },
222
+              {
223
+                id: 4,
224
+
225
+                type: 1,
226
+                doctor_advice: [],
227
+                project: [],
228
+              },
229
+            ],
230
+          }
231
+        ],
232
+
233
+        isLastOrNextVisible: false,
234
+
235
+      }
236
+    }, methods: {
237
+      openLast(val) {
238
+       if (val == 3) {
239
+          let params = {
240
+            patient_id: this.patient_id,
241
+            record_time: this.request_record_date,
242
+            type: 1
243
+          };
244
+
245
+          this.GetNextOrLastHisPrescription(params)
246
+
247
+        }
248
+      },
249
+      openNext(val) {
250
+        if (val == 4) {
251
+          let params = {
252
+            patient_id: this.patient_id,
253
+            record_time: this.request_record_date,
254
+            type: 2
255
+          };
256
+          this.GetNextOrLastHisPrescription(params)
257
+        }
258
+      },
259
+      GetNextOrLastHisPrescription(params){
260
+        getNextOrLastHisPrescription(params).then(response => {
261
+          if (response.data.state == 1) {
262
+            this.allPrescription = response.data.data.prescriptions;
263
+            for (let i = 0; i < this.allPrescription.length; i++){
264
+              this.allPrescription[i].check_group = []
265
+            }
266
+            this.request_record_date = uParseTime(response.data.data.prescriptions[0].record_date, '{y}-{m}-{d}')
267
+          } else {
268
+            this.$message.error(response.data.msg)
269
+
270
+          }
271
+        })
272
+      },
273
+      save() {
274
+        let replace_one = [];
275
+        let replace_two = [];
276
+
277
+        let checkGroup = [];
278
+        let allPrescriptions = [];
279
+        let targetPrescriptions = [];
280
+        let prescriptions = [];
281
+        for (let i = 0; i < this.allPrescription.length; i++) {
282
+          for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
283
+            checkGroup.push(this.allPrescription[i].check_group[a])
284
+          }
285
+          for (let a = 0; a < this.allPrescription[i].prescriptions.length; a++) {
286
+            allPrescriptions.push(this.allPrescription[i].prescriptions[a])
287
+          }
288
+        }
289
+        for (let i = 0; i < allPrescriptions.length; i++){
290
+          for (let a = 0; a < checkGroup.length; a++){
291
+            if(allPrescriptions[i].id == checkGroup[a]){
292
+              targetPrescriptions.push(allPrescriptions[i])
293
+            }
294
+          }
295
+        }
296
+
297
+        if (targetPrescriptions.length > 0) {
298
+          for (let i = 0; i < targetPrescriptions.length; i++) {
299
+            var prescription = targetPrescriptions[i];
300
+            let tempAdvice = [];
301
+            let tempProject = [];
302
+            let tempAddition = [];
303
+            for (let b = 0; b < prescription.doctor_advice.length; b++) {
304
+              let obj = {
305
+                advice_id: 0,
306
+                drug_name: prescription.doctor_advice[b].advice_name,
307
+                single_dose: prescription.doctor_advice[b].single_dose,
308
+                delivery_way: prescription.doctor_advice[b].delivery_way,
309
+                execution_frequency: prescription.doctor_advice[b].execution_frequency,
310
+                retail_price: prescription.doctor_advice[b].price.toString(),
311
+                remark: prescription.doctor_advice[b].remark,
312
+                day:prescription.doctor_advice[b].day,
313
+                prescribing_number:prescription.doctor_advice[b].prescribing_number.toString(),
314
+                single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
315
+                prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
316
+                medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
317
+                id:prescription.doctor_advice[b].drug_id
318
+              };
319
+              tempAdvice.push(obj)
320
+
321
+            }
322
+
323
+
324
+            for (let b = 0; b < prescription.project.length; b++) {
325
+              let obj = {
326
+                id: 0,
327
+                project_id: prescription.project[b].project_id,
328
+                project_name: prescription.project[b].project.project_name,
329
+                statistical_classification: prescription.project[b].project.statistical_classification,
330
+                single_dose: prescription.project[b].single_dose,
331
+                delivery_way: prescription.project[b].delivery_way,
332
+                execution_frequency: prescription.project[b].execution_frequency,
333
+                number_days: prescription.project[b].day,
334
+                total:prescription.project[b].count.toString(),
335
+                price:prescription.project[b].price,
336
+                remark:prescription.project[b].remark,
337
+                medical_code:prescription.project[b].project.medical_code,
338
+              };
339
+              tempProject.push(obj)
340
+            }
341
+            let obj = {
342
+              id: 0,
343
+              advices: tempAdvice,
344
+              project: tempProject,
345
+              addition:tempAddition,
346
+              order_status:0,
347
+              // type: type,
348
+            };
349
+            prescriptions.push(obj)
350
+          }
351
+        }
352
+
353
+        console.log(this.srcPrescriptions);
354
+
355
+        if(this.srcPrescriptions.length == 1){
356
+          if(this.srcPrescriptions[0].advices.length == 0 && this.srcPrescriptions[0].project.length == 0){
357
+            this.srcPrescriptions = [];
358
+            this.srcPrescriptions = prescriptions;
359
+            this.$emit('save', this.srcPrescriptions)
360
+          }else{
361
+
362
+            this.srcPrescriptions =  this.srcPrescriptions.concat(prescriptions);
363
+            this.$emit('save', this.srcPrescriptions)
364
+          }
365
+        }else{
366
+          this.srcPrescriptions =  this.srcPrescriptions.concat(prescriptions);
367
+          this.$emit('save', this.srcPrescriptions)
368
+        }
369
+
370
+
371
+
372
+      },show(prescriptions,name,id,srcPrescriptions){
373
+        this.srcPrescriptions = srcPrescriptions;
374
+        this.patient_id = id;
375
+        this.request_record_date = uParseTime(prescriptions[0].record_date, '{y}-{m}-{d}');
376
+        this.name = name;
377
+        this.allPrescription = prescriptions;
378
+        for (let i = 0; i < this.allPrescription.length; i++){
379
+          this.allPrescription[i].check_group = []
380
+        }
381
+        console.log(this.allPrescription);
382
+        this.isLastOrNextVisible = true
383
+      },close(){
384
+        this.isLastOrNextVisible = false
385
+      },hide(){
386
+        this.$emit('cancel')
387
+
388
+      },getTime(time, template){
389
+        return uParseTime(time,template)
390
+
391
+      }, getGroup(id){
392
+        var name = "";
393
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category');
394
+        for(let i=0;i<statistics_category.length;i++){
395
+          if(id == statistics_category[i].id){
396
+            name = statistics_category[i].name
397
+          }
398
+        }
399
+        return name
400
+      },   getDictionaryDataConfig(module, filed_name) {
401
+        return getDictionaryDataConfig(module, filed_name)
402
+      },
403
+    }
404
+  }
405
+</script>
406
+
407
+<style lang="scss">
408
+.isLastOrNext{
409
+  .el-dialog__body{
410
+    padding:0px 20px 30px;
411
+  }
412
+  .quote{
413
+    margin-top: 10px;
414
+    font-size: 14px;
415
+  }
416
+}
417
+</style>

+ 165 - 0
src/xt_pages/hospitalStation/components/noCharge.vue View File

@@ -0,0 +1,165 @@
1
+<template>
2
+    <div style="display:flex;">
3
+        <div class="noChargeLeft">
4
+            <div class="mainCell" style="margin-bottom:10px;">
5
+                <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
6
+                <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
7
+            </div>
8
+            <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
9
+                <el-table-column align="center" prop="name" label="处方号" width="100">
10
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
11
+                </el-table-column>
12
+                <el-table-column align="center" prop="name" label="姓名" width="99">
13
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
14
+                </el-table-column>
15
+            </el-table>
16
+        </div>
17
+        <div style="flex:1;overflow-x: hidden;">
18
+            <div class="noChargeRight">
19
+                <div class="chargeInfo">
20
+                    <p>姓名:<span></span></p>
21
+                    <p>性别:<span></span></p>
22
+                    <p>年龄:<span></span></p>
23
+                    <p>证件号:<span></span></p>
24
+                    <p>挂号类型:<span></span></p>
25
+                    <p>上一个发票号:<span></span></p>
26
+                    <p>下一个发票号:<span></span></p>
27
+                </div>
28
+                <div class="chargeBox">
29
+                    <p>医疗费用总额:<span></span></p>
30
+                    <p>基金支付金额:<span></span></p>
31
+                    <p>个人账户支付金额:<span></span></p>
32
+                    <p>个人支付金额:<span></span></p>
33
+                    <p>个人账号金额:<span></span></p>
34
+                </div>
35
+                <p class='chargeTitle'>药品信息</p>
36
+                <el-table :data="tableData" border height="200" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
37
+                    <el-table-column align="center" prop="name" label="名称">
38
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
39
+                    </el-table-column>
40
+                    <el-table-column align="center" prop="name" label="单位">
41
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
42
+                    </el-table-column>
43
+                    <el-table-column align="center" prop="name" label="单价(元)">
44
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
45
+                    </el-table-column>
46
+                    <el-table-column align="center" prop="name" label="数量">
47
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
48
+                    </el-table-column>
49
+                    <el-table-column align="center" prop="name" label="总价">
50
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
51
+                    </el-table-column>
52
+                    <el-table-column align="center" prop="name" label="自付比例">
53
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
54
+                    </el-table-column>
55
+                </el-table>
56
+                <p class='chargeTitle'>项目信息</p>
57
+                <el-table :data="tableData" border height="200" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
58
+                    <el-table-column align="center" prop="name" label="名称">
59
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
60
+                    </el-table-column>
61
+                    <el-table-column align="center" prop="name" label="科室">
62
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
63
+                    </el-table-column>
64
+                    <el-table-column align="center" prop="name" label="单价(元)">
65
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
66
+                    </el-table-column>
67
+                    <el-table-column align="center" prop="name" label="数量">
68
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
69
+                    </el-table-column>
70
+                    <el-table-column align="center" prop="name" label="总价">
71
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
72
+                    </el-table-column>
73
+                    <el-table-column align="center" prop="name" label="自付比例">
74
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
75
+                    </el-table-column>
76
+                </el-table>
77
+                <div class='chargeBtn'>
78
+                    <p>总金额:0元</p>
79
+                    <div>
80
+                        <el-button>预结算</el-button>
81
+                        <el-button type="primary">结算保存</el-button>
82
+                    </div>
83
+                </div>
84
+            </div>
85
+        </div>
86
+    </div>
87
+</template>
88
+
89
+<script>
90
+export default {
91
+    data(){
92
+        return{
93
+            tableData: [{
94
+            date: '2016-05-02',
95
+            name: '王小虎',
96
+            address: '上海市普陀区金沙江路 1518 弄'
97
+            }, {
98
+            date: '2016-05-04',
99
+            name: '王小虎',
100
+            address: '上海市普陀区金沙江路 1517 弄'
101
+            }, {
102
+            date: '2016-05-01',
103
+            name: '王小虎',
104
+            address: '上海市普陀区金沙江路 1519 弄'
105
+            }, {
106
+            date: '2016-05-03',
107
+            name: '王小虎',
108
+            address: '上海市普陀区金沙江路 1516 弄'
109
+            }]
110
+        }
111
+    }
112
+}
113
+</script>
114
+
115
+
116
+<style lang="scss" scoped>
117
+.noChargeLeft{
118
+    width:200px;
119
+    .mainCell{
120
+        display: flex;
121
+    }
122
+}
123
+.noChargeRight{
124
+    margin-left:20px;
125
+    // flex: 1;
126
+    .chargeInfo{
127
+        display: flex;
128
+        justify-content: space-between;
129
+        align-items: center;
130
+        height: 32px;
131
+        margin-bottom: 10px;
132
+        >p{
133
+            display: flex;
134
+        }
135
+        >p>span{
136
+            display: inline-block;
137
+            min-width: 50px;
138
+        }
139
+    }
140
+    .chargeBox{
141
+        height:42px;
142
+        border: 1px solid #EBEEF5;
143
+        display: flex;
144
+        justify-content: space-between;
145
+        background-color: rgb(245, 247, 250);
146
+        color: rgb(96, 98, 102);
147
+        align-items: center;
148
+        padding: 0 20px;
149
+        >p>span{
150
+            display: inline-block;
151
+            min-width: 50px;
152
+        }
153
+    }
154
+    .chargeTitle{
155
+        line-height: 32px;
156
+        height: 32px;
157
+    }
158
+    .chargeBtn{
159
+        display: flex;
160
+        justify-content: space-between;
161
+        align-items: center;
162
+        margin-top: 20px;
163
+    }
164
+}
165
+</style>

+ 151 - 0
src/xt_pages/hospitalStation/components/prescription.vue View File

@@ -0,0 +1,151 @@
1
+<template>
2
+    <el-dialog
3
+        title="开处方"
4
+        width="1000px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+    >
8
+        <div>
9
+            <el-form :model="form" :rules="rules" ref="form" class="perscriptionForm" label-width="140px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
10
+                <el-form-item label="透析模式:" prop="name">
11
+                    <el-input v-model="form.name" placeholder=""></el-input>
12
+                </el-form-item>
13
+                <el-form-item label="透析时长(h): " prop="name">
14
+                    <el-input v-model="form.name" placeholder=""></el-input>
15
+                </el-form-item>
16
+                <el-form-item label="透析时长(min): " prop="name">
17
+                    <el-input v-model="form.name" placeholder=""></el-input>
18
+                </el-form-item>
19
+                <el-form-item label="血流量(ml/min): " prop="name">
20
+                    <el-input v-model="form.name" placeholder=""></el-input>
21
+                </el-form-item>
22
+                <el-form-item label="预充量(L): " prop="name">
23
+                    <el-input v-model="form.name" placeholder=""></el-input>
24
+                </el-form-item>
25
+                <el-form-item label="目标超滤量(L): " prop="name">
26
+                    <el-input v-model="form.name" placeholder=""></el-input>
27
+                </el-form-item>
28
+                <el-form-item label="透析液配方: " prop="name">
29
+                    <el-select v-model="value" style="width:160px;" placeholder="请选择">
30
+                        <el-option
31
+                        v-for="item in options"
32
+                        :key="item.value"
33
+                        :label="item.label"
34
+                        :value="item.value">
35
+                        </el-option>
36
+                    </el-select>
37
+                </el-form-item>
38
+                <el-form-item label="抗凝剂: " prop="name">
39
+                    <el-select v-model="value" style="width:160px;" placeholder="请选择">
40
+                        <el-option
41
+                        v-for="item in options"
42
+                        :key="item.value"
43
+                        :label="item.label"
44
+                        :value="item.value">
45
+                        </el-option>
46
+                    </el-select>
47
+                </el-form-item>
48
+                <el-form-item label="首剂(mg): " prop="name">
49
+                    <el-input v-model="form.name" placeholder=""></el-input>
50
+                </el-form-item>
51
+                <el-form-item label="维持(mg/h): " prop="name">
52
+                    <el-input v-model="form.name" placeholder=""></el-input>
53
+                </el-form-item>
54
+                <el-form-item label="总量(mg): " prop="name">
55
+                    <el-input v-model="form.name" placeholder=""></el-input>
56
+                </el-form-item>
57
+                <el-form-item label="置换量(L): " prop="name">
58
+                    <el-input v-model="form.name" placeholder=""></el-input>
59
+                </el-form-item>
60
+                <el-form-item label="钾(mmol/L): " prop="name">
61
+                    <el-input v-model="form.name" placeholder=""></el-input>
62
+                </el-form-item>
63
+                <el-form-item label="钠(mmol/L): " prop="name">
64
+                    <el-input v-model="form.name" placeholder=""></el-input>
65
+                </el-form-item>
66
+                <el-form-item label="钙(mmol/L): " prop="name">
67
+                    <el-input v-model="form.name" placeholder=""></el-input>
68
+                </el-form-item>
69
+                <el-form-item label="碳酸氢盐(mmol/L): " prop="name">
70
+                    <el-input v-model="form.name" placeholder=""></el-input>
71
+                </el-form-item>
72
+                <el-form-item label="透析液流量(ml/min): " prop="name">
73
+                    <el-input v-model="form.name" placeholder=""></el-input>
74
+                </el-form-item>
75
+                <el-form-item label="透析液温度(℃): " prop="name">
76
+                    <el-input v-model="form.name" placeholder=""></el-input>
77
+                </el-form-item>
78
+                <el-form-item label="透析器/灌流器: " prop="name">
79
+                    <el-input v-model="form.name" placeholder=""></el-input>
80
+                </el-form-item>
81
+                <el-form-item label="体液过多症状: " prop="name">
82
+                    <el-input v-model="form.name" placeholder=""></el-input>
83
+                </el-form-item>
84
+                <el-form-item label="体液过多其他症状: " prop="name">
85
+                    <el-input v-model="form.name" placeholder=""></el-input>
86
+                </el-form-item>
87
+                <el-form-item label="透析前使用特殊药品: " prop="name">
88
+                    <el-input v-model="form.name" placeholder=""></el-input>
89
+                </el-form-item>
90
+                <el-form-item label="透析前使用其他特殊药品: " prop="name">
91
+                    <el-input v-model="form.name" placeholder=""></el-input>
92
+                </el-form-item>
93
+                <el-form-item label="置换液: " prop="name">
94
+                    <el-input v-model="form.name" placeholder=""></el-input>
95
+                </el-form-item>
96
+                <el-form-item label="限制说明 : " style="width:100%;" prop="name">
97
+                    <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"></el-input>
98
+                </el-form-item>
99
+            </el-form>
100
+        </div>
101
+        <div slot="footer" class="dialog-footer">
102
+            <el-button @click="hide">取 消</el-button>
103
+            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
104
+            <el-button type="primary">设为长期处方</el-button>
105
+        </div>
106
+    </el-dialog>         
107
+</template>
108
+
109
+<script>
110
+export default {
111
+    data(){
112
+        return{
113
+            visible:false,
114
+            form:{
115
+                name:''
116
+            },
117
+        }
118
+    },
119
+    methods:{
120
+        _close: function(done) {
121
+            // this.clear()
122
+            done()
123
+        },
124
+        clear: function() {
125
+            this.form.id = 0;
126
+            this.form.name = "";
127
+            this.form.intro = "";
128
+        },
129
+        show() {
130
+            // this.clear()
131
+            this.visible = true
132
+        },
133
+        hide() {
134
+            // this.clear()
135
+            this.visible = false
136
+        },
137
+    }
138
+}
139
+</script>
140
+
141
+<style lang="scss" scoped>
142
+.perscriptionForm{
143
+    .el-form-item{
144
+        width:33%;
145
+    }
146
+    .el-input{
147
+        width:160px;
148
+    }
149
+}
150
+</style>
151
+

+ 464 - 0
src/xt_pages/hospitalStation/components/prescriptionTable.vue View File

@@ -0,0 +1,464 @@
1
+<template>
2
+  <div class="prescriptionTable">
3
+    <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
4
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
6
+      <el-table-column align="center" prop="drug_name" label="名称">
7
+        <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
8
+      </el-table-column>
9
+
10
+      <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
11
+        <template slot-scope="scope">
12
+          <div style="display:flex;align-items:center;">
13
+            <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:65%;"></el-input>
14
+            <div>{{scope.row.single_dose_unit}}</div>
15
+          </div>
16
+        </template>
17
+      </el-table-column>
18
+      <el-table-column align="center" prop="delivery_way" width="100" label="用法">
19
+        <template slot-scope="scope">
20
+          <el-select v-model="scope.row.delivery_way" placeholder="请选择">
21
+            <el-option
22
+              v-for="(item,index) in drugways"
23
+              :key="index"
24
+              :label="item.name"
25
+              :value="item.name">
26
+            </el-option>
27
+          </el-select>
28
+        </template>
29
+      </el-table-column>
30
+      <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
31
+        <template slot-scope="scope">
32
+          <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
33
+            <el-option
34
+              v-for="item,index in efs"
35
+              :key="index"
36
+              :label="item.name"
37
+              :value="item.name">
38
+            </el-option>
39
+          </el-select>
40
+        </template>
41
+      </el-table-column>
42
+
43
+
44
+      <el-table-column align="center" prop="day" width="50" label="天数">
45
+        <template slot-scope="scope">
46
+          <el-input v-model="scope.row.day" @input="getDay(scope)" placeholder=""></el-input>
47
+          <div>{{'天'}}</div>
48
+
49
+        </template>
50
+      </el-table-column>
51
+
52
+      <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
53
+        <template slot-scope="scope">
54
+          <div style="display:flex;align-items:center;">
55
+            <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
56
+            <div> {{scope.row.prescribing_number_unit}}</div>
57
+          </div>
58
+        </template>
59
+      </el-table-column>
60
+      <el-table-column align="center" prop="retail_price" width="60" label="单价">
61
+        <template slot-scope="scope">
62
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
63
+          <div>{{'元'}}</div>
64
+
65
+        </template>
66
+      </el-table-column>
67
+      <el-table-column align="center" prop="remark" width="50" label="备注">
68
+        <template slot-scope="scope">
69
+          <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
70
+        </template>
71
+      </el-table-column>
72
+      <el-table-column align="center" width="40" prop="name" label="操作">
73
+        <template slot-scope="scope">
74
+          <i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>
75
+        </template>
76
+      </el-table-column>
77
+    </el-table>
78
+
79
+    <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
80
+              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
81
+       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
82
+      <el-table-column align="center" prop="project_name" label="名称">
83
+        <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
84
+      </el-table-column>
85
+      <el-table-column align="center" prop="statistical_classification" width="100" label="组">
86
+        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
87
+      </el-table-column>
88
+      <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
89
+        <template slot-scope="scope">
90
+          <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
91
+          <div>{{scope.row.unit}}</div>
92
+
93
+        </template>
94
+      </el-table-column>
95
+      <el-table-column align="center" prop="delivery_way" width="80" label="用法">
96
+        <template slot-scope="scope">
97
+          <el-autocomplete
98
+            style="width:100%;"
99
+            class="inline-input"
100
+            v-model="scope.row.delivery_way"
101
+            :fetch-suggestions="querySearch2"
102
+            placeholder="请输入内容"
103
+          ></el-autocomplete>
104
+        </template>
105
+      </el-table-column>
106
+      <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
107
+        <template slot-scope="scope">
108
+          <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
109
+        </template>
110
+      </el-table-column>
111
+      <el-table-column align="center" prop="number_days" width="50" label="天数">
112
+        <template slot-scope="scope">
113
+          <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
114
+          <div>{{'天'}}</div>
115
+        </template>
116
+      </el-table-column>
117
+      <el-table-column align="center" prop="total" width="70" label="总量">
118
+        <template slot-scope="scope">
119
+          <div style="display:flex;align-items:center;">
120
+            <el-input v-model="scope.row.total" style="width:60%" placeholder=""></el-input>
121
+            <div>{{scope.row.unit}}</div>
122
+
123
+          </div>
124
+        </template>
125
+      </el-table-column>
126
+      <el-table-column align="center" prop="name" width="50" label="单价">
127
+        <template slot-scope="scope">
128
+          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
129
+          <div>{{'元'}}</div>
130
+
131
+        </template>
132
+      </el-table-column>
133
+      <el-table-column align="center" prop="name" width="50" label="备注">
134
+        <template slot-scope="scope">
135
+           <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
136
+        </template>
137
+      </el-table-column>
138
+      <el-table-column align="center" width="40" prop="name" label="操作">
139
+        <template slot-scope="scope">
140
+          <i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>
141
+        </template>
142
+      </el-table-column>
143
+    </el-table>
144
+
145
+    <div class="additionalBox">
146
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
147
+        <span :title="item.item_name">{{item.item_name}}</span>
148
+        <el-input v-model="item.price" placeholder="" style="width:50px;"></el-input>
149
+        共
150
+        <el-input v-model="item.count" placeholder="" style="width:50px;"></el-input>
151
+        次
152
+        <i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>
153
+      </div>
154
+    </div>
155
+
156
+
157
+
158
+  </div>
159
+</template>
160
+
161
+<script>
162
+  import { getDictionaryDataConfig} from "@/utils/data";
163
+  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
164
+
165
+  export default {
166
+    props: {
167
+      preDrugs: Array,
168
+      activeType: Number,
169
+      addtions_charge:Array,
170
+      prescription:{
171
+        type:Object,
172
+        default: function () {
173
+          return {
174
+            name:"",
175
+            advices:[],
176
+            project:[],
177
+            drugways:[],
178
+            efs:[],
179
+          };
180
+        }
181
+      },
182
+    },
183
+    data() {
184
+      return {
185
+        advices:[],
186
+        tableData: [],
187
+        newoptions: [{
188
+          value: '1',
189
+          label: '1'
190
+        }, {
191
+          value: '2',
192
+          label: '2'
193
+        }, {
194
+          value: '3',
195
+          label: '3'
196
+        }, {
197
+          value: '4',
198
+          label: '4'
199
+        }, {
200
+          value: '5',
201
+          label: '5'
202
+        }],
203
+        value: '1',
204
+        input: 1,
205
+      }
206
+    },
207
+
208
+   methods:{
209
+     createFilter(queryString) {
210
+       return (restaurant) => {
211
+         return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
212
+       }
213
+     },
214
+     querySearch2(queryString, cb) {
215
+       var restaurants = this.getDictionaryDataConfig("system","project_use");
216
+       restaurants.map(item => {
217
+         item.value = item.name
218
+       });
219
+       var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
220
+       // 调用 callback 返回建议列表的数据
221
+       cb(results)
222
+     },
223
+     delAddition(index, addition){
224
+       if(this.prescription.order_status == 2){
225
+         this.$message.error('该处方已经结算,无法删除');
226
+         return
227
+       }
228
+       this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
229
+         confirmButtonText: "确 定",
230
+         cancelButtonText: "取 消",
231
+         type: "warning"
232
+       }).then(() => {
233
+         this.$nextTick(function(){
234
+           if(addition.id == 0){
235
+             this.prescription.addition.splice(index, 1)
236
+           }else{
237
+             let params = {
238
+               'id': addition.id,
239
+             };
240
+             delHisAddition(params).then(response => {
241
+               if (response.data.state == 0) {
242
+                 this.$message.error(response.data.msg);
243
+                 return false
244
+               } else {
245
+                 var temp2 = this.deepClone(this.prescription.addition);
246
+                 temp2.splice(index, 1);
247
+                 this.prescription.addition = temp2;
248
+                 this.$message.success(response.data.data.msg)
249
+               }
250
+             })
251
+           }
252
+         });
253
+
254
+       })
255
+         .catch(() => {});
256
+
257
+     },
258
+      getInitData(){
259
+        getInitData().then(response => {
260
+          if (response.data.state == 0) {
261
+            this.$message.error(response.data.msg);
262
+            return false
263
+          } else {
264
+            this.drugways = response.data.data.drugways;
265
+            this.efs = response.data.data.efs
266
+          }
267
+        })
268
+
269
+      },deleteDrug:function(index, row){
270
+       if(this.prescription.order_status == 2){
271
+         this.$message.error('该处方已经结算,无法删除');
272
+         return
273
+       }
274
+       this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
275
+         confirmButtonText: "确 定",
276
+         cancelButtonText: "取 消",
277
+         type: "warning"
278
+       }).then(() => {
279
+         this.$nextTick(function(){
280
+           if(row.advice_id == 0){
281
+             this.prescription.advices.splice(index, 1)
282
+           }else{
283
+             let params = {
284
+               'id': row.advice_id,
285
+             };
286
+             delHisAdvice(params).then(response => {
287
+               if (response.data.state == 0) {
288
+                 this.$message.error(response.data.msg);
289
+                 return false
290
+               } else {
291
+                 var temp2 = this.deepClone(this.prescription.advices);
292
+                 temp2.splice(index, 1);
293
+                 this.prescription.advices = temp2;
294
+                 this.$message.success(response.data.data.msg)
295
+               }
296
+             })
297
+
298
+
299
+           }
300
+
301
+         });
302
+
303
+
304
+       })
305
+         .catch(() => {});
306
+
307
+
308
+
309
+
310
+
311
+      },deepClone(source) {
312
+       if (!source && typeof source !== 'object') {
313
+         throw new Error('error arguments', 'shallowClone')
314
+       }
315
+       const targetObj = source.constructor === Array ? [] : {};
316
+       Object.keys(source).forEach((keys) => {
317
+         if (source[keys] && typeof source[keys] === 'object') {
318
+           targetObj[keys] = this.deepClone(source[keys])
319
+         } else {
320
+           targetObj[keys] = source[keys]
321
+         }
322
+       });
323
+       return targetObj
324
+     },
325
+
326
+      setNewData:function(data){
327
+        this.prescription = data
328
+
329
+        // this.prescription.advices = data.advices
330
+      },
331
+      getDictionaryDataConfig(module, filed_name) {
332
+        return getDictionaryDataConfig(module, filed_name)
333
+      },
334
+      getGroup(id){
335
+         var name = "";
336
+          var statistics_category =  getDictionaryDataConfig('system','statistics_category');
337
+          console.log("2235",statistics_category);
338
+          for(let i=0;i<statistics_category.length;i++){
339
+             if(id == statistics_category[i].id){
340
+                 name = statistics_category[i].name
341
+             }
342
+          }
343
+         return name
344
+      },
345
+      deleteProject(row,i){
346
+        if(this.prescription.order_status == 2){
347
+          this.$message.error('该处方已经结算,无法删除');
348
+          return
349
+        }
350
+        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
351
+          confirmButtonText: "确 定",
352
+          cancelButtonText: "取 消",
353
+          type: "warning"
354
+        }).then(() => {
355
+          if(row.id == 0){
356
+            this.prescription.project.splice(i, 1)
357
+
358
+          }else{
359
+            let params = {
360
+              'id': row.id,
361
+            };
362
+            delHisProject(params).then(response => {
363
+              if (response.data.state == 0) {
364
+                this.$message.error(response.data.msg);
365
+                return false
366
+              } else {
367
+                for (let i = 0; i < this.prescription.project.length; i++){
368
+                  if(this.prescription.project[i].id == row.id){
369
+                    this.prescription.project.splice(i, 1)
370
+                  }
371
+                }
372
+                this.$message.success(response.data.data.msg)
373
+              }
374
+            })
375
+          }
376
+        })
377
+          .catch(() => {});
378
+
379
+      },
380
+      getSingleDose(scope){
381
+        // this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
382
+      },
383
+      getDay(scope){
384
+        // this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
385
+      },
386
+      getProjectSingleDose(scope){
387
+        // this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
388
+      },
389
+      getProjectDay(scope){
390
+        // this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
391
+      }
392
+    },mounted(){
393
+      this.getInitData()
394
+
395
+    },
396
+    watch:{
397
+      // "prescription.advices":{
398
+      //   handler(newVal,oldVal){
399
+      //     newVal.map(item => {
400
+      //       item.prescribing_number = item.single_dose * item.day
401
+      //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
402
+      //         item.total = item.single_dose * item.number_days
403
+      //       }
404
+
405
+
406
+      //     })
407
+      //   },
408
+      //   deep:true
409
+      // },
410
+      // "prescription.project":{
411
+      //   handler(newVal,oldVal){
412
+      //     newVal.map((item,index) => {
413
+      //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
414
+      //         item.total = item.single_dose * item.number_days
415
+      //       }
416
+
417
+      //     })
418
+      //   },
419
+      //   deep:true
420
+      // }
421
+    }
422
+
423
+  }
424
+</script>
425
+
426
+<style lang="scss">
427
+  .prescriptionTable {
428
+    .el-input__inner{
429
+      padding: 0 5px;
430
+    }
431
+    .additionalBox{
432
+      margin-top: 20px;
433
+      display: flex;
434
+      flex-wrap: wrap;
435
+      .additionalOne{
436
+        margin-right:20px;
437
+        margin-bottom:10px;
438
+        display: flex;
439
+        align-items: center;
440
+        >span{
441
+          white-space: nowrap;
442
+          overflow: hidden;
443
+          text-overflow: ellipsis;
444
+          width:80px;
445
+          display: inline-block;
446
+          font-size: 14px;
447
+        }
448
+      }
449
+      .deleteIcon{
450
+        color:red;
451
+        margin-left:5px;
452
+      }
453
+    }
454
+    .el-table th .cell, .el-table td .cell {
455
+      padding: 0 2px;
456
+      white-space: pre-line;
457
+    }
458
+
459
+    .el-icon-delete {
460
+      color: red;
461
+    }
462
+
463
+  }
464
+</style>

+ 105 - 0
src/xt_pages/hospitalStation/components/recordHistoryDetail.vue View File

@@ -0,0 +1,105 @@
1
+<template>
2
+    <el-dialog
3
+        title="病历历史详情"
4
+        width="1000px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+        class="recordDialog"
8
+        append-to-body
9
+    >
10
+        <div class="detailMain">
11
+            <span style="width:240px;">病历编号:11111111111111111</span>
12
+            <span style="width:240px;">医生:</span>
13
+            <span style="width:240px;">创建日期:11111111111111111</span>
14
+        </div>
15
+        <div class="detailMain">
16
+            <span style="width:240px;">关系联系人:无</span>
17
+            <span style="width:240px;">关系联系方式:无</span>
18
+        </div>
19
+        <p>体格检查</p>
20
+        <div class="detailMain">
21
+            <span style="margin: 0 0 0 40px;width:140px;">体温:℃</span>
22
+            <span style="width:140px;">呼吸:0 次/分</span>
23
+            <span style="width:140px;">脉搏:0 次/分</span>
24
+            <span style="width:200px;">血压:0。00~0.00 mmHg</span>
25
+        </div>
26
+        <div class="detailMain">
27
+            <span style="margin: 0 0 0 40px;width:140px;">血糖:0 mmol/L</span>
28
+            <span style="width:140px;">血脂:0 mmol/L</span>
29
+            <span style="width:140px;">身高:0 cm</span>
30
+            <span style="width:200px;">体重:0 kg</span>
31
+        </div>
32
+        <div class="detailMain">
33
+            <span style="width:220px;">疾病名称:无</span>
34
+            <span style="width:220px;">症状:无</span>
35
+            <span style="width:220px;">发病日期:</span>
36
+            <span style="width:220px;">是否传染:否</span>
37
+        </div>
38
+        <div class="detailMain">
39
+            <span>主诉:</span>
40
+        </div>
41
+        <div class="detailMain">
42
+            <span>现病史:</span>
43
+        </div>
44
+        <div class="detailMain">
45
+            <span>诊断信息:</span>
46
+        </div>
47
+        <div class="detailMain">
48
+            <span>医嘱:</span>
49
+        </div>
50
+        <div class="detailMain">
51
+            <span>过敏史:</span>
52
+        </div>
53
+        <div slot="footer" class="dialog-footer">
54
+            <el-button @click="hide">取 消</el-button>
55
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
56
+        </div>
57
+    </el-dialog>         
58
+</template>
59
+
60
+<script>
61
+export default {
62
+    data(){
63
+        return{
64
+            visible:false,
65
+            form:{
66
+                name:''
67
+            },
68
+        }
69
+    },
70
+    methods:{
71
+        _close: function(done) {
72
+            // this.clear()
73
+            done()
74
+        },
75
+        clear: function() {
76
+            this.form.id = 0;
77
+            this.form.name = "";
78
+            this.form.intro = "";
79
+        },
80
+        show() {
81
+            // this.clear()
82
+            this.visible = true
83
+        },
84
+        hide() {
85
+            // this.clear()
86
+            this.visible = false
87
+        },
88
+    }
89
+}
90
+</script>
91
+
92
+<style lang="scss">
93
+.recordDialog{
94
+    .el-dialog__body{
95
+        padding-top:0;
96
+    }
97
+}
98
+.detailMain{
99
+    padding:5px;
100
+    span{
101
+        display: inline-block;
102
+    }
103
+}
104
+</style>
105
+

+ 378 - 0
src/xt_pages/hospitalStation/components/recordTemplateDetail.vue View File

@@ -0,0 +1,378 @@
1
+<template>
2
+    <el-dialog
3
+      title="病历模板详情"
4
+      width="1000px"
5
+      :visible.sync="visible"
6
+      :before-close="_close"
7
+      class="recordDialog"
8
+      append-to-body
9
+    >
10
+        <el-form class="recordForm" :model="form" ref="form" label-width="80px">
11
+          <el-form-item label="模板名称: " prop="name" style="width:100%;">
12
+            <el-input v-model="form.template_name" placeholder=""></el-input>
13
+          </el-form-item>
14
+          <el-form-item label="模板说明: " prop="name" style="width:100%;">
15
+            <el-input v-model="form.template_remark" placeholder=""></el-input>
16
+          </el-form-item>
17
+          <el-form-item label="主诉:" class="width50">
18
+            <el-select @change="changeMainTemplate" v-model="value" style="width:100%;margin-bottom:10px;">
19
+              <el-option
20
+                v-for="(item, index) in tabledata"
21
+                :label="item.title"
22
+                :value="item.content"
23
+                :key="index"
24
+              ></el-option>
25
+            </el-select>
26
+            <el-input
27
+              type="textarea"
28
+              :rows="2"
29
+              placeholder="请输入内容"
30
+              v-model="form.chief_conplaint">
31
+            </el-input>
32
+          </el-form-item>
33
+          <el-form-item label="现病史:" class="width50">
34
+            <el-select @change="changeMainTemplateOne" v-model="valueOne" style="width:100%;margin-bottom:10px;">
35
+              <el-option
36
+                v-for="(item, index) in tabledataOne"
37
+                :label="item.title"
38
+                :value="item.content"
39
+                :key="index"
40
+              ></el-option>
41
+            </el-select>
42
+            <el-input
43
+              type="textarea"
44
+              :rows="2"
45
+              placeholder="请输入内容"
46
+              v-model="form.history_of_present_illness">
47
+            </el-input>
48
+          </el-form-item>
49
+          <el-form-item label="既往史:" class="width50">
50
+            <el-select @change="changeMainTemplateTwo" v-model="valueTwo" style="width:100%;margin-bottom:10px;">
51
+              <el-option
52
+                v-for="(item, index) in tabledataTwo"
53
+                :label="item.title"
54
+                :value="item.content"
55
+                :key="index"
56
+              ></el-option>
57
+            </el-select>
58
+            <el-input
59
+              type="textarea"
60
+              :rows="2"
61
+              placeholder="请输入内容"
62
+              v-model="form.past_history">
63
+            </el-input>
64
+          </el-form-item>
65
+          <el-form-item label="个人史:" class="width50">
66
+            <el-select @change="changeMainTemplateThree" v-model="valueThree" style="width:100%;margin-bottom:10px;">
67
+              <el-option
68
+                v-for="(item, index) in tabledataThree"
69
+                :label="item.title"
70
+                :value="item.content"
71
+                :key="index"
72
+              ></el-option>
73
+            </el-select>
74
+            <el-input
75
+              type="textarea"
76
+              :rows="2"
77
+              placeholder="请输入内容"
78
+              v-model="form.personal_history">
79
+            </el-input>
80
+          </el-form-item>
81
+          <el-form-item  label="家族史:" class="width50">
82
+            <el-select @change="changeMainTemplateFour" v-model="valueFour" style="width:100%;margin-bottom:10px;">
83
+              <el-option
84
+                v-for="(item, index) in tabledataFour"
85
+                :label="item.title"
86
+                :value="item.content"
87
+                :key="index"
88
+              ></el-option>
89
+            </el-select>
90
+            <el-input
91
+            type="textarea"
92
+            :rows="2"
93
+            placeholder="请输入内容"
94
+            v-model="form.family_history">
95
+            </el-input>
96
+          </el-form-item>
97
+          <el-form-item label="诊断信息:" class="width50">
98
+            <el-select @change="changeMainTemplateFive" v-model="valueFive" style="width:100%;margin-bottom:10px;">
99
+              <el-option
100
+                v-for="(item, index) in tabledataFive"
101
+                :label="item.title"
102
+                :value="item.content"
103
+                :key="index"
104
+              ></el-option>
105
+            </el-select>
106
+            <el-input
107
+              type="textarea"
108
+              :rows="2"
109
+              placeholder="请输入内容"
110
+              v-model="form.diagnostic">
111
+            </el-input>
112
+          </el-form-item>
113
+          <el-form-item label="医嘱:" class="width50">
114
+            <el-select @change="changeMainTemplateSix" v-model="valueSix" style="width:100%;margin-bottom:10px;">
115
+              <el-option
116
+                v-for="(item, index) in tabledataSix"
117
+                :label="item.title"
118
+                :value="item.content"
119
+                :key="index"
120
+              ></el-option>
121
+            </el-select>
122
+            <el-input
123
+              type="textarea"
124
+              :rows="2"
125
+              placeholder="请输入内容"
126
+              v-model="form.doctor_advice">
127
+            </el-input>
128
+          </el-form-item>
129
+
130
+          <el-form-item label ="备注"  prop="name" class="width50">
131
+            <el-input
132
+              type="textarea"
133
+              :rows="2"
134
+              placeholder="请输入内容"
135
+              v-model="form.remark">
136
+            </el-input>
137
+          </el-form-item>
138
+        </el-form>
139
+        <div slot="footer" class="dialog-footer">
140
+            <el-button @click="hide">取 消</el-button>
141
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
142
+        </div>
143
+    </el-dialog>
144
+</template>
145
+
146
+<script>
147
+import { getTemplateDetail,updateRecordTemplate,getMedicalTemplateList } from "@/api/project/project"
148
+export default {
149
+    data(){
150
+        return{
151
+            visible:false,
152
+            form:{
153
+              id:0,
154
+              template_name:'',
155
+              template_remark:"",
156
+              chief_conplaint:"",
157
+              history_of_present_illness:"",
158
+              past_history:"",
159
+              personal_history:"",
160
+              family_history:"",
161
+              diagnostic:"",
162
+              remark:'',
163
+              doctor_advice:'',
164
+
165
+            },
166
+            textarea:"",
167
+            templatedetail:{},
168
+            tabledata:[],
169
+            tabledataOne:[],
170
+            tabledataTwo:[],
171
+            tabledataThree:[],
172
+            tabledataFour:[],
173
+            tabledataFive:[],
174
+            tabledataSix:[],
175
+            tabledataSeven:[],
176
+            value:'',
177
+            valueOne:'',
178
+            valueTwo:'',
179
+            valueThree:'',
180
+            valueFour:'',
181
+            valueFive:'',
182
+            valueSix:'',
183
+            valueSeven:''
184
+        }
185
+    },
186
+    methods:{
187
+        _close: function(done) {
188
+            // this.clear()
189
+            done()
190
+        },
191
+        clear: function() {
192
+            this.form.id = 0;
193
+            this.form.name = "";
194
+            this.form.intro = "";
195
+        },
196
+        show(id) {
197
+          this.getTemplateDetail(id);
198
+          this.visible = true
199
+
200
+        },
201
+        hide() {
202
+            // this.clear()
203
+            this.visible = false
204
+        },
205
+        getTemplateDetail(id){
206
+          getTemplateDetail(id).then(response=>{
207
+              if(response.data.state == 1){
208
+                var templatedetail =  response.data.data.templateDetail;
209
+                console.log("templatedetail",templatedetail);
210
+                this.form.id = templatedetail.id;
211
+                this.form.template_name =   templatedetail.template_name;
212
+                this.form.template_remark = templatedetail.template_remark;
213
+                this.form.chief_conplaint =  templatedetail.chief_conplaint;
214
+                this.form.history_of_present_illness =  templatedetail.history_of_present_illness;
215
+                this.form.past_history =  templatedetail.past_history;
216
+                this.form.personal_history =    templatedetail.personal_history;
217
+                this.form.family_history = templatedetail.family_history;
218
+                this.form.diagnostic = templatedetail.diagnostic;
219
+                this.form.doctor_advice = templatedetail.doctor_advice;
220
+                this.form.remark = templatedetail.remark
221
+              }
222
+          })
223
+        },
224
+        submitAction(){
225
+          var params = {
226
+            id:this.form.id,
227
+            template_name:this.form.template_name,
228
+            template_remark:this.form.template_remark,
229
+            chief_conplaint:this.form.chief_conplaint,
230
+            history_of_present_illness:this.form.history_of_present_illness,
231
+            past_history:this.form.past_history,
232
+            personal_history:this.form.personal_history,
233
+            family_history:this.form.family_history,
234
+            diagnostic:this.form.diagnostic,
235
+            doctor_advice:this.form.doctor_advice,
236
+            remark:this.form.remark
237
+          };
238
+          updateRecordTemplate(params).then(response=>{
239
+             if(response.data.state == 1){
240
+                var template =  response.data.data.templateDetail;
241
+                this.$message.success("保存成功");
242
+                this.visible = false
243
+                // this.$parents.getlist()
244
+             }
245
+          })
246
+        },
247
+
248
+         getlist(){
249
+           getMedicalTemplateList().then(response=>{
250
+           if(response.data.state == 1){
251
+             var list =  response.data.data.list;
252
+             console.log("list",list);
253
+             this.tabledata = list;
254
+             this.tabledataOne =  response.data.data.listOne;
255
+             this.tabledataTwo = response.data.data.listTwo;
256
+             this.tabledataThree = response.data.data.listThree;
257
+             this.tabledataFour =  response.data.data.listFour;
258
+             this.tabledataFive = response.data.data.listFive;
259
+             this.tabledataSix = response.data.data.listSix;
260
+             this.tabledataSeven =  response.data.data.listSeven
261
+           }
262
+        })
263
+       },
264
+
265
+       changeMainTemplate(values){
266
+         if(this.case_history.chief_conplaint == ''){
267
+           this.case_history.chief_conplaint = values
268
+         } else {
269
+          if (this.case_history.chief_conplaint.indexOf(values) == -1) {
270
+            if (this.case_history.chief_conplaint.charAt(this.case_history.chief_conplaint.length - 1).indexOf('。') == -1) {
271
+              this.case_history.chief_conplaint = this.case_history.chief_conplaint + ',' + values
272
+            } else {
273
+              this.case_history.chief_conplaint = this.case_history.chief_conplaint + values
274
+            }
275
+          }
276
+        }
277
+       },
278
+       changeMainTemplateOne(values){
279
+          if(this.case_history.history_of_present_illness == ''){
280
+           this.case_history.history_of_present_illness = values
281
+         } else {
282
+          if (this.case_history.history_of_present_illness.indexOf(values) == -1) {
283
+            if (this.case_history.history_of_present_illness.charAt(this.case_history.history_of_present_illness.length - 1).indexOf('。') == -1) {
284
+              this.case_history.history_of_present_illness = this.case_history.history_of_present_illness + ',' + values
285
+            } else {
286
+              this.case_history.history_of_present_illness = this.case_history.history_of_present_illness + values
287
+            }
288
+          }
289
+        }
290
+      },
291
+      changeMainTemplateTwo(values){
292
+         if(this.case_history.past_history == ''){
293
+           this.case_history.past_history = values
294
+         } else {
295
+          if (this.case_history.past_history.indexOf(values) == -1) {
296
+            if (this.case_history.past_history.charAt(this.case_history.past_history.length - 1).indexOf('。') == -1) {
297
+              this.case_history.past_history = this.case_history.past_history + ',' + values
298
+            } else {
299
+              this.case_history.past_history = this.case_history.past_history + values
300
+            }
301
+          }
302
+        }
303
+      },
304
+      changeMainTemplateThree(values){
305
+         if(this.case_history.personal_history == ''){
306
+           this.case_history.personal_history = values
307
+         } else {
308
+          if (this.case_history.personal_history.indexOf(values) == -1) {
309
+            if (this.case_history.personal_history.charAt(this.case_history.personal_history.length - 1).indexOf('。') == -1) {
310
+              this.case_history.personal_history = this.case_history.personal_history + ',' + values
311
+            } else {
312
+              this.case_history.personal_history = this.case_history.personal_history + values
313
+            }
314
+          }
315
+        }
316
+      },
317
+      changeMainTemplateFour(values){
318
+          if(this.case_history.family_history == ''){
319
+           this.case_history.family_history = values
320
+         } else {
321
+          if (this.case_history.family_history.indexOf(values) == -1) {
322
+            if (this.case_history.family_history.charAt(this.case_history.family_history.length - 1).indexOf('。') == -1) {
323
+              this.case_history.family_history = this.case_history.family_history + ',' + values
324
+            } else {
325
+              this.case_history.family_history = this.case_history.family_history + values
326
+            }
327
+          }
328
+        }
329
+      },
330
+
331
+      changeMainTemplateFive(values){
332
+          if(this.case_history.diagnostic == ''){
333
+           this.case_history.diagnostic = values
334
+         } else {
335
+          if (this.case_history.diagnostic.indexOf(values) == -1) {
336
+            if (this.case_history.diagnostic.charAt(this.case_history.diagnostic.length - 1).indexOf('。') == -1) {
337
+              this.case_history.diagnostic = this.case_history.diagnostic + ',' + values
338
+            } else {
339
+              this.case_history.diagnostic = this.case_history.diagnostic + values
340
+            }
341
+          }
342
+        }
343
+      },
344
+      changeMainTemplateSix(values){
345
+          if(this.case_history.doctor_advice == ''){
346
+           this.case_history.doctor_advice = values
347
+         } else {
348
+          if (this.case_history.doctor_advice.indexOf(values) == -1) {
349
+            if (this.case_history.doctor_advice.charAt(this.case_history.doctor_advice.length - 1).indexOf('。') == -1) {
350
+              this.case_history.doctor_advice = this.case_history.doctor_advice + ',' + values
351
+            } else {
352
+              this.case_history.doctor_advice = this.case_history.doctor_advice + values
353
+            }
354
+          }
355
+        }
356
+      },
357
+    },
358
+
359
+    created(){
360
+       this.getlist()
361
+    }
362
+}
363
+</script>
364
+
365
+<style lang="scss" scoped>
366
+.recordForm{
367
+  display: flex;
368
+  flex-wrap: wrap;
369
+  .el-form-item{
370
+    width:24%;
371
+    margin-right: 1%;
372
+  }
373
+  .width50{
374
+    width: 49%;
375
+  }
376
+}
377
+</style>
378
+

+ 562 - 0
src/xt_pages/hospitalStation/components/registerDialog.vue View File

@@ -0,0 +1,562 @@
1
+<template>
2
+  <el-dialog width="854px" class="registerDialog" :title="titles" :visible.sync="visibility"
3
+             :close-on-click-modal="isClose"
4
+             :close-on-press-escape="isClose">
5
+
6
+    <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
7
+      <el-form-item label="患者姓名:" prop="name" :validate-event="is_Name">
8
+        <el-autocomplete
9
+          class="checkSearch"
10
+          popper-class="my-autocomplete"
11
+          v-model="form.name"
12
+          :fetch-suggestions="querySearchAsync"
13
+          :trigger-on-focus="false"
14
+          placeholder="请输入病人名字"
15
+          @select="handleSelect"
16
+          style="width:160px;"
17
+        >
18
+          <i class="el-icon-search el-input__icon" slot="suffix"></i>
19
+          <template slot-scope="{ item }">
20
+            <div class="name">{{ item.name }}</div>
21
+          </template>
22
+        </el-autocomplete>
23
+      </el-form-item>
24
+
25
+      <el-form-item label="性别:" prop="gender" :validate-event="is_Name">
26
+        <el-select v-model="form.gender" placeholder="请选择" style="width:100%;">
27
+          <el-option
28
+            v-for="item in sex"
29
+            :key="item.value"
30
+            :label="item.label"
31
+            :value="item.value">
32
+          </el-option>
33
+        </el-select>
34
+
35
+
36
+      </el-form-item>
37
+
38
+      <el-form-item label="年龄:" prop="age" :validate-event="is_Name">
39
+        <el-input v-model="form.age"></el-input>
40
+      </el-form-item>
41
+
42
+
43
+      <el-form-item label="出生日期:" prop="birthday" :validate-event="is_Name">
44
+        <el-date-picker v-model="form.birthday" type="date" format="yyyy-MM-dd"
45
+                        value-format="yyyy-MM-dd" placeholder="选择日期" style="width:100%;"></el-date-picker>
46
+      </el-form-item>
47
+
48
+      <el-form-item label="手机号码:" prop="phone">
49
+        <el-input v-model="form.phone"></el-input>
50
+      </el-form-item>
51
+
52
+
53
+      <el-form-item label="医疗类别:">
54
+        <el-select v-model="form.medical_care" placeholder="请选择" style="width:100%;">
55
+          <el-option
56
+            v-for="(item,index) in medical_care"
57
+            :key="index"
58
+            :label="item.label"
59
+            :value="item.value">
60
+          </el-option>
61
+        </el-select>
62
+      </el-form-item>
63
+
64
+
65
+      <el-form-item label="证件类型:" prop="certificates" :validate-event="is_Name">
66
+        <el-select v-model="form.certificates" placeholder="请选择" style="width:100%;">
67
+          <el-option
68
+            v-for="item in certificates"
69
+            :key="item.value"
70
+            :label="item.label"
71
+            :value="item.value">
72
+          </el-option>
73
+        </el-select>
74
+      </el-form-item>
75
+
76
+      <el-form-item label="证件号码:" prop="id_card" :validate-event="is_Name">
77
+        <el-input v-model="form.id_card"></el-input>
78
+      </el-form-item>
79
+
80
+      <el-form-item label="处方类型:" prop="p_type" :validate-event="is_Name">
81
+        <el-select style="margin-right:5px;width:100px;" v-model="form.p_type" placeholder=""
82
+                   >
83
+          <el-option
84
+            v-for="(item,index) in registers"
85
+            :key="index"
86
+            :label="item.label"
87
+            :value="item.value">
88
+          </el-option>
89
+        </el-select>
90
+      </el-form-item>
91
+      <el-form-item label="大病类别:" prop="sick_type" :validate-event="is_Name">
92
+        <el-select style="margin-right:5px;width:100px;" v-model="form.sick_type" placeholder="">
93
+          <el-option
94
+            v-for="(item,index) in sick"
95
+            :key="index"
96
+            :label="item.class_name"
97
+            :value="item.id">
98
+          </el-option>
99
+        </el-select>
100
+      </el-form-item>
101
+
102
+      <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
103
+        <el-select style="margin-right:5px;width:100px;" v-model="form.diagnosis" placeholder="">
104
+          <el-option
105
+            v-for="(item,index) in diagnoses"
106
+            :key="index"
107
+            :label="item.class_name"
108
+            :value="item.id">
109
+          </el-option>
110
+        </el-select>
111
+      </el-form-item>
112
+
113
+
114
+      <el-form-item label="结算类型:">
115
+        <el-select v-model="form.settlement_value" placeholder="请选择" style="width:100%;">
116
+          <el-option
117
+            v-for="item in settlement"
118
+            :key="item.value"
119
+            :label="item.label"
120
+            :value="item.value">
121
+          </el-option>
122
+        </el-select>
123
+      </el-form-item>
124
+
125
+
126
+      <el-form-item label="社保类型:">
127
+        <el-select v-model="form.social_type" placeholder="请选择" style="width:100%;">
128
+          <el-option
129
+            v-for="item in medicalCare"
130
+            :key="item.value"
131
+            :label="item.label"
132
+            :value="item.value">
133
+          </el-option>
134
+        </el-select>
135
+      </el-form-item>
136
+
137
+
138
+      <el-form-item label="读卡类型:" prop="id_card_type" :validate-event="is_Name">
139
+        <el-select v-model="form.id_card_type" placeholder="请选择">
140
+          <el-option
141
+            v-for="item in IDCardTypes"
142
+            :key="item.value"
143
+            :label="item.label"
144
+            :value="item.value">
145
+          </el-option>
146
+        </el-select>
147
+      </el-form-item>
148
+
149
+
150
+      <el-form-item class="specialFormItem" label="医保卡号:">
151
+        <div style="display:flex;">
152
+          <el-input v-model="form.medical_insurance_card"></el-input>
153
+          <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>
154
+
155
+        </div>
156
+      </el-form-item>
157
+
158
+      <el-form-item label="挂号类型:" prop="register" :validate-event="is_Name">
159
+        <el-select v-model="form.register" placeholder="请选择" style="width:100%;">
160
+          <el-option
161
+            v-for="item in register"
162
+            :key="item.value"
163
+            :label="item.label"
164
+            :value="item.value">
165
+          </el-option>
166
+        </el-select>
167
+      </el-form-item>
168
+      <el-form-item label="挂号费:">
169
+        <el-input  v-model="form.registration_fee"></el-input>
170
+      </el-form-item>
171
+      <el-form-item label="诊疗费:">
172
+        <el-input v-model="form.medical_expenses"></el-input>
173
+      </el-form-item>
174
+    </el-form>
175
+
176
+    <span slot="footer" class="dialog-footer">
177
+    <el-button @click="cancel('formValue')">取 消</el-button>
178
+    <el-button type="primary" @click="confirm('formValue')">挂 号</el-button>
179
+  </span>
180
+  </el-dialog>
181
+
182
+</template>
183
+
184
+<script>
185
+  import {uParseTime,jsGetAge} from "@/utils/tools";
186
+  import axios from 'axios'
187
+  import {PostSearch} from '@/api/patient'
188
+
189
+  import {getDictionaryDataConfig} from '@/utils/data'
190
+
191
+  export default {
192
+
193
+    name: 'registerDialog',
194
+
195
+    data() {
196
+
197
+      return {
198
+        registers: [
199
+          {value: 11, label: "普通门诊"},
200
+          {value: 12, label: '门诊挂号'},
201
+          {value: 13, label: "急诊"},
202
+          {value: 14, label: "门诊特殊病"},
203
+          {value: 15, label: "门诊统筹"},
204
+          {value: 16, label: "门诊慢性病"},
205
+          {value: 21, label: "普通住院"},
206
+        ],
207
+        medical_care:[
208
+          {value: 11, label: "普通门诊"},
209
+          {value: 12, label: '家庭通道'},
210
+          {value: 13, label: "门诊大病"},
211
+          {value: 14, label: "重疾特药"},
212
+          {value: 15, label: "门诊慢病"},
213
+          {value: 16, label: "门诊特检"},
214
+          {value: 17, label: "健康体检"},
215
+          {value: 18, label: "预防接种"},
216
+          {value: 19, label: "门诊输血"},
217
+          {value: 91, label: "新冠肺炎门诊"},
218
+        ],
219
+
220
+
221
+
222
+
223
+        form: {
224
+          id: '',
225
+          settlement_value: '',
226
+          medical_insurance_card: '',
227
+          name: '',
228
+          gender: '',
229
+          certificates: 1,
230
+          p_type:'',
231
+          sick_type:'',
232
+          diagnosis:'',
233
+          medical_care: '',
234
+          birthday: '',
235
+          age: '',
236
+          id_card: '',
237
+          register: '',
238
+          doctor: '',
239
+          id_card_type: 1,
240
+          department: '',
241
+          registration_fee: '',
242
+          medical_expenses: '',
243
+          cost: '',
244
+          phone: '',
245
+          social_type: '',
246
+        }, IDCardTypes: [{
247
+          value: 1,
248
+          label: '社保卡'
249
+        }, {
250
+          value: 2,
251
+          label: "身份证"
252
+        }, {
253
+          value: 3,
254
+          label: "电子凭证"
255
+        },],
256
+        settlement: [
257
+          {value: 1, label: '医保'},
258
+          {value: 2, label: '自费'},
259
+          {value: 3, label: '公费'},
260
+          {value: 4, label: '农保'},
261
+          {value: 5, label: '会员'},
262
+          {value: 6, label: '职工'},
263
+          {value: 7, label: '合同'}
264
+        ],
265
+        sex: [{
266
+          value: 1,
267
+          label: '男'
268
+        }, {
269
+          value: 2,
270
+          label: '女'
271
+        }],
272
+        certificates: [{
273
+          value: 1,
274
+          label: '内地身份证'
275
+        }, {
276
+          value: 2,
277
+          label: "社保卡"
278
+        }, {
279
+          value: 3,
280
+          label: "护照"
281
+        }, {
282
+          value: 4,
283
+          label: "军官证"
284
+        }, {
285
+          value: 5,
286
+          label: "台胞证"
287
+        }, {
288
+          value: 6,
289
+          label: "港澳地区身份证"
290
+        }],
291
+        medicalCare: [{
292
+          value: 1,
293
+          label: '职工基本医疗保险'
294
+        }, {
295
+          value: 2,
296
+          label: "公务员医疗补助"
297
+        }, {
298
+          value: 3,
299
+          label: "大额医疗费用补助"
300
+        }, {
301
+          value: 4,
302
+          label: "离休人员医疗"
303
+        }, {
304
+          value: 5,
305
+          label: "城乡居民基本医疗保险"
306
+        }, {
307
+          value: 6,
308
+          label: "城乡居民大病医疗保险"
309
+        }, {
310
+            value: 7,
311
+            label: "生育保险"
312
+          }],
313
+        register: [{
314
+          value: 1,
315
+          label: '普通'
316
+        }, {
317
+          value: 2,
318
+          label: "主治"
319
+        }, {
320
+          value: 3,
321
+          label: "主任"
322
+        }, {
323
+          value: 4,
324
+          label: "免收诊金"
325
+        }, {
326
+          value: 5,
327
+          label: "专家"
328
+        }],
329
+        rules: {
330
+          name: [{required: true, message: "患者姓名不能为空", trigger: 'blur'}],
331
+          gender: [{required: true, message: "患者性别不能为空", trigger: 'blur'}],
332
+          id_card: [{required: true, message: '证件号码不能为空', trigger: 'blur'}],
333
+          register: [{required: true, message: '请选择挂号类型', trigger: 'blur'}],
334
+          doctor: [{required: true, message: '请选择医生', trigger: 'blur'}],
335
+          department: [{required: true, message: '请填写科室', trigger: 'blur'}],
336
+          age: [{required: true, message: "患者年龄不能为空", trigger: 'blur'}],
337
+          birthday: [{required: true, message: "患者出生日期不能为空", trigger: 'blur'}],
338
+          certificates: [{required: true, message: "证件类型不能为空", trigger: 'change'}],
339
+          id_card_type: [{required: true, message: "读卡类型不能为空", trigger: 'change'}],
340
+          p_type: [{required: true, message: "处方类型不能为空", trigger: 'change'}],
341
+          sick_type: [{required: true, message: "大病类别不能为空", trigger: 'change'}],
342
+          diagnosis: [{required: true, message: "诊断不能为空", trigger: 'change'}],
343
+        },
344
+        visibility: false,
345
+        labelPosition: 'right',
346
+        isClose: false,
347
+        resetForm: {
348
+          settlement_value: '',
349
+          medical_insurance_card: '',
350
+          name: '',
351
+          gender: '',
352
+          certificates: '',
353
+          id_card_type: '',
354
+          medical_care: '',
355
+          birthday: '',
356
+          age: '',
357
+          id_card: '',
358
+          register: '',
359
+          doctor: '',
360
+          department: '',
361
+          registration_fee: '',
362
+          medical_expenses: '',
363
+          cost: '',
364
+          phone: '',
365
+          social_type: '',
366
+        },
367
+
368
+      }
369
+    },
370
+    props: {
371
+
372
+      titles: {
373
+        type: String,
374
+        default: ''
375
+      },
376
+      formValue: {
377
+        type: Object
378
+      },
379
+      type: {
380
+        type: Number,
381
+        default: 1
382
+
383
+      },
384
+      isCreated: {
385
+        type: Number,
386
+        default: 1
387
+
388
+      },
389
+      sick: Array,
390
+      diagnoses: Array,
391
+    },
392
+    methods: {
393
+      handleSelect(val) {
394
+        this.form.id = val.id;
395
+        this.form.name = val.name;
396
+        this.form.gender = val.gender;
397
+        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}');
398
+        this.form.phone = val.phone;
399
+        this.form.id_card = val.id_card_no;
400
+        var thisLen =  this.form.id_card.length;
401
+        var birth = "";
402
+        if (thisLen == 15) {
403
+          birth = "19" + this.form.id_card.substr(6, 6);
404
+        } else {
405
+          birth = this.form.id_card.substr(6, 8);
406
+        }
407
+        var births =
408
+                birth.substr(0, 4) +
409
+                "-" +
410
+                birth.substr(4, 2) +
411
+                "-" +
412
+                birth.substr(6, 2);
413
+        this.form.age = jsGetAge(births, "-");
414
+      },
415
+      querySearchAsync(keyword, cb) {
416
+        let key = '';
417
+        if (keyword != undefined) {
418
+          key = keyword
419
+        }
420
+        let searchArray = [];
421
+        PostSearch(key).then(response => {
422
+          if (response.data.state == 1) {
423
+            searchArray = response.data.data.patient;
424
+            cb(searchArray)
425
+          } else {
426
+            cb([])
427
+          }
428
+        })
429
+      },
430
+      reading(medicalInsuranceCard) {
431
+        var that = this;
432
+        if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
433
+          this.$message.error("请先选择读卡类型");
434
+          return
435
+        }
436
+        let params = {
437
+          'id_card_type': this.form.id_card_type,
438
+          'admin_user_id':this.$store.getters.xt_user.user.id,
439
+
440
+        };
441
+        axios.get('http://127.0.0.1:9532/api/sscard', {
442
+          params: params
443
+        })
444
+          .then(function (response) {
445
+            if (response.data.state == 0) {
446
+              that.$message.error(response.data.msg);
447
+              return false
448
+            } else {
449
+              var patient = response.data.data.patient;
450
+
451
+              if (that.form.id_card_type == 1) {
452
+                this.form.id = patient.id;
453
+                that.form.name = patient.name;
454
+                that.form.sex = patient.gender;
455
+                that.form.age = patient.age;
456
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
457
+                that.form.phone = patient.phone;
458
+                that.form.idCard = patient.id_card_no;
459
+                that.form.medicalInsuranceCard = response.data.data.number
460
+
461
+              } else if (that.form.id_card_type == 2) {
462
+                this.form.id = patient.id;
463
+                that.form.name = patient.name;
464
+                that.form.sex = patient.gender;
465
+                that.form.age = patient.age;
466
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
467
+                that.form.phone = patient.phone;
468
+                that.form.idCard = patient.id_card_no
469
+              }
470
+              that.$message({message: '读卡成功', type: 'success'})
471
+            }
472
+          })
473
+          .catch(function (error) {
474
+
475
+          });
476
+
477
+
478
+      },
479
+      getDictionaryDataConfig(module, filed_name) {
480
+        return getDictionaryDataConfig(module, filed_name)
481
+      },
482
+    show: function() {
483
+        this.visibility = true;
484
+        // this.form = Object.assign({}, this.resetForm)
485
+        this.form.id = 0;
486
+        this.form.settlement_value = '';
487
+        this.form.medical_insurance_card = '';
488
+        this.form.name = '';
489
+        this.form.gender = '';
490
+        this.form.medical_care = '';
491
+        this.form.birthda = '';
492
+        this.form.age = '';
493
+        this.form.id_card = '';
494
+        this.form.register = '';
495
+        this.form.doctor = '';
496
+        this.form.department = '';
497
+        this.form.registration_fee = '';
498
+        this.form.medical_expenses = '';
499
+        this.form.cost = '';
500
+        this.form.phone = '';
501
+        this.form.social_type = '';
502
+
503
+        this.form.p_type = 14;
504
+        this.form.sick_type = this.sick[0].id;
505
+        this.form.diagnosis = this.diagnoses[0].id;
506
+        this.form.id_card_type = 2;
507
+        this.form.certificates = 1
508
+
509
+        // this.form.name = patientInfo.name
510
+        // this.form.gender = patientInfo.gender
511
+        // this.form.age = patientInfo.age
512
+        // this.form.birthday = patientInfo.birthday
513
+        // this.form.phone = patientInfo.phone
514
+        // this.form.birthday = patientInfo.birthday
515
+        // this.form.id_card = patientInfo.id_card_no
516
+        // this.form.social_type = patientInfo.health_care_type
517
+        // if( this.form.social_type == 0){
518
+        //   this.form.social_type = ""
519
+        // }
520
+
521
+      },
522
+
523
+      hide: function () {
524
+        this.visibility = false;
525
+        this.$refs['formValue'].resetFields()
526
+      }, cancel: function (formName) {
527
+        this.$emit('cancel', this.getValue());
528
+        this.$refs['formValue'].resetFields()
529
+      },
530
+      confirm: function (formName) {
531
+        this.$refs['formValue'].validate((valid) => {
532
+          if (valid) {
533
+            let value = {};
534
+            value = this.getValue();
535
+            this.$emit('confirm', value)
536
+          }
537
+        })
538
+      },
539
+      getValue: function () {
540
+        let form = {};
541
+        form = this.form;
542
+        return form
543
+      }
544
+    }
545
+
546
+  }
547
+</script>
548
+
549
+<style lang="scss" scoped>
550
+  .registerDialog {
551
+
552
+  .el-form {
553
+    display: flex;
554
+    flex-wrap: wrap;
555
+  }
556
+
557
+  .el-form-item {
558
+    width: 50%;
559
+  }
560
+
561
+  }
562
+</style>

+ 537 - 0
src/xt_pages/hospitalStation/components/registerDialog9504.vue View File

@@ -0,0 +1,537 @@
1
+<template>
2
+    <el-dialog width="854px" class="registerDialog" :title="titles" :visible.sync="visibility"
3
+               :close-on-click-modal="isClose"
4
+               :close-on-press-escape="isClose">
5
+
6
+        <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
7
+            <el-form-item label="患者姓名:" prop="name" >
8
+                <el-autocomplete
9
+                        class="checkSearch"
10
+                        popper-class="my-autocomplete"
11
+                        v-model="form.name"
12
+                        :fetch-suggestions="querySearchAsync"
13
+                        :trigger-on-focus="false"
14
+                        placeholder="请输入病人名字"
15
+                        @select="handleSelect"
16
+                        style="width:160px;"
17
+                >
18
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
19
+                    <template slot-scope="{ item }">
20
+                        <div class="name">{{ item.name }}</div>
21
+                    </template>
22
+                </el-autocomplete>
23
+            </el-form-item>
24
+
25
+            <el-form-item label="性别:" prop="gender" >
26
+                <el-select v-model="form.gender" placeholder="请选择" style="width:100%;">
27
+                    <el-option
28
+                            v-for="item in sex"
29
+                            :key="item.value"
30
+                            :label="item.label"
31
+                            :value="item.value">
32
+                    </el-option>
33
+                </el-select>
34
+
35
+
36
+            </el-form-item>
37
+
38
+            <el-form-item label="年龄:" prop="age" >
39
+                <el-input v-model="form.age"></el-input>
40
+            </el-form-item>
41
+
42
+
43
+            <el-form-item label="出生日期:" prop="birthday" >
44
+                <el-date-picker v-model="form.birthday" type="date" format="yyyy-MM-dd"
45
+                                value-format="yyyy-MM-dd" placeholder="选择日期" style="width:100%;"></el-date-picker>
46
+            </el-form-item>
47
+
48
+            <el-form-item label="手机号码:" prop="phone">
49
+                <el-input v-model="form.phone"></el-input>
50
+            </el-form-item>
51
+
52
+
53
+            <el-form-item label="医疗类别:" prop="medical_care">
54
+                <el-select v-model="form.medical_care"  placeholder="请选择" style="width:100%;">
55
+                    <el-option
56
+                            v-for="(item,index) in medical_care"
57
+                            :key="index"
58
+                            :label="item.label"
59
+                            :value="item.value">
60
+                    </el-option>
61
+                </el-select>
62
+            </el-form-item>
63
+
64
+
65
+            <el-form-item label="证件类型:" prop="certificates" >
66
+                <el-select v-model="form.certificates" placeholder="请选择" style="width:100%;">
67
+                    <el-option
68
+                            v-for="item in certificates"
69
+                            :key="item.value"
70
+                            :label="item.label"
71
+                            :value="item.value">
72
+                    </el-option>
73
+                </el-select>
74
+            </el-form-item>
75
+
76
+            <el-form-item label="证件号码:" prop="id_card">
77
+                <el-input v-model="form.id_card"></el-input>
78
+            </el-form-item>
79
+
80
+
81
+
82
+
83
+            <el-form-item label="结算类型:">
84
+                <el-select v-model="form.settlement_value" placeholder="请选择" style="width:100%;">
85
+                    <el-option
86
+                            v-for="item in settlement"
87
+                            :key="item.value"
88
+                            :label="item.label"
89
+                            :value="item.value">
90
+                    </el-option>
91
+                </el-select>
92
+            </el-form-item>
93
+
94
+
95
+            <el-form-item label="社保类型:">
96
+                <el-select v-model="form.social_type" placeholder="请选择" style="width:100%;">
97
+                    <el-option
98
+                            v-for="item in medicalCare"
99
+                            :key="item.value"
100
+                            :label="item.label"
101
+                            :value="item.value">
102
+                    </el-option>
103
+                </el-select>
104
+            </el-form-item>
105
+
106
+
107
+            <el-form-item label="读卡类型:" prop="id_card_type">
108
+                <el-select v-model="form.id_card_type" placeholder="请选择">
109
+                    <el-option
110
+                            v-for="item in IDCardTypes"
111
+                            :key="item.value"
112
+                            :label="item.label"
113
+                            :value="item.value">
114
+                    </el-option>
115
+                </el-select>
116
+            </el-form-item>
117
+
118
+
119
+            <el-form-item class="specialFormItem" label="医保卡号:">
120
+                <div style="display:flex;">
121
+                    <el-input v-model="form.medical_insurance_card"></el-input>
122
+                    <el-button style="margin-left:10px;" type="primary" @click="reading" v-loading="read_loading">读卡</el-button>
123
+
124
+                </div>
125
+            </el-form-item>
126
+
127
+            <el-form-item label="挂号类型:" prop="register" >
128
+                <el-select v-model="form.register" placeholder="请选择" style="width:100%;" @change="changeRegister">
129
+                    <el-option
130
+                            v-for="item in register"
131
+                            :key="item.value"
132
+                            :label="item.label"
133
+                            :value="item.value">
134
+                    </el-option>
135
+                </el-select>
136
+            </el-form-item>
137
+            <el-form-item label="挂号费:">
138
+                <el-input readonly v-model="form.registration_fee"></el-input>
139
+            </el-form-item>
140
+            <el-form-item label="诊疗费:">
141
+                <el-input readonly v-model="form.medical_expenses"></el-input>
142
+            </el-form-item>
143
+
144
+            <el-form-item label="医生:" prop="doctor" >
145
+                <el-select v-model="form.doctor" placeholder="请选择" @change="changeDoctor">
146
+                    <el-option
147
+                            v-for="(item,index) in doctors"
148
+                            :key="index"
149
+                            :label="item.user_name"
150
+                            :value="item.admin_user_id">
151
+                    </el-option>
152
+                </el-select>
153
+            </el-form-item>
154
+
155
+            <el-form-item label="科室:" prop="department" >
156
+                <el-select v-model="form.department" placeholder="请选择">
157
+                    <el-option
158
+                            v-for="(item,index) in departments"
159
+                            :key="index"
160
+                            :label="item.name"
161
+                            :value="item.id">
162
+                    </el-option>
163
+                </el-select>
164
+            </el-form-item>
165
+        </el-form>
166
+
167
+        <span slot="footer" class="dialog-footer">
168
+    <el-button @click="cancel('formValue')">取 消</el-button>
169
+    <el-button type="primary" @click="confirm('formValue')">挂 号</el-button>
170
+  </span>
171
+    </el-dialog>
172
+
173
+</template>
174
+
175
+<script>
176
+  import {uParseTime} from "@/utils/tools";
177
+  import axios from 'axios'
178
+  import {PostSearch} from '@/api/patient'
179
+  import {getDictionaryDataConfig} from '@/utils/data'
180
+  export default {
181
+    name: 'registerDialog9504',
182
+
183
+    data() {
184
+
185
+      return {
186
+        read_loading:false,
187
+        registers: [
188
+          {value: 11, label: "普通门诊"},
189
+          {value: 12, label: '门诊挂号'},
190
+          {value: 13, label: "急诊"},
191
+          {value: 14, label: "门诊特殊病"},
192
+          {value: 15, label: "门诊统筹"},
193
+          {value: 16, label: "门诊慢性病"},
194
+          {value: 21, label: "普通住院"},
195
+        ],
196
+        medical_care:[
197
+          {value: 11, label: "普通门诊"},
198
+          {value: 12, label: '家庭通道'},
199
+          {value: 13, label: "门诊大病"},
200
+          {value: 14, label: "重疾特药"},
201
+          {value: 15, label: "门诊慢病"},
202
+          {value: 16, label: "门诊特检"},
203
+          {value: 17, label: "健康体检"},
204
+          {value: 18, label: "预防接种"},
205
+          {value: 19, label: "门诊输血"},
206
+          {value: 91, label: "新冠肺炎门诊"},
207
+        ],
208
+
209
+
210
+        form: {
211
+          id: '',
212
+          settlement_value: '',
213
+          medical_insurance_card: '',
214
+          name: '',
215
+          gender: '',
216
+          certificates: '',
217
+          p_type:'',
218
+          sick_type:'',
219
+          diagnosis:'',
220
+          medical_care: '',
221
+          birthday: '',
222
+          age: '',
223
+          id_card: '',
224
+          register: '',
225
+          doctor: '',
226
+          id_card_type: '',
227
+          department: '',
228
+          registration_fee: '',
229
+          medical_expenses: '',
230
+          cost: '',
231
+          phone: '',
232
+          social_type: '',
233
+        }, IDCardTypes: [{
234
+          value: 1,
235
+          label: '社保卡'
236
+        }],
237
+        settlement: [
238
+          {value: 1, label: '医保'},
239
+          {value: 2, label: '自费'},
240
+          {value: 3, label: '公费'},
241
+          {value: 4, label: '农保'},
242
+          {value: 5, label: '会员'},
243
+          {value: 6, label: '职工'},
244
+          {value: 7, label: '合同'}
245
+        ],
246
+        sex: [{
247
+          value: 1,
248
+          label: '男'
249
+        }, {
250
+          value: 2,
251
+          label: '女'
252
+        }],
253
+        certificates: [{
254
+          value: 1,
255
+          label: '内地身份证'
256
+        }, {
257
+          value: 2,
258
+          label: "社保卡"
259
+        }, {
260
+          value: 3,
261
+          label: "护照"
262
+        }, {
263
+          value: 4,
264
+          label: "军官证"
265
+        }, {
266
+          value: 5,
267
+          label: "台胞证"
268
+        }, {
269
+          value: 6,
270
+          label: "港澳地区身份证"
271
+        }],
272
+        medicalCare: [{
273
+          value: 1,
274
+          label: '职工基本医疗保险'
275
+        }, {
276
+          value: 2,
277
+          label: "公务员医疗补助"
278
+        }, {
279
+          value: 3,
280
+          label: "大额医疗费用补助"
281
+        }, {
282
+          value: 4,
283
+          label: "离休人员医疗"
284
+        }, {
285
+          value: 5,
286
+          label: "城乡居民基本医疗保险"
287
+        }, {
288
+          value: 6,
289
+          label: "城乡居民大病医疗保险"
290
+        }, {
291
+          value: 7,
292
+          label: "生育保险"
293
+        }],
294
+        register: [{
295
+          value: 1,
296
+          label: '普通'
297
+        }, {
298
+          value: 2,
299
+          label: "主治"
300
+        }, {
301
+          value: 3,
302
+          label: "主任"
303
+        }, {
304
+          value: 4,
305
+          label: "免收诊金"
306
+        }, {
307
+          value: 5,
308
+          label: "专家"
309
+        }],
310
+        rules: {
311
+          name: [{required: true, message: "患者姓名不能为空", trigger: 'blur'}],
312
+          gender: [{required: true, message: "患者性别不能为空", trigger: 'blur'}],
313
+          id_card: [{required: true, message: '证件号码不能为空', trigger: 'blur'}],
314
+          register: [{required: true, message: '请选择挂号类型', trigger: 'blur'}],
315
+          doctor: [{required: true, message: '请选择医生', trigger: 'blur'}],
316
+          department: [{required: true, message: '请填写科室', trigger: 'blur'}],
317
+          age: [{required: true, message: "患者年龄不能为空", trigger: 'blur'}],
318
+          birthday: [{required: true, message: "患者出生日期不能为空", trigger: 'blur'}],
319
+          certificates: [{required: true, message: "证件类型不能为空", trigger: 'change'}],
320
+          id_card_type: [{required: true, message: "读卡类型不能为空", trigger: 'change'}],
321
+          medical_care: [{required: true, message: "医疗类别不能为空", trigger: 'change'}],
322
+
323
+        },
324
+        visibility: false,
325
+        labelPosition: 'right',
326
+        isClose: false,
327
+        resetForm: {
328
+          settlement_value: '',
329
+          medical_insurance_card: '',
330
+          name: '',
331
+          gender: '',
332
+          certificates: '',
333
+          id_card_type: '',
334
+          medical_care: '',
335
+          birthday: '',
336
+          age: '',
337
+          id_card: '',
338
+          register: '',
339
+          doctor: '',
340
+          department: '',
341
+          registration_fee: '',
342
+          medical_expenses: '',
343
+          cost: '',
344
+          phone: '',
345
+          social_type: '',
346
+        },
347
+
348
+      }
349
+    },
350
+    props: {
351
+      departments:{
352
+        type: Array,
353
+      },
354
+      doctors:{
355
+        type: Array,
356
+      },
357
+      titles: {
358
+        type: String,
359
+        default: ''
360
+      },
361
+      formValue: {
362
+        type: Object
363
+      },
364
+      type: {
365
+        type: Number,
366
+        default: 1
367
+
368
+      },
369
+      isCreated: {
370
+        type: Number,
371
+        default: 1
372
+
373
+      },
374
+      sick: Array,
375
+      diagnoses: Array,
376
+    },
377
+    methods: {
378
+      changeDoctor() {
379
+        for (let i = 0; i < this.doctors.length; i++) {
380
+          if (this.doctors[i].admin_user_id == this.form.doctor) {
381
+            console.log(this.doctors[i].department_id);
382
+            this.form.department = this.doctors[i].department_id;
383
+            if(this.form.department == 0){
384
+
385
+              this.form.department = ""
386
+            }
387
+          }
388
+        }
389
+      },
390
+      changeRegister(value){
391
+        if (value != 4){
392
+          this.form.registration_fee = 10;
393
+          this.form.medical_expenses = 0
394
+        }else{
395
+          this.form.registration_fee = 0;
396
+          this.form.medical_expenses = 0
397
+        }
398
+      },
399
+      handleSelect(val) {
400
+        this.form.id = val.id;
401
+        this.form.name = val.name;
402
+        this.form.gender = val.gender;
403
+        this.form.age = val.age;
404
+        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}');
405
+        this.form.phone = val.phone;
406
+        this.form.id_card = val.id_card_no
407
+      },
408
+      querySearchAsync(keyword, cb) {
409
+        let key = '';
410
+        if (keyword != undefined) {
411
+          key = keyword
412
+        }
413
+        let searchArray = [];
414
+        PostSearch(key).then(response => {
415
+          if (response.data.state == 1) {
416
+            searchArray = response.data.data.patient;
417
+            cb(searchArray)
418
+          } else {
419
+            cb([])
420
+          }
421
+        })
422
+      },
423
+      reading() {
424
+
425
+        var that = this;
426
+        if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
427
+          this.$message.error("请先选择读卡类型");
428
+          return
429
+        }
430
+        let params = {
431
+          'id_card_type': this.form.id_card_type,
432
+          'admin_user_id':this.$store.getters.xt_user.user.id,
433
+
434
+        };
435
+        this.read_loading = true;
436
+        axios.get('http://127.0.0.1:9532/sz/api/readcard', {
437
+          params: params
438
+        })
439
+          .then(function (response) {
440
+            if (response.data.state == 0) {
441
+              that.read_loading = false;
442
+
443
+              that.$message.error(response.data.msg);
444
+              return false
445
+            } else {
446
+              that.read_loading = false;
447
+              var patient = response.data.data.patient;
448
+              if (that.form.id_card_type == 1) {
449
+                that.form.id = patient.id;
450
+                that.form.name = patient.name;
451
+                that.form.gender = patient.gender;
452
+                that.form.age = patient.age;
453
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
454
+                that.form.phone = patient.phone;
455
+                that.form.id_card = patient.id_card_no;
456
+                that.form.medical_insurance_card = response.data.data.health_card_no
457
+              } else if (that.form.id_card_type == 2) {
458
+                this.form.id = patient.id;
459
+                that.form.name = patient.name;
460
+                that.form.gender = patient.gender;
461
+                that.form.age = patient.age;
462
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
463
+                that.form.phone = patient.phone;
464
+                that.form.id_card = patient.id_card_no
465
+              }
466
+              that.$message({message: '读卡成功', type: 'success'})
467
+
468
+            }
469
+          })
470
+          .catch(function (error) {
471
+
472
+          });
473
+
474
+
475
+      },
476
+      getDictionaryDataConfig(module, filed_name) {
477
+        return getDictionaryDataConfig(module, filed_name)
478
+      },
479
+      show: function () {
480
+        this.form = Object.assign({}, this.resetForm);
481
+        // this.form.name = patientInfo.name
482
+        // this.form.gender = patientInfo.gender
483
+        // this.form.age = patientInfo.age
484
+        // this.form.birthday = patientInfo.birthday
485
+        // this.form.phone = patientInfo.phone
486
+        // this.form.birthday = patientInfo.birthday
487
+        // this.form.id_card = patientInfo.id_card_no
488
+        // this.form.social_type = patientInfo.health_care_type
489
+        this.form.id_card_type = 1;
490
+        this.form.certificates = 1;
491
+
492
+        // if( this.form.social_type == 0){
493
+        //   this.form.social_type = ""
494
+        //
495
+        // }
496
+        this.visibility = true
497
+
498
+      }, hide: function () {
499
+        this.visibility = false;
500
+        this.$refs['formValue'].resetFields()
501
+      }, cancel: function (formName) {
502
+        this.$emit('cancel', this.getValue());
503
+        this.$refs['formValue'].resetFields()
504
+      },
505
+      confirm: function (formName) {
506
+        this.$refs['formValue'].validate((valid) => {
507
+          if (valid) {
508
+            let value = {};
509
+            value = this.getValue();
510
+            this.$emit('confirm', value)
511
+          }
512
+        })
513
+      },
514
+      getValue: function () {
515
+        let form = {};
516
+        form = this.form;
517
+        return form
518
+      }
519
+    }
520
+
521
+  }
522
+</script>
523
+
524
+<style lang="scss" scoped>
525
+    .registerDialog {
526
+
527
+    .el-form {
528
+        display: flex;
529
+        flex-wrap: wrap;
530
+    }
531
+
532
+    .el-form-item {
533
+        width: 50%;
534
+    }
535
+
536
+    }
537
+</style>

+ 136 - 0
src/xt_pages/hospitalStation/components/saveRecordTemplate.vue View File

@@ -0,0 +1,136 @@
1
+<template>
2
+    <el-dialog
3
+        title="保存病历模板"
4
+        width="600px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+        class="recordDialog"
8
+    >
9
+        <el-form class="recordForm" :model="form"  ref="form" label-width="80px">
10
+            <el-form-item label="模板名称: " prop="name" style="width:100%;">
11
+                <el-input v-model="template_name" placeholder=""></el-input>
12
+            </el-form-item>
13
+            <el-form-item label="模板说明:" prop="name" style="width:100%;">
14
+                <el-input
15
+                type="textarea"
16
+                :rows="2"
17
+                placeholder="请输入内容"
18
+                v-model="template_remark">
19
+                </el-input>
20
+            </el-form-item>
21
+            <el-form-item label="创建人:" prop="name" style="width:49%;">
22
+                <span>{{user_name}}</span>
23
+            </el-form-item>
24
+            <el-form-item label="创建时间:" prop="name" style="width:49%;">
25
+                {{start_time}}
26
+            </el-form-item>
27
+        </el-form>
28
+        <div slot="footer" class="dialog-footer">
29
+            <el-button @click="hide">取 消</el-button>
30
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
31
+        </div>
32
+    </el-dialog>
33
+</template>
34
+
35
+<script>
36
+const moment = require('moment');
37
+import { SaveHisPatientCaseHistoryTemplate } from "@/api/project/project"
38
+export default {
39
+    data(){
40
+        return{
41
+            visible:false,
42
+            form:{
43
+                name:''
44
+            },
45
+            mode_type:"1",
46
+            textarea:"",
47
+            chief_conplain:"",
48
+            past_history:"",
49
+            history_of_present_illness:"",
50
+            personal_history:"",
51
+            family_history:"",
52
+            diagnostic:"",
53
+            mode_type:"",
54
+            start_time:"",
55
+            user_name:"",
56
+            template_name:"",
57
+            template_remark:"",
58
+            mode_status:0,
59
+            doctor_advice:'',
60
+            remark:''
61
+        }
62
+     },
63
+
64
+    methods:{
65
+        _close: function(done) {
66
+            // this.clear()
67
+            done()
68
+        },
69
+        clear: function() {
70
+            this.form.id = 0;
71
+            this.form.name = "";
72
+            this.form.intro = "";
73
+        },
74
+        show(obj) {
75
+         console.log("obj",obj);
76
+         this.chief_conplain= obj.chief_conplaint;
77
+         this.past_history = obj.past_history;
78
+         this.history_of_present_illness = obj.history_of_present_illness;
79
+         this.personal_history = obj.personal_history;
80
+         this.family_history = obj.family_history;
81
+         this.diagnostic = obj.diagnostic;
82
+         this.doctor_advice = obj.doctor_advice;
83
+         this.remark = obj.remark;
84
+         this.visible = true
85
+        },
86
+        hide() {
87
+            // this.clear()
88
+            this.visible = false
89
+        },
90
+
91
+        submitAction(){
92
+          var params = {
93
+             template_name:this.template_name,
94
+             template_remark:this.template_remark,
95
+             user_name:this.user_name,
96
+             record_date:this.start_time,
97
+             chief_conplain:this.chief_conplain,
98
+             past_history:this.past_history,
99
+             history_of_present_illness:this.history_of_present_illness,
100
+             personal_history:this.personal_history,
101
+             family_history:this.family_history,
102
+             diagnostic:this.diagnostic,
103
+             doctor_advice:this.doctor_advice,
104
+             remark:this.remark
105
+            };
106
+         console.log("params",params);
107
+
108
+          SaveHisPatientCaseHistoryTemplate(params).then(response=>{
109
+              if(response.data.state == 1){
110
+                 this.mode_status = 1;
111
+                 this.$message.success("保存成功");
112
+                 this.visible = false
113
+
114
+              }
115
+          })
116
+        }
117
+    },
118
+    created(){
119
+      this.start_time = moment().format("YYYY-MM-DD HH:mm:ss");
120
+      this.user_name = this.$store.getters.xt_user.user.user_name
121
+
122
+    }
123
+}
124
+</script>
125
+
126
+<style lang="scss" scoped>
127
+.recordForm{
128
+    display: flex;
129
+    flex-wrap: wrap;
130
+    .el-form-item{
131
+        width:24%;
132
+        margin-right: 1%;
133
+    }
134
+}
135
+</style>
136
+

+ 89 - 0
src/xt_pages/hospitalStation/components/saveTemplate.vue View File

@@ -0,0 +1,89 @@
1
+<template>
2
+    <el-dialog
3
+        title="模板信息"
4
+        width="600px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+    >
8
+        <div>
9
+            <el-form :model="form"  class="adviceForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
10
+                <el-form-item label="创建人 : " style="width: 100%;margin-bottom:0;">
11
+                    医生
12
+                </el-form-item>
13
+                <el-form-item label="处方类型 : " style="width: 100%;margin-bottom:0;">
14
+                    药品模板
15
+                </el-form-item>
16
+                <el-form-item label="模板类型 : " style="width: 100%;margin-bottom:0;">
17
+                    <el-radio v-model="radio" label="1">临时</el-radio>
18
+                    <el-radio v-model="radio" label="2">长期</el-radio>
19
+                </el-form-item>
20
+                <el-form-item label="科室 : " style="width: 100%;">
21
+                    <el-select v-model="value" style="width:100%;" placeholder="请选择">
22
+                        <el-option
23
+                        v-for="item in options"
24
+                        :key="item.value"
25
+                        :label="item.label"
26
+                        :value="item.value">
27
+                        </el-option>
28
+                    </el-select>
29
+                </el-form-item>
30
+                <el-form-item label="模板名称 : " style="width: 100%;">
31
+                    <el-input v-model="form.name" placeholder=""></el-input>
32
+                </el-form-item>
33
+                <el-form-item label="模板说明 : " style="width: 100%;">
34
+                    <el-input v-model="form.name" placeholder=""></el-input>
35
+                </el-form-item>
36
+                <el-form-item label="诊断信息 : " style="width: 100%;">
37
+                    <el-input v-model="form.name" placeholder=""></el-input>
38
+                </el-form-item>
39
+                <el-form-item label="医嘱说明 : " style="width: 100%;">
40
+                    <el-input v-model="form.name" placeholder=""></el-input>
41
+                </el-form-item>
42
+                <el-form-item label="备注说明 : " style="width: 100%;">
43
+                    <el-input v-model="form.name" placeholder=""></el-input>
44
+                </el-form-item>
45
+            </el-form>
46
+        </div>
47
+        <div slot="footer" class="dialog-footer">
48
+            <el-button @click="hide">取 消</el-button>
49
+            <el-button type="primary" @click="submitAction()">保 存</el-button>
50
+        </div>
51
+    </el-dialog>         
52
+</template>
53
+
54
+<script>
55
+export default {
56
+    data(){
57
+        return{
58
+            visible:false,
59
+            form:{
60
+                name:''
61
+            },
62
+            radio:"1",
63
+            options:[],
64
+            value:''
65
+        }
66
+    },
67
+    methods:{
68
+        _close: function(done) {
69
+            // this.clear()
70
+            done()
71
+        },
72
+        clear: function() {
73
+            this.form.id = 0;
74
+            this.form.name = "";
75
+            this.form.intro = "";
76
+        },
77
+        show() {
78
+            // this.clear()
79
+            this.visible = true
80
+        },
81
+        hide() {
82
+            // this.clear()
83
+            this.visible = false
84
+        },
85
+    }
86
+}
87
+</script>
88
+
89
+

+ 96 - 0
src/xt_pages/hospitalStation/components/selectTemplate.vue View File

@@ -0,0 +1,96 @@
1
+<template>
2
+    <el-dialog
3
+        title="选择模板"
4
+        width="1000px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+    >
8
+        <div style="display:flex;">
9
+            <div style="width: 201px;">
10
+                <el-table :data="tableData" border height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
11
+                    <el-table-column align="center" prop="name" label="处方类型" width="100">
12
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
13
+                    </el-table-column>
14
+                    <el-table-column align="center" prop="name" label="模板名称" width="100">
15
+                        <template slot-scope="scope">{{ scope.row.date }}</template>
16
+                    </el-table-column>
17
+                </el-table> 
18
+            </div>
19
+            <el-table :data="tableData" border height="300" style="flex:1;margin-left:20px;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
20
+                <el-table-column type="selection" width="55" align="center"></el-table-column>
21
+                <el-table-column align="center" prop="name" label="药品名称">
22
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
23
+                </el-table-column>
24
+                <el-table-column align="center" prop="name" label="药品规格">
25
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
26
+                </el-table-column>
27
+                <el-table-column align="center" prop="name" label="单次用量">
28
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
29
+                </el-table-column>
30
+                <el-table-column align="center" prop="name" label="用法">
31
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
32
+                </el-table-column>
33
+                <el-table-column align="center" prop="name" label="频率">
34
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
35
+                </el-table-column>
36
+                <el-table-column align="center" prop="name" label="天数">
37
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
38
+                </el-table-column>
39
+                <el-table-column align="center" prop="name" label="总量">
40
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
41
+                </el-table-column>
42
+            </el-table> 
43
+        </div>
44
+        <div slot="footer" class="dialog-footer">
45
+            <el-button @click="hide">取 消</el-button>
46
+            <el-button type="primary"  @click="submitAction()">保 存</el-button>
47
+        </div>
48
+    </el-dialog>         
49
+</template>
50
+
51
+<script>
52
+export default {
53
+    data(){
54
+        return{
55
+            visible:false,
56
+            tableData: [{
57
+            date: '2016-05-02',
58
+            name: '王小虎',
59
+            address: '上海市普陀区金沙江路 1518 弄'
60
+            }, {
61
+            date: '2016-05-04',
62
+            name: '王小虎',
63
+            address: '上海市普陀区金沙江路 1517 弄'
64
+            }, {
65
+            date: '2016-05-01',
66
+            name: '王小虎',
67
+            address: '上海市普陀区金沙江路 1519 弄'
68
+            }, {
69
+            date: '2016-05-03',
70
+            name: '王小虎',
71
+            address: '上海市普陀区金沙江路 1516 弄'
72
+            }]
73
+        }
74
+    },
75
+    methods:{
76
+        _close: function(done) {
77
+            // this.clear()
78
+            done()
79
+        },
80
+        clear: function() {
81
+            this.form.id = 0;
82
+            this.form.name = "";
83
+            this.form.intro = "";
84
+        },
85
+        show() {
86
+            // this.clear()
87
+            this.visible = true
88
+        },
89
+        hide() {
90
+            // this.clear()
91
+            this.visible = false
92
+        },
93
+    }
94
+}
95
+</script>
96
+

+ 97 - 0
src/xt_pages/hospitalStation/components/templateDetail.vue View File

@@ -0,0 +1,97 @@
1
+<template>
2
+    <el-dialog
3
+        title="详情"
4
+        width="1000px"
5
+        :visible.sync="visible"
6
+        :before-close="_close"
7
+    >
8
+        <el-table :data="tableData" border height="350" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
9
+            <el-table-column align="center" prop="name" label="类型">
10
+                <template slot-scope="scope">{{ scope.row.date }}</template>
11
+            </el-table-column>
12
+            <el-table-column align="center" prop="name" label="医嘱名称">
13
+                <template slot-scope="scope">{{ scope.row.date }}</template>
14
+            </el-table-column>
15
+            <el-table-column align="center" prop="name" label="组">
16
+                <template slot-scope="scope">{{ scope.row.date }}</template>
17
+            </el-table-column>
18
+            <el-table-column align="center" prop="name" label="每次量">
19
+                <template slot-scope="scope">{{ scope.row.date }}</template>
20
+            </el-table-column>
21
+            <el-table-column align="center" prop="name" label="单位/容量">
22
+                <template slot-scope="scope">{{ scope.row.date }}</template>
23
+            </el-table-column>
24
+            <el-table-column align="center" prop="name" label="用法">
25
+                <template slot-scope="scope">{{ scope.row.date }}</template>
26
+            </el-table-column>
27
+            <el-table-column align="center" prop="name" label="频率">
28
+                <template slot-scope="scope">{{ scope.row.date }}</template>
29
+            </el-table-column>
30
+            <el-table-column align="center" prop="name" label="天数">
31
+                <template slot-scope="scope">{{ scope.row.date }}</template>
32
+            </el-table-column>
33
+            <el-table-column align="center" prop="name" label="总量">
34
+                <template slot-scope="scope">{{ scope.row.date }}</template>
35
+            </el-table-column>
36
+            <el-table-column align="center" prop="name" label="限制说明">
37
+                <template slot-scope="scope">{{ scope.row.date }}</template>
38
+            </el-table-column>
39
+            <el-table-column align="center" prop="name" label="组套名称">
40
+                <template slot-scope="scope">{{ scope.row.date }}</template>
41
+            </el-table-column>
42
+        </el-table> 
43
+        <div slot="footer" class="dialog-footer">
44
+            <el-button @click="hide">取 消</el-button>
45
+            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
46
+        </div>
47
+    </el-dialog>         
48
+</template>
49
+
50
+<script>
51
+export default {
52
+    data(){
53
+        return{
54
+            visible:false,
55
+            tableData: [{
56
+            date: '2016-05-02',
57
+            name: '王小虎',
58
+            address: '上海市普陀区金沙江路 1518 弄'
59
+            }, {
60
+            date: '2016-05-04',
61
+            name: '王小虎',
62
+            address: '上海市普陀区金沙江路 1517 弄'
63
+            }, {
64
+            date: '2016-05-01',
65
+            name: '王小虎',
66
+            address: '上海市普陀区金沙江路 1519 弄'
67
+            }, {
68
+            date: '2016-05-03',
69
+            name: '王小虎',
70
+            address: '上海市普陀区金沙江路 1516 弄'
71
+            }],
72
+            activeName:'first'
73
+        }
74
+    },
75
+    methods:{
76
+        _close: function(done) {
77
+            // this.clear()
78
+            done()
79
+        },
80
+        clear: function() {
81
+            this.form.id = 0;
82
+            this.form.name = "";
83
+            this.form.intro = "";
84
+        },
85
+        show() {
86
+            // this.clear()
87
+            this.visible = true
88
+        },
89
+        hide() {
90
+            // this.clear()
91
+            this.visible = false
92
+        },
93
+    }
94
+}
95
+</script>
96
+
97
+

+ 625 - 0
src/xt_pages/hospitalStation/costComparison.vue View File

@@ -0,0 +1,625 @@
1
+<template>
2
+    <div class="main-contain incomeStatistics">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+        <div class="app-container">
7
+            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+                <div>
9
+                    <el-input size="small" style="width:130px;" v-model="keywords"
10
+                              class="filter-item"/>
11
+                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
12
+                               @click="searchAction">
13
+                        搜索
14
+                    </el-button>
15
+                    <el-date-picker v-model="query_start_time" prefix-icon="el-icon-date"
16
+                                    @change="handleStartTimeChange" :editable="false" :clearable="false"
17
+                                    style="width: 130px;" type="date" placeholder="选择开始日期"
18
+                                    format="yyyy-MM-dd"
19
+                                    value-format="yyyy-MM-dd"
20
+                                    align="right"></el-date-picker>
21
+                    -
22
+
23
+                    <el-date-picker v-model="query_end_time" prefix-icon="el-icon-date"
24
+                                    @change="handleEndTimeChange" :editable="false" :clearable="false"
25
+                                    style="width: 130px;margin-right:10px;" type="date" placeholder="选择结束日期"
26
+                                    format="yyyy-MM-dd"
27
+                                    value-format="yyyy-MM-dd"
28
+                                    align="right"></el-date-picker>
29
+
30
+
31
+                    <label class="title">险种<span class="name"></span> : </label>
32
+                    <el-select v-model="query_insutype" style="width:140px;margin-right:10px;" placeholder="请选择"
33
+                               @change="changeInsutype">
34
+                        <el-option
35
+                                v-for="item in insutypes"
36
+                                :key="item.value"
37
+                                :label="item.label"
38
+                                :value="item.value">
39
+                        </el-option>
40
+                    </el-select>
41
+
42
+
43
+                    <label class="title">清算类别<span class="name"></span> : </label>
44
+                    <el-select v-model="query_clr_type" style="width:100px;margin-right:10px;" placeholder="请选择"
45
+                               @change="changeClrType">
46
+                        <el-option
47
+                                v-for="item in clrOptions"
48
+                                :key="item.value"
49
+                                :label="item.label"
50
+                                :value="item.value">
51
+                        </el-option>
52
+                    </el-select>
53
+
54
+                </div>
55
+
56
+            </div>
57
+            <div style="float: right;margin-bottom: 10px">
58
+                <el-button size="small" type="primary" @click="dialogFormVisible = true">医保对账</el-button>
59
+                <el-button size="small" type="primary" @click="getFormData">下载对账报表</el-button>
60
+            </div>
61
+
62
+
63
+            <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
64
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
65
+                      highlight-current-row
66
+                      @select="selectCostInfo"
67
+                      @selection-change="changeCostInfoTableData"
68
+                      @select-all="changeAllCostInfoTableData"
69
+                      row-key="row_key"
70
+                      ref="multipleTable"
71
+            >
72
+                <el-table-column
73
+                        align="center"
74
+                        type="selection"
75
+                        width="55"
76
+                ></el-table-column>
77
+                <el-table-column
78
+                        prop="date"
79
+                        label="序号"
80
+                        width="60"
81
+                        align="center"
82
+                        type="index"
83
+                >
84
+                </el-table-column>
85
+                <el-table-column align="center" prop="name" label="对账结果">
86
+                    <template slot-scope="scope">{{'平'}}</template>
87
+                </el-table-column>
88
+                <el-table-column align="center" prop="name" label="操作机构">
89
+                    <!--<template slot-scope="scope">{{// this.$store.getters.xt_user.org.org_name}}</template>-->
90
+                </el-table-column>
91
+                <el-table-column align="center" prop="name" label="对账申请人">
92
+                    <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
93
+                </el-table-column>
94
+                <el-table-column align="center" prop="name" label="开始时间">
95
+                    <template slot-scope="scope">{{getTimes(scope.row.start_time)}}</template>
96
+                </el-table-column>
97
+                <el-table-column align="center" prop="name" label="结束时间">
98
+                    <template slot-scope="scope">{{getTimes(scope.row.end_time)}}</template>
99
+                </el-table-column>
100
+                <el-table-column align="center" prop="name" label="险种类型">
101
+                    <template slot-scope="scope">
102
+                        <div v-if="scope.row.insutype == '310'">职工基本医疗保险</div>
103
+                        <div v-if="scope.row.insutype == '320'">公务员医疗补助</div>
104
+                        <div v-if="scope.row.insutype == '330'">大额医疗费用补助</div>
105
+                        <div v-if="scope.row.insutype == '340'">离休人员医疗保障</div>
106
+                        <div v-if="scope.row.insutype == '390'">城乡居民基本医疗保险</div>
107
+                        <div v-if="scope.row.insutype == '392'">城乡居民大病医疗保险</div>
108
+                        <div v-if="scope.row.insutype == '510'">生育保险</div>
109
+                    </template>
110
+                </el-table-column>
111
+                <el-table-column align="center" prop="name" label="对账类型">
112
+                    <template slot-scope="scope">
113
+                        <div v-if="scope.row.check_type == 1">总账</div>
114
+                        <div v-if="scope.row.check_type == 2">明细</div>
115
+                    </template>
116
+                </el-table-column>
117
+                <el-table-column align="center" prop="name" label="清算经办机构">
118
+                    <template slot-scope="scope">{{getName(scope.row.creator)}}</template>
119
+                </el-table-column>
120
+                <el-table-column align="center" prop="name" label="定点医药机构医疗费总额(元)">
121
+                    <template slot-scope="scope">{{scope.row.setl_optins}}</template>
122
+                </el-table-column>
123
+                <el-table-column align="center" prop="name" label="医保中心医疗费总额(元)">
124
+                    <template slot-scope="scope">{{scope.row.cost_total}}</template>
125
+                </el-table-column>
126
+                <el-table-column align="center" prop="name" label="定点医药机构基金总额(元)">
127
+                    <template slot-scope="scope">{{scope.row.cost_total}}</template>
128
+                </el-table-column>
129
+                <el-table-column align="center" prop="name" label="医保中心基金总额(元)">
130
+                    <template slot-scope="scope">{{scope.row.func_total}}</template>
131
+                </el-table-column>
132
+                <el-table-column align="center" prop="name" label="定点医药机构个人账号总额(元)">
133
+                    <template slot-scope="scope">{{scope.row.func_total}}</template>
134
+                </el-table-column>
135
+                <el-table-column align="center" prop="name" label="医保中心个人账号总额(元)">
136
+                    <template slot-scope="scope">{{scope.row.psn_pay}}</template>
137
+                </el-table-column>
138
+                <el-table-column align="center" prop="name" label="定点医药机构结算笔数">
139
+                    <template slot-scope="scope">{{scope.row.psn_pay}}</template>
140
+                </el-table-column>
141
+                <el-table-column align="center" prop="name" label="医保中心结算笔数">
142
+                    <template slot-scope="scope">{{scope.row.num}}</template>
143
+                </el-table-column>
144
+
145
+            </el-table>
146
+            <el-pagination
147
+                    @size-change="handleSizeChange"
148
+                    @current-change="handleCurrentChange"
149
+                    :page-sizes="[10, 50, 100]"
150
+                    :page-size="10"
151
+                    background
152
+                    style="margin-top:20px;float: right"
153
+                    layout="total, sizes, prev, pager, next, jumper"
154
+                    :total="total"
155
+            >
156
+            </el-pagination>
157
+            <el-dialog title="医保对账" :visible.sync="dialogFormVisible">
158
+                <el-form :model="form" label-width="100px">
159
+                    <el-form-item label="时间" label-width="100px">
160
+                        <el-date-picker v-model="start_time" prefix-icon="el-icon-date"
161
+                                        @change="handleStartTimeChange" :editable="false" :clearable="false"
162
+                                        style="width: 200px;" type="date" placeholder="选择开始日期"
163
+                                        format="yyyy-MM-dd"
164
+                                        value-format="yyyy-MM-dd"
165
+                                        align="right"></el-date-picker>
166
+                        -
167
+
168
+                        <el-date-picker v-model="end_time" prefix-icon="el-icon-date"
169
+                                        @change="handleEndTimeChange" :editable="false" :clearable="false"
170
+                                        style="width: 200px;margin-right:10px;" type="date" placeholder="选择结束日期"
171
+                                        format="yyyy-MM-dd"
172
+                                        value-format="yyyy-MM-dd"
173
+                                        align="right"></el-date-picker>
174
+                    </el-form-item>
175
+                    <el-form-item label="险种类型" :label-width="formLabelWidth">
176
+                        <el-select v-model="insutype" placeholder="请选择" style="width: 200px;">
177
+                            <el-option
178
+                                    v-for="item in insutypes"
179
+                                    :key="item.value"
180
+                                    :label="item.label"
181
+                                    :value="item.value">
182
+                            </el-option>
183
+                        </el-select>
184
+                    </el-form-item>
185
+                    <el-form-item label="对账类型" :label-width="formLabelWidth">
186
+                        <el-select v-model="check_type" placeholder="请选择" style="width: 200px;">
187
+                            <el-option
188
+                                    v-for="item in options"
189
+                                    :key="item.value"
190
+                                    :label="item.label"
191
+                                    :value="item.value">
192
+                            </el-option>
193
+                        </el-select>
194
+                    </el-form-item>
195
+                </el-form>
196
+                <div slot="footer" class="dialog-footer">
197
+                    <el-button @click="dialogFormVisible = false">取 消</el-button>
198
+                    <el-button type="primary" @click="confirm">确 定</el-button>
199
+                </div>
200
+            </el-dialog>
201
+        </div>
202
+
203
+
204
+    </div>
205
+</template>
206
+
207
+
208
+<script>
209
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
210
+  import {
211
+    getCheckAccountFormData,
212
+    getDoctorList,
213
+    getExportConsumeDetailList,
214
+    getHisOrderList,
215
+    getList
216
+  } from '@/api/his/his'
217
+  import { uParseTime } from '@/utils/tools'
218
+  import { fetchAllAdminUsers } from '@/api/doctor'
219
+  import axios from 'axios'
220
+
221
+  export default {
222
+    components: {
223
+      BreadCrumb
224
+    },
225
+    data() {
226
+      return {
227
+        form: {},
228
+        crumbs: [
229
+          { path: false, name: '门诊收费' },
230
+          { path: false, name: '医保费用对照' }
231
+        ],
232
+        tableData: [],
233
+        limit: 10,
234
+        page: 1,
235
+        dialogFormVisible: false,
236
+        total: 0,
237
+        adminUserOptions: [],
238
+        start_time: '',
239
+        end_time: '',
240
+        insutype: '',
241
+        check_type: '',
242
+        keywords: '',
243
+        query_start_time: '',
244
+        query_end_time: '',
245
+        selection:[],
246
+        query_insutype: '',
247
+        query_clr_type: '',
248
+        fromData: [],
249
+        options: [
250
+          {
251
+            value: 1,
252
+            label: '总账'
253
+          }, {
254
+            value: 2,
255
+            label: '明细'
256
+          }
257
+        ],
258
+        clrOptions: [
259
+          {
260
+            value: '11',
261
+            label: '门诊'
262
+          }, {
263
+            value: '21',
264
+            label: '住院'
265
+          }, {
266
+            value: '41',
267
+            label: '药店购药'
268
+          }, {
269
+            value: '99',
270
+            label: '其他'
271
+          }
272
+        ],
273
+        insutypes: [
274
+          {
275
+            value: '310',
276
+            label: '职工基本医疗保险'
277
+          }, {
278
+            value: '320',
279
+            label: '公务员医疗补助'
280
+          }, {
281
+            value: '330',
282
+            label: '大额医疗费用补助'
283
+          }, {
284
+            value: '340',
285
+            label: '离休人员医疗保障'
286
+          },
287
+          {
288
+            value: '390',
289
+            label: '城乡居民基本医疗保险'
290
+          }, {
291
+            value: '392',
292
+            label: '城乡居民大病医疗保险'
293
+          }, {
294
+            value: '510',
295
+            label: '生育保险'
296
+          }
297
+
298
+          // 1617724800
299
+
300
+        ]
301
+
302
+      }
303
+    },
304
+    methods: {
305
+      changeInsutype() {
306
+        let params = {
307
+          'page': 1,
308
+          'limit': 10,
309
+          'keywords': this.keywords,
310
+          'insutype': this.query_insutype,
311
+          'clr_type': "11",
312
+          'start_time': this.query_start_time,
313
+          'end_time': this.query_end_time,
314
+        };
315
+        this.tableData = [];
316
+        getList(params).then(response => {
317
+          if (response.data.state == 0) {
318
+            this.$message.error(response.data.msg);
319
+            return false
320
+          } else {
321
+            this.tableData = response.data.data.list;
322
+            this.total = response.data.data.total
323
+          }
324
+        })
325
+
326
+      }, changeClrType(val) {
327
+        if (val != "11"){
328
+          this.tableData = [];
329
+          this.total = 0
330
+        }else{
331
+          let params = {
332
+            'page': 1,
333
+            'limit': 10,
334
+            'keywords': this.keywords,
335
+            'insutype': this.query_insutype,
336
+            'clr_type': "11",
337
+            'start_time': this.query_start_time,
338
+            'end_time': this.query_end_time,
339
+          };
340
+          this.tableData = [];
341
+          getList(params).then(response => {
342
+            if (response.data.state == 0) {
343
+              this.$message.error(response.data.msg);
344
+              return false
345
+            } else {
346
+              this.tableData = response.data.data.list;
347
+              this.total = response.data.data.total
348
+            }
349
+          })
350
+        }
351
+      },
352
+      handleStartTimeChange() {
353
+
354
+        let params = {
355
+          'page': 1,
356
+          'limit': 10,
357
+          'keywords': this.keywords,
358
+          'insutype': "",
359
+          'clr_type': "11",
360
+          'start_time': this.query_start_time,
361
+          'end_time': this.query_end_time,
362
+        };
363
+        this.tableData = [];
364
+        getList(params).then(response => {
365
+          if (response.data.state == 0) {
366
+            this.$message.error(response.data.msg);
367
+            return false
368
+          } else {
369
+            this.tableData = response.data.data.list;
370
+            this.total = response.data.data.total
371
+          }
372
+        })
373
+
374
+      }, handleEndTimeChange() {
375
+
376
+        let params = {
377
+          'page': 1,
378
+          'limit': 10,
379
+          'keywords': this.keywords,
380
+          'insutype': "",
381
+          'clr_type': "11",
382
+          'start_time': this.query_start_time,
383
+          'end_time': this.query_end_time,
384
+        };
385
+        this.tableData = [];
386
+        getList(params).then(response => {
387
+          if (response.data.state == 0) {
388
+            this.$message.error(response.data.msg);
389
+            return false
390
+          } else {
391
+            this.tableData = response.data.data.list;
392
+            this.total = response.data.data.total
393
+          }
394
+        })
395
+
396
+      },
397
+
398
+      searchAction() {
399
+        let params = {
400
+          'page': 1,
401
+          'limit': 10,
402
+          'keywords': this.keywords,
403
+          'insutype': "",
404
+          'clr_type': "11",
405
+          'start_time': "",
406
+          'end_time': "",
407
+        };
408
+        this.tableData = [];
409
+        getList(params).then(response => {
410
+          if (response.data.state == 0) {
411
+            this.$message.error(response.data.msg);
412
+            return false
413
+          } else {
414
+            this.tableData = response.data.data.list;
415
+            this.total = response.data.data.total
416
+          }
417
+        })
418
+
419
+      },
420
+      selectCostInfo(selection, row) {
421
+        this.selection = selection
422
+
423
+      }, changeCostInfoTableData(val) {
424
+        this.selection = val
425
+      }, changeAllCostInfoTableData(selection) {
426
+        this.selection = selection
427
+
428
+
429
+      }, confirm() {
430
+        if (this.check_type == 1) {
431
+          let params = {
432
+            start_time: this.start_time,
433
+            end_time: this.end_time,
434
+            insutype: this.insutype,
435
+            clr_type: '11'
436
+          };
437
+          var that = this;
438
+          if (this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990 ) {
439
+            axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
440
+              params: params
441
+            })
442
+              .then(function(response) {
443
+                if (response.data.state == 0) {
444
+                  that.$message.error(response.data.msg);
445
+                  return false
446
+                } else {
447
+                  var result_desc = '';
448
+
449
+                  if (response.data.data.stmt_rslt == 0) {
450
+                    result_desc = '对账平'
451
+                  } else if (response.data.data.stmt_rslt == 1) {
452
+                    result_desc = '中心多' + '\n' + response.data.data.stmt_rslt_dscr
453
+
454
+                  } else if (response.data.data.stmt_rslt == 2) {
455
+                    result_desc = '机构多' + '\n' + response.data.data.stmt_rslt_dscr
456
+                  }
457
+
458
+                  that.$alert(result_desc, '对账结果', {
459
+                    confirmButtonText: '确定',
460
+                    callback: action => {
461
+                      this.dialogFormVisible = false
462
+                    }
463
+                  });
464
+
465
+                  that.page = 1;
466
+                  that.limit = 10;
467
+                  that.keywords = '';
468
+                  that.query_start_time = '';
469
+                  that.query_end_time = '';
470
+                  that.query_insutype = '';
471
+                  that.query_clr_type = '';
472
+                  that.getList()
473
+                }
474
+              })
475
+              .catch(function(error) {
476
+
477
+              })
478
+
479
+          }
480
+
481
+        } else {
482
+          let params = {
483
+            start_time: this.start_time,
484
+            end_time: this.end_time
485
+          };
486
+          var that = this;
487
+          axios.get('http://127.0.0.1:9532/api/checkdetailaccount/get', {
488
+            params: params
489
+          })
490
+            .then(function(response) {
491
+              if (response.data.state == 0) {
492
+                that.$message.error(response.data.msg);
493
+                return false
494
+              } else {
495
+                this.page = 1;
496
+                this.limit = 10;
497
+                this.keywords = '';
498
+                this.getList()
499
+              }
500
+            })
501
+            .catch(function(error) {
502
+
503
+            })
504
+        }
505
+      },
506
+      getInsutype(type) {
507
+
508
+      },
509
+      fetchAllAdminUsers() {
510
+        fetchAllAdminUsers().then(response => {
511
+          if (response.data.state == 1) {
512
+            this.adminUserOptions = response.data.data.users
513
+
514
+          }
515
+        })
516
+      },
517
+      getName(admin_user_id) {
518
+        for (let i = 0; i < this.adminUserOptions.length; i++) {
519
+          if (this.adminUserOptions[i].id == admin_user_id) {
520
+            return this.adminUserOptions[i].name
521
+          }
522
+        }
523
+
524
+      },
525
+      getTimes(time) {
526
+        return uParseTime(time, '{y}-{m}-{d}')
527
+      },
528
+      getList() {
529
+        let params = {
530
+          'page': this.page,
531
+          'limit': this.limit,
532
+          'keywords': this.keywords,
533
+          'insutype': this.query_insutype,
534
+          'clr_type': this.query_clr_type,
535
+          'start_time': this.query_start_time,
536
+          'end_time': this.query_end_time
537
+        };
538
+        this.tableData = [];
539
+        getList(params).then(response => {
540
+          if (response.data.state == 0) {
541
+            this.$message.error(response.data.msg);
542
+            return false
543
+          } else {
544
+            this.tableData = response.data.data.list;
545
+            this.total = response.data.data.total
546
+          }
547
+        })
548
+
549
+      },
550
+      handleSizeChange(limit) {
551
+        this.limit = limit;
552
+        this.getList()
553
+      },
554
+      handleCurrentChange(page) {
555
+        this.page = page;
556
+        this.getList()
557
+
558
+      }, getFormData() {
559
+        if (this.selection.length == 0) {
560
+          this.$message.error('请选择要下载的对账记录');
561
+          return
562
+        }
563
+
564
+        let params = {
565
+          'start_time': this.getTimes(this.selection[0].start_time),
566
+          'end_time': this.getTimes(this.selection[0].end_time),
567
+          'insutype': this.selection[0].insutype
568
+        };
569
+        getCheckAccountFormData(params).then(response => {
570
+          if (response.data.state == 0) {
571
+            this.$message.error(response.data.msg);
572
+            return false
573
+          } else {
574
+            this.fromData = response.data.data.list;
575
+            var list = [];
576
+
577
+            for (let i = 0; i < this.fromData.length; i++) {
578
+              let obj = {
579
+                '结算金额': this.fromData[i].medfee_sumamt,
580
+                '姓名': this.fromData[i].psn_name,
581
+                '身份证': this.fromData[i].id_card_no,
582
+                '个人编号': this.fromData[i].psn_no,
583
+                '门诊流水号': this.fromData[i].mdtrt_id,
584
+                '挂号日期': this.getTimes(this.fromData[i].settle_accounts_date),
585
+                '起付线': this.fromData[i].act_pay_dedc,
586
+                '统筹基金': this.fromData[i].fund_pay_sumamt,
587
+                '个人支付': this.fromData[i].psn_cash_pay,
588
+                '个账支付': this.fromData[i].acct_pay,
589
+                '现金支付': this.fromData[i].cash_pay,
590
+                '总费用': this.fromData[i].sumamt,
591
+                '冲销标志': '已结算'
592
+              };
593
+              list.push(obj)
594
+            }
595
+            var insutype_name = '';
596
+            if (this.query_insutype == '310') {
597
+              insutype_name = '职工基本医疗保险'
598
+            } else if (this.query_insutype == '390') {
599
+              insutype_name = '城乡居民基本医疗保险'
600
+            }
601
+
602
+            import('@/vendor/Export2Excel').then(excel => {
603
+              const tHeader = ['结算金额', '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志'];
604
+              const filterVal = ['结算金额', '姓名', '身份证', '个人编号', '门诊流水号', '挂号日期', '起付线', '统筹基金', '个人支付', '个账支付', '现金支付', '总费用', '冲销标志'];
605
+              const data = this.formatJson(filterVal, list);
606
+              excel.export_json_to_excel({
607
+                header: tHeader,
608
+                data,
609
+                filename:this.getTimes(this.selection[0].start_time)+ '~' + this.getTimes(this.selection[0].end_time)+ insutype_name + '对账报表'
610
+              })
611
+            })
612
+          }
613
+        })
614
+
615
+      }, formatJson(filterVal, jsonData) {
616
+        return jsonData.map(v => filterVal.map(j => v[j]))
617
+      }
618
+    },
619
+    created() {
620
+      this.getList();
621
+      this.fetchAllAdminUsers()
622
+
623
+    }
624
+  }
625
+</script>

File diff suppressed because it is too large
+ 2230 - 0
src/xt_pages/hospitalStation/doctorDesk.vue


+ 329 - 0
src/xt_pages/hospitalStation/incomeStatistics.vue View File

@@ -0,0 +1,329 @@
1
+<template>
2
+  <div class="main-contain incomeStatistics">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+        <div>
9
+          <el-input size="small" style="width:150px;"  v-model="keywords"
10
+                    class="filter-item"/>
11
+          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12
+            搜索
13
+          </el-button>
14
+          <el-select size="small" v-model="admin_user_id" placeholder="请选择" style="width:150px;margin-left:10px;" @change="changeDoctor">
15
+            <el-option
16
+              label="全部"
17
+              value="0">
18
+            </el-option>
19
+            <el-option
20
+              v-for="(item,index) in type"
21
+              :key="index"
22
+              :label="item.user_name"
23
+              :value="item.admin_user_id">
24
+            </el-option>
25
+          </el-select>
26
+          <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
27
+                          @change="handleStartTimeChange" :editable="false" :clearable="false"
28
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
29
+                          format="yyyy-MM-dd"
30
+                          value-format="yyyy-MM-dd"
31
+                          align="right"></el-date-picker>
32
+
33
+          <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
34
+                          @change="handleEndTimeChange" :editable="false" :clearable="false"
35
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
36
+                          format="yyyy-MM-dd"
37
+                          value-format="yyyy-MM-dd"
38
+                          align="right"></el-date-picker>
39
+          <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
40
+          <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
41
+        </div>
42
+        <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
43
+      </div>
44
+      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
45
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
46
+        <el-table-column
47
+          prop="date"
48
+          label="序号"
49
+          width="60"
50
+          align="center"
51
+          type="index"
52
+        >
53
+        </el-table-column>
54
+        <el-table-column align="center" prop="name" label="收费日期">
55
+          <template slot-scope="scope">{{ scope.row.selt_time }}</template>
56
+        </el-table-column>
57
+
58
+
59
+        <el-table-column align="center" prop="name" label="患者名字">
60
+          <template slot-scope="scope">{{ scope.row.psn_name }}</template>
61
+        </el-table-column>
62
+        <!--<el-table-column align="center" prop="name" label="患者类型">-->
63
+          <!--<template slot-scope="scope"></template>-->
64
+        <!--</el-table-column>-->
65
+        <el-table-column align="center" prop="name" label="总金额">
66
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
67
+        </el-table-column>
68
+
69
+        <el-table-column align="center" prop="name" label="总金额">
70
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
71
+        </el-table-column>
72
+
73
+
74
+
75
+        <el-table-column align="center" prop="name" label="实收金额">
76
+          <template slot-scope="scope">{{scope.row.reality_price}}</template>
77
+        </el-table-column>
78
+        <el-table-column align="center" prop="name" label="科室">
79
+          <template slot-scope="scope">{{scope.row.p_info.department.name}}</template>
80
+        </el-table-column>
81
+        <el-table-column align="center" prop="name" label="收费日期">
82
+          <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
83
+        </el-table-column>
84
+        <el-table-column align="center" prop="name" label="收费员">
85
+          <template slot-scope="scope">{{ scope.row.p_info.doctor }}</template>
86
+        </el-table-column>
87
+        <el-table-column align="center" prop="name" label="状态">
88
+          <template slot-scope="scope">
89
+            <div v-if="scope.row.order_status == 1">待结算</div>
90
+            <div v-if="scope.row.order_status == 2">已结算</div>
91
+            <div v-if="scope.row.order_status == 3">已退费</div>
92
+          </template>
93
+        </el-table-column>
94
+        <el-table-column align="center" prop="name" label="操作">
95
+          <template slot-scope="scope">
96
+            <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
97
+          </template>
98
+        </el-table-column>
99
+      </el-table>
100
+      <el-pagination
101
+        @size-change="handleSizeChange"
102
+        @current-change="handleCurrentChange"
103
+        :page-sizes="[10, 50, 100]"
104
+        :page-size="10"
105
+        background
106
+        style="margin-top:20px;float: right"
107
+        layout="total, sizes, prev, pager, next, jumper"
108
+        :total="total"
109
+
110
+      >
111
+      </el-pagination>
112
+    </div>
113
+
114
+
115
+  </div>
116
+</template>
117
+
118
+
119
+<script>
120
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
121
+  import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
122
+  import { uParseTime } from '@/utils/tools'
123
+
124
+  export default {
125
+    components: {
126
+      BreadCrumb
127
+    },
128
+    data() {
129
+      return {
130
+        crumbs: [
131
+          { path: false, name: '门诊收费' },
132
+          { path: false, name: '项目消费明细汇总' }
133
+        ],
134
+        tableData: [],
135
+        limit:10,
136
+        page:1,
137
+        keywords:"",
138
+        start_time:"",
139
+        end_time:"",
140
+        total:"",
141
+        doctors:[],
142
+        admin_user_id:"",
143
+
144
+      }
145
+    },
146
+    methods: {
147
+      export_detail(){
148
+        let params= {
149
+          start_time:this.start_time,
150
+          end_time: this.end_time,
151
+        };
152
+        getExportConsumeDetailList(params).then(response => {
153
+          if (response.data.state == 0) {
154
+            this.$message.error(response.data.msg);
155
+            return false
156
+          } else {
157
+
158
+            let list = [];
159
+            for (let i =0; i < response.data.data.order.length; i++){
160
+            let order =   response.data.data.order[i];
161
+              let number = "";
162
+              let name = "";
163
+              let department = "";
164
+              let doctor_name = "";
165
+              let balance_accounts = "";
166
+
167
+              let order_status = "";
168
+
169
+
170
+
171
+              if(order.his_patient != null && order.his_patient.number.length > 0){
172
+                number = order.his_patient.number
173
+
174
+              }
175
+
176
+              if(order.his_patient != null ){
177
+                if(order.his_patient.balance_accounts_type == 1){
178
+                  balance_accounts = "自费"
179
+                }
180
+
181
+                if(order.his_patient.balance_accounts_type == 2){
182
+                  balance_accounts = "医保"
183
+                }
184
+              }
185
+
186
+              if(order.patient != null && order.patient.name.length > 0){
187
+                name = order.patient.name
188
+
189
+              }
190
+
191
+              if(order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0){
192
+                department = order.p_info.department.name
193
+
194
+              }
195
+
196
+              if(order.p_info != null && order.p_info.doctor.length > 0){
197
+                doctor_name = order.p_info.doctor
198
+              }
199
+
200
+              if(order.order_status == 1){
201
+                order_status = "待结算"
202
+              }
203
+
204
+              if(order.order_status == 2){
205
+                order_status = "已结算"
206
+              }
207
+
208
+              if(order.order_status == 3){
209
+                order_status = "已退费"
210
+              }
211
+
212
+
213
+              let obj = {
214
+                "就诊号":number,
215
+                "患者姓名":name,
216
+                "应收金额":order.medfee_sumamt,
217
+                "实收金额":order.medfee_sumamt,
218
+                "科室":department,
219
+                "医生姓名":doctor_name,
220
+                "收费类别":balance_accounts,
221
+                "收费者姓名":doctor_name,
222
+                "总金额":order.medfee_sumamt,
223
+                "现金支付":"",
224
+                "账户支付":"",
225
+                "支付宝支付":"",
226
+                "微信支付":"",
227
+                "其他支付":"",
228
+                "收费日期":"",
229
+                "收费状态":order_status,
230
+                "退费日期":"",
231
+              };
232
+              list.push(obj)
233
+            }
234
+            import('@/vendor/Export2Excel').then(excel => {
235
+              const tHeader = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室',"医生姓名","收费类别","收费者姓名","总金额","现金支付","账户支付","支付宝支付","微信支付","其他支付","收费日期","收费状态","退费日期"];
236
+              const filterVal = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室',"医生姓名","收费类别","收费者姓名","总金额","现金支付","账户支付","支付宝支付","微信支付","其他支付","收费日期","收费状态","退费日期"];
237
+              const data = this.formatJson(filterVal, list);
238
+              excel.export_json_to_excel({
239
+                header: tHeader,
240
+                data,
241
+                filename: "消费明细"
242
+              })
243
+            })
244
+
245
+          }
246
+        })
247
+
248
+      },  formatJson(filterVal, jsonData) {
249
+        return jsonData.map(v => filterVal.map(j => v[j]))
250
+      },
251
+      changeDoctor(){
252
+        this.page = 1;
253
+        this.keywords="";
254
+        this.getHisOrderList()
255
+      },
256
+      handleSizeChange(limit){
257
+        this.limit = limit;
258
+        this.getHisOrderList()
259
+
260
+      },handleCurrentChange(page){
261
+        this.page = page;
262
+        this.getHisOrderList()
263
+
264
+
265
+      },
266
+      handleStartTimeChange(){
267
+        this.page = 1;
268
+        this.keywords="";
269
+        this.getHisOrderList()
270
+      },handleEndTimeChange(){
271
+        this.page = 1;
272
+        this.keywords="";
273
+        this.getHisOrderList()
274
+      },
275
+      searchAction(){
276
+        this.page = 1;
277
+        this.getHisOrderList()
278
+
279
+
280
+      },
281
+      getTimes(time) {
282
+        return uParseTime(time, "{y}-{m}-{d}");
283
+      },
284
+      toDetail(row) {
285
+        this.$router.push('/outpatientCharges/summaryDetail?patient_id='+row.patient.id+"&number="+row.number)
286
+      }, getTime(value, temp) {
287
+        if (value != undefined) {
288
+          return uParseTime(value, temp)
289
+        }
290
+        return ''
291
+      },getHisOrderList(){
292
+        let params= {
293
+          page : this.page,
294
+          limit: this.limit,
295
+          keywords:this.keywords,
296
+          start_time:this.start_time,
297
+          end_time: this.end_time,
298
+          type: this.admin_user_id
299
+        };
300
+        getHisOrderList(params).then(response => {
301
+          if (response.data.state == 0) {
302
+            this.$message.error(response.data.msg);
303
+            return false
304
+          } else {
305
+            this.tableData = response.data.data.order;
306
+            this.total = response.data.data.total
307
+          }
308
+        })
309
+
310
+      },getDoctorList(){
311
+        getDoctorList().then(response => {
312
+          if (response.data.state == 0) {
313
+            this.$message.error(response.data.msg);
314
+            return false
315
+          } else {
316
+            this.doctors = response.data.data.doctors
317
+          }
318
+        })
319
+
320
+
321
+      }
322
+    }, created() {
323
+     this.getDoctorList();
324
+     this.getHisOrderList()
325
+
326
+
327
+    }
328
+  }
329
+</script>

+ 674 - 0
src/xt_pages/hospitalStation/index.vue View File

@@ -0,0 +1,674 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+
7
+    <div class="app-container">
8
+      <div class="nameTitle">患者基本信息:</div>
9
+      <div class="formMain">
10
+        <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
11
+
12
+
13
+          <el-form-item label="患者姓名:" prop="name" :validate-event="is_Name">
14
+            <el-autocomplete
15
+              class="checkSearch"
16
+              popper-class="my-autocomplete"
17
+              v-model="form.name"
18
+              :fetch-suggestions="querySearchAsync"
19
+              :trigger-on-focus="false"
20
+              placeholder="请输入病人名字"
21
+              @select="handleSelect"
22
+              style="width:160px;"
23
+            >
24
+              <i class="el-icon-search el-input__icon" slot="suffix"></i>
25
+              <template slot-scope="{ item }">
26
+                <div class="name">{{ item.name }}</div>
27
+              </template>
28
+            </el-autocomplete>
29
+          </el-form-item>
30
+
31
+
32
+          <el-form-item label="手机号码:" prop="phone">
33
+            <el-input v-model="form.phone"></el-input>
34
+          </el-form-item>
35
+
36
+
37
+          <el-form-item label="证件类型:" prop="certificates" :validate-event="is_Name">
38
+            <el-select v-model="form.certificates" placeholder="请选择">
39
+              <el-option
40
+                v-for="item in certificates"
41
+                :key="item.value"
42
+                :label="item.label"
43
+                :value="item.value">
44
+              </el-option>
45
+            </el-select>
46
+          </el-form-item>
47
+
48
+          <el-form-item label="证件号码:" prop="id_card_no" :validate-event="is_Name">
49
+            <el-input v-model="form.id_card_no"></el-input>
50
+          </el-form-item>
51
+
52
+
53
+          <el-form-item label="读卡类型:" prop="id_card_type" :validate-event="is_Name">
54
+            <el-select v-model="form.id_card_type" placeholder="请选择">
55
+              <el-option
56
+                v-for="item in IDCardTypes"
57
+                :key="item.value"
58
+                :label="item.label"
59
+                :value="item.value">
60
+              </el-option>
61
+            </el-select>
62
+          </el-form-item>
63
+
64
+          <!--<el-form-item class="specialFormItem" label="医保卡号:">-->
65
+          <!--<div style="display:flex;">-->
66
+          <!--<el-input v-model="form.medicalInsuranceCard"></el-input>-->
67
+          <!--<el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>-->
68
+          <!--</div>-->
69
+          <!--</el-form-item>-->
70
+
71
+        </el-form>
72
+      </div>
73
+      <div class="nameTitle">患者住院信息:</div>
74
+      <div class="formMain">
75
+        <el-form class="basicForm" :model="form" :rules="rules" ref="form" label-width="100px">
76
+
77
+          <el-form-item label="疾病类型:" prop="sick_type" :validate-event="is_Name">
78
+            <el-select v-model="form.sick_type" placeholder="">
79
+              <el-option
80
+                v-for="(item,index) in sick"
81
+                :key="index"
82
+                :label="item.class_name"
83
+                :value="item.id">
84
+              </el-option>
85
+            </el-select>
86
+          </el-form-item>
87
+
88
+          <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
89
+            <el-select v-model="form.diagnosis" placeholder="">
90
+              <el-option
91
+                v-for="(item,index) in diagnoses"
92
+                :key="index"
93
+                :label="item.class_name"
94
+                :value="item.id">
95
+              </el-option>
96
+            </el-select>
97
+          </el-form-item>
98
+
99
+          <el-form-item label="医疗类别:" prop="med_type" :validate-event="is_Name">
100
+            <el-select v-model="form.med_type" placeholder=""
101
+            >
102
+              <el-option
103
+                v-for="(item,index) in registers"
104
+                :key="index"
105
+                :label="item.label"
106
+                :value="item.value">
107
+              </el-option>
108
+            </el-select>
109
+          </el-form-item>
110
+
111
+
112
+          <el-form-item label="主治医生:" prop="doctor" :validate-event="is_Name">
113
+            <el-select v-model="form.doctor" placeholder="请选择" @change="changeDoctor">
114
+              <el-option
115
+                v-for="item in doctorList"
116
+                :key="item.admin_user_id"
117
+                :label="item.user_name"
118
+                :value="item.admin_user_id">
119
+              </el-option>
120
+            </el-select>
121
+          </el-form-item>
122
+          <el-form-item label="入院科室:" prop="department" :validate-event="is_Name">
123
+            <el-select v-model="form.department" placeholder="请选择">
124
+              <el-option
125
+                v-for="item in departmentList"
126
+                :key="item.id"
127
+                :label="item.name"
128
+                :value="item.id">
129
+              </el-option>
130
+            </el-select>
131
+          </el-form-item>
132
+
133
+
134
+          <el-form-item label="入院时间:" prop="start_time" :validate-event="is_Name">
135
+            <el-date-picker v-model="form.start_time" type="datetime" format="yyyy-MM-dd HH:mm:ss"
136
+                            placeholder="请选择入院时间">
137
+            </el-date-picker>
138
+
139
+          </el-form-item>
140
+
141
+        </el-form>
142
+        <el-button style="float:right" @click="saveHisPatient('form')" v-loading="loadingone" type="primary">登记
143
+        </el-button>
144
+      </div>
145
+
146
+    </div>
147
+  </div>
148
+</template>
149
+
150
+<script>
151
+  import {PostSearch} from '@/api/patient'
152
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
153
+  import {basename} from 'path'
154
+  import {
155
+    getAllDoctorList,
156
+    getPatientDetail,
157
+    getTodaySchedulePatient,
158
+    getUnRegisterHisPatientList,
159
+    saveHisPatient
160
+  } from '@/api/project/project'
161
+  import {getDictionaryDataConfig} from '@/utils/data'
162
+  import {jsGetAge, uParseTime} from '@/utils/tools'
163
+  import {getInitData} from '@/api/his/his'
164
+  import axios from 'axios'
165
+
166
+  const moment = require('moment');
167
+  export default {
168
+    components: {
169
+      BreadCrumb
170
+    },
171
+    data() {
172
+      return {
173
+        loadingone: false,
174
+        read_loading: false,
175
+        registers: [
176
+          {value: 11, label: '普通门诊'},
177
+          {value: 12, label: '门诊挂号'},
178
+          {value: 13, label: '急诊'},
179
+          {value: 14, label: '门诊特殊病'},
180
+          {value: 15, label: '门诊统筹'},
181
+          {value: 16, label: '门诊慢性病'},
182
+          {value: 21, label: '普通住院'}
183
+
184
+        ],
185
+        sick: [],
186
+        diagnoses: [],
187
+        crumbs: [
188
+          {path: false, name: '住院工作站'},
189
+          {path: false, name: '住院登记'}
190
+        ],
191
+        form: {
192
+          start_time: '',
193
+          id: 0,
194
+          sick_type: '',
195
+          diagnosis: '',
196
+          medicalInsuranceCard: '',
197
+          name: '',
198
+          certificates: 1,
199
+          id_card_no: '',
200
+          doctor: '',
201
+          department: '',
202
+          phone: '',
203
+          id_card_type: 2,
204
+          med_type: '',
205
+
206
+        },
207
+
208
+
209
+        certificates: [{
210
+          value: 1,
211
+          label: '内地身份证'
212
+        }, {
213
+          value: 2,
214
+          label: '社保卡'
215
+        }, {
216
+          value: 3,
217
+          label: '护照'
218
+        }, {
219
+          value: 4,
220
+          label: '军官证'
221
+        }, {
222
+          value: 5,
223
+          label: '台胞证'
224
+        }, {
225
+          value: 6,
226
+          label: '港澳地区身份证'
227
+        }],
228
+
229
+        IDCardTypes: [{
230
+          value: 1,
231
+          label: '社保卡'
232
+        }, {
233
+          value: 2,
234
+          label: '身份证'
235
+        }, {
236
+          value: 3,
237
+          label: '电子凭证'
238
+        }],
239
+        rules: {
240
+          name: [{required: true, message: '患者姓名不能为空', trigger: 'blur'}],
241
+          id_card_no: [{required: true, message: '证件号码不能为空', trigger: 'blur'}],
242
+          doctor: [{required: true, message: '请选择医生', trigger: 'blur'}],
243
+          department: [{required: true, message: '请填写科室', trigger: 'blur'}],
244
+          certificates: [{required: true, message: '证件类型不能为空', trigger: 'change'}],
245
+          id_card_type: [{required: true, message: '读卡类型不能为空', trigger: 'change'}],
246
+          med_type: [{required: true, message: '医疗类别不能为空', trigger: 'change'}],
247
+          sick_type: [{required: true, message: '大病类别不能为空', trigger: 'change'}],
248
+          diagnosis: [{required: true, message: '诊断不能为空', trigger: 'change'}],
249
+          start_time: [{required: true, message: '入院时间不能为空', trigger: 'change'}]
250
+
251
+        },
252
+        doctorList: [],
253
+        departmentList: [],
254
+        check: 0,
255
+        show: false,
256
+        is_Name: false,
257
+        patient: [],
258
+        scialType: []
259
+      }
260
+    },
261
+
262
+    methods: {
263
+
264
+      handleSelect(val) {
265
+        this.form.id = val.id;
266
+        this.form.name = val.name;
267
+        this.form.sex = val.gender;
268
+        this.form.age = val.age;
269
+        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}');
270
+        this.form.phone = val.phone;
271
+        this.form.id_card_no = val.id_card_no;
272
+
273
+        var thisLen = this.form.id_card_no.length;
274
+        var birth = '';
275
+        if (thisLen == 15) {
276
+          birth = '19' + this.form.id_card_no.substr(6, 6)
277
+        } else {
278
+          birth = this.form.id_card_no.substr(6, 8)
279
+        }
280
+        var births =
281
+          birth.substr(0, 4) +
282
+          '-' +
283
+          birth.substr(4, 2) +
284
+          '-' +
285
+          birth.substr(6, 2);
286
+        this.form.age = jsGetAge(births, '-')
287
+      },
288
+      querySearchAsync(keyword, cb) {
289
+        let key = '';
290
+        if (keyword != undefined) {
291
+          key = keyword
292
+        }
293
+        let searchArray = [];
294
+        PostSearch(key).then(response => {
295
+          if (response.data.state == 1) {
296
+            searchArray = response.data.data.patient;
297
+            cb(searchArray)
298
+          } else {
299
+            cb([])
300
+          }
301
+        })
302
+      },
303
+
304
+
305
+      // reading(medicalInsuranceCard) {
306
+      //   var that = this
307
+      //   if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
308
+      //     this.$message.error('请先选择读卡类型')
309
+      //     return
310
+      //   }
311
+      //   let params = {
312
+      //     'id_card_type': this.form.id_card_type
313
+      //   }
314
+      //   axios.get('http://127.0.0.1:9532/api/sscard', {
315
+      //     params: params
316
+      //   })
317
+      //     .then(function(response) {
318
+      //       if (response.data.state == 0) {
319
+      //         that.$message.error(response.data.msg)
320
+      //         return false
321
+      //       } else {
322
+      //         var patient = response.data.data.patient
323
+      //
324
+      //         if (that.form.id_card_type == 1) {
325
+      //           that.form.name = patient.ID
326
+      //           that.form.sex = patient.gender
327
+      //           that.form.age = patient.age
328
+      //           that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
329
+      //           that.form.phone = patient.phone
330
+      //           that.form.id_card_no = patient.id_card_no
331
+      //           that.form.medicalInsuranceCard = response.data.data.number
332
+      //
333
+      //         } else if (that.form.id_card_type == 2) {
334
+      //           that.form.name = patient.ID
335
+      //           that.form.sex = patient.gender
336
+      //           that.form.age = patient.age
337
+      //           that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
338
+      //           that.form.phone = patient.phone
339
+      //           that.form.id_card_no = patient.id_card_no
340
+      //         }
341
+      //         that.$message({ message: '读卡成功', type: 'success' })
342
+      //       }
343
+      //     })
344
+      //     .catch(function(error) {
345
+      //
346
+      //     })
347
+      //
348
+      // },
349
+      getBirthday(date) {
350
+        console.log(date);
351
+        let curTime = moment(new Date(date)).format('YYYY-MM-DD');
352
+        console.log('curTime22222', curTime);
353
+
354
+        console.log(this.jsGetAge(curTime));
355
+
356
+        this.form.age = this.jsGetAge(curTime)
357
+      },
358
+      jsGetAge(strBirthday) { //传入形式yyyy-MM-dd
359
+        //strBirthday = util.formatTime(strBirthday);转换成yyyy-MM-dd形式
360
+        var returnAge;
361
+        var strBirthdayArr = strBirthday.split('-');
362
+        var birthYear = strBirthdayArr[0];
363
+        var birthMonth = strBirthdayArr[1];
364
+        var birthDay = strBirthdayArr[2];
365
+        var d = new Date();
366
+        var nowYear = d.getFullYear();
367
+        var nowMonth = d.getMonth() + 1;
368
+        var nowDay = d.getDate();
369
+        if (nowYear == birthYear) {
370
+          returnAge = 0 //同年 则为0岁
371
+        } else {
372
+          var ageDiff = nowYear - birthYear; //年之差
373
+          if (ageDiff > 0) {
374
+            if (nowMonth == birthMonth) {
375
+              var dayDiff = nowDay - birthDay; //日之差
376
+              if (dayDiff < 0) {
377
+                returnAge = ageDiff - 1
378
+              } else {
379
+                returnAge = ageDiff
380
+              }
381
+            } else {
382
+              var monthDiff = nowMonth - birthMonth; //月之差
383
+              if (monthDiff < 0) {
384
+                returnAge = ageDiff - 1
385
+              } else {
386
+                returnAge = ageDiff
387
+              }
388
+            }
389
+          } else {
390
+            returnAge = -1 //返回-1 表示出生日期输入错误 晚于今天
391
+          }
392
+        }
393
+        return returnAge //返回周岁年龄
394
+      },
395
+      getForm() {
396
+        this.form.total = this.total;
397
+        if (localStorage.getItem('temp')) {
398
+          let a = JSON.parse(localStorage.getItem('temp'));
399
+          // let arr = []
400
+          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000;
401
+          this.form.org_id = this.$store.getters.xt_user.org_id;
402
+          a.push(this.form);
403
+          console.log(111, a);
404
+          localStorage.setItem('temp', JSON.stringify(a));
405
+          Object.keys(this.form).forEach((key) => {
406
+            this.form[key] = ''
407
+          });
408
+          this.$message({message: '添加成功', type: 'success'})
409
+        } else {
410
+          let arr = [];
411
+          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000;
412
+          this.form.org_id = this.$store.getters.xt_user.org_id;
413
+          arr.push(this.form);
414
+          localStorage.setItem('temp', JSON.stringify(arr));
415
+          Object.keys(this.form).forEach((key) => {
416
+            this.form[key] = ''
417
+          });
418
+          this.$message({message: '添加成功', type: 'success'})
419
+        }
420
+      },
421
+
422
+      getAllDoctorList() {
423
+        getAllDoctorList().then(response => {
424
+          if (response.data.state == 1) {
425
+            var doctor = response.data.data.doctor;
426
+            this.doctorList = doctor;
427
+            var department = response.data.data.department;
428
+            this.departmentList = department
429
+          }
430
+        })
431
+      },
432
+      saveHisPatient(formName) {
433
+        if (this.form.name == '') {
434
+          this.$message.error('患者姓名不能为空');
435
+          this.is_Name = true;
436
+          return
437
+        }
438
+
439
+
440
+        if (this.form.doctor == '') {
441
+          this.$message.error('医生不能为空');
442
+          this.is_Name = true;
443
+          return
444
+        }
445
+
446
+        if (this.form.department == '') {
447
+          this.$message.error('科室不能为空');
448
+          this.is_Name = true;
449
+          return
450
+        }
451
+
452
+        if (this.form.id_card_type == '') {
453
+          this.$message.error('读卡类型不能为空');
454
+          this.is_Name = true;
455
+          return
456
+        }
457
+
458
+        if (this.form.id_card_no == '') {
459
+          this.$message.error('证件号码不能为空');
460
+          this.is_Name = true;
461
+          return
462
+        }
463
+
464
+        if (this.form.med_type == '') {
465
+          this.$message.error('医疗类别不能为空');
466
+          this.is_Name = true;
467
+          return
468
+        }
469
+
470
+        if (this.form.diagnosis == '') {
471
+          this.$message.error('诊断不能为空');
472
+          this.is_Name = true;
473
+          return
474
+        }
475
+
476
+        if (this.form.sick_type == '') {
477
+          this.$message.error('大病类别不能为空');
478
+          this.is_Name = true;
479
+          return
480
+        }
481
+
482
+
483
+        if (this.form.start_time == '') {
484
+          this.$message.error('入院时间不能为空');
485
+          this.is_Name = true;
486
+          return
487
+        }
488
+
489
+        this.$refs[formName].validate((valid) => {
490
+          if (valid) {
491
+            if (this.form.costChecked == true) {
492
+              this.check = 1
493
+            }
494
+            if (this.form.costChecked == false) {
495
+              this.check = 2
496
+            }
497
+            if (this.form.id_card_no == '') {
498
+              this.show = true
499
+            }
500
+
501
+            var params = {
502
+              id: this.form.id,
503
+              name: this.form.name,
504
+              id_card_type: this.form.id_card_type,
505
+              certificates: this.form.certificates,
506
+              id_card_no: this.form.id_card_no,
507
+              doctor: this.form.doctor,
508
+              department: this.form.department,
509
+              phone: this.form.phone,
510
+              med_type: this.form.med_type,
511
+              diagnosis: this.form.diagnosis,
512
+              sick_type: this.form.sick_type
513
+            };
514
+            params['record_time'] = this.record_date;
515
+            params['admin_user_id'] = this.$store.getters.xt_user.user.id;
516
+            this.loadingone = true;
517
+
518
+            var that = this;
519
+
520
+            axios.get('http://127.0.0.1:9532/zh/api/inhopitalcheck/get', {
521
+              params: params,
522
+              headers: {
523
+                'Permission': 5
524
+              }
525
+            })
526
+              .then(function (response) {
527
+                if (response.data.state == 0) {
528
+                  that.$message.error(response.data.msg);
529
+                  that.loadingone = false;
530
+                  return false
531
+                } else {
532
+                  that.loadingone = false;
533
+                  if (response.data.data.failed_code == -10) {
534
+                    that.$message.error(response.data.data.msg)
535
+                  } else {
536
+                    that.$message({message: '登记成功', type: 'success'});
537
+                    that.form.name = '';
538
+                    that.form.certificates = '';
539
+                    that.form.id_card_no = '';
540
+                    that.form.doctor = '';
541
+                    that.form.department = '';
542
+                    that.form.phone = '';
543
+                    that.form.med_type = 14;
544
+                    that.form.sick_type = that.sick[0].id;
545
+                    that.form.diagnosis = that.diagnoses[0].id
546
+                  }
547
+                }
548
+              })
549
+              .catch(function (error) {
550
+
551
+              })
552
+          }
553
+        })
554
+      },
555
+      getDictionaryDataConfig(module, filed_name) {
556
+        return getDictionaryDataConfig(module, filed_name)
557
+      },
558
+
559
+      changeDoctor(id) {
560
+        for (let i = 0; i < this.doctorList.length; i++) {
561
+          if (this.doctorList[i].admin_user_id == id) {
562
+            if (this.doctorList[i].department_id == 0) {
563
+              this.form.department = this.departmentList[0].id
564
+            } else {
565
+              this.form.department = this.doctorList[i].department_id
566
+            }
567
+
568
+          }
569
+        }
570
+      },
571
+      changeName(id) {
572
+        this.form.sex = '';
573
+        this.form.age = '';
574
+        this.form.birthday = '';
575
+        this.form.phone = '';
576
+        this.form.id_card_no = '';
577
+        getPatientDetail(id).then(response => {
578
+          if (response.data.state == 1) {
579
+            var patient = response.data.data.patient;
580
+            console.log('patient', patient);
581
+            this.form.sex = patient.gender;
582
+            this.form.age = patient.age;
583
+            this.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
584
+            this.form.phone = patient.phone;
585
+            this.form.id_card_no = patient.id_card_no
586
+          }
587
+        })
588
+      }, getInitData() {
589
+        getInitData().then(response => {
590
+          if (response.data.state == 0) {
591
+            this.$message.error(response.data.msg);
592
+            return false
593
+          } else {
594
+            this.doctors = response.data.data.doctors;
595
+            this.department = response.data.data.department;
596
+            this.sick = response.data.data.sick;
597
+            this.diagnoses = response.data.data.diagnose;
598
+
599
+            this.form.p_type = 14;
600
+            this.form.sick_type = this.sick[0].id;
601
+            this.form.diagnosis = this.diagnoses[0].id
602
+
603
+          }
604
+        })
605
+
606
+      }
607
+
608
+    },
609
+    created() {
610
+
611
+      if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
612
+        this.form.certificates = 2;
613
+        this.form.id_card_type = 1
614
+      } else {
615
+        this.form.certificates = 1;
616
+        this.form.id_card_type = 2
617
+      }
618
+
619
+      this.getInitData();
620
+      //获取当前机构有人员信息
621
+      this.getAllDoctorList()
622
+    }
623
+  }
624
+</script>
625
+
626
+<style lang="scss" scoped>
627
+  .nameTitle {
628
+    font-weight: bold;
629
+    font-size: 16px;
630
+  }
631
+
632
+  .formMain {
633
+    /*/ / padding: 10 px 90 px;*/
634
+    width: 80%;
635
+    margin: 0 auto;
636
+  }
637
+
638
+  .basicForm {
639
+
640
+    display: flex;
641
+    flex-wrap: wrap;
642
+    justify-content: space-between;
643
+
644
+  .el-form-item {
645
+    width: 33%;
646
+  }
647
+
648
+  .specialFormItem {
649
+    width: 66.5%;
650
+
651
+  .el-input {
652
+    min-width: 150px;
653
+  }
654
+
655
+  }
656
+  .el-select {
657
+    width: 100%;
658
+  }
659
+
660
+  .el-input {
661
+    width: 100%;
662
+  }
663
+
664
+  }
665
+  .el-form-item__error {
666
+    color: #F56C6C;
667
+    font-size: 12px;
668
+    line-height: 1;
669
+    padding-top: 4px;
670
+    position: absolute;
671
+    top: 100%;
672
+    left: 0;
673
+  }
674
+</style>

+ 152 - 0
src/xt_pages/hospitalStation/invoicePrint.vue View File

@@ -0,0 +1,152 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+        >打印</el-button
12
+      >
13
+    </template>
14
+    <div class="app-container" style="padding-top:40px;">
15
+        <div class='dialysisPage'>
16
+            <printOne :paramsObj="invoiceParams"></printOne>
17
+        </div>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+import printOne from './invoiceTemplate/printOne'
24
+export default {
25
+  name: "invoicePrint",
26
+  components: {
27
+    printOne
28
+  },
29
+  props:{
30
+    invoiceParams:Object
31
+  },
32
+  data() {
33
+    return {
34
+      childResponse: {},
35
+    //   invoiceParams:{}
36
+      
37
+
38
+    };
39
+  },
40
+  methods: {
41
+    getAdminUser(id) {
42
+      if (id == 0) {
43
+        return "";
44
+      }
45
+      if (id == undefined) {
46
+        return "";
47
+      }
48
+      for (let i = 0; i < this.adminUser.length; i++) {
49
+        if (this.adminUser[i].id == id) {
50
+          return this.adminUser[i].name;
51
+        }
52
+      }
53
+    },
54
+    getTime(value, temp) {
55
+      if (value == 0) {
56
+        return "";
57
+      }
58
+      if (value != undefined) {
59
+        return uParseTime(value, temp);
60
+      }
61
+      return "";
62
+    },
63
+    printThisPage() {
64
+
65
+      const style =
66
+        '@media print {#invoice-print{font-size:12px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
67
+        printJS({
68
+            printable: "invoice-print",
69
+            type: "html",
70
+            style: style,
71
+            scanStyles: false
72
+        });
73
+
74
+      // if (this.org_template_info.template_id == 1) {
75
+      //   printJS({
76
+      //     printable: "dialysis-print-box",
77
+      //     type: "html",
78
+      //     style: style,
79
+      //     scanStyles: false
80
+      //   });
81
+      // }
82
+    },
83
+  },
84
+  created() {
85
+      console.log('this.invoiceParams',this.invoiceParams)
86
+  },
87
+  watch:{
88
+    paramsObj:{//深度监听,可监听到对象、数组的变化
89
+      handler(val, oldVal){
90
+        this.invoiceParams = val
91
+        
92
+      },
93
+      deep:true
94
+    }
95
+  }
96
+};
97
+</script>
98
+
99
+<style lang="scss" scoped>
100
+.printTitle{
101
+    font-size: 22px;
102
+    text-align: center;
103
+    font-weight: bold;
104
+}
105
+.infoMain{
106
+    display: flex;
107
+    flex-wrap: wrap;
108
+    border-bottom: 2px solid #000;
109
+    padding:0 10px;
110
+}
111
+.infoMain .infoP{
112
+    width: 33%;
113
+    line-height: 24px;
114
+}
115
+.prescriptionBox{
116
+    padding:0 10px;
117
+    height:600px;
118
+}
119
+.Rp{
120
+    font-size: 22px;
121
+    font-weight: bold;
122
+}
123
+.drugsBox{
124
+    padding-left: 40px;
125
+    margin-bottom: 10px;
126
+}
127
+.drugsBox p{
128
+    line-height: 30px;
129
+}
130
+.drugsOne{
131
+    line-height: 24px;
132
+}
133
+.drugsOne span{
134
+    margin-right: 20px;
135
+}
136
+.doctorBox{
137
+    display: flex;
138
+    justify-content: space-between;
139
+    padding:0 10px;
140
+    line-height: 24px;
141
+    border-bottom: 2px solid #000;
142
+}
143
+.actionBar{
144
+    display: flex;
145
+    justify-content: space-between; 
146
+    line-height: 24px;
147
+    padding:0 10px;
148
+}
149
+.actionBar p{
150
+    width:150px;
151
+}
152
+</style>

+ 222 - 0
src/xt_pages/hospitalStation/invoiceTemplate/printOne.vue View File

@@ -0,0 +1,222 @@
1
+<template>
2
+    <div id='invoice-print'>
3
+        <div style="display:flex;">
4
+            <div style="position: absolute;top:50px;left:70px;">{{ list.order_number }}</div>
5
+            <!-- <div>{{ list.id_card_no }}</div> -->
6
+        </div>
7
+        <div style="display:flex;justify-content: space-between;">
8
+            <!-- <div>{{ list.department_name }}</div> -->
9
+            <div  style="position: absolute;top:50px;left:300px">{{ list.number }}</div>
10
+            <div></div>
11
+            <div  style="position: absolute;left:560px;top:50px;">
12
+                <span>{{ printDate.slice(0,4) }}</span>
13
+                <span>{{ printDate.slice(5,7) }}</span>
14
+                <span>{{ printDate.slice(8,11) }}</span>
15
+            </div>
16
+        </div>
17
+        <div style="display:flex;justify-content: space-between;">
18
+            <div style="position: absolute;top:70px;left:120px;"> {{ paramsObj.name }}</div>
19
+            <!-- <div>{{ list.pay_way }}</div> -->
20
+            <div style="position: absolute;top:70px;left:460px;">{{ paramsObj.setl_time.split(' ')[0] }}</div>
21
+            <div style="position: absolute;top:70px;left:560px;">{{ paramsObj.setl_time.split(' ')[0] }}</div>
22
+        </div>
23
+        <div style="display:flex;justify-content: space-between;">
24
+            <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
25
+            <div style="position: absolute;top:90px;left:260px;">{{ totalPrice - list.psn_cash_money }}</div>
26
+            <div style="position: absolute;top:90px;left:440px;">{{ list.psn_cash_money }}</div>
27
+            <div style="position: absolute;top:90px;left:580px;">{{ list.pay_way }}</div>
28
+        </div>
29
+        <div style="display:flex;justify-content: space-between;">
30
+            <div style="position: absolute;top:140px;left:40px">西药</div>
31
+            <div style="position: absolute;top:140px;left:110px">{{ list.westernMedicineCostTotal }}</div>
32
+            <div style="position: absolute;top:140px;left:180px">检查费</div>
33
+            <div style="position: absolute;top:140px;left:260px">{{ list.checkCostTotal }}</div>
34
+            <div style="position: absolute;top:140px;left:340px">治疗费</div>
35
+            <div style="position: absolute;top:140px;left:420px">{{ list.treatCostTotal }}</div>
36
+            <div style="position: absolute;top:140px;left:500px">床位费</div>
37
+            <div style="position: absolute;top:140px;left:580px">{{ list.bedCostTotal }}</div>
38
+        </div>
39
+        <div style="display:flex;justify-content: space-between;">
40
+            <div style="position: absolute;top:170px;left:40px">中成药</div>
41
+            <div style="position: absolute;top:170px;left:110px">{{ list.chineseTraditionalMedicineCostTotal }}</div>
42
+            <div style="position: absolute;top:170px;left:180px">化验费</div>
43
+            <div style="position: absolute;top:170px;left:260px">{{ list.laboratoryCostTotal }}</div>
44
+            <div style="position: absolute;top:170px;left:340px">手术费</div>
45
+            <div style="position: absolute;top:170px;left:420px">{{ list.operationCostTotal }}</div>
46
+            <div style="position: absolute;top:170px;left:500px">其他费</div>
47
+            <div style="position: absolute;top:170px;left:580px">{{ list.otherCostTotal }}</div>
48
+        </div>
49
+        <div style="display:flex;justify-content: space-between;">
50
+            <div style="position: absolute;top:190px;left:40px"></div>
51
+            <div style="position: absolute;top:190px;left:110px"></div>
52
+            <div style="position: absolute;top:190px;left:180px"></div>
53
+            <div style="position: absolute;top:190px;left:260px"></div>
54
+            <div style="position: absolute;top:190px;left:340px">材料费</div>
55
+            <div style="position: absolute;top:190px;left:420px">{{ list.materialCostTotal }}</div>
56
+            <div style="position: absolute;top:190px;left:500px"></div>
57
+            <div style="position: absolute;top:190px;left:580px"></div>
58
+        </div>
59
+        <div>
60
+            <span>
61
+            <span  style="position: absolute;top:240px;left:180px">
62
+                <span v-if="zhongwen.indexOf('万') > -1 && zhongwen.indexOf('拾') > -1 && zhongwen.indexOf('拾') == 1">
63
+                    {{ zhongwen.substring(0,1) }}
64
+                </span>
65
+                <span v-else>零</span>
66
+            </span>
67
+            <span  style="position: absolute;top:240px;left:220px">
68
+                <span v-if="zhongwen.indexOf('万') > -1">
69
+                    {{ zhongwen.substring(zhongwen.indexOf('万') - 1,zhongwen.indexOf('万')) }}
70
+                </span>
71
+                <span v-else>零</span>
72
+            </span>
73
+            <span  style="position: absolute;top:240px;left:260px">
74
+                <span v-if="zhongwen.indexOf('仟') > -1">
75
+                    {{ zhongwen.substring(zhongwen.indexOf('仟') - 1,zhongwen.indexOf('仟')) }}
76
+                </span>
77
+                <span v-else>零</span>
78
+            </span>
79
+            <span  style="position: absolute;top:240px;left:300px">
80
+                <span v-if="zhongwen.indexOf('佰') > -1">
81
+                    {{ zhongwen.substring(zhongwen.indexOf('佰') - 1,zhongwen.indexOf('佰')) }}
82
+                </span>
83
+                <span v-else>零</span>
84
+            </span>
85
+            <span style="position: absolute;top:240px;left:340px">
86
+                <span v-if="zhongwen.indexOf('拾') > -1">
87
+                    {{ zhongwen.substring(zhongwen.indexOf('拾') - 1,zhongwen.indexOf('拾')) }}
88
+                </span>
89
+                <span v-else>零</span>
90
+            </span>
91
+            <span  style="position: absolute;top:240px;left:380px">
92
+                <span v-if="zhongwen.indexOf('元') > -1 && zhongwen.substring(zhongwen.indexOf('元') - 1,zhongwen.indexOf('元')) != '拾'">
93
+                    {{ zhongwen.substring(zhongwen.indexOf('元') - 1,zhongwen.indexOf('元')) }}
94
+                </span>
95
+                <span v-else>零</span>
96
+            </span>
97
+            <span  style="position: absolute;top:240px;left:420px">
98
+                <span v-if="zhongwen.indexOf('角') > -1">
99
+                    {{ zhongwen.substring(zhongwen.indexOf('角') - 1,zhongwen.indexOf('角')) }}
100
+                </span>
101
+                <span v-else>零</span>
102
+            </span>
103
+            <span  style="position: absolute;top:240px;left:460px">
104
+                <span v-if="zhongwen.indexOf('分') > -1">
105
+                    {{ zhongwen.substring(zhongwen.indexOf('分') - 1,zhongwen.indexOf('分')) }}
106
+                </span>
107
+                <span v-else>零</span>
108
+            </span>
109
+            </span>
110
+            <span style="position: absolute;top:240px;left:540px">{{ totalPrice }}</span>
111
+        </div>
112
+        <div>
113
+            <div style="position: absolute;top:320px;left:70px">{{ org_name }}</div>
114
+            <div v-if="org_id == 9990" style="position: absolute;top:320px;left:300px">钱玉玲</div>
115
+            <div v-if="org_id == 9990" style="position: absolute;top:320px;left:420px">陈国杰</div>
116
+        </div>
117
+    </div>
118
+</template>
119
+
120
+
121
+<script>
122
+import { getInvoice } from '@/api/project/project'
123
+export default {
124
+    props:{
125
+        paramsObj:Object
126
+    },
127
+    data(){
128
+        return{
129
+            list:{},
130
+            printDate:'',
131
+            zhongwen:'',
132
+            totalPrice:0.0,
133
+            org_id:'',
134
+            org_name:''
135
+        }
136
+    },
137
+    created(){
138
+        console.log('paramsObj',this.paramsObj);
139
+        let params = {
140
+            order_id: this.paramsObj.order_id,
141
+            patient_id: this.paramsObj.patient_id,
142
+        };
143
+        this.getInvoice(params);
144
+        var data = new Date();
145
+        var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
146
+        var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
147
+        this.printDate = data.getFullYear() + "-" + month + "-" + date;
148
+        // this.smalltoBIG(982732.21)
149
+        this.org_id = this.$store.getters.xt_user.org_id;
150
+        this.org_name = this.$store.getters.xt_user.org.org_name
151
+    },
152
+    methods:{
153
+        getInvoice(params){
154
+            getInvoice(params).then((res) => {
155
+                console.log('res',res);
156
+                this.list = res.data.data;
157
+                this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
158
+                                    this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal;
159
+                this.smalltoBIG(this.totalPrice)
160
+            })
161
+        },
162
+        smalltoBIG(n) {
163
+            // let fraction = ['角', '分'];
164
+            // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
165
+            // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
166
+            // let head = price < 0 ? '欠' : '';
167
+            // price = Math.abs(price);
168
+            // let upper = '';
169
+            // for (let i = 0; i < fraction.length; i++) {
170
+            // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
171
+            // }
172
+            // upper = upper || '整';
173
+            // price = Math.floor(price);
174
+            // for (let i = 0; i < unit[0].length && price > 0; i++) {
175
+            // let p = '';
176
+            // for (let j = 0; j < unit[1].length && price > 0; j++) {
177
+            //     p = digit[price % 10] + unit[1][j] + p;
178
+            //     price = Math.floor(price / 10);
179
+            // }
180
+            // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
181
+            // }
182
+            // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
183
+            // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
184
+            if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
185
+                return "数据非法";  //判断数据是否大于0
186
+            }
187
+
188
+            var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
189
+            n += "00";
190
+
191
+            var indexpoint = n.indexOf('.');  // 如果是小数,截取小数点前面的位数
192
+
193
+            if (indexpoint >= 0){
194
+
195
+                n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2);   // 若为小数,截取需要使用的unit单位
196
+            }
197
+
198
+            unit = unit.substr(unit.length - n.length);  // 若为整数,截取需要使用的unit单位
199
+            for (var i=0; i < n.length; i++){
200
+                str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i);  //遍历转化为大写的数字
201
+            }
202
+
203
+            this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
204
+            console.log(this.zhongwen)
205
+        },
206
+
207
+    },
208
+    watch:{
209
+        paramsObj:{//深度监听,可监听到对象、数组的变化
210
+            handler(val, oldVal){
211
+                let params = {
212
+                    order_id: val.order_id,
213
+                    patient_id: val.patient_id,
214
+                };
215
+                this.getInvoice(params)
216
+
217
+            },
218
+            deep:true
219
+        }
220
+    }
221
+}
222
+</script>

+ 86 - 0
src/xt_pages/hospitalStation/labelPrinting.vue View File

@@ -0,0 +1,86 @@
1
+<template>
2
+    <div class="main-contain outpatientChargesManagement">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+        <div class="app-container">
7
+            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+                <div>
9
+                    <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
10
+                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
11
+                    <el-select size="small" v-model="value" placeholder="请选择" style="width:150px;margin-left:10px;">
12
+                        <el-option
13
+                        v-for="item in options"
14
+                        :key="item.value"
15
+                        :label="item.label"
16
+                        :value="item.value">
17
+                        </el-option>
18
+                    </el-select>
19
+                    <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
20
+                </div>
21
+                <el-button size="small" type="primary">打印</el-button>
22
+            </div>
23
+            <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
24
+                <el-table-column type="selection" width="55" align="center"></el-table-column>
25
+                <el-table-column align="center" prop="name" label="患者名字">
26
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
27
+                </el-table-column>
28
+                <el-table-column align="center" prop="name" label="处方号">
29
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
30
+                </el-table-column>
31
+                <el-table-column align="center" prop="name" label="创建时间">
32
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
33
+                </el-table-column>
34
+                <el-table-column align="center" prop="name" label="创建医生">
35
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
36
+                </el-table-column>
37
+                <el-table-column align="center" prop="name" label="项目名称">
38
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
39
+                </el-table-column>
40
+                <el-table-column align="center" prop="name" label="试管颜色">
41
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
42
+                </el-table-column>
43
+                <el-table-column align="center" prop="name" label="操作">
44
+                    <template slot-scope="scope">
45
+                        <el-button size="mini" type="primary">打印</el-button>
46
+                    </template>
47
+                </el-table-column>
48
+            </el-table>
49
+        </div>
50
+    </div>
51
+</template>
52
+
53
+
54
+<script>
55
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
56
+export default {
57
+    components:{
58
+        BreadCrumb,
59
+    },
60
+    data(){
61
+        return{
62
+            crumbs: [
63
+                { path: false, name: '门诊收费' },
64
+                { path: false, name: '标签打印' }
65
+            ],
66
+            tableData: [{
67
+            date: '2016-05-02',
68
+            name: '王小虎',
69
+            address: '上海市普陀区金沙江路 1518 弄'
70
+            }, {
71
+            date: '2016-05-04',
72
+            name: '王小虎',
73
+            address: '上海市普陀区金沙江路 1517 弄'
74
+            }, {
75
+            date: '2016-05-01',
76
+            name: '王小虎',
77
+            address: '上海市普陀区金沙江路 1519 弄'
78
+            }, {
79
+            date: '2016-05-03',
80
+            name: '王小虎',
81
+            address: '上海市普陀区金沙江路 1516 弄'
82
+            }]
83
+        }
84
+    }
85
+}
86
+</script>

+ 369 - 0
src/xt_pages/hospitalStation/listPrint.vue View File

@@ -0,0 +1,369 @@
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
+      >打印
12
+      </el-button
13
+      >
14
+    </template>
15
+
16
+    <div class='dialysisPage' style="padding-top:40px;">
17
+      <printOne :list="list" :patient="patient" :order="order" :admin="admin"></printOne>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+  import printOne from './listTemplate/printOne'
24
+  import { getHisOrderDetail } from '@/api/his/his'
25
+  import { uParseTime } from '@/utils/tools'
26
+
27
+  export default {
28
+    name: 'listPrint',
29
+    components: {
30
+      printOne
31
+    },
32
+    props: {
33
+      paramsObj: Object
34
+    },
35
+    data() {
36
+      return {
37
+        list: [],
38
+        patient:{},
39
+        order:{},
40
+        admin:{},
41
+      }
42
+    },
43
+    created() {
44
+      this.getInfo(this.paramsObj.id)
45
+    },
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
+                obj['unit'] = infos.project.project.unit
78
+
79
+              }
80
+
81
+              if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
82
+                obj['p_time'] = this.getTimes(infos.advice.prescription.ctime);
83
+                obj['name'] = infos.advice.advice_name;
84
+                obj['spec'] = infos.advice.drug.drug_spec;
85
+                obj['unit'] = infos.advice.drug.max_unit
86
+
87
+              }
88
+              this.list.push(obj);
89
+              this.list.sort(function(a, b) {
90
+                return b.p_time < a.p_time ? 1 : -1
91
+              })
92
+
93
+            }
94
+          }
95
+        })
96
+      },
97
+      getType(med_chrgitm_type) {
98
+        switch (med_chrgitm_type) {
99
+          case '01':
100
+            return '床位费';
101
+            break;
102
+          case '02':
103
+            return '诊察费';
104
+
105
+            break;
106
+          case '03':
107
+            return '检查费';
108
+
109
+            break;
110
+          case '04':
111
+            return '化验费';
112
+            break;
113
+          case '05':
114
+            return '治疗费';
115
+
116
+            break;
117
+          case '06':
118
+            return '手术费';
119
+
120
+            break;
121
+          case '07':
122
+            return '护理费';
123
+
124
+            break;
125
+          case '08':
126
+            return '材料费';
127
+
128
+            break;
129
+          case '09':
130
+            return '西药费';
131
+
132
+            break;
133
+          case '10':
134
+            return '中药饮片费';
135
+
136
+            break;
137
+          case '11':
138
+            return '中成药费';
139
+
140
+            break;
141
+          case '12':
142
+            return '一般诊疗费';
143
+
144
+            break;
145
+          case '13':
146
+            return '挂号费';
147
+
148
+            break;
149
+          case '14':
150
+            return '其他费';
151
+
152
+            break
153
+
154
+        }
155
+
156
+      },
157
+      printThisPage() {
158
+
159
+        const style =
160
+          '@media print {.listTitle{font-size: 24px;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: 14px;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;}}';
161
+        printJS({
162
+          printable: 'list-print',
163
+          type: 'html',
164
+          style: style,
165
+          scanStyles: false
166
+        })
167
+
168
+        // if (this.org_template_info.template_id == 1) {
169
+        //   printJS({
170
+        //     printable: "dialysis-print-box",
171
+        //     type: "html",
172
+        //     style: style,
173
+        //     scanStyles: false
174
+        //   });
175
+        // }
176
+      }
177
+    }
178
+
179
+  }
180
+</script>
181
+
182
+<style>
183
+  .dialysis-print-order {
184
+    width: 960px;
185
+    margin: 0 auto;
186
+  }
187
+
188
+  .dialysis-print-order .order-yy-name {
189
+    margin: auto;
190
+    text-align: center;
191
+    font-size: 20px;
192
+    letter-spacing: 5px;
193
+  }
194
+
195
+  .dialysis-print-order .order-title {
196
+    margin: auto;
197
+    font-weight: 600;
198
+    text-align: center;
199
+    font-size: 22px;
200
+    padding: 10px;
201
+  }
202
+
203
+  .dialysis-print-order .table-box {
204
+    width: 100%;
205
+    line-height: 23px;
206
+    font-size: 14px;
207
+  }
208
+
209
+  .dialysis-print-order .print-table {
210
+    width: 100%;
211
+    text-align: center;
212
+    border-collapse: collapse;
213
+    line-height: 40px;
214
+    font-size: 14px;
215
+    border-color: #000;
216
+  }
217
+
218
+  .dialysis-print-order .print-table-no {
219
+    width: 100%;
220
+    text-align: center;
221
+    border-collapse: collapse;
222
+    font-size: 14px;
223
+  }
224
+
225
+  .dialysis-print-order .under-line {
226
+    border-bottom: 1px solid #999;
227
+    width: 95%;
228
+    text-align: center;
229
+    margin-left: 2px;
230
+  }
231
+
232
+  .dialysis-print-order .title-box {
233
+    text-align: center;
234
+    font-size: 16px;
235
+  }
236
+
237
+  .dialysis-print-order .radio-lebel-box {
238
+    font-weight: 400;
239
+    cursor: pointer;
240
+  }
241
+
242
+  .dialysis-print-order .radio-no {
243
+    opacity: 0;
244
+    outline: none;
245
+    position: absolute;
246
+    margin: 0;
247
+    width: 0;
248
+    height: 0;
249
+    z-index: -1;
250
+  }
251
+
252
+  .dialysis-print-order .radio-inner {
253
+    white-space: nowrap;
254
+    cursor: pointer;
255
+    outline: none;
256
+    display: inline-block;
257
+    line-height: 1;
258
+    position: relative;
259
+    vertical-align: middle;
260
+  }
261
+
262
+  .dialysis-print-order .radio-fang {
263
+    display: inline-block;
264
+    position: relative;
265
+    border: 1px solid #000;
266
+    box-sizing: border-box;
267
+    width: 14px;
268
+    height: 14px;
269
+    background-color: #fff;
270
+    z-index: 1;
271
+    transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
272
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
273
+  }
274
+
275
+  .dialysis-print-order .is-checked-radio::after {
276
+    content: "√";
277
+    font-size: 15px;
278
+  }
279
+
280
+  .dialysis-print-order .print-table-no tr td {
281
+    padding: 8px 5px;
282
+    line-height: 25px;
283
+  }
284
+
285
+  .dialysis-print-order .print-table tr td {
286
+    padding: 1px 1px;
287
+    /*line-height: 25px;*/
288
+  }
289
+
290
+  .es-img {
291
+    height: 30px;
292
+  }
293
+
294
+  .advice-name {
295
+    text-align: left;
296
+  }
297
+
298
+  .advice-children {
299
+    display: flex;
300
+  }
301
+
302
+  .title-box-pro {
303
+    border: 0 #fff;
304
+    line-height: 25px;
305
+    height: 25px;
306
+    text-align: left;
307
+    padding-left: 10px !important;
308
+  }
309
+
310
+  .title-box-pro-tr {
311
+    border: 0 #fff;
312
+  }
313
+
314
+  .text-align-left {
315
+    text-align: left !important;
316
+    padding-left: 10px !important;
317
+    font-size: 14px !important;
318
+    line-height: 25px;
319
+  }
320
+
321
+  .print-table-tr-new td {
322
+    line-height: 20px !important;
323
+  }
324
+
325
+  .border-top-solid {
326
+    border: solid 1px #000;
327
+  }
328
+
329
+  .print-template-two tr {
330
+    line-height: 30px;
331
+  }
332
+
333
+  .table-box1 {
334
+    border: 1px solid #000;
335
+    width: 100%;
336
+    line-height: 30px;
337
+    font-size: 14px;
338
+    border-collapse: collapse;
339
+  }
340
+
341
+  .table-box1 tr {
342
+    border-bottom: 1px solid #000;
343
+  }
344
+</style>
345
+
346
+<style lang="scss">
347
+
348
+  .newContainer {
349
+
350
+  .dialysisPage::-webkit-scrollbar {
351
+    height: 15px;
352
+  }
353
+
354
+  .el-date-editor {
355
+
356
+  .el-input__inner {
357
+    padding-right: 0px;
358
+  }
359
+
360
+  }
361
+  .el-table td, .el-table th {
362
+    text-align: center;
363
+  }
364
+
365
+  }
366
+  .newContainer::-webkit-scrollbar {
367
+    height: 15px !important;
368
+  }
369
+</style>

+ 172 - 0
src/xt_pages/hospitalStation/listTemplate/printOne.vue View File

@@ -0,0 +1,172 @@
1
+<template>
2
+    <div id="list-print" class="list-print">
3
+        <div v-for='(i,index) in pageArr.length' :key="index">
4
+        <div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用清单</div>
5
+        <div class="listInfo">
6
+
7
+            <div>患者姓名:{{patient.name}}</div>
8
+            <div>透析号:{{patient.dialysis_no}}</div>
9
+            <div>性别:{{patient.gender == 1 ? '男': '女'}}</div>
10
+            <div>年龄:{{patient.age}}  岁</div>
11
+            <div v-if="order.settle_type == 1">收费日期:{{getTimes(order.settle_accounts_date)}}</div>
12
+          <div v-if="order.settle_type == 2">收费日期:{{getTimes(order.settle_start_time)}} 至 {{getTimes(order.settle_end_time)}}</div>
13
+
14
+
15
+        </div>
16
+        <table class="listTable" border="1">
17
+            <tr>
18
+                <td style="width:19%">开方日期</td>
19
+                <td style="width:10%">类别</td>
20
+                <td style="width:31%">项目名称</td>
21
+                <td style="width:14%">规格</td>
22
+                <td style="width:10%">单价(元)</td>
23
+                <td style="width:6%">数量</td>
24
+                <td style="width:10%">金额(元)</td>
25
+            </tr>
26
+            <tr v-for="item in list.slice(index * 13,(index * 13) + pageArr[index])">
27
+                <td style="width:19%">{{item.p_time}}</td>
28
+                <td style="width:10%">{{item.med_chrgitm_type}}</td>
29
+                <td style="width:31%">{{item.name}}</td>
30
+                <td style="width:14%">{{item.spec}}</td>
31
+                <td style="width:10%">{{(item.price).toFixed(2)}}</td>
32
+                <td style="width:6%">{{item.count}}{{item.unit}}</td>
33
+                <td style="width:10%">{{(item.price * item.count).toFixed(2)}}</td>
34
+            </tr>
35
+        </table>
36
+        <div class="tableBottom">
37
+            <div class="tableBottomOne">制表人:{{admin.user_name}}</div>
38
+            <div class="tableBottomOne">制表日期:{{ getNowTime()}}</div>
39
+            <div class="tableBottomOne">总费用:{{order.medfee_sumamt}}元</div>
40
+        </div>
41
+        </div>
42
+    </div>
43
+</template>
44
+
45
+<script>
46
+  import { uParseTime } from '@/utils/tools'
47
+
48
+  export default {
49
+    props: {
50
+      list: {
51
+        type: Array,
52
+        default: function () {
53
+          return [];
54
+        }
55
+      },
56
+      patient: {
57
+        type: Object,
58
+        default: function () {
59
+          return {};
60
+        }
61
+      }, order: {
62
+        type: Object,
63
+        default: function () {
64
+          return {};
65
+        }
66
+      }, admin: {
67
+        type: Object,
68
+        default: function () {
69
+          return {};
70
+        }
71
+      },
72
+    },
73
+    data(){
74
+        return{
75
+            page:1,
76
+            pageArr:[],
77
+        }
78
+    },
79
+    // mounted(){
80
+    //     this.getPage()
81
+    // },
82
+    methods:{
83
+      getNowTime: function () {
84
+        let dateTime;
85
+        let yy = new Date().getFullYear();
86
+        let mm = new Date().getMonth() + 1;
87
+        let dd = new Date().getDate();
88
+        let hh = new Date().getHours();
89
+        let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
90
+          :
91
+          new Date().getMinutes();
92
+        let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
93
+          :
94
+          new Date().getSeconds();
95
+        dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
96
+        return dateTime
97
+      },
98
+      getTimes(time) {
99
+        return uParseTime(time, '{y}-{m}-{d}')
100
+      },
101
+      getPage(){
102
+        if(this.list.length <= 13){
103
+            this.page = 1;
104
+            this.pageArr.push(this.list.length)
105
+        }else if(this.list.length > 13){
106
+            this.page = parseInt(this.list.length / 13);
107
+            let num = this.list.length % 13;
108
+            for (var i=0;i<this.page;i++){
109
+                this.pageArr.push(13)
110
+            }
111
+            if(num != 0){
112
+                this.pageArr.push(num)
113
+            }
114
+        }
115
+      }
116
+
117
+    },
118
+    watch:{
119
+        list: {
120
+            handler(newVal) {
121
+                this.getPage()
122
+            },
123
+            deep: true
124
+        }
125
+    }
126
+
127
+  }
128
+
129
+
130
+</script>
131
+
132
+<style lang="scss" scoped>
133
+.list-print{
134
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
135
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
136
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
137
+    margin-bottom: 20px;
138
+    padding:20px 10px;
139
+}
140
+.listTitle{
141
+    font-size: 24px;
142
+    text-align: center;
143
+    font-weight: bold;
144
+    margin-bottom: 10px;
145
+}
146
+.listInfo{
147
+    display: flex;
148
+    font-size: 16px;
149
+    justify-content: space-between;
150
+    margin: 10px 0;
151
+}
152
+.listTable{
153
+    width: 100%;
154
+    text-align: center;
155
+    border-collapse: collapse;
156
+    line-height: 40px;
157
+    font-size: 14px;
158
+    border-color: #000;
159
+    text-align: left;
160
+}
161
+.listTable tr td {
162
+    padding: 0 5px;
163
+}
164
+.tableBottom{
165
+    font-size: 16px;
166
+    display: flex;
167
+    margin-top: 20px;
168
+}
169
+.tableBottomOne{
170
+    margin-right: 40px;
171
+}
172
+</style>

+ 422 - 0
src/xt_pages/hospitalStation/newStatementPrint.vue View File

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

+ 358 - 0
src/xt_pages/hospitalStation/newStatementPrintTwo.vue View File

@@ -0,0 +1,358 @@
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
+            <print-one :info="info"></print-one>
18
+        </div>
19
+    </div>
20
+</template>
21
+
22
+<script>
23
+
24
+
25
+  import { parseTime } from "@/utils";
26
+  import { getDialysisRecord } from "@/api/dialysis";
27
+  import { getDataConfig } from "@/utils/data";
28
+  import { jsGetAge, uParseTime } from "@/utils/tools";
29
+  import axios from 'axios'
30
+  import BreadCrumb from "@/xt_pages/components/bread-crumb";
31
+  import print from "print-js";
32
+  import printOne from "./newTreatTemplate/printOne"
33
+  export default {
34
+    name: "newStatementPrintTwo",
35
+    components: {
36
+      BreadCrumb,
37
+      printOne
38
+    },
39
+    props:{
40
+      paramsObj:Object
41
+    },
42
+    data() {
43
+      return {
44
+        crumbs: [
45
+          { path: false, name: '门诊医生站' },
46
+          { path: false, name: '打印' }
47
+        ],
48
+        record_date:"",
49
+        patientTableData:[],
50
+        advicePrint:[],
51
+        hisPatient:{},
52
+        patient:{},
53
+        search_input:"",
54
+        loading:false,
55
+        patient_id:0,
56
+        prescription_id:0,
57
+        ids:'',
58
+        info:null,
59
+      };
60
+    },
61
+    methods:{
62
+      printThisPage() {
63
+        var ptime = Math.round(new Date().getTime() / 1000);
64
+        this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
65
+
66
+        const style =
67
+        '@media print {.printTitle{font-size: 20px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;font-size:12px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;font-size:12px;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none;font-size:12px;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;font-size:12px;}.actionBar div{width:150px;}}';
68
+        printJS({
69
+            printable: "prescription-print",
70
+            type: "html",
71
+            style: style,
72
+            scanStyles: false
73
+        });
74
+
75
+        // if (this.org_template_info.template_id == 1) {
76
+        //   printJS({
77
+        //     printable: "dialysis-print-box",
78
+        //     type: "html",
79
+        //     style: style,
80
+        //     scanStyles: false
81
+        //   });
82
+        // }
83
+      },
84
+
85
+      searchAction(){
86
+
87
+      },
88
+      getInfo(obj) {
89
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
90
+          var that = this;
91
+          axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
92
+            params: obj
93
+          })
94
+            .then(function (response) {
95
+              if (response.data.state == 0) {
96
+                this.$message.error(response.data.msg);
97
+                return false
98
+              } else {
99
+                if (response.data.data.failed_code == -10) {
100
+                  that.$message.error(response.data.data.msg)
101
+
102
+                } else {
103
+
104
+                  console.log("~~~~");
105
+                  that.info = response.data.data.result;
106
+                  console.log(that.info);
107
+
108
+                  that.info['org_code'] = response.data.data.org_code;
109
+                  that.info['patient_name'] = response.data.data.patient_name;
110
+                  that.info['doctor_code'] = response.data.data.doctor_code;
111
+                  that.info['doctor_name'] = response.data.data.doctor_name;
112
+                  if(response.data.data.health_card_no_two.length == 0){
113
+                    that.info['health_card_no'] = response.data.data.health_card_no
114
+                  }else{
115
+                    that.info['health_card_no'] = response.data.data.health_card_no_two
116
+                  }
117
+
118
+                  that.info['order_number'] = response.data.data.order_number;
119
+
120
+                  that.info['department'] =  response.data.data.department;
121
+                  that.info['yiliao_leibie'] =  response.data.data.yiliao_leibie;
122
+
123
+                  that.info['before_money'] =  response.data.data.before_money;
124
+                  that.info['after_money'] =   response.data.data.after_money;
125
+
126
+                  that.info['org_name'] = that.$store.getters.xt_user.org.org_name;
127
+                  console.log("~~~~" + that.info);
128
+
129
+                  var name_arr = [];
130
+                  var spec_arr = [];
131
+                  var count_arr = [];
132
+                  var price_arr = [];
133
+                  var total_arr = [];
134
+                  for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
135
+                    name_arr.push(that.info.transBody.outputlist1[i].ake006);
136
+                    spec_arr.push(that.info.transBody.outputlist1[i].aka074);
137
+                    count_arr.push(that.info.transBody.outputlist1[i].akc226);
138
+                    price_arr.push(that.info.transBody.outputlist1[i].akc225);
139
+                    total_arr.push(that.info.transBody.outputlist1[i].akc264)
140
+                  }
141
+
142
+                  console.log("~~~" + that.info);
143
+
144
+                  that.info['name_arr'] = name_arr;
145
+                  that.info['spec_arr'] = spec_arr;
146
+                  that.info['count_arr'] = count_arr;
147
+                  that.info['price_arr'] = price_arr;
148
+                  that.info['total_arr'] = total_arr;
149
+                  that.info['record_date'] = obj.record_time;
150
+
151
+                  console.log("~~" + that.info)
152
+
153
+                }
154
+              }
155
+            })
156
+            .catch(function (error) {
157
+
158
+            });
159
+        }
160
+      }
161
+
162
+    },
163
+
164
+    created() {
165
+      this.getInfo(this.paramsObj)
166
+    },
167
+    watch:{
168
+      paramsObj:{//深度监听,可监听到对象、数组的变化
169
+        handler(val, oldVal){
170
+          this.paramsObj = val;
171
+          this.getInfo(this.paramsObj)
172
+
173
+        },
174
+        deep:true
175
+      }
176
+    }
177
+
178
+  };
179
+</script>
180
+
181
+<style>
182
+    .dialysis-print-order {
183
+        width: 960px;
184
+        margin: 0 auto;
185
+    }
186
+
187
+    .dialysis-print-order .order-yy-name {
188
+        margin: auto;
189
+        text-align: center;
190
+        font-size: 20px;
191
+        letter-spacing: 5px;
192
+    }
193
+
194
+    .dialysis-print-order .order-title {
195
+        margin: auto;
196
+        font-weight: 600;
197
+        text-align: center;
198
+        font-size: 22px;
199
+        padding: 10px;
200
+    }
201
+
202
+    .dialysis-print-order .table-box {
203
+        width: 100%;
204
+        line-height: 23px;
205
+        font-size: 14px;
206
+    }
207
+
208
+    .dialysis-print-order .print-table {
209
+        width: 100%;
210
+        text-align: center;
211
+        border-collapse: collapse;
212
+        line-height: 40px;
213
+        font-size: 14px;
214
+        border-color: #000;
215
+    }
216
+
217
+    .dialysis-print-order .print-table-no {
218
+        width: 100%;
219
+        text-align: center;
220
+        border-collapse: collapse;
221
+        font-size: 14px;
222
+    }
223
+
224
+    .dialysis-print-order .under-line {
225
+        border-bottom: 1px solid #999;
226
+        width: 95%;
227
+        text-align: center;
228
+        margin-left: 2px;
229
+    }
230
+
231
+    .dialysis-print-order .title-box {
232
+        text-align: center;
233
+        font-size: 16px;
234
+    }
235
+
236
+    .dialysis-print-order .radio-lebel-box {
237
+        font-weight: 400;
238
+        cursor: pointer;
239
+    }
240
+
241
+    .dialysis-print-order .radio-no {
242
+        opacity: 0;
243
+        outline: none;
244
+        position: absolute;
245
+        margin: 0;
246
+        width: 0;
247
+        height: 0;
248
+        z-index: -1;
249
+    }
250
+
251
+    .dialysis-print-order .radio-inner {
252
+        white-space: nowrap;
253
+        cursor: pointer;
254
+        outline: none;
255
+        display: inline-block;
256
+        line-height: 1;
257
+        position: relative;
258
+        vertical-align: middle;
259
+    }
260
+
261
+    .dialysis-print-order .radio-fang {
262
+        display: inline-block;
263
+        position: relative;
264
+        border: 1px solid #000;
265
+        box-sizing: border-box;
266
+        width: 14px;
267
+        height: 14px;
268
+        background-color: #fff;
269
+        z-index: 1;
270
+        transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
271
+        background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
272
+    }
273
+
274
+    .dialysis-print-order .is-checked-radio::after {
275
+        content: "√";
276
+        font-size: 15px;
277
+    }
278
+
279
+    .dialysis-print-order .print-table-no tr td {
280
+        padding: 8px 5px;
281
+        line-height: 25px;
282
+    }
283
+
284
+    .dialysis-print-order .print-table tr td {
285
+        padding: 1px 1px;
286
+        /*line-height: 25px;*/
287
+    }
288
+
289
+    .es-img {
290
+        height: 30px;
291
+    }
292
+
293
+    .advice-name {
294
+        text-align: left;
295
+    }
296
+
297
+    .advice-children {
298
+        display: flex;
299
+    }
300
+
301
+    .title-box-pro {
302
+        border: 0 #fff;
303
+        line-height: 25px;
304
+        height: 25px;
305
+        text-align: left;
306
+        padding-left: 10px !important;
307
+    }
308
+    .title-box-pro-tr {
309
+        border: 0 #fff;
310
+    }
311
+    .text-align-left {
312
+        text-align: left !important;
313
+        padding-left: 10px !important;
314
+        font-size: 14px !important;
315
+        line-height: 25px;
316
+    }
317
+    .print-table-tr-new td {
318
+        line-height: 20px !important;
319
+    }
320
+    .border-top-solid {
321
+        border: solid 1px #000;
322
+    }
323
+    .print-template-two tr {
324
+        line-height: 30px;
325
+    }
326
+
327
+    .table-box1 {
328
+        border: 1px solid #000;
329
+        width: 100%;
330
+        line-height: 30px;
331
+        font-size: 14px;
332
+        border-collapse: collapse;
333
+    }
334
+    .table-box1 tr {
335
+        border-bottom: 1px solid #000;
336
+    }
337
+</style>
338
+
339
+<style lang="scss">
340
+
341
+    .newContainer{
342
+    .dialysisPage::-webkit-scrollbar {
343
+        height: 15px;
344
+    }
345
+
346
+    .el-date-editor{
347
+    .el-input__inner{
348
+        padding-right:0px;
349
+    }
350
+    }
351
+    .el-table td, .el-table th{
352
+        text-align: center;
353
+    }
354
+    }
355
+    .newContainer::-webkit-scrollbar{
356
+        height: 15px !important;
357
+    }
358
+</style>

+ 340 - 0
src/xt_pages/hospitalStation/newTreatTemplate/printOne.vue View File

@@ -0,0 +1,340 @@
1
+<template>
2
+    <div>
3
+        <div id='prescription-print' class="prescription-print">
4
+            <div v-for='(i,pageIndex) in pageArr.length' :key="pageIndex">
5
+                <div class="printTitle">血液透析中心医药费收据及收费项目清单</div>
6
+                <div class="infoMain">
7
+                    <div class="infoP">医院(药店)编号:{{info.org_code}}</div>
8
+                    <div class="infoP">名称:{{info.org_name}}</div>
9
+                    <div class="infoP">医生工号:{{info.doctor_code}}</div>
10
+                    <div class="infoP">门诊流水号:{{info.transBody.akc190}}</div>
11
+                    <div class="infoP">科别: {{info.department}}</div>
12
+                    <div class="infoP">处方单据号:{{info.order_number}}</div>
13
+                    <div class="infoP">姓名:{{info.patient_name}}</div>
14
+                    <div class="infoP">医疗账号:{{info.health_card_no}}</div>
15
+                    <div class="infoP">医疗类别:{{info.yiliao_leibie}}</div>
16
+                </div>
17
+                <div class="chargeBox">
18
+                    <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;">
19
+                        <div class="chargeUl" style="width:20%;">
20
+                            <p style="width:50%;border-right:1px solid #000;">费用类型</p>
21
+                            <p style="width:50%;border-right:1px solid #000;">金额</p>
22
+                        </div>
23
+                        <div class="chargeUl" style="width:80%;">
24
+                            <p style="width:40%;border-right:1px solid #000;">明细名称</p>
25
+                            <p style="width:15%;border-right:1px solid #000;">规格</p>
26
+                            <p style="width:15%;border-right:1px solid #000;">数量</p>
27
+                            <p style="width:15%;border-right:1px solid #000;">单价</p>
28
+                            <p style="width:15%;">金额</p>
29
+                        </div>
30
+                    </div>
31
+                    <div style="display:flex;justify-content: space-between;">
32
+                        <div style="width:20%;">
33
+                            <div class="chargeUl" v-for="(item,index) in info.transBody.outputlist2" :key="index">
34
+                                <p style="width:50%;">{{getItemName(item.aka111)}}</p>
35
+                                <p style="width:50%;">{{item.bka058?item.bka058:0}}元</p>
36
+                            </div>
37
+                            <div class="chargeUl" style="border-top:1px solid #000;">
38
+                                <p style="width:50%;">费用合计</p>
39
+                                <p style="width:50%;">{{info.transBody.akc264?info.transBody.akc264:0}}元</p>
40
+                            </div>
41
+                            <div class="chargeUl" style="border-top:1px solid #000;">
42
+                                <p style="width:50%;">记账支付</p>
43
+                                <p style="width:50%;">{{info.transBody.akb068?info.transBody.akb068:0}}元</p>
44
+                            </div>
45
+                            <div class="chargeUl" style="border-top:1px solid #000;">
46
+                                <p style="width:50%;">个人账号</p>
47
+                                <p style="width:50%;">{{info.transBody.akc266?info.transBody.akc266:0}}元</p>
48
+                            </div>
49
+                            <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
50
+                                <p style="width:50%;">现金支付</p>
51
+                                <p style="width:50%;">{{info.transBody.akb067?info.transBody.akb067:0}}元</p>
52
+                            </div>
53
+                        </div>
54
+                        <div style="width:80%;display:flex;max-height:500px;">
55
+
56
+                            <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
57
+                                <p v-for="(item,i) in info.name_arr.slice(pageIndex * 13,(pageIndex * 13) + pageArr[pageIndex])" :key="i" class="chargeP">
58
+                                    {{item}}</p>
59
+                            </div>
60
+                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
61
+                                <p v-for="(item,y) in info.spec_arr.slice(pageIndex * 13,(pageIndex * 13) + pageArr[pageIndex])" :key="y" class="chargeP">
62
+                                    {{item}}</p>
63
+                            </div>
64
+                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
65
+                                <p v-for="(item,z) in info.count_arr.slice(pageIndex * 13,(pageIndex * 13) + pageArr[pageIndex])" :key="z" class="chargeP">
66
+                                    {{item}}次</p>
67
+                            </div>
68
+                            <div style="border-right:1px solid #000;width:15%;text-align:center;">
69
+                                <p v-for="(item,f) in info.price_arr.slice(pageIndex * 13,(pageIndex * 13) + pageArr[pageIndex])" :key="f" class="chargeP">{{item}}元</p>
70
+                            </div>
71
+                            <div style="width:15%;text-align:center;">
72
+                                <p v-for="(item,d) in info.total_arr.slice(pageIndex * 13,(pageIndex * 13) + pageArr[pageIndex])" :key="d" class="chargeP">{{item}}元</p>
73
+                            </div>
74
+                        </div>
75
+                    </div>
76
+
77
+                </div>
78
+                <div class="moneyBox">
79
+                    <p>实收金:{{info.transBody.akc264}}元</p>
80
+                    <p>记账前金额:{{info.before_money}}元</p>
81
+                    <p>扣款金额:{{0.00}}元</p>
82
+                    <p>记账后金额:{{info.after_money}}元</p>
83
+                    <p>找赎金:{{0.00}}元</p>
84
+                </div>
85
+                <div class="actionBar">
86
+                    <div>收费员:{{info.doctor_name}}</div>
87
+                    <div>日期:{{info.record_date}}</div>
88
+                </div>
89
+            </div>
90
+
91
+        </div>
92
+    </div>
93
+
94
+</template>
95
+<script>
96
+  import axios from 'axios'
97
+  import { getChargePrint } from '@/api/project/project'
98
+
99
+  export default {
100
+    data() {
101
+      return {
102
+        list: {},
103
+        prescription: [],
104
+        patient: {},
105
+        orgname: '',
106
+
107
+        result: {},
108
+        org_code: '',
109
+        patient_name: '',
110
+        doctor_code: '',
111
+        doctor_name: '',
112
+
113
+        name_arr: [],
114
+        spec_arr: [],
115
+        count_arr: [],
116
+        price_arr: [],
117
+        total_arr: [],
118
+
119
+        page:1,
120
+        pageArr:[],
121
+
122
+      }
123
+    },
124
+    props: {
125
+      info: Object
126
+    },
127
+    methods: {
128
+      getItemName(number) {
129
+        switch (number) {
130
+          case '01':
131
+            return '床位费';
132
+            break;
133
+          case '02':
134
+            return '西药费';
135
+
136
+            break;
137
+          case '03':
138
+            return '中药费';
139
+
140
+            break;
141
+          case '04':
142
+            return '中成药费';
143
+
144
+            break;
145
+          case '05':
146
+            return '中草药费';
147
+
148
+            break;
149
+          case '06':
150
+            return '检查费';
151
+
152
+            break;
153
+          case '07':
154
+            return '治疗费';
155
+
156
+            break;
157
+          case '08':
158
+            return '放射费';
159
+
160
+            break;
161
+          case '09':
162
+            return '手术费';
163
+
164
+            break;
165
+          case '10':
166
+            return '化验费';
167
+
168
+            break;
169
+          case '11':
170
+            return '输血费';
171
+
172
+            break;
173
+          case '12':
174
+            return '输氧费';
175
+
176
+            break;
177
+          case '13':
178
+            return '其它费';
179
+
180
+            break;
181
+          case '14':
182
+            return '麻醉费';
183
+
184
+            break;
185
+          case '15':
186
+            return '材料费';
187
+
188
+            break;
189
+          case '16':
190
+            return '特殊检查费';
191
+
192
+            break;
193
+          case '17':
194
+            return '特殊治疗费';
195
+
196
+            break;
197
+          case '18':
198
+            return '诊疗费(诊查费)';
199
+
200
+            break;
201
+          case '19':
202
+            return '护理费';
203
+
204
+            break;
205
+          case '20':
206
+            return '诊金';
207
+
208
+            break;
209
+          case '21':
210
+            return '检查费(CT)';
211
+
212
+            break;
213
+          case '22':
214
+            return '检查费(MRT)';
215
+
216
+            break;
217
+          case '23':
218
+            return '检查费(其他)';
219
+
220
+            break;
221
+          case '24':
222
+            return '特需服务费';
223
+
224
+            break;
225
+          case '25':
226
+            return '杂费';
227
+
228
+            break;
229
+          case '26':
230
+            return '挂号费';
231
+            break
232
+
233
+        }
234
+
235
+      },
236
+      getPage(){
237
+        this.page = 1;
238
+        this.pageArr = [];
239
+        if(this.info.name_arr.length <= 13){
240
+            this.page = 1;
241
+            this.pageArr.push(this.info.name_arr.length);
242
+            console.log('this.pageArr',this.pageArr)
243
+        }else if(this.info.name_arr.length > 13){
244
+            this.page = parseInt(this.info.name_arr.length / 13);
245
+            let num = this.info.name_arr.length % 13;
246
+            for (var i=0;i<this.page;i++){
247
+                this.pageArr.push(13)
248
+            }
249
+            if(num != 0){
250
+                this.pageArr.push(num)
251
+            }
252
+        }
253
+      }
254
+    },
255
+    created() {
256
+
257
+
258
+    },
259
+    watch:{
260
+      info: {
261
+        handler(newVal) {
262
+            this.getPage()
263
+        },
264
+        deep: true,
265
+      }
266
+    }
267
+
268
+  }
269
+</script>
270
+
271
+
272
+<style lang="scss" scoped>
273
+    .prescription-print {
274
+        -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
275
+        -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
276
+        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
277
+        margin-bottom: 20px;
278
+        padding: 20px 10px;
279
+    }
280
+
281
+    .printTitle {
282
+        font-size: 22px;
283
+        text-align: center;
284
+        font-weight: bold;
285
+    }
286
+
287
+    .infoMain {
288
+        display: flex;
289
+        flex-wrap: wrap;
290
+        padding: 0 10px;
291
+        margin-top: 10px;
292
+    }
293
+
294
+    .infoMain .infoP {
295
+        width: 33%;
296
+        line-height: 24px;
297
+    }
298
+
299
+    .chargeBox {
300
+        border: 1px solid #000;
301
+    }
302
+
303
+    .chargeUl {
304
+        display: flex;
305
+        justify-content: space-between;
306
+        text-align: center;
307
+    }
308
+
309
+    .chargeUl p {
310
+        height: 40px;
311
+        line-height: 40px;
312
+    }
313
+
314
+    .chargeP {
315
+        height: 40px;
316
+        line-height: 40px;
317
+    }
318
+
319
+    .moneyBox {
320
+        display: flex;
321
+        justify-content: space-between;
322
+        padding: 0 10px;
323
+        background: #eee;
324
+        height: 40px;
325
+        align-items: center;
326
+        border: 1px solid #000;
327
+        border-top: none
328
+    }
329
+
330
+    .actionBar {
331
+        display: flex;
332
+        justify-content: space-between;
333
+        line-height: 24px;
334
+        padding: 0 10px;
335
+    }
336
+
337
+    .actionBar div {
338
+        width: 150px;
339
+    }
340
+</style>

File diff suppressed because it is too large
+ 2945 - 0
src/xt_pages/hospitalStation/outpatientChargesManagement.vue


+ 77 - 0
src/xt_pages/hospitalStation/outpatientInvoice.vue View File

@@ -0,0 +1,77 @@
1
+<template>
2
+    <div class="main-contain outpatientChargesManagement">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+        <div class="app-container">
7
+            <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+                <div>
9
+                    <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
10
+                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
11
+                </div>
12
+                <el-button size="small" type="danger">删除</el-button>
13
+            </div>
14
+            <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
15
+                <el-table-column type="selection" width="55" align="center"></el-table-column>
16
+                <el-table-column align="center" prop="name" label="序号">
17
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
18
+                </el-table-column>
19
+                <el-table-column align="center" prop="name" label="操作员">
20
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
21
+                </el-table-column>
22
+                <el-table-column align="center" prop="name" label="发票起">
23
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
24
+                </el-table-column>
25
+                <el-table-column align="center" prop="name" label="发票止">
26
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
27
+                </el-table-column>
28
+                <el-table-column align="center" prop="name" label="状态">
29
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
30
+                </el-table-column>
31
+                <el-table-column align="center" prop="name" label="备注">
32
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
33
+                </el-table-column>
34
+                <el-table-column align="center" prop="name" label="操作">
35
+                    <template slot-scope="scope">
36
+                        <el-button size="mini" type="danger">删除</el-button>
37
+                    </template>
38
+                </el-table-column>
39
+            </el-table>
40
+        </div>
41
+    </div>
42
+</template>
43
+
44
+
45
+<script>
46
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
47
+export default {
48
+    components:{
49
+        BreadCrumb,
50
+    },
51
+    data(){
52
+        return{
53
+            crumbs: [
54
+                { path: false, name: '门诊收费' },
55
+                { path: false, name: '门诊发票' }
56
+            ],
57
+            tableData: [{
58
+            date: '2016-05-02',
59
+            name: '王小虎',
60
+            address: '上海市普陀区金沙江路 1518 弄'
61
+            }, {
62
+            date: '2016-05-04',
63
+            name: '王小虎',
64
+            address: '上海市普陀区金沙江路 1517 弄'
65
+            }, {
66
+            date: '2016-05-01',
67
+            name: '王小虎',
68
+            address: '上海市普陀区金沙江路 1519 弄'
69
+            }, {
70
+            date: '2016-05-03',
71
+            name: '王小虎',
72
+            address: '上海市普陀区金沙江路 1516 弄'
73
+            }]
74
+        }
75
+    }
76
+}
77
+</script>

File diff suppressed because it is too large
+ 1184 - 0
src/xt_pages/hospitalStation/print.vue


+ 350 - 0
src/xt_pages/hospitalStation/printtwo.vue View File

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

+ 352 - 0
src/xt_pages/hospitalStation/recordPrint.vue View File

@@ -0,0 +1,352 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        size="small"
7
+        icon="el-icon-printer"
8
+        @click="printThisPage"
9
+        type="primary"
10
+        >打印</el-button
11
+      >
12
+    </template>
13
+
14
+    <div class='dialysisPage' style="padding-top:40px;">
15
+      <printOne v-bind:childResponse="childResponse" :patient="patient" :hispatient="hispatient" :history="history" :patientid="patientid"></printOne>
16
+    </div>
17
+  </div>
18
+</template>
19
+
20
+<script>
21
+
22
+import { parseTime } from "@/utils";
23
+import { getDataConfig } from "@/utils/data";
24
+import { jsGetAge, uParseTime } from "@/utils/tools";
25
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
26
+import print from "print-js";
27
+import { getSchedulePatientList } from '@/api/his/his'
28
+import { getPatientCaseHistory } from "@/api/project/project"
29
+import printOne from "./recordTemplate/printOne"
30
+export default {
31
+  name: "dialysisPrintOrder",
32
+  components: {
33
+    BreadCrumb,
34
+    printOne
35
+  },
36
+  props:{
37
+    patientid:Number,
38
+  },
39
+  data() {
40
+    return {
41
+      crumbs: [
42
+        { path: false, name: "透析管理" },
43
+        { path: false, name: "打印单" }
44
+      ],
45
+      childResponse: {},
46
+      patientTableData: [],
47
+      search_input:"",
48
+      patient:{},
49
+      hispatient:{},
50
+      educationOptions:[],
51
+      history:{},
52
+      keyword:"",
53
+    };
54
+  },
55
+  methods: {
56
+    getAdminUser(id) {
57
+      if (id == 0) {
58
+        return "";
59
+      }
60
+      if (id == undefined) {
61
+        return "";
62
+      }
63
+      for (let i = 0; i < this.adminUser.length; i++) {
64
+        if (this.adminUser[i].id == id) {
65
+          return this.adminUser[i].name;
66
+        }
67
+      }
68
+    },
69
+    getTime(value, temp) {
70
+      if (value == 0) {
71
+        return "";
72
+      }
73
+      if (value != undefined) {
74
+        return uParseTime(value, temp);
75
+      }
76
+      return "";
77
+    },
78
+    printThisPage() {
79
+      var ptime = Math.round(new Date().getTime() / 1000);
80
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
81
+
82
+      const style =
83
+        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;padding:0 10px;}.infoTitle div{width: 200px;}.otherInfo{display: flex;margin-top:20px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle div{width: 200px;}}';
84
+      printJS({
85
+        printable: "prescription-print",
86
+        type: "html",
87
+        style: style,
88
+        scanStyles: false
89
+      });
90
+    },
91
+
92
+     //患者列表
93
+      getPatientList(){
94
+
95
+         let params = {
96
+           'record_date':this.$route.query.record,
97
+        };
98
+
99
+      getSchedulePatientList(params).then(response => {
100
+         if (response.data.state == 0) {
101
+            this.$message.error(response.data.msg);
102
+            return false
103
+         } else {
104
+            this.patientTableData = [];
105
+            console.log("list0000000",response.data.data.list);
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
+            //      this.patientTableData.push(response.data.data.list[i])
109
+            //     }
110
+            //   }
111
+              this.patientTableData = response.data.data.list
112
+             }
113
+          })
114
+      },
115
+
116
+    changePatient(val){
117
+
118
+        const params = {
119
+          patient_id:val.patient_id
120
+        };
121
+        console.log("params",params);
122
+      getPatientCaseHistory(params).then(response=>{
123
+         if(response.data.state == 1){
124
+           var patient = response.data.data.patient;
125
+           console.log("patinet",patient);
126
+           this.patient = patient;
127
+           var history = response.data.data.history;
128
+           console.log("history",history);
129
+           this.history = history;
130
+           var hispatient = response.data.data.hispatient;
131
+           console.log("hispatient",hispatient);
132
+           this.hispatient = hispatient
133
+         }
134
+      })
135
+    },
136
+    searchAction(){
137
+      this.getPatientList()
138
+    },
139
+
140
+  },
141
+  created() {
142
+    // this.getPatientList()
143
+
144
+  },
145
+  // computed:{
146
+  //   filtedSchedules: function() {
147
+  //     var search_keyword = this.search_keyword
148
+  //     if (search_keyword.length > 0) {
149
+  //       var schedules = []
150
+  //       for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
151
+  //       const scheduleInfo = this.zone_schedules[o_i]
152
+  //       var originSchedules = scheduleInfo.schedules
153
+  //       if (originSchedules.length == 0) {
154
+  //           continue
155
+  //       }
156
+  //       var filtedSchedules = []
157
+  //       for (let s_i = 0; s_i < originSchedules.length; s_i++) {
158
+  //           const schedule = originSchedules[s_i]
159
+  //           if (schedule.patient.name.indexOf(search_keyword) != -1) {
160
+  //           filtedSchedules.push(schedule)
161
+  //           // break
162
+  //           }
163
+  //       }
164
+  //       if (filtedSchedules.length > 0) {
165
+  //           schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
166
+  //       }
167
+  //       }
168
+  //       return schedules
169
+  //     }
170
+  //   }
171
+  // },
172
+};
173
+</script>
174
+
175
+<style>
176
+.dialysis-print-order {
177
+  width: 960px;
178
+  margin: 0 auto;
179
+}
180
+
181
+.dialysis-print-order .order-yy-name {
182
+  margin: auto;
183
+  text-align: center;
184
+  font-size: 20px;
185
+  letter-spacing: 5px;
186
+}
187
+
188
+.dialysis-print-order .order-title {
189
+  margin: auto;
190
+  font-weight: 600;
191
+  text-align: center;
192
+  font-size: 22px;
193
+  padding: 10px;
194
+}
195
+
196
+.dialysis-print-order .table-box {
197
+  width: 100%;
198
+  line-height: 23px;
199
+  font-size: 14px;
200
+}
201
+
202
+.dialysis-print-order .print-table {
203
+  width: 100%;
204
+  text-align: center;
205
+  border-collapse: collapse;
206
+  line-height: 40px;
207
+  font-size: 14px;
208
+  border-color: #000;
209
+}
210
+
211
+.dialysis-print-order .print-table-no {
212
+  width: 100%;
213
+  text-align: center;
214
+  border-collapse: collapse;
215
+  font-size: 14px;
216
+}
217
+
218
+.dialysis-print-order .under-line {
219
+  border-bottom: 1px solid #999;
220
+  width: 95%;
221
+  text-align: center;
222
+  margin-left: 2px;
223
+}
224
+
225
+.dialysis-print-order .title-box {
226
+  text-align: center;
227
+  font-size: 16px;
228
+}
229
+
230
+.dialysis-print-order .radio-lebel-box {
231
+  font-weight: 400;
232
+  cursor: pointer;
233
+}
234
+
235
+.dialysis-print-order .radio-no {
236
+  opacity: 0;
237
+  outline: none;
238
+  position: absolute;
239
+  margin: 0;
240
+  width: 0;
241
+  height: 0;
242
+  z-index: -1;
243
+}
244
+
245
+.dialysis-print-order .radio-inner {
246
+  white-space: nowrap;
247
+  cursor: pointer;
248
+  outline: none;
249
+  display: inline-block;
250
+  line-height: 1;
251
+  position: relative;
252
+  vertical-align: middle;
253
+}
254
+
255
+.dialysis-print-order .radio-fang {
256
+  display: inline-block;
257
+  position: relative;
258
+  border: 1px solid #000;
259
+  box-sizing: border-box;
260
+  width: 14px;
261
+  height: 14px;
262
+  background-color: #fff;
263
+  z-index: 1;
264
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
265
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
266
+}
267
+
268
+.dialysis-print-order .is-checked-radio::after {
269
+  content: "√";
270
+  font-size: 15px;
271
+}
272
+
273
+.dialysis-print-order .print-table-no tr td {
274
+  padding: 8px 5px;
275
+  line-height: 25px;
276
+}
277
+
278
+.dialysis-print-order .print-table tr td {
279
+  padding: 1px 1px;
280
+  /*line-height: 25px;*/
281
+}
282
+
283
+.es-img {
284
+  height: 30px;
285
+}
286
+
287
+.advice-name {
288
+  text-align: left;
289
+}
290
+
291
+.advice-children {
292
+  display: flex;
293
+}
294
+
295
+.title-box-pro {
296
+  border: 0 #fff;
297
+  line-height: 25px;
298
+  height: 25px;
299
+  text-align: left;
300
+  padding-left: 10px !important;
301
+}
302
+.title-box-pro-tr {
303
+  border: 0 #fff;
304
+}
305
+.text-align-left {
306
+  text-align: left !important;
307
+  padding-left: 10px !important;
308
+  font-size: 14px !important;
309
+  line-height: 25px;
310
+}
311
+.print-table-tr-new td {
312
+  line-height: 20px !important;
313
+}
314
+.border-top-solid {
315
+  border: solid 1px #000;
316
+}
317
+.print-template-two tr {
318
+  line-height: 30px;
319
+}
320
+
321
+.table-box1 {
322
+  border: 1px solid #000;
323
+  width: 100%;
324
+  line-height: 30px;
325
+  font-size: 14px;
326
+  border-collapse: collapse;
327
+}
328
+.table-box1 tr {
329
+  border-bottom: 1px solid #000;
330
+}
331
+</style>
332
+
333
+<style lang="scss">
334
+
335
+.newContainer{
336
+  .dialysisPage::-webkit-scrollbar {
337
+    height: 15px;
338
+  }
339
+
340
+  .el-date-editor{
341
+    .el-input__inner{
342
+      padding-right:0px;
343
+    }
344
+  }
345
+  .el-table td, .el-table th{
346
+    text-align: center;
347
+  }
348
+}
349
+.newContainer::-webkit-scrollbar{
350
+  height: 15px !important;
351
+}
352
+</style>

+ 239 - 0
src/xt_pages/hospitalStation/recordTemplate/printOne.vue View File

@@ -0,0 +1,239 @@
1
+<template>
2
+<div id='prescription-print'>
3
+    <div class="prescription-print">
4
+        <div class="printTitle">{{orgname}} &nbsp;&nbsp; 门诊病历</div>
5
+        <div class="infoTitle">
6
+            <div>姓名:{{patient.name?patient.name:''}}</div>
7
+            <div>性别:
8
+                <span v-if="patient.gender == 1">男</span>
9
+                <span v-if="patient.gender == 2">女</span>
10
+            </div>
11
+            <div>年龄:{{patient.age?patient.age:''}}岁</div>
12
+        </div>
13
+        <div class="infoTitle">
14
+            <div>婚姻状况:
15
+              <span v-if="patient.marital_status == 1">未婚</span>
16
+              <span v-if="patient.marital_status == 2">已婚</span>
17
+              <span v-if="patient.marital_status == 3">离异</span>
18
+            </div>
19
+            <div>职业:{{getProfession(patient.profession)?getProfession(patient.profession):''}}</div>
20
+        </div>
21
+        <div class="otherInfo">
22
+            <div>医保号:</div>
23
+            <div style="flex:1;">{{patient.health_care_no?patient.health_care_no:''}}</div>
24
+        </div>
25
+        <div class="otherInfo">
26
+            <div>联系电话:</div>
27
+            <div style="flex:1;">{{patient.phone?patient.phone:''}}</div>
28
+        </div>
29
+        <div class="otherInfo">
30
+            <div>通讯地址:</div>
31
+            <div style="flex:1;">{{patient.home_address?patient.home_address:''}}</div>
32
+        </div>
33
+        <div class="otherInfo">
34
+            <div>药物过敏史:</div>
35
+            <div style="flex:1;">{{patient.past_history?patient.past_history:''}}</div>
36
+        </div>
37
+        <div class="otherInfo">
38
+            <div>病历编号:</div>
39
+            <div style="flex:1;">{{patient.id?patient.id:''}}</div>
40
+        </div>
41
+        <div style="page-break-after:always;margin-top:50px;"></div>
42
+    </div>
43
+
44
+    <div class="prescription-print">
45
+        <div class="printTitle">病历内容</div>
46
+        <div class="recordTitle">
47
+            <div>科别:{{getDeparment(hispatient.departments)?getDeparment(hispatient.departments):''}}</div>
48
+            <div>姓名:{{patient.name?patient.name:''}}</div>
49
+            <div>性别:
50
+                <span v-if="patient.gender == 1">男</span>
51
+                <span v-if="patient.gender == 2">女</span>
52
+            </div>
53
+            <div>年龄:{{patient.age?patient.age:''}}岁</div>
54
+        </div>
55
+        <div class="otherInfo">
56
+            <div class="otherName">主诉:</div>
57
+            <div style="flex:1;">{{history.chief_conplaint?history.chief_conplaint:''}}</div>
58
+        </div>
59
+        <div class="otherInfo">
60
+            <div class="otherName">现病史:</div>
61
+            <div style="flex:1;">{{history.history_of_present_illness?history.history_of_present_illness:''}}</div>
62
+        </div>
63
+        <div class="otherInfo">
64
+            <div class="otherName">既往史:</div>
65
+            <div style="flex:1;">{{history.past_history?history.past_history:''}}</div>
66
+        </div>
67
+        <div class="otherInfo">
68
+            <div class="otherName">药物过敏史:</div>
69
+            <div style="flex:1;">{{history.allergic_history?history.allergic_history:''}}</div>
70
+        </div>
71
+        <div class="otherInfo">
72
+            <div class="otherName">个人史:</div>
73
+            <div style="flex:1;">{{history.personal_history?history.personal_history:''}}</div>
74
+        </div>
75
+        <div class="otherInfo">
76
+            <div class="otherName">家族史:</div>
77
+            <div style="flex:1;">{{history.family_history?history.family_history:''}}</div>
78
+        </div>
79
+        <div class="otherInfo">
80
+            <div class="otherName">体格检查:</div>
81
+            <div style="flex:1;">无</div>
82
+        </div>
83
+        <div class="otherInfo">
84
+            <div class="otherName">门诊诊断:</div>
85
+            <div style="flex:1;">{{history.diagnostic?history.diagnostic:''}}</div>
86
+        </div>
87
+        <div class="otherInfo">
88
+            <div class="otherName">门诊医嘱:</div>
89
+            <div style="flex:1;">{{history.doctor_advice?history.doctor_advice:''}}</div>
90
+        </div>
91
+        <div style="display:flex;justify-content: space-between;">
92
+            <div style="margin-top:20px;">
93
+                打印日期:{{ printDate }}
94
+            </div>
95
+            <div style="margin-top:20px;text-align:right;">
96
+                医生签名:{{getDoctor(history.doctor)?getDoctor(history.doctor):''}}
97
+            </div>
98
+        </div>
99
+    </div>
100
+</div>
101
+</template>
102
+<script>
103
+
104
+import { getDataConfig } from "@/utils/data";
105
+import { getAllDoctorList,getPatientCaseHistory } from "@/api/project/project"
106
+export default {
107
+    props:{
108
+      patient:Object,
109
+      hispatient:Object,
110
+      patientid:Number
111
+    //   history:Object,
112
+    },
113
+    data(){
114
+        return{
115
+            educationOptions:[],
116
+            departmentList:[],
117
+            orgname:'',
118
+            history:{},
119
+            printDate:''
120
+        }
121
+    },
122
+    methods:{
123
+      getProfession(id){
124
+        var name = "";
125
+        for(let i=0;i<this.educationOptions.length;i++){
126
+            if(id == this.educationOptions[i].id){
127
+                name = this.educationOptions[i].name
128
+            }
129
+        }
130
+        return name
131
+      },
132
+      getAllDoctorList(){
133
+           getAllDoctorList().then(response=>{
134
+             if(response.data.state == 1){
135
+               var doctor =  response.data.data.doctor;
136
+
137
+               this.doctorList = doctor;
138
+               var department = response.data.data.department;
139
+               console.log("department",department);
140
+               this.departmentList = department
141
+             }
142
+           })
143
+       },
144
+      getDoctor(id){
145
+        var name = "";
146
+        for(let i=0;i<this.doctorList.length;i++){
147
+          if(id == this.doctorList[i].admin_user_id){
148
+              name = this.doctorList[i].user_name
149
+          }
150
+        }
151
+        return name
152
+      },
153
+      getPatientCaseHistory(){
154
+
155
+        const params = {
156
+          patient_id:this.patientid
157
+        };
158
+      console.log("病历22222",params);
159
+      getPatientCaseHistory(params).then(response=>{
160
+         if(response.data.state == 1){
161
+           var patient = response.data.data.patient;
162
+        //    console.log("patinet",patient)
163
+           this.patient = patient;
164
+           var history = response.data.data.history;
165
+           console.log("中国history222222",history);
166
+           this.history = history;
167
+           var hispatient = response.data.data.hispatient;
168
+        //    console.log("hispatient",hispatient)
169
+           this.hispatient = hispatient
170
+         }
171
+      })
172
+    },
173
+    getDeparment(id){
174
+
175
+     var name = '';
176
+     for(let i=0;i<this.departmentList.length;i++){
177
+         if(id == this.departmentList[i].id){
178
+            name = this.departmentList[i].name
179
+         }
180
+      }
181
+      return name
182
+    }
183
+    },
184
+    created(){
185
+        this.educationOptions = getDataConfig("patient", "education_types");
186
+        this.getAllDoctorList();
187
+        this.getPatientCaseHistory();
188
+
189
+        var xtuser = this.$store.getters.xt_user;
190
+        this.orgname = xtuser.org.org_name;
191
+        var data = new Date();
192
+        var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
193
+        var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
194
+        this.printDate = data.getFullYear() + "-" + month + "-" + date;
195
+    }
196
+}
197
+</script>
198
+
199
+
200
+<style lang="scss" scoped>
201
+.prescription-print{
202
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
203
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
204
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
205
+    margin-bottom: 20px;
206
+    padding:20px 10px;
207
+}
208
+.printTitle{
209
+    font-size: 22px;
210
+    text-align: center;
211
+    font-weight: bold;
212
+}
213
+.infoTitle{
214
+    display: flex;
215
+    margin-top:10px;
216
+    line-height: 24px;
217
+    padding:0 10px;
218
+}
219
+.infoTitle div{
220
+    width: 200px;
221
+}
222
+.otherInfo{
223
+    display: flex;
224
+    margin-top:10px;
225
+    line-height: 24px;
226
+    padding:0 10px;
227
+}
228
+.recordTitle{
229
+    display: flex;
230
+    margin-top:10px;
231
+    line-height: 24px;
232
+    padding:0 10px;
233
+    border-bottom: 2px solid #000;
234
+}
235
+.recordTitle div{
236
+    width: 200px;
237
+}
238
+
239
+</style>

+ 162 - 0
src/xt_pages/hospitalStation/settlementPrint.vue View File

@@ -0,0 +1,162 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+        >打印</el-button
12
+      >
13
+    </template>
14
+    <div class="app-container" style="padding-top:40px;">
15
+        <div class='dialysisPage'>
16
+            <printOne v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printOne>
17
+        </div>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+
24
+import { jsGetAge, uParseTime } from "@/utils/tools";
25
+// import LabelBox from "./printItem/LabelBox";
26
+import print from "print-js";
27
+import printOne from "./settlementTemplate/printOne"
28
+export default {
29
+  name: "dialysisPrintOrder",
30
+  components: {
31
+    printOne
32
+  },
33
+  props:{
34
+    paramsObj:Object
35
+  },
36
+  data() {
37
+    return {
38
+      crumbs: [
39
+        { path: false, name: "透析管理" },
40
+        { path: false, name: "打印单" }
41
+      ],
42
+      childResponse: {},
43
+      paramsObj:{}
44
+
45
+
46
+    };
47
+  },
48
+  methods: {
49
+    getAdminUser(id) {
50
+      if (id == 0) {
51
+        return "";
52
+      }
53
+      if (id == undefined) {
54
+        return "";
55
+      }
56
+      for (let i = 0; i < this.adminUser.length; i++) {
57
+        if (this.adminUser[i].id == id) {
58
+          return this.adminUser[i].name;
59
+        }
60
+      }
61
+    },
62
+    getTime(value, temp) {
63
+      if (value == 0) {
64
+        return "";
65
+      }
66
+      if (value != undefined) {
67
+        return uParseTime(value, temp);
68
+      }
69
+      return "";
70
+    },
71
+    printThisPage() {
72
+      var ptime = Math.round(new Date().getTime() / 1000);
73
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
74
+
75
+      const style =
76
+        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
77
+        const style1 = "@media print{#prescription-print{font-size:14px;}.title{text-align: center;font-size: 22px;font-weight: bold;}.row{display: flex;justify-content: space-between;}.under_line{border-bottom: 1px solid #999;width: 95%;text-align: center;margin-left: 2px;display: inline-block;}.inline_block{display: inline-block;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 14px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; /* 解决边框冲突 */border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid;text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}}";
78
+        printJS({
79
+            printable: "prescription-print",
80
+            type: "html",
81
+            style: style1,
82
+            scanStyles: false
83
+        });
84
+
85
+      // if (this.org_template_info.template_id == 1) {
86
+      //   printJS({
87
+      //     printable: "dialysis-print-box",
88
+      //     type: "html",
89
+      //     style: style,
90
+      //     scanStyles: false
91
+      //   });
92
+      // }
93
+    },
94
+  },
95
+  created() {
96
+  },
97
+  watch:{
98
+    paramsObj:{//深度监听,可监听到对象、数组的变化
99
+      handler(val, oldVal){
100
+        this.paramsObj = val
101
+
102
+      },
103
+      deep:true
104
+    }
105
+  }
106
+};
107
+</script>
108
+
109
+<style lang="scss" scoped>
110
+.printTitle{
111
+    font-size: 22px;
112
+    text-align: center;
113
+    font-weight: bold;
114
+}
115
+.infoMain{
116
+    display: flex;
117
+    flex-wrap: wrap;
118
+    border-bottom: 2px solid #000;
119
+    padding:0 10px;
120
+}
121
+.infoMain .infoP{
122
+    width: 33%;
123
+    line-height: 24px;
124
+}
125
+.prescriptionBox{
126
+    padding:0 10px;
127
+    height:600px;
128
+}
129
+.Rp{
130
+    font-size: 22px;
131
+    font-weight: bold;
132
+}
133
+.drugsBox{
134
+    padding-left: 40px;
135
+    margin-bottom: 10px;
136
+}
137
+.drugsBox p{
138
+    line-height: 30px;
139
+}
140
+.drugsOne{
141
+    line-height: 24px;
142
+}
143
+.drugsOne span{
144
+    margin-right: 20px;
145
+}
146
+.doctorBox{
147
+    display: flex;
148
+    justify-content: space-between;
149
+    padding:0 10px;
150
+    line-height: 24px;
151
+    border-bottom: 2px solid #000;
152
+}
153
+.actionBar{
154
+    display: flex;
155
+    justify-content: space-between;
156
+    line-height: 24px;
157
+    padding:0 10px;
158
+}
159
+.actionBar p{
160
+    width:150px;
161
+}
162
+</style>

+ 461 - 0
src/xt_pages/hospitalStation/settlementTemplate/printOne.vue View File

@@ -0,0 +1,461 @@
1
+<template>
2
+    <div id="prescription-print" class="print_page_main_content">
3
+        <div class="title">医疗保障基金结算清单</div>
4
+        <div style="text-align:right;">清单流水号 <div style="width:120px;" class="under_line"></div></div>
5
+        <div class="row">
6
+            <div>定点医疗机构名称<div style="width:120px;" class="under_line"></div></div>
7
+            <div>定点医疗机构代码<div style="width:120px;" class="under_line"></div></div>
8
+            <div>医保结算等级<div style="width:120px;" class="under_line"></div></div>
9
+        </div>
10
+        <div class="row">
11
+            <div>医保编号<div style="width:120px;" class="under_line"></div></div>
12
+            <div>病案号<div style="width:120px;" class="under_line"></div></div>
13
+            <div>申报时间
14
+                <div style="width:40px;" class="under_line"></div>年
15
+                <div style="width:40px;" class="under_line"></div>月
16
+                <div style="width:40px;" class="under_line"></div>日
17
+            </div>
18
+        </div>
19
+        <div>
20
+            <table class="proj_table">
21
+                <tbody>
22
+                    <tr>
23
+                        <td style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 6px 8px;line-height: 30px;">
24
+                            一、基本信息
25
+                        </td>
26
+                    </tr>
27
+                    <tr>
28
+                        <td>
29
+                            <div class="row">
30
+                                <div class="inline_block">姓名
31
+                                    <div style="width:80px;" class="under_line"></div>
32
+                                </div>
33
+                                <div class="inline_block">性别
34
+                                    <label-box :isChecked="false" showValue="男"></label-box>
35
+                                    <label-box :isChecked="false" showValue="女"></label-box>
36
+                                </div>
37
+                                <div class="inline_block">出生日期
38
+                                    <div style="width:40px;" class="under_line"></div>年
39
+                                    <div style="width:40px;" class="under_line"></div>月
40
+                                    <div style="width:40px;" class="under_line"></div>日
41
+                                </div>
42
+                                <div class="inline_block">年龄
43
+                                    <div style="width:80px;" class="under_line"></div>岁
44
+                                </div>
45
+                                <div class="inline_block">国籍
46
+                                    <div style="width:80px;" class="under_line"></div>
47
+                                </div>
48
+                            </div>
49
+                            <div class="row">
50
+                                <div class="inline_block">(年龄不足1周岁)年龄
51
+                                    <div style="width:80px;" class="under_line"></div>天
52
+                                </div>
53
+                                <div class="inline_block">民族
54
+                                    <div style="width:80px;" class="under_line"></div>
55
+                                </div>
56
+                                <div class="inline_block">患者证件类别
57
+                                    <div style="width:80px;" class="under_line"></div>
58
+                                </div>
59
+                                <div class="inline_block">患者证件号码
60
+                                    <div style="width:140px;" class="under_line"></div>
61
+                                </div>
62
+                            </div>
63
+                            <div>
64
+                                <div class="inline_block">职业
65
+                                    <div style="width:80px;" class="under_line"></div>
66
+                                </div>
67
+                                <div class="inline_block" style="width:80px;"></div>
68
+                                <div class="inline_block">现住址
69
+                                    <div style="width:80px;" class="under_line"></div>省(区、市)
70
+                                    <div style="width:80px;" class="under_line"></div>市
71
+                                    <div style="width:80px;" class="under_line"></div>县
72
+                                    <div style="width:140px;" class="under_line"></div>
73
+                                </div>
74
+                            </div>
75
+                            <div class="row">
76
+                                <div class="inline_block">工作单位名称
77
+                                    <div style="width:80px;" class="under_line"></div>
78
+                                </div>
79
+                                <div class="inline_block">工作单位地址
80
+                                    <div style="width:160px;" class="under_line"></div>
81
+                                </div>
82
+                                <div class="inline_block">单位电话
83
+                                    <div style="width:120px;" class="under_line"></div>
84
+                                </div>
85
+                                <div class="inline_block">邮编
86
+                                    <div style="width:120px;" class="under_line"></div>
87
+                                </div>
88
+                            </div>
89
+                            <div class="row">
90
+                                <div class="inline_block">联系人姓名
91
+                                    <div style="width:80px;" class="under_line"></div>
92
+                                </div>
93
+                                <div class="inline_block">关系
94
+                                    <div style="width:80px;" class="under_line"></div>
95
+                                </div>
96
+                                <div class="inline_block">地址
97
+                                    <div style="width:80px;" class="under_line"></div>省(区、市)
98
+                                    <div style="width:80px;" class="under_line"></div>市
99
+                                    <div style="width:80px;" class="under_line"></div>县
100
+                                    <div style="width:140px;" class="under_line"></div>
101
+                                </div>
102
+                                <div class="inline_block">电话
103
+                                    <div style="width:80px;" class="under_line"></div>
104
+                                </div>
105
+                            </div>
106
+                            <div class="row">
107
+                                <div style="width:33%;">医保类型<div style="width:120px;" class="under_line"></div></div>
108
+                                <div style="width:33%;">特殊人员类型<div style="width:120px;" class="under_line"></div></div>
109
+                                <div style="width:33%;">参保地<div style="width:120px;" class="under_line"></div></div>
110
+                            </div>
111
+                            <div class="row">
112
+                                <div style="width:33%;">新生儿入院类型<div style="width:120px;" class="under_line"></div></div>
113
+                                <div style="width:33%;">新生儿出生体重<div style="width:120px;" class="under_line"></div>克</div>
114
+                                <div style="width:33%;">新生儿入院体重<div style="width:120px;" class="under_line"></div>克</div>
115
+                            </div>
116
+                        </td>
117
+                    </tr>
118
+                    <tr>
119
+                        <td style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 6px 8px;line-height: 30px;">
120
+                            二、门诊慢特病诊疗信息
121
+                        </td>
122
+                    </tr>
123
+                    <tr>
124
+                        <td>
125
+                            <div class="row">
126
+                                <div class="inline_block">诊断科别
127
+                                    <div style="width:100px;" class="under_line"></div>
128
+                                </div>
129
+                                <div class="inline_block">就诊日期
130
+                                    <div style="width:100px;" class="under_line"></div>
131
+                                </div>
132
+                            </div>
133
+                        </td>
134
+                    </tr>
135
+                    <tr>
136
+                        <td style="padding:0;line-height:30px;height:30px;">
137
+                            <table class="inside_table">
138
+                                <tbody>
139
+                                    <tr>
140
+                                        <td style="width:25%;">诊断名称</td>
141
+                                        <td style="width:25%;">诊断代码</td>
142
+                                        <td style="width:25%;">手术及操作名称</td>
143
+                                        <td style="width:25%;">手术及操作代码</td>
144
+                                    </tr>
145
+                                    <tr v-for="item in 6">
146
+                                        <td>&nbsp;</td>
147
+                                        <td>&nbsp;</td>
148
+                                        <td>&nbsp;</td>
149
+                                        <td>&nbsp;</td>
150
+                                    </tr>
151
+                                </tbody>
152
+                            </table>
153
+                        </td>
154
+                    </tr>
155
+                    <tr>
156
+                        <td style="letter-spacing:5px;text-align:center;font-weight:520;font-size:16px;padding: 6px 8px;line-height: 30px;">
157
+                            三、住院诊疗信息
158
+                        </td>
159
+                    </tr>
160
+                    <tr>
161
+                        <td>
162
+                            <div class="inline_block">住院医疗类型
163
+                                <label-box :isChecked="false" showValue="1.住院"></label-box>
164
+                                <label-box :isChecked="false" showValue="2.日间手术"></label-box>
165
+                            </div>
166
+                        </td>
167
+                    </tr>
168
+                    <tr>
169
+                        <td>
170
+                            <div>
171
+                                <div class="inline_block">入院途径
172
+                                    <label-box :isChecked="false" showValue="1.急诊"></label-box>
173
+                                    <label-box :isChecked="false" showValue="2.门诊"></label-box>
174
+                                    <label-box :isChecked="false" showValue="3.其他医疗机构转入"></label-box>
175
+                                    <label-box :isChecked="false" showValue="9.其他"></label-box>
176
+                                </div>
177
+                            </div>
178
+                        </td>
179
+                    </tr>
180
+                    <tr>
181
+                        <td>
182
+                            <div>
183
+                                <div class="inline_block">治疗类别
184
+                                    <label-box :isChecked="false" showValue="1.西医"></label-box>
185
+                                    <label-box :isChecked="false" showValue="2.中医"></label-box>
186
+                                    (
187
+                                    <label-box :isChecked="false" showValue="2.1 中医"></label-box>
188
+                                    <label-box :isChecked="false" showValue="2.2 民族医"></label-box>
189
+                                    )
190
+                                    <label-box :isChecked="false" showValue="3.中西医"></label-box>
191
+                                </div>
192
+                            </div>
193
+                        </td>
194
+                    </tr>
195
+                    <tr>
196
+                        <td>
197
+                            <div class="row">
198
+                                <div style="width:40%" class="inline_block">入院时间
199
+                                    <div style="width:40px;" class="under_line"></div>年
200
+                                    <div style="width:40px;" class="under_line"></div>月
201
+                                    <div style="width:40px;" class="under_line"></div>日
202
+                                    <div style="width:40px;" class="under_line"></div>时
203
+                                </div>
204
+                                <div style="width:30%" class="inline_block">入院科别
205
+                                    <div style="width:80px;" class="under_line"></div>
206
+                                </div>
207
+                                <div style="width:30%" class="inline_block">转科科别
208
+                                    <div style="width:80px;" class="under_line"></div>
209
+                                </div>
210
+                            </div>
211
+                        </td>
212
+                    </tr>
213
+                    <tr>
214
+                        <td>
215
+                            <div class="row">
216
+                                <div style="width:40%" class="inline_block">出院时间
217
+                                    <div style="width:40px;" class="under_line"></div>年
218
+                                    <div style="width:40px;" class="under_line"></div>月
219
+                                    <div style="width:40px;" class="under_line"></div>日
220
+                                    <div style="width:40px;" class="under_line"></div>时
221
+                                </div>
222
+                                <div style="width:30%" class="inline_block">出院科别
223
+                                    <div style="width:80px;" class="under_line"></div>
224
+                                </div>
225
+                                <div style="width:30%" class="inline_block">实际住院
226
+                                    <div style="width:80px;" class="under_line"></div>天
227
+                                </div>
228
+                            </div>
229
+                        </td>
230
+                    </tr>
231
+                    <tr>
232
+                        <td>
233
+                            <div class="row">
234
+                                <div style="width:40%" class="inline_block">门(急)诊诊断(西医诊断)
235
+                                    <div style="width:80px;" class="under_line"></div>
236
+                                </div>
237
+                                <div style="width:30%" class="inline_block">疾病代码
238
+                                    <div style="width:80px;" class="under_line"></div>
239
+                                </div>
240
+                                <div style="width:30%" class="inline_block">
241
+                                </div>
242
+                            </div>
243
+                            <div class="row">
244
+                                <div style="width:40%" class="inline_block">门(急)诊诊断(中医诊断)
245
+                                    <div style="width:80px;" class="under_line"></div>
246
+                                </div>
247
+                                <div style="width:30%" class="inline_block">疾病代码
248
+                                    <div style="width:80px;" class="under_line"></div>
249
+                                </div>
250
+                                <div style="width:30%" class="inline_block">
251
+                                </div>
252
+                            </div>
253
+                        </td>
254
+                    </tr>
255
+                    <tr>
256
+                        <td style="padding:0;line-height:30px;height:30px;">
257
+                            <table class="inside_table">
258
+                                <tbody>
259
+                                    <tr>
260
+                                        <td style="width:20%;">出院西医诊断</td>
261
+                                        <td style="width:15%;">疾病代码</td>
262
+                                        <td style="width:15%;">入院病情</td>
263
+                                        <td style="width:20%;">出院中医诊断</td>
264
+                                        <td style="width:15%;">疾病代码</td>
265
+                                        <td style="width:15%;">入院病情</td>
266
+                                    </tr>
267
+                                    <tr>
268
+                                        <td style="text-align:left;">&nbsp;主要诊断:</td>
269
+                                        <td>&nbsp;</td>
270
+                                        <td>&nbsp;</td>
271
+                                        <td style="text-align:left;">&nbsp;主病:</td>
272
+                                        <td>&nbsp;</td>
273
+                                        <td>&nbsp;</td>
274
+                                    </tr>
275
+                                    <tr>
276
+                                        <td style="text-align:left;">&nbsp;其他诊断:</td>
277
+                                        <td>&nbsp;</td>
278
+                                        <td>&nbsp;</td>
279
+                                        <td style="text-align:left;">&nbsp;主证:</td>
280
+                                        <td>&nbsp;</td>
281
+                                        <td>&nbsp;</td>
282
+                                    </tr>
283
+                                    <tr v-for="item in 7">
284
+                                        <td>&nbsp;</td>
285
+                                        <td>&nbsp;</td>
286
+                                        <td>&nbsp;</td>
287
+                                        <td>&nbsp;</td>
288
+                                        <td>&nbsp;</td>
289
+                                        <td>&nbsp;</td>
290
+                                    </tr>
291
+                                </tbody>
292
+                            </table>
293
+                        </td>
294
+                    </tr>
295
+                    <tr>
296
+                        <td>
297
+                            <div class="inline_block">诊断代码计数
298
+                                <div style="width:80px;" class="under_line"></div>
299
+                            </div>
300
+                        </td>
301
+                    </tr>
302
+                    <tr>
303
+                        <td style="padding:0;line-height:30px;height:30px;">
304
+                            <table class="inside_table">
305
+                                <tbody>
306
+                                    <tr>
307
+                                        <td style="width:20%;">手术及操作名称</td>
308
+                                        <td style="width:20%;">手术及操作代码</td>
309
+                                        <td style="width:10%;">手术及操作日期</td>
310
+                                        <td style="width:10%;">麻醉方式*</td>
311
+                                        <td style="width:10%;">术者医师姓名</td>
312
+                                        <td style="width:10%;">术者医师代码</td>
313
+                                        <td style="width:10%;">麻醉医师姓名</td>
314
+                                        <td style="width:10%;">麻醉医师代码</td>
315
+                                    </tr>
316
+                                    <tr>
317
+                                        <td style="text-align:left;">&nbsp;主要:</td>
318
+                                        <td>&nbsp;</td>
319
+                                        <td>&nbsp;</td>
320
+                                        <td>&nbsp;</td>
321
+                                        <td>&nbsp;</td>
322
+                                        <td>&nbsp;</td>
323
+                                        <td>&nbsp;</td>
324
+                                        <td>&nbsp;</td>
325
+                                    </tr>
326
+                                    <tr>
327
+                                        <td style="text-align:left;">&nbsp;其他:</td>
328
+                                        <td>&nbsp;</td>
329
+                                        <td>&nbsp;</td>
330
+                                        <td>&nbsp;</td>
331
+                                        <td>&nbsp;</td>
332
+                                        <td>&nbsp;</td>
333
+                                        <td>&nbsp;</td>
334
+                                        <td>&nbsp;</td>
335
+                                    </tr>
336
+                                    <tr v-for="item in 8">
337
+                                        <td>&nbsp;</td>
338
+                                        <td>&nbsp;</td>
339
+                                        <td>&nbsp;</td>
340
+                                        <td>&nbsp;</td>
341
+                                        <td>&nbsp;</td>
342
+                                        <td>&nbsp;</td>
343
+                                        <td>&nbsp;</td>
344
+                                        <td>&nbsp;</td>
345
+                                    </tr>
346
+                                </tbody>
347
+                            </table>
348
+                        </td>
349
+                    </tr>
350
+                    <tr>
351
+                        <td>
352
+                            <div class="inline_block">手术及操作代码计数
353
+                                <div style="width:80px;" class="under_line"></div>
354
+                            </div>
355
+                        </td>
356
+                    </tr>
357
+                    <tr>
358
+                        <td>
359
+                            <div class="inline_block">呼吸机使用时间
360
+                                <div style="width:40px;" class="under_line"></div>天
361
+                                <div style="width:40px;" class="under_line"></div>小时
362
+                                <div style="width:40px;" class="under_line"></div>分钟
363
+                            </div>
364
+                        </td>
365
+                    </tr>
366
+                    <tr>
367
+                        <td>
368
+                            <div>
369
+                                <div class="inline_block">颅脑损伤患者昏迷时间:
370
+                                    入院前<div style="width:40px;" class="under_line"></div>
371
+
372
+                                    天<div style="width:40px;" class="under_line"></div>
373
+                                    
374
+                                    小时<div style="width:40px;" class="under_line"></div>分钟
375
+                                </div>
376
+                            </div>
377
+                            <div>
378
+                                <div class="inline_block"><span style="visibility: hidden;">颅脑损伤患者昏迷时间:</span>
379
+                                    入院前<div style="width:40px;" class="under_line"></div>
380
+
381
+                                    天<div style="width:40px;" class="under_line"></div>
382
+                                    
383
+                                    小时<div style="width:40px;" class="under_line"></div>分钟
384
+                                </div>
385
+                            </div>
386
+                        </td>
387
+                    </tr>
388
+                </tbody>
389
+            </table>
390
+        </div>
391
+    </div>
392
+</template>
393
+
394
+<script>
395
+import LabelBox from '../../dialysis/printItem/LabelBox'
396
+export default {
397
+    components:{
398
+        LabelBox
399
+    },
400
+    data(){
401
+        return{
402
+
403
+        }
404
+    }
405
+}
406
+</script>
407
+
408
+
409
+
410
+<style lang="scss" scoped>
411
+.title{
412
+    text-align: center;
413
+    font-size: 22px;
414
+    font-weight: bold;
415
+}
416
+.row{
417
+    display: flex;
418
+    justify-content: space-between;
419
+}
420
+.under_line{
421
+    border-bottom: 1px solid #999;
422
+    width: 95%;
423
+    text-align: center;
424
+    margin-left: 2px;
425
+    display: inline-block;
426
+}
427
+.inline_block{
428
+    display: inline-block;
429
+}
430
+// #prescription-print{
431
+//     width: 960px;
432
+// }
433
+.print_page_main_content .proj_table {
434
+  width: 100%;
435
+  border: 1px solid;
436
+  border-collapse: collapse;
437
+  padding: 2px;
438
+}
439
+
440
+.print_page_main_content .proj_table tbody tr td {
441
+  border: 1px solid;
442
+  /* text-align: center; */
443
+  font-size: 16px;
444
+  padding: 5px 8px;
445
+  line-height: 30px;
446
+}
447
+
448
+.print_page_main_content .proj_table .inside_table {
449
+  width: 100%;
450
+  border: hidden; /* 解决边框冲突 */
451
+  border-collapse: collapse;
452
+}
453
+
454
+.print_page_main_content .proj_table .inside_table tr td {
455
+  border: 1px solid;
456
+  text-align: center;
457
+  font-size: 14px;
458
+  padding: 6px 5px;
459
+  line-height: 16px;
460
+}
461
+</style>

+ 426 - 0
src/xt_pages/hospitalStation/statementPrint.vue View File

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

+ 371 - 0
src/xt_pages/hospitalStation/statementTemplate/printOne.vue View File

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

+ 181 - 0
src/xt_pages/hospitalStation/statementTemplate/printTwo.vue View File

@@ -0,0 +1,181 @@
1
+<template>
2
+  <div id="statement-print" class="statement-print">
3
+    <div class="statementTitle" v-if="info.insutype == '310'">珠海市职工基本医疗保险门慢就医结算单</div>
4
+    <div class="statementTitle" v-if="info.insutype == '390'">珠海市城乡居民基本医疗保险门慢就医结算单</div>
5
+
6
+    <div style="display:flex">
7
+      <div style="width:70%">医疗机构名称:{{info.fixmedins_name}}</div>
8
+      <div style="width:30%" v-if="info.hosp_lv == '1'">医院等级:三级特等</div>
9
+      <div style="width:30%" v-if="info.hosp_lv == '2'">医院等级:三级甲等</div>
10
+      <div style="width:30%" v-if="info.hosp_lv == '3'">医院等级:三级乙等</div>
11
+      <div style="width:30%" v-if="info.hosp_lv == '4'">医院等级:三级丙等</div>
12
+      <div style="width:30%" v-if="info.hosp_lv == '5'">医院等级:二级甲等</div>
13
+      <div style="width:30%" v-if="info.hosp_lv == '6'">医院等级:二级乙等</div>
14
+      <div style="width:30%" v-if="info.hosp_lv == '7'">医院等级:二级丙等</div>
15
+      <div style="width:30%" v-if="info.hosp_lv == '8'">医院等级:一级甲等</div>
16
+      <div style="width:30%" v-if="info.hosp_lv == '9'">医院等级:一级乙等</div>
17
+      <div style="width:30%" v-if="info.hosp_lv == '10'">医院等级:一级丙等</div>
18
+      <div style="width:30%" v-if="info.hosp_lv == '11'">医院等级:无等级</div>
19
+
20
+    </div>
21
+    <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;padding-bottom:10px;">
22
+      <div style="flex:1;">单据编码:{{info.number}}</div>
23
+      <div style="width:33%">就诊时间:{{getTime(info.date)}}</div>
24
+      <div>金额单位:元</div>
25
+    </div>
26
+    <div style="display:flex">
27
+      <div style="width:50%">姓名:{{info.psn_name}}</div>
28
+      <div style="width:50%">个人电脑号:{{info.psn_no}}</div>
29
+    </div>
30
+    <div style="display:flex">
31
+      <div style="width:50%">社保卡号</div>
32
+      <div style="width:50%">诊断:{{info.diagnosis}}</div>
33
+    </div>
34
+    <div style="display:flex">
35
+      <div style="width:50%" v-if="info.psn_type == '11'">人员类别:在职</div>
36
+      <div style="width:50%" v-if="info.psn_type == '1101'">人员类别:职工在职</div>
37
+      <div style="width:50%" v-if="info.psn_type == '1102'">人员类别:公务员在职</div>
38
+      <div style="width:50%" v-if="info.psn_type == '1103'">人员类别:灵活就业人员在职</div>
39
+      <div style="width:50%" v-if="info.psn_type == '1160'">人员类别:地方其他扩展人员</div>
40
+      <div style="width:50%" v-if="info.psn_type == '12'">人员类别:退休人员</div>
41
+      <div style="width:50%" v-if="info.psn_type == '1201'">人员类别:职工退休</div>
42
+      <div style="width:50%" v-if="info.psn_type == '1202'">人员类别:公务员退休</div>
43
+      <div style="width:50%" v-if="info.psn_type == '1203'">人员类别:灵活就业人员退休</div>
44
+      <div style="width:50%" v-if="info.psn_type == '1260'">人员类别:地方其他扩展人员</div>
45
+      <div style="width:50%" v-if="info.psn_type == '13'">人员类别:离休</div>
46
+      <div style="width:50%" v-if="info.psn_type == '1300'">人员类别:离休人员</div>
47
+      <div style="width:50%" v-if="info.psn_type == '1360'">人员类别:地方其他扩展人员</div>
48
+      <div style="width:50%" v-if="info.psn_type == '14'">人员类别:居民(未成年)</div>
49
+      <div style="width:50%" v-if="info.psn_type == '1401'">人员类别:新生儿</div>
50
+      <div style="width:50%" v-if="info.psn_type == '1402'">人员类别:学龄前儿童</div>
51
+      <div style="width:50%" v-if="info.psn_type == '1403'">人员类别:中小学生</div>
52
+      <div style="width:50%" v-if="info.psn_type == '1404'">人员类别:大学生</div>
53
+      <div style="width:50%" v-if="info.psn_type == '1405'">人员类别:未成年(未入学)</div>
54
+      <div style="width:50%" v-if="info.psn_type == '15'">人员类别:居民(成年)</div>
55
+      <div style="width:50%" v-if="info.psn_type == '1501'">人员类别:普通居民(成年)</div>
56
+      <div style="width:50%" v-if="info.psn_type == '1560'">人员类别:地方其他扩展身份</div>
57
+      <div style="width:50%" v-if="info.psn_type == '16'">人员类别:居民(老年)</div>
58
+
59
+
60
+      <div style="width:50%">待遇类别:</div>
61
+    </div>
62
+    <div style="display:flex;padding:10px 0;border-top:1px solid #000;border-bottom:1px solid #000;">
63
+      <div style="width:50%;text-align:center;">项目名称</div>
64
+      <div style="width:10%;text-align:center;">单价</div>
65
+      <div style="width:10%;text-align:center;">数量</div>
66
+      <div style="width:10%;text-align:center;">金额</div>
67
+      <div style="width:10%;text-align:center;">门诊目录</div>
68
+      <div style="width:10%;text-align:center;">医保目录</div>
69
+    </div>
70
+    <div style="border-bottom:1px solid #000;padding:10px 0;display:flex;" v-for="(item,index) in info.order_infos"
71
+         :key="index">
72
+      <div style="width:50%;text-align:center;" v-if="item.advice_id > 0">{{item.advice.drug.drug_name}}</div>
73
+      <div style="width:50%;text-align:center;" v-if="item.project_id > 0">{{item.project.project.project_name}}</div>
74
+
75
+      <div style="width:10%;text-align:center;">{{item.pric}}</div>
76
+      <div style="width:10%;text-align:center;">{{item.cnt}}</div>
77
+      <div style="width:10%;text-align:center;">{{item.det_item_fee_sumamt}}</div>
78
+      <div style="width:10%;text-align:center;">是</div>
79
+      <div style="width:10%;text-align:center;">是</div>
80
+    </div>
81
+    <div style="display:flex;border-bottom:1px solid #000;padding:20px 0 10px;">
82
+      <div style="width:70%;">合计:</div>
83
+      <div style="width:10%;text-align:center;">{{info.medfee_sumamt}}</div>
84
+      <div style="width:20%;"></div>
85
+    </div>
86
+    <div>医保基金支付金额:{{info.fund_pay_sumamt?info.fund_pay_sumamt:''}}</div>
87
+    <div>个人现金支付金额:{{info.psn_pay?info.psn_pay:''}}</div>
88
+    <div>其中</div>
89
+    <div style="display:flex;border-bottom:1px solid #000;padding-bottom:10px;">
90
+      <div>个人自付:</div>
91
+      <div>其中:1.乙类自付 {{info.preselfpay_amt?info.preselfpay_amt:''}}</div>
92
+      <div>2.自费 {{info.overlmt_selfpay?info.overlmt_selfpay:''}}</div>
93
+    </div>
94
+    <div style="display:flex;padding-top:10px;">
95
+      <div style="width:33%">参保人签名:</div>
96
+      <div style="width:33%">审核人:</div>
97
+      <div style="width:33%">医院盖章:</div>
98
+    </div>
99
+
100
+  </div>
101
+</template>
102
+<script>
103
+  import {uParseTime} from '@/utils/tools'
104
+  export default {
105
+    props: {
106
+      info: {
107
+        type: Object,
108
+        default: function () {
109
+          return {}
110
+        }
111
+      }, p_admin: {
112
+        type: Object,
113
+        default: function () {
114
+          return {}
115
+        }
116
+      }, charge_admin: {
117
+        type: Object,
118
+        default: function () {
119
+          return {}
120
+        }
121
+      }
122
+    }, methods: {
123
+      getTime(val) {
124
+        if (val < 0) {
125
+          return ""
126
+        }
127
+        if (val == "") {
128
+          return ""
129
+        } else {
130
+          return uParseTime(val, '{y}-{m}-{d}')
131
+        }
132
+      },
133
+        getNowTime: function () {
134
+          let dateTime;
135
+          let yy = new Date().getFullYear();
136
+          let mm = new Date().getMonth() + 1;
137
+          let dd = new Date().getDate();
138
+          let hh = new Date().getHours();
139
+          let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
140
+            :
141
+            new Date().getMinutes();
142
+          let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
143
+            :
144
+            new Date().getSeconds();
145
+          dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
146
+          return dateTime
147
+        }
148
+      ,
149
+
150
+      }
151
+    }
152
+
153
+
154
+</script>
155
+
156
+
157
+<style lang="scss" scoped>
158
+  .statement-print {
159
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
160
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
161
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
162
+    margin-bottom: 20px;
163
+    padding: 20px 10px;
164
+  }
165
+
166
+  .statementTitle {
167
+    font-size: 28px;
168
+    text-align: center;
169
+    font-weight: bold;
170
+    margin-bottom: 10px;
171
+  }
172
+
173
+  .statementTable {
174
+    width: 100%;
175
+    text-align: center;
176
+    border-collapse: collapse;
177
+    line-height: 40px;
178
+    font-size: 14px;
179
+    border-color: #000;
180
+  }
181
+</style>

+ 576 - 0
src/xt_pages/hospitalStation/summary.vue View File

@@ -0,0 +1,576 @@
1
+<template>
2
+  <div class="main-contain outpatientChargesManagement">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8
+        <div>
9
+          <el-input size="small" style="width:150px;" v-model="keywords"
10
+                    class="filter-item"/>
11
+          <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
12
+                     @click="searchAction">
13
+            搜索
14
+          </el-button>
15
+          <el-select size="small" v-model="admin_user_id" placeholder="请选择"
16
+                     style="width:150px;margin-left:10px;" @change="changeDoctor">
17
+            <el-option
18
+              label="全部"
19
+              value="0">
20
+            </el-option>
21
+            <el-option
22
+              v-for="item,index in doctors"
23
+              :key="index"
24
+              :label="item.user_name"
25
+              :value="item.admin_user_id">
26
+            </el-option>
27
+          </el-select>
28
+          <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
29
+                          @change="handleStartTimeChange" :editable="false" :clearable="false"
30
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
31
+                          format="yyyy-MM-dd"
32
+                          value-format="yyyy-MM-dd"
33
+                          align="right"></el-date-picker>
34
+
35
+          <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
36
+                          @change="handleEndTimeChange" :editable="false" :clearable="false"
37
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
38
+                          format="yyyy-MM-dd"
39
+                          value-format="yyyy-MM-dd"
40
+                          align="right"></el-date-picker>
41
+          <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
42
+          <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
43
+        </div>
44
+        <div>
45
+          <!-- <el-popover
46
+            placement="bottom"
47
+            width="210"
48
+            trigger="click">
49
+            <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
50
+            <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
51
+            <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
52
+
53
+          </el-popover> -->
54
+          <el-button size="small" type="primary" @click="export_detail" v-loading="loading">报表下载</el-button>
55
+        </div>
56
+      </div>
57
+      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
58
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
59
+                highlight-current-row>
60
+        <el-table-column
61
+          prop="date"
62
+          label="序号"
63
+          width="60"
64
+          align="center"
65
+          type="index"
66
+        >
67
+        </el-table-column>
68
+        <el-table-column align="center" prop="name" label="就诊号">
69
+          <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
70
+        </el-table-column>
71
+        <el-table-column align="center" prop="name" label="患者名字">
72
+          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
73
+        </el-table-column>
74
+        <!--<el-table-column align="center" prop="name" label="患者类型">-->
75
+        <!--<template slot-scope="scope"></template>-->
76
+        <!--</el-table-column>-->
77
+        <el-table-column align="center" prop="name" label="应收金额">
78
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
79
+        </el-table-column>
80
+        <el-table-column align="center" prop="name" label="实收金额">
81
+          <template slot-scope="scope">{{scope.row.reality_price}}</template>
82
+        </el-table-column>
83
+        <el-table-column align="center" prop="name" label="科室">
84
+          <template slot-scope="scope">{{scope.row.department_name}}</template>
85
+        </el-table-column>
86
+        <el-table-column align="center" prop="name" label="收费日期">
87
+          <template slot-scope="scope"> {{scope.row.setl_time}}</template>
88
+        </el-table-column>
89
+        <el-table-column align="center" prop="name" label="收费员">
90
+          <template slot-scope="scope">{{ getName(scope.row.creator) }}</template>
91
+        </el-table-column>
92
+        <el-table-column align="center" prop="name" label="状态">
93
+          <template slot-scope="scope">
94
+            <div v-if="scope.row.order_status == 1">待结算</div>
95
+            <div v-if="scope.row.order_status == 2">已结算</div>
96
+            <div v-if="scope.row.order_status == 3">已退费</div>
97
+          </template>
98
+        </el-table-column>
99
+        <el-table-column align="center" prop="name" label="操作">
100
+          <template slot-scope="scope">
101
+            <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
102
+            <el-button size="mini" type="primary" @click="toPrint(scope.row)"
103
+                       v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9504) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 9919) ||  ($store.getters.xt_user.org_id == 10106) ||  (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 4) || ($store.getters.xt_user.org_id == 9990) ">
104
+              结算单
105
+            </el-button>
106
+            <el-button size="mini" type="primary" @click="toRefund(scope.row)"
107
+                       v-if="(scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10106  || $store.getters.xt_user.org_id== 9990)">
108
+              退费
109
+            </el-button>
110
+            <el-button size="mini" type="primary" @click="uploadInfo(scope.row)"
111
+                       v-if="scope.row.order_status == 2 && scope.row.result.id == 0">
112
+              上传结算清单
113
+            </el-button>
114
+            <el-button size="mini" type="primary" @click="invoicePrint(scope.row)">打印发票</el-button>
115
+
116
+          </template>
117
+        </el-table-column>
118
+      </el-table>
119
+      <el-pagination
120
+        @size-change="handleSizeChange"
121
+        @current-change="handleCurrentChange"
122
+        :page-sizes="[10, 50, 100]"
123
+        :page-size="10"
124
+        background
125
+        style="margin-top:20px;float: right"
126
+        layout="total, sizes, prev, pager, next, jumper"
127
+        :total="total"
128
+
129
+      >
130
+      </el-pagination>
131
+    </div>
132
+
133
+    <el-dialog
134
+      class="centerDialog"
135
+      width="1200px"
136
+      title="打印"
137
+      :visible.sync="statementVisible">
138
+      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
139
+      <new-statement-print ref="print" :paramsObj='orderObj'></new-statement-print>
140
+    </el-dialog>
141
+    <el-dialog
142
+      class="centerDialog"
143
+      width="900px"
144
+      title="打印"
145
+      :visible.sync="listVisible">
146
+      <listPrint></listPrint>
147
+    </el-dialog>
148
+    <el-dialog
149
+      class="centerDialog"
150
+      width="900px"
151
+      title="打印"
152
+      :visible.sync="allListVisible">
153
+      <allListPrint :paramsObj='paramsObj'></allListPrint>
154
+    </el-dialog>
155
+
156
+    <el-dialog
157
+      class="centerDialog"
158
+      width="1200px"
159
+      title="打印"
160
+      :visible.sync="statementVisible9504">
161
+      <!--<statementPrint ref="print" :paramsObj='orderObj'></statementPrint>-->
162
+      <!--<new-statement-print ref="print" :paramsObj='orderObj9504'></new-statement-print>-->
163
+      <new-statement-print-two ref="print" :paramsObj='orderObj9504'></new-statement-print-two>
164
+    </el-dialog>
165
+
166
+        <el-dialog
167
+                class="centerDialog"
168
+                width="1200px"
169
+                title="打印"
170
+                :visible.sync="invoiceVisible">
171
+            <invoice-print ref="print" :invoiceParams='invoiceParams'></invoice-print>
172
+        </el-dialog>
173
+        <!-- <el-dialog
174
+                class="centerDialog"
175
+                width="1200px"
176
+                title="打印"
177
+                :visible.sync="settlementVisible">
178
+            <settlement-print ref="print" :paramsObj='orderObj'></settlement-print>
179
+        </el-dialog> -->
180
+
181
+
182
+  </div>
183
+</template>
184
+
185
+
186
+<script>
187
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
188
+  import { getDoctorList, getExportConsumeDetailList, getHisOrderList, Refund} from '@/api/his/his'
189
+  import { uParseTime } from '@/utils/tools'
190
+  import NewStatementPrint from './newStatementPrint'
191
+  import listPrint from './listPrint'
192
+  import allListPrint from './allListPrint'
193
+  import NewStatementPrintTwo from './newStatementPrintTwo'
194
+  import { fetchAllAdminUsers } from '@/api/doctor'
195
+  import axios from 'axios'
196
+  import invoicePrint from './invoicePrint'
197
+  // import settlementPrint from './settlementPrint'
198
+
199
+  export default {
200
+    components: {
201
+      NewStatementPrintTwo,
202
+      NewStatementPrint,
203
+      BreadCrumb,
204
+      listPrint,
205
+      allListPrint,
206
+      invoicePrint,
207
+      // settlementPrint
208
+    },
209
+    data() {
210
+      return {
211
+        orderObj: {},
212
+        statementVisible: false,
213
+        statementVisible9504: false,
214
+        orderObj9504: {},
215
+        crumbs: [
216
+          { path: false, name: '门诊收费' },
217
+          { path: false, name: '项目消费明细汇总' }
218
+        ],
219
+        tableData: [],
220
+        limit: 10,
221
+        page: 1,
222
+        keywords: '',
223
+        start_time: '',
224
+        end_time: '',
225
+        total: '',
226
+        doctors: [],
227
+        admin_user_id: '',
228
+        listVisible: false,
229
+        allListVisible: false,
230
+        adminUserOptions:[],
231
+        invoiceVisible:false,
232
+        paramsObj:{},
233
+        invoiceParams:{},
234
+        settlementVisible:false
235
+
236
+      }
237
+    },
238
+    methods: {
239
+      uploadInfo(row) {
240
+        var that = this;
241
+        axios.get('http://127.0.0.1:9532/api/settlelist/get', {
242
+          params: {
243
+            order_id: row.id,
244
+            admin_user_id: this.$store.getters.xt_user.user.id
245
+          }
246
+        }).then(function (response) {
247
+            if (response.data.state == 0) {
248
+              that.$message.error(response.data.msg);
249
+              return false
250
+            } else {
251
+
252
+              if (response.data.data.failed_code == -10) {
253
+                that.$message.error(response.data.data.msg)
254
+
255
+              } else {
256
+                that.$message.success("上传成功");
257
+                row.result.id = response.data.data.result.id
258
+              }
259
+
260
+
261
+            }
262
+          }).catch(function (error) {
263
+          })
264
+      },
265
+      fetchAllAdminUsers() {
266
+        fetchAllAdminUsers().then(response => {
267
+          if (response.data.state == 1) {
268
+            this.adminUserOptions = response.data.data.users
269
+
270
+          }
271
+        })
272
+      },
273
+      getName(admin_user_id) {
274
+        for (let i = 0; i < this.adminUserOptions.length; i++) {
275
+          if (this.adminUserOptions[i].id == admin_user_id) {
276
+            return this.adminUserOptions[i].name
277
+          }
278
+        }
279
+
280
+      }, toRefund(row) {
281
+        if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9538 || this.$store.getters.xt_user.org_id == 9671 || this.$store.getters.xt_user.org_id == 9674 || this.$store.getters.xt_user.org_id == 10106 || this.$store.getters.xt_user.org_id == 9990) {
282
+          var that = this;
283
+          this.$confirm('是否退费', '退费', {
284
+            confirmButtonText: '确 定',
285
+            cancelButtonText: '取 消',
286
+            type: 'warning'
287
+          }).then(() => {
288
+            let params = {
289
+              'order_id': row.id,
290
+              'patient_id': row.patient_id,
291
+              'record_time': that.getTimes(row.settle_accounts_date),
292
+              'admin_user_id': that.$store.getters.xt_user.user.id,
293
+            };
294
+            axios.get('http://127.0.0.1:9532/api/refund/post', {
295
+              params: params
296
+            })
297
+              .then(function (response) {
298
+                if (response.data.state == 0) {
299
+                  that.$message.error(response.data.msg);
300
+                  return false
301
+                } else {
302
+                  if (response.data.data.failed_code == -10) {
303
+                    that.$message.error(response.data.data.msg)
304
+                  } else {
305
+                    that.$message({message: '退费成功', type: 'success', duration: 5000});
306
+                    that.getHisOrderList()
307
+
308
+                  }
309
+                }
310
+              })
311
+              .catch(function (error) {
312
+              })
313
+          }).catch(() => {
314
+          })
315
+
316
+        } else {
317
+          this.$confirm('是否退费', '退费', {
318
+            confirmButtonText: '确 定',
319
+            cancelButtonText: '取 消',
320
+            type: 'warning'
321
+          }).then(() => {
322
+            let params = {
323
+              'order_id': this.order.id,
324
+              'patient_id': this.patientInfo.id,
325
+              'record_time': this.record_date
326
+
327
+            };
328
+            Refund(params).then(response => {
329
+              if (response.data.state == 0) {
330
+                this.$message.error(response.data.msg);
331
+                return false
332
+              } else {
333
+                this.$message({message: '退费成功', type: 'success'});
334
+                this.getHisOrderList()
335
+              }
336
+            })
337
+          }).catch(() => {
338
+          })
339
+        }
340
+      },
341
+      toPrint(row) {
342
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
343
+          this.statementVisible9504 = true;
344
+          let obj = {
345
+            order_id: row.id,
346
+            patient_id: row.patient_id,
347
+            record_time: this.getTimes(row.settle_accounts_date),
348
+            admin_user_id: this.$store.getters.xt_user.user.id
349
+          };
350
+          this.orderObj9504 = obj
351
+        } else {
352
+          this.statementVisible = true;
353
+          let obj = {
354
+            order_id: row.id
355
+          };
356
+          this.orderObj = obj
357
+        }
358
+
359
+      },
360
+      settlementPrint(){
361
+        this.settlementVisible = true
362
+      },
363
+      export_detail() {
364
+        let params = {
365
+          start_time: this.start_time,
366
+          end_time: this.end_time
367
+        };
368
+        getExportConsumeDetailList(params).then(response => {
369
+          if (response.data.state == 0) {
370
+            this.$message.error(response.data.msg);
371
+            return false
372
+          } else {
373
+
374
+            let list = [];
375
+            for (let i = 0; i < response.data.data.order.length; i++) {
376
+              let order = response.data.data.order[i];
377
+              let number = '';
378
+              let name = '';
379
+              let department = '';
380
+              let doctor_name = '';
381
+              let balance_accounts = '';
382
+
383
+              let order_status = '';
384
+
385
+              if (order.his_patient != null && order.his_patient.number.length > 0) {
386
+                number = order.his_patient.number
387
+
388
+              }
389
+
390
+              if (order.his_patient != null) {
391
+                if (order.his_patient.balance_accounts_type == 1) {
392
+                  balance_accounts = '自费'
393
+                }
394
+
395
+                if (order.his_patient.balance_accounts_type == 2) {
396
+                  balance_accounts = '医保'
397
+                }
398
+              }
399
+
400
+              if (order.patient != null && order.patient.name.length > 0) {
401
+                name = order.patient.name
402
+
403
+              }
404
+
405
+              if (order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0) {
406
+                department = order.p_info.department.name
407
+
408
+              }
409
+
410
+              if (order.p_info != null && order.p_info.doctor.length > 0) {
411
+                doctor_name = order.p_info.doctor
412
+              }
413
+
414
+              if (order.creator != null) {
415
+                charge_name = this.getName(order.creator)
416
+              }
417
+
418
+
419
+              if (order.order_status == 1) {
420
+                order_status = '待结算'
421
+              }
422
+
423
+              if (order.order_status == 2) {
424
+                order_status = '已结算'
425
+              }
426
+
427
+              if (order.order_status == 3) {
428
+                order_status = '已退费'
429
+              }
430
+
431
+
432
+              let obj = {
433
+                '就诊号': number,
434
+                '患者姓名': name,
435
+                '应收金额': order.medfee_sumamt,
436
+                '实收金额': order.psn_cash_pay,
437
+                '医保统筹金额': order.fund_pay_sumamt,
438
+                '大额基金金额': order.hifob_pay,
439
+                '大病基金金额': order.hifmi_pay,
440
+                '补充保险基金金额': order.hifes_pay,
441
+                '医疗救助基金金额': order.maf_pay,
442
+                '公务员基金': order.cvlserv_pay,
443
+                '个人支付基金': order.psn_cash_pay,
444
+                '个人账户支付金额': order.acct_pay,
445
+                '科室': department,
446
+                '医生姓名': doctor_name,
447
+                '收费类别': balance_accounts,
448
+                '收费者姓名': charge_name,
449
+                '总金额': order.medfee_sumamt,
450
+                '现金支付': '',
451
+                '账户支付': '',
452
+                '支付宝支付': '',
453
+                '微信支付': '',
454
+                '其他支付': '',
455
+                '收费时间': order.setl_time,
456
+                '收费状态': order_status,
457
+                '退费日期': ''
458
+              };
459
+              list.push(obj)
460
+            }
461
+            import('@/vendor/Export2Excel').then(excel => {
462
+              const tHeader = ['就诊号', '患者姓名', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期'];
463
+              const filterVal = ['就诊号', '患者姓名', '应收金额', '实收金额', '医保统筹金额', '大额基金金额', '大病基金金额', '补充保险基金金额', '医疗救助基金金额', '公务员基金', '个人支付基金', '个人账户支付金额', '科室', '医生姓名', '收费类别', '收费者姓名', '总金额', '现金支付', '账户支付', '支付宝支付', '微信支付', '其他支付', '收费时间', '收费状态', '退费日期'];
464
+              const data = this.formatJson(filterVal, list);
465
+              excel.export_json_to_excel({
466
+                header: tHeader,
467
+                data,
468
+                filename: '消费明细'
469
+              })
470
+            })
471
+
472
+          }
473
+        })
474
+
475
+      }, formatJson(filterVal, jsonData) {
476
+        return jsonData.map(v => filterVal.map(j => v[j]))
477
+      },
478
+      changeDoctor() {
479
+        this.page = 1;
480
+        this.keywords = '';
481
+        this.getHisOrderList()
482
+      },
483
+      handleSizeChange(limit) {
484
+        this.limit = limit;
485
+        this.getHisOrderList()
486
+
487
+      }, handleCurrentChange(page) {
488
+        this.page = page;
489
+        this.getHisOrderList()
490
+
491
+      },
492
+      handleStartTimeChange() {
493
+        this.page = 1;
494
+        this.keywords = '';
495
+        this.getHisOrderList()
496
+      }, handleEndTimeChange() {
497
+        this.page = 1;
498
+        this.keywords = '';
499
+        this.getHisOrderList()
500
+      },
501
+      searchAction() {
502
+        this.page = 1;
503
+        this.getHisOrderList()
504
+
505
+      },
506
+      getTimes(time) {
507
+        return uParseTime(time, '{y}-{m}-{d}')
508
+      },
509
+      toDetail(row) {
510
+        this.$router.push('/outpatientCharges/summaryDetail?patient_id=' + row.patient.id + '&number=' + row.number + '&id=' + row.id)
511
+      }, getTime(value, temp) {
512
+        if (value != undefined) {
513
+          return uParseTime(value, temp)
514
+        }
515
+        return ''
516
+      }, getHisOrderList() {
517
+        let params = {
518
+          page: this.page,
519
+          limit: this.limit,
520
+          keywords: this.keywords,
521
+          start_time: this.start_time,
522
+          end_time: this.end_time,
523
+          type: this.admin_user_id
524
+        };
525
+        getHisOrderList(params).then(response => {
526
+          if (response.data.state == 0) {
527
+            this.$message.error(response.data.msg);
528
+            return false
529
+          } else {
530
+            this.tableData = response.data.data.order;
531
+            this.total = response.data.data.total
532
+          }
533
+        })
534
+
535
+      }, getDoctorList() {
536
+        getDoctorList().then(response => {
537
+          if (response.data.state == 0) {
538
+            this.$message.error(response.data.msg);
539
+            return false
540
+          } else {
541
+            this.doctors = response.data.data.doctors
542
+          }
543
+        })
544
+      },
545
+      open(index) {
546
+        if (index == 1) {
547
+          this.listVisible = true
548
+        } else if (index == 2) {
549
+          this.allListVisible = true
550
+        }
551
+      },
552
+      invoicePrint(obj){
553
+        console.log(obj);
554
+        let paramsObj = {
555
+          order_id: obj.id,
556
+          patient_id: obj.patient_id,
557
+          name:obj.patient.name,
558
+          age:obj.age,
559
+          gend:obj.gend,
560
+          setl_time:obj.setl_time
561
+        };
562
+        this.invoiceParams = paramsObj;
563
+        this.invoiceVisible = true
564
+      }
565
+    }, created() {
566
+
567
+
568
+      this.fetchAllAdminUsers();
569
+      this.getDoctorList();
570
+      this.getHisOrderList()
571
+
572
+
573
+
574
+    }
575
+  }
576
+</script>

+ 652 - 0
src/xt_pages/hospitalStation/summaryDetail.vue View File

@@ -0,0 +1,652 @@
1
+<template>
2
+    <div class="main-contain summaryDetail">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
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>
15
+        <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
16
+            <div class="mainCenter">
17
+                <div class="centerLeft">
18
+                    <div class="tabsBox">
19
+                      <el-table  :data="tableData" border style="width: 100%;"
20
+                                :row-style="{ color: '#303133' }"
21
+                                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
22
+
23
+                        <el-table-column align="center" prop="project_name" label="名称">
24
+                          <template slot-scope="scope">{{ scope.row.name }}</template>
25
+                        </el-table-column>
26
+
27
+                        <el-table-column align="center" prop="project_name" label="分类" width="100">
28
+                          <template slot-scope="scope">{{ scope.row.type == 1?'药品':'项目' }}</template>
29
+                        </el-table-column>
30
+
31
+
32
+                        <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
33
+                          <template slot-scope="scope">{{scope.row.single_dose}}&nbsp;&nbsp;{{scope.row.single_dose_unit}}</template>
34
+
35
+                        </el-table-column>
36
+                        <el-table-column align="center" prop="delivery_way" width="90" label="用法">
37
+                          <template slot-scope="scope">
38
+                            <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
39
+                            {{scope.row.delivery_way}}
40
+
41
+                          </template>
42
+                        </el-table-column>
43
+                        <el-table-column align="center" prop="execution_frequency" width="90" label="频率">
44
+                          <template slot-scope="scope">{{scope.row.execution_frequency}}</template>
45
+                        </el-table-column>
46
+                        <el-table-column align="center" prop="number_days" width="60" label="天数">
47
+                          <template slot-scope="scope">
48
+                            <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
49
+                            {{scope.row.day}}天
50
+
51
+                          </template>
52
+                        </el-table-column>
53
+                        <el-table-column align="center" prop="total" width="60" label="总量">
54
+                          <template slot-scope="scope">{{scope.row.count}}&nbsp;&nbsp;{{scope.row.prescribing_number_unit}}</template>
55
+                        </el-table-column>
56
+                        <el-table-column align="center" prop="name" width="60" label="单价">
57
+                          <template slot-scope="scope">
58
+                            <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
59
+                            {{scope.row.price}}元
60
+
61
+                          </template>
62
+                        </el-table-column>
63
+
64
+                          <el-table-column align="center" prop="name" width="60" label="总价">
65
+                              <template slot-scope="scope">
66
+                                  <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
67
+                                  {{scope.row.price}}元
68
+
69
+                              </template>
70
+                          </el-table-column>
71
+
72
+
73
+                        <el-table-column align="center" prop="name" width="80" label="备注">
74
+                          <template slot-scope="scope">
75
+                            <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
76
+                            {{scope.row.remark}}
77
+
78
+                          </template>
79
+                        </el-table-column>
80
+                      </el-table>
81
+
82
+                      <div class="additionalBox">
83
+                        <div class="additionalOne" v-for="(item,index) in additions" :key="index">
84
+                          <span :title="item.item_name">{{item.item_name}}</span>
85
+                          <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
86
+                          共
87
+                          <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
88
+                          次
89
+                          <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
90
+                        </div>
91
+                      </div>
92
+
93
+                    </div>
94
+                    <div class="costBox">
95
+                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt}}元</span></span>
96
+                      <span v-if="order.order_status == 1">待结算</span>
97
+                      <span v-if="order.order_status == 2">已结算</span>
98
+                      <span v-if="order.order_status == 3">已退费</span>
99
+
100
+
101
+                    </div>
102
+                </div>
103
+                <div class="centerRight">
104
+                    <p class="centerRightTitle">人员信息</p>
105
+                    <ul class="basicUl">
106
+                        <li style="width:50%;">姓名:{{patientInfo.name}}</li>
107
+                        <li style="width:50%;">性别:{{patientInfo.gender == 1 ? '男' : '女' }}</li>
108
+                        <li style="width:50%;">年龄:{{patientInfo.age }}</li>
109
+                        <li style="width:50%;">身高:{{patientInfo.height?patientInfo.height:''}}</li>
110
+                        <li style="width:50%;">体重:{{patientInfo.weight?patientInfo.weight:''}}</li>
111
+                        <li style="width:50%;">电话:{{patientInfo.phone}}</li>
112
+                    </ul>
113
+                    <p class="centerRightTitle" style="margin-top:10px;">收费信息</p>
114
+                    <ul class="basicUl">
115
+                        <li style="width:50%;">应收金额:{{order.medfee_sumamt }}元</li>
116
+                        <li style="width:50%;">实收金额:{{order.reality_price}}元</li>
117
+                        <li style="width:50%;">舍入金额:{{order.medfee_sumamt - order.reality_price}}元</li>
118
+                        <li style="width:50%;">优惠金额:{{order.preferential_price}}元</li>
119
+                        <li style="width:50%;">总金额</li>
120
+                        <li style="width:50%;">{{order.medfee_sumamt}}元</li>
121
+                    </ul>
122
+                    <!--<p class="centerRightTitle">发票费用</p>-->
123
+                    <!--<ul class="basicUl">-->
124
+                        <!--<li style="width:100%;">西药费:0.00元</li>-->
125
+                    <!--</ul>-->
126
+                </div>
127
+            </div>
128
+        </div>
129
+
130
+      <div v-if="listVisible">
131
+      <el-dialog
132
+        class="centerDialog"
133
+        width="900px"
134
+        title="打印"
135
+        :visible.sync="listVisible">
136
+        <list-print  :paramsObj='paramsObj'></list-print>
137
+      </el-dialog>
138
+      </div>
139
+
140
+      <div v-if="allListVisible">
141
+      <el-dialog
142
+        class="centerDialog"
143
+        width="900px"
144
+        title="打印"
145
+        :visible.sync="allListVisible">
146
+        <all-list-print :paramsObj='paramsObj'></all-list-print>
147
+      </el-dialog>
148
+      </div>
149
+
150
+
151
+    </div>
152
+</template>
153
+
154
+
155
+<script>
156
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
157
+import { getHisOrder } from '@/api/his/his'
158
+import prescriptionTable from './components/prescriptionTable'
159
+import { getDictionaryDataConfig} from "@/utils/data";
160
+import ListPrint from './listPrint'
161
+import AllListPrint from './allListPrint'
162
+
163
+export default {
164
+    components:{
165
+      AllListPrint,
166
+      ListPrint,
167
+        BreadCrumb,
168
+      prescriptionTable,
169
+
170
+    },
171
+    data(){
172
+        return{
173
+          listVisible:false,
174
+          allListVisible:false,
175
+          paramsObj:{
176
+            id:this.$route.query.id
177
+          },
178
+            crumbs: [
179
+                { path: false, name: '门诊收费' },
180
+                { path: false, name: '项目消费明细汇总详情' }
181
+            ],
182
+          info: {},
183
+          curPrescriptions: {},
184
+          prescriptions: [],
185
+          record_date: '',
186
+          tableData: [],
187
+          additions:[],
188
+          editableTabsValue: '1',
189
+          loadingone: false,
190
+          editableTabs: [{
191
+            title: '处方1',
192
+            name: '1'
193
+          }],
194
+          tabIndex: 1,
195
+          hisPatientInfo: {},
196
+          loadingtwo: false,
197
+          patientTableData: [{
198
+            name: '杨美英',
199
+            mdtrt_id: '1709946'
200
+          }],
201
+          patientInfo: { id: 0 },
202
+          doctor: {},
203
+          total: 0,
204
+          state: '未收费',
205
+          radio: 1,
206
+          radioStatus: 1,
207
+          search_input: '',
208
+          order:{},
209
+        }
210
+    },created(){
211
+      this.GetOrderDetail()
212
+  },methods:{
213
+      open(val){
214
+        if(val == 1){
215
+          this.paramsObj.id == this.$route.query.id;
216
+          this.listVisible = true
217
+
218
+        }else if(val == 2){
219
+          this.paramsObj.id == this.$route.query.id;
220
+          this.allListVisible = true
221
+        }
222
+      },
223
+    // getTotal() {
224
+    //   var total = 0
225
+    //   for (let i = 0; i < this.prescriptions.length; i++) {
226
+    //     if (this.prescriptions[i].advices != null) {
227
+    //       for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
228
+    //         console.log(this.prescriptions[i].advices[a].price )
229
+    //         console.log(this.prescriptions[i].advices[a].prescribing_number)
230
+    //
231
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number)
232
+    //       }
233
+    //     }
234
+    //     if (this.prescriptions[i].project != null) {
235
+    //       for (let a = 0; a < this.prescriptions[i].project.length; a++) {
236
+    //
237
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count)
238
+    //       }
239
+    //     }
240
+    //
241
+    //     if (this.prescriptions[i].addition != null) {
242
+    //       for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
243
+    //         total = parseFloat(total) + parseFloat(this.prescriptions[i].addition[a].price * this.prescriptions[i].addition[b].count)
244
+    //       }
245
+    //     }
246
+    //   }
247
+    //   return total.toFixed(2)
248
+    //
249
+    // },
250
+    getDictionaryDataConfig(module, filed_name) {
251
+      return getDictionaryDataConfig(module, filed_name)
252
+    },
253
+    tabclickEvent(val) {
254
+      for (let i = 0; i < this.prescriptions.length; i++) {
255
+        if (this.prescriptions[i].name == val.name) {
256
+          this.curPrescriptions = {};
257
+          var temp = this.deepClone(this.prescriptions[i]);
258
+          this.curPrescriptions = temp
259
+        }
260
+      }
261
+    },
262
+    deepClone(source) {
263
+      if (!source && typeof source !== 'object') {
264
+        throw new Error('error arguments', 'shallowClone')
265
+      }
266
+      const targetObj = source.constructor === Array ? [] : {};
267
+      Object.keys(source).forEach((keys) => {
268
+        if (source[keys] && typeof source[keys] === 'object') {
269
+          targetObj[keys] = this.deepClone(source[keys])
270
+        } else {
271
+          targetObj[keys] = source[keys]
272
+        }
273
+      });
274
+      return targetObj
275
+    },  getGroup(id){
276
+      var name = "";
277
+      var statistics_category =  getDictionaryDataConfig('system','statistics_category');
278
+      for(let i=0;i<statistics_category.length;i++){
279
+        if(id == statistics_category[i].id){
280
+          name = statistics_category[i].name
281
+        }
282
+      }
283
+      return name
284
+    },
285
+    getTotal() {
286
+      var total = 0;
287
+      for (let i = 0; i < this.prescriptions.length; i++) {
288
+        if (this.prescriptions[i].advices != null) {
289
+          for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
290
+            total = total + this.prescriptions[i].advices[a].retail_price * this.prescriptions[i].advices[a].prescribing_number
291
+          }
292
+        }
293
+        if (this.prescriptions[i].project != null) {
294
+          for (let b = 0; b < this.prescriptions[i].project.length; b++) {
295
+            total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
296
+          }
297
+        }
298
+      }
299
+      return total
300
+    },
301
+    moreState(tab, event) {
302
+      if (tab == 'more') {
303
+        return false
304
+      }
305
+    },  unique(array) {
306
+      // res用来存储结果
307
+      var res = [];
308
+      for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
309
+        for (var j = 0, resLen = res.length; j < resLen; j++) {
310
+          if (array[i].id === res[j].id && array[i].price === res[j].price) {
311
+            break
312
+          }
313
+        }
314
+        // 如果array[i]是唯一的,那么执行完循环,j等于resLen
315
+        if (j === resLen) {
316
+          res.push(array[i])
317
+        }
318
+      }
319
+      return res
320
+    },
321
+    setMonthPrescription(month_prescriptions) {
322
+      console.log(month_prescriptions);
323
+      let drug_month_prescriptions = {
324
+        advices: []
325
+      };
326
+      let drug_ids = [];
327
+      let project_month_prescriptions = {
328
+        project: []
329
+
330
+      };
331
+      let project_ids = [];
332
+
333
+      let addition_month_prescriptions = {
334
+        addition: []
335
+
336
+      };
337
+      let additions_ids = [];
338
+
339
+      for (let i = 0; i < month_prescriptions.length; i++) {
340
+        if (month_prescriptions[i].type == 1) { //药品
341
+          for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
342
+            let obj = {
343
+              id: month_prescriptions[i].advices[a].drug_id,
344
+              price: month_prescriptions[i].advices[a].price
345
+
346
+            };
347
+            drug_ids.push(obj);
348
+            drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
349
+          }
350
+
351
+        } else if (month_prescriptions[i].type == 2) { //项目
352
+          for (let a = 0; a < month_prescriptions[i].project.length; a++) {
353
+            let obj = {
354
+              id: month_prescriptions[i].project[a].project_id,
355
+              price: month_prescriptions[i].project[a].price
356
+
357
+            };
358
+            project_ids.push(obj);
359
+            project_month_prescriptions.project.push(month_prescriptions[i].project[a])
360
+          }
361
+        }
362
+        //附加收费
363
+        for (let a = 0; a < month_prescriptions[i].addition.length; a++) {
364
+          let obj = {
365
+            id: month_prescriptions[i].addition[a].item_id,
366
+            price: month_prescriptions[i].addition[a].price
367
+
368
+          };
369
+          additions_ids.push(obj);
370
+          addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
371
+
372
+        }
373
+
374
+      }
375
+
376
+      drug_ids = this.unique(drug_ids);
377
+      project_ids= this.unique(project_ids);
378
+      additions_ids= this.unique(additions_ids);
379
+
380
+
381
+
382
+
383
+
384
+      for (let i = 0; i < drug_ids.length; i++) {
385
+        let obj = {};
386
+        let count = 0;
387
+        for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
388
+          if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
389
+            obj['name'] = drug_month_prescriptions.advices[a].advice_name;
390
+            obj['statistical_classification'] = '';
391
+            obj['type'] = 1;
392
+            obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose;
393
+            obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way;
394
+            obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency;
395
+            obj['day'] = drug_month_prescriptions.advices[a].day;
396
+            obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit;
397
+            obj['remark'] = drug_month_prescriptions.advices[a].remark;
398
+            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price);
399
+            count = count + drug_month_prescriptions.advices[a].prescribing_number
400
+
401
+          }
402
+        }
403
+        obj['count'] = count;
404
+        this.tableData.push(obj)
405
+      }
406
+
407
+      for (let i = 0; i < project_ids.length; i++) {
408
+        let obj = {};
409
+        let count = 0;
410
+        for (let a = 0; a < project_month_prescriptions.project.length; a++) {
411
+          if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
412
+            obj['name'] = project_month_prescriptions.project[a].project.project_name;
413
+            obj['statistical_classification'] = '';
414
+            obj['single_dose'] = project_month_prescriptions.project[a].single_dose;
415
+            obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way;
416
+            obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency;
417
+            obj['day'] = project_month_prescriptions.project[a].day;
418
+            obj['single_dose_unit'] = project_month_prescriptions.project[a].unit;
419
+            obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit;
420
+            count = count + project_month_prescriptions.project[a].count;
421
+            obj['price'] = parseFloat(project_month_prescriptions.project[a].price);
422
+            obj['remark'] = project_month_prescriptions.project[a].remark;
423
+            obj['type'] = 2
424
+
425
+
426
+          }
427
+        }
428
+        obj['count'] = count;
429
+        this.tableData.push(obj)
430
+
431
+      }
432
+
433
+      for (let i = 0; i < additions_ids.length; i++) {
434
+        let obj = {};
435
+        let count = 0;
436
+        console.log(addition_month_prescriptions.addition);
437
+        if (addition_month_prescriptions.addition) {
438
+          for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
439
+            if (additions_ids[i].price == addition_month_prescriptions.addition[a].price &&additions_ids[i].id == addition_month_prescriptions.addition[a].item_id) {
440
+              obj['item_name'] = addition_month_prescriptions.addition[a].item_name;
441
+              count = count + addition_month_prescriptions.addition[a].count;
442
+              obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)
443
+            }
444
+          }
445
+          obj['count'] = count;
446
+          this.additions.push(obj)
447
+
448
+        }
449
+      }
450
+
451
+    },
452
+
453
+    GetOrderDetail(){
454
+      let params={
455
+        number:this.$route.query.number,
456
+        patient_id:this.$route.query.patient_id,
457
+      };
458
+      getHisOrder(params).then(response => {
459
+        if (response.data.state == 0) {
460
+          this.$message.error(response.data.msg);
461
+          return false
462
+        } else {
463
+          this.patientInfo = response.data.data.order.patient;
464
+          this.hisPatientInfo = response.data.data.order.his_patient;
465
+          this.info = response.data.data.p_info;
466
+          this.order = response.data.data.order;
467
+
468
+          this.prescriptions = [];
469
+          this.tableData = [];
470
+
471
+
472
+          var prescription = response.data.data.prescription;
473
+          this.prescriptions = prescription;
474
+          this.setMonthPrescription(prescription)
475
+
476
+
477
+          // for (let i = 0; i < response.data.data.prescription.length; i++) {
478
+          //   var prescription = response.data.data.prescription[i]
479
+
480
+
481
+            // for (let b = 0; b < prescription.advices.length; b++) {
482
+            //   let obj = {
483
+            //     name: prescription.advices[b].advice_name,
484
+            //     statistical_classification:"",
485
+            //     type:1,
486
+            //     single_dose: prescription.advices[b].single_dose,
487
+            //     delivery_way: prescription.advices[b].delivery_way,
488
+            //     execution_frequency: prescription.advices[b].execution_frequency,
489
+            //     price: prescription.advices[b].price.toString(),
490
+            //     day: prescription.advices[b].day,
491
+            //     count:prescription.advices[b].prescribing_number.toString(),
492
+            //     remark: prescription.advices[b].remark,
493
+            //     single_dose_unit: prescription.advices[b].single_dose_unit,
494
+            //     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
495
+            //
496
+            //   }
497
+            //   this.tableData.push(obj)
498
+            // }
499
+            //
500
+            // for (let b = 0; b < prescription.project.length; b++) {
501
+            //   let obj = {
502
+            //     name: prescription.project[b].project.project_name,
503
+            //     statistical_classification: prescription.project[b].project.statistical_classification,
504
+            //     single_dose: prescription.project[b].single_dose,
505
+            //     delivery_way: prescription.project[b].delivery_way,
506
+            //     execution_frequency: prescription.project[b].execution_frequency,
507
+            //     price: prescription.project[b].price,
508
+            //     day: prescription.project[b].day,
509
+            //     count: prescription.project[b].count.toString(),
510
+            //     remark: prescription.project[b].remark,
511
+            //     single_dose_unit:prescription.project[b].project.unit,
512
+            //     prescribing_number_unit:prescription.project[b].project.unit,
513
+            //     type:2,
514
+            //   }
515
+            //   this.tableData.push(obj)
516
+            // }
517
+            //
518
+            // for (let b = 0; b < prescription.addition.length; b++) {
519
+            //     this.additions.push( prescription.addition[b])
520
+            // }
521
+
522
+
523
+
524
+            // let index = i + 1
525
+            // let obj = {
526
+            //   id: prescription.id,
527
+            //   name: '处方' + index,
528
+            //   advices: tempAdvice,
529
+            //   project: tempProject,
530
+            //   type: response.data.data.prescription[i].type
531
+            // }
532
+            // this.prescriptions.push(obj)
533
+            // this.curPrescriptions = this.prescriptions[0]
534
+
535
+          // }
536
+          // this.tableData = response.data.data.order
537
+
538
+        }
539
+      })
540
+    }
541
+  }
542
+}
543
+</script>
544
+
545
+<style lang="scss" scoped>
546
+.summaryDetail{
547
+    height: 100%;
548
+    display: flex;
549
+    flex-direction: column;
550
+    .tabsBox{
551
+        position: relative;
552
+        height: 90%;
553
+        overflow-y: auto;
554
+        margin-bottom: 60px;
555
+        .el-tabs__item{
556
+            padding: 0 10px;
557
+        }
558
+    }
559
+    .addTab{
560
+        position: absolute;
561
+        right: 0;
562
+        top: 6px;
563
+        z-index: 20;
564
+    }
565
+    .mainCenter{
566
+        display: flex;
567
+        flex:1;
568
+    }
569
+    .costBox{
570
+        width:100%;
571
+        height:60px;
572
+        background:#fff;
573
+        position: absolute;
574
+        bottom:0;
575
+        display: flex;
576
+        justify-content: space-between;
577
+        align-items: center;
578
+    }
579
+    .centerLeft{
580
+        flex: 1;
581
+        display: flex;
582
+        flex-direction: column;
583
+        position: relative;
584
+    }
585
+    .centerRight{
586
+        width: 300px;
587
+        margin-left: 5px;
588
+        display: flex;
589
+        flex-direction: column;
590
+    }
591
+    .RP{
592
+        color:#409EFF;
593
+        font-size: 20px;
594
+        margin-bottom: 5px;
595
+    }
596
+    .centerRightTitle{
597
+        color:#409EFF;
598
+        padding:0 0 10px 0;
599
+    }
600
+    .basicUl{
601
+        border-top: 1px solid #e5e5e5;
602
+        border-left: 1px solid #e5e5e5;
603
+        display: flex;
604
+        flex-wrap: wrap;
605
+        li{
606
+            border-bottom: 1px solid #e5e5e5;
607
+            border-right: 1px solid #e5e5e5;
608
+            width: 100%;
609
+            height: 38px;
610
+            line-height: 38px;
611
+            text-indent: 5px;
612
+            font-size: 14px;
613
+        }
614
+    }
615
+    .additionalBox{
616
+      margin-top: 20px;
617
+      display: flex;
618
+      flex-wrap: wrap;
619
+      .additionalOne{
620
+        margin-right:20px;
621
+        margin-bottom:10px;
622
+        display: flex;
623
+        align-items: center;
624
+        >span{
625
+          white-space: nowrap;
626
+          overflow: hidden;
627
+          text-overflow: ellipsis;
628
+          width:80px;
629
+          display: inline-block;
630
+          font-size: 14px;
631
+        }
632
+      }
633
+      .deleteIcon{
634
+        color:red;
635
+        margin-left:5px;
636
+      }
637
+    }
638
+}
639
+</style>
640
+
641
+<style lang="scss">
642
+.summaryDetail{
643
+    .el-table th .cell, .el-table td .cell{
644
+        padding: 0 2px;
645
+    }
646
+    .el-icon-delete{
647
+        color:red;
648
+    }
649
+}
650
+
651
+</style>
652
+

+ 107 - 0
src/xt_pages/hospitalStation/template/printOne.vue View File

@@ -0,0 +1,107 @@
1
+<template>
2
+    <div id='prescription-print' class="prescription-print">
3
+        <div class="printTitle">血液透析中心处方笺</div>
4
+        <div class="infoTitle">
5
+            <p>姓名:阿萨德</p>
6
+            <p>性别:男</p>
7
+            <p>年龄:12岁</p>
8
+        </div>
9
+        <div class="infoMain">
10
+            <div style="margin-bottom: 10px;">门诊号:111111111111</div>
11
+            <div style="margin-bottom: 10px;">科室:全科</div>
12
+            <div style="margin-bottom: 10px;">医保卡号:111111111111</div>
13
+            <div style="margin-bottom: 10px;">电话:111111111111</div>
14
+            <div>地址:加上来看待就卢萨卡的及拉丝机的了</div>
15
+            <div>临床诊断:拉胯手机上的拉丝机的</div>
16
+        </div>
17
+        <div class="prescriptionBox">
18
+            <div class="Rp">Rp:</div>
19
+            <div class="drugsBox">
20
+                <div class="drugsOne">重组人促红素(CHO细胞)注射液&nbsp;&nbsp;0.5毫升&nbsp;×&nbsp; 2支</div>
21
+                <div style="margin-left:100px;"><span>用法:0.5毫升</span>&nbsp;&nbsp;<span>一天一次</span>&nbsp;&nbsp;<span>静脉注射</span></div>
22
+            </div>
23
+            <div class="drugsBox">
24
+                <div class="drugsOne">重组人促红素(CHO细胞)注射液&nbsp;&nbsp;0.5毫升&nbsp;×&nbsp; 2支</div>
25
+                <div style="margin-left:100px;"><span>用法:0.5毫升</span>&nbsp;&nbsp;<span>一天一次</span>&nbsp;&nbsp;<span>静脉注射</span></div>
26
+            </div>
27
+        </div>
28
+        <div class="doctorBox">
29
+            <p>医师:高华</p>
30
+            <p>日期:2020-11-14 09:12:32</p>
31
+        </div>
32
+        <div class="actionBar">
33
+            <p>审核:</p>
34
+            <p>配对:</p>
35
+            <p>核对:</p>
36
+            <p>发药:</p>
37
+            <p>药费:</p>
38
+        </div> b
39
+    </div>
40
+</template>
41
+
42
+
43
+
44
+<style lang="scss" scoped>
45
+.printTitle{
46
+    font-size: 22px;
47
+    text-align: center;
48
+    font-weight: bold;
49
+}
50
+.infoTitle{
51
+    display: flex;
52
+    border-bottom: 2px solid #000;
53
+    margin-top:10px;
54
+    line-height: 24px;
55
+    padding:0 10px;
56
+}
57
+.infoTitle p{
58
+    width: 200px;
59
+}
60
+.infoMain{
61
+    display: flex;
62
+    flex-wrap: wrap;
63
+    border-bottom: 2px solid #000;
64
+    padding:0 10px;
65
+}
66
+.infoMain div{
67
+    width: 50%;
68
+    line-height: 24px;
69
+}
70
+.prescriptionBox{
71
+    padding:0 10px;
72
+    min-height:450px;
73
+}
74
+.Rp{
75
+    font-size: 22px;
76
+    font-weight: bold;
77
+}
78
+.drugsBox{
79
+    padding-left: 40px;
80
+    margin-bottom: 10px;
81
+}
82
+.drugsBox div{
83
+    line-height: 20px;
84
+}
85
+.drugsOne{
86
+    line-height: 24px;
87
+}
88
+.drugsOne span{
89
+    margin-right: 20px;
90
+}
91
+.doctorBox{
92
+    display: flex;
93
+    justify-content: space-between;
94
+    padding:0 10px;
95
+    line-height: 24px;
96
+    border-bottom: 2px solid #000;
97
+}
98
+.actionBar{
99
+    display: flex;
100
+    justify-content: space-between;
101
+    line-height: 24px;
102
+    padding:0 10px;
103
+}
104
+.actionBar p{
105
+    width:150px;
106
+}
107
+</style>

+ 231 - 0
src/xt_pages/hospitalStation/template/printTwo.vue View File

@@ -0,0 +1,231 @@
1
+<template>
2
+    <div id='prescription-print' class="prescription-print">
3
+        <div class="printTitle">{{orgname}}处方笺</div>
4
+        <div class="infoTitle">
5
+            <p>姓名:{{patient.name}}</p>
6
+            <p>性别:
7
+               <span v-if="patient.gender == 1">男</span>
8
+               <span v-if="patient.gender == 2">女</span>
9
+            </p>
10
+            <p>年龄:{{patient.age}}岁</p>
11
+        </div>
12
+        <div class="infoMain">
13
+            <div style="margin-bottom: 10px;">门诊号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
14
+            <div style="margin-bottom: 10px;">科室:{{getDepart(this.hisPatient.departments?this.hisPatient.departments:"")}}</div>
15
+            <div style="margin-bottom: 10px;">医保卡号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
16
+            <div style="margin-bottom: 10px;">电话:{{patient.phone}}</div>
17
+            <div>地址:{{patient.home_address}}</div>
18
+            <div style="display:flex;width:50%;">临床诊断:{{patient.diagnose}}</div>
19
+        </div>
20
+        <div class="prescriptionBox">
21
+            <div class="Rp">Rp:</div>
22
+            <div class="drugsBox" v-for="(item,index) in advicePrint" :key="index">
23
+                <div class="drugsOne">{{item.advice_name?item.advice_name:""}}&nbsp;&nbsp;{{item.single_dose}}{{item.single_dose_unit}}&nbsp;×&nbsp; {{item.prescribing_number}}{{item.prescribing_number_unit}}</div>
24
+                <div style="margin-left:100px;"><span>用法:{{item.single_dose}}{{item.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{item.execution_frequency}}</span>&nbsp;&nbsp;<span>{{item.advice_desc}}</span></div>
25
+            </div>
26
+
27
+
28
+        </div>
29
+        <div class="doctorBox">
30
+            <p>医师:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
31
+            <p>日期:{{getTime(advicePrint[0].advice_date)?getTime(advicePrint[0].advice_date):""}}</p>
32
+        </div>
33
+        <div class="actionBar">
34
+            <p>审核:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>
35
+            <p>配对:</p>
36
+            <p>核对:{{getDoctor(advicePrint[0].checker)?getDoctor(advicePrint[0].checker):""}}</p>
37
+            <p>发药:{{getDoctor(advicePrint[0].execution_staff)?getDoctor(advicePrint[0].execution_staff):""}}</p>
38
+            <p>药费:{{advicePrint[0].price?advicePrint[0].price:""}}</p>
39
+        </div>
40
+    </div>
41
+</template>
42
+<script>
43
+import { jsGetAge, uParseTime } from '@/utils/tools'
44
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail} from "@/api/project/project"
45
+import {getInitData} from "@/api/his/his"
46
+export default {
47
+    props:{
48
+      patient_id:Number,
49
+      record_date:String,
50
+      prescription_id:Number
51
+    },
52
+    data(){
53
+      return {
54
+        doctorList:[],
55
+        advicePrint:{},
56
+        patient:{},
57
+        tableData:[],
58
+        prescriptionInfo:[],
59
+        hisPatient:{},
60
+        department:[],
61
+        orgname:""
62
+      }
63
+    },
64
+   methods:{
65
+
66
+     getAllDoctorList(){
67
+      getAllDoctorList().then(response=>{
68
+        if(response.data.state == 1){
69
+               var doctor =  response.data.data.doctor;
70
+
71
+               this.doctorList = doctor
72
+             }
73
+         })
74
+     },
75
+
76
+      getDoctor(id){
77
+        var name = "";
78
+        for(let i=0;i<this.doctorList.length;i++){
79
+          if(id == this.doctorList[i].admin_user_id){
80
+              name = this.doctorList[i].user_name
81
+          }
82
+        }
83
+        return name
84
+      },
85
+      getTime(value, temp) {
86
+        if (value != undefined) {
87
+            return uParseTime(value, temp)
88
+        }
89
+        return ''
90
+     },
91
+       getPrescriptionPrint(){
92
+         var params = {
93
+          patient_id:this.patient_id,
94
+          record_date:this.record_date,
95
+          prescription_id:this.prescription_id,
96
+        };
97
+        console.log("params---",params);
98
+       getPrescriptionPrint(params).then(response=>{
99
+         if(response.data.state == 1){
100
+            var advicePrint =  response.data.data.advicePrint;
101
+            console.log("adviceprint",advicePrint);
102
+            this.advicePrint = advicePrint;
103
+            var patient =  response.data.data.patient;
104
+            console.log("patient",patient);
105
+            this.patient = patient;
106
+            var doctorPorject = response.data.data.doctorPorject;
107
+
108
+            var arr = doctorPorject.project;
109
+              console.log("我的中谷歌",arr);
110
+            for(let i=0;i<arr.length;i++){
111
+              console.log("arr",arr[i].project_name)
112
+            }
113
+            this.tableData = arr;
114
+            console.log("3333",this.tableData);
115
+            var prescriptioninfo = response.data.data.prescriptionInfo;
116
+            console.log("prescriptioninfo",prescriptioninfo);
117
+            this.prescriptionInfo = prescriptioninfo
118
+          }
119
+       })
120
+     },
121
+     getHisPatientDetail(){
122
+          const params = {
123
+              patient_id:this.patient_id
124
+          };
125
+       getHisPatientDetail(params).then(response=>{
126
+          if(response.data.state == 1){
127
+             var hisPatient =  response.data.data.hisPatient;
128
+             console.log("挂号病人",hisPatient);
129
+             this.hisPatient = hisPatient
130
+          }
131
+       })
132
+     },
133
+     getInitData(){
134
+       getInitData().then(response=>{
135
+          if(response.data.state == 1){
136
+            this.department = response.data.data.department
137
+
138
+          }
139
+       })
140
+     },
141
+     getDepart(id){
142
+         var name = "";
143
+       for(let i=0;i<this.department.length;i++){
144
+           if(id == this.department[i].id){
145
+               name = this.department[i].name
146
+           }
147
+       }
148
+       return name
149
+     }
150
+   },
151
+   created(){
152
+      this.getAllDoctorList();
153
+      this.getInitData();
154
+      var xtuser = this.$store.getters.xt_user;
155
+      this.orgname = xtuser.org.org_name;
156
+   },
157
+   watch:{
158
+     patient_id:function(val){
159
+       console.log("999999888888",this.patient_id,this.record_date,this.prescription_id);
160
+       this.getPrescriptionPrint();
161
+       this.getHisPatientDetail()
162
+     }
163
+   }
164
+}
165
+</script>
166
+
167
+
168
+<style lang="scss" scoped>
169
+.printTitle{
170
+    font-size: 22px;
171
+    text-align: center;
172
+    font-weight: bold;
173
+}
174
+.infoTitle{
175
+    display: flex;
176
+    border-bottom: 2px solid #000;
177
+    margin-top:10px;
178
+    line-height: 24px;
179
+    padding:0 10px;
180
+}
181
+.infoTitle p{
182
+    width: 200px;
183
+}
184
+.infoMain{
185
+    display: flex;
186
+    flex-wrap: wrap;
187
+    border-bottom: 2px solid #000;
188
+    padding:0 10px;
189
+}
190
+.infoMain div{
191
+    width: 50%;
192
+    line-height: 24px;
193
+}
194
+.prescriptionBox{
195
+    padding:0 10px;
196
+    min-height:450px;
197
+}
198
+.Rp{
199
+    font-size: 22px;
200
+    font-weight: bold;
201
+}
202
+.drugsBox{
203
+    padding-left: 40px;
204
+    margin-bottom: 10px;
205
+}
206
+.drugsBox div{
207
+    line-height: 20px;
208
+}
209
+.drugsOne{
210
+    line-height: 24px;
211
+}
212
+.drugsOne span{
213
+    margin-right: 20px;
214
+}
215
+.doctorBox{
216
+    display: flex;
217
+    justify-content: space-between;
218
+    padding:0 10px;
219
+    line-height: 24px;
220
+    border-bottom: 2px solid #000;
221
+}
222
+.actionBar{
223
+    display: flex;
224
+    justify-content: space-between;
225
+    line-height: 24px;
226
+    padding:0 10px;
227
+}
228
+.actionBar p{
229
+    width:150px;
230
+}
231
+</style>

+ 99 - 0
src/xt_pages/hospitalStation/templateManagement.vue View File

@@ -0,0 +1,99 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+        </div>
6
+        <div class="app-container">
7
+            <div class="cell clearfix">
8
+                <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
9
+                <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
10
+                <label class="title"><span class="name">模板类型</span> : </label>
11
+                <el-select size="small" v-model="value" placeholder="请选择" style="width:150px;margin-left:10px;">
12
+                    <el-option
13
+                    v-for="item in options"
14
+                    :key="item.value"
15
+                    :label="item.label"
16
+                    :value="item.value">
17
+                    </el-option>
18
+                </el-select>
19
+            </div>
20
+            <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
21
+                <el-table-column align="center" width="60" label="序号">
22
+                    <template slot-scope="scope">
23
+                        1
24
+                    </template>
25
+                </el-table-column>
26
+                <el-table-column align="center" prop="name" label="模板名称" width="100">
27
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
28
+                </el-table-column>
29
+                <el-table-column align="center" prop="name" label="模板类型" width="110">
30
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
31
+                </el-table-column>
32
+                <el-table-column align="center" prop="name" label="模板等级">
33
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
34
+                </el-table-column>
35
+                <el-table-column align="center" prop="name" label="创建时间">
36
+                    <template slot-scope="scope">{{ scope.row.date }}</template>
37
+                </el-table-column>
38
+                <el-table-column align="center" prop="name" label="操作" width="100">
39
+                    <template slot-scope="scope">
40
+                        <el-button size="mini" type="primary" @click="handerDetail">编辑</el-button>
41
+                    </template>
42
+                </el-table-column>
43
+            </el-table>
44
+            <el-pagination
45
+                @size-change="handleSizeChange"
46
+                @current-change="handleCurrentChange"
47
+                :page-sizes="[10, 50, 100]"
48
+                :page-size="10"
49
+                background
50
+                style="margin-top:20px;float: right"
51
+                layout="total, sizes, prev, pager, next, jumper"
52
+                :total="total"
53
+            >
54
+            </el-pagination>
55
+            <template-detail ref="templateDetail"></template-detail>
56
+        </div>
57
+    </div>
58
+</template>
59
+
60
+<script>
61
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
62
+import templateDetail from './components/templateDetail'
63
+export default {
64
+    components:{
65
+        BreadCrumb,
66
+        templateDetail
67
+    },
68
+    data(){
69
+        return{
70
+            crumbs: [
71
+                { path: false, name: '门诊医生站' },
72
+                { path: false, name: '模板管理' }
73
+            ],
74
+            tableData: [{
75
+            date: '2016-05-02',
76
+            name: '王小虎',
77
+            address: '上海市普陀区金沙江路 1518 弄'
78
+            }, {
79
+            date: '2016-05-04',
80
+            name: '王小虎',
81
+            address: '上海市普陀区金沙江路 1517 弄'
82
+            }, {
83
+            date: '2016-05-01',
84
+            name: '王小虎',
85
+            address: '上海市普陀区金沙江路 1519 弄'
86
+            }, {
87
+            date: '2016-05-03',
88
+            name: '王小虎',
89
+            address: '上海市普陀区金沙江路 1516 弄'
90
+            }]
91
+        }
92
+    },
93
+    methods:{
94
+        handerDetail(){
95
+            this.$refs.templateDetail.show()
96
+        }
97
+    }
98
+}
99
+</script>

+ 170 - 0
src/xt_pages/hospitalStation/treatPrint.vue View File

@@ -0,0 +1,170 @@
1
+<template>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+        >打印</el-button
12
+      >
13
+    </template>
14
+    <div class="app-container" style="padding-top:40px;">
15
+        <div class='dialysisPage'>
16
+            <printOne v-bind:childResponse="childResponse" :paramsObj="paramsObj"></printOne>
17
+        </div>
18
+    </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+
24
+import {
25
+  getDialysisRecordInitData,
26
+  getDialysisSchedules
27
+} from "@/api/dialysis_record";
28
+import { parseTime } from "@/utils";
29
+import { getDialysisRecord } from "@/api/dialysis";
30
+import { getDataConfig } from "@/utils/data";
31
+import { jsGetAge, uParseTime } from "@/utils/tools";
32
+// import LabelBox from "./printItem/LabelBox";
33
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
34
+import print from "print-js";
35
+import printOne from "./treatTemplate/printOne"
36
+export default {
37
+  name: "dialysisPrintOrder",
38
+  components: {
39
+    BreadCrumb,
40
+    printOne
41
+  },
42
+  props:{
43
+    paramsObj:Object
44
+  },
45
+  data() {
46
+    return {
47
+      crumbs: [
48
+        { path: false, name: "透析管理" },
49
+        { path: false, name: "打印单" }
50
+      ],
51
+      childResponse: {},
52
+      paramsObj:{}
53
+      
54
+
55
+    };
56
+  },
57
+  methods: {
58
+    getAdminUser(id) {
59
+      if (id == 0) {
60
+        return "";
61
+      }
62
+      if (id == undefined) {
63
+        return "";
64
+      }
65
+      for (let i = 0; i < this.adminUser.length; i++) {
66
+        if (this.adminUser[i].id == id) {
67
+          return this.adminUser[i].name;
68
+        }
69
+      }
70
+    },
71
+    getTime(value, temp) {
72
+      if (value == 0) {
73
+        return "";
74
+      }
75
+      if (value != undefined) {
76
+        return uParseTime(value, temp);
77
+      }
78
+      return "";
79
+    },
80
+    printThisPage() {
81
+      var ptime = Math.round(new Date().getTime() / 1000);
82
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
83
+
84
+      const style =
85
+        '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
86
+        printJS({
87
+            printable: "prescription-print",
88
+            type: "html",
89
+            style: style,
90
+            scanStyles: false
91
+        });
92
+
93
+      // if (this.org_template_info.template_id == 1) {
94
+      //   printJS({
95
+      //     printable: "dialysis-print-box",
96
+      //     type: "html",
97
+      //     style: style,
98
+      //     scanStyles: false
99
+      //   });
100
+      // }
101
+    },
102
+  },
103
+  created() {
104
+  },
105
+  watch:{
106
+    paramsObj:{//深度监听,可监听到对象、数组的变化
107
+      handler(val, oldVal){
108
+        this.paramsObj = val
109
+        
110
+      },
111
+      deep:true
112
+    }
113
+  }
114
+};
115
+</script>
116
+
117
+<style lang="scss" scoped>
118
+.printTitle{
119
+    font-size: 22px;
120
+    text-align: center;
121
+    font-weight: bold;
122
+}
123
+.infoMain{
124
+    display: flex;
125
+    flex-wrap: wrap;
126
+    border-bottom: 2px solid #000;
127
+    padding:0 10px;
128
+}
129
+.infoMain .infoP{
130
+    width: 33%;
131
+    line-height: 24px;
132
+}
133
+.prescriptionBox{
134
+    padding:0 10px;
135
+    height:600px;
136
+}
137
+.Rp{
138
+    font-size: 22px;
139
+    font-weight: bold;
140
+}
141
+.drugsBox{
142
+    padding-left: 40px;
143
+    margin-bottom: 10px;
144
+}
145
+.drugsBox p{
146
+    line-height: 30px;
147
+}
148
+.drugsOne{
149
+    line-height: 24px;
150
+}
151
+.drugsOne span{
152
+    margin-right: 20px;
153
+}
154
+.doctorBox{
155
+    display: flex;
156
+    justify-content: space-between;
157
+    padding:0 10px;
158
+    line-height: 24px;
159
+    border-bottom: 2px solid #000;
160
+}
161
+.actionBar{
162
+    display: flex;
163
+    justify-content: space-between; 
164
+    line-height: 24px;
165
+    padding:0 10px;
166
+}
167
+.actionBar p{
168
+    width:150px;
169
+}
170
+</style>

+ 495 - 0
src/xt_pages/hospitalStation/treatTemplate/printOne.vue View File

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