|
@@ -387,6 +387,49 @@ export default {
|
387
|
387
|
}
|
388
|
388
|
}
|
389
|
389
|
}
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+ // 新版
|
|
393
|
+ if(list[i].new_drug_in_flow_info!=null && list[i].new_drug_in_flow_info.length>0){
|
|
394
|
+ for(let j=0;j<list[i].new_drug_in_flow_info.length;j++){
|
|
395
|
+ if(list[i].max_unit == list[i].new_drug_in_flow_info[j].max_unit){
|
|
396
|
+ list[i].new_drug_in_flow_info[j].count = list[i].new_drug_in_flow_info[j].count * list[i].min_number
|
|
397
|
+ }
|
|
398
|
+ }
|
|
399
|
+ }
|
|
400
|
+
|
|
401
|
+ if(list[i].new_drug_cancel_flow_info!=null && list[i].new_drug_cancel_flow_info.length>0){
|
|
402
|
+ for(let j=0;j<list[i].new_drug_cancel_flow_info.length;j++){
|
|
403
|
+ if(list[i].max_unit == list[i].new_drug_cancel_flow_info[j].max_unit){
|
|
404
|
+ list[i].new_drug_cancel_flow_info[j].count = list[i].new_drug_cancel_flow_info[j].count * list[i].min_number
|
|
405
|
+ }
|
|
406
|
+ }
|
|
407
|
+ }
|
|
408
|
+
|
|
409
|
+ if(list[i].new_drug_no_profit_flow_info!=null && list[i].new_drug_no_profit_flow_info.length>0){
|
|
410
|
+ for(let j=0;j<list[i].new_drug_no_profit_flow_info.length;j++){
|
|
411
|
+ if(list[i].max_unit == list[i].new_drug_no_profit_flow_info[j].max_unit){
|
|
412
|
+ list[i].new_drug_no_profit_flow_info[j].count = list[i].new_drug_no_profit_flow_info[j].count * list[i].min_number
|
|
413
|
+ }
|
|
414
|
+ }
|
|
415
|
+ }
|
|
416
|
+
|
|
417
|
+ if(list[i].new_drug_out_flow_info!=null && list[i].new_drug_out_flow_info.length>0){
|
|
418
|
+ for(let j=0;j<list[i].new_drug_out_flow_info.length;j++){
|
|
419
|
+ if(list[i].max_unit == list[i].new_drug_out_flow_info[j].max_unit){
|
|
420
|
+ list[i].new_drug_out_flow_info[j].count = list[i].new_drug_out_flow_info[j].count * list[i].min_number
|
|
421
|
+ }
|
|
422
|
+ }
|
|
423
|
+ }
|
|
424
|
+
|
|
425
|
+ if(list[i].new_drug_profit_flow_info!=null && list[i].new_drug_profit_flow_info.length>0){
|
|
426
|
+ for(let j=0;j<list[i].new_drug_profit_flow_info.length;j++){
|
|
427
|
+ if(list[i].max_unit == list[i].new_drug_profit_flow_info[j].max_unit){
|
|
428
|
+ list[i].new_drug_profit_flow_info[j].count = list[i].new_drug_profit_flow_info[j].count * list[i].min_number
|
|
429
|
+ }
|
|
430
|
+ }
|
|
431
|
+ }
|
|
432
|
+
|
390
|
433
|
}
|
391
|
434
|
|
392
|
435
|
console.log("list23323223322332232323322323wode",list)
|
|
@@ -394,34 +437,31 @@ export default {
|
394
|
437
|
list[i].last_price_in = 0
|
395
|
438
|
list[i].drugAddOne= 0
|
396
|
439
|
list[i].drugOutOne =0
|
397
|
|
- list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit)
|
398
|
|
- // list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
|
399
|
|
- // list[i].drugInMoney = this.getDrugInMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
|
400
|
|
- // list[i].drugSaleMoney = this.getSaleMoneyOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
|
|
440
|
+
|
|
441
|
+ // list[i].drugIn = this.GetDrugStartFlow(list[i].DrugStatFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit)
|
|
442
|
+
|
|
443
|
+ list[i].drugIn = this.GetInitStartFlow(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
|
|
444
|
+ list[i].over_count_one = this.GetInitStartFlowOne(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit)
|
401
|
445
|
list[i].drugInMoney = list[i].last_price
|
402
|
446
|
list[i].drugSaleMoney = "/"
|
403
|
447
|
|
404
|
448
|
list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
|
405
|
449
|
list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
|
406
|
|
- // list[i].drugAddPrice = this.getdrugAddPrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
|
407
|
|
- // list[i].drugAddSalePrice = this.drugAddSalePrice(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
|
|
450
|
+
|
408
|
451
|
list[i].drugAddPrice = "/"
|
409
|
452
|
list[i].drugAddSalePrice = "/"
|
410
|
453
|
|
411
|
454
|
list[i].drugOut= this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
|
412
|
455
|
list[i].drugOutOne =this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
|
413
|
|
- // list[i].drugOutPrice = this.getDrugOutPrice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
|
414
|
|
- // list[i].drugOutSalePrice = this.getDrugOutSaleprice(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
|
|
456
|
+
|
415
|
457
|
list[i].drugOutPrice = "/"
|
416
|
458
|
list[i].drugOutSalePrice = "/"
|
417
|
459
|
|
418
|
|
- // list[i].overDrug = this.getDrugWarehouseInfo(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
|
419
|
|
- // list[i].overDrugPrice = this.getDrugInMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
|
420
|
|
- // list[i].oveDrugSaleMoney = this.getSaleMoney(list[i].DrugWarehouseInfoEnd,list[i].DrugWarehouseOutInfoEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareEndStockInventoryProfit,list[i].WareEndStockInventoryLosses,list[i].WareEndStockCancelInfo)
|
|
460
|
+
|
421
|
461
|
if(this.org_id == 10265){
|
422
|
462
|
list[i].overDrug = this.GetDrugEndFlow(list[i].DrugEndFlow.over_count,list[i].min_number,list[i].min_unit,list[i].max_unit)
|
423
|
463
|
}else{
|
424
|
|
- list[i].overDrug = this.GetDrugOver(list[i].DrugStatFlow.over_count,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
|
|
464
|
+ list[i].overDrug = this.GetDrugOver(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
|
425
|
465
|
}
|
426
|
466
|
|
427
|
467
|
list[i].overDrugPrice = "/"
|
|
@@ -1395,9 +1435,9 @@ export default {
|
1395
|
1435
|
var min_str = ""
|
1396
|
1436
|
var max_str = ""
|
1397
|
1437
|
total = totalone + totaltwo - totalthree
|
1398
|
|
- console.log("totoalone---------------",totalone)
|
1399
|
|
- console.log("totaltwo------------",totaltwo)
|
1400
|
|
- console.log("totalthree----------",totalthree)
|
|
1438
|
+ // console.log("totoalone---------------",totalone)
|
|
1439
|
+ // console.log("totaltwo------------",totaltwo)
|
|
1440
|
+ // console.log("totalthree----------",totalthree)
|
1401
|
1441
|
if (total < min_number) {
|
1402
|
1442
|
min_str = total + min_unit;
|
1403
|
1443
|
}
|
|
@@ -1418,6 +1458,118 @@ export default {
|
1418
|
1458
|
}else{
|
1419
|
1459
|
return max_str + min_str;
|
1420
|
1460
|
}
|
|
1461
|
+ },
|
|
1462
|
+ GetInitStartFlow(val1,val2,val3,val4,val5,min_number,min_unit,max_unit){
|
|
1463
|
+ var total_one =0
|
|
1464
|
+ var total_two = 0
|
|
1465
|
+ var total_three =0
|
|
1466
|
+ var total_four =0
|
|
1467
|
+ var total_five = 0
|
|
1468
|
+ var total =0
|
|
1469
|
+ var min_str = ""
|
|
1470
|
+ var max_str = ""
|
|
1471
|
+ if(val1!=null && val1.length>0){
|
|
1472
|
+ for(let i=0;i<val1.length;i++){
|
|
1473
|
+ total_one +=val1[i].count
|
|
1474
|
+ }
|
|
1475
|
+ }
|
|
1476
|
+
|
|
1477
|
+ if(val2!=null && val2.length>0){
|
|
1478
|
+ for(let i=0;i<val2.length;i++){
|
|
1479
|
+ total_two +=val2[i].count
|
|
1480
|
+ }
|
|
1481
|
+ }
|
|
1482
|
+
|
|
1483
|
+ console.log("val3",val3)
|
|
1484
|
+ if(val3!=null && val3.length>0){
|
|
1485
|
+ for(let i=0;i<val3.length;i++){
|
|
1486
|
+ total_three +=val3[i].count
|
|
1487
|
+ }
|
|
1488
|
+ }
|
|
1489
|
+ if(val4!=null && val4.length>0){
|
|
1490
|
+ for(let i=0;i<val4.length;i++){
|
|
1491
|
+ total_four +=val4[i].count
|
|
1492
|
+ }
|
|
1493
|
+ }
|
|
1494
|
+
|
|
1495
|
+ if(val5!=null && val5.length>0){
|
|
1496
|
+ for(let i=0;i<val5.length;i++){
|
|
1497
|
+ total_five +=val5[i].count
|
|
1498
|
+ }
|
|
1499
|
+ }
|
|
1500
|
+ console.log("入库",total_one)
|
|
1501
|
+ console.log("盘盈",total_two)
|
|
1502
|
+ console.log("出库",total_three)
|
|
1503
|
+ console.log("盘亏",total_four)
|
|
1504
|
+ console.log("退库",total_five)
|
|
1505
|
+ var total = total_one + total_two -total_three-total_four + total_five
|
|
1506
|
+ if (total < min_number) {
|
|
1507
|
+ min_str = total + min_unit;
|
|
1508
|
+ }
|
|
1509
|
+ if (total == 0) {
|
|
1510
|
+ min_str = "";
|
|
1511
|
+ max_str = "";
|
|
1512
|
+ }
|
|
1513
|
+ if (total >= min_number) {
|
|
1514
|
+ if (parseInt(total / min_number) != 0) {
|
|
1515
|
+ max_str = parseInt(total / min_number) + max_unit;
|
|
1516
|
+ }
|
|
1517
|
+ if (total % min_number != 0) {
|
|
1518
|
+ min_str = (total % min_number) + min_unit;
|
|
1519
|
+ }
|
|
1520
|
+ }
|
|
1521
|
+ if(max_str == "" && min_str == ""){
|
|
1522
|
+ return "0"
|
|
1523
|
+ }else{
|
|
1524
|
+ return max_str + min_str;
|
|
1525
|
+ }
|
|
1526
|
+ },
|
|
1527
|
+ GetInitStartFlowOne(val1,val2,val3,val4,val5,min_number,min_unit,max_unit){
|
|
1528
|
+ var total_one =0
|
|
1529
|
+ var total_two = 0
|
|
1530
|
+ var total_three =0
|
|
1531
|
+ var total_four =0
|
|
1532
|
+ var total_five = 0
|
|
1533
|
+ var total =0
|
|
1534
|
+ var min_str = ""
|
|
1535
|
+ var max_str = ""
|
|
1536
|
+ if(val1!=null && val1.length>0){
|
|
1537
|
+ for(let i=0;i<val1.length;i++){
|
|
1538
|
+ total_one +=val1[i].count
|
|
1539
|
+ }
|
|
1540
|
+ }
|
|
1541
|
+
|
|
1542
|
+ if(val2!=null && val2.length>0){
|
|
1543
|
+ for(let i=0;i<val2.length;i++){
|
|
1544
|
+ total_two +=val2[i].count
|
|
1545
|
+ }
|
|
1546
|
+ }
|
|
1547
|
+
|
|
1548
|
+ console.log("val3",val3)
|
|
1549
|
+ if(val3!=null && val3.length>0){
|
|
1550
|
+ for(let i=0;i<val3.length;i++){
|
|
1551
|
+ total_three +=val3[i].count
|
|
1552
|
+ }
|
|
1553
|
+ }
|
|
1554
|
+ if(val4!=null && val4.length>0){
|
|
1555
|
+ for(let i=0;i<val4.length;i++){
|
|
1556
|
+ total_four +=val4[i].count
|
|
1557
|
+ }
|
|
1558
|
+ }
|
|
1559
|
+
|
|
1560
|
+ if(val5!=null && val5.length>0){
|
|
1561
|
+ for(let i=0;i<val5.length;i++){
|
|
1562
|
+ total_five +=val5[i].count
|
|
1563
|
+ }
|
|
1564
|
+ }
|
|
1565
|
+ console.log("入库",total_one)
|
|
1566
|
+ console.log("盘盈",total_two)
|
|
1567
|
+ console.log("出库",total_three)
|
|
1568
|
+ console.log("盘亏",total_four)
|
|
1569
|
+ console.log("退库",total_five)
|
|
1570
|
+ var total = total_one + total_two -total_three-total_four + total_five
|
|
1571
|
+
|
|
1572
|
+ return total
|
1421
|
1573
|
}
|
1422
|
1574
|
}
|
1423
|
1575
|
}
|