XMLWAN 4 年 前
コミット
20d8173abd

+ 1 - 0
src/api/advice.js ファイルの表示

221
 }
221
 }
222
 
222
 
223
 export function CreateGroupAdvice(id, groupno, advices, mode) {
223
 export function CreateGroupAdvice(id, groupno, advices, mode) {
224
+
224
   if (advices.remind > 0) {
225
   if (advices.remind > 0) {
225
     return request({
226
     return request({
226
       url:
227
       url:

+ 15 - 6
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue ファイルの表示

755
           execution_frequency: '',
755
           execution_frequency: '',
756
           advice_doctor: '',
756
           advice_doctor: '',
757
           remark: '',
757
           remark: '',
758
-          parent_id: 0
758
+          parent_id: 0,
759
+          drug_name_id:"",
759
         },
760
         },
760
         nameForm: {
761
         nameForm: {
761
           advice_name: '',
762
           advice_name: '',
808
         this.form['dialysis_order_id'] = this.dialysis_order.id
809
         this.form['dialysis_order_id'] = this.dialysis_order.id
809
       },
810
       },
810
       doctor_advices: function() {
811
       doctor_advices: function() {
811
-
812
         this.handleSpanTempArr()
812
         this.handleSpanTempArr()
813
         this.hoverOrderArr = []
813
         this.hoverOrderArr = []
814
         this.handleStyle()
814
         this.handleStyle()
980
               this.doctor_advices[this.currentIndex].advice_doctor =
980
               this.doctor_advices[this.currentIndex].advice_doctor =
981
                 advice.advice_doctor
981
                 advice.advice_doctor
982
               this.doctor_advices[this.currentIndex].remark = advice.remark
982
               this.doctor_advices[this.currentIndex].remark = advice.remark
983
+              this.doctor_advice[this.currentIndex].drug_id = advice.drug_id
984
+              this.doctor_advice[this.currentIndex].drug_name_id = advice.drug_name_id
985
+              this.doctor.advice[this.currentIndex].way = advice.way
983
               this.currentIndex = -1
986
               this.currentIndex = -1
984
               return false
987
               return false
985
             }
988
             }
1134
 
1137
 
1135
             return
1138
             return
1136
           }
1139
           }
1140
+
1137
           this.nameForm = {
1141
           this.nameForm = {
1138
             advice_name: this.groupSelectRow.advice_name,
1142
             advice_name: this.groupSelectRow.advice_name,
1139
             single_dose: this.groupSelectRow.single_dose,
1143
             single_dose: this.groupSelectRow.single_dose,
1144
             prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
1148
             prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
1145
             delivery_way: this.groupSelectRow.delivery_way,
1149
             delivery_way: this.groupSelectRow.delivery_way,
1146
             execution_frequency: this.groupSelectRow.execution_frequency,
1150
             execution_frequency: this.groupSelectRow.execution_frequency,
1151
+
1147
             isEdit: 1,
1152
             isEdit: 1,
1148
             index: this.groupSelectRow.index
1153
             index: this.groupSelectRow.index
1149
           }
1154
           }
1155
+          console.log("88888888",this.nameForm)
1150
         } else {
1156
         } else {
1151
           this.nameForm = {
1157
           this.nameForm = {
1152
             advice_name: '',
1158
             advice_name: '',
1196
           this.form.prescribing_number =
1202
           this.form.prescribing_number =
1197
             this.adviceTemplateMaps[key].prescribing_number + ''
1203
             this.adviceTemplateMaps[key].prescribing_number + ''
1198
           this.form.delivery_way = this.adviceTemplateMaps[key].delivery_way
1204
           this.form.delivery_way = this.adviceTemplateMaps[key].delivery_way
1199
-          this.form.execution_frequency = this.adviceTemplateMaps[
1200
-            key
1201
-            ].execution_frequency
1205
+          this.form.execution_frequency = this.adviceTemplateMaps[key].execution_frequency
1206
+          this.form.drug_name_id = this.adviceTemplateMaps[key].drug_name_id
1207
+          this.form.drug_id = this.adviceTemplateMaps[key].drug_id
1208
+          this.form.way = this.adviceTemplateMaps[key].way
1202
         }
1209
         }
1203
       }
1210
       }
1204
       ,
1211
       ,
1457
           parent_id: row.parent_id,
1464
           parent_id: row.parent_id,
1458
           drug_id:"",
1465
           drug_id:"",
1459
           way:"",
1466
           way:"",
1467
+          drug_name_id:"",
1460
         }
1468
         }
1461
       }
1469
       }
1462
       ,
1470
       ,
1466
           this.$message.error('未选择要修改的医嘱内容')
1474
           this.$message.error('未选择要修改的医嘱内容')
1467
           return
1475
           return
1468
         }
1476
         }
1469
-
1477
+        console.log("22222",this.groupSelectRow.groupno)
1470
         this.$refs.editGroupForm.open(this.groupSelectRow.groupno)
1478
         this.$refs.editGroupForm.open(this.groupSelectRow.groupno)
1471
       }
1479
       }
1472
       ,
1480
       ,
2389
             this.src_type = this.drugSpec[i].type
2397
             this.src_type = this.drugSpec[i].type
2390
             this.form.drug_id = this.drugSpec[i].id
2398
             this.form.drug_id = this.drugSpec[i].id
2391
             this.form.way = this.drugSpec[i].type
2399
             this.form.way = this.drugSpec[i].type
2400
+            this.form.drug_name_id = this.drugSpec[i].drug_name_id
2392
           }
2401
           }
2393
         }
2402
         }
2394
       },
2403
       },

+ 31 - 3
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue ファイルの表示

615
         children: [],
615
         children: [],
616
         drug_id:"",
616
         drug_id:"",
617
         way:"",
617
         way:"",
618
+        drug_name_id:"",
618
       },
619
       },
619
       submitGroupForm: {
620
       submitGroupForm: {
620
         advice_type: "",
621
         advice_type: "",
635
         parent_id: 0,
636
         parent_id: 0,
636
         drug_id:"",
637
         drug_id:"",
637
         way:"",
638
         way:"",
639
+        drug_name_id:"",
638
       },
640
       },
639
       selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
641
       selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
640
       selectedTemplate: [],
642
       selectedTemplate: [],
645
       current_drug_name:"",
647
       current_drug_name:"",
646
       current_drug_spec: "",
648
       current_drug_spec: "",
