Browse Source

报销总计

dev01 1 year ago
parent
commit
7d590beea4

File diff suppressed because it is too large
+ 601 - 576
js/component/manageCenter/customer/customerManagement/adminCustomerStatistics.jsx


+ 8 - 2
js/component/manageCenter/customer/publicSummary/index.jsx

@@ -50,9 +50,15 @@ class PublicSummary extends Component {
           key: "userName",
           width: 150,
           fixed: "left",
-          render: (text) => {
+          render: (text, record) => {
             return (
-              <div>{text}</div>
+              <div>
+                <div>{text}</div>
+                <div style={{ color: ["red", "green"][record.signBills] }}>
+                  {["未签单", "已签单"][record.signBills]}
+                  {record.signBills == 1 && `(${record.signTime})`}
+                </div>
+              </div >
             );
           },
         },

+ 223 - 221
js/component/manageCenter/customer/statistics/departmentStatistics/customerDetails.jsx

@@ -4,242 +4,244 @@ import PropTypes from 'prop-types';
 import $ from "jquery/src/ajax";
 
 class CustomerDetails extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            loading: false,
-            columns: [{
-                title: '客户名称',
-                dataIndex: 'name',
-                key: 'name'
-            }, {
-                title: '来源',
-                dataIndex: 'sourceName',
-                key: 'sourceName',
-                width: 75,
-            }, {
-                title: '联系人(部门/职务)',
-                dataIndex: 'contacts',
-                key: 'contacts',
-                width: 155,
-                render: (text, record) => {
-                    if (!text) { return '' }
-                    let str = text + '(' + (record.contactsDep ? record.contactsDep : ' ') + '/' + (record.contactsPosition ? record.contactsPosition : ' ') + ')';
-                    return (
-                        <Tooltip title={str}>
-                            <div style={{
-                                maxWidth: '155px',
-                                overflow: 'hidden',
-                                textOverflow: "ellipsis",
-                                whiteSpace: 'nowrap',
-                            }}>{str}</div>
-                        </Tooltip>
-                    )
-                }
-            }, {
-                title: '联系人电话',
-                dataIndex: 'contactMobile',
-                key: 'contactMobile'
-            }, {
-                title: '创建时间',
-                dataIndex: 'createTime',
-                key: 'createTime',
-                width: 145,
-            }, {
-                title: '跟进时间',
-                dataIndex: 'followTime',
-                key: 'followTime',
-                width: 145,
-            }, {
-                title: '企业主营',
-                dataIndex: 'businessScope',
-                key: 'businessScope',
-                width: 200,
-                render: (text) => {
-                    return (
-                        <Tooltip title={text}>
-                            <div style={{
-                                maxWidth: '200px',
-                                overflow: 'hidden',
-                                textOverflow: "ellipsis",
-                                whiteSpace: 'nowrap',
-                            }}>{text}</div>
-                        </Tooltip>
-                    )
-                }
-            }, {
-                title: '意向合作',
-                dataIndex: 'intendedProject',
-                key: 'intendedProject',
-                width: 200,
-                render: (text) => {
-                    return (
-                        <Tooltip title={text}>
-                            <div style={{
-                                maxWidth: '200px',
-                                overflow: 'hidden',
-                                textOverflow: "ellipsis",
-                                whiteSpace: 'nowrap',
-                            }}>{text}</div>
-                        </Tooltip>
-                    )
-                }
-            },],
-            pagination: {
-                defaultCurrent: 1,
-                defaultPageSize: 10,
-                showQuickJumper: true,
-                pageSize: 10,
-                onChange: function (page) {
-                    this.loadData(page);
-                }.bind(this),
-                showTotal: function (total) {
-                    return '共' + total + '条数据';
-                }
-            }
+  constructor(props) {
+    super(props);
+    this.state = {
+      loading: false,
+      columns: [{
+        title: '客户名称',
+        dataIndex: 'name',
+        key: 'name'
+      }, {
+        title: '来源',
+        dataIndex: 'sourceName',
+        key: 'sourceName',
+        width: 75,
+      }, {
+        title: '联系人(部门/职务)',
+        dataIndex: 'contacts',
+        key: 'contacts',
+        width: 155,
+        render: (text, record) => {
+          if (!text) { return '' }
+          let str = text + '(' + (record.contactsDep ? record.contactsDep : ' ') + '/' + (record.contactsPosition ? record.contactsPosition : ' ') + ')';
+          return (
+            <Tooltip title={str}>
+              <div style={{
+                maxWidth: '155px',
+                overflow: 'hidden',
+                textOverflow: "ellipsis",
+                whiteSpace: 'nowrap',
+              }}>{str}</div>
+            </Tooltip>
+          )
+        }
+      }, {
+        title: '联系人电话',
+        dataIndex: 'contactMobile',
+        key: 'contactMobile'
+      }, {
+        title: '创建时间',
+        dataIndex: 'createTime',
+        key: 'createTime',
+        width: 145,
+      }, {
+        title: '跟进时间',
+        dataIndex: 'followTime',
+        key: 'followTime',
+        width: 145,
+      }, {
+        title: '企业主营',
+        dataIndex: 'businessScope',
+        key: 'businessScope',
+        width: 200,
+        render: (text) => {
+          return (
+            <Tooltip title={text}>
+              <div style={{
+                maxWidth: '200px',
+                overflow: 'hidden',
+                textOverflow: "ellipsis",
+                whiteSpace: 'nowrap',
+              }}>{text}</div>
+            </Tooltip>
+          )
+        }
+      }, {
+        title: '意向合作',
+        dataIndex: 'intendedProject',
+        key: 'intendedProject',
+        width: 200,
+        render: (text) => {
+          return (
+            <Tooltip title={text}>
+              <div style={{
+                maxWidth: '200px',
+                overflow: 'hidden',
+                textOverflow: "ellipsis",
+                whiteSpace: 'nowrap',
+              }}>{text}</div>
+            </Tooltip>
+          )
+        }
+      },],
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function (page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function (total) {
+          return '共' + total + '条数据';
         }
-        this.loadData = this.loadData.bind(this);
-        this.isView = this.isView.bind(this);
+      }
     }
+    this.loadData = this.loadData.bind(this);
+    this.isView = this.isView.bind(this);
+  }
 
-    componentDidMount() {
-        this.loadData();
-    }
+  componentDidMount() {
+    this.loadData();
+  }
 
-    loadData(pageNo) {
-        this.setState({
-            loading: true
-        })
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/customer/selectAdminCustomerList",
-            data: {
-                pageNo: pageNo || 1,
-                pageSize: this.state.pagination.pageSize,
-                aid: this.props.aid,
-                type: this.props.type,                       //0 所有 1新增 2领取 3已签 4面谈
-                startTime: this.props.startTime,
-                endTime: this.props.endTime,
-            },
-            success: function (data) {
-                let theArr = [];
-                if (data.error.length || 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];
-                        thisdata.key = i;
-                        theArr.push(thisdata);
-                    };
-                    this.state.pagination.current = pageNo;
-                    this.state.pagination.total = data.data.totalCount;
-                };
-                if (!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));
-    }
-    // 判断是否有权限查看详情
-    isView() {
-        // 11=运营管理,12=总裁助理,13=总裁
-        let iskeep =
-            window.adminData.shiroList.indexOf("11") != -1 ||
-            window.adminData.shiroList.indexOf("12") != -1 ||
-            window.adminData.shiroList.indexOf("13") != -1
-        // 
-        let isName = this.props.aName.indexOf("曹津") != -1
-        if (iskeep && isName) {
-            return false
+  loadData(pageNo) {
+    this.setState({
+      loading: true
+    })
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/selectAdminCustomerList",
+      data: {
+        pageNo: pageNo || 1,
+        pageSize: this.state.pagination.pageSize,
+        aid: this.props.aid,
+        type: this.props.type,                       //0 所有 1新增 2领取 3已签 4面谈
+        startTime: this.props.startTime,
+        endTime: this.props.endTime,
+      },
+      success: function (data) {
+        let theArr = [];
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          };
         } else {
-            return true
+          for (let i = 0; i < data.data.list.length; i++) {
+            let thisdata = data.data.list[i];
+            thisdata.key = i;
+            theArr.push(thisdata);
+          };
+          this.state.pagination.current = pageNo;
+          this.state.pagination.total = data.data.totalCount;
+        };
+        if (!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));
+  }
+  // 判断是否有权限查看详情
+  isView() {
+    // 11=运营管理,12=总裁助理,13=总裁
+    let iskeep =
+      window.adminData.shiroList.indexOf("11") != -1 ||
+      window.adminData.shiroList.indexOf("12") != -1 ||
+      window.adminData.shiroList.indexOf("13") != -1
+    // 
+    let isName = this.props.aName.indexOf("曹津") != -1
+    if (iskeep && isName) {
+      return false
+    } else {
+      return true
     }
+  }
 
-    render() {
-        return (
-            <div>
-                <Modal
-                    maskClosable={true}
-                    visible={this.props.visible}
-                    onOk={this.props.onCancel}
-                    onCancel={this.props.onCancel}
-                    width='1300px'
-                    title={
-                        <span>
-                            <span style={{ marginRight: '15px' }}>客户详情</span>
-                            <Tag color="#f50">{this.props.aName}</Tag>
-                            <Tag color="#108ee9">
-                                {
-                                    this.props.type === 0 ?
-                                        '私有客户' :
-                                        this.props.type === 1 ?
-                                            '外联客户' :
-                                            this.props.type === 2 ?
-                                                '签单客户' :
-                                                this.props.type === 3 ?
-                                                    '私有新增客户' :
-                                                    this.props.type === 4 ?
-                                                        '外联新增客户' :
-                                                        this.props.type === 5 ?
-                                                            '私有面谈客户' :
-                                                            this.props.type === 6 ?
-                                                                '外联面谈客户' :
-                                                                this.props.type === 7 ?
-                                                                    '私有领取客户' : ''
-                                }
-                            </Tag>
-                        </span>
-                    }
-                    footer=''
-                    className="admin-desc-content">
-                    <div className="patent-table">
-                        <Spin spinning={this.state.loading}>
-                            {
-                                this.isView()
-                                    ? <Table
-                                        columns={this.state.columns}
-                                        dataSource={this.state.dataSource}
-                                        pagination={this.state.pagination}
-                                    />
-                                    : <div style={{ padding: "40px 0", textAlign: "center", color: "red", fontSize: "20px" }}>
-                                        暂无权限查看
-                                    </div>
+  render() {
+    return (
+      <div>
+        <Modal
+          maskClosable={true}
+          visible={this.props.visible}
+          onOk={this.props.onCancel}
+          onCancel={this.props.onCancel}
+          width='1300px'
+          title={
+            <span>
+              <span style={{ marginRight: '15px' }}>客户详情</span>
+              <Tag color="#f50">{this.props.aName}</Tag>
+              <Tag color="#108ee9">
+                {
+                  this.props.type === 0 ?
+                    '私有客户' :
+                    this.props.type === 1 ?
+                      '外联客户' :
+                      this.props.type === 2 ?
+                        '签单客户' :
+                        this.props.type === 3 ?
+                          '私有新增客户' :
+                          this.props.type === 4 ?
+                            '外联新增客户' :
+                            this.props.type === 5 ?
+                              '私有面谈客户' :
+                              this.props.type === 6 ?
+                                '外联面谈客户' :
+                                this.props.type === 7 ?
+                                  '私有领取客户' :
+                                  this.props.type === 8 ?
+                                    '私有转交客户' : ''
+                }
+              </Tag>
+            </span>
+          }
+          footer=''
+          className="admin-desc-content">
+          <div className="patent-table">
+            <Spin spinning={this.state.loading}>
+              {
+                this.isView()
+                  ? <Table
+                    columns={this.state.columns}
+                    dataSource={this.state.dataSource}
+                    pagination={this.state.pagination}
+                  />
+                  : <div style={{ padding: "40px 0", textAlign: "center", color: "red", fontSize: "20px" }}>
+                    暂无权限查看
+                  </div>
 
-                            }
-                        </Spin>
-                    </div>
-                </Modal>
-            </div>
-        );
-    }
+              }
+            </Spin>
+          </div>
+        </Modal>
+      </div>
+    );
+  }
 }
 
 CustomerDetails.propTypes = {
-    visible: PropTypes.bool,
-    onCancel: PropTypes.func,
-    aid: PropTypes.number,      //员工ID
-    type: PropTypes.number,     //列表类型 客户总数 成交客户总数 新增客户数等等
-    startTime: PropTypes.string, //开始时间
-    endTime: PropTypes.string,   //结束时间
+  visible: PropTypes.bool,
+  onCancel: PropTypes.func,
+  aid: PropTypes.number,      //员工ID
+  type: PropTypes.number,     //列表类型 客户总数 成交客户总数 新增客户数等等
+  startTime: PropTypes.string, //开始时间
+  endTime: PropTypes.string,   //结束时间
 }
 
 CustomerDetails.defaultProps = {
-    visible: false,
-    onCancel: () => { }
+  visible: false,
+  onCancel: () => { }
 }
 
 export default CustomerDetails;

