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
a303778cce

+ 46 - 2
src/xt_pages/outpatientCharges/newStatementPrintTwo.vue View File

@@ -15,7 +15,7 @@
15 15
         <div class='dialysisPage' style="padding-top:40px;">
16 16
             <!--<printOne :info="info"></printOne>-->
17 17
 
18
-            <print-one v-if="org_id != 0"  :info="info"></print-one>
18
+            <print-one v-if="org_id != 9504"  :info="info"></print-one>
19 19
             <print-two v-else  :info="info"></print-two>
20 20
         </div>
21 21
     </div>
@@ -126,6 +126,8 @@
126 126
                   that.info = response.data.data.result;
127 127
                   console.log(that.info);
128 128
 
129
+                  that.info['patient_info']= response.data.data.patient_info
130
+                  that.info['dialysis_no'] = response.data.data.dialysis_no
129 131
                   that.info['org_code'] = response.data.data.org_code;
130 132
                   that.info['patient_name'] = response.data.data.patient_name;
131 133
                   that.info['doctor_code'] = response.data.data.doctor_code;
@@ -171,6 +173,32 @@
171 173
 
172 174
                   console.log("~~" + that.info)
173 175
 
176
+
177
+                  let type_arr = []
178
+                  for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
179
+                    type_arr.push(that.info.transBody.outputlist1[i].aka111)
180
+                  }
181
+
182
+
183
+                  let  typeArr =  this.unique(type_arr)
184
+
185
+                  that.info['new_detail_list'] = []
186
+
187
+                  for(let i = 0; i <  typeArr.length; i++){
188
+                    let obj = {
189
+                      aka111:typeArr[i],
190
+                      details:[],
191
+                    }
192
+
193
+                    for(let b = 0; b < that.info.transBody.outputlist1.length;b++){
194
+                        if(typeArr[i] == that.info.transBody.outputlist1[b]){
195
+                          obj.details.push(that.info.transBody.outputlist1[b])
196
+                        }
197
+                    }
198
+                    that.info.new_detail_list.push(obj)
199
+                  }
200
+
201
+
174 202
                 }
175 203
               }
176 204
             })
@@ -178,7 +206,23 @@
178 206
 
179 207
             });
180 208
         }
181
-      }
209
+      }, unique(array) {
210
+
211
+        // res用来存储结果
212
+        var res = []
213
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
214
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
215
+            if (array[i] === res[j] ) {
216
+              break
217
+            }
218
+          }
219
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
220
+          if (j === resLen) {
221
+            res.push(array[i])
222
+          }
223
+        }
224
+        return res
225
+      },
182 226
 
183 227
     },
184 228
 

+ 206 - 127
src/xt_pages/outpatientCharges/newTreatTemplate/printTwo.vue View File

@@ -4,16 +4,17 @@
4 4
             <img style="width:100%;" src="../../../assets/img/bailinTop.jpg" alt="">
5 5
             <div class="printTitle">门诊收费清单</div>
6 6
             <div style="display:flex;">
7
-                <div>单据号:<span style="display:inline-block;width:200px;"></span></div>
8
-                <div>透析号:<span style="display:inline-block;width:200px;"></span></div>
7
+                <div>单据号:<span style="display:inline-block;width:200px;">{{info.order_number}}</span></div>
8
+                <div>透析号:<span style="display:inline-block;width:200px;">{{info.dialysis_no}}</span></div>
9 9
             </div>
10 10
             <div style="display:flex;">
11 11
                 <div>姓名:<span style="display:inline-block;width:50px;">{{info.patient_name}}</span></div>
