Browse Source

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

csx 2 years ago
parent
commit
d4ed761f34

+ 115 - 39
src/xt_pages/outpatientCharges/allListPrint.vue View File

@@ -67,49 +67,97 @@
67 67
             return false
68 68
           } else {
69 69
             this.order = response.data.data.order
70
+            this.order['bedCostTotal'] = response.data.data.bedCostTotal
71
+            this.order['operationCostTotal'] = response.data.data.operationCostTotal
72
+            this.order['otherCostTotal'] = response.data.data.otherCostTotal
73
+            this.order['materialCostTotal'] = response.data.data.materialCostTotal
74
+            this.order['westernMedicineCostTotal'] = response.data.data.westernMedicineCostTotal
75
+            this.order['chineseTraditionalMedicineCostTotal'] = response.data.data.chineseTraditionalMedicineCostTotal
76
+            this.order['checkCostTotal'] = response.data.data.checkCostTotal
77
+            this.order['zhenChaCostTotal'] = response.data.data.zhenChaCostTotal
78
+            this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
79
+            this.order['treatCostTotal'] = response.data.data.treatCostTotal
80
+
81
+
70 82
             this.patient = response.data.data.patient
71 83
             this.admin = response.data.data.admin_info
72 84
             this.his_hospital = response.data.data.his_hospital
73 85
             var order_info = response.data.data.order_info
74 86
 
75
-            //获取所有项目类型进行去重
76
-            let med_chrgitm_types = []
77
-            for (let i = 0; i < order_info.length; i++) {
78
-              med_chrgitm_types.push(order_info[i].med_chrgitm_type)
79
-            }
80
-            const obj = {}
81
-            med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
82
-              obj[next] ? '' : obj[next] = true && cur.push(next)
83
-              return cur
84
-            }, []) // 设置cur默认类型为数组,并且初始值为空的数组
85
-
86
-            let tempOrderInfo = []
87
-
88
-            for (let i = 0; i < med_chrgitm_types.length; i++) {
89
-              let obj = {
90
-                total: 0,
91
-                details: []
87
+            if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
88
+              //获取所有项目类型进行去重
89
+              let med_chrgitm_types = []
90
+              for (let i = 0; i < order_info.length; i++) {
91
+                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
92 92
               }
93
-              let tempDetails = []
94
-              for (let b = 0; b < order_info.length; b++) {
95
-                if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
96
-                  tempDetails.push(order_info[b])
93
+              const obj = {}
94
+              med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
95
+                obj[next] ? '' : obj[next] = true && cur.push(next)
96
+                return cur
97
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
98
+
99
+              let tempOrderInfo = []
100
+
101
+              for (let i = 0; i < med_chrgitm_types.length; i++) {
102
+                let obj = {
103
+                  total: 0,
104
+                  details: []
105
+                }
106
+                let tempDetails = []
107
+                for (let b = 0; b < order_info.length; b++) {
108
+                  if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
109
+                    tempDetails.push(order_info[b])
110
+                  }
97 111
                 }
98
-              }
99 112
 
100
-              obj.details = this.setNewData(tempDetails)
101
-              // obj.total = this.getTotal(obj.details)
113
+                obj.details = this.setNewData(tempDetails)
114
+                // obj.total = this.getTotal(obj.details)
115
+                //
116
+                // obj.details.push({
117
+                //   total: obj.total,
118
+                //   is_total: 1,
119
+                // })
120
+                this.list =  this.list.concat(obj.details)
121
+              }
102 122
 
103
-              // obj.details.push({
104
-              //   total: obj.total,
105
-              //   is_total: 1,
106
-              // })
107
-              this.list =  this.list.concat(obj.details)
108
-            }
109 123
 
124
+            }else{
110 125
 
126
+              //获取所有项目类型进行去重
127
+              let med_chrgitm_types = []
128
+              for (let i = 0; i < order_info.length; i++) {
129
+                med_chrgitm_types.push(order_info[i].med_chrgitm_type)
130
+              }
131
+              const obj = {}
132
+              med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
133
+                obj[next] ? '' : obj[next] = true && cur.push(next)
134
+                return cur
135
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
136
+
137
+              let tempOrderInfo = []
138
+
139
+              for (let i = 0; i < med_chrgitm_types.length; i++) {
140
+                let obj = {
141
+                  total: 0,
142
+                  details: []
143
+                }
144
+                let tempDetails = []
145
+                for (let b = 0; b < order_info.length; b++) {
146
+                  if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
147
+                    tempDetails.push(order_info[b])
148
+                  }
149
+                }
111 150
 
151
+                obj.details = this.setNewData(tempDetails)
152
+                obj.total = this.getTotal(obj.details)
112 153
 
154
+                obj.details.push({
155
+                  total: obj.total,
156
+                  is_total: 1,
157
+                })
158
+                this.list =  this.list.concat(obj.details)
159
+              }
160
+            }
113 161
           }
