From 9b16aefdc47a2c57df1247fbcf81052318e7ea75 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 07 十二月 2021 17:38:04 +0800
Subject: [PATCH] 工资结算单 集体

---
 WebTM/views/采购管理/采购订单/Cg_POOrderBillList.html        |    8 
 WebTM/views/采购管理/委外订单/WW_EntrustOrderBillList.html   |    8 
 WebTM/views/工资管理/工资结算单(集体)/Pay_GroupBalBillEdit.html |  642 ++++++++++++++++++++++++++++++++++-----------------------
 3 files changed, 388 insertions(+), 270 deletions(-)

diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\351\233\206\344\275\223\051/Pay_GroupBalBillEdit.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\351\233\206\344\275\223\051/Pay_GroupBalBillEdit.html"
index ddbdda5..73a3765 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\351\233\206\344\275\223\051/Pay_GroupBalBillEdit.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\351\233\206\344\275\223\051/Pay_GroupBalBillEdit.html"
@@ -1,4 +1,5 @@
-锘�<!DOCTYPE html>
+锘�
+<!DOCTYPE html>
 <html>
 <head>
     <meta charset="utf-8" />
@@ -84,7 +85,7 @@
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label">鐝粍</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" name="HGroupName" id="HGroupName" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="text" name="HGroupName" id="HGroupName" class="layui-input" readonly value="" style="float:left;width:150px;">
                                                 <input type="hidden" name="HGroupID" id="HGroupID" class="layui-input" value="" style="float:left;width:150px;">
                                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="HGroupList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
@@ -103,7 +104,7 @@
                                                 <input class="layui-input" name="HOtherSubsidy" id="HOtherSubsidy" autocomplete="off">
                                             </div>
                                         </div>
-                                        
+
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -129,134 +130,146 @@
                                             </div>
                                         </div>
                                     </div>
-                                        <div class="layui-row">
-                                            <div class="layui-col-xs4 layui-inline">
-                                                <label class="layui-form-label">婧愬崟绫诲瀷</label>
-                                                <div class="layui-input-inline">
-                                                    <select name="HSourceBillType" lay-filter="aihao" id="HSourceBillType">
-                                                        <option value="浜у搧鍏ュ簱鍗�">浜у搧鍏ュ簱鍗�</option>
-                                                        <option value="浜у搧鍏ュ簱鍗�(绾㈠崟)">浜у搧鍏ュ簱鍗�(绾㈠崟)</option>
-                                                        <option value="璋冩嫧鍗�">璋冩嫧鍗�</option>
-                                                        <option value="鐢熶骇浠诲姟鍗�">鐢熶骇浠诲姟鍗�</option>
-                                                        <option value="宸ュ簭姹囨姤鍗�">宸ュ簭姹囨姤鍗�</option>
-                                                        <option value="鐢熶骇姹囨姤鍗�">鐢熶骇姹囨姤鍗�</option>
-                                                        <option value="鎵嬪伐褰曞叆">鎵嬪伐褰曞叆</option>
-                                                    </select>
-                                                </div>
-                                            </div>
-                                            <div class="layui-col-xs4 layui-inline">
-                                                <label class="layui-form-label">閫夊崟鍙�</label>
-                                                <div class="layui-input-inline">
-                                                    <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
-                                                </div>
+                                    <!--<div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">婧愬崟绫诲瀷</label>
+                                            <div class="layui-input-inline">
+                                                <select name="HSourceBillType" lay-filter="aihao" id="HSourceBillType">
+                                                    <option value="浜у搧鍏ュ簱鍗�">浜у搧鍏ュ簱鍗�</option>
+                                                    <option value="浜у搧鍏ュ簱鍗�(绾㈠崟)">浜у搧鍏ュ簱鍗�(绾㈠崟)</option>
+                                                    <option value="璋冩嫧鍗�">璋冩嫧鍗�</option>
+                                                    <option value="鐢熶骇浠诲姟鍗�">鐢熶骇浠诲姟鍗�</option>
+                                                    <option value="宸ュ簭姹囨姤鍗�">宸ュ簭姹囨姤鍗�</option>
+                                                    <option value="鐢熶骇姹囨姤鍗�">鐢熶骇姹囨姤鍗�</option>
+                                                    <option value="鎵嬪伐褰曞叆">鎵嬪伐褰曞叆</option>
+                                                </select>
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">閫夊崟鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="Box2" id="Box2" autocomplete="off">
+                                            </div>
+                                        </div>
+                                    </div>-->
 
-                                        <div class="layui-row">
-                                            <div class="layui-col-xs4 layui-inline">
-                                                <label class="layui-form-label">宸ヨ祫绫诲瀷</label>
-                                                <div class="layui-input-inline">
-                                                    <input type="text" name="HPayTypeName" id="HPayTypeName" class="layui-input" value="" style="float:left;width:150px;">
-                                                    <input type="hidden" name="HPayID" id="HPayID" class="layui-input" value="" style="float:left;width:150px;">
-                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="PayType" style="width:40px;">
-                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-                                                    </button>
-                                                </div>
-                                            </div>
-                                            <div class="layui-col-xs4 layui-inline">
-                                                <label class="layui-form-label">鎽樿</label>
-                                                <div class="layui-input-inline">
-                                                    <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off">
-                                                </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4 layui-inline ">
+                                            <label class="layui-form-label">鎽樿</label>
+                                            <div class="layui-input-inline">
+                                                <textarea placeholder="璇疯緭鍏ユ憳瑕�" class="layui-textarea" name="HExplanation" id="HExplanation"></textarea>
                                             </div>
                                         </div>
-                                        <div class="layui-row">
-                                            <div class="layui-col-xs7 layui-inline">
-                                                <label class="layui-form-label">澶囨敞</label>
-                                                <div class="layui-input-block">
-                                                    <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
-                                                </div>
+                                        <div class=" layui-col-xs4  layui-inline">
+                                            <label class="layui-form-label">澶囨敞</label>
+                                            <div class="layui-input-inline">
+                                                <textarea placeholder="璇疯緭鍏ョ淮澶囨敞" class="layui-textarea" name="HRemark" id="HRemark"></textarea>
                                             </div>
                                         </div>
                                     </div>
                                 </div>
 
 
-                            <!--鍒跺崟淇℃伅-->
-                            <div class="layui-tab-item">
-                                <div class="layui-form-item">
-                                    <div class="layui-row">
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
-                                            <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+                                <!--鍒跺崟淇℃伅-->
+                                <div class="layui-tab-item">
+                                    <div class="layui-form-item">
+                                        <div class="layui-row">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
+                                                <div class="layui-input-block" style="margin-left: 120px;">
+                                                    <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;">瀹℃牳浜�</label>
+                                                <div class="layui-input-block" style="margin-left: 120px;">
+                                                    <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
+                                                <div class="layui-input-block" style="margin-left: 120px;">
+                                                    <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+                                                </div>
                                             </div>
                                         </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">瀹℃牳浜�</label>
-                                            <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+                                        <div class="layui-row">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
+                                                <div class="layui-input-block" style="margin-left: 120px;">
+                                                    <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;">瀹℃牳鏃ユ湡</label>
+                                                <div class="layui-input-block" style="margin-left: 120px;">
+                                                    <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
+                                                <div class="layui-input-block" style="margin-left: 120px;">
+                                                    <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
+                                                </div>
                                             </div>
                                         </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
-                                            <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <div class="layui-row">
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
-                                            <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">瀹℃牳鏃ユ湡</label>
-                                            <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
-                                            </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
-                                            <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
-                                            </div>
-                                        </div>
-                                    </div>
 
-                                    <div class="layui-row">
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
-                                            <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+                                        <div class="layui-row">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
+                                                <div class="layui-input-block" style="margin-left: 120px;">
+                                                    <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+                                                </div>
                                             </div>
-                                        </div>
-                                        <div class="layui-inline">
-                                            <label class="layui-form-label" style="width: 85px;">浣滃簾鏃ユ湡</label>
-                                            <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 85px;">浣滃簾鏃ユ湡</label>
+                                                <div class="layui-input-block" style="margin-left: 120px;">
+                                                    <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
+                                                </div>
                                             </div>
                                         </div>
                                     </div>
                                 </div>
                             </div>
                         </div>
