Browse Source

自备药

XMLWAN 4 years ago
parent
commit
9e7bd691dc

+ 1 - 0
src/xt_pages/stock/selfPreparedMedicine/components/addMedicine.vue View File

78
            getAllDrugNameList().then(response=>{
78
            getAllDrugNameList().then(response=>{
79
              if(response.data.state == 1){
79
              if(response.data.state == 1){
80
                var rullername =  response.data.data.rullerName
80
                var rullername =  response.data.data.rullerName
81
+               console.log("rullerName",rullername)
81
                this.tableData = rullername
82
                this.tableData = rullername
82
              }
83
              }
83
            }) 
84
            }) 

+ 15 - 8
src/xt_pages/stock/selfPreparedMedicine/info.vue View File

474
          getUnitByBaseId(params).then(response=>{
474
          getUnitByBaseId(params).then(response=>{
475
             if(response.data.state == 1){
475
             if(response.data.state == 1){
476
               var baseList =  response.data.data.baseList
476
               var baseList =  response.data.data.baseList
477
-              this.form.unit = parseInt(baseList.min_unit)
477
+            
478
+              this.form.unit = baseList.min_unit
478
               this.form.drug_stock_limit = baseList.drug_stock_limit,
479
               this.form.drug_stock_limit = baseList.drug_stock_limit,
479
               this.form.price = baseList.retail_price
480
               this.form.price = baseList.retail_price
480
               
481
               
486
               this.$message.error("请选择药品规格")
487
               this.$message.error("请选择药品规格")
487
               return
488
               return
488
            }
489
            }
490
+           
489
            var drug_spec = ""
491
            var drug_spec = ""
490
            var drug_name = ""
492
            var drug_name = ""
491
            for(let i=0;i<this.ruleName.length;i++){
493
            for(let i=0;i<this.ruleName.length;i++){
494
                 drug_name = this.ruleName[i].drug_name
496
                 drug_name = this.ruleName[i].drug_name
495
               }
497
               }
496
            }
498
            }
497
-           var unit = ""
498
-           for(let i=0;i<this.untis.length;i++){
499
-             if(this.form.unit == this.untis[i].id){
500
-                unit = this.untis[i].name
501
-             }
502
-           }
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
+          
503
            const params = {
508
            const params = {
504
              drug_spec:drug_spec,
509
              drug_spec:drug_spec,
505
              drug_name_id:this.form.drug_name_id,
510
              drug_name_id:this.form.drug_name_id,
506
              drug_id:this.form.drug_id,
511
              drug_id:this.form.drug_id,
507
-             unit:unit,
512
+             unit:this.form.unit,
508
              price:this.form.price,
513
              price:this.form.price,
509
              drug_stock_limit:this.form.drug_stock_limit, 
514
              drug_stock_limit:this.form.drug_stock_limit, 
510
              drug_name:drug_name
515
              drug_name:drug_name
511
            }
516
            }
517
+          console.log("params",params)
518
+         
512
          saveRulleName(params).then(response=>{
519
          saveRulleName(params).then(response=>{
513
             if(response.data.state == 1){
520
             if(response.data.state == 1){
514
               var standName =  response.data.data.RullerName
521
               var standName =  response.data.data.RullerName

+ 15 - 11
src/xt_pages/user/doctorAdvice.vue View File

2301
             remark: this.groupForm.remark,
2301
             remark: this.groupForm.remark,
2302
             parent_id: this.groupForm.parent_id
2302
             parent_id: this.groupForm.parent_id
2303
           };
2303
           };
2304
-       
2304
+          console.log("22222",submitForm)
2305
+          console.log("33333",this.private_drug_config.drug_start)
2306
+          console.log("44444",this.medicals)
2307
+         
2305
           var adviceNames = [];
2308
           var adviceNames = [];
2306
           for (const index in this.groupForm.adviceNames) {
2309
           for (const index in this.groupForm.adviceNames) {
2307
             this.groupForm.adviceNames[
2310
             this.groupForm.adviceNames[
2314
           submitForm.adviceNames = adviceNames;
2317
           submitForm.adviceNames = adviceNames;
2315
 
2318
 
2316
 
2319
 
2317
-          console.log("22222",submitForm)
2318
-          if(this.private_drug_config.drug_start == 1){
2320
+         
2321
+
2322
+          let mode = "";
2323
+          if (this.groupForm.advice_type == 1) {
2324
+            mode = "1-2";
2325
+          } else if (this.groupForm.advice_type == 3) {
2326
+            mode = "1-1";
2327
+          }
2328
+          
2329
+        if(this.private_drug_config.drug_start == 1){
2319
               for(let index=0;index<submitForm.adviceNames.length;index++){
2330
               for(let index=0;index<submitForm.adviceNames.length;index++){
2320
                   for(let i=0;i<this.medicals.length;i++){
2331
                   for(let i=0;i<this.medicals.length;i++){
2321
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
2332
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
2323
                     }
2334
                     }
2324
                   }
2335
                   }
2325
               }
2336
               }
2326
-            }
2327
-
2328
-          let mode = "";
2329
-          if (this.groupForm.advice_type == 1) {
2330
-            mode = "1-2";
2331
-          } else if (this.groupForm.advice_type == 3) {
2332
-            mode = "1-1";
2333
           }
2337
           }
2334
-
2338
+          console.log("this.===",submitForm)
2335
           CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
2339
           CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
2336
             response => {
2340
             response => {
2337
               if (response.data.state == 0) {
2341
               if (response.data.state == 0) {