营销系统统计
This commit is contained in:
parent
c44bd69a5a
commit
8504313606
|
@ -1,7 +1,7 @@
|
|||
import ReactDOM from 'react-dom';
|
||||
import React, { Component } from 'react';
|
||||
import { HashRouter as Router, Route, Link } from "react-router-dom";
|
||||
import { Button } from 'zent';
|
||||
import { Button,Alert } from 'zent';
|
||||
import "./list.less"
|
||||
import {Input,openDialog,closeDialog,RadioGroup,Radio ,Notify,Switch ,Swiper,Dropdown,DropdownPosition,DropdownClickTrigger,Icon,MenuItem,DropdownContent,Menu,Sweetalert } from 'zent';
|
||||
import "../../../assets/comm.css"
|
||||
|
@ -34,7 +34,15 @@ export default class acclist extends React.Component{
|
|||
phone_list:[],
|
||||
email_list:[],
|
||||
cur_item:null,
|
||||
selectiondata:[],
|
||||
plan_id:0,
|
||||
grantTotal:0,
|
||||
receiveTotal:0,
|
||||
usageTotal:0,
|
||||
silentTotal:0,
|
||||
receive_total:0,
|
||||
usage_total:0,
|
||||
silent_total:0
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -385,6 +393,31 @@ export default class acclist extends React.Component{
|
|||
});
|
||||
}
|
||||
}
|
||||
//清空
|
||||
clearFn(){
|
||||
this.setState({'selectiondata':[]})
|
||||
}
|
||||
//选中表格的选框
|
||||
selection(selection){
|
||||
this.setState({selectiondata:selection});
|
||||
let grantTotal=0;
|
||||
let receiveTotal=0;
|
||||
let usageTotal=0;
|
||||
let silentTotal=0;
|
||||
let receive_total=0;
|
||||
let usage_total=0;
|
||||
let silent_total=0;
|
||||
selection.forEach(item=>{
|
||||
grantTotal+=Number(item.grant);
|
||||
receiveTotal+=Number(item.receive);
|
||||
usageTotal+=Number(item.usage);
|
||||
silentTotal+=Number(item.silent);
|
||||
receive_total+=Number(item.receive_total);
|
||||
usage_total+=Number(item.usage_total);
|
||||
silent_total+=Number(item.silent_total);
|
||||
});
|
||||
this.setState({grantTotal,receiveTotal,usageTotal,silentTotal,receive_total,usage_total,silent_total});
|
||||
}
|
||||
onFilter(e){
|
||||
console.log(e)
|
||||
this.setState({page:1})
|
||||
|
@ -540,6 +573,15 @@ export default class acclist extends React.Component{
|
|||
</p>
|
||||
<Filterbar filterList={this.state.filterList} menuList={this.state.menuList} selectFn={(e)=>{this.onFilter(e)}}></Filterbar>
|
||||
<div>
|
||||
{this.state.selectiondata.length>0?(<Alert
|
||||
type="info"
|
||||
extraContent={<Button type="primary" onClick={this.clearFn.bind(this)}>清空</Button>}
|
||||
>
|
||||
已选择<font color="#296bef" style={{fontWeight:'bold'}}>{this.state.selectiondata.length}</font>发放key总数:{this.state.grantTotal},领取key总数:{this.state.receiveTotal},已使用总数:{this.state.usageTotal},沉默总数:{this.state.silentTotal},领取总价(预估):{this.state.receive_total.toFixed(4)},
|
||||
已使用总价(预估):{this.state.usage_total.toFixed(4)},
|
||||
沉默总价(预估):{this.state.silent_total.toFixed(4)}
|
||||
</Alert>):null
|
||||
}
|
||||
<Grid
|
||||
spliteColor={'#fff'}
|
||||
tableData={this.state.distdata}
|
||||
|
@ -555,9 +597,7 @@ export default class acclist extends React.Component{
|
|||
this.onCountChange(e)
|
||||
}
|
||||
}
|
||||
checkChange ={(selection)=>{
|
||||
console.log(11,selection)
|
||||
}}
|
||||
checkChange ={this.selection.bind(this)}
|
||||
ComponentHandler={(com,rowData)=>{
|
||||
if(com == "dates")
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue