Browse Source

财务查看增加供应商字段显示/修复翻页问题

mentoswzq 4 years ago
parent
commit
ab3caaa655

+ 5 - 1
js/component/manageCenter/order/orderNew/costAuditList/filterColumn.js

@@ -112,7 +112,10 @@ class FilterColumn extends Component{
                         {getFieldDecorator('depId', {
                             rules: [{ required: false, message: '' }],
                         })(
-                            <Select placeholder="请选择部门" style={{ width: 150, marginRight: '10px', marginLeft: '10px' }}>
+                            <Select placeholder="请选择部门" style={{
+                                width: '200px',
+                                marginTop: '0px',
+                            }}>
                                 {
                                     this.state.departmentArr.map(function (item) {
                                         return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
@@ -168,6 +171,7 @@ class FilterColumn extends Component{
                                 placeholder="选择状态"
                                 style={{
                                     width: '200px',
+                                    marginTop: '0px',
                                 }}
                             >
                                 <Select.Option value={0}>审核</Select.Option>

+ 31 - 2
js/component/manageCenter/order/orderNew/costAuditList/index.js

@@ -116,6 +116,11 @@ class CostAuditList extends Component{
                     },
                 },
                 {
+                    title: "供应商",
+                    dataIndex: "companyName",
+                    key: "companyName",
+                },
+                {
                     title: "申请人",
                     dataIndex: "aname",
                     key: "aname",
@@ -198,7 +203,7 @@ class CostAuditList extends Component{
                 showQuickJumper: true,
                 pageSize: 10,
                 onChange: function (page) {
-                    this.loadData(page);
+                    this.loadData(page,this.state.searchInfor);
                 }.bind(this),
                 showTotal: function (total) {
                     return "共" + total + "条数据";
@@ -214,6 +219,7 @@ class CostAuditList extends Component{
             orderPaymentsId: 0,
         }
         this.printAll = this.printAll.bind(this);
+        this.exportExec = this.exportExec.bind(this);
     }
 
     componentDidMount() {
@@ -251,12 +257,14 @@ class CostAuditList extends Component{
                     }
                     this.state.pagination.total = data.data.totalCount;
                 }
+                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,
-                    pageNo: pageNo,
                     pagination: this.state.pagination,
                 });
             }.bind(this),
@@ -341,6 +349,19 @@ class CostAuditList extends Component{
         });
     }
 
+    //导出
+    exportExec() {
+        let data = Object.assign({},this.state.searchInfor);
+        for (let key in data){
+            if(!data[key]){
+                delete data[key]
+            }
+        }
+        data.pageSize = 9999;
+        data.pageNo = 1;
+        window.location.href=(globalConfig.context+'/api/admin/company/exportPaymentList?'+$.param(data));
+    }
+
     render() {
         return (
           <div className="user-content">
@@ -376,6 +397,13 @@ class CostAuditList extends Component{
                       >
                           批量支付
                       </Button>
+                      <Button
+                          type="primary"
+                          onClick={this.exportExec}
+                          style={{ margin: "11px 0px 10px 10px" }}
+                      >
+                          导出财务成本列表
+                      </Button>
                   </TabPane>
               </Tabs>
               <div className="patent-table">
@@ -420,6 +448,7 @@ class CostAuditList extends Component{
                               this.setState({
                                   visible: false
                               })
+                              this.loadData(this.state.page,this.state.searchInfor);
                           }}/> : <div/>
               }
               {this.state.paymentVisible ?

+ 5 - 1
js/component/manageCenter/order/orderNew/glCostAuditList/filterColumn.js

@@ -112,7 +112,10 @@ class FilterColumn extends Component{
                         {getFieldDecorator('depId', {
                             rules: [{ required: false, message: '' }],
                         })(
-                            <Select placeholder="请选择部门" style={{ width: 150, marginRight: '10px', marginLeft: '10px' }}>
+                            <Select placeholder="请选择部门" style={{
+                                width: '200px',
+                                marginTop: '0px',
+                            }}>
                                 {
                                     this.state.departmentArr.map(function (item) {
                                         return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
@@ -168,6 +171,7 @@ class FilterColumn extends Component{
                                 placeholder="选择状态"
                                 style={{
                                     width: '200px',
+                                    marginTop: '0px',
                                 }}
                             >
                                 <Select.Option value={0}>审核</Select.Option>

+ 34 - 3
js/component/manageCenter/order/orderNew/glCostAuditList/index.js

@@ -115,6 +115,11 @@ class CostAuditList extends Component{
                     },
                 },
                 {
+                    title: "供应商",
+                    dataIndex: "companyName",
+                    key: "companyName",
+                },
+                {
                     title: "申请人",
                     dataIndex: "aname",
                     key: "aname",
@@ -197,7 +202,7 @@ class CostAuditList extends Component{
                 showQuickJumper: true,
                 pageSize: 10,
                 onChange: function (page) {
-                    this.loadData(page);
+                    this.loadData(page,this.state.searchInfor);
                 }.bind(this),
                 showTotal: function (total) {
                     return "共" + total + "条数据";
@@ -212,6 +217,7 @@ class CostAuditList extends Component{
             payRecordVisible: false,
             orderPaymentsId: 0,
         }
+        this.exportExec = this.exportExec.bind(this);
     }
 
     componentDidMount() {
@@ -249,12 +255,14 @@ class CostAuditList extends Component{
                     }
                     this.state.pagination.total = data.data.totalCount;
                 }
+                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,
-                    pageNo: pageNo,
                     pagination: this.state.pagination,
                 });
             }.bind(this),
@@ -274,13 +282,26 @@ class CostAuditList extends Component{
         })
     }
 
+    //导出
+    exportExec() {
+        let data = Object.assign({},this.state.searchInfor);
+        for (let key in data){
+            if(!data[key]){
+                delete data[key]
+            }
+        }
+        data.pageSize = 9999;
+        data.pageNo = 1;
+        window.location.href=(globalConfig.context+'/api/admin/company/exportPaymentList?'+$.param(data));
+    }
+
     render() {
         return (
           <div className="user-content">
               <div className="content-title">
                   <span>成本付款申请</span>
               </div>
-              <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
+              <Tabs defaultActiveKey="1" className="test">
                   <TabPane tab="搜索" key="1">
                       <div style={{paddingTop:'10px'}}>
                           <FilterColumn
@@ -300,6 +321,15 @@ class CostAuditList extends Component{
                           />
                       </div>
                   </TabPane>
+                  <TabPane tab="操作" key="2">
+                      <Button
+                          type="primary"
+                          onClick={this.exportExec}
+                          style={{ margin: "11px 0px 10px 10px" }}
+                      >
+                          导出财务成本列表
+                      </Button>
+                  </TabPane>
               </Tabs>
               <div className="patent-table">
                   <Spin spinning={this.state.loading}>
@@ -333,6 +363,7 @@ class CostAuditList extends Component{
                               this.setState({
                                   visible: false
                               })
+                              this.loadData(this.state.page,this.state.searchInfor);
                           }}/> : <div/>
               }
               {this.state.paymentVisible ?

+ 10 - 9
js/component/manageCenter/project/task/myTask.jsx

@@ -4221,7 +4221,8 @@ const Task = React.createClass({
                   <div className="clearfix">
                     <FormItem
                       className="half-item"
-                      {...formItemLayout}
+                      labelCol={{ span: 3 }}
+                      wrapperCol={{ span: 14 }}
                       label={
                         <span>
                           <strong style={{ color: '#f00' }}>*</strong>
@@ -4271,7 +4272,8 @@ const Task = React.createClass({
                   >
                     <FormItem
                       className="half-item"
-                      {...formItemLayout}
+                      labelCol={{ span: 4 }}
+                      wrapperCol={{ span: 14 }}
                       label={
                         <span>
                           <strong style={{ color: '#f00' }}>*</strong>
@@ -4320,7 +4322,8 @@ const Task = React.createClass({
                   >
                     <FormItem
                       className="half-item"
-                      {...formItemLayout}
+                      labelCol={{ span: 4 }}
+                      wrapperCol={{ span: 14 }}
                       label={
                         <span>
                           <strong style={{ color: '#f00' }}>*</strong>
@@ -4385,7 +4388,6 @@ const Task = React.createClass({
                   >
                     <span
                       style={{
-                        marginLeft: '50px',
                         fontSize: '18px',
                       }}
                     >
@@ -4456,7 +4458,6 @@ const Task = React.createClass({
                   >
                     <span
                       style={{
-                        marginLeft: '50px',
                         fontSize: '18px',
                       }}
                     >
@@ -5548,7 +5549,8 @@ const Task = React.createClass({
                     >
                       <FormItem
                           className="half-item"
-                          {...formItemLayout}
+                          labelCol={{ span: 4 }}
+                          wrapperCol={{ span: 14 }}
                           label={
                             <span>
                           <strong style={{ color: '#f00' }}>*</strong>
@@ -5597,7 +5599,8 @@ const Task = React.createClass({
                     >
                       <FormItem
                           className="half-item"
-                          {...formItemLayout}
+                          labelCol={{ span: 3 }}
+                          wrapperCol={{ span: 14 }}
                           label={
                             <span>
                           <strong style={{ color: '#f00' }}>*</strong>
@@ -5662,7 +5665,6 @@ const Task = React.createClass({
                     >
                     <span
                         style={{
-                          marginLeft: '50px',
                           fontSize: '18px',
                         }}
                     >
@@ -5732,7 +5734,6 @@ const Task = React.createClass({
                     >
                     <span
                         style={{
-                          marginLeft: '50px',
                           fontSize: '18px',
                         }}
                     >

+ 4 - 1
js/component/manageCenter/project/task/payApplyReject/filterColumn.js

@@ -112,7 +112,10 @@ class FilterColumn extends Component{
                         {getFieldDecorator('depId', {
                             rules: [{ required: false, message: '' }],
                         })(
-                            <Select placeholder="请选择部门" style={{ width: 150, marginRight: '10px', marginLeft: '10px' }}>
+                            <Select placeholder="请选择部门" style={{
+                                width: '200px',
+                                marginTop: '0px',
+                            }}>
                                 {
                                     this.state.departmentArr.map(function (item) {
                                         return <Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>

+ 7 - 1
js/component/manageCenter/project/task/payApplyReject/index.jsx

@@ -115,6 +115,11 @@ class PayApplyReject extends Component{
                     },
                 },
                 {
+                    title: "供应商",
+                    dataIndex: "companyName",
+                    key: "companyName",
+                },
+                {
                     title: "申请人",
                     dataIndex: "aname",
                     key: "aname",
@@ -197,7 +202,7 @@ class PayApplyReject extends Component{
                 showQuickJumper: true,
                 pageSize: 10,
                 onChange: function (page) {
-                    this.loadData(page);
+                    this.loadData(page,this.state.searchInfor);
                 }.bind(this),
                 showTotal: function (total) {
                     return "共" + total + "条数据";
@@ -330,6 +335,7 @@ class PayApplyReject extends Component{
                                 this.setState({
                                     visible: false
                                 })
+                                this.loadData(this.state.page,this.state.searchInfor);
                             }}/> : <div/>
                 }
                 {this.state.paymentVisible ?

+ 4 - 4
js/component/manageCenter/project/task/taskAssignment.jsx

@@ -23,7 +23,6 @@ const Task = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
     this.setState({
-      page: pageNo,
       loading: true,
     });
     $.ajax({
@@ -83,6 +82,7 @@ const Task = React.createClass({
         }
         this.setState({
           dataSource: theArr,
+          page: data.data.pageNo,
           pagination: this.state.pagination,
         });
       }.bind(this),
@@ -470,13 +470,13 @@ const Task = React.createClass({
       visible: false,
       activeKey: "1",
     });
-    this.loadData();
+    this.loadData(this.state.page);
   },
   visitOk() {
     this.setState({
       visible: false,
     });
-    this.reset();
+    this.loadData(this.state.page);
   },
   closeDesc(e, s) {
     this.state.showDesc = e;
@@ -530,7 +530,7 @@ const Task = React.createClass({
     this.state.taskNoSearch = "";
     this.state.departmenttSearch = undefined;
     this.state.distribution = undefined;
-    this.loadData(this.state.page);
+    this.loadData();
   },
   searchSwitch() {
     this.setState({

+ 3 - 3
js/component/manageCenter/project/task/taskQuery.jsx

@@ -39,7 +39,6 @@ const Task = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
     this.setState({
-      page: pageNo,
       loading: true,
     });
     $.ajax({
@@ -48,7 +47,7 @@ const Task = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/orderProject/selectTaskList",
       data: {
-        pageNo: pageNo || this.state.page || 1,
+        pageNo: pageNo || 1,
         pageSize: this.state.pagination.pageSize,
         specially: 1, //经理
         name: this.state.nameSearch, //客户名称
@@ -103,6 +102,7 @@ const Task = React.createClass({
         }
         this.setState({
           dataSource: theArr,
+          page: data.data.pageNo,
           pagination: this.state.pagination,
         });
       }.bind(this),
@@ -880,7 +880,7 @@ const Task = React.createClass({
     this.state.orderNoSearch = "";
     this.state.taskNoSearch = "";
     this.state.departmenttSearch = undefined;
-    this.loadData(this.state.page);
+    this.loadData();
   },
   searchSwitch() {
     this.setState({