update
This commit is contained in:
parent
be5d9edc13
commit
c752a5fdfe
|
@ -90,8 +90,8 @@ const menu={
|
||||||
switch(params){
|
switch(params){
|
||||||
case 1:return '#ffaa00';break;
|
case 1:return '#ffaa00';break;
|
||||||
case 2:return '#55ff7f';break;
|
case 2:return '#55ff7f';break;
|
||||||
case 4:return '#e64c00';break;
|
case 5:return '#e64c00';break;
|
||||||
case 5:return '#55aaff';break;
|
case 4:return '#55aaff';break;
|
||||||
case 6:return '#555500';break;
|
case 6:return '#555500';break;
|
||||||
case 7:return '#3575C7';break;
|
case 7:return '#3575C7';break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,7 +219,7 @@ export default class menu extends React.Component {
|
||||||
|
|
||||||
getCellValue(column,rowData){
|
getCellValue(column,rowData){
|
||||||
let value = _.get(rowData,column)
|
let value = _.get(rowData,column)
|
||||||
return value ? value : "-"
|
return value||value==0 ? value : "-"
|
||||||
}
|
}
|
||||||
|
|
||||||
switchChange(index,e) {
|
switchChange(index,e) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ const Column = [
|
||||||
{
|
{
|
||||||
title: '券总数(已发放)',
|
title: '券总数(已发放)',
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
type: "slot",
|
type: "normal",
|
||||||
prop:'quantity',
|
prop:'quantity',
|
||||||
width:'120px',
|
width:'120px',
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -107,7 +107,7 @@ export default class acclist extends React.Component{
|
||||||
dataCount:0,
|
dataCount:0,
|
||||||
page:1,
|
page:1,
|
||||||
limit:10,
|
limit:10,
|
||||||
tabList:[{title:"全部"},{title:"创建中"},{title:"审核中"},{title:"生效中"},{title:"暂停中"},{title:"失效中"}],
|
tabList:[{title:"全部"},{title:"创建中"},{title:"审核中"},{title:"生效中"},{title:"暂停中"},{title:"失效中"},{title:"已作废"}],
|
||||||
distdata:[],
|
distdata:[],
|
||||||
combinedValue:[],
|
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'}],
|
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){
|
onSwitchChange(status,row){
|
||||||
let self = this;
|
let self = this;
|
||||||
console.log(status)
|
|
||||||
Sweetalert.confirm({
|
Sweetalert.confirm({
|
||||||
type:'warning',
|
type:'warning',
|
||||||
closeBtn:true,
|
closeBtn:true,
|
||||||
title:'确认操作',
|
title:'确认操作',
|
||||||
content: <p>是否改变当前数据状态?</p>,
|
content: <p>是否将<b>[key-批次id{row.id}]</b>{row.status==4?'暂停':'开启'}?</p>,
|
||||||
onConfirm:()=>{ this.changeState(status,row)},
|
onConfirm:()=>{ this.changeState(status,row)},
|
||||||
onCancel: this.onCancel,
|
onCancel: this.onCancel,
|
||||||
className:'questModal',
|
className:'questModal',
|
||||||
|
@ -235,7 +234,7 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
//修改状态
|
//修改状态
|
||||||
changeState(status,row){
|
changeState(status,row){
|
||||||
|
let self=this;
|
||||||
let data = {
|
let data = {
|
||||||
operation: status ? 4 : 5
|
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});
|
let id = _.findIndex(this.state.distdata,(o)=>{return o.id == row.id});
|
||||||
this.state.distdata[id].status = status;
|
this.state.distdata[id].status = status;
|
||||||
this.setState({distdata:this.state.distdata})
|
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)=>{
|
},(err)=>{
|
||||||
Notify.error(err)
|
Notify.error(err)
|
||||||
})
|
})
|
||||||
|
@ -481,7 +485,7 @@ componentWillMount(){
|
||||||
ComponentHandler={(com,rowData)=>{
|
ComponentHandler={(com,rowData)=>{
|
||||||
if(com == "switch")
|
if(com == "switch")
|
||||||
{
|
{
|
||||||
return <Switch size="small" checked={rowData.status} onChange={(e)=>{this.onSwitchChange(e,rowData)}}></Switch>;
|
return <Switch size="small" checked={rowData.status==4?true:false} onChange={(e)=>{this.onSwitchChange(e,rowData)}}></Switch>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(com == "status")
|
if(com == "status")
|
||||||
|
|
|
@ -99,12 +99,11 @@ export default class acclist extends React.Component{
|
||||||
//切换siwtch
|
//切换siwtch
|
||||||
onSwitchChange(status,row){
|
onSwitchChange(status,row){
|
||||||
let self = this;
|
let self = this;
|
||||||
console.log(status)
|
|
||||||
Sweetalert.confirm({
|
Sweetalert.confirm({
|
||||||
type:'warning',
|
type:'warning',
|
||||||
closeBtn:true,
|
closeBtn:true,
|
||||||
title:'确认操作',
|
title:'确认操作',
|
||||||
content: <p>是否改变当前数据状态?</p>,
|
content: <p>是否改变{row.open==1?'关闭':'开启'}<b>[{row.title}]</b>的状态?</p>,
|
||||||
onConfirm:()=>{ this.changeState(status,row)},
|
onConfirm:()=>{ this.changeState(status,row)},
|
||||||
onCancel: this.onCancel,
|
onCancel: this.onCancel,
|
||||||
className:'questModal',
|
className:'questModal',
|
||||||
|
@ -124,7 +123,7 @@ export default class acclist extends React.Component{
|
||||||
startOrStopPlan(row.id,data).then((res)=>{
|
startOrStopPlan(row.id,data).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
let id = _.findIndex(this.state.distdata,(o)=>{return o.id == row.id});
|
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})
|
this.setState({distdata:this.state.distdata})
|
||||||
let data = {
|
let data = {
|
||||||
page:1,
|
page:1,
|
||||||
|
@ -467,7 +466,7 @@ export default class acclist extends React.Component{
|
||||||
if(com == "status")
|
if(com == "status")
|
||||||
{
|
{
|
||||||
|
|
||||||
return <p className="dflexa" ><span><font className="icon" style={{background:menu.planStatusBg(parseInt(rowData.status))}}></font>{menu.planStatus(parseInt(rowData.status))}</span></p>
|
return <p className="dflexa" ><span><font className="icon" style={{background:menu.planStatusBg(parseInt(rowData.status))}}></font>{rowData.status_text}</span></p>
|
||||||
}
|
}
|
||||||
if(com == "opearo")
|
if(com == "opearo")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue