From e7dd12d55e8c6aae18e2f3d5512340fcce1d8d4d Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 06 八月 2024 17:29:11 +0800
Subject: [PATCH] 1.报工台里,点击 当前工单 汇报时, 根据 选择的工单 找到正在使用的 模具内码(在 生产状态表 里查), 填入到 出站汇报单 界面上,显示 模具编码,名称,型号 。保存时 保存进去 2.开班单 增加 子表网格 Sc_MESBeginWorkBillSub_RelationBill 点击 可选择 相同物料 相同工序的 非本单 的流转卡 记录

---
 WebTM/views/生产管理/报工台工序/开工/Sc_Add_MESBeginStepWorkBillList.html |  425 +++++++++++++++++++++++-
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html                |  132 +++++--
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill_CurrentWork.html    |   60 +++
 WebTM/views/生产管理/生产开工单/Sc_Add_MESBeginWorkBillList.html        |  375 +++++++++++++++++++++-
 4 files changed, 903 insertions(+), 89 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\345\274\200\345\267\245/Sc_Add_MESBeginStepWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\345\274\200\345\267\245/Sc_Add_MESBeginStepWorkBillList.html"
index 3d77f62..07be9b5 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\345\274\200\345\267\245/Sc_Add_MESBeginStepWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\345\274\200\345\267\245/Sc_Add_MESBeginStepWorkBillList.html"
@@ -92,7 +92,7 @@
                                 <button type="button" id="VerIfySaver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="VerIfySaver">瀹℃牳</button>
                                 <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
                             </div>
-                    
+
                         </div>
                         <div class="layui-card-body">
                             <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
@@ -103,7 +103,7 @@
                                             <li class="layui-this">鍩烘湰淇℃伅</li>
                                             <li>鍒跺崟淇℃伅</li>
                                         </ul>
-                                        <div class="layui-tab-content" style="height: 700px;">
+                                        <div class="layui-tab-content" style="height: 400px;">
                                             <div class="layui-tab-item layui-show">
                                                 <div class="layui-form-item">
                                                     <div class="layui-inline">
@@ -156,7 +156,7 @@
                                                     <div class="layui-inline">
                                                         <label class="layui-form-label">寮�宸ユ椂闂�:</label>
                                                         <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+                                                            <input class="layui-input" name="HBeginWorkTime" id="HBeginWorkTime" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
@@ -334,13 +334,37 @@
                                         </div>
                                     </div>
                                 </div>
+                                <div class="layui-tab" lay-filter="tab-POStockInBill">
+                                    <ul class="layui-tab-title" lay-filter="tab-all">
+                                        <li lay-id="1" style="padding:1px;" class="layui-this">璁″垝鍗�</li>
+                                    </ul>
+                                    <div class="layui-tab-content">
+                                        <!--瀛愯〃-->
+                                        <div class="layui-tab-item layui-show">
+                                            <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                            <script type="text/html" id="toolbarDemo">
+                                                <div class="layui-btn-container">
+                                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                                                </div>
+                                            </script>
+                                        </div>
+                                    </div>
+                                </div>
                             </div>
+
                         </div>
                     </form>
                 </div>
             </div>
         </div>
     </div>
+
+    <!--鍒犻櫎-->
+    <script type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+
     <script>
         //鑾峰彇鍙傛暟
         var HBillType = "";  //鍗曟嵁绫诲瀷
