From 6fc36d8d570ac18dfe54916ed405c68df1f92b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Tue, 14 Dec 2021 13:46:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=BC=96=E8=BE=91=20key?= =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=9A=84=E5=91=88=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/distributor/list/list.js | 31 +++++++++++++++++++++++------- src/pages/order/list/list.js | 24 ++++++++++++++++------- src/pages/plan/add/edit.js | 12 +++--------- src/pages/plan/key/list.js | 9 ++++++++- src/pages/plan/list/list.js | 16 +++++++++++---- 5 files changed, 64 insertions(+), 28 deletions(-) diff --git a/src/pages/distributor/list/list.js b/src/pages/distributor/list/list.js index ea08889f..913f710d 100644 --- a/src/pages/distributor/list/list.js +++ b/src/pages/distributor/list/list.js @@ -108,7 +108,7 @@ export default class acclist extends React.Component{ total:0, resellerList:[], menuList:[{id:0,name:"分销商状态",check:false}], - filterList:[{id:0,label:"分销商状态",menuList:[{id:1,name:"开启"},{id:2,name:"关闭"}]}], + filterList:[{id:0,label:"分销商状态",prop:"status",menuList:[{id:999,name:"全部"},{id:1,name:"开启"},{id:2,name:"关闭"}]}], } } clickFn(){ @@ -234,15 +234,32 @@ export default class acclist extends React.Component{ } - onFilterClose(){ - - this.setState({status:null}) + onFilterClose(prop){ + let data = {} + data[prop] = null + + + + + + this.setState(data) } //状态筛选 - selectedId(e){ - this.setState({status:e}); + selectedId(e,prop){ + let data ={} + if(e==999) + { + data[prop] = null; + + } + else{ + data[prop] = e + } + console.log("当前数据体") + console.log(data) + this.setState(data) } //limit countChange(e){ @@ -302,7 +319,7 @@ componentDidUpdate(prevProps,prevState){ {/* */} {this.setState({key_word:''})}} wordSearch={this.sureFn.bind(this)} onChange={(e)=>this.setState({key_word:e})} value={this.state.key_word} icon="search" placeholder={"请输入分销商名称、登录账号、联系人、手机号进行搜索"} countShow={false} height={'36px'} width={'260px'} alignment={'left'}/> - {this.onFilterClose(e) }} selectFn={(e)=>{this.selectedId(e)}} filterList={this.state.filterList} menuList={this.state.menuList}> + {this.onFilterClose(e) }} selectFn={(e,prop)=>{this.selectedId(e,prop)}} filterList={this.state.filterList} menuList={this.state.menuList}>
- {this.onFilterClose(e) }} selectFn={(e)=>{this.selectedId(e)}} filterList={this.state.filterList} menuList={this.state.menuList}> + {this.onFilterClose(e) }} selectFn={(e,prop)=>{this.selectedId(e,prop)}} filterList={this.state.filterList} menuList={this.state.menuList}>
{this.state.selectiondata.length>0?({ handelResponse(res,(req,msg)=>{ @@ -107,6 +98,9 @@ export default class add extends React.Component{ },500) } + else{ + this.addNewkey() + } },(err)=>{ Notify.error(err) diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index 0975cd4a..dae991fc 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -55,6 +55,13 @@ const Column = [ prop:'status', width:'110px', }, + { + title: '创建人', + name: 'creator_name', + prop:'creator_name', + type: "normal", + width:'50px' + }, { title: '发放key总数', name: 'grant', @@ -664,7 +671,7 @@ onChangeCombinedDate(e){ >再次发送key 修改接收邮箱发送 修改接收手机发送 - 作废 + 作废 diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index f918cbdb..7f31a16e 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -473,7 +473,9 @@ export default class acclist extends React.Component{ delete data[prop]; } else{ - this.setState({prop:e}) + let params ={} + params[prop] = null + this.setState(params) } this.getPlanList(data) console.log(data) @@ -560,7 +562,13 @@ export default class acclist extends React.Component{ console.log(data) this.setState(data) - + let params = { + page:1, + limit:10, + status:this.state.status, + key_word: this.state.search + } + this.getPlanList(params) } @@ -594,8 +602,8 @@ export default class acclist extends React.Component{ }, { title: '创建人', - name: 'status', - prop:'status', + name: 'creator_name', + prop:'creator_name', type: "normal", width:'50px' },