Browse Source

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

csx 3 years ago
parent
commit
841ad72bb3

+ 4 - 2
src/xt_pages/supply/components/addGoodOrder.vue View File

348
         this.supplyList = response.data.data.supplyList
348
         this.supplyList = response.data.data.supplyList
349
        for(let i=0;i<drugList.length;i++){
349
        for(let i=0;i<drugList.length;i++){
350
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
350
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
351
-            drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
351
+            if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
352
+              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
353
+            }
352
           }
354
           }
353
         for(let j=0;j<this.manufactuerList.length;j++){
355
         for(let j=0;j<this.manufactuerList.length;j++){
354
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
356
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
513
     var min_str = ""
515
     var min_str = ""
514
     if (arr.length > 0) {
516
     if (arr.length > 0) {
515
       for(let i=0;i<arr.length;i++){
517
       for(let i=0;i<arr.length;i++){
516
-        total += parseInt(arr[i].stock_max_number)
518
+        total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number)
517
       }
519
       }
518
     }
520
     }
519
     if (total < min_number){
521
     if (total < min_number){

+ 7 - 4
src/xt_pages/supply/components/addPurchaseOrder.vue View File

282
     getInitOrder().then(response=>{
282
     getInitOrder().then(response=>{
283
     if(response.data.state == 1){
283
     if(response.data.state == 1){
284
         var drugList = response.data.data.drugList
284
         var drugList = response.data.data.drugList
285
-        
285
+        console.log("druglist23232232323232332",drugList)
286
         this.manufactuerList = response.data.data.manufactuerList
286
         this.manufactuerList = response.data.data.manufactuerList
287
         this.goodTypeList = response.data.data.goodTypeList
287
         this.goodTypeList = response.data.data.goodTypeList
288
         this.drugTypeList = response.data.data.drugTypeList
288
         this.drugTypeList = response.data.data.drugTypeList
289
         this.supplyList = response.data.data.supplyList
289
         this.supplyList = response.data.data.supplyList
290
        for(let i=0;i<drugList.length;i++){
290
        for(let i=0;i<drugList.length;i++){
291
-          
292
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
291
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
293
-            drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
292
+            if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
293
+              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
294
+            }
295
+           
294
           }
296
           }
295
         for(let j=0;j<this.manufactuerList.length;j++){
297
         for(let j=0;j<this.manufactuerList.length;j++){
296
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
298
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
525
 
527
 
526
 },
528
 },
527
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
529
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
530
+    console.log("arr2332233232",arr)
528
     var total = 0
531
     var total = 0
529
     var max_str=  ""
532
     var max_str=  ""
530
     var min_str = ""
533
     var min_str = ""
531
     if (arr.length > 0) {
534
     if (arr.length > 0) {
532
       for(let i=0;i<arr.length;i++){
535
       for(let i=0;i<arr.length;i++){
533
-        total += parseInt(arr[i].stock_max_number)
536
+        total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number)
534
       }
537
       }
535
     }
538
     }
536
     if (total < min_number){
539
     if (total < min_number){

+ 4 - 2
src/xt_pages/supply/components/editGoodOrder.vue View File

347
         this.supplyList = response.data.data.supplyList
347
         this.supplyList = response.data.data.supplyList
348
        for(let i=0;i<drugList.length;i++){
348
        for(let i=0;i<drugList.length;i++){
349
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
349
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
350
-            drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
350
+             if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
351
+              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
352
+            }
351
           }
353
           }
352
         for(let j=0;j<this.manufactuerList.length;j++){
354
         for(let j=0;j<this.manufactuerList.length;j++){
353
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
355
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
521
     var min_str = ""
523
     var min_str = ""
522
     if (arr.length > 0) {
524
     if (arr.length > 0) {
523
       for(let i=0;i<arr.length;i++){
525
       for(let i=0;i<arr.length;i++){
524
-        total += parseInt(arr[i].stock_max_number)
526
+        total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number)
525
       }
527
       }
526
     }
528
     }
527
     if (total < min_number){
529
     if (total < min_number){

+ 4 - 2
src/xt_pages/supply/components/editPurchaseOrder.vue View File

303
         this.supplyList = response.data.data.supplyList
303
         this.supplyList = response.data.data.supplyList
304
        for(let i=0;i<drugList.length;i++){
304
        for(let i=0;i<drugList.length;i++){
305
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
305
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
306
-            drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
306
+            if(drugList[i].max_unit == drugList[i].drug_warehouse_info[z].max_unit){
307
+              drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
308
+            }
307
           }
309
           }
308
         for(let j=0;j<this.manufactuerList.length;j++){
310
         for(let j=0;j<this.manufactuerList.length;j++){
309
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
311
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
469
     var min_str = ""
471
     var min_str = ""
470
     if (arr.length > 0) {
472
     if (arr.length > 0) {
471
       for(let i=0;i<arr.length;i++){
473
       for(let i=0;i<arr.length;i++){
472
-        total += parseInt(arr[i].stock_max_number)
474
+        total += parseInt(arr[i].stock_max_number+arr[i].stock_min_number)
473
       }
475
       }
474
     }
476
     }
475
     if (total < min_number){
477
     if (total < min_number){