浏览代码

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

csx 4 年前
父节点
当前提交
2861259552

+ 1 - 1
src/xt_pages/data/components/consumables.vue 查看文件

@@ -48,7 +48,7 @@
48 48
       v-loading="goodInfo.loading"
49 49
     >
50 50
       <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
51
-      <el-table-column label="名称" align="center">
51
+      <el-table-column label="耗材名称" align="center">
52 52
         <template slot-scope="scope">
53 53
           {{ scope.row.good_name }}
54 54
         </template>

+ 3 - 4
src/xt_pages/data/druguseTemplate.vue 查看文件

@@ -319,7 +319,7 @@
319 319
                         clearable
320 320
                         allow-create
321 321
                         placeholder="请选择(输入可搜索)"
322
-                        style="width:200px"
322
+                        style="width:100%"
323 323
                         @change="changeDrugName"
324 324
                     >
325 325
                       <el-option
@@ -793,7 +793,7 @@
793 793
                         clearable
794 794
                         allow-create
795 795
                         placeholder="请选择(输入可搜索)"
796
-                        style="width:200px"
796
+                        style="width:100%;"
797 797
                         @change="changeDrugName"
798 798
                     >
799 799
                       <el-option
@@ -805,7 +805,7 @@
805 805
                      </el-select>
806 806
                     </el-form-item>
807 807
                   </el-col>
808
-                  <el-col :span="15">
808
+                  <el-col :span="12">
809 809
 
810 810
                     <el-form-item label="药品规格 :" prop="advice_desc">
811 811
                       <el-col :span="9">
@@ -816,7 +816,6 @@
816 816
                           clearable
817 817
                           allow-create
818 818
                           placeholder="请选择(输入可搜索)"
819
-                          style="width:150px"
820 819
                           @change="changeDrugDesc"
821 820
                         >
822 821
                         <el-option

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

@@ -377,7 +377,7 @@
377 377
                 allow-create
378 378
                 :disabled="isChild"
379 379
                 placeholder="请选择(输入可搜索)"
380
-                style="width:200px"
380
+                style="width:100%"
381 381
                 @change="changeDrugName"
382 382
               >
383 383
                 <el-option
@@ -396,12 +396,12 @@
396 396
 
397 397
         </el-row>
398 398
         <el-row>
399
-          <el-col :span="13">
399
+          <el-col :span="12">
400 400
             <!--<el-form-item label="规格 :" prop="advice_desc">-->
401 401
             <!--<el-input v-model="nameForm.advice_desc"></el-input>-->
402 402
             <!--</el-form-item>-->
403 403
             <el-form-item label="药品规格 :" prop="advice_desc">
404
-              <el-col :span="10">
404
+              <el-col :span="8">
405 405
                 <!-- <el-input v-model="nameForm.advice_desc"></el-input> -->
406 406
                  <el-select
407 407
                   v-model="nameForm.advice_desc"
@@ -410,7 +410,6 @@
410 410
                   allow-create
411 411
                   :disabled="isChild"
412 412
                   placeholder="请选择(输入可搜索)"
413
-                  style="width:150px"
414 413
                   @change="changeDrugDesc"
415 414
                 >
416 415
                   <el-option
@@ -423,14 +422,13 @@
423 422
 
424 423
               </el-col>
425 424
               <el-col class="line" :span="2">&nbsp;</el-col>
426
-              <el-col :span="10">
425
+              <el-col :span="14">
427 426
                 <el-select
428 427
                   v-model="nameForm.drug_spec_unit"
429 428
                   filterable
430 429
                   clearable
431 430
                   allow-create
432 431
                   placeholder="选择"
433
-                  style="width:120px"
434 432
                 >
435 433
                   <el-option
436 434
                     v-for="item in unitsOption"
@@ -442,7 +440,7 @@
442 440
               </el-col>
443 441
             </el-form-item>
444 442
           </el-col>
445
-          <el-col :span="9">
443
+          <el-col :span="12">
446 444
             <el-form-item label="开药数量 :" prop="prescribing_number">
447 445
               <el-col :span="8">
448 446
                 <el-input v-model="nameForm.prescribing_number"></el-input>
@@ -647,7 +645,8 @@ export default {
647 645
       current_drug_name:"",
648 646
       current_drug_spec: "",
649 647
       drug_id: 0,
650
-      src_type:""
648
+      src_type:"",
649
+      private_drug_config:{},
651 650
     };
652 651
   },
