Browse Source

自备药

XMLWAN 4 years ago
parent
commit
7de5b28e98
2 changed files with 120 additions and 166 deletions
  1. 117 164
      src/xt_pages/user/components/EditGroupAdvice.vue
  2. 3 2
      src/xt_pages/user/doctorAdvice.vue

+ 117 - 164
src/xt_pages/user/components/EditGroupAdvice.vue View File

@@ -411,7 +411,6 @@
411 411
                   v-model="nameForm.advice_desc"
412 412
                   :fetch-suggestions="querySearch1"
413 413
                   placeholder="请输入内容"
414
-                  @select="handleSelect1"
415 414
                   @input="changeDrugDesc"
416 415
                 ></el-autocomplete>
417 416
               </el-col>
@@ -630,9 +629,10 @@ export default {
630 629
         index: 0,
631 630
         id: 0,
632 631
         children: [],
633
-        way:"",
634
-        drug_id:"",
635
-        src_type:""
632
+        way:0,
633
+        drug_id:0,
634
+        src_type:"",
635
+        drug_name_id:0
636 636
       },
637 637
 
638 638
       drugOptions: [],
@@ -845,7 +845,7 @@ export default {
845 845
         .catch(() => {});
846 846
     },
847 847
     submitNameForm(formName) {
848
-     
848
+       console.log("888888",this.nameForm)
849 849
       if(this.src_type == ""){
850 850
           this.nameForm.way = 0
851 851
           this.nameForm.drug_id = 0
@@ -855,13 +855,14 @@ export default {
855 855
           var arr = this.nameForm.advice_name.split("(自备药)")
856 856
           this.nameForm.advice_name = arr[0]
857 857
        }
858
-
858
+      console.log("新增医嘱内容")
859 859
       var _this = this;
860 860
       this.$refs[formName].validate(valid => {
861 861
         if (valid) {
862 862
           if (_this.nameForm.isEdit) {
863 863
             var submitForm = null;
864 864
             if (!this.isChild) {
865
+              console.log("进来了吗")
865 866
               submitForm = {
866 867
                 advice_type: _this.groupForm.advice_type,
867 868
                 advice_date: _this.groupForm.advice_date,
@@ -876,6 +877,9 @@ export default {
876 877
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
877 878
                 delivery_way: _this.nameForm.delivery_way,
878 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,
879 883
                 isEdit: 0,
880 884
                 id: 0,
881 885
                 advice_doctor: "",
@@ -905,6 +909,9 @@ export default {
905 909
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
906 910
                 delivery_way: _this.nameForm.delivery_way,
907 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,
908 915
                 isEdit: 0,
909 916
                 id: 0,
910 917
                 advice_doctor: "",
@@ -913,13 +920,14 @@ export default {
913 920
                 groupno: _this.groupForm.groupno,
914 921
                 frequency_type: 0,
915 922
                 day_count: "0",
916
-                week_days: ""
923
+                week_days: "",
924
+              
917 925
               };
918 926
             }
919 927
             let mode = "";
920 928
 
921 929
             if (_this.groupForm.advice_type == 1) {
922
-              // if(_this.nameForm.)
930
+            
923 931
               mode = "1-3";
924 932
               if (
925 933
                 _this.groupForm.doctor != _this.$store.getters.xt_user.user.id
@@ -934,7 +942,7 @@ export default {
934 942
                 mode = "3-1";
935 943
               }
936 944
             }
937
-
945
+            console.log("编辑",submitForm)
938 946
             EditNewDoctorAdvice(
939 947
               this.patientID,
940 948
               this.groupSelectRow.id,
@@ -960,31 +968,22 @@ export default {
960 968
                   ) {
961 969
                     var advice = response.data.data.advice;
962 970
                     _this.adviceTableData[index].drug_spec = advice.drug_spec;
963
-                    _this.adviceTableData[index].drug_spec_unit =
964
-                      advice.drug_spec_unit;
971
+                    _this.adviceTableData[index].drug_spec_unit = advice.drug_spec_unit;
965 972
                     _this.adviceTableData[index].start_time = advice.start_time;
966
-                    _this.adviceTableData[index].advice_name =
967
-                      advice.advice_name;
968
-                    _this.adviceTableData[index].advice_desc =
969
-                      advice.advice_desc;
970
-                    _this.adviceTableData[index].single_dose =
971
-                      advice.single_dose;
972
-                    _this.adviceTableData[index].single_dose_unit =
973
-                      advice.single_dose_unit;
974
-                    _this.adviceTableData[index].delivery_way =
975
-                      advice.delivery_way;
976
-                    _this.adviceTableData[index].execution_frequency =
977
-                      advice.execution_frequency;
978
-                    _this.adviceTableData[index].prescribing_number =
979
-                      advice.prescribing_number;
980
-                    _this.adviceTableData[index].prescribing_number_unit =
981
-                      advice.prescribing_number_unit;
982
-
983
-                    _this.adviceTableData[index].frequency_type =
984
-                      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;
985 982
                     _this.adviceTableData[index].day_count = advice.day_count;
986 983
                     _this.adviceTableData[index].week_day = advice.week_day;
987
-
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
988 987
                     break;
989 988
                   }
990 989
                 }
@@ -1000,42 +999,21 @@ export default {
1000 999
                       var children =
1001 1000
                         _this.groupForm.adviceNames[index].children;
1002 1001
                       for (let j = 0; j < ale; j++) {
1003
-                        if (
1004
-                          _this.groupSelectRow.row_key == children[j].row_key
1005
-                        ) {
1006
-                          _this.groupForm.adviceNames[index].children[
1007
-                            j
1008
-                          ].advice_name = _this.nameForm.advice_name;
1009
-                          _this.groupForm.adviceNames[index].children[
1010
-                            j
1011
-                          ].advice_desc = _this.nameForm.advice_desc;
1012
-                          _this.groupForm.adviceNames[index].children[
1013
-                            j
1014
-                          ].single_dose = "" + _this.nameForm.single_dose;
1015
-                          _this.groupForm.adviceNames[index].children[
1016
-                            j
1017
-                          ].single_dose_unit = _this.nameForm.single_dose_unit;
1018
-                          _this.groupForm.adviceNames[index].children[
1019
-                            j
1020
-                          ].drug_spec = "" + _this.nameForm.drug_spec;
1021
-                          _this.groupForm.adviceNames[index].children[
1022
-                            j
1023
-                          ].drug_spec_unit = _this.nameForm.drug_spec_unit;
1024
-                          _this.groupForm.adviceNames[index].children[
1025
-                            j
1026
-                          ].prescribing_number =
1027
-                            "" + _this.nameForm.prescribing_number;
1028
-                          _this.groupForm.adviceNames[index].children[
1029
-                            j
1030
-                          ].prescribing_number_unit =
1031
-                            _this.nameForm.prescribing_number_unit;
1032
-                          _this.groupForm.adviceNames[index].children[
1033
-                            j
1034
-                          ].delivery_way = _this.nameForm.delivery_way;
1035
-                          _this.groupForm.adviceNames[index].children[
1036
-                            j
1037
-                          ].execution_frequency =
1038
-                            _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
1039 1017
                           _this.$set(
1040 1018
                             _this.groupForm.adviceNames[index].children,
1041 1019
                             j,
@@ -1048,40 +1026,23 @@ export default {
1048 1026
                   }
1049 1027
                 } else {
1050 1028
                   for (let index = 0; index < ale; index++) {
1051
-                    if (
1052
-                      _this.groupSelectRow.row_key ==
1053
-                      _this.groupForm.adviceNames[index].row_key
1054
-                    ) {
1055
-                      _this.groupForm.adviceNames[index].advice_name =
1056
-                        _this.nameForm.advice_name;
1057
-                      _this.groupForm.adviceNames[index].advice_desc =
1058
-                        "" + _this.nameForm.advice_desc;
1059
-                      _this.groupForm.adviceNames[index].single_dose =
1060
-                        "" + _this.nameForm.single_dose;
1061
-                      _this.groupForm.adviceNames[index].single_dose_unit =
1062
-                        _this.nameForm.single_dose_unit;
1063
-                      _this.groupForm.adviceNames[index].drug_spec =
1064
-                        "" + _this.nameForm.drug_spec;
1065
-                      _this.groupForm.adviceNames[index].drug_spec_unit =
1066
-                        _this.nameForm.drug_spec_unit;
1067
-                      _this.groupForm.adviceNames[index].prescribing_number =
1068
-                        "" + _this.nameForm.prescribing_number;
1069
-                      _this.groupForm.adviceNames[
1070
-                        index
1071
-                      ].prescribing_number_unit =
1072
-                        _this.nameForm.prescribing_number_unit;
1073
-                      _this.groupForm.adviceNames[index].delivery_way =
1074
-                        _this.nameForm.delivery_way;
1075
-                      _this.groupForm.adviceNames[index].execution_frequency =
1076
-                        _this.nameForm.execution_frequency;
1077
-
1078
-                      _this.groupForm.adviceNames[index].frequency_type =
1079
-                        _this.nameForm.frequency_type;
1080
-                      _this.groupForm.adviceNames[index].day_count =
1081
-                        _this.nameForm.day_count;
1082
-                      _this.groupForm.adviceNames[
1083
-                        index
1084
-                      ].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(",");
1085 1046
                       console.log(_this.weeks);
1086 1047
                       _this.$set(
1087 1048
                         _this.groupForm.adviceNames,
@@ -1111,12 +1072,16 @@ export default {
1111 1072
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
1112 1073
                 delivery_way: _this.nameForm.delivery_way,
1113 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,
1114 1078
                 isEdit: 0,
1115 1079
                 id: 0,
1116 1080
                 advice_doctor: "",
1117 1081
                 remark: _this.groupForm.remark,
1118 1082
                 parent_id: _this.groupSelectRow.id,
1119
-                groupno: _this.groupForm.groupno
1083
+                groupno: _this.groupForm.groupno,
1084
+               
1120 1085
               };
1121 1086
 
1122 1087
               let mode = "";
@@ -1125,7 +1090,7 @@ export default {
1125 1090
               } else {
1126 1091
                 mode = "1-1";
1127 1092
               }
1128
-
1093
+              console.log("submitFort",submitForm)
1129 1094
               CreateNewDoctorAdvice(this.patientID, submitForm, mode).then(
1130 1095
                 response => {
1131 1096
                   if (response.data.state == 0) {
@@ -1219,17 +1184,16 @@ export default {
1219 1184
                     drug_spec: "" + _this.nameForm.drug_spec,
1220 1185
                     drug_spec_unit: _this.nameForm.drug_spec_unit,
1221 1186
                     prescribing_number: "" + _this.nameForm.prescribing_number,
1222
-                    prescribing_number_unit:
1223
-                      _this.nameForm.prescribing_number_unit,
1187
+                    prescribing_number_unit: _this.nameForm.prescribing_number_unit,
1224 1188
                     delivery_way: _this.nameForm.delivery_way,
1225 1189
                     execution_frequency: _this.nameForm.execution_frequency,
1226
-                    template_id:
1227
-                      "D" + new Date().getTime() + this.getRandValue(),
1228
-
1190
+                    template_id:"D" + new Date().getTime() + this.getRandValue(),
1229 1191
                     frequency_type: _this.nameForm.frequency_type,
1230 1192
                     day_count: _this.nameForm.day_count.toString(),
1231 1193
                     week_days: _this.nameForm.week_days,
1232
-
1194
+                    drug_id:_this.nameForm.drug_id,
1195
+                    way:_this.nameForm.way,
1196
+                    drug_name_id:_this.nameForm.drug_name_id,
1233 1197
                     isEdit: 0,
1234 1198
                     id: 0,
1235 1199
                     children: [],
@@ -1248,13 +1212,9 @@ export default {
1248 1212
               } else {
1249 1213
                 mode = "1-1";
1250 1214
               }
1215
+              console.log("触发了吗",_this.patientID,_this.submitGroupForm)
1216
+              CreateNewGroupAdvice(_this.patientID, _this.groupForm.groupno,_this.submitGroupForm, mode).then(response => {
1251 1217
 
1252
-              CreateNewGroupAdvice(
1253
-                _this.patientID,
1254
-                _this.groupForm.groupno,
1255
-                _this.submitGroupForm,
1256
-                mode
1257
-              ).then(response => {
1258 1218
                 if (response.data.state == 0) {
1259 1219
                   _this.$message.error(response.data.msg);
1260 1220
                   return false;
@@ -1339,7 +1299,9 @@ export default {
1339 1299
                         frequency_type: groups[index].frequency_type,
1340 1300
                         day_count: groups[index].day_count,
1341 1301
                         week_day: groups[index].week_day,
1342
-
1302
+                        drug_name_id:0,
1303
+                        way:0,
1304
+                        drug_id:0,
1343 1305
                         isEdit: 0,
1344 1306
                         index: 0,
1345 1307
                         id: groups[index].id,
@@ -1469,7 +1431,10 @@ export default {
1469 1431
 
1470 1432
           day_count: this.groupSelectRow.day_count,
1471 1433
           week_days: this.groupSelectRow.week_day,
1472
-          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,
1473 1438
         };
1474 1439
 
1475 1440
         if (!this.isChild) {
@@ -1490,6 +1455,9 @@ export default {
1490 1455
           delivery_way: "",
1491 1456
           execution_frequency: "",
1492 1457
           template_id: "",
1458
+          way:0,
1459
+          drug_id:0,
1460
+          drug_name_id:0,
1493 1461
           isEdit: 0,
1494 1462
           index: 0,
1495 1463
           id: 0,
@@ -2014,39 +1982,19 @@ export default {
2014 1982
               .DoctorAdviceTemplate) {
2015 1983
               _this.editRowKey++;
2016 1984
               var item = {
2017
-                advice_name:
2018
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2019
-                    .advice_name,
2020
-                advice_desc:
2021
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2022
-                    .advice_desc,
2023
-                single_dose:
2024
-                  "" +
2025
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2026
-                    .single_dose,
2027
-                single_dose_unit:
2028
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2029
-                    .single_dose_unit,
2030
-                drug_spec:
2031
-                  "" +
2032
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2033
-                    .drug_spec,
2034
-                drug_spec_unit:
2035
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2036
-                    .drug_spec_unit,
2037
-                prescribing_number:
2038
-                  "" +
2039
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2040
-                    .prescribing_number,
2041
-                prescribing_number_unit:
2042
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2043
-                    .prescribing_number_unit,
2044
-                delivery_way:
2045
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2046
-                    .delivery_way,
2047
-                execution_frequency:
2048
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
2049
-                    .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,
2050 1998
                 isEdit: 0,
2051 1999
                 id: 0,
2052 2000
                 children: [],
@@ -2073,10 +2021,12 @@ export default {
2073 2021
                     drug_spec: "" + children[key].drug_spec,
2074 2022
                     drug_spec_unit: children[key].drug_spec_unit,
2075 2023
                     prescribing_number: "" + children[key].prescribing_number,
2076
-                    prescribing_number_unit:
2077
-                      children[key].prescribing_number_unit,
2024
+                    prescribing_number_unit:children[key].prescribing_number_unit,
2078 2025
                     delivery_way: children[key].delivery_way,
2079 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,
2080 2030
                     isEdit: 0,
2081 2031
                     id: 0,
2082 2032
                     children: [],
@@ -2301,18 +2251,13 @@ export default {
2301 2251
       }
2302 2252
     },
2303 2253
     getAdviceConfig(type) {
2254
+       console.log("type",type)
2304 2255
       getAdviceConfig(type).then(response => {
2305 2256
         if (response.data.state == 1) {
2306
-          this.deliveryWayOptions =
2307
-            response.data.data.drugways === null
2308
-              ? []
2309
-              : response.data.data.drugways;
2310
-          this.executionFrequencyOptions =
2311
-            response.data.data.efs === null ? [] : response.data.data.efs;
2312
-          this.adviceTemplates =
2313
-            response.data.data.advice_templates === null
2314
-              ? []
2315
-              : 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;
2316 2261
 
2317 2262
           var templateLen = this.adviceTemplates.length;
2318 2263
           for (let index = 0; index < templateLen; index++) {
@@ -2320,8 +2265,7 @@ export default {
2320 2265
               continue;
2321 2266
             }
2322 2267
 
2323
-            var DoctorAdviceTemplate = this.adviceTemplates[index]
2324
-              .DoctorAdviceTemplate;
2268
+            var DoctorAdviceTemplate = this.adviceTemplates[index].DoctorAdviceTemplate;
2325 2269
             for (let i = 0; i < DoctorAdviceTemplate.length; i++) {
2326 2270
               DoctorAdviceTemplate[i].selection = false;
2327 2271
             }
@@ -2481,6 +2425,15 @@ export default {
2481 2425
             this.src_type = this.drugSpec[i].type
2482 2426
             this.nameForm.drug_id = this.drugSpec[i].id
2483 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
+            }
2484 2437
           }
2485 2438
         }
2486 2439
       },

+ 3 - 2
src/xt_pages/user/doctorAdvice.vue View File

@@ -2969,7 +2969,7 @@ export default {
2969 2969
     },
2970 2970
     openConfig() {},
2971 2971
     openEditGroupAdvice(groupno) {
2972
-    
2972
+      console.log("groupno",groupno)
2973 2973
       var groups = [];
2974 2974
       this.rowKey = 0;
2975 2975
       for(let i=0;i<this.adviceTableData.length;i++){
@@ -2997,7 +2997,7 @@ export default {
2997 2997
         remark: groups[0].remark,
2998 2998
         groupno: groupno
2999 2999
       };
3000
-      console.log("触发了吗----------",groups[0]);
3000
+      console.log("到了",groups[0]);
3001 3001
 
3002 3002
       var childMap = {};
3003 3003
       for (const index in groups) {
@@ -3081,6 +3081,7 @@ export default {
3081 3081
     },
3082 3082
 
3083 3083
     openEdit(index, row) {
3084
+      
3084 3085
       this.currentIndex = index;
3085 3086
       (this.dialogTitle = "修改医嘱"), (this.isEdit = true);
3086 3087