@@ -379,7 +403,7 @@
         }).extend({
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
-             //#region 鍏敤鍙橀噺
+            //#region 鍏敤鍙橀噺
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
@@ -391,6 +415,8 @@
 
             //鍒濆鍖栬〃鍗曟彃浠�
             set_InitFrom();
+            //鍏ㄥ眬鍙橀噺
+            window.OptionData = [];
 
             //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
             var HModuleType = "3787";
@@ -401,13 +427,18 @@
 
             //鍒ゆ柇鎿嶄綔绫诲瀷
             if (OperationType == 1) {//鏃犳簮鍗�
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_AddFNew();
             }
             else if (OperationType == 2) {//鏈夋簮鍗�
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_AddNew();
             }
             else if (OperationType == 3) {//缂栬緫
-          
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_EditFromGrid();
             }
             else {
@@ -418,7 +449,7 @@
             function set_InitFrom() {
                 //鏃ユ湡鏃堕棿閫夋嫨鍣�
                 laydate.render({
-                    elem: '#HBeginDate'
+                    elem: '#HBeginWorkTime'
                     , type: 'datetime'
                 });
                 laydate.render({
@@ -452,22 +483,21 @@
             }
 
             //鏃犳簮鍗曟柊澧�
-            function set_AddFNew()
-            {
+            function set_AddFNew() {
                 refSav = "Add";
                 //鍔犳簮鍗曠被鍨嬪尯鍒�(鍙互鍐欎笉鍚岀殑鏂规硶)
                 $("#HMainSourceEntryID").focus();
                 //鍒濆鍩烘湰淇℃伅璧嬪��
                 $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //鍗曟嵁鏃ユ湡
-                $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
+                $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
                 $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //鍒跺崟鏃ユ湡
                 $("#HMaker").val(sessionStorage["HUserName"]);     //鍒跺崟浜�
-               
+
                 $('#HMaterCode').attr("disabled", false);
                 $('#HMaterCode').attr("readonly", true);
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", false);
-                $('#HMaterName').attr("readonly", true); 
-                $('#HMaterSpec').attr("readonly", true); 
+                $('#HMaterName').attr("readonly", true);
+                $('#HMaterSpec').attr("readonly", true);
                 $('#HSourceName').attr("disabled", false);
                 $('#HSourceName').attr("readonly", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
@@ -501,7 +531,7 @@
                             success: function (result) {
                                 var data = result.data.h_v_IF_ICMOBillList[0];
                                 if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                    form.val("component-form-group", { 
+                                    form.val("component-form-group", {
                                         "HMaterID": data.HMaterID
                                         , "HMaterCode": data.浜у搧浠g爜
                                         , "HMaterName": data.浜у搧鍚嶇О
@@ -541,7 +571,7 @@
                 refSav = "Add";
                 //鍒濆鍩烘湰淇℃伅璧嬪��
                 $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //鍗曟嵁鏃ユ湡
-                $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
+                $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
                 $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //鍒跺崟鏃ユ湡
                 $("#HMaker").val(sessionStorage["HUserName"]);     //鍒跺崟浜�
 
@@ -551,7 +581,7 @@
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMaterName').attr("disabled", true);
                 $('#HMaterSpec').attr("disabled", true);
-                $('#HBeginDate').attr("disabled", true);
+                $('#HBeginWorkTime').attr("disabled", true);
                 $('#HSourceName').attr("disabled", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMainSourceBillNo').attr("disabled", true);
@@ -606,16 +636,15 @@
                         }
                     });
             }
-           
+
             //缂栬緫
-            function set_EditFromGrid()
-            {
+            function set_EditFromGrid() {
                 refSav = "Update";
                 $('#HMaterCode').attr("disabled", true);
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMaterName').attr("disabled", true);
                 $('#HMaterSpec').attr("disabled", true);
-                $('#HBeginDate').attr("disabled", true);
+                $('#HBeginWorkTime').attr("disabled", true);
                 $('#HSourceName').attr("disabled", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMainSourceBillNo').attr("disabled", true);
@@ -633,9 +662,9 @@
                         "HID": linterid
                     },
                     success: function (result) {
-
                         if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            var data = result.data.h_v_Sc_MESBeginWorkBillList_NEW[0];
+                            var data = result.data.h_v_Sc_MESBeginWorkBillList_Edit[0];
+                            var tableSub = result.data.h_v_Sc_MESBeginWorkBillList_Edit;
                             form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
                                 "HInterID": data.hmainid
                                 , "HBillNo": data.鍗曟嵁鍙�
@@ -646,7 +675,7 @@
                                 , "HMaterCode": data.浜у搧浠g爜
                                 , "HMaterName": data.浜у搧鍚嶇О
                                 , "HMaterSpec": data.瑙勬牸鍨嬪彿
-                                , "HBeginDate": data.寮�宸ユ椂闂�
+                                , "HBeginWorkTime": data.寮�宸ユ椂闂�
                                 , "HSourceID": data.HSourceID              //璧勬簮ID
                                 , "HSourceName": data.璧勬簮鍚嶇О             //璧勬簮鍚嶇О
                                 , "HEmpID": data.HEmpID                   //鎿嶄綔鍛業D
@@ -676,6 +705,20 @@
 
                             });
 
+                            //瀛愯〃  璧嬪��
+                            var rowdata = [];
+                            for (var i = 0; i < tableSub.length; i++) {
+                                rowdata.push(
+                                    {
+                                        "HRelationBillInterID": tableSub[i].HRelationBillInterID, "HRelationBillEntryID": tableSub[i].HRelationBillEntryID, "HRelationBillNo": tableSub[i].HRelationBillNo, "HRelationBillType": tableSub[i].HRelationBillType,
+                                        "HICMOInterID": tableSub[i].鐢熶骇璁㈠崟鍐呯爜, "HICMOEntryID": tableSub[i].鐢熶骇璁㈠崟瀛愬唴鐮�, "HICMOBillNo": tableSub[i].鐢熶骇璁㈠崟, "HRemark": tableSub[i].澶囨敞,
+                                        "HProcExchInterID": tableSub[i].HProcExchInterID, "HProcExchEntryID": tableSub[i].HProcExchEntryID, "HProcExchBillNo": tableSub[i].HProcExchBillNo,
+                                        "HMaterID": tableSub[i].HMaterID, "HMaterName": tableSub[i].浜у搧鍚嶇О, "HProcID": tableSub[i].HProcID, "HProcName": tableSub[i].宸ュ簭鍚嶇О,
+                                    }
+                                )
+                            }
+                            option.data = rowdata;
+                            table.render(option);
                         } else {
                             layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
                         }
@@ -684,7 +727,7 @@
                     }
                 });
             }
-       
+
 
             //鍒ゆ柇鏄惁鏂板
             if (linterid == null || linterid == 0) {
@@ -709,7 +752,7 @@
                 $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
             }
 
-              //鑾峰彇涓嬫媺閫変腑鍊�
+            //鑾峰彇涓嬫媺閫変腑鍊�
             form.on('select(SourceType)', function (data) {
                 Sctag = data.value;
                 form.render('select');
@@ -751,9 +794,20 @@
 
             //淇濆瓨鎻愪氦
             form.on('submit(Saver)', function (data) {
-                
+
+                //鑾峰彇瀛愯〃鏁版嵁
+                var num = [];
+                for (var i = 0; i < table.cache["mainTable"].length; i++) {
+                    if (table.cache["mainTable"][i] != "") {
+                        table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
+                        num.push(table.cache["mainTable"][i])
+                    }
+                }
+
+                //瀛愯〃鏁版嵁搴忓垪鍖�
+                var sSubStr = JSON.stringify(num);
                 var sMainStr = JSON.stringify(data.field);
-                var sMainSub = sMainStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
+                var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
                 if (!AllowLoadData())//鏁版嵁楠岃瘉
                 {
                     return false;
@@ -830,8 +884,7 @@
             });
 
             //瀹℃牳鎻愪氦
-            function SaveVerify()
-            {
+            function SaveVerify() {
                 var InterID = $("#HInterID").val();
                 if (!AllowLoadData())//鏁版嵁楠岃瘉
                 {
@@ -859,7 +912,7 @@
                     }
                 })
             }
-           
+
 
             //閫�鍑�
             form.on('submit(Exit)', function (data) {
@@ -1062,6 +1115,293 @@
                 });
             });
 
+            //#region 瀛愯〃锛氬ご宸ュ叿鏍忎簨浠�
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                //鏂板琛岃〃鏍兼暟鎹�
+                var NewRow =
+                {
+                    "HMaterID": "0"
+                    , "HMaterName": ""
+                    , "HProcID": "0"
+                    , "HProcName": ""
+                    , "HRelationBillInterID": "0"
+                    , "HRelationBillEntryID": "0"
+                    , "HRelationBillType": ""
+                    , "HRelationBillNo": ""
+                    , "HICMOInterID": "0"
+                    , "HICMOEntryID": "0"
+                    , "HICMOBillNo": ""
+                    , "HProcExchInterID": "0"
+                    , "HProcExchEntryID": "0"
+                    , "HProcExchBillNo": ""
+                    , "HRemark": ""
+                    , "HSourceInterID": "0"
+                    , "HSourceEntryID": "0"
+                    , "HSourceBillNo": ""
+                    , "HSourceBillType": ""
+                };
+                switch (obj.event) {
+                    case 'btn-AddLine':
+                        table.cache["mainTable"].push(NewRow);
+                        option.data = table.cache["mainTable"];
+                        table.render(option);
+
+                        break;
+                    case 'btn-CopyLine':
+                        var copydata = JSON.stringify(data);
+                        if (data.length <= 0) {
+                            layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                        }
+                        else if (data.length > 1) {
+                            layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                        }
+                        else {
+                            var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                            var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                            table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                            option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                        }
+                        break;
+                    //涓婁竴琛�
+                    case 'btn_up':
+                        btn_up(data);
+                        break;
+                    //涓嬩竴琛�
+                    case 'btn_under':
+                        btn_under(data);
+                        break;
+                }
+            });
+            //#endregion
+
+            //#region 瀛愯〃锛氳鍐呬簨浠�
+            table.on('tool(mainTable)', function (obj) {
+                set_GridDelete(obj);   //琛屽唴鍒犻櫎
+                set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+            });
+            //#endregion
+
+            //#region 璁″垝琛ㄥ垵濮嬪寲
+            function get_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , limit: 100
+                    , totalRow: true
+                    , cellMinWidth: 120
+                    , height: 400
+                    , cols: [[
+                        { type: 'checkbox', totalRowText: '鍚堣琛�' }
+                        , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HRelationBillInterID', title: '鍏宠仈鍓骇璁″垝鍗曞唴鐮�', hide: true }
+                        , { field: 'HRelationBillEntryID', title: '鍏宠仈鍓骇璁″垝鍗曞瓙鍐呯爜', hide: true }
+                        , { field: 'HRelationBillType', title: '鍏宠仈鍓骇璁″垝鍗曠被鍨�', hide: true }
+                        , { field: 'HRelationBillNo', title: '鍏宠仈鍓骇璁″垝鍗�', edit: 'text', event: "HRelationBillNo" }
+                        , { field: 'HMaterID', title: 'HMaterID', event: "HMaterID", hide: true }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcID', title: 'HProcID', edit: 'text', hide: true }
+                        , { field: 'HProcName', title: '宸ュ簭鍚嶇О', edit: 'text', event: "HProcID" }
+                        , { field: 'HICMOInterID', title: '鐢熶骇璁㈠崟鍐呯爜', hide: true }
+                        , { field: 'HICMOEntryID', title: '鐢熶骇璁㈠崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟鍙�', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcExchInterID', title: '宸ュ簭娴佽浆鍗″唴鐮�', hide: true }
+                        , { field: 'HProcExchEntryID', title: '宸ュ簭娴佽浆鍗″瓙鍐呯爜', hide: true }
+                        , { field: 'HProcExchBillNo', title: '宸ュ簭娴佽浆鍗″彿', templet: "#HProcExchInterID" }
+                        , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+                        , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', hide: true }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', hide: true }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', hide: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+                    ]]
+                }
+
+                var rowdata = [
+                    {
+                        "HMaterID": "0"
+                        , "HMaterName": ""
+                        , "HProcID": "0"
+                        , "HProcName": ""
+                        , "HRelationBillInterID": "0"
+                        , "HRelationBillEntryID": "0"
+                        , "HRelationBillType": ""
+                        , "HRelationBillNo": ""
+                        , "HICMOInterID": "0"
+                        , "HICMOEntryID": "0"
+                        , "HICMOBillNo": ""
+                        , "HProcExchInterID": "0"
+                        , "HProcExchEntryID": "0"
+                        , "HProcExchBillNo": ""
+                        , "HRemark": ""
+                        , "HSourceInterID": "0"
+                        , "HSourceEntryID": "0"
+                        , "HSourceBillNo": ""
+                        , "HSourceBillType": ""
+                    }
+                ];
+                option.data = rowdata;
+                table.render(option);
+                form.render('select');
+            }
+            //#endregion
+
+
+            //#region 瀛愯〃锛氬垹闄ゆ寚瀹氳
+            function set_GridDelete(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0') {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            var oldData = table.cache["mainTable"];
+                            oldData.splice(obj.tr.data('index'), 1)
+                            option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);
+                            for (var i = 0; i < oldData.length; i++) {
+                                $('#HICMOBillNo' + (i + 1)).find("option[value='" + oldData[i].HICMOBillNo + "']").attr("selected", true);
+                            }
+                            form.render('select');
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            //#endregion
+
+            //#region 瀛愯〃锛氬揩鎹烽敭(F7)鎵撳紑寮圭獥
+            function set_GridCellCheck(obj) {
+                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                    if (event.key == "F7") {
+                        if (obj.event == "HRelationBillNo") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim"                           //鍔犱笂杈规
+                                , title: "鍓骇璁″垝鍗�"                             //鏍囬
+                                , closeBtn: 1                                       //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2                                          //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"]                              //绐椾綋澶у皬
+                                , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../../views/Baseset/鍩虹璧勬枡/Sc_ProcessExchangeBillListView.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("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    if ($("#HMaterName").val() == checkStatus.data[0].浜у搧 && $("#HProcName").val() == checkStatus.data[0].宸ュ簭) {
+                                        obj.update({
+                                            "HProcExchInterID": checkStatus.data[0].hmainid
+                                            , "HProcExchEntryID": checkStatus.data[0].hsubid
+                                            , "HProcExchBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HRelationBillInterID": checkStatus.data[0].hmainid
+                                            , "HRelationBillEntryID": checkStatus.data[0].hsubid
+                                            , "HRelationBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HICMOInterID": checkStatus.data[0].hicmointerid
+                                            , "HICMOEntryID": checkStatus.data[0].HICMOEntryID
+                                            , "HICMOBillNo": checkStatus.data[0].鐢熶骇璁㈠崟鍙�
+                                            , "HMaterID": checkStatus.data[0].HMaterID
+                                            , "HMaterName": checkStatus.data[0].浜у搧
+                                            , "HProcID": checkStatus.data[0].HProcID
+                                            , "HProcName": checkStatus.data[0].宸ュ簭
+                                            , "HSourceInterID": checkStatus.data[0].hmainid
+                                            , "HSourceEntryID": checkStatus.data[0].hsubid
+                                            , "HSourceBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HSourceBillType": 3772
+
+                                        })
+                                    }
+                                    else {
+                                        return layer.msg("閫夋嫨鍓骇璁″垝鍗曠殑鐗╂枡涓庡伐搴�,璺熷綋鍓嶅伐鍗曚笉鍖归厤");
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , btn2: function (index, layero) { }
+                                , end: function () {
+                                    if ($("#HMaterName").val() == OptionData[0].浜у搧 && $("#HProcName").val() == OptionData[0].宸ュ簭) {
+                                        obj.update({
+                                            "HProcExchInterID": OptionData[0].hmainid
+                                            , "HProcExchEntryID": OptionData[0].hsubid
+                                            , "HProcExchBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HRelationBillInterID": OptionData[0].hmainid
+                                            , "HRelationBillEntryID": OptionData[0].hsubid
+                                            , "HRelationBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HICMOInterID": OptionData[0].hicmointerid
+                                            , "HICMOEntryID": OptionData[0].HICMOEntryID
+                                            , "HICMOBillNo": OptionData[0].鐢熶骇璁㈠崟鍙�
+                                            , "HMaterID": OptionData[0].HMaterID
+                                            , "HMaterName": OptionData[0].浜у搧
+                                            , "HProcID": OptionData[0].HProcID
+                                            , "HProcName": OptionData[0].宸ュ簭
+                                            , "HSourceInterID": OptionData[0].hmainid
+                                            , "HSourceEntryID": OptionData[0].hsubid
+                                            , "HSourceBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HSourceBillType": 3772
+
+                                        })
+                                    } else {
+                                        return layer.msg("閫夋嫨鍓骇璁″垝鍗曠殑鐗╂枡涓庡伐搴�,璺熷綋鍓嶅伐鍗曚笉鍖归厤");
+                                    }
+
+                                    OptionData = [];
+                                }
+                            })
+                        }
+                        if (obj.event == "HProcID") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim"                           //鍔犱笂杈规
+                                , title: "鍓骇璁″垝鍗�"                             //鏍囬
+                                , closeBtn: 1                                       //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2                                          //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"]                              //绐椾綋澶у皬
+                                , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../../views/鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.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("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    if ($("#HProcName").val() == checkStatus.data[0].宸ュ簭鍚嶇О) {
+                                        obj.update({
+                                            "HProcID": checkStatus.data[0].HItemID
+                                            , "HProcName": checkStatus.data[0].宸ュ簭鍚嶇О
+
+                                        })
+                                    } else {
+                                        return layer.msg("閫夋嫨鐨勫伐搴�,璺熷綋鍓嶅伐鍗曠殑宸ュ簭涓嶅尮閰�");
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , btn2: function (index, layero) { }
+                                , end: function () {
+
+                                }
+                            })
+                        }
+                        obj.event = "";
+                        return false;
+                    }
+                })
+            }
+            //#endregion
+
 
             //浠ヤ笂涓簂ayui妯″潡
         });
