|
@@ -570,6 +570,7 @@ export default {
|
570
|
570
|
tempObj["total_count"] = 0;
|
571
|
571
|
tempObj["max_unit_fisrt"] = 0;
|
572
|
572
|
tempObj["min_unit_fisrt"] = 0;
|
|
573
|
+ tempObj["total_price"] = 0;
|
573
|
574
|
this.recordInfo.recordData.push(tempObj);
|
574
|
575
|
},
|
575
|
576
|
handleDelete: function (index, row) {
|
|
@@ -664,60 +665,42 @@ export default {
|
664
|
665
|
return;
|
665
|
666
|
}
|
666
|
667
|
for (let i = 0; i < this.recordInfo.recordData.length; i++) {
|
667
|
|
- this.recordInfo.recordData[i].price =
|
668
|
|
- this.recordInfo.recordData[i].price.toString();
|
|
668
|
+ this.recordInfo.recordData[i].total_price = (this.recordInfo.recordData[i].count * this.recordInfo.recordData[i].price).toString()
|
|
669
|
+ this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString();
|
669
|
670
|
|
670
|
671
|
for (let j = 0; j < this.manufacturerList.length; j++) {
|
671
|
|
- if (
|
672
|
|
- this.recordInfo.recordData[i].manufacturer ==
|
673
|
|
- this.manufacturerList[j].manufacturer_name
|
674
|
|
- ) {
|
675
|
|
- this.recordInfo.recordData[i].manufacturer =
|
676
|
|
- this.manufacturerList[j].id;
|
|
672
|
+ if (this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name) {
|
|
673
|
+ this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id;
|
677
|
674
|
}
|
678
|
675
|
}
|
679
|
676
|
if (this.recordInfo.recordData[i].dealer == "") {
|
680
|
|
- this.recordInfo.recordData[i].dealer = 0;
|
|
677
|
+ this.recordInfo.recordData[i].dealer = 0;
|
681
|
678
|
}
|
682
|
679
|
for (let z = 0; z < this.dealerList.length; z++) {
|
683
|
|
- if (
|
684
|
|
- this.recordInfo.recordData[i].dealer ==
|
685
|
|
- this.dealerList[z].dealer_name
|
686
|
|
- ) {
|
|
680
|
+ if (this.recordInfo.recordData[i].dealer ==this.dealerList[z].dealer_name) {
|
687
|
681
|
this.recordInfo.recordData[i].dealer = this.dealerList[z].id;
|
688
|
682
|
}
|
689
|
683
|
}
|
690
|
684
|
|
691
|
685
|
for (let y = 0; y < this.numberList.length; y++) {
|
692
|
|
- if (
|
693
|
|
- this.recordInfo.recordData[i].batch_number ==
|
694
|
|
- this.numberList[y].id
|
695
|
|
- ) {
|
696
|
|
- this.recordInfo.recordData[i].batch_number =
|
697
|
|
- this.numberList[y].batch_number;
|
698
|
|
- this.recordInfo.recordData[i].warehouse_info_id =
|
699
|
|
- this.numberList[y].id;
|
|
686
|
+ if (this.recordInfo.recordData[i].batch_number ==this.numberList[y].id) {
|
|
687
|
+ this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number;
|
|
688
|
+ this.recordInfo.recordData[i].warehouse_info_id = this.numberList[y].id;
|
700
|
689
|
}
|
701
|
690
|
}
|
702
|
691
|
for (let s = 0; s < this.doctorList.length; s++) {
|
703
|
|
- if (
|
704
|
|
- this.recordInfo.recordData[i].admin_user_id ==
|
705
|
|
- this.doctorList[s].user_name
|
706
|
|
- ) {
|
707
|
|
- this.recordInfo.recordData[i].admin_user_id =
|
708
|
|
- this.doctorList[s].admin_user_id;
|
|
692
|
+ if (this.recordInfo.recordData[i].admin_user_id == this.doctorList[s].user_name) {
|
|
693
|
+ this.recordInfo.recordData[i].admin_user_id = this.doctorList[s].admin_user_id;
|
709
|
694
|
}
|
710
|
695
|
}
|
711
|
696
|
|
712
|
|
- this.recordInfo.recordData[i].last_price =
|
713
|
|
- this.recordInfo.recordData[i].last_price.toString();
|
714
|
|
- this.recordInfo.recordData[i].stock_count =
|
715
|
|
- this.recordInfo.recordData[i].stock_count.toString();
|
|
697
|
+ this.recordInfo.recordData[i].last_price = this.recordInfo.recordData[i].last_price.toString();
|
|
698
|
+ this.recordInfo.recordData[i].stock_count = this.recordInfo.recordData[i].stock_count.toString();
|
716
|
699
|
}
|
717
|
700
|
const params = {
|
718
|
701
|
stockOut: this.recordInfo.recordData,
|
719
|
702
|
};
|
720
|
|
-
|
|
703
|
+ console.log("param22222222",params)
|
721
|
704
|
const loading = this.$loading({
|
722
|
705
|
lock: true,
|
723
|
706
|
text: "Loading",
|
|
@@ -917,7 +900,6 @@ export default {
|
917
|
900
|
},
|
918
|
901
|
changeUnit(val, index) {
|
919
|
902
|
console.log("vla33232233232323232", val);
|
920
|
|
-
|
921
|
903
|
this.getDrugBatchNumber(val.drug_id);
|
922
|
904
|
for (let i = 0; i < this.recordInfo.recordData.length; i++) {
|
923
|
905
|
if (this.recordInfo.recordData[i].drug_id == val.drug_id) {
|
|
@@ -926,16 +908,12 @@ export default {
|
926
|
908
|
this.recordInfo.recordData[i].price = val.retail_price;
|
927
|
909
|
}
|
928
|
910
|
if (this.recordInfo.recordData[i].max_unit == val.min_unit) {
|
929
|
|
- this.recordInfo.recordData[i].price =
|
930
|
|
- this.recordInfo.recordData[i].min_price;
|
|
911
|
+ this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].min_price;
|
931
|
912
|
}
|
932
|
913
|
}
|
933
|
914
|
for (let j = 0; j < this.numberList.length; j++) {
|
934
|
|
- if (
|
935
|
|
- this.recordInfo.recordData[i].batch_number == this.numberList[j].id
|
936
|
|
- ) {
|
937
|
|
- this.recordInfo.recordData[i].batch_number =
|
938
|
|
- this.numberList[j].batch_number;
|
|
915
|
+ if (this.recordInfo.recordData[i].batch_number == this.numberList[j].id) {
|
|
916
|
+ this.recordInfo.recordData[i].batch_number = this.numberList[j].batch_number;
|
939
|
917
|
}
|
940
|
918
|
}
|
941
|
919
|
}
|
|
@@ -1094,6 +1072,7 @@ export default {
|
1094
|
1072
|
tempObj["total_count"] = 0;
|
1095
|
1073
|
tempObj["max_unit_fisrt"] = 0;
|
1096
|
1074
|
tempObj["min_unit_fisrt"] = 0;
|
|
1075
|
+ tempObj["total_price"] = 0;
|
1097
|
1076
|
this.recordInfo.recordData.push(tempObj);
|
1098
|
1077
|
this.GetConfigInfo();
|
1099
|
1078
|
this.propForm.goodUnit = this.$store.getters.good_unit;
|