From 8a36bbee40f5e1069b15a98b1e64ac9719ee8a46 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 23 四月 2024 17:17:13 +0800
Subject: [PATCH] 1.销售出库单 增加 反写源单 销售订单和发货通知单   超出 关联数量  关闭源单 2.应收单 增加  反写源单 销售出库单 和 销售订单  超出关联数量  关闭源单 3.动态获取源单增加参数 Num 0蓝单   1红单  2全部 4.销售流程的测试并完善功能; 销售订单-》发货通知单-》销售出库单-》应收单 (注意: 源单类型的下拉框 需要 根据数据库 表动态加载, 关联数量 要准确 , 审核 且 未关闭 未行关闭的行 才能下推 ,关联数量超额后,要 反写 关闭 源单 )

---
 WebTM/views/生产管理/生产汇报单/Sc_Add_ICMOReportBillList.html |  179 ++++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 126 insertions(+), 53 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
index a8ee9af..07bc876 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\261\207\346\212\245\345\215\225/Sc_Add_ICMOReportBillList.html"
@@ -13,6 +13,7 @@
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/PageTitle.js"></script>
     <style type="text/css">
         /*begin 姝ゆ牱寮忕敤浜庢秷闄よ鍏冪礌涓竷灞�瀹藉害涓嶅鐨勯棶棰�*/
         .layui-form-item .layui-inline {
@@ -41,7 +42,7 @@
                             <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
                         </div>
                     </div>
-
+                    <h1 style="text-align:center;"><b>鐢熶骇姹囨姤鍗�</b></h1>
                     <div class="layui-tab" lay-filter="tab-POStockInBill">
                         <ul class="layui-tab-title" lay-filter="tab-all">
                             <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
@@ -83,7 +84,7 @@
                                             <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="hidden" name="HGroupID" id="HGroupID" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HGroupID" id="HGroupID" class="layui-input" value="0" 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>
                                                 </button>
@@ -93,7 +94,7 @@
                                             <label class="layui-form-label">缁熻鍛�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;">
-                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="" style="float:left;width:150px;">
+                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
                                                 <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
                                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                 </button>
@@ -242,7 +243,7 @@
                                 <table class="layui-hide" id="mainTable_prodReport" lay-filter="mainTable_prodReport"></table>
                             </div>
                         </div>
-                    </div>                                       
+                    </div>
                     <script type="text/html" id="toolbarDemo">
                         <div class="layui-btn-container">
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine" id="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
@@ -262,6 +263,7 @@
         <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
     </script>
     <script>
+        var OptionData = [];
         //#region 鎶樺彔娉ㄩ噴
         //#endregion
         layui.config({
@@ -292,6 +294,13 @@
 
 
             //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+            //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+            var HModuleType = "3711";
+            //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+            var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+            $("h1").html('<b>' + HPageTitle + '</b>');
+            //#endregion
 
             //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             get_LoginIs();
@@ -357,9 +366,9 @@
                     "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                     "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                     "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
-                    "HSourceBillType":0
+                    "HSourceBillType": 0
                 };
-              
+
                 switch (obj.event) {
                     //鏂板涓�琛�
                     case 'btn-AddLine': btnAddLine(NewRow);
@@ -395,7 +404,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../PublicPage/GroupInformation.html', 'yes'],
+                    content: ['../../鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_Group.html?type=HGroup', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -405,7 +414,7 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                        $("#HGroupName").val(checkStatus.data[0].HName);
+                        $("#HGroupName").val(checkStatus.data[0].鐝粍鍚嶇О);
                         $("#HGroupID").val(checkStatus.data[0].HItemID);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -445,7 +454,7 @@
                             "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                             "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                             "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
-                            "HSourceBillType": 0
+                            "HSourceBillType": 0, "HICMOTempID": 0
                         }];
                         table.render(option);
                         //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -476,7 +485,7 @@
                                     table.cache["mainTable"].push({
                                         "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                                         "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0, "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
-                                        "HSourceBillType": 0
+                                        "HSourceBillType": 0, "HICMOTempID": 0
                                     });
                                     option.data = table.cache["mainTable"];
                                     table.render(option);
@@ -710,7 +719,7 @@
                                 shift: 2,
                                 area: ['90%', '90%'],
                                 maxmin: true,
-                                content: ['../../PublicPage/PartInformation.html', 'yes'],
+                                content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes'],
                                 btn: ['纭畾', '鍙栨秷']
                                 , btn1: function (index, layero) {
                                     //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -722,17 +731,26 @@
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
                                         HMaterID: checkStatus.data[0].HItemID,
-                                        HMaterCode: checkStatus.data[0].HNumber,
-                                        HMaterName: checkStatus.data[0].HName,
-                                        HMaterSpec: checkStatus.data[0].HModel,
+                                        HMaterCode: checkStatus.data[0].鐗╂枡浠g爜,
+                                        HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О,
+                                        HMaterSpec: checkStatus.data[0].瑙勬牸鍨嬪彿,
                                     });
                                     layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                                 }
                                 , btn2: function (index, layero) {
                                     //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
                                     //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                                },
-                                end: function () {
+                                }, end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            HMaterID: OptionData[0].HItemID,
+                                            HMaterCode: OptionData[0].鐗╂枡浠g爜,
+                                            HMaterName: OptionData[0].鐗╂枡鍚嶇О,
+                                            HMaterSpec: OptionData[0].瑙勬牸鍨嬪彿,
+                                        });
+                                        OptionData = [];
+                                    }
                                 }
                             });
                         }
