From 5d243384d929334806df361fc861d7741519ecfa Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Thu, 30 Dec 2021 11:01:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=96=B0=E5=A2=9E=E5=90=8E=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=97=A0=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/system/role/add/add.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/system/role/add/add.js b/src/pages/system/role/add/add.js index 6d93d872..0ac80813 100644 --- a/src/pages/system/role/add/add.js +++ b/src/pages/system/role/add/add.js @@ -69,7 +69,8 @@ export default class addrole extends React.Component{ Notify.clear(); Notify.success(msg); setTimeout(()=>{ - window.history.back(); + // window.history.back(); + window.location.replace('#/home/system/role-list'); },1000); },(err)=>{ Notify.error(err) From 969afe92194b24ebf1dc9d87c08354d6fb98b5f5 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Thu, 30 Dec 2021 11:14:57 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=8C=E6=88=90=E3=80=90=E5=A4=8D?= =?UTF-8?q?=E5=88=B6key=E3=80=91=E9=80=BB=E8=BE=91=E4=B8=B2=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ src/pages/exchangecode/add/add.js | 21 ++++++++++----------- src/pages/plan/add/step2.js | 2 +- src/pages/plan/key/edit.js | 4 ++-- src/pages/plan/key/list.js | 24 ++++++++++++++++++++++-- 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 4d29575d..fa9b5e2e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +src/pages/exchangecode/contenttaggedwith/add.js +src/pages/exchangecode/contenttaggedwith/add.less diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index 603a794d..1657deda 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -77,18 +77,17 @@ export default class acclist extends React.Component{ componentDidMount(e){ let batch_id=sessionStorage.getItem("keybatch_id") - + let copyOpearo=sessionStorage.getItem("copyOpearo") //编辑 - if(batch_id > 0) + if(batch_id > 0||copyOpearo==2) { - this.setState({isEdit:true}) + // this.setState({isEdit:true}) getKeyBatchDetail(batch_id).then((res)=>{ handelResponse(res,(req,msg)=>{ - - console.log("和编辑",req) - this.setState({pagetitle:"编辑key"}) + this.setState({pagetitle:"复制key"}) let model = { - batch_name:req.batch_name, + title:req.plan_title, + batch_name:'', style: req.style, quantity:req.quantity, allow_repetition:req.allow_repetition, @@ -102,8 +101,8 @@ export default class acclist extends React.Component{ this.setState({begintime:req.begin_time}) let list = _.map(req.code_batch,(item)=>{ - item.disabled = true; - item.checked = true; + // item.disabled = true; + // item.checked = true; return item }) console.log(list) @@ -895,7 +894,7 @@ export default class acclist extends React.Component{
- +
{this.state.model.title}
@@ -940,7 +939,7 @@ export default class acclist extends React.Component{ {this.onCheckChange(e)}} disabled={this.state.isEdit} > 兑换码 优惠券 - 立减金 + {/* 立减金 */} { diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js index 0f5adc33..76194aca 100644 --- a/src/pages/plan/add/step2.js +++ b/src/pages/plan/add/step2.js @@ -767,7 +767,7 @@ export default class acclist extends React.Component{ {this.onCheckChange(e)}}> 兑换码 优惠券 - 立减金 + {/* 立减金 */}
{ diff --git a/src/pages/plan/key/edit.js b/src/pages/plan/key/edit.js index 3b4d2876..24bde0f2 100644 --- a/src/pages/plan/key/edit.js +++ b/src/pages/plan/key/edit.js @@ -832,7 +832,7 @@ export default class acclist extends React.Component{ - +
{this.state.model.plan_title}
@@ -867,7 +867,7 @@ export default class acclist extends React.Component{ {this.onCheckChange(e)}} disabled={this.state.isEdit} > 兑换码 优惠券 - 立减金 + {/* 立减金 */}
{ diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index cc584402..93dbbbbc 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -266,7 +266,7 @@ export default class acclist extends React.Component{ } ]}] sessionStorage.setItem("keybatch_id","") - + sessionStorage.setItem("copyOpearo",0) sessionStorage.setItem('breakchangenav',JSON.stringify(activerou)); } aboutFn(e,row){ @@ -283,7 +283,25 @@ export default class acclist extends React.Component{ } ]}] sessionStorage.setItem('breaknav',JSON.stringify(activerou)); - } + } + //复制 + onCopyRow(status,row){ + this.props.history.push('/home/exchangecode-add'); + sessionStorage.setItem('pathname2','/home/exchangecode-add') + let activerou=[{pagetitle:'复制',items:[ + { + "path": "/home/exchangecode-list", + "name": "key列表管理" + }, + { + "path": "/home/exchangecode-add", + "name": "复制key" + } + ]}] + sessionStorage.setItem("keybatch_id",row.id) + sessionStorage.setItem("copyOpearo",1) + sessionStorage.setItem('breakchangenav',JSON.stringify(activerou)); + } //page pageChange(e){ this.setState({page:e}); @@ -397,6 +415,7 @@ onEditRow(status,row){ sessionStorage.setItem("keybatch_id",row.id) } + //敲回车查询 iptsureFn(){ this.setState({page:1}) @@ -621,6 +640,7 @@ linkTo(row){ str = {this.onEditRow(e,rowData)}} >编辑 + {this.onCopyRow(e,rowData)}} >复制 { keysIsSend(rowData.id).then((res)=>{ From b65680bb3f8d3066582d01704a20591f770ea3ed Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Thu, 30 Dec 2021 11:17:10 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96key=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E5=88=97=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/plan/key/list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index 93dbbbbc..26195e31 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -46,7 +46,7 @@ const Column = [ name: 'plan', type: "slot", prop:'edit', - width:'90px' + width:'120px' }, { title: '状态',