|
@@ -67,49 +67,97 @@
|
67
|
67
|
return false
|
68
|
68
|
} else {
|
69
|
69
|
this.order = response.data.data.order
|
|
70
|
+ this.order['bedCostTotal'] = response.data.data.bedCostTotal
|
|
71
|
+ this.order['operationCostTotal'] = response.data.data.operationCostTotal
|
|
72
|
+ this.order['otherCostTotal'] = response.data.data.otherCostTotal
|
|
73
|
+ this.order['materialCostTotal'] = response.data.data.materialCostTotal
|
|
74
|
+ this.order['westernMedicineCostTotal'] = response.data.data.westernMedicineCostTotal
|
|
75
|
+ this.order['chineseTraditionalMedicineCostTotal'] = response.data.data.chineseTraditionalMedicineCostTotal
|
|
76
|
+ this.order['checkCostTotal'] = response.data.data.checkCostTotal
|
|
77
|
+ this.order['zhenChaCostTotal'] = response.data.data.zhenChaCostTotal
|
|
78
|
+ this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
|
|
79
|
+ this.order['treatCostTotal'] = response.data.data.treatCostTotal
|
|
80
|
+
|
|
81
|
+
|
70
|
82
|
this.patient = response.data.data.patient
|
71
|
83
|
this.admin = response.data.data.admin_info
|
72
|
84
|
this.his_hospital = response.data.data.his_hospital
|
73
|
85
|
var order_info = response.data.data.order_info
|
74
|
86
|
|
75
|
|
- //获取所有项目类型进行去重
|
76
|
|
- let med_chrgitm_types = []
|
77
|
|
- for (let i = 0; i < order_info.length; i++) {
|
78
|
|
- med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
79
|
|
- }
|
80
|
|
- const obj = {}
|
81
|
|
- med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
|
82
|
|
- obj[next] ? '' : obj[next] = true && cur.push(next)
|
83
|
|
- return cur
|
84
|
|
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
85
|
|
-
|
86
|
|
- let tempOrderInfo = []
|
87
|
|
-
|
88
|
|
- for (let i = 0; i < med_chrgitm_types.length; i++) {
|
89
|
|
- let obj = {
|
90
|
|
- total: 0,
|
91
|
|
- details: []
|
|
87
|
+ if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
|
|
88
|
+ //获取所有项目类型进行去重
|
|
89
|
+ let med_chrgitm_types = []
|
|
90
|
+ for (let i = 0; i < order_info.length; i++) {
|
|
91
|
+ med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
92
|
92
|
}
|
93
|
|
- let tempDetails = []
|
94
|
|
- for (let b = 0; b < order_info.length; b++) {
|
95
|
|
- if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
|
96
|
|
- tempDetails.push(order_info[b])
|
|
93
|
+ const obj = {}
|
|
94
|
+ med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
|
|
95
|
+ obj[next] ? '' : obj[next] = true && cur.push(next)
|
|
96
|
+ return cur
|
|
97
|
+ }, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
|
98
|
+
|
|
99
|
+ let tempOrderInfo = []
|
|
100
|
+
|
|
101
|
+ for (let i = 0; i < med_chrgitm_types.length; i++) {
|
|
102
|
+ let obj = {
|
|
103
|
+ total: 0,
|
|
104
|
+ details: []
|
|
105
|
+ }
|
|
106
|
+ let tempDetails = []
|
|
107
|
+ for (let b = 0; b < order_info.length; b++) {
|
|
108
|
+ if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
|
|
109
|
+ tempDetails.push(order_info[b])
|
|
110
|
+ }
|
97
|
111
|
}
|
98
|
|
- }
|
99
|
112
|
|
100
|
|
- obj.details = this.setNewData(tempDetails)
|
101
|
|
- // obj.total = this.getTotal(obj.details)
|
|
113
|
+ obj.details = this.setNewData(tempDetails)
|
|
114
|
+ // obj.total = this.getTotal(obj.details)
|
|
115
|
+ //
|
|
116
|
+ // obj.details.push({
|
|
117
|
+ // total: obj.total,
|
|
118
|
+ // is_total: 1,
|
|
119
|
+ // })
|
|
120
|
+ this.list = this.list.concat(obj.details)
|
|
121
|
+ }
|
102
|
122
|
|
103
|
|
- // obj.details.push({
|
104
|
|
- // total: obj.total,
|
105
|
|
- // is_total: 1,
|
106
|
|
- // })
|
107
|
|
- this.list = this.list.concat(obj.details)
|
108
|
|
- }
|
109
|
123
|
|
|
124
|
+ }else{
|
110
|
125
|
|
|
126
|
+ //获取所有项目类型进行去重
|
|
127
|
+ let med_chrgitm_types = []
|
|
128
|
+ for (let i = 0; i < order_info.length; i++) {
|
|
129
|
+ med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
|
130
|
+ }
|
|
131
|
+ const obj = {}
|
|
132
|
+ med_chrgitm_types = med_chrgitm_types.reduce((cur, next) => {
|
|
133
|
+ obj[next] ? '' : obj[next] = true && cur.push(next)
|
|
134
|
+ return cur
|
|
135
|
+ }, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
|
136
|
+
|
|
137
|
+ let tempOrderInfo = []
|
|
138
|
+
|
|
139
|
+ for (let i = 0; i < med_chrgitm_types.length; i++) {
|
|
140
|
+ let obj = {
|
|
141
|
+ total: 0,
|
|
142
|
+ details: []
|
|
143
|
+ }
|
|
144
|
+ let tempDetails = []
|
|
145
|
+ for (let b = 0; b < order_info.length; b++) {
|
|
146
|
+ if (med_chrgitm_types[i] == order_info[b].med_chrgitm_type) {
|
|
147
|
+ tempDetails.push(order_info[b])
|
|
148
|
+ }
|
|
149
|
+ }
|
111
|
150
|
|
|
151
|
+ obj.details = this.setNewData(tempDetails)
|
|
152
|
+ obj.total = this.getTotal(obj.details)
|
112
|
153
|
|
|
154
|
+ obj.details.push({
|
|
155
|
+ total: obj.total,
|
|
156
|
+ is_total: 1,
|
|
157
|
+ })
|
|
158
|
+ this.list = this.list.concat(obj.details)
|
|
159
|
+ }
|
|
160
|
+ }
|
113
|
161
|
}
|
114
|
162
|
})
|
115
|
163
|
}, getTotal:function(items){
|
|
@@ -163,8 +211,8 @@
|
163
|
211
|
if (new_drug_ids[i].id == details[a].advice.drug_id && new_drug_ids[i].price == details[a].advice.price) {
|
164
|
212
|
obj['name'] = details[a].advice.advice_name
|
165
|
213
|
obj['spec'] = details[a].advice.drug.drug_spec
|
166
|
|
- obj['unit'] = details[a].advice.drug.max_unit
|
167
|
|
-
|
|
214
|
+ obj['unit'] = details[a].advice.drug.min_unit
|
|
215
|
+ obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
|
168
|
216
|
obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
|
169
|
217
|
obj['price'] = parseFloat(details[a].pric)
|
170
|
218
|
obj['is_total'] = 2
|
|
@@ -184,12 +232,17 @@
|
184
|
232
|
if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
|
185
|
233
|
if( details[a].project.type == 2){
|
186
|
234
|
obj['name'] = details[a].project.project.project_name
|
|
235
|
+ obj['spec'] = '次'
|
|
236
|
+ obj['unit'] = details[a].project.project.unit
|
|
237
|
+
|
|
238
|
+
|
187
|
239
|
}else if(details[a].project.type == 3){
|
188
|
240
|
obj['name'] = details[a].project.good_info.good_name
|
189
|
|
- }
|
190
|
|
- obj['unit'] = details[a].project.unit
|
|
241
|
+ obj['spec'] = details[a].project.good_info.specification_name
|
|
242
|
+ obj['unit'] = this.getGoodUnit( details[a].project.good_info.good_unit)
|
191
|
243
|
|
192
|
|
- obj['spec'] = '1'
|
|
244
|
+ }
|
|
245
|
+ obj['medicine_insurance_kind'] = this.getMedicineInsuranceType(details[a].chrgitm_lv)
|
193
|
246
|
obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
|
194
|
247
|
obj['price'] = parseFloat(details[a].pric)
|
195
|
248
|
obj['is_total'] = 2
|
|
@@ -204,7 +257,14 @@
|
204
|
257
|
|
205
|
258
|
return list
|
206
|
259
|
|
207
|
|
- }, unique(array) {
|
|
260
|
+ }, getGoodUnit(id) {
|
|
261
|
+ var goodUnit = this.$store.getters.good_unit
|
|
262
|
+ for (let i = 0; i < goodUnit.length; i++) {
|
|
263
|
+ if (goodUnit[i].id == id) {
|
|
264
|
+ return goodUnit[i].name
|
|
265
|
+ }
|
|
266
|
+ }
|
|
267
|
+ },unique(array) {
|
208
|
268
|
// res用来存储结果
|
209
|
269
|
var res = []
|
210
|
270
|
for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
|
|
@@ -219,9 +279,7 @@
|
219
|
279
|
}
|
220
|
280
|
}
|
221
|
281
|
return res
|
222
|
|
- },
|
223
|
|
-
|
224
|
|
- getType(med_chrgitm_type) {
|
|
282
|
+ },getType(med_chrgitm_type){
|
225
|
283
|
switch (med_chrgitm_type) {
|
226
|
284
|
case '01':
|
227
|
285
|
return '床位费'
|
|
@@ -280,6 +338,24 @@
|
280
|
338
|
|
281
|
339
|
}
|
282
|
340
|
|
|
341
|
+
|
|
342
|
+ },
|
|
343
|
+
|
|
344
|
+ getMedicineInsuranceType(type) {
|
|
345
|
+ switch (type) {
|
|
346
|
+ case "01":
|
|
347
|
+ return '甲类'
|
|
348
|
+ break
|
|
349
|
+ case "02":
|
|
350
|
+ return '乙类'
|
|
351
|
+
|
|
352
|
+ break
|
|
353
|
+ case "03":
|
|
354
|
+ return '自费'
|
|
355
|
+ break
|
|
356
|
+
|
|
357
|
+ }
|
|
358
|
+
|
283
|
359
|
},
|
284
|
360
|
printThisPage() {
|
285
|
361
|
|