@@ -748,7 +766,7 @@
                                 shift: 2,
                                 area: ['90%', '90%'],
                                 maxmin: true,
-                                content: ['../../PublicPage/UnitInformation.html', 'yes'],
+                                content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Unit.html', 'yes'],
                                 btn: ['纭畾', '鍙栨秷']
                                 , btn1: function (index, layero) {
 
@@ -762,8 +780,8 @@
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
                                         HUnitID: checkStatus.data[0].HItemID,
-                                        HUnitCode: checkStatus.data[0].HNumber,
-                                        HUnitName: checkStatus.data[0].HName
+                                        HUnitCode: checkStatus.data[0].璁¢噺鍗曚綅浠g爜,
+                                        HUnitName: checkStatus.data[0].璁¢噺鍗曚綅鍚嶇О
                                     });
 
                                     layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -771,9 +789,16 @@
                                 , btn2: function (index, layero) {
                                     //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
                                     //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                                },
-                                end: function () {
-
+                                }, end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            HUnitID: OptionData[0].HItemID,
+                                            HUnitCode: OptionData[0].璁¢噺鍗曚綅浠g爜,
+                                            HUnitName: OptionData[0].璁¢噺鍗曚綅鍚嶇О
+                                        });
+                                        OptionData = [];
+                                    }
                                 }
                             });
                         }
@@ -789,7 +814,7 @@
                                 shift: 2,
                                 area: ['90%', '90%'],
                                 maxmin: true,
-                                content: ['../../PublicPage/SourceInformation.html', 'yes'],
+                                content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html', 'yes'],
                                 btn: ['纭畾', '鍙栨秷']
                                 , btn1: function (index, layero) {
 
@@ -803,8 +828,8 @@
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
                                         HSourceID: checkStatus.data[0].HItemID,
-                                        HSourceCode: checkStatus.data[0].HNumber,
-                                        HSourceName: checkStatus.data[0].HName
+                                        HSourceCode: checkStatus.data[0].鐢熶骇璧勬簮浠g爜,
+                                        HSourceName: checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О
                                     });
 
                                     layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -812,9 +837,16 @@
                                 , btn2: function (index, layero) {
                                     //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
                                     //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                                },
-                                end: function () {
-
+                                }, end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            HSourceID: OptionData[0].HItemID,
+                                            HSourceCode: OptionData[0].鐢熶骇璧勬簮浠g爜,
+                                            HSourceName: OptionData[0].鐢熶骇璧勬簮鍚嶇О
+                                        });
+                                        OptionData = [];
+                                    }
                                 }
                             });
                         }
