From 6641f2dbe3bd3d0c64cafeaafc469c34c4d54589 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 31 三月 2022 09:26:19 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/pakStore/locCheckOut.js |   82 +++++++++++------------------------------
 1 files changed, 22 insertions(+), 60 deletions(-)

diff --git a/src/main/webapp/static/js/pakStore/locCheckOut.js b/src/main/webapp/static/js/pakStore/locCheckOut.js
index bce5470..aeef93f 100644
--- a/src/main/webapp/static/js/pakStore/locCheckOut.js
+++ b/src/main/webapp/static/js/pakStore/locCheckOut.js
@@ -1,8 +1,8 @@
-var pageCurr;
+var locDetlLayerIdx;
 var tableIns;
 function getCol() {
     var cols = [
-        {field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
+        {field: 'locNo', align: 'center',title: '搴撲綅鍙�', merge: true, style: 'font-weight: bold'}
     ];
     cols.push.apply(cols, detlCols);
     return cols;
@@ -10,13 +10,14 @@
 
 layui.config({
     base: baseUrl + "/static/layui/lay/modules/"
-}).use(['table','laydate', 'form', 'admin'], function() {
+}).use(['table','laydate', 'form', 'admin', 'tableMerge'], function() {
     var table = layui.table;
     var $ = layui.jquery;
     var layer = layui.layer;
     var layDate = layui.laydate;
     var form = layui.form;
     var admin = layui.admin;
+    var tableMerge = layui.tableMerge;
 
     tableIns = table.render({
         elem: '#chooseData',
@@ -27,14 +28,10 @@
         cellMinWidth: 50,
         cols: [getCol()],
         done: function(res, curr, count) {
+            tableMerge.render(this);
             limit();
             getOutBound();
         }
-    });
-
-    // 椤甸潰淇敼
-    table.on('edit(chooseData)', function (obj) {
-        updateLocDetlData(obj.data.locNo, obj.data.matnr, Number(obj.value));
     });
 
     // 鐩戝惉澶村伐鍏锋爮浜嬩欢
@@ -82,43 +79,6 @@
         }
     });
 
-    // 鐩戝惉琛屽伐鍏蜂簨浠�
-    table.on('tool(chooseData)', function(obj){
-        var data = obj.data;
-        switch (obj.event) {
-            case 'remove':
-                for (var i = locDetlData.length - 1; i >= 0; i--) {
-                    if (locDetlData[i].locNo === data.locNo && locDetlData[i].matnr === data.matnr) {
-                        locDetlData.splice(i, 1);
-                    }
-                }
-                tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}});
-                break;
-        }
-    });
-
-    function updateLocDetlData(locNo, matnr, count) {
-        if (isNaN(count)) {
-            layer.msg("璇疯緭鍏ユ暟瀛�");
-        } else {
-            if (count > 0) {
-                for (var i=0;i<locDetlData.length;i++){
-                    if (locDetlData[i]["locNo"] === locNo && locDetlData[i]["matnr"] === matnr){
-                        if (count > locDetlData[i]["anfme"]) {
-                            layer.msg("涓嶈兘瓒呰繃鍘熸暟閲�");
-                        } else {
-                            locDetlData[i]["count"] = count;
-                        }
-                        break;
-                    }
-                }
-            } else {
-                layer.msg("鏁伴噺蹇呴』澶т簬闆�");
-            }
-        }
-        tableIns.reload({data: locDetlData,done:function (res) {limit(); getOutBound();}});
-    }
-
     // 鑾峰彇鍑哄簱鍙�
     function getOutBound(){
         $.ajax({
@@ -141,22 +101,24 @@
             }
         })
     }
-})
 
-// 鎻愬彇鐗╂枡
-var locDetlLayerIdx;
-function getLocDetl() {
-    locDetlLayerIdx = layer.open({
-        type: 2,
-        title: '鎻愬彇鍑鸿揣鍐呭',
-        maxmin: true,
-        area: [top.detailWidth, top.detailHeight],
-        shadeClose: true,
-        content: 'locDetlCheckQuery.html',
-        success: function(layero, index){
-        }
-    });
-}
+    $(document).on('click','#mat-query', function () {
+        let loadIndex = layer.msg('璇锋眰涓�...', {icon: 16, shade: 0.01, time: false});
+        locDetlLayerIdx = layer.open({
+            type: 2,
+            title: false,
+            closeBtn: false,
+            maxmin: false,
+            area: ['90%', '85%'],
+            shadeClose: true,
+            content: 'locDetlCheckQuery.html',
+            success: function(layero, index){
+                layer.close(loadIndex);
+            }
+        });
+    })
+
+})
 
 // 娣诲姞琛ㄦ牸鏁版嵁
 function addTableData(data) {

--
Gitblit v1.9.1