From 246062d502dbd85c686966a23d40d55d7da523d4 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 20 九月 2024 12:16:27 +0800
Subject: [PATCH] 关键件绑定,流转卡批量生成

---
 WebTM/views/车间管理/关键件绑定/Sc_KeyElementBinding.html              |  107 +++++++++++++++++++++--------------
 WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBill_BatchSplit.html |   12 +++
 WebTM/layuiadmin/Scripts/webConfig.js                         |    2 
 WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html                   |   21 ++++---
 4 files changed, 88 insertions(+), 54 deletions(-)

diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index a489032..680227c 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -6,7 +6,7 @@
     //var WEBURL = "http://localhost/API/";             //棰滄檽鍐涙湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄤ箰鏈湴閰嶇疆
    /* var WEBURL = "http://localhost:8082/API/"; */   //鏉滆春鏈湴閰嶇疆
-     var WEBURL = "http://localhost/API/";   //娼樻禉娓告湰鍦伴厤缃�  */
+     //var WEBURL = "http://localhost/API/";   //娼樻禉娓告湰鍦伴厤缃�  */
     //var WEBURL = "http://localhost:8082/API/";    //鏉滆春鏈湴閰嶇疆
     /*var WEBURL = "http://localhost/API/";*/    //娼樻禉娓告湰鍦伴厤缃�  
     /*var WEBURL = "http://localhost:8082/API/";    //鏉滆春鏈湴閰嶇疆*/
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
index 1262bed..9bf7a77 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
@@ -56,18 +56,19 @@
                                     </div>
                                     <div class="layui-inline">
                                         <label class="layui-form-label">鏄惁涓嬫帹鐢熸垚娴佽浆鍗�</label>
-                                        <div class="layui-input-block" style="margin-top:10px">
+                                        <div class="layui-input-block" style="margin-top:10px;width:183px;">
                                             <select name="HSF" id="HSF" lay-verify="required" lay-search class="layui-input ForFilteringSchemes">
                                                 <!--  <option value="鍏ㄩ儴">鍏ㄩ儴</option>-->
                                                 <option value="鍏ㄩ儴" selected="selected">鍏ㄩ儴</option>
                                                 <option value="宸蹭笅鎺�">宸蹭笅鎺�</option>
+                                                <option value="閮ㄥ垎涓嬫帹">閮ㄥ垎涓嬫帹</option>
                                                 <option value="鏈笅鎺�">鏈笅鎺�</option>
                                             </select>
                                         </div>
                                     </div>
                                     <div class="layui-inline">
-                                        <label class="layui-form-label" style="width: 85px;">椤圭洰鍙�</label>
-                                        <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+                                        <label class="layui-form-label" style="width: 80px;">椤圭洰鍙�</label>
+                                        <div class="layui-input-block" style="margin-left: 110px; width: 183px;">
                                             <select name="HProject" id="HProject" class=" ForFilteringSchemes" lay-verify="HProject">
                                                 <!--鍔ㄦ�佹覆鏌撶粍缁�-->
                                             </select>
@@ -96,18 +97,16 @@
                                             <input type="text" class="layui-input ForFilteringSchemes" name="WorkCenter" id="WorkCenter">
                                         </div>
                                     </div>
-                                    <button class="layui-btn layuiadmin-btn-order" style="display:none;" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
-                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
-                                    </button>
-                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px;display:none;">閲嶇疆</button>
-
-
                                     <div class="layui-inline">
                                         <label class="layui-form-label">閿�鍞鍗�</label>
                                         <div class="layui-input-block">
                                             <input type="text" class="layui-input ForFilteringSchemes" name="HSeOrderBillNo" id="HSeOrderBillNo">
                                         </div>
                                     </div>
+                                    <button class="layui-btn layuiadmin-btn-order" style="display:none;" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                    </button>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px;display:none;">閲嶇疆</button>
 
                                     <!--鏄剧ず褰撳墠杩囨护鏂规-->
                                     <div class="layui-inline" style="margin-left:5px;">
@@ -1135,6 +1134,9 @@
                     if (HSF == "宸蹭笅鎺�") {
                         sWhere += " and 鏄惁涓嬫帹鐢熸垚娴佽浆鍗� like '%" + HSF + "%' ";
                     }
+                    if (HSF == "閮ㄥ垎涓嬫帹") {
+                        sWhere += " and 鏄惁涓嬫帹鐢熸垚娴佽浆鍗� like '%" + HSF + "%' ";
+                    }
                     if (HSF == "鏈笅鎺�") {
                         sWhere += " and 鏄惁涓嬫帹鐢熸垚娴佽浆鍗� like '%" + HSF + "%' ";
                     }
@@ -1206,6 +1208,7 @@
                 $("#HMaterName").val("");//鍗曟嵁鍙�
                 $("#HStatus").val("寮�宸�");//鍗曟嵁鍙�
                 $("#HModel").val("");//瑙勬牸鍨嬪彿
+                $("#HSeOrderBillNo").val(""); //閿�鍞鍗�
                 $("#btnSearch").click();
                 $("#ColContent").val("");
                 $("#ColName").val("0");
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\205\263\351\224\256\344\273\266\347\273\221\345\256\232/Sc_KeyElementBinding.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\205\263\351\224\256\344\273\266\347\273\221\345\256\232/Sc_KeyElementBinding.html"
index a3d8c17..dc35223 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\205\263\351\224\256\344\273\266\347\273\221\345\256\232/Sc_KeyElementBinding.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\205\263\351\224\256\344\273\266\347\273\221\345\256\232/Sc_KeyElementBinding.html"
@@ -13,7 +13,7 @@
     <script src="../../../layuiadmin/Scripts/json2.js"></script>
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
-    <!--<script src="../../../layuiadmin/PubCustom.js"></script>-->
+    <script src="../../../layuiadmin/PubCustom.js"></script>
     <script src="../../CreateControl.js"></script>
 </head>
 <body>
@@ -29,10 +29,10 @@
                     <h1 style="text-align:center;margin-bottom:25px;"><b>鍏抽敭浠剁粦瀹�</b></h1>
                     <div class="layui-form-item" style="padding-top: 3px;">
                         <div class="layui-row" style="text-align: center;">
-                            <div class="layui-col-xs3 layui-inline" style="margin-left:205px;">
+                            <div class="layui-col-xs3 layui-inline" style="margin-left:140px;">
                                 <label class="layui-form-label">娴佽浆鍗�</label>
                                 <div class="layui-input-inline">
-                                    <input type="text" class="layui-input" name="HProcessExchangeBillNo" id="HProcessExchangeBillNo" onfocus="this.select();">
+                                    <input type="text" class="layui-input" name="HProcessExchangeBillNo" id="HProcessExchangeBillNo" style="width: 300px;" onfocus="this.select();">
                                     <input type="hidden" name="HProcessExchangeInterID" id="HProcessExchangeInterID" value="0">
                                     <input type="hidden" name="HProcessExchangeEntryID" id="HProcessExchangeEntryID" value="0">
                                 </div>
@@ -40,18 +40,19 @@
                             <div class="layui-col-xs3 layui-inline">
                                 <label class="layui-form-label">浜у搧鐮�</label>
                                 <div class="layui-input-inline">
-                                    <input type="text" class="layui-input" name="HBarCode_P" id="HBarCode_P" onfocus="this.select();">
+                                    <input type="text" class="layui-input" name="HBarCode_P" id="HBarCode_P" style="width: 300px;" onfocus="this.select();">
                                 </div>
                             </div>
+                            <button class="layui-btn layui-btn-normal" style="float:left;margin-left:-15px;" type="button" lay-submit="" lay-filter="btnNextProc" id="btnNextProc">鎹骇鍝�</button>
                             <div class="layui-col-xs3 layui-inline">
                                 <label class="layui-form-label">閰嶄欢鐮�</label>
                                 <div class="layui-input-inline">
-                                    <input type="text" class="layui-input" name="HBarCode" id="HBarCode" onfocus="this.select();">
+                                    <input type="text" class="layui-input" name="HBarCode" id="HBarCode" style="width: 300px;" onfocus="this.select();">
                                 </div>
                             </div>
                         </div>
                     </div>
-                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 45%; float: left; height:calc(60vh);background-color:white;">
+                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 45%; float: left; height:calc(43vh);background-color:white;">
                         <div class="layui-tab-content">
                             <!--鍩烘湰淇℃伅-->
                             <div class="layui-tab-item layui-show">
@@ -188,8 +189,8 @@
                             </div>
                         </div>
                     </div>
-                    <div style="width: 0.2%; float: left; height: calc(60vh);background-color:#2baaca"></div>
-                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 54.8%; float: left; height:calc(60vh);background-color:white;">
+                    <div style="width: 0.2%; float: left; height: calc(43vh);background-color:#2baaca"></div>
+                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="width: 54.8%; float: left; height:calc(43vh);background-color:white;">
                         <div style="width:100px;height:23px; background: linear-gradient(-135deg, transparent 30px, #2baaca 0);"><span style="color:aliceblue;">缁戝畾淇℃伅</span></div>
                         <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                     </div>
@@ -336,13 +337,45 @@
             }           
         });
 
-        //閫�鍑�
-        form.on('submit(btnEdit)', function (data) {
-            if (params[1] != null) {
-                Pub_Close(1);
-            } else if (params[1] == null) {
-                Pub_Close(2);
+        //鎹骇鍝�
+        form.on('submit(btnNextProc)', function (data) {
+            for (var i = 0; i < option.data.length; i++) {
+                if (option.data[i].HBindingQty < 1 || option.data[i].HBarCode == "") {
+                    layer.alert("绗�<span style='color: red;'>" + (i + 1) + "</span>琛岋紝閰嶄欢 <span style='color: blue;'>" + option.data[i].HMaterName + "</span> 鏈粦瀹氶綈鏁达紒")
+                    return;
+                }
+            } 
+
+            //鍚敤杈撳叆妗�,鑳屾櫙鑹叉仮澶�
+            $("#HBarCode_P").removeAttr("disabled"); //浜у搧鐮佹枃鏈鍚敤
+            $("#HBarCode_P").css('background', '#FFFFFF')//浜у搧鐮佹枃鏈鑳屾櫙鑹叉仮澶�
+            //娓呯┖鏂囨湰妗嗗唴瀹�
+            $("#HBarCode_P").val("");//浜у搧鐮佹枃鏈鍐呭娓呯┖
+            //鍏夋爣璺宠浆鍒颁骇鍝佺爜鏂囨湰妗嗕笂
+            $("#HBarCode_P").focus();
+            //鎶婃瘡涓骇鍝佺殑鎵爜缁戝畾璁板綍杩佺Щ鍒颁笅鏂瑰巻鍙茶褰曟槑缁嗙綉鏍�
+            for (var i = 0; i < option.data.length; i++) {
+                option_detail.data.push(option.data[i])
             }
+            table.render(option_detail);
+            //娓呴櫎缁戝畾淇℃伅缃戞牸鎵爜璁板綍
+            option.data = [];
+            table.render(option);
+
+            //鍘嗗彶缁戝畾璁板綍鏌ヨ
+            //get_Display();
+        });        
+
+        //鍒锋柊鎸夐挳
+        form.on('submit(btnRefresh)', function () {
+            layer.confirm('鍒锋柊鍚庨〉闈㈡暟鎹皢娑堝け锛屾槸鍚︾‘璁ゅ埛鏂帮紵', { icon: 3, title: '鎻愮ず' }, function (index) {
+                location.replace('Sc_KeyElementBinding.html');
+            });
+        })
+
+        //閫�鍑�
+        form.on('submit(btnExit)', function (data) {
+            Pub_Close(2);
         });
         //#endregion
 
@@ -379,9 +412,7 @@
             //#endregion
 
             //鍒濆鍖栫粦瀹氫俊鎭〃鏍�
-            set_InitGrid();
-            //鍘嗗彶缁戝畾璁板綍鏌ヨ
-            //get_Display();
+            set_InitGrid();           
         }
         //#endregion
 
@@ -391,7 +422,7 @@
             option = {
                 elem: '#mainTable'
                 , page: false
-                , height: 'full-358'
+                , height: 'full-500'
                 , loading: false
                 , limit: 200
                 , cols: [[ //缁戝畾淇℃伅琛�
@@ -404,7 +435,7 @@
                     , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 160 }
                     , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 160 }
                     , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 160, hide: true }
-                    , { field: 'HBatchNo', title: '鎵规', width: 160 }
+                    , { field: 'HBatchNo', title: '鎵规', width: 160, hide: true }
                     , { field: 'HSourceID', title: 'HSourceID', width: 160, hide: true }
                     , { field: 'HEquipID', title: 'HEquipID', width: 160, hide: true }
                     , { field: 'HGroupID', title: 'HGroupID', width: 160, hide: true }
@@ -436,12 +467,13 @@
                     { type: 'numbers', title: '搴忓彿', width: 50 }
                     , { field: 'HBarCode_P', title: '浜у搧鐮�', width: 400 }
                     , { field: 'HBarCode', title: '閰嶄欢鐮�', width: 400 }
-                    , { field: 'HPartsQty', title: '閰嶄欢鏁伴噺', width: 90 }
+                    , { field: 'HPartsQty', title: '閰嶄欢鏁�', width: 90 }
+                    , { field: 'HBindingQty', title: '宸茬粦鏁�', width: 72 }
                     , { field: 'HMaterID', title: 'HMaterID', hide: true }
                     , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 260 }
                     , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 260 }
                     , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 160, hide: true }