114 162
         })
115 163
       }, getTotal:function(items){
@@ -163,8 +211,8 @@
163 211
               if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
164 212
                 obj['name'] = details[a].advice.advice_name
165 213
                 obj['spec'] = details[a].advice.drug.drug_spec
166
-                obj['unit'] = details[a].advice.drug.max_unit
167
-
214
+                obj['unit'] = details[a].advice.drug.min_unit
215
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
168 216
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
169 217
                 obj['price'] = parseFloat(details[a].pric)
170 218
                 obj['is_total'] = 2
@@ -184,12 +232,17 @@
184 232
               if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
185 233
                if( details[a].project.type == 2){
186 234
                  obj['name'] = details[a].project.project.project_name
235
+                 obj['spec'] = '次'
236
+                 obj['unit'] = details[a].project.project.unit
237
+
238
+
187 239
                }else if(details[a].project.type == 3){
188 240
                  obj['name'] = details[a].project.good_info.good_name
189
-               }
190
-                obj['unit'] = details[a].project.unit
241
+                 obj['spec'] = details[a].project.good_info.specification_name
242
+                 obj['unit'] = this.getGoodUnit( details[a].project.good_info.good_unit)
191 243
 
192
-                obj['spec'] = '1'
244
+               }
245
+                obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
193 246
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
194 247
                 obj['price'] = parseFloat(details[a].pric)
195 248
                 obj['is_total'] = 2
@@ -204,7 +257,14 @@
204 257
 
205 258
         return list
206 259
 
207
-      }, unique(array) {
260
+      }, getGoodUnit(id) {
261
+        var goodUnit = this.$store.getters.good_unit
262
+        for (let i = 0; i < goodUnit.length; i++) {
263
+          if (goodUnit[i].id == id) {
264
+            return goodUnit[i].name
265
+          }
266
+        }
267
+      },unique(array) {
208 268
         // res用来存储结果
209 269
         var res = []
210 270
         for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
@@ -219,9 +279,7 @@
219 279
           }
220 280
         }
221 281
         return res
222
-      },
223
-
224
-      getType(med_chrgitm_type) {
282
+      },getType(med_chrgitm_type){
225 283
         switch (med_chrgitm_type) {
226 284
           case '01':
227 285
             return '床位费'
@@ -280,6 +338,24 @@
280 338
 
281 339
         }
282 340
 
341
+
342
+      },
343
+
344
+      getMedicineInsuranceType(type) {
345
+        switch (type) {
346
+          case "01":
347
+            return '甲类'
348
+            break
349
+          case "02":
350
+            return '乙类'
351
+
352
+            break
353
+          case "03":
354
+            return '自费'
355
+            break
356
+
357
+        }
358
+
283 359
       },
