Przeglądaj źródła

Merge branch '20200710_pc_vue_new_branch' into 20200916_pc_vue_new_branch

csx 4 lat temu
rodzic
commit
9cf70afa3f

+ 2 - 0
src/api/advice.js Wyświetl plik

@@ -15,6 +15,7 @@ export function getAllAdviceConfig() {
15 15
 }
16 16
 
17 17
 export function CreateDoctorAdvice(id, advice, mode) {
18
+  
18 19
   return request({
19 20
     url: "/api/patients/advice/create?id=" + id + "&mode=" + mode,
20 21
     method: "post",
@@ -50,6 +51,7 @@ export function ExecDoctorAdvice(patient, id, time, mode) {
50 51
     execution_time: time,
51 52
     mode: mode
52 53
   };
54
+  console.log("paras------",params)
53 55
   return request({
54 56
     url: "/api/patients/advice/exec",
55 57
     method: "Post",

+ 1 - 1
src/lang/zh.js Wyświetl plik

@@ -90,7 +90,7 @@ export default {
90 90
     patient: '患者中心',
91 91
     dialysisSolution: '透析处方',
92 92
     inspection: '检验检查',
93
-    home: '首页',
93
+    home: '透析首页',
94 94
     weight: '干体重',
95 95
     dialysisRecord: '透析记录',
96 96
     scheduling: '排班信息',

+ 32 - 51
src/xt_pages/data/druguseTemplate.vue Wyświetl plik

@@ -300,6 +300,8 @@
300 300
                 <el-button type="primary" @click="submitTableTemplate('form')">保 存</el-button>
301 301
               </div>
302 302
             </el-dialog>
303
+
304
+            <!-- 新增子药 -->
303 305
             <el-dialog :title="dialogTitle" :visible.sync="templateFormVisible" width="854px">
304 306
               <el-form
305 307
                 ref="templateForm"
@@ -514,23 +516,6 @@
514 516
                 <el-row>
515 517
                   <el-col :span="24">
516 518
                     <el-form-item :label="edit_advice_name" required prop="advice_name">
517
-                      <!-- <el-input v-model="templateFormEdit.advice_name"></el-input> -->
518
-                       <!-- <el-select
519
-                            v-model="templateFormEdit.advice_name"
520
-                            filterable
521
-                            clearable
522
-                            allow-create
523
-                            placeholder="请选择(输入可搜索)"
524
-                            style="width:200px"
525
-                            @change="changeDrugNameTwo"
526
-                          >
527
-                            <el-option
528
-                              v-for="(item,index) in all_drug"
529
-                              :key="index"
530
-                              :label="item.drug_name"
531
-                              :value="item.drug_name"
532
-                            ></el-option>
533
-                          </el-select> -->
534 519
                         <el-autocomplete
535 520
                           style="width:100%;"
536 521
                           class="inline-input"
@@ -545,34 +530,16 @@
545 530
                   <el-col :span="15">
546 531
 
547 532
                     <el-form-item label="药品规格 :" prop="advice_desc">
548
-                      <el-col :span="8">
549
-                        <!-- <el-input v-model="templateFormEdit.advice_desc"></el-input> -->
550
-                           <!-- <el-select
551
-                              v-model="templateFormEdit.advice_desc"
552
-                              filterable
553
-                              clearable
554
-                              allow-create
555
-                              placeholder="请选择(输入可搜索)"
556
-                              style="width:150px"
557
-                              @change="changeDrugDescTwo"
558
-                            >
559
-                              <el-option
560
-                                v-for="item in drugSpec"
561
-                                :key="item.id"
562
-                                :label="item.drug_spec"
563
-                                :value="item.drug_spec"
564
-                              ></el-option>
565
-                           </el-select> -->
566
-
567
-                             <el-autocomplete
568
-                              style="width:100px;"
569
-                              class="inline-input"
570
-                              v-model="templateFormEdit.advice_desc"
571
-                              :fetch-suggestions="querySearch1"
572
-                              placeholder="请输入内容"
573
-                              @select="handleSelect1"
574
-                              @input="changeDrugDescTwo"
575
-                            ></el-autocomplete>
533
+                      <el-col :span="8">                     
534
+                         <el-autocomplete
535
+                         style="width:100px;"
536
+                         class="inline-input"
537
+                         v-model="templateFormEdit.advice_desc"
538
+                         :fetch-suggestions="querySearch1"
539
+                         placeholder="请输入内容"
540
+                         @select="handleSelect1"
541
+                         @input="changeDrugDescTwo"
542
+                       ></el-autocomplete>
576 543
                       </el-col>
577 544
                       <el-col class="line" :span="1">&nbsp;</el-col>
578 545
                       <el-col :span="14">
@@ -1817,9 +1784,14 @@
1817 1784
           }
1818 1785
         })
1819 1786
       },
1820
-      submitTemplate(formName) {
1787
+      handleSelect1(){
1821 1788
 
1822
-        
1789
+      },
1790
+      handleSelect(){
1791
+
1792
+      },
1793
+      submitTemplate(formName) {
1794
+ 
1823 1795
         if(this.src_type == ""){
1824 1796
             this.templateForm.way = 0
1825 1797
             this.templateForm.drug_id = 0
@@ -1829,7 +1801,8 @@
1829 1801
             var arr = this.templateForm.advice_name.split("(自备药)")
1830 1802
             this.templateForm.advice_name = arr[0]
1831 1803
         }
1832
-        
1804
+        console.log("2222",this.templateForm)
1805
+       
1833 1806
         this.$refs[formName].validate(valid => {
1834 1807
           this.templateForm.single_dose = parseFloat(this.templateForm.single_dose)
1835 1808
           this.templateForm.prescribing_number = parseFloat(this.templateForm.prescribing_number)
@@ -1840,7 +1813,7 @@
1840 1813
           if (isNaN(this.templateForm.prescribing_number)) {
1841 1814
             this.templateForm.prescribing_number = 0
1842 1815
           }
1843
-
1816
+          
1844 1817
           if (valid) {
1845 1818
             const templateFormTwo = {}
1846 1819
             templateFormTwo.template_id = this.current_template_id
@@ -2201,7 +2174,8 @@
2201 2174
          } 
2202 2175
         this.templateFormEdit.drug_id = drug_id
2203 2176
        
2204
-        console.log("2222",this.templateFormEdit)
2177
+        console.log("编辑子药",this.templateFormEdit)
2178
+       
2205 2179
         this.$refs[formName].validate(valid => {
2206 2180
 
2207 2181
           this.templateFormEdit.single_dose = parseFloat(this.templateFormEdit.single_dose)
@@ -2263,7 +2237,8 @@
2263 2237
             )
2264 2238
           }
2265 2239
         })
2266
-      }, drugDesc(row) {
2240
+      }, 
2241
+      drugDesc(row) {
2267 2242
         if (row.isNoSub == 2) {
2268 2243
           if (row.drug_spec.length <= 0) {
2269 2244
             return ''
@@ -2859,6 +2834,9 @@
2859 2834
             this.drug_id = this.drugSpec[i].id
2860 2835
             this.src_type = this.drugSpec[i].type
2861 2836
             this.templateForm.drug_id = this.drugSpec[i].id
2837
+            this.templateForm.single_dose_unit = this.drugSpec[i].min_unit
2838
+            this.templateForm.prescribing_number_unit = this.drugSpec[i].min_unit
2839
+            this.templateForm.drug_spec_unit = this.drugSpec[i].min_unit
2862 2840
             this.templateForm.way = this.drugSpec[i].type
2863 2841
           }
2864 2842
         }
@@ -2884,6 +2862,9 @@
2884 2862
             this.templateFormEdit.single_dose = this.drugSpec[i].single_dose.toString()
2885 2863
             this.templateFormEdit.delivery_way = this.drugSpec[i].delivery_way.toString()
2886 2864
             this.templateFormEdit.execution_frequency = this.drugSpec[i].execution_frequency.toString()
2865
+            this.templateFormEdit.single_dose_unit = this.drugSpec[i].min_unit
2866
+            this.templateFormEdit.drug_spec_unit = this.drugSpec[i].drug_spec_unit
2867
+            this.templateFormEdit.prescribing_number_unit = this.drugSpec[i].prescribing_number_unit
2887 2868
           }
2888 2869
         }
2889 2870
       },

+ 5 - 0
src/xt_pages/dialysis/details/assessmentBefore.vue Wyświetl plik

@@ -303,6 +303,11 @@
303 303
           <span class="unit"></span>
304 304
         </li>
305 305
 
306
+         <li v-if="isShow('特殊处理情况')">
307
+          <label>特殊处理情况: </label>
308
+          <span class="content">{{ this.record.special_treatment}}</span>
309
+          <span class="unit"></span>
310
+        </li>
306 311
       </ul>
307 312
     </div>
308 313
     <div class="note">

+ 61 - 87
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Wyświetl plik

@@ -239,7 +239,6 @@
239 239
         :cell-class-name="adviceNameShow"
240 240
         :modal-append-to-body="false"
241 241
         highlight-current-row
242
-        @current-change="handleCurrentChange"
243 242
       >
244 243
         <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
245 244
           <template slot-scope="scope">
@@ -249,9 +248,7 @@
249 248
         <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
250 249
           <template slot-scope="scope">
251 250
             <span>
252
-              {{
253
-              scope.row.start_time | parseTime('{y}-{m}-{d} {h}:{i}')
254
-              }}
251
+              {{scope.row.start_time | parseTime('{y}-{m}-{d} {h}:{i}')}}
255 252
             </span>
256 253
           </template>
257 254
         </el-table-column>
@@ -259,8 +256,7 @@
259 256
           <template slot-scope="scope">
260 257
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
261 258
               <span class="el-dropdown-link">
262
-                {{ getAdviceContent(scope.row, 1)
263
-                }}
259
+                {{ getAdviceContent(scope.row, 1)}}
264 260
                 <i class="el-icon-arrow-down el-icon--right"></i>
265 261
               </span>
266 262
               <el-dropdown-menu slot="dropdown">
@@ -272,8 +268,7 @@
272 268
 
273 269
             <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
274 270
               <span class="el-dropdown-link">
275
-                &emsp;{{ getAdviceContent(scope.row, 2)
276
-                }}
271
+                &emsp;{{ getAdviceContent(scope.row, 2)}}
277 272
                 <i class="el-icon-arrow-down el-icon--right"></i>
278 273
               </span>
279 274
               <el-dropdown-menu slot="dropdown">
@@ -293,9 +288,7 @@
293 288
         >
294 289
           <template slot-scope="scope">
295 290
             <span v-if="scope.row.execution_time != 0">
296
-              {{
297
-              scope.row.start_time | parseTime('{m}-{d} {h}:{i}')
298
-              }}
291
+              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
299 292
             </span>
300 293
             <span v-else></span>
301 294
           </template>
@@ -303,9 +296,7 @@
303 296
         <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
304 297
           <template slot-scope="scope">
305 298
             <span v-if="scope.row.parent_id == 0">
306
-              {{
307
-              getXuserName(scope.row.execution_staff)
308
-              }}
299
+              {{getXuserName(scope.row.execution_staff)}}
309 300
             </span>
310 301
             <span v-else></span>
311 302
           </template>
@@ -319,9 +310,7 @@
319 310
         >
320 311
           <template slot-scope="scope">
321 312
             <span v-if="scope.row.parent_id == 0">
322
-              {{
323
-              getXuserName(scope.row.checker)
324
-              }}
313
+              {{getXuserName(scope.row.checker)}}
325 314
             </span>
326 315
             <span v-else></span>
327 316
           </template>
@@ -408,20 +397,11 @@
408 397
       </div>-->
409 398
       <!-- 新医嘱列表 -->
410 399
 
400
+
401
+      <!-- 新增医嘱(子药)表单 -->
411 402
       <!-- 医嘱表单 -->
412 403
       <el-form ref="form" :model="form" label-width="100px" v-show="showAdviceForm">
413 404
         <el-row :gutter="20">
414
-          <!--<el-col :span="8">-->
415
-          <!--<el-form-item label="医嘱类型:">-->
416
-          <!--<el-input value="临时" disabled></el-input>-->
417
-          <!--</el-form-item>-->
418
-          <!--</el-col>-->
419
-          <!--<el-col :span="8">-->
420
-          <!--<el-form-item label="医嘱时间:">-->
421
-          <!--<el-input v-model="form.advice_date" readonly></el-input>-->
422
-          <!--&lt;!&ndash; <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker> &ndash;&gt;-->
423
-          <!--</el-form-item>-->
424
-          <!--</el-col>-->
425 405
           <el-col :span="8">
426 406
             <el-form-item label="开始时间:">
427 407
               <el-date-picker
@@ -438,23 +418,6 @@
438 418
 
439 419
           <el-col :span="8">
440 420
             <el-form-item label="医嘱名称:">
441
-              <!-- <el-input v-model="form.advice_name"></el-input> -->
442
-              <!-- <el-select
443
-                v-model="form.advice_name"
444
-                filterable
445
-                clearable
446
-                allow-create
447
-                placeholder="请选择(输入可搜索)"
448
-                style="width:200px"
449
-                @change="changeDrugName"
450
-              >
451
-                <el-option
452
-                  v-for="(item,index) in all_drug"
453
-                  :key="index"
454
-                  :label="item.drug_name"
455
-                  :value="item.drug_name"
456
-                ></el-option>
457
-              </el-select> -->
458 421
 
459 422
               <el-autocomplete
460 423
                 style="width:100%;"
@@ -469,38 +432,19 @@
469 432
           </el-col>
470 433
 
471 434
           <el-col :span="8">
472
-            <el-form-item label="药品规格:">
473
-              <!-- <el-input v-model="form.advice_desc" style="width: 40%;"></el-input> -->
474
-
475
-               <!-- <el-select
476
-                  v-model="form.advice_desc"
477
-                  filterable
478
-                  clearable
479
-                  allow-create
480
-                  placeholder="请选择(输入可搜索)"
481
-                  style="width:150px"
482
-                  @change="changeDrugDesc"
483
-                >
484
-                  <el-option
485
-                    v-for="item in drugSpec"
486
-                    :key="item.id"
487
-                    :label="item.drug_spec"
488
-                    :value="item.drug_spec"
489
-                  ></el-option>
490
-                 </el-select> -->
435
+            <el-form-item label="药品规格:">        
491 436
                 <el-autocomplete
492 437
                   style="width:100px;"
493 438
                   class="inline-input"
494 439
                   v-model="form.advice_desc"
495 440
                   :fetch-suggestions="querySearch1"
496 441
                   placeholder="请输入内容"
497
-                  @select="handleSelect1"
498 442
                   @input="changeDrugDesc"
499 443
                 ></el-autocomplete>
500 444
                  
501 445
                 <el-select
502 446
                   v-model="form.drug_spec_unit"
503
-                  style="width: 56%;"
447
+                  style="width: 100px;"
504 448
                   filterable
505 449
                   placeholder="选择"
506 450
                 >
@@ -532,7 +476,6 @@
532 476
                   :value="item.name"
533 477
                 ></el-option>
534 478
               </el-select>
535
-              <!-- <el-input v-model="form.prescribing_number_unit" style="width: 40%;"></el-input> -->
536 479
             </el-form-item>
537 480
           </el-col>
538 481
 
@@ -552,8 +495,6 @@
552 495
                   :value="item.name"
553 496
                 ></el-option>
554 497
               </el-select>
555
-
556
-              <!-- <el-input v-model="form.single_dose_unit" style="width: 40%;"></el-input> -->
557 498
             </el-form-item>
558 499
           </el-col>
559 500
 
@@ -776,7 +717,9 @@
776 717
           advice_doctor: '',
777 718
           remark: '',
778 719
           parent_id: 0,
779
-          drug_name_id:"",
720
+          drug_id:0,
721
+          drug_name_id:0,
722
+          way:0,
780 723
         },
781 724
         nameForm: {
782 725
           advice_name: '',
@@ -942,7 +885,6 @@
942 885
         }
943 886
       },
944 887
       submitEditAdvice() {
945
-        console.log("this.form",this.form)
946 888
         if (this.form.advice_name.length == 0) {
947 889
           this.$message.error('请填写医嘱名称')
948 890
           return
@@ -1231,6 +1173,7 @@
1231 1173
       }
1232 1174
       ,
1233 1175
       submitExce() {
1176
+        
1234 1177
         if (this.currentRow == null) {
1235 1178
           this.$message.error('请先选择要执行的医嘱!')
1236 1179
           return false
@@ -1247,6 +1190,9 @@
1247 1190
         }
1248 1191
         this.exceLoading = true
1249 1192
         let mode = '6'
1193
+        
1194
+         console.log("222222",this.currentRow.id)
1195
+        
1250 1196
         ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode).then(response => {
1251 1197
             if (response.data.state == 0) {
1252 1198
               this.$message.error(response.data.msg)
@@ -1311,6 +1257,19 @@
1311 1257
           return false
1312 1258
         }
1313 1259
         let mode = '1'
1260
+        
1261
+       if(this.src_type == ""){
1262
+          this.form.way = 0
1263
+          this.form.drug_id = 0
1264
+          this.form.drug_name_id = 0
1265
+       }
1266
+
1267
+       if(this.src_type == 2){ //自备药
1268
+          var arr = this.form.advice_name.split("(自备药)")
1269
+          this.form.advice_name = arr[0]
1270
+       }
1271
+
1272
+        console.log("新增医嘱子药",this.form)
1314 1273
        
1315 1274
         CreateDoctorAdvice(this.patient.id, this.form, mode)
1316 1275
           .then(response => {
@@ -1407,7 +1366,10 @@
1407 1366
           execution_frequency: this.currentRow.execution_frequency,
1408 1367
           advice_doctor: '',
1409 1368
           remark: '',
1410
-          parent_id: this.currentRow.id
1369
+          parent_id: this.currentRow.id,
1370
+          drug_id:0,
1371
+          drug_name_id:0,
1372
+          way:0,
1411 1373
         }
1412 1374
       }
1413 1375
       ,
@@ -1483,9 +1445,9 @@
1483 1445
           advice_doctor: row.advice_doctor,
1484 1446
           remark: row.remark,
1485 1447
           parent_id: row.parent_id,
1486
-          drug_id:"",
1487
-          way:"",
1488
-          drug_name_id:"",
1448
+          drug_id:0,
1449
+          way:0,
1450
+          drug_name_id:0,
1489 1451
         }
1490 1452
       }
1491 1453
       ,
@@ -1616,6 +1578,7 @@
1616 1578
       }
1617 1579
       ,
1618 1580
       execAdvice() {
1581
+        
1619 1582
         if (this.is_has_exce == false) {
1620 1583
           this.$message.error('你没有执行医嘱的权限')
1621 1584
           return false
@@ -2071,13 +2034,14 @@
2071 2034
       }
2072 2035
       ,
2073 2036
       cellMouseEnter: function(row, column, event) {
2037
+        console.log("数据是",row)
2074 2038
         this.currentRow = row
2075
-        this.groupSelectRow = row
2076
-        this.sameRowArr.forEach((arr, i) => {
2077
-          if (arr.indexOf(row.index) != -1) {
2078
-            this.hoverOrderArr = arr
2079
-          }
2080
-        })
2039
+        // this.groupSelectRow = row
2040
+        // this.sameRowArr.forEach((arr, i) => {
2041
+        //   if (arr.indexOf(row.index) != -1) {
2042
+        //     this.hoverOrderArr = arr
2043
+        //   }
2044
+        // })
2081 2045
       }
2082 2046
       ,
2083 2047
       cellMouseLeave: function(row, column, cell, event) {
@@ -2196,17 +2160,17 @@
2196 2160
       }
2197 2161
       ,
2198 2162
       handleCurrentChange(row) {
2199
-        // this.currentRow = row;
2163
+
2164
+        this.currentRow = row;
2200 2165
         // this.groupSelectRow = row;
2201 2166
         // this.sameRowArr.forEach((arr, i) => {
2202 2167
         //   if (arr.indexOf(row.index) != -1) {
2203 2168
         //     this.hoverOrderArr = arr;
2204 2169
         //   }
2205 2170
         // });
2206
-      }
2207
-      ,
2171
+      },
2208 2172
       objectSpanMethod({ row, column, rowIndex, columnIndex }) {
2209
-        // console.log('columnIndex', columnIndex)
2173
+     
2210 2174
         if (columnIndex === 0) {
2211 2175
           if (rowIndex % 2 === 0) {
2212 2176
             return {
@@ -2355,6 +2319,7 @@
2355 2319
                 obj.type = 2
2356 2320
                 obj.custom_id = this.rand(10000000, 99999999)
2357 2321
                 obj.drug_specs = medicalList[i].drug_specs
2322
+                console.log("222",this.all_drug)
2358 2323
                 this.all_drug.push(obj)
2359 2324
               }
2360 2325
             }
@@ -2391,13 +2356,15 @@
2391 2356
                 obj.custom_id = this.rand(10000000, 99999999)
2392 2357
                 obj.drug_specs = base_drug_list[i].drug_specs
2393 2358
                 this.all_drug.push(obj)
2359
+                console.log("2222",this.all_drug)
2394 2360
               }
2395 2361
             }
2396 2362
         })
2397 2363
      },