@@ -1080,7 +1420,7 @@
                 layer.msg("浜у搧缂栫爜涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
-            if ($("#HBeginDate").val() == '' || $("#HBeginDate").val() == null) {
+            if ($("#HBeginWorkTime").val() == '' || $("#HBeginWorkTime").val() == null) {
                 layer.msg("寮�宸ユ椂闂翠笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
@@ -1107,6 +1447,27 @@
                     return Result = false;
                 }
             }
+            //#region 瀛愯〃 鏁版嵁妫�楠�
+
+            for (var i = 0; i < option.data.length; i++) {
+
+                if (typeof option.data[i] !== 'object' || option.data[i] === null || Array.isArray(option.data[i])) {
+                    continue; // 璺宠繃闈炲璞¢」锛堝绌烘暟缁勶級
+                }
+
+                if (option.data[i]["HRelationBillNo"] == "") {
+                    layer.msg("绗�" + i + "琛岋細鍓骇璁″垝鍗曟湭閫夋嫨锛�");
+                    return false;
+                }
+
+                if (option.data[i]["HProcID"] == "0") {
+                    layer.msg("绗�" + i + "琛岋細宸ュ簭鏈�夋嫨锛�");
+                    return false;
+                }
+
+
+            }
+            //#endregion
             return Result;
         }
 
@@ -1136,6 +1497,10 @@
             $("#HDeptName").val(obj[0].閮ㄩ棬鍚嶇О);
             $("#HDeptID").val(obj[0].HItemID);
         }
+        //娴佽浆鍗�
+        function GetProcExValue(obj) {
+            OptionData = obj;
+        }
     </script>
 </body>
 </html>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
index 2a87db1..f19dc61 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
@@ -101,7 +101,7 @@
                                             <li class="layui-this">鍩烘湰淇℃伅</li>
                                             <li>鍒跺崟淇℃伅</li>
                                         </ul>
-                                        <div class="layui-tab-content" style="height: 700px;">
+                                        <div class="layui-tab-content" style="height: 400px;">
                                             <div class="layui-tab-item layui-show">
                                                 <div class="layui-form-item">
                                                     <div class="layui-inline">
@@ -109,7 +109,7 @@
                                                         <div class="layui-input-inline">
                                                             <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" disabled autocomplete="off">
                                                             <input id="HInterID" name="HInterID" type="hidden" />
-                                                           
+
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
@@ -154,7 +154,7 @@
                                                     <div class="layui-inline">
                                                         <label class="layui-form-label">寮�宸ユ椂闂�:</label>
                                                         <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HBeginDate" id="HBeginDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+                                                            <input class="layui-input" name="HBeginWorkTime" id="HBeginWorkTime" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
@@ -310,6 +310,23 @@
                                         </div>
                                     </div>
                                 </div>
+                                <div class="layui-tab" lay-filter="tab-POStockInBill">
+                                    <ul class="layui-tab-title" lay-filter="tab-all">
+                                        <li lay-id="1" style="padding:1px;" class="layui-this">璁″垝鍗�</li>
+                                    </ul>
+                                    <div class="layui-tab-content">
+                                        <!--瀛愯〃-->
+                                        <div class="layui-tab-item layui-show">
+                                            <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                            <script type="text/html" id="toolbarDemo">
+                                                <div class="layui-btn-container">
+                                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+                                                </div>
+                                            </script>
+                                        </div>
+                                    </div>
+                                </div>
                             </div>
                         </div>
                     </form>
@@ -370,6 +387,8 @@
                 $("#HEmpName").val(sessionStorage["HEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鎿嶄綔鍛�
                 $("#HGroupID").val(sessionStorage["HGroupID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鐝粍ID
                 $("#HGroupName").val(sessionStorage["HGroup"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鐝粍
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_AddFNew();
             }
             else if (OperationType == 2) {//鏈夋簮鍗�
@@ -377,10 +396,13 @@
                 $("#HEmpName").val(sessionStorage["HEmpName"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鎿嶄綔鍛�
                 $("#HGroupID").val(sessionStorage["HGroupID"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鐝粍ID
                 $("#HGroupName").val(sessionStorage["HGroup"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鐝粍
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_AddNew();
             }
             else if (OperationType == 3) {//缂栬緫
-          
+                //鍒濆鍖栬鍒掕〃
+                get_InitGrid();
                 set_EditFromGrid();
             }
             else {
@@ -391,7 +413,7 @@
             function set_InitFrom() {
                 //鏃ユ湡鏃堕棿閫夋嫨鍣�
                 laydate.render({
-                    elem: '#HBeginDate'
+                    elem: '#HBeginWorkTime'
                     , type: 'datetime'
                 });
                 laydate.render({
@@ -431,12 +453,14 @@
 
             }
 
+
+
             //鏈夋簮鍗曟柊澧�
             function set_AddNew() {
                 refSav = "Add";
                 //鍒濆鍩烘湰淇℃伅璧嬪��
                 $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //鍗曟嵁鏃ユ湡
-                $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
+                $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�宸ユ棩鏈�
                 $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //鍒跺崟鏃ユ湡
                 $("#HMaker").val(sessionStorage["HUserName"]);     //鍒跺崟浜�
 
@@ -446,7 +470,7 @@
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMaterName').attr("disabled", true);
                 $('#HMaterSpec').attr("disabled", true);
-                $('#HBeginDate').attr("disabled", true);
+                $('#HBeginWorkTime').attr("disabled", true);
                 $('#HSourceName').attr("disabled", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMainSourceBillNo').attr("disabled", true);
@@ -510,7 +534,7 @@
                 $('#HMaterList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMaterName').attr("disabled", true);
                 $('#HMaterSpec').attr("disabled", true);
-                $('#HBeginDate').attr("disabled", true);
+                $('#HBeginWorkTime').attr("disabled", true);
                 $('#HSourceName').attr("disabled", true);
                 $('#HSourceList').addClass("layui-btn-disabled").attr("disabled", true);
                 $('#HMainSourceBillNo').attr("disabled", true);
@@ -530,18 +554,19 @@
                     success: function (result) {
 
                         if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            var data = result.data.h_v_Sc_MESBeginWorkBillList_NEW[0];
+                            var data = result.data.h_v_Sc_MESBeginWorkBillList_Edit[0];
+                            var tableSub = result.data.h_v_Sc_MESBeginWorkBillList_Edit;
                             form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
                                 "HInterID": data.hmainid
                                 , "HBillNo": data.鍗曟嵁鍙�
-                                , "HDate": formatDate(data.鏃ユ湡)
+                                , "HDate": Format(data.鏃ユ湡)
                                 , "HProcID": data.HProcID
                                 , "HProcName": data.宸ュ簭鍚嶇О
                                 , "HMaterID": data.HMaterID
                                 , "HMaterCode": data.浜у搧浠g爜
                                 , "HMaterName": data.浜у搧鍚嶇О
                                 , "HMaterSpec": data.瑙勬牸鍨嬪彿
-                                , "HBeginDate": data.寮�宸ユ椂闂�
+                                , "HBeginWorkTime": Format(data.寮�宸ユ椂闂�)
                                 , "HSourceID": data.HSourceID              //璧勬簮ID
                                 , "HSourceName": data.璧勬簮鍚嶇О             //璧勬簮鍚嶇О
                                 , "HEmpID": data.HEmpID                   //鎿嶄綔鍛業D
@@ -570,6 +595,20 @@
                                 , "HDeleteDate": data.浣滃簾鏃ユ湡       //浣滃簾鏃ユ湡
 
                             });
+                            //瀛愯〃  璧嬪��
+                            var rowdata = [];
+                            for (var i = 0; i < tableSub.length; i++) {
+                                rowdata.push(
+                                    {
+                                        "HRelationBillInterID": tableSub[i].HRelationBillInterID, "HRelationBillEntryID": tableSub[i].HRelationBillEntryID, "HRelationBillNo": tableSub[i].HRelationBillNo, "HRelationBillType": tableSub[i].HRelationBillType,
+                                        "HICMOInterID": tableSub[i].鐢熶骇璁㈠崟鍐呯爜, "HICMOEntryID": tableSub[i].鐢熶骇璁㈠崟瀛愬唴鐮�, "HICMOBillNo": tableSub[i].鐢熶骇璁㈠崟, "HRemark": tableSub[i].澶囨敞,
+                                        "HProcExchInterID": tableSub[i].HProcExchInterID, "HProcExchEntryID": tableSub[i].HProcExchEntryID, "HProcExchBillNo": tableSub[i].HProcExchBillNo,
+                                        "HMaterID": tableSub[i].HMaterID, "HMaterName": tableSub[i].浜у搧鍚嶇О, "HProcID": tableSub[i].HProcID, "HProcName": tableSub[i].宸ュ簭鍚嶇О,
+                                    }
+                                )
+                            }
+                            option.data = rowdata;
+                            table.render(option);
 
                         } else {
                             layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
@@ -873,8 +912,294 @@
             });
 
 
-            //浠ヤ笂涓簂ayui妯″潡
-        });
+            //#region 瀛愯〃锛氬ご宸ュ叿鏍忎簨浠�
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                //鏂板琛岃〃鏍兼暟鎹�
+                var NewRow =
+                {
+                    "HMaterID": "0"
+                    , "HMaterName": ""
+                    , "HProcID": "0"
+                    , "HProcName": ""
+                    , "HRelationBillInterID": "0"
+                    , "HRelationBillEntryID": "0"
+                    , "HRelationBillType": ""
+                    , "HRelationBillNo": ""
+                    , "HICMOInterID": "0"
+                    , "HICMOEntryID": "0"
+                    , "HICMOBillNo": ""
+                    , "HProcExchInterID": "0"
+                    , "HProcExchEntryID": "0"
+                    , "HProcExchBillNo": ""
+                    , "HRemark": ""
+                    , "HSourceInterID": "0"
+                    , "HSourceEntryID": "0"
+                    , "HSourceBillNo": ""
+                    , "HSourceBillType": ""
+                };
+                switch (obj.event) {
+                    case 'btn-AddLine':
+                        table.cache["mainTable"].push(NewRow);
+                        option.data = table.cache["mainTable"];
+                        table.render(option);
+
+                        break;
+                    case 'btn-CopyLine':
+                        var copydata = JSON.stringify(data);
+                        if (data.length <= 0) {
+                            layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                        }
+                        else if (data.length > 1) {
+                            layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                        }
+                        else {
+                            var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                            var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                            table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                            option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�                                                   
+                        }
+                        break;
+                    //涓婁竴琛�
+                    case 'btn_up':
+                        btn_up(data);
+                        break;
+                    //涓嬩竴琛�
+                    case 'btn_under':
+                        btn_under(data);
+                        break;
+                }
+            });
+            //#endregion
+
+            //#region 瀛愯〃锛氳鍐呬簨浠�
+            table.on('tool(mainTable)', function (obj) {
+                set_GridDelete(obj);   //琛屽唴鍒犻櫎
+                set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+            });
+            //#endregion
+
+            //#region 璁″垝琛ㄥ垵濮嬪寲
+            function get_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , limit: 100
+                    , totalRow: true
+                    , cellMinWidth: 120
+                    , height: 400
+                    , cols: [[
+                        { type: 'checkbox', totalRowText: '鍚堣琛�' }
+                        , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HRelationBillInterID', title: '鍏宠仈鍓骇璁″垝鍗曞唴鐮�', hide: true }
+                        , { field: 'HRelationBillEntryID', title: '鍏宠仈鍓骇璁″垝鍗曞瓙鍐呯爜', hide: true }
+                        , { field: 'HRelationBillType', title: '鍏宠仈鍓骇璁″垝鍗曠被鍨�', hide: true }
+                        , { field: 'HRelationBillNo', title: '鍏宠仈鍓骇璁″垝鍗�', edit: 'text', event: "HRelationBillNo" }
+                        , { field: 'HMaterID', title: 'HMaterID', event: "HMaterID", hide: true }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcID', title: 'HProcID', edit: 'text', hide: true }
+                        , { field: 'HProcName', title: '宸ュ簭鍚嶇О', edit: 'text', event: "HProcID" }
+                        , { field: 'HICMOInterID', title: '鐢熶骇璁㈠崟鍐呯爜', hide: true }
+                        , { field: 'HICMOEntryID', title: '鐢熶骇璁㈠崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟鍙�', style: 'background-color: #f9f9f9;' }
+                        , { field: 'HProcExchInterID', title: '宸ュ簭娴佽浆鍗″唴鐮�', hide: true }
+                        , { field: 'HProcExchEntryID', title: '宸ュ簭娴佽浆鍗″瓙鍐呯爜', hide: true }
+                        , { field: 'HProcExchBillNo', title: '宸ュ簭娴佽浆鍗″彿', templet: "#HProcExchInterID" }
+                        , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+                        , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', hide: true }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', hide: true }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', hide: true }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', hide: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+                    ]]
+                }
+
+                var rowdata = [
+                    {
+                        "HMaterID": "0"
+                        , "HMaterName": ""
+                        , "HProcID": "0"
+                        , "HProcName": ""
+                        , "HRelationBillInterID": "0"
+                        , "HRelationBillEntryID": "0"
+                        , "HRelationBillType": ""
+                        , "HRelationBillNo": ""
+                        , "HICMOInterID": "0"
+                        , "HICMOEntryID": "0"
+                        , "HICMOBillNo": ""
+                        , "HProcExchInterID": "0"
+                        , "HProcExchEntryID": "0"
+                        , "HProcExchBillNo": ""
+                        , "HRemark": ""
+                        , "HSourceInterID": "0"
+                        , "HSourceEntryID": "0"
+                        , "HSourceBillNo": ""
+                        , "HSourceBillType": ""
+                    }
+                ];
+                option.data = rowdata;
+                table.render(option);
+                form.render('select');
+            }
+            //#endregion
+
+
+            //#region 瀛愯〃锛氬垹闄ゆ寚瀹氳
+            function set_GridDelete(obj) {
+                var data = obj.data;
+                var rowIndex = $(obj.tr).attr("data-index");
+                if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                        console.log("绱㈠紩涓�:" + rowIndex);
+                        if (rowIndex === '0') {
+                            layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                        } else {
+                            var oldData = table.cache["mainTable"];
+                            oldData.splice(obj.tr.data('index'), 1)
+                            option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+                            table.render(option);
+                            for (var i = 0; i < oldData.length; i++) {
+                                $('#HICMOBillNo' + (i + 1)).find("option[value='" + oldData[i].HICMOBillNo + "']").attr("selected", true);
+                            }
+                            form.render('select');
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            //#endregion
+
+            //#region 瀛愯〃锛氬揩鎹烽敭(F7)鎵撳紑寮圭獥
+            function set_GridCellCheck(obj) {
+                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                    if (event.key == "F7") {
+                        if (obj.event == "HRelationBillNo") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim"                           //鍔犱笂杈规
+                                , title: "鍓骇璁″垝鍗�"                             //鏍囬
+                                , closeBtn: 1                                       //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2                                          //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"]                              //绐椾綋澶у皬
+                                , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../../views/Baseset/鍩虹璧勬枡/Sc_ProcessExchangeBillListView.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("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    if ($("#HMaterName").val() == checkStatus.data[0].浜у搧 && $("#HProcName").val() == checkStatus.data[0].宸ュ簭) {
+                                        obj.update({
+                                            "HProcExchInterID": checkStatus.data[0].hmainid
+                                            , "HProcExchEntryID": checkStatus.data[0].hsubid
+                                            , "HProcExchBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HRelationBillInterID": checkStatus.data[0].hmainid
+                                            , "HRelationBillEntryID": checkStatus.data[0].hsubid
+                                            , "HRelationBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HICMOInterID": checkStatus.data[0].hicmointerid
+                                            , "HICMOEntryID": checkStatus.data[0].HICMOEntryID
+                                            , "HICMOBillNo": checkStatus.data[0].鐢熶骇璁㈠崟鍙�
+                                            , "HMaterID": checkStatus.data[0].HMaterID
+                                            , "HMaterName": checkStatus.data[0].浜у搧
+                                            , "HProcID": checkStatus.data[0].HProcID
+                                            , "HProcName": checkStatus.data[0].宸ュ簭
+                                            , "HSourceInterID": checkStatus.data[0].hmainid
+                                            , "HSourceEntryID": checkStatus.data[0].hsubid
+                                            , "HSourceBillNo": checkStatus.data[0].鍗曟嵁鍙�
+                                            , "HSourceBillType": 3772
+
+                                        })
+                                    }
+                                    else {
+                                        return layer.msg("閫夋嫨鍓骇璁″垝鍗曠殑鐗╂枡涓庡伐搴�,璺熷綋鍓嶅伐鍗曚笉鍖归厤");
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , btn2: function (index, layero) { }
+                                , end: function () {
+                                    if ($("#HMaterName").val() == OptionData[0].浜у搧 && $("#HProcName").val() == OptionData[0].宸ュ簭) {
+                                        obj.update({
+                                            "HProcExchInterID": OptionData[0].hmainid
+                                            , "HProcExchEntryID": OptionData[0].hsubid
+                                            , "HProcExchBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HRelationBillInterID": OptionData[0].hmainid
+                                            , "HRelationBillEntryID": OptionData[0].hsubid
+                                            , "HRelationBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HICMOInterID": OptionData[0].hicmointerid
+                                            , "HICMOEntryID": OptionData[0].HICMOEntryID
+                                            , "HICMOBillNo": OptionData[0].鐢熶骇璁㈠崟鍙�
+                                            , "HMaterID": OptionData[0].HMaterID
+                                            , "HMaterName": OptionData[0].浜у搧
+                                            , "HProcID": OptionData[0].HProcID
+                                            , "HProcName": OptionData[0].宸ュ簭
+                                            , "HSourceInterID": OptionData[0].hmainid
+                                            , "HSourceEntryID": OptionData[0].hsubid
+                                            , "HSourceBillNo": OptionData[0].鍗曟嵁鍙�
+                                            , "HSourceBillType": 3772
+
+                                        })
+                                    } else {
+                                        return layer.msg("閫夋嫨鍓骇璁″垝鍗曠殑鐗╂枡涓庡伐搴�,璺熷綋鍓嶅伐鍗曚笉鍖归厤");
+                                    }
+
+                                    OptionData = [];
+                                }
+                            })
+                        }
+                        if (obj.event == "HProcID") {
+                            layer.open({
+                                type: 2
+                                , skin: "layui-layer-rim"                           //鍔犱笂杈规
+                                , title: "鍓骇璁″垝鍗�"                             //鏍囬
+                                , closeBtn: 1                                       //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                                , shift: 2                                          //寮瑰嚭鍔ㄧ敾
+                                , area: ["90%", "90%"]                              //绐椾綋澶у皬
+                                , maxmin: true                                      //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                                , content: ['../../../views/鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.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("璇烽�夋嫨涓�鏉℃暟鎹�");
+                                    }
+                                    if ($("#HProcName").val() == checkStatus.data[0].宸ュ簭鍚嶇О) {
+                                        obj.update({
+                                            "HProcID": checkStatus.data[0].HItemID
+                                            , "HProcName": checkStatus.data[0].宸ュ簭鍚嶇О
+
+                                        })
+                                    } else {
+                                        return layer.msg("閫夋嫨鐨勫伐搴�,璺熷綋鍓嶅伐鍗曠殑宸ュ簭涓嶅尮閰�");
+                                    }
+
+                                    layer.close(index);//鍏抽棴寮圭獥
+                                }
+                                , btn2: function (index, layero) { }
+                                , end: function () {
+
+                                }
+                            })
+                        }
+                        obj.event = "";
+                        return false;
+                    }
+                })
+            }
+            //#endregion
+
+        
 
         function AllowLoadData() {  //闈炵┖楠岃瘉
             var Result = true;
@@ -890,7 +1215,7 @@
                 layer.msg("浜у搧缂栫爜涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
-            if ($("#HBeginDate").val() == '' || $("#HBeginDate").val() == null) {
+            if ($("#HBeginWorkTime").val() == '' || $("#HBeginWorkTime").val() == null) {
                 layer.msg("寮�宸ユ椂闂翠笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
@@ -968,11 +1293,22 @@
                 }
             })
         }
-
+        //淇濆瓨
         function save(data) {
             var index = layer.load();
+            //鑾峰彇瀛愯〃鏁版嵁
+            var num = [];
+            for (var i = 0; i < table.cache["mainTable"].length; i++) {
+                if (table.cache["mainTable"][i] != "") {
+                    table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
+                    num.push(table.cache["mainTable"][i])
+                }
+            }
+
+            //瀛愯〃鏁版嵁搴忓垪鍖�
+            var sSubStr = JSON.stringify(num);
             var sMainStr = JSON.stringify(data.field);
-            var sMainSub = sMainStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
+            var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
             if (!AllowLoadData())//鏁版嵁楠岃瘉
             {
                 return false;
@@ -1024,7 +1360,8 @@
                 }
             })
         }
-
+            //浠ヤ笂涓簂ayui妯″潡
+        });
         function formatDate(date) {
             var d = new Date(date),
                 month = '' + (d.getMonth() + 1),
@@ -1051,6 +1388,10 @@
         function GetSwipeCardStart(obj) {
             OptionData[0] = obj;
         }
+        //娴佽浆鍗�
+        function GetProcExValue(obj) {
+            OptionData = obj;
+        }
     </script>
 </body>
 </html>
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
index 5a3bb52..5e4bbd6 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
@@ -116,11 +116,11 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">璁㈠崟璺熻釜鍙�</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
-            </div>
-        </div>-->
+                                            <label class="layui-form-label">璁㈠崟璺熻釜鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>-->
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -152,18 +152,19 @@
                                             <div class="layui-input-inline">
                                                 <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;" readonly>
                                                 <input type="hidden" class="layui-input" name="HProcExchHinteID" id="HProcExchHinteID">
+                                                <input type="hidden" class="layui-input" name="HProcPlanEntryID" id="HProcPlanEntryID">
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">褰撳墠宸ュ簭</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HProcName" id="HProcName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
-                <input type="hidden" name="HProcID" id="HProcID" value="0">
-                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HSQProcID-BT" id="HSQProcID-BT" style="width: 40px; padding: 0 10px;">
-                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
-                </button>
-            </div>
-        </div>-->
+                                            <label class="layui-form-label">褰撳墠宸ュ簭</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HProcName" id="HProcName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <input type="hidden" name="HProcID" id="HProcID" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HSQProcID-BT" id="HSQProcID-BT" style="width: 40px; padding: 0 10px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                </button>
+                                            </div>
+                                        </div>-->
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">鏈嚭绔欐暟閲�</label>
                                             <div class="layui-input-block">
@@ -189,12 +190,12 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">鏍哥畻宸ュ簭</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HPayProcID" id="HPayProcID" style="background-color:#efefef4d;" readonly>
-                <input type="hidden" value="0" name="HPayProcID" id="HPayProcID">
-            </div>
-        </div>-->
+                                            <label class="layui-form-label">鏍哥畻宸ュ簭</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPayProcID" id="HPayProcID" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" value="0" name="HPayProcID" id="HPayProcID">
+                                            </div>
+                                        </div>-->
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label"></label>
                                             <div class="layui-input-inline">
@@ -298,17 +299,17 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">宸ユ椂</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HWorkTimes" id="HWorkTimes" value="0">
-            </div>
-        </div>
-        <div class="layui-col-xs4 layui-inline">
-            <label class="layui-form-label">璁惧娓呭崟</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="HSourceNameList" id="HSourceNameList" style="background-color:#efefef4d;" readonly>
-            </div>
-        </div>-->
+                                            <label class="layui-form-label">宸ユ椂</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HWorkTimes" id="HWorkTimes" value="0">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">璁惧娓呭崟</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HSourceNameList" id="HSourceNameList" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>-->
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -337,14 +338,36 @@
                                                 <input type="text" class="layui-input" value="0" name="HBackWorkByMaterQty" style="width:190px;" id="HBackWorkByMaterQty" onfocus="this.select();">
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label" >妯″叿缂栧彿</label>
+                                            <div class="layui-input-block" >
+                                                <input type="text" class="layui-input" name="HMouldNo" id="HMouldNo" value="" style="width: 190px;" readonly>
+                                                <input type="hidden" class="layui-input" name="HMouldID" id="HMouldID" value="0">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label" >妯″叿鍚嶇О</label>
+                                            <div class="layui-input-block" >
+                                                <input type="text" class="layui-input" name="HMouldName" id="HMouldName" value="" style="width: 190px;" readonly>
+                                            </div>
+                                        </div>
+
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label" >妯″叿鍨嬪彿</label>
+                                            <div class="layui-input-block" >
+                                                <input type="text" class="layui-input" name="HModel" id="HModel" value="" style="width: 190px;" readonly>
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <!--<div class="layui-col-xs8 layui-inline">
-            <label class="layui-form-label">澶囨敞</label>
-            <div class="layui-input-block">
-                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style=" width: 75%;">
-            </div>
-        </div>-->
+                                            <label class="layui-form-label">澶囨敞</label>
+                                            <div class="layui-input-block">
+                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style=" width: 75%;">
+                                            </div>
+                                        </div>-->
                                     </div>
                                 </div>
                             </div>
@@ -845,7 +868,7 @@
                 //绂佺敤宸ュ簾鏁伴噺锛屾枡搴熸暟閲忓瓧娈�
                 if ($("#HWasterQty").val() > 0) {
                     $("#HWasterQty_Work").attr("disabled", "disabled");
-                    $("#HWasterQty_Mater").attr("disabled", "disabled");                    
+                    $("#HWasterQty_Mater").attr("disabled", "disabled");
                     document.getElementById('HWasterQty_Work').style.backgroundColor = '#efefef4d';
                     document.getElementById('HWasterQty_Mater').style.backgroundColor = '#efefef4d';
                 } else {
@@ -912,6 +935,10 @@
                                 "HToCheckQty": data.鍙栨牱鏁伴噺,
                                 "HLossQty": data.閬楀け鏁伴噺,
                                 "HBackWorkByMaterQty": data.鏂欏簾杩斿伐鏁伴噺,
+                                "HMouldID": data.HMouldID,
+                                "HMouldNo": data.妯″叿缂栫爜,
+                                "HMouldName": data.妯″叿鍚嶇О,
+                                "HModel": data.妯″叿鍨嬪彿,
                             });
                             if (data.鏄惁瀹℃牳 == "true") {
                                 $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//瀹℃牳鎸夐挳绂佺敤
@@ -1091,6 +1118,7 @@
                                         "lngBillKey": data.hmainid,
                                         "HProcExchBillNo": data.鍗曟嵁鍙�,
                                         "HProcExchHinteID": data.hmainid,
+                                        "HProcPlanEntryID": data.hsubid,
                                         "HICMOQty": data.浠诲姟鍗曟暟閲�,
                                         "HOrderProcNO": data.璁㈠崟璺熻釜鍙�,
                                         "HPRDOrgID": data.缁勭粐
@@ -1156,6 +1184,9 @@
                                         , height: 500
                                     }
                                     table.render(option)
