See999 il y a 4 ans
Parent
révision
3b16dfd3fe

+ 9 - 8
src/App.vue Voir le fichier

@@ -19,14 +19,15 @@ export default {
19 19
   },
20 20
   
21 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 33
   methods: {

+ 66 - 8
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Voir le fichier

@@ -439,7 +439,7 @@
439 439
           <el-col :span="8">
440 440
             <el-form-item label="医嘱名称:">
441 441
               <!-- <el-input v-model="form.advice_name"></el-input> -->
442
-              <el-select
442
+              <!-- <el-select
443 443
                 v-model="form.advice_name"
444 444
                 filterable
445 445
                 clearable
@@ -454,7 +454,17 @@
454 454
                   :label="item.drug_name"
455 455
                   :value="item.drug_name"
456 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 468
             </el-form-item>
459 469
           </el-col>
460 470
 
@@ -462,7 +472,7 @@
462 472
             <el-form-item label="药品规格:">
463 473
               <!-- <el-input v-model="form.advice_desc" style="width: 40%;"></el-input> -->
464 474
 
465
-               <el-select
475
+               <!-- <el-select
466 476
                   v-model="form.advice_desc"
467 477
                   filterable
468 478
                   clearable
@@ -477,7 +487,17 @@
477 487
                     :label="item.drug_spec"
478 488
                     :value="item.drug_spec"
479 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 501
                 <el-select
482 502
                   v-model="form.drug_spec_unit"
483 503
                   style="width: 56%;"
@@ -1093,9 +1113,10 @@
1093 1113
           this.groupForm.adviceNames[
1094 1114
             this.nameForm.index
1095 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 1120
         } else {
1100 1121
           this.groupForm.adviceNames.push(this.nameForm)
1101 1122
         }
@@ -2397,13 +2418,50 @@
2397 2418
             this.src_type = this.drugSpec[i].type
2398 2419
             this.form.drug_id = this.drugSpec[i].id
2399 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 2431
       rand(min, max) {
2405 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 2466
     created() {
2409 2467
       var date = this.$route.query && this.$route.query.date

+ 72 - 20
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Voir le fichier

@@ -370,7 +370,7 @@
370 370
         <el-row>
371 371
           <el-col :span="24">
372 372
             <el-form-item label="医嘱内容 :" required prop="advice_name">
373
-               <el-select
373
+               <!-- <el-select
374 374
                 v-model="nameForm.advice_name"
375 375
                 filterable
376 376
                 clearable
@@ -386,7 +386,17 @@
386 386
                   :label="item.drug_name"
387 387
                   :value="item.drug_name"
388 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 400
             </el-form-item>
391 401
             <!-- <div style="margin-left:120px;margin-top:-20px;font-size:12px;color:red">
392 402
                库存不足50
@@ -403,7 +413,7 @@
403 413
             <el-form-item label="药品规格 :" prop="advice_desc">
404 414
               <el-col :span="8">
405 415
                 <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
406
-                 <el-select
416
+                 <!-- <el-select
407 417
                   v-model="nameForm.advice_desc"
408 418
                   filterable
409 419
                   clearable
@@ -418,7 +428,18 @@
418 428
                     :label="item.drug_spec"
419 429
                     :value="item.drug_spec"
420 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 444
               </el-col>
424 445
               <el-col class="line" :span="2">&nbsp;</el-col>
@@ -613,9 +634,9 @@ export default {
613 634
         index: 0,
614 635
         id: 0,
615 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 641
       submitGroupForm: {
621 642
         advice_type: "",
@@ -636,7 +657,7 @@ export default {
636 657
         parent_id: 0,
637 658
         drug_id:"",
638 659
         way:"",
639
-        drug_name_id:"",
660
+        drug_name_id:0,
640 661
       },
641 662
       selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
642 663
       selectedTemplate: [],
@@ -894,9 +915,9 @@ export default {
894 915
                       _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way;
895 916
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
896 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 921
                       _this.$set(_this.groupForm.adviceNames[index].children,j,_this.groupForm.adviceNames[index].children[j]
901 922
                      
902 923
                       );
@@ -919,9 +940,9 @@ export default {
919 940
                   _this.groupForm.adviceNames[index].delivery_way =_this.nameForm.delivery_way;
920 941
                   _this.groupForm.adviceNames[index].execution_frequency =_this.nameForm.execution_frequency;
921 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 946
                   _this.$set(
926 947
                     _this.groupForm.adviceNames,
927 948
                     index,
@@ -1063,9 +1084,8 @@ export default {
1063 1084
       this.selectedTemplate = selection;
1064 1085
     },
1065 1086
     selectAdvice(selection, row) {
1066
-      // this.selectedTemplate = [];
1067
-
1068
-      // console.log(selection);
1087
+     
1088
+     console.log("row",row)
1069 1089
 
1070 1090
       var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id]
1071 1091
         .DoctorAdviceTemplate;
@@ -1455,6 +1475,7 @@ export default {
1455 1475
       this.templateFormVisible = true;
1456 1476
     },
1457 1477
     selectGroupAdvice(row) {
1478
+      console.log("row-----",row)
1458 1479
       this.groupSelectRow = row;
1459 1480
     },
1460 1481
     groupClassName({ row, rowIndex }) {
@@ -1487,8 +1508,8 @@ export default {
1487 1508
       this.adminusername = xtuser.user.user_name;
1488 1509
     },
1489 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 1513
       for (let y = 0; y < adviceArray.length; y++) {
1493 1514
         adviceArray[y].selection = false;
1494 1515
       }
@@ -1639,7 +1660,38 @@ export default {
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 1696
   watch: {
1645 1697
     "selectedTemp.list": function() {

+ 56 - 4
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue Voir le fichier

@@ -370,7 +370,7 @@
370 370
           <el-col :span="10">
371 371
             <el-form-item label="医嘱内容 :" required prop="advice_name">
372 372
               <!-- <el-input v-model="nameForm.advice_name"></el-input> -->
373
-               <el-select
373
+               <!-- <el-select
374 374
                 v-model="nameForm.advice_name"
375 375
                 filterable
376 376
                 clearable
@@ -386,8 +386,19 @@
386 386
                   :label="item.drug_name"
387 387
                   :value="item.drug_name"
388 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 400
             </el-form-item>
401
+           
391 402
           </el-col>
392 403
           <el-col :span="14">
393 404
             <!--<el-form-item label="规格 :" prop="advice_desc">-->
@@ -396,7 +407,7 @@
396 407
             <el-form-item label="药品规格 :" prop="advice_desc">
397 408
               <el-col :span="10">
398 409
                 <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
399
-                <el-select
410
+                <!-- <el-select
400 411
                   v-model="nameForm.advice_desc"
401 412
                   filterable
402 413
                   clearable
@@ -412,7 +423,17 @@
412 423
                     :label="item.drug_spec"
413 424
                     :value="item.drug_spec"
414 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 437
               </el-col>
417 438
               <el-col class="line" :span="2">&nbsp;</el-col>
418 439
               <el-col :span="10">
@@ -2271,6 +2292,7 @@ export default {
2271 2292
       }
2272 2293
     },
2273 2294
     SaveEditAdvices() {
2295
+      console.log("aaa")
2274 2296
       const params = {
2275 2297
         start_time: this.groupForm.start_time,
2276 2298
         groupno: this.groupForm.groupno,
@@ -2404,6 +2426,36 @@ export default {
2404 2426
     rand(min, max) {
2405 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 2460
   watch: {
2409 2461
     "selectedTemp.list": function() {

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/advice.vue Voir le fichier

@@ -13,7 +13,7 @@
13 13
                 <el-form-item class="width50" label="开嘱时间 : " prop="name">
14 14
                     张三
15 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 17
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"></el-input>
18 18
                 </el-form-item>
19 19
                 <el-form-item class="width50" label="药品规格 : " prop="name">

+ 14 - 13
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue Voir le fichier

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

+ 5 - 14
src/xt_pages/stock/selfPreparedMedicine/index.vue Voir le fichier

@@ -26,16 +26,6 @@
26 26
                 value-format="yyyy-MM-dd"
27 27
                 @change="changeStartime"
28 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 29
                  <el-autocomplete
40 30
                   style="margin:16px 5px"
41 31
                   popper-class="my-autocomplete"
@@ -146,6 +136,7 @@ import medicineDetail from "./components/medicineDetail"
146 136
 import warehousing from "./components/warehousing"
147 137
 import warehouseOut from "./components/warehouseOut"
148 138
 const moment = require('moment')
139
+import { PostSearch } from '@/api/patient'
149 140
 import { getCurrentPatient,saveRadio,getStockList,DeleteDrugNameById,getDrugSet } from "@/api/drug/drug"
150 141
 export default {
151 142
     components:{
@@ -358,21 +349,21 @@ export default {
358 349
             key = keyword
359 350
           }
360 351
           let searchArray = []
361
-          getCurrentPatient(key).then(response => {
352
+          PostSearch(key).then(response => {
362 353
             if (response.data.state == 1) {
363 354
               searchArray = response.data.data.patient
355
+              console.log("searchArray",searchArray)
356
+           
364 357
               cb(searchArray)
365 358
             }
366 359
           })
367 360
           return searchArray
368 361
         },
369 362
         handleSelect(val){
370
-          console.log("val",val.id)
371
-          console.log("2222",this.tablePatient)
363
+          console.log("val",val)
372 364
           this.search_input = val.name
373 365
           for(let i=0;i<this.tablePatient.length;i++){
374 366
              if(this.tablePatient[i].id == val.id){
375
-               console.log("建立")
376 367
                this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[i])
377 368
              }
378 369
           }

+ 27 - 19
src/xt_pages/stock/selfPreparedMedicine/query.vue Voir le fichier

@@ -83,17 +83,17 @@
83 83
                 <el-table-column align="center" prop="name" label="规格名称">
84 84
                     <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
85 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 87
                     <template slot-scope="scope">{{ scope.row.min_unit }}</template>
88
-                </el-table-column>
88
+                </el-table-column> -->
89 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 91
                 </el-table-column>
92 92
                 <el-table-column align="center" prop="name" label="已使用" width="80">
93 93
                     <template slot-scope="scope">{{ scope.row.Count }}</template>
94 94
                 </el-table-column>
95 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 97
                 </el-table-column>
98 98
             </el-table>
99 99
         </div>
@@ -121,11 +121,11 @@ export default {
121 121
             search_input:"",
122 122
             options:[],
123 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 129
             drug_spec:"",
130 130
             drugName:[],
131 131
             rulleName:[]
@@ -137,8 +137,8 @@ export default {
137 137
         },
138 138
         exportList(){
139 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 142
          for(let i=0;i<this.tableData.length;i++){
143 143
             this.tableData[i].margin = this.tableData[i].Total - this.tableData[i].Count
144 144
          }
@@ -258,16 +258,24 @@ export default {
258 258
               }
259 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 Voir le fichier

@@ -26,7 +26,7 @@
26 26
                                     <td width="80">姓名</td>
27 27
                                     <td>药品名称</td>
28 28
                                     <td>规格名称</td>
29
-                                    <td width="70">单位</td>
29
+                                    <!-- <td width="70">单位</td> -->
30 30
                                     <td width="70">自备量</td>
31 31
                                     <td width="70">已使用</td>
32 32
                                     <td width="70">剩余</td>
@@ -39,10 +39,10 @@
39 39
                                     <td>{{item.name}}</td>
40 40
                                     <td>{{item.drug_name}}</td>
41 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 44
                                     <td>{{item.Count}}</td>
45
-                                    <td>{{item.store_number - item.Count}}</td>
45
+                                    <td>{{item.Total?item.Total:0 - item.Count}}</td>
46 46
                                 </tr>
47 47
                             </tbody>
48 48
                         </table>
@@ -97,6 +97,7 @@ export default {
97 97
             drug_spec:this.drug_spec,
98 98
             search_input:this.keyword
99 99
           }
100
+        console.log("params------",params)
100 101
         getAllPatientStockList(params).then(response=>{
101 102
             if(response.data.state == 1){
102 103
               var stocklist = response.data.data.stocklist
@@ -105,15 +106,23 @@ export default {
105 106
                  stocklist[i].Count = 0
106 107
               }
107 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 Voir le fichier

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

+ 26 - 5
src/xt_pages/user/doctorAdvice.vue Voir le fichier

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