See999 4 年之前
父節點
當前提交
3b16dfd3fe

+ 9 - 8
src/App.vue 查看文件

19
   },
19
   },
20
   
20
   
21
   created(){
21
   created(){
22
-    getOrgs().then(response => {
23
-      if (response.data.state === 1) {
24
-        var creator = response.data.data.creator;
25
-        console.log("creator", creator);
26
-        
27
-        // this.getToken(creator.org_id,creator.admin_user_id)
28
-      }
29
-    });
22
+    // getOrgs().then(response => {
23
+    //   if (response.data.state === 1) {
24
+    //     var creator = response.data.data.creator;
25
+    //     console.log("creator", creator);
26
+    //     sessionStorage.setItem("org_id",creator.org_id);
27
+    //     sessionStorage.setItem("admin_user_id",creator.admin_user_id);
28
+    //     this.getToken(creator.org_id,creator.admin_user_id)
29
+    //   }
30
+    // });
30
     
31
     
31
   },
32
   },
32
   methods: {
33
   methods: {

+ 66 - 8
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue 查看文件

439
           <el-col :span="8">
439
           <el-col :span="8">
440
             <el-form-item label="医嘱名称:">
440
             <el-form-item label="医嘱名称:">
441
               <!-- <el-input v-model="form.advice_name"></el-input> -->
441
               <!-- <el-input v-model="form.advice_name"></el-input> -->
442
-              <el-select
442
+              <!-- <el-select
443
                 v-model="form.advice_name"
443
                 v-model="form.advice_name"
444
                 filterable
444
                 filterable
445
                 clearable
445
                 clearable
454
                   :label="item.drug_name"
454
                   :label="item.drug_name"
455
                   :value="item.drug_name"
455
                   :value="item.drug_name"
456
                 ></el-option>
456
                 ></el-option>
457
-              </el-select>
457
+              </el-select> -->
458
+
459
+              <el-autocomplete
460
+                style="width:100%;"
461
+                class="inline-input"
462
+                v-model="form.advice_name"
463
+                :fetch-suggestions="querySearch"
464
+                placeholder="请输入内容"
465
+                @select="handleSelect"
466
+                @input="changeDrugName"
467
+              ></el-autocomplete>
458
             </el-form-item>
468
             </el-form-item>
459
           </el-col>
469
           </el-col>
460
 
470
 
462
             <el-form-item label="药品规格:">
472
             <el-form-item label="药品规格:">
463
               <!-- <el-input v-model="form.advice_desc" style="width: 40%;"></el-input> -->
473
               <!-- <el-input v-model="form.advice_desc" style="width: 40%;"></el-input> -->
464
 
474
 
465
-               <el-select
475
+               <!-- <el-select
466
                   v-model="form.advice_desc"
476
                   v-model="form.advice_desc"
467
                   filterable
477
                   filterable
468
                   clearable
478
                   clearable
477
                     :label="item.drug_spec"
487
                     :label="item.drug_spec"
478
                     :value="item.drug_spec"
488
                     :value="item.drug_spec"
479
                   ></el-option>
489
                   ></el-option>
480
-                 </el-select>
490
+                 </el-select> -->
491
+                <el-autocomplete
492
+                  style="width:100px;"
493
+                  class="inline-input"
494
+                  v-model="form.advice_desc"
495
+                  :fetch-suggestions="querySearch1"
496
+                  placeholder="请输入内容"
497
+                  @select="handleSelect1"
498
+                  @input="changeDrugDesc"
499
+                ></el-autocomplete>
500
+                 
481
                 <el-select
501
                 <el-select
482
                   v-model="form.drug_spec_unit"
502
                   v-model="form.drug_spec_unit"
483
                   style="width: 56%;"
503
                   style="width: 56%;"
1093
           this.groupForm.adviceNames[
1113
           this.groupForm.adviceNames[
1094
             this.nameForm.index
1114
             this.nameForm.index
1095
             ].delivery_way = this.nameForm.delivery_way
1115
             ].delivery_way = this.nameForm.delivery_way
1096
-          this.groupForm.adviceNames[
1097
-            this.nameForm.index
1098
-            ].execution_frequency = this.nameForm.execution_frequency
1116
+          this.groupForm.adviceNames[this.nameForm.index].execution_frequency = this.nameForm.execution_frequency
1117
+          this.groupForm.adviceNames[this.nameForm.index].drug_name_id = this.nameForm.drug_name_id
1118
+          this.groupForm.adviceNames[this.nameForm.index].way = this.nameForm.way
1119
+          this.groupForm.adviceNames[this.nameForm.index].drug_id = this.nameForm.drug_id
1099
         } else {
1120
         } else {
1100
           this.groupForm.adviceNames.push(this.nameForm)
1121
           this.groupForm.adviceNames.push(this.nameForm)
1101
         }
1122
         }
2397
             this.src_type = this.drugSpec[i].type
2418
             this.src_type = this.drugSpec[i].type
2398
             this.form.drug_id = this.drugSpec[i].id
2419
             this.form.drug_id = this.drugSpec[i].id
2399
             this.form.way = this.drugSpec[i].type
2420
             this.form.way = this.drugSpec[i].type
2400
-            this.form.drug_name_id = this.drugSpec[i].drug_name_id
2421
+            if(this.drugSpec[i].drug_name_id){
2422
+              console.log("22222",this.drugSpec[i].drug_name_id)
2423
+               this.form.drug_name_id = this.drugSpec[i].drug_name_id
2424
+            }else{
2425
+              this.form.drug_name_id = 0
2426
+            }
2427
+           
2401
           }
2428
           }
2402
         }
2429
         }
2403
       },
2430
       },
2404
       rand(min, max) {
2431
       rand(min, max) {
2405
         return Math.floor(Math.random() * (max - min)) + min;
2432
         return Math.floor(Math.random() * (max - min)) + min;
2406
       },
2433
       },
