From 5b155f18c496a8f5d2572cf03d9f5ff22014dc13 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 03 十二月 2025 17:18:46 +0800
Subject: [PATCH] 1

---
 WebTM/views/生产管理/异常反馈单/Sc_Add_MESExecptFeedBackBillList.html | 1036 ++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 881 insertions(+), 155 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_Add_MESExecptFeedBackBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_Add_MESExecptFeedBackBillList.html"
index 24b4277..a695379 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_Add_MESExecptFeedBackBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_Add_MESExecptFeedBackBillList.html"
@@ -99,13 +99,14 @@
                                     <div class="layui-tab layui-tab-card">
                                         <ul class="layui-tab-title">
                                             <li class="layui-this">鍩烘湰淇℃伅</li>
+                                            <li>鍏朵粬淇℃伅</li>
                                             <li>鍒跺崟淇℃伅</li>
                                         </ul>
-                                        <div class="layui-tab-content" style="height: 700px;">
+                                        <div class="layui-tab-content" style="height: 900px;">
                                             <div class="layui-tab-item layui-show">
                                                 <div class="layui-form-item">
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">鍗曟嵁鍙�:</label>
+                                                        <label class="layui-form-label">鍗曟嵁鍙�:<label style="color:red"> * </label></label>
                                                         <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" />
@@ -113,21 +114,28 @@
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">鍗曟嵁鏃ユ湡:</label>
+                                                        <label class="layui-form-label">鍗曟嵁鏃ユ湡:<label style="color:red"> * </label></label>
                                                         <div class="layui-input-inline">
                                                             <input class="layui-input" name="HDate" id="HDate" disabled autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">涓婚:</label>
+                                                        <label class="layui-form-label">涓婚:<label style="color:red"> * </label></label>
                                                         <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HContext" lay-verify="HContext" id="HContext"  autocomplete="off">
+                                                            <input class="layui-input" name="HContext" lay-verify="HContext" id="HContext" autocomplete="off">
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">寮傚父绫诲瀷:</label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" name="HErrMsgBackTypeName" id="HErrMsgBackTypeName" class="layui-input" value="" disabled>
+                                                            <input type="hidden" name="HErrMsgBackTypeID" id="HErrMsgBackTypeID" lay-verify="HErrMsgBackTypeID" value="0">
                                                         </div>
                                                     </div>
                                                 </div>
                                                 <div class="layui-form-item">
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">鍙戦�佷汉:</label>
+                                                        <label class="layui-form-label">鍙戦�佷汉:<label style="color:red"> * </label></label>
                                                         <div class="layui-input-inline">
                                                             <input type="text" name="HSendMan" id="HSendMan" class="layui-input" value="" style="float:left;width:150px;" disabled>
                                                             <button type="button" lay-submit="" class="layui-btn" lay-filter="HSendManList" id="HSendManList" style="width:40px;">
@@ -136,13 +144,12 @@
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">鍙戦�侀儴闂�:</label>
+                                                        <label class="layui-form-label">鎺ユ敹浜�:<label style="color:red"> * </label></label>
                                                         <div class="layui-input-inline">
-                                                            <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;" disabled>
-                                                            <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;">
-                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" id="HDeptList" style="width:40px;">
+                                                            <input type="text" name="HReceiveMan" id="HReceiveMan" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HReceiveManList" id="HReceiveManList" style="width:40px;">
                                                                 <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                            </button>
+                                                            </button>                                                           
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
@@ -150,27 +157,28 @@
                                                             <label class="layui-form-label">绱ф�ョ▼搴�:</label>
                                                             <div class="layui-input-inline">
                                                                 <select name="HLevel" lay-filter="HLevel" id="HLevel">
-                                                                    <option value="0" selected="selected">鏅��</option>
-                                                                    <option value="1">绱ф��</option>
+                                                                    <option value="鏅��" selected="selected">鏅��</option>
+                                                                    <option value="绱ф��">绱ф��</option>
                                                                 </select>
                                                             </div>
                                                         </div>
                                                     </div>
-                                                </div>
-                                                <div class="layui-form-item">
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">鎺ユ敹浜�:</label>
+                                                        <label class="layui-form-label">鍙戦�佺被鍨�:</label>
                                                         <div class="layui-input-inline">
-                                                            <input type="text" name="HReceiveMan" id="HReceiveMan" class="layui-input" value="" style="float:left;width:150px;" disabled>
-                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HReceiveManList" id="HReceiveManList" style="width:40px;">
-                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                            </button>
+                                                            <select name="HSendType" lay-filter="HSendType" id="HSendType">
+                                                                <option value="鍏叡" selected="selected">鍏叡</option>
+                                                                <option value="涓汉">涓汉</option>
+                                                            </select>
                                                         </div>
                                                     </div>
+                                                </div>
+                                                <div class="layui-form-item">
+
                                                     <div class="layui-inline">
                                                         <label class="layui-form-label">鎶勯��:</label>
-                                                        <div class="layui-input-inline">
-                                                            <input type="text" name="HCopyMan" id="HCopyMan" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                        <div>
+                                                            <input type="text" name="HCopyMan" id="HCopyMan" class="layui-input" value="" style="float:left;width:1035px;" disabled>
                                                             <button type="button" lay-submit="" class="layui-btn" lay-filter="HCopyManList" id="HCopyManList" style="width:40px;">
                                                                 <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                             </button>
@@ -185,17 +193,149 @@
                                                             </button>
                                                         </div>
                                                     </div>-->
+                                                </div>
+                                                <div class="layui-form-item">
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">鍙戦�佺被鍨�:</label>
+                                                        <label class="layui-form-label">璐d换浜�:<label style="color:red"> * </label></label>
                                                         <div class="layui-input-inline">
