From c752a5fdfe5bb58ee5c257aea31642f298276923 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Thu, 25 Nov 2021 17:17:10 +0800 Subject: [PATCH 1/3] update --- src/assets/enum.js | 4 ++-- src/components/gird/main.js | 2 +- src/pages/exchangecode/list/list.js | 2 +- src/pages/plan/key/list.js | 16 ++++++++++------ src/pages/plan/list/list.js | 7 +++---- 5 files changed, 17 insertions(+), 14 deletions(-) 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是否改变当前数据状态?
, + 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") { From 42a86153fecf199614613c647b1dc5036ed22885 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Thu, 25 Nov 2021 17:17:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/gird/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/gird/main.js b/src/components/gird/main.js index 8a365e90..abf24ea1 100644 --- a/src/components/gird/main.js +++ b/src/components/gird/main.js @@ -229,6 +229,7 @@ export default class menu extends React.Component { tableData: this.state.tableData }) + } editRow(e,column, row) { From 6a220aa2e2409c2037162038b926d0bf28083611 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Thu, 25 Nov 2021 17:34:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/plan/list/list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 26987f2c..0e5a32bf 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -24,7 +24,7 @@ export default class acclist extends React.Component{ limit:10, tabList:[{title:"营销计划列表"}], distdata:[{title:'士大夫大师傅'}], - filterList:[{id:0,label:"状态",menuList:[{id:0,name:"草稿"},{id:1,name:"审核中"},{id:2,name:"生效中"},{id:3,name:"暂停中"},{id:4,name:"已失效"},{id:5,name:"待生效"}]}, + filterList:[{id:0,label:"状态",menuList:[{id:0,name:"草稿"},{id:2,name:"审核中"},{id:4,name:"生效中"},{id:5,name:"暂停中"},{id:1,name:"创建中"},{id:3,name:"待生效"}]}, ], menuList:[{id:0,name:"状态",check:false}], email:"",