Browse Source

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

See999 4 years ago
parent
commit
9ec8baf36b

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

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

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

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

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

@@ -2301,7 +2301,10 @@ export default {
2301 2301
             remark: this.groupForm.remark,
2302 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 2308
           var adviceNames = [];
2306 2309
           for (const index in this.groupForm.adviceNames) {
2307 2310
             this.groupForm.adviceNames[
@@ -2314,8 +2317,16 @@ export default {
2314 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 2330
               for(let index=0;index<submitForm.adviceNames.length;index++){
2320 2331
                   for(let i=0;i<this.medicals.length;i++){
2321 2332
                     if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
@@ -2323,15 +2334,8 @@ export default {
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 2339
           CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
2336 2340
             response => {
2337 2341
               if (response.data.state == 0) {