From cbab1c22f5e8de83402d97f096692bd1d0e5a630 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期日, 04 二月 2024 14:25:10 +0800
Subject: [PATCH] 1

---
 WebTM/views/生产管理/生产计划平台/Sc_WorkBillMonthPlan.html      |  564 +++++++++++++
 WebTM/views/采购管理/采购订单/Cg_POOrderBillList.html          |    2 
 WebTM/views/验收入库/外购入库/Kf_POStockInBackBillList.html    |   75 +
 WebTM/views/WMS扫码模块/生产入库/Kf_ProductInBill_PDA.html     | 1752 ++++++++++++++++++++++++++++++++++++++++++
 WebTM/views/WMS扫码模块/其他入库/Kf_OtherInBill_PDA.html       |   38 
 WebTM/views/index_Mobile.html                          |   12 
 WebTM/views/index.html                                 |    1 
 WebTM/views/WMS扫码模块/生产入库/Kf_ProductInBillList_PDA.html |    4 
 WebTM/views/采购管理/退料通知单/Cg_POInStockBackBillList.html   |    2 
 WebTM/WebTM.csproj                                     |    2 
 10 files changed, 2,428 insertions(+), 24 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 0209915..d67c14a 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -231,6 +231,7 @@
     <Content Include="views\WMS鎵爜妯″潡\濮斿棰嗘枡\Kf_EntrustOutBackBillList_PDA.html" />
     <Content Include="views\WMS鎵爜妯″潡\濮斿棰嗘枡\Kf_EntrustOutBillList_PDA.html" />
     <Content Include="views\WMS鎵爜妯″潡\鏉$爜鏌ヨ\Gy_BarCodeBill_QiaoYi_PDA.html" />
+    <Content Include="views\WMS鎵爜妯″潡\鐢熶骇鍏ュ簱\Kf_ProductInBill_PDA.html" />
     <Content Include="views\WMS鎵爜妯″潡\鐢熶骇鍏ュ簱\Kf_ProductInBackBillList_PDA.html" />
     <Content Include="views\WMS鎵爜妯″潡\鐢熶骇鍏ュ簱\Kf_ProductInBillList_PDA.html" />
     <Content Include="views\WMS鎵爜妯″潡\鐢熶骇姹囨姤\Sc_ICMOReportBillList_PDA.html" />
@@ -468,6 +469,7 @@
     <Content Include="views\杞﹂棿绠$悊\宸ュ簭娴佽浆\MES_StationOutBillList_PDA_QiaoYi.html" />
     <Content Include="views\杞﹂棿绠$悊\宸ュ簭娴佽浆鍗Gy_ProcessBatchReport.html" />
     <Content Include="views\杞﹂棿绠$悊\宸ュ簭娴佽浆鍗Sc_ProcessExchangeBillList_LookDown.html" />
+    <Content Include="views\鐢熶骇绠$悊\鐢熶骇璁″垝骞冲彴\Sc_WorkBillMonthPlan.html" />
     <Content Include="views\杞﹂棿绠$悊\宸ュ簭娴佽浆鍗SingleRowWallList.html" />
     <Content Include="views\杞﹂棿绠$悊\宸ュ簭杩涚珯鎺ユ敹鍗昞Cj_StationInBillList_QiaoYi.html" />
     <Content Include="views\杞﹂棿绠$悊\鎶ヨ〃鍒嗘瀽\Sc_BadReasonReport.html" />
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_PDA.html"
index 9227286..26524f0 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_PDA.html"
@@ -14,7 +14,7 @@
     <script src="../../../layuiadmin/Scripts/json2.js"></script>
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
-    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
     <style>
         .layui-col-xs8 {
             width: 55.666667%;
@@ -392,7 +392,7 @@
             var HBillerID = sessionStorage["HBillerID"]
             var HStockOrgID = sessionStorage["OrganizationID"]  //缁勭粐ID
             var HSourceFlag = false     //鏄惁宸叉壂鐮佹爣蹇�
-            var OperationType = 0       //鎿嶄綔绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
+            var OperationType = 1       //鎿嶄綔绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
             var listOption = [];
             var columns = "";
             var HModName = "Kf_OtherInBill_PDA";
@@ -462,7 +462,7 @@
                 $("#HKeeperID").val(sessionStorage["HKeeperID"]);
                 $("#HKeeperName").val(sessionStorage["HKeeper"]);
                 $("#HMaker").val(sessionStorage["HUserName"]);
-                $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                 $("#HBillerID").val(sessionStorage["HBillerID"]);
                 $("#HStockOrgID").val(sessionStorage["OrganizationID"]);
                 $("#HStockOrgName").val(sessionStorage["Organization"]);
@@ -579,7 +579,6 @@
                 element.tabChange('tab-Kf_OtherInBill_PDA', '2');
             }
             else {
-                OperationType = 1;
                 //鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
                 $.ajax({
                     type: "GET",
@@ -613,7 +612,6 @@
                         $("#HBillNo").val(d.data[0].HBillNo);
                         HInterID = $('#HInterID').val()
                         HBillNo = $('#HBillNo').val()
-                        //$("#HMainSourceBillType").val(d.data[0].HSourceBillType == null ? "1241" : d.data[0].HSourceBillType);
                         //鑾峰彇婧愬崟绫诲瀷
                         if (d.data[0].HSourceBillType == "1241") {
                             $("#HMainSourceBillType").empty();
@@ -642,7 +640,7 @@
                             $("#HDeptID").val(d.data[0].HDeptID);
                             $("#HDeptName").val(d.data[0].HDeptName);
                         }
-                        $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+                        $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                     }
                 })
             }
@@ -1640,14 +1638,26 @@
 
                             //鏉$爜淇℃伅
                             $("#HBarCode_B").val(result.data.BarCodeDetailslist[0].HBarCode);
