更新白名单导入

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

View File

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

View File

@ -527,10 +527,10 @@ export default class add extends React.Component{
} }
onStyleChange(e){ onStyleChange(e){
console.log("状态",e.target.value) console.log("状态",e.target.value)
if(e.target.value == 5) if(e.target.value == 6)
{ {
this.setState({whiteStyle:true}) this.setState({whiteStyle:true})
this.setState({keyStyle:5}) this.setState({keyStyle:6})
} }
else{ else{
this.setState({keyStyle:e.target.value}) 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}) this.setState({whiteStyle:this.props.whiteStyle})
if(this.props.keyStyle == 5) if(this.props.keyStyle == 6)
{ {
this.setState({white_visible:this.props.whiteStyle}) this.setState({white_visible:this.props.whiteStyle})
} }
@ -111,7 +111,7 @@ export default class acclist extends React.Component{
{ {
let data = {}; let data = {};
data.batch_name = this.state.model.batch_name; 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.quantity = this.state.model.quantity;
data.bind_object = this.state.checkedList; data.bind_object = this.state.checkedList;
data.allow_repetition = this.state.model.allow_repetition; 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.code_batch = this.refs.tempdata.getSelectData();
data.mobile_excel = this.state.mobile_excel data.mobile_excel = this.state.mobile_excel
data.mobile_repeat = this.state.mobile_repeat data.mobile_repeat = this.state.mobile_repeat
console.log("key样式",data.style)
if(data.style == 6)
{
sessionStorage.setItem("white",1)
}
return data; return data;
} }
return valide return valide
@ -140,7 +148,7 @@ export default class acclist extends React.Component{
model2.style = e.target.value; model2.style = e.target.value;
model2.quantity = 0 model2.quantity = 0
this.setState({model:model2}) this.setState({model:model2})
if(e.target.value == 5) if(e.target.value == 6)
{ {
this.setState({white_visible:true}) this.setState({white_visible:true})
} }
@ -252,7 +260,7 @@ export default class acclist extends React.Component{
model.style = nextProps.keyStyle model.style = nextProps.keyStyle
this.setState({model:model}) this.setState({model:model})
if(model.style == 5) if(model.style == 6)
{ {
this.setState({white_visible:true}) 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({model:model})
this.setState({checkedList:data.bind_object.map(Number)}) 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={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={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={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> </RadioGroup>
</FormItem> </FormItem>

View File

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

View File

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