Browse Source

Merge branch '20201014_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201014_pc_vue_new_branch

See999 4 years ago
parent
commit
c9eca51825

+ 2 - 0
src/api/advice.js View File

@@ -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 - 2
src/lang/zh.js View File

@@ -225,7 +225,6 @@ export default {
225 225
     signIndex:'签到排队',
226 226
     signIn:'签到窗口',
227 227
     lineUp:'排队窗口',
228
-    otherManagement:'其他管理',
229 228
     calling:'排队叫号',
230 229
     bedManagement:'床位管理',
231 230
     dictionaryManagement:'字典管理',
@@ -235,7 +234,7 @@ export default {
235 234
   },
236 235
   navbar: {
237 236
     logOut: '退出登录',
238
-    dashboard: '首页',
237
+    dashboard: '透析首页',
239 238
     github: '项目地址',
240 239
     screenfull: '全屏',
241 240
     theme: '换肤'

+ 32 - 51
src/xt_pages/data/druguseTemplate.vue View File

@@ -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 View File

@@ -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 View File

@@ -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 {
@@ -2358,6 +2322,7 @@
2358 2322
                 obj.type = 2
2359 2323
                 obj.custom_id = this.rand(10000000, 99999999)
2360 2324
                 obj.drug_specs = medicalList[i].drug_specs
2325
+                console.log("222",this.all_drug)
2361 2326
                 this.all_drug.push(obj)
2362 2327
               }
2363 2328
             }
@@ -2394,13 +2359,15 @@
2394 2359
                 obj.custom_id = this.rand(10000000, 99999999)
2395 2360
                 obj.drug_specs = base_drug_list[i].drug_specs
2396 2361
                 this.all_drug.push(obj)
2362
+                console.log("2222",this.all_drug)
2397 2363
               }
2398 2364
             }
2399 2365
         })
2400 2366
      },
2401 2367
     changeDrugName(name){
2402 2368
       this.current_drug_name = name
2403
-      this.form.advice_desc = ''
2369
+      this.form.advice_desc = ""
2370
+      this.$forceUpdate()
2404 2371
       this.drugSpec = []
2405 2372
       for (let i = 0; i < this.all_drug.length; i++) {
2406 2373
         if (this.all_drug[i].drug_name == name) {
@@ -2409,6 +2376,7 @@
2409 2376
        }
2410 2377
     },
2411 2378
     changeDrugDesc(name) {
2379
+      this.$forceUpdate()
2412 2380
         this.current_drug_spec = name
2413 2381
         for (let i = 0; i < this.drugSpec.length; i++) {
2414 2382
           if (this.drugSpec[i].drug_spec == name) {
@@ -2421,8 +2389,11 @@
2421 2389
             this.src_type = this.drugSpec[i].type
2422 2390
             this.form.drug_id = this.drugSpec[i].id
2423 2391
             this.form.way = this.drugSpec[i].type
2392
+
2393
+            this.form.drug_spec_unit = this.drugSpec[i].min_unit
2394
+            this.form.prescribing_number_unit = this.drugSpec[i].min_unit
2395
+            this.form.single_dose_unit = this.drugSpec[i].min_unit
2424 2396
             if(this.drugSpec[i].drug_name_id){
2425
-              console.log("22222",this.drugSpec[i].drug_name_id)
2426 2397
                this.form.drug_name_id = this.drugSpec[i].drug_name_id
2427 2398
             }else{
2428 2399
               this.form.drug_name_id = 0
@@ -2465,6 +2436,9 @@
2465 2436
         console.log('results',results)
2466 2437
         cb(results);
2467 2438
       },
2439
+     handleSelect(){
2440
+
2441
+     }
2468 2442
     },
2469 2443
     created() {
2470 2444
       var date = this.$route.query && this.$route.query.date

+ 32 - 54
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue View File

@@ -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 View File

@@ -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: {

+ 251 - 251
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -19,7 +19,7 @@
19 19
         ref="dialysisPrescription"
20 20
         :model="dialysisPrescription"
21 21
         label-width="148px"
22
-      > 
22
+      >
23 23
         <el-row :gutter="24">
24 24
           <el-col :span="8" v-if="isShows('透析模式')">
25 25
             <el-form-item label="透析模式">
@@ -219,9 +219,9 @@
219 219
             </el-form-item>
220 220
           </el-col>
221 221
 
222
-          
223 222
 
224
-       
223
+
224
+
225 225
 
226 226
           <el-col :span="8" v-if="isShows('置换量') && (this.$store.getters.xt_user.template_info.template_id == 20)"
227 227
                   v-show="zhiShow">
@@ -519,265 +519,265 @@
519 519
           <!--          </el-col>-->
520 520
 
521 521
           <!--透析耗材-->
522
-          <el-col
523
-            :span="8"
524
-            v-if="isShows('血液透析干粉') && config.is_open == 1"
525
-          >
526
-            <el-form-item label="血液透析干粉:">
527
-              <el-select
528
-                v-model="dialysisPrescription.niprocart"
529
-                placeholder="请选择"
530
-              >
531
-                <el-option :key="0" label="请选择" :value="0"></el-option>
532
-                <el-option
533
-                  v-for="(option, index) in niprocart_info"
534
-                  :key="index + 'p'"
535
-                  :label="option.GoodInfo.specification_name"
536
-                  :value="option.GoodInfo.id"
537
-                ></el-option>
538
-              </el-select>
539
-            </el-form-item>
540
-          </el-col>
541
-
542
-          <el-col
543
-            :span="8"
544
-            v-if="isShows('一次性使用动静脉穿刺针') && config.is_open == 1"
545
-          >
546
-            <el-form-item label="一次性使用动静脉穿刺针:">
547
-              <el-select
548
-                v-model="dialysisPrescription.jms"
549
-                placeholder="请选择"
550
-              >
551
-                <el-option :key="0" label="请选择" :value="0"></el-option>
552
-
553
-                <el-option
554
-                  v-for="(option, index) in jms_info"
555
-                  :key="index + 'a'"
556
-                  :label="option.GoodInfo.specification_name"
557
-                  :value="option.GoodInfo.id"
558
-                ></el-option>
559
-              </el-select>
560
-            </el-form-item>
561
-          </el-col>
562
-
563
-          <el-col
564
-            :span="8"
565
-            v-if="isShows('内瘘管翼状针') && config.is_open == 1"
566
-          >
567
-            <el-form-item label="内瘘管翼状针:">
568
-              <el-select
569
-                v-model="dialysisPrescription.fistula_needle_set"
570
-                placeholder="请选择"
571
-              >
572
-                <el-option :key="0" label="请选择" :value="0"></el-option>
573
-
574
-                <el-option
575
-                  v-for="(option, index) in fistula_needle_set_info"
576
-                  :key="index + 's'"
577
-                  :label="option.GoodInfo.specification_name"
578
-                  :value="option.GoodInfo.id"
579
-                ></el-option>
580
-              </el-select>
581
-            </el-form-item>
582
-          </el-col>
583
-
584
-          <el-col
585
-            :span="8"
586
-            v-if="isShows('内瘘管翼状针16G') && config.is_open == 1"
587
-          >
588
-            <el-form-item label="内瘘管翼状针16G:">
589
-              <el-select
590
-                v-model="dialysisPrescription.fistula_needle_set_16"
591
-                placeholder="请选择"
592
-              >
593
-                <el-option :key="0" label="请选择" :value="0"></el-option>
594
-
595
-                <el-option
596
-                  v-for="(option, index) in fistula_needle_set_16_info"
597
-                  :key="index + 'd'"
598
-                  :label="option.GoodInfo.specification_name"
599
-                  :value="option.GoodInfo.id"
600
-                ></el-option>
601
-              </el-select>
602
-            </el-form-item>
603
-          </el-col>
604
-
605
-          <el-col
606
-            :span="8"
607
-            v-if="isShows('一次性使用血液灌流器') && config.is_open == 1"
608
-          >
609
-            <el-form-item label="一次性使用血液灌流器:">
610
-              <el-select
611
-                v-model="dialysisPrescription.hemoperfusion"
612
-                placeholder="请选择"
613
-              >
614
-                <el-option :key="0" label="请选择" :value="0"></el-option>
615
-
616
-                <el-option
617
-                  v-for="(option, index) in hemoperfusion_info"
618
-                  :key="index + 'f'"
619
-                  :label="option.GoodInfo.specification_name"
620
-                  :value="option.GoodInfo.id"
621
-                ></el-option>
622
-              </el-select>
623
-            </el-form-item>
624
-          </el-col>
522
+          <!--<el-col-->
523
+            <!--:span="8"-->
524
+            <!--v-if="isShows('血液透析干粉') && config.is_open == 1"-->
525
+          <!--&gt;-->
526
+            <!--<el-form-item label="血液透析干粉:">-->
527
+              <!--<el-select-->
528
+                <!--v-model="dialysisPrescription.niprocart"-->
529
+                <!--placeholder="请选择"-->
530
+              <!--&gt;-->
531
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
532
+                <!--<el-option-->
533
+                  <!--v-for="(option, index) in niprocart_info"-->
534
+                  <!--:key="index + 'p'"-->
535
+                  <!--:label="option.GoodInfo.specification_name"-->
536
+                  <!--:value="option.GoodInfo.id"-->
537
+                <!--&gt;</el-option>-->
538
+              <!--</el-select>-->
539
+            <!--</el-form-item>-->
540
+          <!--</el-col>-->
541
+
542
+          <!--<el-col-->
543
+            <!--:span="8"-->
544
+            <!--v-if="isShows('一次性使用动静脉穿刺针') && config.is_open == 1"-->
545
+          <!--&gt;-->
546
+            <!--<el-form-item label="一次性使用动静脉穿刺针:">-->
547
+              <!--<el-select-->
548
+                <!--v-model="dialysisPrescription.jms"-->
549
+                <!--placeholder="请选择"-->
550
+              <!--&gt;-->
551
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
625 552
 
626
-          <el-col
627
-            :span="8"
628
-            v-if="isShows('空心纤维血液透析器') && config.is_open == 1"
629
-          >
630
-            <el-form-item label="空心纤维血液透析器:">
631
-              <el-select
632
-                v-model="dialysisPrescription.dialyser_sterilised"
633
-                placeholder="请选择"
634
-              >
635
-                <el-option :key="0" label="请选择" :value="0"></el-option>
553
+                <!--<el-option-->
554
+                  <!--v-for="(option, index) in jms_info"-->
555
+                  <!--:key="index + 'a'"-->
556
+                  <!--:label="option.GoodInfo.specification_name"-->
557
+                  <!--:value="option.GoodInfo.id"-->
558
+                <!--&gt;</el-option>-->
559
+              <!--</el-select>-->
560
+            <!--</el-form-item>-->
561
+          <!--</el-col>-->
562
+
563
+          <!--<el-col-->
564
+            <!--:span="8"-->
565
+            <!--v-if="isShows('内瘘管翼状针') && config.is_open == 1"-->
566
+          <!--&gt;-->
567
+            <!--<el-form-item label="内瘘管翼状针:">-->
568
+              <!--<el-select-->
569
+                <!--v-model="dialysisPrescription.fistula_needle_set"-->
570
+                <!--placeholder="请选择"-->
571
+              <!--&gt;-->
572
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
636 573
 
637
-                <el-option
638
-                  v-for="(option, index) in dialyser_sterilised_info"
639
-                  :key="index + 'g'"
640
-                  :label="option.GoodInfo.specification_name"
641
-                  :value="option.GoodInfo.id"
642
-                ></el-option>
643
-              </el-select>
644
-            </el-form-item>
645
-          </el-col>
574
+                <!--<el-option-->
575
+                  <!--v-for="(option, index) in fistula_needle_set_info"-->
576
+                  <!--:key="index + 's'"-->
577
+                  <!--:label="option.GoodInfo.specification_name"-->
578
+                  <!--:value="option.GoodInfo.id"-->
579
+                <!--&gt;</el-option>-->
580
+              <!--</el-select>-->
581
+            <!--</el-form-item>-->
582
+          <!--</el-col>-->
583
+
584
+          <!--<el-col-->
585
+            <!--:span="8"-->
586
+            <!--v-if="isShows('内瘘管翼状针16G') && config.is_open == 1"-->
587
+          <!--&gt;-->
588
+            <!--<el-form-item label="内瘘管翼状针16G:">-->
589
+              <!--<el-select-->
590
+                <!--v-model="dialysisPrescription.fistula_needle_set_16"-->
591
+                <!--placeholder="请选择"-->
592
+              <!--&gt;-->
593
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
646 594
 
647
-          <el-col
648
-            :span="8"
649
-            v-if="isShows('中空纤维透析器') && config.is_open == 1"
650
-          >
651
-            <el-form-item label="中空纤维透析器:">
652
-              <el-select
653
-                v-model="dialysisPrescription.filtryzer"
654
-                placeholder="请选择"
655
-              >
656
-                <el-option :key="0" label="请选择" :value="0"></el-option>
595
+                <!--<el-option-->
596
+                  <!--v-for="(option, index) in fistula_needle_set_16_info"-->
597
+                  <!--:key="index + 'd'"-->
598
+                  <!--:label="option.GoodInfo.specification_name"-->
599
+                  <!--:value="option.GoodInfo.id"-->
600
+                <!--&gt;</el-option>-->
601
+              <!--</el-select>-->
602
+            <!--</el-form-item>-->
603
+          <!--</el-col>-->
604
+
605
+          <!--<el-col-->
606
+            <!--:span="8"-->
607
+            <!--v-if="isShows('一次性使用血液灌流器') && config.is_open == 1"-->
608
+          <!--&gt;-->
609
+            <!--<el-form-item label="一次性使用血液灌流器:">-->
610
+              <!--<el-select-->
611
+                <!--v-model="dialysisPrescription.hemoperfusion"-->
612
+                <!--placeholder="请选择"-->
613
+              <!--&gt;-->
614
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
657 615
 
658
-                <el-option
659
-                  v-for="(option, index) in filtryzer_info"
660
-                  :key="index + 'h'"
661
-                  :label="option.GoodInfo.specification_name"
662
-                  :value="option.GoodInfo.id"
663
-                ></el-option>
664
-              </el-select>
665
-            </el-form-item>
666
-          </el-col>
616
+                <!--<el-option-->
617
+                  <!--v-for="(option, index) in hemoperfusion_info"-->
618
+                  <!--:key="index + 'f'"-->
619
+                  <!--:label="option.GoodInfo.specification_name"-->
620
+                  <!--:value="option.GoodInfo.id"-->
621
+                <!--&gt;</el-option>-->
622
+              <!--</el-select>-->
623
+            <!--</el-form-item>-->
624
+          <!--</el-col>-->
625
+
626
+          <!--<el-col-->
627
+            <!--:span="8"-->
628
+            <!--v-if="isShows('空心纤维血液透析器') && config.is_open == 1"-->
629
+          <!--&gt;-->
630
+            <!--<el-form-item label="空心纤维血液透析器:">-->
631
+              <!--<el-select-->
632
+                <!--v-model="dialysisPrescription.dialyser_sterilised"-->
633
+                <!--placeholder="请选择"-->
634
+              <!--&gt;-->
635
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
667 636
 
668
-          <el-col :span="8" v-if="isShows('透析器') && config.is_open == 1">
669
-            <el-form-item label="透析器:">
670
-              <el-select
671
-                v-model="dialysisPrescription.dialyzers"
672
-                placeholder="请选择"
673
-              >
674
-                <el-option :key="0" label="请选择" :value="0"></el-option>
637
+                <!--<el-option-->
638
+                  <!--v-for="(option, index) in dialyser_sterilised_info"-->
639
+                  <!--:key="index + 'g'"-->
640
+                  <!--:label="option.GoodInfo.specification_name"-->
641
+                  <!--:value="option.GoodInfo.id"-->
642
+                <!--&gt;</el-option>-->
643
+              <!--</el-select>-->
644
+            <!--</el-form-item>-->
645
+          <!--</el-col>-->
646
+
647
+          <!--<el-col-->
648
+            <!--:span="8"-->
649
+            <!--v-if="isShows('中空纤维透析器') && config.is_open == 1"-->
650
+          <!--&gt;-->
651
+            <!--<el-form-item label="中空纤维透析器:">-->
652
+              <!--<el-select-->
653
+                <!--v-model="dialysisPrescription.filtryzer"-->
654
+                <!--placeholder="请选择"-->
655
+              <!--&gt;-->
656
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
675 657
 
676
-                <el-option
677
-                  v-for="(option, index) in dialyzers_info"
678
-                  :key="index + 1"
679
-                  :label="option.GoodInfo.specification_name"
680
-                  :value="option.GoodInfo.id"
681
-                ></el-option>
682
-              </el-select>
683
-            </el-form-item>
684
-          </el-col>
658
+                <!--<el-option-->
659
+                  <!--v-for="(option, index) in filtryzer_info"-->
660
+                  <!--:key="index + 'h'"-->
661
+                  <!--:label="option.GoodInfo.specification_name"-->
662
+                  <!--:value="option.GoodInfo.id"-->
663
+                <!--&gt;</el-option>-->
664
+              <!--</el-select>-->
665
+            <!--</el-form-item>-->
666
+          <!--</el-col>-->
685 667
 
686
-          <el-col :span="8" v-if="isShows('注射器') && config.is_open == 1">
687
-            <el-form-item label="注射器:">
688
-              <el-select
689
-                v-model="dialysisPrescription.injector"
690
-                placeholder="请选择"
691
-              >
692
-                <el-option :key="0" label="请选择" :value="0"></el-option>
668
+          <!--<el-col :span="8" v-if="isShows('透析器') && config.is_open == 1">-->
669
+            <!--<el-form-item label="透析器:">-->
670
+              <!--<el-select-->
671
+                <!--v-model="dialysisPrescription.dialyzers"-->
672
+                <!--placeholder="请选择"-->
673
+              <!--&gt;-->
674
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
693 675
 
694
-                <el-option
695
-                  v-for="(option, index) in injector_info"
696
-                  :key="index + 'j'"
697
-                  :label="option.GoodInfo.specification_name"
698
-                  :value="option.GoodInfo.id"
699
-                ></el-option>
700
-              </el-select>
701
-            </el-form-item>
702
-          </el-col>
676
+                <!--<el-option-->
677
+                  <!--v-for="(option, index) in dialyzers_info"-->
678
+                  <!--:key="index + 1"-->
679
+                  <!--:label="option.GoodInfo.specification_name"-->
680
+                  <!--:value="option.GoodInfo.id"-->
681
+                <!--&gt;</el-option>-->
682
+              <!--</el-select>-->
683
+            <!--</el-form-item>-->
684
+          <!--</el-col>-->
703 685
 
704
-          <el-col
705
-            :span="8"
706
-            v-if="isShows('体外循环血路管') && config.is_open == 1"
707
-          >
708
-            <el-form-item label="体外循环血路管:">
709
-              <el-select
710
-                v-model="dialysisPrescription.bloodlines"
711
-                placeholder="请选择"
712
-              >
713
-                <el-option :key="0" label="请选择" :value="0"></el-option>
686
+          <!--<el-col :span="8" v-if="isShows('注射器') && config.is_open == 1">-->
687
+            <!--<el-form-item label="注射器:">-->
688
+              <!--<el-select-->
689
+                <!--v-model="dialysisPrescription.injector"-->
690
+                <!--placeholder="请选择"-->
691
+              <!--&gt;-->
692
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
714 693
 
715
-                <el-option
716
-                  v-for="(option, index) in bloodlines_info"
717
-                  :key="index + 'k'"
718
-                  :label="option.GoodInfo.specification_name"
719
-                  :value="option.GoodInfo.id"
720
-                ></el-option>
721
-              </el-select>
722
-            </el-form-item>
723
-          </el-col>
694
+                <!--<el-option-->
695
+                  <!--v-for="(option, index) in injector_info"-->
696
+                  <!--:key="index + 'j'"-->
697
+                  <!--:label="option.GoodInfo.specification_name"-->
698
+                  <!--:value="option.GoodInfo.id"-->
699
+                <!--&gt;</el-option>-->
700
+              <!--</el-select>-->
701
+            <!--</el-form-item>-->
702
+          <!--</el-col>-->
703
+
704
+          <!--<el-col-->
705
+            <!--:span="8"-->
706
+            <!--v-if="isShows('体外循环血路管') && config.is_open == 1"-->
707
+          <!--&gt;-->
708
+            <!--<el-form-item label="体外循环血路管:">-->
709
+              <!--<el-select-->
710
+                <!--v-model="dialysisPrescription.bloodlines"-->
711
+                <!--placeholder="请选择"-->
712
+              <!--&gt;-->
713
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
724 714
 
725
-          <el-col
726
-            :span="8"
727
-            v-if="isShows('血液净化补液管路(置换管)') && config.is_open == 1"
728
-          >
729
-            <el-form-item label="血液净化补液管路(置换管):">
730
-              <el-select
731
-                v-model="dialysisPrescription.tubing_hemodialysis"
732
-                placeholder="请选择"
733
-              >
734
-                <el-option :key="0" label="请选择" :value="0"></el-option>
715
+                <!--<el-option-->
716
+                  <!--v-for="(option, index) in bloodlines_info"-->
717
+                  <!--:key="index + 'k'"-->
718
+                  <!--:label="option.GoodInfo.specification_name"-->
719
+                  <!--:value="option.GoodInfo.id"-->
720
+                <!--&gt;</el-option>-->
721
+              <!--</el-select>-->
722
+            <!--</el-form-item>-->
723
+          <!--</el-col>-->
724
+
725
+          <!--<el-col-->
726
+            <!--:span="8"-->
727
+            <!--v-if="isShows('血液净化补液管路(置换管)') && config.is_open == 1"-->
728
+          <!--&gt;-->
729
+            <!--<el-form-item label="血液净化补液管路(置换管):">-->
730
+              <!--<el-select-->
731
+                <!--v-model="dialysisPrescription.tubing_hemodialysis"-->
732
+                <!--placeholder="请选择"-->
733
+              <!--&gt;-->
734
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
735 735
 
736
-                <el-option
737
-                  v-for="(option, index) in tubingHemodialysis_info"
738
-                  :key="index + 'x'"
739
-                  :label="option.GoodInfo.specification_name"
740
-                  :value="option.GoodInfo.id"
741
-                ></el-option>
742
-              </el-select>
743
-            </el-form-item>
744
-          </el-col>
736
+                <!--<el-option-->
737
+                  <!--v-for="(option, index) in tubingHemodialysis_info"-->
738
+                  <!--:key="index + 'x'"-->
739
+                  <!--:label="option.GoodInfo.specification_name"-->
740
+                  <!--:value="option.GoodInfo.id"-->
741
+                <!--&gt;</el-option>-->
742
+              <!--</el-select>-->
743
+            <!--</el-form-item>-->
744
+          <!--</el-col>-->
745 745
 
746
-          <el-col :span="8" v-if="isShows('护理包') && config.is_open == 1">
747
-            <el-form-item label="护理包:">
748
-              <el-select
749
-                v-model="dialysisPrescription.package"
750
-                placeholder="请选择"
751
-              >
752
-                <el-option :key="0" label="请选择" :value="0"></el-option>
746
+          <!--<el-col :span="8" v-if="isShows('护理包') && config.is_open == 1">-->
747
+            <!--<el-form-item label="护理包:">-->
748
+              <!--<el-select-->
749
+                <!--v-model="dialysisPrescription.package"-->
750
+                <!--placeholder="请选择"-->
751
+              <!--&gt;-->
752
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
753 753
 
754
-                <el-option
755
-                  v-for="(option, index) in safe_package_info"
756
-                  :key="index + 'z'"
757
-                  :label="option.GoodInfo.specification_name"
758
-                  :value="option.GoodInfo.id"
759
-                ></el-option>
760
-              </el-select>
761
-            </el-form-item>
762
-          </el-col>
754
+                <!--<el-option-->
755
+                  <!--v-for="(option, index) in safe_package_info"-->
756
+                  <!--:key="index + 'z'"-->
757
+                  <!--:label="option.GoodInfo.specification_name"-->
758
+                  <!--:value="option.GoodInfo.id"-->
759
+                <!--&gt;</el-option>-->
760
+              <!--</el-select>-->
761
+            <!--</el-form-item>-->
762
+          <!--</el-col>-->
763 763
 
764
-          <el-col :span="8" v-if="isShows('A液') && config.is_open == 1">
765
-            <el-form-item label="A液:">
766
-              <el-select
767
-                v-model="dialysisPrescription.a_liquid"
768
-                placeholder="请选择"
769
-              >
770
-                <el-option :key="0" label="请选择" :value="0"></el-option>
764
+          <!--<el-col :span="8" v-if="isShows('A液') && config.is_open == 1">-->
765
+            <!--<el-form-item label="A液:">-->
766
+              <!--<el-select-->
767
+                <!--v-model="dialysisPrescription.a_liquid"-->
768
+                <!--placeholder="请选择"-->
769
+              <!--&gt;-->
770
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
771 771
 
772
-                <el-option
773
-                  v-for="(option, index) in aliquid_info"
774
-                  :key="index + 'c'"
775
-                  :label="option.GoodInfo.specification_name"
776
-                  :value="option.GoodInfo.id"
777
-                ></el-option>
778
-              </el-select>
779
-            </el-form-item>
780
-          </el-col>
772
+                <!--<el-option-->
773
+                  <!--v-for="(option, index) in aliquid_info"-->
774
+                  <!--:key="index + 'c'"-->
775
+                  <!--:label="option.GoodInfo.specification_name"-->
776
+                  <!--:value="option.GoodInfo.id"-->
777
+                <!--&gt;</el-option>-->
778
+              <!--</el-select>-->
779
+            <!--</el-form-item>-->
780
+          <!--</el-col>-->
781 781
 
782 782
 
783 783
 
@@ -1369,8 +1369,8 @@
1369 1369
         }
1370 1370
       },
1371 1371
       setLastRecord: function(schedual,lastAssessmentAfterDislysis,lastPredialysisEvaluation,lastDialysisPrescribe,lastDryWeightDislysis,system_prescribe) {
1372
-        
1373
-       
1372
+
1373
+
1374 1374
         this.treatment_mode = this.$store.getters.treatment_mode
1375 1375
         console.log("99999",this.treatment_mode)
1376 1376
         this.perfusion_apparatus = getDataConfig(
@@ -1462,7 +1462,7 @@
1462 1462
             }
1463 1463
           }
1464 1464
         } else {
1465
-           
1465
+
1466 1466
           if (schedual.mode_id == 2 ||schedual.mode_id == 5 ||schedual.mode_id == 12) {
1467 1467
             this.zhiShow = true
1468 1468
             this.huShow = true
@@ -3025,7 +3025,7 @@
3025 3025
                       response.data.data.system_prescription[key]
3026 3026
                   }
3027 3027
                 }
3028
-                
3028
+
3029 3029
               } else {
3030 3030
                 for (const key in this.dialysisPrescription) {
3031 3031
                   // 临时处方为空
@@ -3641,7 +3641,7 @@
3641 3641
           }
3642 3642
         }
3643 3643
       },
3644
-    
3644
+
3645 3645
     }
3646 3646
   }
3647 3647
 </script>

+ 9 - 2
src/xt_pages/index/verify_token.vue View File

@@ -14,8 +14,15 @@ export default {
14 14
           // alert('token 验证成功')
15 15
           // console.log(this.$store.getters.xt_permission.addRouters)
16 16
           this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
17
-  //        next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
18
-          this.$router.replace({ path: '/dialysis/dialysisrecord' })
17
+  //          next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
18
+          if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
19
+            this.$router.replace({ path: '/dialysis/dialysisrecord' })
20
+
21
+          }else{
22
+            this.$router.replace({ path: '/home' })
23
+
24
+
25
+          }
19 26
 
20 27
         })
21 28
       })

+ 6 - 9
src/xt_pages/role/components/AdminRoleInfoForm.vue View File

@@ -10,19 +10,16 @@
10 10
         <el-input v-model="form.name" placeholder="用户姓名"></el-input>
11 11
       </el-form-item>
12 12
 
13
-      <el-form-item label="角色 : " prop="role" label-width="60px">
13
+      <!--<el-form-item label="角色 : " prop="role_ids" label-width="60px">-->
14 14
 
15
-           <el-checkbox-group v-model="form.role">
16
-            <el-checkbox label="子管理员" name="type"></el-checkbox>
17
-            <el-checkbox label="医生" name="type"></el-checkbox>
18
-            <el-checkbox label="护士" name="type"></el-checkbox>
19
-            <el-checkbox label="技师" name="type"></el-checkbox>
20
-            <el-checkbox label="运营" name="type"></el-checkbox>
21
-            <el-checkbox label="库存" name="type"></el-checkbox>
22
-            <el-checkbox label="院长" name="type"></el-checkbox>
15
+        <el-form-item label="角色 : " prop="role_ids">
16
+          <el-checkbox-group v-model="form.role_ids">
17
+            <el-checkbox v-for="( item,index) in roles" :key="index" :label="item.id" :value="item.id">{{item.name}}
18
+            </el-checkbox>
23 19
           </el-checkbox-group>
24 20
         </el-form-item>
25 21
 
22
+
26 23
       <el-form-item label="职称 : ">
27 24
         <el-select v-model="form.user_type" placeholder="用户类型">
28 25
           <el-option

+ 4 - 2
src/xt_pages/stock/cancelStockOrderAdd.vue View File

@@ -369,6 +369,8 @@ export default {
369 369
         manufacturer_id: this.form.manufacturer,
370 370
         dealer_id: this.form.dealer
371 371
       }