+ 39 - 13
js/component/manageCenter/customer/statistics/departmentStatistics/index.jsx

@@ -83,9 +83,9 @@ class DepartmentStatistics extends Component {
           },
         },
         {
-          title: "外联数",
-          dataIndex: "channelCount",
-          key: "channelCount",
+          title: "私有新增数",
+          dataIndex: "newCount",
+          key: "newCount",
           className: 'tableRowStyle',
           width: 120,
           render: (text, record) => {
@@ -97,9 +97,9 @@ class DepartmentStatistics extends Component {
                     e.stopPropagation();
                     this.setState({
                       customerVisible: true,
-                      aid: record.aid,
                       aName: record.aName,
-                      type: 1,
+                      aid: record.aid,
+                      type: 3,
                     })
                   }
                 }}>
@@ -109,9 +109,9 @@ class DepartmentStatistics extends Component {
           },
         },
         {
-          title: "签单数",
-          dataIndex: "signCount",
-          key: "signCount",
+          title: "私有转交数",
+          dataIndex: "transferCount",
+          key: "transferCount",
           className: 'tableRowStyle',
           width: 120,
           render: (text, record) => {
@@ -125,7 +125,7 @@ class DepartmentStatistics extends Component {
                       customerVisible: true,
                       aName: record.aName,
                       aid: record.aid,
-                      type: 2,
+                      type: 8,
                     })
                   }
                 }}>