@@ -830,7 +862,7 @@
                                 shift: 2,
                                 area: ['90%', '90%'],
                                 maxmin: true,
-                                content: ['../../PublicPage/UserInformation.html', 'yes'],
+                                content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HManager', 'yes'],
                                 btn: ['纭畾', '鍙栨秷']
                                 , btn1: function (index, layero) {
 
@@ -844,8 +876,8 @@
                                     //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                                     obj.update({
                                         HWorkerid: checkStatus.data[0].HItemID,
-                                        HWorkerCode: checkStatus.data[0].HNumber,
-                                        HWorkerName: checkStatus.data[0].HName
+                                        HWorkerCode: checkStatus.data[0].鑱屽憳浠g爜,
+                                        HWorkerName: checkStatus.data[0].鑱屽憳鍚嶇О
                                     });
 
                                     layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -853,9 +885,16 @@
                                 , btn2: function (index, layero) {
                                     //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
                                     //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                                },
-                                end: function () {
-
+                                }, end: function () {
+                                    if (OptionData.length > 0) {
+                                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                                        obj.update({
+                                            HWorkerid: OptionData[0].HItemID,
+                                            HWorkerCode: OptionData[0].鑱屽憳浠g爜,
+                                            HWorkerName: OptionData[0].鑱屽憳鍚嶇О
+                                        });
+                                        OptionData = [];
+                                    }
                                 }
                             });
                         }
@@ -885,16 +924,17 @@
                     , { field: 'HWorkerid', title: 'HWorkerid', edit: 'text', width: 100, hide: true }
                     , { field: 'HWorkerCode', title: '鎿嶄綔鍛樹唬鐮�', edit: 'text', event: 'HWorkerCode', width: 100 }
                     , { field: 'HWorkerName', title: '鎿嶄綔鍛樺悕绉�', edit: 'text', width: 100 }
-                    , { field: 'HQty', title: '鐢熶骇鏁伴噺', edit: 'text', width: 100 }
-                    , { field: 'HBadQty', title: '涓嶈壇鏁伴噺', edit: 'text', width: 100 }
+                    , { field: 'HQty', title: '鐢熶骇鏁伴噺', edit: 'text', width: 100, totalRow: true }
+                    , { field: 'HBadQty', title: '涓嶈壇鏁伴噺', edit: 'text', width: 100, totalRow: true }
                     , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟', edit: 'text', width: 100 }
                     , { field: 'HICMOInterID', title: '鐢熶骇璁㈠崟鍐呯爜', edit: 'text', width: 100, hide: true }
                     , { field: 'HICMOEntryID', title: '鐢熶骇璁㈠崟瀛愬唴鐮�', edit: 'text', width: 100, hide: true }
 
-                    , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', edit: 'text', width: 100, hide: true  }
+                    , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', edit: 'text', width: 100, hide: true }
                     , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', edit: 'text', width: 100, hide: true }
                     , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', edit: 'text', width: 100, hide: true }
                     , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', edit: 'text', width: 100, hide: true }
+                    , { field: 'HICMOTempID', title: 'HICMOTempID', edit: 'text', width: 100, hide: true }
 
                     , { field: 'HRemark', title: '琛ㄤ綋澶囨敞', edit: 'text', width: 100 }
                     , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 150 }
@@ -905,6 +945,7 @@
                     , toolbar: '#toolbarDemo'
                     , page: false
                     , cellMinWidth: 120
