更新key商品
This commit is contained in:
parent
cae83883ce
commit
5795992c2a
|
@ -96,6 +96,17 @@ export default class acclist extends React.Component{
|
|||
componentDidMount(e){
|
||||
let batch_id=sessionStorage.getItem("keybatch_id")
|
||||
let copyOpearo=sessionStorage.getItem("copyOpearo")
|
||||
//key样式
|
||||
let keystyle = sessionStorage.getItem("keyStyle")
|
||||
|
||||
if(keystyle == 1)
|
||||
{
|
||||
let model = this.state.model;
|
||||
model.style = 6
|
||||
this.setState({model:model})
|
||||
this.setState({white_visible:true})
|
||||
}
|
||||
|
||||
//编辑
|
||||
if(batch_id > 0||copyOpearo==2)
|
||||
{
|
||||
|
@ -603,6 +614,7 @@ export default class acclist extends React.Component{
|
|||
|
||||
this.setState({tempdata:temp})
|
||||
this.setState({drawerVisible:true})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -886,7 +898,11 @@ export default class acclist extends React.Component{
|
|||
this.setState({audit_visible:true})
|
||||
}
|
||||
}
|
||||
|
||||
keyProductClick(row,index){
|
||||
this.setState({drawerVisible2:true})
|
||||
this.setState({productData:row})
|
||||
this.setState({product_title:"编辑商品"})
|
||||
}
|
||||
render(){
|
||||
const Column = [
|
||||
{
|
||||
|
@ -996,20 +1012,13 @@ export default class acclist extends React.Component{
|
|||
type: "slot",
|
||||
width:'auto',
|
||||
},
|
||||
{
|
||||
title: '商品Logo',
|
||||
prop: 'show_url',
|
||||
name: 'show_url',
|
||||
type: "slot",
|
||||
width:'auto',
|
||||
},
|
||||
{
|
||||
title: '商品图',
|
||||
prop: 'describe_url',
|
||||
name: 'describe_url',
|
||||
type: "slot",
|
||||
width:'auto',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
prop: 'edit',
|
||||
name: 'edit',
|
||||
type: "slot",
|
||||
width:'auto',
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
@ -1094,10 +1103,10 @@ export default class acclist extends React.Component{
|
|||
</FormItem>
|
||||
<FormItem labelname="key样式" prop="style" id="style">
|
||||
<RadioGroup onChange={(e)=>{ this.onStyleChange(e)} } value={this.state.model.style} disabled={this.state.isEdit} >
|
||||
<RadioButton value={1}>串码</RadioButton>
|
||||
<RadioButton value={2} >链接</RadioButton>
|
||||
<RadioButton value={4} >二维码</RadioButton>
|
||||
<RadioButton value={6} >白名单</RadioButton>
|
||||
<RadioButton value={1} disabled= {this.state.model.style == 6}>串码</RadioButton>
|
||||
<RadioButton value={2} disabled= {this.state.model.style == 6}>链接</RadioButton>
|
||||
<RadioButton value={4} disabled= {this.state.model.style == 6}>二维码</RadioButton>
|
||||
<RadioButton value={6} disabled={this.state.model.style != 6}>白名单</RadioButton>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
|
||||
|
@ -1356,6 +1365,10 @@ export default class acclist extends React.Component{
|
|||
value={rowData.describe_url}
|
||||
/>
|
||||
}
|
||||
if(com == "edit")
|
||||
{
|
||||
return <span onClick={(e)=>{this.keyProductClick(rowData,rowIndex)}} style={{color:"#2B66F2"}} >编辑</span>
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
|
|
|
@ -62,6 +62,7 @@ export default class adduserinfo extends React.Component{
|
|||
//获取商品信息
|
||||
if(this.props.data)
|
||||
{
|
||||
|
||||
let model_temp = this.props.data;
|
||||
|
||||
|
||||
|
|
|
@ -286,6 +286,7 @@ export default class acclist extends React.Component{
|
|||
}
|
||||
addProduct(){
|
||||
this.setState({drawerVisible2:true})
|
||||
this.setState({productData:null})
|
||||
}
|
||||
async productSubmit(){
|
||||
|
||||
|
@ -828,13 +829,13 @@ export default class acclist extends React.Component{
|
|||
}
|
||||
|
||||
keyProductClick(row,index){
|
||||
|
||||
this.setState({drawerVisible2:true})
|
||||
this.setState({productData:row})
|
||||
this.setState({product_title:"编辑商品"})
|
||||
}
|
||||
|
||||
|
||||
render(){
|
||||
|
||||
const Column = [
|
||||
{
|
||||
title: '兑换名称',
|
||||
|
@ -1264,7 +1265,7 @@ export default class acclist extends React.Component{
|
|||
</Drawer>
|
||||
<Drawer
|
||||
className="draw"
|
||||
width={"60%"}
|
||||
width={"86%"}
|
||||
title={"新建商品"}
|
||||
footer={
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
|
|
|
@ -255,6 +255,21 @@ export default class acclist extends React.Component{
|
|||
]}]
|
||||
sessionStorage.setItem("keybatch_id","")
|
||||
sessionStorage.setItem("copyOpearo",0)
|
||||
//白名单状态为6
|
||||
if(this.state.distdata.length > 0 && this.state.distdata[0].style == 6)
|
||||
{
|
||||
sessionStorage.setItem("keyStyle",1)
|
||||
}
|
||||
else{
|
||||
sessionStorage.setItem("keyStyle",0)
|
||||
}
|
||||
|
||||
console.log("红",this.state.distdata)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sessionStorage.setItem('breakchangenav',JSON.stringify(activerou));
|
||||
}
|
||||
aboutFn(e,row){
|
||||
|
|
|
@ -84,6 +84,7 @@ export default class adduserinfo extends React.Component{
|
|||
}
|
||||
|
||||
async submit(){
|
||||
console.log("提交78789")
|
||||
if(this.refs.form1.validator())
|
||||
{
|
||||
|
||||
|
|
|
@ -58,8 +58,11 @@ export default class adduserinfo extends React.Component{
|
|||
|
||||
}
|
||||
componentWillMount(e){
|
||||
console.log("商品数据",666)
|
||||
if(this.props.data)
|
||||
{
|
||||
|
||||
|
||||
let model_temp = this.props.data;
|
||||
let model = this.state.model;
|
||||
model.product_id = model_temp.product_id;
|
||||
|
|
Loading…
Reference in New Issue