dev01 2 years ago
parent
commit
0c8bfd6253
1 changed files with 30 additions and 21 deletions
  1. 30 21
      js/component/manageCenter/order/source/index.jsx

+ 30 - 21
js/component/manageCenter/order/source/index.jsx

@@ -31,6 +31,8 @@ class Source extends Component {
     super(props);
     this.state = {
       cellData: {},
+      searchValues: {},
+      params: {},
       onelist: [
         {
           value: "0",
@@ -41,6 +43,23 @@ class Source extends Component {
           label: "按签单数",
         },
       ],
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function (page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function (total) {
+          return "共" + total + "条数据";
+        },
+      },
+      contactsOption: [],
+      loading: false,
+      changeList: undefined,
+      dataSource: [],
+      visible: false,
       columns: [
         {
           title: "序号",
@@ -251,24 +270,6 @@ class Source extends Component {
             </span>
         },
       ],
-      pagination: {
-        defaultCurrent: 1,
-        defaultPageSize: 10,
-        showQuickJumper: true,
-        pageSize: 10,
-        onChange: function (page) {
-          this.loadData(page);
-        }.bind(this),
-        showTotal: function (total) {
-          return "共" + total + "条数据";
-        },
-      },
-      contactsOption: [],
-      loading: false,
-      changeList: undefined,
-      searchValues: {},
-      dataSource: [],
-      visible: false,
     };
   }
 
@@ -290,6 +291,7 @@ class Source extends Component {
     this.setState(
       {
         searchValues: JSON.parse(JSON.stringify({})),
+        params: JSON.parse(JSON.stringify({})),
         selectedRowKeys: [],
       },
       () => {
@@ -297,6 +299,13 @@ class Source extends Component {
       }
     );
   }
+  // 搜索
+  submit() {
+    this.setState({
+      params: this.state.searchValues
+    })
+    this.loadData()
+  }
   // 列表接口
   loadData(pageNo) {
     const { searchValues, pagination } = this.state;
@@ -431,7 +440,7 @@ class Source extends Component {
   }
 
   render() {
-    const { searchValues, onelist, columns, changeList, contactsOption, visible, datas } = this.state;
+    const { searchValues, onelist, columns, changeList, contactsOption, visible, datas, params } = this.state;
     return (
       <div className="user-content signatureStatistics">
         <div className="content-title">
@@ -524,7 +533,7 @@ class Source extends Component {
                 </FormItem>
                 <Button
                   type="primary"
-                  onClick={() => { this.loadData() }}
+                  onClick={() => { this.submit() }}
                   style={{ marginRight: "10px" }}
                 >
                   搜索
@@ -599,7 +608,7 @@ class Source extends Component {
             }}
           >
             <OrderList
-              data={this.state.datas}
+              data={Object.assign(datas, params)}
             />
           </Modal>
         }