647
       drug_id: 0,
649
       drug_id: 0,
650
+      drug_name_id:"",
648
       src_type:"",
651
       src_type:"",
649
       private_drug_config:{},
652
       private_drug_config:{},
650
     };
653
     };
719
           
722
           
720
           console.log("88888888",submitForm)
723
           console.log("88888888",submitForm)
721
           console.log("99999",this.medicals)
724
           console.log("99999",this.medicals)
725
+          
722
           if(this.private_drug_config.drug_start == 1){
726
           if(this.private_drug_config.drug_start == 1){
723
            
727
            
724
              for(let index=0;index<submitForm.adviceNames.length;index++){
728
              for(let index=0;index<submitForm.adviceNames.length;index++){
725
                 for(let i=0;i<this.medicals.length;i++){
729
                 for(let i=0;i<this.medicals.length;i++){
726
                    if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
730
                    if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
727
                       submitForm.adviceNames[index].way = 2
731
                       submitForm.adviceNames[index].way = 2
732
+                      submitForm.adviceNames[index].drug_name_id = this.medicals[i].drug_name_id
728
                    }
733
                    }
729
                 }
734
                 }
730
              }
735
              }
731
           }
736
           }
737
+          console.log("2222",submitForm)
738
+         
732
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
739
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
733
             response => {
740
             response => {
734
               if (response.data.state == 0) {
741
               if (response.data.state == 0) {
854
        if(this.src_type == ""){
861
        if(this.src_type == ""){
855
           this.nameForm.way = 0
862
           this.nameForm.way = 0
856
           this.nameForm.drug_id = 0
863
           this.nameForm.drug_id = 0
864
+          this.nameForm.drug_name_id = 0
857
        }
865
        }
858
 
866
 
859
        if(this.src_type == 2){ //自备药
867
        if(this.src_type == 2){ //自备药
888
                       _this.groupForm.adviceNames[index].children[j].remark =_this.nameForm.remark;
896
                       _this.groupForm.adviceNames[index].children[j].remark =_this.nameForm.remark;
889
                       _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
897
                       _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
890
                       _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
898
                       _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
899
+                      _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id;
891
                       _this.$set(_this.groupForm.adviceNames[index].children,j,_this.groupForm.adviceNames[index].children[j]
900
                       _this.$set(_this.groupForm.adviceNames[index].children,j,_this.groupForm.adviceNames[index].children[j]
892
                      
901
                      
893
                       );
902
                       );
912
                   _this.groupForm.adviceNames[index].remark =_this.nameForm.remark;
921
                   _this.groupForm.adviceNames[index].remark =_this.nameForm.remark;
913
                   _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
922
                   _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
914
                   _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
923
                   _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
924
+                  _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id;
915
                   _this.$set(
925
                   _this.$set(
916
                     _this.groupForm.adviceNames,
926
                     _this.groupForm.adviceNames,
917
                     index,
927
                     index,
1018
           id: this.groupSelectRow.id,
1028
           id: this.groupSelectRow.id,
1019
           children: [],
1029
           children: [],
1020
           parent_row: this.groupSelectRow.parent_row,
1030
           parent_row: this.groupSelectRow.parent_row,
1021
-          remark: this.groupSelectRow.remark
1031
+          remark: this.groupSelectRow.remark,
1032
+          drug_name_id:this.groupSelectRow.drug_name_id,
1033
+          drug_id:this.groupSelectRow.drug_id,
1034
+          way:this.groupSelectRow.way
1022
           // row_key:this.groupSelectRow.row_key,
1035
           // row_key:this.groupSelectRow.row_key,
1023
         };
1036
         };
1024
         this.nameFormTitle = "修改医嘱内容";
1037
         this.nameFormTitle = "修改医嘱内容";
1151
       if (this.selectedTemp.id in this.adviceTemplateMaps) {
1164
       if (this.selectedTemp.id in this.adviceTemplateMaps) {
1152
         var mapid = this.selectedTemp.id;
1165
         var mapid = this.selectedTemp.id;
1153
         var thisRowKey = 0;
1166
         var thisRowKey = 0;
1154
-        for (const index in this.adviceTemplateMaps[mapid]
1155
-          .DoctorAdviceTemplate) {
1167
+        for (const index in this.adviceTemplateMaps[mapid].DoctorAdviceTemplate) {
1156
           thisRowKey++;
1168
           thisRowKey++;
1157
           var item = {
1169
           var item = {
1158
             advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_name,
1170
             advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_name,
1169
             advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].id,
1181
             advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].id,
1170
             drug_id:this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_id,
1182
             drug_id:this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_id,
1171
             way:this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].way,
1183
             way:this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].way,
1184
+            drug_name_id:this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_name_id,
1172
             isEdit: 0,
1185
             isEdit: 0,
1173
             id: 0,
1186
             id: 0,
1174
             children: [],
1187
             children: [],
1201
                 execution_frequency: children[key].execution_frequency,
1214
                 execution_frequency: children[key].execution_frequency,
1202
                 drug_id:children[key].drug_id,
1215
                 drug_id:children[key].drug_id,
1203
                 way:children[key].way,
1216
                 way:children[key].way,
1217
+                drug_name_id:children[key].drug_name_id,
1204
                 isEdit: 0,
1218
                 isEdit: 0,
1205
                 id: 0,
1219
                 id: 0,
1206
                 children: [],
1220
                 children: [],
1240
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1254
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1241
               drug_id: adviceTemplate.DoctorAdviceTemplate[index].drug_id,
1255
               drug_id: adviceTemplate.DoctorAdviceTemplate[index].drug_id,
1242
               way:adviceTemplate.DoctorAdviceTemplate[index].way,
1256
               way:adviceTemplate.DoctorAdviceTemplate[index].way,
1257
+              drug_name_id:adviceTemplate.DoctorAdviceTemplate[index].drug_name_id,
1243
               isEdit: 0,
1258
               isEdit: 0,
1244
               id: 0,
1259
               id: 0,
1245
               children: [],
1260
               children: [],
1270
                   execution_frequency: children[key].execution_frequency,
1285
                   execution_frequency: children[key].execution_frequency,
1271
                   drug_id:children[key].drug_id,
1286
                   drug_id:children[key].drug_id,
1272
                   way:children[key].way,
1287
                   way:children[key].way,
1288
+                  drug_name_id:children[key].drug_name_id,
1273
                   isEdit: 0,
1289
                   isEdit: 0,
1274
                   id: 0,
1290
                   id: 0,
1275
                   children: [],
1291
                   children: [],
1318
           execution_frequency: this.allSelectedTemplate[index].execution_frequency,
1334
           execution_frequency: this.allSelectedTemplate[index].execution_frequency,
1319
           drug_id:this.allSelectedTemplate[index].drug_id,
1335
           drug_id:this.allSelectedTemplate[index].drug_id,
1320
           way:this.allSelectedTemplate[index].way,
1336
           way:this.allSelectedTemplate[index].way,
1337
+          drug_name_id:this.allSelectedTemplate[index].drug_name_id,
1321
           isEdit: 0,
1338
           isEdit: 0,
1322
           id: 0,
1339
           id: 0,
1323
           children: [],
1340
           children: [],
1344
                 execution_frequency: children[key].execution_frequency,
1361
                 execution_frequency: children[key].execution_frequency,
1345
                 drug_id:children[key].drug_id,
1362
                 drug_id:children[key].drug_id,
1346
                 way:children[key].way,
1363
                 way:children[key].way,
1364
+                drug_name_id:children[key].drug_name_id,
1347
                 isEdit: 0,
1365
                 isEdit: 0,
1348
                 id: 0,
1366
                 id: 0,
1349
                 children: [],
1367
                 children: [],
1579
                 obj.custom_id = this.rand(10000000, 99999999)
1597
                 obj.custom_id = this.rand(10000000, 99999999)
1580
                 obj.drug_specs = base_drug_list[i].drug_specs
1598
                 obj.drug_specs = base_drug_list[i].drug_specs
1581
                 this.all_drug.push(obj)
1599
                 this.all_drug.push(obj)
1600
+
1582
               }
1601
               }
1583
               this.private_drug_config = response.data.data.private_drug_config
1602
               this.private_drug_config = response.data.data.private_drug_config
1584
               this.medicals = medicalList
1603
               this.medicals = medicalList
1585
             }   
1604
             }   
1605
+            console.log("-======",this.all_drug)
1586
         })
1606
         })
