|
@@ -1,18 +1,23 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div>
|
3
|
|
- <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
|
|
3
|
+ <div
|
|
4
|
+ style="display: flex; justify-content: space-between; margin-bottom: 10px"
|
|
5
|
+ >
|
4
|
6
|
<div>
|
5
|
|
- <el-select size="small" v-model="item_type" placeholder="请选择"
|
6
|
|
- style="width:150px;margin-left:10px;" @change="changeItem">
|
7
|
|
- <el-option
|
8
|
|
- label="全部"
|
9
|
|
- value="0">
|
10
|
|
- </el-option>
|
|
7
|
+ <el-select
|
|
8
|
+ size="small"
|
|
9
|
+ v-model="item_type"
|
|
10
|
+ placeholder="请选择"
|
|
11
|
+ style="width: 150px; margin-left: 10px"
|
|
12
|
+ @change="changeItem"
|
|
13
|
+ >
|
|
14
|
+ <el-option label="全部" value=0> </el-option>
|
11
|
15
|
<el-option
|
12
|
|
- v-for="(item,index) in items"
|
13
|
|
- :key="index"
|
14
|
|
- :label="item.name"
|
15
|
|
- :value="item.id">
|
|
16
|
+ v-for="(item, index) in items"
|
|
17
|
+ :key="index"
|
|
18
|
+ :label="item.name"
|
|
19
|
+ :value="item.id"
|
|
20
|
+ >
|
16
|
21
|
</el-option>
|
17
|
22
|
</el-select>
|
18
|
23
|
|
|
@@ -29,109 +34,148 @@
|
29
|
34
|
class="filter-item"
|
30
|
35
|
type="primary"
|
31
|
36
|
@click="searchAction"
|
32
|
|
- >搜索
|
|
37
|
+ >搜索
|
33
|
38
|
</el-button>
|
34
|
39
|
<el-date-picker
|
35
|
|
- v-model="chargeDate"
|
36
|
|
- type="daterange"
|
37
|
|
- value-format="yyyy-MM-dd"
|
38
|
|
- range-separator="至"
|
39
|
|
- start-placeholder="开始日期"
|
40
|
|
- @change="changeDate"
|
41
|
|
- end-placeholder="结束日期">
|
|
40
|
+ v-model="chargeDate"
|
|
41
|
+ type="daterange"
|
|
42
|
+ value-format="yyyy-MM-dd"
|
|
43
|
+ range-separator="至"
|
|
44
|
+ start-placeholder="开始日期"
|
|
45
|
+ @change="changeDate"
|
|
46
|
+ end-placeholder="结束日期"
|
|
47
|
+ >
|
42
|
48
|
</el-date-picker>
|
43
|
|
- <el-button type="primary" size="small" @click="toPrint">打印</el-button>
|
44
|
|
- </div>
|
45
|
|
- <div>
|
|
49
|
+ <el-button type="primary" size="small" @click="toPrint">打印</el-button>
|
46
|
50
|
</div>
|
|
51
|
+ <div></div>
|
47
|
52
|
</div>
|
48
|
|
- <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
|
49
|
|
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
50
|
|
- max-height="600"
|
51
|
|
- show-summary
|
52
|
|
- v-loading="detail_loading"
|
53
|
|
- highlight-current-row>
|
|
53
|
+ <el-table
|
|
54
|
+ :data="tableData"
|
|
55
|
+ border
|
|
56
|
+ :row-style="{ color: '#303133' }"
|
|
57
|
+ ref="table"
|
|
58
|
+ :header-cell-style="{
|
|
59
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
60
|
+ color: '#606266',
|
|
61
|
+ }"
|
|
62
|
+ max-height="600"
|
|
63
|
+ show-summary
|
|
64
|
+ v-loading="detail_loading"
|
|
65
|
+ highlight-current-row
|
|
66
|
+ >
|
54
|
67
|
<el-table-column type="index" label="序号" width="60px" align="center">
|
55
|
68
|
<template slot-scope="scope">
|
56
|
|
- {{scope.row.index}}
|
|
69
|
+ {{ scope.row.index }}
|
57
|
70
|
</template>
|
58
|
71
|
</el-table-column>
|
59
|
72
|
<el-table-column align="center" label="处方日期">
|
60
|
|
- <template slot-scope="scope">{{getTime(scope.row.record_date)}}</template>
|
|
73
|
+ <template slot-scope="scope">{{
|
|
74
|
+ getTime(scope.row.record_date)
|
|
75
|
+ }}</template>
|
61
|
76
|
</el-table-column>
|
62
|
77
|
<el-table-column align="center" label="费用编码">
|
63
|
78
|
<template slot-scope="scope">
|
64
|
|
- {{scope.row.number}}
|
|
79
|
+ {{ scope.row.number }}
|
65
|
80
|
</template>
|
66
|
81
|
</el-table-column>
|
67
|
82
|
<el-table-column align="center" label="项目名称">
|
68
|
83
|
<template slot-scope="scope">
|
69
|
|
- <span v-if="scope.row.advice_id > 0">{{scope.row.advice.advice_name}}</span>
|
|
84
|
+ <span v-if="scope.row.advice_id > 0">{{
|
|
85
|
+ scope.row.advice.advice_name
|
|
86
|
+ }}</span>
|
70
|
87
|
<span v-if="scope.row.project_id > 0">
|
71
|
|
- <span v-if="scope.row.project.type == 2">{{scope.row.project.project.project_name}}</span>
|
72
|
|
- <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.good_name}}</span>
|
|
88
|
+ <span v-if="scope.row.project.type == 2">{{
|
|
89
|
+ scope.row.project.project.project_name
|
|
90
|
+ }}</span>
|
|
91
|
+ <span v-if="scope.row.project.type == 3">{{
|
|
92
|
+ scope.row.project.good_info.good_name
|
|
93
|
+ }}</span>
|
73
|
94
|
</span>
|
74
|
95
|
</template>
|
75
|
96
|
</el-table-column>
|
76
|
97
|
<el-table-column align="center" label="规格">
|
77
|
98
|
<template slot-scope="scope">
|
78
|
|
- <span v-if="scope.row.advice_id > 0">{{scope.row.advice.drug.dose}}{{scope.row.advice.drug.dose_unit}}*{{scope.row.advice.drug.min_number}}{{scope.row.advice.drug.min_unit}}/{{scope.row.advice.drug.max_unit}}</span>
|
|
99
|
+ <span v-if="scope.row.advice_id > 0"
|
|
100
|
+ >{{ scope.row.advice.drug.dose
|
|
101
|
+ }}{{ scope.row.advice.drug.dose_unit }}*{{
|
|
102
|
+ scope.row.advice.drug.min_number
|
|
103
|
+ }}{{ scope.row.advice.drug.min_unit }}/{{
|
|
104
|
+ scope.row.advice.drug.max_unit
|
|
105
|
+ }}</span
|
|
106
|
+ >
|
79
|
107
|
<span v-if="scope.row.project_id > 0">
|
80
|
|
- <span v-if="scope.row.project.type == 2">{{scope.row.project.project.project_name}}</span>
|
81
|
|
- <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.specification_name}}</span>
|
|
108
|
+ <span v-if="scope.row.project.type == 2">{{
|
|
109
|
+ scope.row.project.project.project_name
|
|
110
|
+ }}</span>
|
|
111
|
+ <span v-if="scope.row.project.type == 3">{{
|
|
112
|
+ scope.row.project.good_info.specification_name
|
|
113
|
+ }}</span>
|
82
|
114
|
</span>
|
83
|
115
|
</template>
|
84
|
116
|
</el-table-column>
|
85
|
|
- <el-table-column align="center" label="数量">
|
|
117
|
+ <el-table-column align="center" label="数量">
|
86
|
118
|
<template slot-scope="scope">
|
87
|
|
- {{scope.row.cnt}}
|
|
119
|
+ {{ scope.row.cnt }}
|
88
|
120
|
</template>
|
89
|
121
|
</el-table-column>
|
90
|
122
|
<el-table-column align="center" label="单位">
|
91
|
123
|
<template slot-scope="scope">
|
92
|
|
- <span v-if="scope.row.advice_id > 0">{{scope.row.advice.prescribing_number_unit}}</span>
|
|
124
|
+ <span v-if="scope.row.advice_id > 0">{{
|
|
125
|
+ scope.row.advice.prescribing_number_unit
|
|
126
|
+ }}</span>
|
93
|
127
|
<span v-if="scope.row.project_id > 0">
|
94
|
|
- <span v-if="scope.row.project.type == 2">{{scope.row.project.project.unit}}</span>
|
95
|
|
- <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.packing_unit}}</span>
|
|
128
|
+ <span v-if="scope.row.project.type == 2">{{
|
|
129
|
+ scope.row.project.project.unit
|
|
130
|
+ }}</span>
|
|
131
|
+ <span v-if="scope.row.project.type == 3">{{
|
|
132
|
+ scope.row.project.good_info.packing_unit
|
|
133
|
+ }}</span>
|
96
|
134
|
</span>
|
97
|
135
|
</template>
|
98
|
136
|
</el-table-column>
|
99
|
137
|
<el-table-column align="center" label="单价">
|
100
|
138
|
<template slot-scope="scope">
|
101
|
|
- {{scope.row.pric}}
|
|
139
|
+ {{ scope.row.pric }}
|
102
|
140
|
</template>
|
103
|
141
|
</el-table-column>
|
104
|
142
|
<el-table-column align="center" label="金额" prop="total_price">
|
105
|
143
|
<template slot-scope="scope">
|
106
|
144
|
<div>
|
107
|
|
- {{scope.row.total_price}}
|
|
145
|
+ {{ scope.row.total_price }}
|
108
|
146
|
</div>
|
109
|
147
|
</template>
|
110
|
148
|
</el-table-column>
|
111
|
149
|
<el-table-column align="center" prop="name" label="备注">
|
112
|
150
|
<template slot-scope="scope">
|
113
|
151
|
<div>
|
114
|
|
- <span v-if="scope.row.advice_id > 0">{{scope.row.advice.remark}}</span>
|
|
152
|
+ <span v-if="scope.row.advice_id > 0">{{
|
|
153
|
+ scope.row.advice.remark
|
|
154
|
+ }}</span>
|
115
|
155
|
<span v-if="scope.row.project_id > 0">
|
116
|
|
- <span v-if="scope.row.project.type == 2">{{scope.row.project.remark}}</span>
|
117
|
|
- <span v-if="scope.row.project.type == 3">{{scope.row.project.remark}}</span>
|
|
156
|
+ <span v-if="scope.row.project.type == 2">{{
|
|
157
|
+ scope.row.project.remark
|
|
158
|
+ }}</span>
|
|
159
|
+ <span v-if="scope.row.project.type == 3">{{
|
|
160
|
+ scope.row.project.remark
|
|
161
|
+ }}</span>
|
118
|
162
|
</span>
|
119
|
163
|
</div>
|
120
|
164
|
</template>
|
121
|
165
|
</el-table-column>
|
122
|
|
-
|
123
|
166
|
</el-table>
|
124
|
|
- <div style="display:flex;justify-content: space-around;margin-top: 25px;">
|
125
|
|
- <div>总费用:{{getAllPice()}}</div>
|
126
|
|
- <div>个人支付:
|
127
|
|
- <span v-if="his_record_patient.balance_accounts_type == 2">{{getAllPice()}}</span>
|
128
|
|
- <span v-if="his_record_patient.balance_accounts_type != 2">{{getActPay()}}</span>
|
129
|
|
- </div>
|
130
|
|
- <div>基金支付记账:{{getFundPaySumamt()}}</div>
|
131
|
|
- <div>补充医疗支付记账:{{getHifesPay()}}</div>
|
132
|
|
- <div>救助支付金额:{{getMafPay()}}</div>
|
|
167
|
+ <div style="display: flex; justify-content: space-around; margin-top: 25px">
|
|
168
|
+ <div>总费用:{{ getAllPice() }}</div>
|
|
169
|
+ <div>
|
|
170
|
+ 个人支付: <span v-if="his_patient.balance_accounts_type == 2"></span>
|
|
171
|
+ {{ getAllPice() }}
|
|
172
|
+ <span v-if="his_patient.balance_accounts_type != 2"></span>
|
|
173
|
+ {{ getActPay() }}
|
|
174
|
+ </div>
|
|
175
|
+ <div>基金支付记账:{{ getFundPaySumamt() }}</div>
|
|
176
|
+ <div>补充医疗支付记账:{{ getHifesPay() }}</div>
|
|
177
|
+ <div>救助支付金额:{{ getMafPay() }}</div>
|
133
|
178
|
</div>
|
134
|
|
-
|
135
|
179
|
</div>
|
136
|
180
|
|
137
|
181
|
<!-- </div> -->
|
|
@@ -139,262 +183,359 @@
|
139
|
183
|
|
140
|
184
|
|
141
|
185
|
<script>
|
142
|
|
-import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
143
|
|
-import { getHisSummaryDetailList } from '@/api/his/his_tools'
|
144
|
|
-const moment = require('moment')
|
145
|
|
-import { uParseTime } from '@/utils/tools'
|
|
186
|
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
|
187
|
+import { getHisSummaryDetailList } from "@/api/his/his_tools";
|
|
188
|
+const moment = require("moment");
|
|
189
|
+import { uParseTime } from "@/utils/tools";
|
146
|
190
|
export default {
|
147
|
191
|
components: {
|
148
|
|
- BreadCrumb
|
149
|
|
-
|
|
192
|
+ BreadCrumb,
|
150
|
193
|
},
|
151
|
194
|
props: {
|
152
|
195
|
patient_id: {
|
153
|
196
|
type: Number,
|
154
|
|
- default: 0
|
155
|
|
- }
|
|
197
|
+ default: 0,
|
|
198
|
+ },
|
156
|
199
|
},
|
157
|
200
|
|
158
|
201
|
data() {
|
159
|
|
-
|
160
|
202
|
return {
|
161
|
203
|
detail_loading: false,
|
162
|
204
|
tempArr: [],
|
163
|
205
|
pos: 0,
|
164
|
|
- search_input: '',
|
|
206
|
+ search_input: "",
|
165
|
207
|
|
166
|
208
|
sameRowArr: [],
|
167
|
|
- keywords: '',
|
|
209
|
+ keywords: "",
|
168
|
210
|
tableData: [],
|
169
|
|
- chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
|
170
|
|
- item_type: '0',
|
|
211
|
+ chargeDate: [
|
|
212
|
+ moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
|
|
213
|
+ moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
|
|
214
|
+ ],
|
|
215
|
+ item_type: "0",
|
171
|
216
|
items: [
|
172
|
|
- { id: 1, name: '药品' },
|
173
|
|
- { id: 2, name: '项目' },
|
174
|
|
- { id: 3, name: '耗材' },
|
175
|
|
-
|
|
217
|
+ { id: 1, name: "药品" },
|
|
218
|
+ { id: 2, name: "项目" },
|
|
219
|
+ { id: 3, name: "耗材" },
|
176
|
220
|
],
|
177
|
|
- list:[],
|
178
|
|
- his_patient:{},
|
179
|
|
- id:0,
|
180
|
|
- start_time:"",
|
181
|
|
- end_time:"",
|
182
|
|
- his_record_patient:{},
|
183
|
|
- orderList:[],
|
184
|
|
- }
|
|
221
|
+ list: [],
|
|
222
|
+ his_patient: {},
|
|
223
|
+ id: 0,
|
|
224
|
+ start_time: "",
|
|
225
|
+ end_time: "",
|
|
226
|
+ };
|
185
|
227
|
},
|
186
|
228
|
methods: {
|
187
|
229
|
getTime(val) {
|
188
|
|
- if(val <= 0){
|
189
|
|
- return ""
|
|
230
|
+ if (val <= 0) {
|
|
231
|
+ return "";
|
|
232
|
+ }
|
|
233
|
+ if (val == "") {
|
|
234
|
+ return "";
|
|
235
|
+ } else {
|
|
236
|
+ return uParseTime(val, "{y}-{m}-{d}");
|
190
|
237
|
}
|
191
|
|
- if(val == ""){
|
192
|
|
- return ""
|
193
|
|
- }else {
|
194
|
|
- return uParseTime(val, '{y}-{m}-{d}')
|
|
238
|
+ },
|
|
239
|
+ searchAction() {
|
|
240
|
+ let table_id = this.$store.getters.pagedata.list.table_id;
|
|
241
|
+ if (table_id == undefined) {
|
|
242
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
243
|
+ table_id: 0,
|
|
244
|
+ type_id: this.id,
|
|
245
|
+ keywords: this.keywords,
|
|
246
|
+ start_time: this.chargeDate[0],
|
|
247
|
+ end_time: this.chargeDate[1],
|
|
248
|
+ patient_id: this.patient_id,
|
|
249
|
+ });
|
|
250
|
+ } else {
|
|
251
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
252
|
+ table_id: table_id,
|
|
253
|
+ type_id: this.id,
|
|
254
|
+ keywords: this.keywords,
|
|
255
|
+ start_time: this.chargeDate[0],
|
|
256
|
+ end_time: this.chargeDate[1],
|
|
257
|
+ patient_id: this.patient_id,
|
|
258
|
+ });
|
195
|
259
|
}
|
196
|
|
- },
|
197
|
|
- searchAction(){
|
198
|
|
- this.getHisSummaryDetailList()
|
|
260
|
+ this.getHisSummaryDetailList();
|
199
|
261
|
},
|
200
|
262
|
changeDate() {
|
201
|
|
- this.start_time = this.chargeDate[0]
|
202
|
|
- this.end_time = this.chargeDate[1]
|
203
|
|
- this.getHisSummaryDetailList()
|
|
263
|
+ this.start_time = this.chargeDate[0];
|
|
264
|
+ this.end_time = this.chargeDate[1];
|
|
265
|
+ this.getHisSummaryDetailList();
|
204
|
266
|
},
|
205
|
267
|
changeItem(id) {
|
206
|
|
- this.id = id
|
207
|
|
- this.getHisSummaryDetailList()
|
208
|
|
-
|
|
268
|
+ this.id = id;
|
|
269
|
+ let table_id = this.$store.getters.pagedata.list.table_id;
|
|
270
|
+ if (table_id == undefined) {
|
|
271
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
272
|
+ table_id: 0,
|
|
273
|
+ type_id: this.id,
|
|
274
|
+ keywords: this.keywords,
|
|
275
|
+ start_time: this.chargeDate[0],
|
|
276
|
+ end_time: this.chargeDate[1],
|
|
277
|
+ patient_id: this.patient_id,
|
|
278
|
+ });
|
|
279
|
+ } else {
|
|
280
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
281
|
+ table_id: table_id,
|
|
282
|
+ type_id: this.id,
|
|
283
|
+ keywords: this.keywords,
|
|
284
|
+ start_time: this.chargeDate[0],
|
|
285
|
+ end_time: this.chargeDate[1],
|
|
286
|
+ patient_id: this.patient_id,
|
|
287
|
+ });
|
|
288
|
+ }
|
|
289
|
+ this.getHisSummaryDetailList();
|
209
|
290
|
},
|
210
|
291
|
getHisSummaryDetailList() {
|
211
|
|
- let start_time = this.chargeDate[0]
|
212
|
|
- let end_time = this.chargeDate[1]
|
213
|
|
-
|
|
292
|
+ let start_time = this.chargeDate[0];
|
|
293
|
+ let end_time = this.chargeDate[1];
|
214
|
294
|
let params = {
|
215
|
|
- patient_id:this.patient_id,
|
|
295
|
+ patient_id: this.patient_id,
|
216
|
296
|
start_time: start_time,
|
217
|
297
|
end_time: end_time,
|
218
|
298
|
type: this.item_type,
|
219
|
|
- keyword: this.keywords
|
220
|
|
- }
|
221
|
|
- getHisSummaryDetailList(params).then(response=>{
|
222
|
|
- if(response.data.state == 1){
|
223
|
|
- var list = response.data.data.list
|
224
|
|
- this.his_patient = response.data.data.his_patient
|
225
|
|
- this.his_record_patient = response.data.data.his_record_patient
|
226
|
|
- console.log("his_record_patient",this.his_record_patient)
|
227
|
|
-
|
228
|
|
- this.orderList = response.data.data.orderList
|
229
|
|
- console.log("orderlist2332322333232323232",this.orderList)
|
230
|
|
- this.list = list
|
231
|
|
- this.tableData = []
|
232
|
|
- for(let i=0;i<list.length;i++){
|
233
|
|
- for(let j=0;j<list[i].orders.length;j++){
|
234
|
|
- for(let z=0;z<list[i].orders[j].order_info.length;z++){
|
235
|
|
- list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
|
236
|
|
- list[i].orders[j].order_info[z].number = list[i].orders[j].number
|
237
|
|
- this.tableData.push(list[i].orders[j].order_info[z])
|
238
|
|
- }
|
|
299
|
+ keyword: this.keywords,
|
|
300
|
+ };
|
|
301
|
+ getHisSummaryDetailList(params).then((response) => {
|
|
302
|
+ if (response.data.state == 1) {
|
|
303
|
+ var list = response.data.data.list;
|
|
304
|
+ this.his_patient = response.data.data.his_patient;
|
|
305
|
+ this.list = list;
|
|
306
|
+ this.tableData = [];
|
|
307
|
+ for (let i = 0; i < list.length; i++) {
|
|
308
|
+ for (let j = 0; j < list[i].orders.length; j++) {
|
|
309
|
+ for (let z = 0; z < list[i].orders[j].order_info.length; z++) {
|
|
310
|
+ list[i].orders[j].order_info[z].record_date =
|
|
311
|
+ list[i].orders[j].settle_accounts_date;
|
|
312
|
+ list[i].orders[j].order_info[z].number =
|
|
313
|
+ list[i].orders[j].number;
|
|
314
|
+ this.tableData.push(list[i].orders[j].order_info[z]);
|
|
315
|
+ }
|
239
|
316
|
}
|
240
|
317
|
}
|
241
|
|
- var obj = {index:"合计",total_price:0,record_date:"0"}
|
242
|
|
- for(let i=0;i<this.tableData.length;i++){
|
243
|
|
- this.tableData[i].index = i+1
|
244
|
|
- this.tableData[i].total_price = 0
|
245
|
|
- this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
|
246
|
|
- obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)
|
|
318
|
+
|
|
319
|
+ var obj = { index: "合计", total_price: 0, record_date: "0" };
|
|
320
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
321
|
+ this.tableData[i].index = i + 1;
|
|
322
|
+ this.tableData[i].total_price = 0;
|
|
323
|
+ this.tableData[i].total_price = (
|
|
324
|
+ this.tableData[i].cnt * this.tableData[i].pric
|
|
325
|
+ ).toFixed(2);
|
|
326
|
+ obj.total_price += this.tableData[i].cnt * this.tableData[i].pric;
|
247
|
327
|
}
|
248
|
|
- obj.total_price = (obj.total_price).toFixed(2)
|
249
|
|
-
|
250
|
|
- var new_arr = []
|
251
|
|
-
|
252
|
|
-
|
253
|
|
- if(this.keywords!=""){
|
254
|
|
- for(let i=0;i<this.tableData.length;i++){
|
255
|
|
- if(this.tableData[i].index!="合计"){
|
256
|
|
- if(this.tableData[i].advice_id > 0){
|
257
|
|
- if(this.tableData[i].advice.advice_name.indexOf(this.keywords) > -1){
|
258
|
|
- new_arr.push(this.tableData[i])
|
259
|
|
- }
|
|
328
|
+ obj.total_price = obj.total_price.toFixed(2);
|
|
329
|
+
|
|
330
|
+ var new_arr = [];
|
|
331
|
+
|
|
332
|
+ let list_1 = this.$store.getters.pagedata.list;
|
|
333
|
+ if (list_1.keywords == undefined) {
|
|
334
|
+ this.keywords = "";
|
|
335
|
+ } else {
|
|
336
|
+ this.keywords = list_1.keywords;
|
|
337
|
+ }
|
|
338
|
+ this.id = list_1.type_id;
|
|
339
|
+ this.item_type = this.id
|
|
340
|
+
|
|
341
|
+ if (this.keywords != "") {
|
|
342
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
343
|
+ if (this.tableData[i].index != "合计") {
|
|
344
|
+ if (this.tableData[i].advice_id > 0) {
|
|
345
|
+ if (
|
|
346
|
+ this.tableData[i].advice.advice_name.indexOf(
|
|
347
|
+ this.keywords
|
|
348
|
+ ) > -1
|
|
349
|
+ ) {
|
|
350
|
+ new_arr.push(this.tableData[i]);
|
|
351
|
+ }
|
260
|
352
|
}
|
261
|
|
- if(this.tableData[i].project_id >0){
|
262
|
|
- if(this.tableData[i].project.type == 2){
|
263
|
|
- if(this.tableData[i].project.project.project_name.indexOf(this.keywords) > -1){
|
264
|
|
- new_arr.push(this.tableData[i])
|
|
353
|
+ if (this.tableData[i].project_id > 0) {
|
|
354
|
+ if (this.tableData[i].project.type == 2) {
|
|
355
|
+ if (
|
|
356
|
+ this.tableData[i].project.project.project_name.indexOf(
|
|
357
|
+ this.keywords
|
|
358
|
+ ) > -1
|
|
359
|
+ ) {
|
|
360
|
+ new_arr.push(this.tableData[i]);
|
265
|
361
|
}
|
266
|
362
|
}
|
267
|
|
- if(this.tableData[i].project.type == 3){
|
268
|
|
- if(this.tableData[i].project.good_info.good_name.indexOf(this.keywords)> - 1){
|
269
|
|
- new_arr.push(this.tableData[i])
|
|
363
|
+ if (this.tableData[i].project.type == 3) {
|
|
364
|
+ if (
|
|
365
|
+ this.tableData[i].project.good_info.good_name.indexOf(
|
|
366
|
+ this.keywords
|
|
367
|
+ ) > -1
|
|
368
|
+ ) {
|
|
369
|
+ new_arr.push(this.tableData[i]);
|
270
|
370
|
}
|
271
|
371
|
}
|
272
|
372
|
}
|
273
|
373
|
}
|
274
|
374
|
}
|
275
|
|
- var objs = {index:"合计",total_price:0,record_date:"0"}
|
276
|
|
- objs.total_price = this.getPrice(new_arr)
|
277
|
|
- this.tableData = new_arr
|
|
375
|
+ var objs = { index: "合计", total_price: 0, record_date: "0" };
|
|
376
|
+ objs.total_price = this.getPrice(new_arr);
|
|
377
|
+ this.tableData = new_arr;
|
278
|
378
|
}
|
279
|
379
|
|
280
|
|
- if(this.id == 1){
|
281
|
|
- var obj = {index:"合计",total_price:0,record_date:"0"}
|
282
|
|
- var new_arr = []
|
283
|
|
- for(let i=0;i<this.tableData.length;i++){
|
284
|
|
- if(this.tableData[i].index!="合计"){
|
285
|
|
- if(this.tableData[i].advice_id > 0){
|
286
|
|
- new_arr.push(this.tableData[i])
|
287
|
|
- }
|
288
|
|
- }
|
|
380
|
+ if (this.id == 1) {
|
|
381
|
+ var obj = { index: "合计", total_price: 0, record_date: "0" };
|
|
382
|
+ var new_arr = [];
|
|
383
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
384
|
+ if (this.tableData[i].index != "合计") {
|
|
385
|
+ if (this.tableData[i].advice_id > 0) {
|
|
386
|
+ new_arr.push(this.tableData[i]);
|
|
387
|
+ }
|
289
|
388
|
}
|
290
|
|
- this.tableData = []
|
291
|
|
- obj.total_price = this.getPrice(new_arr)
|
292
|
|
- // new_arr.push(obj)
|
293
|
|
- this.tableData = new_arr
|
294
|
|
- }
|
295
|
|
- if(this.id == 2){
|
296
|
|
- var obj = {index:"合计",total_price:0,record_date:"0"}
|
297
|
|
- var new_arr = []
|
298
|
|
- for(let i=0;i<this.tableData.length;i++){
|
299
|
|
- if(this.tableData[i].index!="合计"){
|
300
|
|
- if(this.tableData[i].project_id > 0){
|
301
|
|
- if(this.tableData[i].project.type ==2){
|
302
|
|
- new_arr.push(this.tableData[i])
|
|
389
|
+ }
|
|
390
|
+ this.tableData = [];
|
|
391
|
+ obj.total_price = this.getPrice(new_arr);
|
|
392
|
+ this.tableData = new_arr;
|
|
393
|
+ }
|
|
394
|
+ if (this.id == 2) {
|
|
395
|
+ var obj = { index: "合计", total_price: 0, record_date: "0" };
|
|
396
|
+ var new_arr = [];
|
|
397
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
398
|
+ if (this.tableData[i].index != "合计") {
|
|
399
|
+ if (this.tableData[i].project_id > 0) {
|
|
400
|
+ if (this.tableData[i].project.type == 2) {
|
|
401
|
+ new_arr.push(this.tableData[i]);
|
303
|
402
|
}
|
304
|
403
|
}
|
305
|
|
- }
|
306
|
|
- }
|
307
|
|
-
|
308
|
|
- this.tableData = []
|
309
|
|
- obj.total_price = this.getPrice(new_arr)
|
310
|
|
-
|
311
|
|
- this.tableData = new_arr
|
|
404
|
+ }
|
312
|
405
|
}
|
|
406
|
+ this.tableData = [];
|
|
407
|
+ obj.total_price = this.getPrice(new_arr);
|
|
408
|
+ this.tableData = new_arr;
|
|
409
|
+ }
|
313
|
410
|
|
314
|
|
- if(this.id == 3){
|
315
|
|
- var new_arr = []
|
316
|
|
- var obj = {index:"合计",total_price:0,record_date:"0"}
|
317
|
|
- for(let i=0;i<this.tableData.length;i++){
|
318
|
|
- if(this.tableData[i].index!="合计"){
|
319
|
|
- if(this.tableData[i].project_id > 0){
|
320
|
|
- if(this.tableData[i].project.type == 3){
|
321
|
|
- new_arr.push(this.tableData[i])
|
|
411
|
+ if (this.id == 3) {
|
|
412
|
+ var new_arr = [];
|
|
413
|
+ var obj = { index: "合计", total_price: 0, record_date: "0" };
|
|
414
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
415
|
+ if (this.tableData[i].index != "合计") {
|
|
416
|
+ if (this.tableData[i].project_id > 0) {
|
|
417
|
+ if (this.tableData[i].project.type == 3) {
|
|
418
|
+ new_arr.push(this.tableData[i]);
|
322
|
419
|
}
|
323
|
420
|
}
|
324
|
|
- }
|
|
421
|
+ }
|
325
|
422
|
}
|
326
|
|
- this.tableData = []
|
327
|
|
- obj.total_price = this.getPrice(new_arr)
|
328
|
|
- this.tableData = new_arr
|
329
|
|
- }
|
330
|
|
-
|
331
|
|
-
|
332
|
|
- }
|
333
|
|
- })
|
|
423
|
+ this.tableData = [];
|
|
424
|
+ obj.total_price = this.getPrice(new_arr);
|
|
425
|
+ this.tableData = new_arr;
|
|
426
|
+ }
|
|
427
|
+ }
|
|
428
|
+ });
|
334
|
429
|
},
|
335
|
|
- getAllPice(){
|
336
|
|
- var total_price = 0
|
337
|
|
- for(let i=0;i<this.tableData.length;i++){
|
338
|
|
- total_price += this.tableData[i].pric * this.tableData[i].cnt
|
|
430
|
+
|
|
431
|
+ getAllPice() {
|
|
432
|
+ var total_price = 0;
|
|
433
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
434
|
+ total_price += this.tableData[i].pric * this.tableData[i].cnt;
|
339
|
435
|
}
|
340
|
|
- return total_price.toFixed(2)
|
|
436
|
+ return total_price.toFixed(2);
|
341
|
437
|
},
|
342
|
|
- getActPay(){
|
343
|
|
- var act_pay = 0
|
344
|
|
- for(let i=0;i<this.orderList.length;i++){
|
345
|
|
- act_pay += this.orderList[i].psn_part_amt
|
|
438
|
+ getActPay() {
|
|
439
|
+ var act_pay = 0;
|
|
440
|
+ for (let i = 0; i < this.list.length; i++) {
|
|
441
|
+ for (let j = 0; j < this.list[i].orders.length; j++) {
|
|
442
|
+ act_pay += this.list[i].orders[j].acct_pay;
|
|
443
|
+ }
|
346
|
444
|
}
|
347
|
445
|
return act_pay.toFixed(2)
|
348
|
446
|
},
|
349
|
|
- getFundPaySumamt(){
|
350
|
|
- var fund_pay_sumamt = 0
|
351
|
|
- for(let i=0;i<this.list.length;i++){
|
352
|
|
- for(let j=0;j<this.list[i].orders.length;j++){
|
353
|
|
- fund_pay_sumamt +=this.list[i].orders[j].fund_pay_sumamt
|
|
447
|
+ getFundPaySumamt() {
|
|
448
|
+ var fund_pay_sumamt = 0;
|
|
449
|
+ for (let i = 0; i < this.list.length; i++) {
|
|
450
|
+ for (let j = 0; j < this.list[i].orders.length; j++) {
|
|
451
|
+ fund_pay_sumamt += this.list[i].orders[j].fund_pay_sumamt;
|
354
|
452
|
}
|
355
|
453
|
}
|
356
|
|
- return fund_pay_sumamt
|
|
454
|
+ return fund_pay_sumamt;
|
357
|
455
|
},
|
358
|
|
- getHifesPay(){
|
359
|
|
- var hifes_pay = 0
|
360
|
|
- for(let i=0;i<this.list.length;i++){
|
361
|
|
- for(let j=0;j<this.list[i].orders.length;j++){
|
362
|
|
- hifes_pay +=this.list[i].orders[j].hifes_pay
|
|
456
|
+ getHifesPay() {
|
|
457
|
+ var hifes_pay = 0;
|
|
458
|
+ for (let i = 0; i < this.list.length; i++) {
|
|
459
|
+ for (let j = 0; j < this.list[i].orders.length; j++) {
|
|
460
|
+ hifes_pay += this.list[i].orders[j].hifes_pay;
|
363
|
461
|
}
|
364
|
462
|
}
|
365
|
|
- return hifes_pay
|
|
463
|
+ return hifes_pay;
|
366
|
464
|
},
|
367
|
|
- getMafPay(){
|
368
|
|
- var maf_pay = 0
|
369
|
|
- for(let i=0;i<this.list.length;i++){
|
370
|
|
- for(let j=0;j<this.list[i].orders.length;j++){
|
371
|
|
- maf_pay +=this.list[i].orders[j].maf_pay
|
|
465
|
+ getMafPay() {
|
|
466
|
+ var maf_pay = 0;
|
|
467
|
+ for (let i = 0; i < this.list.length; i++) {
|
|
468
|
+ for (let j = 0; j < this.list[i].orders.length; j++) {
|
|
469
|
+ maf_pay += this.list[i].orders[j].maf_pay;
|
372
|
470
|
}
|
373
|
471
|
}
|
374
|
|
- return maf_pay
|
|
472
|
+ return maf_pay;
|
375
|
473
|
},
|
376
|
|
- toPrint(){
|
377
|
|
- this.$router.push({path:"/hisTool/detailPrint?patient_id="+this.patient_id+"&start_time="+this.start_time+"&end_time="+this.end_time+"&type="+this.item_type +"&keyword="+this.keywords+"&id="+this.id+"&balance_accounts_type="+this.his_patient.balance_accounts_type})
|
|
474
|
+ toPrint() {
|
|
475
|
+ this.$router.push({
|
|
476
|
+ path:
|
|
477
|
+ "/hisTool/detailPrint?patient_id=" +
|
|
478
|
+ this.patient_id +
|
|
479
|
+ "&start_time=" +
|
|
480
|
+ this.start_time +
|
|
481
|
+ "&end_time=" +
|
|
482
|
+ this.end_time +
|
|
483
|
+ "&type=" +
|
|
484
|
+ this.item_type +
|
|
485
|
+ "&keyword=" +
|
|
486
|
+ this.keywords +
|
|
487
|
+ "&id=" +
|
|
488
|
+ this.id +
|
|
489
|
+ "&balance_accounts_type=" +
|
|
490
|
+ this.his_patient.balance_accounts_type,
|
|
491
|
+ });
|
|
492
|
+
|
|
493
|
+ // ======打印时将查询参数保存至store中======
|
|
494
|
+ // table_id: 左栏表格下标
|
|
495
|
+ // type_id: 下拉框id
|
|
496
|
+ // keywords: 输入框
|
|
497
|
+ // start_time: this.chargeDate[0],
|
|
498
|
+ // end_time: this.chargeDate[1],
|
|
499
|
+ // patient_id:this.patient_id
|
|
500
|
+ let table_id = this.$store.getters.pagedata.list.table_id;
|
|
501
|
+ if (table_id == undefined) {
|
|
502
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
503
|
+ table_id: 0,
|
|
504
|
+ type_id: this.id,
|
|
505
|
+ keywords: this.keywords,
|
|
506
|
+ start_time: this.chargeDate[0],
|
|
507
|
+ end_time: this.chargeDate[1],
|
|
508
|
+ patient_id: this.patient_id,
|
|
509
|
+ });
|
|
510
|
+ } else {
|
|
511
|
+ this.$store.commit("SET_PAGEDATA", {
|
|
512
|
+ table_id: table_id,
|
|
513
|
+ type_id: this.id,
|
|
514
|
+ keywords: this.keywords,
|
|
515
|
+ start_time: this.chargeDate[0],
|
|
516
|
+ end_time: this.chargeDate[1],
|
|
517
|
+ patient_id: this.patient_id,
|
|
518
|
+ });
|
|
519
|
+ }
|
378
|
520
|
},
|
379
|
|
- getPrice(val){
|
380
|
|
- var total_price = 0
|
381
|
|
- for(let i=0;i<val.length;i++){
|
382
|
|
- total_price += val[i].cnt * val[i].pric
|
|
521
|
+ getPrice(val) {
|
|
522
|
+ var total_price = 0;
|
|
523
|
+ for (let i = 0; i < val.length; i++) {
|
|
524
|
+ total_price += val[i].cnt * val[i].pric;
|
383
|
525
|
}
|
384
|
|
- return total_price.toFixed(2)
|
385
|
|
- }
|
386
|
|
-
|
|
526
|
+ return total_price.toFixed(2);
|
|
527
|
+ },
|
387
|
528
|
},
|
388
|
529
|
created() {
|
389
|
|
- this.start_time = this.chargeDate[0]
|
390
|
|
- this.end_time = this.chargeDate[1]
|
391
|
|
- this.getHisSummaryDetailList()
|
|
530
|
+ this.start_time = this.chargeDate[0];
|
|
531
|
+ this.end_time = this.chargeDate[1];
|
|
532
|
+ this.getHisSummaryDetailList();
|
|
533
|
+ },
|
|
534
|
+ watch: {
|
|
535
|
+ patient_id: function () {
|
|
536
|
+ this.patient_id = this.patient_id;
|
|
537
|
+ this.getHisSummaryDetailList();
|
|
538
|
+ },
|
392
|
539
|
},
|
393
|
|
- watch:{
|
394
|
|
- "patient_id":function(){
|
395
|
|
- this.patient_id = this.patient_id
|
396
|
|
- this.getHisSummaryDetailList()
|
397
|
|
- }
|
398
|
|
- }
|
399
|
|
-}
|
|
540
|
+};
|
400
|
541
|
</script>
|