-                    </div>
 
-                    <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 class="layui-tab layui-tab-card" lay-filter="TabTest">
+                            <ul class="layui-tab-title">
+                                <li class="layui-this">鏄庣粏淇℃伅</li>
+                                <li>姹囨�讳俊鎭�</li>
+                            </ul>
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+                                </div>
+                            </div>
                         </div>
-                    </script>
-                    <script type="text/html" id="xuhao">
-                        {{d.LAY_TABLE_INDEX+1}}
-                    </script>
+
+                        <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>
+                        <script type="text/html" id="toolbarDemo1">
+                            <div class="layui-btn-container">
+
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine1"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine1"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+
+                            </div>
+                        </script>
+                        <script type="text/html" id="xuhao">
+                            {{d.LAY_TABLE_INDEX+1}}
+                        </script>
+                        <script type="text/html" id="xuhao1">
+                            {{d.LAY_TABLE_INDEX+1}}
+                        </script>
                 </form>
             </div>
         </div>
@@ -322,14 +335,17 @@
                     , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
                     , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
                     , { field: 'HMaterCode', title: '鐗╂枡浠g爜', edit: 'text', event: 'HMaterCheck', width: 100 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', edit: 'text', width: 190 }
-                    //, { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', edit: 'text', width: 150 }
+                    , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
+                    , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true }
+                    , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', edit: 'text', width: 120, event: 'HUnitCheck' }
+                    , { field: 'HUnitName', title: '璁¢噺鍗曚綅鍚嶇О', edit: 'text', width: 120 }
                     , { field: 'HProcID', title: 'HProcID', edit: 'text', width: 100, hide: true }
                     , { field: 'HProcNumber', title: '宸ュ簭浠g爜', edit: 'text', event: "HProcCheck", width: 100 }
                     , { field: 'HProcName', title: '宸ュ簭鍚嶇О', edit: 'text', width: 100 }
-                    //, { field: 'HEmpID', title: 'HEmpID', edit: 'text', width: 100, hide: true }
-                    //, { field: 'HEmpNumber', title: '鑱屽憳浠g爜', edit: 'text', event: 'HEmpCheck', width: 150 }
-                    //, { field: 'HEmpName', title: '鑱屽憳鍚嶇О', edit: 'text', width: 100 }
+                    , { field: 'HSourceID', title: 'HSourceID', edit: 'text', width: 100, hide: true }
+                    , { field: 'HSourceNumber', title: '璧勬簮浠g爜', edit: 'text', event: "HSourceCheck", width: 100 }
+                    , { field: 'HSourceName', title: '璧勬簮鍚嶇О', edit: 'text', width: 100 }
                     , { field: 'HTimes', title: '宸ユ椂', edit: 'text', width: 100 }
                     , { field: 'HQty', title: '鏁伴噺', edit: 'text', width: 100 }
                     , { field: 'HPrice', title: '宸ヤ环', edit: 'text', width: 100 }
@@ -348,6 +364,31 @@
                 ]]
                 , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
             };
