浏览代码

巴管理优化

dev01 2 年之前
父节点
当前提交
0cfe2153b9

+ 2 - 1
js/component/manageCenter/project/task/myTask.jsx

@@ -3774,7 +3774,8 @@ const Task = React.createClass({
                                 }}
                             >
                                 <Select.Option key={0}>非特批</Select.Option>
-                                <Select.Option key={1}>特批</Select.Option>
+                                <Select.Option key={1}>总裁特批</Select.Option>
+                                <Select.Option key={2}>董事长特批</Select.Option>
                             </Select>
                             <Select
                                 placeholder="外包状态"

+ 2 - 1
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -3308,7 +3308,8 @@ const MyTaskOutsource = React.createClass({
                 }}
               >
                 <Select.Option key={0}>非特批</Select.Option>
-                <Select.Option key={1}>特批</Select.Option>
+                <Select.Option key={1}>总裁特批</Select.Option>
+                <Select.Option key={2}>董事长特批</Select.Option>
               </Select>
               <Button type="primary" onClick={this.search}>
                 搜索

+ 139 - 72
js/component/manageCenter/set/amoeba/barList.jsx

@@ -2,7 +2,6 @@ import React, { Component } from "react";
 import { Button, Modal, Form, AutoComplete, TreeSelect, Input, message, Spin, Select, Tabs, Table, } from "antd";
 import $ from "jquery/src/ajax";
 import { ShowModal, getBarLevel } from "@/tools";
-import moment from "moment";
 import './index.less'
 import ShowModalDiv from "@/showModal.jsx";
 import { ChooseList } from "../../order/orderNew/chooseList";