284 360
       printThisPage() {
285 361
 

+ 17 - 17
src/xt_pages/outpatientCharges/allListTemplate/summaryPrint.vue View File

@@ -15,33 +15,33 @@
15 15
     </div>
16 16
 
17 17
     <div class="allListInfo">
18
-      <div>西药</div>
19
-      <div >中成药</div>
20
-      <div >中草药</div>
21
-      <div >检查费</div>
18
+      <div>西药:{{order.westernMedicineCostTotal?order.westernMedicineCostTotal:''}}</div>
19
+      <div >中成药:{{order.chineseTraditionalMedicineCostTotal?order.chineseTraditionalMedicineCostTotal:''}}</div>
20
+      <div >中草药:</div>
21
+      <div >检查费:{{order.checkCostTotal?order.checkCostTotal:''}}</div>
22 22
     </div>
23 23
 
24 24
 
25 25
     <div class="allListInfo">
26
-      <div >输氧费</div>
27
-      <div>手术费</div>
28
-      <div >化验费</div>
29
-      <div>输血费</div>
26
+      <div >输氧费:</div>
27
+      <div>手术费:{{order.operationCostTotal?order.operationCostTotal:''}}</div>
28
+      <div >化验费:{{order.laboratoryCostTotal?order.laboratoryCostTotal:''}}</div>
29
+      <div>输血费:</div>
30 30
     </div>
31 31
 
32 32
 
33 33
     <div class="allListInfo">
34
-      <div >诊察费</div>
35
-      <div >治疗费</div>
36
-      <div >护理费</div>
37
-      <div >床位费</div>
34
+      <div >诊察费:{{order.zhenChaCostTotal?order.zhenChaCostTotal:''}}</div>
35
+      <div >治疗费:{{order.treatCostTotal?order.treatCostTotal:''}}</div>
36
+      <div >护理费:</div>
37
+      <div >床位费:{{order.bedCostTotal?order.bedCostTotal:''}}</div>
38 38
     </div>
39 39
 
40 40
 
41 41
     <div class="allListInfo">
42
-      <div >麻醉费</div>
43
-      <div >材料费</div>
44
-      <div >其他费</div>
42
+      <div >麻醉费:</div>
43
+      <div >材料费:{{order.materialCostTotal?order.materialCostTotal:''}}</div>
44
+      <div >其他费:{{order.otherCostTotal?order.otherCostTotal:''}}</div>
45 45
     </div>
46 46
     <!--    <div style="display:flex;justify-content: space-between;">-->
47 47
 <!--          <div style="position: absolute;top:160px;left:40px">西药</div>-->
@@ -90,7 +90,7 @@
90 90
         <td style="width:5%">单位</td>
91 91
         <td style="width:10%">数量</td>
92 92
         <td style="width:10%">单价</td>
93
-        <td style="width:15%">金额</td>
93
+        <td style="width:10%">金额</td>
94 94
         <td style="width:10%">医保类型</td>
95 95
 
96 96
       </tr>
@@ -102,7 +102,7 @@
102 102
           <td style="width:5%">{{ item.unit }}</td>
103 103
           <td style="width:10%">{{ item.count }}</td>
104 104
           <td style="width:10%">{{ item.price }}</td>
105
-          <td style="width:15%">{{ (item.price * item.count).toFixed(2) }}</td>
105
+          <td style="width:10%">{{ (item.price * item.count).toFixed(2) }}</td>
106 106
           <td style="width:10%">{{ item.medicine_insurance_kind }}</td>
107 107
 
108 108
         </tr>

+ 23 - 9
src/xt_pages/outpatientCharges/listPrint.vue View File

@@ -27,6 +27,7 @@
27 27
   import printOne from './listTemplate/printOne'
28 28
   import printTwo from './listTemplate/printTwo'
29 29
   // import printThree from './listTemplate/printThree'
30
+  import print from "print-js";
30 31
 
31 32
   import { getHisOrderDetail,getPrivateExpensesOrder } from '@/api/his/his'
32 33
   import { uParseTime } from '@/utils/tools'
@@ -125,7 +126,7 @@
125 126
               if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
126 127
                 obj['p_time'] = this.getTimes(infos.advice.prescription.ctime)
127 128
                 obj['name'] = infos.advice.advice_name
128
-                obj['unit'] = infos.advice.drug.max_unit
129
+                obj['unit'] = infos.advice.drug.min_unit
129 130
                 obj['feedetl_sn'] =  infos.feedetl_sn
130 131
 
131 132
 
@@ -201,14 +202,27 @@
201 202
       },
202 203
       printThisPage() {
203 204
         if(this.org_id != 10106){
204
-          const style =
205
-          '@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: 20px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 10px;}.tableBottomOne{margin-right: 40px;}}'
206
-          printJS({
207
-            printable: 'list-print',
208
-            type: 'html',
209
-            style: style,
210
-            scanStyles: false
211
-          })
205
+          if(this.org_id == 10215 || this.org_id == 0){
206
+            const style =
207
+                '@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: 20px;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;}}'
208
+            printJS({
209
+              printable: 'allList-print',
210
+              type: 'html',
211
+              style: style,
212
+              scanStyles: false
213
+            })
214
+
215
+
216
+          }else {
217
+            const style =
218
+                '@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: 20px;font-size: 14px;border-color: #000;text-align:left;}.listTable tr td {padding: 0 5px;}.tableBottom{font-size: 16px;display: flex;margin-top: 10px;}.tableBottomOne{margin-right: 40px;}}'
219
+            printJS({
220
+              printable: 'list-print',
221
+              type: 'html',
222
+              style: style,
223
+              scanStyles: false
224
+            })
225
+          }
212 226
         }else{
213 227
           const style =
214 228
           '@media print {#statement-print{font-size:12px;width:800px;margin:0 auto;}.statementTitle{font-size: 22px;text-align: center;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}';