营销计划商品范围调整

This commit is contained in:
姜棚 2021-12-10 15:45:26 +08:00
parent 806825e38b
commit 5370e110c1
6 changed files with 22 additions and 14 deletions

View File

@ -340,9 +340,7 @@ export default class acclist extends React.Component{
this.setState({drawerVisible:false})
let rank = _.map(this.state.rank,(item)=>{
let product = productList.find((o)=>{return o.id == item.key })
return item.text+"("+product.title+")"
return item.text
})
console.log(rank)

View File

@ -120,6 +120,7 @@ export default class adduserinfo extends React.Component{
}
onProductChange(e){
this.setState({cur_product:e})
console.log("兑换码")
let cur_product = this.state.products.find((item)=>{return item.id == e.key})
let picItem = window.goods.find((item)=>{return item.id == cur_product.product_category_id})
let quantity = this.state.model.quantity;
@ -134,7 +135,7 @@ export default class adduserinfo extends React.Component{
quantity:quantity,
stock:quantity,
usage:0,
product_name:this.state.model.product_name,
product_name:cur_product.title,
show_url:picItem ? picItem.pic : "",
describe_url:picItem ? picItem.pic : "",
account_type:cur_product.account_type

View File

@ -251,10 +251,7 @@ export default class acclist extends React.Component{
this.setState({drawerVisible:false})
let rank = _.map(this.state.rank,(item)=>{
let product = productList.find((o)=>{return o.id == item.key })
return item.text+"("+product.title+")"
return item.text
})
console.log(rank)

View File

@ -89,6 +89,20 @@ export default class acclist extends React.Component{
}
this.setState({pagetitle:"编辑key"})
for(let i = 0;i < req.code_batch.length;i++)
{
let code_batch = req.code_batch[i];
let range = []
for(let j = 0;j < code_batch.product.length;j++)
{
let product = code_batch.product[j];
range.push(product.product_name)
}
code_batch.range = range.toString();
}
let model = {
style: req.style,
batch_name:req.batch_name,
@ -359,9 +373,7 @@ export default class acclist extends React.Component{
this.setState({drawerVisible:false})
let rank = _.map(this.state.rank,(item)=>{
let product = productList.find((o)=>{return o.id == item.key })
return item.text+"("+product.title+")"
return item.text
})
console.log(rank)

View File

@ -123,7 +123,7 @@ export default class adduserinfo extends React.Component{
official_price:cur_product.official_price,
cost_price:cur_product.cost_price,
quantity:this.state.model.quantity,
product_name:this.state.model.product_name,
product_name:cur_product.title,
show_url:this.state.show_url ? this.state.show_url : "",
describe_url:this.state.describe_url ? this.state.describe_url : "",
}

View File

@ -123,7 +123,7 @@ export default class adduserinfo extends React.Component{
let picItem = window.goods.find((item)=>{return item.id == cur_product.product_category_id})
console.log(picItem)
let model2 = {...this.state.model}
model2.product_id = cur_product.id;
model2.product_type=cur_product.type;
@ -131,7 +131,7 @@ export default class adduserinfo extends React.Component{
model2.official_price=cur_product.official_price;
model2.cost_price=cur_product.cost_price;
model2.quantity=this.state.model.quantity;
model2.product_name=this.state.model.product_name;
model2.product_name=cur_product.title;
model2.account_type=cur_product.account_type;
model2.show_url=picItem ? picItem.pic : "";
model2.describe_url=picItem ? picItem.pic : "";