mainqaq 2 years ago
parent
commit
f4d4e3a1e5

+ 19 - 15
src/xt_pages/outpatientDoctorStation/batch_mode_template.vue View File

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

+ 66 - 5
src/xt_pages/outpatientDoctorStation/batch_replacement.vue View File

@@ -568,8 +568,36 @@ export default {
568 568
             if (res.data.state == 1){
569 569
               this.$message.success('替换成功')
570 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 601
             }else{
574 602
               this.$message.error(res.data.msg)
575 603
             }
@@ -579,8 +607,36 @@ export default {
579 607
             if (res.data.state == 1){
580 608
               this.$message.success('替换成功')
581 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 640
             }else{
585 641
               this.$message.error(res.data.msg)
586 642
             }
@@ -648,7 +704,12 @@ export default {
648 704
           this.project[0].day = res.data.data.list[0].day;
649 705
           this.project[0].prescribing_number = res.data.data.list[0].prescribing_number;
650 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 713
           this.project[0].remark = res.data.data.list[0].remark;
653 714
         }
654 715
       })