修复 编辑兑换码问题

This commit is contained in:
wangsongsole 2022-06-07 18:25:02 +08:00
parent 7d49f08b8c
commit 4f73cea635
1 changed files with 7 additions and 9 deletions

View File

@ -273,7 +273,7 @@ export default class exchangedit extends React.Component {
this.setState({ codeInfo: codeInfo })
this.setState({ isload: true })
let table = _.map(reqCopy.goods, (res) => {
_.map(reqCopy.goods, (res) => {
res.checked = true
return res
})
@ -289,7 +289,6 @@ export default class exchangedit extends React.Component {
sessionStorage.setItem('productData', JSON.stringify(a1))
sessionStorage.setItem('knockGoldData', JSON.stringify(a1))
console.log(reqCopy.goods)
let arr = []
_.map(reqCopy.goods, (res) => {
let obj = {}
@ -328,7 +327,7 @@ export default class exchangedit extends React.Component {
type: item.type,
product_type_text: '立减金',
only: item.entity.channel_activity_id,
id: item.id,
id: item.entity.goods_id,
upstream: item.entity.channel === '1' ? '支付宝' : '微信',
code_batch_id: item.code_batch_id,
contract_price: item.entity.price,
@ -491,7 +490,6 @@ export default class exchangedit extends React.Component {
handelResponse(
res,
(req, msg) => {
console.log(req)
let model2 = this.state.model
model2.show_url = req.path
this.setState({ model: model2 })
@ -717,9 +715,10 @@ export default class exchangedit extends React.Component {
/* 转换商品结构 */
// temp
console.log(item)
const newObj = {}
newObj.product_name = item.batch_goods_name //名字
newObj.product_name = item.batch_goods_name
? item.batch_goods_name
: item.product_name //名字
newObj.channel_activity_id = item.channel_activity_id //批次号
newObj.only = item.channel_activity_id //批次号
newObj.type = 2 //类型
@ -740,8 +739,8 @@ export default class exchangedit extends React.Component {
newObj.quantity = item.quantity
? item.quantity
: (item.all_budget / item.denomination).toFixed(0) //总库
newObj.origin = item
newObj.id = item.goods_id
newObj.origin = item.origin ? item.origin : item
newObj.id = item.goods_id ? item.goods_id : item.id
return newObj
})
@ -1172,7 +1171,6 @@ export default class exchangedit extends React.Component {
onChange={(e) => {
let model = this.state.codeInfo
model.describe = e.target.value
console.log(model.describe)
this.setState({ codeInfo: model })
}}
maxCharacterCount={100}