|
@@ -0,0 +1,294 @@
|
|
1
|
+<template>
|
|
2
|
+ <div id='invoice-print' style="position: relative;">
|
|
3
|
+ <div>
|
|
4
|
+ <span>个人编号:</span>
|
|
5
|
+ </div>
|
|
6
|
+ <div style="">
|
|
7
|
+ <div style="text-align: center;margin-bottom: 10px;">武穴市中医医院</div>
|
|
8
|
+ <!-- <div style="position: absolute;top:70px;left:70px;">{{ list.order_number }}</div> -->
|
|
9
|
+ <!-- <div>{{ list.id_card_no }}</div> -->
|
|
10
|
+ </div>
|
|
11
|
+ <div style="display:flex;">
|
|
12
|
+ <div style="flex: 1;">医疗人员类别:</div>
|
|
13
|
+ <div style="flex: 1;">支付类别:城乡居民基本</div>
|
|
14
|
+ <div style="flex: 1;">医疗照顾人员:</div>
|
|
15
|
+ </div>
|
|
16
|
+ <div style="display:flex;margin: 10px 0;">
|
|
17
|
+ <div style="flex: 1;">{{ paramsObj.name }}</div>
|
|
18
|
+ <div style="flex: 1;"></div>
|
|
19
|
+ <div style="flex: 1;"></div>
|
|
20
|
+ </div>
|
|
21
|
+ <div style="display:flex;">
|
|
22
|
+ <div style="flex: 1;">{{in_hosptial_time?in_hosptial_time.split(' ')[0]:''}}</div>
|
|
23
|
+ <div style="flex: 1;">{{out_hosptial_time?out_hosptial_time.split(' ')[0]:''}}</div>
|
|
24
|
+ <div style="flex: 1;"></div>
|
|
25
|
+ </div>
|
|
26
|
+ <div style="display:flex;margin-top: 30px;">
|
|
27
|
+ <div style="flex: 1;">床位费</div>
|
|
28
|
+ <div style="flex: 1;">{{ list.bedCostTotal }}</div>
|
|
29
|
+ <div style="flex: 1;">治疗费</div>
|
|
30
|
+ <div style="flex: 1;">{{ list.treatCostTotal}}</div>
|
|
31
|
+ <div style="flex: 1;">西药费</div>
|
|
32
|
+ <div style="flex: 1;">{{ list.westernMedicineCostTotal }}</div>
|
|
33
|
+ <div style="flex: 1;">
|
|
34
|
+ <span >草药费</span>
|
|
35
|
+ </div>
|
|
36
|
+ <div style="flex: 1;">
|
|
37
|
+ <span >
|
|
38
|
+ 0
|
|
39
|
+ </span>
|
|
40
|
+ </div>
|
|
41
|
+ </div>
|
|
42
|
+ <div style="display:flex;margin-top: 10px;">
|
|
43
|
+ <div style="flex: 1;">
|
|
44
|
+ <span >护理费</span>
|
|
45
|
+ </div>
|
|
46
|
+ <div style="flex: 1;">
|
|
47
|
+ <span>
|
|
48
|
+ 0
|
|
49
|
+ </span>
|
|
50
|
+ </div>
|
|
51
|
+ <div style="flex: 1;">中成药</div>
|
|
52
|
+ <div style="flex: 1;">{{ list.chineseTraditionalMedicineCostTotal }}</div>
|
|
53
|
+ <div style="flex: 1;">化验费</div>
|
|
54
|
+ <div style="flex: 1;">{{ list.laboratoryCostTotal }}</div>
|
|
55
|
+ <div style="flex: 1;">手术费</div>
|
|
56
|
+ <div style="flex: 1;">{{ list.operationCostTotal }}</div>
|
|
57
|
+ </div>
|
|
58
|
+ <div style="display:flex;margin-top: 10px;">
|
|
59
|
+ <div style="flex: 1;">检查费</div>
|
|
60
|
+ <div style="flex: 1;">{{ list.checkCostTotal }}</div>
|
|
61
|
+ <div style="flex: 1;">材料费</div>
|
|
62
|
+ <div style="flex: 1;">{{ list.materialCostTotal}}</div>
|
|
63
|
+ <div style="flex: 1;">其他费</div>
|
|
64
|
+ <div style="flex: 1;">{{ list.otherCostTotal }}</div>
|
|
65
|
+ <div style="flex: 1;">
|
|
66
|
+ </div>
|
|
67
|
+ <div style="flex: 1;">
|
|
68
|
+ </div>
|
|
69
|
+ </div>
|
|
70
|
+ <div style="position: absolute;top:260px;left:540px">
|
|
71
|
+ {{ totalPrice }}
|
|
72
|
+ </div>
|
|
73
|
+
|
|
74
|
+ <div style="position: absolute;top:290px;width: 100%;">
|
|
75
|
+ <div style="display: flex;">
|
|
76
|
+ <div style="flex: 1;"> 费用总额:</div>
|
|
77
|
+ <div style="flex: 1;">{{totalPrice?totalPrice:'0'}}</div>
|
|
78
|
+ <div style="flex: 1;">基本医疗统筹范围:</div>
|
|
79
|
+ <div style="flex: 1;"> {{list.order.hifp_pay?list.order.hifp_pay:'0'}}</div>
|
|
80
|
+ <div style="flex: 1;">自费费用:</div>
|
|
81
|
+ <div style="flex: 1;">{{ list.order.psn_cash_pay?list.order.psn_cash_pay:'0' }}</div>
|
|
82
|
+ <div style="flex: 1;">医院优惠:</div>
|
|
83
|
+ <div style="flex: 1;">0</div>
|
|
84
|
+ </div>
|
|
85
|
+ </div>
|
|
86
|
+ <div style="position: absolute;top:320px;width: 100%;">
|
|
87
|
+ <div style="display: flex;">
|
|
88
|
+ <div style="flex: 1;">报销总额:</div>
|
|
89
|
+ <div style="flex: 1;">{{ list.order.fund_pay_sumamt ? list.order.fund_pay_sumamt :'0'}}</div>
|
|
90
|
+ <div style="flex: 1;">统筹支付:</div>
|
|
91
|
+ <div style="flex: 1;"> {{list.order.hifp_pay?list.order.hifp_pay:'0'}}</div>
|
|
92
|
+ <div style="flex: 1;">公务员补助:</div>
|
|
93
|
+ <div style="flex: 1;">{{ list.order.cvlserv_pay?list.order.cvlserv_pay:'0' }}</div>
|
|
94
|
+ <div style="flex: 1;">居民大病支付:</div>
|
|
95
|
+ <div style="flex: 1;">{{list.order.hifmi_pay?list.order.hifmi_pay:'0' }}</div>
|
|
96
|
+ </div>
|
|
97
|
+ </div>
|
|
98
|
+
|
|
99
|
+ <div style="position: absolute;top:350px;width: 100%;">
|
|
100
|
+ <div style="display: flex;">
|
|
101
|
+ <div style="flex: 1;">职工大病支付:</div>
|
|
102
|
+ <div style="flex: 1;">{{list.order.hifob_pay?list.order.hifob_pay:'0'}}</div>
|
|
103
|
+ <div style="flex: 1;">医院承担:</div>
|
|
104
|
+ <div style="flex: 1;"> {{list.order.hosp_part_amt ? list.order.hosp_part_amt :'0'}}</div>
|
|
105
|
+ <div style="flex: 1;">医疗救助:</div>
|
|
106
|
+ <div style="flex: 1;">{{ list.order.maf_pay?list.order.maf_pay:'0' }}</div>
|
|
107
|
+ <div style="flex: 1;">企业补充:</div>
|
|
108
|
+ <div style="flex: 1;">{{list.order.hifes_pay ? list.order.hifes_pay :'0'}}</div>
|
|
109
|
+ </div>
|
|
110
|
+ </div>
|
|
111
|
+
|
|
112
|
+ <div style="position: absolute;top:380px;width: 100%;">
|
|
113
|
+ <div style="display: flex;">
|
|
114
|
+ <div style="flex: 1;">其他资金:</div>
|
|
115
|
+ <div style="flex: 1;">{{list.order.oth_pay ? list.order.oth_pay :'0' }}</div>
|
|
116
|
+ <div style="flex: 1;">应付费用:</div>
|
|
117
|
+ <div style="flex: 1;">{{list.order.psn_cash_pay?list.order.psn_cash_pay : '0'}}</div>
|
|
118
|
+ <div style="flex: 1;">预缴金:</div>
|
|
119
|
+ <div style="flex: 1;">{{(parseFloat(pre_pay_money) + parseFloat(list.order.decimal)).toFixed(2) }}</div>
|
|
120
|
+ <div style="flex: 1;">个人账户支付:</div>
|
|
121
|
+ <div style="flex: 1;">{{list.order.acct_pay?list.order.acct_pay:'0' }}</div>
|
|
122
|
+ </div>
|
|
123
|
+ </div>
|
|
124
|
+
|
|
125
|
+ <div style="position: absolute;top:410px;width: 100%;">
|
|
126
|
+ <div style="display: flex;">
|
|
127
|
+ <div style="flex: 1;">支付后账户余额:</div>
|
|
128
|
+ <div style="flex: 1;">{{list.order.balc ? list.order.balc :'0'}}</div>
|
|
129
|
+ <div style="flex: 1;">应收:</div>
|
|
130
|
+ <div style="flex: 1;">{{list.order.psn_cash_pay?list.order.psn_cash_pay : '0'}}</div>
|
|
131
|
+ <div style="flex: 1;">优抚账户:</div>
|
|
132
|
+ <div style="flex: 1;">0</div>
|
|
133
|
+ <div style="flex: 1;">优抚支付:</div>
|
|
134
|
+ <div style="flex: 1;">0</div>
|
|
135
|
+ </div>
|
|
136
|
+ </div>
|
|
137
|
+ </div>
|
|
138
|
+</template>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+<script>
|
|
142
|
+import { getInvoice } from '@/api/project/project'
|
|
143
|
+import {jsGetAge, uParseTime} from "@/utils/tools";
|
|
144
|
+
|
|
145
|
+export default {
|
|
146
|
+ props:{
|
|
147
|
+ paramsObj:Object
|
|
148
|
+ },
|
|
149
|
+ data(){
|
|
150
|
+ return{
|
|
151
|
+ list:null,
|
|
152
|
+ printDate:'',
|
|
153
|
+ zhongwen:'',
|
|
154
|
+ totalPrice:0.0,
|
|
155
|
+ org_id:'',
|
|
156
|
+ org_name:'',
|
|
157
|
+ psn_no:"",
|
|
158
|
+ in_hosptial_time:'',
|
|
159
|
+ out_hosptial_time:'',
|
|
160
|
+ number:'',
|
|
161
|
+ insutype:'',
|
|
162
|
+ pre_pay_money:"",
|
|
163
|
+ }
|
|
164
|
+ },
|
|
165
|
+ mounted(){
|
|
166
|
+ console.log('paramsObj',this.paramsObj)
|
|
167
|
+ let params = {
|
|
168
|
+ order_id: this.paramsObj.order_id,
|
|
169
|
+ patient_id: this.paramsObj.patient_id,
|
|
170
|
+ }
|
|
171
|
+ this.getInvoice(params)
|
|
172
|
+ // var data = new Date();
|
|
173
|
+ // var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
|
|
174
|
+ // var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
|
|
175
|
+ // this.printDate = data.getFullYear() + "-" + month + "-" + date;
|
|
176
|
+ // this.smalltoBIG(982732.21)
|
|
177
|
+ this.org_id = this.$store.getters.xt_user.org_id
|
|
178
|
+ this.org_name = this.$store.getters.xt_user.org.org_name
|
|
179
|
+ },
|
|
180
|
+ methods:{
|
|
181
|
+ getTime(value, temp) {
|
|
182
|
+ if (value != undefined) {
|
|
183
|
+ return uParseTime(value, temp);
|
|
184
|
+ }
|
|
185
|
+ return "";
|
|
186
|
+ },
|
|
187
|
+
|
|
188
|
+ getDay(dateString1,dateString2){
|
|
189
|
+ var startDate = Date.parse(dateString1);
|
|
190
|
+ var endDate = Date.parse(dateString2);
|
|
191
|
+ if (startDate>endDate){
|
|
192
|
+ return 0;
|
|
193
|
+ }
|
|
194
|
+ if (startDate==endDate){
|
|
195
|
+ return 1;
|
|
196
|
+ }
|
|
197
|
+ var days=(endDate - startDate)/(1*24*60*60*1000);
|
|
198
|
+ return days;
|
|
199
|
+
|
|
200
|
+ },
|
|
201
|
+ getInvoice(params){
|
|
202
|
+ getInvoice(params).then((res) => {
|
|
203
|
+ console.log('res',res)
|
|
204
|
+ this.list = res.data.data
|
|
205
|
+ console.log(this.list)
|
|
206
|
+ console.log(this.list.his_hospital_record)
|
|
207
|
+
|
|
208
|
+ this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
|
|
209
|
+ this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
|
|
210
|
+ this.smalltoBIG( this.list.order.medfee_sumamt)
|
|
211
|
+ // var data = new Date(res.data.data.date * 1000);
|
|
212
|
+ var data = new Date(this.paramsObj.setl_time);
|
|
213
|
+ var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
|
|
214
|
+ var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
|
|
215
|
+ this.printDate = data.getFullYear() + "-" + month + "-" + date;
|
|
216
|
+
|
|
217
|
+ if(this.list.his.id > 0){
|
|
218
|
+ this.in_hosptial_time = this.getTime(this.list.his.record_date,'{y}-{m}-{d}')
|
|
219
|
+ this.out_hosptial_time = this.getTime(this.list.his.record_date,'{y}-{m}-{d}')
|
|
220
|
+ }else{
|
|
221
|
+ this.in_hosptial_time = this.list.his_hospital_record.in_hosptial_time.split(' ')[0]
|
|
222
|
+ this.out_hosptial_time = this.list.his_hospital_record.out_hosptial_time.split(' ')[0]
|
|
223
|
+ }
|
|
224
|
+ this.insutype = this.list.order.insutype
|
|
225
|
+ this.id_card_no = this.list.his.id_card_no
|
|
226
|
+ this.number = this.list.his.number
|
|
227
|
+ this.psn_no = this.list.his.psn_no
|
|
228
|
+ this.pre_pay_money = this.list.pre_pay_money
|
|
229
|
+
|
|
230
|
+ this.balance_accounts_type = this.list.his.balance_accounts_type
|
|
231
|
+ this.gend= this.list.his.gend
|
|
232
|
+ })
|
|
233
|
+ },
|
|
234
|
+ smalltoBIG(n) {
|
|
235
|
+ // let fraction = ['角', '分'];
|
|
236
|
+ // let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
237
|
+ // let unit = [['元.', '万,', '亿,'], ["元",'拾', '佰', '仟']];
|
|
238
|
+ // let head = price < 0 ? '欠' : '';
|
|
239
|
+ // price = Math.abs(price);
|
|
240
|
+ // let upper = '';
|
|
241
|
+ // for (let i = 0; i < fraction.length; i++) {
|
|
242
|
+ // upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
243
|
+ // }
|
|
244
|
+ // upper = upper || '整';
|
|
245
|
+ // price = Math.floor(price);
|
|
246
|
+ // for (let i = 0; i < unit[0].length && price > 0; i++) {
|
|
247
|
+ // let p = '';
|
|
248
|
+ // for (let j = 0; j < unit[1].length && price > 0; j++) {
|
|
249
|
+ // p = digit[price % 10] + unit[1][j] + p;
|
|
250
|
+ // price = Math.floor(price / 10);
|
|
251
|
+ // }
|
|
252
|
+ // upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
|
|
253
|
+ // }
|
|
254
|
+ // this.zhongwen = head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整')
|
|
255
|
+ // console.log('6666',head + upper.replace(/(零.)*零圆/, '圆').replace(/(零.)+/g, '零').replace(/^整$/, '零圆整'))
|
|
256
|
+ if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)){
|
|
257
|
+ return "数据非法"; //判断数据是否大于0
|
|
258
|
+ }
|
|
259
|
+
|
|
260
|
+ var unit = "仟佰拾亿仟佰拾万仟佰拾元角分", str = "";
|
|
261
|
+ n += "00";
|
|
262
|
+
|
|
263
|
+ var indexpoint = n.indexOf('.'); // 如果是小数,截取小数点前面的位数
|
|
264
|
+
|
|
265
|
+ if (indexpoint >= 0){
|
|
266
|
+
|
|
267
|
+ n = n.substring(0, indexpoint) + n.substr(indexpoint+1, 2); // 若为小数,截取需要使用的unit单位
|
|
268
|
+ }
|
|
269
|
+
|
|
270
|
+ unit = unit.substr(unit.length - n.length); // 若为整数,截取需要使用的unit单位
|
|
271
|
+ for (var i=0; i < n.length; i++){
|
|
272
|
+ str += "零壹贰叁肆伍陆柒捌玖".charAt(n.charAt(i)) + unit.charAt(i); //遍历转化为大写的数字
|
|
273
|
+ }
|
|
274
|
+
|
|
275
|
+ this.zhongwen = str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
|
|
276
|
+ console.log(this.zhongwen)
|
|
277
|
+ },
|
|
278
|
+
|
|
279
|
+ },
|
|
280
|
+ watch:{
|
|
281
|
+ paramsObj:{//深度监听,可监听到对象、数组的变化
|
|
282
|
+ handler(val, oldVal){
|
|
283
|
+ let params = {
|
|
284
|
+ order_id: val.order_id,
|
|
285
|
+ patient_id: val.patient_id,
|
|
286
|
+ }
|
|
287
|
+ this.getInvoice(params)
|
|
288
|
+
|
|
289
|
+ },
|
|
290
|
+ deep:true
|
|
291
|
+ }
|
|
292
|
+ }
|
|
293
|
+}
|
|
294
|
+</script>
|