From eb9e30160e01dbf905d5514c3b6a07f5d12023ff Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 25 五月 2023 16:06:31 +0800
Subject: [PATCH] 入库找库位逻辑

---
 src/main/webapp/static/js/order/order.js |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 3ef4275..ed11081 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -241,6 +241,7 @@
                         {field: 'batch', title: '搴忓垪鐮�', edit: true},
                         {field: 'specs', title: '瑙勬牸'},
                         {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
+                        {field: 'sum', title: '搴撳瓨鏁伴噺', style: 'color: red;font-weight: bold',  minWidth: 110, width: 110},
                         // {field: 'inQty', title: '宸插叆搴撻噺',  minWidth: 100, width: 100},
                         // {field: 'unit', title: '鍗曚綅', width: 80},
                         {field: 'memo', title: '澶囨敞' , edit: true},
@@ -334,14 +335,23 @@
                                     let item = selectList[i];
                                     // 鏌ヨ鐗╂枡璇︽儏
                                     $.ajax({
-                                        url: baseUrl+"/mat/covert/"+item.value+"/auth",
+                                        url: baseUrl+"/mat/covert/"+btoa(item.value)+"/auth",
                                         headers: {'token': localStorage.getItem('token')},
                                         method: 'GET',
                                         async: false,
                                         success: function (res) {
                                             if (res.code === 200){
-                                                xxDataList.push(res.data);
-                                                insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
+                                                var bige=true;
+                                                for (var j = 0; j < xxDataList.length; j++) {
+                                                    if (xxDataList[j].matnr === res.data.matnr && xxDataList[j].batch === res.data.batch) {
+                                                        bige=false;
+                                                        break;
+                                                    }
+                                                }
+                                                if (bige){
+                                                    xxDataList.push(res.data);
+                                                    insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
+                                                }
                                             } else if (res.code === 403){
                                                 top.location.href = baseUrl+"/";
                                             }else {

--
Gitblit v1.9.1