dev01 2 years ago
parent
commit
010b91f963
1 changed files with 106 additions and 46 deletions
  1. 106 46
      js/component/manageCenter/order/source/order.jsx

+ 106 - 46
js/component/manageCenter/order/source/order.jsx

@@ -12,7 +12,8 @@ import {
 } from "antd";
 import $ from "jquery/src/ajax";
 import { ChooseList } from "../../../manageCenter/order/orderNew/chooseList";
-import AddOrders from "../orderNew/addorders";
+import OrderDetail from "../orderNew/changeComponent/orderDetail";
+import OrderRiZi from "@/orderRiZi.jsx";
 import {
   getProcessStatus,
   getLiquidationStatus,
@@ -186,6 +187,7 @@ class OrderList extends Component {
       searchValues: {},
       dataSource: [],
       details: false,
+      orderData: {},
     };
   }
 
@@ -293,15 +295,12 @@ class OrderList extends Component {
               // arrears: thisdata.arrears,
               orderData: thisdata,
               isAddition: thisdata.additionalOrder ? true : false,
-              deleteSign: thisdata.deleteSign,
             },
-            // () => {
-            //   if (this.state.orderData.deleteSign !== 3) {
-            //     this.xiangmu(this.state.orderNo);
-            //     this.jiedian(this.state.orderNo);
-            //     this.jiedianNew(this.state.orderNo);
-            //   }
-            // }
+            () => {
+              if (this.state.orderData.deleteSign !== 3) {
+                this.jiedianNew(this.state.orderNo);
+              }
+            }
           );
         }
       }.bind(this)
@@ -327,36 +326,18 @@ class OrderList extends Component {
   }
   //整行点击
   tableRowClick(record) {
-    this.xiangqing(record.orderNo)
-    this.createTabs(record.orderNo)
+
     this.setState(
       {
         details: true,
-        // type: record.type,
-        // status: record.status,
-        buttonStatus: true,
-        // orderStatus: record.orderStatus,
-        // id: record.id,
-        // processStateText: record.processStateText,
-        // orderNo: record.orderNo
+        orderNo: record.orderNo
       },
-      // () => {
-      //   ;
-      //   // this.createTabs()
-      // }
+      () => {
+        this.xiangqing(record.orderNo)
+        this.createTabs(record.orderNo)
+      }
     );
   }
-  // 获取原订单编号
-  getPrimaryOrder(value) {
-    this.setState({
-      primaryOrder: value
-    });
-  }
-  getAdditionalOrder(value) {
-    this.setState({
-      additionalOrder: value
-    });
-  }
   jiedianNew(orderNos) {
     $.ajax({
       method: "get",
@@ -385,7 +366,6 @@ class OrderList extends Component {
                 : "", //催款科目
               id: thisData.id, //节点Id
               money: thisData.money, //催款金额
-              // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
               commodityName: thisData.commodityName,
               projectType: thisData.projectType,
               dunTypeName: thisData.dunTypeName,
@@ -419,14 +399,88 @@ class OrderList extends Component {
     );
   }
   closeDesc(e, s) {
-    // this.state.activeKey = "a";
-    // this.state.userDetaile = false;
-    // this.state.signBillVisible = false;
     this.state.details = e;
     if (s) {
       this.loadData(this.state.pageNo);
     }
   }
+  //查看订单日志
+  getOrderLog() {
+    this.setState({
+      rizhivisible: true,
+    });
+    this.rizhi();
+  }
+  closeOrderLog() {
+    this.setState({
+      rizhivisible: false
+    });
+  }
+  rizhi() {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/newOrder/selectOrderLog",
+      data: {
+        orderNo: this.state.orderNo,
+      },
+      success: function (data) {
+        let theArr = [];
+        let thisData = data.data;
+        if (!thisData.length) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+          thisData = {};
+        } else {
+          for (let i = 0; i < data.data.length; i++) {
+            let thisdata = data.data[i];
+            theArr.push({
+              processName: thisdata.processName,
+              adminName: thisdata.adminName,
+              createDate: thisdata.createDate,
+              remarks: thisdata.remarks
+            });
+          }
+        }
+        this.setState({
+          dataSourcerizhi: theArr
+        });
+      }.bind(this)
+    });
+  }
+  //项目列表
+  xiangmu(orderNos) {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
+      data: {
+        orderNo: orderNos
+      },
+      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.length; i++) {
+            let thisdata = data.data[i];
+            thisdata.key = i;
+            thisdata.sort = thisdata.cSort;
+            theArr.push(thisdata);
+          }
+        }
+        this.setState({
+          dataSourceX: theArr
+        });
+      }.bind(this)
+    });
+  }
   componentWillMount() {
     this.loadData();
   }
@@ -585,19 +639,25 @@ class OrderList extends Component {
               })
             }}
           >
-            <AddOrders
+            <OrderDetail
+              domId='dindanxiangqing'
               orderUid={this.state.orderUid}
-              processStatus={0}
-              data={this.state.orderData.orderNo}
-              mark={this.state.buttonStatus}
-              getPrimaryOrder={this.getPrimaryOrder}
-              totalCui={this.state.totalCui}
-              closeDesc={this.closeDesc}
-              getAdditionalOrder={this.getAdditionalOrder}
-              deleteSign={this.state.orderData.deleteSign}
+              orderData={this.state.orderData}
+              getOrderLog={this.getOrderLog.bind(this)}
+              totalCui={parseFloat(this.state.totalCui)}
+              dataSourceX={this.state.dataSourceX}
+              contactList={this.state.contactList}
+              contactListNew={this.state.contactListNew}
+              orderNo={this.state.orderNo}
             />
           </Modal>
         }
+        <OrderRiZi
+          dataSourcerizhi={this.state.dataSourcerizhi}
+          closeOrderLog={this.closeOrderLog.bind(this)}
+          visible={this.state.rizhivisible}
+          loading={this.state.loading}
+        />
       </div>
     );
   }