|
|
@@ -179,11 +179,11 @@ export default {
|
|
|
dicChange(name, row) {
|
|
|
if (name == "dot") {
|
|
|
if (row) {
|
|
|
- this.qtyMax=row.balanceQuantity
|
|
|
- this.query.inventoryFinancing=row.balanceQuantityFinancing
|
|
|
- this.query.inventoryHave=row.balanceQuantityHave
|
|
|
+ this.qtyMax = row.balanceQuantity;
|
|
|
+ this.query.inventoryFinancing = row.balanceQuantityFinancing;
|
|
|
+ this.query.inventoryHave = row.balanceQuantityHave;
|
|
|
} else {
|
|
|
- this.qtyMax= 0;
|
|
|
+ this.qtyMax = 0;
|
|
|
this.query.inventoryFinancing = 0;
|
|
|
this.query.inventoryHave = 0;
|
|
|
}
|
|
|
@@ -239,9 +239,9 @@ export default {
|
|
|
row.quantityHave = 0;
|
|
|
let sum = 0;
|
|
|
let sendNumFinancing = 0;
|
|
|
- for (let item of this.data) {
|
|
|
- sum += Number(item.quantity);
|
|
|
- sendNumFinancing += Number(item.quantityFinancing);
|
|
|
+ for (let item of this.data.filter(item => item.quantity > 0)) {
|
|
|
+ sum += Number(item.quantity ? item.quantity : 0);
|
|
|
+ sendNumFinancing += Number(item.quantityFinancing?item.quantityFinancing:0);
|
|
|
}
|
|
|
if (sendNumFinancing > Number(this.query.inventoryFinancing)) {
|
|
|
return this.$message.error("融资数量不能超过" + this.query.inventoryFinancing);
|
|
|
@@ -255,9 +255,9 @@ export default {
|
|
|
row.quantityFinancing = 0;
|
|
|
let sum = 0;
|
|
|
let sendNumHave = 0;
|
|
|
- for (let item of this.data) {
|
|
|
- sum += Number(item.quantity);
|
|
|
- sendNumHave += Number(item.quantityHave);
|
|
|
+ for (let item of this.data.filter(item => item.quantity > 0)) {
|
|
|
+ sum += Number(item.quantity?item.quantity:0);
|
|
|
+ sendNumHave += Number(item.quantityHave?item.quantityHave:0);
|
|
|
}
|
|
|
|
|
|
if (sendNumHave > Number(this.query.inventoryHave)) {
|
|
|
@@ -274,7 +274,7 @@ export default {
|
|
|
this.data = [];
|
|
|
this.qtyMax = 0;
|
|
|
this.form = form;
|
|
|
- this.query =this.deepClone(row) ;
|
|
|
+ this.query = this.deepClone(row);
|
|
|
this.index = index;
|
|
|
this.data = this.deepClone(row.historyList);
|
|
|
this.qtyMax = row.inventory;
|
|
|
@@ -319,7 +319,7 @@ export default {
|
|
|
let obj = {
|
|
|
...this.query,
|
|
|
sendNum: sum,
|
|
|
- inventory:this.qtyMax,
|
|
|
+ inventory: this.qtyMax,
|
|
|
sendNumFinancing: sendNumFinancing,
|
|
|
sendNumHave: sendNumHave,
|
|
|
historyList: this.data
|