Просмотр исходного кода

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

See999 4 лет назад
Родитель
Сommit
c9eca51825

+ 2 - 0
src/api/advice.js Просмотреть файл

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

+ 1 - 2
src/lang/zh.js Просмотреть файл

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

+ 32 - 51
src/xt_pages/data/druguseTemplate.vue Просмотреть файл

300
                 <el-button type="primary" @click="submitTableTemplate('form')">保 存</el-button>
300
                 <el-button type="primary" @click="submitTableTemplate('form')">保 存</el-button>
301
               </div>
301
               </div>
302
             </el-dialog>
302
             </el-dialog>
303
+
304
+            <!-- 新增子药 -->
303
             <el-dialog :title="dialogTitle" :visible.sync="templateFormVisible" width="854px">
305
             <el-dialog :title="dialogTitle" :visible.sync="templateFormVisible" width="854px">
304
               <el-form
306
               <el-form
305
                 ref="templateForm"
307
                 ref="templateForm"
514
                 <el-row>
516
                 <el-row>
515
                   <el-col :span="24">
517
                   <el-col :span="24">
516
                     <el-form-item :label="edit_advice_name" required prop="advice_name">
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
                         <el-autocomplete
519
                         <el-autocomplete
535
                           style="width:100%;"
520
                           style="width:100%;"
536
                           class="inline-input"
521
                           class="inline-input"
545
                   <el-col :span="15">
530
                   <el-col :span="15">
546
 
531
 
547
                     <el-form-item label="药品规格 :" prop="advice_desc">
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
                       </el-col>
543
                       </el-col>
577
                       <el-col class="line" :span="1">&nbsp;</el-col>
544
                       <el-col class="line" :span="1">&nbsp;</el-col>
578
                       <el-col :span="14">
545
                       <el-col :span="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
         if(this.src_type == ""){
1795
         if(this.src_type == ""){
1824
             this.templateForm.way = 0
1796
             this.templateForm.way = 0
1825
             this.templateForm.drug_id = 0
1797
             this.templateForm.drug_id = 0
1829
             var arr = this.templateForm.advice_name.split("(自备药)")
1801
             var arr = this.templateForm.advice_name.split("(自备药)")
1830
             this.templateForm.advice_name = arr[0]
1802
             this.templateForm.advice_name = arr[0]
1831
         }
1803
         }
1832
-        
1804
+        console.log("2222",this.templateForm)
1805
+       
1833
         this.$refs[formName].validate(valid => {
1806
         this.$refs[formName].validate(valid => {
1834
           this.templateForm.single_dose = parseFloat(this.templateForm.single_dose)
1807
           this.templateForm.single_dose = parseFloat(this.templateForm.single_dose)
1835
           this.templateForm.prescribing_number = parseFloat(this.templateForm.prescribing_number)
1808
           this.templateForm.prescribing_number = parseFloat(this.templateForm.prescribing_number)
1840
           if (isNaN(this.templateForm.prescribing_number)) {
1813
           if (isNaN(this.templateForm.prescribing_number)) {
1841
             this.templateForm.prescribing_number = 0
1814
             this.templateForm.prescribing_number = 0
1842
           }
1815
           }
1843
-
1816
+          
1844
           if (valid) {
1817
           if (valid) {
1845
             const templateFormTwo = {}
1818
             const templateFormTwo = {}
1846
             templateFormTwo.template_id = this.current_template_id
1819
             templateFormTwo.template_id = this.current_template_id
2201
          } 
2174
          } 
2202
         this.templateFormEdit.drug_id = drug_id
2175
         this.templateFormEdit.drug_id = drug_id
2203
        
2176
        
2204
-        console.log("2222",this.templateFormEdit)
2177
+        console.log("编辑子药",this.templateFormEdit)
2178
+       
2205
         this.$refs[formName].validate(valid => {
2179
         this.$refs[formName].validate(valid => {
2206
 
2180
 
2207
           this.templateFormEdit.single_dose = parseFloat(this.templateFormEdit.single_dose)
2181
           this.templateFormEdit.single_dose = parseFloat(this.templateFormEdit.single_dose)
2263
             )
2237
             )
2264
           }
2238
           }
2265
         })
2239
         })
