mainqaq 2 年 前
コミット
f4d4e3a1e5
共有2 個のファイルを変更した85 個の追加20 個の削除を含む
  1. 19 15
      src/xt_pages/outpatientDoctorStation/batch_mode_template.vue
  2. 66 5
      src/xt_pages/outpatientDoctorStation/batch_replacement.vue

+ 19 - 15
src/xt_pages/outpatientDoctorStation/batch_mode_template.vue ファイルの表示

249
                       type="text"
249
                       type="text"
250
                       size="small"
250
                       size="small"
251
                       style="width: 30px; height: 30px"
251
                       style="width: 30px; height: 30px"
252
-                    >
253
-                      <i class="el-icon-circle-plus-outline"></i>
252
+                    >添加
253
+<!--                      <i class="el-icon-circle-plus-outline"></i>-->
254
                     </el-button>
254
                     </el-button>
255
                     <el-button
255
                     <el-button
256
                       style="width: 30px; height: 30px"
256
                       style="width: 30px; height: 30px"
259
                       "
259
                       "
260
                       type="text"
260
                       type="text"
261
                       size="small"
261
                       size="small"
262
-                    >
263
-                      <i class="el-icon-remove-outline"></i>
262
+                    >移除
263
+<!--                      <i class="el-icon-remove-outline"></i>-->
264
                     </el-button>
264
                     </el-button>
265
                   </template>
265
                   </template>
266
                 </el-table-column>
266
                 </el-table-column>
379
                     ></el-input>
379
                     ></el-input>
380
                   </template>
380
                   </template>
381
                 </el-table-column>
381
                 </el-table-column>
382
-                <el-table-column label="推送频率" width="120">
382
+                <el-table-column label="推送频率" width="120" v-if="1==2">
383
                   <template slot-scope="scope">
383
                   <template slot-scope="scope">
384
                     <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>
384
                     <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>
385
                     <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>
385
                     <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>
388
                 </el-table-column>
388
                 </el-table-column>
389
                 <el-table-column fixed="right" label="操作" width="102">
389
                 <el-table-column fixed="right" label="操作" width="102">
390
                   <template slot-scope="scope">
390
                   <template slot-scope="scope">
391
-                    <el-button
392
-                      @click.native.prevent="addopen(scope.$index)"
393
-                      type="text"
394
-                      size="small">
395
-                      推送
396
-                    </el-button>
391
+<!--                    <el-button-->
392
+<!--                      @click.native.prevent="addopen(scope.$index)"-->
393
+<!--                      type="text"-->
394
+<!--                      size="small">-->
395
+<!--                      推送-->
396
+<!--                    </el-button>-->
397
                     <el-button
397
                     <el-button
398
                       @click.native.prevent="
398
                       @click.native.prevent="
399
                         addRow2(scope.$index, item.project)
399
                         addRow2(scope.$index, item.project)
920
     deleteRow(index, rows) {
920
     deleteRow(index, rows) {
921
       console.log("index",index)
921
       console.log("index",index)
922
       console.log("rows",rows)
922
       console.log("rows",rows)
923
+      if(rows.length == 1){
924
+        this.$message.error("最后一条处方,不能删除")
925
+        return
926
+      }
923
       rows.splice(index, 1);
927
       rows.splice(index, 1);
924
     },
928
     },
925
     addRow(index, rows){
929
     addRow(index, rows){
999
     },
1003
     },
