修改
This commit is contained in:
1 parent
5396ec358c
commit
796c4cb04e
2 files changed
+20
-18
No files matched your search
@@ -275,21 +275,24 @@ const getInitData = async () => {
|
||||
|
||||
// 计算账面数量
|
||||
const formatterAccountNumber = (row: any) => {
|
||||
let stock = row.stock
|
||||
console.log("xxx", stock)
|
||||
if (!row._cachedAccountNumber) {
|
||||
console.log("xxxxx")
|
||||
|
||||
return row.erpUnitVos
|
||||
.map((item: any, index: number) => {
|
||||
item.oriIndex = index
|
||||
return item
|
||||
})
|
||||
.sort((a: any, b: any) => b.packageNum - a.packageNum)
|
||||
.map((item: any, index: number) => {
|
||||
item.accountNumber = Math.floor(stock / item.packageNum)
|
||||
stock = stock % item.packageNum
|
||||
return item
|
||||
})
|
||||
.sort((a: any, b: any) => a.oriIndex - b.oriIndex)
|
||||
let stock = row.stock
|
||||
row._cachedAccountNumber = row.erpUnitVos
|
||||
.map((item: any, index: number) => {
|
||||
item.oriIndex = index
|
||||
return item
|
||||
})
|
||||
.sort((a: any, b: any) => b.packageNum - a.packageNum)
|
||||
.map((item: any, index: number) => {
|
||||
item.accountNumber = Math.floor(stock / item.packageNum)
|
||||
stock = stock % item.packageNum
|
||||
return item
|
||||
})
|
||||
.sort((a: any, b: any) => a.oriIndex - b.oriIndex)
|
||||
}
|
||||
return row._cachedAccountNumber
|
||||
}
|
||||
|
||||
// 顶部表格行新增
|
||||
|
||||
Reference in new issue
Block a user