2266
-      }, drugDesc(row) {
2240
+      }, 
2241
+      drugDesc(row) {
2267
         if (row.isNoSub == 2) {
2242
         if (row.isNoSub == 2) {
2268
           if (row.drug_spec.length <= 0) {
2243
           if (row.drug_spec.length <= 0) {
2269
             return ''
2244
             return ''
2859
             this.drug_id = this.drugSpec[i].id
2834
             this.drug_id = this.drugSpec[i].id
2860
             this.src_type = this.drugSpec[i].type
2835
             this.src_type = this.drugSpec[i].type
2861
             this.templateForm.drug_id = this.drugSpec[i].id
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
             this.templateForm.way = this.drugSpec[i].type
2840
             this.templateForm.way = this.drugSpec[i].type
2863
           }
2841
           }
2864
         }
2842
         }
2884
             this.templateFormEdit.single_dose = this.drugSpec[i].single_dose.toString()
2862
             this.templateFormEdit.single_dose = this.drugSpec[i].single_dose.toString()
2885
             this.templateFormEdit.delivery_way = this.drugSpec[i].delivery_way.toString()
2863
             this.templateFormEdit.delivery_way = this.drugSpec[i].delivery_way.toString()
2886
             this.templateFormEdit.execution_frequency = this.drugSpec[i].execution_frequency.toString()
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 Просмотреть файл

303
           <span class="unit"></span>
303
           <span class="unit"></span>
304
         </li>
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
       </ul>
311
       </ul>
307
     </div>
312
     </div>
308
     <div class="note">
313
     <div class="note">

+ 61 - 87
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Просмотреть файл

239
         :cell-class-name="adviceNameShow"
239
         :cell-class-name="adviceNameShow"
240
         :modal-append-to-body="false"
240
         :modal-append-to-body="false"
241
         highlight-current-row
241
         highlight-current-row
242
-        @current-change="handleCurrentChange"
243
       >
242
       >
244
         <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
243
         <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
245
           <template slot-scope="scope">
244
           <template slot-scope="scope">
249
         <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
248
         <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
250
           <template slot-scope="scope">
249
           <template slot-scope="scope">
251
             <span>
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
             </span>
252
             </span>
256
           </template>
253
           </template>
257
         </el-table-column>
254
         </el-table-column>
259
           <template slot-scope="scope">
256
           <template slot-scope="scope">
260
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
257
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
261
               <span class="el-dropdown-link">
258
               <span class="el-dropdown-link">
262
-                {{ getAdviceContent(scope.row, 1)
263
-                }}
259
+                {{ getAdviceContent(scope.row, 1)}}
264
                 <i class="el-icon-arrow-down el-icon--right"></i>
260
                 <i class="el-icon-arrow-down el-icon--right"></i>
265
               </span>
261
               </span>
266
               <el-dropdown-menu slot="dropdown">
262
               <el-dropdown-menu slot="dropdown">
272
 
268
 
273
             <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
269
             <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
274
               <span class="el-dropdown-link">
270
               <span class="el-dropdown-link">
275
-                &emsp;{{ getAdviceContent(scope.row, 2)
276
-                }}
271
+                &emsp;{{ getAdviceContent(scope.row, 2)}}
277
                 <i class="el-icon-arrow-down el-icon--right"></i>
272
                 <i class="el-icon-arrow-down el-icon--right"></i>
278
               </span>
273
               </span>
279
               <el-dropdown-menu slot="dropdown">
274
               <el-dropdown-menu slot="dropdown">
293
         >
288
         >
294
           <template slot-scope="scope">
289
           <template slot-scope="scope">
295
             <span v-if="scope.row.execution_time != 0">
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
             </span>
292
             </span>
300
             <span v-else></span>
293
             <span v-else></span>
301
           </template>
294
           </template>
303
         <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
296
         <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
304
           <template slot-scope="scope">
297
           <template slot-scope="scope">
305
             <span v-if="scope.row.parent_id == 0">
298
             <span v-if="scope.row.parent_id == 0">
306
-              {{
307
-              getXuserName(scope.row.execution_staff)
308
-              }}
299
+              {{getXuserName(scope.row.execution_staff)}}
309
             </span>
300
             </span>
310
             <span v-else></span>
301
             <span v-else></span>
311
           </template>
302
           </template>
319
         >
310
         >
320
           <template slot-scope="scope">
311
           <template slot-scope="scope">
321
             <span v-if="scope.row.parent_id == 0">
312
             <span v-if="scope.row.parent_id == 0">
322
-              {{
323
-              getXuserName(scope.row.checker)
324
-              }}
313
+              {{getXuserName(scope.row.checker)}}
325
             </span>
314
             </span>
326
             <span v-else></span>
315
             <span v-else></span>
327
           </template>
316
           </template>
408
       </div>-->
397
       </div>-->
409
       <!-- 新医嘱列表 -->
398
       <!-- 新医嘱列表 -->
410
 
399
 
400
+
401
+      <!-- 新增医嘱(子药)表单 -->
411
       <!-- 医嘱表单 -->
402
       <!-- 医嘱表单 -->
412
       <el-form ref="form" :model="form" label-width="100px" v-show="showAdviceForm">
403
       <el-form ref="form" :model="form" label-width="100px" v-show="showAdviceForm">
413
         <el-row :gutter="20">
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
           <el-col :span="8">
405
           <el-col :span="8">
426
             <el-form-item label="开始时间:">
406
             <el-form-item label="开始时间:">
427
               <el-date-picker
407
               <el-date-picker
438
 
418
 
439
           <el-col :span="8">
419
           <el-col :span="8">
440
             <el-form-item label="医嘱名称:">
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
               <el-autocomplete
422
               <el-autocomplete
460
                 style="width:100%;"
423
                 style="width:100%;"
469
           </el-col>
432
           </el-col>
470
 
433
 
471
           <el-col :span="8">
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
                 <el-autocomplete
436
                 <el-autocomplete
492
                   style="width:100px;"
437
                   style="width:100px;"
493
                   class="inline-input"
438
                   class="inline-input"
494
                   v-model="form.advice_desc"
439
                   v-model="form.advice_desc"
495
                   :fetch-suggestions="querySearch1"
440
                   :fetch-suggestions="querySearch1"
496
                   placeholder="请输入内容"
441
                   placeholder="请输入内容"
497
-                  @select="handleSelect1"
498
                   @input="changeDrugDesc"
442
                   @input="changeDrugDesc"
499
                 ></el-autocomplete>
443
                 ></el-autocomplete>
500
                  
444
                  
501
                 <el-select
445
                 <el-select
502
                   v-model="form.drug_spec_unit"
446
                   v-model="form.drug_spec_unit"
503
-                  style="width: 56%;"
447
+                  style="width: 100px;"
504
                   filterable
448
                   filterable
505
                   placeholder="选择"
449
                   placeholder="选择"
506
                 >
450
                 >
532
                   :value="item.name"
476
                   :value="item.name"
533
                 ></el-option>
477
                 ></el-option>
534
               </el-select>
478
               </el-select>
535
-              <!-- <el-input v-model="form.prescribing_number_unit" style="width: 40%;"></el-input> -->
536
             </el-form-item>
479
             </el-form-item>
537
           </el-col>
480
           </el-col>
538
 
481
 
552
                   :value="item.name"
495
                   :value="item.name"
553
                 ></el-option>
496
                 ></el-option>
554
               </el-select>
497
               </el-select>
555
-
556
-              <!-- <el-input v-model="form.single_dose_unit" style="width: 40%;"></el-input> -->
557
             </el-form-item>
498
             </el-form-item>
558
           </el-col>
499
           </el-col>
559
 
500
 
776
           advice_doctor: '',
717
           advice_doctor: '',
777
           remark: '',
718
           remark: '',
778
           parent_id: 0,
719
           parent_id: 0,
779
-          drug_name_id:"",
720
+          drug_id:0,
721
+          drug_name_id:0,
722
+          way:0,
780
         },
723
         },
781
         nameForm: {
724
         nameForm: {
782
           advice_name: '',
725
           advice_name: '',
942
         }
885
         }
943
       },
886
       },
944
       submitEditAdvice() {
887
       submitEditAdvice() {
945
-        console.log("this.form",this.form)
946
         if (this.form.advice_name.length == 0) {
888
         if (this.form.advice_name.length == 0) {
947
           this.$message.error('请填写医嘱名称')
889
           this.$message.error('请填写医嘱名称')
948
           return
890
           return
1231
       }
1173
       }
1232
       ,
1174
       ,
1233
       submitExce() {
1175
       submitExce() {
1176
+        
1234
         if (this.currentRow == null) {
1177
         if (this.currentRow == null) {
1235
           this.$message.error('请先选择要执行的医嘱!')
1178
           this.$message.error('请先选择要执行的医嘱!')
1236
           return false
1179
           return false
1247
         }
1190
         }
1248
         this.exceLoading = true
1191
         this.exceLoading = true
1249
         let mode = '6'
1192
         let mode = '6'
1193
+        
1194
+         console.log("222222",this.currentRow.id)
1195
+        
1250
         ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode).then(response => {
1196
         ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode).then(response => {
1251
             if (response.data.state == 0) {
1197
             if (response.data.state == 0) {
1252
               this.$message.error(response.data.msg)
1198
               this.$message.error(response.data.msg)
1311
           return false
1257
           return false
1312
         }
1258
         }
1313
         let mode = '1'
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
         CreateDoctorAdvice(this.patient.id, this.form, mode)
1274
         CreateDoctorAdvice(this.patient.id, this.form, mode)
1316
           .then(response => {
1275
           .then(response => {
1407
           execution_frequency: this.currentRow.execution_frequency,
1366
           execution_frequency: this.currentRow.execution_frequency,
1408
           advice_doctor: '',
1367
           advice_doctor: '',
1409
           remark: '',
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
           advice_doctor: row.advice_doctor,
1445
           advice_doctor: row.advice_doctor,
1484
           remark: row.remark,
1446
           remark: row.remark,
1485
           parent_id: row.parent_id,
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
       }
1578
       }
1617
       ,
1579
       ,
1618
       execAdvice() {
1580
       execAdvice() {
1581
+        
1619
         if (this.is_has_exce == false) {
1582
         if (this.is_has_exce == false) {
1620
           this.$message.error('你没有执行医嘱的权限')
1583
           this.$message.error('你没有执行医嘱的权限')
1621
           return false
1584
           return false
2071
       }
2034
       }
2072
       ,
2035
       ,
2073
       cellMouseEnter: function(row, column, event) {
2036
       cellMouseEnter: function(row, column, event) {
2037
+        console.log("数据是",row)
2074
         this.currentRow = row
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
       cellMouseLeave: function(row, column, cell, event) {
2047
       cellMouseLeave: function(row, column, cell, event) {
2196
       }
2160
       }
2197
       ,
2161
       ,
2198
       handleCurrentChange(row) {
2162
       handleCurrentChange(row) {
2199
-        // this.currentRow = row;
2163
+
2164
+        this.currentRow = row;
2200
         // this.groupSelectRow = row;
2165
         // this.groupSelectRow = row;
2201
         // this.sameRowArr.forEach((arr, i) => {
2166
         // this.sameRowArr.forEach((arr, i) => {
2202
         //   if (arr.indexOf(row.index) != -1) {
2167
         //   if (arr.indexOf(row.index) != -1) {
2203
         //     this.hoverOrderArr = arr;
2168
         //     this.hoverOrderArr = arr;
2204
         //   }
2169
         //   }
2205
         // });
2170
         // });
2206
-      }
2207
-      ,
2171
+      },
2208
       objectSpanMethod({ row, column, rowIndex, columnIndex }) {
2172
       objectSpanMethod({ row, column, rowIndex, columnIndex }) {
2209
-        // console.log('columnIndex', columnIndex)
2173
+     
2210
         if (columnIndex === 0) {
2174
         if (columnIndex === 0) {
2211
           if (rowIndex % 2 === 0) {
2175
           if (rowIndex % 2 === 0) {
2212
             return {
2176
             return {
2358
                 obj.type = 2
2322
                 obj.type = 2
2359
                 obj.custom_id = this.rand(10000000, 99999999)
2323
                 obj.custom_id = this.rand(10000000, 99999999)
2360
                 obj.drug_specs = medicalList[i].drug_specs
2324
                 obj.drug_specs = medicalList[i].drug_specs
2325
+                console.log("222",this.all_drug)
2361
                 this.all_drug.push(obj)
2326
                 this.all_drug.push(obj)
2362
               }
2327
               }
2363
             }
2328
             }
2394
                 obj.custom_id = this.rand(10000000, 99999999)
2359
                 obj.custom_id = this.rand(10000000, 99999999)
2395
                 obj.drug_specs = base_drug_list[i].drug_specs
2360
                 obj.drug_specs = base_drug_list[i].drug_specs
2396
                 this.all_drug.push(obj)
2361
                 this.all_drug.push(obj)
2362
+                console.log("2222",this.all_drug)
2397
               }
2363
               }
2398
             }
2364
             }
2399
         })
2365
         })
2400
      },
2366
      },
2401
     changeDrugName(name){
2367
     changeDrugName(name){
2402
       this.current_drug_name = name
2368
       this.current_drug_name = name
2403
-      this.form.advice_desc = ''
2369
+      this.form.advice_desc = ""
2370
+      this.$forceUpdate()
2404
       this.drugSpec = []
2371
       this.drugSpec = []
2405
       for (let i = 0; i < this.all_drug.length; i++) {
2372
       for (let i = 0; i < this.all_drug.length; i++) {
2406
         if (this.all_drug[i].drug_name == name) {
2373
         if (this.all_drug[i].drug_name == name) {
2409
        }
2376
        }
2410
     },
2377
     },
2411
     changeDrugDesc(name) {
2378
     changeDrugDesc(name) {
2379
+      this.$forceUpdate()
2412
         this.current_drug_spec = name
2380
         this.current_drug_spec = name
2413
         for (let i = 0; i < this.drugSpec.length; i++) {
2381
         for (let i = 0; i < this.drugSpec.length; i++) {
2414
           if (this.drugSpec[i].drug_spec == name) {
2382
           if (this.drugSpec[i].drug_spec == name) {
2421
             this.src_type = this.drugSpec[i].type
2389
             this.src_type = this.drugSpec[i].type
2422
             this.form.drug_id = this.drugSpec[i].id
2390
             this.form.drug_id = this.drugSpec[i].id
2423
             this.form.way = this.drugSpec[i].type
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
             if(this.drugSpec[i].drug_name_id){
2396
             if(this.drugSpec[i].drug_name_id){
2425
-              console.log("22222",this.drugSpec[i].drug_name_id)
2426
                this.form.drug_name_id = this.drugSpec[i].drug_name_id
2397
                this.form.drug_name_id = this.drugSpec[i].drug_name_id
2427
             }else{
2398
             }else{
2428
               this.form.drug_name_id = 0
2399
               this.form.drug_name_id = 0
2465
         console.log('results',results)
2436
         console.log('results',results)
2466
         cb(results);
2437
         cb(results);
2467
       },
2438
       },
2439
+     handleSelect(){
2440
+
2441
+     }
2468
     },
2442
     },
2469
     created() {
2443
     created() {
2470
       var date = this.$route.query && this.$route.query.date
2444
       var date = this.$route.query && this.$route.query.date

+ 32 - 54
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Просмотреть файл

370
         <el-row>
370
         <el-row>
371
           <el-col :span="24">
371
           <el-col :span="24">
372
             <el-form-item label="医嘱内容 :" required prop="advice_name">
372
             <el-form-item label="医嘱内容 :" required prop="advice_name">
373
-               <!-- <el-select
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
              <el-autocomplete
373
              <el-autocomplete
392
                 style="width:100%;"
374
                 style="width:100%;"
393
                 class="inline-input"
375
                 class="inline-input"
407
         </el-row>
389
         </el-row>
408
         <el-row>
390
         <el-row>
409
           <el-col :span="12">
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
             <el-form-item label="药品规格 :" prop="advice_desc">
393
             <el-form-item label="药品规格 :" prop="advice_desc">
414
               <el-col :span="8">
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
                 <el-autocomplete
396
                 <el-autocomplete
435
                   style="width:100px;"
397
                   style="width:100px;"
436
                   class="inline-input"
398
                   class="inline-input"
743
           
705
           
744
           console.log("88888888",submitForm)
706
           console.log("88888888",submitForm)
745
           console.log("99999",this.medicals)
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
              for(let index=0;index<submitForm.adviceNames.length;index++){
710
              for(let index=0;index<submitForm.adviceNames.length;index++){
750
                 for(let i=0;i<this.medicals.length;i++){
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
                    if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
720
                    if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
752
                       submitForm.adviceNames[index].way = 2
721
                       submitForm.adviceNames[index].way = 2
753
                       submitForm.adviceNames[index].drug_name_id = this.medicals[i].drug_name_id
722
                       submitForm.adviceNames[index].drug_name_id = this.medicals[i].drug_name_id
756
              }
725
              }
757
           }
726
           }
758
           console.log("2222",submitForm)
727
           console.log("2222",submitForm)
759
-         
728
+        
760
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
729
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
761
             response => {
730
             response => {
762
               if (response.data.state == 0) {
731
               if (response.data.state == 0) {
1312
                   parent_row: parentRow,
1281
                   parent_row: parentRow,
1313
                   row_key: thisRowKey
1282
                   row_key: thisRowKey
1314
                 };
1283
                 };
1315
-                conosle.log("item======",child)
1284
+                
1316
                 item.children.push(child);
1285
                 item.children.push(child);
1317
                 this.allSelectedTemplate.unshift(child);
1286
                 this.allSelectedTemplate.unshift(child);
1318
               }
1287
               }
1475
       this.templateFormVisible = true;
1444
       this.templateFormVisible = true;
1476
     },
1445
     },
1477
     selectGroupAdvice(row) {
1446
     selectGroupAdvice(row) {
1478
-      console.log("row-----",row)
1479
       this.groupSelectRow = row;
1447
       this.groupSelectRow = row;
1480
     },
1448
     },
1481
     groupClassName({ row, rowIndex }) {
1449
     groupClassName({ row, rowIndex }) {
1620
                 this.all_drug.push(obj)
1588
                 this.all_drug.push(obj)
1621
 
1589
 
1622
               }
1590
               }
1591
+
1623
               this.private_drug_config = response.data.data.private_drug_config
1592
               this.private_drug_config = response.data.data.private_drug_config
1624
               this.medicals = medicalList
1593
               this.medicals = medicalList
1625
             }   
1594
             }   
1626
-            console.log("-======",this.all_drug)
1595
+           
1627
         })
1596
         })
1628
        
1597
        
1629
     },
1598
     },
1630
     changeDrugName(name){
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
       this.drugSpec = []
1602
       this.drugSpec = []
1634
       for (let i = 0; i < this.all_drug.length; i++) {
1603
       for (let i = 0; i < this.all_drug.length; i++) {
1635
         if (this.all_drug[i].drug_name == name) {
1604
         if (this.all_drug[i].drug_name == name) {
1638
        }
1607
        }
1639
     },
1608
     },
1640
     changeDrugDesc(name) {
1609
     changeDrugDesc(name) {
1641
-      console.log("-----",this.drugSpec)
1642
         this.current_drug_spec = name
1610
         this.current_drug_spec = name
1643
         for (let i = 0; i < this.drugSpec.length; i++) {
1611
         for (let i = 0; i < this.drugSpec.length; i++) {
1644
           if (this.drugSpec[i].drug_spec == name) {
1612
           if (this.drugSpec[i].drug_spec == name) {
1645
             this.nameForm.advice_desc = this.drugSpec[i].drug_spec
1613
             this.nameForm.advice_desc = this.drugSpec[i].drug_spec
1646
             this.nameForm.prescribing_number = this.drugSpec[i].prescribing_number.toString()
1614
             this.nameForm.prescribing_number = this.drugSpec[i].prescribing_number.toString()
1647
             this.nameForm.single_dose = this.drugSpec[i].single_dose.toString()
1615
             this.nameForm.single_dose = this.drugSpec[i].single_dose.toString()
1616
+
1648
             this.nameForm.delivery_way = this.drugSpec[i].delivery_way.toString()
1617
             this.nameForm.delivery_way = this.drugSpec[i].delivery_way.toString()
1649
             this.nameForm.execution_frequency = this.drugSpec[i].execution_frequency.toString()
1618
             this.nameForm.execution_frequency = this.drugSpec[i].execution_frequency.toString()
1650
             this.drug_id = this.drugSpec[i].id
1619
             this.drug_id = this.drugSpec[i].id
1651
             this.src_type = this.drugSpec[i].type
1620
             this.src_type = this.drugSpec[i].type
1652
             this.nameForm.drug_id = this.drugSpec[i].id
1621
             this.nameForm.drug_id = this.drugSpec[i].id
1653
             this.nameForm.way = this.drugSpec[i].type
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
             if(this.drugSpec[i].drug_name_id){
1626
             if(this.drugSpec[i].drug_name_id){
1656
                this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
1627
                this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
1657
             }else{
1628
             }else{
1670
         })
1641
         })
1671
         var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
1642
         var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
1672
         // 调用 callback 返回建议列表的数据
1643
         // 调用 callback 返回建议列表的数据
1673
-        console.log('results',results)
1644
+       
1674
         cb(results);
1645
         cb(results);
1675
      },
1646
      },
1676
 
1647
 
1681
      },
1652
      },
1682
 
1653
 
1683
      querySearch1(queryString, cb) {
1654
      querySearch1(queryString, cb) {
1684
-        console.log('queryString',queryString)
1655
+      
1685
         var restaurants = this.drugSpec;
1656
         var restaurants = this.drugSpec;
1686
          console.log(restaurants)
1657
          console.log(restaurants)
1687
         restaurants.map(item => {
1658
         restaurants.map(item => {
1689
         })
1660
         })
1690
         var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
1661
         var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
1691
         // 调用 callback 返回建议列表的数据
1662
         // 调用 callback 返回建议列表的数据
1692
-        console.log('results',results)
1663
+       
1693
         cb(results);
1664
         cb(results);
1694
       },
1665
       },
1666
+
1667
+      handleSelect(){
1668
+
1669
+      },
1670
+      handleSelect1(){
1671
+
1672
+      }
1695
   },
1673
   },
1696
   watch: {
1674
   watch: {
1697
     "selectedTemp.list": function() {
1675
     "selectedTemp.list": function() {

+ 8 - 1
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue Просмотреть файл

358
               <el-input v-model="assessmentBeforeDislysis.emergency_treatment_other"></el-input>
358
               <el-input v-model="assessmentBeforeDislysis.emergency_treatment_other"></el-input>
359
             </el-form-item>
359
             </el-form-item>
360
           </el-col>
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
           <el-col :span="24">
369
           <el-col :span="24">
363
             <el-form-item label="备注: ">
370
             <el-form-item label="备注: ">
689
           catheter_suture_other:'',
696
           catheter_suture_other:'',
690
           urine_volume:'',
697
           urine_volume:'',
691
           edema:'',
698
           edema:'',
692
-
699
+          special_treatment:'',
693
         },
700
         },
694
 
701
 
695
         InnerDialogProps: {
702
         InnerDialogProps: {

+ 251 - 251
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Просмотреть файл

19
         ref="dialysisPrescription"
19
         ref="dialysisPrescription"
20
         :model="dialysisPrescription"
20
         :model="dialysisPrescription"
21
         label-width="148px"
21
         label-width="148px"
22
-      > 
22
+      >
23
         <el-row :gutter="24">
23
         <el-row :gutter="24">
24
           <el-col :span="8" v-if="isShows('透析模式')">
24
           <el-col :span="8" v-if="isShows('透析模式')">
25
             <el-form-item label="透析模式">
25
             <el-form-item label="透析模式">
219
             </el-form-item>
219
             </el-form-item>
220
           </el-col>
220
           </el-col>
221
 
221
 
222
-          
223
 
222
 
224
-       
223
+
224
+
225
 
225
 
226
           <el-col :span="8" v-if="isShows('置换量') && (this.$store.getters.xt_user.template_info.template_id == 20)"
226
           <el-col :span="8" v-if="isShows('置换量') && (this.$store.getters.xt_user.template_info.template_id == 20)"
227
                   v-show="zhiShow">
227
                   v-show="zhiShow">
519
           <!--          </el-col>-->
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
         }
1369
         }
1370
       },
1370
       },
1371
       setLastRecord: function(schedual,lastAssessmentAfterDislysis,lastPredialysisEvaluation,lastDialysisPrescribe,lastDryWeightDislysis,system_prescribe) {
1371
       setLastRecord: function(schedual,lastAssessmentAfterDislysis,lastPredialysisEvaluation,lastDialysisPrescribe,lastDryWeightDislysis,system_prescribe) {
1372
-        
1373
-       
1372
+
1373
+
1374
         this.treatment_mode = this.$store.getters.treatment_mode
1374
         this.treatment_mode = this.$store.getters.treatment_mode
1375
         console.log("99999",this.treatment_mode)
1375
         console.log("99999",this.treatment_mode)
1376
         this.perfusion_apparatus = getDataConfig(
1376
         this.perfusion_apparatus = getDataConfig(
1462
             }
1462
             }
1463
           }
1463
           }
1464
         } else {
1464
         } else {
1465
-           
1465
+
1466
           if (schedual.mode_id == 2 ||schedual.mode_id == 5 ||schedual.mode_id == 12) {
1466
           if (schedual.mode_id == 2 ||schedual.mode_id == 5 ||schedual.mode_id == 12) {
1467
             this.zhiShow = true
1467
             this.zhiShow = true
1468
             this.huShow = true
1468
             this.huShow = true
3025
                       response.data.data.system_prescription[key]
3025
                       response.data.data.system_prescription[key]
3026
                   }
3026
                   }
3027
                 }
3027
                 }
