|
@@ -7,7 +7,7 @@
|
7
|
7
|
<el-table-column align="center" width="50" label="序号">
|
8
|
8
|
<template slot-scope="scope">
|
9
|
9
|
<div style="display:flex;align-items:center;">
|
10
|
|
- <el-input v-model="scope.row.groupno" placeholder=""></el-input>
|
|
10
|
+ <el-input v-model="scope.row.groupno" placeholder="" @input="getAllIndex(scope.row)"></el-input>
|
11
|
11
|
</div>
|
12
|
12
|
</template>
|
13
|
13
|
</el-table-column>
|
|
@@ -682,6 +682,11 @@
|
682
|
682
|
{ name: '每六小时一次', count: 4 },
|
683
|
683
|
{ name: '每八小时一次', count: 3 }
|
684
|
684
|
]
|
|
685
|
+ if(this.efs!=null && this.efs.length >0){
|
|
686
|
+ for(let i=0;i<this.efs.length;i++){
|
|
687
|
+ arr.push(this.efs[i])
|
|
688
|
+ }
|
|
689
|
+ }
|
685
|
690
|
let num = ''
|
686
|
691
|
arr.map(item => {
|
687
|
692
|
if (item.name == execution_frequency) {
|
|
@@ -693,6 +698,37 @@
|
693
|
698
|
}
|
694
|
699
|
return num
|
695
|
700
|
},
|
|
701
|
+ getAllIndex(val){
|
|
702
|
+ console.log("val",val)
|
|
703
|
+ console.log("prescription.advices",this.prescription.advices)
|
|
704
|
+ var obj = {id:0,day:"",delivery_way:"",execution_frequency:""}
|
|
705
|
+ if(this.prescription.advices!=null && this.prescription.advices.length>0){
|
|
706
|
+ for(let i=0;i<this.prescription.advices.length;i++){
|
|
707
|
+ console.log("this.prescription.advices[i].groupno",this.prescription.advices[i].groupno)
|
|
708
|
+ if(parseInt(val.groupno) == parseInt(this.prescription.advices[i].groupno) && parseInt(val.id)!= parseInt(this.prescription.advices[i].id)){
|
|
709
|
+ console.log("this.prescription.advices[i]",this.prescription.advices[i])
|
|
710
|
+ obj.id = val.id
|
|
711
|
+ obj.day = this.prescription.advices[i].day
|
|
712
|
+ obj.delivery_way = this.prescription.advices[i].delivery_way
|
|
713
|
+ obj.execution_frequency = this.prescription.advices[i].execution_frequency
|
|
714
|
+ console.log("-----------------",obj)
|
|
715
|
+ }
|
|
716
|
+ }
|
|
717
|
+ }
|
|
718
|
+ console.log("-----------------",obj)
|
|
719
|
+
|
|
720
|
+ if(this.prescription.advices!=null && this.prescription.advices.length>0){
|
|
721
|
+ for(let i=0;i<this.prescription.advices.length;i++){
|
|
722
|
+ if(this.prescription.advices[i].id == parseInt(val.id)){
|
|
723
|
+ console.log("进啦")
|
|
724
|
+ this.prescription.advices[i].delivery_way = obj.delivery_way
|
|
725
|
+ this.prescription.advices[i].execution_frequency =obj.execution_frequency
|
|
726
|
+ this.prescription.advices[i].day = obj.day
|
|
727
|
+ }
|
|
728
|
+ }
|
|
729
|
+ }
|
|
730
|
+ console.log("hahhhahdhha",this.prescription.advices)
|
|
731
|
+ },
|
696
|
732
|
}, mounted() {
|
697
|
733
|
this.getInitData()
|
698
|
734
|
|