修复 编辑兑换码问题

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