|
|
@@ -681,7 +681,7 @@
|
|
|
const result = (measure * 100 - lock * 100) / 100;
|
|
|
return {
|
|
|
...item,
|
|
|
- availableQuantity: Math.round(result * 100) / 100
|
|
|
+ availableQuantity: Math.max(0, Math.round(result * 100) / 100)
|
|
|
}
|
|
|
});
|
|
|
this.total = data.count;
|
|
|
@@ -694,7 +694,7 @@
|
|
|
const inventoryBalance = Number(item.availableCountBase) || 0;
|
|
|
const lock = Number(item.lockQuantity) || 0;
|
|
|
const result = (inventoryBalance * 100 - lock * 100) / 100;
|
|
|
- item.availableQuantity = Math.round(result * 100) / 100;
|
|
|
+ item.availableQuantity = Math.max(0, Math.round(result * 100) / 100);
|
|
|
item.outboundNum = item.availableQuantity;
|
|
|
}
|
|
|
this.tableData = data.list;
|
|
|
@@ -710,7 +710,7 @@
|
|
|
const result = (measure * 100 - lock * 100) / 100;
|
|
|
return {
|
|
|
...item,
|
|
|
- availableQuantity: Math.round(result * 100) / 100
|
|
|
+ availableQuantity: Math.max(0, Math.round(result * 100) / 100)
|
|
|
}
|
|
|
});
|
|
|
this.total = data.count;
|
|
|
@@ -721,7 +721,7 @@
|
|
|
const measure = Number(item.measureQuantity) || 0;
|
|
|
const lock = Number(item.lockQuantity) || 0;
|
|
|
const result = (measure * 100 - lock * 100) / 100;
|
|
|
- data.list[i].availableQuantity = Math.round(result * 100) / 100;
|
|
|
+ data.list[i].availableQuantity = Math.max(0, Math.round(result * 100) / 100);
|
|
|
data.list[i].outboundNum = data.list[i].packingQuantity;
|
|
|
}
|
|
|
this.tableData = data.list;
|
|
|
@@ -932,7 +932,7 @@
|
|
|
const lock = Number(item.lockQuantity) || 0;
|
|
|
const result = (measure * 100 - lock * 100) / 100;
|
|
|
|
|
|
- item.availableQuantity = Math.round(result * 100) / 100;
|
|
|
+ item.availableQuantity = Math.max(0, Math.round(result * 100) / 100);
|
|
|
});
|
|
|
console.log('dimension == 1~~~', data.list);
|
|
|
this.updateProductOutboundNums(data.list);
|
|
|
@@ -953,7 +953,7 @@
|
|
|
const lock = Number(item.lockQuantity) || 0;
|
|
|
const result = (inventoryBalance * 100 - lock * 100) / 100;
|
|
|
|
|
|
- item.availableQuantity = Math.round(result * 100) / 100;
|
|
|
+ item.availableQuantity = Math.max(0, Math.round(result * 100) / 100);
|
|
|
item.outboundNum = item.availableQuantity;
|
|
|
});
|
|
|
return data;
|
|
|
@@ -972,7 +972,7 @@
|
|
|
const lock = Number(item.lockQuantity) || 0;
|
|
|
const result = (measure * 100 - lock * 100) / 100;
|
|
|
|
|
|
- item.availableQuantity = Math.round(result * 100) / 100;
|
|
|
+ item.availableQuantity = Math.max(0, Math.round(result * 100) / 100);
|
|
|
item.outboundNum = item.packingQuantity;
|
|
|
});
|
|
|
this.updateProductOutboundNums(data.list);
|