1587
        
1607
        
1588
     },
1608
     },
1597
        }
1617
        }
1598
     },
1618
     },
1599
     changeDrugDesc(name) {
1619
     changeDrugDesc(name) {
1620
+      console.log("-----",this.drugSpec)
1600
         this.current_drug_spec = name
1621
         this.current_drug_spec = name
1601
         for (let i = 0; i < this.drugSpec.length; i++) {
1622
         for (let i = 0; i < this.drugSpec.length; i++) {
1602
           if (this.drugSpec[i].drug_spec == name) {
1623
           if (this.drugSpec[i].drug_spec == name) {
1609
             this.src_type = this.drugSpec[i].type
1630
             this.src_type = this.drugSpec[i].type
1610
             this.nameForm.drug_id = this.drugSpec[i].id
1631
             this.nameForm.drug_id = this.drugSpec[i].id
1611
             this.nameForm.way = this.drugSpec[i].type
1632
             this.nameForm.way = this.drugSpec[i].type
1633
+            this.drug_name_id = this.drugSpec[i].drug_name_id
1634
+            if(this.drugSpec[i].drug_name_id){
1635
+               this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
1636
+            }else{
1637
+              this.nameForm.drug_name_id = 0
1638
+            }
1639
+           
1612
           }
1640
           }
1613
         }
1641
         }
1614
       }
1642
       }

+ 122 - 64
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue ファイルの表示

596
         isEdit: 0,
596
         isEdit: 0,
597
         index: 0,
597
         index: 0,
598
         id: 0,
598
         id: 0,
599
-        children: []
599
+        children: [],
600
+        drug_id:"",
601
+        way:"",
602
+        drug_name_id:"",
600
       },
603
       },
601
       submitGroupForm: {
604
       submitGroupForm: {
602
         advice_type: "",
605
         advice_type: "",
605
         adviceNames: [],
608
         adviceNames: [],
606
         advice_doctor: "",
609
         advice_doctor: "",
607
         remark: "",
610
         remark: "",
608
-        parent_id: 0
611
+        parent_id: 0,
612
+        drug_name_id:"",
613
+        drug_id:"",
614
+        way:""
609
       },
615
       },
610
       groupForm: {
616
       groupForm: {
611
         advice_type: "",
617
         advice_type: "",
614
         adviceNames: [],
620
         adviceNames: [],
615
         advice_doctor: "",
621
         advice_doctor: "",
616
         remark: "",
622
         remark: "",
617
-        parent_id: 0
623
+        parent_id: 0,
624
+        way:"",
625
+        drug_id:"",
626
+        drug_name_id:"",
618
       },
627
       },
619
       adminusername: "",
628
       adminusername: "",
620
       selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
629
       selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
626
       current_drug_name:"",
635
       current_drug_name:"",
627
       current_drug_spec: "",
636
       current_drug_spec: "",
628
       drug_id: 0,
637
       drug_id: 0,
629
-      src_type:""
638
+      src_type:"",
639
+      drug_name_id:0,
630
     };
640
     };
631
   },
641
   },
632
   props: {
642
   props: {
835
         .catch(() => {});
845
         .catch(() => {});
836
     },
846
     },