-                    , { field: 'HBatchNo', title: '鎵规', width: 200 }
+                    , { field: 'HBatchNo', title: '鎵规', width: 200, hide: true }
                     , { field: 'HSourceID', title: 'HSourceID', width: 160, hide: true }
                     , { field: 'HEquipID', title: 'HEquipID', width: 160, hide: true }
                     , { field: 'HGroupID', title: 'HGroupID', width: 160, hide: true }
@@ -460,9 +492,14 @@
 
         //#region 淇濆瓨鏂规硶
         function set_SaveBill(data) {
-            //搴忓垪鍖栬〃澶翠俊鎭拰瀛愯〃淇℃伅
+            //鎶婃渶鍚庝竴涓骇鍝佺殑缁戝畾淇℃伅鍐欏叆鍒板巻鍙茶褰曟槑缁嗙綉鏍�
+            for (var i = 0; i < option.data.length; i++) {
+                option_detail.data.push(option.data[i])
+            }
+
+            //搴忓垪鍖栬〃澶翠俊鎭拰瀛愯〃淇℃伅            
             var sMainStr = JSON.stringify(data.field);
-            var sSubStr = JSON.stringify(option.data);
+            var sSubStr = JSON.stringify(option_detail.data);
             //鎷兼帴鍙傛暟
             var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"];
 
@@ -495,31 +532,17 @@
 
         //鏌ヨ
         function get_Display() {
-            var sWhere = " and 缂栫爜='" + sessionStorage["Czybm"] + "'";
+            var HBillNo = $("#HBillNo").val();
             var ajaxLoad = layer.load();
             //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
             $.ajax({
-                url: GetWEBURL() + '/Cj_SingleStation/Cj_CollectionOfSingleProductDefectsUserList',
+                url: GetWEBURL() + '/Sc_KeyElementBinding/HistoryInfo_Temp',
                 type: "GET",
-                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                data: { "HBillNo": HBillNo, "user": sessionStorage["HUserName"] },
                 success: function (data1) {
                     if (data1.count == 1) {
 
-                        $("#HDeptID").val(data1.data[0]["HDeptID"]);
-                        $("#HDeptName").val(data1.data[0]["杞﹂棿"]);
-                        $("#HProcName").val(data1.data[0]["宸ュ簭"]);
-                        $("#HProcID").val(data1.data[0]["HProcID"]);
-                        $("#HSourceID").val(data1.data[0]["HSourceID"]);
-                        $("#HSourceName").val(data1.data[0]["鐢熶骇璧勬簮"]);
-                        $("#HCheckEmpID").val(data1.data[0]["HCheckEmpID"]);
-                        $("#HCheckEmpName").val(data1.data[0]["璐ㄦ鍛�"]);
-                        $("#HEmpID").val(data1.data[0]["HCheckEmpID"]);
-                        $("#HEmpName").val(data1.data[0]["璐ㄦ鍛�"]);
-                        $("#HGroupID").val(data1.data[0]["HGroupID"]);
-                        $("#HGroupName").val(data1.data[0]["鐢熶骇鐝粍"]);
                         layer.close(ajaxLoad);
-
-                        //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                     } else {
                         layer.close(ajaxLoad);
                         layer.alert(data1.code + data1.Message, { icon: 5 });
@@ -604,7 +627,7 @@
                         for (var i = 0; i < data.length; i++) {
                             rowarr.push({
                                 "HBarCode_P": data[i].浜у搧鐮�, "HPartsBarCode": "", "HPartsQty": data[i].鍒嗗瓙瀛愰」鐢ㄩ噺, "HBindingQty": 0
-                                , "HMaterID": data[i].瀛愰」鐗╂枡ID, "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HBatchNo": ""
+                                , "HMaterID": data[i].瀛愰」鐗╂枡ID, "HMaterNumber": data[i].瀛愰」鐗╂枡浠g爜, "HMaterName": data[i].瀛愰」鐗╂枡鍚嶇О, "HMaterModel": data[i].瀛愰」瑙勬牸鍨嬪彿, "HBatchNo": ""
                                 , "HSourceID": $("#HSourceID").val(), "HEquipID": 0, "HGroupID": $("#HGroupID").val(), "HWorkerID": $("#HEmpID").val()
                                 , "HScanDate": new Date(), "HSourceInterID": $("#HICMOInterID").val()
                                 , "HSourceEntryID": $("#HICMOEntryID").val(), "HSourceBillNo": $("#HICMOBillNo").val()
@@ -903,7 +926,7 @@
                 sSubStr = JSON.parse(sSubStr);
                 for (var i = 0; i < sSubStr.length; i++) {
                     if (sSubStr[i].HBarCode == "" || sSubStr[i].HBarCode == undefined || sSubStr[i].HBarCode == null) {
-                        layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,閰嶄欢鐮佹湭缁戝畾!", { icon: 5, btn: ['纭'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        layer.msg("缁戝畾淇℃伅绗�" + (i + 1) + "琛�,閰嶄欢鐮佹湭缁戝畾!", { icon: 5, btn: ['纭'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                         return Result = false;
                     }
                 }
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill_BatchSplit.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill_BatchSplit.html"
index e5c3d2d..76b7386 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill_BatchSplit.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill_BatchSplit.html"
@@ -277,6 +277,8 @@
                         , { field: 'HUsableQty', title: '鍓╀綑鍙敤鏁伴噺', width: 130 }
                         , { field: 'HProQty', title: '娴佽浆鍗℃暟閲�', width: 110, edit: 'text' }
                         , { field: 'HBatchNo', title: '鎵瑰彿', width: 110, edit: 'text' }
+                        , { field: 'HGroupNumber', title: '鐝粍', width: 110, edit: 'text' }
+                        , { field: 'HBatchManager', title: '鍚敤鎵规', width: 110, hide: true }
                         , { field: 'HRoutingInterID', title: '宸ヨ壓璺嚎鍐呯爜', width: 150, hide: true }
                         , { field: 'HRoutingName', title: '宸ヨ壓璺嚎', width: 170, edit: 'text', event: "HRoutingName" }
                         , { field: 'HSheetQty', title: '鎷嗗垎娴佽浆鍗″紶鏁�', width: 130 }
@@ -292,7 +294,7 @@
                     "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HMaterID": 0, "鐗╂枡浠g爜": ""
                     , "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0
                     , "HProQty": 0, "HRoutingInterID": 0, "HRoutingName": "", "HSheetQty": 0
-                    , "HInterID": 0, "HBillNo": "", "HBatchNo": ""
+                    , "HInterID": 0, "HBillNo": "", "HBatchNo": "", "HBatchManager": "", "HGroupNumber": ""
                 }];
 
                 option.data = rowdata;
@@ -334,7 +336,7 @@
                                         , "瑙勬牸鍨嬪彿": subdata[i].瑙勬牸鍨嬪彿, "HQty": subdata[i].HQty, "HFinishQty": subdata[i].HFinishQty
                                         , "HUsableQty": subdata[i].HUsableQty, "HProQty": subdata[i].HProQty, "HRoutingInterID": subdata[i].HRoutingInterID
                                         , "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty, "HDate": formatDate(subdata[i].HDate)
-                                        , "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": ""
+                                        , "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": "", "HBatchManager": subdata[i].鏄惁鍚敤鎵规, "HGroupNumber": ""
                                     }
                                 )
                             }
@@ -359,6 +361,8 @@
                                     , { field: 'HUsableQty', title: '鍓╀綑鍙敤鏁伴噺', width: 130 }
                                     , { field: 'HProQty', title: '娴佽浆鍗℃暟閲�', width: 110, edit: 'text' }
                                     , { field: 'HBatchNo', title: '鎵瑰彿', width: 110, edit: 'text' }
+                                    , { field: 'HGroupNumber', title: '鐝粍', width: 110, edit: 'text' }
+                                    , { field: 'HBatchManager', title: '鍚敤鎵规', width: 110, hide: true }
                                     , { field: 'HRoutingInterID', title: '宸ヨ壓璺嚎鍐呯爜', width: 150, hide: true }
                                     , { field: 'HRoutingName', title: '宸ヨ壓璺嚎', width: 170, edit: 'text', event: "HRoutingName" }
                                     , { field: 'HSheetQty', title: '鎷嗗垎娴佽浆鍗″紶鏁�', width: 130 }
@@ -570,6 +574,10 @@
                             layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,鐢熶骇璁㈠崟涓诲唴鐮佽幏鍙栧紓甯革紝璇疯仈绯荤鐞嗗憳澶勭悊!", { icon: 5, btn: ['纭'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                             return Result = false;
                         }
+                        if (sSubStr[i].HBatchManager == "鏄�" && sSubStr[i].HBatchNo == "") {
+                            layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,鐗╂枡鍚敤鎵规绠$悊锛岃杈撳叆鎵瑰彿淇℃伅!", { icon: 5, btn: ['纭'], time: 4000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            return Result = false;
+                        }
                     }
                 }
 

--
Gitblit v1.9.1