Merge branch 'couponV2.0' of https://codeup.aliyun.com/5f9118049cffa29cfdd3be1c/marketing/frontend into couponV2.0
This commit is contained in:
commit
e19cebe4d3
|
@ -905,8 +905,20 @@ export default class exchangeAdd extends React.Component {
|
||||||
item.type = 1
|
item.type = 1
|
||||||
item.only = item.product_id
|
item.only = item.product_id
|
||||||
item.upstream = "直连天下"
|
item.upstream = "直连天下"
|
||||||
item.stock = item.stock ? item.stock : item.quantity
|
|
||||||
item.usage = item.usage ? item.usage : 0
|
/* 赋值 剩余数量 已使用数量*/
|
||||||
|
/* 新增\复制 */
|
||||||
|
if ([0, 1].includes(this.state.isState)) {
|
||||||
|
item.stock = item.quantity
|
||||||
|
item.usage = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 编辑 */
|
||||||
|
if (this.state.isState === 2) {
|
||||||
|
item.stock = parseInt(item.quantity - item.usage)
|
||||||
|
item.usage = item.usage
|
||||||
|
}
|
||||||
|
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue