hujie123456 5 years ago
parent
commit
606ccddf79

+ 6 - 0
css/base.less

@@ -507,4 +507,10 @@ body {
     font-family: 'myiconfont';
     src: url('./iconfont/iconfont.eot');
     src: url('./iconfont/iconfont.eot?#iefix') format('embedded-opentype'), url('./iconfont/iconfont.woff') format('woff'), url('./iconfont/iconfont.ttf') format('truetype'), url('./iconfont/iconfont.svg#myiconfont') format('svg');
+}
+.chooseList {
+  margin-left: 10px;
+}
+.chooseList>.ant-checkbox-wrapper {
+  width: 80%;
 }

+ 5 - 5
js/component/manageCenter/customer/NEW/query/queryCutomer.jsx

@@ -295,10 +295,10 @@ const QueryCustomer = React.createClass({
                     <span>{!intentionState?'单位客户查询':'个人客户查询'}</span>
                 </div>
                 <div className="user-search">                    
-                    <Input placeholder="客户名称"
+                    <Input placeholder="请输入精确客户全称"
                         value={this.state.nameSearch}
                         onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />    
-                   <Select placeholder="选择部门"
+                   {/* <Select placeholder="选择部门"
                             style={{ width: 150 ,marginRight:'10px',marginLeft:'10px'}}
                             value={this.state.departmenttSearch}
                             onChange={(e) => { this.setState({ departmenttSearch: e }) }}>
@@ -307,8 +307,8 @@ const QueryCustomer = React.createClass({
                                         return <Select.Option key={item.id} >{item.name}</Select.Option>
                                 })
                             }
-                    </Select>  
-                    <AutoComplete
+                    </Select>   */}
+                    {/* <AutoComplete
 				        className="certain-category-search"
 				        dropdownClassName="certain-category-search-dropdown"
 				        dropdownMatchSelectWidth={false}
@@ -323,7 +323,7 @@ const QueryCustomer = React.createClass({
 				        onSelect={this.selectAuto}
 				    >
 				        <Input />
-				    </AutoComplete>  
+				    </AutoComplete>   */}
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button> 
                 </div>  

+ 537 - 417
js/component/manageCenter/financialManage/bonus/jsBonus.jsx

@@ -6,439 +6,559 @@ import '../distribute/public.less';
 import {  Button, Input, Spin, Table,Select, Switch, message, DatePicker,Modal ,Form } from 'antd';
 import {getProjectStatus,getTaskStatus,getBonusState,getLiquidationStatus,getJsyPaymentType} from '@/tools';
 import JsBonuseDetail from './jsBonusDetail';
+import { ChooseList } from "../../order/orderNew/chooseList";
 const FormItem= Form.Item;
 
 const JsBonus = React.createClass({
-    departmentList() {
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context + "/api/admin/organization/selectSuperId",
-			data: {},
-			success: function(data) {
-                let thedata = data.data;
-				let theArr=[];
-				if(!thedata) {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-				}else{
-					thedata.map(function(item,index){
-						theArr.push({
-							key:index,
-							name:item.name,
-							id:item.id,
-						})
-					})
-				}
-				this.setState({
-					departmentArr:theArr,
-				})
-			}.bind(this),
-			}).always(function() {
-				this.setState({
-					loading: false
-				});
-			}.bind(this));
-	},
-    loadData(pageNo) {
-        this.state.data = [];
-        this.setState({
-            selectedRowKeys:[],
-            selectedRowKey:[],
-            page:pageNo,
-            loading: true
-        });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/bonus/technicianBonusStatistics",
-            data: {
-                pageNo: pageNo || 1,
-                pageSize:this.state.pagination.pageSize,
-                salesName: this.state.orderRefundSearch,//订单负责人
-                targetName: this.state.projectMenSearch,//项目负责人
-                departmentId:this.state.departmenttList,
-                orderNo:this.state.orderNoSearch,
-                startTime: this.state.releaseDate[0],
-                endTime: this.state.releaseDate[1],
-                grantStatus: this.state.grantStatus,
-                startTime1: this.state.createDate[0],
-                endTime1: this.state.createDate[1],
-            },
-            success: function (data) {
-                let theArr = [];
-                if (!data.data || !data.data.list) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    };
-                } else {
-                    for (let i = 0; i < data.data.list.length; i++) {
-                        let thisdata = data.data.list[i];
-                        theArr.push({
-                            key: i,
-                            id:thisdata.id,
-                            tid:thisdata.tid,
-                            targetName:thisdata.targetName,
-		                    orderNo:thisdata.orderNo,
-		                    taskReceiver:thisdata.taskReceiver,
-		                    taskStatus:thisdata.taskStatus,
-		                    commodityQuantity:thisdata.commodityQuantity,
-		                    projectStatus:thisdata.projectStatus,
-                            byName:thisdata.byName,
-                            commodityName:thisdata.commodityName,
-                            bonusSubject:thisdata.bonusSubject,
-                            grantStatus:thisdata.grantStatus, 
-                            grantTime:thisdata.grantTime,
-                            targetName:thisdata.targetName,
-                            liquidationStatus:thisdata.liquidationStatus,
-                            licenceTime:thisdata.licenceTime,
-                            acceptTime:thisdata.acceptTime,
-                            reviewTime:thisdata.reviewTime
-                        });
-                    };
-                }
-                this.state.pagination.current = data.data.pageNo;
-                this.state.pagination.total = data.data.totalCount;
-                if(data.data&&data.data.list&&!data.data.list.length){
-					this.state.pagination.current=0
-					this.state.pagination.total=0
-				}
-                this.setState({
-                    dataSource: theArr,
-                    pagination: this.state.pagination
-                });
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
+  departmentList() {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/organization/selectSuperId",
+      data: {},
+      success: function(data) {
+        let thedata = data.data;
+        let theArr = [];
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          thedata.map(function(item, index) {
+            theArr.push({
+              key: index,
+              name: item.name,
+              id: item.id
             });
-        }.bind(this));
-    },
-    getInitialState() {
-        return {
-            searchMore: true,
-            releaseDate: [],
-            createDate:[],
-            RowData:{},
-            execState:false,
-            selectedRowKeys: [],
-            selectedRows: [],
-            proofData:{},
-            loading: false,
-            pagination: {
-                defaultCurrent: 1,
-                defaultPageSize: 10,
-                showQuickJumper: true,
-                pageSize: 10,
-                onChange: function (page) {
-                    this.loadData(page);
-                }.bind(this),
-                showTotal: function (total) {
-                    return '共' + total + '条数据';
-                }
-            },
-            columns: [
-                {
-                    title: '任务编号',
-                    dataIndex: 'tid',
-                    key: 'tid',  
-					fixed: 'left'
-                },
-                {
-                    title: '订单编号',
-                    dataIndex: 'orderNo',
-                    key: 'orderNo',
-                }, 
-                {
-                    title: '任务名称',
-                    dataIndex: 'commodityName',
-                    key: 'commodityName',
-                },
-                {
-                    title: '任务负责人',
-                    dataIndex: 'targetName',
-                    key: 'targetName',
-                },
-                {
-                    title: '任务状态',
-                    dataIndex: 'taskStatus',
-                    key: 'taskStatus',
-                    render:text=>{
-                        return getTaskStatus(text)
-                    }
-                },
-                {
-                    title: '任务数量',
-                    dataIndex: 'commodityQuantity',
-                    key: 'commodityQuantity'
-                },
-                {
-                    title: '项目状态',
-                    dataIndex: 'projectStatus',
-                    key: 'projectStatus',
-                    render:(text)=>{
-                        return getProjectStatus(text)
-                    }
-                },
-                 {
-                    title: '受理日期',
-                    dataIndex: 'acceptTime',
-                    key: 'acceptTime'
-                },
-                {
-                    title: '评审日期',
-                    dataIndex: 'reviewTime',
-                    key: 'reviewTime'
-                },
-                {
-                    title: '下证日期',
-                    dataIndex: 'licenceTime',
-                    key: 'licenceTime'
-                },{
-                    title: '订单结算状态',
-                    dataIndex: 'liquidationStatus',
-                    key: 'liquidationStatus',
-                    render:text=>{
-                        return getLiquidationStatus(text)
-                    }
-                },
-                {
-                    title: '发放类型',
-                    dataIndex: 'bonusSubject',
-                    key: 'bonusSubject',
-                    render:text=>{
-                        return getJsyPaymentType(text)
-                    }
-                },{
-                    title: '发放状态',
-                    dataIndex: 'grantStatus',
-                    key: 'grantStatus',
-                    render:text=>{
-                        return getBonusState(text)
-                    }
-                },
-                {
-                    title: '操作',
-                    dataIndex: 'state11',
-                    key: 'state11',
-                    render:(text,recard)=>{
-                        return <div>
-                           {!recard.grantStatus&&<Button type="primary" style={{margin:'0 10px'}} onClick={(e)=>{e.stopPropagation(),this.proofread(recard)}}>发放</Button>}
-                        </div>
-                    }
-                },
-            ],
-            dataSource: [],
-            searchTime: [,]
+          });
         }
-    },
-    proofread(recard){
         this.setState({
-            boHuiVisible:true,
-            proofData: recard,
-        })
-    },
-    tableRowClick(record, index) {
-        this.state.RowData = record;
+          departmentArr: theArr
+        });
+      }.bind(this)
+    }).always(
+      function() {
         this.setState({
-            showDesc: true,
+          loading: false
         });
-    },
-    closeDesc(e, s) {
-        this.state.RowData={};
-        this.state.showDesc = e;
-        if (s) {
-            this.loadData(this.state.page);
-        };
-    },
-    componentWillMount() {
-        this.loadData();
-        this.departmentList();
-    },
-    search() {
-        this.loadData();
-    },
-    boHuiOk(){
+      }.bind(this)
+    );
+  },
+  loadData(pageNo) {
+    this.state.data = [];
+    this.setState({
+      selectedRowKeys: [],
+      selectedRowKey: [],
+      page: pageNo,
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/bonus/technicianBonusStatistics",
+      data: {
+        pageNo: pageNo || 1,
+        pageSize: this.state.pagination.pageSize,
+        salesName: this.state.orderRefundSearch, //订单负责人
+        targetName: this.state.projectMenSearch, //项目负责人
+        departmentId: this.state.departmenttList,
+        orderNo: this.state.orderNoSearch,
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
+        grantStatus: this.state.grantStatus,
+        startTime1: this.state.createDate[0],
+        endTime1: this.state.createDate[1]
+      },
+      success: function(data) {
+        let theArr = [];
+        if (!data.data || !data.data.list) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          for (let i = 0; i < data.data.list.length; i++) {
+            let thisdata = data.data.list[i];
+            theArr.push({
+              key: i,
+              id: thisdata.id,
+              tid: thisdata.tid,
+              targetName: thisdata.targetName,
+              orderNo: thisdata.orderNo,
+              taskReceiver: thisdata.taskReceiver,
+              taskStatus: thisdata.taskStatus,
+              commodityQuantity: thisdata.commodityQuantity,
+              projectStatus: thisdata.projectStatus,
+              byName: thisdata.byName,
+              commodityName: thisdata.commodityName,
+              bonusSubject: thisdata.bonusSubject,
+              grantStatus: thisdata.grantStatus,
+              grantTime: thisdata.grantTime,
+              targetName: thisdata.targetName,
+              liquidationStatus: thisdata.liquidationStatus,
+              licenceTime: thisdata.licenceTime,
+              acceptTime: thisdata.acceptTime,
+              reviewTime: thisdata.reviewTime
+            });
+          }
+        }
+        this.state.pagination.current = data.data.pageNo;
+        this.state.pagination.total = data.data.totalCount;
+        if (data.data && data.data.list && !data.data.list.length) {
+          this.state.pagination.current = 0;
+          this.state.pagination.total = 0;
+        }
         this.setState({
-            boHuiVisible:false
-        })
-        this.loadData(this.state.page);
-    },
-    boHuiCancel(e){
+          dataSource: theArr,
+          pagination: this.state.pagination
+        });
+      }.bind(this)
+    }).always(
+      function() {
         this.setState({
-            boHuiVisible:false
-        })
-    },
-    //导出
-    exportExec(){
-        let departmentName='',
-        depart =this.state.departmentArr || [];
-        depart.map(item=>{
-            if(this.state.departmentId==item.id){
-                departmentName=item.name;
-                return;
-            }
+          loading: false
         });
-        let data = {
-            departmentId:this.state.departmentId,
-            departmentName:departmentName,
-            salesName: this.state.orderRefundSearch,//订单负责人
-            targetName: this.state.projectMenSearch,//项目负责人
-            startTime: this.state.releaseDate[0],
-            endTime: this.state.releaseDate[1],
-            grantStatus: this.state.grantStatus,
-            startTime1: this.state.createDate[0],
-            endTime1: this.state.createDate[1],
+      }.bind(this)
+    );
+  },
+  getInitialState() {
+    return {
+      searchMore: true,
+      releaseDate: [],
+      createDate: [],
+      RowData: {},
+      execState: false,
+      selectedRowKeys: [],
+      selectedRows: [],
+      changeList: undefined,
+      proofData: {},
+      loading: false,
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function(page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function(total) {
+          return "共" + total + "条数据";
+        }
+      },
+      columns: [
+        {
+          title: "任务编号",
+          dataIndex: "tid",
+          key: "tid",
+        //   fixed: "left"
+        },
+        {
+          title: "订单编号",
+          dataIndex: "orderNo",
+          key: "orderNo"
+        },
+        {
+          title: "任务名称",
+          dataIndex: "commodityName",
+          key: "commodityName"
+        },
+        {
+          title: "任务负责人",
+          dataIndex: "targetName",
+          key: "targetName"
+        },
+        {
+          title: "任务状态",
+          dataIndex: "taskStatus",
+          key: "taskStatus",
+          render: text => {
+            return getTaskStatus(text);
+          }
+        },
+        {
+          title: "任务数量",
+          dataIndex: "commodityQuantity",
+          key: "commodityQuantity"
+        },
+        {
+          title: "项目状态",
+          dataIndex: "projectStatus",
+          key: "projectStatus",
+          render: text => {
+            return getProjectStatus(text);
+          }
+        },
+        {
+          title: "受理日期",
+          dataIndex: "acceptTime",
+          key: "acceptTime"
+        },
+        {
+          title: "评审日期",
+          dataIndex: "reviewTime",
+          key: "reviewTime"
+        },
+        {
+          title: "下证日期",
+          dataIndex: "licenceTime",
+          key: "licenceTime"
+        },
+        {
+          title: "订单结算状态",
+          dataIndex: "liquidationStatus",
+          key: "liquidationStatus",
+          render: text => {
+            return getLiquidationStatus(text);
+          }
+        },
+        {
+          title: "发放类型",
+          dataIndex: "bonusSubject",
+          key: "bonusSubject",
+          render: text => {
+            return getJsyPaymentType(text);
+          }
+        },
+        {
+          title: "发放状态",
+          dataIndex: "grantStatus",
+          key: "grantStatus",
+          render: text => {
+            return getBonusState(text);
+          }
+        },
+        {
+          title: "操作",
+          dataIndex: "state11",
+          key: "state11",
+          render: (text, recard) => {
+            return (
+              <div>
+                {!recard.grantStatus && (
+                  <Button
+                    type="primary"
+                    style={{ margin: "0 10px" }}
+                    onClick={e => {
+                      e.stopPropagation(), this.proofread(recard);
+                    }}
+                  >
+                    发放
+                  </Button>
+                )}
+              </div>
+            );
+          }
+        }
+      ],
+      dataSource: [],
+      searchTime: [,]
+    };
+  },
+  proofread(recard) {
+    this.setState({
+      boHuiVisible: true,
+      proofData: recard
+    });
+  },
+  tableRowClick(record, index) {
+    this.state.RowData = record;
+    this.setState({
+      showDesc: true
+    });
+  },
+  closeDesc(e, s) {
+    this.state.RowData = {};
+    this.state.showDesc = e;
+    if (s) {
+      this.loadData(this.state.page);
+    }
+  },
+  componentWillMount() {
+    this.loadData();
+    this.departmentList();
+  },
+  search() {
+    this.loadData();
+  },
+  boHuiOk() {
+    this.setState({
+      boHuiVisible: false
+    });
+    this.loadData(this.state.page);
+  },
+  boHuiCancel(e) {
+    this.setState({
+      boHuiVisible: false
+    });
+  },
+  //导出
+  exportExec() {
+    let departmentName = "",
+      depart = this.state.departmentArr || [];
+    depart.map(item => {
+      if (this.state.departmentId == item.id) {
+        departmentName = item.name;
+        return;
+      }
+    });
+    let data = {
+      departmentId: this.state.departmentId,
+      departmentName: departmentName,
+      salesName: this.state.orderRefundSearch, //订单负责人
+      targetName: this.state.projectMenSearch, //项目负责人
+      startTime: this.state.releaseDate[0],
+      endTime: this.state.releaseDate[1],
+      grantStatus: this.state.grantStatus,
+      startTime1: this.state.createDate[0],
+      endTime1: this.state.createDate[1]
+    };
+    window.location.href =
+      globalConfig.context +
+      "/api/admin/bonus/exportTechnicianBonusData?" +
+      $.param(data);
+  },
+  //保存发放状态
+  boHuiSubmit(e) {
+    e.preventDefault();
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "POST",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/bonus/changeBonus",
+      data: {
+        id: this.state.proofData.id
+      }
+    }).done(
+      function(data) {
+        if (!data.error.length) {
+          message.success("发放成功!");
+          this.boHuiOk();
+        } else {
+          message.warning(data.error[0].message);
         }
-        window.location.href=(globalConfig.context+'/api/admin/bonus/exportTechnicianBonusData?'+$.param(data));
-    },
-    //保存发放状态
-    boHuiSubmit(e){
-        e.preventDefault();
         this.setState({
-            loading:true
+          loading: false
         });
-        $.ajax({
-            method: "POST",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/bonus/changeBonus",
-            data: {
-                id: this.state.proofData.id,
-            }
-        }).done(function (data) {
-            if (!data.error.length) {
-                message.success('发放成功!');
-                this.boHuiOk();
-            } else {
-                message.warning(data.error[0].message);
-            };
-            this.setState({
-                loading: false
-            });
-        }.bind(this));
-    },
-    reset() {
-        this.state.orderRefundSearch='';
-        this.state.projectMenSearch='';
-        this.state.releaseDate = [];
-        this.state.createDate=[];
-        this.state.orderNoSearch='';
-        this.state.grantStatus=undefined;
-        this.state.departmenttList=undefined;
-        this.loadData();
-    },
-    searchSwitch() {
+      }.bind(this)
+    );
+  },
+  reset() {
+    this.state.orderRefundSearch = "";
+    this.state.projectMenSearch = "";
+    this.state.releaseDate = [];
+    this.state.createDate = [];
+    this.state.orderNoSearch = "";
+    this.state.grantStatus = undefined;
+    this.state.departmenttList = undefined;
+    this.loadData();
+  },
+  searchSwitch() {
+    this.setState({
+      searchMore: !this.state.searchMore
+    });
+  },
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
+  render() {
+    const rowSelection = {
+      selectedRowKeys: this.state.selectedRowKeys,
+      onChange: (selectedRowKeys, selectedRows) => {
         this.setState({
-            searchMore: !this.state.searchMore
+          selectedRows: selectedRows.slice(-1),
+          selectedRowKeys: selectedRowKeys.slice(-1)
         });
-    },
-    render() { 
-        const rowSelection = {
-            selectedRowKeys: this.state.selectedRowKeys,
-            onChange: (selectedRowKeys, selectedRows) => {
-                this.setState({
-                    selectedRows: selectedRows.slice(-1),
-                    selectedRowKeys: selectedRowKeys.slice(-1)
-                });
-            }
-        };
-        const hasSelected = this.state.selectedRowKeys.length > 0;
-        const { RangePicker } = DatePicker;
-        let departmentArr = this.state.departmentArr || [];
-        return ( <div className="user-content">
-            <div className="content-title">
-                <span>技术员奖金</span>
-                </div>
-                <div className="user-search">
-                    <Select placeholder="订单部门"
-                        style={{ width: 150 ,marginRight:10}}
-                        value={this.state.departmenttList}
-                        onChange={(e) => { this.setState({ departmenttList: e }) }}>
-                        {
-                            departmentArr.map(function (item) {
-                                    return <Select.Option key={item.id} >{item.name}</Select.Option>
-                            })
-                        }
-                    </Select>
-                    <Input placeholder="订单编号"
-                        value={this.state.orderNoSearch}
-                        onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} /> 
-                    <Input placeholder="任务负责人"
-                        value={this.state.projectMenSearch}
-                        onChange={(e) => { this.setState({ projectMenSearch: e.target.value }); }} /> 
-                    <Select placeholder="发放状态"
-                        style={{ width: 150 ,marginRight:10}}
-                        value={this.state.grantStatus}
-                        onChange={(e) => { this.setState({ grantStatus: e }) }}>
-                        <Option value='0'>未发放</Option>
-                        <Option value="1">已发放</Option>
-                    </Select>    
-                    <Button type="primary" onClick={this.search}>搜索</Button>
-                    <Button onClick={this.reset}>重置</Button>
-                    <Button onClick={this.exportExec} type='primary'>导出excel</Button>
-                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
-                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
-                        <span>签单时间 :</span>
-                        <RangePicker
-                            format="YYYY-MM"
-                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
-                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
-                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
-                        <span>创建时间 :</span>
-                        <RangePicker
-                            format="YYYY-MM-DD"
-                            value={[this.state.createDate[0] ? moment(this.state.createDate[0]) : null,
-                            this.state.createDate[1] ? moment(this.state.createDate[1]) : null]}
-                            onChange={(data, dataString) => { this.setState({ createDate: dataString }); }} />    
-                    </div>
-                </div>
-                <div className="patent-table" id="table">
-                    <Spin spinning={this.state.loading}>
-                        <Table columns={this.state.columns}
-                            dataSource={this.state.dataSource}
-							scroll={{ x: 1500, y: 0 }}
-                            rowSelection={false}
-                            pagination={this.state.pagination}
-                            onRowClick={this.tableRowClick}
-                             />
-                    </Spin>
-                </div>
-                <JsBonuseDetail 
-                    data={this.state.RowData}
-                    showDesc={this.state.showDesc}
-                    closeDesc={this.closeDesc.bind(this)}
-               />
-                <Modal visible={this.state.boHuiVisible} 
-                        width="400px" 
-                        title='发放'
-                        footer=''
-                        onOk={this.boHuiOk} 
-                        onCancel={this.boHuiCancel}
+      }
+    };
+    const hasSelected = this.state.selectedRowKeys.length > 0;
+    const { RangePicker } = DatePicker;
+    let departmentArr = this.state.departmentArr || [];
+    return (
+      <div className="user-content">
+        <div className="content-title">
+          <span>技术员奖金</span>
+        </div>
+        <div className="user-search">
+          <Select
+            placeholder="订单部门"
+            style={{ width: 150, marginRight: 10 }}
+            value={this.state.departmenttList}
+            onChange={e => {
+              this.setState({ departmenttList: e });
+            }}
+          >
+            {departmentArr.map(function(item) {
+              return <Select.Option key={item.id}>{item.name}</Select.Option>;
+            })}
+          </Select>
+          <Input
+            placeholder="订单编号"
+            value={this.state.orderNoSearch}
+            onChange={e => {
+              this.setState({ orderNoSearch: e.target.value });
+            }}
+          />
+          <Input
+            placeholder="任务负责人"
+            value={this.state.projectMenSearch}
+            onChange={e => {
+              this.setState({ projectMenSearch: e.target.value });
+            }}
+          />
+          <Select
+            placeholder="发放状态"
+            style={{ width: 150, marginRight: 10 }}
+            value={this.state.grantStatus}
+            onChange={e => {
+              this.setState({ grantStatus: e });
+            }}
+          >
+            <Option value="0">未发放</Option>
+            <Option value="1">已发放</Option>
+          </Select>
+          <Button type="primary" onClick={this.search}>
+            搜索
+          </Button>
+          <Button onClick={this.reset}>重置</Button>
+          <Button onClick={this.exportExec} type="primary">
+            导出excel
+          </Button>
+          <span>
+            更多搜索
+            <Switch
+              defaultChecked={false}
+              onChange={this.searchSwitch.bind(this)}
+            />
+          </span>
+          <div
+            className="search-more"
+            style={this.state.searchMore ? { display: "none" } : {}}
+          >
+            <span>签单时间 :</span>
+            <RangePicker
+              format="YYYY-MM"
+              value={[
+                this.state.releaseDate[0]
+                  ? moment(this.state.releaseDate[0])
+                  : null,
+                this.state.releaseDate[1]
+                  ? moment(this.state.releaseDate[1])
+                  : null
+              ]}
+              onChange={(data, dataString) => {
+                this.setState({ releaseDate: dataString });
+              }}
+            />
+            <span>创建时间 :</span>
+            <RangePicker
+              format="YYYY-MM-DD"
+              value={[
+                this.state.createDate[0]
+                  ? moment(this.state.createDate[0])
+                  : null,
+                this.state.createDate[1]
+                  ? moment(this.state.createDate[1])
+                  : null
+              ]}
+              onChange={(data, dataString) => {
+                this.setState({ createDate: dataString });
+              }}
+            />
+            <ChooseList
+              columns={this.state.columns}
+              changeFn={this.changeList}
+              changeList={this.state.changeList}
+              top={55}
+              display={"inline-block"}
+            />
+          </div>
+        </div>
+        <div className="patent-table" id="table">
+          <Spin spinning={this.state.loading}>
+            <Table
+              bordered
+              columns={
+                this.state.changeList == undefined
+                  ? this.state.columns
+                  : this.state.changeList
+              }
+              dataSource={this.state.dataSource}
+              scroll={{ x: 1500, y: 0 }}
+              rowSelection={false}
+              pagination={this.state.pagination}
+              onRowClick={this.tableRowClick}
+            />
+          </Spin>
+        </div>
+        <JsBonuseDetail
+          data={this.state.RowData}
+          showDesc={this.state.showDesc}
+          closeDesc={this.closeDesc.bind(this)}
+        />
+        <Modal
+          visible={this.state.boHuiVisible}
+          width="400px"
+          title="发放"
+          footer=""
+          onOk={this.boHuiOk}
+          onCancel={this.boHuiCancel}
+        >
+          <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
+            <Spin spinning={this.state.loading}>
+              <FormItem
+                labelCol={{ span: 8 }}
+                wrapperCol={{ span: 10 }}
+                label="应收人"
+              >
+                <span>{this.state.proofData.targetName}</span>
+              </FormItem>
+              <FormItem
+                labelCol={{ span: 8 }}
+                wrapperCol={{ span: 10 }}
+                label="发放人"
+              >
+                <span>{this.state.proofData.byName}</span>
+              </FormItem>
+              <FormItem wrapperCol={{ span: 12, offset: 8 }}>
+                <Button
+                  type="primary"
+                  htmlType="submit"
+                  style={{ marginRight: 20 }}
                 >
-                    <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
-			                <Spin spinning={this.state.loading}>
-                                <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='应收人'>
-                                    <span>{this.state.proofData.targetName}</span>
-                                </FormItem>
-                                <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='发放人'>
-                                    <span>{this.state.proofData.byName}</span>
-                                </FormItem>
-                                <FormItem wrapperCol={{ span: 12, offset:8 }}>  
-                                    <Button type="primary" htmlType="submit"  style={{marginRight:20}}>发放</Button>
-                                    <Button type="default" onClick={()=>{this.boHuiCancel()}}>取消</Button>
-                                </FormItem>
-                            </Spin>
-                        </Form>
-                </Modal>
-        </div> )
-    }
-})
+                  发放
+                </Button>
+                <Button
+                  type="default"
+                  onClick={() => {
+                    this.boHuiCancel();
+                  }}
+                >
+                  取消
+                </Button>
+              </FormItem>
+            </Spin>
+          </Form>
+        </Modal>
+      </div>
+    );
+  }
+});
  
 export default JsBonus;

