diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 34e9edd9..b0deff0f 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -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{