653 652
   props: {
@@ -699,10 +698,9 @@ export default {
699 698
   },
700 699
   methods: {
701 700
     submitgroupAdvice(formName) {
702
-      
703 701
       this.$refs[formName].validate(valid => {
704 702
         if (valid) {
705
-          var submitForm = {
703
+         var submitForm = {
706 704
             advice_type: this.groupForm.advice_type,
707 705
             advice_date: this.groupForm.advice_date,
708 706
             start_time: this.groupForm.start_time,
@@ -711,8 +709,7 @@ export default {
711 709
             remark: this.groupForm.remark,
712 710
             parent_id: this.groupForm.parent_id
713 711
           };
714
-          
715
-          console.log("888888",this.groupForm.adviceNames)
712
+         
716 713
           var adviceNames = [];
717 714
           for (const index in this.groupForm.adviceNames) {
718 715
             adviceNames.unshift(this.groupForm.adviceNames[index]);
@@ -720,9 +717,18 @@ export default {
720 717
           submitForm.adviceNames = adviceNames;
721 718
           let mode = "1";
722 719
           
723
-     
724 720
           console.log("88888888",submitForm)
725
-          
721
+          console.log("99999",this.medicals)
722
+          if(this.private_drug_config.drug_start == 1){
723
+           
724
+             for(let index=0;index<submitForm.adviceNames.length;index++){
725
+                for(let i=0;i<this.medicals.length;i++){
726
+                   if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
727
+                      submitForm.adviceNames[index].way = 2
728
+                   }
729
+                }
730
+             }
731
+          }
726 732
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
727 733
             response => {
728 734
               if (response.data.state == 0) {
@@ -1134,6 +1140,7 @@ export default {
1134 1140
       }
1135 1141
     },
1136 1142
     templateTableChange(currentRow, oldCurrentRow) {
1143
+      console.log("params -----",currentRow)
1137 1144
       this.selectedTemp = { id: 0, name: "", org_id: 0, list: [], rows: [] };
1138 1145
       if (currentRow == null) {
1139 1146
         return false;
@@ -1148,40 +1155,20 @@ export default {
1148 1155
           .DoctorAdviceTemplate) {
1149 1156
           thisRowKey++;
1150 1157
           var item = {
1151
-            advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1152
-              index
1153
-            ].advice_name,
1154
-            advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1155
-              index
1156
-            ].advice_desc,
1157
-            single_dose:
1158
-              "" +
1159
-              this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
1160
-                .single_dose,
1161
-            single_dose_unit: this.adviceTemplateMaps[mapid]
1162
-              .DoctorAdviceTemplate[index].single_dose_unit,
1163
-            drug_spec:
1164
-              "" +
1165
-              this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_spec,
1158
+            advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_name,
1159
+            advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_desc,
1160
+            single_dose:"" +this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].single_dose,
1161
+            single_dose_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].single_dose_unit,
1162
+            drug_spec:"" +this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_spec,
1166 1163
             drug_spec_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_spec_unit,
1167
-            prescribing_number:
1168
-              "" +
1169
-              this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
1170
-                .prescribing_number,
1171
-            prescribing_number_unit: this.adviceTemplateMaps[mapid]
1172
-              .DoctorAdviceTemplate[index].prescribing_number_unit,
1173
-            delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1174
-              index
1175
-            ].delivery_way,
1176
-            execution_frequency: this.adviceTemplateMaps[mapid]
1177
-              .DoctorAdviceTemplate[index].execution_frequency,
1178
-            selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1179
-              index
1180
-            ].selection,
1181
-            advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1182
-              index
1183
-            ].id,
1184
-
1164
+            prescribing_number:"" +this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].prescribing_number,
1165
+            prescribing_number_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].prescribing_number_unit,
1166
+            delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].delivery_way,
1167
+            execution_frequency: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].execution_frequency,
1168
+            selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].selection,
1169
+            advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].id,
1170
+            drug_id:this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_id,
1171
+            way:this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].way,
1185 1172
             isEdit: 0,
1186 1173
             id: 0,
1187 1174
             children: [],
@@ -1212,11 +1199,14 @@ export default {
1212 1199
                 prescribing_number_unit: children[key].prescribing_number_unit,
1213 1200
                 delivery_way: children[key].delivery_way,
1214 1201
                 execution_frequency: children[key].execution_frequency,
1202
+                drug_id:children[key].drug_id,
1203
+                way:children[key].way,
1215 1204
                 isEdit: 0,
1216 1205
                 id: 0,
1217 1206
                 children: [],
1218 1207
                 parent_row: parentRow,
1219
-                row_key: thisRowKey
1208
+                row_key: thisRowKey,
1209
+               
1220 1210
               };
1221 1211
               item.children.push(child);
1222 1212
             }
@@ -1236,36 +1226,27 @@ export default {
1236 1226
           if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
1237 1227
             thisRowKey++;
1238 1228
             var item = {
1239
-              advice_name:
1240
-                adviceTemplate.DoctorAdviceTemplate[index].advice_name,
1241
-              advice_desc:
1242
-                adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
1243
-              single_dose:
1244
-                "" + adviceTemplate.DoctorAdviceTemplate[index].single_dose,
1245
-              single_dose_unit:
1246
-                adviceTemplate.DoctorAdviceTemplate[index].single_dose_unit,
1247
-              drug_spec:
1248
-                "" + adviceTemplate.DoctorAdviceTemplate[index].drug_spec,
1249
-              drug_spec_unit:
1250
-                adviceTemplate.DoctorAdviceTemplate[index].drug_spec_unit,
1251
-              prescribing_number:
1252
-                "" +
1253
-                adviceTemplate.DoctorAdviceTemplate[index].prescribing_number,
1254
-              prescribing_number_unit:
1255
-                adviceTemplate.DoctorAdviceTemplate[index]
1256
-                  .prescribing_number_unit,
1257
-              delivery_way:
1258
-                adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
1259
-              execution_frequency:
1260
-                adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
1229
+              advice_name:adviceTemplate.DoctorAdviceTemplate[index].advice_name,
1230
+              advice_desc:adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
1231
+              single_dose:"" + adviceTemplate.DoctorAdviceTemplate[index].single_dose,
1232
+              single_dose_unit:adviceTemplate.DoctorAdviceTemplate[index].single_dose_unit,
1233
+              drug_spec:"" + adviceTemplate.DoctorAdviceTemplate[index].drug_spec,
1234
+              drug_spec_unit:adviceTemplate.DoctorAdviceTemplate[index].drug_spec_unit,
1235
+              prescribing_number:"" +adviceTemplate.DoctorAdviceTemplate[index].prescribing_number,
1236
+              prescribing_number_unit:adviceTemplate.DoctorAdviceTemplate[index].prescribing_number_unit,
1237
+              delivery_way:adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
1238
+              execution_frequency:adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
1261 1239
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1262 1240
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1241
+              drug_id: adviceTemplate.DoctorAdviceTemplate[index].drug_id,
1242
+              way:adviceTemplate.DoctorAdviceTemplate[index].way,
1263 1243
               isEdit: 0,
1264 1244
               id: 0,
1265 1245
               children: [],
1266 1246
               parent_row: 0,
1267 1247
               row_key: thisRowKey
1268 1248
             };
1249
+            console.log("items========",item)
1269 1250
             if (
1270 1251
               "children" in adviceTemplate.DoctorAdviceTemplate[index] &&
1271 1252
               adviceTemplate.DoctorAdviceTemplate[index].children.length > 0
@@ -1284,16 +1265,18 @@ export default {
1284 1265
                   drug_spec: "" + children[key].drug_spec,
1285 1266
                   drug_spec_unit: children[key].drug_spec_unit,
1286 1267
                   prescribing_number: "" + children[key].prescribing_number,
1287
-                  prescribing_number_unit:
1288
-                    children[key].prescribing_number_unit,
1268
+                  prescribing_number_unit:children[key].prescribing_number_unit,
1289 1269
                   delivery_way: children[key].delivery_way,
1290 1270
                   execution_frequency: children[key].execution_frequency,
1271
+                  drug_id:children[key].drug_id,
1272
+                  way:children[key].way,
1291 1273
                   isEdit: 0,
1292 1274
                   id: 0,
1293 1275
                   children: [],
1294 1276
                   parent_row: parentRow,
1295 1277
                   row_key: thisRowKey
1296 1278
                 };
1279
+                conosle.log("item======",child)
1297 1280
                 item.children.push(child);
1298 1281
                 this.allSelectedTemplate.unshift(child);
1299 1282
               }
@@ -1329,13 +1312,12 @@ export default {
1329 1312
           single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
1330 1313
           drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
1331 1314
           drug_spec_unit: this.allSelectedTemplate[index].drug_spec_unit,
1332
-          prescribing_number:
1333
-            "" + this.allSelectedTemplate[index].prescribing_number,
1334
-          prescribing_number_unit: this.allSelectedTemplate[index]
1335
-            .prescribing_number_unit,
1315
+          prescribing_number:"" + this.allSelectedTemplate[index].prescribing_number,
1316
+          prescribing_number_unit: this.allSelectedTemplate[index].prescribing_number_unit,
1336 1317
           delivery_way: this.allSelectedTemplate[index].delivery_way,
1337
-          execution_frequency: this.allSelectedTemplate[index]
1338
-            .execution_frequency,
1318
+          execution_frequency: this.allSelectedTemplate[index].execution_frequency,
1319
+          drug_id:this.allSelectedTemplate[index].drug_id,
1320
+          way:this.allSelectedTemplate[index].way,
1339 1321
           isEdit: 0,
1340 1322
           id: 0,
1341 1323
           children: [],
@@ -1360,6 +1342,8 @@ export default {
1360 1342
                 prescribing_number_unit: children[key].prescribing_number_unit,
1361 1343
                 delivery_way: children[key].delivery_way,
1362 1344
                 execution_frequency: children[key].execution_frequency,
1345
+                drug_id:children[key].drug_id,
1346
+                way:children[key].way,
1363 1347
                 isEdit: 0,
1364 1348
                 id: 0,
1365 1349
                 children: [],
@@ -1524,8 +1508,8 @@ export default {
1524 1508
             var base_drug_list = response.data.data.base_drug_list
1525 1509
             var base_drug_cofig = response.data.data.base_drug_config
1526 1510
             var private_drug_cofig = response.data.data.private_drug_config
1527
-
1528
-
1511
+       
1512
+        
1529 1513
             if(private_drug_cofig != null&&private_drug_cofig.drug_start == 1) {
1530 1514
 
1531 1515
               for (let i = 0; i < medicalList.length; i++) {
@@ -1596,6 +1580,8 @@ export default {
1596 1580
                 obj.drug_specs = base_drug_list[i].drug_specs
1597 1581
                 this.all_drug.push(obj)
1598 1582
               }
1583
+              this.private_drug_config = response.data.data.private_drug_config
1584
+              this.medicals = medicalList
1599 1585
             }   
1600 1586
         })
1601 1587
        

+ 47 - 34
src/xt_pages/user/doctorAdvice.vue 查看文件

@@ -2188,6 +2188,7 @@ export default {
2188 2188
       doctorAdvice: [],
2189 2189
       dataAdvice: [],
2190 2190
       medicals:[],
2191
+      private_drug_config:{},
2191 2192
       patient_id:"",
2192 2193
       drugSpec:[],
2193 2194
       all_drug:[],
@@ -2287,6 +2288,7 @@ export default {
2287 2288
       });
2288 2289
     },
2289 2290
     submitgroupAdvice(formName) {
2291
+     
2290 2292
       this.addLoading = true;
2291 2293
       this.$refs[formName].validate(valid => {
2292 2294
         if (valid) {
@@ -2299,7 +2301,7 @@ export default {
2299 2301
             remark: this.groupForm.remark,
2300 2302
             parent_id: this.groupForm.parent_id
2301 2303
           };
2302
-
2304
+       
2303 2305
           var adviceNames = [];
2304 2306
           for (const index in this.groupForm.adviceNames) {
2305 2307
             this.groupForm.adviceNames[
@@ -2310,6 +2312,19 @@ export default {
2310 2312
             adviceNames.unshift(this.groupForm.adviceNames[index]);
2311 2313
           }
2312 2314
           submitForm.adviceNames = adviceNames;
2315
+
2316
+
2317
+          console.log("22222",submitForm)
2318
+          if(this.private_drug_config.drug_start == 1){
2319
+              for(let index=0;index<submitForm.adviceNames.length;index++){
2320
+                  for(let i=0;i<this.medicals.length;i++){
2321
+                    if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
2322
+                        submitForm.adviceNames[index].way = 2
2323
+                    }
2324
+                  }
2325
+              }
2326
+            }
2327
+
2313 2328
           let mode = "";
2314 2329
           if (this.groupForm.advice_type == 1) {
2315 2330
             mode = "1-2";
@@ -2987,7 +3002,8 @@ export default {
2987 3002
           frequency_type: groups[index].frequency_type,
2988 3003
           day_count: groups[index].day_count,
2989 3004
           week_day: groups[index].week_day,
2990
-
3005
+          drug_id:groups[index].drug_id,
3006
+          wary:groups[index].way,
2991 3007
           isEdit: 0,
2992 3008
           index: 0,
2993 3009
           id: groups[index].id,
@@ -3012,6 +3028,8 @@ export default {
3012 3028
                 childMap[item.id][key].prescribing_number_unit,
3013 3029
               delivery_way: childMap[item.id][key].delivery_way,
3014 3030
               execution_frequency: childMap[item.id][key].execution_frequency,
3031
+              drug_id:childMap[item.id][key].drug_id,
3032
+              way:childMap[item.id][key].way,
3015 3033
               isEdit: 0,
3016 3034
               index: 0,
3017 3035
               id: childMap[item.id][key].id,
@@ -3662,7 +3680,8 @@ export default {
3662 3680
             frequency_type: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
3663 3681
               index
3664 3682
             ].frequency_type,
3665
-
3683
+            drug_id:this.adviceTemplateMaps[mapid].drug_id,
3684
+            way:this.adviceTemplateMaps[mapid].way,
3666 3685
             isEdit: 0,
3667 3686
             id: 0,
3668 3687
             children: [],
@@ -3693,7 +3712,8 @@ export default {
3693 3712
                 prescribing_number_unit: children[key].prescribing_number_unit,
3694 3713
                 delivery_way: children[key].delivery_way,
3695 3714
                 execution_frequency: children[key].execution_frequency,
3696
-
3715
+                drug_id:children[key].drug_id,
3716
+                way:children[key].way,
3697 3717
                 isEdit: 0,
3698 3718
                 id: 0,
3699 3719
                 children: [],
@@ -3749,13 +3769,15 @@ export default {
3749 3769
                 adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
3750 3770
               week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
3751 3771
               template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
3752
-
3772
+              drug_id: adviceTemplate.DoctorAdviceTemplate[index].drug_id,
3773
+              way:adviceTemplate.DoctorAdviceTemplate[index].way,
3753 3774
               isEdit: 0,
3754 3775
               id: 0,
3755 3776
               children: [],
3756 3777
               parent_row: 0,
3757 3778
               row_key: thisRowKey
3758 3779
             };
3780
+            console.log("item22222222",item)
3759 3781
             if (
3760 3782
               "children" in adviceTemplate.DoctorAdviceTemplate[index] &&
3761 3783
               adviceTemplate.DoctorAdviceTemplate[index].children.length > 0
@@ -3780,12 +3802,15 @@ export default {
3780 3802
                     children[key].prescribing_number_unit,
3781 3803
                   delivery_way: children[key].delivery_way,
3782 3804
                   execution_frequency: children[key].execution_frequency,
3805
+                  drug_id:children[key].drug_id,
3806
+                  way:children[key].way,
3783 3807
                   isEdit: 0,
3784 3808
                   id: 0,
3785 3809
                   children: [],
3786 3810
                   parent_row: parentRow,
3787 3811
                   row_key: thisRowKey
3788 3812
                 };
3813
+                console.log("child",child)
3789 3814
                 item.children.push(child);
3790 3815
                 this.allSelectedTemplate.unshift(child);
3791 3816
               }
@@ -3834,7 +3859,8 @@ export default {
3834 3859
           day_count: this.allSelectedTemplate[index].day_count,
3835 3860
           frequency_type: this.allSelectedTemplate[index].frequency_type,
3836 3861
           week_days: this.allSelectedTemplate[index].week_days,
3837
-
3862
+          drug_id:this.allSelectedTemplate[index].drug_id,
3863
+          way:this.allSelectedTemplate[index].way,
3838 3864
           isEdit: 0,
3839 3865
           id: 0,
3840 3866
           children: [],
@@ -3860,12 +3886,15 @@ export default {
3860 3886
                 prescribing_number_unit: children[key].prescribing_number_unit,
3861 3887
                 delivery_way: children[key].delivery_way,
3862 3888
                 execution_frequency: children[key].execution_frequency,
3889
+                drug_id:children[key].drug_id,
3890
+                way:children[key].way,
3863 3891
                 isEdit: 0,
3864 3892
                 id: 0,
3865 3893
                 children: [],
3866 3894
                 parent_row: parentRow,
3867 3895
                 row_key: this.rowKey
3868 3896
               };
3897
+              console.log("child",child)
3869 3898
               item.children.push(child);
3870 3899
             }
3871 3900
             this.$set(item, "children", item.children);
@@ -3956,6 +3985,8 @@ export default {
3956 3985
                       children[key].prescribing_number_unit,
3957 3986
                     delivery_way: children[key].delivery_way,
3958 3987
                     execution_frequency: children[key].execution_frequency,
3988
+                    drug_id:children[key].drug_id,
3989
+                    way:children[key].way,
3959 3990
                     isEdit: 0,
3960 3991
                     id: 0,
3961 3992
                     children: [],
@@ -3979,7 +4010,7 @@ export default {
3979 4010
       });
3980 4011
     },
3981 4012
     submitNameForm(formName) {
3982
-
4013
+       
3983 4014
        if(this.src_type == ""){
3984 4015
           this.nameForm.way = 0
3985 4016
           this.nameForm.drug_id = 0
@@ -3989,26 +4020,7 @@ export default {
3989 4020
           var arr = this.nameForm.advice_name.split("(自备药)")
3990 4021
           this.nameForm.advice_name = arr[0]
3991 4022
        }
3992
-      // var drug_name = ""
3993
-      // var name = ""
3994
-      // var way = 0
3995
-      // this.nameForm.drug_id = this.nameForm.advice_name
3996
-      // for(let i=0;i<this.medicals.length;i++){
3997
-      //   if(this.nameForm.advice_name == this.medicals[i].id){
3998
-      //     name = this.medicals[i].drug_name
3999
-      //     way  = this.medicals[i].way
4000
-      //   }
4001
-      // }
4002
-      // if(way == 1){
4003
-      //   drug_name = name
4004
-      // }
4005
-      // if(way == 2){
4006
-      //   var arr = name.split("(自备药)")
4007
-      //   drug_name = arr[0]
4008
-      // }
4009 4023
       
4010
-      // this.nameForm.advice_name = drug_name
4011
-      // this.nameForm.way = way
4012 4024
       var _this = this;
4013 4025
       this.$refs[formName].validate(valid => {
4014 4026
         if (valid) {
@@ -4034,7 +4046,7 @@ export default {
4034 4046
                       _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way;
4035 4047
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
4036 4048
                       _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
4037
-                      _this.groupForm.adviceNames[index].children[j].way = this.nameForm.way;
4049
+                      _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
4038 4050
                       _this.$set(
4039 4051
                         _this.groupForm.adviceNames[index].children,
4040 4052
                         j,
@@ -4052,8 +4064,7 @@ export default {
4052 4064
                   _this.groupSelectRow.row_key ==
4053 4065
                   _this.groupForm.adviceNames[index].row_key
4054 4066
                 ) {
4055
-                  _this.groupForm.adviceNames[index].advice_name =
4056
-                    _this.nameForm.advice_name;
4067
+                  _this.groupForm.adviceNames[index].advice_name =_this.nameForm.advice_name;
4057 4068
                   _this.groupForm.adviceNames[index].advice_desc =
4058 4069
                     _this.nameForm.advice_desc;
4059 4070
 
@@ -4088,6 +4099,8 @@ export default {
4088 4099
                   } else if (_this.nameForm.frequency_type == 3) {
4089 4100
                     _this.groupForm.adviceNames[index].frequency_type =
4090 4101
                       _this.nameForm.frequency_type;
4102
+                   _this.groupForm.adviceNames[index].drug_id = _this.nameForm.drug_id
4103
+                   _this.groupForm.adviceNames[index].way = _this.nameForm.way
4091 4104
                     _this.groupForm.adviceNames[index].day_count = "0";
4092 4105
                     _this.groupForm.adviceNames[index].week_days = this.weeks
4093 4106
                       .filter(function(s) {
@@ -4146,6 +4159,7 @@ export default {
4146 4159
                 _this.nameForm.week_days = "";
4147 4160
               } else if (this.nameForm.frequency_type == 3) {
4148 4161
                 _this.nameForm.frequency_type = _this.nameForm.frequency_type;
4162
+
4149 4163
                 _this.nameForm.day_count = "0";
4150 4164
                 _this.nameForm.week_days = this.weeks
4151 4165
                   .filter(function(s) {
@@ -4450,11 +4464,10 @@ export default {
4450 4464
                 this.all_drug.push(obj)
4451 4465
               }
4452 4466
             }
4453
-            console.log("999999999",this.all_drug)
4454
-            console.log("medicalist",this.medicalList)
4455
-            console.log("base_drug_list",base_drug_list)
4456
-            console.log("private_drug_config",private_drug_cofig)
4457
-            console.log("base",base_drug_cofig)
4467
+
4468
+            this.private_drug_config = response.data.data.private_drug_config
4469
+            this.medicals = medicalList
4470
+          
4458 4471
       })
4459 4472
     },
4460 4473
    changeDrugName(name){