@@ -19,6 +18,7 @@ class Source extends Component {
       visible: '', // 弹窗控制
       level1Data: [], // 体系数据
       searchValues: {}, // 列表筛选条件
+      lvl: 5, // 层级
       pagination: {
         defaultCurrent: 1,
         defaultPageSize: 10,
@@ -31,52 +31,50 @@ class Source extends Component {
           return "共" + total + "条数据";
         },
       },
-      loading: false,
-      changeList: undefined,
+      loading: false, //加载动画
+      changeList: undefined, // 更改后的表格显示数据
       dataSource: [], // 列表数据
       selectedRowKeys: [], // 选中列表数据
       selectedRows: [], // 选中列表数据
-      info: {}, //单条详情数据
       columns: [
         {
-          title: "名称",
+          title: "名称",
           dataIndex: "name",
           key: "name",
+          width: "8%",
+          render: (text, record) =>
+            <span>
+              {text + (getBarLevel(record.ancestorsNames)[4] != "" ? ("(" + getBarLevel(record.ancestorsNames)[4] + ")") : "")}
+            </span>
         },
         {
           title: "巴主",
           dataIndex: "leaderName",
           key: "leaderName",
+          width: "8%",
         },
         {
-          title: "所属战区",
-          dataIndex: "name5",
-          key: "name5",
-          render: (text, record) =>
-            <span >
-              {getBarLevel(record.ancestorsNames)[4]}
-            </span>
-        },
-        {
-          title: "所属事业部",
+          title: "各战区&区事业部",
           dataIndex: "name4",
           key: "name4",
+          width: "8%",
           render: (text, record) =>
             <span >
               {getBarLevel(record.ancestorsNames)[3]}
             </span>
         },
         {
-          title: "所属区",
+          title: "各事业部&区经管开综",
           dataIndex: "name3",
           key: "name3",
+          width: "8%",
           render: (text, record) =>
             <span >
               {getBarLevel(record.ancestorsNames)[2]}
             </span>
         },
         {
-          title: "所属大区",
+          title: "各大区管理中心&集团经开综",
           dataIndex: "name2",
           key: "name2",
           render: (text, record) =>
@@ -85,9 +83,10 @@ class Source extends Component {
             </span>
         },
         {
-          title: "所属体系",
+          title: "管理中心",
           dataIndex: "name1",
           key: "name1",
+          width: "8%",
           render: (text, record) =>
             <span >
               {getBarLevel(record.ancestorsNames)[0]}
@@ -97,11 +96,13 @@ class Source extends Component {
           title: "财务",
           dataIndex: "financeName",
           key: "financeName",
+          width: "8%",
         },
         {
           title: "会计",
           dataIndex: "accountantName",
           key: "accountantName",
+          width: "8%",
         },
         {
           title: "状态",
@@ -119,6 +120,50 @@ class Source extends Component {
           dataIndex: "createTimes",
           key: "createTimes",
         },
+        {
+          title: "操作",
+          dataIndex: "opt",
+          key: "opt",
+          render: (text, record) =>
+            <div>
+              <Button
+                type="primary"
+                style={{ marginRight: "10px" }}
+                onClick={() => {
+                  this.setState({
+                    visible: "edit",
+                    id: record.id
+                  })
+                }}
+              >
+                编辑
+              </Button>
+              <Button
+                type="danger"
+                style={{ marginRight: "10px" }}
+                onClick={() => {
+                  let _this = this
+                  confirm({
+                    title: '提醒',
+                    content: '确定要删除吗?',
+                    onOk() {
+                      _this.delete(record.id)
+                    }
+                  })
+                }}
+              >
+                删除
+              </Button>
+              <Button
+                type="primary"
+                onClick={() => {
+                  this.editStatus(record.id, record.status == 0 ? 1 : 0)
+                }}
+              >
+                {record.status == 0 ? "停用" : "启用"}
+              </Button>
+            </div>
+        },
       ],
     };
     this.supervisor = this.supervisor.bind(this);
@@ -129,6 +174,40 @@ class Source extends Component {
     this.handleCancel = this.handleCancel.bind(this);
   }
 
+  // 修改状态
+  editStatus(id, num) {
+    this.setState({
+      loading: true
+    })
+    let data = {
+      id,
+      status: num
+    }
+    $.ajax({
+      method: "POST",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/amb/update",
+      data,
+      success: function (data) {
+        if (data.error.length === 0) {
+          message.success("操作成功!");
+          this.loadData();
+        } else {
+          message.warning(data.error[0].message);
+        }
+        this.setState({
+          loading: false,
+        });
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  }
   // 根据id获取子集
   getSubset(id, list, key = "id", valus = "list") {
     let newList = [];
@@ -178,10 +257,11 @@ class Source extends Component {
     let nodeDta = [];
     treeData.map(item => {
       let treeObj = {};
+      treeObj.key = item.id
       treeObj.id = item.id
-      treeObj.label = item.name
       treeObj.value = item.id
-      treeObj.key = item.id
+      treeObj.label = item.name
+      treeObj.title = item.name
       treeObj.lvl = item.lvl
       treeObj.parentId = item.parentId
       item.list ? treeObj.children = this.handleTreeData(item.list) : null;
@@ -209,6 +289,7 @@ class Source extends Component {
       {
         auto: "",
         searchValues: JSON.parse(JSON.stringify({})),
+        lvl: 5,
         selectedRowKeys: [],
         selectedRows: [],
       },
@@ -226,14 +307,14 @@ class Source extends Component {
   }
   // 列表接口
   loadData(pageNo) {
-    const { searchValues, pagination } = this.state;
+    const { searchValues, pagination, lvl } = this.state;
     this.setState({
       loading: true,
     });
     let datas = Object.assign(searchValues, {
       pageNo: pageNo || 1,
       pageSize: pagination.pageSize,
-      lvl: 6,
+      lvl,
     });
     $.ajax({
       method: "get",
@@ -350,8 +431,7 @@ class Source extends Component {
     this.setState({ selectedRowKeys, selectedRows });
   }
   // 删除巴
-  delete() {
-    const { selectedRows } = this.state
+  delete(id) {
     this.setState({
       loading: true,
     })
@@ -360,9 +440,7 @@ class Source extends Component {
       dataType: "json",
       crossDomain: false,
       url: globalConfig.context + "/api/admin/amb/delete",
-      data: {
-        id: selectedRows[0].id
-      },
+      data: { id },
       success: function (data) {
         if (data.error.length) {
           if (data.error && data.error.length) {
@@ -390,7 +468,7 @@ class Source extends Component {
   handleCancel() {
     this.setState({
       visible: "",
-      info: {},
+      id: "",
     }, () => {
       this.getList();
       this.loadData();
@@ -420,7 +498,7 @@ class Source extends Component {
       <div className="user-content">
         <ShowModalDiv ShowModal={this.state.showModal} />
         <div className="content-title" style={{ marginBottom: 10 }}>
-          <span style={{ fontWeight: 900, fontSize: 16, }}>巴列表数据</span>
+          <span style={{ fontWeight: 900, fontSize: 16, }}>阿米巴管理</span>
         </div>
         <Tabs defaultActiveKey="1" onChange={() => { }}>
           <TabPane tab="搜索" key="1">
@@ -445,7 +523,7 @@ class Source extends Component {
                     className="certain-category-search"
                     dropdownClassName="certain-category-search-dropdown"
                     dropdownMatchSelectWidth={false}
-                    style={{ width: "120px" }}
+                    style={{ width: 150 }}
                     dataSource={options}
                     placeholder='输入巴主名称'
                     value={this.state.auto}
@@ -458,6 +536,22 @@ class Source extends Component {
                   </AutoComplete>
                 </FormItem>
                 <FormItem>
+                  <Select
+                    placeholder="层级"
+                    style={{ width: 150 }}
+                    value={this.state.lvl}
+                    onChange={(e) => {
+                      this.setState({ lvl: e })
+                    }}
+                  >
+                    <Select.Option value={1}>管理中心</Select.Option>
+                    <Select.Option value={2}>各大区管理中心&集团经开综</Select.Option>
+                    <Select.Option value={3}>各事业部&区经管开综</Select.Option>
+                    <Select.Option value={4}>各战区&区事业部</Select.Option>
+                    <Select.Option value={5}>各巴主&小巴主</Select.Option>
+                  </Select>
+                </FormItem>
+                <FormItem>
                   <TreeSelect
                     style={{ width: 300 }}
                     value={searchValues["ancestors"]
@@ -466,6 +560,8 @@ class Source extends Component {
                     dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
                     treeData={level1Data}
                     placeholder="请选择"
+                    showSearch
+                    treeNodeFilterProp="title"
                     onChange={(e) => {
                       searchValues["ancestors"] = e;
                       this.setState({
@@ -487,51 +583,22 @@ class Source extends Component {
                 >
                   重置
                 </Button>
+                <Button
+                  type="primary"
+                  onClick={() => { this.setState({ visible: "add" }) }}
+                  style={{ float: "right" }}
+                >
+                  新增阿米巴架构
+                </Button>
               </Form>
             </div>
           </TabPane>
-          <TabPane tab="操作" key="2">
+          {/* <TabPane tab="操作" key="2">
             <div style={{ marginLeft: 10 }}>
-              <Button
-                type="primary"
-                onClick={() => { this.setState({ visible: "add" }) }}
-                style={{ margin: "0 10px 10px 0" }}
-              >
-                新增阿米巴架构
-              </Button>
-              <Button
-                type="primary"
-                disabled={selectedRowKeys.length == 0}
-                style={{ marginRight: "10px" }}
-                onClick={() => {
-                  this.setState({
-                    visible: "edit",
-                    info: selectedRows[0]
-                  })
-                }}
-              >
-                编辑
-              </Button>
-              <Button
-                type="danger"
-                disabled={selectedRowKeys.length == 0}
-                style={{ marginRight: "10px" }}
-                onClick={() => {
-                  let _this = this
-                  confirm({
-                    title: '提醒',
-                    content: '确定要删除吗?',
-                    onOk() {
-                      _this.delete()
-                    }
-                  })
-                }}
-              >
-                删除
-              </Button>
+
             </div>
-          </TabPane>
-          <TabPane tab="更改表格显示数据" key="3">
+          </TabPane> */}
+          <TabPane tab="更改表格显示数据" key="2">
             <div style={{ marginLeft: 10 }}>
               <ChooseList
                 columns={columns}
@@ -555,13 +622,13 @@ class Source extends Component {
           </Spin>
         </div>
         {
-          // 新建编辑巴
+          // 新建/编辑巴
           this.state.visible != "" &&
           <Operation
             visible={this.state.visible}
             handleCancel={this.handleCancel}
             levelData={this.state.level1Data}
-            info={this.state.info}
+            id={this.state.id}
             lev={5}
           />
         }

+ 12 - 0
js/component/manageCenter/set/amoeba/index.less

@@ -1,4 +1,16 @@
 .user-content>.ant-tabs.ant-tabs-top.ant-tabs-line {
   background-color: #F5F5F5;
   margin-bottom: 10px;
+}
+
+.ant-select-search__field__mirror{
+  display: none;
+}
+
+:root .ant-select-tree li span.ant-select-tree-switcher.ant-select-tree-switcher_open:after{
+  font-size: 24px;
+}
+
+:root .ant-select-tree li span.ant-select-tree-switcher.ant-select-tree-switcher_close:after{
+  font-size: 24px;
 }

+ 21 - 15
js/component/manageCenter/set/amoeba/operation.jsx

@@ -1,6 +1,7 @@
-import React, { Component } from "react";
+import React from "react";
 import { Modal, Spin, TreeSelect, Form, Button, Input, Select, message, AutoComplete } from "antd";
 import $ from "jquery/src/ajax";
+import './index.less'
 import { newTreeData } from "@/tools";
 
 const Operation = React.createClass({
@@ -12,8 +13,8 @@ const Operation = React.createClass({
   },
 
   componentDidMount() {
-    const { levelData, lev, info } = this.props
-    !!info.id && this.getDetails(info.id)
+    const { levelData, lev, id } = this.props
+    !!id && this.getDetails(id)
     this.setState({
       levelData: newTreeData(levelData, lev),
     })
@@ -99,11 +100,12 @@ const Operation = React.createClass({
   },
   // 巴主输入触发
   httpChange1(e) {
-    if (e.length >= 1) {
-      this.supervisor(e, "bz");
+    let str = e.trim()
+    if (str.length >= 1) {
+      this.supervisor(str, "bz");
     }
     this.setState({
-      auto1: e,
+      auto1: str,
     });
   },
   // 巴主选中
@@ -139,11 +141,12 @@ const Operation = React.createClass({
   },
   // 财务输入触发
   httpChange2(e) {
-    if (e.length >= 1) {
-      this.supervisor(e, "cw");
+    let str = e.trim()
+    if (str.length >= 1) {
+      this.supervisor(str, "cw");
     }
     this.setState({
-      auto2: e,
+      auto2: str,
     });
   },
   // 财务选中
@@ -179,11 +182,12 @@ const Operation = React.createClass({
   },
   // 财务输入触发
   httpChange3(e) {
-    if (e.length >= 1) {
-      this.supervisor(e, "kj");
+    let str = e.trim()
+    if (str.length >= 1) {
+      this.supervisor(str, "kj");
     }
     this.setState({
-      auto3: e,
+      auto3: str,
     });
   },
   // 会计选中
@@ -301,7 +305,7 @@ const Operation = React.createClass({
       confirmLoading: true
     })
     let data = {
-      id: this.props.info.id,
+      id: this.props.id,
       parentId: this.state.parentId,
       name: this.state.name,
       leader: this.state.leader,
@@ -390,6 +394,8 @@ const Operation = React.createClass({
                     dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
                     treeData={levelData}
                     placeholder="请选择上级部门"
+                    showSearch
+                    treeNodeFilterProp="title"
                     onChange={(e) => {
                       this.setState({
                         parentId: e,
@@ -491,7 +497,7 @@ const Operation = React.createClass({
                 >
                   <Input
                     type="textarea"
-                    placeholder=""
+                    placeholder="备注说明"
                     style={{ width: "250px" }}
                     autosize={{ minRows: 3 }}
                     value={this.state.remarks}
@@ -504,7 +510,7 @@ const Operation = React.createClass({
               <FormItem wrapperCol={{ span: 12, offset: 8 }}>
                 <Button
                   type="primary"
-                  onClick={!!this.props.info.id ? this.editSubmit : this.addSubmit}
+                  onClick={!!this.props.id ? this.editSubmit : this.addSubmit}
                   style={{ marginRight: "50px" }}
                 >
                   保存

+ 377 - 374
js/component/manageCenter/set/userManagementS/newUser.jsx

@@ -1,9 +1,9 @@
 import React from 'react';
-import { Icon,  Modal, message,  AutoComplete,Spin, Input, Select, Button, Form,Popconfirm} from 'antd';
+import { Icon, Modal, message, AutoComplete, Spin, Input, Select, Button, Form, Popconfirm } from 'antd';
 import $ from 'jquery/src/ajax';
 import './userMangagement.less';
-import {cityArr,station,post} from '../../../dataDic.js';
-import {splitUrl} from '../../../tools.js';
+import { cityArr, station, post } from '../../../dataDic.js';
+import { splitUrl } from '../../../tools.js';
 import moment from 'moment';
 import ImgList from "../../../common/imgList";
 
@@ -16,9 +16,9 @@ const PicturesWall = React.createClass({
             previewVisible: false,
             previewImage: '',
             fileList: [],
-            role:[],
-            district:[],
-            cityOption:[],
+            role: [],
+            district: [],
+            cityOption: [],
         }
     },
     handleCancel() {
@@ -47,16 +47,16 @@ const PicturesWall = React.createClass({
             </div>
         );
         return (
-            <div style={{display:"inline-block"}}>
+            <div style={{ display: "inline-block" }}>
                 <ImgList
                     domId={this.props.domId}
                     uploadConfig={{
-                        action:globalConfig.context + "/api/admin/superviser/uploadAdminImg",
-                        data:{ 'sign': this.props.pictureSign },
-                        multiple:true,
-                        listType:"picture-card",
+                        action: globalConfig.context + "/api/admin/superviser/uploadAdminImg",
+                        data: { 'sign': this.props.pictureSign },
+                        multiple: true,
+                        listType: "picture-card",
                     }}
-                    onChange={(infor)=>{
+                    onChange={(infor) => {
                         this.handleChange(infor)
                     }}
                     fileList={fileList}
@@ -69,62 +69,62 @@ const PicturesWall = React.createClass({
 const Newuser = Form.create()(React.createClass({
     getInitialState() {
         return {
-        	orgCodeUrl:[],
+            orgCodeUrl: [],
             loading: false,
             loaduser: {},
-            datauser:[],
-            role:[]
+            datauser: [],
+            role: []
         };
     },
-    getDefaultProps(){
-    	return{
-    		userDetaile:false
-    	}
+    getDefaultProps() {
+        return {
+            userDetaile: false
+        }
     },
     handleSubmit(e) {
         e.preventDefault();
-        if(!this.state.role || this.state.role.length === 0){
-        	message.warning('请选择角色');
-        	return false;
-        };
-        if(!this.state.status&&this.props.userDetaile){
-        	message.warning('请选择角色状态');
-        	return false;
+        if (!this.state.role || this.state.role.length === 0) {
+            message.warning('请选择角色');
+            return false;
         };
-        if(window.adminData.isSuperAdmin){
-        	if(!this.state.departmentId){
-	        	message.warning('请选择组织部门');
-	        	return false;
-        	};
+        // if (!this.state.status && this.props.userDetaile) {
+        //     message.warning('请选择角色状态');
+        //     return false;
+        // };
+        if (window.adminData.isSuperAdmin) {
+            if (!this.state.departmentId) {
+                message.warning('请选择组织部门');
+                return false;
+            };
         }
-        if(!this.state.theTypes&&!this.state.superiorId){
-        	message.warning('请输入正确的上级主管');
-        	return false;
+        if (!this.state.theTypes && !this.state.superiorId) {
+            message.warning('请输入正确的上级主管');
+            return false;
         };
-        if(!this.state.reviewer){
+        if (!this.state.reviewer) {
             message.warning('请输入正确的公出审核人');
             return false;
         }
-        if(this.state.contactMobile){
-        	if(!(/^1[1-9][0-9]\d{4,8}$/.test(this.state.contactMobile))){
-			  message.warning("不是完整的11位手机号或者正确的手机号前七位");
-			  this.setState({
+        if (this.state.contactMobile) {
+            if (!(/^1[1-9][0-9]\d{4,8}$/.test(this.state.contactMobile))) {
+                message.warning("不是完整的11位手机号或者正确的手机号前七位");
+                this.setState({
                     loading: false
                 });
-			  return false;
-			}
+                return false;
+            }
         }
         let theorgCodeUrl = [];
         if (this.state.orgCodeUrl.length) {
             let picArr = [];
             this.state.orgCodeUrl.map(function (item) {
-				if ( item.response && item.response.data && item.response.data.length ){
-					picArr.push(item.response.data);
-				}
+                if (item.response && item.response.data && item.response.data.length) {
+                    picArr.push(item.response.data);
+                }
             });
             theorgCodeUrl = picArr.join(",");
         };
-        let api = this.props.userDetaile?"/api/admin/superviser/updateAdmin":'/api/admin/superviser/insertAdmin'
+        let api = this.props.userDetaile ? "/api/admin/superviser/updateAdmin" : '/api/admin/superviser/insertAdmin'
         this.setState({
             loading: true
         });
@@ -134,23 +134,23 @@ const Newuser = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + api,
             data: {
-            	roles:this.state.role,
-            	data:JSON.stringify({
-            		id:this.state.id?this.state.id:this.props.addId,
-	                mobile:this.state.mobile,
-					status:this.state.status,
-					contactMobile:this.state.contactMobile,
-					name:this.state.name,
-					departmentId:window.adminData.isSuperAdmin?this.state.departmentId:window.adminData.departmentId,
-					duty:this.state.duty,
-					position:this.state.position,//岗位
-					email:this.state.email,
-					superiorId:this.state.theTypes?this.state.theTypes:this.state.superiorId,
-                    reviewer:this.state.reviewer,
-					district:this.state.district,
-					headPortraitUrl:theorgCodeUrl.length?theorgCodeUrl:'',
-					entryTime:this.state.selTime
-            	})
+                roles: this.state.role,
+                data: JSON.stringify({
+                    id: this.state.id ? this.state.id : this.props.addId,
+                    mobile: this.state.mobile,
+                    status: this.state.status,
+                    contactMobile: this.state.contactMobile,
+                    name: this.state.name,
+                    departmentId: window.adminData.isSuperAdmin ? this.state.departmentId : window.adminData.departmentId,
+                    duty: this.state.duty,
+                    position: this.state.position,//岗位
+                    email: this.state.email,
+                    superiorId: this.state.theTypes ? this.state.theTypes : this.state.superiorId,
+                    reviewer: this.state.reviewer,
+                    district: this.state.district,
+                    headPortraitUrl: theorgCodeUrl.length ? theorgCodeUrl : '',
+                    entryTime: this.state.selTime
+                })
             }
         }).done(function (data) {
             this.setState({
@@ -165,17 +165,17 @@ const Newuser = Form.create()(React.createClass({
         }.bind(this));
     },
     //主管初始加载(自动补全)
-	supervisor(e){
-		$.ajax({
+    supervisor(e) {
+        $.ajax({
             method: "post",
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + "/api/admin/organization/selectName",
-            data:{
-            	name:e
+            data: {
+                name: e
             },
             success: function (data) {
-                let thedata=data.data;
+                let thedata = data.data;
                 if (!thedata) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
@@ -183,19 +183,19 @@ const Newuser = Form.create()(React.createClass({
                     thedata = {};
                 };
                 this.setState({
-                    customerArr:thedata,
+                    customerArr: thedata,
                 });
-			}.bind(this),
-		}).always(function () {
+            }.bind(this),
+        }).always(function () {
             this.setState({
                 loading: false
             });
         }.bind(this));
-	},
-	//上级主管输入框失去焦点是判断客户是否存在
-	selectAuto(value){
-        let theType='';
-        let contactLists=this.state.customerArr||[];
+    },
+    //上级主管输入框失去焦点是判断客户是否存在
+    selectAuto(value) {
+        let theType = '';
+        let contactLists = this.state.customerArr || [];
         if (value) {
             contactLists.map(function (item) {
                 if (item.name === value.toString()) {
@@ -204,76 +204,76 @@ const Newuser = Form.create()(React.createClass({
             });
         }
         this.setState({
-            theTypes:theType,
-            superior:value
+            theTypes: theType,
+            superior: value
         })
-        if(!this.state.reviewerName || !this.state.reviewer){
+        if (!this.state.reviewerName || !this.state.reviewer) {
             this.setState({
-                reviewerName:value,
-                reviewer:theType
+                reviewerName: value,
+                reviewer: theType
             })
         }
-	},
-	//值改变时请求客户名称
-	httpChange(e){
-		if(e.length>=1){
-			this.supervisor(e);
-		}
-		this.setState({
-			superior:e
-		})
-	},
-	//查看基本详情基本信息
-    loaduser(record){
-    	if(record){
-    	$.ajax({
-            method: "post",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + '/api/admin/superviser/selectAllByid',
-            data: {
-              id: record.id
-            },
-            success: function (data) {
-                let thisdata = data.data;
-                if (!thisdata) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
+    },
+    //值改变时请求客户名称
+    httpChange(e) {
+        if (e.length >= 1) {
+            this.supervisor(e);
+        }
+        this.setState({
+            superior: e
+        })
+    },
+    //查看基本详情基本信息
+    loaduser(record) {
+        if (record) {
+            $.ajax({
+                method: "post",
+                dataType: "json",
+                crossDomain: false,
+                url: globalConfig.context + '/api/admin/superviser/selectAllByid',
+                data: {
+                    id: record.id
+                },
+                success: function (data) {
+                    let thisdata = data.data;
+                    if (!thisdata) {
+                        if (data.error && data.error.length) {
+                            message.warning(data.error[0].message);
+                        };
+                        thisdata = {};
                     };
-                    thisdata = {};
-                };
-                this.setState({
-                    id: thisdata.id,
-                    mobile: thisdata.mobile,
-                    name: thisdata.name,
-                    email: thisdata.email,
-                    createTime: thisdata.createTime,
-                    district:thisdata.district!=' '?JSON.parse(thisdata.district):undefined,
-                    position: thisdata.position?thisdata.position:undefined,
-                    superior:thisdata.superior,
-                    superiorId: thisdata.superiorId,//上级Id
+                    this.setState({
+                        id: thisdata.id,
+                        mobile: thisdata.mobile,
+                        name: thisdata.name,
+                        email: thisdata.email,
+                        createTime: thisdata.createTime,
+                        district: thisdata.district != ' ' ? JSON.parse(thisdata.district) : undefined,
+                        position: thisdata.position ? thisdata.position : undefined,
+                        superior: thisdata.superior,
+                        superiorId: thisdata.superiorId,//上级Id
 
-                    reviewerName:thisdata.reviewerName,
-                    reviewer:thisdata.reviewer,
+                        reviewerName: thisdata.reviewerName,
+                        reviewer: thisdata.reviewer,
 
-                    theTypes:'',
-                    duty:thisdata.duty?thisdata.duty:undefined,//职务
-                    status:thisdata.status?thisdata.status:undefined,
-                    contactMobile:thisdata.contactMobile?thisdata.contactMobile:undefined,//手机号
-                    departmentId:thisdata.departmentId?thisdata.departmentId:undefined,//部门id
-                    userNo:thisdata.userNo,
-                	orgCodeUrl: thisdata.headPortraitUrl? splitUrl(thisdata.headPortraitUrl, ',', globalConfig.avatarHost + '/upload') : [],
-                	role:this.props.role,
-	                entryTime:thisdata.entryTime?moment(thisdata.entryTime,'YYYY-MM-DD'):undefined,
-	                selTime:thisdata.entryTime
+                        theTypes: '',
+                        duty: thisdata.duty ? thisdata.duty : undefined,//职务
+                        status: Number(thisdata.status),
+                        contactMobile: thisdata.contactMobile ? thisdata.contactMobile : undefined,//手机号
+                        departmentId: thisdata.departmentId ? thisdata.departmentId : undefined,//部门id
+                        userNo: thisdata.userNo,
+                        orgCodeUrl: thisdata.headPortraitUrl ? splitUrl(thisdata.headPortraitUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                        role: this.props.role,
+                        entryTime: thisdata.entryTime ? moment(thisdata.entryTime, 'YYYY-MM-DD') : undefined,
+                        selTime: thisdata.entryTime
+                    });
+                }.bind(this),
+            }).always(function () {
+                this.setState({
+                    loading: false
                 });
-            }.bind(this),
-       }).always(function () {
-            this.setState({
-                loading: false
-            });
-        }.bind(this));
-       }
+            }.bind(this));
+        }
     },
 
     //重置密码
@@ -307,132 +307,135 @@ const Newuser = Form.create()(React.createClass({
         this.props.closeDesc(false);
     },
     //入职时间选择
-    selTime(e,index){
-    	this.setState({
-    		entryTime:e,
-    		selTime:index
-    	})
+    selTime(e, index) {
+        this.setState({
+            entryTime: e,
+            selTime: index
+        })
     },
     getOrgCodeUrl(e) {
         this.setState({ orgCodeUrl: e });
     },
-    componentWillMount(e){
-    	const cityArrs=[];
+    componentWillMount(e) {
+        const cityArrs = [];
         cityArr.map(function (item) {
             cityArrs.push(
                 <Select.Option key={item.value}>{item.key}</Select.Option>
             )
         });
-        this.state.cityOption=cityArrs;
+        this.state.cityOption = cityArrs;
     },
     componentDidMount() {
-		if(this.props.datauser.id){
-			this.loaduser(this.props.datauser)
-			this.setState({
-				rolek:this.props.role
-			})
-   		}
-      },
+        if (this.props.datauser.id) {
+            this.loaduser(this.props.datauser)
+            this.setState({
+                rolek: this.props.role
+            })
+        }
+    },
     render() {
         const FormItem = Form.Item
         const formItemLayout = {
             labelCol: { span: 8 },
             wrapperCol: { span: 14 },
         };
-        const dataSources=this.state.customerArr || [];
-        const options = dataSources.map((group,index) =>
-				      <Select.Option key={index} value={group.name}>{group.name}</Select.Option>
-				     )
-        const departmentArr=this.props.departmentArr || [];
-        const roleArrS=this.props.roleArr || [];
-        const rolst=this.state.rolek || [];
+        const dataSources = this.state.customerArr || [];
+        const options = dataSources.map((group, index) =>
+            <Select.Option key={index} value={group.name}>{group.name}</Select.Option>
+        )
+        const departmentArr = this.props.departmentArr || [];
+        const roleArrS = this.props.roleArr || [];
+        const rolst = this.state.rolek || [];
         return (
-        <div>
-           <Modal maskClosable={false} visible={this.props.showDesc}
-                        onOk={this.handleOk} onCancel={this.handleCancel}
-                        width='800px'
-                        title={this.props.userDetaile?'用户详情':'新建用户'}
-                        footer=''
-                        className="admin-desc-content">
-			            <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form">
-			                <Spin spinning={this.state.loading}>
-			                        <div className="clearfix">
-			                            <div className="clearfix">
-					                    	<FormItem className="half-item"
-						                            {...formItemLayout}
-						                            label="用户名" >
-					                                    <Input placeholder="输入登录用户名" value={this.state.mobile}
-					                                    onChange={(e)=>{this.setState({mobile:e.target.value})}} required="required" style={{width:'200px'}}/>
-					                                <span className="mandatory">*</span>
-						                    </FormItem>
-						                    {this.props.userDetaile?
-						                    	<Popconfirm
-			                                        title={"用户 [ " + this.props.datauser.name + " ] 的密码将会重置为123456,确认操作?"}
-			                                        onConfirm={this.resetPwd}
-			                                        okText="确认"
-			                                        cancelText="取消"
-			                                        placement="topLeft">
-			                                        <Button>重置密码</Button>
-			                                    </Popconfirm>:''}
-					                    </div>
-					                     <FormItem className="half-item"
-						                        {...formItemLayout}
-					                           label="用户角色"
-					                         >
-                                             {roleArrS.length > 0 ?
-                                                 <Select
-                                                     mode="multiple"
-                                                     optionFilterProp={'title'}
-                                                     tokenSeparators={[',']}
-                                                     placeholder="选择用户角色"
-                                                     value={this.state.role}
-                                                     style={{width:'200px'}}
-                                                     onChange={(e)=>{
-                                                         this.setState({
-                                                             role:e
-                                                         })
-                                                     }}>
-                                                     {
-                                                         roleArrS.map(function (item,_) {
-                                                             return <Select.Option title={item.roleName} value={item.id}>{item.roleName}</Select.Option>
-                                                         })
-                                                     }
-                                                 </Select> : null
-                                             }
-					                                <span className="mandatory">*</span>
-			                   		    </FormItem>
+            <div>
+                <Modal maskClosable={false} visible={this.props.showDesc}
+                    onOk={this.handleOk} onCancel={this.handleCancel}
+                    width='800px'
+                    title={this.props.userDetaile ? '用户详情' : '新建用户'}
+                    footer=''
+                    className="admin-desc-content">
+                    <Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form">
+                        <Spin spinning={this.state.loading}>
+                            <div className="clearfix">
+                                <div className="clearfix">
+                                    <FormItem className="half-item"
+                                        {...formItemLayout}
+                                        label="用户名" >
+                                        <Input placeholder="输入登录用户名" value={this.state.mobile}
+                                            onChange={(e) => { this.setState({ mobile: e.target.value }) }} required="required" style={{ width: '200px' }} />
+                                        <span className="mandatory">*</span>
+                                    </FormItem>
+                                    {this.props.userDetaile ?
+                                        <Popconfirm
+                                            title={"用户 [ " + this.props.datauser.name + " ] 的密码将会重置为123456,确认操作?"}
+                                            onConfirm={this.resetPwd}
+                                            okText="确认"
+                                            cancelText="取消"
+                                            placement="topLeft">
+                                            <Button>重置密码</Button>
+                                        </Popconfirm> : ''}
+                                </div>
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="用户角色"
+                                >
+                                    {roleArrS.length > 0 ?
+                                        <Select
+                                            mode="multiple"
+                                            optionFilterProp={'title'}
+                                            tokenSeparators={[',']}
+                                            placeholder="选择用户角色"
+                                            value={this.state.role}
+                                            style={{ width: '200px' }}
+                                            onChange={(e) => {
+                                                this.setState({
+                                                    role: e
+                                                })
+                                            }}>
+                                            {
+                                                roleArrS.map(function (item, _) {
+                                                    return <Select.Option title={item.roleName} value={item.id}>{item.roleName}</Select.Option>
+                                                })
+                                            }
+                                        </Select> : null
+                                    }
+                                    <span className="mandatory">*</span>
+                                </FormItem>
 
-			                   		    <FormItem className="half-item"
-						                        {...formItemLayout}
-					                           label=""
-					                         >
-					                         <span style={{display:rolst.length>1?'block':'none',color:'red'}}>存在多个角色</span>
-					                    </FormItem>
-			                   		    {this.props.userDetaile?<FormItem className="half-item"
-						                            {...formItemLayout}
-						                            label="用户状态" >
-					                                    <Select placeholder="用户状态" value={this.state.status} style={{width:'200px'}}
-												          onChange={(e)=>{this.setState({status:e})}} >
-					                                      	 <Select.Option value="正常" >正常</Select.Option>
-	                           								 <Select.Option value="注销" >注销</Select.Option>
-	                           								 <Select.Option value="锁定" >锁定</Select.Option>
-					                                   </Select>
-					                                   <span className="mandatory">*</span>
-						                </FormItem>:''}
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="用户姓名" >
-				                                    <Input placeholder="请输入用户姓名" style={{width:'200px'}} value={this.state.name}
-					                                    onChange={(e)=>{this.setState({name:e.target.value})}} required="required"/>
-				                                    <span className="mandatory">*</span>
-					                    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="联系方式" >
-				                                    <Input placeholder="请输入手机号" style={{width:'200px'}} value={this.state.contactMobile}
-					                                    onChange={(e)=>{this.setState({contactMobile:e.target.value})}} />
-					                    </FormItem>
-					                    {/*<FormItem className="half-item"
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label=""
+                                >
+                                    <span style={{ display: rolst.length > 1 ? 'block' : 'none', color: 'red' }}>存在多个角色</span>
+                                </FormItem>
+                                {this.props.userDetaile ? <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="用户状态" >
+                                    <Select
+                                        placeholder="用户状态"
+                                        value={this.state.status}
+                                        style={{ width: '200px' }}
+                                        onChange={(e) => { this.setState({ status: e }) }}
+                                    >
+                                        <Select.Option value={0} >正常</Select.Option>
+                                        <Select.Option value={1} >锁定</Select.Option>
+                                    </Select>
+                                    <span className="mandatory">*</span>
+                                </FormItem> : ''}
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="用户姓名" >
+                                    <Input placeholder="请输入用户姓名" style={{ width: '200px' }} value={this.state.name}
+                                        onChange={(e) => { this.setState({ name: e.target.value }) }} required="required" />
+                                    <span className="mandatory">*</span>
+                                </FormItem>
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="联系方式" >
+                                    <Input placeholder="请输入手机号" style={{ width: '200px' }} value={this.state.contactMobile}
+                                        onChange={(e) => { this.setState({ contactMobile: e.target.value }) }} />
+                                </FormItem>
+                                {/*<FormItem className="half-item"
 				                            {...formItemLayout}
 				                            label="入职时间" >
 				                            <DatePicker
@@ -444,138 +447,138 @@ const Newuser = Form.create()(React.createClass({
 										      onChange={(e,time)=>{this.selTime(e,time)}}
 										    />
 			                    		</FormItem>*/}
-					                    {window.adminData.isSuperAdmin?<FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="组织部门" >
-				                                    <Select placeholder="选择组织部门"
-							                            style={{ width: 200 }}
-							                            value={this.state.departmentId}
-							                            onChange={(e) => { this.setState({ departmentId: e }) }}>
-							                            {
-							                                departmentArr.map(function (item) {
-							                                        return <Select.Option key={item.id} >{item.name}</Select.Option>
-							                                })
-							                            }
-							                        </Select>
-				                                    <span className="mandatory">*</span>
-					                    </FormItem>:''}
-					                    <FormItem className="half-item"
-					                          {...formItemLayout}
-					                           label="职务"
-					                         >
-												  <Select placeholder="选择职务" style={{width:'200px'}} value={this.state.duty} onChange={(e)=>{this.setState({duty:e})}}>
-					                                {
-					                                    post.map(function (item) {
-					                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
-					                                    })
-					                                }
-					                              </Select>
-			                   		    </FormItem>
-			                   		    <FormItem className="half-item"
-					                          {...formItemLayout}
-					                           label="岗位"
-					                         >
-												  <Select placeholder="选择岗位" style={{width:'200px'}} value={this.state.position} onChange={(e)=>{this.setState({position:e})}}>
-					                                {
-					                                    station.map(function (item) {
-					                                        return <Select.Option key={item.value} >{item.key}</Select.Option>
-					                                    })
-					                                }
-					                              </Select>
-			                   		    </FormItem>
-					                    <FormItem className="half-item"
-					                            {...formItemLayout}
-					                            label="电子邮箱" >
-				                                    <Input placeholder="请输入邮箱" style={{width:'200px'}} value={this.state.email}
-					                                    onChange={(e)=>{this.setState({email:e.target.value})}} />
-					                    </FormItem>
-					                    <FormItem className="half-item"
-				                            {...formItemLayout}
-				                             label="上级主管"
-				                             >
-						                    <AutoComplete
-											        className="certain-category-search"
-											        dropdownClassName="certain-category-search-dropdown"
-											        dropdownMatchSelectWidth={false}
-											        size="large"
-											        style={{ width: '200px' }}
-											        dataSource={options}
-											        placeholder="输入名称"
-											        value={this.state.superior}
-											        onChange={this.httpChange}
-											        filterOption={true}
-											        onSelect={this.selectAuto}
-											      >
-											        <Input/>
-											      </AutoComplete>
-											      <span className="mandatory">*</span>
-							            </FormItem>
-                                        <FormItem className="half-item"
-                                                  {...formItemLayout}
-                                                  label="公出审核"
+                                {window.adminData.isSuperAdmin ? <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="组织部门" >
+                                    <Select placeholder="选择组织部门"
+                                        style={{ width: 200 }}
+                                        value={this.state.departmentId}
+                                        onChange={(e) => { this.setState({ departmentId: e }) }}>
+                                        {
+                                            departmentArr.map(function (item) {
+                                                return <Select.Option key={item.id} >{item.name}</Select.Option>
+                                            })
+                                        }
+                                    </Select>
+                                    <span className="mandatory">*</span>
+                                </FormItem> : ''}
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="职务"
+                                >
+                                    <Select placeholder="选择职务" style={{ width: '200px' }} value={this.state.duty} onChange={(e) => { this.setState({ duty: e }) }}>
+                                        {
+                                            post.map(function (item) {
+                                                return <Select.Option key={item.value} >{item.key}</Select.Option>
+                                            })
+                                        }
+                                    </Select>
+                                </FormItem>
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="岗位"
+                                >
+                                    <Select placeholder="选择岗位" style={{ width: '200px' }} value={this.state.position} onChange={(e) => { this.setState({ position: e }) }}>
+                                        {
+                                            station.map(function (item) {
+                                                return <Select.Option key={item.value} >{item.key}</Select.Option>
+                                            })
+                                        }
+                                    </Select>
+                                </FormItem>
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="电子邮箱" >
+                                    <Input placeholder="请输入邮箱" style={{ width: '200px' }} value={this.state.email}
+                                        onChange={(e) => { this.setState({ email: e.target.value }) }} />
+                                </FormItem>
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="上级主管"
+                                >
+                                    <AutoComplete
+                                        className="certain-category-search"
+                                        dropdownClassName="certain-category-search-dropdown"
+                                        dropdownMatchSelectWidth={false}
+                                        size="large"
+                                        style={{ width: '200px' }}
+                                        dataSource={options}
+                                        placeholder="输入名称"
+                                        value={this.state.superior}
+                                        onChange={this.httpChange}
+                                        filterOption={true}
+                                        onSelect={this.selectAuto}
+                                    >
+                                        <Input />
+                                    </AutoComplete>
+                                    <span className="mandatory">*</span>
+                                </FormItem>
+                                <FormItem className="half-item"
+                                    {...formItemLayout}
+                                    label="公出审核"
+                                >
+                                    <StaffSearch
+                                        valueName={this.state.reviewerName}
+                                        placeholder="输入名称"
+                                        onBlurChange={(obj) => {
+                                            this.setState({
+                                                reviewer: obj.value
+                                            })
+                                        }}
+                                    />
+                                    <span className="mandatory">*</span>
+                                </FormItem>
+                                {this.props.userDetaile ?
+                                    <FormItem className="half-item"
+                                        {...formItemLayout}
+                                        label="用户编号" >
+                                        <span>{this.state.userNo}</span>
+                                    </FormItem>
+                                    : ''}
+                                <div className='clearfix'>
+                                    <FormItem className="half-item"
+                                        {...formItemLayout}
+                                        label="地区" >
+                                        <Select
+                                            multiple
+                                            style={{ width: '500px' }}
+                                            placeholder="选择地区"
+                                            filterOption={(input, option) => { return option.props.children.indexOf(input) >= 0 }}
+                                            value={this.state.district}
+                                            onChange={(pids) => {
+                                                this.state.district = pids;
+                                                this.setState({
+                                                    district: this.state.district
+                                                })
+                                            }}
                                         >
-                                            <StaffSearch
-                                                valueName={this.state.reviewerName}
-                                                placeholder="输入名称"
-                                                onBlurChange={(obj)=>{
-                                                    this.setState({
-                                                        reviewer:obj.value
-                                                    })
-                                                }}
-                                            />
-                                            <span className="mandatory">*</span>
-                                        </FormItem>
-                                        {this.props.userDetaile?
-                                            <FormItem className="half-item"
-                                                      {...formItemLayout}
-                                                      label="用户编号" >
-                                                <span>{this.state.userNo}</span>
-                                            </FormItem>
-                                            :''}
-							            <div className='clearfix'>
-							            	<FormItem className="half-item"
-						                        {...formItemLayout}
-						                        label="地区" >
-												   <Select
-						                                multiple
-						                                style={{width:'500px'}}
-						                                placeholder="选择地区"
-						                                filterOption={(input, option) => { return option.props.children.indexOf(input) >= 0 }}
-						                                value={this.state.district}
-						                                onChange={(pids) => {
-						                                    this.state.district = pids;
-						                                    this.setState({
-						                                        district: this.state.district
-						                                    })
-						                                }}
-						                            >
-						                               {this.state.cityOption}
-						                            </Select>
-						                    </FormItem>
-							            </div>
+                                            {this.state.cityOption}
+                                        </Select>
+                                    </FormItem>
+                                </div>
 
-							             <div className="clearfix pictures">
-						                        <FormItem
-							                        labelCol={{ span: 4 }}
-							                        wrapperCol={{ span: 18 }}
-							                        label="用户头像" >
-							                        <PicturesWall
-                                                        domId={'newUser1'}
-							                            pictureSign="customer_sys_file"
-							                            fileList={this.getOrgCodeUrl}
-							                            pictureUrl={this.state.orgCodeUrl} />
-							                            <p>图片建议:要清晰。</p>
-						                        </FormItem>
-							                </div>
-				                    </div>
-			                    <FormItem wrapperCol={{ span: 12, offset: 4 }}>
-			                        <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
-			                        <Button className="set-submit" type="ghost" onClick={this.handleCancel}>取消</Button>
-			                    </FormItem>
-			                </Spin>
-			            </Form >
-			        </Modal>
-    	    </div>
+                                <div className="clearfix pictures">
+                                    <FormItem
+                                        labelCol={{ span: 4 }}
+                                        wrapperCol={{ span: 18 }}
+                                        label="用户头像" >
+                                        <PicturesWall
+                                            domId={'newUser1'}
+                                            pictureSign="customer_sys_file"
+                                            fileList={this.getOrgCodeUrl}
+                                            pictureUrl={this.state.orgCodeUrl} />
+                                        <p>图片建议:要清晰。</p>
+                                    </FormItem>
+                                </div>
+                            </div>
+                            <FormItem wrapperCol={{ span: 12, offset: 4 }}>
+                                <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                                <Button className="set-submit" type="ghost" onClick={this.handleCancel}>取消</Button>
+                            </FormItem>
+                        </Spin>
+                    </Form >
+                </Modal>
+            </div>
         )
     }
 }));

+ 8 - 3
js/component/manageCenter/set/userManagementS/user.jsx

@@ -235,6 +235,12 @@ const User = Form.create()(React.createClass({
 				title: '状态',
 				dataIndex: 'status',
 				key: 'status',
+				render: (text) =>
+				<span style={{ color: ["green", "red"][text] }}>
+					{text == 0
+						? "正常" : text == 1
+							? "停用" : "-"}
+				</span>
 			},
 			{
 				title: '最后登录时间',
@@ -842,9 +848,8 @@ const User = Form.create()(React.createClass({
 											this.setState({ statusSeach: e });
 										}}
 									>
-										<Select.Option value="正常">正常</Select.Option>
-										<Select.Option value="锁定">锁定</Select.Option>
-										<Select.Option value="注销">注销</Select.Option>
+										<Select.Option value={0}>正常</Select.Option>
+										<Select.Option value={1}>锁定</Select.Option>
 									</Select>
 									<Input
 										placeholder="登录用户名"

+ 1 - 1
js/component/tools.js

@@ -2189,7 +2189,7 @@ const obj = {
     let leg = 5 - arr.length
     if (arr.length < 5) {
       for (var i = 0; i < leg; i++) {
-        arr.push(" ")
+        arr.push("")
       }
     }
     return arr

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.2.49",
+  "version": "1.2.50",
   "description": "",
   "main": "index.js",
   "scripts": {