837
     submitNameForm(formName) {
847
     submitNameForm(formName) {
838
-       if(typeof(this.nameForm.advice_name) == "string"){
839
-         
840
-          this.nameForm.advice_name == this.nameForm.advice_name
841
-      }
842
 
848
 
843
-      if(typeof(this.nameForm.advice_name) == "number"){
844
-          var drug_name = ""
845
-          var name = ""
846
-          var way = 0
847
-          this.nameForm.drug_id = this.nameForm.advice_name
848
-          for(let i=0;i<this.medicals.length;i++){
849
-            if(this.nameForm.advice_name == this.medicals[i].id){
850
-              name = this.medicals[i].drug_name
851
-              way  = this.medicals[i].way
852
-            }
853
-          }
854
-          if(way == 1){
855
-            drug_name = name
856
-          }
857
-          if(way == 2){
858
-            var arr = name.split("(自备药)")
859
-            drug_name = arr[0]
860
-          }
861
-          
862
-          this.nameForm.advice_name = drug_name
863
-          this.nameForm.way = way
864
-      }
849
+        if(this.src_type == ""){
850
+          this.nameForm.way = 0
851
+          this.nameForm.drug_id = 0
852
+          this.nameForm.drug_name_id = 0
853
+       }
854
+
855
+       if(this.src_type == 2){ //自备药
856
+          var arr = this.nameForm.advice_name.split("(自备药)")
857
+          this.nameForm.advice_name = arr[0]
858
+       }
859
+   
865
       var _this = this;
860
       var _this = this;
866
       this.$refs[formName].validate(valid => {
861
       this.$refs[formName].validate(valid => {
867
         if (valid) {
862
         if (valid) {
886
               advice_doctor: "",
881
               advice_doctor: "",
887
               remark: _this.groupForm.remark,
882
               remark: _this.groupForm.remark,
888
               parent_id: _this.groupSelectRow.parent_id,
883
               parent_id: _this.groupSelectRow.parent_id,
889
-              groupno: _this.groupForm.groupno
884
+              groupno: _this.groupForm.groupno,
885
+              drug_name_id:_this.groupForm.drug_name_id,
886
+              drug_id:_this.groupForm.drug_id,
887
+              way:_this.groupForm.way,
888
+              
890
             };
889
             };
891
             let mode = "2";
890
             let mode = "2";
892
             if (
891
             if (
895
             ) {
894
             ) {
896
               mode = "3";
895
               mode = "3";
897
             }
896
             }
898
-
897
+            console.log("22222",submitForm)
898
+          
899
             EditDoctorAdvice(
899
             EditDoctorAdvice(
900
               this.patientID,
900
               this.patientID,
901
               this.groupSelectRow.id,
901
               this.groupSelectRow.id,
920
                     _this.groupSelectRow.id == _this.adviceTableData[index].id
920
                     _this.groupSelectRow.id == _this.adviceTableData[index].id
921
                   ) {
921
                   ) {
922
                     var advice = response.data.data.advice;
922
                     var advice = response.data.data.advice;
923
+
923
                     _this.adviceTableData[index].drug_spec = advice.drug_spec;
924
                     _this.adviceTableData[index].drug_spec = advice.drug_spec;
924
                     _this.adviceTableData[index].drug_spec_unit =
925
                     _this.adviceTableData[index].drug_spec_unit =
925
                       advice.drug_spec_unit;
926
                       advice.drug_spec_unit;
938
                       advice.execution_frequency;
939
                       advice.execution_frequency;
939
                     _this.adviceTableData[index].prescribing_number =
940
                     _this.adviceTableData[index].prescribing_number =
940
                       advice.prescribing_number;
941
                       advice.prescribing_number;
941
-                    _this.adviceTableData[index].prescribing_number_unit =
942
-                      advice.prescribing_number_unit;
942
+                    _this.adviceTableData[index].prescribing_number_unit =advice.prescribing_number_unit;
943
+                    _this.adviceTableData[index].drug_name_id = advice.drug_name_id;
944
+                    _this.adviceTableData[index].drug_id = advice.drug_id,
945
+                    _this.adviceTableData[index].way = advice.way
943
                     break;
946
                     break;
944
                   }
947
                   }
945
                 }
948
                 }
984
                             j
987
                             j
985
                           ].prescribing_number_unit =
988
                           ].prescribing_number_unit =
986
                             _this.nameForm.prescribing_number_unit;
989
                             _this.nameForm.prescribing_number_unit;
987
-                          _this.groupForm.adviceNames[index].children[
988
-                            j
989
-                          ].delivery_way = _this.nameForm.delivery_way;
990
-                          _this.groupForm.adviceNames[index].children[
991
-                            j
992
-                          ].execution_frequency =
993
-                            _this.nameForm.execution_frequency;
990
+                          _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way;
991
+                          _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
992
+                         _this.groupForm.adviceNames[index].children[j].drug_id =_this.nameForm.drug_id;
993
+                         _this.groupForm.adviceNames[index].children[j].drug_name_id =_this.nameForm.drug_name_id;
994
+                         _this.groupForm.adviceNames[index].children[j].way =_this.nameForm.way;
994
                           _this.$set(
995
                           _this.$set(
995
                             _this.groupForm.adviceNames[index].children,
996
                             _this.groupForm.adviceNames[index].children,
996
                             j,
997
                             j,
1027
                         _this.nameForm.prescribing_number_unit;
1028
                         _this.nameForm.prescribing_number_unit;
1028
                       _this.groupForm.adviceNames[index].delivery_way =
1029
                       _this.groupForm.adviceNames[index].delivery_way =
1029
                         _this.nameForm.delivery_way;
1030
                         _this.nameForm.delivery_way;
1030
-                      _this.groupForm.adviceNames[index].execution_frequency =
1031
-                        _this.nameForm.execution_frequency;
1032
-
1031
+                      _this.groupForm.adviceNames[index].execution_frequency =_this.nameForm.execution_frequency;
1032
+                      _this.groupForm.adviceNames[index].drug_name_id =_this.nameForm.drug_name_id;
1033
+                       _this.groupForm.adviceNames[index].drug_id =_this.nameForm.drug_id;
1034
+                        _this.groupForm.adviceNames[index].way =_this.nameForm.way;
1033
                       _this.$set(
1035
                       _this.$set(
1034
                         _this.groupForm.adviceNames,
1036
                         _this.groupForm.adviceNames,
1035
                         index,
1037
                         index,
1057
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
1059
                 prescribing_number_unit: _this.nameForm.prescribing_number_unit,
1058
                 delivery_way: _this.nameForm.delivery_way,
1060
                 delivery_way: _this.nameForm.delivery_way,
1059
                 execution_frequency: _this.nameForm.execution_frequency,
1061
                 execution_frequency: _this.nameForm.execution_frequency,
1062
+                drug_name_id:_this.nameForm.drug_name_id,
1063
+                drug_id:_this.nameForm.drug_id,
1064
+                way:_this.nameForm.way,
1060
                 isEdit: 0,
1065
                 isEdit: 0,
1061
                 id: 0,
1066
                 id: 0,
1062
                 advice_doctor: "",
1067
                 advice_doctor: "",
1153
                       _this.nameForm.prescribing_number_unit,
1158
                       _this.nameForm.prescribing_number_unit,
1154
                     delivery_way: _this.nameForm.delivery_way,
1159
                     delivery_way: _this.nameForm.delivery_way,
1155
                     execution_frequency: _this.nameForm.execution_frequency,
1160
                     execution_frequency: _this.nameForm.execution_frequency,
1161
+                    drug_name_id:_this.nameForm.drug_name_id,
1162
+                    drug_id:_this.nameForm.drug_id,
1163
+                    way:_this.nameForm.way,
1156
                     isEdit: 0,
1164
                     isEdit: 0,
1157
                     id: 0,
1165
                     id: 0,
1158
                     children: [],
1166
                     children: [],
1245
                         groups[index].prescribing_number_unit,
1253
                         groups[index].prescribing_number_unit,
1246
                       delivery_way: groups[index].delivery_way,
1254
                       delivery_way: groups[index].delivery_way,
1247
                       execution_frequency: groups[index].execution_frequency,
1255
                       execution_frequency: groups[index].execution_frequency,
1256
+                      drug_name_id:groups[index].drug_name_id,
1257
+                      drug_id:groups[index].drug_id,
1258
+                      way:groups[index].way,
1248
                       isEdit: 0,
1259
                       isEdit: 0,
1249
                       index: 0,
1260
                       index: 0,
1250
                       id: groups[index].id,
1261
                       id: groups[index].id,
1268
                           prescribing_number_unit:
1279
                           prescribing_number_unit:
1269
                             childMap[item.id][key].prescribing_number_unit,
1280
                             childMap[item.id][key].prescribing_number_unit,
1270
                           delivery_way: childMap[item.id][key].delivery_way,
1281
                           delivery_way: childMap[item.id][key].delivery_way,
1271
-                          execution_frequency:
1272
-                            childMap[item.id][key].execution_frequency,
1282
+                          execution_frequency:childMap[item.id][key].execution_frequency,
1283
+                           drug_name_id:childMap[item.id][key].drug_name_id,
1284
+                           drug_id:childMap[item.id][key].drug_id,
1285
+                           way:childMap[item.id][key].way,
1273
                           isEdit: 0,
1286
                           isEdit: 0,
1274
                           index: 0,
1287
                           index: 0,
1275
                           id: childMap[item.id][key].id,
1288
                           id: childMap[item.id][key].id,
1322
         index: 0,
1335
         index: 0,
1323
         children: [],
1336
         children: [],
1324
         parent_row: this.groupSelectRow.row_key,
1337
         parent_row: this.groupSelectRow.row_key,
1325
-        id: 0
1338
+        id: 0,
1339
+        drug_name_id:"",
1340
+        way:"",
1341
+        drug_id:"",
1326
       };
1342
       };
1327
       this.isChild = true;
1343
       this.isChild = true;
1328
       this.nameFormVisible = true;
1344
       this.nameFormVisible = true;
1358
               : "",
1374
               : "",
1359
           prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
1375
           prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
1360
           delivery_way: this.isChild ? "" : this.groupSelectRow.delivery_way,
1376
           delivery_way: this.isChild ? "" : this.groupSelectRow.delivery_way,
1361
-          execution_frequency: this.isChild
1362
-            ? ""
1363
-            : this.groupSelectRow.execution_frequency,
1377
+          execution_frequency: this.isChild? "": this.groupSelectRow.execution_frequency,
1378
+          drug_name_id:this.isChild?"":this.groupSelectRow.drug_name_id,
1379
+          drug_id:this.isChild?"":this.groupSelectRow.drug_id,
1380
+          way:this.isChild?"":this.groupSelectRow.way,
1364
           isEdit: 1,
1381
           isEdit: 1,
1365
           index: this.groupSelectRow.index,
1382
           index: this.groupSelectRow.index,
1366
           id: this.groupSelectRow.id,
1383
           id: this.groupSelectRow.id,
1367
           children: [],
1384
           children: [],
1368
-          parent_row: this.groupSelectRow.parent_row
1385
+          parent_row: this.groupSelectRow.parent_row,
1369
           // row_key:this.groupSelectRow.row_key,
1386
           // row_key:this.groupSelectRow.row_key,
1370
         };
1387
         };
1371
         this.nameFormTitle = "修改医嘱内容";
1388
         this.nameFormTitle = "修改医嘱内容";
1382
           prescribing_number_unit: "",
1399
           prescribing_number_unit: "",
1383
           delivery_way: "",
1400
           delivery_way: "",
1384
           execution_frequency: "",
1401
           execution_frequency: "",
1402
+          drug_name_id:"",
1403
+          drug_id:"",
1404
+          way:"",
1385
           isEdit: 0,
1405
           isEdit: 0,
1386
           index: 0,
1406
           index: 0,
1387
           id: 0,
1407
           id: 0,
1549
             delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1569
             delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1550
               index
1570
               index
1551
             ].delivery_way,
1571
             ].delivery_way,
