outaozhen 4 gadi atpakaļ
vecāks
revīzija
ea370ff30a

+ 1 - 1
config/webpack.common.config.js

@@ -35,7 +35,7 @@ module.exports = {
             limit: 8192,
           },
         }
-      }
+      },
   
       // {
       //   test: /\.css$/,

+ 3 - 3
src/common/lockType/index.js

@@ -3,6 +3,8 @@ import { connect } from 'react-redux';
 // import { BrowserRouter, Route,Link } from 'react-router-dom';
 import { actionCreators } from './store';
 import { message,Input,List,Radio} from 'antd';
+import Style from './styles.less';
+
 
 const { Search } = Input;
 const error = (msg) => {
@@ -38,7 +40,7 @@ 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">
-                <Radio.Group buttonStyle="solid" onChange={(e) => handleChangeLSGraido(e)}value={lead}>
+                <Radio.Group className={Style.override_ant_btn} 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>
@@ -185,8 +187,6 @@ const mapStateToProps = (state) => {
     data: state.getIn(['locktype', 'data']),
     locksearchValue: state.getIn(['locktype', 'locksearchValue']),
     lead: state.getIn(['locktype', 'lead']),
-    sale: state.getIn(['locktype', 'sale']),
-    give: state.getIn(['locktype', 'give']),
   }
 }
 

+ 3 - 0
src/common/lockType/store/actionCreators.js

@@ -26,6 +26,7 @@ export const changeLead = (lead) => {
 //获取搜索内容
 export const getSearchlist = (locksearchValue) => {
     return (dispatch) => {
+        let lead = localStorage.getItem("locktype/change_lead");
         axios.get(config.LOCALAPI+config.PATHAPI +'contact_detail.json', {
             params: {
                 locksearchValue:locksearchValue,
@@ -34,8 +35,10 @@ export const getSearchlist = (locksearchValue) => {
             const data = res.data;
             if (data.code === 200) {
                 // console.log(locksearchValue);
+                console.log(lead);
                 dispatch({
                     type: constants.CHANGE_LOCKTYPE_SEARCHLIST,
+                    lead:lead,
                     data: data.data,
                     locksearchValue:locksearchValue,
                 });

+ 1 - 2
src/common/lockType/store/reducer.js

@@ -5,7 +5,7 @@ import { fromJS } from 'immutable';
 import { Tag } from 'antd';
 
 const defaultState = fromJS({
-	loading: true,
+	loading: false,
 	locksearchValue: '',
 	lead:'lead',
 	sale:'sale',
@@ -89,7 +89,6 @@ export default (state = defaultState, action) => {
 				data: fromJS(action.data),
 				locksearchValue:action.locksearchValue,
 			});
-			
 		default:
 			return state;
 	}

+ 10 - 0
src/common/lockType/styles.less

@@ -0,0 +1,10 @@
+.override_ant_btn {  
+    :global {  
+        .ant-radio-button-wrapper-checked {
+            background-color: #886ab5 !important;
+        }
+        .ant-radio-button-checked {
+            border-color: #886ab5 !important;
+        }
+    }  
+} 

+ 1 - 1
src/common/popupstockDetail/index.js

@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
 import { connect } from 'react-redux';
 // import { BrowserRouter, Route,Link } from 'react-router-dom';
 import { actionCreators } from './store';
-import { message, Tag, Spin, Table } from 'antd';
+import { message, Tag, Spin, Table} from 'antd';
 import Locktype from '../../common/lockType';
 
 const error = (msg) => {