From 354f33404c98bcbafe1c32c37d0ea18e19fb17db Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 10 六月 2020 11:01:33 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/pakStore/pakStore.js |   53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 52 insertions(+), 1 deletions(-)

diff --git a/src/main/webapp/static/js/pakStore/pakStore.js b/src/main/webapp/static/js/pakStore/pakStore.js
index f9f16a1..24ad683 100644
--- a/src/main/webapp/static/js/pakStore/pakStore.js
+++ b/src/main/webapp/static/js/pakStore/pakStore.js
@@ -7,10 +7,13 @@
 
     tableIns = table.render({
         elem: '#chooseData',
+        data: [],
         even: true,
+        limit: 500,
         cellMinWidth: 50,
+        toolbar: '#toolbar',
         cols: [[
-            {type: 'checkbox', fixed: 'left'},
+            {type: 'checkbox'},
             {field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜', sort: 'true'},
             {field: 'barcode', align: 'center', title: '鏉$爜'},
             {field: 'matName', align: 'center', title: '鐗╂枡鍚嶇О'},
@@ -22,11 +25,59 @@
         }
     });
 
+    // 鐩戝惉鎺掑簭浜嬩欢
+    table.on('sort(chooseData)', function (obj) {
+        var searchData = {};
+        $.each($('#search-box [name]').serializeArray(), function() {
+            searchData[this.name] = this.value;
+        });
+        searchData['orderByField'] = obj.field;
+        searchData['orderByType'] = obj.type;
+        matQueryTable.reload({
+            where: searchData,
+            page: {
+                curr: 1
+            },
+            done: function (res, curr, count) {
+                if (res.code === 403) {
+                    top.location.href = baseUrl+"/";
+                }
+                pageCurr=curr;
+                limit();
+            }
+        });
+    });
+
+    // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+    table.on('toolbar(chooseData)', function (obj) {
+        var checkStatus = table.checkStatus(obj.config.id);
+        var data = checkStatus.data;
+        switch(obj.event) {
+            case 'comb':
+                if (data.length === 0){
+                    layer.msg('璇烽�夋嫨鏁版嵁');
+                } else {
+                    layer.open({
+                        type: 1,
+                        title: '缁勭洏',
+                        maxmin: true,
+                        shadeClose: true,
+                        content: $('#combDiv'),
+                        success: function (layero, index) {
+
+                        }
+                    })
+                }
+                break;
+        }
+    });
 });
+
 
 // 鎻愬彇鐗╂枡
 var matCodeLayerIdx;
 function getMat() {
+    tableIns.reload({data: []});
     matCodeLayerIdx = layer.open({
         type: 2,
         title: '搴撲綅鐗╂枡',

--
Gitblit v1.9.1