2434
+
2435
+     querySearch(queryString, cb) {
2436
+        console.log('queryString',queryString)
2437
+        var restaurants = this.all_drug;
2438
+        restaurants.map(item => {
2439
+          item.value = item.drug_name
2440
+        })
2441
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2442
+        // 调用 callback 返回建议列表的数据
2443
+        console.log('results',results)
2444
+        cb(results);
2445
+     },
2446
+
2447
+     createFilter(queryString) {
2448
+        return (restaurant) => {
2449
+          return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
2450
+        };
2451
+     },
2452
+
2453
+     querySearch1(queryString, cb) {
2454
+        console.log('queryString',queryString)
2455
+        var restaurants = this.drugSpec;
2456
+         console.log(restaurants)
2457
+        restaurants.map(item => {
2458
+          item.value = item.drug_spec
2459
+        })
2460
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2461
+        // 调用 callback 返回建议列表的数据
2462
+        console.log('results',results)
2463
+        cb(results);
2464
+      },
2407
     },
2465
     },
2408
     created() {
2466
     created() {
2409
       var date = this.$route.query && this.$route.query.date
2467
       var date = this.$route.query && this.$route.query.date

+ 72 - 20
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue 查看文件

370
         <el-row>
370
         <el-row>
371
           <el-col :span="24">
371
           <el-col :span="24">
372
             <el-form-item label="医嘱内容 :" required prop="advice_name">
372
             <el-form-item label="医嘱内容 :" required prop="advice_name">
373
-               <el-select
373
+               <!-- <el-select
374
                 v-model="nameForm.advice_name"
374
                 v-model="nameForm.advice_name"
375
                 filterable
375
                 filterable
376
                 clearable
376
                 clearable
386
                   :label="item.drug_name"
386
                   :label="item.drug_name"
387
                   :value="item.drug_name"
387
                   :value="item.drug_name"
388
                 ></el-option>
388
                 ></el-option>
389
-              </el-select>
389
+              </el-select> -->
390
+
391
+             <el-autocomplete
392
+                style="width:100%;"
393
+                class="inline-input"
394
+                v-model="nameForm.advice_name"
395
+                :fetch-suggestions="querySearch"
396
+                placeholder="请输入内容"
397
+                @select="handleSelect"
398
+                @input="changeDrugName"
399
+              ></el-autocomplete>
390
             </el-form-item>
400
             </el-form-item>
391
             <!-- <div style="margin-left:120px;margin-top:-20px;font-size:12px;color:red">
401
             <!-- <div style="margin-left:120px;margin-top:-20px;font-size:12px;color:red">
392
                库存不足50
402
                库存不足50
403
             <el-form-item label="药品规格 :" prop="advice_desc">
413
             <el-form-item label="药品规格 :" prop="advice_desc">
404
               <el-col :span="8">
414
               <el-col :span="8">
405
                 <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
415
                 <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
406
-                 <el-select
416
+                 <!-- <el-select
407
                   v-model="nameForm.advice_desc"
417
                   v-model="nameForm.advice_desc"
408
                   filterable
418
                   filterable
409
                   clearable
419
                   clearable
418
                     :label="item.drug_spec"
428
                     :label="item.drug_spec"
419
                     :value="item.drug_spec"
429
                     :value="item.drug_spec"
420
                   ></el-option>
430
                   ></el-option>
421
-                 </el-select>
431
+                 </el-select> -->
432
+
433
+
434
+                <el-autocomplete
435
+                  style="width:100px;"
436
+                  class="inline-input"
437
+                  v-model="nameForm.advice_desc"
438
+                  :fetch-suggestions="querySearch1"
439
+                  placeholder="请输入内容"
440
+                  @select="handleSelect1"
441
+                  @input="changeDrugDesc"
442
+                ></el-autocomplete>
422
 
443
 
423
               </el-col>
444
               </el-col>
424
               <el-col class="line" :span="2">&nbsp;</el-col>
445
               <el-col class="line" :span="2">&nbsp;</el-col>
613
         index: 0,
634
         index: 0,
614
         id: 0,
635
         id: 0,
615
         children: [],
636
         children: [],
616
-        drug_id:"",
617
-        way:"",
618
-        drug_name_id:"",
637
+        drug_id:0,
638
+        way:0,
639
+        drug_name_id:0,
619
       },
640
       },
620
       submitGroupForm: {
641
       submitGroupForm: {
621
         advice_type: "",
642
         advice_type: "",
636
         parent_id: 0,
657
         parent_id: 0,
637
         drug_id:"",
658
         drug_id:"",
638
         way:"",
659
         way:"",
639
-        drug_name_id:"",
660
+        drug_name_id:0,
640
       },
661
       },
641
       selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
662
       selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
642
       selectedTemplate: [],
663
       selectedTemplate: [],
894
                       _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way;
915
                       _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way;
895
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
916
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
896
                       _this.groupForm.adviceNames[index].children[j].remark =_this.nameForm.remark;
917
                       _this.groupForm.adviceNames[index].children[j].remark =_this.nameForm.remark;
897
-                      _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
898
-                      _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
899
-                      _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id;
918
+                      // _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
919
+                      // _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
920
+                      // _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id;
900
                       _this.$set(_this.groupForm.adviceNames[index].children,j,_this.groupForm.adviceNames[index].children[j]
921
                       _this.$set(_this.groupForm.adviceNames[index].children,j,_this.groupForm.adviceNames[index].children[j]
901
                      
922
                      
902
                       );
923
                       );
919
                   _this.groupForm.adviceNames[index].delivery_way =_this.nameForm.delivery_way;
940
                   _this.groupForm.adviceNames[index].delivery_way =_this.nameForm.delivery_way;
920
                   _this.groupForm.adviceNames[index].execution_frequency =_this.nameForm.execution_frequency;
941
                   _this.groupForm.adviceNames[index].execution_frequency =_this.nameForm.execution_frequency;
921
                   _this.groupForm.adviceNames[index].remark =_this.nameForm.remark;
942
                   _this.groupForm.adviceNames[index].remark =_this.nameForm.remark;
922
-                  _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
923
-                  _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
924
-                  _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id;
943
+                  // _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
944
+                  // _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
945
+                  // _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id;
925
                   _this.$set(
946
                   _this.$set(
926
                     _this.groupForm.adviceNames,
947
                     _this.groupForm.adviceNames,
927
                     index,
948
                     index,
1063
       this.selectedTemplate = selection;
1084
       this.selectedTemplate = selection;
1064
     },
1085
     },
