From fb57e7836338304b16c09fec4fb5c68fb688c39e Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期二, 28 四月 2026 14:03:24 +0800
Subject: [PATCH] 1.新增分区查询 2.任务档新增分区字段

---
 src/main/webapp/static/js/locMast/locMast.js |  128 +++++++++++++++++++-----------------------
 1 files changed, 57 insertions(+), 71 deletions(-)

diff --git a/src/main/webapp/static/js/locMast/locMast.js b/src/main/webapp/static/js/locMast/locMast.js
index 8a26d37..7ae6ada 100644
--- a/src/main/webapp/static/js/locMast/locMast.js
+++ b/src/main/webapp/static/js/locMast/locMast.js
@@ -1,4 +1,5 @@
 var pageCurr;
+var batchAreaLocNos = [];
 layui.use(['table','laydate', 'form'], function(){
     var table = layui.table;
     var $ = layui.jquery;
@@ -22,18 +23,9 @@
             {type: 'checkbox', fixed: 'left'}
 //            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
             ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�',sort:true, hide:false}
+            ,{field: 'areaId$', align: 'center',title: '搴撳尯',sort:true, hide:false}
+            ,{field: 'locAlias', align: 'center',title: '搴撲綅鍒悕',sort:true, hide:false}
             ,{field: 'locSts$', align: 'center',title: '搴撲綅鐘舵��',width:200, hide:false}
-            ,{field: 'whsType$', align: 'center',title: '搴撲綅绫诲瀷',width:200, hide:false}
-            ,{field: 'frozen$', align: 'center',title: '鍐荤粨鐘舵��',
-                templet: function(d) {
-                    // 鏍规嵁鏉′欢鍒ゆ柇瀛椾綋棰滆壊
-                    if (d.frozen$ === '宸插喕缁�') {
-                        return '<span style="color: #34a8de;">' +d.frozen$ + '</span>';
-                    } else {
-                        return '<span">' +d.frozen$ + '</span>';
-                    }
-                }}
-            ,{field: 'frozenMemo', align: 'center',title: '鍐荤粨鍘熷洜'}
             // ,{field: 'pltType', align: 'center',title: ''}
             // ,{field: 'ctnType', align: 'center',title: ''}
             // ,{field: 'locSts', align: 'center',title: ''}
@@ -43,12 +35,6 @@
             ,{field: 'bay1', align: 'center',title: '鍒�', sort:true, hide:false}
             ,{field: 'lev1', align: 'center',title: '灞�', sort:true, hide:false}
             ,{field: 'gro1', align: 'center',title: '缁�', sort:true, hide:false}
-            ,{field: 'fullPlt', align: 'center',title: '婊℃澘', templet:function(row){
-                    var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' disabled table-index='"+row.LAY_TABLE_INDEX+"'";
-                    if(row.fullPlt === 'Y'){html += " checked ";}
-                    html += ">";
-                    return html;
-                },width:80, hide:false}
             // ,{field: 'outEnable', align: 'center',title: ''}
             ,{field: 'ioTime$', align: 'center',title: 'ioTime', hide:true}
             // ,{field: 'firstTime$', align: 'center',title: '', hide:true}
@@ -92,14 +78,6 @@
             }
             pageCurr=curr;
             limit();
-            form.on('checkbox(tableCheckbox)', function (data) {
-                var _index = $(data.elem).attr('table-index')||0;
-                if(data.elem.checked){
-                    res.data[_index][data.value] = 'Y';
-                }else{
-                    res.data[_index][data.value] = 'N';
-                }
-            });
         }
     });
 
@@ -178,6 +156,28 @@
                             }
                         })
                     });
+                }
+                break;
+            case 'batchArea':
+                var areaData = checkStatus.data;
+                if (areaData.length === 0){
+                    layer.msg('璇烽�夋嫨鏁版嵁');
+                } else {
+                    batchAreaLocNos = areaData.map(function (item) {
+                        return item.locNo;
+                    });
+                    $('#batchAreaId').val('');
+                    layer.open({
+                        type: 1,
+                        title: '鎵归噺淇敼搴撳尯',
+                        area: ["360px"],
+                        maxmin: true,
+                        shadeClose: true,
+                        content: $("#batchAreaDiv"),
+                        success: function () {
+                            form.render('select');
+                        }
+                    })
                 }
                 break;
             case 'exportData':
@@ -304,42 +304,6 @@
                     }
                 });
                 break;
-            case 'whsType':
-                var param = top.reObject(data).whsType;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '搴撲綅璇︽儏',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../basWhs/basWhs_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: baseUrl+"/basWhs/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#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');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
             case 'modiUser':
                 var param = top.reObject(data).modiUser;
                 if (param === undefined) {
@@ -439,6 +403,36 @@
         })
     });
 
+    // 鎵归噺淇敼搴撳尯
+    form.on('submit(batchAreaDo)', function (data) {
+        if (batchAreaLocNos.length === 0) {
+            layer.msg('璇烽�夋嫨鏁版嵁');
+            return false;
+        }
+        $.ajax({
+            url: baseUrl+"/locMast/batch/area/auth",
+            headers: {'token': localStorage.getItem('token')},
+            data: JSON.stringify({
+                locNos: batchAreaLocNos,
+                areaId: data.field.areaId
+            }),
+            dataType:'json',
+            contentType:'application/json;charset=UTF-8',
+            method: 'POST',
+            success: function (res) {
+                if (res.code === 200){
+                    layer.closeAll();
+                    tableReload(false);
+                } else if (res.code === 403){
+                    parent.location.href = "/";
+                }else {
+                    layer.msg(res.msg)
+                }
+            }
+        });
+        return false;
+    });
+
     // 鏁版嵁淇濆瓨鍔ㄤ綔
     form.on('submit(save)', function () {
         if (banMsg != null){
@@ -460,6 +454,8 @@
         var data = {
 //            id: $('#id').val(),
             locNo: $('#locNo').val(),
+            areaId: $('#areaId').val(),
+            locAlias: $('#locAlias').val(),
             whsType: $('#whsType').val(),
             pltType: $('#pltType').val(),
             ctnType: $('#ctnType').val(),
@@ -512,16 +508,6 @@
             }
         })
     }
-
-    // 澶嶉�夋浜嬩欢
-    form.on('checkbox(detailCheckbox)', function (data) {
-        var el = data.elem;
-        if (el.checked) {
-            $(el).val('Y');
-        } else {
-            $(el).val('N');
-        }
-    });
 
     // 鎼滅储鏍忔悳绱簨浠�
     form.on('submit(search)', function (data) {

--
Gitblit v1.9.1