-                                                            <select name="HSendType" lay-filter="HSendType" id="HSendType">
-                                                                <option value="0" selected="selected">鍏叡</option>
-                                                                <option value="1">涓汉</option>
-                                                            </select>
+                                                            <input type="text" name="HBadProcManName" id="HBadProcManName" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                            <input type="hidden" name="HBadProcMan" id="HBadProcMan" class="layui-input" value="0">
+                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HBadProcManList" id="HBadProcManList" style="width:40px;">
+                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                            </button>
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">QE璐d换浜� :<label style="color:red"> * </label></label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" name="HQEManName" id="HQEManName" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                            <input type="hidden" name="HQEMan" id="HQEMan" class="layui-input" value="0">
+                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HQEManList" id="HQEManList" style="width:40px;">
+                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                            </button>
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <div class="layui-inline">
+                                                            <label class="layui-form-label">闂鏉ユ簮:</label>
+                                                            <div class="layui-input-inline">
+                                                                <select name="HForm" lay-filter="HForm" id="HForm">
+                                                                    <option value="浜�" selected="selected">浜�</option>
+                                                                    <option value="鏈�">鏈�</option>
+                                                                    <option value="鏂�">鏂�</option>
+                                                                    <option value="娉�">娉�</option>
+                                                                    <option value="鐜�">鐜�</option>
+                                                                    <option value="娴�">娴�</option>
+                                                                </select>
+                                                            </div>
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">鍙樺寲鐐�:</label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" name="HChangeNote" id="HChangeNote" class="layui-input" value="" autocomplete="off">
+                                                        </div>
+                                                    </div>
+                                                </div>
+
+                                                <div class="layui-form-item">
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">璇︾粏鍐呭:<label style="color:red"> * </label></label>
+                                                        <div class="layui-input-inline">
+                                                            <textarea placeholder="璇疯緭鍏ヨ缁嗗唴瀹�" class="layui-textarea" name="HDescription" id="HDescription" style="width:1080px;"></textarea>
+                                                        </div>
+                                                    </div>
+                                                </div>
+
+                                                <div class="layui-form-item">
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">澶囨敞:</label>
+                                                        <div class="layui-input-inline">
+                                                            <textarea placeholder="璇疯緭鍏ュ娉�" class="layui-textarea" name="HRemark" id="HRemark" style="width:1080px;"></textarea>
                                                         </div>
                                                     </div>
                                                 </div>
                                                 <div class="layui-form-item">
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">浜у搧缂栫爜:<label style="color:red"> * </label></label>
+                                                        <div class="layui-input-inline">
+                                                            <input class="layui-input" name="HMaterNumber" lay-verify="HMaterNumber" value="" id="HMaterNumber">
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">浜у搧鍚嶇О:<label style="color:red"> * </label></label>
+                                                        <div class="layui-input-inline">
+                                                            <input class="layui-input" name="HMaterName" lay-verify="HMaterName" value="" id="HMaterName">
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">瑙勬牸鍨嬪彿:</label>
+                                                        <div class="layui-input-inline">
+                                                            <input class="layui-input" name="HMaterModel" lay-verify="HMaterModel" value="" id="HMaterModel">
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">娑夊強鏁伴噺:</label>
+                                                        <div class="layui-input-inline">
+                                                            <input class="layui-input" name="HQty" lay-verify="HQty" id="HQty" value="" autocomplete="off">
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                                <div class="layui-form-item">
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">鐢熶骇璧勬簮</label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" class="layui-input" name="HSourceName" id="HSourceName" style="float: left; width: 150px;" readonly>
+                                                            <input type="hidden" value="0" name="HSourceID" id="HSourceID">
+                                                            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="width: 40px; padding: 0 10px;">
+                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                            </button>
+                                                        </div>
+                                                    </div>
+
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">鍙戦�侀儴闂�:</label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                            <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" id="HDeptList" style="width:40px;">
+                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                            </button>
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">鎸囨淳澶勭悊浜�:</label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" name="HHandleEmpName" id="HHandleEmpName" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                            <input type="hidden" name="HHandleEmpID" id="HHandleEmpID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HHandleEmpList" id="HHandleEmpList" style="width:40px;">
+                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                            </button>
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">褰卞搷闈㈢▼搴�:</label>
+                                                        <div class="layui-input-inline">
+                                                            <select name="HErrLev" lay-filter="HErrLev" id="HErrLev">
+                                                                <option value="" selected="selected"></option>
+                                                                <option value="鏃犳硶鍒ゆ柇">鏃犳硶鍒ゆ柇</option>
+                                                                <option value="鍋滅嚎">鍋滅嚎</option>
+                                                                <option value="鎵归噺涓嶈壇">鎵归噺涓嶈壇</option>
+                                                                <option value="鍋跺彂涓嶈壇">鍋跺彂涓嶈壇</option>
+                                                            </select>
+                                                        </div>
+                                                    </div>
+
+                                                </div>
+                                                <div class="layui-form-item">
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">婧愬崟鍗曞彿:</label>
+                                                        <div class="layui-input-inline">
+                                                            <input class="layui-input" name="HMainSourceBillNo" lay-verify="HMainSourceBillNo" id="HMainSourceBillNo" disabled autocomplete="off">
+                                                            <input id="HMainSourceInterID" name="HMainSourceInterID" value="0" type="hidden" />
+                                                            <input id="HMainSourceEntryID" name="HMainSourceEntryID" value="0" type="hidden" />
+                                                        </div>
+                                                    </div>
                                                     <div class="layui-inline">
                                                         <label class="layui-form-label">婧愬崟绫诲瀷:</label>
                                                         <div class="layui-input-inline">
@@ -203,68 +343,58 @@
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">婧愬崟鍗曞彿:</label>
+                                                        <label class="layui-form-label">杞﹂棿:</label>
                                                         <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HMainSourceBillNo" lay-verify="HMainSourceBillNo" id="HMainSourceBillNo" disabled autocomplete="off">