1065
     selectAdvice(selection, row) {
1086
     selectAdvice(selection, row) {
1066
-      // this.selectedTemplate = [];
1067
-
1068
-      // console.log(selection);
1087
+     
1088
+     console.log("row",row)
1069
 
1089
 
1070
       var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id]
1090
       var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id]
1071
         .DoctorAdviceTemplate;
1091
         .DoctorAdviceTemplate;
1455
       this.templateFormVisible = true;
1475
       this.templateFormVisible = true;
1456
     },
1476
     },
1457
     selectGroupAdvice(row) {
1477
     selectGroupAdvice(row) {
1478
+      console.log("row-----",row)
1458
       this.groupSelectRow = row;
1479
       this.groupSelectRow = row;
1459
     },
1480
     },
1460
     groupClassName({ row, rowIndex }) {
1481
     groupClassName({ row, rowIndex }) {
1487
       this.adminusername = xtuser.user.user_name;
1508
       this.adminusername = xtuser.user.user_name;
1488
     },
1509
     },
1489
     selectAllTemplateAdvice(selection) {
1510
     selectAllTemplateAdvice(selection) {
1490
-      var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id]
1491
-        .DoctorAdviceTemplate;
1511
+      console.log("params",selection)
1512
+      var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id].DoctorAdviceTemplate;
1492
       for (let y = 0; y < adviceArray.length; y++) {
1513
       for (let y = 0; y < adviceArray.length; y++) {
1493
         adviceArray[y].selection = false;
1514
         adviceArray[y].selection = false;
1494
       }
1515
       }
1639
            
1660
            
1640
           }
1661
           }
1641
         }
1662
         }
1642
-      }
1663
+      },
1664
+
1665
+     querySearch(queryString, cb) {
1666
+        console.log('queryString',queryString)
1667
+        var restaurants = this.all_drug;
1668
+        restaurants.map(item => {
1669
+          item.value = item.drug_name
1670
+        })
1671
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
1672
+        // 调用 callback 返回建议列表的数据
1673
+        console.log('results',results)
1674
+        cb(results);
1675
+     },
1676
+
1677
+     createFilter(queryString) {
1678
+        return (restaurant) => {
1679
+          return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
1680
+        };
1681
+     },
1682
+
1683
+     querySearch1(queryString, cb) {
1684
+        console.log('queryString',queryString)
1685
+        var restaurants = this.drugSpec;
1686
+         console.log(restaurants)
1687
+        restaurants.map(item => {
1688
+          item.value = item.drug_spec
1689
+        })
1690
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
1691
+        // 调用 callback 返回建议列表的数据
1692
+        console.log('results',results)
1693
+        cb(results);
1694
+      },
1643
   },
1695
   },
1644
   watch: {
1696
   watch: {
1645
     "selectedTemp.list": function() {
1697
     "selectedTemp.list": function() {

+ 56 - 4
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue 查看文件

370
           <el-col :span="10">
370
           <el-col :span="10">
371
             <el-form-item label="医嘱内容 :" required prop="advice_name">
371
             <el-form-item label="医嘱内容 :" required prop="advice_name">
372
               <!-- <el-input v-model="nameForm.advice_name"></el-input> -->
372
               <!-- <el-input v-model="nameForm.advice_name"></el-input> -->
373
-               <el-select
373
+               <!-- <el-select
374
                 v-model="nameForm.advice_name"
374
                 v-model="nameForm.advice_name"
375
                 filterable
375
                 filterable
376
                 clearable
376
                 clearable
386
                   :label="item.drug_name"
386
                   :label="item.drug_name"
387
                   :value="item.drug_name"
387
                   :value="item.drug_name"
388
                 ></el-option>
388
                 ></el-option>
389
-              </el-select>
389
+              </el-select> -->
390
+
391
+              <el-autocomplete
392
+                style="width:100%;"
393
+                class="inline-input"
394
+                v-model="nameForm.advice_name"
395
+                :fetch-suggestions="querySearch"
396
+                placeholder="请输入内容"
397
+                @select="handleSelect"
398
+                @input="changeDrugName"
399
+              ></el-autocomplete>
390
             </el-form-item>
400
             </el-form-item>
401
+           
391
           </el-col>
402
           </el-col>
392
           <el-col :span="14">
403
           <el-col :span="14">
393
             <!--<el-form-item label="规格 :" prop="advice_desc">-->
404
             <!--<el-form-item label="规格 :" prop="advice_desc">-->
396
             <el-form-item label="药品规格 :" prop="advice_desc">
407
             <el-form-item label="药品规格 :" prop="advice_desc">
397
               <el-col :span="10">
408
               <el-col :span="10">
398
                 <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
409
                 <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
399
-                <el-select
410
+                <!-- <el-select
400
                   v-model="nameForm.advice_desc"
411
                   v-model="nameForm.advice_desc"
401
                   filterable
412
                   filterable
402
                   clearable
413
                   clearable
412
                     :label="item.drug_spec"
423
                     :label="item.drug_spec"
413
                     :value="item.drug_spec"
424
                     :value="item.drug_spec"
414
                   ></el-option>
425
                   ></el-option>
415
-                 </el-select>
426
+                 </el-select> -->
427
+
428
+                 <el-autocomplete
429
+                  style="width:100px;"
430
+                  class="inline-input"
431
+                  v-model="nameForm.advice_desc"
432
+                  :fetch-suggestions="querySearch1"
433
+                  placeholder="请输入内容"
434
+                  @select="handleSelect1"
435
+                  @input="changeDrugDesc"
436
+                ></el-autocomplete>
416
               </el-col>
437
               </el-col>
417
               <el-col class="line" :span="2">&nbsp;</el-col>
438
               <el-col class="line" :span="2">&nbsp;</el-col>
418
               <el-col :span="10">
439
               <el-col :span="10">
2271
       }
2292
       }
2272
     },
2293
     },
