兑换码管理 商品范围列表删除对接完成

This commit is contained in:
wangsongsole 2022-05-25 10:20:02 +08:00
parent 8d860f47ed
commit 2b9faea732
1 changed files with 7 additions and 3 deletions

View File

@ -150,15 +150,18 @@ export default class commoditylist extends React.Component {
(req, msg) => { (req, msg) => {
const resData = [] const resData = []
req.data.map((item) => { req.data.map((item) => {
/* 1为商品 2为立减金 转译字符方便处理 */ /* type 1为商品 2为立减金 转译字符方便处理 */
/* 此处only 商品为product_id 立减金为channel_activity_id */
if (item.type === 1) { if (item.type === 1) {
item.entity.upstream = '直连天下' item.entity.upstream = '直连天下'
item.entity.only = item.entity.product_id item.entity.only = item.entity.product_id
item.entity.id = item.id
resData.push(item.entity) resData.push(item.entity)
} else if (item.type === 2) { } else if (item.type === 2) {
resData.push({ resData.push({
product_type_text: '立减金', product_type_text: '立减金',
only: item.entity.channel_activity_id, only: item.entity.channel_activity_id,
id: item.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,
@ -233,7 +236,7 @@ export default class commoditylist extends React.Component {
title: '确认操作', title: '确认操作',
content: <p>是否删除该商品</p>, content: <p>是否删除该商品</p>,
onConfirm() { onConfirm() {
delCodeProduct(row.code_batch_id, row.only) delCodeProduct(row.id)
.then((res) => { .then((res) => {
handelResponse( handelResponse(
res, res,
@ -278,7 +281,8 @@ export default class commoditylist extends React.Component {
] ]
} }
] ]
sessionStorage.setItem('dataInfo', rowData.product_id) /* 此处only 商品为product_id 立减金为channel_activity_id */
sessionStorage.setItem('dataInfo', rowData.only)
sessionStorage.setItem('breakchangenav', JSON.stringify(activerou)) sessionStorage.setItem('breakchangenav', JSON.stringify(activerou))
} }
//敲回车查询 //敲回车查询