|
@@ -3,6 +3,7 @@ import React, { PureComponent } from 'react';
|
|
|
import { connect } from 'react-redux';
|
|
|
// import { BrowserRouter, Route,Link } from 'react-router-dom';
|
|
|
import { actionCreators } from './store';
|
|
|
+import { actionCreatorsDetail } from '../popupstockDetail/store';
|
|
|
import Style from './styles.module.less';
|
|
|
|
|
|
|
|
@@ -13,7 +14,7 @@ const error = (msg) => {
|
|
|
|
|
|
class lockType extends PureComponent {
|
|
|
render() {
|
|
|
- const {loading,handlelockTypeSearch,data,lead,handleChangeLSGraido} = this.props;
|
|
|
+ const {loading,handlelockTypeSearch,data,lead,handleChangeLSGraido,handleRelatedChange} = this.props;
|
|
|
let locksearchlist2 = data.toJS();
|
|
|
//console.log(locksearchlist2)
|
|
|
return (
|
|
@@ -40,18 +41,13 @@ class lockType extends PureComponent {
|
|
|
<div>
|
|
|
{/* <div className="ml-4 mr-4 alert alert-warning">暂时没有搜索的数据</div> */}
|
|
|
<div className="p-4 border-top d-flex justify-content-center">
|
|
|
- <div className={Style.overrideAntBtn}>
|
|
|
- <Radio.Group buttonStyle="solid" onChange={(e) => handleChangeLSGraido(e)} value={lead}>
|
|
|
- <Radio.Button value="lead">借出</Radio.Button>
|
|
|
- <Radio.Button value="sale">销售</Radio.Button>
|
|
|
- <Radio.Button value="give">赠送</Radio.Button>
|
|
|
- </Radio.Group>
|
|
|
- </div>
|
|
|
- {/* <ul className="nav nav-pills" role="tablist">
|
|
|
- <li className="nav-item"><a className="nav-link active" data-toggle="tab" href="#">借出</a></li>
|
|
|
- <li className="nav-item"><a className="nav-link" data-toggle="tab" href="#2">销售</a></li>
|
|
|
- <li className="nav-item"><a className="nav-link" data-toggle="tab" href="#3">赠送</a></li>
|
|
|
- </ul> */}
|
|
|
+ <div className={Style.overrideAntBtn}>
|
|
|
+ <Radio.Group buttonStyle="solid" onChange={(e) => handleChangeLSGraido(e)} value={lead}>
|
|
|
+ <Radio.Button value="lead">借出</Radio.Button>
|
|
|
+ <Radio.Button value="sale">销售</Radio.Button>
|
|
|
+ <Radio.Button value="give">赠送</Radio.Button>
|
|
|
+ </Radio.Group>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div className="modal-search-height border-top border-bottom">
|
|
|
<div className="slimScrol2 p-4 modal-search-result">
|
|
@@ -60,7 +56,7 @@ class lockType extends PureComponent {
|
|
|
return (
|
|
|
<List.Item key={index}>
|
|
|
<div className="card p-3 width100" title="点击关联该联系人">
|
|
|
- <div className="row"><div className="col-1 pr-0">{item.clientname}</div><div className="col-1 pr-0">{item.position}</div><div className="col-2 pr-0">{item.telephone}</div><div className="col-2 pr-0">{item.phone}</div><div className="col-4 pr-0">{item.companyname}</div><div className="col-auto ml-auto pl-0"><button className="btn btn-xs btn-outline-primary waves-effect waves-themed" value="a">选择ta</button></div></div>
|
|
|
+ <div className="row"><div className="col-1 pr-0">{item.clientname}</div><div className="col-1 pr-0">{item.position}</div><div className="col-2 pr-0">{item.telephone}</div><div className="col-2 pr-0">{item.phone}</div><div className="col-4 pr-0">{item.companyname}</div><div className="col-auto ml-auto pl-0"><button className="btn btn-xs btn-outline-primary waves-effect waves-themed" onClick={(e) => handleRelatedChange(e)} value={lead}>选择ta</button></div></div>
|
|
|
</div>
|
|
|
</List.Item>
|
|
|
)
|
|
@@ -179,8 +175,14 @@ class lockType extends PureComponent {
|
|
|
// 渲染完成时调回
|
|
|
componentDidMount() {
|
|
|
}
|
|
|
+
|
|
|
+ handleRelatedChange(key) {
|
|
|
+ const { handleRelatedChange } = this.props;
|
|
|
+ handleRelatedChange(key);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
let delaySwitch = null;
|
|
|
|
|
|
const mapStateToProps = (state) => {
|
|
@@ -189,12 +191,14 @@ const mapStateToProps = (state) => {
|
|
|
data: state.getIn(['locktype', 'data']),
|
|
|
locksearchValue: state.getIn(['locktype', 'locksearchValue']),
|
|
|
lead: state.getIn(['locktype', 'lead']),
|
|
|
+ locksotreDetail: state.getIn(['popupstock', 'locksotreDetail']),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 要改变store里的内容需要调用dispatch方法
|
|
|
const mapDispathToProps = (dispatch) => {
|
|
|
return {
|
|
|
+ //----组件更新后,调用更新后的方法---利用引用的方式操作子组件方法
|
|
|
handlelockTypeSearch(locksearchValue,keyup) {
|
|
|
//借出、销售、赠送搜索
|
|
|
dispatch(actionCreators.changeLoading());
|
|
@@ -216,6 +220,15 @@ const mapDispathToProps = (dispatch) => {
|
|
|
handleChangeLSGraido(e) {
|
|
|
dispatch(actionCreators.changeLead(e.target.value));
|
|
|
},
|
|
|
+ //点击关联用户更新对应的内容
|
|
|
+ handleRelatedChange(e){
|
|
|
+ console.log(e.target.value);
|
|
|
+ dispatch(actionCreators.changeLead(e.target.value));
|
|
|
+ //选择关联用户需要更新不会做对应的更新
|
|
|
+ //console.log('fs');
|
|
|
+ dispatch(actionCreators.getchangelocksotreDetail());
|
|
|
+ dispatch(actionCreatorsDetail.getLockService(error));
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
|