|
@@ -7,48 +7,48 @@
|
7
|
7
|
<div class="listTitle">{{$store.getters.xt_user.org.org_name}}费用发票</div>
|
8
|
8
|
<div class="listTitle_1">{{$store.getters.xt_user.org.org_name}}发票联<span>收</span></div>
|
9
|
9
|
<div class="listInfo">
|
10
|
|
- <div>收费日期:{{$store.getters.xt_user.org.org_name}}</div>
|
11
|
|
- <div style="width:400px">发票代码:{{$store.getters.xt_user.org.org_name}}</div>
|
|
10
|
+ <div>收费日期:{{this.$route.query.end_time}}</div>
|
|
11
|
+ <div style="width:400px">发票代码:</div>
|
12
|
12
|
</div>
|
13
|
13
|
<table class="listTable" table border rules=none cellspacing=0 align=center>
|
14
|
14
|
<tr>
|
15
|
|
- <td>姓名:</td>
|
16
|
|
- <td>科室:</td>
|
|
15
|
+ <td>姓名:{{patient.name}}</td>
|
|
16
|
+ <td>科室:{{getDepartment(his_patient.departments)}}</td>
|
17
|
17
|
<td></td>
|
18
|
18
|
</tr>
|
19
|
19
|
<tr>
|
20
|
20
|
<td>费用类别:</td>
|
21
|
|
- <td>金额(元):</td>
|
|
21
|
+ <td>金额(元):{{getAllPice()}}</td>
|
22
|
22
|
<td></td>
|
23
|
23
|
</tr>
|
24
|
24
|
<tr>
|
25
|
|
- <td>西药</td>
|
26
|
|
- <td>中成药</td>
|
27
|
|
- <td>中草药</td>
|
|
25
|
+ <td>西药:</td>
|
|
26
|
+ <td>中成药:{{chineseTraditionalMedicineCostTotal}}</td>
|
|
27
|
+ <td>中草药:</td>
|
28
|
28
|
</tr>
|
29
|
29
|
<tr>
|
30
|
|
- <td>检查费</td>
|
31
|
|
- <td>输氧费</td>
|
32
|
|
- <td>手术费</td>
|
|
30
|
+ <td>检查费:{{checkCostTotal}}</td>
|
|
31
|
+ <td>输氧费:</td>
|
|
32
|
+ <td>手术费:</td>
|
33
|
33
|
</tr>
|
34
|
34
|
<tr>
|
35
|
|
- <td>化验费</td>
|
36
|
|
- <td>输血费</td>
|
37
|
|
- <td>诊断费</td>
|
|
35
|
+ <td>化验费:{{laboratoryCostTotal}}</td>
|
|
36
|
+ <td>输血费:</td>
|
|
37
|
+ <td>诊断费:{{zhenChaCostTotal}}</td>
|
38
|
38
|
</tr>
|
39
|
39
|
<tr>
|
40
|
|
- <td>治疗费</td>
|
41
|
|
- <td>护理费</td>
|
42
|
|
- <td>床位费</td>
|
|
40
|
+ <td>治疗费:</td>
|
|
41
|
+ <td>护理费:</td>
|
|
42
|
+ <td>床位费:{{bedCostTotal}}</td>
|
43
|
43
|
</tr>
|
44
|
44
|
<tr>
|
45
|
|
- <td>麻醉费</td>
|
46
|
|
- <td>材料费</td>
|
47
|
|
- <td>其他</td>
|
|
45
|
+ <td>麻醉费:</td>
|
|
46
|
+ <td>材料费:{{materialCostTotal}}</td>
|
|
47
|
+ <td>其他:{{otherCostTotal}}</td>
|
48
|
48
|
</tr>
|
49
|
49
|
<tr style="border: 1px solid;">
|
50
|
|
- <td>合计金额(大写):</td>
|
51
|
|
- <td>人民币¥:</td>
|
|
50
|
+ <td>合计金额(大写):{{smalltoBIG(getAllPice() +chineseTraditionalMedicineCostTotal + checkCostTotal + laboratoryCostTotal +zhenChaCostTotal + bedCostTotal + materialCostTotal + otherCostTotal)}}</td>
|
|
51
|
+ <td>人民币¥:{{getAllPice() +chineseTraditionalMedicineCostTotal + checkCostTotal + laboratoryCostTotal +zhenChaCostTotal + bedCostTotal + materialCostTotal + otherCostTotal}}</td>
|
52
|
52
|
<td></td>
|
53
|
53
|
</tr>
|
54
|
54
|
<tr style="height: 65px;">
|
|
@@ -65,7 +65,7 @@
|
65
|
65
|
收费员:
|
66
|
66
|
</div>
|
67
|
67
|
<div style="width:300px">
|
68
|
|
- 年 月 日
|
|
68
|
+ {{printDate}}
|
69
|
69
|
</div>
|
70
|
70
|
</div>
|
71
|
71
|
</div>
|
|
@@ -93,6 +93,7 @@
|
93
|
93
|
operationCostTotal:"",//材料费
|
94
|
94
|
zhenChaCostTotal:"",//诊查费
|
95
|
95
|
otherCostTotal:"",//其他费用
|
|
96
|
+ printDate:"",
|
96
|
97
|
}
|
97
|
98
|
},
|
98
|
99
|
methods:{
|
|
@@ -125,7 +126,7 @@
|
125
|
126
|
getTimes(time) {
|
126
|
127
|
return uParseTime(time, '{y}-{m}-{d}')
|
127
|
128
|
},
|
128
|
|
- getGatherDetailList() {
|
|
129
|
+ getGatherDetailList() {
|
129
|
130
|
let start_time = this.$route.query.start_time
|
130
|
131
|
let end_time = this.$route.query.end_time
|
131
|
132
|
let params = {
|
|
@@ -152,9 +153,12 @@
|
152
|
153
|
if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
|
153
|
154
|
//获取所有项目类型进行去重
|
154
|
155
|
let med_chrgitm_types = []
|
155
|
|
- for (let i = 0; i < order_info.length; i++) {
|
156
|
|
- med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
|
156
|
+ if(order_info!=undefined && order_info.length > 0){
|
|
157
|
+ for (let i = 0; i < order_info.length; i++) {
|
|
158
|
+ med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
|
159
|
+ }
|
157
|
160
|
}
|
|
161
|
+
|
158
|
162
|
const obj = {}
|
159
|
163
|
med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
|
160
|
164
|
obj[next] ? '' : obj[next] = true && cur.push(next)
|
|
@@ -187,12 +191,75 @@
|
187
|
191
|
newobj['is_total'] = 1
|
188
|
192
|
|
189
|
193
|
this.list.push(newobj)
|
|
194
|
+
|
|
195
|
+ var new_arr = []
|
|
196
|
+ if(this.$route.query.keyword!=""){
|
|
197
|
+
|
|
198
|
+ for(let i=0;i<this.list.length;i++){
|
|
199
|
+ if(this.list[i].is_total == 2){
|
|
200
|
+ if(this.list[i].name.indexOf(this.$route.query.keyword)>-1){
|
|
201
|
+ new_arr.push(this.list[i])
|
|
202
|
+ }
|
|
203
|
+ }
|
|
204
|
+
|
|
205
|
+ }
|
|
206
|
+ var new_arr_two = []
|
|
207
|
+ for(let i=0;i<tempDetails.length;i++){
|
|
208
|
+ if(tempDetails[i].advice_id >0){
|
|
209
|
+ tempDetails[i].name = tempDetails[i].advice.advice_name
|
|
210
|
+ }
|
|
211
|
+ if(tempDetails[i].project_id > 0){
|
|
212
|
+ if(tempDetails[i].type == 2 ){
|
|
213
|
+ tempDetails[i].name = tempDetails[i].project.project_name
|
|
214
|
+ }
|
|
215
|
+ if(tempDetails[i].type == 3){
|
|
216
|
+ tempDetails[i].name = tempDetails[i].good_info.good_name
|
|
217
|
+ }
|
|
218
|
+ }
|
|
219
|
+ if(tempDetails[i].name.indexOf(this.$route.query.keyword) > -1){
|
|
220
|
+ new_arr_two.push(tempDetails[i])
|
|
221
|
+ }
|
|
222
|
+ }
|
|
223
|
+ this.list = []
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+ this.list = new_arr
|
|
227
|
+ obj.details = []
|
|
228
|
+ obj.details = this.setNewData(new_arr_two)
|
|
229
|
+
|
|
230
|
+ obj.total = this.getTotal(obj.details)
|
|
231
|
+ obj.details.push({
|
|
232
|
+ total: obj.total,
|
|
233
|
+ is_total: 1,
|
|
234
|
+ })
|
|
235
|
+ for(let i=0;i<obj.details.length;i++){
|
|
236
|
+ if(obj.details[i].is_total == 1){
|
|
237
|
+ obj.details[i].index = "合计"
|
|
238
|
+ }else{
|
|
239
|
+ obj.details[i].index = i+1
|
|
240
|
+ }
|
|
241
|
+ }
|
|
242
|
+
|
|
243
|
+ this.list = obj.details
|
|
244
|
+ this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
|
|
245
|
+ this.checkCostTotal = response.data.data.checkCostTotal
|
|
246
|
+ this.materialCostTotal = response.data.data.materialCostTotal
|
|
247
|
+ this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
|
|
248
|
+ this.bedCostTotal = response.data.data.bedCostTotal
|
|
249
|
+ this.operationCostTotal = response.data.data.operationCostTotal
|
|
250
|
+ this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
|
|
251
|
+ this.otherCostTotal = response.data.data.otherCostTotal
|
|
252
|
+
|
|
253
|
+ }
|
190
|
254
|
}else{
|
191
|
255
|
//获取所有项目类型进行去重
|
192
|
256
|
let med_chrgitm_types = []
|
193
|
|
- for (let i = 0; i < order_info.length; i++) {
|
194
|
|
- med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
|
257
|
+ if(order_info!=undefined && order_info.length > 0){
|
|
258
|
+ for (let i = 0; i < order_info.length; i++) {
|
|
259
|
+ med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
|
260
|
+ }
|
195
|
261
|
}
|
|
262
|
+
|
196
|
263
|
|
197
|
264
|
const obj = {}
|
198
|
265
|
med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
|
|
@@ -221,18 +288,70 @@
|
221
|
288
|
})
|
222
|
289
|
|
223
|
290
|
this.list = this.list.concat(obj.details)
|
224
|
|
- console.log("oh2323232323233223232323233",this.list)
|
|
291
|
+
|
225
|
292
|
for(let i=0;i<this.list.length;i++){
|
226
|
293
|
this.list[i].index = i+1
|
227
|
294
|
}
|
228
|
|
- this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
|
229
|
|
- this.checkCostTotal = response.data.data.checkCostTotal
|
230
|
|
- this.materialCostTotal = response.data.data.materialCostTotal
|
231
|
|
- this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
|
232
|
|
- this.bedCostTotal = response.data.data.bedCostTotal
|
233
|
|
- this.operationCostTotal = response.data.data.operationCostTotal
|
234
|
|
- this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
|
235
|
|
- this.otherCostTotal = response.data.data.otherCostTotal
|
|
295
|
+ var new_arr = []
|
|
296
|
+ if(this.$route.query.keyword!=""){
|
|
297
|
+ console.log("锦鲤3332232332233223322332",this.list)
|
|
298
|
+ for(let i=0;i<this.list.length;i++){
|
|
299
|
+ if(this.list[i].is_total == 2){
|
|
300
|
+ if(this.list[i].name.indexOf(this.$route.query.keyword)>-1){
|
|
301
|
+ new_arr.push(this.list[i])
|
|
302
|
+ }
|
|
303
|
+ }
|
|
304
|
+
|
|
305
|
+ }
|
|
306
|
+ var new_arr_two = []
|
|
307
|
+ for(let i=0;i<tempDetails.length;i++){
|
|
308
|
+ if(tempDetails[i].advice_id >0){
|
|
309
|
+ tempDetails[i].name = tempDetails[i].advice.advice_name
|
|
310
|
+ }
|
|
311
|
+ if(tempDetails[i].project_id > 0){
|
|
312
|
+ if(tempDetails[i].type == 2 ){
|
|
313
|
+ tempDetails[i].name = tempDetails[i].project.project_name
|
|
314
|
+ }
|
|
315
|
+ if(tempDetails[i].type == 3){
|
|
316
|
+ tempDetails[i].name = tempDetails[i].good_info.good_name
|
|
317
|
+ }
|
|
318
|
+ }
|
|
319
|
+ if(tempDetails[i].name.indexOf(this.$route.query.keyword) > -1){
|
|
320
|
+ new_arr_two.push(tempDetails[i])
|
|
321
|
+ }
|
|
322
|
+ }
|
|
323
|
+ this.list = []
|
|
324
|
+ console.log("new_arr2323232333333232",new_arr)
|
|
325
|
+
|
|
326
|
+ this.list = new_arr
|
|
327
|
+ obj.details = []
|
|
328
|
+ obj.details = this.setNewData(new_arr_two)
|
|
329
|
+
|
|
330
|
+ obj.total = this.getTotal(obj.details)
|
|
331
|
+ obj.details.push({
|
|
332
|
+ total: obj.total,
|
|
333
|
+ is_total: 1,
|
|
334
|
+ })
|
|
335
|
+ for(let i=0;i<obj.details.length;i++){
|
|
336
|
+ if(obj.details[i].is_total == 1){
|
|
337
|
+ obj.details[i].index = "合计"
|
|
338
|
+ }else{
|
|
339
|
+ obj.details[i].index = i+1
|
|
340
|
+ }
|
|
341
|
+ }
|
|
342
|
+ console.log("obj23323232323232323232",obj.details)
|
|
343
|
+ this.list = obj.details
|
|
344
|
+ }
|
|
345
|
+ this.chineseTraditionalMedicineCostTotal = response.data.data.chineseTraditionalMedicineCostTotal
|
|
346
|
+ this.checkCostTotal = response.data.data.checkCostTotal
|
|
347
|
+ this.materialCostTotal = response.data.data.materialCostTotal
|
|
348
|
+ this.laboratoryCostTotal = response.data.data.laboratoryCostTotal
|
|
349
|
+ this.bedCostTotal = response.data.data.bedCostTotal
|
|
350
|
+ this.operationCostTotal = response.data.data.operationCostTotal
|
|
351
|
+ this.zhenChaCostTotal = response.data.data.zhenChaCostTotal
|
|
352
|
+ this.otherCostTotal = response.data.data.otherCostTotal
|
|
353
|
+
|
|
354
|
+
|
236
|
355
|
}
|
237
|
356
|
}
|
238
|
357
|
}
|
|
@@ -512,7 +631,6 @@
|
512
|
631
|
return name
|
513
|
632
|
},
|
514
|
633
|
getAllPice(){
|
515
|
|
- console.log("liust23322332323223",this.list)
|
516
|
634
|
var total_price = 0
|
517
|
635
|
for(let i=0;i<this.list.length;i++){
|
518
|
636
|
if(this.list[i].is_total ==2){
|
|
@@ -525,10 +643,58 @@
|
525
|
643
|
return total_price
|
526
|
644
|
}
|
527
|
645
|
|
528
|
|
- }
|
|
646
|
+ },
|
|
647
|
+ smalltoBIG(n) {
|
|
648
|
+ // let fraction = ['角', '分'];
|
|
649
|
+ // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
650
|
+ // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
|
|
651
|
+ // let head = price < 0 ? '欠' : '';
|
|
652
|
+ // price = Math.abs(price);
|
|
653
|
+ // let upper = '';
|
|
654
|
+ // for (let i = 0; i < fraction.length; i++) {
|
|
655
|
+ // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
656
|
+ // }
|
|
657
|
+ // upper = upper || '整';
|
|
658
|
+ // price = Math.floor(price);
|
|
659
|
+ // for (let i = 0; i < unit[0].length && price > 0; i++) {
|
|
660
|
+ // let p = '';
|
|
661
|
+ // for (let j = 0; j < unit[1].length && price > 0; j++) {
|
|
662
|
+ // p = digit[price % 10] + unit[1][j] + p;
|
|
663
|
+ // price = Math.floor(price / 10);
|
|
664
|
+ // }
|
|
665
|
+ // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
|
|
666
|
+ // }
|
|
667
|
+ // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
|
|
668
|
+ // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
|
|
669
|
+ if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
|
|
670
|
+ return "数据非法"; //判断数据是否大于0
|
|
671
|
+ }
|
|
672
|
+
|
|
673
|
+ var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
|
|
674
|
+ n += "00";
|
|
675
|
+
|
|
676
|
+ var indexpoint = n.indexOf('.'); // 如果是小数,截取小数点前面的位数
|
|
677
|
+
|
|
678
|
+ if (indexpoint >= 0){
|
|
679
|
+
|
|
680
|
+ n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2); // 若为小数,截取需要使用的unit单位
|
|
681
|
+ }
|
|
682
|
+
|
|
683
|
+ unit = unit.substr(unit.length - n.length); // 若为整数,截取需要使用的unit单位
|
|
684
|
+ for (var i=0; i < n.length; i++){
|
|
685
|
+ str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i); //遍历转化为大写的数字
|
|
686
|
+ }
|
|
687
|
+
|
|
688
|
+ this.zhongwen = str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
|
|
689
|
+ return this.zhongwen
|
|
690
|
+ },
|
529
|
691
|
},
|
530
|
692
|
created(){
|
531
|
693
|
this.getGatherDetailList()
|
|
694
|
+ var data = new Date();
|
|
695
|
+ var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
|
|
696
|
+ var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
|
|
697
|
+ this.printDate = data.getFullYear() + "-" + month + "-" + date;
|
532
|
698
|
}
|
533
|
699
|
|
534
|
700
|
}
|