2273
     SaveEditAdvices() {
2294
     SaveEditAdvices() {
2295
+      console.log("aaa")
2274
       const params = {
2296
       const params = {
2275
         start_time: this.groupForm.start_time,
2297
         start_time: this.groupForm.start_time,
2276
         groupno: this.groupForm.groupno,
2298
         groupno: this.groupForm.groupno,
2404
     rand(min, max) {
2426
     rand(min, max) {
2405
         return Math.floor(Math.random() * (max - min)) + min;
2427
         return Math.floor(Math.random() * (max - min)) + min;
2406
      },
2428
      },
2429
+     querySearch(queryString, cb) {
2430
+       
2431
+        var restaurants = this.all_drug;
2432
+        restaurants.map(item => {
2433
+          item.value = item.drug_name
2434
+        })
2435
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2436
+        // 调用 callback 返回建议列表的数据
2437
+     
2438
+        cb(results);
2439
+     },
2440
+
2441
+     createFilter(queryString) {
2442
+        return (restaurant) => {
2443
+          return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
2444
+        };
2445
+     },
2446
+
2447
+     querySearch1(queryString, cb) {
2448
+        console.log('queryString',queryString)
2449
+        var restaurants = this.drugSpec;
2450
+         console.log(restaurants)
2451
+        restaurants.map(item => {
2452
+          item.value = item.drug_spec
2453
+        })
2454
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2455
+        // 调用 callback 返回建议列表的数据
2456
+        console.log('results',results)
2457
+        cb(results);
2458
+      },
2407
   },
2459
   },
2408
   watch: {
2460
   watch: {
2409
     "selectedTemp.list": function() {
2461
     "selectedTemp.list": function() {

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/advice.vue 查看文件

13
                 <el-form-item class="width50" label="开嘱时间 : " prop="name">
13
                 <el-form-item class="width50" label="开嘱时间 : " prop="name">
14
                     张三
14
                     张三
15
                 </el-form-item>
15
                 </el-form-item>
16
-                <el-form-item label="医嘱内容 : " prop="name" style="width:100%;">
16
+                <el-form-item label="医嘱内容: " prop="name" style="width:100%;">
17
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"></el-input>
17
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"></el-input>
18
                 </el-form-item>
18
                 </el-form-item>
19
                 <el-form-item class="width50" label="药品规格 : " prop="name">
19
                 <el-form-item class="width50" label="药品规格 : " prop="name">

+ 14 - 13
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue 查看文件

70
       </div>
70
       </div>
71
       <div style="padding-left:10px;flex:1">
71
       <div style="padding-left:10px;flex:1">
72
         <div class="tableTitle">统计表</div>
72
         <div class="tableTitle">统计表</div>
73
-        <el-table :data="DialysisData" style="width: 100%" border :row-style="{ color: '#303133' }"
73
+        <el-table :data="DialysisData" style="width: 100%" border :row-style="{ color: '#303133' }" 
74
         :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
         :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
75
         >
75
         >
76
           <el-table-column prop="name" label="姓名" width="140">
76
           <el-table-column prop="name" label="姓名" width="140">
84
           </el-table-column>
84
           </el-table-column>
85
           <el-table-column prop="mode_id" label="透析模式">
85
           <el-table-column prop="mode_id" label="透析模式">
86
               <template slot-scope="scope">
86
               <template slot-scope="scope">
87
-                <span>{{ scope.row.mode_id.join("、")}}</span>
87
+                <!-- <span>{{ scope.row.mode_id.join("、") }}</span> -->
88
+                <span>{{getModeIdCount(scope.row.patient_id)}}</span>
88
               </template>
89
               </template>
89
            </el-table-column>
90
            </el-table-column>
90
           <el-table-column prop="address" label="透析总次数" width="140">
91
           <el-table-column prop="address" label="透析总次数" width="140">
140
           let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
141
           let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
141
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
142
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
142
         }
143
         }
143
-      },
144
+      }, 
144
       patient_id:0,
145
       patient_id:0,
145
       modeIdCount:[],
146
       modeIdCount:[],
146
     };
147
     };
154
       } else {
155
       } else {
155
         this.getDialysisList()
156
         this.getDialysisList()
156
       }
157
       }
157
-
158
+      
158
     },
159
     },
159
     changeEndTime(val) {
160
     changeEndTime(val) {
160
       var time =
161
       var time =
194
          if(response.data.state === 1){
195
          if(response.data.state === 1){
195
           var list = response.data.data.list
196
           var list = response.data.data.list
196
           var totallist  =  response.data.data.totallist
197
           var totallist  =  response.data.data.totallist
197
-          this.total = totallist
198
+          this.total = totallist  
198
           var prescriptionList = response.data.data.prescriptionList
199
           var prescriptionList = response.data.data.prescriptionList
199
-
200
+         
200
           this.getModeId(prescriptionList)
201
           this.getModeId(prescriptionList)
201
           var count = response.data.data.count
202
           var count = response.data.data.count
202
           this.DialysisCount = count
203
           this.DialysisCount = count
203
-
204
+          
204
           var modeIdCount = response.data.data.modeIdCount
205
           var modeIdCount = response.data.data.modeIdCount
205
           console.log("modeidcount=====",modeIdCount)
206
           console.log("modeidcount=====",modeIdCount)
206
           for(let i=0;i<modeIdCount.length;i++){
207
           for(let i=0;i<modeIdCount.length;i++){
279
             }
280
             }
280
           })
281
           })
281
           let list = Object.values(dataInfo)
282
           let list = Object.values(dataInfo)
282
-          // console.log("arr",list)
283
+          // console.log("arr",list)    
283
           list.map(item => {
284
           list.map(item => {
284
             for (let i = 0; i < prescriptionList.length; i++) {
285
             for (let i = 0; i < prescriptionList.length; i++) {
285
               if (item.patient_id === prescriptionList[i].patient_id) {
286
               if (item.patient_id === prescriptionList[i].patient_id) {
346
          }
347
          }
347
        })
348
        })
348
       }
349
       }
349
-
350
+    
350
     },
351
     },
351
     unique(arr) {
352
     unique(arr) {
352
         const res = new Map();
353
         const res = new Map();
380
             // console.log("total",total)
381
             // console.log("total",total)
381
           }
382
           }
382
        })
383
        })
383
-
384
+     
384
     },
385
     },
