diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index 6c5c962b..391efc91 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -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{ { this.onStyleChange(e)} } value={this.state.model.style} disabled={this.state.isEdit} > - 串码 - 链接 - 二维码 - 白名单 + 串码 + 链接 + 二维码 + 白名单 @@ -1356,6 +1365,10 @@ export default class acclist extends React.Component{ value={rowData.describe_url} /> } + if(com == "edit") + { + return {this.keyProductClick(rowData,rowIndex)}} style={{color:"#2B66F2"}} >编辑 + } }} diff --git a/src/pages/exchangecode/product/add.js b/src/pages/exchangecode/product/add.js index 42262fe5..b1543818 100644 --- a/src/pages/exchangecode/product/add.js +++ b/src/pages/exchangecode/product/add.js @@ -62,6 +62,7 @@ export default class adduserinfo extends React.Component{ //获取商品信息 if(this.props.data) { + let model_temp = this.props.data; diff --git a/src/pages/plan/key/edit.js b/src/pages/plan/key/edit.js index 236ab66b..0424557a 100644 --- a/src/pages/plan/key/edit.js +++ b/src/pages/plan/key/edit.js @@ -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{ diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index 99e0dbda..4a99c970 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -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){ diff --git a/src/pages/plan/key/product/add.js b/src/pages/plan/key/product/add.js index 10b76ffe..f0c978be 100644 --- a/src/pages/plan/key/product/add.js +++ b/src/pages/plan/key/product/add.js @@ -84,6 +84,7 @@ export default class adduserinfo extends React.Component{ } async submit(){ + console.log("提交78789") if(this.refs.form1.validator()) { diff --git a/src/pages/plan/product/add.js b/src/pages/plan/product/add.js index b8d82c53..8935f44b 100644 --- a/src/pages/plan/product/add.js +++ b/src/pages/plan/product/add.js @@ -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;