3028
-                
3028
+
3029
               } else {
3029
               } else {
3030
                 for (const key in this.dialysisPrescription) {
3030
                 for (const key in this.dialysisPrescription) {
3031
                   // 临时处方为空
3031
                   // 临时处方为空
3641
           }
3641
           }
3642
         }
3642
         }
3643
       },
3643
       },
3644
-    
3644
+
3645
     }
3645
     }
3646
   }
3646
   }
3647
 </script>
3647
 </script>

+ 9 - 2
src/xt_pages/index/verify_token.vue Просмотреть файл

14
           // alert('token 验证成功')
14
           // alert('token 验证成功')
15
           // console.log(this.$store.getters.xt_permission.addRouters)
15
           // console.log(this.$store.getters.xt_permission.addRouters)
16
           this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
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 Просмотреть файл

10
         <el-input v-model="form.name" placeholder="用户姓名"></el-input>
10
         <el-input v-model="form.name" placeholder="用户姓名"></el-input>
11
       </el-form-item>
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
           </el-checkbox-group>
19
           </el-checkbox-group>
24
         </el-form-item>
20
         </el-form-item>
25
 
21
 
22
+
26
       <el-form-item label="职称 : ">
23
       <el-form-item label="职称 : ">
27
         <el-select v-model="form.user_type" placeholder="用户类型">