+
+            var option1 = {
+                elem: '#mainTable1'
+                , toolbar: '#toolbarDemo1'
+                , height: 500
+                //,url: '/demo/table/user/' //鏁版嵁鎺ュ彛
+                , page: true //寮�鍚垎椤�
+                , cols: [[ //琛ㄥご
+                    { type: 'checkbox', fixed: 'left' }
+                    , { field: 'HEmpID', title: 'HEmpID', edit: 'text', width: 100, hide: true }
+                    , { field: 'HEmpNumber', title: '鑱屽憳浠g爜', edit: 'text', event: 'HEmpCheck', width: 100 }
+                    , { field: 'HEmpName', title: '鑱屽憳鍚嶇О', edit: 'text', width: 100 }
+                    , { field: 'HEmpRate', title: '鑱屽憳绯绘暟', edit: 'text', width: 100 }
+                    , { field: 'HBaseTimes', title: '鍩烘湰宸ユ椂', edit: 'text', width: 100 }
+                    , { field: 'HMoney', title: '璁′欢宸ヨ祫', edit: 'text', width: 100 }
+                    , { field: 'HOtherSubsidy', title: '鍏朵粬琛ヨ创', edit: 'text', width: 100 }
+                    , { field: 'HOtherSubsidy', title: '鍏朵粬鎵f', edit: 'text', width: 100 }
+                    , { field: 'HYF', title: '搴斾粯宸ヨ祫', edit: 'text', width: 100 }
+                    , { field: 'HISZF', title: '鏄惁鏀粯', edit: 'text', width: 100 }
+                    , { field: 'HISFT', title: '鏄惁鍒嗘憡', edit: 'text', width: 100 }
+                    , { field: 'HRemark', title: '澶囨敞', edit: 'text', width: 100 }
+                ]]
+                , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+            };
+
             //鍒ゆ柇鏄惁鏂板
             if (OperationType == 1) {
                 $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
@@ -360,11 +401,14 @@
                 $("#HDeleteDate").val(Format(new Date(), "yyyy-MM-dd"));
                 //鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                 option.data = [{
-                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcID": "", "HProcNumber": "", "HProcName": ""
+                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": "0", "HUnitNumber": "", "HUnitName": "", "HProcID": "0", "HProcNumber": "", "HProcName": "", "HSourceID": "0", "HSourceNumber": "", "HSourceName": ""
                     , "HTimes": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HSumMoney": 0, "HOtherSubsidy": 0, "HOtherDeduct": 0, "HPayMoney": 0
                     , "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0, "HSourceBillType": "", "HCloseDate": 0, "HRemark": ""
                 }];
                 table.render(option);
+                option1.data = [{ "HEmpID": 0, "HEmpNumber": "", "HEmpName": "", "HEmpRate": 0, "HBaseTimes": "0", "HMoney": "0", "HOtherSubsidy": "0 ", "HOtherSubsidy": "0", "HYF": "0", "HISZF": "0", "HISFT": "0", "HRemark": "" }];
+                table.render(option1);
+
             }
             else {
                 $("#HInterID").val(hID);//淇敼鏃朵富琛↖D
@@ -374,11 +418,11 @@
                     type: "GET",
                     data: { "sqlWhere": "and hmainid=" + hID },
                     success: function (result) {
-                        //console.log(result);
-                        //console.log('gouba' + result);
                         if (result.count == 1) {
-                            option.data = result.data;
+                            option.data = result.list[0];
                             table.render(option);
+                            option1.data = result.list[1];
+                            table.render(option1);
 
                         } else {
                             layer.alert(result.code + result.Message, { icon: 5 });
@@ -390,47 +434,100 @@
                 });
 
             }
-
-
-            //澶村伐鍏锋爮浜嬩欢
-            var rowid = 0;
-            var rows = 0;
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+            // 澶村伐鍏锋爮浜嬩欢
             table.on('toolbar(mainTable)', function (obj) {
+                var rowid = 0;
                 var checkStatus = table.checkStatus('mainTable')
                     , data = checkStatus.data;;
                 var AddRow = table.cache['mainTable'];
                 var NewRow = {
-                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HProcID": "", "HProcNumber": "", "HProcName": ""
+                    "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": "0", "HUnitNumber": "", "HUnitName": "", "HProcID": "0", "HProcNumber": "", "HProcName": "", "HSourceID": "0", "HSourceNumber": "", "HSourceName": ""
                     , "HTimes": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HSumMoney": 0, "HOtherSubsidy": 0, "HOtherDeduct": 0, "HPayMoney": 0
-                    , "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0, "HSourceBillType": "", "HCloseDate": 0, "HRemark": "" };
+                    , "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0, "HSourceBillType": "", "HCloseDate": 0, "HRemark": ""
+                };
                 switch (obj.event) {
-                    case 'btn-AddLine':
-                        //table.cache["mainTable"].push(AddRow[rows]);
-                        table.cache["mainTable"].push(NewRow);
-                        option.data = table.cache["mainTable"];
-                        table.render(option);
-                        rows++;
-                        //layer.msg('澧炲姞涓�琛屾寜閽紒')
+                    //鏂板涓�琛�
+                    case 'btn-AddLine': btnAddLine(NewRow);
                         break;
-                    case 'btn-CopyLine':
-                        var copydata = JSON.stringify(data);
-                        if (data.length <= 0) {
-                            layer.alert("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
-                        }
-                        else if (data.length > 1) {
-                            layer.alert("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
-                        }
-                        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);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
-                            //layer.alert(copyrow);
-                        }
+                    //澶嶅埗涓�琛�
+                    case 'btn-CopyLine': btnCopyLine(data);
                         break;
                 }
             });
