|
@@ -61,7 +61,7 @@
|
61
|
61
|
<el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
|
62
|
62
|
</el-tab-pane>
|
63
|
63
|
<div class="RP">Rp</div>
|
64
|
|
- <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs" :activeType="activeName"></prescription-table>
|
|
64
|
+ <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs" :activeType="customTabIndex"></prescription-table>
|
65
|
65
|
</el-tabs>
|
66
|
66
|
|
67
|
67
|
</div>
|
|
@@ -226,7 +226,7 @@
|
226
|
226
|
showOne:true,
|
227
|
227
|
showTwo:false,
|
228
|
228
|
state1:"",
|
229
|
|
- value:"",
|
|
229
|
+ customTabIndex:1,
|
230
|
230
|
options:[],
|
231
|
231
|
tabProject:[],
|
232
|
232
|
strids:""
|
|
@@ -264,12 +264,26 @@
|
264
|
264
|
|
265
|
265
|
},
|
266
|
266
|
tabclickEvent(val){
|
267
|
|
- console.log(val)
|
268
|
267
|
for (let i= 0; i<this.prescriptions.length; i++){
|
269
|
268
|
console.log(this.prescriptions[i].name)
|
270
|
269
|
if(this.prescriptions[i].name == val.name){
|
271
|
270
|
this.curPrescriptions = this.prescriptions[i]
|
|
271
|
+
|
|
272
|
+ //用来区分处方属于项目还是药品
|
|
273
|
+ if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.projects.length == 0){
|
|
274
|
+ this.customTabIndex = 1
|
|
275
|
+ }
|
|
276
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
|
|
277
|
+ this.customTabIndex = 2
|
|
278
|
+ }
|
|
279
|
+
|
|
280
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length == 0){
|
|
281
|
+ this.customTabIndex = this.rightTab
|
|
282
|
+ }
|
|
283
|
+
|
272
|
284
|
}
|
|
285
|
+
|
|
286
|
+
|
273
|
287
|
}
|
274
|
288
|
},
|
275
|
289
|
setData(data){
|
|
@@ -343,6 +357,21 @@
|
343
|
357
|
this.rightTab = index
|
344
|
358
|
|
345
|
359
|
|
|
360
|
+ //用来区分处方属于项目还是药品
|
|
361
|
+ if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.projects.length == 0){
|
|
362
|
+ this.customTabIndex = 1
|
|
363
|
+ }
|
|
364
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length > 0){
|
|
365
|
+ this.customTabIndex = 2
|
|
366
|
+ }
|
|
367
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.projects.length == 0){
|
|
368
|
+ // this.customTabIndex = this.rightTab
|
|
369
|
+ this.customTabIndex = index
|
|
370
|
+ }
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
346
|
375
|
},
|
347
|
376
|
addCharges() {
|
348
|
377
|
this.$refs.additionalCharges.show()
|