From b176072388747abb438990157bfa305b215b4b90 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期二, 14 四月 2026 21:59:39 +0800
Subject: [PATCH] 我们现在讨论一下系统找库位方案, 如何实现,对现有找库位规则进行整改,数据库也要整改 1、要能方便的填写单伸堆垛机或双伸堆垛机的深浅库位配置 2、根据设备状态分配库位,离线设备不分配 3、库位分配要均衡到每一个设备  4、库位高度需要匹配到对应库位信息,低库位能向上兼容  5、空托盘优先放在locType2库位=1的库位,没有这种库位了,允许放到其他库位 6、给入库站点设置有限去那些堆垛机,其次去那些堆垛机,弄成页面可以配置入库站点 7、在系统配置新增优先放前几列的配置,当入库的货物是高频货物时放在前几列 8、组托中会标识该托盘是高频还是低频,如果是高频则从前往后找库位,如果是低频则从后往前找库位 9、找库位时locMast中whsType字段无用

---
 src/main/webapp/static/js/basDevp/basDevp.js |   85 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 79 insertions(+), 6 deletions(-)

diff --git a/src/main/webapp/static/js/basDevp/basDevp.js b/src/main/webapp/static/js/basDevp/basDevp.js
index f67d853..d1535e1 100644
--- a/src/main/webapp/static/js/basDevp/basDevp.js
+++ b/src/main/webapp/static/js/basDevp/basDevp.js
@@ -81,6 +81,8 @@
             ,{field: 'barcode', align: 'center',title: '鏉″舰鐮�'}
             ,{field: 'inQty', align: 'center',title: '鍏ュ簱鏆傚瓨'}
             ,{field: 'area$', align: 'center',title: '缁戝畾搴撳尯'}
+            ,{field: 'inFirstCrnCsv', align: 'center',title: '绗竴浼樺厛姹�'}
+            ,{field: 'inSecondCrnCsv', align: 'center',title: '绗簩浼樺厛姹�'}
             // ,{field: 'row1', align: 'center',title: ''}
             // ,{field: 'ioTime$', align: 'center',title: ''}
             // ,{field: 'area', align: 'center',title: ''}
@@ -483,7 +485,11 @@
             inQty: $('#inQty').val(),
             row1: $('#row1').val(),
             ioTime: top.strToDate($('#ioTime\\$').val()),
-            area: $('#area').val(),
+            area: getAreaSubmitValue(),
+            inFirstCrnCsv: $('#inFirstCrnCsv').val(),
+            inSecondCrnCsv: $('#inSecondCrnCsv').val(),
+            inFirstCrnCurrentNo: $('#inFirstCrnCurrentNo').val(),
+            inSecondCrnCurrentNo: $('#inSecondCrnCurrentNo').val(),
             inOk: $('#inOk').val(),
             outOk: $('#outOk').val(),
             modiUser: $('#modiUser').val(),
@@ -527,6 +533,9 @@
         } else {
             $(el).val('N');
         }
+    });
+    form.on('checkbox(areaCheckbox)', function () {
+        $('#area').val(getAreaSubmitValue());
     });
 
     // 鎼滅储鏍忔悳绱簨浠�
@@ -598,7 +607,11 @@
         var find = el.find(":input[id='" + val + "']");
         var currentVal = data[val];
         if (val === 'area') {
-            currentVal = normalizeAreaValue(currentVal);
+            setAreaValues(currentVal);
+            if (find[0] != null) {
+                find.val(normalizeAreaValues(currentVal).join(','));
+            }
+            continue;
         }
         if (find[0]!=null){
             if (find[0].type === 'checkbox'){
@@ -609,6 +622,9 @@
                     find.remove("checked");
                     find.val('N');
                 }
+                continue;
+            } else if (find[0].type === 'select-multiple') {
+                find.val(currentVal || []);
                 continue;
             }
         }
@@ -643,11 +659,68 @@
     return value;
 }
 
+function normalizeAreaValues(value) {
+    if (value === undefined || value === null || value === '') {
+        return [];
+    }
+    var values = Object.prototype.toString.call(value) === '[object Array]'
+        ? value
+        : String(value).replace(/[锛岋紱銆乚/g, ',').split(/[,;]+/);
+    var result = [];
+    for (var i = 0; i < values.length; i++) {
+        var normalized = normalizeAreaValue(values[i]);
+        if (normalized === undefined || normalized === null || normalized === '') {
+            continue;
+        }
+        if (result.indexOf(normalized) < 0) {
+            result.push(normalized);
+        }
+    }
+    return result;
+}
+
+function setAreaValues(value) {
+    var values = normalizeAreaValues(value);
+    $('#area').val(values.join(','));
+    $('#areaBox input[type="checkbox"][name="areaOption"]').each(function () {
+        var checked = values.indexOf(this.value) >= 0;
+        $(this).prop('checked', checked);
+        if (checked) {
+            $(this).attr('checked', 'checked');
+        } else {
+            $(this).removeAttr('checked');
+        }
+    });
+}
+
+function getAreaValues() {
+    var values = [];
+    $('#areaBox input[type="checkbox"][name="areaOption"]').each(function () {
+        if (this.checked && values.indexOf(this.value) < 0) {
+            values.push(this.value);
+        }
+    });
+    return values;
+}
+
+function getAreaSubmitValue() {
+    var values = getAreaValues();
+    $('#area').val(values.join(','));
+    return values.join(',');
+}
+
 function clearFormVal(el) {
-    $(':input', el)
-        .val('')
-        .removeAttr('checked')
-        .removeAttr('selected');
+    $(':input', el).each(function () {
+        if (this.type === 'checkbox' || this.type === 'radio') {
+            $(this).prop('checked', false).removeAttr('checked');
+            return;
+        }
+        if (this.tagName === 'SELECT' && this.multiple) {
+            $(this).val([]).find('option').prop('selected', false);
+            return;
+        }
+        $(this).val('');
+    });
 }
 
 function detailScreen(index) {

--
Gitblit v1.9.1