+
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable1)', function (obj) {
+                var checkStatus = table.checkStatus('mainTable1')
+                    , data = checkStatus.data;
+                var NewRow = { "HEmpID": 0, "HEmpNumber": "", "HEmpName": "", "HEmpRate": 0, "HBaseTimes": "0", "HMoney": "0", "HOtherSubsidy": "0 ", "HOtherSubsidy": "0", "HYF": "0", "HISZF": "0", "HISFT": "0", "HRemark": "" };
+                switch (obj.event) {
+                    //鏂板涓�琛�
+                    case 'btn-AddLine1': btnAddLine1(NewRow);
+                        break;
+                    //澶嶅埗涓�琛�
+                    case 'btn-CopyLine1': btnCopyLine1(data);
+                        break;
+                }
+            });
+            //澧炲姞涓�琛�
+            function btnAddLine(NewRow) {
+                var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+                buttonArr = [];//娓呯┖鏁扮粍
+                for (var i = 0; i < tableBak.length; i++) {
+                    buttonArr.push(tableBak[i]);  //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+                }
+                buttonArr.push(NewRow);  //鍦ㄥ熬閮ㄥ姞涓�琛�
+                table.reload("mainTable", {
+                    data: buttonArr    //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+                })
+            }
+            //澧炲姞涓�琛�
+            function btnAddLine1(NewRow) {
+                var tableBak = table.cache["mainTable1"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+                buttonArr = [];//娓呯┖鏁扮粍
+                for (var i = 0; i < tableBak.length; i++) {
+                    buttonArr.push(tableBak[i]);  //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+                }
+                buttonArr.push(NewRow);  //鍦ㄥ熬閮ㄥ姞涓�琛�
+                table.reload("mainTable1", {
+                    data: buttonArr    //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+                })
+            }
+            //澶嶅埗涓�琛�
+            function btnCopyLine(data) {
+                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);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                }
+            }
+            //澶嶅埗涓�琛�
+            function btnCopyLine1(data) {
+                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["mainTable1"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                    option1.data = table.cache["mainTable1"];//灏嗘暟鎹粦瀹氬埌data涓�
+                    table.render(option1);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                }
+            }
             //琛屽唴浜嬩欢
             table.on('tool(mainTable)', function (obj) {
                 var data = obj.data;
@@ -471,7 +568,7 @@
                                     var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
                                     if (checkStatus.data.length === 0) {
                                         return layer.msg('璇烽�夋嫨鏁版嵁');
-                                      }
+                                    }
 
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
@@ -516,7 +613,46 @@
                                 }
                             });
                         }
+                        if (obj.event === 'HUnitCheck')  //璁¢噺鍗曚綅浠g爜
+                        {
+                            //椤甸潰灞�-鑷畾涔�
+                            layer.open({
+                                type: 2,
+                                skin: 'layui-layer-rim', //鍔犱笂杈规
+                                title: '璁¢噺鍗曚綅鍒楄〃',
+                                closeBtn: 1,
+                                shift: 2,
+                                area: ['80%', '80%'],
+                                maxmin: true,
+                                content: ['../../PublicPage/UnitInformation.html', '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('璇烽�夋嫨鏁版嵁');
+                                    }
+
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HUnitID: checkStatus.data[0].HItemID,
+                                        HUnitNumber: checkStatus.data[0].HNumber,
+                                        HUnitName: checkStatus.data[0].HName,
+                                    });
+
+                                    layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                                , btn2: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                                },
+                                end: function () {
+
+                                }
+                            });
+                        }
                         if (obj.event == 'HProcCheck') {
                             layer.open({
                                 type: 2,
@@ -584,20 +720,18 @@
                                 content: ['../../PublicPage/SourceInformation.html', 'yes'],
                                 btn: ['纭畾', '鍙栨秷']
                                 , btn1: function (index, layero) {
-
                                     //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                                     var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
                                     if (checkStatus.data.length === 0) {
                                         return layer.msg('璇烽�夋嫨鏁版嵁');
                                     }
-
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
                                         HSourceID: checkStatus.data[0].HItemID,
+                                        HSourceNumber: checkStatus.data[0].HNumber,
                                         HSourceName: checkStatus.data[0].HName,
                                     });
-
                                     layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                                 }
                                 , btn2: function (index, layero) {
@@ -648,7 +782,74 @@
                     }
                 })
             });
