|
|
@@ -182,7 +182,11 @@
|
|
|
const cacheWidths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
|
|
|
const applyWidth = (col) => {
|
|
|
if (col.prop && cacheWidths[col.prop]) {
|
|
|
- return { ...col, width: cacheWidths[col.prop], minWidth: undefined };
|
|
|
+ return {
|
|
|
+ ...col,
|
|
|
+ width: cacheWidths[col.prop],
|
|
|
+ minWidth: undefined
|
|
|
+ };
|
|
|
}
|
|
|
return col;
|
|
|
};
|
|
|
@@ -441,7 +445,8 @@
|
|
|
data.list = data.list.map((item, index) => {
|
|
|
const stockCountBase = Math.max(
|
|
|
Number(
|
|
|
- item.stockCountBase !== undefined && item.stockCountBase !== null
|
|
|
+ item.stockCountBase !== undefined &&
|
|
|
+ item.stockCountBase !== null
|
|
|
? item.stockCountBase
|
|
|
: item.measureQuantity
|
|
|
) || 0,
|
|
|
@@ -545,10 +550,14 @@
|
|
|
return Number(row.measureQuantity || 0);
|
|
|
},
|
|
|
getAvailableStockCount(row) {
|
|
|
- if (row.availableCountBase !== undefined && row.availableCountBase !== null) {
|
|
|
+ if (
|
|
|
+ row.availableCountBase !== undefined &&
|
|
|
+ row.availableCountBase !== null
|
|
|
+ ) {
|
|
|
return Number(row.availableCountBase);
|
|
|
}
|
|
|
- const available = this.getStockCount(row) - Number(row.lockQuantity || 0);
|
|
|
+ const available =
|
|
|
+ this.getStockCount(row) - Number(row.lockQuantity || 0);
|
|
|
return Math.max(Number(available.toFixed(4)), 0);
|
|
|
},
|
|
|
// 限制订单数量不超过当前可用数量
|