From b7e08df5a07b3fa832a46ecc31983e16f2bccc8c Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 24 七月 2023 14:56:01 +0800
Subject: [PATCH] # 出库作业,和库存明细管理 排序

---
 src/main/webapp/static/js/matCode/matCode.js |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/main/webapp/static/js/matCode/matCode.js b/src/main/webapp/static/js/matCode/matCode.js
index a5871d6..66a7c98 100644
--- a/src/main/webapp/static/js/matCode/matCode.js
+++ b/src/main/webapp/static/js/matCode/matCode.js
@@ -7,7 +7,7 @@
     cols.push.apply(cols, matCols);
     cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
         ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
-        ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:110})
+        ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:120})
     return cols;
 }
 layui.use(['table','laydate', 'form','upload'], function(){
@@ -85,9 +85,11 @@
         });
     });
 
+    var checkData;
     // 鐩戝惉澶村伐鍏锋爮浜嬩欢
     table.on('toolbar(matCode)', function (obj) {
         var checkStatus = table.checkStatus(obj.config.id);
+        checkData = table.checkStatus(obj.config.id);
         switch(obj.event) {
             case 'addData':
                 layer.open({
@@ -191,9 +193,22 @@
 
     // 瀵煎嚭excel
     form.on('submit(exportDo)', function(data) {
+        debugger
+        // if (checkData.data.length === 0) {
+        //     layer.msg('璇烽�夋嫨鏁版嵁');
+        // }
         layer.closeAll();
         layer.load(1, {shade: [0.1,'#fff']});
-        location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val();
+
+        var ids = "";
+        if(checkData.data.length>0) {
+            for (var i = 0; i < checkData.data.length; i++) {
+                ids = ids + "'" + checkData.data[i].matNo + "',";
+            }
+            ids = ids.substring(0, ids.length - 1);
+        }
+        location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val()+"&ids=" + ids;
+        // location.href = baseUrl + "/matCode/export/auth?fileName="+$("#exportFileName").val()+"&rowCount="+$("#exportRowCount").val();
         layer.closeAll('loading');
         return false;
     });

--
Gitblit v1.9.1