+                    , totalRow: true
                     , height: 500
                     , cols: [columns]
                     , done: function (res, curr, count) {
@@ -925,8 +966,8 @@
                     , { field: 'HWorkerid', title: 'HWorkerid', edit: 'text', width: 100, hide: true }
                     , { field: 'HWorkerCode', title: '鎿嶄綔鍛樹唬鐮�', edit: 'text', event: 'HWorkerCode', width: 100 }
                     , { field: 'HWorkerName', title: '鎿嶄綔鍛樺悕绉�', edit: 'text', width: 100 }
-                    , { field: 'HQty', title: '鐢熶骇鏁伴噺', edit: 'text', width: 100 }
-                    , { field: 'HBadQty', title: '涓嶈壇鏁伴噺', edit: 'text', width: 100 }
+                    , { field: 'HQty', title: '鐢熶骇鏁伴噺', edit: 'text', width: 100, totalRow: true }
+                    , { field: 'HBadQty', title: '涓嶈壇鏁伴噺', edit: 'text', width: 100, totalRow: true }
                     , { field: 'HICMOBillNo', title: '鐢熶骇璁㈠崟', edit: 'text', width: 100 }
                     , { field: 'HRemark', title: '琛ㄤ綋澶囨敞', edit: 'text', width: 100 }
                     , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 150 }
@@ -935,6 +976,7 @@
                     id: 'mainTable_prodReport'
                     , elem: '#mainTable_prodReport'
                     , page: true
+                    , totalRow: true
                     , limit: 1000
                     , limits: [500, 1000, 1500, 2000, 3000]
                     , cellMinWidth: 120
@@ -987,7 +1029,7 @@
                     "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                     "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                     "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
-                    "HSourceBillType": 0
+                    "HSourceBillType": 0, "HICMOTempID": 0
                 }];
                 table.render(option);
             }
@@ -1016,11 +1058,11 @@
                                 for (let i = 0; i < data.length; i++) {
                                     arr.push({
                                         "HMaterID": data[i].鐗╂枡ID, "HMaterCode": data[i].鐗╂枡浠g爜, "HMaterName": data[i].鐗╂枡鍚嶇О, "HMaterSpec": data[i].瑙勬牸鍨嬪彿,
-                                        "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HSourceID": data[i].鐢熶骇璧勬簮ID, "HSourceCode": data[i].鐢熶骇璧勬簮浠g爜,
+                                        "HUnitID": data[i].鍗曚綅ID, "HUnitCode": data[i].璁¢噺鍗曚綅浠g爜, "HUnitName": data[i].璁¢噺鍗曚綅, "HSourceID": data[i].鐢熶骇璧勬簮ID, "HSourceCode": data[i].鐢熶骇璧勬簮浠g爜,
                                         "HSourceName": data[i].鐢熶骇璧勬簮鍚嶇О, "HWorkerid": data[i].鎿嶄綔鍛業D, "HWorkerCode": data[i].鎿嶄綔鍛樹唬鐮�,
                                         "HWorkerName": data[i].鎿嶄綔鍛樺悕绉�, "HQty": data[i].浜ч噺, "HBadQty": data[i].涓嶈壇鏁伴噺 == '' ? 0 : data[i].涓嶈壇鏁伴噺, "HICMOBillNo": data[i].鐢熶骇璁㈠崟鍙�,
                                         "HICMOInterID": data[i].HICMOInterID, "HICMOEntryID": data[i].HICMOEntryID, "HRemark": "", "HSourceInterID": data[i].HICMOInterID, "HSourceEntryID": data[i].HICMOEntryID, "HSourceBillNo": data[i].鐢熶骇璁㈠崟鍙�,
-                                        "HSourceBillType": 3710
+                                        "HSourceBillType": 3710, "HICMOTempID": data[i].HICMOTempID
                                     });
                                 }
 
@@ -1052,7 +1094,7 @@
                         "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                         "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                         "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
-                        "HSourceBillType": 0
+                        "HSourceBillType": 0, "HICMOTempID": 0
                     }];
                     table.render(option);
                 }
