|
@@ -11,16 +11,20 @@
|
11
|
11
|
<div>患者姓名:{{ patient.name }}</div>
|
12
|
12
|
<div>性别:{{ patient.gender == 1 ? "男" : "女" }}</div>
|
13
|
13
|
<div>结算类别:{{ getType(his_patient.balance_accounts_type) }}</div>
|
14
|
|
- <div style="min-width:300px;">发票号码:</div>
|
|
14
|
+ <div style="min-width:300px;">发票号码:{{order.fa_piao_number}}</div>
|
15
|
15
|
</div>
|
16
|
16
|
<div class="listInfo">
|
17
|
|
- <div>住院/门诊号:</div>
|
|
17
|
+ <div>住院/门诊号:{{his_patient.number}}</div>
|
18
|
18
|
<div>科室:{{ getDepartment(his_patient.departments) }}</div>
|
19
|
19
|
<div style="min-width:350px;">就诊流水号:{{ his_patient.number }}</div>
|
20
|
20
|
</div>
|
21
|
21
|
<div class="listInfo">
|
22
|
22
|
<div>总费用:{{ getAllPice() }}</div>
|
23
|
|
- <div>个人支付:{{ getActPay() }}</div>
|
|
23
|
+ <div>个人支付:
|
|
24
|
+ <span v-if="this.$route.query.balance_accounts_type == 2">{{ getAllPice() }}</span>
|
|
25
|
+ <span v-if="this.$route.query.balance_accounts_type != 2">{{ getActPay() }}</span>
|
|
26
|
+
|
|
27
|
+ </div>
|
24
|
28
|
<div>基金支付记账:{{ getFundPaySumamt() }}</div>
|
25
|
29
|
<div style="min-width:300px;">补充医疗支付记账:{{ getHifesPay() }}</div>
|
26
|
30
|
</div>
|
|
@@ -40,7 +44,10 @@
|
40
|
44
|
<td style="width: 10%; text-align: center">金额</td>
|
41
|
45
|
</tr>
|
42
|
46
|
<tr v-for="(item, index) in tableData" :key="index">
|
43
|
|
- <td style="width: 19%; text-align: center">{{ index + 1 }}</td>
|
|
47
|
+ <td style="width: 19%; text-align: center">
|
|
48
|
+ <span v-if="item.is_total == 1">{{ index + 1 }}</span>
|
|
49
|
+ <span v-if="item.is_total == 2">合计</span>
|
|
50
|
+ </td>
|
44
|
51
|
<td style="width: 10%; text-align: center">
|
45
|
52
|
<span v-if="item.record_date > 0">{{
|
46
|
53
|
getTimes(item.record_date)
|
|
@@ -54,7 +61,7 @@
|
54
|
61
|
item.project.project.project_name
|
55
|
62
|
}}</span>
|
56
|
63
|
<span v-if="item.project.type == 3"
|
57
|
|
- >{item.project.good_info.good_name}}</span
|
|
64
|
+ >{{item.project.good_info.good_name}}</span
|
58
|
65
|
>
|
59
|
66
|
</span>
|
60
|
67
|
</td>
|
|
@@ -119,6 +126,7 @@ export default {
|
119
|
126
|
{ value: 7, label: "合同" },
|
120
|
127
|
{ value: 8, label: "医保自费" },
|
121
|
128
|
],
|
|
129
|
+ order:{},
|
122
|
130
|
};
|
123
|
131
|
},
|
124
|
132
|
methods: {
|
|
@@ -174,31 +182,34 @@ export default {
|
174
|
182
|
|
175
|
183
|
|
176
|
184
|
this.hisDepatment = response.data.data.hisDepatment;
|
177
|
|
-
|
|
185
|
+
|
|
186
|
+ this.order = response.data.data.order
|
178
|
187
|
this.tableData = [];
|
179
|
188
|
for (let i = 0; i < list.length; i++) {
|
180
|
189
|
for (let j = 0; j < list[i].orders.length; j++) {
|
181
|
190
|
for (let z = 0; z < list[i].orders[j].order_info.length; z++) {
|
182
|
191
|
list[i].orders[j].order_info[z].record_date =
|
183
|
|
- list[i].orders[j].settle_accounts_date;
|
|
192
|
+ list[i].orders[j].settle_accounts_date;
|
184
|
193
|
list[i].orders[j].order_info[z].number =
|
185
|
|
- list[i].orders[j].number;
|
|
194
|
+ list[i].orders[j].number;
|
186
|
195
|
this.tableData.push(list[i].orders[j].order_info[z]);
|
187
|
196
|
}
|
188
|
197
|
}
|
189
|
198
|
}
|
190
|
|
- var obj = { index: "合计", total_price: 0, record_date: "0" };
|
|
199
|
+ var obj = { index: "合计", total_price: 0, record_date: "0",is_total:2 };
|
191
|
200
|
for (let i = 0; i < this.tableData.length; i++) {
|
192
|
201
|
this.tableData[i].index = i + 1;
|
193
|
202
|
this.tableData[i].total_price = 0;
|
|
203
|
+ this.tableData[i].is_total = 1
|
194
|
204
|
this.tableData[i].total_price = (
|
195
|
|
- this.tableData[i].cnt * this.tableData[i].pric
|
196
|
|
- ).toFixed(2);
|
|
205
|
+ this.tableData[i].cnt * this.tableData[i].pric).toFixed(2);
|
197
|
206
|
obj.total_price += this.tableData[i].cnt * this.tableData[i].pric;
|
198
|
207
|
}
|
199
|
208
|
obj.total_price = obj.total_price.toFixed(2);
|
200
|
209
|
this.tableData.push(obj);
|
|
210
|
+ console.log("表哥233232323232233232322323",this.tableData)
|
201
|
211
|
if (this.$route.query.keyword != "") {
|
|
212
|
+ var new_arr = []
|
202
|
213
|
for (let i = 0; i < this.tableData.length; i++) {
|
203
|
214
|
if (this.tableData[i].index != "合计") {
|
204
|
215
|
if (this.tableData[i].advice_id > 0) {
|
|
@@ -232,12 +243,79 @@ export default {
|
232
|
243
|
}
|
233
|
244
|
}
|
234
|
245
|
}
|
235
|
|
- if (this.$route.query.keyword != "") {
|
236
|
|
- this.tableData.push(obj);
|
|
246
|
+ var objs = {index:"合计",total_price:0,record_date:"0",is_total:2}
|
|
247
|
+ for(let i=0;i<new_arr.length;i++){
|
|
248
|
+ new_arr[i].is_total = 1
|
237
|
249
|
}
|
|
250
|
+ objs.total_price = this.getPrice(new_arr)
|
|
251
|
+ new_arr.push(objs)
|
238
|
252
|
this.tableData = new_arr;
|
|
253
|
+ console.log("表哥2333333333333333333333333333",this.tableData)
|
239
|
254
|
}
|
240
|
|
- console.log("tabledata32233223323232", this.tableData);
|
|
255
|
+
|
|
256
|
+ if(this.$route.query.id == 1){
|
|
257
|
+ var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
|
|
258
|
+ var new_arr = []
|
|
259
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
260
|
+ if(this.tableData[i].index!="合计"){
|
|
261
|
+ if(this.tableData[i].advice_id > 0){
|
|
262
|
+ new_arr.push(this.tableData[i])
|
|
263
|
+ }
|
|
264
|
+ }
|
|
265
|
+ }
|
|
266
|
+ this.tableData = []
|
|
267
|
+ obj.total_price = this.getPrice(new_arr)
|
|
268
|
+ for(let i=0;i<new_arr.length;i++){
|
|
269
|
+ new_arr[i].is_total = 1
|
|
270
|
+ }
|
|
271
|
+ new_arr.push(obj)
|
|
272
|
+ this.tableData = new_arr
|
|
273
|
+ }
|
|
274
|
+ if(this.$route.query.id == 2){
|
|
275
|
+ var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
|
|
276
|
+ var new_arr = []
|
|
277
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
278
|
+ if(this.tableData[i].index!="合计"){
|
|
279
|
+ if(this.tableData[i].project_id > 0){
|
|
280
|
+ if(this.tableData[i].project.type ==2){
|
|
281
|
+ new_arr.push(this.tableData[i])
|
|
282
|
+ }
|
|
283
|
+ }
|
|
284
|
+ }
|
|
285
|
+ }
|
|
286
|
+ console.log("项目new_arr",new_arr)
|
|
287
|
+ this.tableData = []
|
|
288
|
+ obj.total_price = this.getPrice(new_arr)
|
|
289
|
+ console.log("ar3233223232",new_arr)
|
|
290
|
+ for(let i=0;i<new_arr.length;i++){
|
|
291
|
+ new_arr[i].is_total = 1
|
|
292
|
+ }
|
|
293
|
+ new_arr.push(obj)
|
|
294
|
+ this.tableData = new_arr
|
|
295
|
+ }
|
|
296
|
+
|
|
297
|
+ if(this.$route.query.id == 3){
|
|
298
|
+ var new_arr = []
|
|
299
|
+ var obj = {index:"合计",total_price:0,record_date:"0",is_total:2}
|
|
300
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
301
|
+ if(this.tableData[i].index!="合计"){
|
|
302
|
+ if(this.tableData[i].project_id > 0){
|
|
303
|
+ if(this.tableData[i].project.type == 3){
|
|
304
|
+ new_arr.push(this.tableData[i])
|
|
305
|
+ }
|
|
306
|
+ }
|
|
307
|
+ }
|
|
308
|
+ }
|
|
309
|
+ this.tableData = []
|
|
310
|
+ obj.total_price = this.getPrice(new_arr)
|
|
311
|
+ for(let i=0;i<new_arr.length;i++){
|
|
312
|
+ new_arr[i].is_total = 1
|
|
313
|
+ }
|
|
314
|
+ new_arr.push(obj)
|
|
315
|
+ console.log("new_arr2332323232",new_arr)
|
|
316
|
+ this.tableData = new_arr
|
|
317
|
+ }
|
|
318
|
+
|
241
|
319
|
}
|
242
|
320
|
});
|
243
|
321
|
},
|
|
@@ -305,6 +383,13 @@ export default {
|
305
|
383
|
}
|
306
|
384
|
return name;
|
307
|
385
|
},
|
|
386
|
+ getPrice(val){
|
|
387
|
+ var total_price = 0
|
|
388
|
+ for(let i=0;i<val.length;i++){
|
|
389
|
+ total_price += val[i].cnt * val[i].pric
|
|
390
|
+ }
|
|
391
|
+ return total_price.toFixed(2)
|
|
392
|
+ }
|
308
|
393
|
},
|
309
|
394
|
created() {
|
310
|
395
|
this.getHisSummaryDetailList();
|