@@ -135,9 +135,35 @@ class DepartmentStatistics extends Component {
           },
         },
         {
-          title: "私有新增数",
-          dataIndex: "newCount",
-          key: "newCount",
+          title: "外联数",
+          dataIndex: "channelCount",
+          key: "channelCount",
+          className: 'tableRowStyle',
+          width: 120,
+          render: (text, record) => {
+            return (
+              <div
+                className={record.aid ? 'receiveCount' : ''}
+                onClick={(e) => {
+                  if (record.aid) {
+                    e.stopPropagation();
+                    this.setState({
+                      customerVisible: true,
+                      aid: record.aid,
+                      aName: record.aName,
+                      type: 1,
+                    })
+                  }
+                }}>
+                {text}
+              </div>
+            );
+          },
+        },
+        {
+          title: "签单数",
+          dataIndex: "signCount",
+          key: "signCount",
           className: 'tableRowStyle',
           width: 120,
           render: (text, record) => {
@@ -151,7 +177,7 @@ class DepartmentStatistics extends Component {
                       customerVisible: true,
                       aName: record.aName,
                       aid: record.aid,
-                      type: 3,
+                      type: 2,
                     })
                   }
                 }}>

+ 26 - 9
js/component/manageCenter/financialManage/account/accountDetaillist.jsx

@@ -36,7 +36,9 @@ const AccountDetaillist = React.createClass({
       reason: "",
       checkData: {},
       aname: "",
-      searchValues: {}, // 列表筛选条件
+      searchValues: {
+        myType: "0"
+      }, // 列表筛选条件
       loading: false, //加载动画
       changeList: undefined, // 更改后的表格显示数据
       dataSource: [], // 列表数据
@@ -168,6 +170,7 @@ const AccountDetaillist = React.createClass({
           key: "status",
           render: (text, record) => {
             return (
+              (!!text || text == 0) &&
               <span style={{ color: accountStatus[text].color }}>
                 {accountStatus[text].label}
               </span>
@@ -375,10 +378,6 @@ const AccountDetaillist = React.createClass({
         aLink.click();
         document.body.removeChild(aLink);
       });
-
-
-
-
     }
   },
 
@@ -517,7 +516,9 @@ const AccountDetaillist = React.createClass({
   reset() {
     this.setState({
       aname: "",
-      searchValues: JSON.parse(JSON.stringify({})),
+      searchValues: {
+        myType: "0"
+      },
     }, () => {
       this.loadData();
     })
@@ -592,6 +593,22 @@ const AccountDetaillist = React.createClass({
         <Tabs defaultActiveKey="2" className="test">
           <TabPane tab="搜索" key="2">
             <div className="user-search" style={{ marginLeft: 10 }}>
+              <Select
+                style={{ width: 140 }}
+                placeholder=""
+                value={searchValues["myType"]
+                  ? searchValues["myType"]
+                  : undefined}
+                onChange={(e) => {
+                  searchValues["myType"] = e;
+                  this.setState({
+                    searchValues: searchValues,
+                  });
+                }}
+              >
+                <Option value="0">查看列表</Option>
+                <Option value="1">我的列表</Option>
+              </Select>
               <Input
                 placeholder="合同编号"
                 value={searchValues["contractNo"]
@@ -606,11 +623,11 @@ const AccountDetaillist = React.createClass({
               />
               <Input
                 placeholder="客户名称"
-                value={searchValues["username"]
-                  ? searchValues["username"]
+                value={searchValues["buyerName"]
+                  ? searchValues["buyerName"]
                   : ""}
                 onChange={(e) => {
-                  searchValues["username"] = e.target.value;
+                  searchValues["buyerName"] = e.target.value;
                   this.setState({
                     searchValues: searchValues,
                   });

File diff suppressed because it is too large
+ 946 - 31
js/component/manageCenter/financialManage/account/accountDetails.jsx


+ 29 - 6
js/component/manageCenter/financialManage/account/accountReview.jsx

@@ -40,7 +40,8 @@ const AccountReview = React.createClass({
       checkData: {},
       aname: "",
       searchValues: {
-        examineStatus: this.props.isOperate ? "1" : undefined
+        examineStatus: this.props.isOperate ? "1" : undefined,
+        roleType: this.props.isOperate ? undefined : "0"
       }, // 列表筛选条件
       loading: false, //加载动画
       changeList: undefined, // 更改后的表格显示数据
@@ -282,7 +283,7 @@ const AccountReview = React.createClass({
       pageNo: pageNo || 1,
       pageSize: pagination.pageSize,
       expenseMain: 1,
-      processStatus: this.props.isOperate ? 1 : 2,
+      processStatus: this.props.isOperate ? 1 : undefined,
     });
     $.ajax({
       method: "get",
@@ -527,7 +528,10 @@ const AccountReview = React.createClass({
   reset() {
     this.setState({
       aname: "",
-      searchValues: JSON.parse(JSON.stringify({ examineStatus: this.props.isOperate ? "1" : undefined })),
+      searchValues: {
+        examineStatus: this.props.isOperate ? "1" : undefined,
+        roleType: this.props.isOperate ? undefined : "0",
+      },
     }, () => {
       this.loadData();
     })
@@ -571,6 +575,25 @@ const AccountReview = React.createClass({
         <Tabs defaultActiveKey="2" className="test">
           <TabPane tab="搜索" key="2">
             <div className="user-search" style={{ marginLeft: 10 }}>
+              {
+                !this.props.isOperate &&
+                <Select
+                  style={{ width: 140 }}
+                  placeholder=""
+                  value={searchValues["roleType"]
+                    ? searchValues["roleType"]
+                    : undefined}
+                  onChange={(e) => {
+                    searchValues["roleType"] = e;
+                    this.setState({
+                      searchValues: searchValues,
+                    });
+                  }}
+                >
+                  <Option value="0">全部列表</Option>
+                  <Option value="1">我的列表</Option>
+                </Select>
+              }
               <Input
                 placeholder="合同编号"
                 value={searchValues["contractNo"]
@@ -631,7 +654,7 @@ const AccountReview = React.createClass({
               </AutoComplete>
               <Select
                 placeholder="所属部门"
-                style={{ width: 200, marginRight: 10 }}
+                style={{ width: 180, marginRight: 10 }}
                 value={searchValues["depId"]
                   ? searchValues["depId"]
                   : undefined}
@@ -648,7 +671,7 @@ const AccountReview = React.createClass({
               </Select>
               <Select
                 placeholder="申请部门"
-                style={{ width: 200, marginRight: 10 }}
+                style={{ width: 180, marginRight: 10 }}
                 value={searchValues["applyDep"]
                   ? searchValues["applyDep"]
                   : undefined}
@@ -665,7 +688,7 @@ const AccountReview = React.createClass({
               </Select>
               <Select
                 placeholder="支付部门"
-                style={{ width: 200, marginRight: 10 }}
+                style={{ width: 180, marginRight: 10 }}
                 value={searchValues["payDep"]
                   ? searchValues["payDep"]
                   : undefined}

+ 17 - 0
js/component/manageCenter/financialManage/account/accountReview.less

@@ -32,7 +32,14 @@
   th,
   td {
     white-space: normal;
+
+  }
+
+  tr {
+    page-break-inside: avoid;
+  
   }
+
 }
 
 .m_table {
@@ -107,4 +114,14 @@
     background: transparent;
     text-align: center;
   }
+}
+
+.light {
+  background: #D3D3D3;
+
+}
+
+.dark {
+  background: white;
+
 }

+ 437 - 0
js/component/manageCenter/financialManage/account/accountTotal.jsx

@@ -0,0 +1,437 @@
+import React from "react";
+import $ from "jquery/src/ajax";
+import moment from "moment";
+import {
+  Button,
+  Form,
+  Input,
+  Spin,
+  Table,
+  Select,
+  message,
+  Tabs,
+  DatePicker,
+  Modal,
+} from "antd";
+import { ChooseList } from "../../order/orderNew/chooseList";
+import { ShowModal, getAccountName, getSecondaryAccountName } from "../../../tools"
+import ShowModalDiv from "@/showModal.jsx";
+
+const FormItem = Form.Item;
+const { RangePicker } = DatePicker;
+const { TabPane } = Tabs;
+
+const AccountTotal = React.createClass({
+
+  getInitialState() {
+    return {
+      searchValues: {
+        targetType: 1
+      }, // 列表筛选条件
+      loading: false, //加载动画
+      changeList: undefined, // 更改后的表格显示数据
+      dataSource: [], // 列表数据
+      departmentArr: [],
+      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: "contractNo",
+          key: "contractNo",
+          render: (text, record) => {
+            return (
+              this.state.searchValues["targetType"] == 1 ?
+                <span>
+                  {text + " / " + record.buyerName}
+                </span>
+                : <span>{record.depName}</span>
+            );
+          },
+        },
+        {
+          title: "合同总额/已收款",
+          dataIndex: "totalAmount",
+          key: "totalAmount",
+          render: (text, record) => {
+            return (
+              <div>
+                {text + " / " + record.settlementAmount}
+              </div>
+            );
+          },
+        },
+        {
+          title: "报销总额",
+          dataIndex: "expenseAmount",
+          key: "expenseAmount",
+        },
+        {
+          title: "已付成本",
+          dataIndex: "paymentAmount",
+          key: "paymentAmount",
+        },
+        {
+          title: "报销人数/天数/报销次数",
+          dataIndex: "peopleCount",
+          key: "peopleCount",
+          render: (text, record) => {
+            return (
+              <div>
+                {text + " / " + record.days + " / " + record.expenseCount}
+              </div>
+            );
+          },
+        },
+        {
+          title: "报销未审核/驳回次数",
+          dataIndex: "notExamine",
+          key: "notExamine",
+          render: (text, record) => {
+            return (
+              <div>
+                {text + " / " + record.rejectCount}
+              </div>
+            );
+          },
+        },
+      ],
+
+    };
+  },
+
+  componentWillMount() {
+    this.departmentList();
+    this.loadData();
+  },
+
+  // 列表接口
+  loadData(pageNo) {
+    const { searchValues, pagination } = this.state;
+    this.setState({
+      loading: true,
+    });
+    let datas = Object.assign(searchValues, {
+      // pageNo: pageNo || 1,
+      // pageSize: pagination.pageSize,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/expenseCounts/getCounts",
+      data: datas,
+      success: function (data) {
+        ShowModal(this);
+        this.setState({
+          loading: false,
+        });
+        if (data.error && data.error.length === 0) {
+          if (data.data) {
+            pagination.current = data.data.pageNo;
+            pagination.total = data.data.totalCount;
+            if (data.data && data.data && !data.data.length) {
+              pagination.current = 0;
+              pagination.total = 0;
+            }
+            this.setState({
+              dataSource: data.data,
+              pagination: this.state.pagination,
+              pageNo: data.data.pageNo,
+              totalAmount: data.data.totalAmount,
+            });
+          }
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  departmentList() {
+    $.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 () {
+
+      }.bind(this)
+    );
+  },
+
+  // 搜索
+  search() {
+    this.loadData();
+  },
+
+  // 重置
+  reset() {
+    this.setState({
+      searchValues: {
+        targetType: 1
+      },
+    }, () => {
+      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,
+    });
+  },
+
+
+  export() {
+    this.setState({
+      exportExecLoading: true
+    })
+    let loading = message.loading('加载中...');
+    let data = this.state.searchValues;
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/expenseCounts/getCounts/Export",
+      data,
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(function () {
+      loading();
+      this.setState({
+        exportExecLoading: false
+      })
+    }.bind(this));
+  },
+
+  // 下载
+  download(fileName) {
+    window.location.href = globalConfig.context + "/open/download?fileName=" + fileName
+  },
+
+  getCountsClear() {
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/expenseCounts/getCountsClear",
+      data: {},
+      success: function (data) {
+        ShowModal(this);
+        this.setState({
+          loading: false,
+        });
+        if (data.error && data.error.length === 0) {
+          message.success("清除成功!")
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  render() {
+    const { searchValues, } = this.state
+    return (
+      <div className="user-content">
+        <ShowModalDiv ShowModal={this.state.showModal} />
+        <div className="content-title" style={{ marginBottom: 10 }}>
+          <span style={{ fontWeight: 900, fontSize: 16 }}>报销总计</span>
+        </div>
+        <Tabs defaultActiveKey="2" className="test">
+          <TabPane tab="搜索" key="2">
+            <div className="user-search" style={{ marginLeft: 10 }}>
+              <Select placeholder="" style={{ width: 140 }}
+                value={searchValues["targetType"]}
+                onChange={(e) => {
+                  searchValues["targetType"] = e;
+                  const _this = this;
+                  this.setState({
+                    searchValues: searchValues,
+                  }, () => {
+                    _this.search()
+                  });
+                }}
+              >
+                <Select.Option value={0} >部门</Select.Option>
+                <Select.Option value={1} >订单</Select.Option>
+              </Select>
+              {
+                searchValues["targetType"] == 1 &&
+                <Input
+                  placeholder="合同编号"
+                  value={searchValues["contactNo"]
+                    ? searchValues["contactNo"]
+                    : ""}
+                  onChange={(e) => {
+                    searchValues["contactNo"] = e.target.value;
+                    this.setState({
+                      searchValues: searchValues,
+                    });
+                  }}
+                />
+              }
+              <Input
+                placeholder="客户名称"
+                value={searchValues["buyerName"]
+                  ? searchValues["buyerName"]
+                  : ""}
+                onChange={(e) => {
+                  searchValues["buyerName"] = e.target.value;
+                  this.setState({
+                    searchValues: searchValues,
+                  });
+                }}
+              />
+              <Select
+                placeholder="所属部门"
+                style={{ width: 200, marginRight: 10 }}
+                value={searchValues["depId"]
+                  ? searchValues["depId"]
+                  : undefined}
+                onChange={e => {
+                  searchValues["depId"] = e;
+                  this.setState({
+                    searchValues: searchValues,
+                  });
+                }}
+              >
+                {this.state.departmentArr.map(function (item) {
+                  return <Select.Option key={item.id}>{item.name}</Select.Option>;
+                })}
+              </Select>
+              <span>报销时间:</span>
+              <RangePicker
+                style={{ width: 300 }}
+                value={[
+                  searchValues.startTime ? moment(searchValues.startTime) : null,
+                  searchValues.endTime ? moment(searchValues.endTime) : null,
+                ]}
+                onChange={(data, dataString) => {
+                  this.setState({
+                    searchValues: Object.assign(searchValues, {
+                      startTime: dataString[0],
+                      endTime: dataString[1],
+                    }),
+                  });
+                }}
+              />
+              <Button
+                type="primary"
+                onClick={this.search}
+                style={{ margin: "0 10px" }}
+              >搜索</Button>
+              <Button onClick={this.reset}>重置</Button>
+              <Button
+                type="primary"
+                onClick={this.getCountsClear}
+                style={{ marginLeft: 10 }}
+              >清理缓存</Button>
+            </div>
+          </TabPane>
+          <TabPane tab="更改表格显示数据" key="1">
+            <div style={{ marginLeft: 10 }}>
+              <ChooseList
+                columns={this.state.columns}
+                changeFn={this.changeList}
+                changeList={this.state.changeList}
+                top={55}
+                margin={11}
+              />
+            </div>
+          </TabPane>
+          <TabPane tab="导出" key="3">
+            <div style={{ float: "left" }}>
+              <Button
+                type="primary"
+                loading={this.state.exportPendingLoading}
+                onClick={this.export}
+                style={{ margin: 10 }}
+              >
+                导出excel
+              </Button>
+            </div>
+          </TabPane>
+        </Tabs>
+        <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}
+              pagination={false}
+              size="small"
+            />
+          </Spin>
+        </div>
+      </div>
+    );
+  },
+});
+
+export default AccountTotal;

+ 9 - 0
js/component/manageCenter/financialManage/content.jsx

@@ -325,6 +325,15 @@ class Content extends Component {
           });
         });
         break;
+      // 报销总计
+      case "accountTotal":
+        require.ensure([], () => {
+          const AccountTotal = require("./account/accountTotal").default;
+          this.setState({
+            component: <AccountTotal />,
+          });
+        });
+        break;
       // 费用单列表
       case "accountlist":
         require.ensure([], () => {

+ 2 - 2
js/component/manageCenter/order/orderNew/changeComponent/orderDetail.js

@@ -485,7 +485,7 @@ class OrderDetail extends Component {
       labelCol: { span: 10 },
       wrapperCol: { span: 14 }
     };
-    const data = this.props.orderData;
+    const data = this.props.orderData || {};
     const propsList = this.props.contactList || [];
     const expandedRowRenderVip = (e) => {
       const data = e.splitList;
@@ -761,7 +761,7 @@ class OrderDetail extends Component {
           imgId={"orderImg1x"}
         //  getContentUrl = {this.getContentUrl}
         />
-        
+
         <Property
           patentStatus={data.patentStatus}
         />

+ 1 - 1
package.json

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