+
+                                    getHModel($('#HProcExchHinteID').val(), $('#HProcPlanEntryID').val(), $('#HProcExchBillNo').val());
+
                                     break;
                             }
                             //layer.close(index);
@@ -2015,6 +2046,33 @@
                 });
             }
 
+            //鏍规嵁鏉″舰鐮佺殑鏌ュ嚭鐨勬祦杞崱涓诲瓙id+娴佽浆鍗� 鎵惧嚭瀵瑰簲鐨勬ā鍏�
+            function getHModel(HInterID, HEntryID, HBillNo) {
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Cj_StationOutBill_CurrentWork/getHModelList",
+                    async: false,
+                    data: { "HInterID": HInterID, "HEntryID": HEntryID, "HBillNo": HBillNo },
+                    dataType: "json",
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            $("#HMouldID").val(data1.data[0]["HMouldID"]);
+                            $("#HMouldNo").val(data1.data[0]["妯″叿缂栫爜"]);
+                            $("#HMouldName").val(data1.data[0]["妯″叿鍚嶇О"]);
+                            $("#HModel").val(data1.data[0]["妯″叿鍨嬪彿"]);
+                        }
+                        else {
+                            layer.close(indexs);
+                            layer.msg(data1.Message);
+                        }
+                    },
+                    error: function (err) {
+                        layer.close(indexs);
+                        layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    }
+                });
+            }
+
             //姹囨姤
             function GetInStorage() {
                 var InterID = $("#HInterID").val();
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill_CurrentWork.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill_CurrentWork.html"
index 06ae8d3..f29538d 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill_CurrentWork.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill_CurrentWork.html"
@@ -23,8 +23,8 @@
             <div class="layui-card" style="padding: 1px">
                 <div class="layui-card-body" style="padding: 1px;">
                     <form class="layui-form" action="" lay-filter="component-form-group">
-                        <div style="width: 65%; height: calc(105vh); float: left; background-color: rgb(255 255 255) ">
-                            <div id="top" style="width:100%;height:calc(40vh);">
+                        <div style="width: 65%; height: calc(135vh); float: left; background-color: rgb(255 255 255) ">
+                            <div id="top" style="width:100%;height:calc(60vh);">
                                 <div id="top-left" style="width: 30%; height: calc(40vh); float: left;">
                                     <div class="layui-inline">
                                         <label class="layui-form-label" style="width: 30px;"><span style="font-weight:bolder">璁惧</span></label>
@@ -258,6 +258,29 @@
                                             </div>
                                         </div>
                                     </div>
+                                    <div class="layui-row" style="margin-bottom: 15px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 65px;">妯″叿缂栧彿</label>
+                                            <div class="layui-input-block" style="margin-left: 95px;">
+                                                <input type="text" class="layui-input" name="HMouldNo" id="HMouldNo" value="" style="width: 150px;" readonly>
+                                                <input type="hidden" class="layui-input" name="HMouldID" id="HMouldID" value="0">
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 65px;">妯″叿鍚嶇О</label>
+                                            <div class="layui-input-block" style="margin-left: 95px;">
+                                                <input type="text" class="layui-input" name="HMouldName" id="HMouldName" value="" style="width: 150px;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="margin-bottom: 15px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 65px;">妯″叿鍨嬪彿</label>
+                                            <div class="layui-input-block" style="margin-left: 95px;">
+                                                <input type="text" class="layui-input" name="HModel" id="HModel" value="" style="width: 150px;" readonly>
+                                            </div>
+                                        </div>                                       
+                                    </div>
                                 </div>
                             </div>
                             <div id="center" style="width: 100%; height: calc(55vh); margin-top: 1%;">
@@ -292,7 +315,7 @@
                                 </div>
                             </div>
                         </div>
-                        <div id="center-right-maintable" style="width: 34%; height: calc(105vh); float: left; margin-left: 0.2%; background-color: rgb(255 255 255) ">
+                        <div id="center-right-maintable" style="width: 34%; height: calc(135vh); float: left; margin-left: 0.2%; background-color: rgb(255 255 255) ">
                             <div class="layui-tab" lay-filter="tab-POStockInBill">
                                 <ul class="layui-tab-title" lay-filter="tab-all">
                                     <li lay-id="1" style="padding:1px;" class="layui-this">鎵爜璁板綍</li>
@@ -300,7 +323,7 @@
                                 <div class="layui-tab-content">
                                     <div class="layui-tab-item layui-show">
                                         <div class="layui-form-item">
-                                            <table class="" id="mainTable" style="width:100%;" lay-filter="mainTable"></table>
+                                            <table class="" id="mainTable" style="width:110%;" lay-filter="mainTable"></table>
                                         </div>
                                     </div>
                                 </div>
@@ -1073,7 +1096,7 @@
                         $("#HICMOQty").val(data1.data[0]["鐢熶骇鏁伴噺"]);
                         $("#HPlanQty").val(data1.data[0]["娴佽浆鍗℃暟閲�"]);
                         $("#HBarCode").val(HBarCode);
-
+                        getHModel(data1.data[0]["hmainid"], data1.data[0]["hsubid"], data1.data[0]["鍗曟嵁鍙�"]);
                     }
                     else {
                         layer.close(indexs);
@@ -1090,6 +1113,33 @@
             });
         }
 
