重新计算立减金库存数量
This commit is contained in:
parent
b6158a714f
commit
64ff85866e
|
@ -204,7 +204,7 @@ export default class acclist extends React.Component {
|
|||
obj.product_name = item1.entity.batch_goods_name
|
||||
obj.quantity = item1.entity.stock
|
||||
item1.entity.weight = item1.weight
|
||||
obj.stock = Math.ceil(
|
||||
obj.stock = parseInt(
|
||||
divNum(
|
||||
item1.entity.all_budget,
|
||||
item1.entity.reduce_amount
|
||||
|
@ -214,7 +214,7 @@ export default class acclist extends React.Component {
|
|||
item1.entity.reduce_amount
|
||||
)
|
||||
)
|
||||
obj.usage = Math.ceil(
|
||||
obj.usage = parseInt(
|
||||
divNum(
|
||||
item1.entity.all_budget,
|
||||
item1.entity.reduce_amount
|
||||
|
@ -548,7 +548,7 @@ export default class acclist extends React.Component {
|
|||
: item.reduce_amount //官方价
|
||||
newObj.quantity = item.quantity
|
||||
? item.quantity
|
||||
: Math.ceil(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
: parseInt(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
newObj.origin = item?.origin ? item?.origin : item
|
||||
return newObj
|
||||
})
|
||||
|
|
|
@ -445,7 +445,7 @@ export default class acclist extends React.Component {
|
|||
: item.reduce_amount //官方价
|
||||
newObj.quantity = item.quantity
|
||||
? item.quantity
|
||||
: Math.ceil(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
: parseInt(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
newObj.origin = item.origin ? item.origin : item
|
||||
newObj.id = item.goods_id ? item.goods_id : item.id
|
||||
return newObj
|
||||
|
|
|
@ -367,16 +367,16 @@ export default class exchangedit extends React.Component {
|
|||
obj.channel_activity_id = item1.channel_activity_id
|
||||
obj.product_name = item1.batch_goods_name
|
||||
if (type) {
|
||||
obj.quantity = Math.ceil(divNum(item1.all_budget, item1.reduce_amount))
|
||||
obj.stock = Math.ceil(divNum(item1.all_budget, item1.reduce_amount))
|
||||
obj.quantity = parseInt(divNum(item1.all_budget, item1.reduce_amount))
|
||||
obj.stock = parseInt(divNum(item1.all_budget, item1.reduce_amount))
|
||||
obj.usage = 0
|
||||
} else {
|
||||
obj.quantity = item1.stock
|
||||
obj.stock = Math.ceil(
|
||||
obj.stock = parseInt(
|
||||
divNum(item1.all_budget, item1.reduce_amount) -
|
||||
divNum(item1.used_amount, item1.reduce_amount)
|
||||
)
|
||||
obj.usage = Math.ceil(
|
||||
obj.usage = parseInt(
|
||||
divNum(item1.all_budget, item1.reduce_amount) -
|
||||
divNum(item1.all_budget - item1.used_amount, item1.reduce_amount)
|
||||
)
|
||||
|
@ -420,11 +420,11 @@ export default class exchangedit extends React.Component {
|
|||
channel_activity_id: item.entity.channel_activity_id,
|
||||
product_name: item.entity.batch_goods_name,
|
||||
quantity: item.entity.stock,
|
||||
stock: Math.ceil(
|
||||
stock: parseInt(
|
||||
divNum(item.entity.all_budget, item.entity.reduce_amount) -
|
||||
divNum(item.entity.used_amount, item.entity.reduce_amount)
|
||||
),
|
||||
usage: Math.ceil(
|
||||
usage: parseInt(
|
||||
divNum(item.entity.all_budget, item.entity.reduce_amount) -
|
||||
divNum(
|
||||
item.entity.all_budget - item.entity.used_amount,
|
||||
|
@ -836,10 +836,10 @@ export default class exchangedit extends React.Component {
|
|||
: item.reduce_amount //官方价
|
||||
newObj.quantity = item.quantity
|
||||
? item.quantity
|
||||
: Math.ceil(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
: parseInt(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
newObj.stock = item.quantity
|
||||
? item.quantity
|
||||
: Math.ceil(divNum(item.all_budget, item.reduce_amount)) //剩余
|
||||
: parseInt(divNum(item.all_budget, item.reduce_amount)) //剩余
|
||||
newObj.usage = 0 //已使用
|
||||
newObj.origin = item.origin ? item.origin : item
|
||||
newObj.id = item.goods_id ? item.goods_id : item.id
|
||||
|
|
|
@ -235,9 +235,7 @@ export default class add extends React.Component {
|
|||
item3.time_limit.effect_time.end_time //有效时间
|
||||
obj.contract_price = item3.price //单价
|
||||
obj.official_price = item3.reduce_amount //官方价
|
||||
obj.quantity = Math.ceil(
|
||||
divNum(item3.all_budget, item3.reduce_amount)
|
||||
) //总库存
|
||||
obj.quantity = parseInt(divNum(item3.all_budget, item3.reduce_amount)) //总库存
|
||||
obj.origin = item3
|
||||
item1.products.push(obj)
|
||||
})
|
||||
|
|
|
@ -181,9 +181,7 @@ export default class add extends React.Component {
|
|||
item3.time_limit.effect_time.end_time //有效时间
|
||||
obj.contract_price = item3.price //单价
|
||||
obj.official_price = item3.reduce_amount //官方价
|
||||
obj.quantity = Math.ceil(
|
||||
divNum(item3.all_budget, item3.reduce_amount)
|
||||
) //总库存
|
||||
obj.quantity = parseInt(divNum(item3.all_budget, item3.reduce_amount)) //总库存
|
||||
obj.origin = item3
|
||||
item1.products.push(obj)
|
||||
})
|
||||
|
|
|
@ -368,7 +368,7 @@ export default class acclist extends React.Component {
|
|||
: item.reduce_amount //官方价
|
||||
newObj.quantity = item.quantity
|
||||
? item.quantity
|
||||
: Math.ceil(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
: parseInt(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
newObj.origin = item?.origin ? item?.origin : item
|
||||
return newObj
|
||||
})
|
||||
|
|
|
@ -204,7 +204,7 @@ export default class acclist extends React.Component {
|
|||
item1.time_limit?.effect_time.end_time, //有效时间
|
||||
contract_price: item1.price, //单价
|
||||
official_price: item1.reduce_amount, //官方价
|
||||
quantity: Math.ceil(
|
||||
quantity: parseInt(
|
||||
divNum(item1.all_budget, item1.reduce_amount)
|
||||
), //总库
|
||||
...item1
|
||||
|
@ -490,7 +490,7 @@ export default class acclist extends React.Component {
|
|||
: item.reduce_amount //官方价
|
||||
newObj.quantity = item.quantity
|
||||
? item.quantity
|
||||
: Math.ceil(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
: parseInt(divNum(item.all_budget, item.reduce_amount)) //总库
|
||||
newObj.origin = item.origin ? item.origin : item
|
||||
newObj.id = item.goods_id ? item.goods_id : item.id
|
||||
return newObj
|
||||
|
|
Loading…
Reference in New Issue