解决启用停用bug
This commit is contained in:
parent
60650d994d
commit
7bc67bb3e6
|
@ -33,9 +33,9 @@ const Column = [
|
|||
},
|
||||
{
|
||||
title: '营销计划归属',
|
||||
name: 'plan',
|
||||
name: 'plan_title',
|
||||
type: "normal",
|
||||
prop:'plan',
|
||||
prop:'plan_title',
|
||||
width:'90px'
|
||||
},
|
||||
{
|
||||
|
@ -227,12 +227,13 @@ export default class acclist extends React.Component{
|
|||
type:'warning',
|
||||
closeBtn:true,
|
||||
title:'确认操作',
|
||||
content: <p>是否{row.status==0?'启用':'停用'}该兑换码批次?</p>,
|
||||
content: <p>是否{row.status==1?'停用':'启用'}该兑换码批次?</p>,
|
||||
onConfirm:()=>{
|
||||
putCodeStatus(row.id,{'operation':1}).then(res=>{
|
||||
putCodeStatus(row.id,{'operation':row.status==1?'2':'1'}).then(res=>{
|
||||
handelResponse(res,(response,msg)=>{
|
||||
Notify.clear();
|
||||
Notify.success(msg);
|
||||
self.getCodeListFn();
|
||||
},(err)=>{
|
||||
|
||||
})
|
||||
|
@ -369,7 +370,7 @@ componentDidUpdate(prevProps,prevState){
|
|||
}
|
||||
if(com == "switch")
|
||||
{
|
||||
return <Switch size="small" checked={rowData.status==0?false:true} onChange={(e)=>this.changestatus(e,rowData)} disabled={rowData.status == 4 ||rowData.status == 5 } ></Switch>;
|
||||
return <Switch size="small" checked={rowData.status==2?false:true} onChange={(e)=>this.changestatus(e,rowData)} disabled={rowData.status == 4 ||rowData.status == 5 } ></Switch>;
|
||||
}
|
||||
if(com == "status")
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue