From 19674bf7bc725aabc28f9cf14cad0bf8a789ff23 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期三, 07 一月 2026 15:47:47 +0800
Subject: [PATCH] 台机与库位绑定关系

---
 src/main/webapp/static/js/locAroundBind/locAroundBind.js |   31 ++++++++++++++++++++++++++-----
 1 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/src/main/webapp/static/js/locAroundBind/locAroundBind.js b/src/main/webapp/static/js/locAroundBind/locAroundBind.js
index 1735a63..8b45ac4 100644
--- a/src/main/webapp/static/js/locAroundBind/locAroundBind.js
+++ b/src/main/webapp/static/js/locAroundBind/locAroundBind.js
@@ -22,13 +22,11 @@
         height: 'full-120',
         cols: [[
             { type: 'checkbox' }
-            , { field: 'number', align: 'center', title: '搴忓彿' }
             , { field: 'id', align: 'center', title: 'ID' }
             , { field: 'devId', align: 'center', title: '鍙版満ID' }
             , { field: 'devNo', align: 'center', title: '鍙版満鍙�' }
-            , { field: 'bLocId', align: 'center', title: '搴撲綅ID' }
-            , { field: 'bLocNo', align: 'center', title: '搴撲綅鐮�' }
-
+            , { field: 'blocId', align: 'center', title: '搴撲綅ID', hide: true }
+            , { field: 'blocNo', align: 'center', title: '搴撲綅鐮�' }
             , { fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 120 }
         ]],
         request: {
@@ -129,7 +127,7 @@
                         if (res.data) {
                             layer.open({
                                 type: 1,
-                                title: '鍒濆鍖栧簱浣�',
+                                title: '鍙版満缁戝畾浣滀笟搴撲綅',
                                 area: ["400px"],
                                 maxmin: true,
                                 shadeClose: true,
@@ -148,6 +146,29 @@
         }
     });
 
+    // 鍒濆鍖栦繚瀛�
+    form.on('submit(initDo)', function (data) {
+        $.ajax({
+            url: baseUrl + "/locAroundBind/bind/init",
+            headers: { 'token': localStorage.getItem('token') },
+            data: JSON.stringify(data.field),
+            contentType: 'application/json;charset=UTF-8',
+            method: 'POST',
+            async: false,
+            success: function (res) {
+                if (res.code === 200) {
+                    layer.msg(res.msg);
+                    layer.closeAll();
+                    tableReload(false);
+                } else if (res.code === 403) {
+                    parent.location.href = "/";
+                } else {
+                    layer.msg(res.msg)
+                }
+            }
+        })
+    });
+
     // 鐩戝惉琛屽伐鍏蜂簨浠�
     table.on('tool(locAroundBind)', function (obj) {
         var data = obj.data;

--
Gitblit v1.9.1