计划编辑 key草稿的呈现

This commit is contained in:
姜棚 2021-12-14 13:46:25 +08:00
parent 297433dde0
commit 6fc36d8d57
5 changed files with 64 additions and 28 deletions

View File

@ -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){
{/* <Button type="info">批量操作</Button> */}
<Ipt onClearItem={(e)=>{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'}/>
</div>
<Filterbar onClose={(e)=>{this.onFilterClose(e) }} selectFn={(e)=>{this.selectedId(e)}} filterList={this.state.filterList} menuList={this.state.menuList}></Filterbar>
<Filterbar onClose={(e)=>{this.onFilterClose(e) }} selectFn={(e,prop)=>{this.selectedId(e,prop)}} filterList={this.state.filterList} menuList={this.state.menuList}></Filterbar>
<div>
<Grid

View File

@ -141,7 +141,7 @@ export default class orderlist extends React.Component{
this.state={
tabList:[{title:"订单列表"}],
orderList:[],
filterList:[{id:0,label:"订单状态",menuList:[{id:1,name:"充值中"},{id:2,name:"已完成"},{id:3,name:"充值失败"},{id:4,name:"已取消"}]}],
filterList:[{id:0,label:"订单状态",prop:"status",menuList:[{id:999,name:"全部"},{id:1,name:"充值中"},{id:2,name:"已完成"},{id:3,name:"充值失败"},{id:4,name:"已取消"}]}],
selectiondata:[],
menuList:[{id:0,name:"订单状态",check:false}]
,allcheck:false,
@ -406,9 +406,10 @@ export default class orderlist extends React.Component{
this.getOrderFn();
}
onFilterClose(){
this.setState({status:null})
onFilterClose(prop){
let data = {}
data[prop] = null;
this.setState(data)
}
@ -469,8 +470,17 @@ export default class orderlist extends React.Component{
}
//状态筛选
selectedId(e){
this.setState({status:e});
selectedId(e,prop){
let data ={}
if(e==999)
{
data[prop] = null;
}
else{
data[prop] = e
}
this.setState(data);
}
onclearFn(e){
@ -525,7 +535,7 @@ componentDidUpdate(prevProps,prevState){
</div>
</div>
<Filterbar onClose={(e)=>{this.onFilterClose(e) }} selectFn={(e)=>{this.selectedId(e)}} filterList={this.state.filterList} menuList={this.state.menuList}></Filterbar>
<Filterbar onClose={(e)=>{this.onFilterClose(e) }} selectFn={(e,prop)=>{this.selectedId(e,prop)}} filterList={this.state.filterList} menuList={this.state.menuList}></Filterbar>
<div>
{this.state.selectiondata.length>0?(<Alert
type="info"

View File

@ -68,15 +68,6 @@ export default class add extends React.Component{
{
this.setState({disabled:true})
}
// console.log(77777777)
// if(plan_status == 4|| plan_status == 5)
// {
// console.log(plan_status)
// this.setState({disabled_time:true})
// }
let plan_id = sessionStorage.getItem("plan_id")
getDraftInfo(plan_id).then((res)=>{
handelResponse(res,(req,msg)=>{
@ -107,6 +98,9 @@ export default class add extends React.Component{
},500)
}
else{
this.addNewkey()
}
},(err)=>{
Notify.error(err)

View File

@ -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</MenuItem>
<MenuItem key="3">修改接收邮箱发送</MenuItem>
<MenuItem key="4">修改接收手机发送</MenuItem>
<MenuItem key="5">作废</MenuItem>
<MenuItem key="5">作废</MenuItem>
</Menu>
</DropdownContent>
</Dropdown>

View File

@ -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'
},