+        //鏍规嵁鏉″舰鐮佺殑鏌ュ嚭鐨勬祦杞崱涓诲瓙id+娴佽浆鍗� 鎵惧嚭瀵瑰簲鐨勬ā鍏�
+        function getHModel(HInterID, HEntryID, HBillNo) {
+            $.ajax({
+                type: "GET",
+                url: GetWEBURL() + "/Cj_StationOutBill_CurrentWork/getHModelList",
+                async: false,
+                data: { "HInterID": HInterID, "HEntryID": HEntryID, "HBillNo": HBillNo},
+                dataType: "json",
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        $("#HMouldID").val(data1.data[0]["HMouldID"]);
+                        $("#HMouldNo").val(data1.data[0]["妯″叿缂栫爜"]);
+                        $("#HMouldName").val(data1.data[0]["妯″叿鍚嶇О"]);
+                        $("#HModel").val(data1.data[0]["妯″叿鍨嬪彿"]);                    
+                    }
+                    else {
+                        layer.close(indexs);
+                        layer.msg(data1.Message);
+                    }                   
+                },
+                error: function (err) {
+                    layer.close(indexs);
+                    layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                }
+            });
+        }
+
         //淇濆瓨
         function Saver(data) {
             if ($("#HProcExchBillNo").val() == "") {

--
Gitblit v1.9.1