From 2daa27a25438b28c59b5e6da31ca648ad7c42fb5 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 26 五月 2022 09:16:17 +0800
Subject: [PATCH] 叫料平台完善

---
 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatFormImport.html |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 WebTM/views/生产管理/生产日计划工单/JIT_DayPlanBillEdit.html      |    4 ++++
 2 files changed, 48 insertions(+), 1 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillEdit.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillEdit.html"
index 1dee345..3f766d1 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillEdit.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillEdit.html"
@@ -272,6 +272,8 @@
                                             <label class="layui-form-label" style="width: 85px;">鐢熶骇璁㈠崟鍙�</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
                                                 <input type="text" class="layui-input" lay-verify="HICMOBillNo" name="HICMOBillNo" id="HICMOBillNo">
+                                                <input type="text" class="layui-input" lay-verify="HMainSourceInterID" name="HMainSourceInterID" id="HMainSourceInterID" hidden>
+                                                <input type="text" class="layui-input" lay-verify="HMainSourceEntryID" name="HMainSourceEntryID" id="HMainSourceEntryID" hidden>
                                             </div>
                                         </div>
                                         <div class="layui-inline">
@@ -1271,6 +1273,8 @@
                             , "HPlanBeginDate": Format(new Date(d.data[0].璁″垝寮�濮嬫棩鏈�), "yyyy-MM-dd")
                             , "HPlanEndDate":Format(new Date(d.data[0].璁″垝缁撴潫鏃ユ湡), "yyyy-MM-dd")
                             , "HICMOBillNo": d.data[0].鐢熶骇璁㈠崟鍙�
+                            , "HMainSourceInterID": d.data[0].婧愬崟涓诲唴鐮�
+                            , "HMainSourceEntryID": d.data[0].婧愬崟瀛愬唴鐮�
                             , "HOwnerID": d.data[0].璐т富缂栫爜
                             , "HBatchNo": d.data[0].鎵规
                             , "HYX": d.data[0].浼樺厛绾�
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
index e4df184..4467e2b 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
@@ -142,6 +142,7 @@
         //琛屽唴浜嬩欢
         table.on('tool(mainTable)', function (obj) {
             set_GridDelete(obj);   //琛屽唴鍒犻櫎
+            set_GridCellCheck(obj);//琛屽唴蹇嵎閿瓫閫�
         });
 
         //鏂囦欢涓婁紶
@@ -222,7 +223,7 @@
             columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
             columns.push({ field: '鐢熶骇杞﹂棿缂栫爜*', title: '鐢熶骇杞﹂棿' });
             columns.push({ field: 'HSourceID', title: 'HSourceID', hide: true });
-            columns.push({ field: '鐢熶骇璧勬簮缂栫爜*', title: '鐢熶骇璧勬簮' });
+            columns.push({ field: '鐢熶骇璧勬簮缂栫爜*', title: '鐢熶骇璧勬簮', edit: 'text', event: "HSourceID"   });
             columns.push({ field: '浼樺厛绾�', title: '浼樺厛绾�' });
             columns.push({ field: 'HEmpID', title: 'HEmpID', hide: true });
             columns.push({ field: '鍛樺伐', title: '鍛樺伐' });
@@ -237,6 +238,8 @@
             columns.push({ field: '閿�鍞鍗曟暟閲�', title: '閿�鍞鍗曟暟閲�', width: 200 });
             columns.push({ field: '鐢熶骇璁㈠崟鏁伴噺', title: '鐢熶骇璁㈠崟鏁伴噺', width: 200 });
             columns.push({ field: '鎬婚綈濂楁暟閲�', title: '鎬婚綈濂楁暟閲�', width: 200 });
+            columns.push({ field: 'ICMOBillHInterID', title: 'ICMOBillHInterID', hide: true});
+            columns.push({ field: 'ICMOBillHEntryID', title: 'ICMOBillHEntryID', hide: true });
             for (var i = 0; i <= (SumMonth - dd); i++) {
                 columns.push({ field: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), edit: 'text' })
             }
@@ -312,6 +315,46 @@
             }
         }
 
+        //琛屽唴鍒犻櫎蹇嵎閿�
+        function set_GridCellCheck(obj) {
+            $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                if (event.key == "F7") {
+                    //鐢熶骇璧勬簮
+                    if (obj.event == "HSourceID") {
+                        layer.open({
+                            type: 2
+                            , skin: "layui-layer-rim" //鍔犱笂杈规
+                            , title: "鐢熶骇璧勬簮鍒楄〃"  //鏍囬
+                            , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                            , shift: 2 //寮瑰嚭鍔ㄧ敾
+                            , area: ["90%", "90%"] //绐椾綋澶у皬
+                            , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                            , content: ["../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html", "yes"]
+                            , btn: ["纭畾", "鍙栨秷"]
+                            , btn1: function (index, laero) {
+                                //鎸夐挳涓�  鐨勫洖璋�
+                                var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+                                var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+                                if (checkStatus.data.length != 1) {
+                                    return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                }
+                                //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                obj.update({
+                                    "HSourceID": checkStatus.data[0].HItemID
+                                    , "鐢熶骇璧勬簮缂栫爜*": checkStatus.data[0].鐢熶骇璧勬簮浠g爜
+                                })
+                                layer.close(index);//鍏抽棴寮圭獥
+                            }
+                        })
+                    }
+                    obj.event = "";
+                    return false;
+                }
+
+            })
+        }
+
         //鑾峰彇鍙傛暟
         function getUrlVars() {
             var vars = [], hash;

--
Gitblit v1.9.1