1552
-            execution_frequency: this.adviceTemplateMaps[mapid]
1553
-              .DoctorAdviceTemplate[index].execution_frequency,
1572
+            execution_frequency: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].execution_frequency,
1573
+            drug_name_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_name_id,
1574
+             way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].way,
1575
+             drug_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_id,
1554
             advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1576
             advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
1555
               index
1577
               index
1556
             ].id,
1578
             ].id,
1587
                 prescribing_number_unit: children[key].prescribing_number_unit,
1609
                 prescribing_number_unit: children[key].prescribing_number_unit,
1588
                 delivery_way: children[key].delivery_way,
1610
                 delivery_way: children[key].delivery_way,
1589
                 execution_frequency: children[key].execution_frequency,
1611
                 execution_frequency: children[key].execution_frequency,
1612
+                drug_name_id:children[key].drug_name_id,
1613
+                drug_id:children[key].drug_id,
1614
+                way:children[key].way,
1590
                 isEdit: 0,
1615
                 isEdit: 0,
1591
                 id: 0,
1616
                 id: 0,
1592
                 children: [],
1617
                 children: [],
1632
                   .prescribing_number_unit,
1657
                   .prescribing_number_unit,
1633
               delivery_way:
1658
               delivery_way:
1634
                 adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
1659
                 adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
1635
-              execution_frequency:
1636
-                adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
1660
+              execution_frequency:adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
1661
+              drug_name_id:adviceTemplate.DoctorAdviceTemplate[index].drug_name_id,
1662
+              drug_id:adviceTemplate.DoctorAdviceTemplate[index].drug_id,
1663
+              way:adviceTemplate.DoctorAdviceTemplate[index].way,
1637
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1664
               advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
1638
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1665
               selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
1639
               isEdit: 0,
1666
               isEdit: 0,
1664
                     children[key].prescribing_number_unit,
1691
                     children[key].prescribing_number_unit,
1665
                   delivery_way: children[key].delivery_way,
1692
                   delivery_way: children[key].delivery_way,
1666
                   execution_frequency: children[key].execution_frequency,
1693
                   execution_frequency: children[key].execution_frequency,
1694
+                   drug_name_id: children[key].drug_name_id,
1695
+                   drug_id:children[key].drug_id,
1696
+                   way:children[key].way,
1667
                   isEdit: 0,
1697
                   isEdit: 0,
1668
                   id: 0,
1698
                   id: 0,
1669
                   children: [],
1699
                   children: [],
1720
           prescribing_number_unit: this.allSelectedTemplate[index]
1750
           prescribing_number_unit: this.allSelectedTemplate[index]
1721
             .prescribing_number_unit,
1751
             .prescribing_number_unit,
1722
           delivery_way: this.allSelectedTemplate[index].delivery_way,
1752
           delivery_way: this.allSelectedTemplate[index].delivery_way,
1723
-          execution_frequency: this.allSelectedTemplate[index]
1724
-            .execution_frequency,
1753
+          execution_frequency: this.allSelectedTemplate[index].execution_frequency,
1754
+           drug_name_id: this.allSelectedTemplate[index].drug_name_id,
1755
+           way:this.allSelectedTemplate[index].way,
1756
+           drug_id:this.allSelectedTemplate[index].drug_id,
1725
           isEdit: 0,
1757
           isEdit: 0,
1726
           id: 0,
1758
           id: 0,
1727
           children: [],
1759
           children: [],
1745
                 prescribing_number_unit: children[key].prescribing_number_unit,
1777
                 prescribing_number_unit: children[key].prescribing_number_unit,
1746
                 delivery_way: children[key].delivery_way,
1778
                 delivery_way: children[key].delivery_way,
1747
                 execution_frequency: children[key].execution_frequency,
1779
                 execution_frequency: children[key].execution_frequency,
1780
+                drug_name_id: children[key].drug_name_id,
1781
+                drug_id:children[key].drug_id,
1782
+                way:children[key].way,
1748
                 isEdit: 0,
1783
                 isEdit: 0,
1749
                 id: 0,
1784
                 id: 0,
1750
                 children: [],
1785
                 children: [],
1832
               prescribing_number_unit: groups[index].prescribing_number_unit,
1867
               prescribing_number_unit: groups[index].prescribing_number_unit,
1833
               delivery_way: groups[index].delivery_way,
1868
               delivery_way: groups[index].delivery_way,
1834
               execution_frequency: groups[index].execution_frequency,
1869
               execution_frequency: groups[index].execution_frequency,
1870
+              drug_name_id: groups[index].drug_name_id,
1871
+              drug_id:groups[index].drug_id,
1872
+              way:groups[index].way,
1835
               isEdit: 0,
1873
               isEdit: 0,
1836
               index: 0,
1874
               index: 0,
1837
               id: groups[index].id,
1875
               id: groups[index].id,
1854
                   prescribing_number_unit:
1892
                   prescribing_number_unit:
1855
                     childMap[item.id][key].prescribing_number_unit,
1893
                     childMap[item.id][key].prescribing_number_unit,
1856
                   delivery_way: childMap[item.id][key].delivery_way,
1894
                   delivery_way: childMap[item.id][key].delivery_way,
1857
-                  execution_frequency:
1858
-                    childMap[item.id][key].execution_frequency,
1895
+                  execution_frequency:childMap[item.id][key].execution_frequency,
1896
+                   way:childMap[item.id][key].way,
1897
+                   drug_name_id:childMap[item.id][key].drug_name_id,
1898
+                   drug_id:childMap[item.id][key].drug_id,
1859
                   isEdit: 0,
1899
                   isEdit: 0,
1860
                   index: 0,
1900
                   index: 0,
1861
                   id: childMap[item.id][key].id,
1901
                   id: childMap[item.id][key].id,
1923
                 delivery_way:
1963
                 delivery_way:
1924
                   _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
1964
                   _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
1925
                     .delivery_way,
1965
                     .delivery_way,
1926
-                execution_frequency:
1927
-                  _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
1928
-                    .execution_frequency,
1966
+                execution_frequency:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].execution_frequency,
1967
+                 drug_name_id: _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_name_id,
1968
+                  drug_id: _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].drug_id,
1969
+                  way:_this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].way,
1929
                 isEdit: 0,
1970
                 isEdit: 0,
1930
                 id: 0,
1971
                 id: 0,
1931
                 children: [],
1972
                 children: [],
1956
                       children[key].prescribing_number_unit,
1997
                       children[key].prescribing_number_unit,
1957
                     delivery_way: children[key].delivery_way,
1998
                     delivery_way: children[key].delivery_way,
1958
                     execution_frequency: children[key].execution_frequency,
1999
                     execution_frequency: children[key].execution_frequency,
2000
+                    drug_name_id: children[key].drug_name_id,
2001
+                    drug_id: children[key].drug_id,
2002
+                    way:children[key].way,
1959
                     isEdit: 0,
2003
                     isEdit: 0,
1960
                     id: 0,
2004
                     id: 0,
1961
                     children: [],
2005
                     children: [],
2049
                       groups[index].prescribing_number_unit,
2093
                       groups[index].prescribing_number_unit,
2050
                     delivery_way: groups[index].delivery_way,
2094
                     delivery_way: groups[index].delivery_way,
2051
                     execution_frequency: groups[index].execution_frequency,
2095
                     execution_frequency: groups[index].execution_frequency,
2096
+                    drug_name_id:groups[index].drug_name_id,
2097
+                    drug_id:groups[index].drug_id,
2098
+                    way:groups[index].way,
2052
                     isEdit: 0,
2099
                     isEdit: 0,
2053
                     index: 0,
2100
                     index: 0,
2054
                     id: groups[index].id,
2101
                     id: groups[index].id,
2072
                         prescribing_number_unit:
2119
                         prescribing_number_unit:
2073
                           childMap[item.id][key].prescribing_number_unit,
2120
                           childMap[item.id][key].prescribing_number_unit,
2074
                         delivery_way: childMap[item.id][key].delivery_way,
2121
                         delivery_way: childMap[item.id][key].delivery_way,
