From 1e07ab637274948e392a37f840c3e6ce9cbe71a1 Mon Sep 17 00:00:00 2001
From: 18516761980 <56479841@qq.com>
Date: 星期二, 21 六月 2022 15:30:44 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/luxiaotao1123/zy-asrs into hylyasrs

---
 src/main/webapp/static/js/order/out.js |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/main/webapp/static/js/order/out.js b/src/main/webapp/static/js/order/out.js
index 9829cbb..cc84ebe 100644
--- a/src/main/webapp/static/js/order/out.js
+++ b/src/main/webapp/static/js/order/out.js
@@ -32,7 +32,7 @@
             ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl', width: 160}
             ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栫爜', width: 160}
             ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', width: 200}
-            ,{field: 'batch', align: 'center',title: '搴忓垪鐮�'}
+            ,{field: 'batch', align: 'center',title: '鎵瑰彿'}
             ,{field: 'specs', align: 'center',title: '瑙勬牸'}
             // ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
             // ,{field: 'qty', align: 'center',title: '浣滀笟鏁伴噺', style: 'font-weight: bold'}
@@ -154,7 +154,7 @@
                                     // {type: 'checkbox', merge: ['orderNo']},
                                     {field: 'orderNo', title: '鍗曟嵁缂栧彿', merge: true, align: 'center'},
                                     {field: 'title', title: '鍟嗗搧', merge: true, align: 'center', width: 350},
-                                    {field: 'batch', title: '搴忓垪鐮�', align: 'center'},
+                                    {field: 'batch', title: '鎵瑰彿', align: 'center'},
                                     {field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
                                     {field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'},
                                     {field: 'staNos', align: 'center', title: '鍑哄簱绔�', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
@@ -192,15 +192,22 @@
                                 // 鍑哄簱绔欏彇浜ら泦
                                 let staBatchSelectVal = [];
                                 for(let i = 0; i<stoPreTabData.length; i++) {
-                                    if (i === 0) {
-                                        staBatchSelectVal = stoPreTabData[i].staNos;
-                                    } else {
-                                        let staNos = stoPreTabData[i].staNos;
-                                        staBatchSelectVal = staBatchSelectVal.filter( val => {
-                                                return new Set(staNos).has(val)
-                                            }
-                                        )
+                                    let staNos = stoPreTabData[i].staNos;
+                                    if (staNos !== null) {
+                                        if (staBatchSelectVal.length === 0) {
+                                            staBatchSelectVal = staNos;
+                                        } else {
+                                            staBatchSelectVal = staBatchSelectVal.filter(val =>
+                                                {
+                                                    return new Set(staNos).has(val)
+                                                }
+                                            )
+                                        }
                                     }
+                                }
+                                if (staBatchSelectVal.length === 0) {
+                                    layer.msg("鍑哄簱绔欐病鏈変氦闆嗭紝鏃犳硶鎵归噺淇敼", {icon: 2});
+                                    return;
                                 }
                                 admin.open({
                                     type: 1,
@@ -228,7 +235,6 @@
                                                 }
                                             }
                                             stoPreTabIdx.reload({data: tableCache});
-                                            console.log(arr)
                                             arr.forEach(item => {
                                                 $('div[lay-id=stoPreTab] tr[data-index="' + item + '"] .order-sta-select').val(batchSta);
                                             });

--
Gitblit v1.9.1