瀏覽代碼

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 年之前
父節點
當前提交
2482b0ac3b

+ 32 - 3
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

61
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
61
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
62
             </el-tab-pane>
62
             </el-tab-pane>
63
             <div class="RP">Rp</div>
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
           </el-tabs>
65
           </el-tabs>
66
 
66
 
67
         </div>
67
         </div>
226
         showOne:true,
226
         showOne:true,
227
         showTwo:false,
227
         showTwo:false,
228
         state1:"",
228
         state1:"",
229
-        value:"",
229
+        customTabIndex:1,
230
         options:[],
230
         options:[],
231
         tabProject:[],
231
         tabProject:[],
232
         strids:""
232
         strids:""
264
 
264
 
265
       },
265
       },
266
       tabclickEvent(val){
266
       tabclickEvent(val){
267
-        console.log(val)
268
         for (let i= 0; i<this.prescriptions.length; i++){
267
         for (let i= 0; i<this.prescriptions.length; i++){
269
           console.log(this.prescriptions[i].name)
268
           console.log(this.prescriptions[i].name)
270
             if(this.prescriptions[i].name == val.name){
269
             if(this.prescriptions[i].name == val.name){
271
               this.curPrescriptions = this.prescriptions[i]
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
       setData(data){
289
       setData(data){
343
         this.rightTab = index
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
       addCharges() {
376
       addCharges() {
348
         this.$refs.additionalCharges.show()
377
         this.$refs.additionalCharges.show()

+ 2 - 2
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue 查看文件

1
 <template>
1
 <template>
2
   <div class="prescriptionTable">
2
   <div class="prescriptionTable">
3
     <div>{{prescription.name}}</div>
3
     <div>{{prescription.name}}</div>
4
-    <el-table v-if="activeType  == '1'" :data="prescription.advices" border style="width: 98%;" :row-style="{ color: '#303133' }"
4
+    <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 98%;" :row-style="{ color: '#303133' }"
5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
       <el-table-column align="center" type="selection" width="40"></el-table-column>
6
       <el-table-column align="center" type="selection" width="40"></el-table-column>
7
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
7
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
80
         </template>
80
         </template>
81
       </el-table-column>
81
       </el-table-column>
82
     </el-table>
82
     </el-table>
83
-    <el-table v-if="activeType  == '2'" :data="prescription.project" border style="width: 98%;" :row-style="{ color: '#303133' }"
83
+    <el-table v-if="activeType  == 2" :data="prescription.project" border style="width: 98%;" :row-style="{ color: '#303133' }"
84
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
84
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
85
       <el-table-column align="center" type="selection" width="40"></el-table-column>
85
       <el-table-column align="center" type="selection" width="40"></el-table-column>
86
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
86
       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>