2075
-                        execution_frequency:
2076
-                          childMap[item.id][key].execution_frequency,
2122
+                        execution_frequency:childMap[item.id][key].execution_frequency,
2123
+                         drug_name_id:childMap[item.id][key].drug_name_id,
2124
+                         drug_id:childMap[item.id][key].drug_id,
2125
+                         way:childMap[item.id][key].way,
2077
                         isEdit: 0,
2126
                         isEdit: 0,
2078
                         index: 0,
2127
                         index: 0,
2079
                         id: childMap[item.id][key].id,
2128
                         id: childMap[item.id][key].id,
2107
       this.templateFormVisible = true;
2156
       this.templateFormVisible = true;
2108
     },
2157
     },
2109
     selectGroupAdvice(row) {
2158
     selectGroupAdvice(row) {
2159
+      console.log('row',row)
2110
       this.groupSelectRow = row;
2160
       this.groupSelectRow = row;
2111
     },
2161
     },
2112
     groupClassName({ row, rowIndex }) {
2162
     groupClassName({ row, rowIndex }) {
2176
           prescribing_number_unit: groups[index].prescribing_number_unit,
2226
           prescribing_number_unit: groups[index].prescribing_number_unit,
2177
           delivery_way: groups[index].delivery_way,
2227
           delivery_way: groups[index].delivery_way,
2178
           execution_frequency: groups[index].execution_frequency,
2228
           execution_frequency: groups[index].execution_frequency,
2229
+          drug_name_id:groups[index].drug_name_id,
2230
+          drug_id:groups[index].drug_id,
2231
+          way:groups[index].way,
2179
           isEdit: 0,
2232
           isEdit: 0,
2180
           index: 0,
2233
           index: 0,
2181
           id: groups[index].id,
2234
           id: groups[index].id,
2200
                 childMap[item.id][key].prescribing_number_unit,
2253
                 childMap[item.id][key].prescribing_number_unit,
2201
               delivery_way: childMap[item.id][key].delivery_way,
2254
               delivery_way: childMap[item.id][key].delivery_way,
2202
               execution_frequency: childMap[item.id][key].execution_frequency,
2255
               execution_frequency: childMap[item.id][key].execution_frequency,
2256
+               drug_name_id: childMap[item.id][key].drug_name_id,
2257
+               drug_id: childMap[item.id][key].drug_id,
2258
+               way: childMap[item.id][key].way,
2203
               isEdit: 0,
2259
               isEdit: 0,
2204
               index: 0,
2260
               index: 0,
2205
               id: childMap[item.id][key].id,
2261
               id: childMap[item.id][key].id,
2340
             this.src_type = this.drugSpec[i].type
2396
             this.src_type = this.drugSpec[i].type
2341
             this.nameForm.drug_id = this.drugSpec[i].id
2397
             this.nameForm.drug_id = this.drugSpec[i].id
2342
             this.nameForm.way = this.drugSpec[i].type
2398
             this.nameForm.way = this.drugSpec[i].type
2399
+            this.drug_name_id = this.drugSpec[i].drug_name_id
2400
+            this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
2343
           }
2401
           }
2344
         }
2402
         }
2345
     },
2403
     },

+ 2 - 0
src/xt_pages/stock/selfPreparedMedicine/components/addMedicine.vue ファイルの表示

111
              patient_id:this.patient_id,
111
              patient_id:this.patient_id,
112
              medicineData:this.medicineData
112
              medicineData:this.medicineData
113
           }
113
           }
114
+         console.log("params----",params)
115
+       
114
          SaveSelfMedicines(params).then(response=>{
116
          SaveSelfMedicines(params).then(response=>{
115
              if(response.data.state == 1){
117
              if(response.data.state == 1){
116
                 var msg = response.data.data.msg
118
                 var msg = response.data.data.msg

+ 63 - 6
src/xt_pages/stock/selfPreparedMedicine/index.vue ファイルの表示

34
                     :value="item.value">
34
                     :value="item.value">
35
                     </el-option>
35
                     </el-option>
36
                 </el-select> -->
36
                 </el-select> -->
37
-                <el-input style="width: 180px;margin:0 10px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
38
-                <el-button class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button>
37
+                <!-- <el-input style="width: 180px;margin:0 10px;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/> -->
38
+                <!-- <el-button class="filter-item" type="primary" icon="el-icon-search" @click="searchAction">搜索</el-button> -->
39
+                 <el-autocomplete
40
+                  style="margin:16px 5px"
41
+                  popper-class="my-autocomplete"
42
+                  v-model.trim="search_input"
43
+                  :fetch-suggestions="querySearchAsync"
44
+                  :trigger-on-focus="false"
45
+                  placeholder="病人名字或者透析号"
46
+                  @select="handleSelect"
47
+                >
48
+                  <i class="el-icon-search el-input__icon" slot="suffix"> </i>
49
+                  <template slot-scope="{ item }">
50
+                    <div class="name">{{ item.name }}</div>
51
+                  </template>
52
+                </el-autocomplete>
53
+
39
             </div>
54
             </div>
40
             <el-container>
55
             <el-container>
41
                 <div style="width:160px;">
56
                 <div style="width:160px;">
75
                             </template>
90
                             </template>
76
                         </el-table-column>
91
                         </el-table-column>
77
                         <el-table-column align="center" prop="name" label="已使用" width="90">
92
                         <el-table-column align="center" prop="name" label="已使用" width="90">
78
-                            <template slot-scope="scope">{{getCount(scope.row.patient_id,scope.row.drug_name,scope.row.drug_spec)}}</template>
93
+                            <template slot-scope="scope">{{getCountTwo(scope.row.patient_id,scope.row.drug_name,scope.row.drug_spec)}}</template>
79
                         </el-table-column>
94
                         </el-table-column>
80
                         <el-table-column align="center" prop="name" label="剩余" width="90">
95
                         <el-table-column align="center" prop="name" label="剩余" width="90">
81
-                            <template slot-scope="scope">{{getTotal(scope.row.patient_id,scope.row.id)- getCount(scope.row.patient_id,scope.row.drug_name,scope.row.drug_spec)}}</template>
96
+                            <template slot-scope="scope">{{getTotal(scope.row.patient_id,scope.row.id)- getCountTwo(scope.row.patient_id,scope.row.drug_name,scope.row.drug_spec)}}</template>
82
                         </el-table-column>
97
                         </el-table-column>
83
                         <!-- <el-table-column align="center" prop="name" label="停用" width="90">
98
                         <!-- <el-table-column align="center" prop="name" label="停用" width="90">
84
                             <template slot-scope="scope">
99
                             <template slot-scope="scope">
170
             search_input:"",
185
             search_input:"",
171
             patient_id:0,
186
             patient_id:0,
172
             stockList:[],
187
             stockList:[],
173
-            outStocklist:[]
188
+            outStocklist:[],
189
+            outList:[]
174
         }
190
         }
175
     },
191
     },
176
     methods:{
192
     methods:{
241
                start_time:this.start_time,
257
                start_time:this.start_time,
242
                keyword:this.search_input,
258
                keyword:this.search_input,
243
             }
259
             }
260
+         
244
           getStockList(params).then(response=>{
261
           getStockList(params).then(response=>{
245
              if(response.data.state == 1){
262
              if(response.data.state == 1){
246
                 var medicalList = response.data.data.medicalList
263
                 var medicalList = response.data.data.medicalList
252
                 this.stockList = stocklist
269
                 this.stockList = stocklist
253
                 var outstocklist = response.data.data.outStocklist
270
                 var outstocklist = response.data.data.outStocklist
254
                 this.outStocklist = outstocklist
271
                 this.outStocklist = outstocklist
255
-                console.log("outStockList",outstocklist)
272
+                var outList =  response.data.data.outList
273
+                console.log("outList",outList)
274
+                this.outList = outList
256
               
275
               
257
               }
276
               }
258
           })  
277
           })  
295
            return total
314
            return total
296
         },
315
         },