12
-                <div>性别:<span style="display:inline-block;width:30px;">{{patient.gender == 1 ? '男' : '女'}}</span></div>
13
-                <div>年龄:<span style="display:inline-block;width:50px;">{{patient.age}}岁</span></div>
14
-                <div>费别:<span style="display:inline-block;width:80px;"></span></div>
15
-                <div>电脑号:<span style="display:inline-block;width:80px;"></span></div>
16
-                <div>收费日期:<span style="display:inline-block;width:80px;"></span></div>
12
+                <div>性别:<span style="display:inline-block;width:30px;">{{info.patient_info.transBody.aac004 == '1' ? '男' : '女'}}</span></div>
13
+                <div>年龄:<span style="display:inline-block;width:50px;">{{info.patient_info.transBody.bae093}}岁</span></div>
14
+                <div>费别:<span style="display:inline-block;width:80px;">{{getName(info.patient_info.transBody.outputlist1)}}</span>
15
+                </div>
16
+                <div>电脑号:<span style="display:inline-block;width:80px;">{{info.patient_info.transBody.aac999}}</span></div>
17
+                <div>收费日期:<span style="display:inline-block;width:80px;">{{info.record_date}}</span></div>
17 18
                 <div style="float:right">金额单位:元</div>
18 19
             </div>
19 20
             <table border='1' style="width:100%;" cellspacing="0">
@@ -27,43 +28,43 @@
27 28
                     <td width="70">总额</td>
28 29
                     <td width="100">小计</td>
29 30
                 </tr>
30
-                <tr v-for="(item,y) in prescription[0].advices" :key="y">
31
-                    <td></td>
32
-                    <td>{{item.advice_name}}</td>
33
-                    <td>{{item.advice_desc}}</td>
34
-                    <td>{{item.single_dose_unit}}</td>
35
-                    <td>{{item.single_dose}}</td>
36
-                    <td>{{item.price}}</td>
37
-                    <td>{{ item.single_dose * item.price }}</td>
38
-                    <td>{{ item.single_dose * item.price }}</td>
39
-
31
+                <tr v-for="(item,index) in info.new_detail_list">
32
+                    <!--<tr v-for="(subItem,index) in item.details" >-->
33
+
34
+                    <!--<td></td>-->
35
+                    <!--<td>{{subItem.ake006}}</td>-->
36
+                    <!--<td>{{subItem.aka074}}</td>-->
37
+                    <!--<td>{{subItem.aka067}}</td>-->
38
+                    <!--<td>{{subItem.akc226}}</td>-->
39
+                    <!--<td>{{subItem.akc225}}</td>-->
40
+                    <!--<td>{{ subItem.akc264}}</td>-->
41
+                    <!--<td></td>-->
42
+                    <!--</tr>-->
40 43
                 </tr>
41
-                <tr>
42
-                    <td colspan="2">药品费:0.00元</td>
43
-                    <td colspan="2">诊疗费:0.00元</td>
44
-                    <td colspan="3">耗材费:0.00元</td>
44
+                <tr v-for="(item,index) in info.transBody.outputlist2" :key="index">
45
+                    <td colspan="2">{{getValue(item)}}</td>
45 46
                     <td>合计: 0.00元</td>
46 47
                 </tr>
47 48
                 <tr>
48 49
                     <td colspan="7">
49 50
                         <div style="display:flex;flez-wrap:wrap;">
50
-                            <div style="width:33%;">医疗费总额:</div>
51
-                            <div style="width:33%;">基金支付金额:</div>
52
-                            <div style="width:33%;">个人账户支付金额:</div>
51
+                            <div style="width:33%;">医疗费总额:{{info.transBody.akc264?info.transBody.akc264:0}}元</div>
52
+                            <div style="width:33%;">基金支付金额:{{info.transBody.akb068?info.transBody.akb068:0}}元</div>
53
+                            <div style="width:33%;">个人账户支付金额:{{info.transBody.akb066?info.transBody.akb066:0}}元</div>
53 54
 
54 55
                         </div>
55 56
                         <div style="display:flex;flez-wrap:wrap;">
56
-                            <div style="width:33%;">个人支付金额:</div>
57
-                            <div style="width:33%;">个人账户金额:</div>
57
+                            <div style="width:33%;">个人支付金额:{{info.transBody.akb067?info.transBody.akb067:0}}元</div>
58
+                            <div style="width:33%;">个人账户金额:{{info.after_money}}元</div>
58 59
                         </div>
59 60
                     </td>
60
-                    <td>合计:0.0元</td>
61
+                    <td>合计:{{info.transBody.akc264?info.transBody.akc264:0}}元</td>
61 62
                 </tr>