385
     getModeId(patients){
386
     getModeId(patients){
386
       for(let i=0;i<patients.length;i++){
387
       for(let i=0;i<patients.length;i++){
456
         }
457
         }
457
         let str = ''
458
         let str = ''
458
         arr.map(item => {
459
         arr.map(item => {
459
-          str += item.mode_id + '(' + item.Count + '次) 、'
460
+          str += item.mode_id + '(' + item.Count + '次) 、' 
460
         })
461
         })
461
         var strs = str.substring(0, str.length - 1)
462
         var strs = str.substring(0, str.length - 1)
462
-
463
+       
463
         return strs
464
         return strs
464
       }
465
       }
465
   },
466
   },
484
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
485
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
485
       "-" +
486
       "-" +
486
       (nowDay < 10 ? "0" + nowDay : nowDay);
487
       (nowDay < 10 ? "0" + nowDay : nowDay);
487
-
488
+    
488
      //获取该机构下的所有患者
489
      //获取该机构下的所有患者
489
      this.getCurrentOrgPatients()
490
      this.getCurrentOrgPatients()
490
      //统计列表
491
      //统计列表

+ 5 - 14
src/xt_pages/stock/selfPreparedMedicine/index.vue 查看文件

26
                 value-format="yyyy-MM-dd"
26
                 value-format="yyyy-MM-dd"
27
                 @change="changeStartime"
27
                 @change="changeStartime"
28
                 ></el-date-picker>
28
                 ></el-date-picker>
29
-                <!-- <el-select v-model="value" placeholder="请选择">
30
-                    <el-option
31
-                    v-for="item in options"
32
-                    :key="item.value"
33
-                    :label="item.label"
34
-                    :value="item.value">
35
-                    </el-option>
36
-                </el-select> -->
37
-                <!-- <el-input style="width: 180px;margin:0 10px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/> -->
38
-                <!-- <el-button class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button> -->
39
                  <el-autocomplete
29
                  <el-autocomplete
40
                   style="margin:16px 5px"
30
                   style="margin:16px 5px"
41
                   popper-class="my-autocomplete"
31
                   popper-class="my-autocomplete"
146
 import warehousing from "./components/warehousing"
136
 import warehousing from "./components/warehousing"
147
 import warehouseOut from "./components/warehouseOut"
137
 import warehouseOut from "./components/warehouseOut"
148
 const moment = require('moment')
138
 const moment = require('moment')
139
+import { PostSearch } from '@/api/patient'
149
 import { getCurrentPatient,saveRadio,getStockList,DeleteDrugNameById,getDrugSet } from "@/api/drug/drug"
140
 import { getCurrentPatient,saveRadio,getStockList,DeleteDrugNameById,getDrugSet } from "@/api/drug/drug"
150
 export default {
141
 export default {
151
     components:{
142
     components:{
358
             key = keyword
349
             key = keyword
359
           }
350
           }
360
           let searchArray = []
351
           let searchArray = []
361
-          getCurrentPatient(key).then(response => {
352
+          PostSearch(key).then(response => {
362
             if (response.data.state == 1) {
353
             if (response.data.state == 1) {
363
               searchArray = response.data.data.patient
354
               searchArray = response.data.data.patient
355
+              console.log("searchArray",searchArray)
356
+           
364
               cb(searchArray)
357
               cb(searchArray)
365
             }
358
             }
366
           })
359
           })
367
           return searchArray
360
           return searchArray
368
         },
361
         },
369
         handleSelect(val){
362
         handleSelect(val){
370
-          console.log("val",val.id)
371
-          console.log("2222",this.tablePatient)
363
+          console.log("val",val)
372
           this.search_input = val.name
364
           this.search_input = val.name
373
           for(let i=0;i<this.tablePatient.length;i++){
365
           for(let i=0;i<this.tablePatient.length;i++){
374
              if(this.tablePatient[i].id == val.id){
366
              if(this.tablePatient[i].id == val.id){
375
-               console.log("建立")
376
                this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[i])
367
                this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[i])
377
              }
368
              }
378
           }
369
           }

+ 27 - 19
src/xt_pages/stock/selfPreparedMedicine/query.vue 查看文件

83
                 <el-table-column align="center" prop="name" label="规格名称">
83
                 <el-table-column align="center" prop="name" label="规格名称">
84
                     <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
84
                     <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
85
                 </el-table-column>
85
                 </el-table-column>
86
-                <el-table-column align="center" prop="name" label="单位" width="80">
86
+                <!-- <el-table-column align="center" prop="name" label="单位" width="80">
87
                     <template slot-scope="scope">{{ scope.row.min_unit }}</template>
87
                     <template slot-scope="scope">{{ scope.row.min_unit }}</template>
88
-                </el-table-column>
88
+                </el-table-column> -->
89
                 <el-table-column align="center" prop="name" label="自备量" width="80">
89
                 <el-table-column align="center" prop="name" label="自备量" width="80">
90
-                    <template slot-scope="scope">{{ scope.row.Total }}</template>
90
+                    <template slot-scope="scope">{{ scope.row.Total?scope.row.Total:0 }}</template>
91
                 </el-table-column>
91
                 </el-table-column>
92
                 <el-table-column align="center" prop="name" label="已使用" width="80">
92
                 <el-table-column align="center" prop="name" label="已使用" width="80">
93
                     <template slot-scope="scope">{{ scope.row.Count }}</template>
93
                     <template slot-scope="scope">{{ scope.row.Count }}</template>
94
                 </el-table-column>
94
                 </el-table-column>
95
                 <el-table-column align="center" prop="name" label="剩余" width="80">
95
                 <el-table-column align="center" prop="name" label="剩余" width="80">
96
-                    <template slot-scope="scope">{{ scope.row.Total - scope.row.Count }}</template>
96
+                    <template slot-scope="scope">{{ scope.row.Total?scope.row.Total:0 - scope.row.Count }}</template>
97
                 </el-table-column>
97
                 </el-table-column>
98
             </el-table>
98
             </el-table>
99
         </div>
99
         </div>
121
             search_input:"",
121
             search_input:"",
122
             options:[],
122
             options:[],
123
             value:"",
123
             value:"",
124
-            // start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
125
-            // end_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
126
-            start_time:"",
127
-            end_time:"",
128
-            drug_name:0,
124
+            start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
125
+            end_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
126
+            // start_time:"",
127
+            // end_time:"",
128
+            drug_name:"",
129
             drug_spec:"",
129
             drug_spec:"",
130
             drugName:[],
130
             drugName:[],
131
             rulleName:[]
131
             rulleName:[]
137
         },
137
         },
138
         exportList(){
138
         exportList(){
139
          import('@/vendor/Export2Excel').then(excel => {
139
          import('@/vendor/Export2Excel').then(excel => {
140
-         const tHeader = ['序号', '透析号', '姓名','药品名称','规格名称','单位','自备量','已使用','剩余']
141
-         const filterVal = ['index', 'dialysis_no', 'name','drug_name','drug_spec','min_unit','Total','Count','margin']
140
+         const tHeader = ['序号', '透析号', '姓名','药品名称','规格名称','自备量','已使用','剩余']
141
+         const filterVal = ['index', 'dialysis_no', 'name','drug_name','drug_spec','Total','Count','margin']
142
          for(let i=0;i<this.tableData.length;i++){
142
          for(let i=0;i<this.tableData.length;i++){
143
             this.tableData[i].margin = this.tableData[i].Total - this.tableData[i].Count
143
             this.tableData[i].margin = this.tableData[i].Total - this.tableData[i].Count
144
          }
144
          }
258
               }
258
               }
259
               var outStockList =  response.data.data.outStockList
259
               var outStockList =  response.data.data.outStockList
260
 
260
 
261
-              
262
-              for(let i=0;i<stocklist.length;i++){
263
-                for(let j=0;j<outStockList.length;j++){
264
-                   if(stocklist[i].patient_id == outStockList[j].patient_id &&stocklist[i].drug_name == outStockList[j].drug_name && stocklist[i].drug_spec == outStockList[j].drug_spec){
265
-                       stocklist[i].Count = outStockList[j].Count
266
-                   }
267
-                }
261
+              // for(let i=0;i<stocklist.length;i++){
262
+              //   for(let j=0;j<outStockList.length;j++){
263
+              //      if(stocklist[i].patient_id == outStockList[j].patient_id &&stocklist[i].drug_name == outStockList[j].drug_name && stocklist[i].drug_spec == outStockList[j].drug_spec){
264
+              //          stocklist[i].Count = outStockList[j].Count
265
+              //      }
266
+              //   }
267
+              // }
268
+
269
+             for(let i=0;i<outStockList.length;i++){
270
+                 for(let j=0;j<stocklist.length;j++){
271
+                     if(outStockList[i].patient_id == stocklist[j].patient_id &&outStockList[i].drug_name == stocklist[j].drug_name && outStockList[i].drug_spec == stocklist[j].drug_spec){
272
+                      outStockList[i].Total = stocklist[j].Total
273
+                   } 
274
+                 }
268
               }
275
               }
269
 
276
 
270
-              this.tableData = stocklist
277
+
278
+              this.tableData = outStockList
271
             }
279
             }
272
         })   
280
         })   
273
       }
281
       }

+ 21 - 12
src/xt_pages/stock/selfPreparedMedicine/queryPrint.vue 查看文件

26
                                     <td width="80">姓名</td>
26
                                     <td width="80">姓名</td>
27
                                     <td>药品名称</td>
27
                                     <td>药品名称</td>
28
                                     <td>规格名称</td>
28
                                     <td>规格名称</td>
29
-                                    <td width="70">单位</td>
29
+                                    <!-- <td width="70">单位</td> -->
30
                                     <td width="70">自备量</td>
30
                                     <td width="70">自备量</td>
31
                                     <td width="70">已使用</td>
31
                                     <td width="70">已使用</td>
32
                                     <td width="70">剩余</td>
32
                                     <td width="70">剩余</td>
39
                                     <td>{{item.name}}</td>
39
                                     <td>{{item.name}}</td>
40
                                     <td>{{item.drug_name}}</td>
40
                                     <td>{{item.drug_name}}</td>
41
                                     <td>{{item.drug_spec}}</td>
41
                                     <td>{{item.drug_spec}}</td>
42
-                                    <td>{{item.min_unit}}</td>
43
-                                    <td>{{item.store_number}}</td>
42
+                                    <!-- <td>{{item.min_unit}}</td> -->
43
+                                    <td>{{item.Total?item.Total:0}}</td>
44
                                     <td>{{item.Count}}</td>
44
                                     <td>{{item.Count}}</td>
45
-                                    <td>{{item.store_number - item.Count}}</td>
45
+                                    <td>{{item.Total?item.Total:0 - item.Count}}</td>
46
                                 </tr>
46
                                 </tr>
47
                             </tbody>
47
                             </tbody>
48
                         </table>
48
                         </table>
97
             drug_spec:this.drug_spec,
97
             drug_spec:this.drug_spec,
98
             search_input:this.keyword
98
             search_input:this.keyword
99
           }
99
           }
100
+        console.log("params------",params)
100
         getAllPatientStockList(params).then(response=>{
101
         getAllPatientStockList(params).then(response=>{
101
             if(response.data.state == 1){
102
             if(response.data.state == 1){
102
               var stocklist = response.data.data.stocklist
103
               var stocklist = response.data.data.stocklist
105
                  stocklist[i].Count = 0
106
                  stocklist[i].Count = 0
106
               }
107
               }
107
               var outStockList =  response.data.data.outStockList
108
               var outStockList =  response.data.data.outStockList
108
-              for(let i=0;i<stocklist.length;i++){
109
-                for(let j=0;j<outStockList.length;j++){
110
-                   if(stocklist[i].patient_id == outStockList[j].patient_id &&stocklist[i].drug_name == outStockList[j].drug_name && stocklist[i].drug_spec == outStockList[j].drug_spec){
111
-                       stocklist[i].Count = outStockList[j].Count
112
-                   }
113
-                }
109
+              // for(let i=0;i<stocklist.length;i++){
110
+              //   for(let j=0;j<outStockList.length;j++){
111
+              //      if(stocklist[i].patient_id == outStockList[j].patient_id &&stocklist[i].drug_name == outStockList[j].drug_name && stocklist[i].drug_spec == outStockList[j].drug_spec){
112
+              //          stocklist[i].Count = outStockList[j].Count
113
+              //      }
114
+              //   }
115
+              // }
116
+
117
+            for(let i=0;i<outStockList.length;i++){
118
+                 for(let j=0;j<stocklist.length;j++){
119
+                     if(outStockList[i].patient_id == stocklist[j].patient_id &&outStockList[i].drug_name == stocklist[j].drug_name && outStockList[i].drug_spec == stocklist[j].drug_spec){
120
+                      outStockList[i].Total = stocklist[j].Total
121
+                   } 
122
+                 }
114
               }
123
               }
115
-              console.log("stocklist99999",stocklist)
116
-              this.tableData = stocklist
124
+              console.log("stocklist99999",outStockList)
125
+              this.tableData = outStockList
117
             }
126
             }
118
         })   
