diff --git a/src/assets/enum.js b/src/assets/enum.js index c0f60c0f..6cb70c89 100644 --- a/src/assets/enum.js +++ b/src/assets/enum.js @@ -90,8 +90,8 @@ const menu={ switch(params){ case 1:return '#ffaa00';break; case 2:return '#55ff7f';break; - case 4:return '#e64c00';break; - case 5:return '#55aaff';break; + case 5:return '#e64c00';break; + case 4:return '#55aaff';break; case 6:return '#555500';break; case 7:return '#3575C7';break; } diff --git a/src/components/gird/main.js b/src/components/gird/main.js index 93adf2cb..8a365e90 100644 --- a/src/components/gird/main.js +++ b/src/components/gird/main.js @@ -219,7 +219,7 @@ export default class menu extends React.Component { getCellValue(column,rowData){ let value = _.get(rowData,column) - return value ? value : "-" + return value||value==0 ? value : "-" } switchChange(index,e) { diff --git a/src/pages/exchangecode/list/list.js b/src/pages/exchangecode/list/list.js index 7c858b7d..43e40efc 100644 --- a/src/pages/exchangecode/list/list.js +++ b/src/pages/exchangecode/list/list.js @@ -48,7 +48,7 @@ const Column = [ { title: '券总数(已发放)', name: 'quantity', - type: "slot", + type: "normal", prop:'quantity', width:'120px', }, { diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index b2c43fa3..1f645d74 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -107,7 +107,7 @@ export default class acclist extends React.Component{ dataCount:0, page:1, limit:10, - tabList:[{title:"全部"},{title:"创建中"},{title:"审核中"},{title:"生效中"},{title:"暂停中"},{title:"失效中"}], + tabList:[{title:"全部"},{title:"创建中"},{title:"审核中"},{title:"生效中"},{title:"暂停中"},{title:"失效中"},{title:"已作废"}], distdata:[], combinedValue:[], distdata2:[{id:12313123213123,name:'爱奇艺月卡兑换券',time:'2021-11-08 14:21:06至2021-11-08 15:06:04',plan:'营销计划2',belongid:3123213,send:100,record:58,used:41,dead:11,fail:12,status:'1'}], @@ -220,12 +220,11 @@ export default class acclist extends React.Component{ onSwitchChange(status,row){ let self = this; - console.log(status) Sweetalert.confirm({ type:'warning', closeBtn:true, title:'确认操作', - content:

是否改变当前数据状态?

, + content:

是否将[key-批次id{row.id}]{row.status==4?'暂停':'开启'}?

, onConfirm:()=>{ this.changeState(status,row)}, onCancel: this.onCancel, className:'questModal', @@ -235,7 +234,7 @@ export default class acclist extends React.Component{ //修改状态 changeState(status,row){ - + let self=this; let data = { operation: status ? 4 : 5 } @@ -244,7 +243,12 @@ export default class acclist extends React.Component{ let id = _.findIndex(this.state.distdata,(o)=>{return o.id == row.id}); this.state.distdata[id].status = status; this.setState({distdata:this.state.distdata}) - Notify.success("更新状态成功"); + Notify.success(msg); + let data = { + page:1, + limit:10, + plan_id: sessionStorage.getItem("key_plan_id")} + self.getKeyList(data); },(err)=>{ Notify.error(err) }) @@ -481,7 +485,7 @@ componentWillMount(){ ComponentHandler={(com,rowData)=>{ if(com == "switch") { - return {this.onSwitchChange(e,rowData)}}>; + return {this.onSwitchChange(e,rowData)}}>; } if(com == "status") diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 03cab54c..26987f2c 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -99,12 +99,11 @@ export default class acclist extends React.Component{ //切换siwtch onSwitchChange(status,row){ let self = this; - console.log(status) Sweetalert.confirm({ type:'warning', closeBtn:true, title:'确认操作', - content:

是否改变当前数据状态?

, + content:

是否改变{row.open==1?'关闭':'开启'}[{row.title}]的状态?

, onConfirm:()=>{ this.changeState(status,row)}, onCancel: this.onCancel, className:'questModal', @@ -124,7 +123,7 @@ export default class acclist extends React.Component{ startOrStopPlan(row.id,data).then((res)=>{ handelResponse(res,(req,msg)=>{ let id = _.findIndex(this.state.distdata,(o)=>{return o.id == row.id}); - this.state.distdata[id].open = status ? 1 : 2; + this.state.distdata[id].open = status ? 2 : 1; this.setState({distdata:this.state.distdata}) let data = { page:1, @@ -467,7 +466,7 @@ export default class acclist extends React.Component{ if(com == "status") { - return

{menu.planStatus(parseInt(rowData.status))}

+ return

{rowData.status_text}

} if(com == "opearo") {