From 7e68f7b8bf6c67be60faeac758511650c61c6f6d Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 29 十二月 2023 15:30:56 +0800
Subject: [PATCH] #

---
 zy-asrs-wms/src/main/webapp/static/js/safeSto/safeSto.js |   77 ++++++++++++++++----------------------
 1 files changed, 33 insertions(+), 44 deletions(-)

diff --git a/zy-asrs-wms/src/main/webapp/static/js/safeSto/safeSto.js b/zy-asrs-wms/src/main/webapp/static/js/safeSto/safeSto.js
index bcbbedf..6390f10 100644
--- a/zy-asrs-wms/src/main/webapp/static/js/safeSto/safeSto.js
+++ b/zy-asrs-wms/src/main/webapp/static/js/safeSto/safeSto.js
@@ -23,12 +23,12 @@
         cellMinWidth: 50,
         cols: [[
             {type: 'numbers', fixed: 'left'}
-            ,{field: 'node_name', align: 'center',title: '璐т綅'}
+            ,{field: 'locNo$', align: 'center',title: '搴撲綅'}
             ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿'}
             ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О'}
             ,{field: 'progress', align: 'center',title: '浣跨敤鎯呭喌', templet: '#progressTpl', width: 350}
             ,{field: 'status', align: 'center',title: '璀︽姤', templet: '#statusTpl', width: 100}
-            ,{field: 'safe_qua', align: 'center',title: '瀹夊叏搴撳瓨閲�', style: 'font-weight: bold'}
+            ,{field: 'safeQua', align: 'center',title: '瀹夊叏搴撳瓨閲�', style: 'font-weight: bold'}
             ,{field: 'amount', align: 'center',title: '褰撳墠搴撳瓨閲�', style: 'font-weight: bold; color: #2d8cf0'}
             ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:120}
         ]],
@@ -86,8 +86,8 @@
             case 'del':
                 var params = [];
                 params.push({
-                    nodeId: data.node_id,
-                    nodeName: data.node_name,
+                    id: data.id,
+                    locNo: data.locNo,
                     matnr: data.matnr
                 })
                 doDel(params);
@@ -137,7 +137,7 @@
                 form.val('detail', mData);
                 // 琛ㄥ崟鎻愪氦浜嬩欢
                 form.on('submit(editSubmit)', function (data) {
-                    data.field.nodeId = insNodeXmSel.getValue()[0] ? insNodeXmSel.getValue()[0].id : null;
+                    data.field.locNo = locNoXmSelect.getValue()[0] ? locNoXmSelect.getValue()[0].name : null;
                     data.field.matId = matXmSelect.getValue()[0] ? matXmSelect.getValue()[0].value : null;
                     var loadIndex = layer.load(2);
                     $.ajax({
@@ -161,46 +161,35 @@
                     })
                     return false;
                 });
-                // 娓叉煋浠撳簱涓嬫媺鏍�
-                var insNodeXmSel;
-                $.ajax({
-                    url: baseUrl + "/node/tree/auth",
-                    headers: {'token': localStorage.getItem('token')},
-                    method: 'POST',
-                    async: false,
-                    success: function (res) {
-                        if (res.code === 200) {
-                            insNodeXmSel = xmSelect.render({
-                                el: '#nodeSel',
-                                autoRow: true,
-                                radio: true,  // 鍗曢��
-                                filterable: true,
-                                height: '300px',
-                                tree: {
-                                    show: true,
-                                    showFolderIcon: true,
-                                    showLine: true,
-                                    indent: 20,
-                                    strict: false,  // 鐖惰妭鐐逛篃鑳介�変腑锛岄噸瑕�
-                                    clickExpand: true,
-                                    clickCheck: false,
-                                    expandedKeys: true
-                                },
-                                prop: {
-                                    name: 'title',
-                                    value: 'id',
-                                },
-                                toolbar: {
-                                    show: true,
-                                    list: ['ALL', 'REVERSE', 'CLEAR']
-                                },
-                                data: function(){
-                                    return res.data
+                // 娓叉煋鍟嗗搧閫夋嫨
+                var locNoXmSelect = xmSelect.render({
+                    el: '#locNo',
+                    radio: true,
+                    autoRow: true,
+                    toolbar: { show: true },
+                    filterable: true,
+                    remoteSearch: true,
+                    remoteMethod: function(val, cb, show){
+                        //杩欓噷濡傛灉val涓虹┖, 鍒欎笉瑙﹀彂鎼滅储
+                        // if(!val){
+                        //     return cb([]);
+                        // }
+                        $.ajax({
+                            url: baseUrl+"/locMast/all/get/kv",
+                            headers: {'token': localStorage.getItem('token')},
+                            data: {
+                                condition: val
+                            },
+                            method: 'POST',
+                            success: function (res) {
+                                if (res.code === 200){
+                                    cb(res.data)
+                                } else {
+                                    cb([]);
+                                    layer.msg(res.msg, {icon: 2});
                                 }
-                            })
-                        } else {
-                            layer.msg(res.msg, {icon: 2});
-                        }
+                            }
+                        });
                     }
                 })
                 // 娓叉煋鍟嗗搧閫夋嫨

--
Gitblit v1.9.1