127
         })   
119
       }
128
       }

+ 4 - 2
src/xt_pages/user/components/PatientSidebar.1.vue 查看文件

155
             break
155
             break
156
         }
156
         }
157
         return sex
157
         return sex
158
-      }, querySearchAsync(keyword, cb) {
158
+      },
159
+       querySearchAsync(keyword, cb) {
159
         let key = ''
160
         let key = ''
160
         if (keyword != undefined) {
161
         if (keyword != undefined) {
161
           key = keyword
162
           key = keyword
170
             cb([])
171
             cb([])
171
           }
172
           }
172
         })
173
         })
173
-      }, handleSelect(val) {
174
+      },
175
+       handleSelect(val) {
174
         this.$router.push('/patients/patient/' + val.id)
176
         this.$router.push('/patients/patient/' + val.id)
175
       }
177
       }
176
 
178
 

+ 26 - 5
src/xt_pages/user/doctorAdvice.vue 查看文件

2299
             adviceNames: [],
2299
             adviceNames: [],
2300
             advice_doctor: this.groupForm.advice_doctor,
2300
             advice_doctor: this.groupForm.advice_doctor,
2301
             remark: this.groupForm.remark,
2301
             remark: this.groupForm.remark,
2302
-            parent_id: this.groupForm.parent_id
2302
+            parent_id: this.groupForm.parent_id,
2303
           };
2303
           };
2304
           console.log("22222",submitForm)
2304
           console.log("22222",submitForm)
2305
           console.log("33333",this.private_drug_config.drug_start)
2305
           console.log("33333",this.private_drug_config.drug_start)
2325
           } else if (this.groupForm.advice_type == 3) {
2325
           } else if (this.groupForm.advice_type == 3) {
2326
             mode = "1-1";
2326
             mode = "1-1";
2327
           }
2327
           }
2328
-          
2328
+        console.log("22222222",this.medicals)
2329
+        console.log("3333333",submitForm)
2330
+      
2329
         if(this.private_drug_config.drug_start == 1){
2331
         if(this.private_drug_config.drug_start == 1){
2330
               for(let index=0;index<submitForm.adviceNames.length;index++){
2332
               for(let index=0;index<submitForm.adviceNames.length;index++){
2331
                   for(let i=0;i<this.medicals.length;i++){
2333
                   for(let i=0;i<this.medicals.length;i++){
2332
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
2334
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
2333
                         submitForm.adviceNames[index].way = 2
2335
                         submitForm.adviceNames[index].way = 2
2336
+                        submitForm.adviceNames[index].drug_name_id = this.medicals[i].drug_name_id
2334
                     }
2337
                     }
2335
                   }
2338
                   }
2336
               }
2339
               }
2337
           }
2340
           }
2338
-          console.log("this.===",submitForm)
2341
+          console.log("模板数据",submitForm)
2342
+        
2339
           CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
2343
           CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
2340
             response => {
2344
             response => {
2341
               if (response.data.state == 0) {
2345
               if (response.data.state == 0) {
2642
           prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
2646
           prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
2643
           way:this.groupSelectRow.way,
2647
           way:this.groupSelectRow.way,
2644
           drug_id:this.groupSelectRow.drug_id,
2648
           drug_id:this.groupSelectRow.drug_id,
2649
+          drug_name_id:this.groupSelectRow.drug_name_id,
2645
           delivery_way: this.isChild ? "" : this.groupSelectRow.delivery_way,
2650
           delivery_way: this.isChild ? "" : this.groupSelectRow.delivery_way,
2646
           execution_frequency: this.isChild
2651
           execution_frequency: this.isChild
2647
             ? ""
2652
             ? ""
2684
           children: [],
2689
           children: [],
2685
           parent_row: 0,
2690
           parent_row: 0,
2686
           way:"",
2691
           way:"",
2687
-          drug_id:''
2692
+          drug_id:'',
2693
+          drug_name_id:0,
2688
         };
2694
         };
2689
         this.nameFormTitle = "新增医嘱内容";
2695
         this.nameFormTitle = "新增医嘱内容";
2690
       }
2696
       }
3007
           day_count: groups[index].day_count,
3013
           day_count: groups[index].day_count,
3008
           week_day: groups[index].week_day,
3014
           week_day: groups[index].week_day,
3009
           drug_id:groups[index].drug_id,
3015
           drug_id:groups[index].drug_id,
3016
+          drug_name_id:groups[index].drug_name_id,
3010
           wary:groups[index].way,
3017
           wary:groups[index].way,
3011
           isEdit: 0,
3018
           isEdit: 0,
3012
           index: 0,
3019
           index: 0,
3016
           row_key: this.rowKey,
3023
           row_key: this.rowKey,
3017
           table: []
3024
           table: []
3018
         };
3025
         };
