|
@@ -13,7 +13,7 @@
|
13
|
13
|
</template>
|
14
|
14
|
|
15
|
15
|
<div class='dialysisPage' style="padding-top:40px;">
|
16
|
|
- <printOne v-if="org_id != 10215 && org_id !=0 && org_id !=9671&&org_id !=9675&& org_id !=10515" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printOne>
|
|
16
|
+ <printOne v-if="org_id != 10215 && org_id !=9671&&org_id !=9675&& org_id !=10515" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printOne>
|
17
|
17
|
<summary-print v-if="org_id == 10215|| org_id ==9671 ||org_id ==9675" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></summary-print>
|
18
|
18
|
<printTwo v-if="org_id==10515 || org_id==0" :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></printTwo>
|
19
|
19
|
<!-- <list-print-two :list="list" :patient="patient" :order="order" :admin="admin" :hospital="his_hospital"></list-print-two>-->
|
|
@@ -58,7 +58,8 @@
|
58
|
58
|
methods: {
|
59
|
59
|
getTimes(time) {
|
60
|
60
|
return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
|
61
|
|
- }, getInfo(order_id) {
|
|
61
|
+ },
|
|
62
|
+ getInfo(order_id) {
|
62
|
63
|
let params = {
|
63
|
64
|
id: order_id
|
64
|
65
|
}
|
|
@@ -79,13 +80,13 @@
|
79
|
80
|
this.order['laboratoryCostTotal'] = response.data.data.laboratoryCostTotal
|
80
|
81
|
this.order['treatCostTotal'] = response.data.data.treatCostTotal
|
81
|
82
|
|
82
|
|
- console.log("~~~~~")
|
|
83
|
+ console.log("~~~~~",response.data.data)
|
83
|
84
|
this.patient = response.data.data.patient
|
84
|
85
|
this.admin = response.data.data.admin_info
|
85
|
86
|
this.his_hospital = response.data.data.his_hospital
|
86
|
87
|
var order_info = response.data.data.order_info
|
87
|
88
|
|
88
|
|
- if(this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0){
|
|
89
|
+ if(this.$store.getters.xt_user.org_id == 10215){
|
89
|
90
|
//获取所有项目类型进行去重
|
90
|
91
|
let med_chrgitm_types = []
|
91
|
92
|
for (let i = 0; i < order_info.length; i++) {
|
|
@@ -111,14 +112,14 @@
|
111
|
112
|
tempDetails.push(order_info[b])
|
112
|
113
|
}
|
113
|
114
|
}
|
114
|
|
- console.log("~~~~~~~~")
|
115
|
|
- console.log(tempDetails)
|
|
115
|
+ // console.log("~~~~~~~~")
|
|
116
|
+ // console.log(tempDetails)
|
116
|
117
|
|
117
|
|
- console.log("1111="+tempDetails)
|
|
118
|
+ // console.log("1111="+tempDetails)
|
118
|
119
|
obj.details = this.setNewData(tempDetails)
|
119
|
|
- console.log("22222="+obj.details)
|
|
120
|
+ // console.log("22222="+obj.details)
|
120
|
121
|
this.list = this.list.concat(obj.details)
|
121
|
|
- console.log("222233332="+ this.list)
|
|
122
|
+ console.log("222233332=",this.list)
|
122
|
123
|
}
|
123
|
124
|
let newobj = {}
|
124
|
125
|
newobj['total'] = this.order.medfee_sumamt
|
|
@@ -127,7 +128,43 @@
|
127
|
128
|
}else{
|
128
|
129
|
//获取所有项目类型进行去重
|
129
|
130
|
let med_chrgitm_types = []
|
|
131
|
+ let chrgitm_lvs = []
|
|
132
|
+ let advice = []
|
|
133
|
+ let good = []
|
|
134
|
+ let project = []
|
130
|
135
|
for (let i = 0; i < order_info.length; i++) {
|
|
136
|
+ if(order_info[i].advice.advice_name !=''){
|
|
137
|
+ const adv={
|
|
138
|
+ advice_name:order_info[i].advice.advice_name,
|
|
139
|
+ // good_name:order_info[i].project.good_info.good_name,
|
|
140
|
+ // project_name:order_info[i].project.project.project_name,
|
|
141
|
+ chrgitm_lv:order_info[i].chrgitm_lv,
|
|
142
|
+ }
|
|
143
|
+ advice.push(adv)
|
|
144
|
+ }
|
|
145
|
+
|
|
146
|
+ if(order_info[i].project.good_info.good_name !=''){
|
|
147
|
+ const god={
|
|
148
|
+ // advice_name:order_info[i].advice.advice_name,
|
|
149
|
+ good_name:order_info[i].project.good_info.good_name,
|
|
150
|
+ // project_name:order_info[i].project.project.project_name,
|
|
151
|
+ chrgitm_lv:order_info[i].chrgitm_lv,
|
|
152
|
+ }
|
|
153
|
+ good.push(god)
|
|
154
|
+ }
|
|
155
|
+
|
|
156
|
+ if(order_info[i].project.project.project_name !=''){
|
|
157
|
+ const pro={
|
|
158
|
+ // advice_name:order_info[i].advice.advice_name,
|
|
159
|
+ // good_name:order_info[i].project.good_info.good_name,
|
|
160
|
+ project_name:order_info[i].project.project.project_name,
|
|
161
|
+ chrgitm_lv:order_info[i].chrgitm_lv,
|
|
162
|
+ }
|
|
163
|
+ project.push(pro)
|
|
164
|
+ }
|
|
165
|
+
|
|
166
|
+ // chrgitm_lvs.push(arr)
|
|
167
|
+ // chrgitm_lvs.push(order_info[i].chrgitm_lv)
|
131
|
168
|
med_chrgitm_types.push(order_info[i].med_chrgitm_type)
|
132
|
169
|
}
|
133
|
170
|
const obj = {}
|
|
@@ -153,13 +190,68 @@
|
153
|
190
|
total: obj.total,
|
154
|
191
|
is_total: 1,
|
155
|
192
|
})
|
156
|
|
- console.log("23323223323232332323322332",obj.details)
|
|
193
|
+ // console.log("23323223323232332323322332",obj.details)
|
157
|
194
|
this.list = this.list.concat(obj.details)
|
|
195
|
+ // console.log("23323223323232332323322332",this.list)
|
|
196
|
+ }
|
|
197
|
+ for(let i=0;i<advice.length;i++){
|
|
198
|
+ for(let j=i+1;j<advice.length;j++){
|
|
199
|
+ if(advice[i].advice_name == advice[j].advice_name){
|
|
200
|
+ advice.splice(j,1)
|
|
201
|
+ j--
|
|
202
|
+ }
|
|
203
|
+ }
|
158
|
204
|
}
|
|
205
|
+ for(let i=0;i<good.length;i++){
|
|
206
|
+ for(let j=i+1;j<good.length;j++){
|
|
207
|
+ if(good[i].good_name == good[j].good_name){
|
|
208
|
+ good.splice(j,1)
|
|
209
|
+ j--
|
|
210
|
+ }
|
|
211
|
+ }
|
|
212
|
+ }
|
|
213
|
+ for(let i=0;i<project.length;i++){
|
|
214
|
+ for(let j=i+1;j<project.length;j++){
|
|
215
|
+ if(project[i].project_name == project[j].project_name){
|
|
216
|
+ project.splice(j,1)
|
|
217
|
+ j--
|
|
218
|
+ }
|
|
219
|
+ }
|
|
220
|
+ }
|
|
221
|
+
|
|
222
|
+ chrgitm_lvs = [...advice,...good,...project]
|
|
223
|
+
|
|
224
|
+ console.log('yyyyyyyyyyyy',chrgitm_lvs);
|
|
225
|
+ for(let i in this.list){
|
|
226
|
+ for(let j in chrgitm_lvs){
|
|
227
|
+ if(this.list[i].is_total ==2){
|
|
228
|
+ if(this.list[i].name == chrgitm_lvs[j].advice_name ||
|
|
229
|
+ this.list[i].name == chrgitm_lvs[j].good_name ||
|
|
230
|
+ this.list[i].name == chrgitm_lvs[j].project_name
|
|
231
|
+ ){
|
|
232
|
+ this.list[i]['chrgitm_lv'] = chrgitm_lvs[j].chrgitm_lv
|
|
233
|
+ }
|
|
234
|
+ }
|
|
235
|
+ }
|
|
236
|
+ }
|
|
237
|
+ console.log('tttttttttttt',this.list);
|
159
|
238
|
}
|
160
|
239
|
}
|
161
|
240
|
})
|
162
|
|
- }, getTotal:function(items){
|
|
241
|
+
|
|
242
|
+ },
|
|
243
|
+ getquchong(arr){
|
|
244
|
+ for(let i=0;i<arr.length;i++){
|
|
245
|
+ for(let j=i+1;j<arr.length;j++){
|
|
246
|
+ if(arr[i] == arr[j]){
|
|
247
|
+ arr.splice(j,1)
|
|
248
|
+ j--
|
|
249
|
+ }
|
|
250
|
+ }
|
|
251
|
+ }
|
|
252
|
+ return arr
|
|
253
|
+ },
|
|
254
|
+ getTotal:function(items){
|
163
|
255
|
let total = 0
|
164
|
256
|
for(let i = 0; i < items.length; i++){
|
165
|
257
|
total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
|