瀏覽代碼

软件锁表格内容套数据

outaozhen 5 年之前
父節點
當前提交
3e934598d5

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

@@ -87,7 +87,7 @@ module.exports = merge(common, {
     ],
     proxy: { //设置代理
       "/cld2": {
-        target: "http://cld2.com:7001",
+        target: "http://192.168.1.26:7001/",
         pathRewrite: { "^/cld2": "/cld2" },
         changeOrigin: true
       }

+ 25 - 0
dist/api/lock_count.json

@@ -0,0 +1,25 @@
+{
+    "code": 200,
+    "draw": null,
+    "recordsTotal": 30303,
+    "recordsFiltered": 30303,
+    "data": [
+        {
+            "id":"0",
+            "telephone": "总部",
+            "telephone": "总部",
+            "telephone": "总部",
+            "telephone": "总部",
+            "telephone": "总部"
+        },
+{
+            "id":"1",
+            "telephone": "总部",
+            "telephone": "总部",
+            "telephone": "总部",
+            "telephone": "总部",
+            "telephone": "总部"
+        }
+        
+    ]
+}

+ 31 - 0
dist/api/lock_store.json

@@ -0,0 +1,31 @@
+{
+    "code": 200,
+    "draw": null,
+    "recordsTotal": 30303,
+    "recordsFiltered": 30303,
+    "data": [
+        {
+            "id":"0",
+            "key_num": "HNYH-0654",
+            "product": "固化清单全功能",
+            "telephone": "总部",
+            "createTime": "2019年5月6日 14:55",
+            "updatetime": "2019年5月7日 14:55",
+            "category": "陈特",
+            "status": "销售",
+            "client": "张三8"
+        },
+{
+            "id":"1",
+            "key_num": "HNYH-0654",
+            "product": "固化清单全功能",
+            "telephone": "总部",
+            "createTime": "2019年5月6日 14:55",
+            "updatetime": "2019年5月7日 14:55",
+            "category": "陈特11",
+            "status": "销售",
+            "client": "张三811"
+        }
+        
+    ]
+}

+ 74 - 103
src/product/lock_count/index.js

@@ -6,105 +6,83 @@ import StaffHeader from '../../common/staffHeader'
 import { actionCreators } from './store';
 
 class lock_count extends PureComponent {
-
-    
-
-    getListArea() {
-        const { list, menu } = this.props;
-        menu;
-        if (true) {
-            return (
-                <div>
-                   {
-                    list.map((item) => {
-                        return <span className='ispan' type="text" key={item} >{item}</span>
-                    })
-                }
-                </div>
-            )
-        } else {
-            return null;
-        }
-    }
-
-
     render() {
-        //const { inputValue, handleInputFocus,handleInputChange, menu, list } = this.props;
+      const { lockCount } = this.props;
         return (
             <div>
                 <StaffHeader />
-                <main id="js-page-content" role="main" class="page-content">
-          <div class="row">
-            <div class="col-xl-12">
-              <div id="panel-1" class="panel">
-                <div class="panel-hdr">
-                  <div class="col-auto pr-0">
-                    <div class="input-group input-group-sm bg-white shadow-inset-2">
-                      <input type="text" class="form-control bg-transparent" placeholder="锁号"/>
-                      <div class="input-group-append">
-                        <button class="btn btn-default waves-effect waves-themed" type="button" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="搜索"><i class="fal fa-search"></i></button>
+                <main id="js-page-content" role="main" className="page-content">
+          <div className="row">
+            <div className="col-xl-12">
+              <div id="panel-1" className="panel">
+                <div className="panel-hdr">
+                  <div className="col-auto pr-0">
+                    <div className="input-group input-group-sm bg-white shadow-inset-2">
+                      <input type="text" className="form-control bg-transparent" placeholder="锁号"/>
+                      <div className="input-group-append">
+                        <button className="btn btn-default waves-effect waves-themed" type="button" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="搜索"><i className="fal fa-search"></i></button>
                       </div>
                     </div>
                   </div>
-                  <div class="col-auto pr-0">
-                    <select class="custom-select form-control custom-select-sm">
-                      <option selected="">办事处</option>
+                  <div className="col-auto pr-0">
+                    <select className="custom-select form-control custom-select-sm">
+                      {/* <option selected="">办事处</option>
                       <option value="1">广东办</option>
                       <option value="2">总部</option>
-                      <option value="3">江西办</option>
+                      <option value="3">江西办</option> */}
                     </select>
                   </div>
-                  <div class="col-auto ml-auto">
+                  <div className="col-auto ml-auto">
                   </div>
-                  <div class="col-auto pl-0">
-                    <button class="btn btn-sm btn-default" data-toggle="dropdown"><i class="fal fa-sort-amount-down"></i> 排序</button>
-                    <div class="dropdown-menu dropdown-menu-right" id="paixu">
-                      <ul class="list-unstyled px-3 pt-2 mb-0">
-                        <li class="mb-2">
-                          <div class="custom-control custom-radio">
-                            <input type="radio" class="custom-control-input" id="pai1" name="paizhi" id="on" checked/>
-                            <label class="custom-control-label" for="pai1">已使用</label>
+                  <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">
+                      <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" id="on" checked/>
+                            <label className="custom-control-label" for="pai1">已使用</label>
                           </div>
                         </li>
-                        <li class="mb-2">
-                          <div class="custom-control custom-radio">
-                            <input type="radio" class="custom-control-input" id="pai2" name="paizhi"/>
-                            <label class="custom-control-label" for="pai2">未使用</label>
+                        <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" for="pai2">未使用</label>
                           </div>
                         </li>
-                        <li class="mb-2">
-                          <div class="custom-control custom-radio">
-                            <input type="radio" class="custom-control-input" id="pai3" name="paizhi"/>
-                            <label class="custom-control-label" for="pai3">合计</label>
+                        <li className="mb-2">
+                          <div className="custom-control custom-radio">
+                            <input type="radio" className="custom-control-input" id="pai3" name="paizhi"/>
+                            <label className="custom-control-label" for="pai3">合计</label>
                           </div>
                         </li>
                       </ul>
-                      <ul class="list-unstyled px-3 pt-2 mb-0 border-top">
-                        <li class="mb-2">
-                          <div class="custom-control custom-radio">
-                            <input type="radio" class="custom-control-input" id="pdown" name="paixu" id="on" checked/>
-                            <label class="custom-control-label" for="pdown">降序</label>
+                      <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" id="on" checked/>
+                            <label className="custom-control-label" for="pdown">降序</label>
                           </div>
                         </li>
-                        <li class="mb-2">
-                          <div class="custom-control custom-radio">
-                            <input type="radio" class="custom-control-input" id="pup" name="paixu"/>
-                            <label class="custom-control-label" for="pup">升序</label>
+                        <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" for="pup">升序</label>
                           </div>
                         </li>
                       </ul>
-                    </div>
+                    </div> */}
                   </div>
                 </div>
-                <div class="panel-container show">
+                <div className="panel-container show">
                   {/* <!--数据内容区--> */}
-                  <div class="panel-content">
-                    <table class="table table-bordered table-hover table-striped">
+                  <div className="panel-content">
+                    <table className="table table-bordered table-hover table-striped">
                       <thead>
                         <tr>
-                          <th rowspan="2">办事处</th>
-                          <th rowspan="2">员工</th>
-                          <th colspan="3" class="text-center">锁合计</th>
+                          <th rowSpan="2">办事处</th>
+                          <th rowSpan="2">员工</th>
+                          <th colSpan="3" className="text-center">锁合计</th>
                         </tr>
                         <tr>
                           <th title="接收">未使用</th>
@@ -113,20 +91,28 @@ class lock_count extends PureComponent {
                         </tr>
                       </thead>
                       <tbody>
-                        <tr>
-                          <td>总部</td>
-                          <td>王晶</td>
-                          <td>30</td>
-                          <td>70</td>
-                          <td>100</td>
+                      {
+                           
+                           lockCount.map((item) => {
+                             return (
+                        <tr key={item.get('id')}>
+                          <td>{item.get('telephone')}</td>
+                          <td>{item.get('telephone')}</td>
+                          <td>{item.get('telephone')}</td>
+                          <td>{item.get('telephone')}</td>
+                          <td>{item.get('telephone')}</td>
                         </tr>
-                        <tr>
+                        
+                        )
+                      })
+                } 
+                        {/* <tr>
                           <td>总部</td>
                           <td>黄嘉玲</td>
                           <td>41</td>
                           <td>71</td>
                           <td>101</td>
-                        </tr>
+                        </tr> */}
                       </tbody>
                     </table>
                   </div>
@@ -142,13 +128,9 @@ class lock_count extends PureComponent {
     //组件即将要被挂在的时候执行的方法--
     componentDidMount(){
         //逻辑代码可以写在mapDispathToProps里 this.props.方法
-
-        // axios.get('/api/submenuList.json').then((res) => {
-        //     const data = res.data;
-        //     dispatch(changeList(data.data));
-        // }).catch(() => {
-        //     console.log('error');
-        // })
+        const { lockCount,lockcount } = this.props;
+      
+        lockcount(lockCount);
     }
 
 }
@@ -159,18 +141,11 @@ class lock_count extends PureComponent {
 const mapStateToProps = (state) => {
 
     return {
-        //menu: state.submenu.menu
-        menu: state.getIn(['submenu', 'menu']),
-        list: state.getIn(['submenu', 'list']),
-        inputValue: state.getIn(['submenu', 'inputValue']),
+      lockCount:state.getIn(['product', 'lockCount']),
+      menu: state.getIn(['submenu', 'menu']),
+      list: state.getIn(['submenu', 'list']),
+      inputValue: state.getIn(['submenu', 'inputValue']),
     }
-    // return {
-    // 	focused: state.getIn(['header', 'focused']),
-    // 	list: state.getIn(['header', 'list']),
-    // 	page: state.getIn(['header', 'page']),
-    // 	totalPage: state.getIn(['header', 'totalPage']),
-    // 	mouseIn: state.getIn(['header', 'mouseIn'])
-    // }
 }
 
 /**
@@ -179,16 +154,12 @@ const mapStateToProps = (state) => {
  */
 const mapDispathToProps = (dispatch) => {
     return {
+      lockcount(lockCount){
+          (lockCount.size === 0) && dispatch(actionCreators.getLockcountLIst());
+        },
         handleInputFocus(list) {
-
-            // const action = {
-            //     type: 'aearch_focus'
-            // };
             //发送给store--提取出action--避免发送重复的ajax请求
             (list.size === 0) && dispatch(actionCreators.getList());
-            // if(list.size>0){
-            //     dispatch(actionCreators.getList());
-            // }
             dispatch(actionCreators.searchFocus());
         },
         handleInputChange(ivalueElem){

+ 17 - 23
src/product/lock_count/store/actionCreators.js

@@ -11,12 +11,24 @@ export const searchFocus = () => ({
     type: constants.SEARCH_FOCUS
 });
 
-export const getList = () => {
+export const getLockcountLIst = () => {
     return (dispatch) => {
-        axios.get('/api/submenuList.json').then((res) => {
+        //axios.get(config.CLD2API+'/product/lock_store').then((res) => {
+        axios.get('/api/lock_count.json').then((res) => {
             const data = res.data;
-            dispatch(changeList(data.data));
-        }).catch(() => {
+            if(data.code===200){
+                let d2=data.data;
+                //dispatch(changeList(JSON.parse(data.list)));
+                //console.log(d2);
+                dispatch({
+                    type: constants.CHANGE_LOCKCOUNT_DATA,
+                    data: fromJS(d2),
+                });
+            }else{
+                console.log(data);
+            }
+        }).catch((e) => {
+            console.log(e);
             console.log('error');
         })
     }
@@ -31,22 +43,4 @@ const changeList = (data) => ({
     type: constants.CHANGE_LIST,
     data: fromJS(data),
     // totalPage: Math.ceil(data.length / 10)
-});
-
-// export const searchBlur = () => ({
-// 	type: constants.SEARCH_BLUR
-// });
-
-// export const mouseEnter = () => ({
-// 	type: constants.MOUSE_ENTER
-// });
-
-// export const mouseLeave = () => ({
-// 	type: constants.MOUSE_LEAVE
-// });
-
-// export const changePage = (page) => ({
-// 	type: constants.CHANGE_PAGE,
-// 	page
-// });
-
+});

+ 1 - 0
src/product/lock_count/store/constants.js

@@ -1,5 +1,6 @@
 export const SEARCH_FOCUS = 'submenu/SEARCH_FOCUS';
 export const CHANGE_LIST ='submenu/CHANGE_LIST';
 export const CHANGE_INPUTVALUE ='submenu/CHANGE_INPUTVALUE';
+export const CHANGE_LOCKCOUNT_DATA = 'product/change_lockcount_data';
 
 

+ 18 - 46
src/product/lock_count/store/reducer.js

@@ -4,55 +4,27 @@ import { fromJS } from 'immutable';
 
 
 const defaultState = fromJS({
-    menu: 'hello submenu-t!!!',
-    list:[],
-    inputValue:'',
-
+	lockCount:[],
 });
 
 
 export default (state = defaultState, action) => {
-
-    // switch(action.type) {
-	// 	case constants.SEARCH_FOCUS:
-	// 		return state.set('focused', true);
-	// 	case constants.SEARCH_BLUR:
-	// 		return state.set('focused', false);
-	// 	case constants.CHANGE_LIST:
-	// 		return state.merge({
-	// 			list: action.data,
-	// 			totalPage: action.totalPage
-	// 		});
-	// 	case constants.MOUSE_ENTER:
-	// 		return state.set('mouseIn', true);
-	// 	case constants.MOUSE_LEAVE:
-	// 		return state.set('mouseIn', false);
-	// 	case constants.CHANGE_PAGE:
-	// 		return state.set('page', action.page);
-	// 	default:
-	// 		return state;
-	// }
-    if(action.type===constants.CHANGE_INPUTVALUE){
-        return state.set('inputValue',action.data);
-
-    }
-
-
-
-    if(action.type===constants.SEARCH_FOCUS){
-        return state.set('menu','clicke me');
-        // return {
-        //     menu:'clicke me'
-        // }
-    }
-    if(action.type===constants.CHANGE_LIST){
-        return state.set('list',action.data);
-        //return state.set('menu','clicke me');
-
-        // return state.merge({
-        //     list: action.data,
-        //     //totalPage: action.totalPage
-        // });
-    }
+	switch(action.type) {
+		case constants.CHANGE_LOCKCOUNT_DATA:
+			return state.set('lockCont', action.data);
+		default:
+			return state;
+	}
+
+    // if(action.type===constants.CHANGE_INPUTVALUE){
+    //     return state.set('inputValue',action.data);
+
+    // }
+    // if(action.type===constants.SEARCH_FOCUS){
+    //     return state.set('menu','clicke me');
+    // }
+    // if(action.type===constants.CHANGE_LIST){
+    //     return state.set('list',action.data);
+    // }
     return state;
 }

+ 32 - 74
src/product/lock_store/index.js

@@ -7,30 +7,8 @@ import LockDetail from '../../common/lockDetail'
 import { actionCreators } from './store';
 
 class lock_store extends PureComponent {
-
-    
-
-    getListArea() {
-        const { list, menu } = this.props;
-        menu;
-        if (true) {
-            return (
-                <div>
-                   {
-                    list.map((item) => {
-                        return <span className='ispan' type="text" key={item} >{item}</span>
-                    })
-                }
-                </div>
-            )
-        } else {
-            return null;
-        }
-    }
-
-
     render() {
-        //const { inputValue, handleInputFocus,handleInputChange, menu, list } = this.props;
+        const { lockStore } = this.props;
         return (
             <div>
         <StaffHeader />
@@ -52,7 +30,7 @@ class lock_store extends PureComponent {
                   </div>
                   <div className="col-auto ml-auto">
                       <button className="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">已显示7列</button>
-                      <div className="dropdown-menu">
+                      {/* <div className="dropdown-menu">
                         <ul className="list-unstyled px-3 pt-2 mb-0">
                           <li className="mb-2">
                             <div className="custom-control custom-switch">
@@ -103,11 +81,11 @@ class lock_store extends PureComponent {
                             </div>
                           </li>
                         </ul>
-                      </div>
+                      </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">
@@ -136,7 +114,7 @@ class lock_store extends PureComponent {
                           </div>
                         </li>
                       </ul>
-                    </div>
+                    </div> */}
                   </div>
                 </div>
                 <div className="panel-container show">
@@ -156,27 +134,23 @@ class lock_store extends PureComponent {
                         </tr>
                       </thead>
                       <tbody>
-                        <tr>
-                          <td><a href="#lock-detail" data-toggle="modal" data-target="#lock-detail">HNYH-0654</a></td>
-                          <td><span className="badge badge-primary mr-1">固化清单全功能</span><span className="badge badge-primary mr-1">全国专业</span><span className="badge badge-primary">全国专业(新定额)</span></td>
-                          {/* <!-- <td>固化清单全功能+全国专业+全国专业(新定额)</td> --> */}
-                          <td>总部</td>
-                          <td>2019年5月6日 14:55</td>
-                          <td>2019年5月7日 14:55</td>
-                          <td><a href="#compe-detail" data-toggle="modal" data-target="#compe-detail">陈特</a></td>
-                          <td>销售</td>
-                          <td><a href="#detail" data-toggle="modal" data-target="#detail">张三8</a></td>
-                        </tr>
-                        <tr>
-                          <td><a href="#lock-detail" data-toggle="modal" data-target="#lock-detail">HNYH-0654</a></td>
-                          <td><span className="badge badge-primary mr-1">固化清单全功能</span><span className="badge badge-primary mr-1">全国专业</span><span className="badge badge-primary">全国专业(新定额)</span></td>
-                          <td>总部</td>
-                          <td>2019年5月6日 14:55</td>
-                          <td>2019年5月7日 14:55</td>
-                          <td><a href="#compe-detail" data-toggle="modal" data-target="#compe-detail">陈特</a></td>
-                          <td>销售</td>
-                          <td><a href="#detail" data-toggle="modal" data-target="#detail">张三8</a></td>
+                      {
+                           lockStore.map((item) => {
+                             return (
+                        <tr key={item.get('id')}>
+                          <td><a href="#lock-detail" data-toggle="modal" data-target="#lock-detail">{item.get('key_num')}</a></td>
+                          <td><span className="badge badge-primary mr-1">{item.get('product')}</span><span className="badge badge-primary mr-1">全国专业222</span></td>
+                          <td>{item.get('telephone')}</td>
+                          <td>{item.get('createTime')}</td>
+                          <td>{item.get('updatetime')}</td>
+                          <td><a href="#compe-detail" data-toggle="modal" data-target="#compe-detail">{item.get('category')}</a></td>
+                          <td>{item.get('status')}</td>
+                          <td><a href="#detail" data-toggle="modal" data-target="#detail">{item.get('client')}</a></td>
                         </tr>
+                       
+                        )
+                      })
+                } 
                       </tbody>
                     </table>
                     {/* <!--翻页--> */}
@@ -208,21 +182,16 @@ class lock_store extends PureComponent {
             </div>
           </div>
         </main>
-        <LockDetail />
+        {/* <LockDetail /> */}
             </div>
         );
     }
 
     //组件即将要被挂在的时候执行的方法--
     componentDidMount(){
-        //逻辑代码可以写在mapDispathToProps里 this.props.方法
-
-        // axios.get('/api/submenuList.json').then((res) => {
-        //     const data = res.data;
-        //     dispatch(changeList(data.data));
-        // }).catch(() => {
-        //     console.log('error');
-        // })
+      const { lockStore,a } = this.props;
+      
+      a(lockStore);
     }
 
 }
@@ -233,18 +202,11 @@ class lock_store extends PureComponent {
 const mapStateToProps = (state) => {
 
     return {
-        //menu: state.submenu.menu
-        menu: state.getIn(['submenu', 'menu']),
-        list: state.getIn(['submenu', 'list']),
-        inputValue: state.getIn(['submenu', 'inputValue']),
+      lockStore:state.getIn(['product', 'lockStore']),
+      menu: state.getIn(['submenu', 'menu']),
+      list: state.getIn(['submenu', 'list']),
+      inputValue: state.getIn(['submenu', 'inputValue']),
     }
-    // return {
-    // 	focused: state.getIn(['header', 'focused']),
-    // 	list: state.getIn(['header', 'list']),
-    // 	page: state.getIn(['header', 'page']),
-    // 	totalPage: state.getIn(['header', 'totalPage']),
-    // 	mouseIn: state.getIn(['header', 'mouseIn'])
-    // }
 }
 
 /**
@@ -253,16 +215,12 @@ const mapStateToProps = (state) => {
  */
 const mapDispathToProps = (dispatch) => {
     return {
+        a(lockStore){
+          (lockStore.size === 0) && dispatch(actionCreators.getClientLIst());
+        },
         handleInputFocus(list) {
-
-            // const action = {
-            //     type: 'aearch_focus'
-            // };
             //发送给store--提取出action--避免发送重复的ajax请求
             (list.size === 0) && dispatch(actionCreators.getList());
-            // if(list.size>0){
-            //     dispatch(actionCreators.getList());
-            // }
             dispatch(actionCreators.searchFocus());
         },
         handleInputChange(ivalueElem){

+ 19 - 31
src/product/lock_store/store/actionCreators.js

@@ -7,46 +7,34 @@ import axios from '../../../common/axios_auth.js';
 
 
 //actionType
-export const searchFocus = () => ({
-    type: constants.SEARCH_FOCUS
-});
 
-export const getList = () => {
+export const getClientLIst = () => {
     return (dispatch) => {
-        axios.get('/api/submenuList.json').then((res) => {
+        //axios.get(config.CLD2API+'/product/lock_store').then((res) => {
+        axios.get('/api/lock_store.json').then((res) => {
             const data = res.data;
-            dispatch(changeList(data.data));
-        }).catch(() => {
+            
+            if(data.code===200){
+                
+                let d2=data.data;
+                //dispatch(changeList(JSON.parse(data.list)));
+                // console.log(d2);
+                dispatch({
+                    type: constants.CHANGE_LOCKSTORE_DATA,
+                    data: fromJS(d2),
+                });
+            }else{
+                console.log(data);
+            }
+        }).catch((e) => {
+            console.log(e);
             console.log('error');
         })
     }
 };
 
-export const changeInputValue = (value) => (  {
-    type: constants.CHANGE_INPUTVALUE,
-    data:fromJS(value),
-});
 
 const changeList = (data) => ({
-    type: constants.CHANGE_LIST,
+    type: constants.CHANGE_LOCKSTORE_DATA,
     data: fromJS(data),
-    // totalPage: Math.ceil(data.length / 10)
 });
-
-// export const searchBlur = () => ({
-// 	type: constants.SEARCH_BLUR
-// });
-
-// export const mouseEnter = () => ({
-// 	type: constants.MOUSE_ENTER
-// });
-
-// export const mouseLeave = () => ({
-// 	type: constants.MOUSE_LEAVE
-// });
-
-// export const changePage = (page) => ({
-// 	type: constants.CHANGE_PAGE,
-// 	page
-// });
-

+ 2 - 0
src/product/lock_store/store/constants.js

@@ -1,5 +1,7 @@
 export const SEARCH_FOCUS = 'submenu/SEARCH_FOCUS';
 export const CHANGE_LIST ='submenu/CHANGE_LIST';
 export const CHANGE_INPUTVALUE ='submenu/CHANGE_INPUTVALUE';
+export const CHANGE_LOCKSTORE_DATA = 'product/change_lockstore_data';
+
 
 

+ 17 - 45
src/product/lock_store/store/reducer.js

@@ -4,55 +4,27 @@ import { fromJS } from 'immutable';
 
 
 const defaultState = fromJS({
-    menu: 'hello submenu-t!!!',
-    list:[],
-    inputValue:'',
-
+	lockStore:[],
 });
 
 
 export default (state = defaultState, action) => {
 
-    // switch(action.type) {
-	// 	case constants.SEARCH_FOCUS:
-	// 		return state.set('focused', true);
-	// 	case constants.SEARCH_BLUR:
-	// 		return state.set('focused', false);
-	// 	case constants.CHANGE_LIST:
-	// 		return state.merge({
-	// 			list: action.data,
-	// 			totalPage: action.totalPage
-	// 		});
-	// 	case constants.MOUSE_ENTER:
-	// 		return state.set('mouseIn', true);
-	// 	case constants.MOUSE_LEAVE:
-	// 		return state.set('mouseIn', false);
-	// 	case constants.CHANGE_PAGE:
-	// 		return state.set('page', action.page);
-	// 	default:
-	// 		return state;
-	// }
-    if(action.type===constants.CHANGE_INPUTVALUE){
-        return state.set('inputValue',action.data);
-
-    }
-
-
-
-    if(action.type===constants.SEARCH_FOCUS){
-        return state.set('menu','clicke me');
-        // return {
-        //     menu:'clicke me'
-        // }
-    }
-    if(action.type===constants.CHANGE_LIST){
-        return state.set('list',action.data);
-        //return state.set('menu','clicke me');
-
-        // return state.merge({
-        //     list: action.data,
-        //     //totalPage: action.totalPage
-        // });
-    }
+    switch(action.type) {
+		case constants.CHANGE_LOCKSTORE_DATA:
+			return state.set('lockStore', action.data);
+		default:
+			return state;
+	}
+    
+
+
+
+    // if(action.type===constants.SEARCH_FOCUS){
+    //     return state.set('menu','clicke me');
+    // }
+    // if(action.type===constants.CHANGE_LIST){
+    //     return state.set('list',action.data);
+    // }
     return state;
 }

+ 4 - 2
src/product/store/reducer.js

@@ -1,13 +1,15 @@
 import { combineReducers } from 'redux-immutable';
 import { reducer as commonReducer } from '../common/store';
-// import { reducer as clientReducer } from '../lock_count/store';
+import { reducer as lockStoreReducer } from '../lock_store/store';
+import { reducer as lockCountReducer } from '../lock_count/store';
 
 
 
 
 const reducer = combineReducers({
     common: commonReducer,
-    // client: clientReducer,
+    product: lockStoreReducer,
+    product: lockCountReducer,
 });
 
 export default reducer;