297
 
316
 
317
+        getCountTwo(patientid,drugname,drugspec){
318
+           var total = 0
319
+           for(let i=0;i<this.outList.length;i++){
320
+             if(patientid == this.outList[i].patient_id && drugname == this.outList[i].drug_name && drugspec == this.outList[i].drug_spec){
321
+                  total += this.outList[i].outstore_number
322
+              }
323
+           }
324
+           return total
325
+        },
326
+
298
         getDrugSet(){
327
         getDrugSet(){
299
          getDrugSet().then(response=>{
328
          getDrugSet().then(response=>{
300
             if(response.data.state == 1){
329
             if(response.data.state == 1){
321
              }
350
              }
322
           }
351
           }
323
           return remarks
352
           return remarks
353
+        },
354
+
355
+        querySearchAsync(keyword, cb) {
356
+          let key = ''
357
+          if (keyword != undefined) {
358
+            key = keyword
359
+          }
360
+          let searchArray = []
361
+          getCurrentPatient(key).then(response => {
362
+            if (response.data.state == 1) {
363
+              searchArray = response.data.data.patient
364
+              cb(searchArray)
365
+            }
366
+          })
367
+          return searchArray
368
+        },
369
+        handleSelect(val){
370
+          console.log("val",val.id)
371
+          console.log("2222",this.tablePatient)
372
+          this.search_input = val.name
373
+          for(let i=0;i<this.tablePatient.length;i++){
374
+             if(this.tablePatient[i].id == val.id){
375
+               console.log("建立")
376
+               this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[i])
377
+             }
378
+          }
379
+          this.getlist()
324
         }
380
         }
325
     },
381
     },
326
     created(){
382
     created(){
331
     watch: {
387
     watch: {
332
      tablePatient: function() {
388
      tablePatient: function() {
333
       this.$nextTick(function() {
389
       this.$nextTick(function() {
390
+         console.log("222222",this.tablePatient[0])
334
         this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[0])
391
         this.$refs.monthlyPlanTable.setCurrentRow(this.tablePatient[0])
335
       })
392
       })
336
     }
393
     }

+ 8 - 10
src/xt_pages/stock/selfPreparedMedicine/info.vue ファイルの表示

497
               }
497
               }
498
            }
498
            }
499
            
499
            
500
-          console.log("------",this.form.unit)
501
-          //  var unit = ""
502
-          //  for(let i=0;i<this.untis.length;i++){
503
-          //    if(this.form.unit == this.untis[i].id){
504
-          //       unit = this.untis[i].name
505
-          //    }
506
-          //  }
507
-          
508
            const params = {
500
            const params = {
509
              drug_spec:drug_spec,
501
              drug_spec:drug_spec,
510
              drug_name_id:this.form.drug_name_id,
502
              drug_name_id:this.form.drug_name_id,
524
               this.ruleDialogVisible = false
516
               this.ruleDialogVisible = false
525
               this.form.drug_name_id = ""
517
               this.form.drug_name_id = ""
526
               this.form.unit = ""
518
               this.form.unit = ""
527
-              this.form.price = ""            
519
+              this.form.price = ""   
520
+              this.form.drug_stock_limit = ""         
521
+            }else{
522
+              this.$message.error("该药品规格名称已存在!")
528
             }
523
             }
529
          })  
524
          })  
530
        },
525
        },
565
               this.$message.success("保存成功")
560
               this.$message.success("保存成功")
566
               this.form.drug_name_id = ""
561
               this.form.drug_name_id = ""
567
               this.form.unit = ""
562
               this.form.unit = ""
568
-              this.form.price = ""   
563
+              this.form.price = ""  
564
+              this.form.drug_stock_limit = ""     
565
+            }else{
566
+              this.$message.error("该药品规格名称已存在!")
569
             }
567
             }
570
          })    
568
          })    
571
        },
569
        },

+ 2 - 0
src/xt_pages/stock/selfPreparedMedicine/query.vue ファイルの表示

257
                  stocklist[i].Count = 0
257
                  stocklist[i].Count = 0
258
               }
258
               }
259
               var outStockList =  response.data.data.outStockList
259
               var outStockList =  response.data.data.outStockList
260
+
261
+              
260
               for(let i=0;i<stocklist.length;i++){
262
               for(let i=0;i<stocklist.length;i++){
261
                 for(let j=0;j<outStockList.length;j++){
263
                 for(let j=0;j<outStockList.length;j++){
262
                    if(stocklist[i].patient_id == outStockList[j].patient_id &&stocklist[i].drug_name == outStockList[j].drug_name && stocklist[i].drug_spec == outStockList[j].drug_spec){
264
                    if(stocklist[i].patient_id == outStockList[j].patient_id &&stocklist[i].drug_name == outStockList[j].drug_name && stocklist[i].drug_spec == outStockList[j].drug_spec){