2398 2364
     changeDrugName(name){
2399 2365
       this.current_drug_name = name
2400
-      this.form.advice_desc = ''
2366
+      this.form.advice_desc = ""
2367
+      this.$forceUpdate()
2401 2368
       this.drugSpec = []
2402 2369
       for (let i = 0; i < this.all_drug.length; i++) {
2403 2370
         if (this.all_drug[i].drug_name == name) {
@@ -2406,6 +2373,7 @@
2406 2373
        }
2407 2374
     },
2408 2375
     changeDrugDesc(name) {
2376
+      this.$forceUpdate()
2409 2377
         this.current_drug_spec = name
2410 2378
         for (let i = 0; i < this.drugSpec.length; i++) {
2411 2379
           if (this.drugSpec[i].drug_spec == name) {
@@ -2418,8 +2386,11 @@
2418 2386
             this.src_type = this.drugSpec[i].type
2419 2387
             this.form.drug_id = this.drugSpec[i].id
2420 2388
             this.form.way = this.drugSpec[i].type
2389
+
2390
+            this.form.drug_spec_unit = this.drugSpec[i].min_unit
2391
+            this.form.prescribing_number_unit = this.drugSpec[i].min_unit
2392
+            this.form.single_dose_unit = this.drugSpec[i].min_unit
2421 2393
             if(this.drugSpec[i].drug_name_id){
2422
-              console.log("22222",this.drugSpec[i].drug_name_id)
2423 2394
                this.form.drug_name_id = this.drugSpec[i].drug_name_id
2424 2395
             }else{
2425 2396
               this.form.drug_name_id = 0
@@ -2462,6 +2433,9 @@
2462 2433
         console.log('results',results)
2463 2434
         cb(results);
2464 2435
       },
2436
+     handleSelect(){
2437
+
2438
+     }
2465 2439
     },
2466 2440
     created() {
2467 2441
       var date = this.$route.query && this.$route.query.date

+ 32 - 54
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Wyświetl plik

@@ -370,24 +370,6 @@
370 370
         <el-row>
371 371
           <el-col :span="24">
372 372
             <el-form-item label="医嘱内容 :" required prop="advice_name">
373
-               <!-- <el-select
374
-                v-model="nameForm.advice_name"
375
-                filterable
376
-                clearable
377
-                allow-create
378
-                :disabled="isChild"
379
-                placeholder="请选择(输入可搜索)"
380
-                style="width:100%"
381
-                @change="changeDrugName"
382
-              >
383
-                <el-option
384
-                  v-for="(item,index) in all_drug"
385
-                  :key="index"
386
-                  :label="item.drug_name"
387
-                  :value="item.drug_name"
388
-                ></el-option>
389
-              </el-select> -->
390
-
391 373
              <el-autocomplete
392 374
                 style="width:100%;"
393 375
                 class="inline-input"
@@ -407,30 +389,10 @@
407 389
         </el-row>
408 390
         <el-row>
409 391
           <el-col :span="12">
410
-            <!--<el-form-item label="规格 :" prop="advice_desc">-->
411
-            <!--<el-input v-model="nameForm.advice_desc"></el-input>-->
412
-            <!--</el-form-item>-->
392
+       
413 393
             <el-form-item label="药品规格 :" prop="advice_desc">
414 394
               <el-col :span="8">
415
-                <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
416
-                 <!-- <el-select
417
-                  v-model="nameForm.advice_desc"
418
-                  filterable
419
-                  clearable
420
-                  allow-create
421
-                  :disabled="isChild"
422
-                  placeholder="请选择(输入可搜索)"
423
-                  @change="changeDrugDesc"
424
-                >
425
-                  <el-option
426
-                    v-for="item in drugSpec"
427
-                    :key="item.id"
428
-                    :label="item.drug_spec"
429
-                    :value="item.drug_spec"
430
-                  ></el-option>
431
-                 </el-select> -->
432
-
433
-
395
+               
434 396
                 <el-autocomplete
435 397
                   style="width:100px;"
436 398
                   class="inline-input"
@@ -743,11 +705,18 @@ export default {
743 705
           
744 706
           console.log("88888888",submitForm)
745 707
           console.log("99999",this.medicals)
746
-          
747
-          if(this.private_drug_config.drug_start == 1){
748
-           
708
+          if(this.private_drug_config != null&& this.private_drug_config.drug_start == 1){
709
+               
749 710
              for(let index=0;index<submitForm.adviceNames.length;index++){
750 711
                 for(let i=0;i<this.medicals.length;i++){
712
+                   if(submitForm.adviceNames[index].children.length >0){
713
+                      for(let y=0;y<submitForm.adviceNames[index].children.length;y++){
714
+                          if(submitForm.adviceNames[index].children[y].drug_id == this.medicals[i].drug_name_id){
715
+                             submitForm.adviceNames[index].children[y].drug_name_id = this.medicals[i].drug_name_id
716
+                             submitForm.adviceNames[index].children[y].way = 2  
717
+                          }
718
+                      }
719
+                   }
751 720
                    if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
752 721
                       submitForm.adviceNames[index].way = 2
753 722
                       submitForm.adviceNames[index].drug_name_id = this.medicals[i].drug_name_id
@@ -756,7 +725,7 @@ export default {
756 725
              }
757 726
           }
758 727
           console.log("2222",submitForm)
759
-         
728
+        
760 729
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
761 730
             response => {
762 731
               if (response.data.state == 0) {
@@ -1312,7 +1281,7 @@ export default {
1312 1281
                   parent_row: parentRow,
1313 1282
                   row_key: thisRowKey
1314 1283
                 };
1315
-                conosle.log("item======",child)
1284
+                
1316 1285
                 item.children.push(child);
1317 1286
                 this.allSelectedTemplate.unshift(child);
1318 1287
               }
@@ -1475,7 +1444,6 @@ export default {
1475 1444
       this.templateFormVisible = true;
1476 1445
     },
1477 1446
     selectGroupAdvice(row) {
1478
-      console.log("row-----",row)
1479 1447
       this.groupSelectRow = row;
1480 1448
     },
1481 1449
     groupClassName({ row, rowIndex }) {
@@ -1620,16 +1588,17 @@ export default {
1620 1588
                 this.all_drug.push(obj)
1621 1589
 
1622 1590
               }
1591
+
1623 1592
               this.private_drug_config = response.data.data.private_drug_config
1624 1593
               this.medicals = medicalList
1625 1594
             }   
1626
-            console.log("-======",this.all_drug)
1595
+           
1627 1596
         })
1628 1597
        
1629 1598
     },
1630 1599
     changeDrugName(name){
1631
-       this.current_drug_name = name
1632
-       this.nameForm.advice_desc = ''
1600
+      this.current_drug_name = name
1601
+      this.nameForm.advice_desc = ''
1633 1602
       this.drugSpec = []
1634 1603
       for (let i = 0; i < this.all_drug.length; i++) {
1635 1604
         if (this.all_drug[i].drug_name == name) {
@@ -1638,20 +1607,22 @@ export default {
1638 1607
        }
1639 1608
     },
1640 1609
     changeDrugDesc(name) {
1641
-      console.log("-----",this.drugSpec)
1642 1610
         this.current_drug_spec = name
1643 1611
         for (let i = 0; i < this.drugSpec.length; i++) {
1644 1612
           if (this.drugSpec[i].drug_spec == name) {
1645 1613
             this.nameForm.advice_desc = this.drugSpec[i].drug_spec
1646 1614
             this.nameForm.prescribing_number = this.drugSpec[i].prescribing_number.toString()
1647 1615
             this.nameForm.single_dose = this.drugSpec[i].single_dose.toString()
1616
+
1648 1617
             this.nameForm.delivery_way = this.drugSpec[i].delivery_way.toString()
1649 1618
             this.nameForm.execution_frequency = this.drugSpec[i].execution_frequency.toString()
1650 1619
             this.drug_id = this.drugSpec[i].id
1651 1620
             this.src_type = this.drugSpec[i].type
1652 1621
             this.nameForm.drug_id = this.drugSpec[i].id
1653 1622
             this.nameForm.way = this.drugSpec[i].type
1654
-            this.drug_name_id = this.drugSpec[i].drug_name_id
1623
+            this.nameForm.single_dose_unit = this.drugSpec[i].min_unit
1624
+            this.nameForm.drug_spec_unit = this.drugSpec[i].min_unit
1625
+            this.nameForm.prescribing_number_unit = this.drugSpec[i].min_unit
1655 1626
             if(this.drugSpec[i].drug_name_id){
1656 1627
                this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
1657 1628
             }else{
@@ -1670,7 +1641,7 @@ export default {
1670 1641
         })
1671 1642
         var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
1672 1643
         // 调用 callback 返回建议列表的数据
1673
-        console.log('results',results)
1644
+       
1674 1645
         cb(results);
1675 1646
      },
1676 1647
 
@@ -1681,7 +1652,7 @@ export default {
1681 1652
      },
1682 1653
 
1683 1654
      querySearch1(queryString, cb) {
1684
-        console.log('queryString',queryString)
1655
+      
1685 1656
         var restaurants = this.drugSpec;
1686 1657
          console.log(restaurants)
1687 1658
         restaurants.map(item => {
@@ -1689,9 +1660,16 @@ export default {
1689 1660
         })
1690 1661
         var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
1691 1662
         // 调用 callback 返回建议列表的数据
1692
-        console.log('results',results)
1663
+       
1693 1664
         cb(results);
1694 1665
       },
1666
+
1667
+      handleSelect(){
1668
+
1669
+      },
1670
+      handleSelect1(){
1671
+
1672
+      }
1695 1673
   },
1696 1674
   watch: {
1697 1675
     "selectedTemp.list": function() {

+ 8 - 1
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue Wyświetl plik

@@ -358,6 +358,13 @@
358 358
               <el-input v-model="assessmentBeforeDislysis.emergency_treatment_other"></el-input>
359 359
             </el-form-item>
360 360
           </el-col>
361
+            
362
+          <el-col :span="8" v-if="isShow('特殊处理情况')">
363
+            <el-form-item label="特殊处理情况:">
364
+              <el-input v-model="assessmentBeforeDislysis.special_treatment"></el-input>
365
+            </el-form-item>
366
+          </el-col>
367
+          
361 368
 
362 369
           <el-col :span="24">
363 370
             <el-form-item label="备注: ">
@@ -689,7 +696,7 @@
689 696
           catheter_suture_other:'',
690 697
           urine_volume:'',
691 698
           edema:'',
692
-
699
+          special_treatment:'',
693 700
         },
694 701
 
695 702
         InnerDialogProps: {

+ 2 - 4
src/xt_pages/stock/drugs/drugsStockDialog/index.vue Wyświetl plik

@@ -210,7 +210,8 @@
210 210
         }
211 211
       }, changeGoodInfoTableData: function(val) {
212 212
         console.log(val)
213
-      }, changeAllGoodInfoTableData: function(selection) {
213
+      },
214
+       changeAllGoodInfoTableData: function(selection) {
214 215
         var goodInfos = this.propForm.goods[this.table_current_index].drug_specs
215 216
         if (selection.length > 0) {
216 217
           for (let y = 0; y < goodInfos.length; y++) {
@@ -245,9 +246,6 @@
245 246
             }
246 247
           }
247 248
         }
248
-
249
-
250
-
251 249
       }
252 250
     }
253 251
 

+ 94 - 27
src/xt_pages/stock/selfPreparedMedicine/components/addMedicine.vue Wyświetl plik

@@ -9,7 +9,7 @@
9 9
             <div style="width:200px;">
10 10
               <el-table :data="tableData" border style="width: 100%;" height="300" :row-style="{ color: '#303133' }" 
11 11
                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row
12
-                 ref="monthlyPlanTable" @current-change="handleCurrentChange" >
12
+                 ref="monthlyPlanTable" @current-change="handleCurrentChange">
13 13
                     <el-table-column align="center" prop="name" label="药品名称">
14 14
                         <template slot-scope="scope">
15 15
                            {{scope.row.drug_name}}
@@ -17,11 +17,18 @@
17 17
                     </el-table-column>
18 18
                 </el-table>
19 19
             </div>
20
+
21
+
20 22
             <div style="flex:1;padding-left:10px;">
21
-                <el-table :data="tableDatatwo" border style="width: 100%;" height="300" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
22
-                 highlight-current-row  @selection-change="handleSelectionChange">
23
-                    <el-table-column type="selection" align="center" width="55"></el-table-column>
24
-                    <el-table-column align="center" prop="name" label="规格名称">
23
+                <el-table :data="tableDatatwo" border style="width: 100%;" height="300"
24
+                 ref="multipleTable"
25
+                 :row-style="{ color: '#303133' }"
26
+                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" 
27
+                  highlight-current-row
28
+                  @select="selectGoodInfo"
29
+                  @select-all="changeAllGoodInfoTableData">
30
+                 <el-table-column type="selection" align="center" width="55"></el-table-column>
31
+                 <el-table-column align="center" prop="name" label="规格名称">
25 32
                         <template slot-scope="scope">{{scope.row.drug_spec}}</template>
26 33
                     </el-table-column>
27 34
                 </el-table>
@@ -47,7 +54,9 @@ export default {
47 54
             currentRow:"",
48 55
             tableDatatwo:[],
49 56
             patient_id:0,
50
-            medicineData:[]
57
+            medicineData:[],
58
+            standList:[],
59
+            table_current_index:-1,
51 60
         }
52 61
     },
53 62
     methods:{
@@ -79,40 +88,98 @@ export default {
79 88
              if(response.data.state == 1){
80 89
                var rullername =  response.data.data.rullerName
81 90
                console.log("rullerName",rullername)
82
-               this.tableData = rullername
91
+               var list =   response.data.data.list
92
+               console.log("list999999",list)
93
+               this.standList = list
94
+               this.tableData = list
83 95
              }
84 96
            }) 
85 97
         },
86 98
         handleCurrentChange(val){
87
-           this.currentRow = val
88
-           this.getRullListByDrugName(val.id)
89
-        },
90
-        getRullListByDrugName(id){
91
-            const params = {
92
-              id:id,
99
+          for(let i=0;i<this.tableData.length;i++){
100
+             if(val.id == this.tableData[i].id){
101
+                this.tableDatatwo = this.tableData[i].XtStandName
102
+             }
103
+          }
104
+
105
+         for (let i = 0; i < this.tableDatatwo.length; i++) {
106
+             console.log("222",this.tableDatatwo[i].isSelected)
107
+            if (this.tableDatatwo[i].isSelected) {
108
+                this.$nextTick(function() {
109
+                this.$refs.multipleTable.toggleRowSelection(this.tableDatatwo[i])
110
+                })
93 111
             }
94
-           getRullListByDrugName(params).then(response=>{
95
-              if(response.data.state ==  1){
96
-                var drugName =  response.data.data.drugName
97
-                this.tableDatatwo = drugName
112
+         }
113
+        //  this.currentRow = val
114
+           
115
+        //    this.getRullListByDrugName(val.id)
116
+        },
117
+        // getRullListByDrugName(id){
118
+        //     const params = {
119
+        //       id:id,
120
+        //     }
121
+        //    getRullListByDrugName(params).then(response=>{
122
+        //       if(response.data.state ==  1){
123
+        //         var drugName =  response.data.data.drugName
124
+        //         this.tableDatatwo = drugName
125
+        //       }
126
+        //    })
127
+        // },
128
+        // handleSelectionChange(val){
129
+        //    console.log("val22222",val)
130
+        //    this.medicineData = val
131
+        // },
132
+        changeAllGoodInfoTableData(selection){  
133
+        let selected = selection.length && selection.indexOf(selection) !== -1
134
+
135
+        if (selection.length > 0) {
136
+          for (let y = 0; y < this.tableDatatwo.length; y++) {
137
+                for (let i = 0; i < selection.length; i++) {
138
+                if (this.tableDatatwo[y].id == selection[i].id) {
139
+                    this.tableDatatwo[y].isSelected = true
140
+                }
141
+               }
142
+             }
143
+           }else{
144
+             for (let y = 0; y < this.tableDatatwo.length; y++) {
145
+                    this.tableDatatwo[y].isSelected = false 
98 146
               }
99
-           })
147
+           }
100 148
         },
101
-        handleSelectionChange(val){
102
-           this.medicineData = val
149
+        selectGoodInfo(rows, row){
150
+          let selected = rows.length && rows.indexOf(row) !== -1
151
+           if(selected == true){
152
+            for (let y = 0; y < this.tableDatatwo.length; y++) {
153
+                for (let i = 0; i < rows.length; i++) {
154
+                if (this.tableDatatwo[y].id == rows[i].id) {
155
+                    this.tableDatatwo[y].isSelected = true
156
+                 }
157
+                }
158
+            }
159
+           }
160
+           if(selected == 0){
161
+            for (let y = 0; y < this.tableDatatwo.length; y++) {
162
+                this.tableDatatwo[y].isSelected = false 
163
+            }
164
+           }
103 165
         },
104
-
105
-        SaveSelfMedicines(){
106
-          if(this.medicineData.length == 0){
166
+      SaveSelfMedicines(){
167
+        this.multipleSelection = []
168
+          for (let i = 0; i < this.tableData.length; i++) {
169
+            for (let a = 0; a < this.tableData[i].XtStandName.length; a++) {
170
+                if (this.tableData[i].XtStandName[a].isSelected) {
171
+                    this.multipleSelection.push(this.tableData[i].XtStandName[a])
172
+                }
173
+            }
174
+         }
175
+          if(this.multipleSelection.length == 0){
107 176
              this.$message.error("请添加药品规格")
108 177
              return
109 178
           }
110 179
           const params = {
111 180
              patient_id:this.patient_id,
112
-             medicineData:this.medicineData
181
+             medicineData:this.multipleSelection
113 182
           }
114
-         console.log("params----",params)
115
-       
116 183
          SaveSelfMedicines(params).then(response=>{
117 184
              if(response.data.state == 1){
118 185
                 var msg = response.data.data.msg
@@ -123,7 +190,7 @@ export default {
123 190
                 this.$message.error("药品名称规格已存在")
124 191
              }
125 192
            })   
126
-        }
193
+        },
127 194
     },
128 195
   created(){
129 196
        //获取所有药品名称

+ 2 - 1
src/xt_pages/stock/selfPreparedMedicine/index.vue Wyświetl plik

@@ -46,7 +46,8 @@
46 46
                 <div style="width:160px;">
47 47
                     <div class="tablesTitle">患者列表</div>
48 48
                     <el-table :data="tablePatient" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row
49
-                    @current-change="handleCurrentChange"  ref="monthlyPlanTable">
49
+                    @current-change="handleCurrentChange"  ref="monthlyPlanTable"
50
+                    >
50 51
                         <el-table-column align="center" prop="dialysis_no" label="透析号" width="70">
51 52
                             <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
52 53
                         </el-table-column>

+ 63 - 51
src/xt_pages/user/components/EditGroupAdvice.vue Wyświetl plik

@@ -382,24 +382,17 @@
382 382
         <el-row>
383 383
           <el-col :span="10">
384 384
             <el-form-item label="医嘱内容 :" required prop="advice_name">
385
-              <el-select
386
-                v-model="nameForm.advice_name"
387
-                filterable
388
-                clearable
389
-                allow-create
390
-                :disabled="isChild"
391
-                placeholder="请选择(输入可搜索)"
392
-                style="width:200px"
393
-                @change="changeDrugName"
394
-              >
395
-                <el-option
396
-                  v-for="(item,index) in all_drug"
397
-                  :key="index"
398
-                  :label="item.drug_name"
399
-                  :value="item.drug_name"
400
-                ></el-option>
401
-              </el-select>
402 385
 
386
+               <el-autocomplete
387
+                style="width:100%;"
388
+                class="inline-input"
389
+                v-model="nameForm.advice_name"
390
+                :fetch-suggestions="querySearch"
391
+                placeholder="请输入内容"
392
+                @select="handleSelect"
393
+                @input="changeDrugName"
394
+              ></el-autocomplete>
395
+              
403 396
             </el-form-item>
404 397
           </el-col>
405 398
           <el-col :span="14">
@@ -408,23 +401,15 @@
408 401
             <!--</el-form-item>-->
409 402
             <el-form-item label="药品规格 :" prop="advice_desc">
410 403
               <el-col :span="10">
411
-                 <el-select
404
+                <el-autocomplete
405
+                  style="width:100px;"
406
+                  class="inline-input"
412 407
                   v-model="nameForm.advice_desc"
413
-                  filterable
414
-                  clearable
415
-                  allow-create
416
-                  :disabled="isChild"
417
-                  placeholder="请选择(输入可搜索)"
418
-                  style="width:150px"
419
-                  @change="changeDrugDesc"
420
-                >
421
-                  <el-option
422
-                    v-for="item in drugSpec"
423
-                    :key="item.id"
424
-                    :label="item.drug_spec"
425
-                    :value="item.drug_spec"
426
-                  ></el-option>
427
-                 </el-select>
408
+                  :fetch-suggestions="querySearch1"
409
+                  placeholder="请输入内容"
410
+                  @select="handleSelect1"
411
+                  @input="changeDrugDesc"
412
+                ></el-autocomplete>
428 413
               </el-col>
429 414
               <el-col class="line" :span="2">&nbsp;</el-col>
430 415
               <el-col :span="10">
@@ -647,6 +632,8 @@ export default {
647 632
       },
648 633
 
649 634
       drugOptions: [],
635
+      deliveryWayOptions: [],
636
+      executionFrequencyOptions: [],
650 637
       adviceTemplates: [],
651 638
       submitGroupForm: {
652 639
         advice_type: "",
@@ -706,17 +693,8 @@ export default {
706 693
         return [];
707 694
       }
708 695
     },
709
-    executionFrequencyOptions: {
710
-      type: Array,
711
-      default: function() {
712
-        return [];
713
-      }
714
-    }, deliveryWayOptions: {
715
-      type: Array,
716
-      default: function() {
717
-        return [];
718
-      }
719
-    }, unitsOption: {
696
+
697
+    unitsOption: {
720 698
       type: Array,
721 699
       default: function() {
722 700
         return [];
@@ -863,7 +841,7 @@ export default {
863 841
         .catch(() => {});
864 842
     },
865 843
     submitNameForm(formName) {
866
-
844
+     
867 845
       if(this.src_type == ""){
868 846
           this.nameForm.way = 0
869 847
           this.nameForm.drug_id = 0
@@ -875,7 +853,7 @@ export default {
875 853
        }
876 854
 
877 855
       //  if(typeof(this.nameForm.advice_name) == "string"){
878
-
856
+         
879 857
       //     this.nameForm.advice_name == this.nameForm.advice_name
880 858
       // }
881 859
 
@@ -897,7 +875,7 @@ export default {
897 875
       //       var arr = name.split("(自备药)")
898 876
       //       drug_name = arr[0]
899 877
       //     }
900
-
878
+          
901 879
       //     this.nameForm.advice_name = drug_name
902 880
       //     this.nameForm.way = way
903 881
       // }
@@ -2496,11 +2474,11 @@ export default {
2496 2474
                 obj.custom_id = this.rand(10000000, 99999999)
2497 2475
                 obj.drug_specs = base_drug_list[i].drug_specs
2498 2476
                 this.all_drug.push(obj)
2499
-                console.log("中2222222222222222222",this.all_drug)
2477
+                
2500 2478
               }
2501
-            }
2479
+            }   
2502 2480
         })
2503
-
2481
+       
2504 2482
     },
2505 2483
     changeDrugName(name){
2506 2484
        this.current_drug_name = name
@@ -2527,7 +2505,41 @@ export default {
2527 2505
             this.nameForm.way = this.drugSpec[i].type
2528 2506
           }
2529 2507
         }
2530
-      }
2508
+      },
2509
+      handleSelect1(){
2510
+        
2511
+      },
2512
+
2513
+       querySearch(queryString, cb) {
2514
+        console.log('queryString',queryString)
2515
+        var restaurants = this.all_drug;
2516
+        restaurants.map(item => {
2517
+          item.value = item.drug_name
2518
+        })
2519
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2520
+        // 调用 callback 返回建议列表的数据
2521
+       
2522
+        cb(results);
2523
+     },
2524
+
2525
+     createFilter(queryString) {
2526
+        return (restaurant) => {
2527
+          return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
2528
+        };
2529
+     },
2530
+
2531
+     querySearch1(queryString, cb) {
2532
+      
2533
+        var restaurants = this.drugSpec;
2534
+         console.log(restaurants)
2535
+        restaurants.map(item => {
2536
+          item.value = item.drug_spec
2537
+        })
2538
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2539
+        // 调用 callback 返回建议列表的数据
2540
+       
2541
+        cb(results);
2542
+      },
2531 2543
   },
2532 2544
   watch: {
2533 2545
     rowKey: function() {

+ 163 - 64
src/xt_pages/user/doctorAdvice.vue Wyświetl plik

@@ -945,25 +945,15 @@
945 945
           <el-row>
946 946
             <el-col :span="10">
947 947
               <el-form-item label="医嘱内容:" required prop="advice_name">
948
-                <!-- <el-input v-model="nameForm.advice_name"></el-input> -->
949
-
950
-                <el-select
951
-                  v-model="nameForm.advice_name"
952
-                  filterable
953
-                  clearable
954
-                  allow-create
955
-                  :disabled="isChild"
956
-                  placeholder="请选择(输入可搜索)"
957
-                  style="width:200px"
958
-                  @change="changeDrugName"
959
-                >
960
-                  <el-option
961
-                    v-for="(item,index) in all_drug"
962
-                    :key="index"
963
-                    :label="item.drug_name"
964
-                    :value="item.drug_name"
965
-                  ></el-option>
966
-                </el-select>
948
+               <el-autocomplete
949
+                style="width:100%;"
950
+                class="inline-input"
951
+                v-model="nameForm.advice_name"
952
+                :fetch-suggestions="querySearch"
953
+                placeholder="请输入内容"
954
+                @select="handleSelect"
955
+                @input="changeDrugName"
956
+              ></el-autocomplete>
967 957
               <!-- <div style="color:red;font-size:12px;">
968 958
                 库存不足50
969 959
               </div> -->
@@ -972,25 +962,17 @@
972 962
 
973 963
             <el-col :span="14">
974 964
               <el-form-item label="药品规格 :" prop="advice_desc">
975
-                <el-col :span="12">
976
-                  <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
977
-                    <el-select
978
-                    v-model="nameForm.advice_desc"
979
-                    filterable
980
-                    clearable
981
-                    allow-create
982
-                    :disabled="isChild"
983
-                    placeholder="请选择(输入可搜索)"
984
-                    style="width:150px"
985
-                    @change="changeDrugDesc"
986
-                >
987
-                  <el-option
988
-                    v-for="item in drugSpec"
989
-                    :key="item.id"
990
-                    :label="item.drug_spec"
991
-                    :value="item.drug_spec"
992
-                  ></el-option>
993
-                 </el-select>
965
+                <el-col :span="6">
966
+
967
+                <el-autocomplete
968
+                  style="width:100px;"
969
+                  class="inline-input"
970
+                  v-model="nameForm.advice_desc"
971
+                  :fetch-suggestions="querySearch1"
972
+                  placeholder="请输入内容"
973
+                  @select="handleSelect1"
974
+                  @input="changeDrugDesc"
975
+                ></el-autocomplete>
994 976
 
995 977
                 </el-col>
996 978
                 <el-col class="line" :span="2">&nbsp;</el-col>
@@ -1176,6 +1158,8 @@
1176 1158
         ref="editGroupForm"
1177 1159
       ></edit-group-advice>
1178 1160
 
1161
+
1162
+    <!-- 新增子药 -->
1179 1163
       <el-dialog
1180 1164
         :title="dialogTitle"
1181 1165
         :visible.sync="dialogFormVisible"
@@ -1236,25 +1220,32 @@
1236 1220
             </el-col>
1237 1221
             <el-col :span="12">
1238 1222
               <el-form-item label="医嘱内容 :" required prop="advice_name">
1239
-                <el-input v-model="adviceForm.advice_name"></el-input>
1240
-                <!--<el-select v-model="adviceForm.advice_name" @change="changeAdviceName" filterable clearable allow-create placeholder="请选择(输入可搜索)" style="width:50%" >-->
1241
-                <!--<el-option-->
1242
-                <!--v-for="item in adviceTemplates"-->
1243
-                <!--:key="item.id"-->
1244
-                <!--:label="item.advice_name"-->
1245
-                <!--:value="item.id"-->
1246
-                <!--&gt;-->
1247
-                <!--<span >{{ item.advice_name }}</span>-->
1248
-                <!--<span >{{ item.advice_spec }}</span>-->
1249
-                <!--</el-option>-->
1250
-                <!--</el-select>-->
1223
+                <el-autocomplete
1224
+                  style="width:100%;"
1225
+                  class="inline-input"
1226
+                  v-model="adviceForm.advice_name"
1227
+                  :fetch-suggestions="querySearch"
1228
+                  placeholder="请输入内容"
1229
+                  @select="handleSelect"
1230
+                  @input="changeDrugNameTwo"
1231
+                ></el-autocomplete>
1251 1232
               </el-form-item>
1252 1233
             </el-col>
1253 1234
 
1254 1235
             <el-col :span="12">
1255 1236
               <el-form-item label="药品规格 :" prop="advice_desc">
1256 1237
                 <el-col :span="9">
1257
-                  <el-input v-model="adviceForm.advice_desc"></el-input>
1238
+                  <!-- <el-input v-model="adviceForm.advice_desc"></el-input> -->
1239
+                  <el-autocomplete
1240
+                    style="width:100px;"
1241
+                    class="inline-input"
1242
+                    v-model="adviceForm.advice_desc"
1243
+                    :fetch-suggestions="querySearch1"
1244
+                    placeholder="请输入内容"
1245
+                    @select="handleSelect1"
1246
+                    @input="changeDrugDescTwo"
1247
+                  ></el-autocomplete>
1248
+
1258 1249
                 </el-col>
1259 1250
                 <el-col class="line" :span="1">&nbsp;</el-col>
1260 1251
                 <el-col :span="14">
@@ -2090,7 +2081,10 @@ export default {
2090 2081
         execution_frequency: "",
2091 2082
         advice_doctor: "",
2092 2083
         remark: "",
2093
-        parent_id: 0
2084
+        parent_id: 0,
2085
+        drug_id:0,
2086
+        way:0,
2087
+        drug_name_id:0,
2094 2088
       },
2095 2089
       nameForm: {
2096 2090
         advice_name: "",
@@ -2234,6 +2228,17 @@ export default {
2234 2228
               mode = "3-1";
2235 2229
             }
2236 2230
           }
2231
+          if(this.src_type == ""){
2232
+              this.adviceForm.way = 0
2233
+              this.adviceForm.drug_id = 0
2234
+              this.adviceForm.drug_name_id = 0
2235
+          }
2236
+
2237
+          if(this.src_type == 2){ //自备药
2238
+              var arr = this.adviceForm.advice_name.split("(自备药)")
2239
+              this.adviceForm.advice_name = arr[0]
2240
+          }
2241
+
2237 2242
 
2238 2243
           EditNewDoctorAdvice(
2239 2244
             this.patientID,
@@ -2305,6 +2310,8 @@ export default {
2305 2310
           console.log("33333",this.private_drug_config.drug_start)
2306 2311
           console.log("44444",this.medicals)
2307 2312
 
2313
+
2314
+
2308 2315
           var adviceNames = [];
2309 2316
           for (const index in this.groupForm.adviceNames) {
2310 2317
             this.groupForm.adviceNames[
@@ -2325,10 +2332,10 @@ export default {
2325 2332
           } else if (this.groupForm.advice_type == 3) {
2326 2333
             mode = "1-1";
2327 2334
           }
2328
-        console.log("22222222",this.medicals)
2329
-        console.log("3333333",submitForm)
2335
+        console.log("长期医嘱2222",this.medicals)
2336
+        console.log("长期医嘱3333",submitForm)
2330 2337
 
2331
-        if(this.private_drug_config.drug_start == 1){
2338
+        if(this.private_drug_config != null&&this.private_drug_config.drug_start == 1){
2332 2339
               for(let index=0;index<submitForm.adviceNames.length;index++){
2333 2340
                   for(let i=0;i<this.medicals.length;i++){
2334 2341
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
@@ -2421,6 +2428,17 @@ export default {
2421 2428
             //临时
2422 2429
             mode = "1-1";
2423 2430
           }
2431
+          if(this.src_type == ""){
2432
+              this.adviceForm.way = 0
2433
+              this.adviceForm.drug_id = 0
2434
+              this.adviceForm.drug_name_id = 0
2435
+          }
2436
+
2437
+          if(this.src_type == 2){ //自备药
2438
+              var arr = this.adviceForm.advice_name.split("(自备药)")
2439
+              this.adviceForm.advice_name = arr[0]
2440
+          }
2441
+          console.log("222222",this.adviceForm)
2424 2442
 
2425 2443
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2426 2444
             response => {
@@ -2688,8 +2706,8 @@ export default {
2688 2706
           id: 0,
2689 2707
           children: [],
2690 2708
           parent_row: 0,
2691
-          way:"",
2692
-          drug_id:'',
2709
+          way:0,
2710
+          drug_id:0,
2693 2711
           drug_name_id:0,
2694 2712
         };
2695 2713
         this.nameFormTitle = "新增医嘱内容";
@@ -2958,8 +2976,15 @@ export default {
2958 2976
     },
2959 2977
     openConfig() {},
2960 2978
     openEditGroupAdvice(groupno) {
2979
+
2961 2980
       var groups = [];
2962 2981
       this.rowKey = 0;
2982
+      for(let i=0;i<this.adviceTableData.length;i++){
2983
+        if(this.adviceTableData[i].advice_type == 2){
2984
+           this.adviceTableData[i].advice_type = "临时"
2985
+        }
2986
+      }
2987
+
2963 2988
       for (const index in this.adviceTableData) {
2964 2989
         if (groupno == this.adviceTableData[index].groupno) {
2965 2990
           groups.push(this.adviceTableData[index]);
@@ -2979,7 +3004,7 @@ export default {
2979 3004
         remark: groups[0].remark,
2980 3005
         groupno: groupno
2981 3006
       };
2982
-      // console.log(groups[0]);
3007
+      console.log("2222",groups[0]);
2983 3008
 
2984 3009
       var childMap = {};
2985 3010
       for (const index in groups) {
@@ -3023,7 +3048,7 @@ export default {
3023 3048
           row_key: this.rowKey,
3024 3049
           table: []
3025 3050
         };
3026
-        console.log("itme-----------",item)
3051
+
3027 3052
         if (item.id in childMap) {
3028 3053
           for (const key in childMap[item.id]) {
3029 3054
             this.rowKey++;
@@ -4040,7 +4065,7 @@ export default {
4040 4065
           var arr = this.nameForm.advice_name.split("(自备药)")
4041 4066
           this.nameForm.advice_name = arr[0]
4042 4067
        }
4043
-
4068
+      console.log("医嘱2222",this.nameForm)
4044 4069
       var _this = this;
4045 4070
       this.$refs[formName].validate(valid => {
4046 4071
         if (valid) {
@@ -4343,9 +4368,6 @@ export default {
4343 4368
               : response.data.data.drugways;
4344 4369
           this.executionFrequencyOptions =
4345 4370
             response.data.data.efs === null ? [] : response.data.data.efs;
4346
-          console.log(this.deliveryWayOptions)
4347
-          console.log(this.executionFrequencyOptions)
4348
-
4349 4371
         }
4350 4372
       });
4351 4373
     },
@@ -4495,6 +4517,40 @@ export default {
4495 4517
 
4496 4518
       })
4497 4519
     },
4520
+    changeDrugNameTwo(name){
4521
+       this.current_drug_name = name
4522
+       this.adviceForm.advice_desc = ''
4523
+      this.drugSpec = []
4524
+      for (let i = 0; i < this.all_drug.length; i++) {
4525
+        if (this.all_drug[i].drug_name == name) {
4526
+            this.drugSpec = this.all_drug[i].drug_specs
4527
+          }
4528
+       }
4529
+    },
4530
+   changeDrugDescTwo(name){
4531
+      this.current_drug_spec = name
4532
+        for (let i = 0; i < this.drugSpec.length; i++) {
4533
+          if (this.drugSpec[i].drug_spec == name) {
4534
+            this.adviceForm.advice_desc = this.drugSpec[i].drug_spec
4535
+            this.adviceForm.prescribing_number = this.drugSpec[i].prescribing_number.toString()
4536
+            this.adviceForm.single_dose = this.drugSpec[i].single_dose.toString()
4537
+            this.adviceForm.delivery_way = this.drugSpec[i].delivery_way.toString()
4538
+            this.adviceForm.execution_frequency = this.drugSpec[i].execution_frequency.toString()
4539
+            this.drug_id = this.drugSpec[i].id
4540
+            this.src_type = this.drugSpec[i].type
4541
+            this.adviceForm.drug_id = this.drugSpec[i].id
4542
+            this.adviceForm.way = this.drugSpec[i].type
4543
+            this.adviceForm.single_dose_unit = this.drugSpec[i].min_unit
4544
+            this.adviceForm.drug_spec_unit = this.drugSpec[i].min_unit
4545
+            this.adviceForm.prescribing_number_unit = this.drugSpec[i].min_unit
4546
+            if(this.drugSpec[i].drug_name_id){
4547
+               this.adviceForm.drug_name_id = this.drugSpec[i].drug_name_id
4548
+            }else{
4549
+              this.adviceForm.drug_name_id = 0
4550
+            }
4551
+          }
4552
+        }
4553
+   },
4498 4554
    changeDrugName(name){
4499 4555
        this.current_drug_name = name
4500 4556
        this.nameForm.advice_desc = ''
@@ -4518,8 +4574,13 @@ export default {
4518 4574
             this.src_type = this.drugSpec[i].type
4519 4575
             this.nameForm.drug_id = this.drugSpec[i].id
4520 4576
             this.nameForm.way = this.drugSpec[i].type
4577
+            this.nameForm.single_dose_unit = this.drugSpec[i].min_unit
4578
+            this.nameForm.drug_spec_unit = this.drugSpec[i].min_unit
4579
+            this.nameForm.prescribing_number_unit = this.drugSpec[i].min_unit
4521 4580
             if(this.drugSpec[i].drug_name_id){
4522
-               this.nameForm.drug_name_id = 0
4581
+               this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
4582
+            }else{
4583
+              this.nameForm.drug_name_id = 0
4523 4584
             }
4524 4585
           }
4525 4586
         }
@@ -4527,6 +4588,44 @@ export default {
4527 4588
     rand(min, max) {
4528 4589
         return Math.floor(Math.random() * (max - min)) + min;
4529 4590
     },
4591
+
4592
+     querySearch(queryString, cb) {
4593
+        console.log('queryString',queryString)
4594
+        var restaurants = this.all_drug;
4595
+        restaurants.map(item => {
4596
+          item.value = item.drug_name
4597
+        })
4598
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
4599
+        // 调用 callback 返回建议列表的数据
4600
+        console.log('results',results)
4601
+        cb(results);
4602
+     },
4603
+
4604
+     createFilter(queryString) {
4605
+        return (restaurant) => {
4606
+          return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
4607
+        };
4608
+     },
4609
+
4610
+     querySearch1(queryString, cb) {
4611
+        console.log('queryString',queryString)
4612
+        var restaurants = this.drugSpec;
4613
+         console.log(restaurants)
4614
+        restaurants.map(item => {
4615
+          item.value = item.drug_spec
4616
+        })
4617
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
4618
+        // 调用 callback 返回建议列表的数据
4619
+        console.log('results',results)
4620
+        cb(results);
4621
+      },
4622
+
4623
+      handleSelect1(){
4624
+
4625
+      },
4626
+      handleSelect(){
4627
+
4628
+      }
4530 4629
   },
4531 4630
   watch: {
4532 4631
     adviceTableData: function() {