1000
     handleTabsEdit(targetName, action,tab) {
1004
     handleTabsEdit(targetName, action,tab) {
1001
       this.tabhang = this.editableTabs.length
1005
       this.tabhang = this.editableTabs.length
1002
-      if(this.editableTabs.length == 1){
1003
-        this.$message.error("最后一条处方,不能删除")
1004
-        return
1005
-      }
1006
       console.log("this.tabhang3",this.tabhang)
1006
       console.log("this.tabhang3",this.tabhang)
1007
       if (action === "add") {
1007
       if (action === "add") {
1008
         let newTabName = ++this.tabIndex + "";
1008
         let newTabName = ++this.tabIndex + "";
1048
         this.editableTabsValue = newTabName;
1048
         this.editableTabsValue = newTabName;
1049
       }
1049
       }
1050
       if (action === "remove") {
1050
       if (action === "remove") {
1051
+        if(this.editableTabs.length == 1){
1052
+          this.$message.error("最后一条处方,不能删除")
1053
+          return
1054
+        }
1051
         let tabs = this.editableTabs;
1055
         let tabs = this.editableTabs;
1052
         let activeName = this.editableTabsValue;
1056
         let activeName = this.editableTabsValue;
1053
         if (activeName === targetName) {
1057
         if (activeName === targetName) {

+ 66 - 5
src/xt_pages/outpatientDoctorStation/batch_replacement.vue ファイルの表示

568
             if (res.data.state == 1){
568
             if (res.data.state == 1){
569
               this.$message.success('替换成功')
569
               this.$message.success('替换成功')
570
               this.multipleSelection = []
570
               this.multipleSelection = []
571
-              this.druglist = []
572
-              this.projectlist = []
571
+              this.tableData=[]
572
+              this.tableDatas=[{
573
+                id: "",
574
+                drug_name: "",
575
+                single_dose: "",
576
+                single_dose_unit: "",
577
+                delivery_way: "",
578
+                execution_frequency: "",
579
+                day: "",
580
+                prescribing_number: "",
581
+                prescribing_number_unit: "",
582
+                price: "",
583
+                remark: "",
584
+              },];
585
+              this.project=[ {
586
+                id: "",
587
+                drug_name: "",
588
+                translate:"",
589
+                single_dose: "",
590
+                unit: "",
591
+                delivery_way: "",
592
+                execution_frequency: "",
593
+                day: "",
594
+                prescribing_number: "",
595
+                price: "",
596
+                remark: "",
597
+                frequency_type:1,
598
+                day_count:"",
599
+                week_days:"",
600
+              },];
573
             }else{
601
             }else{
574
               this.$message.error(res.data.msg)
602
               this.$message.error(res.data.msg)
575
             }
603
             }
579
             if (res.data.state == 1){
607
             if (res.data.state == 1){
580
               this.$message.success('替换成功')
608
               this.$message.success('替换成功')
581
               this.multipleSelection = []
609
               this.multipleSelection = []
582
-              this.druglist = []
583
-              this.projectlist = []
610
+              this.tableData=[]
611
+              this.tableDatas=[{
612
+                id: "",
613
+                drug_name: "",
614
+                single_dose: "",
615
+                single_dose_unit: "",
616
+                delivery_way: "",
617
+                execution_frequency: "",
618
+                day: "",
619
+                prescribing_number: "",
620
+                prescribing_number_unit: "",
621
+                price: "",
622
+                remark: "",
623
+              },];
624
+              this.project=[ {
625
+                id: "",
626
+                drug_name: "",
627
+                translate:"",
628
+                single_dose: "",
629
+                unit: "",
630
+                delivery_way: "",
631
+                execution_frequency: "",
632
+                day: "",
633
+                prescribing_number: "",
634
+                price: "",
635
+                remark: "",
636
+                frequency_type:1,
637
+                day_count:"",
638
+                week_days:"",
639
+              },];
584
             }else{
640
             }else{
585
               this.$message.error(res.data.msg)
641
               this.$message.error(res.data.msg)
586
             }
642
             }
648
           this.project[0].day = res.data.data.list[0].day;
704
           this.project[0].day = res.data.data.list[0].day;
649
           this.project[0].prescribing_number = res.data.data.list[0].prescribing_number;
705
           this.project[0].prescribing_number = res.data.data.list[0].prescribing_number;
650
           this.project[0].unit = res.data.data.list[0].unit;
706
           this.project[0].unit = res.data.data.list[0].unit;
651
-          this.project[0].price = res.data.data.list[0].retail_price;
707
+          if (res.data.data.list[0].retail_price != null){
708
+            this.project[0].price = res.data.data.list[0].retail_price;
709
+          }else{
710
+            this.project[0].price = res.data.data.list[0].price;
711
+          }
712
+
652
           this.project[0].remark = res.data.data.list[0].remark;
713
           this.project[0].remark = res.data.data.list[0].remark;
653
         }
714
         }
654
       })
715
       })