-                                                            <input id="HMainSourceInterID" name="HMainSourceInterID" type="hidden" />
-                                                            <input id="HMainSourceEntryID" name="HMainSourceEntryID" type="hidden" />
+                                                            <input type="text" name="HCenterName" id="HCenterName" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                            <input type="hidden" name="HCenterID" id="HCenterID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HCenterList" id="HCenterList" style="width:40px;">
+                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                            </button>
+                                                        </div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <!--鍏朵粬淇℃伅-->
+                                            <div class="layui-tab-item">
+                                                <div class="layui-form-item">
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">鎺ユ敹閮ㄩ棬:</label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" name="HRecDeptName" id="HRecDeptName" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                            <input type="hidden" name="HRecDeptID" id="HRecDeptID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HRecDeptList" id="HRecDeptList" style="width:40px;">
+                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                            </button>
                                                         </div>
                                                     </div>
                                                     <div class="layui-inline">
                                                         <label class="layui-form-label">鍌績娆℃暟:</label>
                                                         <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HHasten" lay-verify="HHasten" id="HHasten" autocomplete="off">
+                                                            <input class="layui-input" name="HHasten" lay-verify="HHasten" id="HHasten" autocomplete="off" value="0">
+                                                        </div>
+                                                    </div>
+                                                    <div class="layui-inline">
+                                                        <label class="layui-form-label">鐢熶骇鐝</label>
+                                                        <div class="layui-input-inline">
+                                                            <input type="text" class="layui-input" name="HShiftsName" id="HShiftsName" style="float: left; width: 150px;" readonly>
+                                                            <input type="hidden" value="0" name="HShiftsID" id="HShiftsID">
+                                                            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="BtnHShiftsName" id="BtnHShiftsName" style="width: 40px; padding: 0 10px;">
+                                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                            </button>
                                                         </div>
                                                     </div>
                                                 </div>
                                                 <div class="layui-form-item">
                                                     <div class="layui-inline">
-                                                        <label class="layui-form-label">浜у搧鍚嶇О:</label>
+                                                        <label class="layui-form-label">棰勯槻绾犳鎺柦 :</label>
                                                         <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HMaterName" lay-verify="HMaterName" id="HMaterName" autocomplete="off" disabled>
-                                                        </div>
-                                                    </div>
-                                                    <div class="layui-inline">
-                                                        <label class="layui-form-label">瑙勬牸鍨嬪彿:</label>
-                                                        <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HMaterModel" lay-verify="HMaterModel" id="HMaterModel" autocomplete="off" disabled>
-                                                        </div>
-                                                    </div>
-                                                    <div class="layui-inline">
-                                                        <label class="layui-form-label">鏁伴噺:</label>
-                                                        <div class="layui-input-inline">
-                                                            <input class="layui-input" name="HQty" lay-verify="HQty" id="HQty" autocomplete="off">
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                <!--<div class="layui-form-item">
-                                                    <div class="layui-inline">
-                                                        <label class="layui-form-label">鍙戦�佺被鍨�:</label>
-                                                        <div class="layui-input-inline">
-                                                            <select name="HSendType" lay-filter="HSendType" id="HSendType">
-                                                                <option value="0" selected="selected">鍏叡</option>
-                                                                <option value="1">涓汉</option>
-                                                            </select>
-                                                        </div>
-                                                    </div>
-                                                </div>-->
-                                                <div class="layui-form-item">
-                                                    <div class="layui-inline">
-                                                        <label class="layui-form-label">璇︾粏绫诲:</label>
-                                                        <div class="layui-input-inline">
-                                                            <textarea placeholder="璇疯緭鍏ヨ缁嗗唴瀹�" class="layui-textarea" name="HDescription" id="HDescription" style="width:780px;"></textarea>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                <div class="layui-form-item">
-                                                    <div class="layui-inline">
-                                                        <label class="layui-form-label">澶囨敞:</label>
-                                                        <div class="layui-input-inline">
-                                                            <textarea placeholder="璇疯緭鍏ヨ缁嗗唴瀹�" class="layui-textarea" name="HRemark" id="HRemark" style="width:780px;"></textarea>
+                                                            <textarea placeholder="璇疯緭鍏ラ闃茬籂姝f帾鏂� " class="layui-textarea" name="HNote" id="HNote" style="width:1080px;"></textarea>
                                                         </div>
                                                     </div>
                                                 </div>
                                             </div>
+
+                                            <!--鍒跺崟淇℃伅-->
                                             <div class="layui-tab-item">
                                                 <div class="layui-form-item">
                                                     <div class="layui-inline">
@@ -347,6 +477,18 @@
     </div>
     <script>
         //鑾峰彇鍙傛暟
+        var HICMOBillNo = "";  //宸ュ崟鍙�
+        var HSourceName = "";  //璁惧
+        var HType = ""; //寮傚父绫诲瀷
+        var HSourceBill = "";//宸ュ簭娴佽浆鍗�
+
+
+        var edit = function (data) {
+            HICMOBillNo = data[0].HICMOBillNo;
+            HSourceName = data[0].HSourceName;
+            HType = data[0].HType;
+            HSourceBill = data[0].HSourceBillNo;
+        }
         var HBillType = "";  //鍗曟嵁绫诲瀷
         var HMainSourceInterID = ""; //婧愬崟涓诲唴鐮�
         var HMainSourceEntryID = "";  //婧愬崟瀛愬唴鐮�
@@ -354,25 +496,6 @@
         var HMainSourceBillType = "";  //婧愬崟绫诲瀷
         var refSav = "";   //鎻愪氦绫诲瀷
         var Qty = "";
-        //鑾峰彇椤甸潰璺宠浆鍙傛暟  //鍗曟嵁缂栬緫鐘舵�侊細 1.鏃犳簮鍗曟柊澧灺� 聽2.鏈夋簮鍗曟柊澧灺� 聽3.缂栬緫聽 4.娴忚聽 5.鍙樻洿
-        var params = get_UrlVars();
-        if (typeof (params[params[0]]) == "undefined") {
-            var OperationType = 1;//鎿嶄綔绫诲瀷
-        } else {
-            var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
-            var linterid = params[params[1]];//婧愬崟id
-            var HEntryID = params[params[2]];//婧愬崟瀛恑d
-            var HSBillType = params[params[3]];//婧愬崟绫诲瀷
-        }
-
-        var edit = function (data) {
-            HBillType = data[0].HBillType;
-            HMainSourceInterID = data[0].HSourceInterID;
-            HMainSourceEntryID = data[0].HSourceEntryID;
-            HMainSourceBillNo = data[0].HSourceBillNo;
-            HMainSourceBillType = data[0].HSourceBillType;
-
-        }
 
 
         layui.config({
@@ -380,7 +503,7 @@
         }).extend({
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
-             //#region 鍏敤鍙橀噺
+            //#region 鍏敤鍙橀噺
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
@@ -388,10 +511,50 @@
                 , form = layui.form
                 , laydate = layui.laydate
                 , element = layui.element;
+
+            window.HDeptType = 0;
             //#endregion
+            //鑾峰彇椤甸潰璺宠浆鍙傛暟  //鍗曟嵁缂栬緫鐘舵�侊細 1.鏃犳簮鍗曟柊澧灺� 聽2.鏈夋簮鍗曟柊澧灺� 聽3.缂栬緫聽 4.娴忚聽 5.鍙樻洿
+            var params = get_UrlVars();
+            if (typeof (params[params[0]]) == "undefined") {
+                var OperationType = 1;//鎿嶄綔绫诲瀷
+            } else {
+                var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+                var linterid = params[params[1]];//婧愬崟id
+                var HEntryID = params[params[2]];//婧愬崟瀛恑d
+                var HSBillType = params[params[3]];//婧愬崟绫诲瀷
+                var HBillType = params[params[3]];
+                var HSourceInterID = params[params[4]];
+                var HSourceEntryID = params[params[5]];
+                var HSourceBillNo = params[params[6]];
+                var HSourceBillType = params[params[7]];
+
+                var TypeName = decodeURI(HEntryID);//寮傚父鍙嶉绫诲瀷
+                var HSourceNames = decodeURI(HBillType);//鐢熶骇璧勬簮鍚嶇О
+            }
 
             //鍒濆鍖栬〃鍗曟彃浠�
             set_InitFrom();
+
+            //鍒ゆ柇鏄惁鏂板
+            if (linterid == null || linterid == 0 || OperationType == 4) {
+                //鑾峰彇鏈�澶у崟鎹彿 new
+                $("#HInterID").val("0");
+                $("#HBillNo").val("");
+                $.ajax({
+                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    type: "GET",
+                    async: false,
+                    data: { "HBillType": '4502' },
+                    success: function (d) {
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HInterID").val(d.data[0].HInterID);
+                    }
+                });
+            }
+            else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+                $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+            }
 
             //鍒ゆ柇鎿嶄綔绫诲瀷
             if (OperationType == 1) {//鏃犳簮鍗�
@@ -401,8 +564,39 @@
                 set_AddNew();
             }
             else if (OperationType == 3) {//缂栬緫
-
                 set_EditFromGrid();
+            }
+            else if (OperationType == 4) {
+                set_AddFNew();              
+                var EquipNumber = "";//璁惧浠g爜
+                var HSourceName1 = "";//鐢熶骇璧勬簮鍚嶇О
+                var HTypes = "";//寮傚父绫诲瀷
+                if (TypeName == "宸ヨ壓鍘熷洜") {
+                    set_Sc_ICMOBillStatus(linterid);//鑾峰彇宸ュ崟鐨� 鐗╂枡 鏁伴噺
+                    set_ErrMsgBackType(TypeName);   //鑾峰彇寮傚父绫诲瀷
+                    set_EquipFile(HSourceNames);        //鑾峰彇璁惧鐨勮澶囩紪鐮�
+                    HSourceName1 = HSourceNames;
+                    HTypes = TypeName;
+                    $("#HContext").val(HTypes);//涓婚
+                    $("#HForm").val("娉�");//闂鏉ユ簮
+                    form.render('select');
+                } else {
+                    set_Sc_ICMOBillStatus(HSourceBill);//鑾峰彇宸ュ崟鐨� 鐗╂枡 鏁伴噺
+                    set_ErrMsgBackType(HType);   //鑾峰彇寮傚父绫诲瀷
+                    set_EquipFile(HSourceName);        //鑾峰彇璁惧鐨勮澶囩紪鐮�
+                    HSourceName1 = HSourceName;
+                    HTypes = HType;
+                }
+                var Datetime = Format(new Date(), "yyyy-MM-dd hh:mm:ss");
+                var Person = sessionStorage["HUserName"];
+                //鎶ュ伐鍙拌烦杞〉闈㈣嚜鍔ㄧ敓鎴愬唴瀹�
+                $("#HDescription").val(generateString(Datetime, Person, HSourceName1, HICMOBillNo, HTypes, EquipNumber));
+                $("#HContext").val(HTypes);//涓婚
+            }
+            else if (OperationType == 5) {  //鏌ョ湅
+                set_EditFromGrid();
+                $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);
+                $('#VerIfySaver').addClass("layui-btn-disabled").attr("disabled", true);
             }
             else {
                 layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
@@ -445,18 +639,190 @@
                 });
             }
 