+            //琛屽唴浜嬩欢
+            table.on('tool(mainTable1)', function (obj) {
+                set_GridDelete1(obj);   //琛屽唴鍒犻櫎
+                set_GridCellCheck1(obj); //琛屽唴蹇嵎閿瓫閫�
+            });
 
+
+            // 琛ㄦ牸琛屽唴浜嬩欢鍒犻櫎
+            function set_GridDelete1(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 {
+                            //obj.del();
+                            //layer.close(index);
+                            var oldData = table.cache["mainTable1"];
+                            oldData.splice(obj.tr.data('index'), 1);
+                            table.reload('mainTable1', { data: oldData });
+                            layer.close(index);
+                        }
+                    });
+                }
+            }
+            //琛ㄦ牸琛屽唴浜嬩欢蹇嵎閿瓫閫�
+            function set_GridCellCheck1(obj) {
+                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                    if (event.key == "F7") {
+                        if (obj.event === 'HEmpCheck') {//鑱屽憳
+                            layer.open({
+                                type: 2,
+                                skin: 'layui-layer-rim', //鍔犱笂杈规
+                                title: '鑱屽憳鍒楄〃',
+                                closeBtn: 1,
+                                shift: 2,
+                                area: ['90%', '90%'],
+                                maxmin: true,
+                                content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html', 'yes'],
+                                btn: ['纭畾', '鍙栨秷']
+                                , btn1: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                    var iframeWindow = window['layui-layer-iframe' + index];
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');
+                                    if (checkStatus.data.length === 0) {
+                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                    }
+                                    obj.update({
+                                        HEmpName: checkStatus.data[0].HName
+                                        , HEmpID: checkStatus.data[0].HItemID
+                                        , HEmpNumber: checkStatus.data[0].HNumber
+                                    });
+                                    layer.close(layer.index);
+                                }
+                                , btn2: function (index, layero) {
+                                },
+                                end: function () {
+
+                                }
+                            });
+                        }
+                        obj.event = "";
+                        return false;
+                    }
+                })
+            }
             //鐩戝惉鍗曞厓鏍肩紪杈�
             table.on('edit(mainTable)', function (obj) {
                 // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
@@ -747,7 +948,7 @@
                                 , "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
                                 , "HGroupID": data.HGroupID                    //鐝粍ID
                                 , "HGroupName": data.鐝粍                 //鐝粍鍚嶇О
-                                , "HSumMoney": data.璁′欢宸ヨ祫                   
+                                , "HSumMoney": data.璁′欢宸ヨ祫
                                 , "HOtherSubsidy": data.鍏朵粬琛ヨ创
                                 , "HPayMoney": data.搴旀敮浠樺伐璧�
                                 , "HOtherSubsidy": data.鍏朵粬鎵f
@@ -800,7 +1001,7 @@
                         //console.log(d.data);
                         $("#HBillNo").val(d.data[0].HBillNo);
                         $("#HDate").val(shijian);
-                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HInterID").val("0");
                     }
                 });
             }
@@ -971,18 +1172,6 @@
                     Pub_Close(2);
                 }
             });
-
-
-
-
-
-
-            //form.on('submit(Cancel)', function () {
-            //    //sessionStorage["SourceFlag"] = false;
-            //    parent.location.href = "../../../views/index.html"
-            //    //window.close();//鍏抽棴褰撳墠椤�
-            //})
-
             function formatDate(date) {
                 var d = new Date(date),
                     month = '' + (d.getMonth() + 1),
@@ -1025,48 +1214,6 @@
                     }
                 });
             });