62 63
 
63 64
             </table>
64 65
             <div style="float:right;margin:10px 0;display:flex;">
65
-                <div>操作人:<span style="width:100px;display:inline-block;"></span></div>
66
-                <div>操作日期:<span style="width:100px;display:inline-block;"></span></div>
66
+                <div>操作人:<span style="width:100px;display:inline-block;">{{info.doctor_name}}</span></div>
67
+                <div>操作日期:<span style="width:100px;display:inline-block;">{{info.record_date}}</span></div>
67 68
             </div>
68 69
             <img style="width:100%;" src="../../../assets/img/bailinBottom.jpg" alt="">
69 70
         </div>
@@ -100,109 +101,184 @@
100 101
       paramsObj: Object
101 102
     },
102 103
     methods: {
104
+      getName(list) {
105
+        let new_list = []
106
+        for (let i = 0; i < list.length; i++) {
107
+          if (list[i].aac031 == '1') {
108
+            new_list.push(list[i])
109
+          }
110
+        }
111
+
112
+        switch (new_list[0].bbc334) {
113
+          case "A31001":
114
+            return "深圳医保1档"
115
+            break
116
+          case "A31002":
117
+            return "深圳医保2档"
118
+
119
+            break
120
+          case "A31003":
121
+            return "深圳医保3档"
122
+
123
+            break
124
+          case "A31004":
125
+            return "二档(少儿)"
126
+
127
+            break
128
+          case "A31005":
129
+            return "学生二档"
130
+
131
+            break
132
+          case "A31006":
133
+            return "大学生二档"
134
+
135
+            break
136
+          case "A32001":
137
+            return "在职公务员"
138
+            break
139
+          case "A32002":
140
+            return "在职驻深公务员"
141
+
142
+            break
143
+          case "A39301":
144
+            return "家属统筹医疗"
145
+
146
+            break
147
+          case "A41001":
148
+            return "工伤在职"
149
+
150
+            break
151
+          case "A51001":
152
+            return "生育在职"
153
+
154
+            break
155
+          case "A52001":
156
+            return "生育医疗一档"
157
+
158
+            break
159
+          case "A52002":
160
+            return "生育医疗一档"
161
+
162
+            break
163
+          case "C31001":
164
+            return "一档医疗退休"
165
+
166
+            break
167
+          case "C31002":
168
+            return "二档医疗退休"
169
+            break
170
+
171
+        }
172
+
173
+
174
+
175
+      },
176
+      getValue(item) {
177
+        return this.getItemName(item.aka111) + ': ' + item.bka058 + '元'
178
+      },
103 179
       getItemName(number) {
104 180
         switch (number) {
105 181
           case '01':
106
-            return '床位费';
107
-            break;
182
+            return '床位费'
183
+            break
108 184
           case '02':
109
-            return '西药费';
185
+            return '西药费'
110 186
 
111
-            break;
187
+            break
112 188
           case '03':
113
-            return '中药费';
189
+            return '中药费'
114 190
 
115
-            break;
191
+            break
116 192
           case '04':
117
-            return '中成药费';
193
+            return '中成药费'
118 194
 
119
-            break;
195
+            break
120 196
           case '05':
121
-            return '中草药费';
197
+            return '中草药费'
122 198
 
123
-            break;
199
+            break
124 200
           case '06':
125
-            return '检查费';
201
+            return '检查费'
126 202
 
127
-            break;
203
+            break
128 204
           case '07':
129
-            return '治疗费';
205
+            return '治疗费'
130 206
 
131
-            break;
207
+            break
132 208
           case '08':
133
-            return '放射费';
209
+            return '放射费'
134 210
 
135
-            break;
211
+            break
136 212
           case '09':
137
-            return '手术费';
213
+            return '手术费'
138 214
 
139
-            break;
215
+            break
140 216
           case '10':
141
-            return '化验费';
217
+            return '化验费'
142 218
 
143
-            break;
219
+            break
144 220
           case '11':
145
-            return '输血费';
221
+            return '输血费'
146 222
 
147
-            break;
223
+            break
148 224
           case '12':
149
-            return '输氧费';
225
+            return '输氧费'
150 226
 
151
-            break;
227
+            break
152 228
           case '13':
153
-            return '其它费';
229
+            return '其它费'
154 230
 
155
-            break;
231
+            break
156 232
           case '14':
157
-            return '麻醉费';
233
+            return '麻醉费'
158 234
 
159
-            break;
235
+            break
160 236
           case '15':
161
-            return '材料费';
237
+            return '材料费'
162 238
 
163
-            break;
239
+            break
164 240
           case '16':
165
-            return '特殊检查费';
241
+            return '特殊检查费'
166 242
 
167
-            break;
243
+            break
168 244
           case '17':
169
-            return '特殊治疗费';
245
+            return '特殊治疗费'
170 246
 
171
-            break;
247
+            break
172 248
           case '18':
173
-            return '诊疗费(诊查费)';
249
+            return '诊疗费(诊查费)'
174 250
 
175
-            break;
251
+            break
176 252
           case '19':
177
-            return '护理费';
253
+            return '护理费'
178 254
 
179
-            break;
255
+            break
180 256
           case '20':
181
-            return '诊金';
257
+            return '诊金'
182 258
 
183
-            break;
259
+            break
184 260
           case '21':
185
-            return '检查费(CT)';
261
+            return '检查费(CT)'
186 262
 
187
-            break;
263
+            break
188 264
           case '22':
189
-            return '检查费(MRT)';
265
+            return '检查费(MRT)'
190 266
 
191
-            break;
267
+            break
192 268
           case '23':
193
-            return '检查费(其他)';
269
+            return '检查费(其他)'
194 270
 
195
-            break;
271
+            break
196 272
           case '24':
197
-            return '特需服务费';
273
+            return '特需服务费'
198 274
 
199
-            break;
275
+            break
200 276
           case '25':
201
-            return '杂费';
277
+            return '杂费'
202 278
 
203
-            break;
279
+            break
204 280
           case '26':
205
-            return '挂号费';
281
+            return '挂号费'
206 282
             break
207 283
 
208 284
         }
@@ -213,20 +289,20 @@
213 289
           record_date: record_date,
214 290
           patient_id: patient_id,
215 291
           prescription_id: prescription_id
216
-        };
217
-        console.log('params', params);
292
+        }
293
+        console.log('params', params)
218 294
         getChargePrint(params).then(response => {
219 295
           if (response.data.state == 1) {
220
-            var list = response.data.data.list;
221
-            console.log('list9999999999', list);
222
-            this.list = list;
223
-            var prescription = response.data.data.prescription;
224
-            console.log('prescription', prescription);
225
-            this.prescription = prescription;
226
-            var patient = response.data.data.patient;
227
-            console.log('patient', patient);
228
-            this.patient = patient;
229
-            var histpatient = response.data.data.hisPatient;
296
+            var list = response.data.data.list
297
+            console.log('list9999999999', list)
298
+            this.list = list
299
+            var prescription = response.data.data.prescription
300
+            console.log('prescription', prescription)
301
+            this.prescription = prescription
302
+            var patient = response.data.data.patient
303
+            console.log('patient', patient)
304
+            this.patient = patient
305
+            var histpatient = response.data.data.hisPatient
230 306
             console.log('hispatient', histpatient)
231 307
           }
232 308
         })