3026
+        console.log("itme-----------",item)
3019
         if (item.id in childMap) {
3027
         if (item.id in childMap) {
3020
           for (const key in childMap[item.id]) {
3028
           for (const key in childMap[item.id]) {
3021
             this.rowKey++;
3029
             this.rowKey++;
3034
               execution_frequency: childMap[item.id][key].execution_frequency,
3042
               execution_frequency: childMap[item.id][key].execution_frequency,
3035
               drug_id:childMap[item.id][key].drug_id,
3043
               drug_id:childMap[item.id][key].drug_id,
3036
               way:childMap[item.id][key].way,
3044
               way:childMap[item.id][key].way,
3045
+              drug_name_id:childMap[item.id][key].drug_name_id,
3037
               isEdit: 0,
3046
               isEdit: 0,
3038
               index: 0,
3047
               index: 0,
3039
               id: childMap[item.id][key].id,
3048
               id: childMap[item.id][key].id,
3686
             ].frequency_type,
3695
             ].frequency_type,
3687
             drug_id:this.adviceTemplateMaps[mapid].drug_id,
3696
             drug_id:this.adviceTemplateMaps[mapid].drug_id,
3688
             way:this.adviceTemplateMaps[mapid].way,
3697
             way:this.adviceTemplateMaps[mapid].way,
3698
+            drug_name_id:this.adviceTemplateMaps[mapid].way,
3689
             isEdit: 0,
3699
             isEdit: 0,
3690
             id: 0,
3700
             id: 0,
3691
             children: [],
3701
             children: [],
3718
                 execution_frequency: children[key].execution_frequency,
3728
                 execution_frequency: children[key].execution_frequency,
3719
                 drug_id:children[key].drug_id,
3729
                 drug_id:children[key].drug_id,
3720
                 way:children[key].way,
3730
                 way:children[key].way,
3731
+                drug_name_id:children[key].drug_name_id,
3721
                 isEdit: 0,
3732
                 isEdit: 0,
3722
                 id: 0,
3733
                 id: 0,
3723
                 children: [],
3734
                 children: [],
3775
               template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
3786
               template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
3776
               drug_id: adviceTemplate.DoctorAdviceTemplate[index].drug_id,
3787
               drug_id: adviceTemplate.DoctorAdviceTemplate[index].drug_id,
3777
               way:adviceTemplate.DoctorAdviceTemplate[index].way,
3788
               way:adviceTemplate.DoctorAdviceTemplate[index].way,
3789
+              drug_name_id:adviceTemplate.DoctorAdviceTemplate[index].drug_name_id,
3778
               isEdit: 0,
3790
               isEdit: 0,
3779
               id: 0,
3791
               id: 0,
3780
               children: [],
3792
               children: [],
3808
                   execution_frequency: children[key].execution_frequency,
3820
                   execution_frequency: children[key].execution_frequency,
3809
                   drug_id:children[key].drug_id,
3821
                   drug_id:children[key].drug_id,
3810
                   way:children[key].way,
3822
                   way:children[key].way,
3823
+                  drug_name_id:children[key].drug_name_id,
3811
                   isEdit: 0,
3824
                   isEdit: 0,
3812
                   id: 0,
3825
                   id: 0,
3813
                   children: [],
3826
                   children: [],
3865
           week_days: this.allSelectedTemplate[index].week_days,
3878
           week_days: this.allSelectedTemplate[index].week_days,
3866
           drug_id:this.allSelectedTemplate[index].drug_id,
3879
           drug_id:this.allSelectedTemplate[index].drug_id,
3867
           way:this.allSelectedTemplate[index].way,
3880
           way:this.allSelectedTemplate[index].way,
3881
+          drug_name_id:this.allSelectedTemplate[index].drug_name_id,
3868
           isEdit: 0,
3882
           isEdit: 0,
3869
           id: 0,
3883
           id: 0,
3870
           children: [],
3884
           children: [],
3892
                 execution_frequency: children[key].execution_frequency,
3906
                 execution_frequency: children[key].execution_frequency,
3893
                 drug_id:children[key].drug_id,
3907
                 drug_id:children[key].drug_id,
3894
                 way:children[key].way,
3908
                 way:children[key].way,
3909
+                drug_name_id:children[key].way,
3895
                 isEdit: 0,
3910
                 isEdit: 0,
3896
                 id: 0,
3911
                 id: 0,
3897
                 children: [],
3912
                 children: [],
3991
                     execution_frequency: children[key].execution_frequency,
4006
                     execution_frequency: children[key].execution_frequency,
3992
                     drug_id:children[key].drug_id,
4007
                     drug_id:children[key].drug_id,
3993
                     way:children[key].way,
4008
                     way:children[key].way,
4009
+                    drug_name_id:children[key].way,
3994
                     isEdit: 0,
4010
                     isEdit: 0,
3995
                     id: 0,
4011
                     id: 0,
3996
                     children: [],
4012
                     children: [],
4051
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
4067
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
4052
                       _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
4068
                       _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
4053
                       _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
4069
                       _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
4070
+
4054
                       _this.$set(
4071
                       _this.$set(
4055
                         _this.groupForm.adviceNames[index].children,
4072
                         _this.groupForm.adviceNames[index].children,
4056
                         j,
4073
                         j,
4387
         const params = {
4404
         const params = {
4388
           patient_id:id
4405
           patient_id:id
4389
         }
4406
         }
4390
-    
4407
+      console.log("params-----",params)
4391
       getSelfMedicalList(params).then(response=>{
4408
       getSelfMedicalList(params).then(response=>{
4392
          if (response.data.state == 1) {
4409
          if (response.data.state == 1) {
4393
             this.arr_drug = []
4410
             this.arr_drug = []
4470
             }
4487
             }
4471
 
4488
 
4472
             this.private_drug_config = response.data.data.private_drug_config
4489
             this.private_drug_config = response.data.data.private_drug_config
4490
+            console.log("medicals",medicalList)
4473
             this.medicals = medicalList
4491
             this.medicals = medicalList
4474
           
4492
           
4475
       })
4493
       })
4497
             this.src_type = this.drugSpec[i].type
4515
             this.src_type = this.drugSpec[i].type
4498
             this.nameForm.drug_id = this.drugSpec[i].id
4516
             this.nameForm.drug_id = this.drugSpec[i].id
4499
             this.nameForm.way = this.drugSpec[i].type
4517
             this.nameForm.way = this.drugSpec[i].type
4518
+            if(this.drugSpec[i].drug_name_id){
4519
+               this.nameForm.drug_name_id = 0
4520
+            }
4500
           }
4521
           }
4501
         }
4522
         }
4502
     },
4523
     },