-                            $("#HMaterName_B").val(result.data.BarCodeDetailslist[0].HMaterName);
-                            $("#HMaterModel_B").val(result.data.BarCodeDetailslist[0].HMaterModel);
-                            $("#HBatchNo_B").val(result.data.BarCodeDetailslist[0].HBatchNo);
-                            $("#HUnitName_B").val(result.data.BarCodeDetailslist[0].HUnitName);
-                            $("#HQty_B").val(result.data.BarCodeDetailslist[0].HQty);
-                            $("#HTMQty_B").val(result.data.BarCodeDetailslist[0].HTMQty);
-                            $("#HWHName_B").val(result.data.BarCodeDetailslist[0].HWHName);
-                            $("#HSPName_B").val(result.data.BarCodeDetailslist[0].HSPName);
+                            if ($("#HBarCode_B").val() == '') {
+                                $("#HMaterName_B").val("");
+                                $("#HMaterModel_B").val("");
+                                $("#HBatchNo_B").val("");
+                                $("#HUnitName_B").val("");
+                                $("#HQty_B").val("");
+                                $("#HTMQty_B").val("");
+                                $("#HWHName_B").val("");
+                                $("#HSPName_B").val("");
+                            }
+                            else {
+                                $("#HMaterName_B").val(result.data.BarCodeDetailslist[0].HMaterName);
+                                $("#HMaterModel_B").val(result.data.BarCodeDetailslist[0].HMaterModel);
+                                $("#HBatchNo_B").val(result.data.BarCodeDetailslist[0].HBatchNo);
+                                $("#HUnitName_B").val(result.data.BarCodeDetailslist[0].HUnitName);
+                                $("#HQty_B").val(result.data.BarCodeDetailslist[0].HQty);
+                                $("#HTMQty_B").val(result.data.BarCodeDetailslist[0].HTMQty);
+                                $("#HWHName_B").val(result.data.BarCodeDetailslist[0].HWHName);
+                                $("#HSPName_B").val(result.data.BarCodeDetailslist[0].HSPName);
+                            }
                         }
                         else {
                             listOption.cols = [[
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\345\205\245\345\272\223/Kf_ProductInBillList_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\345\205\245\345\272\223/Kf_ProductInBillList_PDA.html"
index 69ac172..651f064 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\345\205\245\345\272\223/Kf_ProductInBillList_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\345\205\245\345\272\223/Kf_ProductInBillList_PDA.html"
@@ -236,8 +236,8 @@
                                 , shade: 0.6 //閬僵閫忔槑搴�
                                 , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
                                 , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                                //, content: ['../../WMS鎵爜妯″潡/鐢熶骇鍏ュ簱/Kf_ProductInBill_PDA.html?OperationType=2&HInterID=' + data[0].HInterID, 'yes']
-                                , content: ['../../楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
+                                , content: ['../../WMS鎵爜妯″潡/鐢熶骇鍏ュ簱/Kf_ProductInBill_PDA.html?OperationType=2&HInterID=' + data[0].HInterID, 'yes']
+                                //, content: ['../../楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
                                 , resize: false
                                 , cancel: function () {
                                     $(".layui-btn").removeClass("layui-btn-disabled");
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\345\205\245\345\272\223/Kf_ProductInBill_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\345\205\245\345\272\223/Kf_ProductInBill_PDA.html"
new file mode 100644
index 0000000..96fbe6f
--- /dev/null
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\347\224\237\344\272\247\345\205\245\345\272\223/Kf_ProductInBill_PDA.html"
@@ -0,0 +1,1752 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>鐢熶骇鍏ュ簱鍗�</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <!--寮曠敤layui鏍峰紡鏂囦欢-->
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <!--寮曠敤layui js鏂囦欢-->
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <style>
+        .layui-col-xs8 {
+            width: 55.666667%;
+        }
+    </style>
+</head>
+<body>
+    <div class="layui-fluid" style="padding:0">
+        <div class="layui-card" style="padding: 1px">
+            <div class="layui-card-body" style="padding: 0px; height:800px;">
+                <form class="layui-form" action="" lay-filter="component-form-group">
+                    <div style="background-color:#0085E8;">
+                        <span style="color: white;"><i class="layui-icon layui-icon-form"></i>鐢熶骇鍏ュ簱鍗�</span>
+                    </div>
+                    <div class="layui-form-item" style="padding:15px;margin:0px">
+                        <div class="layui-row">
+                            <div class="layui-col-xs3">
+                                <label class="layui-form-label" style="width: 30px;padding-left: 0px;">鏉$爜</label>
+                            </div>
+                            <div class="layui-col-xs7">
+                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+                            </div>
+                            <div class="layui-col-xs2">
+                                <button type="button" lay-submit="" lay-filter="HBarCode-BT" class="layui-btn layui_btn_sm" id="HBarCode-BT">纭畾</button>
+                            </div>
+                            <div class="layui-row">
+                                <div class="layui-col-xs3">
+                                    <label class="layui-form-label" style="width:30px;padding-left:0px;">鏁伴噺</label>
+                                </div>
+                                <div class="layui-col-xs7">
+                                    <input type="number" name="HQty" id="HQty" lay-verify="HQty" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                </div>
+                            </div>
+                        </div>
+                        <div class="layui-tab layui-col-xs12" style="margin-top:5px;" lay-filter="tab-Kf_ProductInBill_PDA">
+                            <ul class="layui-tab-title" lay-filter="tab-all">
+                                <li lay-id="1" style="padding:1px;">閫夋嫨婧愬崟</li>
+                                <li lay-id="2" style="padding:1px;">琛ㄥご淇℃伅</li>
+                                <li lay-id="3" style="padding:1px;">鐗╂枡淇℃伅</li>
+                                <li lay-id="4" style="padding:1px;">鏉$爜淇℃伅</li>
+                                <li lay-id="5" style="padding:1px;">姹囨姤鏉$爜</li>
+                            </ul>
+                            <div class="layui-tab-content">
+                                <!--閫夋嫨婧愬崟-->
+                                <div class="layui-tab-item">
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs3">
+                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟绫诲瀷</label>
+                                            </div>
+                                            <div class="layui-col-xs9">
+                                                <select name="HMainSourceBillType" id="HMainSourceBillType">
+                                                    <option value="3710">鐢熶骇璁㈠崟</option>
+                                                    <option value="3711">鐢熶骇姹囨姤鍗�</option>
+                                                    <option value="3714">宸ュ簭姹囨姤鍗�</option>
+                                                    <option value="-1">鎵嬪伐褰曞叆</option>
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs3">
+                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟鍗曞彿</label>
+                                            </div>
+                                            <div class="layui-col-xs7">
+                                                <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            </div>
+                                            <div class="layui-col-xs2">
+                                                <button type="button" lay-submit="" lay-filter="HSourceBillNo-BT" class="layui-btn" id="HSourceBillNo-BT">纭畾</button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs3">
+                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">鏃ユ湡</label>
+                                            </div>
+                                            <div class="layui-col-xs9">
+                                                <input name="HDate" id="HDate" autocomplete="off" class="layui-input">
+                                            </div>
+                                        </div>
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs3">
+                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">鍒跺崟浜�</label>
+                                            </div>
+                                            <div class="layui-col-xs9">
+                                                <input type="text" name="HMaker" id="HMaker" lay-verify="HMaker" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs3">
+                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">鍗曟嵁鍙�</label>
+                                            </div>
+                                            <div class="layui-col-xs9">
+                                                <input type="text" name="HBillNo" id="HBillNo" lay-verify="HBillNo" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs3">
+                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">鍗曟嵁ID</label>
+                                            </div>
+                                            <div class="layui-col-xs9">
+                                                <input type="text" name="HInterID" id="HInterID" lay-verify="HInterID" value="0" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <!--琛ㄥご淇℃伅-->
+                                <div class="layui-tab-item">
+                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">浠撳簱</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <div class="layui-col-xs10">
+                                                    <input type="text" name="HWHName" id="HWHName" lay-verify="HWHName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                                    <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
+                                                </div>
+                                                <div class="layui-col-xs2">
+                                                    <button type="button" lay-submit="" lay-filter="HWHID-BT" class="layui-btn" id="HWHID-BT">...</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">浠撲綅</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <div class="layui-col-xs10">
+                                                    <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                                    <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
+                                                </div>
+                                                <div class="layui-col-xs2">
+                                                    <button type="button" lay-submit="" lay-filter="HSpID-BT" class="layui-btn" id="HSpID-BT">...</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">淇濈</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <div class="layui-col-xs10">
+                                                    <input type="text" name="HKeeperName" id="HKeeperName" lay-verify="HKeeperName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                                    <input type="hidden" name="HKeeperID" id="HKeeperID" lay-verify="HKeeperID" value="0" autocomplete="off" class="layui-input">
+                                                </div>
+                                                <div class="layui-col-xs2">
+                                                    <button type="button" lay-submit="" lay-filter="HKeeperID-BT" class="layui-btn" id="HKeeperID-BT">...</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">楠屾敹</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <div class="layui-col-xs10">
+                                                    <input type="text" name="HSecManagerName" id="HSecManagerName" lay-verify="HSecManagerName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                                    <input type="hidden" name="HSecManagerID" id="HSecManagerID" lay-verify="HSecManagerID" value="0" autocomplete="off" class="layui-input">
+                                                </div>
+                                                <div class="layui-col-xs2">
+                                                    <button type="button" lay-submit="" lay-filter="HSecManagerID-BT" class="layui-btn" id="HSecManagerID-BT">...</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">閮ㄩ棬</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <div class="layui-col-xs10">
+                                                    <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                                    <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0" autocomplete="off" class="layui-input">
+                                                </div>
+                                                <div class="layui-col-xs2">
+                                                    <button type="button" lay-submit="" lay-filter="HDeptID-BT" class="layui-btn" id="HDeptID-BT">...</button>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:30px;padding-left:0px;">缁勭粐</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HStockOrgName" id="HStockOrgName" lay-verify="HStockOrgName" autocomplete="off" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HStockOrgID" id="HStockOrgID" lay-verify="HStockOrgID" value="0" autocomplete="off" class="layui-input">
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <!--鐗╂枡淇℃伅-->
+                                <div class="layui-tab-item">
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs12">
+                                            <div class="layui-form-item" style="padding:0px;margin:0px"></div>
+                                            <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table>
+                                        </div>
+                                    </div>
+                                </div>
+                                <!--鏉$爜淇℃伅-->
+                                <div class="layui-tab-item">
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">鏉$爜</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HBarCode_B" id="HBarCode_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">鐗╂枡</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HMaterName_B" id="HMaterName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">瑙勬牸</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HMaterModel_B" id="HMaterModel_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">鎵规</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HBatchNo_B" id="HBatchNo_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">鍗曚綅</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HUnitName_B" id="HUnitName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">鏁伴噺</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HQty_B" id="HQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">瀹归噺</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HTMQty_B" id="HTMQty_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">浠撳簱</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HWHName_B" id="HWHName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                        <div class="layui-row">
+                                            <div class="layui-col-xs2">
+                                                <label class="layui-form-label" style="width:40px;padding-left:0px;">浠撲綅</label>
+                                            </div>
+                                            <div class="layui-col-xs10">
+                                                <input type="text" name="HSPName_B" id="HSPName_B" class="layui-input" style="border-radius: 5px;background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <!--姹囨姤鏉$爜-->
+                                <div class="layui-tab-item">
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs12">
+                                            <div class="layui-form-item" style="padding:0px;margin:0px"></div>
+                                            <table class="layui-hide" id="ICMOReportBarCode-table" lay-filter="ICMOReportBarCode-table"></table>
+                                        </div>
+                                    </div>
+                                </div>
+
+                            </div>
+                        </div>
+                        <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
+                            <button type="button" lay-submit="" lay-filter="cmdSaver" class="layui-btn" id="cmdSaver">鎻愪氦</button>
+                            <button type="button" lay-submit="" lay-filter="cmdModify" class="layui-btn" id="cmdModify">缂栬緫</button>
+                            <button type="button" lay-submit="" lay-filter="cmdDelete" class="layui-btn" id="cmdDelete">鍒犻櫎</button>
+                            <button type="button" lay-submit="" lay-filter="cmdCancel" class="layui-btn" id="cmdCancel">閫�鍑�</button>
+                        </div>
+                    </div>
+
+                    <!--闅愯棌瀛楁-->
+                    <input type="hidden" name="HBillType" id="HBillType">
+                    <input type="hidden" name="HBillerID" id="HBillerID">
+                    <input type="hidden" name="HRedBlueFlag" id="HRedBlueFlag">
+                    <!--澶辫触鎻愮ず闊�-->
+                    <div id="" style="display:none;">
+                        <audio id="cs" hidden controls>
+                            <source src="../../video/jingbao.wav" type="audio/ogg">
+                        </audio>
+                    </div>
+                    <!--鎴愬姛鎻愮ず闊�-->
+                    <div id="" style="display:none;">
+                        <audio id="cs2" hidden controls>
+                            <source src="../../video/success.wav" type="audio/ogg">
+                        </audio>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , laydate = layui.laydate
+                , element = layui.element;
+            var HInterID = $('#HInterID').val()
+            var HBillNo = $('#HBillNo').val()
+            var HBillType = '1202'
+            var HRedBlueFlag = false
+            var HMaker = sessionStorage["HUserName"]
+            var HBillerID = sessionStorage["HBillerID"]
+            var HStockOrgID = sessionStorage["OrganizationID"]  //缁勭粐ID
+            var HSourceFlag = false     //鏄惁宸叉壂鐮佹爣蹇�
+            var OperationType = 1       //鎿嶄綔绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
+            var listOption = [];
+            var ICMOReportBarCodelistOption = [];
+            var columns = "";
+            var HModName = "Kf_ProductInBill_PDA";
+            var ModRightName = "CE_ProductIn";    //妯″潡鏉冮檺鍙傛暟
+            var titleData = [];                 //涓嶉渶瑕佹樉绀虹殑瀛楁
+
+            //#endregion
+
+            //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+            if (sessionStorage.login != "login") {
+                layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+                    icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+                }, function () { window.location.href = "../../user/login_pda.html"; });
+            }
+
+            //#region   鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+
+            //鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+            CheckModRight();
+
+            function CheckModRight() {
+                layer.load(3);
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/WEBSController/CheckModRight_Json",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "ModRightName": ModRightName, "HUserName": HMaker },
+                    success: function (d) {
+                        if (d.count == 1) {
+                        }
+                        else {
+                            layer.msg(d.Message, {
+                                icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                            }, function () { parent.location.href = "../../../views/index_Mobile.html"; });
+                        }
+                    }
+                });
+                layer.closeAll("loading");
+            }
+            //#endregion
+
+            //澶辫触鎻愮ず闊�
+            function playSound() {
+                console.log("playSound");
+                var audio = document.getElementById("cs");
+                audio.play();
+            }
+            //鎴愬姛鎻愮ず闊�
+            function playSound_OK() {
+                console.log("playSound_OK");
+                var audio = document.getElementById("cs2");
+                audio.play();
+            }
+
+            //#region 鍒濆鍖栫晫闈�
+
+            set_ClearBill();
+
+            function set_ClearBill() {
+                //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�佺粍缁囩瓑锛� new
+                $("#HWHID").val(sessionStorage["HWHID"]);
+                $("#HWHName").val(sessionStorage["HWHName"]);
+                $("#HDeptID").val(sessionStorage["HDeptID"]);
+                $("#HDeptName").val(sessionStorage["HDept"]);
+                $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
+                $("#HSecManagerName").val(sessionStorage["HSecManager"]);
+                $("#HKeeperID").val(sessionStorage["HKeeperID"]);
+                $("#HKeeperName").val(sessionStorage["HKeeper"]);
+                $("#HMaker").val(sessionStorage["HUserName"]);
+                $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
+                $("#HBillerID").val(sessionStorage["HBillerID"]);
+                $("#HStockOrgID").val(sessionStorage["OrganizationID"]);
+                $("#HStockOrgName").val(sessionStorage["Organization"]);
+                $("#HBillType").val("1202");
+                $("#HRedBlueFlag").val("false");
+                if (sessionStorage["HWhSPFlag"]) {
+                    $("#HStockPlaceID").val("0");
+                    $("#HStockPlaceName").val("");
+                    $("#HStockPlaceName").attr("readonly", "readonly");
+                    $('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                }
+                else {
+                    $("#HStockPlaceID").val(sessionStorage["HSPID"]);
+                    $("#HStockPlaceName").val(sessionStorage["HSPName"]);
+                    $("#HStockPlaceName").removeAttr("readonly");
+                    $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
+                }
+
+                //榛樿鏄剧ず椤甸潰
+                element.tabChange('tab-Kf_ProductInBill_PDA', '2');
+                set_InitDate();         //鍒濆鍖栬〃鍗曟椂闂�
+                set_InitGrid();         //鍒濆鍖栬〃鏍�
+
+                var data = [];
+                listOption.cols = [[
+                    { field: '鏁伴噺', title: '鏁伴噺', width: 100 }
+                    , { field: '婧愬崟鏁伴噺', title: '婧愬崟鏁伴噺', width: 100 }
+                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 100 }
+                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100 }
+                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
+                    , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 100 }
+                    , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100 }
+                    , { field: '鏉$爜涓暟', title: '鏉$爜涓暟', width: 100 }
+                ]];
+                listOption.data = data;
+                table.render(listOption);
+                ICMOReportBarCodelistOption.data = data;
+                table.render(ICMOReportBarCodelistOption);
+
+                //鍏夋爣榛樿鍦ㄦ潯鐮佷綅缃笂
+                var pFocus = $("#HBarCode");
+                pFocus.select();
+                pFocus.focus();     //鑾峰彇鍏夋爣
+            }
+
+            //鍒濆鍖栬〃鍗曟椂闂存彃浠�
+            function set_InitDate() {
+                //甯歌鐢ㄦ硶
+                laydate.render({
+                    elem: '#HDate'
+                });
+            }
+            //鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                listOption = {
+                    elem: '#wl-table'
+                    //, toolbar: '#toolbarDemo'
+                    , totalRow: true
+                    , height: 'full-60'
+                    , cellMinWidth: 90
+                    , limit: 50
+                };
+
+                //姹囨姤鏉$爜
+                ICMOReportBarCodelistOption = {
+                    elem: '#ICMOReportBarCode-table'
+                    //, toolbar: '#toolbarDemo'
+                    , cellMinWidth: 90
+                    , limit: 3000
+                    , totalRow: true
+                    , cols: [[
+                        { field: 'HQty', title: '鏁伴噺', width: 80, totalRow: true }
+                        , { field: 'HQtyMust', title: '婧愬崟鏁伴噺', width: 90 }
+                        , { field: 'HBarCode', title: '鏉$爜缂栧彿', width: 220 }
+                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                        , { field: 'HMaterID', title: 'HMaterID', width: 150, hide: true }
+                        , { field: 'HBatchNo', title: '鎵瑰彿', width: 150 }
+                        , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
+                        , { field: 'HAuxPropID', title: 'HAuxPropID', width: 150, hide: true }
+                        , { field: 'HMTONo', title: 'HMTONo', width: 150, hide: true }
+                        , { field: 'HSourceInterID', title: 'HSourceInterID', width: 150, hide: true }
+                        , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 150, hide: true }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                        , { field: 'HItemID', title: 'HItemID', width: 150, hide: true }
+                    ]]
+                    , height: 500
+                    , done: function () {
+                        layer.closeAll("loading");
+                    }
+                }
+            }
+
+            //#region   浠庣紦瀛樺垪琛ㄤ腑杩斿洖淇℃伅
+            function getUrlVars() {
+                var vars = [], hash;
+                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+                for (var i = 0; i < hashes.length; i++) {
+                    hash = hashes[i].split('=');
+                    vars.push(hash[0]);
+                    vars[hash[0]] = hash[1];
+                }
+                return vars;
+            }
+            var params = getUrlVars();
+            var OperationType = params[params[0]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鏁版嵁绫诲瀷  1鏂板  2浠庣紦瀛樺垪琛ㄤ腑杩斿洖
+            var HInterID_Temp = params[params[1]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁ID
+
+            //#endregion
+
+            //鍒ゆ柇鏄惁鏂板锛岃幏鍙栨渶澶у崟鎹彿
+            if (HInterID != 0) {
+                HSourceFlag = true;
+            }
+            //浠庣紦瀛樺垪琛ㄧ紪杈戝姛鑳借烦杞嚦鍗曟嵁妯″潡
+            else if (OperationType == 2) {
+                RoadBillMain(HInterID_Temp);
+                $("#HBarCode").select();
+                $("#HBarCode").focus();     //鑾峰彇鍏夋爣
+                //鏄剧ず琛ㄤ綋鏄庣粏
+                DisBillEntryList();
+                HSourceFlag = true;
+                element.tabChange('tab-Kf_ProductInBill_PDA', '2');
+            }
+            else {
+                //鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HBillType": HBillType },
+                    success: function (d) {
+                        if (d.count == 1) {
+                            $("#HInterID").val(d.data[0].HInterID);
+                            $("#HBillNo").val(d.data[0].HBillNo);
+                            HInterID = $('#HInterID').val()
+                            HBillNo = $('#HBillNo').val()
+                        }
+                        else {
+                            layer.msg(d.Message, { icon: 0, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        }
+                    }
+                });
+                HSourceFlag = false;
+            }
+
+            function RoadBillMain(HInterID_Temp)//鍔犺浇琛ㄥご
+            {
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + '/WEBSController/GetSourceBill_Temp_Json',
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HInterID": HInterID_Temp, "HBillType": HBillType },
+                    success: function (d) {
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        HInterID = $('#HInterID').val()
+                        HBillNo = $('#HBillNo').val()
+                        //鑾峰彇婧愬崟绫诲瀷
+                        if (d.data[0].HSourceBillType == "3710") {
+                            $("#HMainSourceBillType").empty();
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鐢熶骇璁㈠崟' + "</option>";
+                            $("#HMainSourceBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HMainSourceBillType").attr("readonly", "readonly");
+                        }
+                        else if (d.data[0].HSourceBillType == "3711") {
+                            $("#HMainSourceBillType").empty();
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鐢熶骇姹囨姤鍗�' + "</option>";
+                            $("#HMainSourceBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HMainSourceBillType").attr("readonly", "readonly");
+                        }
+                        else if (d.data[0].HSourceBillType == "3714") {
+                            $("#HMainSourceBillType").empty();
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '宸ュ簭姹囨姤鍗�' + "</option>";
+                            $("#HMainSourceBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HMainSourceBillType").attr("readonly", "readonly");
+                        }
+                        else {
+                            $("#HMainSourceBillType").empty();
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鎵嬪伐褰曞叆' + "</option>";
+                            $("#HMainSourceBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HMainSourceBillType").attr("readonly", "readonly");
+                        }
+
+                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+                        //闈炲婧愬崟妯″紡
+                        if (d.data[0].HMulSourceBill == 0) {
+                            $("#HSourceBillNo").attr("readonly", "readonly");
+                            $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                        }
+                        if (d.data[0].HDeptID != 0) {
+                            $("#HDeptID").val(d.data[0].HDeptID);
+                            $("#HDeptName").val(d.data[0].HDeptName);
+                        }
+                        $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
+                    }
+                })
+            }
+
+            //#endregion
+
+            //#region 鍩虹璧勬枡閫夋嫨
+
+            //#region 浠撳簱
+            //鎵弿浠撳簱鏉$爜
+            $('#HWHName').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    var HWHName = $('#HWHName').val()
+                    if (HWHName == '') {
+                        playSound();
+                        $("#HWHID").val("0");
+                        $("#HWHName").val("");
+                        $("#HStockPlaceID").val("0");
+                        $("#HStockPlaceName").val("");
+                        $("#HStockPlaceName").removeAttr("readonly");
+                        $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
+                        layer.msg("浠撳簱鏉$爜涓虹┖锛�", {
+                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                        }, function () {
+                            $("#HWHName").select();
+                            $("#HWHName").focus();
+                        });
+                        return;
+                    }
+
+                    layer.load(3);
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/WEBSController/GetWarehouse_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HWHName, "HStockOrgID": HStockOrgID },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HWHID").val(result.data[0].HItemID);
+                                $("#HWHName").val(result.data[0].HName);
+                                $("#HStockPlaceID").val("0");
+                                $("#HStockPlaceName").val("");
+                                if (result.data[0].HSPFlag == 0) {
+                                    $("#HStockPlaceName").attr("readonly", "readonly");
+                                    $('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                                }
+                                else {
+                                    $("#HStockPlaceName").removeAttr("readonly");
+                                    $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
+                                }
+                                element.tabChange('tab-Kf_ProductInBill_PDA', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").select();
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                playSound();
+                                $("#HWHID").val("0");
+                                $("#HWHName").val("");
+                                $("#HStockPlaceID").val("0");
+                                $("#HStockPlaceName").val("");
+                                $("#HStockPlaceName").removeAttr("readonly");
+                                $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
+                                layer.msg(result.Message, {
+                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                                }, function () {
+                                    $("#HWHName").select();
+                                    $("#HWHName").focus();
+                                });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                }
+            });
+
+            //浠撳簱鎸夐挳
+            form.on('submit(HWHID-BT)', function () {
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撳簱鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseListNew.html?Type=HWHID&HOrgID=' + HStockOrgID + '', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#region 浠撲綅
+            //鎵弿浠撲綅鏉$爜
+            $('#HStockPlaceName').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    //浠撳簱鏂囨湰妗嗕负绌烘椂锛屾竻绌哄搴擨D
+                    if ($("#HWHName").val() == '') {
+                        $("#HWHID").val("0");
+                    }
+                    var sHWHID = $("#HWHID").val()
+                    var HStockPlaceName = $('#HStockPlaceName').val()
+                    if (HStockPlaceName == '') {
+                        playSound();
+                        $("#HWHID").val("0");
+                        $("#HWHName").val("");
+                        $("#HStockPlaceID").val("0");
+                        $("#HStockPlaceName").val("");
+                        layer.msg("浠撲綅鏉$爜涓虹┖锛�", {
+                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                        }, function () {
+                            $("#HStockPlaceName").select();
+                            $("#HStockPlaceName").focus();
+                        });
+                        return;
+                    }
+
+                    layer.load(3);
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/WEBSController/GetStockPlace_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HStockPlaceName, "HWhID": sHWHID, "HStockOrgID": HStockOrgID },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HStockPlaceName").val(result.data[0].HName);
+                                $("#HStockPlaceID").val(result.data[0].HItemID);
+                                $("#HWHName").val(result.data[0].HWhName);
+                                $("#HWHID").val(result.data[0].HWHID);
+                                element.tabChange('tab-Kf_ProductInBill_PDA', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").select();
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                playSound();
+                                $("#HWHID").val("0");
+                                $("#HWHName").val("");
+                                $("#HStockPlaceID").val("0");
+                                $("#HStockPlaceName").val("");
+                                layer.msg(result.Message, {
+                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                                }, function () {
+                                    $("#HStockPlaceName").select();
+                                    $("#HStockPlaceName").focus();
+                                });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                }
+            });
+
+            //浠撲綅鎸夐挳
+            form.on('submit(HSpID-BT)', function () {
+                //浠撳簱鏂囨湰妗嗕负绌烘椂锛屾竻绌哄搴擨D
+                if ($("#HWHName").val() == '') {
+                    $("#HWHID").val("0");
+                }
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浠撲綅鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_StockPlaceListNew.html?HWhID=' + $("#HWHID").val() + '&Type=HSpID&HOrgID=' + HStockOrgID + '', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#region 淇濈鍛�
+            //鎵弿淇濈鍛樻潯鐮�
+            $('#HKeeperName').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    var HKeeperName = $('#HKeeperName').val()
+                    if (HKeeperName == '') {
+                        playSound();
+                        $("#HKeeperID").val("0");
+                        $("#HKeeperName").val("");
+                        layer.msg("淇濈鍛樻潯鐮佷负绌猴紒", {
+                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                        }, function () {
+                            $("#HKeeperName").select();
+                            $("#HKeeperName").focus();
+                        });
+                        return;
+                    }
+
+                    layer.load(3);
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/WEBSController/GetEmployee_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HKeeperName },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HKeeperID").val(result.data[0].HItemID);
+                                $("#HKeeperName").val(result.data[0].HName);
+                                element.tabChange('tab-Kf_ProductInBill_PDA', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").select();
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                playSound();
+                                $("#HKeeperID").val("0");
+                                $("#HKeeperName").val("");
+                                layer.msg(result.Message, {
+                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                                }, function () {
+                                    $("#HKeeperName").select();
+                                    $("#HKeeperName").focus();
+                                });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                }
+            });
+
+            //淇濈鍛樻寜閽�
+            form.on('submit(HKeeperID-BT)', function () {
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '鑱屽憳鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#region 楠屾敹鍛�
+            //鎵弿楠屾敹鍛樻潯鐮�
+            $('#HSecManagerName').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    var HSecManagerName = $('#HSecManagerName').val()
+                    if (HSecManagerName == '') {
+                        playSound();
+                        $("#HSecManagerID").val("0");
+                        $("#HSecManagerName").val("");
+                        layer.msg("楠屾敹鍛樻潯鐮佷负绌猴紒", {
+                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                        }, function () {
+                            $("#HSecManagerName").select();
+                            $("#HSecManagerName").focus();
+                        });
+                        return;
+                    }
+
+                    layer.load(3);
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/WEBSController/GetEmployee_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HSecManagerName },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HSecManagerID").val(result.data[0].HItemID);
+                                $("#HSecManagerName").val(result.data[0].HName);
+                                element.tabChange('tab-Kf_ProductInBill_PDA', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").select();
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                playSound();
+                                $("#HSecManagerID").val("0");
+                                $("#HSecManagerName").val("");
+                                layer.msg(result.Message, {
+                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                                }, function () {
+                                    $("#HSecManagerName").select();
+                                    $("#HSecManagerName").focus();
+                                });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                }
+            });
+
+            //楠屾敹鍛樻寜閽�
+            form.on('submit(HSecManagerID-BT)', function () {
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '鑱屽憳鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#region 閮ㄩ棬
+            //鎵弿閮ㄩ棬鏉$爜
+            $('#HDeptName').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    var HDeptName = $('#HDeptName').val()
+                    if (HDeptName == '') {
+                        playSound();
+                        $("#HDeptID").val("0");
+                        $("#HDeptName").val("");
+                        layer.msg("閮ㄩ棬鏉$爜涓虹┖锛�", {
+                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                        }, function () {
+                            $("#HDeptName").select();
+                            $("#HDeptName").focus();
+                        });
+                        return;
+                    }
+
+                    layer.load(3);
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/WEBSController/GetDepartment_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "HBarCode": HDeptName },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HDeptID").val(result.data[0].HItemID);
+                                $("#HDeptName").val(result.data[0].HName);
+                                element.tabChange('tab-Kf_ProductInBill_PDA', '2');
+                                //鍏夋爣鏄剧ず鍒版潯鐮佷笂
+                                $("#HBarCode").select();
+                                $("#HBarCode").focus();
+                            }
+                            else {
+                                playSound();
+                                $("#HDeptID").val("0");
+                                $("#HDeptName").val("");
+                                layer.msg(result.Message, {
+                                    icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                                }, function () {
+                                    $("#HDeptName").select();
+                                    $("#HDeptName").focus();
+                                });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                }
+            });
+
+            //閮ㄩ棬鎸夐挳
+            form.on('submit(HDeptID-BT)', function () {
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '閮ㄩ棬鍒楄〃'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
+
+            //#endregion
+
+            //#endregion
+
+
+            //#region 鍔熻兘鎺т欢
+
+            //#region 鎻愪氦
+            form.on('submit(cmdSaver)', function (data) {
+                //浠撳簱銆佷粨浣嶃�佷繚绠°�侀獙鏀躲�侀儴闂ㄦ枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+                if ($("#HWHName").val() == '') {
+                    $("#HWHID").val("0");
+                    data.field.HWHID = $('#HWHID').val()
+                }
+                if ($("#HStockPlaceName").val() == '') {
+                    $("#HStockPlaceID").val("0");
+                    data.field.HStockPlaceID = $('#HStockPlaceID').val()
+                }
+                if ($("#HKeeperName").val() == '') {
+                    $("#HKeeperID").val("0");
+                    data.field.HKeeperID = $('#HKeeperID').val()
+                }
+                if ($("#HSecManagerName").val() == '') {
+                    $("#HSecManagerID").val("0");
+                    data.field.HSecManagerID = $('#HSecManagerID').val()
+                }
+                if ($("#HDeptName").val() == '') {
+                    $("#HDeptID").val("0");
+                    data.field.HDeptID = $('#HDeptID').val()
+                }
+
+                var sMainStr = JSON.stringify(data.field);
+                var sSubStr = table.cache['wl-table'];
+                if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
+                {
+                    layer.load(3);
+                    $.ajax(
+                        {
+                            type: "POST",
+                            url: GetWEBURL() + "/WEBSController/set_SaveProductInBill_Json",
+                            async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                            data: { "oMain": sMainStr },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                                    layer.confirm(data.Message, {
+                                        icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板','鍏抽棴'],
+                                        btn2: function () {
+                                            if (OperationType == 2) {
+                                                parent.location.href = "../../WMS鎵爜妯″潡/鐢熶骇鍏ュ簱/Kf_ProductInBillList_PDA.html";
+                                            }
+                                            else {
+                                                parent.location.href = "../../../views/index_Mobile.html";
+                                            }
+                                        }//鍏抽棴
+                                    }
+                                        , function () {
+                                            location.replace('Kf_ProductInBill_PDA.html?OperationType=1&HInterID=0');
+                                        });//鏂板
+                                }
+                                else {
+                                    layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                }
+                            },
+                            error: function (err) {
+                                layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                        });
+                    layer.closeAll("loading");
+                    return;
+                }
+            });
+
+            //#endregion
+
+            //#region 缂栬緫
+
+            form.on('submit(cmdModify)', function () {//缂栬緫
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length == 1) {
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '鏄庣粏鍒楄〃'
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '&HBillType =' + data[0].HBillType, 'yes']
+                        , resize: false
+                        , cancel: function () {
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
+                        , end: function () {
+                            //鏄剧ず琛ㄤ綋鏄庣粏
+                            DisBillEntryList();
+                        }
+                    })
+                }
+                else {
+                    layer.msg('璇峰厛閫夋嫨涓�琛岃褰曪紝杩涜缂栬緫锛�');
+                }
+            });
+
+
+            //#endregion
+
+            //#region 鍒犻櫎
+
+            form.on('submit(cmdDelete)', function () {
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length == 1) {
+                    layer.confirm("纭瑕佸垹闄ら�変腑琛屾墍鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�", { title: "鍒犻櫎纭" }, function (index) {
+                        var sMaterID = data[0].HMaterID
+                        var sAuxPropID = data[0].HAuxPropID
+                        var sMTONo = data[0].HMTONo
+                        var sSourceInterID = data[0].HSourceInterID
+                        var sSourceEntryID = data[0].HSourceEntryID
+
+                        layer.load(3)
+                        $.ajax(
+                            {
+                                type: "Get",
+                                url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json",
+                                async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                                data: { "HInterID": HInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType },
+                                dataType: "json",
+                                success: function (data) {
+                                    if (data.count == 1) {
+                                        layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                            //鏄剧ず琛ㄤ綋鏄庣粏
+                                            DisBillEntryList();
+                                        });
+                                    }
+                                    else {
+                                        playSound();
+                                        layer.msg(data.Message, { icon: 2, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                    }
+                                },
+                                error: function (err) {
+                                    layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                }
+                            });
+                        layer.closeAll("loading");
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛岃褰曪紝杩涜鍒犻櫎锛�');
+                }
+            });
+
+            //#endregion
+
+            //#region 閫�鍑�
+
+            form.on('submit(cmdCancel)', function () {
+                layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+                    if (OperationType == 2) {
+                        var index = parent.layer.getFrameIndex(window.name);    //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
+                        parent.location.reload();                               //鍒锋柊鐖堕〉闈紝娉ㄦ剰涓�瀹氳鍦ㄥ叧闂綋鍓峣frame灞備箣鍓嶆墽琛屽埛鏂�
+                        parent.layer.close(index);                              //鍐嶆墽琛屽叧闂�
+                    }
+                    else {
+                        parent.location.href = "../../../views/index_Mobile.html";
+                    }
+                });
+            })
+
+            //#endregion
+
+            //#endregion
+
+
+            //#region 鎵弿婧愬崟鏉$爜
+
+            //鎵弿婧愬崟鏉$爜
+            $('#HSourceBillNo').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    GetMeesageBySourceBillNo();
+                }
+            });
+
+            //婧愬崟鎸夐挳
+            form.on('submit(HSourceBillNo-BT)', function (data) {
+                GetMeesageBySourceBillNo();
+            });
+
+            //鎵弿婧愬崟鏉$爜
+            function GetMeesageBySourceBillNo(obj) {
+                var HSourceBillNo = $('#HSourceBillNo').val()
+                var HSourceBillType = $("#HMainSourceBillType").val()
+                layer.load(3)
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/WEBSController/Get_SourceBarCode_ProductIn_Json",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "HMaker": HMaker, "HStockOrgID": HStockOrgID },
+                    success: function (result) {
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            playSound_OK();
+                            HSourceFlag = true;
+                            if (result.data.hDeptIDField != 0) {
+                                $("#HDeptID").val(result.data.hDeptIDField);
+                                $("#HDeptName").val(result.data.hDeptNameField);
+                            }
+
+                            $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+                            $("#HMainSourceBillType").attr("disabled", "disabled");
+                            form.render('select');
+                            if (result.data.hMulSourceFlagField == 0) {
+                                $("#HSourceBillNo").attr("readonly", "readonly");
+                                $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                            }
+                            element.tabChange('tab-Kf_ProductInBill_PDA', '2');
+                            $("#HBarCode").select();
+                            $("#HBarCode").focus();
+                            //鏄剧ず琛ㄤ綋鏄庣粏
+                            DisBillEntryList();
+                        }
+                        else {
+                            playSound();
+                            layer.msg(result.Message, {
+                                icon: 5, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                            }, function () {
+                                element.tabChange('tab-Kf_ProductInBill_PDA', '1');
+                                $("#HSourceBillNo").select();
+                                $("#HSourceBillNo").focus();
+                            });
+                        }
+                    }
+                });
+                layer.closeAll("loading");
+            }
+
+            //#endregion
+
+
+            //#region 鎵弿鐗╂枡鏉$爜
+
+            //鎵弿鏉$爜
+            $('#HBarCode').on('keydown', function (event) {
+                if (event.keyCode == 13) {
+                    GetMeesageByBarCode();
+                    $("#HBarCode").select();
+                    $("#HBarCode").focus();     //鑾峰彇鍏夋爣
+                }
+            });
+
+            //鏉$爜鎸夐挳
+            form.on('submit(HBarCode-BT)', function (data) {
+                GetMeesageByBarCode();
+                $("#HBarCode").select();
+                $("#HBarCode").focus();     //鑾峰彇鍏夋爣
+            });
+
+            //鎵潯鐮�
+            function GetMeesageByBarCode(obj) {
+                //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+                if ($("#HWHName").val() == '') {
+                    $("#HWHID").val("0");
+                }
+                if ($("#HStockPlaceName").val() == '') {
+                    $("#HStockPlaceID").val("0");
+                }
+                var sOldBarCode = $('#HBarCode').val()
+                var HDeleteFlag = sOldBarCode.substring(0, 1);
+                var sBarCode = sOldBarCode.slice(1);
+                var sHWHID = $("#HWHID").val()
+                var sHSPID = $("#HStockPlaceID").val()
+                var sHQty = $("#HQty").val()
+                var sSourceBillNo = $("#HSourceBillNo").val()
+                var sSourceBillType = $("#HMainSourceBillType").val()
+
+                if (HDeleteFlag == "*") {
+                    if (sBarCode == "") {
+                        playSound();
+                        layer.msg("璇锋壂鎻忚鍒犻櫎鐨勬潯鐮�", {
+                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                        }, function () {
+                            $("#HBarCode").select();
+                            $("#HBarCode").focus();
+                        });
+                        return;
+                    }
+                    else {
+                        $('#HBarCode').val("");
+                    }
+                    layer.load(3)
+                    $.ajax(
+                        {
+                            type: "GET",
+                            url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json",
+                            async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                            data: { "HInterID": HInterID, "HBillType": HBillType, "HBarCode": sBarCode },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                                    playSound_OK();
+                                    //娓呯┖鏁伴噺
+                                    $("#HQty").val("");
+                                    //鏄剧ず琛ㄤ綋鏄庣粏
+                                    DisBillEntryList();
+                                }
+                                else {
+                                    playSound();
+                                    layer.msg(data.Message, {
+                                        icon: 5, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                                    }, function () {
+                                        $("#HBarCode").select();
+                                        $("#HBarCode").focus();
+                                    });
+                                }
+                            },
+                            error: function (err) {
+                                playSound();
+                                layer.msg('閿欒' + err, {
+                                    icon: 2, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                                }, function () {
+                                    $("#HBarCode").select();
+                                    $("#HBarCode").focus();
+                                });
+                            }
+                        });
+                    layer.closeAll("loading");
+                }
+                else {
+                    var sBarCode = $('#HBarCode').val()
+                    if (sBarCode == '') {
+                        playSound();
+                        layer.msg("鏉$爜涓虹┖锛岃鎵弿鏉$爜锛�", {
+                            icon: 0, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                        }, function () {
+                            $("#HBarCode").select();
+                            $("#HBarCode").focus();
+                        });
+                        return;
+                    }
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                    }
+                    if (sHQty == "") {
+                        sHQty = 0;
+                    }
+                    layer.load(3)
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
+                        async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                        data: { "sBarCode": sBarCode, "HInterID": HInterID, "HBillType": HBillType, "HBillNo": HBillNo, "HMaker": HMaker, "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sHQty, "HRedBlueFlag": HRedBlueFlag, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sSourceBillType, "HStockOrgID": HStockOrgID, "HScanStyle": "", "HCustom1": "", "HCustom2": "" },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                playSound_OK();
+                                if (result.data.hBarTypeField == '浠撳簱鏉$爜') {
+                                    $("#HWHName").val(result.data.hWhNameField);
+                                    $("#HWHID").val(result.data.hWhIDField);
+                                    $("#HStockPlaceName").val("");
+                                    $("#HStockPlaceID").val("0");
+                                    if (result.data.hSPFlagField == 0) {
+                                        $("#HStockPlaceName").attr("readonly", "readonly");
+                                        $('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                                    }
+                                    else {
+                                        $("#HStockPlaceName").removeAttr("readonly");
+                                        $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
+                                    }
+                                    element.tabChange('tab-Kf_ProductInBill_PDA', '2');  //璺宠浆椤电
+                                    return;//缁撴潫
+                                }
+                                else if (result.data.hBarTypeField == '浠撲綅鏉$爜') {
+                                    $("#HStockPlaceName").val(result.data.hSPNameField);
+                                    $("#HStockPlaceID").val(result.data.hSPIDField);
+                                    $("#HWHName").val(result.data.hWhNameField);
+                                    $("#HWHID").val(result.data.hWhIDField);
+                                    element.tabChange('tab-Kf_ProductInBill_PDA', '2');//璺宠浆椤电
+                                    return;//缁撴潫
+                                }
+                                else if (result.data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+                                    $("#HDeptName").val(result.data.hDeptNameField);
+                                    $("#HDeptID").val(result.data.hDeptIDField);
+                                    element.tabChange('tab-Kf_ProductInBill_PDA', '2');//璺宠浆椤电
+                                    return;//缁撴潫
+                                }
+                                else if (result.data.hBarTypeField == '婧愬崟鏉$爜') {
+                                    HSourceFlag = true;
+                                    if (result.data.hDeptIDField != 0) {
+                                        $("#HDeptID").val(result.data.hDeptIDField);
+                                        $("#HDeptName").val(result.data.hDeptNameField);
+                                    }
+                                    $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+                                    //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                    if (result.data.hSourceBillTypeField == "3710") {
+                                        $("#HMainSourceBillType").empty();
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鐢熶骇璁㈠崟' + "</option>";
+                                        $("#HMainSourceBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HMainSourceBillType").attr("readonly", "readonly");
+                                    }
+                                    else if (result.data.hSourceBillTypeField == "3711") {
+                                        $("#HMainSourceBillType").empty();
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鐢熶骇姹囨姤鍗�' + "</option>";
+                                        $("#HMainSourceBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HMainSourceBillType").attr("readonly", "readonly");
+                                    }
+                                    else if (result.data.hSourceBillTypeField == "3714") {
+                                        $("#HMainSourceBillType").empty();
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '宸ュ簭姹囨姤鍗�' + "</option>";
+                                        $("#HMainSourceBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HMainSourceBillType").attr("readonly", "readonly");
+                                    }
+                                    else {
+                                        $("#HMainSourceBillType").empty();
+                                        var optionHtml = '';
+                                        optionHtml += "<option value = '-1' >" + '鎵嬪伐褰曞叆' + "</option>";
+                                        $("#HMainSourceBillType").append(optionHtml);
+                                        layui.form.render('select');
+                                        $("#HMainSourceBillType").attr("readonly", "readonly");
+                                    }
+                                    if (result.data.hMulSourceFlagField == 0) {
+                                        $("#HSourceBillNo").attr("readonly", "readonly");
+                                        $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                                    }
+                                    element.tabChange('tab-Kf_ProductInBill_PDA', '3');
+                                }
+                                //鐗╂枡鏉$爜
+                                else {
+                                    if (HSourceFlag == true) {
+                                        element.tabChange('tab-Kf_ProductInBill_PDA', '3');
+                                    }
+                                    else {
+                                        HSourceFlag = true;
+                                        if (result.data.hDeptIDField != 0) {
+                                            $("#HDeptID").val(result.data.hDeptIDField);
+                                            $("#HDeptName").val(result.data.hDeptNameField);
+                                        }
+                                        $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+                                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                        if (result.data.hSourceBillTypeField == "3710") {
+                                            $("#HMainSourceBillType").empty();
+                                            var optionHtml = '';
+                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鐢熶骇璁㈠崟' + "</option>";
+                                            $("#HMainSourceBillType").append(optionHtml);
+                                            layui.form.render('select');
+                                            $("#HMainSourceBillType").attr("readonly", "readonly");
+                                        }
+                                        else if (result.data.hSourceBillTypeField == "3711") {
+                                            $("#HMainSourceBillType").empty();
+                                            var optionHtml = '';
+                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鐢熶骇姹囨姤鍗�' + "</option>";
+                                            $("#HMainSourceBillType").append(optionHtml);
+                                            layui.form.render('select');
+                                            $("#HMainSourceBillType").attr("readonly", "readonly");
+                                        }
+                                        else if (result.data.hSourceBillTypeField == "3714") {
+                                            $("#HMainSourceBillType").empty();
+                                            var optionHtml = '';
+                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '宸ュ簭姹囨姤鍗�' + "</option>";
+                                            $("#HMainSourceBillType").append(optionHtml);
+                                            layui.form.render('select');
+                                            $("#HMainSourceBillType").attr("readonly", "readonly");
+                                        }
+                                        else {
+                                            $("#HMainSourceBillType").empty();
+                                            var optionHtml = '';
+                                            optionHtml += "<option value = '-1' >" + '鎵嬪伐褰曞叆' + "</option>";
+                                            $("#HMainSourceBillType").append(optionHtml);
+                                            layui.form.render('select');
+                                            $("#HMainSourceBillType").attr("readonly", "readonly");
+                                        }
+                                        if (result.data.hMulSourceFlagField == 0) {
+                                            $("#HSourceBillNo").attr("readonly", "readonly");
+                                            $('#HSourceBillNo-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                                        }
+                                        element.tabChange('tab-Kf_ProductInBill_PDA', '3');
+                                    }
+                                }
+                                //娓呯┖鏁伴噺
+                                $("#HQty").val("");
+                                //鏄剧ず琛ㄤ綋鏄庣粏
+                                DisBillEntryList();
+                            }
+                            else {
+                                playSound();
+                                layer.msg(result.Message, {
+                                    icon: 5, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                                }, function () {
+                                    $("#HBarCode").select();
+                                    $("#HBarCode").focus();
+                                });
+                            }
+                        },
+                        error: function (err) {
+                            playSound();
+                            layer.msg("閿欒锛�" + err, {
+                                icon: 5, time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+                            }, function () {
+                                $("#HBarCode").select();
+                                $("#HBarCode").focus();
+                            });
+                        }
+                    });
+                    layer.closeAll("loading");
+                }
+            }
+
+            //#endregion
+
+
+            //#region 鏄剧ず鐗╂枡鍒楄〃淇℃伅
+
+            function DisBillEntryList() {
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HInterID": HInterID, "HBillNo": HBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
+                    success: function (result) {
+                        var data = [];
+                        var col = [];
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in result.list) {
+                                //鍔ㄦ�佽幏鍙栧垪琛ㄦ墍鏈夊垪鍚�
+                                data.push({ "id": result.list[key].ColmCols, "name": result.list[key].ColmCols, "Type": result.list[key].ColmType });
+                                //鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(result.list[key].ColmCols)) {
+                                    titleData[key] = result.list[key].ColmCols;
+                                }
+                            }
+
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'radio', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+
+                                        if (data[i].name == '鏁伴噺' || data[i].name == '婧愬崟鏁伴噺' || data[i].name == '鏉$爜涓暟') {
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', totalRow: true });
+                                        } else {
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center' });
+                                        }
+                                    }
+                                }
+                            }
+                            columns = col;
+                            listOption.cols = [columns];
+                            listOption.data = result.data.Materlist;
+                            listOption.totalRow = true;
+                            table.render(listOption);
+                            if (result.data.ICMOReportlist[0].HSourceInterID != 0) {
+                                ICMOReportBarCodelistOption.data = result.data.ICMOReportlist;
+                                table.render(ICMOReportBarCodelistOption);
+                            }
+
+                            //鏉$爜淇℃伅
+                            $("#HBarCode_B").val(result.data.BarCodeDetailslist[0].HBarCode);
+                            if ($("#HBarCode_B").val() == '') {
+                                $("#HMaterName_B").val("");
+                                $("#HMaterModel_B").val("");
+                                $("#HBatchNo_B").val("");
+                                $("#HUnitName_B").val("");
+                                $("#HQty_B").val("");
+                                $("#HTMQty_B").val("");
+                                $("#HWHName_B").val("");
+                                $("#HSPName_B").val("");
+                            }
+                            else {
+                                $("#HMaterName_B").val(result.data.BarCodeDetailslist[0].HMaterName);
+                                $("#HMaterModel_B").val(result.data.BarCodeDetailslist[0].HMaterModel);
+                                $("#HBatchNo_B").val(result.data.BarCodeDetailslist[0].HBatchNo);
+                                $("#HUnitName_B").val(result.data.BarCodeDetailslist[0].HUnitName);
+                                $("#HQty_B").val(result.data.BarCodeDetailslist[0].HQty);
+                                $("#HTMQty_B").val(result.data.BarCodeDetailslist[0].HTMQty);
+                                $("#HWHName_B").val(result.data.BarCodeDetailslist[0].HWHName);
+                                $("#HSPName_B").val(result.data.BarCodeDetailslist[0].HSPName);
+                            }
+                        }
+                        else {
+                            listOption.cols = [[
+                                { field: '鏁伴噺', title: '鏁伴噺', width: 100 }
+                                , { field: '婧愬崟鏁伴噺', title: '婧愬崟鏁伴噺', width: 100 }
+                                , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 100 }
+                                , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100 }
+                                , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
+                                , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 100 }
+                                , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100 }
+                                , { field: '鏉$爜涓暟', title: '鏉$爜涓暟', width: 100 }
+                            ]];
+                            listOption.data = data;
+                            table.render(listOption);
+
+                            //鏉$爜淇℃伅
+                            $("#HBarCode_B").val("");
+                            $("#HMaterName_B").val("");
+                            $("#HMaterModel_B").val("");
+                            $("#HBatchNo_B").val("");
+                            $("#HUnitName_B").val("");
+                            $("#HQty_B").val("");
+                            $("#HTMQty_B").val("");
+                            $("#HWHName_B").val("");
+                            $("#HSPName_B").val("");
+                        }
+                    }
+                });
+            }
+
+            //#endregion
+
+
+            
+        });
+
+        //浠ヤ笂涓簂ayui妯″潡
+        //姝ゅ鏂规硶娑夊強鍒拌澶栭儴椤甸潰parent.鏂规硶鍚嶈皟鐢ㄧ殑蹇呴』鏀惧湪Layui鏂规硶澶栭儴
+
+        //鐐瑰嚮鎸夐挳閫夋嫨鍚�   杩斿洖浠撳簱淇℃伅
+        function GetHWHValue(obj)
+        {
+            if (obj.length > 0) {
+                $("#HWHName").val(obj[0].HName);
+                $("#HWHID").val(obj[0].HItemID);
+                $("#HStockPlaceName").val("");
+                $("#HStockPlaceID").val("0");
+                if (obj[0].HSPFlag == 0) {
+                    $("#HStockPlaceName").attr("readonly", "readonly");
+                    $('#HSpID-BT').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                }
+                else {
+                    $("#HStockPlaceName").removeAttr("readonly");
+                    $('#HSpID-BT').removeClass("layui-btn-disabled").attr("disabled", false);//鎸夐挳鎭㈠姝e父鐘舵��
+                }
+            }
+        }
+        //鐐瑰嚮鎸夐挳閫夋嫨鍚�   杩斿洖浠撲綅淇℃伅
+        function GetHSpValue(obj) {
+            if (obj.length > 0) {
+                $("#HStockPlaceName").val(obj[0].HName);
+                $("#HStockPlaceID").val(obj[0].HItemID);
+                $("#HWHName").val(obj[0].HWhName);
+                $("#HWHID").val(obj[0].HWHID);
+            }
+        }
+        //鐐瑰嚮鎸夐挳閫夋嫨鍚�   杩斿洖淇濈淇℃伅
+        function GetHKeeperValue(obj) {
+            if (obj.length > 0) {
+                $("#HKeeperName").val(obj[0].HName);
+                $("#HKeeperID").val(obj[0].HItemID);
+            }
+        }
+        //鐐瑰嚮鎸夐挳閫夋嫨鍚�   杩斿洖楠屾敹淇℃伅
+        function GetHSecManagerValue(obj) {
+            if (obj.length > 0) {
+                $("#HSecManagerName").val(obj[0].HName);
+                $("#HSecManagerID").val(obj[0].HItemID);
+            }
+        }
+        //鐐瑰嚮鎸夐挳閫夋嫨鍚�   杩斿洖閮ㄩ棬淇℃伅
+        function GetHDeptNameValue(obj) {
+            if (obj.length > 0) {
+                $("#HDeptName").val(obj[0].HName);
+                $("#HDeptID").val(obj[0].HItemID);
+            }
+        }
+
+        //鍗曟嵁涓婁紶鍓嶅垽鏂�
+        function AllowLoadData(sSubStr) {
+            if (HInterID == 0) {
+                layer.msg("鍗曟嵁鍐呯爜鑾峰彇澶辫触锛岄敊璇殑鍗曟嵁鍐呯爜锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
+            if (HBillNo == '') {
+                layer.msg("鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
+            if (typeof (sSubStr) == "undefined") {
+                layer.msg("娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                return false;
+            }
+            //鍒ゆ柇鏄惁宸叉壂鎻忕墿鏂欐潯鐮�
+            if (!typeof (sSubStr) == "undefined") {
+                for (var i = 0; i <= sSubStr.length - 1; i++) { 
+                    if (parseFloat(sSubStr[i].HQty) > 0) {
+                        s = 1;
+                    }
+                }
+                if (s == 0) {
+                    layer.msg("娌℃湁鎵弿鐗╂枡鏉$爜锛岃鍏堟壂鎻忕墿鏂欐潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return false;
+                }
+            }
+            else {
+                return true;
+            }
+        }
+    </script>
+
+</body>
+</html>
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index e1cb62d..e0abb4f 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -347,6 +347,7 @@
                                                 <dd><a lay-href="鐢熶骇绠$悊/榻愬鍒嗘瀽/JIT_CompleteMaterlDetailList.html" style="margin: 0 0 0 13px;">榻愬鐗╂枡淇℃伅鏄庣粏鍒楄〃</a></dd>
                                                 <dd><a lay-href="鐢熶骇绠$悊/鐢熶骇璁″垝骞冲彴/Sc_ICMOSortBillList.html" style="margin: 0 0 0 13px;">鐢熶骇鏃ヨ鍒掓煡璇�</a></dd>
                                                 <dd><a lay-href="鐢熶骇绠$悊/鐢熶骇璁″垝骞冲彴/Sc_ShopCalendar.html" style="margin: 0 0 0 13px;">宸ュ巶鏃ュ巻</a></dd>
+                                                <dd><a lay-href="鐢熶骇绠$悊/鐢熶骇璁″垝骞冲彴/Sc_WorkBillMonthPlan.html" style="margin: 0 0 0 13px;">鏈堝害鐢熶骇璁″垝</a></dd>
                                             </dl>
                                         </dd>
                                         <dd>
diff --git a/WebTM/views/index_Mobile.html b/WebTM/views/index_Mobile.html
index 742b4e8..d5bed98 100644
--- a/WebTM/views/index_Mobile.html
+++ b/WebTM/views/index_Mobile.html
@@ -369,6 +369,12 @@
                   </a>
                   <dl class="layui-nav-child">
                       <dd>
+                          <a href="WMS鎵爜妯″潡/鐢熶骇鍏ュ簱/Kf_ProductInBill_PDA.html" target="main_self_frame" style="color: aqua;">
+                              <img src="../layuiadmin/myicon/鍗曟嵁褰曞埗.svg" alt="鍗曟嵁褰曞埗" style="width:25px;height:25px;margin-right: 5px;" />
+                              鐢熶骇鍏ュ簱鍗�
+                          </a>
+                      </dd>
+                      <dd>
                           <a href="楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_Fast.html" target="main_self_frame" style="color: aqua;">
                               <img src="../layuiadmin/myicon/鍗曟嵁褰曞埗.svg" alt="鍗曟嵁褰曞埗" style="width:25px;height:25px;margin-right: 5px;" />
                               閲囪喘鍏ュ簱
@@ -378,12 +384,6 @@
                           <a href="楠屾敹鍏ュ簱/濮斿鍏ュ簱/Kf_EntrustInBill_Fast.html" target="main_self_frame" style="color: aqua;">
                               <img src="../layuiadmin/myicon/鍗曟嵁褰曞埗.svg" alt="鍗曟嵁褰曞埗" style="width:25px;height:25px;margin-right: 5px;" />
                               濮斿鍏ュ簱
-                          </a>
-                      </dd>
-                      <dd>
-                          <a href="楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html" target="main_self_frame" style="color: aqua;">
-                              <img src="../layuiadmin/myicon/鍗曟嵁褰曞埗.svg" alt="鍗曟嵁褰曞埗" style="width:25px;height:25px;margin-right: 5px;" />
-                              鐢熶骇鍏ュ簱
                           </a>
                       </dd>
                       <dd>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/Sc_WorkBillMonthPlan.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/Sc_WorkBillMonthPlan.html"
new file mode 100644
index 0000000..fb2dbbc
--- /dev/null
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/Sc_WorkBillMonthPlan.html"
@@ -0,0 +1,564 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>鏈堝害鐢熶骇璁″垝</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <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/soulTable.slim.js"></script>
+</head>
+<body>
+    <div class="layui-fluid" style="padding: 0;">
+        <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+            <div class="layui-card-body" style="padding: 1px;">
+                <form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
+                    <div style="padding: 2px; ">
+                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">鎵撳嵃</button>
+                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btn_qtys" id="btn_qtys">榻愬杩愮畻</button>
+                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button>
+                    </div>
+                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="height:70px;">
+                        <div class="layui-tab-content">
+                            <!--鍩烘湰淇℃伅-->
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-row" style="margin-top:10px;">
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="width: 85px;">骞村害:</label>
+                                        <div class="layui-input-block" style="margin-left: 120px; width: 180px;">
+                                            <select name="HYear" id="HYear" lay-filter="HYear" style="width:190px;">
+                                                <option style="color:blue;" selected="selected" value="2023">2023</option>
+                                                <option style="color:blue;" value="2024">2024</option>
+                                            </select>
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="width: 85px;">鏈堝害</label>
+                                        <div class="layui-input-block" style="margin-left: 120px; width: 180px;">
+                                            <select name="HMonth" id="HMonth" lay-filter="HMonth" style="width:190px;">
+                                                <option style="color:blue;" selected="selected" value="1">1</option>
+                                                <option style="color:blue;" value="1">1</option>
+                                            </select>
+                                        </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 ForFilteringSchemes" value="" style="float: left; width: 150px; display: inline-block; background-color: #efefef4d;" readonly>
+                                            <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input ForFilteringSchemes" value="0">
+                                            <button type="button" class="layui-btn" lay-submit="" lay-filter="btnHDept" id="btnHDept" 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" style="width: 85px;">缁勭粐</label>
+                                        <div class="layui-input-block" style="margin-left: 120px; width: 150px;">
+                                            <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+                                                <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+                                            </select>
+                                        </div>
+                                    </div>
+                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                        鏌ヨ
+                                    </button>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="height:400px;">
+                        <ul class="layui-tab-title" lay-filter="tab-all">
+                            <li lay-id="1" style="padding:1px;" class="layui-this">鏈堝害璁″垝</li>
+                        </ul>
+                        <div class="layui-tab-content">
+                            <!--瀛愯〃1-->
+                            <div class="layui-tab-item layui-show">
+                                <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                <script type="text/html" id="toolbarDemo">
+                                    <div class="layui-btn-container">
+                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Del"><i class="layui-icon layui-icon-form"></i>鍙栨秷鎺掑崟</button>
+                                    </div>
+                                </script>
+                            </div>
+                        </div>
+                    </div>
+
+                    <div class="layui-tab" lay-filter="tab-POStockInBill" style="height:400px;">
+                        <ul class="layui-tab-title" lay-filter="tab-all">
+                            <li lay-id="1" style="padding:1px;" class="layui-this">鐢熶骇璁㈠崟淇℃伅</li>
+                        </ul>
+                        <div class="layui-tab-content">
+                            <!--瀛愯〃2-->
+                            <div class="layui-tab-item layui-show">
+                                <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+                                <script type="text/html" id="toolbarDemo1">
+                                    <div class="layui-btn-container">
+                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Add"><i class="layui-icon layui-icon-form"></i>鎺掑崟</button>
+                                    </div>
+                                </script>
+                            </div>
+                        </div>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+    <!--瀛愯〃1锛氬垹闄�-->
+    <script type="text/html" id="barDemo">
+        <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element','soulTable'], function () {
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , soulTable = layui.soulTable
+                , element = layui.element;
+
+            //妯″潡鍚�
+            var titleData = ["HMaterID", "HDeptID", "HInterID","HEntryID"];
+            var HBillType = "3703";
+            var sWhere = "";
+            //琛ㄦ牸娓叉煋鍙傛暟
+            var option = [];            //琛�1娓叉煋鍙傛暟
+            var option1 = [];           //琛�2娓叉煋鍙傛暟
+
+            //#endregion
+
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+
+            //#endregion
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+            //鏌ヨ
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery();
+                get_WriteConfigFile();
+            });
+
+            //閮ㄩ棬
+            form.on('submit(btnHDept)', function (data) {
+                btnHDept();
+            });
+
+            //閫�鍑�
+            form.on('submit(btnEdit)', function (data) {
+                Pub_Close(2);
+            });
+
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable1)', function (obj) {
+                switch (obj.event) {
+                    //鎺掑崟
+                    case 'set_Add': set_Add();
+                        break;
+                };
+            });
+
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                switch (obj.event) {
+                    //鍙栨秷鎺掑崟
+                    case 'set_Del': set_Del();
+                        break;
+                };
+            });
+
+            //#endregion
+
+            //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+            function set_ClearBill() {
+                Organ();
+                get_ReadConfigFile();
+                  //涓嬫媺鍒楄〃鍒濆鍖�
+                Init_selectYearAndMonth();
+                get_FastQuery();
+              
+              
+            }
+
+            //缁勭粐
+            function Organ() {
+                //鑾峰彇鐧诲綍椤电粍缁囧垪
+                var Organization = '';
+                $.ajax({
+                    type: "get",
+                    url: GetWEBURL() + "/Web/GetOrganizations",
+                    success: function (result) {
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+                            }
+                            $("#HOrgID").append(Organization);
+                            $("#HOrgID").val(sessionStorage["OrganizationID"]);
+                            form.render('select');
+                        }
+                        layer.closeAll("loading");
+                    }
+                })
+            }
+
+            //涓嬫媺鍒楄〃鍒濆鍖�
+            function Init_selectYearAndMonth() {
+                // 椤甸潰鍒濆闇�瑕佺殑鍛ㄥ拰鏈堢殑鏁版嵁
+                const date = new Date();
+
+                //鍒濆鍖栧勾涓嬫媺鍒楄〃
+                var Year = date.getFullYear();
+                var YearList = [];
+                var YearSelect = "";
+                for (var i = Year - 5; i < Year + 5; i++) {
+                    YearList.push(i);
+                }
+                for (var i = 0; i < YearList.length; i++) {
+                    YearSelect += '<option  style="color:blue;" value="' + YearList[i] + '">' + YearList[i] + '</option>';
+                }
+                $("#HYear").empty();
+                $("#HYear").append(YearSelect);
+                $("#HYear").val(Year);
+                form.render('select');
+
+             //鍒濆鍖栨湀涓嬫媺鍒楄〃
+                var Month = date.getMonth() + 1;
+                var MonthSelect = "";
+
+                for (var i = 0; i < 12; i++) {
+                    MonthSelect += '<option  style="color:blue;" value="' + (i + 1) + '">' + (i + 1) + '</option>';
+                }
+                $("#HMonth").empty();
+                $("#HMonth").append(MonthSelect);
+                $("#HMonth").val(Month);
+                form.render('select');
+            }
+
+            //閮ㄩ棬
+            function btnHDept() {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '閮ㄩ棬鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.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 != 1) {
+                            return layer.msg('璇烽�夋嫨涓�鏉℃暟鎹�');
+                        }
+                        $("#HDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
+                        $("#HDeptID").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                });
+            }
+
+            //鏌ヨ鏈堝害璁″垝淇℃伅
+            function set_WorkBillMonthPlanList(sWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Sc_WorkBillMonthPlan/Sc_WorkBillMonthPlanList',
+                    type: "GET",
+                    async: false,
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            layer.close(ajaxLoad);
+
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left' });
+                            for (var i = 0; i < data.length; i++) {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , height: 350
+                                , page: true //寮�鍚垎椤�
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                                , cols: [col]
+                                , data: data1.data
+                                , done: function (res, curr, count) {
+                                    soulTable.render(this);
+                                }
+                            };
+                            table.render(option);
+
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.msg(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+
+            }
+
+            //鏌ヨ鐢熶骇璁㈠崟淇℃伅
+            function set_DisplayICMOList() {
+                var sWheres = "";
+                var HDeptID  =$("#HDeptID").val();
+                if (HDeptID != 0) {
+                    sWheres = " and HDeptID=" + HDeptID;
+                }
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Sc_WorkBillMonthPlan/Sc_WorkBillMonthPlan',
+                    type: "GET",
+                    async: false,
+                    data: { "sWhere": sWheres, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            layer.close(ajaxLoad);
+
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                                var patrn = new RegExp(/^h/i);
+                                if (patrn.test(data1.list[key].ColmCols)) {
+                                    titleData.push(data1.list[key].ColmCols);
+                                }
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left' });
+                            for (var i = 0; i < data.length; i++) {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+                            option1 = {
+                                elem: '#mainTable1'
+                                , toolbar: '#toolbarDemo1'
+                                , height: 350
+                                , page: true //寮�鍚垎椤�
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                                , cols: [col]
+                                , data: data1.data
+                                , done: function (res, curr, count) {
+                                    soulTable.render(this);
+                                }
+                            };
+                            table.render(option1);
+
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.msg(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+
+            }
+
+            //蹇�熻繃婊�
+            function get_FastQuery() {
+                var HYear = $("#HYear").val();
+                var HMonth = $("#HMonth").val();
+                var HDeptID = $("#HDeptID").val();
+
+                if (HYear) {
+                    sWhere += " and year(鏃ユ湡) =" + HYear ;
+                }
+
+                if (HMonth) {
+                    sWhere += "and month(鏃ユ湡) =" + HMonth ;
+                }
+
+                if (HDeptID != 0) {
+                    sWhere += "and HDeptID ='" + HDeptID + "'";
+                }
+
+                //鏌ヨ鐢熶骇璁㈠崟淇℃伅
+                set_DisplayICMOList();
+                //鏌ヨ鎺掑崟鏈堝害璁″垝
+                set_WorkBillMonthPlanList(sWhere);
+                sWhere = "";
+            }
+
+            //鎺掑崟
+            function set_Add() {
+                var checkStatus = table.checkStatus('mainTable1')
+                    , data = checkStatus.data;
+                if (data.length != 0) {
+                    var HDeptID = $("#HDeptID").val();
+                    if (HDeptID != 0) {
+
+                        layer.confirm("纭鎺掑崟鍚�?", function (index) {
+                            var datas = [];
+                            for (var i = 0; i < data.length; i++) {
+                                var HInterID = data[i].HInterID;
+                                var HEntryID = data[i].HEntryID;
+                                datas.push(HInterID + "_" + HEntryID);
+                            }
+                            var ajaxLoad = layer.load();
+
+                            var sMainSub = datas + ';' + HDeptID + ';' + sessionStorage["HUserName"];
+                            $.ajax({
+                                url: GetWEBURL() + '/Sc_WorkBillMonthPlan/Add_WorkBillMonthPlanList',
+                                type: "post",
+                                async: false,
+                                data: { "msg": sMainSub },
+                                success: function (data1) {
+                                    if (data1.count == 1) {
+                                        layer.msg(data1.Message);
+                                        get_FastQuery();
+                                        layer.close(ajaxLoad);
+                                    } else {
+                                        layer.close(ajaxLoad);
+                                        layer.msg(data1.code + data1.Message, { icon: 5 });
+                                    }
+                                }, error: function () {
+                                    layer.close(ajaxLoad);
+                                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                }
+                            });
+                        })
+                    } else {
+                        layer.msg("璇烽�夋嫨閮ㄩ棬!")
+                    }
+                } else {
+                    layer.msg("璇烽�夋嫨鏁版嵁杩涜鎺掑崟!")
+                }
+            }
+
+            //鍙栨秷鎺掑崟
+            function set_Del() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (data.length != 0) {
+                    var HDeptID = $("#HDeptID").val();
+                    if (HDeptID != 0) {
+
+                        layer.confirm("纭鍙栨秷鎺掑崟鍚�?", function (index) {
+                            var datas = [];
+                            for (var i = 0; i < data.length; i++) {
+                                var HInterID = data[i].HInterID;
+                                datas.push(HInterID);
+                            }
+                            var ajaxLoad = layer.load();
+
+                            $.ajax({
+                                url: GetWEBURL() + '/Sc_WorkBillMonthPlan/DelWorkBillMonthPlanList',
+                                type: "get",
+                                async: false,
+                                data: { "HInterID": datas.toString(), "user": sessionStorage["HUserName"] },
+                                success: function (data1) {
+                                    if (data1.count == 1) {
+                                        layer.msg(data1.Message);
+                                        get_FastQuery();
+                                        layer.close(ajaxLoad);
+                                    } else {
+                                        layer.close(ajaxLoad);
+                                        layer.msg(data1.code + data1.Message, { icon: 5 });
+                                    }
+                                }, error: function () {
+                                    layer.close(ajaxLoad);
+                                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                }
+                            });
+                        })
+                    } else {
+                        layer.msg("璇烽�夋嫨閮ㄩ棬!")
+                    }
+                } else {
+                    layer.msg("璇烽�夋嫨鏁版嵁杩涜鎺掑崟!")
+                }
+            }
+
+            //璇诲彇閰嶇疆鏂囦欢
+            function get_ReadConfigFile() {
+                //鑾峰彇鏈湴瀛樺偍鐨勬暟鎹�
+                var data = localStorage.getItem("Sc_WorkBillMonthPlan");
+                if (data != null) {
+                    var data2 = JSON.parse(data);
+                    $("#HDeptID").val(data2["HDeptID"]);
+                    $("#HDeptName").val(data2["HDeptName"]);
+                    form.render('select');
+                }
+            }
+
+            //瀛樺偍閰嶇疆鏂囦欢
+            function get_WriteConfigFile() {
+                //娓呯┖鏈湴瀛樺偍鐨勬暟鎹�
+                localStorage.removeItem("Sc_WorkBillMonthPlan");
+                var data = {
+                    HDeptID: $("#HDeptID").val()
+                    , HDeptName: $("#HDeptName").val()
+                }
+                //鏈湴瀛樺偍
+                localStorage.setItem("Sc_WorkBillMonthPlan", JSON.stringify(data));
+            }
+
+
+            //#endregion
+        });
+
+
+    </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/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBackBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBackBillList.html"
index dd12c2a..1d37a02 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBackBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Cg_POInStockBackBillList.html"
@@ -610,7 +610,7 @@
                         $.ajax({
                             type: "GET",
                             url: GetWEBURL() + "/Cg_POInStockBackBill/DeltetCg_POInStockBackBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                            data: { "HInterID": InterID },
+                            data: { "HInterID": InterID, "user": sessionStorage["HUserName"]},
                             success: function (result) {
                                 if (result.count == 1) {
                                     layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
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 5a2005d..7ded224 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"
@@ -707,7 +707,7 @@
                         $.ajax({
                             type: "GET",
                             url: GetWEBURL() + "/Cg_POOrderBill/DeltetCg_POOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                            data: { "HInterID": InterID },
+                            data: { "HInterID": InterID, "user": sessionStorage["HUserName"]},
                             success: function (result) {
                                 if (result.count == 1) {
                                     layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBillList.html"
index cfa290e..b7aedbd 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBillList.html"
@@ -198,6 +198,39 @@
                             }
                         });
                         break;
+                    case 'btn-Edit':
+                        var checkStatus = table.checkStatus('mainTable')
+                            , data = checkStatus.data;
+                        if (checkStatus.data.length === 1) {
+                            var hID = data[0].hmainid.toString();
+                            //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+                            layer.open({
+                                type: 2
+                                , area: ['100%', '100%']
+                                , title: '缂栬緫閲囪喘閫�鏂欏崟'
+                                , closeBtn: 1
+                                , shade: 0.6 //閬僵閫忔槑搴�
+                                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                                , content: '../../楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill_Add_Up.html?OperationType=3&linterid=' + hID + '&HSouceBillType=0&closeType=1'
+                                , resize: false,
+                                end: function () {
+                                    //鍒锋柊椤甸潰,
+                                    location.reload();
+                                }
+                                , cancel: function () {
+                                    //$(".layui-btn").removeClass("layui-btn-disabled");
+                                }
+                            })
+
+                        } else {
+                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                        }
+
+                        break;
+                    //鍒犻櫎鎸夐挳
+                    case 'btn-Delete': set_DeleteBill();
+                        break;
                     //瀹℃牳
                     case 'btn-Audit':
                         set_AuditBill();
@@ -415,6 +448,48 @@
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
 
+            //鍒犻櫎
+            function set_DeleteBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var Hmainid = data[0].hmainid.toString();
+                    var HsupId = data[0].hsubid;
+                    //閫昏緫鍒犻櫎鏂规硶
+                    layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                        var wait = layer.load();
+                        $.ajax({
+                            type: "GET",
+                            url: GetWEBURL() + "/Kf_POStockInBackBill/DeltetKf_POStockInBackBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            data: { "Hmainid": Hmainid, "HsupId": HsupId,"user": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                        // 寰楀埌frame绱㈠紩
+                                        var index = layer.getFrameIndex(window.name);
+                                        //鍏抽棴褰撳墠frame
+                                        layer.close(index);
+                                        //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                        window.location.reload();
+                                    });
+
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                }
+                                layer.close(wait);
+                            }, error: function () {
+                                layer.close(wait);
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                            }
+                        });
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                }
+            }
+
+
             //瀹℃牳
             function set_AuditBill() {
                 var checkStatus = table.checkStatus('mainTable')

--
Gitblit v1.9.1