@@ -235,20 +311,20 @@
235 311
     created() {
236 312
 
237 313
       if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
238
-        this.orgname = xtuser.org.org_name;
314
+        this.orgname = xtuser.org.org_name
239 315
         var form = {
240 316
           'order_id': this.paramsObj.order_id,
241 317
           'patient_id': this.paramsObj.patient_id,
242 318
           'record_time': this.paramsObj.record_date,
243 319
           'admin_user_id': this.$store.getters.xt_user.user.id
244
-        };
245
-        var that = this;
320
+        }
321
+        var that = this
246 322
         axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
247 323
           params: form
248 324
         })
249 325
           .then(function(response) {
250 326
             if (response.data.state == 0) {
251
-              that.$message.error(response.data.msg);
327
+              that.$message.error(response.data.msg)
252 328
               return false
253 329
             } else {
254 330
               if (response.data.data.failed_code == -10) {
@@ -261,22 +337,22 @@
261 337
                 }).catch(() => {
262 338
                 })
263 339
               } else {
264
-                that.result = response.data.data.result;
265
-
266
-                that.org_code = response.data.data.org_code;
267
-                that.patient_name = response.data.data.patient_name;
268
-                that.doctor_code = response.data.data.doctor_code;
269
-                that.doctor_name = response.data.data.doctor_name;
270
-                that.name_arr = [];
271
-                that.spec_arr = [];
272
-                that.count_arr = [];
273
-                that.price_arr = [];
274
-                that.total_arr = [];
340
+                that.result = response.data.data.result
341
+
342
+                that.org_code = response.data.data.org_code
343
+                that.patient_name = response.data.data.patient_name
344
+                that.doctor_code = response.data.data.doctor_code
345
+                that.doctor_name = response.data.data.doctor_name
346
+                that.name_arr = []
347
+                that.spec_arr = []
348
+                that.count_arr = []
349
+                that.price_arr = []
350
+                that.total_arr = []
275 351
                 for (let i = 0; i < that.result.transBody.outputlist1.length; i++) {
276
-                  that.name_arr.push(that.result.transBody.outputlist1[i].ake006);
277
-                  that.spec_arr.push(that.result.transBody.outputlist1[i].aka074);
278
-                  that.count_arr.push(that.result.transBody.outputlist1[i].akc226);
279
-                  that.price_arr.push(that.result.transBody.outputlist1[i].akc225);
352
+                  that.name_arr.push(that.result.transBody.outputlist1[i].ake006)
353
+                  that.spec_arr.push(that.result.transBody.outputlist1[i].aka074)
354
+                  that.count_arr.push(that.result.transBody.outputlist1[i].akc226)
355
+                  that.price_arr.push(that.result.transBody.outputlist1[i].akc225)
280 356
                   that.total_arr.push(that.result.transBody.outputlist1[i].akc264)
281 357
                 }
282 358
 
@@ -289,13 +365,13 @@
289 365
           })
290 366
 
291 367
       } else {
292
-        var record_date = this.paramsObj.record_date;
293
-        console.log('record_date', record_date);
294
-        var patient_id = this.paramsObj.patient_id;
295
-        console.log('patient_id', patient_id);
296
-        var prescription_id = this.paramsObj.prescription_id;
297
-        this.getChargePrint(record_date, patient_id, prescription_id);
298
-        var xtuser = this.$store.getters.xt_user;
368
+        var record_date = this.paramsObj.record_date
369
+        console.log('record_date', record_date)
370
+        var patient_id = this.paramsObj.patient_id
371
+        console.log('patient_id', patient_id)
372
+        var prescription_id = this.paramsObj.prescription_id
373
+        this.getChargePrint(record_date, patient_id, prescription_id)
374
+        var xtuser = this.$store.getters.xt_user
299 375
         this.orgname = xtuser.org.org_name
300 376
 
301 377
       }
@@ -304,11 +380,11 @@
304 380
     watch: {
305 381
       paramsObj: {//深度监听,可监听到对象、数组的变化
306 382
         handler(val, oldVal) {
307
-          this.paramsObj = val;
308
-          this.patient_id = this.paramsObj.patient_id;
309
-          var record_date = this.paramsObj.record;
310
-          this.record_date = record_date;
311
-          var prescription_id = this.paramsObj.prescription_id;
383
+          this.paramsObj = val
384
+          this.patient_id = this.paramsObj.patient_id
385
+          var record_date = this.paramsObj.record
386
+          this.record_date = record_date
387
+          var prescription_id = this.paramsObj.prescription_id
312 388
           this.prescription_id = prescription_id
313 389
 
314 390
         },
@@ -387,9 +463,12 @@
387 463
     .actionBar div {
388 464
         width: 150px;
389 465
     }
390
-    table{
391
-        td{
392
-            padding:0 5px;
393
-        }
466
+
467
+    table {
468
+
469
+    td {
470
+        padding: 0 5px;
471
+    }
472
+
394 473
     }
395 474
 </style>