|  | @@ -2,17 +2,21 @@ import React, { PureComponent } from 'react';
 | 
	
		
			
				|  |  |  import { connect } from 'react-redux';
 | 
	
		
			
				|  |  |  //import { BrowserRouter, Route,Link } from 'react-router-dom';
 | 
	
		
			
				|  |  |  import StaffHeader from '../../common/staffHeader'
 | 
	
		
			
				|  |  | -import { Table, Input } from 'antd';
 | 
	
		
			
				|  |  | +import { Table, Input,Radio } from 'antd';
 | 
	
		
			
				|  |  |  import 'antd/dist/antd.css';
 | 
	
		
			
				|  |  |  import { actionCreators } from './store';
 | 
	
		
			
				|  |  | -import { AudioOutlined } from '@ant-design/icons';
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +//import { AudioOutlined } from '@ant-design/icons';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +const radioStyle = {
 | 
	
		
			
				|  |  | +  display: 'block',
 | 
	
		
			
				|  |  | +  height: '30px',
 | 
	
		
			
				|  |  | +  lineHeight: '30px',
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  |  const { Search } = Input;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  class lock_store extends PureComponent {
 | 
	
		
			
				|  |  |      render() {
 | 
	
		
			
				|  |  | -      const {dataSource,columns,pagination,handleLockstoreList,handleSearch} = this.props;
 | 
	
		
			
				|  |  | +      const {dataSource,columns,pagination,handleLockstoreList,handleSearch,columnsData,columnsNum,handleInputChange,handleColumnsShow} = this.props;
 | 
	
		
			
				|  |  |       
 | 
	
		
			
				|  |  |          return (
 | 
	
		
			
				|  |  |          <div>
 | 
	
	
		
			
				|  | @@ -30,68 +34,62 @@ class lock_store extends PureComponent {
 | 
	
		
			
				|  |  |                          onKeyUp={(e) => handleSearch(pagination.toJS(),this.props,e.target.value,'keyup')}
 | 
	
		
			
				|  |  |                          style={{ width: 200 }}
 | 
	
		
			
				|  |  |                        />
 | 
	
		
			
				|  |  | -                      {/* <input type="text" ref={(input) => { this.searchValue = input }} onKeyUp={() => handleSearch(this.searchValue)} className="form-control bg-transparent" placeholder="锁号" /> */}
 | 
	
		
			
				|  |  |                      </div>
 | 
	
		
			
				|  |  |                    </div>
 | 
	
		
			
				|  |  |                    <div className="col-auto pr-0">
 | 
	
		
			
				|  |  |                      <button className="btn btn-sm btn-default" type="button" data-toggle="modal" data-target="#filter"><i className="fal fa-filter"></i> 筛选</button>
 | 
	
		
			
				|  |  |                    </div>
 | 
	
		
			
				|  |  |                    <div className="col-auto ml-auto">
 | 
	
		
			
				|  |  | -                      <button className="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">已显示列</button>
 | 
	
		
			
				|  |  | +                      <button className="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">已显示{columnsNum}列</button>
 | 
	
		
			
				|  |  |                        <div className="dropdown-menu">
 | 
	
		
			
				|  |  |                          <ul className="list-unstyled px-3 pt-2 mb-0">
 | 
	
		
			
				|  |  | -                        {/* {
 | 
	
		
			
				|  |  | +                        {
 | 
	
		
			
				|  |  |                            columnsData.map((item, index) => {
 | 
	
		
			
				|  |  |                              return (
 | 
	
		
			
				|  |  |                                <li key={index} className="mb-2">
 | 
	
		
			
				|  |  |                                  <div className="custom-control custom-switch">
 | 
	
		
			
				|  |  |                                    <input type="checkbox" name={index} onChange={(e) => handleInputChange(e, index)} value={item.get('columnsValue')} checked={item.get('columnsValue')} className="custom-control-input" id={"lie" + index} />
 | 
	
		
			
				|  |  |                                    <label onClick={() => handleColumnsShow(index)} htmlFor={"lie" + index} className="custom-control-label" >{item.get('columnsName')}</label>
 | 
	
		
			
				|  |  | -                                 
 | 
	
		
			
				|  |  |                                  </div>
 | 
	
		
			
				|  |  |                                </li>
 | 
	
		
			
				|  |  |                              )
 | 
	
		
			
				|  |  |                            })
 | 
	
		
			
				|  |  | -                        } */}
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  |                          </ul>
 | 
	
		
			
				|  |  |                        </div>
 | 
	
		
			
				|  |  |                    </div>
 | 
	
		
			
				|  |  |                    <div className="col-auto pl-0">
 | 
	
		
			
				|  |  |                      <button className="btn btn-sm btn-default" data-toggle="dropdown"><i className="fal fa-sort-amount-down"></i> 排序</button>
 | 
	
		
			
				|  |  | -                    {/* <div className="dropdown-menu dropdown-menu-right" id="paixu">
 | 
	
		
			
				|  |  | +                    <div className="dropdown-menu dropdown-menu-right" id="paixu">
 | 
	
		
			
				|  |  |                        <ul className="list-unstyled px-3 pt-2 mb-0">
 | 
	
		
			
				|  |  |                          <li className="mb-2">
 | 
	
		
			
				|  |  | -                          <div className="custom-control custom-radio">
 | 
	
		
			
				|  |  | -                            <input type="radio" className="custom-control-input" id="pai1" name="paizhi" checked=""/>
 | 
	
		
			
				|  |  | -                            <label className="custom-control-label" >锁号</label>
 | 
	
		
			
				|  |  | -                          </div>
 | 
	
		
			
				|  |  | -                        </li>
 | 
	
		
			
				|  |  | -                        <li className="mb-2">
 | 
	
		
			
				|  |  | -                          <div className="custom-control custom-radio">
 | 
	
		
			
				|  |  | -                            <input type="radio" className="custom-control-input" id="pai2" name="paizhi"/>
 | 
	
		
			
				|  |  | -                            <label className="custom-control-label" >出库时间</label>
 | 
	
		
			
				|  |  | -                          </div>
 | 
	
		
			
				|  |  | +                          {/* <Radio.Group onChange={this.onChange} value={value}> */}
 | 
	
		
			
				|  |  | +                          <Radio.Group onChange={this.onChange}>
 | 
	
		
			
				|  |  | +                            <Radio style={radioStyle} value={1}>
 | 
	
		
			
				|  |  | +                              锁号
 | 
	
		
			
				|  |  | +                            </Radio>
 | 
	
		
			
				|  |  | +                            <Radio style={radioStyle} value={2}>
 | 
	
		
			
				|  |  | +                              出库时间
 | 
	
		
			
				|  |  | +                            </Radio>
 | 
	
		
			
				|  |  | +                          </Radio.Group>
 | 
	
		
			
				|  |  |                          </li>
 | 
	
		
			
				|  |  |                        </ul>
 | 
	
		
			
				|  |  |                        <ul className="list-unstyled px-3 pt-2 mb-0 border-top">
 | 
	
		
			
				|  |  |                          <li className="mb-2">
 | 
	
		
			
				|  |  | -                          <div className="custom-control custom-radio">
 | 
	
		
			
				|  |  | -                            <input type="radio" className="custom-control-input" id="pdown" name="paixu" checked=""/>
 | 
	
		
			
				|  |  | -                            <label className="custom-control-label">降序</label>
 | 
	
		
			
				|  |  | -                          </div>
 | 
	
		
			
				|  |  | -                        </li>
 | 
	
		
			
				|  |  | -                        <li className="mb-2">
 | 
	
		
			
				|  |  | -                          <div className="custom-control custom-radio">
 | 
	
		
			
				|  |  | -                            <input type="radio" className="custom-control-input" id="pup" name="paixu"/>
 | 
	
		
			
				|  |  | -                            <label className="custom-control-label" >升序</label>
 | 
	
		
			
				|  |  | -                          </div>
 | 
	
		
			
				|  |  | +                          <Radio.Group onChange={this.onChange}>
 | 
	
		
			
				|  |  | +                            <Radio style={radioStyle} value={3}>
 | 
	
		
			
				|  |  | +                              降序
 | 
	
		
			
				|  |  | +                            </Radio>
 | 
	
		
			
				|  |  | +                            <Radio style={radioStyle} value={4}>
 | 
	
		
			
				|  |  | +                              升序
 | 
	
		
			
				|  |  | +                            </Radio>
 | 
	
		
			
				|  |  | +                          </Radio.Group>
 | 
	
		
			
				|  |  |                          </li>
 | 
	
		
			
				|  |  |                        </ul>
 | 
	
		
			
				|  |  | -                    </div> */}
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  |                    </div>
 | 
	
		
			
				|  |  |                  </div>
 | 
	
		
			
				|  |  |                  <div className="panel-container show">
 | 
	
		
			
				|  |  | -                  {/* <!--数据内容区--> */}
 | 
	
		
			
				|  |  |                    <div className="panel-content">
 | 
	
		
			
				|  |  |                     <Table
 | 
	
		
			
				|  |  |                     onChange={(pagination) => handleLockstoreList(pagination,this.props)}
 | 
	
	
		
			
				|  | @@ -99,9 +97,7 @@ class lock_store extends PureComponent {
 | 
	
		
			
				|  |  |                      bordered
 | 
	
		
			
				|  |  |                      dataSource={dataSource.toJS()}
 | 
	
		
			
				|  |  |                      columns={columns.toJS()}
 | 
	
		
			
				|  |  | -                  /> 
 | 
	
		
			
				|  |  | -                  {/* 接口路径 */}
 | 
	
		
			
				|  |  | -                  {/* <DataTable onRef={(ref) => dt = ref} url={`/contact/client`} columnBindEvent={handleColumnBindEvent} columnsData={columnsData} columns={columns.toJS()}/> */}
 | 
	
		
			
				|  |  | +                  />
 | 
	
		
			
				|  |  |                    </div>
 | 
	
		
			
				|  |  |                  </div>
 | 
	
		
			
				|  |  |                </div>
 | 
	
	
		
			
				|  | @@ -116,9 +112,10 @@ class lock_store extends PureComponent {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      //组件即将要被挂在的时候执行的方法--
 | 
	
		
			
				|  |  |      componentDidMount(){
 | 
	
		
			
				|  |  | -      const{handleLockstoreList,pagination}= this.props;
 | 
	
		
			
				|  |  | +      const{handleLockstoreList,pagination,initData}= this.props;
 | 
	
		
			
				|  |  |        // console.log(pagination.toJS());
 | 
	
		
			
				|  |  |        handleLockstoreList(pagination.toJS(),this.props);
 | 
	
		
			
				|  |  | +      initData();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -133,6 +130,8 @@ const mapStateToProps = (state) => {
 | 
	
		
			
				|  |  |        columns: state.getIn(['lockstore', 'columns']),
 | 
	
		
			
				|  |  |        pagination: state.getIn(['lockstore', 'pagination']),
 | 
	
		
			
				|  |  |        searchValue: state.getIn(['lockstore', 'searchValue']),
 | 
	
		
			
				|  |  | +      columnsData: state.getIn(['lockstore', 'columnsData']),
 | 
	
		
			
				|  |  | +      columnsNum:state.getIn(['lockstore', 'columnsNum']),
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -142,7 +141,14 @@ const mapStateToProps = (state) => {
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  |  const mapDispathToProps = (dispatch) => {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | -      handleLockstoreList(pagination,support,){
 | 
	
		
			
				|  |  | +      handleColumnsShow(index) {
 | 
	
		
			
				|  |  | +        // console.log('kkk');
 | 
	
		
			
				|  |  | +        dispatch(actionCreators.toggleColumns(index));
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      initData(){
 | 
	
		
			
				|  |  | +        dispatch(actionCreators.toggleColumnsAll());
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      handleLockstoreList(pagination,support){
 | 
	
		
			
				|  |  |          dispatch(actionCreators.getLockstoreList(pagination,support));
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        handleSearch(pagination,support,searchValue,keyup){
 | 
	
	
		
			
				|  | @@ -151,13 +157,20 @@ const mapDispathToProps = (dispatch) => {
 | 
	
		
			
				|  |  |              clearTimeout(delaySwitch);
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            delaySwitch = setTimeout(() => {
 | 
	
		
			
				|  |  | -            dispatch(actionCreators.getCompanyLIst(pagination, support, searchValue));
 | 
	
		
			
				|  |  | +            dispatch(actionCreators.getLockstoreList(pagination, support, searchValue));
 | 
	
		
			
				|  |  |            },350);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          else{
 | 
	
		
			
				|  |  |            dispatch(actionCreators.getLockstoreList(pagination,support,searchValue));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | +      handleInputChange(e, index){
 | 
	
		
			
				|  |  | +        // dispatch(actionCreators.changeInputValue(columnsNum));
 | 
	
		
			
				|  |  | +        // dt.handleColumnVisible(index, e.target.value);
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      // handleColumnsAllShow() {
 | 
	
		
			
				|  |  | +      //   dispatch(actionCreators.toggleColumnsAll(dt));
 | 
	
		
			
				|  |  | +      // },
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 |