Update list.js

This commit is contained in:
姜棚 2021-11-25 10:32:30 +08:00
parent 1ef9701d80
commit 6d594a9592
1 changed files with 54 additions and 4 deletions

View File

@ -28,7 +28,9 @@ export default class acclist extends React.Component{
],
menuList:[{id:0,name:"状态",check:false}],
email:"",
phone:""
phone:"",
search:""
}
}
clickFn(){
@ -42,6 +44,8 @@ export default class acclist extends React.Component{
let data = {
page:e,
limit:this.state.limit,
status:this.state.status,
key_word:this.state.key_word
}
this.getPlanList(data);
@ -66,7 +70,13 @@ export default class acclist extends React.Component{
}
getPlanList(data){
getPlanList(data).then((res)=>{
let queryParams = _.omitBy(data, (value) => {
return _.isNaN(value) || _.isNil(value) || '' == value
})
getPlanList(queryParams).then((res)=>{
handelResponse(res,(req,msg)=>{
this.setState({distdata:req.data})
this.setState({dataCount:req.total})
@ -80,6 +90,8 @@ export default class acclist extends React.Component{
let data = {
page:1,
limit:e,
status:this.state.status,
key_word:this.state.key_word
}
this.getPlanList(data);
}
@ -263,6 +275,18 @@ export default class acclist extends React.Component{
}
onFilter(e){
console.log(e)
this.setState({page:1})
this.setState({limit:10})
this.setState({status:e})
let data = {
page:1,
limit:10,
status:e,
key_word:this.state.key_word
}
this.getPlanList(data)
}
phoneChange=(e)=>
{
@ -277,6 +301,23 @@ export default class acclist extends React.Component{
}
iptsureFn(e){
this.setState({page:1})
this.setState({limit:10})
console.log("查询关键字")
console.log(e)
let data = {
page:1,
limit:10,
status:this.state.status,
key_word: this.state.search
}
this.getPlanList(data)
}
render(){
const { current, pageSize } = this.state;
const Column = [
@ -373,8 +414,17 @@ export default class acclist extends React.Component{
<p className="distable dflexj">
<Button type="primary" icon="plus" onClick={this.clickFn.bind(this)}>新建营销计划</Button>
{/* <Button type="info">批量操作</Button> */}
<Ipt onChange={(e)=>this.setState({search:e})} value={this.state.search} wordSearch={this.iptsureFn.bind(this)} icon="search" placeholder={"请输入营销计划名称、分销商名称查询"} countShow={false} height={'36px'} width={'260px'} onClearItem={(e)=>{
this.setState({search:''})
let data ={
page:1,
limit:10,
}
this.getPlanList(data)
}} alignment={'left'}/>
</p>
<Filterbar filterList={this.state.filterList} menuList={this.state.menuList} onSelect={(e)=>{this.onFilter(e)}}></Filterbar>
<Filterbar filterList={this.state.filterList} menuList={this.state.menuList} selectFn={(e)=>{this.onFilter(e)}}></Filterbar>
<div>
<Grid
spliteColor={'#fff'}
@ -410,7 +460,7 @@ export default class acclist extends React.Component{
}
if(com == "status")
{
console.log(rowData.status)
return <p className="dflexa" ><span><font className="icon" style={{background:menu.planStatusBg(parseInt(rowData.status))}}></font>{menu.planStatus(parseInt(rowData.status))}</span></p>
}
if(com == "opearo")