更新白名单导入

This commit is contained in:
姜棚 2022-01-21 18:31:17 +08:00
parent 56831173ac
commit 861d727d50
7 changed files with 34 additions and 14 deletions

View File

@ -800,7 +800,7 @@ export const putMyTheme= (id,data) => {
}
export const getThemeChoice= (data) => {
return upload('get', baseurl + "/plan/theme/choice",data)
return req('get', baseurl + "/plan/theme/choice",data)
}

View File

@ -76,7 +76,7 @@ export default class acclist extends React.Component{
payment_direction:["对私账户","对公账户","预付款扣除"],
import_visible:false,
white_visible:true,
white_visible:false,
success_visible:false,
fail_visible:false,
file_loading:false,
@ -267,7 +267,7 @@ export default class acclist extends React.Component{
model2.style = e.target.value;
model2.quantity = 0
this.setState({model:model2})
if(e.target.value == 1)
if(e.target.value == 6)
{
this.setState({white_visible:true})
}
@ -1117,6 +1117,7 @@ export default class acclist extends React.Component{
<RadioButton value={1}>串码</RadioButton>
<RadioButton value={2} >链接</RadioButton>
<RadioButton value={4} >二维码</RadioButton>
<RadioButton value={6} >白名单</RadioButton>
</RadioGroup>
</FormItem>

View File

@ -161,7 +161,7 @@ export default class add extends React.Component{
{
let obj = {
"info":JSON.parse( sessionStorage.getItem("step1")),
"key": JSON.parse( sessionStorage.getItem("step2")),
"key": JSON.parse( sessionStorage.getItem("step2")),
"theme": data,
"complete":true
}

View File

@ -527,10 +527,10 @@ export default class add extends React.Component{
}
onStyleChange(e){
console.log("状态",e.target.value)
if(e.target.value == 5)
if(e.target.value == 6)
{
this.setState({whiteStyle:true})
this.setState({keyStyle:5})
this.setState({keyStyle:6})
}
else{
this.setState({keyStyle:e.target.value})

View File

@ -94,7 +94,7 @@ export default class acclist extends React.Component{
{
this.setState({whiteStyle:this.props.whiteStyle})
if(this.props.keyStyle == 5)
if(this.props.keyStyle == 6)
{
this.setState({white_visible:this.props.whiteStyle})
}
@ -111,7 +111,7 @@ export default class acclist extends React.Component{
{
let data = {};
data.batch_name = this.state.model.batch_name;
data.style = this.state.model.style == 5 ? 1 : this.state.model.style;
data.style = this.state.model.style;
data.quantity = this.state.model.quantity;
data.bind_object = this.state.checkedList;
data.allow_repetition = this.state.model.allow_repetition;
@ -120,6 +120,14 @@ export default class acclist extends React.Component{
data.code_batch = this.refs.tempdata.getSelectData();
data.mobile_excel = this.state.mobile_excel
data.mobile_repeat = this.state.mobile_repeat
console.log("key样式",data.style)
if(data.style == 6)
{
sessionStorage.setItem("white",1)
}
return data;
}
return valide
@ -140,7 +148,7 @@ export default class acclist extends React.Component{
model2.style = e.target.value;
model2.quantity = 0
this.setState({model:model2})
if(e.target.value == 5)
if(e.target.value == 6)
{
this.setState({white_visible:true})
}
@ -252,7 +260,7 @@ export default class acclist extends React.Component{
model.style = nextProps.keyStyle
this.setState({model:model})
if(model.style == 5)
if(model.style == 6)
{
this.setState({white_visible:true})
}
@ -431,6 +439,11 @@ export default class acclist extends React.Component{
}
if(model.style == 6)
{
this.setState({white_visible:true})
}
this.setState({model:model})
this.setState({checkedList:data.bind_object.map(Number)})
@ -936,7 +949,7 @@ export default class acclist extends React.Component{
<RadioButton value={1} disabled={this.props.name > 0 && this.state.model.style !=1} >串码</RadioButton>
<RadioButton value={2} disabled={this.props.name > 0 && this.state.model.style !=2} >链接</RadioButton>
<RadioButton value={4} disabled={this.props.name > 0 && this.state.model.style !=4} >二维码</RadioButton>
<RadioButton value={5} disabled={this.props.name > 0 && this.state.model.style !=5} >白名单</RadioButton>
<RadioButton value={6} disabled={this.props.name > 0 && this.state.model.style !=6} >白名单</RadioButton>
</RadioGroup>
</FormItem>

View File

@ -36,8 +36,14 @@ export default class acclist extends React.Component{
getThemeData(){
let params = {}
if(sessionStorage.getItem("white") == 1)
{
params.page = 1
}
getThemeChoice().then((res)=>{
getThemeChoice(params).then((res)=>{
handelResponse(res,(req,msg)=>{
let arr = _.map(req,(o)=>{
let obj = {};
@ -100,7 +106,6 @@ export default class acclist extends React.Component{
onThemeChange(e)
{
let model2 = this.state.model;
model2.theme_id = e;
this.setState({model:model2})
}
@ -116,7 +121,7 @@ export default class acclist extends React.Component{
edit(data)
{
let model={ //数据模型不可少
"theme_id":192 ,
"theme_id":192 ,
"use": data.use,
"link": data.link
}

View File

@ -993,6 +993,7 @@ export default class acclist extends React.Component{
<RadioButton value={1}>串码</RadioButton>
<RadioButton value={2} >链接</RadioButton>
<RadioButton value={4} >二维码</RadioButton>
<RadioButton value={6} >白名单</RadioButton>
</RadioGroup>
</FormItem>