mentoswzq hace 4 años
padre
commit
0e7c7426ed

+ 21 - 30
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -121,34 +121,8 @@ const ShouKuang = React.createClass({
         } else {
           for (let i = 0; i < data.data.pagination.list.length; i++) {
             let thisdata = data.data.pagination.list[i];
-            theArr.push({
-              key: thisdata.orderNo,
-              orderNo: thisdata.orderNo,
-              orderType: thisdata.orderType,
-              orderStatus: thisdata.orderStatus,
-              sellerName: thisdata.sellerName,
-              processStatus: thisdata.processStatus,
-              liquidationStatus: thisdata.liquidationStatus,
-              approval: thisdata.approval,
-              buyerName: thisdata.buyerName,
-              actuallyTotalAmount: thisdata.actuallyTotalAmount,
-              signTime: thisdata.signTime,
-              companyId: thisdata.companyId,
-              companyName: thisdata.companyName,
-              buyerId: thisdata.buyerId,
-              costAmount: thisdata.costAmount,
-              contractNo: thisdata.contractNo,
-              createTime: thisdata.createTime,
-              departmentName: thisdata.departmentName,
-              invoiceAmount: thisdata.invoiceAmount,
-              finalReceivables: thisdata.finalReceivables,
-              finalReceivablesTime: thisdata.finalReceivablesTime,
-              signTotalAmount: thisdata.signTotalAmount,
-              financeName: thisdata.financeName,
-              backStatus: thisdata.backStatus,
-              orderReceivables: thisdata.orderReceivables,
-              orderArrears: thisdata.orderArrears,
-            });
+            thisdata.key = thisdata.orderNo;
+            theArr.push(thisdata);
           }
         }
         this.state.pagination.current = data.data.pagination.pageNo;
@@ -713,11 +687,19 @@ const ShouKuang = React.createClass({
           },
         },
         {
-          title: "已付成本(万元)",
+          title: "成本(万元)",
           dataIndex: "costAmount",
           key: "costAmount",
           render: (text) => {
             return isNaN(parseFloat(text)) ? text : parseFloat(text);
+          }
+        },
+        {
+          title: "已付成本(万元)",
+          dataIndex: "paymentAmount",
+          key: "paymentAmount",
+          render: (text) => {
+            return isNaN(parseFloat(text)) ? text : parseFloat(text);
           },
         },
         {
@@ -869,7 +851,7 @@ const ShouKuang = React.createClass({
           }
         },
         {
-          title: "已付成本(万元)",
+          title: "成本(万元)",
           dataIndex: "costAmount",
           key: "costAmount",
           className: "title-table",
@@ -878,6 +860,15 @@ const ShouKuang = React.createClass({
           }
         },
         {
+          title: "已付成本(万元)",
+          dataIndex: "paymentAmount",
+          key: "paymentAmount",
+          className: "title-table",
+          render: (text) => {
+            return isNaN(parseFloat(text)) ? text : parseFloat(text);
+          }
+        },
+        {
           title: "最近收款(万元)",
           dataIndex: "finalReceivables",
           key: "finalReceivables",

+ 2 - 3
js/component/manageCenter/order/orderNew/costAuditList/filterColumn.js

@@ -1,6 +1,5 @@
 import React,{Component} from 'react';
-import {Button, Form, Input, message, Select} from "antd";
-import $ from "jquery/src/ajax";
+import {Button, Form, Input,Select} from "antd";
 
 class FilterColumn extends Component{
     constructor(props) {
@@ -10,6 +9,7 @@ class FilterColumn extends Component{
 
     handleReset(){
         this.props.form.resetFields();
+        this.props.onResetSearch && this.props.onResetSearch();
     }
 
     handleSubmit(e){
@@ -18,7 +18,6 @@ class FilterColumn extends Component{
             if (err) {
                 return;
             }
-            console.log(values)
             this.props.onSearch(values);
         })
     }

+ 33 - 10
js/component/manageCenter/order/orderNew/costAuditList/index.js

@@ -131,8 +131,10 @@ class CostAuditList extends Component{
                     key: "status",
                     render: (text) => {
                         return text === 0 ? '审核' :
-                            text === 1 ? '待支付' :
-                                text === 2 ? '驳回' : '已支付';
+                                    text === 1 ? '待支付' :
+                                        text === 2 ? '驳回' :
+                                            text === 3 ? '已支付' :
+                                                text === 4 ? '已取消' : '';
                     },
                 },
                 {
@@ -159,7 +161,11 @@ class CostAuditList extends Component{
                                         projectType: record.projectType,
                                     })
                                 }}>
-                                    待审核
+                                    {
+                                        record.status === 0 ? '待审核' :
+                                            record.status === 1 ? '待支付' :
+                                                record.status === 2 ? '查看详情' : '查看详情'
+                                    }
                                 </Button>
                                 <Button
                                     type="primary"
@@ -193,11 +199,13 @@ class CostAuditList extends Component{
                 pageSize: 10,
                 onChange: function (page) {
                     this.loadData(page);
+                    console.log(page)
                 }.bind(this),
                 showTotal: function (total) {
                     return "共" + total + "条数据";
                 },
             },
+            page: 1,
             selectInfor: {},
             visible: false,
             paymentVisible: false,
@@ -233,6 +241,9 @@ class CostAuditList extends Component{
                         message.warning(data.error[0].message);
                     }
                 } else {
+                    this.setState({
+                        page: data.data.pageNo
+                    });
                     for (let i = 0; i < data.data.list.length; i++) {
                         let thisdata = data.data.list[i];
                         let obj = thisdata;
@@ -340,9 +351,21 @@ class CostAuditList extends Component{
               <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
                   <TabPane tab="搜索" key="1">
                       <div style={{paddingTop:'10px'}}>
-                          <FilterColumn {...this.props} onSearch={(data)=>{
-                              this.loadData(1,data)
-                          }}/>
+                          <FilterColumn
+                              {...this.props}
+                              onSearch={(data)=>{
+                                  this.setState({
+                                      searchInfor: data
+                                  });
+                                  this.loadData(1,data);
+                              }}
+                              onResetSearch={()=>{
+                                  this.setState({
+                                      searchInfor: {}
+                                  });
+                                  this.loadData();
+                              }}
+                          />
                       </div>
                   </TabPane>
                   <TabPane tab="操作" key="2">
@@ -392,7 +415,7 @@ class CostAuditList extends Component{
                           taskID={this.state.selectInfor.tid}
                           visible={this.state.visible}
                           refreshList={()=>{
-                              this.loadData();
+                              this.loadData(this.state.page,this.state.searchInfor);
                           }}
                           visitCancel={()=>{
                               this.setState({
@@ -412,7 +435,7 @@ class CostAuditList extends Component{
                               tid: 0,
                               projectType: 0,
                           });
-                          this.loadData();
+                          this.loadData(this.state.page,this.state.searchInfor);
                       }}
                       onSuccess={()=>{
                           this.setState({
@@ -420,7 +443,7 @@ class CostAuditList extends Component{
                               tid: 0,
                               projectType: 0,
                           });
-                          this.loadData();
+                          this.loadData(this.state.page,this.state.searchInfor);
                   }}/> :
                   <div/>
               }
@@ -432,7 +455,7 @@ class CostAuditList extends Component{
                   isAuditPayment={true}
                   projectType={this.state.projectType}
                   changeVisible={()=>{
-                      this.loadData();
+                      this.loadData(this.state.page,this.state.searchInfor);
                       this.setState({
                           payRecordVisible: false,
                           orderPaymentsId: 0,