24
         <el-select v-model="form.user_type" placeholder="用户类型">
28
           <el-option
25
           <el-option

+ 4 - 2
src/xt_pages/stock/cancelStockOrderAdd.vue Просмотреть файл

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

+ 4 - 2
src/xt_pages/stock/cancelStockOrderEdit.vue Просмотреть файл

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

+ 2 - 4
src/xt_pages/stock/drugs/drugsStockDialog/index.vue Просмотреть файл

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

+ 4 - 2
src/xt_pages/stock/salesReturnEdit.vue Просмотреть файл

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

+ 4 - 2
src/xt_pages/stock/salesReturnOrderAdd.vue Просмотреть файл

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

+ 94 - 27
src/xt_pages/stock/selfPreparedMedicine/components/addMedicine.vue Просмотреть файл

9
             <div style="width:200px;">
9
             <div style="width:200px;">
10
               <el-table :data="tableData" border style="width: 100%;" height="300" :row-style="{ color: '#303133' }" 
10
               <el-table :data="tableData" border style="width: 100%;" height="300" :row-style="{ color: '#303133' }" 
11
                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row
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
                     <el-table-column align="center" prop="name" label="药品名称">
13
                     <el-table-column align="center" prop="name" label="药品名称">
14
                         <template slot-scope="scope">
14
                         <template slot-scope="scope">
15
                            {{scope.row.drug_name}}
15
                            {{scope.row.drug_name}}
17
                     </el-table-column>
17
                     </el-table-column>
18
                 </el-table>
18
                 </el-table>
19
             </div>
19
             </div>
20
+
21
+
20
             <div style="flex:1;padding-left:10px;">
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
                         <template slot-scope="scope">{{scope.row.drug_spec}}</template>
32
                         <template slot-scope="scope">{{scope.row.drug_spec}}</template>
26
                     </el-table-column>
33
                     </el-table-column>
27
                 </el-table>
34
                 </el-table>
47
             currentRow:"",
54
             currentRow:"",
48
             tableDatatwo:[],
55
             tableDatatwo:[],
49
             patient_id:0,
56
             patient_id:0,
50
-            medicineData:[]
57
+            medicineData:[],
58
+            standList:[],
59
+            table_current_index:-1,
51
         }
60
         }
52
     },
61
     },
53
     methods:{
62
     methods:{
79
              if(response.data.state == 1){
88
              if(response.data.state == 1){
80
                var rullername =  response.data.data.rullerName
89
                var rullername =  response.data.data.rullerName
81
                console.log("rullerName",rullername)
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
         handleCurrentChange(val){
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
              this.$message.error("请添加药品规格")
176
              this.$message.error("请添加药品规格")
108
              return
177
              return
109
           }
178
           }
110
           const params = {
179
           const params = {
111
              patient_id:this.patient_id,
180
              patient_id:this.patient_id,
112
-             medicineData:this.medicineData
181
+             medicineData:this.multipleSelection
113
           }
182
           }
114
-         console.log("params----",params)
115
-       
116
          SaveSelfMedicines(params).then(response=>{
183
          SaveSelfMedicines(params).then(response=>{
117
              if(response.data.state == 1){
184
              if(response.data.state == 1){
118
                 var msg = response.data.data.msg
185
                 var msg = response.data.data.msg
123
                 this.$message.error("药品名称规格已存在")
190
                 this.$message.error("药品名称规格已存在")
124
              }
191
              }
125
            })   
192
            })   
126
-        }
193
+        },
127
     },
194
     },
128
   created(){
195
   created(){
129
        //获取所有药品名称
196
        //获取所有药品名称

+ 2 - 1
src/xt_pages/stock/selfPreparedMedicine/index.vue Просмотреть файл

46
                 <div style="width:160px;">
46
                 <div style="width:160px;">
47
                     <div class="tablesTitle">患者列表</div>
47
                     <div class="tablesTitle">患者列表</div>
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
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
                         <el-table-column align="center" prop="dialysis_no" label="透析号" width="70">
51
                         <el-table-column align="center" prop="dialysis_no" label="透析号" width="70">
51
                             <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
52
                             <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
52
                         </el-table-column>
53
                         </el-table-column>

+ 4 - 2
src/xt_pages/stock/stockInOrderAdd.vue Просмотреть файл

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

+ 4 - 2
src/xt_pages/stock/stockInOrderEdit.vue Просмотреть файл

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

+ 3 - 2
src/xt_pages/stock/stockOutOrderAdd.vue Просмотреть файл

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

+ 4 - 2
src/xt_pages/stock/stockOutOrderEdit.vue Просмотреть файл

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

+ 211 - 258
src/xt_pages/user/components/EditGroupAdvice.vue Просмотреть файл

202
       </el-form>
202
       </el-form>
203
     </el-dialog>
203
     </el-dialog>
204
 
204
 
205
+
206
+   <!-- 编辑选则医嘱模版 -->
205
     <el-dialog
207
     <el-dialog
206
       title="选择医嘱模板"
208
       title="选择医嘱模板"
207
       :visible.sync="templateFormVisible"
209
       :visible.sync="templateFormVisible"
331
         </el-button>
333
         </el-button>
332
       </div>
334
       </div>
333
     </el-dialog>
335
     </el-dialog>
336
+
337
+
334
     <el-dialog
338
     <el-dialog
335
       title="选择医嘱模板"
339
       title="选择医嘱模板"
336
       :visible.sync="oldTemplateFormVisible"
340
       :visible.sync="oldTemplateFormVisible"
382
         <el-row>
386
         <el-row>
383
           <el-col :span="10">
387
           <el-col :span="10">
384
             <el-form-item label="医嘱内容 :" required prop="advice_name">
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
                 v-model="nameForm.advice_name"
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
             </el-form-item>
400
             </el-form-item>
404
           </el-col>
401
           </el-col>
408
             <!--</el-form-item>-->
405
             <!--</el-form-item>-->
409
             <el-form-item label="药品规格 :" prop="advice_desc">
406
             <el-form-item label="药品规格 :" prop="advice_desc">
410
               <el-col :span="10">
407
               <el-col :span="10">
411
-                 <el-select
408
+                <el-autocomplete
409
+                  style="width:100px;"
410
+                  class="inline-input"
412
                   v-model="nameForm.advice_desc"
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
               </el-col>
416
               </el-col>
429
               <el-col class="line" :span="2">&nbsp;</el-col>
417
               <el-col class="line" :span="2">&nbsp;</el-col>
430
               <el-col :span="10">
418
               <el-col :span="10">
641
         index: 0,
629
         index: 0,
642
         id: 0,
630
         id: 0,
643
         children: [],
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
       drugOptions: [],
638
       drugOptions: [],
856
         .catch(() => {});
845
         .catch(() => {});
857
     },
846
     },
858
     submitNameForm(formName) {
847
     submitNameForm(formName) {
859
-     
848
+       console.log("888888",this.nameForm)
860
       if(this.src_type == ""){
849
       if(this.src_type == ""){
861
           this.nameForm.way = 0
850
           this.nameForm.way = 0
862
           this.nameForm.drug_id = 0
851
           this.nameForm.drug_id = 0
866
           var arr = this.nameForm.advice_name.split("(自备药)")
855
           var arr = this.nameForm.advice_name.split("(自备药)")
867
           this.nameForm.advice_name = arr[0]
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
       var _this = this;
859
       var _this = this;
898
       this.$refs[formName].validate(valid => {
860
       this.$refs[formName].validate(valid => {
899
         if (valid) {
861
         if (valid) {
900
           if (_this.nameForm.isEdit) {
862
           if (_this.nameForm.isEdit) {
901
             var submitForm = null;
863
             var submitForm = null;
902
             if (!this.isChild) {
864
             if (!this.isChild) {
865
+              console.log("进来了吗")
903
               submitForm = {
866
               submitForm = {
904
                 advice_type: _this.groupForm.advice_type,
867
                 advice_type: _this.groupForm.advice_type,
905
                 advice_date: _this.groupForm.advice_date,
868
                 advice_date: _this.groupForm.advice_date,
914
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
877
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
915
                 delivery_way: _this.nameForm.delivery_way,
878
                 delivery_way: _this.nameForm.delivery_way,
916
                 execution_frequency: _this.nameForm.execution_frequency,
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
                 isEdit: 0,
883
                 isEdit: 0,
918
                 id: 0,
884
                 id: 0,
919
                 advice_doctor: "",
885
                 advice_doctor: "",
943
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
909
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
944
                 delivery_way: _this.nameForm.delivery_way,
910
                 delivery_way: _this.nameForm.delivery_way,
945
                 execution_frequency: _this.nameForm.execution_frequency,
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
                 isEdit: 0,
915
                 isEdit: 0,
947
                 id: 0,
916
                 id: 0,
948
                 advice_doctor: "",
917
                 advice_doctor: "",
951
                 groupno: _this.groupForm.groupno,
920
                 groupno: _this.groupForm.groupno,
952
                 frequency_type: 0,
921
                 frequency_type: 0,
953
                 day_count: "0",
922
                 day_count: "0",
954
-                week_days: ""
923
+                week_days: "",
924
+              
955
               };
925
               };
956
             }
926
             }
957
             let mode = "";
927
             let mode = "";
958
 
928
 
959
             if (_this.groupForm.advice_type == 1) {
929
             if (_this.groupForm.advice_type == 1) {
960
-              // if(_this.nameForm.)
930
+            
961
               mode = "1-3";
931
               mode = "1-3";
962
               if (
932
               if (
963
                 _this.groupForm.doctor != _this.$store.getters.xt_user.user.id
933
                 _this.groupForm.doctor != _this.$store.getters.xt_user.user.id
972
                 mode = "3-1";
942
                 mode = "3-1";
973
               }
943
               }
974
             }
944
             }
975
-
945
+            console.log("编辑",submitForm)
976
             EditNewDoctorAdvice(
946
             EditNewDoctorAdvice(
977
               this.patientID,
947
               this.patientID,
978
               this.groupSelectRow.id,
948
               this.groupSelectRow.id,
998
                   ) {
968
                   ) {
999
                     var advice = response.data.data.advice;
969
                     var advice = response.data.data.advice;
1000
                     _this.adviceTableData[index].drug_spec = advice.drug_spec;
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
                     _this.adviceTableData[index].start_time = advice.start_time;
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
                     _this.adviceTableData[index].day_count = advice.day_count;
982
                     _this.adviceTableData[index].day_count = advice.day_count;
1024
                     _this.adviceTableData[index].week_day = advice.week_day;
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
                     break;
987
                     break;
1027
                   }
988
                   }
1028
                 }
989
                 }
1038
                       var children =
999
                       var children =
1039
                         _this.groupForm.adviceNames[index].children;
1000
                         _this.groupForm.adviceNames[index].children;
1040
                       for (let j = 0; j < ale; j++) {
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
                           _this.$set(
1017
                           _this.$set(
1078
                             _this.groupForm.adviceNames[index].children,
1018
                             _this.groupForm.adviceNames[index].children,
1079
                             j,
1019
                             j,
1086
                   }
1026
                   }
1087
                 } else {
1027
                 } else {
1088
                   for (let index = 0; index < ale; index++) {
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
                       console.log(_this.weeks);
1046
                       console.log(_this.weeks);
1124
                       _this.$set(
1047
                       _this.$set(
1125
                         _this.groupForm.adviceNames,
1048
                         _this.groupForm.adviceNames,
1149
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
1072
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
1150
                 delivery_way: _this.nameForm.delivery_way,
1073
                 delivery_way: _this.nameForm.delivery_way,
1151
                 execution_frequency: _this.nameForm.execution_frequency,
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
                 isEdit: 0,
1078
                 isEdit: 0,
1153
                 id: 0,
1079
                 id: 0,
1154
                 advice_doctor: "",
1080
                 advice_doctor: "",
1155
                 remark: _this.groupForm.remark,
1081
                 remark: _this.groupForm.remark,
1156
                 parent_id: _this.groupSelectRow.id,
1082
                 parent_id: _this.groupSelectRow.id,
1157
-                groupno: _this.groupForm.groupno
1083
+                groupno: _this.groupForm.groupno,
1084
+               
1158
               };
1085
               };
1159
 
1086
 
1160
               let mode = "";
1087
               let mode = "";
1163
               } else {
1090
               } else {
1164
                 mode = "1-1";
1091
                 mode = "1-1";
1165
               }
1092
               }
1166
-
1093
+              console.log("submitFort",submitForm)
1167
               CreateNewDoctorAdvice(this.patientID, submitForm, mode).then(
1094
               CreateNewDoctorAdvice(this.patientID, submitForm, mode).then(
1168
                 response => {
1095
                 response => {
1169
                   if (response.data.state == 0) {
1096
                   if (response.data.state == 0) {
1257
                     drug_spec: "" + _this.nameForm.drug_spec,
1184
                     drug_spec: "" + _this.nameForm.drug_spec,
1258
                     drug_spec_unit: _this.nameForm.drug_spec_unit,
1185
                     drug_spec_unit: _this.nameForm.drug_spec_unit,
1259
                     prescribing_number: "" + _this.nameForm.prescribing_number,
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
                     delivery_way: _this.nameForm.delivery_way,
1188
                     delivery_way: _this.nameForm.delivery_way,
1263
                     execution_frequency: _this.nameForm.execution_frequency,
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
                     frequency_type: _this.nameForm.frequency_type,
1191
                     frequency_type: _this.nameForm.frequency_type,
1268
                     day_count: _this.nameForm.day_count.toString(),
1192
                     day_count: _this.nameForm.day_count.toString(),
1269
                     week_days: _this.nameForm.week_days,
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
                     isEdit: 0,
1197
                     isEdit: 0,
1272
                     id: 0,
1198
                     id: 0,
1273
                     children: [],
1199
                     children: [],
1286
               } else {
1212
               } else {
1287
                 mode = "1-1";
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
                 if (response.data.state == 0) {
1218
                 if (response.data.state == 0) {
1297
                   _this.$message.error(response.data.msg);
1219
                   _this.$message.error(response.data.msg);
1298
                   return false;
1220
                   return false;
1377
                         frequency_type: groups[index].frequency_type,
1299
                         frequency_type: groups[index].frequency_type,
1378
                         day_count: groups[index].day_count,
1300
                         day_count: groups[index].day_count,
1379
                         week_day: groups[index].week_day,
1301
                         week_day: groups[index].week_day,
1380
-
1302
+                        drug_name_id:0,
1303
+                        way:0,
1304
+                        drug_id:0,
1381
                         isEdit: 0,
1305
                         isEdit: 0,
1382
                         index: 0,
1306
                         index: 0,
1383
                         id: groups[index].id,
1307
                         id: groups[index].id,
1507
 
1431
 
1508
           day_count: this.groupSelectRow.day_count,
1432
           day_count: this.groupSelectRow.day_count,
1509
           week_days: this.groupSelectRow.week_day,
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
         if (!this.isChild) {
1440
         if (!this.isChild) {
1528
           delivery_way: "",
1455
           delivery_way: "",
1529
           execution_frequency: "",
1456
           execution_frequency: "",
1530
           template_id: "",
1457
           template_id: "",
1458
+          way:0,
1459
+          drug_id:0,
1460
+          drug_name_id:0,
1531
           isEdit: 0,
1461
           isEdit: 0,
1532
           index: 0,
1462
           index: 0,
1533
           id: 0,
1463
           id: 0,
1733
         }
1663
         }
1734
       }
1664
       }
1735
     },
1665
     },
1666
+
1667
+
1736
     newAddTempForm() {
1668
     newAddTempForm() {
1669
+      console.log("9999888")
1737
       this.allSelectedTemplate = [];
1670
       this.allSelectedTemplate = [];
1738
       var thisRowKey = 0;
1671
       var thisRowKey = 0;
1739
       for (const indexs in this.adviceTemplateMaps) {
1672
       for (const indexs in this.adviceTemplateMaps) {
1742
           if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
1675
           if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
1743
             thisRowKey++;
1676
             thisRowKey++;
1744
             var item = {
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
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1688
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1768
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1689
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1769
               day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
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
               week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
1692
               week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
1773
               template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
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
               isEdit: 0,
1697
               isEdit: 0,
1776
               id: 0,
1698
               id: 0,
1777
               children: [],
1699
               children: [],
1800
                     children[key].prescribing_number_unit,
1722
                     children[key].prescribing_number_unit,
1801
                   delivery_way: children[key].delivery_way,
1723
                   delivery_way: children[key].delivery_way,
1802
                   execution_frequency: children[key].execution_frequency,
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
                   isEdit: 0,
1728
                   isEdit: 0,
1804
                   id: 0,
1729
                   id: 0,
1805
                   children: [],
1730
                   children: [],
1851
           single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
1776
           single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
1852
           drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
1777
           drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
1853
           drug_spec_unit: this.allSelectedTemplate[index].drug_spec_unit,
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
           delivery_way: this.allSelectedTemplate[index].delivery_way,
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
           day_count: this.allSelectedTemplate[index].day_count.toString(),
1783
           day_count: this.allSelectedTemplate[index].day_count.toString(),
1863
           frequency_type: this.allSelectedTemplate[index].frequency_type,
1784
           frequency_type: this.allSelectedTemplate[index].frequency_type,
1864
           week_days: this.allSelectedTemplate[index].week_days,
1785
           week_days: this.allSelectedTemplate[index].week_days,
1865
           template_id: this.allSelectedTemplate[index].template_id,
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
           isEdit: 0,
1790
           isEdit: 0,
1868
           id: 0,
1791
           id: 0,
1869
           children: [],
1792
           children: [],
1887
                 prescribing_number_unit: children[key].prescribing_number_unit,
1810
                 prescribing_number_unit: children[key].prescribing_number_unit,
1888
                 delivery_way: children[key].delivery_way,
1811
                 delivery_way: children[key].delivery_way,
1889
                 execution_frequency: children[key].execution_frequency,
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
                 isEdit: 0,
1816
                 isEdit: 0,
1891
                 id: 0,
1817
                 id: 0,
1892
                 children: [],
1818
                 children: [],
1987
               frequency_type: groups[index].frequency_type,
1913
               frequency_type: groups[index].frequency_type,
1988
               week_day: groups[index].week_day,
1914
               week_day: groups[index].week_day,
1989
               template_id: groups[index].template_id,
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
               isEdit: 0,
1919
               isEdit: 0,
1992
               index: 0,
1920
               index: 0,
1993
               id: groups[index].id,
1921
               id: groups[index].id,
2015
                   isEdit: 0,
1943
                   isEdit: 0,
2016
                   index: 0,
1944
                   index: 0,
2017
                   id: childMap[item.id][key].id,
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
                   children: [],
1949
                   children: [],
2019
                   parent_row: item.row_key,
1950
                   parent_row: item.row_key,
2020
                   row_key: this.editRowKey
1951
                   row_key: this.editRowKey
2051
               .DoctorAdviceTemplate) {
1982
               .DoctorAdviceTemplate) {
2052
               _this.editRowKey++;
1983
               _this.editRowKey++;
2053
               var item = {
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
                 isEdit: 0,
1998
                 isEdit: 0,
2088
                 id: 0,
1999
                 id: 0,
2089
                 children: [],
2000
                 children: [],
2110
                     drug_spec: "" + children[key].drug_spec,
2021
                     drug_spec: "" + children[key].drug_spec,
2111
                     drug_spec_unit: children[key].drug_spec_unit,
2022
                     drug_spec_unit: children[key].drug_spec_unit,
2112
                     prescribing_number: "" + children[key].prescribing_number,
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
                     delivery_way: children[key].delivery_way,
2025
                     delivery_way: children[key].delivery_way,
2116
                     execution_frequency: children[key].execution_frequency,
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
                     isEdit: 0,
2030
                     isEdit: 0,
2118
                     id: 0,
2031
                     id: 0,
2119
                     children: [],
2032
                     children: [],
2338
       }
2251
       }
2339
     },
2252
     },
2340
     getAdviceConfig(type) {
2253
     getAdviceConfig(type) {
2254
+       console.log("type",type)
2341
       getAdviceConfig(type).then(response => {
2255
       getAdviceConfig(type).then(response => {
2342
         if (response.data.state == 1) {
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
           var templateLen = this.adviceTemplates.length;
2262
           var templateLen = this.adviceTemplates.length;
2355
           for (let index = 0; index < templateLen; index++) {
2263
           for (let index = 0; index < templateLen; index++) {
2357
               continue;
2265
               continue;
2358
             }
2266
             }
2359
 
2267
 
2360
-            var DoctorAdviceTemplate = this.adviceTemplates[index]
2361
-              .DoctorAdviceTemplate;
2268
+            var DoctorAdviceTemplate = this.adviceTemplates[index].DoctorAdviceTemplate;
2362
             for (let i = 0; i < DoctorAdviceTemplate.length; i++) {
2269
             for (let i = 0; i < DoctorAdviceTemplate.length; i++) {
2363
               DoctorAdviceTemplate[i].selection = false;
2270
               DoctorAdviceTemplate[i].selection = false;
2364
             }
2271
             }
2489
                 obj.custom_id = this.rand(10000000, 99999999)
2396
                 obj.custom_id = this.rand(10000000, 99999999)
2490
                 obj.drug_specs = base_drug_list[i].drug_specs
2397
                 obj.drug_specs = base_drug_list[i].drug_specs
2491
                 this.all_drug.push(obj)
2398
                 this.all_drug.push(obj)
2492
-                console.log("中2222222222222222222",this.all_drug)
2399
+                
2493
               }
2400
               }
2494
             }   
2401
             }   
2495
         })
2402
         })
2518
             this.src_type = this.drugSpec[i].type
2425
             this.src_type = this.drugSpec[i].type
2519
             this.nameForm.drug_id = this.drugSpec[i].id
2426
             this.nameForm.drug_id = this.drugSpec[i].id
2520
             this.nameForm.way = this.drugSpec[i].type
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
   watch: {
2478
   watch: {
2526
     rowKey: function() {
2479
     rowKey: function() {

+ 164 - 68
src/xt_pages/user/doctorAdvice.vue Просмотреть файл

945
           <el-row>
945
           <el-row>
946
             <el-col :span="10">
946
             <el-col :span="10">
947
               <el-form-item label="医嘱内容:" required prop="advice_name">
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
               <!-- <div style="color:red;font-size:12px;">
957
               <!-- <div style="color:red;font-size:12px;">
968
                 库存不足50
958
                 库存不足50
969
               </div> -->
959
               </div> -->
972
 
962
 
973
             <el-col :span="14">
963
             <el-col :span="14">
974
               <el-form-item label="药品规格 :" prop="advice_desc">
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
                 </el-col>
977
                 </el-col>
996
                 <el-col class="line" :span="2">&nbsp;</el-col>
978
                 <el-col class="line" :span="2">&nbsp;</el-col>
1176
         ref="editGroupForm"
1158
         ref="editGroupForm"
1177
       ></edit-group-advice>
1159
       ></edit-group-advice>
1178
 
1160
 
1161
+
1162
+    <!-- 新增子药 -->
1179
       <el-dialog
1163
       <el-dialog
1180
         :title="dialogTitle"
1164
         :title="dialogTitle"
1181
         :visible.sync="dialogFormVisible"
1165
         :visible.sync="dialogFormVisible"
1236
             </el-col>
1220
             </el-col>
1237
             <el-col :span="12">
1221
             <el-col :span="12">
1238
               <el-form-item label="医嘱内容 :" required prop="advice_name">
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
               </el-form-item>
1232
               </el-form-item>
1252
             </el-col>
1233
             </el-col>
1253
 
1234
 
1254
             <el-col :span="12">
1235
             <el-col :span="12">
1255
               <el-form-item label="药品规格 :" prop="advice_desc">
1236
               <el-form-item label="药品规格 :" prop="advice_desc">
1256
                 <el-col :span="9">
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
                 </el-col>
1249
                 </el-col>
1259
                 <el-col class="line" :span="1">&nbsp;</el-col>
1250
                 <el-col class="line" :span="1">&nbsp;</el-col>
1260
                 <el-col :span="14">
1251
                 <el-col :span="14">
2090
         execution_frequency: "",
2081
         execution_frequency: "",
2091
         advice_doctor: "",
2082
         advice_doctor: "",
2092
         remark: "",
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
       nameForm: {
2089
       nameForm: {
2096
         advice_name: "",
2090
         advice_name: "",
2234
               mode = "3-1";
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
           EditNewDoctorAdvice(
2243
           EditNewDoctorAdvice(
2239
             this.patientID,
2244
             this.patientID,
2240
             this.adviceForm.id,
2245
             this.adviceForm.id,
2301
             remark: this.groupForm.remark,
2306
             remark: this.groupForm.remark,
2302
             parent_id: this.groupForm.parent_id,
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
           var adviceNames = [];
2311
           var adviceNames = [];
2309
           for (const index in this.groupForm.adviceNames) {
2312
           for (const index in this.groupForm.adviceNames) {
2316
           }
2319
           }
2317
           submitForm.adviceNames = adviceNames;
2320
           submitForm.adviceNames = adviceNames;
2318
 
2321
 
2319
-
2320
-         
2321
-
2322
           let mode = "";
2322
           let mode = "";
2323
           if (this.groupForm.advice_type == 1) {
2323
           if (this.groupForm.advice_type == 1) {
2324
             mode = "1-2";
2324
             mode = "1-2";
2325
           } else if (this.groupForm.advice_type == 3) {
2325
           } else if (this.groupForm.advice_type == 3) {
2326
             mode = "1-1";
2326
             mode = "1-1";
2327
           }
2327
           }
2328
-        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
               for(let index=0;index<submitForm.adviceNames.length;index++){
2332
               for(let index=0;index<submitForm.adviceNames.length;index++){
2333
                   for(let i=0;i<this.medicals.length;i++){
2333
                   for(let i=0;i<this.medicals.length;i++){
2334
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
2334
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
2421
             //临时
2421
             //临时
2422
             mode = "1-1";
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
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2436
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2426
             response => {
2437
             response => {
2427
               if (response.data.state == 0) {
2438
               if (response.data.state == 0) {
2688
           id: 0,
2699
           id: 0,
2689
           children: [],
2700
           children: [],
2690
           parent_row: 0,
2701
           parent_row: 0,
2691
-          way:"",
2692
-          drug_id:'',
2702
+          way:0,
2703
+          drug_id:0,
2693
           drug_name_id:0,
2704
           drug_name_id:0,
2694
         };
2705
         };
2695
         this.nameFormTitle = "新增医嘱内容";
2706
         this.nameFormTitle = "新增医嘱内容";
2958
     },
2969
     },
2959
     openConfig() {},
2970
     openConfig() {},
2960
     openEditGroupAdvice(groupno) {
2971
     openEditGroupAdvice(groupno) {
2972
+      console.log("groupno",groupno)
2961
       var groups = [];
2973
       var groups = [];
2962
       this.rowKey = 0;
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
       for (const index in this.adviceTableData) {
2981
       for (const index in this.adviceTableData) {
2964
         if (groupno == this.adviceTableData[index].groupno) {
2982
         if (groupno == this.adviceTableData[index].groupno) {
2965
           groups.push(this.adviceTableData[index]);
2983
           groups.push(this.adviceTableData[index]);
2979
         remark: groups[0].remark,
2997
         remark: groups[0].remark,
2980
         groupno: groupno
2998
         groupno: groupno
2981
       };
2999
       };
2982
-      // console.log(groups[0]);
3000
+      console.log("到了",groups[0]);
2983
 
3001
 
2984
       var childMap = {};
3002
       var childMap = {};
2985
       for (const index in groups) {
3003
       for (const index in groups) {
3023
           row_key: this.rowKey,
3041
           row_key: this.rowKey,
3024
           table: []
3042
           table: []
3025
         };
3043
         };
3026
-        console.log("itme-----------",item)
3044
+      
3027
         if (item.id in childMap) {
3045
         if (item.id in childMap) {
3028
           for (const key in childMap[item.id]) {
3046
           for (const key in childMap[item.id]) {
3029
             this.rowKey++;
3047
             this.rowKey++;
3063
     },
3081
     },
3064
 
3082
 
3065
     openEdit(index, row) {
3083
     openEdit(index, row) {
3084
+      
3066
       this.currentIndex = index;
3085
       this.currentIndex = index;
3067
       (this.dialogTitle = "修改医嘱"), (this.isEdit = true);
3086
       (this.dialogTitle = "修改医嘱"), (this.isEdit = true);
3068
 
3087
 
4040
           var arr = this.nameForm.advice_name.split("(自备药)")
4059
           var arr = this.nameForm.advice_name.split("(自备药)")
4041
           this.nameForm.advice_name = arr[0]
4060
           this.nameForm.advice_name = arr[0]
4042
        }
4061
        }
4043
-      
4062
+      console.log("医嘱2222",this.nameForm)
4044
       var _this = this;
4063
       var _this = this;
4045
       this.$refs[formName].validate(valid => {
4064
       this.$refs[formName].validate(valid => {
4046
         if (valid) {
4065
         if (valid) {
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
    changeDrugName(name){
4548
    changeDrugName(name){
4496
        this.current_drug_name = name
4549
        this.current_drug_name = name
4497
        this.nameForm.advice_desc = ''
4550
        this.nameForm.advice_desc = ''
4515
             this.src_type = this.drugSpec[i].type
4568
             this.src_type = this.drugSpec[i].type
4516
             this.nameForm.drug_id = this.drugSpec[i].id
4569
             this.nameForm.drug_id = this.drugSpec[i].id
4517
             this.nameForm.way = this.drugSpec[i].type
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
             if(this.drugSpec[i].drug_name_id){
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
     rand(min, max) {
4582
     rand(min, max) {
4525
         return Math.floor(Math.random() * (max - min)) + min;
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
   watch: {
4624
   watch: {
4529
     adviceTableData: function() {
4625
     adviceTableData: function() {