-            //form.on('submit(Saver)', function (data) {//淇濆瓨
-            //    //debugger;
-            //    data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
-            //    var sMainStr = JSON.stringify(data.field);
-            //    var sSubStr = JSON.stringify(table.cache['mainTable']);
-            //    var sMainSub = sMainStr + ';' + sSubStr;
-
-
-            //    $.ajax(
-            //        {
-            //            type: "POST",
-            //            url: GetWEBURL() + "/Sc_MouldProdBackBill/SaveGetMouldProdBackBillList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-            //            async: true,
-            //            data: { "msg": sMainSub },
-            //            dataType: "json",
-            //            success: function (data) {
-            //                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-            //                    layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
-            //                        $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
-            //                        var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
-            //                        parent.layer.close(index); //鍐嶆墽琛屽叧闂� 聽 聽 聽 聽 聽聽 聽聽聽 聽
-            //                    });
-            //                }
-            //                else {
-
-            //                    f_alert(data.Message);
-            //                    console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
-            //                }
-            //                layer.closeAll("loading");
-            //            },
-            //            error: function (err) {
-
-            //                f_alert("閿欒:" + err);
-            //                console.log("Reason" + sMainStr);
-            //            }
-            //        });
-            //});
-            //function f_alert(sMsg) {
-            //    layer.alert(sMsg, { icon: 5 });
-
-            //}
-
             //鐩戝惉鎻愪氦
             form.verify({
                 numberOrEmpty: function (value, item) {
@@ -1074,11 +1221,8 @@
                     if (!/^\d+$/.test(value)) {
                         return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
                     }
-                    //}
                 }
             });
-
-
         });
         //瀹氫箟鍏ㄥ眬鍙橀噺
         var HReasonName, ReasonID, EmpName, SQProcName,
@@ -1118,79 +1262,53 @@
             // $("#HEmpName").val(obj[0].HName);
             //$("#HItemID").val(obj[0].HItemID);
         }
-        //function GetHProcValue(obj) {  //杩斿洖鐢宠宸ュ簭
-        //    SQProcName = obj[0].宸ュ簭;
-        //    ProcID = obj[0].HItemID;
-        //    //$("#HSQProcName").val(obj[0].宸ュ簭);
-        //    //$("#HProcID").val(obj[0].HItemID);
-        //}
         function GetHZRValue(obj) {   //杩斿洖璐d换宸ュ簭
             ZRProcName = obj[0].宸ュ簭;
             //$("#HZRProcName").val(obj[0].宸ュ簭);
             //$("#HItemID").val(obj[0].HItemID);
         }
