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 |   42 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/static/js/matCode/matCode.js b/src/main/webapp/static/js/matCode/matCode.js
index d3ec873..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:80})
+        ,{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;
     });
@@ -236,6 +251,27 @@
     table.on('tool(matCode)', function(obj){
         var data = obj.data;
         switch (obj.event) {
+            // 缂栬緫
+            case 'edit':
+                layer.open({
+                    type: 2,
+                    title: '缂栬緫',
+                    maxmin: true,
+                    area: [top.detailWidth, top.detailHeight],
+                    shadeClose: true,
+                    content: 'matCode_detail.html',
+                    success: function(layero, index){
+                        setFormVal(layer.getChildFrame('#detail', index), data, true);
+                        // top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+                        top.convertDisabled(layer.getChildFrame('#matNo', index), true);
+                        // layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+                        layer.getChildFrame('#data-detail-submit-save,#prompt', index).hide();
+                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
+                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+                    }
+                });
+                break;
             // 璇︽儏
             case 'detail':
                 layer.open({
@@ -424,7 +460,7 @@
         type: 'datetime'
     });
     layDate.render({
-        elem: '#modiTime\\$',
+        elem: 'modiTime#\\$',
         type: 'datetime'
     });
     layDate.render({

--
Gitblit v1.9.1