@@ -1068,7 +1110,7 @@
                     "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "",
                     "HSourceID": 0, "HSourceCode": "", "HSourceName": "", "HWorkerid": 0, "HWorkerCode": "", "HWorkerName": "", "HQty": 0, "HBadQty": 0,
                     "HICMOBillNo": "", "HICMOInterID": "0", "HICMOEntryID": "0", "HRemark": "", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "",
-                    "HSourceBillType": 0
+                    "HSourceBillType": 0, "HICMOTempID": 0
                 }];
                 table.render(option);
             }
@@ -1194,15 +1236,15 @@
             //#region 闈炵┖楠岃瘉
             function AllowLoadData(sSubStr) {  //闈炵┖楠岃瘉
                 var Result = true;
-                if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null) {
+                if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null || $("#HDeptID").val() == "undefined" || $("#HDeptID").val() == 0) {
                     layer.msg("杞﹂棿涓嶈兘涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return Result = false;
                 }
-                if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null) {
+                if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null || $("#HGroupID").val() == "undefined" | $("#HGroupID").val() == 0) {
                     layer.msg("鐝粍涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return Result = false;
                 }
-                if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null) {
+                if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null || $("#HGroupID").val() == "undefined" || $("#HEmpID").val() == 0) {
                     layer.msg("缁熻鍛樹笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return Result = false;
                 }
@@ -1261,7 +1303,7 @@
                     , area: ['90%', '90%']//澶у皬
                     , title: '鑱屽憳鍒楄〃'//鏍囬
                     , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../PublicPage/UserInformation.html', 'yes']
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HEmp', 'yes']
                     , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
@@ -1269,7 +1311,7 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                        $("#HEmpName").val(checkStatus.data[0].HName);
+                        $("#HEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
                         $("#HEmpID").val(checkStatus.data[0].HItemID);
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -1286,7 +1328,7 @@
                     , area: ['90%', '90%']//澶у皬
                     , title: '閮ㄩ棬鍒楄〃'//鏍囬
                     , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../PublicPage/DeptInformation.html', 'yes']
+                    , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
                     , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
@@ -1294,9 +1336,9 @@
                         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);
-                        $("#HDeptNumber").val(checkStatus.data[0].HNumber);
+                        $("#HDeptNumber").val(checkStatus.data[0].閮ㄩ棬浠g爜);
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) { }
@@ -1456,7 +1498,38 @@
             /*window.location.href = url;*/
             window.open(url)
         }
-
+        //鐢熶骇杞﹂棿
+        function GetHDeptNameValue(obj) {
+            $("#HDeptName").val(obj[0].閮ㄩ棬鍚嶇О);
+            $("#HDeptID").val(obj[0].HItemID);
+            $("#HDeptNumber").val(obj[0].閮ㄩ棬浠g爜);
+        }
+        //鐢熶骇鐝粍
+        function GetHGroupValue(obj) {
+            $("#HGroupName").val(obj[0].鐝粍鍚嶇О);
+            $("#HGroupID").val(obj[0].HItemID);
+        }
+        //缁熻鍛�
+        function GetHEmpValue(obj) {
+            $("#HEmpName").val(obj[0].鑱屽憳鍚嶇О);
+            $("#HEmpID").val(obj[0].HItemID);
+        }
+        //鐗╂枡
+        function GetMaterValue(obj) {
+            OptionData = obj;
+        }
+        //鍗曚綅
+        function GetUnitValue(obj) {
+            OptionData = obj;
+        }
+        //鐢熶骇璧勬簮
+        function GetGySource(obj) {
+            OptionData[0] = obj;
+        }
+        //鎿嶄綔鍛�
+        function GetHManagerValue(obj) {
+            OptionData = obj;
+        }
     </script>
 </body>
 </html>
\ No newline at end of file

--
Gitblit v1.9.1