+            //#region   鎶ュ伐鍙版寫鎴� 鑷姩甯﹀嚭鏁版嵁
+
+            //鑾峰彇鎶ュ伐鍙拌烦杞俊鎭�  鐗╂枡 鏁伴噺
+            function set_Sc_ICMOBillStatus(HSourceBill) {
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Sc_MESTransFerWorkBill/Get_Sc_ICMOBillStatus", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    async: false,
+                    data: {
+                        "HSourceBill": HSourceBill
+                    },
+                    success: function (data) {
+                        if (data.count == 1)// 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                        {
+
+                            var LoadData = data.data;
+                            $("#HMaterNumber").val(LoadData[0].鐗╂枡浠g爜); //浜у搧鍚嶇О
+                            $("#HMaterName").val(LoadData[0].鐗╂枡鍚嶇О); //浜у搧鍚嶇О
+                            $("#HMaterModel").val(LoadData[0].瑙勬牸鍨嬪彿); //浜у搧瑙勬牸
+                            $("#HMainSourceBillNo").val(LoadData[0].娴佽浆鍗″彿); //婧愬崟鍗曞彿
+                            $("#HMainSourceInterID").val(LoadData[0].娴佽浆鍗′富鍐呯爜); //婧愬崟涓诲唴鐮�
+                            $("#HMainSourceEntryID").val(LoadData[0].娴佽浆鍗″瓙鍐呯爜); //婧愬崟瀛愬唴鐮�
+                            $("#HMainSourceBillType").val(3772); //婧愬崟绫诲瀷
+                            $("#HQty").val(LoadData[0].璁″垝鏁伴噺); //璁″垝鏁伴噺
+                            $("#HSourceID").val(LoadData[0].HSourceID); //鐢熶骇璧勬簮id
+                            $("#HSourceName").val(LoadData[0].鐢熶骇璧勬簮); //鐢熶骇璧勬簮
+                            if (TypeName == "宸ヨ壓鍘熷洜") {
+                                HICMOBillNo = $("#HMainSourceBillNo").val();
+                            }
+                        }
+                        else {
+                            layer.alert(data.Message, { icon: 5 });
+                        }
+                    },
+                    error: function (err) {
+                        layer.alert(err, { icon: 5 });
+                    }
+                });
+            }
+
+            //鑾峰彇鎶ュ伐鍙拌烦杞� 鑾峰彇 寮傚父绫诲瀷
+            function set_ErrMsgBackType(HType) {
+                $.ajax(
+                    {
+                        type: "GET",
+                        url: GetWEBURL() + "/Sc_MESTransFerWorkBill/Get_ErrMsgBackType", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        async: false,
+                        data: {
+                            "TypeName": HType
+                        },
+                        success: function (data) {
+                            if (data.count == 1)// 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            {
+                                var LoadData = data.data;
+                                $("#HErrMsgBackTypeID").val(LoadData[0].HItemID); //浜у搧鍚嶇О
+                                $("#HErrMsgBackTypeName ").val(LoadData[0].HName); //浜у搧鍚嶇О
+                            }
+                            else {
+                                layer.alert(data.Message, { icon: 5 });
+
+                            }
+                        },
+                        error: function (err) {
+                            layer.alert(err, { icon: 5 });
+                        }
+                    });
+                //鎸囧畾鎸囨淳澶勭悊浜�
+                if (sessionStorage["HDept"] == "鐢熶骇閮�3") {
+                    if ($("#HErrMsgBackTypeName").val() == "浜哄憳鍘熷洜") {
+                        $("#HHandleEmpName").val("鏉庨箯");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162680);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "璁惧鍘熷洜") {
+                        $("#HHandleEmpName").val("寮犲睍鍧�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(161777);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "鏉愭枡鍘熷洜") {
+                        $("#HHandleEmpName").val("鏉庨箯");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162680);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "宸ヨ壓鍘熷洜") {
+                        $("#HHandleEmpName").val("鑲栨按娓�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162662);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "妯″叿鍘熷洜") {
+                        $("#HHandleEmpName").val("鍚存枌");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162686);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "娴嬭瘯鍘熷洜") {
+                        $("#HHandleEmpName").val("瀛欐枃闈�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162622);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "鐜鍘熷洜") {
+                        //$("#HHandleEmpName").val("瀛欐枃闈�");  //鎸囨淳澶勭悊浜�
+                        //$("#HHandleEmpID").val(162622);        //鎸囨淳澶勭悊浜�
+                    }
+                }
+                else if (sessionStorage["HDept"] == "鐢熶骇閮�1-閾佽姱") {
+                    if ($("#HErrMsgBackTypeName").val() == "浜哄憳鍘熷洜") {
+                        $("#HHandleEmpName").val("绋嬪竼");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(161720);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "璁惧鍘熷洜") {
+                        $("#HHandleEmpName").val("寰愬缓娲�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162576);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "鏉愭枡鍘熷洜") {
+                        $("#HHandleEmpName").val("绋嬪竼");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(161720);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "宸ヨ壓鍘熷洜") {
+                        $("#HHandleEmpName").val("鐜嬪己");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(163378);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "妯″叿鍘熷洜") {
+                        //$("#HHandleEmpName").val("鍚存枌");  //鎸囨淳澶勭悊浜�
+                        //$("#HHandleEmpID").val(162686);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "娴嬭瘯鍘熷洜") {
+                        $("#HHandleEmpName").val("寮犲缓楣�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162525);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "鐜鍘熷洜") {
+                        $("#HHandleEmpName").val("鍚曞弻妫�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162526);        //鎸囨淳澶勭悊浜�
+                    }
+                }
+                else if (sessionStorage["HDept"] == "鐢熶骇閮�1-缁勮") {
+                    if ($("#HErrMsgBackTypeName").val() == "浜哄憳鍘熷洜") {
+                        $("#HHandleEmpName").val("绋嬪竼");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(161720);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "璁惧鍘熷洜") {
+                        $("#HHandleEmpName").val("鏇句笢閼�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162573);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "鏉愭枡鍘熷洜") {
+                        $("#HHandleEmpName").val("绋嬪竼");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(161720);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "宸ヨ壓鍘熷洜") {
+                        $("#HHandleEmpName").val("鏌瘲鏂�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162661);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "妯″叿鍘熷洜") {
+                        //$("#HHandleEmpName").val("鍚存枌");  //鎸囨淳澶勭悊浜�
+                        //$("#HHandleEmpID").val(162686);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "娴嬭瘯鍘熷洜") {
+                        $("#HHandleEmpName").val("鍒橀緳椋�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(163180);        //鎸囨淳澶勭悊浜�
+                    } else if ($("#HErrMsgBackTypeName").val() == "鐜鍘熷洜") {
+                        $("#HHandleEmpName").val("鍚曞弻妫�");  //鎸囨淳澶勭悊浜�
+                        $("#HHandleEmpID").val(162526);        //鎸囨淳澶勭悊浜�
+                    }
+                }
+            }
+
+            //鑾峰彇鎶ュ伐鍙拌烦杞� 鑾峰彇 璁惧缂栫爜
+            function set_EquipFile(HSourceName) {
+                $.ajax(
+                    {
+                        type: "GET",
+                        url: GetWEBURL() + "/Sc_MESTransFerWorkBill/set_EquipFile", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        async: false,
+                        data: {
+                            "HSourceName": HSourceName
+                        },
+                        success: function (data) {
+                            if (data.count == 1 && data.data.length!=0)// 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            {
+                                var LoadData = data.data;                               
+                                EquipNumber = LoadData[0].璁惧缂栫爜; //浜у搧鍚嶇О
+                            }
+                            else {
+                                EquipNumber = "";
+                                //layer.alert(data.Message, { icon: 5 });
+
+                            }
+                        },
+                        error: function (err) {
+                            layer.alert(err, { icon: 5 });
+                        }
+                    });
+            }
+            //#endregion
+
             //鏃犳簮鍗曟柊澧�
-            function set_AddFNew()
-            {
+            function set_AddFNew() {
                 //鍔犳簮鍗曠被鍨嬪尯鍒�(鍙互鍐欎笉鍚岀殑鏂规硶)
                 refSav = "Add";
                 //鍒濆鍩烘湰淇℃伅璧嬪��
                 $("#HDate").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"]);     //鍒跺崟浜�
-                $("#HSendMan").val(sessionStorage["HUserName"]);   //鍙戦�佷汉
                 $("#HDeptID").val(sessionStorage["HDeptID"]);  //閮ㄩ棬ID
                 $("#HDeptName").val(sessionStorage["HDept"]);  //閮ㄩ棬
+                $("#HSendMan").val(sessionStorage["HUserName"]); //鍙戦�佷汉
+                $("#HCenterName").val(sessionStorage["HWorkCenter"]); //宸ヤ綔涓績
+                $("#HCenterID").val(sessionStorage["HWorkCenterID"]); //宸ヤ綔涓績
+                $("#HReceiveMan").val(sessionStorage["HUserName"]);   //鎺ユ敹浜�
             }
 
             //鏈夋簮鍗曟柊澧�
@@ -469,7 +835,7 @@
                 $("#HSendMan").val(sessionStorage["HUserName"]);   //鍙戦�佷汉
                 $("#HDeptID").val(sessionStorage["HDeptID"]);  //閮ㄩ棬ID
                 $("#HDeptName").val(sessionStorage["HDept"]);  //閮ㄩ棬
-
+                $("#HReceiveMan").val(sessionStorage["HUserName"]);   //鎺ユ敹浜�
                 $.ajax(
                     {
                         type: "GET",
@@ -507,8 +873,7 @@
             }
 
             //缂栬緫
-            function set_EditFromGrid()
-            {
+            function set_EditFromGrid() {
                 refSav = "Update";
                 form.render('select');
                 $.ajax({
@@ -531,16 +896,32 @@
                                 , "HSendMan": data.HSendMan
                                 , "HDeptID": data.HDeptID
                                 , "HDeptName": data.HDeptName
+                                , "HCenterID": data.HCenterID
+                                , "HCenterName": data.HCenterName
                                 , "HReceiveMan": data.HReceiveMan
                                 , "HCopyMan": data.HCopyMan
                                 , "HMainSourceInterID": data.HSourceInterID                 //婧愬崟ID
                                 , "HMainSourceEntryID": data.HSourceEntryID                 //婧愬崟瀛怚D
                                 , "HMainSourceBillNo": data.HSourceBillNo                   //婧愬崟鍗曞彿
                                 , "HMainSourceBillType": data.HSourceBillType               //婧愬崟绫诲瀷
-                                , "HHasten": data.HHasten    
-                                , "HMaterName": data.HMaterName   
-                                , "HMaterModel": data.HMaterModel  
+                                , "HHasten": data.HHasten
+                                , "HMaterNumber": data.HMaterNumber
+                                , "HMaterName": data.HMaterName
+                                , "HHandleEmpID": data.HHandleEmpID
+                                , "HHandleEmpName": data.HHandleEmpName
+                                , "HMaterModel": data.HMaterModel
                                 , "HQty": data.HQty
+                                , "HForm": data.HForm
+                                , "HChangeNote": data.HChangeNote
+                                , "HNote": data.HNote
+                                , "HBadProcMan": data.HBadProcMan
+                                , "HBadProcManName": data.HBadProcManName
+                                , "HQEMan": data.HQEMan
+                                , "HQEManName": data.HQEManName
+                                , "HSourceID": data.HSourceID
+                                , "HSourceName": data.HSourceName
+                                , "HShiftsID": data.HShiftsID
+                                , "HShiftsName": data.HShiftsName
                                 , "HDescription": data.HDescription
                                 , "HRemark": data.HRemark
                                 , "HMaker": data.HMaker                            //鍒跺崟浜�
@@ -566,27 +947,7 @@
                 });
             }
 
-
-            //鍒ゆ柇鏄惁鏂板
-            if (linterid == null || linterid == 0) {
-                //鑾峰彇鏈�澶у崟鎹彿 new
-                $("#HInterID").val("0");
-                $("#HBillNo").val("");
-                $.ajax({
-                    url: GetWEBURL() + "/Web/GetMAXNum",
-                    type: "GET",
-                    data: { "HBillType": '4502' },
-                    success: function (d) {
-                        $("#HBillNo").val(d.data[0].HBillNo);
-                        $("#HInterID").val(0);
-                    }
-                });
-            }
-            else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
-                $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
-            }
-
-              //鑾峰彇涓嬫媺閫変腑鍊�
+            //鑾峰彇涓嬫媺閫変腑鍊�
             form.on('select(SourceType)', function (data) {
                 Sctag = data.value;
                 form.render('select');
@@ -603,16 +964,12 @@
                 }
             });
 
-
-
-
-
             //淇濆瓨鎻愪氦
             form.on('submit(Saver)', function (data) {
 
                 var sMainStr = JSON.stringify(data.field);
                 var sMainSub = sMainStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
-                if (!AllowLoadData())//鏁版嵁楠岃瘉
+                if (!AllowLoadData(OperationType))//鏁版嵁楠岃瘉
                 {
                     return false;
                 }
@@ -624,18 +981,18 @@
                     dataType: "json",
                     success: function (data) {
                         if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
+                            //$("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
                             layer.confirm(data.Message, {
                                 btn: ['纭']
                             }, function (index) {
-                                    if (data.Verify == "Y") //鑷姩瀹℃牳
-                                    {
-                                        layer.close(index);
-                                        SaveVerify(); //瀹℃牳
-                                    }
-                                    else {
-                                        layer.close(index);
-                                    }
+                                if (data.Verify == "Y") //鑷姩瀹℃牳
+                                {
+                                    layer.close(index);
+                                    SaveVerify(); //瀹℃牳
+                                }
+                                else {
+                                    layer.close(index);
+                                }
                             });
                         }
                         else {
@@ -654,8 +1011,7 @@
             });
 
             //瀹℃牳鎻愪氦
-            function SaveVerify()
-            {
+            function SaveVerify() {
                 var InterID = $("#HInterID").val();
                 if (!AllowLoadData())//鏁版嵁楠岃瘉
                 {
@@ -687,8 +1043,14 @@
 
             //閫�鍑�
             form.on('submit(Exit)', function (data) {
-                Pub_Close(1);
-                window.parent.location.reload();
+                if (linterid == undefined) {
+                    //鍏抽棴椤电
+                    Pub_Close(2);
+                }
+                else {
+                    //鍏抽棴椤电
+                    Pub_Close(1);
+                }
             });
 
 
@@ -703,7 +1065,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../PublicPage/UserInformation.html', 'yes'],
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HEmp', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -713,8 +1075,10 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                        $("#HSendMan").val(checkStatus.data[0].HName);
+                        $("#HSendMan").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        Person = checkStatus.data[0].鑱屽憳鍚嶇О;
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                        $("#HDescription").val(generateString(Datetime, Person, HSourceName, HICMOBillNo, HType, EquipNumber));
                     }
                     , btn2: function (index, layero) {
                         //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
@@ -731,16 +1095,18 @@
 
             //鍙戦�侀儴闂�
             form.on('submit(HDeptList)', function () {
+                HDeptType = 1;
+
                 //椤甸潰灞�-鑷畾涔�
                 layer.open({
                     type: 2,
                     skin: 'layui-layer-rim', //鍔犱笂杈规
-                    title: '璧勬簮鍒楄〃',
+                    title: '閮ㄩ棬鍒楄〃',
                     closeBtn: 1,
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../PublicPage/DeptInformation.html', 'yes'],
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -750,7 +1116,7 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                        $("#HDeptName").val(checkStatus.data[0].HName);
+                        $("#HDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
                         $("#HDeptID").val(checkStatus.data[0].HItemID);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -767,8 +1133,136 @@
                 });
             });
 
-            //鎺ユ敹浜�
-            form.on('submit(HReceiveManList)', function () {
+            //鎸囨淳澶勭悊浜哄脊绐�
+            form.on('submit(HHandleEmpList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鍙戦�佷汉鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HEmp', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HHandleEmpID").val(checkStatus.data[0].HItemID);
+                        $("#HHandleEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                        if (OperationType == 3) {
+                            // 鑾峰彇褰撳墠鐨勫��
+                            var currentValue = $("#HDescription").val();                         
+
+                            // 浣跨敤姝e垯琛ㄨ揪寮忔壘鍒� "瀵瑰簲澶勭悊浜�:" 鍚庨潰鐨勪汉鍚嶅苟鏇挎崲
+                            var updatedValue = currentValue.replace(/瀵瑰簲澶勭悊浜�:[^,]*/, "瀵瑰簲澶勭悊浜�:" + $("#HHandleEmpName").val());
+                            // 灏嗘洿鏂板悗鐨勫�艰缃洖杈撳叆妗�
+                            $("#HDescription").val(updatedValue);
+                        } else if (OperationType == 4) {
+                            $("#HDescription").val(generateString(Datetime, Person, $("#HSourceName").val(), HICMOBillNo, HType, EquipNumber));
+                        }
+                       
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+            //鎺ユ敹閮ㄩ棬
+            form.on('submit(HRecDeptList)', function () {
+                HDeptType = 2;
+
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '閮ㄩ棬鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HRecDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
+                        $("#HRecDeptID").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+            //杞﹂棿(宸ヤ綔涓績)
+            form.on('submit(HCenterList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '宸ヤ綔涓績鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_WorkCenter.html?openType=2', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HCenterName").val(checkStatus.data[0].宸ヤ綔涓績鍚嶇О);
+                        $("#HCenterID").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+            //鎺ユ敹浜�(浣滃簾)
+            form.on('submit(HReceiveManList0)', function () {
                 //椤甸潰灞�-鑷畾涔�
                 layer.open({
                     type: 2,
@@ -819,6 +1313,57 @@
                 });
             });
 
+            //鎺ユ敹浜�
+            form.on('submit(HReceiveManList)', function () {
+                var HOrgID = sessionStorage["OrganizationID"];
+                var DeptName = sessionStorage["HDept"];
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鎺ユ敹浜哄垪琛�',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HReceive&HOrgID=' + HOrgID + '&DeptName=' + DeptName, 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HReceiveMan").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        $("#HBadProcManName").val(checkStatus.data[0].鑱屽憳鍚嶇О);  //璐d换浜�
+                        $("#HBadProcMan").val(checkStatus.data[0].HItemID);        //璐d换浜�
+                        $("#HRecDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
+                        $("#HRecDeptID").val(checkStatus.data[0].HDeptID);
+                        if (DeptName == "鐢熶骇閮�3") {
+                            $("#HQEMan").val(162622);
+                            $("#HQEManName").val("瀛欐枃闈�");
+                        } else{
+                            $("#HQEMan").val(162525);
+                            $("#HQEManName").val("寮犲缓楣�");
+                        }
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+
             //鎶勯�佷汉
             form.on('submit(HCopyManList)', function () {
                 //椤甸潰灞�-鑷畾涔�
@@ -853,6 +1398,82 @@
                         }
                         $("#HCopyMan").val(title);
                         console.log(checkStatus, value, title);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+            //璐d换浜哄脊绐�
+            form.on('submit(HBadProcManList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鍙戦�佷汉鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HBadProcManName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        $("#HBadProcMan").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+            //QE璐d换浜哄脊绐�
+            form.on('submit(HQEManList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鍙戦�佷汉鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HManager', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HQEManName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
+                        $("#HQEMan").val(checkStatus.data[0].HItemID);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) {
@@ -917,10 +1538,77 @@
                 });
             });
 
+            //鐢熶骇鐝
+            form.on('submit(BtnHShiftsName)', function (data) {
+                layer.open({
+                    type: 2
+                    , area: ['80%', '80%']
+                    , title: '鐢熶骇鐝鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_ShiftsList.html?type=HWorkShifts', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HShiftsID").val(checkStatus.data[0].HItemID);
+                        $("#HShiftsName").val(checkStatus.data[0].鐝鍚嶇О);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                })
+            });
+
+            //閫夋嫨鐢熶骇璧勬簮寮圭獥
+            form.on('submit(ProductionResources-BT)', function () {//鐢熶骇璧勬簮
+                layer.open({
+                    type: 2
+                    , area: ['80%', '80%']
+                    , title: '鐢熶骇璧勬簮'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html?Htype=&openType=2', 'yes']
+                    , resize: false
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HSourceName").val(checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О);
+                        $("#HSourceID").val(checkStatus.data[0].HItemID);
+                        layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                        set_EquipFile($("#HSourceName").val());
+                        $("#HDescription").val(generateString(Datetime, Person, $("#HSourceName").val(), HICMOBillNo, HType, EquipNumber));
+                    }
+                    , cancel: function (index, layero) {
+                    }
+                })
+            });
+
+
+
+            //鎶ュ伐澶紓甯歌烦杞嚜鍔ㄧ敓鎴愬唴瀹�
+            function generateString(Datetime, Person, HSourceName, HICMOBillNo, HType, EquipNumber) {
+                // 鎷兼帴瀛楃涓�
+                var result = '寮傚父鍙嶉鍗曞彿:' + $("#HBillNo").val() + ',寮傚父绫诲瀷:' + HType + ',璁㈠崟鍙�:' + HICMOBillNo + ',娴佽浆鍗″彿:' + HICMOBillNo
+                    + ', 浜у搧缂栫爜:' + $("#HMaterNumber").val() + ',浜у搧鍚嶇О:' + $("#HMaterName").val() + ',瑙勬牸鍨嬪彿:' + $("#HMaterModel").val()
+                    + ',鍙戦�佷汉:' + Person + ',鍙戠敓鏃堕棿:' + Datetime + ',鐢熶骇璧勬簮:' + HSourceName + ',璁惧缂栫爜:' + EquipNumber + ',瀵瑰簲澶勭悊浜�:' + $("#HHandleEmpName").val();
+                return result;
+            }
+
+
             //浠ヤ笂涓簂ayui妯″潡
         });
 
-        function AllowLoadData() {  //闈炵┖楠岃瘉
+        function AllowLoadData(OperationType) {  //闈炵┖楠岃瘉
             var Result = true;
             if ($("#HBillNo").val() == '' || $("#HBillNo").val() == null) {
                 layer.msg("鍗曟嵁鍙蜂笉鑳戒负绌�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
@@ -931,6 +1619,10 @@
                 return Result = false;
             }
             if ($("#HMaterName").val() == '' || $("#HMaterName").val() == null) {
+                layer.msg("浜у搧鍚嶇О涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return Result = false;
+            }
+            if ($("#HMaterNumber").val() == '' || $("#HMaterName").val() == null) {
                 layer.msg("浜у搧缂栫爜涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
@@ -946,17 +1638,26 @@
                 layer.msg("鎺ユ敹浜轰笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                 return Result = false;
             }
-           
+
+            if ($("#HBadProcManName").val() == '' || $("#HSendMan").val() == null) {
+                layer.msg("璐d换浜轰笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return Result = false;
+            }
+            if ($("#HQEManName").val() == '' || $("#HReceiveMan").val() == null) {
+                layer.msg("QE璐d换浜轰笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return Result = false;
+            }
+            if ($("#HErrLev").val() == '' || $("#HErrLev").val() == null) {
+                layer.msg("褰卞搷闈㈢▼搴︿笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return Result = false;
+            }
             if (OperationType == "2") {
                 if ($("#HMainSourceInterID").val() == '' || $("#HMainSourceInterID").val() == null) {
                     layer.msg("婧愬崟鍗曞彿涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return Result = false;
                 }
             }
-            //if ($("#HQty").val() > Qty) {
-            //    layer.msg("涓嶈兘澶т簬璁″垝鏁伴噺锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-            //    return Result = false;
-            //}
+
             return Result;
         }
 
@@ -971,6 +1672,31 @@
 
             return [year, month, day].join('-');
         }
+
+        function GetHEmpValue(obj) {  //鍙戦�佷汉
+            $("#HSendMan").val(obj[0].鑱屽憳鍚嶇О);
+        }
+
+        function GetHManagerValue(obj) {  //QE璐d换浜�
+            $("#HQEManName").val(obj[0].鑱屽憳鍚嶇О);
+            $("#HQEMan").val(obj[0].HItemID);
+        }
+
+        function GetHSecManagerValue(obj) {  //璐d换浜�
+            $("#HBadProcManName").val(obj[0].鑱屽憳鍚嶇О);
+            $("#HBadProcMan").val(obj[0].HItemID);
+        }
+
+        function GetHDeptNameValue(obj) {  //閮ㄩ棬
+            if (HDeptType == 1) {
+                $("#HDeptName").val(obj[0].閮ㄩ棬鍚嶇О);
+                $("#HDeptID").val(obj[0].HItemID);
+            } else if (HDeptType == 2) {
+                $("#HRecDeptName").val(obj[0].閮ㄩ棬鍚嶇О);
+                $("#HRecDeptID").val(obj[0].HItemID);
+            }
+        }
+
     </script>
 </body>
 </html>

--
Gitblit v1.9.1