File diff suppressed because it is too large
+ 565 - 411
js/component/manageCenter/financialManage/bonus/yxBonus.jsx


+ 18 - 18
js/component/manageCenter/financialManage/content.jsx

@@ -41,8 +41,7 @@ class Content extends Component {
             break;
           case "approvedOutsourcing": //外包列表
             require.ensure([], () => {
-              let Module = require("./distribute/approvedOutsourcing")
-                .default;
+              let Module = require("./distribute/approvedOutsourcing").default;
               this.setState({
                 component: <Module />
               });
@@ -50,8 +49,7 @@ class Content extends Component {
             break;
           case "outsourcingPaiDan": //外包派单
             require.ensure([], () => {
-              let Module = require("./distribute/outsourcingPaiDan")
-                .default;
+              let Module = require("./distribute/outsourcingPaiDan").default;
               this.setState({
                 component: <Module />
               });
@@ -59,8 +57,7 @@ class Content extends Component {
             break;
           case "outOutsourcingList": //外省外包列表
             require.ensure([], () => {
-              let Module = require("./distribute/outOutsourcingList")
-                .default;
+              let Module = require("./distribute/outOutsourcingList").default;
               this.setState({
                 component: <Module />
               });
@@ -68,8 +65,7 @@ class Content extends Component {
             break;
           case "outInvoiceQuery": //省外开票查询
             require.ensure([], () => {
-              let Module = require("./distribute/outInvoiceQuery")
-                .default;
+              let Module = require("./distribute/outInvoiceQuery").default;
               this.setState({
                 component: <Module />
               });
@@ -77,8 +73,7 @@ class Content extends Component {
             break;
           case "invoiceApplyList": //省内开票管理
             require.ensure([], () => {
-              let Module = require("./distribute/invoiceApplyList")
-                .default;
+              let Module = require("./distribute/invoiceApplyList").default;
               this.setState({
                 component: <Module />
               });
@@ -86,8 +81,7 @@ class Content extends Component {
             break;
           case "invoiceApplyListWai": //省外开票管理
             require.ensure([], () => {
-              let Module = require("./distribute/invoiceApplyListWai")
-                .default;
+              let Module = require("./distribute/invoiceApplyListWai").default;
               this.setState({
                 component: <Module />
               });
@@ -119,8 +113,7 @@ class Content extends Component {
             break;
           case "contractChangeCwzy": //订单变更审核列表
             require.ensure([], () => {
-              let Module = require("./distribute/contractChangeCwzy")
-                .default;
+              let Module = require("./distribute/contractChangeCwzy").default;
               this.setState({
                 component: <Module />
               });
@@ -128,8 +121,7 @@ class Content extends Component {
             break;
           case "contractChangeCwzj": //订单变更审核列表
             require.ensure([], () => {
-              let Module = require("./distribute/contractChangeCwzj")
-                .default;
+              let Module = require("./distribute/contractChangeCwzj").default;
               this.setState({
                 component: <Module />
               });
@@ -175,9 +167,17 @@ class Content extends Component {
               });
             });
             break;
-          case "order": //技术员奖金
+          case "jsBonus": //技术员奖金
+            require.ensure([], () => {
+              let Module = require("./bonus/jsBonus").default;
+              this.setState({
+                component: <Module />
+              });
+            });
+            break;
+          case "huiKuan": //回款
             require.ensure([], () => {
-              let Module = require("../statistics/order/index").default;
+              let Module = require("./distribute/huiKuan").default;
               this.setState({
                 component: <Module />
               });

+ 33 - 4
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -28,6 +28,7 @@ import {
   getprovince,
   getRefundStatus
 } from "@/tools";
+import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 const FormItem = Form.Item;
 
 const approvedOutsourcing = React.createClass({
@@ -175,12 +176,14 @@ const approvedOutsourcing = React.createClass({
           return "共" + total + "条数据";
         }
       },
+      // 子组件改变的表格title数组
+      changeList: undefined,
       columns: [
         {
           title: "订单编号",
           dataIndex: "orderNo",
           key: "orderNo",
-          fixed: "left"
+          // fixed: "left"
         },
         {
           title: "签单日期",
@@ -563,8 +566,8 @@ const approvedOutsourcing = React.createClass({
       visible: true,
       orderNo: record.orderNo,
       modKey: "1"
-	});
-	this.jdDate(record.orderNo)
+    });
+    this.jdDate(record.orderNo);
     this.loadXmu(record);
     this.loadModal(record);
   },
@@ -958,6 +961,19 @@ const approvedOutsourcing = React.createClass({
       searchMore: !this.state.searchMore
     });
   },
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
   render() {
     const { TextArea } = Input;
     const { RangePicker } = DatePicker;
@@ -1044,10 +1060,23 @@ const approvedOutsourcing = React.createClass({
           </Button>
           <Button onClick={this.reset}>重置</Button>
         </div>
+
+        <ChooseList
+          columns={this.state.columns}
+          changeFn={this.changeList}
+          changeList={this.state.changeList}
+          top={55}
+        />
+
         <div className="patent-table">
           <Spin spinning={this.state.loading}>
             <Table
-              columns={this.state.columns}
+              bordered
+              columns={
+                this.state.changeList == undefined
+                  ? this.state.columns
+                  : this.state.changeList
+              }
               dataSource={this.state.dataSource}
               rowSelection={false}
               scroll={{ x: true, y: 0 }}

+ 435 - 0
js/component/manageCenter/financialManage/distribute/huiKuan.jsx

@@ -0,0 +1,435 @@
+import React from "react";
+import $ from "jquery/src/ajax";
+import "./public.less";
+import {
+  Form,
+  Button,
+  Input,
+  Select,
+  Spin,
+  Table,
+  message,
+  Modal,
+  Upload
+} from "antd";
+import {
+  getProjectStatus,
+  getProvinceA,
+  getInvoiceStatus,
+  getprovince,
+  getStatus,
+  getPeople,
+  splitUrl
+} from "@/tools";
+import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
+import "./huiKuan.less"
+
+const FormItem = Form.Item;
+
+const inSpecial = React.createClass({
+  loadData(pageNo) {
+    this.state.data = [];
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url:
+        globalConfig.context +
+        "/api/admin/orderInvoice/approvalOrderInvoiceList",
+      data: {
+        pageNo: pageNo || 1,
+        pageSize: this.state.pagination.pageSize,
+        name: this.state.nameSearch, //客户名称
+        userName: this.state.userName,
+        status: this.state.status,
+        orderNo: this.state.orderNoSearch,
+        orderDep: this.state.departmenttList,
+        type: 0,
+        approval: this.state.processStatus
+      },
+      success: function(data) {
+        let theArr = [];
+        if (!data.data || !data.data.list) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          for (let i = 0; i < data.data.list.length; i++) {
+            let thisdata = data.data.list[i];
+            theArr.push({
+              key: i,
+              id: thisdata.id,
+              status: thisdata.status,
+              unitName: thisdata.unitName,
+              orderno: thisdata.orderno,
+              name: thisdata.name,
+              processStatus: thisdata.processStatus,
+              projectStatus: thisdata.projectStatus,
+              amount: thisdata.amount,
+              sumAmount: thisdata.sumAmount,
+              createTime: thisdata.createTime
+                ? new Date(thisdata.createTime).toLocaleString()
+                : "",
+              settlementAmount: thisdata.settlementAmount,
+              notAmount: thisdata.notAmount,
+              approval: thisdata.approval
+            });
+          }
+        }
+        this.state.pagination.current = data.data.pageNo;
+        this.state.pagination.total = data.data.totalCount;
+        if (data.data && data.data.list && !data.data.list.length) {
+          this.state.pagination.current = 0;
+          this.state.pagination.total = 0;
+        }
+        this.setState({
+          totalPage: data.data.totalPage,
+          dataSource: theArr,
+          pagination: this.state.pagination
+        });
+      }.bind(this)
+    }).always(
+      function() {
+        this.setState({
+          loading: false
+        });
+      }.bind(this)
+    );
+  },
+
+  getInitialState() {
+    return {
+      visible: false,
+      selectedRowKeys: [], // Check here to configure the default column
+      loading: false,
+      searchMore: true,
+      assignVisible: false,
+      releaseDate: [],
+      totalPage: 0,
+      boHuivisible: false,
+      selectedRowKeys: [],
+      selectedRows: [],
+      //开票状态
+      //用户名称搜索
+      // userName: "",
+      contractNo: "",
+      loading: false,
+      reason: "",
+      foo: 0,
+      // 子组件改变的表格title数组
+      changeList: undefined,
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function(page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function(total) {
+          return "共" + total + "条数据";
+        }
+      },
+      columns: [
+        {
+          title: "合同编号",
+          dataIndex: "id",
+          key: "id"
+          // fixed: "left"
+        },
+        {
+          title: "订单编号",
+          dataIndex: "orderNo",
+          key: "orderNo"
+        },
+        {
+          title: "客户名称",
+          dataIndex: "name",
+          key: "name"
+        },
+        {
+          title: "合同额",
+          dataIndex: "hetong",
+          key: "hetong"
+        },
+        {
+          title: "本次回款(万元)",
+          dataIndex: "benci",
+          key: "benci"
+        },
+        {
+          title: "回款时间",
+          dataIndex: "huiTime",
+          key: "huiTime"
+        },
+        {
+          title: "批量导入时间",
+          dataIndex: "daoTime",
+          key: "daoTime"
+        },
+        {
+          title: "备注",
+          dataIndex: "remake",
+          key: "remake"
+        }
+      ],
+      columnsDate: [
+        {
+          title: "编号",
+          dataIndex: "id",
+          key: "id"
+        },
+        {
+          title: "订单编号",
+          dataIndex: "orderno",
+          key: "orderno"
+        },
+        {
+          title: "开票金额(万元)",
+          dataIndex: "amount",
+          key: "amount"
+        },
+        {
+          title: "申请时间",
+          dataIndex: "createTime",
+          key: "createTime"
+        },
+        {
+          title: "开票状态",
+          dataIndex: "status",
+          key: "status",
+          render: text => {
+            return getInvoiceStatus(text);
+          }
+        }
+      ],
+      dataSource: [
+        {
+          id: 1,
+          orderNo: "w1",
+          name: "张三",
+          hetong: 3,
+          benci: 1,
+          huiTime: "2019-10-11",
+          daoTime: "2019-10-11",
+          remake: "hhhhh",
+          key: "w1"
+        },
+        {
+          id: 2,
+          orderNo: "w2",
+          name: "王五",
+          hetong: 3,
+          benci: 1,
+          huiTime: "2019-10-11",
+          daoTime: "2019-10-11",
+          remake: "zzzzzz",
+          key: "w2"
+        },
+        {
+          id: 3,
+          orderNo: "w3",
+          name: "二麻子",
+          hetong: 3,
+          benci: 1,
+          huiTime: "2019-10-11",
+          daoTime: "2019-10-11",
+          remake: "yyyyyyy",
+          key: "w3"
+        },
+        {
+          id: 4,
+          orderNo: "w4",
+          name: "jax",
+          hetong: 3,
+          benci: 1,
+          huiTime: "2019-10-11",
+          daoTime: "2019-10-11",
+          remake: "bbbbbb",
+          key: "w4"
+        }
+      ],
+      searchTime: [,]
+    };
+  },
+
+  search() {
+    this.loadData();
+  },
+
+  componentWillMount() {
+    // this.loadData();
+  },
+  reset() {
+    this.state.nameSearch = "";
+    this.state.releaseDate = [];
+    this.state.orderNoSearch = "";
+    this.state.userName = "";
+    // this.loadData();
+  },
+  
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
+  onSelectChange(selectedRowKeys) {
+    console.log('selectedRowKeys changed: ', selectedRowKeys);
+    this.setState({ selectedRowKeys });
+  },
+  showModal() {
+    this.setState({
+      visible: true,
+    });
+  },
+
+  handleOk() {
+    this.setState({ loading: true });
+    setTimeout(() => {
+      this.setState({ loading: false, visible: false });
+    }, 3000);
+  },
+
+  handleCancel() {
+    this.setState({ visible: false });
+  },
+
+
+
+  render() {
+    const formItemLayout = {
+      labelCol: { span: 8 },
+      wrapperCol: { span: 14 }
+    };
+    var departmentArr = this.state.departmentArr || [];
+    const { loading, selectedRowKeys,visible } = this.state;
+    const rowSelection = {
+      selectedRowKeys,
+      onChange: this.onSelectChange,
+      hideDefaultSelections: true
+    };
+    return (
+      <div className="user-content" style={{ position: "relative" }}>
+        <div className="content-title">
+          <span>回款</span>
+        </div>
+        <div className="user-search">
+          <Input
+            placeholder="合同编号"
+            value={this.state.nameSearch}
+            onChange={e => {
+              this.setState({ nameSearch: e.target.value });
+            }}
+          />
+          <Input
+            placeholder="订单编号"
+            value={this.state.orderNoSearch}
+            onChange={e => {
+              this.setState({ orderNoSearch: e.target.value });
+            }}
+          />
+          <Input
+            placeholder="客户名称"
+            value={this.state.userName}
+            onChange={e => {
+              this.setState({ userName: e.target.value });
+            }}
+          />
+          <Select
+            placeholder="订单部门"
+            style={{ width: 150, marginRight: 10 }}
+            value={this.state.departmenttList}
+            onChange={e => {
+              this.setState({ departmenttList: e });
+            }}
+          >
+            {departmentArr.map(function(item) {
+              return <Select.Option key={item.id}>{item.name}</Select.Option>;
+            })}
+          </Select>
+          <Button
+            type="primary"
+            onClick={this.search}
+            style={{ marginLeft: 10 }}
+          >
+            搜索
+          </Button>
+          <Button onClick={this.reset}>重置</Button>
+        </div>
+
+        <ChooseList
+          columns={this.state.columns}
+          changeFn={this.changeList}
+          changeList={this.state.changeList}
+          top={55}
+          display={"inline-block"}
+        />
+        <Button
+          type="primary"
+          style={{ marginLeft: 15 }}
+          disabled={this.state.selectedRowKeys.length == 1 ? false : true}
+          onClick={this.showModal}
+        >
+          修改单条数据
+        </Button>
+
+        <div className="patent-table">
+          <Spin spinning={this.state.loading}>
+            <Table
+              columns={
+                this.state.changeList == undefined
+                  ? this.state.columns
+                  : this.state.changeList
+              }
+              //   scroll={{ x: 1500, y: 0 }}
+              dataSource={this.state.dataSource}
+              pagination={this.state.pagination}
+              rowSelection={rowSelection}
+              bordered
+            />
+          </Spin>
+        </div>
+
+        <Modal
+          visible={visible}
+          title="Title"
+          onOk={this.handleOk}
+          onCancel={this.handleCancel}
+          footer={[
+            <Button key="back" onClick={this.handleCancel}>
+              Return
+            </Button>,
+            <Button
+              key="submit"
+              type="primary"
+              loading={loading}
+              onClick={this.handleOk}
+            >
+              Submit
+            </Button>
+          ]}
+        >
+          <p>{this.state.dataSource.id}</p>
+          <p>Some contents...</p>
+          <p>Some contents...</p>
+          <p>Some contents...</p>
+          <p>Some contents...</p>
+        </Modal>
+
+      </div>
+    );
+  }
+});
+
+export default inSpecial;

+ 3 - 0
js/component/manageCenter/financialManage/distribute/huiKuan.less

@@ -0,0 +1,3 @@
+.ant-table-thead .ant-table-selection-column .ant-checkbox-wrapper {
+    display: block;
+}

+ 58 - 3
js/component/manageCenter/financialManage/distribute/inSpecial.jsx

@@ -21,6 +21,7 @@ import {
   getPeople,
   splitUrl
 } from "@/tools";
+import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 
 const FormItem = Form.Item;
 
@@ -79,6 +80,8 @@ const inSpecial = React.createClass({
         pageNo: pageNo || 1,
         pageSize: this.state.pagination.pageSize,
         name: this.state.nameSearch, //客户名称
+        userName: this.state.userName,
+        status: this.state.status,
         orderNo: this.state.orderNoSearch,
         orderDep: this.state.departmenttList,
         type: 0,
@@ -199,10 +202,15 @@ const inSpecial = React.createClass({
       boHuivisible: false,
       selectedRowKeys: [],
       selectedRows: [],
+      //开票状态
+      //用户名称搜索
+      // userName: "",
       contractNo: "",
       loading: false,
       reason: "",
       foo: 0,
+      // 子组件改变的表格title数组
+      changeList: undefined,
       pagination: {
         defaultCurrent: 1,
         defaultPageSize: 10,
@@ -220,7 +228,7 @@ const inSpecial = React.createClass({
           title: "编号",
           dataIndex: "id",
           key: "id",
-          fixed: "left"
+          // fixed: "left"
         },
         {
           title: "客户",
@@ -560,8 +568,23 @@ const inSpecial = React.createClass({
     this.state.orderNoSearch = "";
     this.state.processStatus = [];
     this.state.departmenttList = [];
+    this.state.userName = "";
+    this.state.status = [];
     this.loadData();
   },
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
   render() {
     const formItemLayout = {
       labelCol: { span: 8 },
@@ -569,7 +592,7 @@ const inSpecial = React.createClass({
     };
     var departmentArr = this.state.departmentArr || [];
     return (
-      <div className="user-content">
+      <div className="user-content" style={{ position: "relative" }}>
         <div className="content-title">
           <span>省内特批</span>
         </div>
@@ -588,6 +611,24 @@ const inSpecial = React.createClass({
               this.setState({ orderNoSearch: e.target.value });
             }}
           />
+          <Input
+            placeholder="客户名称"
+            value={this.state.userName}
+            onChange={e => {
+              this.setState({ userName: e.target.value });
+            }}
+          />
+          <Select
+            placeholder="开票状态"
+            onChange={e => {
+              this.setState({ status: e });
+            }}
+            style={{ width: 160, marginRight: 5 }}
+            value={this.state.status}
+          >
+            <Option value="1">处理中</Option>
+            <Option value="2">通过</Option>
+          </Select>
           <Select
             placeholder="订单部门"
             style={{ width: 150, marginRight: 10 }}
@@ -620,13 +661,26 @@ const inSpecial = React.createClass({
           </Button>
           <Button onClick={this.reset}>重置</Button>
         </div>
+
+        <ChooseList
+          columns={this.state.columns}
+          changeFn={this.changeList}
+          changeList={this.state.changeList}
+          top={55}
+        />
+
         <div className="patent-table">
           <Spin spinning={this.state.loading}>
             <Table
-              columns={this.state.columns}
+              columns={
+                this.state.changeList == undefined
+                  ? this.state.columns
+                  : this.state.changeList
+              }
               scroll={{ x: 1500, y: 0 }}
               dataSource={this.state.dataSource}
               pagination={this.state.pagination}
+              bordered
             />
           </Spin>
         </div>
@@ -947,6 +1001,7 @@ const inSpecial = React.createClass({
                 columns={this.state.columnsDate}
                 dataSource={this.state.recordData}
                 pagination={false}
+                bordered
               />
               <div className="clearfix" style={{ marginTop: "20px" }}>
                 <FormItem

+ 30 - 3
js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx

@@ -21,6 +21,7 @@ import {
   getPeople,
   splitUrl
 } from "@/tools";
+import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 
 const FormItem = Form.Item;
 
@@ -197,6 +198,8 @@ const invoiceApplyList = React.createClass({
       totalPage: 0,
       boHuivisible: false,
       selectedRowKeys: [],
+      // 子组件改变的表格title数组
+      changeList: undefined,
       selectedRows: [],
       loading: false,
       reason: "",
@@ -217,8 +220,8 @@ const invoiceApplyList = React.createClass({
         {
           title: "编号",
           dataIndex: "id",
-          key: "id",
-          fixed: "left"
+          key: "id"
+          // fixed: "left"
         },
         {
           title: "客户",
@@ -560,6 +563,19 @@ const invoiceApplyList = React.createClass({
     this.state.departmenttList = [];
     this.loadData();
   },
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
   render() {
     const formItemLayout = {
       labelCol: { span: 8 },
@@ -607,13 +623,24 @@ const invoiceApplyList = React.createClass({
           </Button>
           <Button onClick={this.reset}>重置</Button>
         </div>
+        <ChooseList
+          columns={this.state.columns}
+          changeFn={this.changeList}
+          changeList={this.state.changeList}
+          top={55}
+        />
         <div className="patent-table">
           <Spin spinning={this.state.loading}>
             <Table
-              columns={this.state.columns}
+              columns={
+                this.state.changeList == undefined
+                  ? this.state.columns
+                  : this.state.changeList
+              }
               scroll={{ x: 1500, y: 0 }}
               dataSource={this.state.dataSource}
               pagination={this.state.pagination}
+              bordered
             />
           </Spin>
         </div>

+ 31 - 2
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -17,6 +17,7 @@ import OrderDesc from "../orderDetail/orderDesc";
 import Receivable from "./receivable";
 import Assign from "@/manageCenter/publicComponent/assign";
 import { getLiquidationStatus, getProcessStatus, getApproval } from "@/tools";
+import { ChooseList } from "../../order/orderNew/chooseList"
 const FormItem = Form.Item;
 
 const ShouKuang = React.createClass({
@@ -159,12 +160,14 @@ const ShouKuang = React.createClass({
           return "共" + total + "条数据";
         }
       },
+      // 子组件改变的表格title数组
+      changeList: undefined,
       columns: [
         {
           title: "订单编号",
           dataIndex: "orderNo",
           key: "orderNo",
-          fixed: "left"
+          // fixed: "left"
         },
         {
           title: "签单日期",
@@ -450,6 +453,19 @@ const ShouKuang = React.createClass({
       searchMore: !this.state.searchMore
     });
   },
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
   render() {
     const { RangePicker } = DatePicker;
     var departmentArr = this.state.departmentArr || [];
@@ -528,10 +544,23 @@ const ShouKuang = React.createClass({
           </Button>
           <Button onClick={this.reset}>重置</Button>
         </div>
+
+        <ChooseList
+          columns={this.state.columns}
+          changeFn={this.changeList}
+          changeList={this.state.changeList}
+          top={55}
+        />
+
         <div className="patent-table">
           <Spin spinning={this.state.loading}>
             <Table
-              columns={this.state.columns}
+              bordered
+              columns={
+                this.state.changeList == undefined
+                  ? this.state.columns
+                  : this.state.changeList
+              }
               dataSource={this.state.dataSource}
               rowSelection={false}
               scroll={{ x: true, y: 0 }}

+ 431 - 329
js/component/manageCenter/financialManage/distribute/tuiDan.jsx

@@ -7,345 +7,447 @@ import Receivable from './receivable';
 import Examine from './examine';
 import OrderDesc from '../orderDetail/orderDesc';
 import {getLiquidationStatus,getNewOrderStatus,getRefundStatus} from '@/tools';
+import { ChooseList } from "../../order/orderNew/chooseList";
 
 const TuiDan = React.createClass({
-    departmentList() {
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context + "/api/admin/organization/selectSuperId",
-			data: {},
-			success: function(data) {
-                let thedata = data.data;
-				let theArr=[];
-				if(!thedata) {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-				}else{
-					thedata.map(function(item,index){
-						theArr.push({
-							key:index,
-							name:item.name,
-							id:item.id,
-						})
-					})
-				}
-				this.setState({
-					departmentArr:theArr,
-				})
-			}.bind(this),
-			}).always(function() {
-				this.setState({
-					loading: false
-				});
-			}.bind(this));
-	},
-    loadData(pageNo) {
-        this.state.data = [];
+  departmentList() {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/organization/selectSuperId",
+      data: {},
+      success: function(data) {
+        let thedata = data.data;
+        let theArr = [];
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          thedata.map(function(item, index) {
+            theArr.push({
+              key: index,
+              name: item.name,
+              id: item.id
+            });
+          });
+        }
+        this.setState({
+          departmentArr: theArr
+        });
+      }.bind(this)
+    }).always(
+      function() {
         this.setState({
-            selectedRowKeys:[],
-            selectedRowKey:[],
-            page:pageNo,
-            loading: true
+          loading: false
         });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/financial/getRefundList",
-            data: {
-                pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,
-                id:this.state.orderRefundSearch,
-                buyName: this.state.nameSearch,//客户名称
-                orderNo:this.state.orderNoSearch,
-                refundStatus:this.state.refundStatus,
-                startTime: this.state.releaseDate[0],
-                endTime: this.state.releaseDate[1],
-                departmentId:this.state.departmenttList
-            },
-            success: function (data) {
-                let theArr = [];
-                if (!data.data || !data.data.list) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    };
-                } else {
-                    for (let i = 0; i < data.data.list.length; i++) {
-                        let thisdata = data.data.list[i];
-                        theArr.push({
-                            key: i,
-                            id:thisdata.id,
-		                    orderNo: thisdata.orderNo,
-                            orderType:thisdata.orderType,
-                            buyName:thisdata.buyName,
-                            companyName:thisdata.buyName,
-                            buyerName:thisdata.saleName,
-                            contractNo:thisdata.contractNo,
-                            buyerId:'0',
-                            refundAmount:thisdata.refundAmount,
-                            companyId:thisdata.buyid,
-		                    orderStatus:thisdata.orderStatus,
-		                    liquidationStatus:thisdata.liquidationStatus,
-                            refundStatus:thisdata.refundStatus,
-		                    saleName:thisdata.saleName,
-                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
-                        });
-                    };
-                }
-                this.state.pagination.current = data.data.pageNo;
-                this.state.pagination.total = data.data.totalCount;
-                if(data.data&&data.data.list&&!data.data.list.length){
-					this.state.pagination.current=0
-					this.state.pagination.total=0
-				}
-                this.setState({
-                    totalPage:data.data.totalPage,
-                    dataSource: theArr,
-                    pagination: this.state.pagination
-                });
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
+      }.bind(this)
+    );
+  },
+  loadData(pageNo) {
+    this.state.data = [];
+    this.setState({
+      selectedRowKeys: [],
+      selectedRowKey: [],
+      page: pageNo,
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/financial/getRefundList",
+      data: {
+        pageNo: pageNo || 1,
+        pageSize: this.state.pagination.pageSize,
+        id: this.state.orderRefundSearch,
+        buyName: this.state.nameSearch, //客户名称
+        orderNo: this.state.orderNoSearch,
+        refundStatus: this.state.refundStatus,
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
+        departmentId: this.state.departmenttList
+      },
+      success: function(data) {
+        let theArr = [];
+        if (!data.data || !data.data.list) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          for (let i = 0; i < data.data.list.length; i++) {
+            let thisdata = data.data.list[i];
+            theArr.push({
+              key: i,
+              id: thisdata.id,
+              orderNo: thisdata.orderNo,
+              orderType: thisdata.orderType,
+              buyName: thisdata.buyName,
+              companyName: thisdata.buyName,
+              buyerName: thisdata.saleName,
+              contractNo: thisdata.contractNo,
+              buyerId: "0",
+              refundAmount: thisdata.refundAmount,
+              companyId: thisdata.buyid,
+              orderStatus: thisdata.orderStatus,
+              liquidationStatus: thisdata.liquidationStatus,
+              refundStatus: thisdata.refundStatus,
+              saleName: thisdata.saleName,
+              createTime: thisdata.createTime
+                ? new Date(thisdata.createTime).toLocaleString()
+                : ""
             });
-        }.bind(this));
-    },
-    getInitialState() {
-        return {
-            searchMore: true,
-            assignVisible:false,
-            releaseDate: [],
-            totalPage:0,
-            assignData:[],
-            boHuivisible:false,
-            selectedRowKeys: [],
-            selectedRows: [],
-            loading: false,
-            pagination: {
-                defaultCurrent: 1,
-                defaultPageSize: 10,
-                showQuickJumper: true,
-                pageSize: 10,
-                onChange: function (page) {
-                    this.loadData(page);
-                }.bind(this),
-                showTotal: function (total) {
-                    return '共' + total + '条数据';
-                }
-            },
-            columns: [
-                {
-                    title: '退单编号',
-                    dataIndex: 'id',
-                    key: 'id',   
-					fixed: 'left'
-                },
-                {
-                    title: '申请退单时间',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
-                }, 
-                {
-                    title: '订单编号',
-                    dataIndex: 'orderNo',
-                    key: 'orderNo',
-                },
-                {
-                    title: '客户名称',
-                    dataIndex: 'buyName',
-                    key: 'buyName',
-                },
-                {
-                    title: '订单状态',
-                    dataIndex: 'orderStatus',
-                    key: 'orderStatus',
-                    render: text => { return getNewOrderStatus(text)}
-                },
-                {
-                    title: '订单负责人',
-                    dataIndex: 'saleName',
-                    key: 'saleName'
-                },
-                {
-                    title: '结算状态',
-                    dataIndex: 'liquidationStatus',
-                    key: 'liquidationStatus',
-                    render: text => { return getLiquidationStatus(text)}
-                },
-                {
-                    title: '审批状态',
-                    dataIndex: 'refundStatus',
-                    key: 'refundStatus',
-                    render: text => { return getRefundStatus(text)}
-                },
-                {
-                    title:'操作',
-                    dataIndex: 'caozuo',
-                    key: 'caouzo',
-                    render:(text,recard)=>{
-                        return <div>
-                            {recard.refundStatus==1&&<Button type="primary" onClick={(e)=>{e.stopPropagation(),this.evaluate(recard)}}>添加退款记录</Button>}
-                            {recard.refundStatus==0&&<Button type="primary" onClick={(e)=>{e.stopPropagation(),this.reject(recard)}}>审批</Button>}
-                        </div>
-                    }
-                }
-            ],
-            dataSource: [],
-            examineData:{},
-            searchTime: [,]
+          }
+        }
+        this.state.pagination.current = data.data.pageNo;
+        this.state.pagination.total = data.data.totalCount;
+        if (data.data && data.data.list && !data.data.list.length) {
+          this.state.pagination.current = 0;
+          this.state.pagination.total = 0;
         }
-    },
-    /* 添加收款记录 */
-    evaluate(recard){
-        this.state.assignData=recard;
-        this.setState({
-            assignVisible:true
-        })
-    },
-    /* 驳回 */
-    reject(recard){
-       this.setState({
-            examineData:recard,
-            examineVisible:true,
-       })
-    },
-    componentWillMount() {
-        this.loadData();
-        this.departmentList();
-    },
-    tableRowClick(record) {
-        this.state.RowData = record;
         this.setState({
-            showDesc: true,
+          totalPage: data.data.totalPage,
+          dataSource: theArr,
+          pagination: this.state.pagination
         });
-    },
-    closeExamine(e, s,nub) {
-        this.state.examineData={};
-        this.state.examineVisible = e;
-        if (s) {
-            if(nub=='2'){
-                if((this.state.pagination.current==this.state.totalPage)&&(this.state.pagination.total)%10==1){
-                    this.loadData(this.state.page-1);
-                }else{
-                    this.loadData(this.state.page);
-                }
-            }else{
-                this.loadData(this.state.page);
-            }
-        };
-    },
-    closeDesc(e, s) {
-        this.state.RowData={};
-        this.state.showDesc = e;
-        if (s) {
-            this.loadData(this.state.page);
-        };
-    },
-    closeAssign(e, s) {
-        this.state.assignData={};
-        this.state.assignVisible = e;
-        if (s) {
-            this.loadData(this.state.page);
-        };
-    },
-    search() {
-        this.loadData();
-    },
-    reset() {
-        this.state.nameSearch = '';
-        this.state.orderRefundSearch='';
-        this.state.releaseDate = [];
-        this.state.orderNoSearch='';
-        this.state.departmenttList=undefined;
-        this.state.refundStatus=undefined;
-        this.loadData();
-    },
-    searchSwitch() {
+      }.bind(this)
+    }).always(
+      function() {
         this.setState({
-            searchMore: !this.state.searchMore
+          loading: false
         });
-    },
-    render() { 
-        const { RangePicker } = DatePicker;
-        var departmentArr = this.state.departmentArr ||[];
-        return ( <div className="user-content">
-            <div className="content-title">
-                <span>退单管理</span>
-                </div>
-                <div className="user-search">
-                    <InputNumber min={0} max={2147483647} formatter={value => `${value&&!isNaN(value)?parseInt(value):''}`} style={{marginRight:10,width:120}} placeholder="退单编号"
-                        value={this.state.orderRefundSearch}
-                        onChange={(e) => { this.setState({ orderRefundSearch: e}); }} /> 
-                    <Input placeholder="订单编号"
-                        value={this.state.orderNoSearch}
-                        onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />  
-                    <Input placeholder="客户名称"
-                        value={this.state.nameSearch}
-                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
-                    <Select placeholder="订单部门"
-                        style={{ width: 150 ,marginRight:10}}
-                        value={this.state.departmenttList}
-                        onChange={(e) => { this.setState({ departmenttList: e }) }}>
-                        {
-                            departmentArr.map(function (item) {
-                                    return <Select.Option key={item.id} >{item.name}</Select.Option>
-                            })
-                        }
-                    </Select>
-                    <Select 
-                        onChange={(e)=>{this.setState({refundStatus:e})}} 
-                        style={{width:160,marginRight:5}} 
-                        placeholder="审核状态"
-                        value={this.state.refundStatus}>
-                        <Option value="0">未审核</Option>
-                        <Option value="1">审核通过</Option>
-                        <Option value="2">审核拒绝</Option>
-                    </Select>   
-                    <span style={{ marginRight:10}}>退单时间 :</span>
-                    <RangePicker
-                        value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
-                        this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
-                        onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
-                    <Button type="primary" onClick={this.search} style={{ marginLeft:10}}>搜索</Button>
-                    <Button onClick={this.reset}>重置</Button>
-                </div>
-                <div className="patent-table">
-                    <Spin spinning={this.state.loading}>
-                        <Table columns={this.state.columns}
-                            dataSource={this.state.dataSource}
-							scroll={{ x: 1500, y: 0 }}
-                            rowSelection={false}
-                            pagination={this.state.pagination}
-                            onRowClick={this.tableRowClick.bind(this)}
-                             />
-                    </Spin>
-                </div>
-                <Receivable
-                    title='退款记录'
-                    api='/api/admin/financial/addRefundFlow'
-                    data={this.state.assignData}
-                    showDesc={this.state.assignVisible}
-                    closeDesc={this.closeAssign.bind(this)}
-                />
-                <Examine 
-                    data={this.state.examineData}
-                    showDesc={this.state.examineVisible}
-                    closeDesc={this.closeExamine.bind(this)}
-                />
-                <OrderDesc
-                    data={this.state.RowData}
-                    showDesc={this.state.showDesc}
-                    closeDesc={this.closeDesc.bind(this)}
-                />
-
-        </div> )
+      }.bind(this)
+    );
+  },
+  getInitialState() {
+    return {
+      searchMore: true,
+      assignVisible: false,
+      releaseDate: [],
+      totalPage: 0,
+      assignData: [],
+      // 子组件改变的表格title数组
+      changeList: undefined,
+      boHuivisible: false,
+      selectedRowKeys: [],
+      selectedRows: [],
+      loading: false,
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function(page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function(total) {
+          return "共" + total + "条数据";
+        }
+      },
+      columns: [
+        {
+          title: "退单编号",
+          dataIndex: "id",
+          key: "id"
+          //   fixed: "left"
+        },
+        {
+          title: "申请退单时间",
+          dataIndex: "createTime",
+          key: "createTime"
+        },
+        {
+          title: "订单编号",
+          dataIndex: "orderNo",
+          key: "orderNo"
+        },
+        {
+          title: "客户名称",
+          dataIndex: "buyName",
+          key: "buyName"
+        },
+        {
+          title: "订单状态",
+          dataIndex: "orderStatus",
+          key: "orderStatus",
+          render: text => {
+            return getNewOrderStatus(text);
+          }
+        },
+        {
+          title: "订单负责人",
+          dataIndex: "saleName",
+          key: "saleName"
+        },
+        {
+          title: "结算状态",
+          dataIndex: "liquidationStatus",
+          key: "liquidationStatus",
+          render: text => {
+            return getLiquidationStatus(text);
+          }
+        },
+        {
+          title: "审批状态",
+          dataIndex: "refundStatus",
+          key: "refundStatus",
+          render: text => {
+            return getRefundStatus(text);
+          }
+        },
+        {
+          title: "操作",
+          dataIndex: "caozuo",
+          key: "caouzo",
+          render: (text, recard) => {
+            return (
+              <div>
+                {recard.refundStatus == 1 && (
+                  <Button
+                    type="primary"
+                    onClick={e => {
+                      e.stopPropagation(), this.evaluate(recard);
+                    }}
+                  >
+                    添加退款记录
+                  </Button>
+                )}
+                {recard.refundStatus == 0 && (
+                  <Button
+                    type="primary"
+                    onClick={e => {
+                      e.stopPropagation(), this.reject(recard);
+                    }}
+                  >
+                    审批
+                  </Button>
+                )}
+              </div>
+            );
+          }
+        }
+      ],
+      dataSource: [],
+      examineData: {},
+      searchTime: [,]
+    };
+  },
+  /* 添加收款记录 */
+  evaluate(recard) {
+    this.state.assignData = recard;
+    this.setState({
+      assignVisible: true
+    });
+  },
+  /* 驳回 */
+  reject(recard) {
+    this.setState({
+      examineData: recard,
+      examineVisible: true
+    });
+  },
+  componentWillMount() {
+    this.loadData();
+    this.departmentList();
+  },
+  tableRowClick(record) {
+    this.state.RowData = record;
+    this.setState({
+      showDesc: true
+    });
+  },
+  closeExamine(e, s, nub) {
+    this.state.examineData = {};
+    this.state.examineVisible = e;
+    if (s) {
+      if (nub == "2") {
+        if (
+          this.state.pagination.current == this.state.totalPage &&
+          this.state.pagination.total % 10 == 1
+        ) {
+          this.loadData(this.state.page - 1);
+        } else {
+          this.loadData(this.state.page);
+        }
+      } else {
+        this.loadData(this.state.page);
+      }
+    }
+  },
+  closeDesc(e, s) {
+    this.state.RowData = {};
+    this.state.showDesc = e;
+    if (s) {
+      this.loadData(this.state.page);
     }
-})
+  },
+  closeAssign(e, s) {
+    this.state.assignData = {};
+    this.state.assignVisible = e;
+    if (s) {
+      this.loadData(this.state.page);
+    }
+  },
+  search() {
+    this.loadData();
+  },
+  reset() {
+    this.state.nameSearch = "";
+    this.state.orderRefundSearch = "";
+    this.state.releaseDate = [];
+    this.state.orderNoSearch = "";
+    this.state.departmenttList = undefined;
+    this.state.refundStatus = undefined;
+    this.loadData();
+  },
+  searchSwitch() {
+    this.setState({
+      searchMore: !this.state.searchMore
+    });
+  },
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
+  render() {
+    const { RangePicker } = DatePicker;
+    var departmentArr = this.state.departmentArr || [];
+    return (
+      <div className="user-content">
+        <div className="content-title">
+          <span>退单管理</span>
+        </div>
+        <div className="user-search">
+          <InputNumber
+            min={0}
+            max={2147483647}
+            formatter={value =>
+              `${value && !isNaN(value) ? parseInt(value) : ""}`
+            }
+            style={{ marginRight: 10, width: 120 }}
+            placeholder="退单编号"
+            value={this.state.orderRefundSearch}
+            onChange={e => {
+              this.setState({ orderRefundSearch: e });
+            }}
+          />
+          <Input
+            placeholder="订单编号"
+            value={this.state.orderNoSearch}
+            onChange={e => {
+              this.setState({ orderNoSearch: e.target.value });
+            }}
+          />
+          <Input
+            placeholder="客户名称"
+            value={this.state.nameSearch}
+            onChange={e => {
+              this.setState({ nameSearch: e.target.value });
+            }}
+          />
+          <Select
+            placeholder="订单部门"
+            style={{ width: 150, marginRight: 10 }}
+            value={this.state.departmenttList}
+            onChange={e => {
+              this.setState({ departmenttList: e });
+            }}
+          >
+            {departmentArr.map(function(item) {
+              return <Select.Option key={item.id}>{item.name}</Select.Option>;
+            })}
+          </Select>
+          <Select
+            onChange={e => {
+              this.setState({ refundStatus: e });
+            }}
+            style={{ width: 160, marginRight: 5 }}
+            placeholder="审核状态"
+            value={this.state.refundStatus}
+          >
+            <Option value="0">未审核</Option>
+            <Option value="1">审核通过</Option>
+            <Option value="2">审核拒绝</Option>
+          </Select>
+          <span style={{ marginRight: 10 }}>退单时间 :</span>
+          <RangePicker
+            value={[
+              this.state.releaseDate[0]
+                ? moment(this.state.releaseDate[0])
+                : null,
+              this.state.releaseDate[1]
+                ? moment(this.state.releaseDate[1])
+                : null
+            ]}
+            onChange={(data, dataString) => {
+              this.setState({ releaseDate: dataString });
+            }}
+          />
+          <Button
+            type="primary"
+            onClick={this.search}
+            style={{ marginLeft: 10 }}
+          >
+            搜索
+          </Button>
+          <Button onClick={this.reset}>重置</Button>
+        </div>
+        <ChooseList
+          columns={this.state.columns}
+          changeFn={this.changeList}
+          changeList={this.state.changeList}
+          top={55}
+        />
+        <div className="patent-table">
+          <Spin spinning={this.state.loading}>
+            <Table
+              bordered
+              columns={
+                this.state.changeList == undefined
+                  ? this.state.columns
+                  : this.state.changeList
+              }
+              dataSource={this.state.dataSource}
+              scroll={{ x: 1500, y: 0 }}
+              rowSelection={false}
+              pagination={this.state.pagination}
+              onRowClick={this.tableRowClick.bind(this)}
+            />
+          </Spin>
+        </div>
+        <Receivable
+          title="退款记录"
+          api="/api/admin/financial/addRefundFlow"
+          data={this.state.assignData}
+          showDesc={this.state.assignVisible}
+          closeDesc={this.closeAssign.bind(this)}
+        />
+        <Examine
+          data={this.state.examineData}
+          showDesc={this.state.examineVisible}
+          closeDesc={this.closeExamine.bind(this)}
+        />
+        <OrderDesc
+          data={this.state.RowData}
+          showDesc={this.state.showDesc}
+          closeDesc={this.closeDesc.bind(this)}
+        />
+      </div>
+    );
+  }
+});
  
 export default TuiDan;

+ 336 - 266
js/component/manageCenter/financialManage/flowWater/myWater.jsx

@@ -6,282 +6,352 @@ import '../distribute/public.less';
 import {  Button, Input, Spin, Table, Switch,Select, message, DatePicker } from 'antd';
 import {getTransactionProject} from '@/tools';
 import WaterDesc from './waterDetail';
+import { ChooseList } from "../../order/orderNew/chooseList";
 
 const MyWater = React.createClass({
-    departmentList() {
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context + "/api/admin/organization/selectSuperId",
-			data: {},
-			success: function(data) {
-                let thedata = data.data;
-				let theArr=[];
-				if(!thedata) {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-					thedata = {};
-				}else{
-					thedata.map(function(item,index){
-						theArr.push({
-							key:index,
-							name:item.name,
-							id:item.id,
-						})
-					})
-				}
-				this.setState({
-					departmentArr:theArr,
-				})
-			}.bind(this),
-			}).always(function() {
-				this.setState({
-					loading: false
-				});
-			}.bind(this));
-	},
-    loadData(pageNo) {
-        this.state.data = [];
+  departmentList() {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/organization/selectSuperId",
+      data: {},
+      success: function(data) {
+        let thedata = data.data;
+        let theArr = [];
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+          thedata = {};
+        } else {
+          thedata.map(function(item, index) {
+            theArr.push({
+              key: index,
+              name: item.name,
+              id: item.id
+            });
+          });
+        }
         this.setState({
-            selectedRowKeys:[],
-            selectedRowKey:[],
-            page:pageNo,
-            loading: true
+          departmentArr: theArr
         });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/financial/myBillList",
-            data: {
-                pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,
-                payeeName: this.state.payeeNameSearch,
-                payerName:this.state.payerNameSearch,
-                startTime: this.state.releaseDate[0],
-                endTime: this.state.releaseDate[1],
-                orderNo:this.state.orderNo,
-                departmentId:this.state.departmentId,
-            },
-            success: function (data) {
-                let theArr = [];
-                if (!data.data || !data.data.list) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                    };
-                } else {
-                    for (let i = 0; i < data.data.list.length; i++) {
-                        let thisdata = data.data.list[i];
-                        theArr.push({
-                            key: i,
-		                    orderNo: thisdata.orderNo,
-		                    billNo:thisdata.billNo,
-		                    transactionAmount:thisdata.transactionAmount,
-		                    payeeName:thisdata.payeeName,
-		                    payerName:thisdata.payerName,
-		                    transactionSubject:thisdata.transactionSubject,
-		                    transactionChannel:thisdata.transactionChannel,
-                            financialPayTimes:thisdata.financialPayTimes?(new Date(thisdata.financialPayTimes)).toLocaleDateString():'',
-                            financialPayNo:thisdata.financialPayNo,
-		                    createrName:thisdata.createrName,
-		                    saleName:thisdata.saleName,
-							createTimes:thisdata.createTimes,
-                        });
-                    };
-                }
-                this.state.pagination.current = data.data.pageNo;
-                this.state.pagination.total = data.data.totalCount;
-                if(data.data&&data.data.list&&!data.data.list.length){
-					this.state.pagination.current=0
-					this.state.pagination.total=0
-				}
-                this.setState({
-                    dataSource: theArr,
-                    pagination: this.state.pagination
-                });
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
+      }.bind(this)
+    }).always(
+      function() {
+        this.setState({
+          loading: false
+        });
+      }.bind(this)
+    );
+  },
+  loadData(pageNo) {
+    this.state.data = [];
+    this.setState({
+      selectedRowKeys: [],
+      selectedRowKey: [],
+      page: pageNo,
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/financial/myBillList",
+      data: {
+        pageNo: pageNo || 1,
+        pageSize: this.state.pagination.pageSize,
+        payeeName: this.state.payeeNameSearch,
+        payerName: this.state.payerNameSearch,
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
+        orderNo: this.state.orderNo,
+        departmentId: this.state.departmentId
+      },
+      success: function(data) {
+        let theArr = [];
+        if (!data.data || !data.data.list) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          for (let i = 0; i < data.data.list.length; i++) {
+            let thisdata = data.data.list[i];
+            theArr.push({
+              key: i,
+              orderNo: thisdata.orderNo,
+              billNo: thisdata.billNo,
+              transactionAmount: thisdata.transactionAmount,
+              payeeName: thisdata.payeeName,
+              payerName: thisdata.payerName,
+              transactionSubject: thisdata.transactionSubject,
+              transactionChannel: thisdata.transactionChannel,
+              financialPayTimes: thisdata.financialPayTimes
+                ? new Date(thisdata.financialPayTimes).toLocaleDateString()
+                : "",
+              financialPayNo: thisdata.financialPayNo,
+              createrName: thisdata.createrName,
+              saleName: thisdata.saleName,
+              createTimes: thisdata.createTimes
             });
-        }.bind(this));
-    },
-    getInitialState() {
-        return {
-            searchMore: true,
-            releaseDate: [],
-            RowData:{},
-            selectedRowKeys: [],
-            selectedRows: [],
-            loading: false,
-            pagination: {
-                defaultCurrent: 1,
-                defaultPageSize: 10,
-                showQuickJumper: true,
-                pageSize: 10,
-                onChange: function (page) {
-                    this.loadData(page);
-                }.bind(this),
-                showTotal: function (total) {
-                    return '共' + total + '条数据';
-                }
-            },
-            columns: [
-                {
-                    title: '平台流水号',
-                    dataIndex: 'billNo',
-                    key: 'billNo',  
-					fixed: 'left'
-                },
-                {
-                    title: '金额(万元)',
-                    dataIndex: 'transactionAmount',
-                    key: 'transactionAmount',
-                },
-                {
-                    title: '收款方',
-                    dataIndex: 'payeeName',
-                    key: 'payeeName',
-                }, 
-                {
-                    title: '付款方',
-                    dataIndex: 'payerName',
-                    key: 'payerName',
-                },
-                {
-                    title: '流水科目',
-                    dataIndex: 'transactionSubject',
-                    key: 'transactionSubject',
-                    render: text => { return getTransactionProject(text)}
-                },
-                {
-                    title: '财务流水时间',
-                    dataIndex: 'financialPayTimes',
-                    key: 'financialPayTimes',
-                }, {
-                    title: '财务流水号',
-                    dataIndex: 'financialPayNo',
-                    key: 'financialPayNo'
-                },
-                {
-                    title: '订单编号',
-                    dataIndex: 'orderNo',
-                    key: 'orderNo'
-                },{
-                    title: '订单负责人',
-                    dataIndex: 'saleName',
-                    key: 'saleName'
-                },{
-					title: '创建时间',
-					dataIndex: 'createTimes',
-					key: 'createTimes'
-				}
-            ],
-            dataSource: [],
-            searchTime: [,]
+          }
+        }
+        this.state.pagination.current = data.data.pageNo;
+        this.state.pagination.total = data.data.totalCount;
+        if (data.data && data.data.list && !data.data.list.length) {
+          this.state.pagination.current = 0;
+          this.state.pagination.total = 0;
         }
-    },
-    componentWillMount() {
-        this.loadData();
-        this.departmentList();
-    },
-    tableRowClick(record, index) {
-        this.state.RowData = record;
         this.setState({
-            showDesc: true,
+          dataSource: theArr,
+          pagination: this.state.pagination
         });
-    },
-    closeDesc(e, s) {
-        this.state.RowData={};
-        this.state.showDesc = e;
-        if (s) {
-            this.loadData(this.state.page);
-        };
-    },
-    search() {
-        this.loadData();
-    },
-    reset() {
-        this.state.orderNo = '';
-        this.state.payeeNameSearch='';
-        this.state.releaseDate = [];
-        this.state.departmentId = undefined;
-        this.state.payerNameSearch='';
-        this.loadData();
-    },
-    searchSwitch() {
+      }.bind(this)
+    }).always(
+      function() {
         this.setState({
-            searchMore: !this.state.searchMore
+          loading: false
         });
-    },
-    render() { 
-        const rowSelection = {
-            selectedRowKeys: this.state.selectedRowKeys,
-            onChange: (selectedRowKeys, selectedRows) => {
-                this.setState({
-                    selectedRows: selectedRows.slice(-1),
-                    selectedRowKeys: selectedRowKeys.slice(-1)
-                });
-            }
-        };
-        const hasSelected = this.state.selectedRowKeys.length > 0;
-        const { RangePicker } = DatePicker;
-        var departmentArr =this.state.departmentArr || [];
-        return ( <div className="user-content">
-            <div className="content-title">
-                <span>我的流水订单</span>
-                </div>
-                <div className="user-search">
-                    <Input placeholder="订单编号"
-                        value={this.state.orderNo}
-                        onChange={(e) => { this.setState({ orderNo: e.target.value }); }} />
-                    <Input placeholder="收款方"
-                        value={this.state.payeeNameSearch}
-                        onChange={(e) => { this.setState({ payeeNameSearch: e.target.value }); }} /> 
-                    <Input placeholder="付款方"
-                        value={this.state.payerNameSearch}
-                        onChange={(e) => { this.setState({ payerNameSearch: e.target.value }); }} />  
-                     <Select placeholder="订单部门"
-                        style={{ width: 150 ,marginRight:10}}
-                        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 style={{ marginRight:10}}>流水时间 :</span>
-	                <RangePicker
-	                    value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
-	                    this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
-	                    onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
-                    <Button type="primary" onClick={this.search} style={{ marginLeft:10}}>搜索</Button>
-                    <Button onClick={this.reset}>重置</Button>
-                </div>
-                <div className="patent-table">
-                    <Spin spinning={this.state.loading}>
-                        <Table columns={this.state.columns}
-                            dataSource={this.state.dataSource}
-							scroll={{ x: 1500, y: 0 }}
-                            rowSelection={false}
-                            pagination={this.state.pagination}
-                            onRowClick={this.tableRowClick}
-                             />
-                    </Spin>
-                </div>
-                <WaterDesc
-                    data={this.state.RowData}
-                    showDesc={this.state.showDesc}
-                    closeDesc={this.closeDesc.bind(this)}
-                />
-        </div> )
+      }.bind(this)
+    );
+  },
+  getInitialState() {
+    return {
+      searchMore: true,
+      releaseDate: [],
+      RowData: {},
+      selectedRowKeys: [],
+      selectedRows: [],
+      loading: false,
+      // 子组件改变的表格title数组
+      changeList: undefined,
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function(page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function(total) {
+          return "共" + total + "条数据";
+        }
+      },
+      columns: [
+        {
+          title: "平台流水号",
+          dataIndex: "billNo",
+          key: "billNo"
+          //   fixed: "left"
+        },
+        {
+          title: "金额(万元)",
+          dataIndex: "transactionAmount",
+          key: "transactionAmount"
+        },
+        {
+          title: "收款方",
+          dataIndex: "payeeName",
+          key: "payeeName"
+        },
+        {
+          title: "付款方",
+          dataIndex: "payerName",
+          key: "payerName"
+        },
+        {
+          title: "流水科目",
+          dataIndex: "transactionSubject",
+          key: "transactionSubject",
+          render: text => {
+            return getTransactionProject(text);
+          }
+        },
+        {
+          title: "财务流水时间",
+          dataIndex: "financialPayTimes",
+          key: "financialPayTimes"
+        },
+        {
+          title: "财务流水号",
+          dataIndex: "financialPayNo",
+          key: "financialPayNo"
+        },
+        {
+          title: "订单编号",
+          dataIndex: "orderNo",
+          key: "orderNo"
+        },
+        {
+          title: "订单负责人",
+          dataIndex: "saleName",
+          key: "saleName"
+        },
+        {
+          title: "创建时间",
+          dataIndex: "createTimes",
+          key: "createTimes"
+        }
+      ],
+      dataSource: [],
+      searchTime: [,]
+    };
+  },
+  componentWillMount() {
+    this.loadData();
+    this.departmentList();
+  },
+  tableRowClick(record, index) {
+    this.state.RowData = record;
+    this.setState({
+      showDesc: true
+    });
+  },
+  closeDesc(e, s) {
+    this.state.RowData = {};
+    this.state.showDesc = e;
+    if (s) {
+      this.loadData(this.state.page);
     }
-})
+  },
+  search() {
+    this.loadData();
+  },
+  reset() {
+    this.state.orderNo = "";
+    this.state.payeeNameSearch = "";
+    this.state.releaseDate = [];
+    this.state.departmentId = undefined;
+    this.state.payerNameSearch = "";
+    this.loadData();
+  },
+  searchSwitch() {
+    this.setState({
+      searchMore: !this.state.searchMore
+    });
+  },
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
+  render() {
+    const rowSelection = {
+      selectedRowKeys: this.state.selectedRowKeys,
+      onChange: (selectedRowKeys, selectedRows) => {
+        this.setState({
+          selectedRows: selectedRows.slice(-1),
+          selectedRowKeys: selectedRowKeys.slice(-1)
+        });
+      }
+    };
+    const hasSelected = this.state.selectedRowKeys.length > 0;
+    const { RangePicker } = DatePicker;
+    var departmentArr = this.state.departmentArr || [];
+    return (
+      <div className="user-content">
+        <div className="content-title">
+          <span>我的流水订单</span>
+        </div>
+        <div className="user-search">
+          <Input
+            placeholder="订单编号"
+            value={this.state.orderNo}
+            onChange={e => {
+              this.setState({ orderNo: e.target.value });
+            }}
+          />
+          <Input
+            placeholder="收款方"
+            value={this.state.payeeNameSearch}
+            onChange={e => {
+              this.setState({ payeeNameSearch: e.target.value });
+            }}
+          />
+          <Input
+            placeholder="付款方"
+            value={this.state.payerNameSearch}
+            onChange={e => {
+              this.setState({ payerNameSearch: e.target.value });
+            }}
+          />
+          <Select
+            placeholder="订单部门"
+            style={{ width: 150, marginRight: 10 }}
+            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 style={{ marginRight: 10 }}>流水时间 :</span>
+          <RangePicker
+            value={[
+              this.state.releaseDate[0]
+                ? moment(this.state.releaseDate[0])
+                : null,
+              this.state.releaseDate[1]
+                ? moment(this.state.releaseDate[1])
+                : null
+            ]}
+            onChange={(data, dataString) => {
+              this.setState({ releaseDate: dataString });
+            }}
+          />
+          <Button
+            type="primary"
+            onClick={this.search}
+            style={{ marginLeft: 10 }}
+          >
+            搜索
+          </Button>
+          <Button onClick={this.reset}>重置</Button>
+        </div>
+        <ChooseList
+          columns={this.state.columns}
+          changeFn={this.changeList}
+          changeList={this.state.changeList}
+          top={55}
+        />
+        <div className="patent-table">
+          <Spin spinning={this.state.loading}>
+            <Table
+              bordered
+              columns={
+                this.state.changeList == undefined
+                  ? this.state.columns
+                  : this.state.changeList
+              }
+              dataSource={this.state.dataSource}
+              scroll={{ x: 1500, y: 0 }}
+              rowSelection={false}
+              pagination={this.state.pagination}
+              onRowClick={this.tableRowClick}
+            />
+          </Spin>
+        </div>
+        <WaterDesc
+          data={this.state.RowData}
+          showDesc={this.state.showDesc}
+          closeDesc={this.closeDesc.bind(this)}
+        />
+      </div>
+    );
+  }
+});
  
 export default MyWater;

+ 3 - 2
js/component/manageCenter/order/orderNew/addService.jsx

@@ -155,6 +155,7 @@ const NewService = Form.create()(
         lookflowList: [],
         contractUrl: [],
         applicationUrl: [],
+        changeAmount: 0,
         active: {
           applySign: false
         },
@@ -1289,7 +1290,7 @@ const NewService = Form.create()(
         message.warning("当前订单流程不能发起变更!");
         return false;
       }
-      if(this.state.changeAmount == "") {
+      if(this.state.changeAmount == "" || this.state.changeAmount == undefined || this.state.changeAmount.trim() == "") {
         message.warning("申请退款金额不能为空!");
         return false;
       }
@@ -1355,7 +1356,7 @@ const NewService = Form.create()(
         voucherUrl: [],
         totalAmount: undefined,
         settlementAmount: undefined,
-        changeAmount: undefined,
+        changeAmount: 0,
         applicant: undefined,
         depNameChange: undefined,
         typeChange: 0

+ 188 - 0
js/component/manageCenter/order/orderNew/chooseList.jsx

@@ -0,0 +1,188 @@
+import React, { Component } from "react";
+import { Form, Upload, Modal, Button, message, Table, Input, Checkbox } from "antd";
+import "../../../../../css/base.less"
+
+class ChooseList extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      visible: false,
+      confirmLoading: false,
+      columns: [],
+      // 复选框数组
+      options: [],
+      defaultValue: [],
+      // 被选中的数组
+      checkedValues: [],
+      flag: false
+    };
+    this.showModal = this.showModal.bind(this);
+    this.handleOk = this.handleOk.bind(this);
+    this.handleCancel = this.handleCancel.bind(this);
+    this.onChange = this.onChange.bind(this);
+    this.allChange = this.allChange.bind(this);
+    this.load = this.load.bind(this);
+  }
+  // componentWillReceiveProps(nextProp) {
+  //   this.setState({
+
+  //   })
+  // }
+  componentDidMount() {
+    this.load()
+  }
+
+  load() {
+    // console.log("2222", this.props);
+    const options = [];
+    const defaultValue = [];
+    this.props.columns.forEach(item => {
+      const obj = {
+        label: item.title,
+        value: item.title
+      };
+      // const all = {
+      //   label: "全选",
+      //   value: "全选"
+      // }
+      options.push(obj);
+      // options.unshift(all)
+      defaultValue.push(item.title);
+      // defaultValue.unshift(item.label);
+    });
+    this.setState({
+      columns: this.props.columns,
+      options: options,
+      defaultValue,
+      checkedValues: defaultValue,
+      flag: true
+    });
+  }
+
+  onChange(checkedValues) {
+    this.setState({
+      checkedValues
+    });
+    // console.log("checked = ", this.state.checkedValues);
+    let flag = false
+    // checkedValues.forEach((v) => {
+    //   this.props.columns.forEach((i) => {
+    //     if( v != i.title ) {
+    //       flag = false
+    //       return
+    //     }
+    //     flag = true;
+    //   })
+    // })
+    if(checkedValues.length == this.props.columns.length) {
+      flag = true
+    }
+    this.setState({
+      flag
+    })
+  }
+
+  showModal() {
+    this.setState({
+      visible: true
+    });
+    if(this.props.changeList != undefined) {
+      const arr = []
+      this.props.changeList.forEach((i) => {
+        arr.push(i.title)
+      })
+      let flag = false
+      if(arr.length == this.state.columns.length) {
+        flag = true
+      }
+      this.setState({
+        checkedValues: arr,
+        flag
+      })
+    }else {
+      const arr = [];
+      this.props.columns.forEach(i => {
+        arr.push(i.title);
+      });
+      let flag = false;
+      if (arr.length == this.state.columns.length) {
+        flag = true;
+      }
+      this.setState({
+        checkedValues: arr,
+        flag
+      });
+    }
+  }
+
+  handleOk() {
+    this.setState({
+      confirmLoading: true
+    });
+    setTimeout(() => {
+      this.setState({
+        visible: false,
+        confirmLoading: false
+      });
+      this.props.changeFn(this.state.checkedValues);
+    }, 0);
+  }
+
+  handleCancel() {
+    // console.log("Clicked cancel button");
+    // this.load()
+    this.setState({
+      visible: false
+    });
+  }
+
+  allChange() {
+    // console.log(123);
+    if (this.state.flag) {
+      this.setState({
+        checkedValues: []
+      });
+    }else {
+      this.setState({
+        checkedValues: this.state.defaultValue
+      });
+    }
+    this.setState({
+      flag: !this.state.flag
+    })
+    
+  }
+
+  render() {
+    const { visible, confirmLoading, columns } = this.state;
+    return (
+      // style={{ position: "absolute", right: "187px", top: this.props.top }}
+      <div style={{ display: this.props.display }}>
+        <Button type="primary" onClick={this.showModal} style={{ marginBottom: 10 }}>
+          更改表格显示数据
+        </Button>
+        <Modal
+          title="更改表格显示数据"
+          visible={visible}
+          onOk={this.handleOk}
+          confirmLoading={confirmLoading}
+          onCancel={this.handleCancel}
+        >
+          <div>
+            <Checkbox onChange={this.allChange} checked={this.state.flag}>
+              全选
+            </Checkbox>
+            <Checkbox.Group
+              options={this.state.options}
+              defaultValue={this.state.defaultValue}
+              onChange={this.onChange}
+              className={"chooseList"}
+              value={this.state.checkedValues}
+            />
+          </div>
+        </Modal>
+      </div>
+    );
+  }
+}
+export { ChooseList };

+ 34 - 8
js/component/manageCenter/order/orderNew/contractCwzj.js

@@ -14,6 +14,7 @@ import "./customer.less";
 import { ChangeDetail } from "./changeComponent/changeDetailCwzj.js";
 import { SearchInput } from "./changeComponent/searchInput.js";
 import OrderDetail from "./changeComponent/orderDetail";
+import { ChooseList } from "./chooseList.jsx";
 
 const contractChange = Form.create()(
   React.createClass({
@@ -253,6 +254,8 @@ const contractChange = Form.create()(
             }
           }
         ],
+        // 子组件改变的表格title数组
+        changeList: undefined,
         columnsrizhi: [
           {
             title: "流程",
@@ -405,8 +408,7 @@ const contractChange = Form.create()(
         }.bind(this)
       });
 
-
-        $.ajax({
+      $.ajax({
         method: "get",
         dataType: "json",
         crossDomain: false,
@@ -417,16 +419,15 @@ const contractChange = Form.create()(
           orderNo: this.state.orderNo
         },
         success: data => {
-          if(!data) return
-          data.data.forEach((item) => {
-            item.load = true
-          })
+          if (!data) return;
+          data.data.forEach(item => {
+            item.load = true;
+          });
           this.setState({
             refundInvoice: data.data
           });
         }
       });
-
     },
 
     //订单详情
@@ -975,6 +976,19 @@ const contractChange = Form.create()(
         visible: false
       });
     },
+    changeList(arr) {
+      const newArr = [];
+      this.state.columns.forEach(item => {
+        arr.forEach(val => {
+          if (val === item.title) {
+            newArr.push(item);
+          }
+        });
+      });
+      this.setState({
+        changeList: newArr
+      });
+    },
     render() {
       const formItemLayout = {
         labelCol: { span: 8 },
@@ -989,11 +1003,23 @@ const contractChange = Form.create()(
           </div>
           <div className="user-search">
             <SearchInput search={this.search} />
+
+            <ChooseList
+              columns={this.state.columns}
+              changeFn={this.changeList}
+              changeList={this.state.changeList}
+              top={65}
+            />
+
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
                   bordered
-                  columns={this.state.columns}
+                  columns={
+                    this.state.changeList == undefined
+                      ? this.state.columns
+                      : this.state.changeList
+                  }
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
                   onRowClick={this.tableRowClick}

+ 42 - 13
js/component/manageCenter/order/orderNew/contractCwzy.js

@@ -14,6 +14,7 @@ import "./customer.less";
 import { ChangeDetail } from "./changeComponent/changeDetailCwzy.js";
 import { SearchInput } from "./changeComponent/searchInput.js";
 import OrderDetail from "./changeComponent/orderDetail";
+import { ChooseList } from "./chooseList.jsx";
 
 const contractChange = Form.create()(
   React.createClass({
@@ -64,7 +65,10 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
-                processStateText:getProcessStatusNew(thisdata.processState, thisdata.status)
+                processStateText: getProcessStatusNew(
+                  thisdata.processState,
+                  thisdata.status
+                )
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -250,6 +254,8 @@ const contractChange = Form.create()(
             }
           }
         ],
+        // 子组件改变的表格title数组
+        changeList: undefined,
         columnsrizhi: [
           {
             title: "流程",
@@ -360,7 +366,7 @@ const contractChange = Form.create()(
               contractNo: this.state.contractNo
             });
             // console.log("888",data);
-            
+
             this.setState({
               contractData: thisdata,
               voucherUrl: thisdata.voucherUrl
@@ -387,9 +393,9 @@ const contractChange = Form.create()(
           orderNo: this.state.orderNo
         },
         success: function(data) {
-          if(!data.data) return
-          let proTotal = 0
-          let invTotal = 0
+          if (!data.data) return;
+          let proTotal = 0;
+          let invTotal = 0;
           data.data.bill.forEach(item => {
             proTotal += item.transactionAmount;
           });
@@ -415,16 +421,15 @@ const contractChange = Form.create()(
           orderNo: this.state.orderNo
         },
         success: data => {
-          if(!data) return
-          data.data.forEach((item) => {
-            item.load = true
-          })
+          if (!data) return;
+          data.data.forEach(item => {
+            item.load = true;
+          });
           this.setState({
             refundInvoice: data.data
           });
         }
       });
-
     },
 
     //订单详情
@@ -575,7 +580,6 @@ const contractChange = Form.create()(
       });
     },
 
-
     search(obj) {
       this.setState(
         {
@@ -997,6 +1001,19 @@ const contractChange = Form.create()(
         visible: false
       });
     },
+    changeList(arr) {
+      const newArr = [];
+      this.state.columns.forEach(item => {
+        arr.forEach(val => {
+          if (val === item.title) {
+            newArr.push(item);
+          }
+        });
+      });
+      this.setState({
+        changeList: newArr
+      });
+    },
     render() {
       const formItemLayout = {
         labelCol: { span: 8 },
@@ -1005,17 +1022,29 @@ const contractChange = Form.create()(
       const FormItem = Form.Item;
       const { TabPane } = Tabs;
       return (
-        <div className="user-content">
+        <div className="user-content" style={{ position: "relative" }}>
           <div className="content-title">
             <span>合同变更审核订单</span>
           </div>
           <div className="user-search">
             <SearchInput search={this.search} />
+
+            <ChooseList
+              columns={this.state.columns}
+              changeFn={this.changeList}
+              changeList={this.state.changeList}
+              top={55}
+            />
+
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
                   bordered
-                  columns={this.state.columns}
+                  columns={
+                    this.state.changeList == undefined
+                      ? this.state.columns
+                      : this.state.changeList
+                  }
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
                   onRowClick={this.tableRowClick}

+ 45 - 17
js/component/manageCenter/order/orderNew/contractYxy.js

@@ -17,6 +17,7 @@ import { ChangeDetail } from "./changeComponent/changeDetailYxy.js";
 import AddOrders from "./addorders.js";
 import OrderDetail from "./changeComponent/orderDetail";
 import ChangeApply from "./changeComponent/changeApply";
+import { ChooseList } from "./chooseList.jsx";
 
 const contractChange = Form.create()(
   React.createClass({
@@ -129,21 +130,21 @@ const contractChange = Form.create()(
           }
         },
         columns: [
-          {
-            title: "订单编号",
-            dataIndex: "orderNo",
-            key: "orderNo"
-          },
-          {
-            title: "提交时间",
-            dataIndex: "createTimes",
-            key: "createTimes"
-          },
-          {
-            title: "客户名称",
-            dataIndex: "nickname",
-            key: "nickname"
-          },
+            {
+              title: "订单编号",
+              dataIndex: "orderNo",
+              key: "orderNo"
+            },
+            {
+              title: "提交时间",
+              dataIndex: "createTimes",
+              key: "createTimes"
+            },
+            {
+              title: "客户名称",
+              dataIndex: "nickname",
+              key: "nickname"
+            },
           {
             title: "订单类型",
             dataIndex: "orderType",
@@ -255,6 +256,8 @@ const contractChange = Form.create()(
             }
           }
         ],
+        // 子组件改变的表格title数组
+        changeList: undefined,
         columnsrizhi: [
           {
             title: "流程",
@@ -987,6 +990,19 @@ const contractChange = Form.create()(
         visible: false
       });
     },
+    changeList(arr) {
+      const newArr = []
+      this.state.columns.forEach((item) => {
+        arr.forEach((val) => {
+          if(val === item.title) {
+            newArr.push(item)
+          }
+        })
+      })
+      this.setState({
+        changeList: newArr
+      })
+    },
     render() {
       const formItemLayout = {
         labelCol: { span: 8 },
@@ -995,17 +1011,29 @@ const contractChange = Form.create()(
       const FormItem = Form.Item;
       const { TabPane } = Tabs;
       return (
-        <div className="user-content">
+        <div className="user-content" style={{ position: "relative" }}>
           <div className="content-title">
             <span>合同变更审核订单</span>
           </div>
           <div className="user-search">
             <SearchInput search={this.search} />
+
+            <ChooseList
+              columns={this.state.columns}
+              changeFn={this.changeList}
+              changeList={this.state.changeList}
+              top={65}
+            />
+
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
                   bordered
-                  columns={this.state.columns}
+                  columns={
+                    this.state.changeList == undefined
+                      ? this.state.columns
+                      : this.state.changeList
+                  }
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
                   onRowClick={this.tableRowClick}

+ 1 - 1
package.json

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