372
+      this.propForm.goods = []
373
+
372 374
       GetAllGoodInfoByID(params).then(response => {
373 375
           if (response.data.state == 0) {
374 376
             this.$message.error(response.data.msg)
@@ -384,7 +386,7 @@ export default {
384 386
             }
385 387
             this.$refs.dialog.show()
386 388
             for (let i = 0; i < response.data.data.goodInfo.length; i++) {
387
-              this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
389
+              this.propForm.goodType.push(response.data.data.goodInfo[i].type)
388 390
             }
389 391
             const obj = {}
390 392
             this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
@@ -400,7 +402,7 @@ export default {
400 402
             for (let a = 0; a < response.data.data.goodInfo.length; a++) {
401 403
               var respObj = response.data.data.goodInfo[a]
402 404
               respObj['isSelected'] = false
403
-              if (respObj.GoodsType.id == this.propForm.goodType[i].id) {
405
+              if (respObj.type.id == this.propForm.goodType[i].id) {
404 406
                 goodInfo.push(respObj)
405 407
               }
406 408
             }

+ 4 - 2
src/xt_pages/stock/cancelStockOrderEdit.vue View File

@@ -326,6 +326,8 @@
326 326
           manufacturer_id: this.form.manufacturer,
327 327
           dealer_id: this.form.dealer
328 328
         }
329
+        this.propForm.goods = []
330
+
329 331
         GetAllGoodInfoByID(params).then(response => {
330 332
             if (response.data.state == 0) {
331 333
               this.$message.error(response.data.msg)
@@ -341,7 +343,7 @@
341 343
               }
342 344
               this.$refs.dialog.show()
343 345
               for (let i = 0; i < response.data.data.goodInfo.length; i++) {
344
-                this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
346
+                this.propForm.goodType.push(response.data.data.goodInfo[i].type)
345 347
               }
346 348
               const obj = {}
347 349
               this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
@@ -357,7 +359,7 @@
357 359
               for (let a = 0; a < response.data.data.goodInfo.length; a++) {
358 360
                 var respObj = response.data.data.goodInfo[a]
359 361
                 respObj['isSelected'] = false
360
-                if (respObj.GoodsType.id == this.propForm.goodType[i].id) {
362
+                if (respObj.type.id == this.propForm.goodType[i].id) {
361 363
                   goodInfo.push(respObj)
362 364
                 }
363 365
               }

+ 2 - 4
src/xt_pages/stock/drugs/drugsStockDialog/index.vue View File

@@ -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
 

+ 4 - 2
src/xt_pages/stock/salesReturnEdit.vue View File

@@ -324,6 +324,8 @@
324 324
           manufacturer_id: this.form.manufacturer,
325 325
           dealer_id: this.form.dealer
326 326
         };
327
+        this.propForm.goods = []
328
+
327 329
         GetAllGoodInfoByID(params).then(response => {
328 330
           if (response.data.state == 0) {
329 331
             this.$message.error(response.data.msg);
@@ -336,7 +338,7 @@
336 338
             this.$refs.dialog.show();
337 339
             for (let i = 0; i < response.data.data.goodInfo.length; i++) {
338 340
               this.propForm.goodType.push(
339
-                response.data.data.goodInfo[i].GoodsType
341
+                response.data.data.goodInfo[i].type
340 342
               );
341 343
             }
342 344
             const obj = {};
@@ -356,7 +358,7 @@
356 358
             for (let a = 0; a < response.data.data.goodInfo.length; a++) {
357 359
               var respObj = response.data.data.goodInfo[a];
358 360
               respObj["isSelected"] = false;
359
-              if (respObj.GoodsType.id == this.propForm.goodType[i].id) {
361
+              if (respObj.type.id == this.propForm.goodType[i].id) {
360 362
                 goodInfo.push(respObj);
361 363
               }
362 364
             }

+ 4 - 2
src/xt_pages/stock/salesReturnOrderAdd.vue View File

@@ -306,6 +306,8 @@
306 306
           manufacturer_id: this.form.manufacturer,
307 307
           dealer_id: this.form.dealer
308 308
         }
309
+        this.propForm.goods = []
310
+
309 311
         GetAllGoodInfoByID(params).then(response => {
310 312
             if (response.data.state == 0) {
311 313
               this.$message.error(response.data.msg)
@@ -321,7 +323,7 @@
321 323
               }
322 324
               this.$refs.dialog.show()
323 325
               for (let i = 0; i < response.data.data.goodInfo.length; i++) {
324
-                this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
326
+                this.propForm.goodType.push(response.data.data.goodInfo[i].type)
325 327
               }
326 328
               const obj = {}
327 329
               this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
@@ -337,7 +339,7 @@
337 339
               for (let a = 0; a < response.data.data.goodInfo.length; a++) {
338 340
                 var respObj = response.data.data.goodInfo[a]
339 341
                 respObj['isSelected'] = false
340
-                if (respObj.GoodsType.id == this.propForm.goodType[i].id) {
342
+                if (respObj.type.id == this.propForm.goodType[i].id) {
341 343
                   goodInfo.push(respObj)
342 344
                 }
343 345
               }

+ 94 - 27
src/xt_pages/stock/selfPreparedMedicine/components/addMedicine.vue View File

@@ -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 View File

@@ -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>

+ 4 - 2
src/xt_pages/stock/stockInOrderAdd.vue View File

@@ -496,6 +496,8 @@
496 496
           manufacturer_id: this.form.manufacturer,
497 497
           dealer_id: this.form.dealer
498 498
         }
499
+        this.propForm.goods = []
500
+
499 501
         GetAllGoodInfoByID(params).then(response => {
500 502
             if (response.data.state == 0) {
501 503
               this.$message.error(response.data.msg)
@@ -511,7 +513,7 @@
511 513
               }
512 514
               this.$refs.dialog.show()
513 515
               for (let i = 0; i < response.data.data.goodInfo.length; i++) {
514
-                this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
516
+                this.propForm.goodType.push(response.data.data.goodInfo[i].type)
515 517
               }
516 518
               const obj = {}
517 519
               this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
@@ -527,7 +529,7 @@
527 529
               for (let a = 0; a < response.data.data.goodInfo.length; a++) {
528 530
                 var respObj = response.data.data.goodInfo[a]
529 531
                 respObj['isSelected'] = false
530
-                if (respObj.GoodsType.id == this.propForm.goodType[i].id) {
532
+                if (respObj.type.id == this.propForm.goodType[i].id) {
531 533
                   goodInfo.push(respObj)
532 534
                 }
533 535
               }

+ 4 - 2
src/xt_pages/stock/stockInOrderEdit.vue View File

@@ -505,6 +505,8 @@ export default {
505 505
         manufacturer_id: this.form.manufacturer,
506 506
         dealer_id: this.form.dealer
507 507
       };
508
+      this.propForm.goods = []
509
+
508 510
       GetAllGoodInfoByID(params).then(response => {
509 511
         if (response.data.state == 0) {
510 512
           this.$message.error(response.data.msg);
@@ -517,7 +519,7 @@ export default {
517 519
           this.$refs.dialog.show();
518 520
           for (let i = 0; i < response.data.data.goodInfo.length; i++) {
519 521
             this.propForm.goodType.push(
520
-              response.data.data.goodInfo[i].GoodsType
522
+              response.data.data.goodInfo[i].type
521 523
             );
522 524
           }
523 525
           const obj = {};
@@ -537,7 +539,7 @@ export default {
537 539
           for (let a = 0; a < response.data.data.goodInfo.length; a++) {
538 540
             var respObj = response.data.data.goodInfo[a];
539 541
             respObj["isSelected"] = false;
540
-            if (respObj.GoodsType.id == this.propForm.goodType[i].id) {
542
+            if (respObj.type.id == this.propForm.goodType[i].id) {
541 543
               goodInfo.push(respObj);
542 544
             }
543 545
           }

+ 3 - 2
src/xt_pages/stock/stockOutOrderAdd.vue View File

@@ -485,6 +485,7 @@ export default {
485 485
         manufacturer_id: this.form.manufacturer,
486 486
         dealer_id: this.form.dealer
487 487
       }
488
+      this.propForm.goods = []
488 489
       GetAllGoodInfoByID(params).then(response => {
489 490
           if (response.data.state == 0) {
490 491
             this.$message.error(response.data.msg)
@@ -500,7 +501,7 @@ export default {
500 501
             }
501 502
             this.$refs.dialog.show()
502 503
             for (let i = 0; i < response.data.data.goodInfo.length; i++) {
503
-              this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
504
+              this.propForm.goodType.push(response.data.data.goodInfo[i].type)
504 505
             }
505 506
             const obj = {}
506 507
             this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
@@ -516,7 +517,7 @@ export default {
516 517
             for (let a = 0; a < response.data.data.goodInfo.length; a++) {
517 518
               var respObj = response.data.data.goodInfo[a]
518 519
               respObj['isSelected'] = false
519
-              if (respObj.GoodsType.id == this.propForm.goodType[i].id) {
520
+              if (respObj.type.id == this.propForm.goodType[i].id) {
520 521
                 goodInfo.push(respObj)
521 522
               }
522 523
             }

+ 4 - 2
src/xt_pages/stock/stockOutOrderEdit.vue View File

@@ -369,6 +369,8 @@
369 369
           manufacturer_id: this.form.manufacturer,
370 370
           dealer_id: this.form.dealer
371 371
         };
372
+        this.propForm.goods = []
373
+
372 374
         GetAllGoodInfoByID(params).then(response => {
373 375
           if (response.data.state == 0) {
374 376
             this.$message.error(response.data.msg);
@@ -381,7 +383,7 @@
381 383
             this.$refs.dialog.show();
382 384
             for (let i = 0; i < response.data.data.goodInfo.length; i++) {
383 385
               this.propForm.goodType.push(
384
-                response.data.data.goodInfo[i].GoodsType
386
+                response.data.data.goodInfo[i].type
385 387
               );
386 388
             }
387 389
             const obj = {};
@@ -401,7 +403,7 @@
401 403
             for (let a = 0; a < response.data.data.goodInfo.length; a++) {
402 404
               var respObj = response.data.data.goodInfo[a];
403 405
               respObj["isSelected"] = false;
404
-              if (respObj.GoodsType.id == this.propForm.goodType[i].id) {
406
+              if (respObj.type.id == this.propForm.goodType[i].id) {
405 407
                 goodInfo.push(respObj);
406 408
               }
407 409
             }

+ 211 - 258
src/xt_pages/user/components/EditGroupAdvice.vue View File

@@ -202,6 +202,8 @@
202 202
       </el-form>
203 203
     </el-dialog>
204 204
 
205
+
206
+   <!-- 编辑选则医嘱模版 -->
205 207
     <el-dialog
206 208
       title="选择医嘱模板"
207 209
       :visible.sync="templateFormVisible"
@@ -331,6 +333,8 @@
331 333
         </el-button>
332 334
       </div>
333 335
     </el-dialog>
336
+
337
+
334 338
     <el-dialog
335 339
       title="选择医嘱模板"
336 340
       :visible.sync="oldTemplateFormVisible"
@@ -382,23 +386,16 @@
382 386
         <el-row>
383 387
           <el-col :span="10">
384 388
             <el-form-item label="医嘱内容 :" required prop="advice_name">
385
-              <el-select
389
+
390
+               <el-autocomplete
391
+                style="width:100%;"
392
+                class="inline-input"
386 393
                 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>
394
+                :fetch-suggestions="querySearch"
395
+                placeholder="请输入内容"
396
+                @select="handleSelect"
397
+                @input="changeDrugName"
398
+              ></el-autocomplete>
402 399
               
403 400
             </el-form-item>
404 401
           </el-col>
@@ -408,23 +405,14 @@
408 405
             <!--</el-form-item>-->
409 406
             <el-form-item label="药品规格 :" prop="advice_desc">
410 407
               <el-col :span="10">
411
-                 <el-select
408
+                <el-autocomplete
409
+                  style="width:100px;"
410
+                  class="inline-input"
412 411
                   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>
412
+                  :fetch-suggestions="querySearch1"
413
+                  placeholder="请输入内容"
414
+                  @input="changeDrugDesc"
415
+                ></el-autocomplete>
428 416
               </el-col>
429 417
               <el-col class="line" :span="2">&nbsp;</el-col>
430 418
               <el-col :span="10">
@@ -641,9 +629,10 @@ export default {
641 629
         index: 0,
642 630
         id: 0,
643 631
         children: [],
644
-        way:"",
645
-        drug_id:"",
646
-        src_type:""
632
+        way:0,
633
+        drug_id:0,
634
+        src_type:"",
635
+        drug_name_id:0
647 636
       },
648 637
 
649 638
       drugOptions: [],
@@ -856,7 +845,7 @@ export default {
856 845
         .catch(() => {});
857 846
     },
858 847
     submitNameForm(formName) {
859
-     
848
+       console.log("888888",this.nameForm)
860 849
       if(this.src_type == ""){
861 850
           this.nameForm.way = 0
862 851
           this.nameForm.drug_id = 0
@@ -866,40 +855,14 @@ export default {
866 855
           var arr = this.nameForm.advice_name.split("(自备药)")
867 856
           this.nameForm.advice_name = arr[0]
868 857
        }
869
-
870
-      //  if(typeof(this.nameForm.advice_name) == "string"){
871
-         
872
-      //     this.nameForm.advice_name == this.nameForm.advice_name
873
-      // }
874
-
875
-      // if(typeof(this.nameForm.advice_name) == "number"){
876
-      //     var drug_name = ""
877
-      //     var name = ""
878
-      //     var way = 0
879
-      //     this.nameForm.drug_id = this.nameForm.advice_name
880
-      //     for(let i=0;i<this.medicals.length;i++){
881
-      //       if(this.nameForm.advice_name == this.medicals[i].id){
882
-      //         name = this.medicals[i].drug_name
883
-      //         way  = this.medicals[i].way
884
-      //       }
885
-      //     }
886
-      //     if(way == 1){
887
-      //       drug_name = name
888
-      //     }
889
-      //     if(way == 2){
890
-      //       var arr = name.split("(自备药)")
891
-      //       drug_name = arr[0]
892
-      //     }
893
-          
894
-      //     this.nameForm.advice_name = drug_name
895
-      //     this.nameForm.way = way
896
-      // }
858
+      console.log("新增医嘱内容")
897 859
       var _this = this;
898 860
       this.$refs[formName].validate(valid => {
899 861
         if (valid) {
900 862
           if (_this.nameForm.isEdit) {
901 863
             var submitForm = null;
902 864
             if (!this.isChild) {
865
+              console.log("进来了吗")
903 866
               submitForm = {
904 867
                 advice_type: _this.groupForm.advice_type,
905 868
                 advice_date: _this.groupForm.advice_date,
@@ -914,6 +877,9 @@ export default {
914 877
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
915 878
                 delivery_way: _this.nameForm.delivery_way,
916 879
                 execution_frequency: _this.nameForm.execution_frequency,
880
+                way:_this.nameForm.way,
881
+                drug_name_id:_this.nameForm.drug_name_id,
882
+                drug_id:_this.nameForm.drug_id,
917 883
                 isEdit: 0,
918 884
                 id: 0,
919 885
                 advice_doctor: "",
@@ -943,6 +909,9 @@ export default {
943 909
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
944 910
                 delivery_way: _this.nameForm.delivery_way,
945 911
                 execution_frequency: _this.nameForm.execution_frequency,
912
+                way:_this.nameForm.way,
913
+                drug_name_id:_this.nameForm.drug_name_id,
914
+                drug_id:_this.nameForm.drug_id,
946 915
                 isEdit: 0,
947 916
                 id: 0,
948 917
                 advice_doctor: "",
@@ -951,13 +920,14 @@ export default {
951 920
                 groupno: _this.groupForm.groupno,
952 921
                 frequency_type: 0,
953 922
                 day_count: "0",
954
-                week_days: ""
923
+                week_days: "",
924
+              
955 925
               };
956 926
             }
957 927
             let mode = "";
958 928
 
959 929
             if (_this.groupForm.advice_type == 1) {
960
-              // if(_this.nameForm.)
930
+            
961 931
               mode = "1-3";
962 932
               if (
963 933
                 _this.groupForm.doctor != _this.$store.getters.xt_user.user.id
@@ -972,7 +942,7 @@ export default {
972 942
                 mode = "3-1";
973 943
               }
974 944
             }
975
-
945
+            console.log("编辑",submitForm)
976 946
             EditNewDoctorAdvice(
977 947
               this.patientID,
978 948
               this.groupSelectRow.id,
@@ -998,31 +968,22 @@ export default {
998 968
                   ) {
999 969
                     var advice = response.data.data.advice;
1000 970
                     _this.adviceTableData[index].drug_spec = advice.drug_spec;
1001
-                    _this.adviceTableData[index].drug_spec_unit =
1002
-                      advice.drug_spec_unit;
971
+                    _this.adviceTableData[index].drug_spec_unit = advice.drug_spec_unit;
1003 972
                     _this.adviceTableData[index].start_time = advice.start_time;
1004
-                    _this.adviceTableData[index].advice_name =
1005
-                      advice.advice_name;
1006
-                    _this.adviceTableData[index].advice_desc =
1007
-                      advice.advice_desc;
1008
-                    _this.adviceTableData[index].single_dose =
1009
-                      advice.single_dose;
1010
-                    _this.adviceTableData[index].single_dose_unit =
1011
-                      advice.single_dose_unit;
1012
-                    _this.adviceTableData[index].delivery_way =
1013
-                      advice.delivery_way;
1014
-                    _this.adviceTableData[index].execution_frequency =
1015
-                      advice.execution_frequency;
1016
-                    _this.adviceTableData[index].prescribing_number =
1017
-                      advice.prescribing_number;
1018
-                    _this.adviceTableData[index].prescribing_number_unit =
1019
-                      advice.prescribing_number_unit;
1020
-
1021
-                    _this.adviceTableData[index].frequency_type =
1022
-                      advice.frequency_type;
973
+                    _this.adviceTableData[index].advice_name =advice.advice_name;
974
+                    _this.adviceTableData[index].advice_desc = advice.advice_desc;
975
+                    _this.adviceTableData[index].single_dose = advice.single_dose;
976
+                    _this.adviceTableData[index].single_dose_unit = advice.single_dose_unit;
977
+                    _this.adviceTableData[index].delivery_way = advice.delivery_way;
978
+                    _this.adviceTableData[index].execution_frequency = advice.execution_frequency;
979
+                    _this.adviceTableData[index].prescribing_number = advice.prescribing_number;
980
+                    _this.adviceTableData[index].prescribing_number_unit = advice.prescribing_number_unit;
981
+                    _this.adviceTableData[index].frequency_type = advice.frequency_type;
1023 982
                     _this.adviceTableData[index].day_count = advice.day_count;
1024 983
                     _this.adviceTableData[index].week_day = advice.week_day;
1025
-
984
+                    _this.adviceTableData[index].way = advice.way,
985
+                    _this.adviceTableData[index].drug_id = advice.drug_id,
986
+                    _this.adviceTableData[index].drug_name_id = advice.drug_name_id
1026 987
                     break;
1027 988
                   }
1028 989
                 }
@@ -1038,42 +999,21 @@ export default {
1038 999
                       var children =
1039 1000
                         _this.groupForm.adviceNames[index].children;
1040 1001
                       for (let j = 0; j < ale; j++) {
1041
-                        if (
1042
-                          _this.groupSelectRow.row_key == children[j].row_key
1043
-                        ) {
1044
-                          _this.groupForm.adviceNames[index].children[
1045
-                            j
1046
-                          ].advice_name = _this.nameForm.advice_name;
1047
-                          _this.groupForm.adviceNames[index].children[
1048
-                            j
1049
-                          ].advice_desc = _this.nameForm.advice_desc;
1050
-                          _this.groupForm.adviceNames[index].children[
1051
-                            j
1052
-                          ].single_dose = "" + _this.nameForm.single_dose;
1053
-                          _this.groupForm.adviceNames[index].children[
1054
-                            j
1055
-                          ].single_dose_unit = _this.nameForm.single_dose_unit;
1056
-                          _this.groupForm.adviceNames[index].children[
1057
-                            j
1058
-                          ].drug_spec = "" + _this.nameForm.drug_spec;
1059
-                          _this.groupForm.adviceNames[index].children[
1060
-                            j
1061
-                          ].drug_spec_unit = _this.nameForm.drug_spec_unit;
1062
-                          _this.groupForm.adviceNames[index].children[
1063
-                            j
1064
-                          ].prescribing_number =
1065
-                            "" + _this.nameForm.prescribing_number;
1066
-                          _this.groupForm.adviceNames[index].children[
1067
-                            j
1068
-                          ].prescribing_number_unit =
1069
-                            _this.nameForm.prescribing_number_unit;
1070
-                          _this.groupForm.adviceNames[index].children[
1071
-                            j
1072
-                          ].delivery_way = _this.nameForm.delivery_way;
1073
-                          _this.groupForm.adviceNames[index].children[
1074
-                            j
1075
-                          ].execution_frequency =
1076
-                            _this.nameForm.execution_frequency;
1002
+                        if (_this.groupSelectRow.row_key == children[j].row_key) {
1003
+                          _this.groupForm.adviceNames[index].children[j].advice_name = _this.nameForm.advice_name;
1004
+                          _this.groupForm.adviceNames[index].children[j].advice_desc = _this.nameForm.advice_desc;
1005
+                          _this.groupForm.adviceNames[index].children[j].single_dose = "" + _this.nameForm.single_dose;
1006
+                          _this.groupForm.adviceNames[index].children[j].single_dose_unit = _this.nameForm.single_dose_unit;
1007
+                          _this.groupForm.adviceNames[index].children[j].drug_spec = "" + _this.nameForm.drug_spec;
1008
+                          _this.groupForm.adviceNames[index].children[j].drug_spec_unit = _this.nameForm.drug_spec_unit;
1009
+                          _this.groupForm.adviceNames[index].children[j].prescribing_number ="" + _this.nameForm.prescribing_number;
1010
+                          _this.groupForm.adviceNames[index].children[j].prescribing_number_unit =
1011
+                          _this.nameForm.prescribing_number_unit;
1012
+                          _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way;
1013
+                          _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
1014
+                          _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way
1015
+                          _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id
1016
+                          _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id
1077 1017
                           _this.$set(
1078 1018
                             _this.groupForm.adviceNames[index].children,
1079 1019
                             j,
@@ -1086,40 +1026,23 @@ export default {
1086 1026
                   }
1087 1027
                 } else {
1088 1028
                   for (let index = 0; index < ale; index++) {
1089
-                    if (
1090
-                      _this.groupSelectRow.row_key ==
1091
-                      _this.groupForm.adviceNames[index].row_key
1092
-                    ) {
1093
-                      _this.groupForm.adviceNames[index].advice_name =
1094
-                        _this.nameForm.advice_name;
1095
-                      _this.groupForm.adviceNames[index].advice_desc =
1096
-                        "" + _this.nameForm.advice_desc;
1097
-                      _this.groupForm.adviceNames[index].single_dose =
1098
-                        "" + _this.nameForm.single_dose;
1099
-                      _this.groupForm.adviceNames[index].single_dose_unit =
1100
-                        _this.nameForm.single_dose_unit;
1101
-                      _this.groupForm.adviceNames[index].drug_spec =
1102
-                        "" + _this.nameForm.drug_spec;
1103
-                      _this.groupForm.adviceNames[index].drug_spec_unit =
1104
-                        _this.nameForm.drug_spec_unit;
1105
-                      _this.groupForm.adviceNames[index].prescribing_number =
1106
-                        "" + _this.nameForm.prescribing_number;
1107
-                      _this.groupForm.adviceNames[
1108
-                        index
1109
-                      ].prescribing_number_unit =
1110
-                        _this.nameForm.prescribing_number_unit;
1111
-                      _this.groupForm.adviceNames[index].delivery_way =
1112
-                        _this.nameForm.delivery_way;
1113
-                      _this.groupForm.adviceNames[index].execution_frequency =
1114
-                        _this.nameForm.execution_frequency;
1115
-
1116
-                      _this.groupForm.adviceNames[index].frequency_type =
1117
-                        _this.nameForm.frequency_type;
1118
-                      _this.groupForm.adviceNames[index].day_count =
1119
-                        _this.nameForm.day_count;
1120
-                      _this.groupForm.adviceNames[
1121
-                        index
1122
-                      ].week_day = _this.weeks.join(",");
1029
+                    if ( _this.groupSelectRow.row_key ==_this.groupForm.adviceNames[index].row_key) {
1030
+                      _this.groupForm.adviceNames[index].advice_name =_this.nameForm.advice_name;
1031
+                      _this.groupForm.adviceNames[index].advice_desc = "" + _this.nameForm.advice_desc;
1032
+                      _this.groupForm.adviceNames[index].single_dose ="" + _this.nameForm.single_dose;
1033
+                      _this.groupForm.adviceNames[index].single_dose_unit =_this.nameForm.single_dose_unit;
1034
+                      _this.groupForm.adviceNames[index].drug_spec ="" + _this.nameForm.drug_spec;
1035
+                      _this.groupForm.adviceNames[index].drug_spec_unit =_this.nameForm.drug_spec_unit;
1036
+                      _this.groupForm.adviceNames[index].prescribing_number ="" + _this.nameForm.prescribing_number;
1037
+                      _this.groupForm.adviceNames[index].prescribing_number_unit =_this.nameForm.prescribing_number_unit;
1038
+                      _this.groupForm.adviceNames[index].delivery_way =_this.nameForm.delivery_way;
1039
+                      _this.groupForm.adviceNames[index].execution_frequency =_this.nameForm.execution_frequency;
1040
+                      _this.groupForm.adviceNames[index].frequency_type =_this.nameForm.frequency_type;
1041
+                      _this.groupForm.adviceNames[index].drug_name_id = _this.nameForm.drug_name_id
1042
+                      _this.groupForm.adviceNames[index].drug_id = _this.nameForm.drug_id
1043
+                      _this.groupForm.adviceNames[index].way = _this.nameForm.way
1044
+                      _this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count;
1045
+                      _this.groupForm.adviceNames[index].week_day = _this.weeks.join(",");
1123 1046
                       console.log(_this.weeks);
1124 1047
                       _this.$set(
1125 1048
                         _this.groupForm.adviceNames,
@@ -1149,12 +1072,16 @@ export default {
1149 1072
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
1150 1073
                 delivery_way: _this.nameForm.delivery_way,
1151 1074
                 execution_frequency: _this.nameForm.execution_frequency,
1075
+                way:_this.nameForm.way,
1076
+                drug_id:_this.nameForm.drug_id,
1077
+                drug_name_id:_this.nameForm.drug_name_id,
1152 1078
                 isEdit: 0,
1153 1079
                 id: 0,
1154 1080
                 advice_doctor: "",
1155 1081
                 remark: _this.groupForm.remark,
1156 1082
                 parent_id: _this.groupSelectRow.id,
1157
-                groupno: _this.groupForm.groupno
1083
+                groupno: _this.groupForm.groupno,
1084
+               
1158 1085
               };
1159 1086
 
1160 1087
               let mode = "";
@@ -1163,7 +1090,7 @@ export default {
1163 1090
               } else {
1164 1091
                 mode = "1-1";
1165 1092
               }
1166
-
1093
+              console.log("submitFort",submitForm)
1167 1094
               CreateNewDoctorAdvice(this.patientID, submitForm, mode).then(
1168 1095
                 response => {
1169 1096
                   if (response.data.state == 0) {
@@ -1257,17 +1184,16 @@ export default {
1257 1184
                     drug_spec: "" + _this.nameForm.drug_spec,
1258 1185
                     drug_spec_unit: _this.nameForm.drug_spec_unit,
1259 1186
                     prescribing_number: "" + _this.nameForm.prescribing_number,
1260
-                    prescribing_number_unit:
1261
-                      _this.nameForm.prescribing_number_unit,
1187
+                    prescribing_number_unit: _this.nameForm.prescribing_number_unit,
1262 1188
                     delivery_way: _this.nameForm.delivery_way,
1263 1189
                     execution_frequency: _this.nameForm.execution_frequency,
1264
-                    template_id:
1265
-                      "D" + new Date().getTime() + this.getRandValue(),
1266
-
1190
+                    template_id:"D" + new Date().getTime() + this.getRandValue(),
1267 1191
                     frequency_type: _this.nameForm.frequency_type,
1268 1192
                     day_count: _this.nameForm.day_count.toString(),
1269 1193
                     week_days: _this.nameForm.week_days,
1270
-
1194
+                    drug_id:_this.nameForm.drug_id,
1195
+                    way:_this.nameForm.way,
1196
+                    drug_name_id:_this.nameForm.drug_name_id,
1271 1197
                     isEdit: 0,
1272 1198
                     id: 0,
1273 1199
                     children: [],
@@ -1286,13 +1212,9 @@ export default {
1286 1212
               } else {
1287 1213
                 mode = "1-1";
1288 1214
               }
1215
+              console.log("触发了吗",_this.patientID,_this.submitGroupForm)
1216
+              CreateNewGroupAdvice(_this.patientID, _this.groupForm.groupno,_this.submitGroupForm, mode).then(response => {
1289 1217
 
1290
-              CreateNewGroupAdvice(
1291
-                _this.patientID,
1292
-                _this.groupForm.groupno,
1293
-                _this.submitGroupForm,
1294
-                mode
1295
-              ).then(response => {
1296 1218
                 if (response.data.state == 0) {
1297 1219
                   _this.$message.error(response.data.msg);
1298 1220
                   return false;
@@ -1377,7 +1299,9 @@ export default {
1377 1299
                         frequency_type: groups[index].frequency_type,
1378 1300
                         day_count: groups[index].day_count,
1379 1301
                         week_day: groups[index].week_day,
1380
-
1302
+                        drug_name_id:0,
1303
+                        way:0,
1304
+                        drug_id:0,
1381 1305
                         isEdit: 0,
1382 1306
                         index: 0,
1383 1307
                         id: groups[index].id,
@@ -1507,7 +1431,10 @@ export default {
1507 1431
 
1508 1432
           day_count: this.groupSelectRow.day_count,
1509 1433
           week_days: this.groupSelectRow.week_day,
1510
-          frequency_type: this.groupSelectRow.frequency_type
1434
+          frequency_type: this.groupSelectRow.frequency_type,
1435
+          drug_id:0,
1436
+          drug_name_id:0,
1437
+          way:0,
1511 1438
         };
1512 1439
 
1513 1440
         if (!this.isChild) {
@@ -1528,6 +1455,9 @@ export default {
1528 1455
           delivery_way: "",
1529 1456
           execution_frequency: "",
1530 1457
           template_id: "",
1458
+          way:0,
1459
+          drug_id:0,
1460
+          drug_name_id:0,
1531 1461
           isEdit: 0,
1532 1462
           index: 0,
1533 1463
           id: 0,
@@ -1733,7 +1663,10 @@ export default {
1733 1663
         }
1734 1664
       }
1735 1665
     },
1666
+
1667
+
1736 1668
     newAddTempForm() {
1669
+      console.log("9999888")
1737 1670
       this.allSelectedTemplate = [];
1738 1671
       var thisRowKey = 0;
1739 1672
       for (const indexs in this.adviceTemplateMaps) {
@@ -1742,36 +1675,25 @@ export default {
1742 1675
           if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
1743 1676
             thisRowKey++;
1744 1677
             var item = {
1745
-              advice_name:
1746
-                adviceTemplate.DoctorAdviceTemplate[index].advice_name,
1747
-              advice_desc:
1748
-                adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
1749
-              single_dose:
1750
-                "" + adviceTemplate.DoctorAdviceTemplate[index].single_dose,
1751
-              single_dose_unit:
1752
-                adviceTemplate.DoctorAdviceTemplate[index].single_dose_unit,
1753
-              drug_spec:
1754
-                "" + adviceTemplate.DoctorAdviceTemplate[index].drug_spec,
1755
-              drug_spec_unit:
1756
-                adviceTemplate.DoctorAdviceTemplate[index].drug_spec_unit,
1757
-              prescribing_number:
1758
-                "" +
1759
-                adviceTemplate.DoctorAdviceTemplate[index].prescribing_number,
1760
-              prescribing_number_unit:
1761
-                adviceTemplate.DoctorAdviceTemplate[index]
1762
-                  .prescribing_number_unit,
1763
-              delivery_way:
1764
-                adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
1765
-              execution_frequency:
1766
-                adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
1678
+              advice_name:adviceTemplate.DoctorAdviceTemplate[index].advice_name,
1679
+              advice_desc:adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
1680
+              single_dose:"" + adviceTemplate.DoctorAdviceTemplate[index].single_dose,
1681
+              single_dose_unit:adviceTemplate.DoctorAdviceTemplate[index].single_dose_unit,
1682
+              drug_spec:"" + adviceTemplate.DoctorAdviceTemplate[index].drug_spec,
1683
+              drug_spec_unit:adviceTemplate.DoctorAdviceTemplate[index].drug_spec_unit,
1684
+              prescribing_number:"" +adviceTemplate.DoctorAdviceTemplate[index].prescribing_number,
1685
+              prescribing_number_unit:adviceTemplate.DoctorAdviceTemplate[index].prescribing_number_unit,
1686
+              delivery_way:adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
1687
+              execution_frequency:adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
1767 1688
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1768 1689
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1769 1690
               day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
1770
-              frequency_type:
1771
-                adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
1691
+              frequency_type:adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
1772 1692
               week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
1773 1693
               template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
1774
-
1694
+              way:adviceTemplate.DoctorAdviceTemplate[index].way,
1695
+              drug_id:adviceTemplate.DoctorAdviceTemplate[index].drug_id,
1696
+              drug_name_id:adviceTemplate.DoctorAdviceTemplate[index].drug_name_id,
1775 1697
               isEdit: 0,
1776 1698
               id: 0,
1777 1699
               children: [],
@@ -1800,6 +1722,9 @@ export default {
1800 1722
                     children[key].prescribing_number_unit,
1801 1723
                   delivery_way: children[key].delivery_way,
1802 1724
                   execution_frequency: children[key].execution_frequency,
1725
+                  way:children[key].way,
1726
+                  drug_id:children[key].drug_id,
1727
+                  drug_name_id:children[key].drug_name_id,
1803 1728
                   isEdit: 0,
1804 1729
                   id: 0,
1805 1730
                   children: [],
@@ -1851,19 +1776,17 @@ export default {
1851 1776
           single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
1852 1777
           drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
1853 1778
           drug_spec_unit: this.allSelectedTemplate[index].drug_spec_unit,
1854
-          prescribing_number:
1855
-            "" + this.allSelectedTemplate[index].prescribing_number,
1856
-          prescribing_number_unit: this.allSelectedTemplate[index]
1857
-            .prescribing_number_unit,
1779
+          prescribing_number:"" + this.allSelectedTemplate[index].prescribing_number,
1780
+          prescribing_number_unit: this.allSelectedTemplate[index].prescribing_number_unit,
1858 1781
           delivery_way: this.allSelectedTemplate[index].delivery_way,
1859
-          execution_frequency: this.allSelectedTemplate[index]
1860
-            .execution_frequency,
1861
-
1782
+          execution_frequency: this.allSelectedTemplate[index].execution_frequency,
1862 1783
           day_count: this.allSelectedTemplate[index].day_count.toString(),
1863 1784
           frequency_type: this.allSelectedTemplate[index].frequency_type,
1864 1785
           week_days: this.allSelectedTemplate[index].week_days,
1865 1786
           template_id: this.allSelectedTemplate[index].template_id,
1866
-
1787
+          way:this.allSelectedTemplate[index].way,
1788
+          drug_id:this.allSelectedTemplate[index].drug_id,
1789
+          drug_name_id:this.allSelectedTemplate[index].drug_name_id,
1867 1790
           isEdit: 0,
1868 1791
           id: 0,
1869 1792
           children: [],
@@ -1887,6 +1810,9 @@ export default {
1887 1810
                 prescribing_number_unit: children[key].prescribing_number_unit,
1888 1811
                 delivery_way: children[key].delivery_way,
1889 1812
                 execution_frequency: children[key].execution_frequency,
1813
+                way:children[key].way,
1814
+                drug_id:children[key].drug_id,
1815
+                drug_name_id:children[key].drug_name_id,
1890 1816
                 isEdit: 0,
1891 1817
                 id: 0,
1892 1818
                 children: [],
@@ -1987,7 +1913,9 @@ export default {
1987 1913
               frequency_type: groups[index].frequency_type,
1988 1914
               week_day: groups[index].week_day,
1989 1915
               template_id: groups[index].template_id,
1990
-
1916
+              way:groups[index].way,
1917
+              drug_id:groups[index].drug_id,
1918
+              drug_name_id:groups[index].drug_name_id,
1991 1919
               isEdit: 0,
1992 1920
               index: 0,
1993 1921
               id: groups[index].id,
@@ -2015,6 +1943,9 @@ export default {
2015 1943
                   isEdit: 0,
2016 1944
                   index: 0,
2017 1945
                   id: childMap[item.id][key].id,
1946
+                  drug_id:childMap[item.id][key].drug_id,
1947
+                  way:childMap[item.id][key].way,
1948
+                  drug_name_id:childMap[item.id][key].drug_name_id,
2018 1949
                   children: [],
2019 1950
                   parent_row: item.row_key,
2020 1951
                   row_key: this.editRowKey
@@ -2051,39 +1982,19 @@ export default {
2051 1982
               .DoctorAdviceTemplate) {
2052 1983
               _this.editRowKey++;
2053 1984
               var item = {
2054
-                advice_name:
2055
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2056
-                    .advice_name,
2057
-                advice_desc:
2058
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2059
-                    .advice_desc,
2060
-                single_dose:
2061
-                  "" +
2062
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2063
-                    .single_dose,
2064
-                single_dose_unit:
2065
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2066
-                    .single_dose_unit,
2067
-                drug_spec:
2068
-                  "" +
2069
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2070
-                    .drug_spec,
2071
-                drug_spec_unit:
2072
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2073
-                    .drug_spec_unit,
2074
-                prescribing_number:
2075
-                  "" +
2076
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2077
-                    .prescribing_number,
2078
-                prescribing_number_unit:
2079
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2080
-                    .prescribing_number_unit,
2081
-                delivery_way:
2082
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2083
-                    .delivery_way,
2084
-                execution_frequency:
2085
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2086
-                    .execution_frequency,
1985
+                advice_name:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_name,
1986
+                advice_desc:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_desc,
1987
+                single_dose:"" +_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].single_dose,
1988
+                single_dose_unit:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].single_dose_unit,
1989
+                drug_spec:"" +_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_spec,
1990
+                drug_spec_unit:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_spec_unit,
1991
+                prescribing_number:"" +_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].prescribing_number,
1992
+                prescribing_number_unit:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].prescribing_number_unit,
1993
+                delivery_way:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].delivery_way,
1994
+                execution_frequency:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].execution_frequency,
1995
+                way:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].way,
1996
+                drug_id:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_id,
1997
+                drug_name_id:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_name_id,
2087 1998
                 isEdit: 0,
2088 1999
                 id: 0,
2089 2000
                 children: [],
@@ -2110,10 +2021,12 @@ export default {
2110 2021
                     drug_spec: "" + children[key].drug_spec,
2111 2022
                     drug_spec_unit: children[key].drug_spec_unit,
2112 2023
                     prescribing_number: "" + children[key].prescribing_number,
2113
-                    prescribing_number_unit:
2114
-                      children[key].prescribing_number_unit,
2024
+                    prescribing_number_unit:children[key].prescribing_number_unit,
2115 2025
                     delivery_way: children[key].delivery_way,
2116 2026
                     execution_frequency: children[key].execution_frequency,
2027
+                    way:children[key].way,
2028
+                    drug_id:children[key].drug_id,
2029
+                    drug_name_id:children[key].drug_name_id,
2117 2030
                     isEdit: 0,
2118 2031
                     id: 0,
2119 2032
                     children: [],
@@ -2338,18 +2251,13 @@ export default {
2338 2251
       }
2339 2252
     },
2340 2253
     getAdviceConfig(type) {
2254
+       console.log("type",type)
2341 2255
       getAdviceConfig(type).then(response => {
2342 2256
         if (response.data.state == 1) {
2343
-          this.deliveryWayOptions =
2344
-            response.data.data.drugways === null
2345
-              ? []
2346
-              : response.data.data.drugways;
2347
-          this.executionFrequencyOptions =
2348
-            response.data.data.efs === null ? [] : response.data.data.efs;
2349
-          this.adviceTemplates =
2350
-            response.data.data.advice_templates === null
2351
-              ? []
2352
-              : response.data.data.advice_templates;
2257
+          this.deliveryWayOptions =response.data.data.drugways === null? []: response.data.data.drugways;
2258
+          console.log("给药途径",this.deliveryWayOptions)
2259
+          this.executionFrequencyOptions = response.data.data.efs === null ? [] : response.data.data.efs;
2260
+          this.adviceTemplates = response.data.data.advice_templates === null? []: response.data.data.advice_templates;
2353 2261
 
2354 2262
           var templateLen = this.adviceTemplates.length;
2355 2263
           for (let index = 0; index < templateLen; index++) {
@@ -2357,8 +2265,7 @@ export default {
2357 2265
               continue;
2358 2266
             }
2359 2267
 
2360
-            var DoctorAdviceTemplate = this.adviceTemplates[index]
2361
-              .DoctorAdviceTemplate;
2268
+            var DoctorAdviceTemplate = this.adviceTemplates[index].DoctorAdviceTemplate;
2362 2269
             for (let i = 0; i < DoctorAdviceTemplate.length; i++) {
2363 2270
               DoctorAdviceTemplate[i].selection = false;
2364 2271
             }
@@ -2489,7 +2396,7 @@ export default {
2489 2396
                 obj.custom_id = this.rand(10000000, 99999999)
2490 2397
                 obj.drug_specs = base_drug_list[i].drug_specs
2491 2398
                 this.all_drug.push(obj)
2492
-                console.log("中2222222222222222222",this.all_drug)
2399
+                
2493 2400
               }
2494 2401
             }   
2495 2402
         })
@@ -2518,9 +2425,55 @@ export default {
2518 2425
             this.src_type = this.drugSpec[i].type
2519 2426
             this.nameForm.drug_id = this.drugSpec[i].id
2520 2427
             this.nameForm.way = this.drugSpec[i].type
2428
+            this.nameForm.single_dose_unit = this.drugSpec[i].min_unit
2429
+            this.nameForm.prescribing_number_unit = this.drugSpec[i].min_unit
2430
+            this.nameForm.drug_spec_unit = this.drugSpec[i].min_unit
2431
+
2432
+            if(this.drugSpec[i].drug_name_id){
2433
+               this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
2434
+            }else{
2435
+              this.nameForm.drug_name_id = 0
2436
+            }
2521 2437
           }
2522 2438
         }
2523
-      }
2439
+      },
2440
+      handleSelect1(){
2441
+        
2442
+      },
2443
+      handleSelect(){
2444
+
2445
+      },
2446
+
2447
+       querySearch(queryString, cb) {
2448
+        console.log('queryString',queryString)
2449
+        var restaurants = this.all_drug;
2450
+        restaurants.map(item => {
2451
+          item.value = item.drug_name
2452
+        })
2453
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2454
+        // 调用 callback 返回建议列表的数据
2455
+       
2456
+        cb(results);
2457
+     },
2458
+
2459
+     createFilter(queryString) {
2460
+        return (restaurant) => {
2461
+          return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
2462
+        };
2463
+     },
2464
+
2465
+     querySearch1(queryString, cb) {
2466
+      
2467
+        var restaurants = this.drugSpec;
2468
+         console.log(restaurants)
2469
+        restaurants.map(item => {
2470
+          item.value = item.drug_spec
2471
+        })
2472
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
2473
+        // 调用 callback 返回建议列表的数据
2474
+       
2475
+        cb(results);
2476
+      },
2524 2477
   },
2525 2478
   watch: {
2526 2479
     rowKey: function() {

+ 164 - 68
src/xt_pages/user/doctorAdvice.vue View File

@@ -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,7 +2228,18 @@ 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
+          }
2237 2236
 
2237
+          if(this.src_type == 2){ //自备药
2238
+              var arr = this.adviceForm.advice_name.split("(自备药)")
2239
+              this.adviceForm.advice_name = arr[0]
2240
+          }
2241
+
2242
+       
2238 2243
           EditNewDoctorAdvice(
2239 2244
             this.patientID,
2240 2245
             this.adviceForm.id,
@@ -2301,9 +2306,7 @@ export default {
2301 2306
             remark: this.groupForm.remark,
2302 2307
             parent_id: this.groupForm.parent_id,
2303 2308
           };
2304
-          console.log("22222",submitForm)
2305
-          console.log("33333",this.private_drug_config.drug_start)
2306
-          console.log("44444",this.medicals)
2309
+        
2307 2310
          
2308 2311
           var adviceNames = [];
2309 2312
           for (const index in this.groupForm.adviceNames) {
@@ -2316,19 +2319,16 @@ export default {
2316 2319
           }
2317 2320
           submitForm.adviceNames = adviceNames;
2318 2321
 
2319
-
2320
-         
2321
-
2322 2322
           let mode = "";
2323 2323
           if (this.groupForm.advice_type == 1) {
2324 2324
             mode = "1-2";
2325 2325
           } else if (this.groupForm.advice_type == 3) {
2326 2326
             mode = "1-1";
2327 2327
           }
2328
-        console.log("22222222",this.medicals)
2329
-        console.log("3333333",submitForm)
2330
-      
2331
-        if(this.private_drug_config.drug_start == 1){
2328
+        console.log("长期医嘱2222",this.medicals)
2329
+        console.log("长期医嘱3333",submitForm)
2330
+       
2331
+        if(this.private_drug_config != null&&this.private_drug_config.drug_start == 1){
2332 2332
               for(let index=0;index<submitForm.adviceNames.length;index++){
2333 2333
                   for(let i=0;i<this.medicals.length;i++){
2334 2334
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
@@ -2421,7 +2421,18 @@ export default {
2421 2421
             //临时
2422 2422
             mode = "1-1";
2423 2423
           }
2424
+          if(this.src_type == ""){
2425
+              this.adviceForm.way = 0
2426
+              this.adviceForm.drug_id = 0
2427
+              this.adviceForm.drug_name_id = 0
2428
+          }
2424 2429
 
2430
+          if(this.src_type == 2){ //自备药
2431
+              var arr = this.adviceForm.advice_name.split("(自备药)")
2432
+              this.adviceForm.advice_name = arr[0]
2433
+          }
2434
+          console.log("222222",this.adviceForm)
2435
+         
2425 2436
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2426 2437
             response => {
2427 2438
               if (response.data.state == 0) {
@@ -2688,8 +2699,8 @@ export default {
2688 2699
           id: 0,
2689 2700
           children: [],
2690 2701
           parent_row: 0,
2691
-          way:"",
2692
-          drug_id:'',
2702
+          way:0,
2703
+          drug_id:0,
2693 2704
           drug_name_id:0,
2694 2705
         };
2695 2706
         this.nameFormTitle = "新增医嘱内容";
@@ -2958,8 +2969,15 @@ export default {
2958 2969
     },
2959 2970
     openConfig() {},
2960 2971
     openEditGroupAdvice(groupno) {
2972
+      console.log("groupno",groupno)
2961 2973
       var groups = [];
2962 2974
       this.rowKey = 0;
2975
+      for(let i=0;i<this.adviceTableData.length;i++){
2976
+        if(this.adviceTableData[i].advice_type == 2){
2977
+           this.adviceTableData[i].advice_type = "临时"
2978
+        }
2979
+      }
2980
+
2963 2981
       for (const index in this.adviceTableData) {
2964 2982
         if (groupno == this.adviceTableData[index].groupno) {
2965 2983
           groups.push(this.adviceTableData[index]);
@@ -2979,7 +2997,7 @@ export default {
2979 2997
         remark: groups[0].remark,
2980 2998
         groupno: groupno
2981 2999
       };
2982
-      // console.log(groups[0]);
3000
+      console.log("到了",groups[0]);
2983 3001
 
2984 3002
       var childMap = {};
2985 3003
       for (const index in groups) {
@@ -3023,7 +3041,7 @@ export default {
3023 3041
           row_key: this.rowKey,
3024 3042
           table: []
3025 3043
         };
3026
-        console.log("itme-----------",item)
3044
+      
3027 3045
         if (item.id in childMap) {
3028 3046
           for (const key in childMap[item.id]) {
3029 3047
             this.rowKey++;
@@ -3063,6 +3081,7 @@ export default {
3063 3081
     },
3064 3082
 
3065 3083
     openEdit(index, row) {
3084
+      
3066 3085
       this.currentIndex = index;
3067 3086
       (this.dialogTitle = "修改医嘱"), (this.isEdit = true);
3068 3087
 
@@ -4040,7 +4059,7 @@ export default {
4040 4059
           var arr = this.nameForm.advice_name.split("(自备药)")
4041 4060
           this.nameForm.advice_name = arr[0]
4042 4061
        }
4043
-      
4062
+      console.log("医嘱2222",this.nameForm)
4044 4063
       var _this = this;
4045 4064
       this.$refs[formName].validate(valid => {
4046 4065
         if (valid) {
@@ -4492,6 +4511,40 @@ export default {
4492 4511
           
4493 4512
       })
4494 4513
     },
4514
+    changeDrugNameTwo(name){
4515
+       this.current_drug_name = name
4516
+       this.adviceForm.advice_desc = ''
4517
+      this.drugSpec = []
4518
+      for (let i = 0; i < this.all_drug.length; i++) {
4519
+        if (this.all_drug[i].drug_name == name) {
4520
+            this.drugSpec = this.all_drug[i].drug_specs
4521
+          }
4522
+       }   
4523
+    },
4524
+   changeDrugDescTwo(name){
4525
+      this.current_drug_spec = name
4526
+        for (let i = 0; i < this.drugSpec.length; i++) {
4527
+          if (this.drugSpec[i].drug_spec == name) {
4528
+            this.adviceForm.advice_desc = this.drugSpec[i].drug_spec
4529
+            this.adviceForm.prescribing_number = this.drugSpec[i].prescribing_number.toString()
4530
+            this.adviceForm.single_dose = this.drugSpec[i].single_dose.toString()
4531
+            this.adviceForm.delivery_way = this.drugSpec[i].delivery_way.toString()
4532
+            this.adviceForm.execution_frequency = this.drugSpec[i].execution_frequency.toString()
4533
+            this.drug_id = this.drugSpec[i].id
4534
+            this.src_type = this.drugSpec[i].type
4535
+            this.adviceForm.drug_id = this.drugSpec[i].id
4536
+            this.adviceForm.way = this.drugSpec[i].type
4537
+            this.adviceForm.single_dose_unit = this.drugSpec[i].min_unit
4538
+            this.adviceForm.drug_spec_unit = this.drugSpec[i].min_unit
4539
+            this.adviceForm.prescribing_number_unit = this.drugSpec[i].min_unit
4540
+            if(this.drugSpec[i].drug_name_id){
4541
+               this.adviceForm.drug_name_id = this.drugSpec[i].drug_name_id
4542
+            }else{
4543
+              this.adviceForm.drug_name_id = 0
4544
+            }
4545
+          }
4546
+        }
4547
+   },
4495 4548
    changeDrugName(name){
4496 4549
        this.current_drug_name = name
4497 4550
        this.nameForm.advice_desc = ''
@@ -4515,8 +4568,13 @@ export default {
4515 4568
             this.src_type = this.drugSpec[i].type
4516 4569
             this.nameForm.drug_id = this.drugSpec[i].id
4517 4570
             this.nameForm.way = this.drugSpec[i].type
4571
+            this.nameForm.single_dose_unit = this.drugSpec[i].min_unit
4572
+            this.nameForm.drug_spec_unit = this.drugSpec[i].min_unit
4573
+            this.nameForm.prescribing_number_unit = this.drugSpec[i].min_unit
4518 4574
             if(this.drugSpec[i].drug_name_id){
4519
-               this.nameForm.drug_name_id = 0
4575
+               this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
4576
+            }else{
4577
+              this.nameForm.drug_name_id = 0
4520 4578
             }
4521 4579
           }
4522 4580
         }
@@ -4524,6 +4582,44 @@ export default {
4524 4582
     rand(min, max) {
4525 4583
         return Math.floor(Math.random() * (max - min)) + min;
4526 4584
     },
4585
+
4586
+     querySearch(queryString, cb) {
4587
+        console.log('queryString',queryString)
4588
+        var restaurants = this.all_drug;
4589
+        restaurants.map(item => {
4590
+          item.value = item.drug_name
4591
+        })
4592
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
4593
+        // 调用 callback 返回建议列表的数据
4594
+        console.log('results',results)
4595
+        cb(results);
4596
+     },
4597
+
4598
+     createFilter(queryString) {
4599
+        return (restaurant) => {
4600
+          return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
4601
+        };
4602
+     },
4603
+
4604
+     querySearch1(queryString, cb) {
4605
+        console.log('queryString',queryString)
4606
+        var restaurants = this.drugSpec;
4607
+         console.log(restaurants)
4608
+        restaurants.map(item => {
4609
+          item.value = item.drug_spec
4610
+        })
4611
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
4612
+        // 调用 callback 返回建议列表的数据
4613
+        console.log('results',results)
4614
+        cb(results);
4615
+      },
4616
+
4617
+      handleSelect1(){
4618
+
4619
+      },
4620
+      handleSelect(){
4621
+
4622
+      }
4527 4623
   },
4528 4624
   watch: {
4529 4625
     adviceTableData: function() {