-        //HWorker
         function GetHWorkerValue(obj) {  //杩斿洖涓嶈壇纭浜�
             QRName = obj[0].HName;
-            //$("#HQRName").val(obj[0].HName);
-            //$("#HItemID").val(obj[0].HItemID);
         }
         function AllowLoadData(sSubStr) {  //闈炵┖楠岃瘉
-            //if ($("#HSourceBillNo").val() == '') {
-            //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
-            //    return false;
-            //}
-            if ($("#HDeptName").val() == '') {
+            var Result = true;
+            if ($("#HGroupID").val() == '') {
+                layer.msg("鐝粍娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return Result = false;
+            }
+            if ($("#HDeptID").val() == '') {
                 layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                return false;
-            }
-            if ($("#HSecManager").val() == '') {
-                layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                return false;
-            }
-            if ($("#HKeeper").val() == '') {
-                layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                return false;
-            }
-            //if ($("#HWHNAME").val() == '') {
-            //    layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
-            //    return false;
-            //}
-            if ($("#HBillNo").val() == '') {
-                layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                return false;
-            }
-            if ($("#HInterID").val() == '') {
-                layer.msg("閿欒鐨勫唴鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                return false;
+                return Result = false;
             }
             if (typeof (sSubStr) == "undefined") {
                 layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                return false;
+                return Result = false;
             }
-            if (!typeof (sSubStr) == "undefined") {
-                //for (var i = 0; i <= sSubStr.length - 1; i++) {  //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
-                //    if (parseFloat(sSubStr[i].HQtyMust) > 0) {
-                //        if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
-                //        {
-                //            layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
-                //            return false;
-                //        }
-                //    }
-                //}
+            if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
+                sSubStr = JSON.parse(sSubStr);
                 for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
-                    if (parseFloat(sSubStr[i].HQty) > 0) {
-                        s = 1;
+                    if (sSubStr[i].HMaterID == "") {
+                        layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,鐗╂枡淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        return Result = false;
                     }
-                }
-                if (s == 0) {
-                    layer.msg("浜у搧鍏ュ簱璁板綍鏈壂鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                    return false;
+                    if (sSubStr[i].HUnitID == "") {
+                        layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璁¢噺鍗曚綅淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        return Result = false;
+                    }
+                    if (sSubStr[i].HProcID == "") {
+                        layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,宸ュ簭淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        return Result = false;
+                    }
+                    if (sSubStr[i].HSourceID == "") {
+                        layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璧勬簮淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        return Result = false;
+                    }
                 }
             }
             else {
-                return true;
+                return Result;
             }
+            return Result;
         }</script>
 </body>
 </html>
\ No newline at end of file
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\247\224\345\244\226\350\256\242\345\215\225/WW_EntrustOrderBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\247\224\345\244\226\350\256\242\345\215\225/WW_EntrustOrderBillList.html"
index 02d2649..9ba6deb 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\247\224\345\244\226\350\256\242\345\215\225/WW_EntrustOrderBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\247\224\345\244\226\350\256\242\345\215\225/WW_EntrustOrderBillList.html"
@@ -945,7 +945,7 @@
                 var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
                 var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
                 var HBillNo = $("#HBillNo").val(); //鍗曟嵁鍙�
-                var HEmpID = $("#HEmpID").val();
+                var HEmpName = $("#HEmpName").val();
                 var HMaterNumber = $("#HMaterNumber").val();
                 var HMaterName = $("#HMaterName").val();
                 var HXTStatus = $("select[name='HXTStatus']").val();
@@ -983,8 +983,8 @@
                 if (HMaterName) {
                     sWhere += " and 鐗╂枡鍚嶇О like '%" + HMaterName + "%'";
                 }
-                if (HEmpID) {
-                    sWhere += " and 涓氬姟鍛� like '%" + HEmpID + "%'";
+                if (HEmpName) {
+                    sWhere += " and 涓氬姟鍛� like '%" + HEmpName + "%'";
                 }
                 if (HXTStatus) {
                     sWhere += " and 渚涘簲鍟嗗崗鍚岀姸鎬� like '%" + HXTStatus + "%'";
@@ -1005,7 +1005,7 @@
                 $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                 $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                 $("#HBillNo").val("");
-                $("#HEmpID").val("");
+                $("#HEmpName").val("");
                 $("#HMaterNumber").val("");
                 $("#HMaterName").val("");
                 sWhere = "";
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
index 6b61a7a..7b3a515 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
@@ -939,7 +939,7 @@
                 var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
                 var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
                 var HBillNo = $("#HBillNo").val(); //鍗曟嵁鍙�
-                var HEmpID = $("#HEmpID").val();
+                var HEmpName = $("#HEmpName").val();
                 var HMaterNumber = $("#HMaterNumber").val();
                 var HMaterName = $("#HMaterName").val();
                 var HXTStatus = $("select[name='HXTStatus']").val();
@@ -977,8 +977,8 @@
                 if (HMaterName) {
                     sWhere += " and 鐗╂枡鍚嶇О like '%" + HMaterName + "%'";
                 }
-                if (HEmpID) {
-                    sWhere += " and 涓氬姟鍛� like '%" + HEmpID + "%'";
+                if (HEmpName) {
+                    sWhere += " and 涓氬姟鍛� like '%" + HEmpName + "%'";
                 }
                 if (HXTStatus) {
                     sWhere += " and 渚涘簲鍟嗗崗鍚岀姸鎬� like '%" + HXTStatus + "%'";
@@ -999,7 +999,7 @@
                 $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                 $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                 $("#HBillNo").val("");
-                $("#HEmpID").val("");
+                $("#HEmpName").val("");
                 $("#HMaterNumber").val("");
                 $("#HMaterName").val("");
                 sWhere = "";

--
Gitblit v1.9.1