From 8e40976122471815b43efab130af3146dd1a00ad Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期一, 25 七月 2022 17:07:09 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI

---
 WebTM/views/生产管理/提料计划/JIT_LiftMaterPlaBillnList.html    |    2 
 WebTM/views/工资管理/考勤汇报单/Pay_WorkTimesBillList_yqn.html   |  349 +++++++
 WebTM/views/Baseset/基础资料/Gy_EmployeeList.html           |    1 
 WebTM/views/生产管理/拣料配送单/JIT_ComplementGoodsList.html     |   18 
 WebTM/views/生产管理/要料计划/JIT_NeedMaterPlanBillList.html    |    2 
 WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html        |  389 ++++++++
 WebTM/views/工资管理/工资结算单(个人)/Pay_SingleBalBillList.html   |   29 
 WebTM/views/生产管理/要料计划/JIT_NeedMaterPlanBillEdit.html    |  125 ++
 WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBill.html      |  155 +++
 WebTM/views/生产管理/生产日计划工单/JIT_DayPlanBillList.html       |   13 
 WebTM/views/销售管理/销售订单/Xs_SeOrderBillDyColList.html      |  327 +++++++
 WebTM/views/工资管理/考勤汇报单/Pay_WorkTimesBillEdit_yqn.html   |  962 +++++++++++++++++++++
 WebTM/views/基础资料/公用基础资料/Gy_WorkCenterDyCol.html         |  245 +++++
 WebTM/views/生产管理/生产叫料平台/JIT_ComplementGoodBillMain.html |    8 
 WebTM/views/index.html                                  |   11 
 WebTM/WebTM.csproj                                      |    4 
 16 files changed, 2,546 insertions(+), 94 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 677b625..2f9c029 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -160,6 +160,7 @@
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_WorkPayType.html" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_WorkType.html" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Pay_PeriodInfoSet.html" />
+    <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_WorkCenterDyCol.html" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_WorkPayType.html" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_WorkType.html" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Pay_PeriodInfoSet.html" />
@@ -726,7 +727,9 @@
     <Content Include="views\宸ヨ祫绠$悊\鏍哥畻鏂瑰紡\Gy_ClassTimePrjSubBillList.html" />
     <Content Include="views\宸ヨ祫绠$悊\鐝粍鑱屽憳娓呭崟\Gy_GroupEmpBillEdit.html" />
     <Content Include="views\宸ヨ祫绠$悊\鐝粍鑱屽憳娓呭崟\Gy_GroupEmpBillList.html" />
+    <Content Include="views\宸ヨ祫绠$悊\鑰冨嫟姹囨姤鍗昞Pay_WorkTimesBillEdit_yqn.html" />
     <Content Include="views\宸ヨ祫绠$悊\鑰冨嫟姹囨姤鍗昞Pay_WorkTimesBillEdit.html" />
+    <Content Include="views\宸ヨ祫绠$悊\鑰冨嫟姹囨姤鍗昞Pay_WorkTimesBillList_yqn.html" />
     <Content Include="views\宸ヨ祫绠$悊\鑰冨嫟姹囨姤鍗昞Pay_WorkTimesBillList.html" />
     <Content Include="views\妯℃不鍏风鐞哱鍣ㄥ叿鎶ヨ〃\ReportInventoryAccount.html" />
     <Content Include="views\妯℃不鍏风鐞哱鍣ㄥ叿鎶ヨ〃\ReportMaterialReceipt.html" />
@@ -979,6 +982,7 @@
     <Content Include="views\閲囪喘绠$悊\閲囪喘閫�鏂欏崟\Cg_PurchaseReturnList.html" />
     <Content Include="views\閲囪喘绠$悊\閲囪喘閫�鏂欏崟\Cg_PurchaseReturn_Add_Up.html" />
     <Content Include="views\閿�鍞鐞哱鍙戣揣閫氱煡鍗昞Add_Edit_Xs_SeOutStockBillList.html" />
+    <Content Include="views\閿�鍞鐞哱閿�鍞鍗昞Xs_SeOrderBillDyColList.html" />
     <Content Include="views\閿�鍞鐞哱閿�鍞��璐у崟\Add_Edit_Kf_ICStockBillMainList.html" />
     <Content Include="views\閿�鍞鐞哱閿�鍞��璐у崟\Kf_ICStockBillMainList.html" />
     <Content Include="views\閿�鍞鐞哱閿�鍞鍗昞Add_Edit_Xs_SeOrderBillList.html" />
diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EmployeeList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EmployeeList.html"
index 5654ede..23f3bfb 100644
--- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EmployeeList.html"
+++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_EmployeeList.html"
@@ -101,6 +101,7 @@
                 , { field: 'HItemID', width: 150, title: '鑱屽憳ID', hide: true }
                 , { field: 'HNumber', width: 150, title: '鑱屽憳浠g爜' }
                 , { field: 'HName', width: 150, title: '鑱屽憳鍚嶇О', sort: true }
+                , { field: 'HEmpRate', width: 150, title: '鑱屽憳绯绘暟', sort: true }
               ]]
               , page: true
             });
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 97b8b50..56f91a1 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -382,7 +382,7 @@
                                             <a>鏃ヨ鍒掑伐鍗�</a>
                                             <dl class="layui-nav-child">
                                                 <dd><a lay-href="鐢熶骇绠$悊/鐢熶骇鏃ヨ鍒掑伐鍗�/JIT_DayPlanBillList.html" style="margin: 0 0 0 13px;">鏃ヨ鍒掑伐鍗曞垪琛�</a></dd>
-                                                <dd><a lay-href="鐢熶骇绠$悊/鐢熶骇鏃ヨ鍒掑伐鍗�/JIT_DayPlanBillEdit.html" style="margin: 0 0 0 13px;">鏃ヨ鍒掑伐鍗�</a></dd>-->
+                                                <!--<dd><a lay-href="鐢熶骇绠$悊/鐢熶骇鏃ヨ鍒掑伐鍗�/JIT_DayPlanBillEdit.html" style="margin: 0 0 0 13px;">鏃ヨ鍒掑伐鍗�</a></dd>-->
                                              </dl>
                                         </dd>
                                         <dd>
@@ -492,7 +492,7 @@
                                         <dd><a lay-href="鐢熶骇绠$悊/閫�鏂欑敵璇峰崟/JIT_CallGoodsBackRequestBillList.html">閫�鏂欑敵璇峰崟鍒楄〃</a></dd>
                                         <dd><a lay-href="杞﹂棿绠$悊/鍙枡绠$悊/鍙枡閫�鏂欏崟/Jl_CallGoodsBillBackMain.html">鍙枡閫�鏂欏崟鍒楄〃</a></dd>
                                         <dd><a lay-href="杞﹂棿绠$悊/杞﹂棿鏀舵枡/JIT_SendGoodsBillList.html">杞﹂棿鏀舵枡鍒楄〃</a></dd>
-                                        <dd><a lay-href="杞﹂棿绠$悊/鍙枡绠$悊/鎷f枡閰嶉�佸崟/Jl_ComplementGoodsBillMain.html">鎷f枡閰嶉�佸崟鍒楄〃(-)</a></dd>
+                                        <!--<dd><a lay-href="杞﹂棿绠$悊/鍙枡绠$悊/鎷f枡閰嶉�佸崟/Jl_ComplementGoodsBillMain.html">鎷f枡閰嶉�佸崟鍒楄〃(-)</a></dd>-->
                                         <dd><a lay-href="杞﹂棿绠$悊/鍙枡绠$悊/鐢熶骇鏃ヨ鍒掑崟/Sc_WorkBillAutoSortBillMain.html">鐢熶骇鏃ヨ鍒掑崟鍒楄〃</a></dd>
                                     </dl>
                                 </dd>
@@ -753,6 +753,13 @@
                                     </dl>
                                 </dd>
                                 <dd>
+                                    <a>鑰冨嫟姹囨姤鍗昣闆呯惇璇�</a>
+                                    <dl class="layui-nav-child">
+                                        <dd><a lay-href="宸ヨ祫绠$悊/鑰冨嫟姹囨姤鍗�/Pay_WorkTimesBillEdit_yqn.html">鑰冨嫟姹囨姤鍗�</a></dd>
+                                        <dd><a lay-href="宸ヨ祫绠$悊/鑰冨嫟姹囨姤鍗�/Pay_WorkTimesBillList_yqn.html">鑰冨嫟姹囨姤鍗曠淮鎶�</a></dd>
+                                    </dl>
+                                </dd>
+                                <dd>
                                     <a>鎵hˉ璧勬枡</a>
                                     <dl class="layui-nav-child">
                                         <dd><a lay-href="宸ヨ祫绠$悊/Gy_DuSubsidyItemBillList.html">鎵hˉ宸ヨ祫璧勬枡缁存姢</a></dd>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenterDyCol.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenterDyCol.html"
new file mode 100644
index 0000000..b878b7e
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkCenterDyCol.html"
@@ -0,0 +1,245 @@
+锘�<!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">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <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>
+
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 85px;">宸ヤ綔涓績浠g爜</label>
+                                    <div class="layui-input-block" style="margin-left: 120px;">
+                                        <input type="text" class="layui-input" name="HNumber" id="HNumber">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 85px;">宸ヤ綔涓績鍚嶇О</label>
+                                    <div class="layui-input-block" style="margin-left: 120px;">
+                                        <input type="text" class="layui-input" name="HName" id="HName">
+                                    </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: 185px;">
+                                        <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">
+                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                </button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                            </div>
+                        </div>
+                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script>
+
+        var treeCkData = { id: 0 };
+        var TagId = "";
+        var TagParentId = "";
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util'], function () {
+            //#region 鍏敤鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+                , util = layui.util
+                , tree = layui.tree
+                , util = layui.util
+            var sWhere = "";
+            var option = [];
+            //#endregion
+
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+
+            //#endregion
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+            //#region 閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                set_ClearQuery();
+            });
+            //#endregion
+
+            //#region 鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery(2);
+            });
+            //#endregion
+
+            //#endregion
+
+            //#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉�
+
+            //#region 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                Organ();
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                //get_FastQuery(1);
+                get_Display("");
+            }
+            //#endregion
+
+            //#region 鍒濆鍖栬〃鏍兼柟娉�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    //, toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , page: true
+                    , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                };
+            }
+            //#endregion
+
+            //鑾峰彇缁勭粐
+            function Organ() {
+                //鑾峰彇鐧诲綍椤电粍缁囧垪
+                $.ajax({
+                    type: "get",
+                    url: GetWEBURL() + "/Web/GetOrganizations",
+                    success: function (result) {
+                        var Organization = "";
+                        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");
+                    }
+                })
+            }
+
+            //#region 鏌ヨ
+            function get_Display(sWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Gy_WorkCenter/Gy_WorkCenterDyCollist',
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": "admin" },//sessionStorage["HUserName"]
+                    success: function (data1) {
+                        var col = [];
+                        if (data1.count == 1) {
+                            var data = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍒ゆ柇鏄惁鏄函鑻辨枃
+                            var patrn = new RegExp("[\u4E00-\u9FA5]+");
+                            for (var i = 0; i < data.length; i++) {
+                                if (!patrn.test(data[i].name)) {
+                                    col.push({ field: data[i].name, title: data[i].name, hide: true }); //闅愯棌鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        case 'DateTime':
+                                            col.push({ field: data[i].name, 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].name, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+                            option.cols = [col];
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.close(ajaxLoad);
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 蹇�熻繃婊�
+            function get_FastQuery(number) {
+                var HOrgID = "";
+                var HNumber = $("#HNumber").val();
+                var HName = $("#HName").val();
+                if (number == 1) {
+                    HOrgID = sessionStorage["OrganizationID"];
+                }
+                else {
+                    HOrgID = $("#HOrgID").val();//缁勭粐
+                }
+
+                if (HNumber) {
+                    sWhere += " and 宸ヤ綔涓績浠g爜 like '%" + HNumber + "%'";
+                }
+                if (HName) {
+                    sWhere += " and 宸ヤ綔涓績鍚嶇О like '%" + HName + "%'";
+                }
+                if (HOrgID) {
+                    sWhere += " and HUSEORGID = '" + HOrgID + "'";
+                }
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            //#endregion
+
+            //#region 閲嶇疆杩囨护鏉′欢鏂规硶
+            function set_ClearQuery() {
+                $("#HNumber").val("");
+                $("#HName").val("");
+                $("#HOrgID").val(sessionStorage["OrganizationID"]);
+                form.render('select');
+                sWhere = "";
+            }
+            //#endregion
+
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+            //#endregion
+    </script>
+
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillList.html"
index fcc060d..2e87107 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillList.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\267\245\350\265\204\347\273\223\347\256\227\345\215\225\050\344\270\252\344\272\272\051/Pay_SingleBalBillList.html"
@@ -126,15 +126,17 @@
 
             //#region 鍒濆鍖栫晫闈�
             function set_ClearBill() {
+                $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                 //鍒濆鍖栬〃鏍�
                 set_InitGrid();
                 //鏌ヨ
-                get_Display(sWhere);
+                get_FastQuery();
             }
             //#endregion
             //#region 鍒濆鍖栬〃鏍兼柟娉�
-            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
-            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+           
             function set_InitGrid() {
                 option = {
                     elem: '#mainTable'
@@ -316,27 +318,6 @@
                         break;
                 };
             });
-
-            ////杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
-            //$.ajax({
-            //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-            //    url: GetWEBURL() + '/Sc_MouldProdOutBill/GetMouldProdOutBill',
-            //    type: "GET",
-            //    data: { "sWhere": sWhere},
-            //    success: function (data1) {
-            //        if (data1.count == 1) {
-            //            option.data = data1.data;
-            //            table.render(option);
-            //            layer.close(index);
-            //        } else {
-            //            layer.close(index);
-            //            layer.alert(data1.code + data1.Message, { icon: 5 });
-            //        }
-            //    }, error: function () {
-            //        layer.close(index);
-            //        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
-            //    }
-            //});
 
             //#region 蹇�熻繃婊�
             function get_FastQuery(table, option) {
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillEdit_yqn.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillEdit_yqn.html"
new file mode 100644
index 0000000..72b52d1
--- /dev/null
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillEdit_yqn.html"
@@ -0,0 +1,962 @@
+锘�<!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/layui/layui.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/zgqCustom/zgqCustom.js"></script>
+    <style type="text/css">
+        .layui-form-item .layui-inline {
+            margin-right: 0;
+        }
+
+        html {
+            background-color: white;
+            color: white;
+        }
+
+        .layui-table-cell {
+            overflow: visible !important;
+        }
+
+        td .layui-form-select {
+            margin-top: -10px;
+            margin-left: -15px;
+            margin-right: -15px;
+        }
+    </style>
+</head>
+<body>
+
+    <div class="layui-fluid" style="padding: 0;">
+        <div class="layui-card" style="padding: 15px;">
+            <div class="layui-card-body" style="padding: 1px;">
+                <form class="layui-form" lay-filter="component-form-group" action="">
+                    <div class="layui-card-header">
+                        <div class="layui-btn-group">
+                            <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button>
+                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
+                        </div>
+                    </div>
+                    <div class="layui-tab" lay-filter="tab-POStockInBill">
+                        <h1 style="text-align: center; padding: 10px 0;"><b>鑰冨嫟姹囨姤鍗�</b></h1>
+                        <ul class="layui-tab-title" lay-filter="tab-all">
+                            <li lay-id="1" style="padding:1px;" class="layui-this">鍩烘湰淇℃伅</li>
+                            <li lay-id="2" style="padding:1px;">鍒跺崟淇℃伅</li>
+                        </ul>
+                        <div class="layui-tab-content">
+                            <!--鍩烘湰淇℃伅-->
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-form-item" style="padding-top: 10px;">
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HInterID" id="HInterID" value="0">
+                                                <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID">
+                                                <input type="hidden" name="HGroupID" id="HGroupID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label">鏃ユ湡</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd">
+                                            </div>
+                                        </div>
+                                        <div class="layui-col-xs3 layui-inline">
+                                            <label class="layui-form-label">骞冲潎宸ヨ祫</label>
+                                            <div class="layui-input-inline">
+                                                <input class="layui-input" name="HAvgMoney" id="HAvgMoney" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs7 layui-inline">
+                                            <label class="layui-form-label">澶囨敞</label>
+                                            <div class="layui-input-block">
+                                                <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                            <!--鍒跺崟淇℃伅-->
+                            <div class="layui-tab-item">
+                                <div class="layui-form-item">
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">瀹℃牳浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">淇敼浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">浣滃簾浜�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row">
+
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">瀹℃牳鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">浣滃簾鏃ユ湡</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+
+
+
+                        <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+
+                            </div>
+                        </script>
+                        <script type="text/html" id="xuhao">
+                            {{d.LAY_TABLE_INDEX+1}}
+                        </script>
+                </form>
+            </div>
+        </div>
+        <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 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>
+
+            layui.config({
+                base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+            }).extend({
+                index: 'lib/index' //涓诲叆鍙fā鍧�
+            }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+                var $ = layui.$
+                    , admin = layui.admin
+                    , layer = layui.layer
+                    , table = layui.table
+                    , form = layui.form
+                    , laydate = layui.laydate
+                    , element = layui.element;
+
+                var params = get_UrlVars();
+                if (typeof (params[params[0]]) == "undefined") {
+                    var OperationType = 1;//鎿嶄綔绫诲瀷
+                    var closeType = 2;  //鍏抽棴绫诲瀷
+                } else {
+                    var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+                    var linterid = params[params[1]];//婧愬崟id
+                    var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
+                    var closeType = params[params[3]];  //鍏抽棴绫诲瀷
+                }
+                var hID = params[params[1]];//缂栬緫鏌ョ湅
+
+                //甯歌鐢ㄦ硶
+                laydate.render({
+                    elem: '#HDate',
+                    done: function (value, date, endDate) {//value, date, endDate鐐瑰嚮鏃ユ湡銆佹竻绌恒�佺幇鍦ㄣ�佺‘瀹氬潎浼氳Е鍙戙�傚洖璋冭繑鍥炰笁涓弬鏁帮紝鍒嗗埆浠h〃锛氱敓鎴愮殑鍊笺�佹棩鏈熸椂闂村璞°�佺粨鏉熺殑鏃ユ湡鏃堕棿瀵硅薄
+                        calcAvgMoney(value);
+                    }
+                });
+
+                var tableReload = table.reload;
+                var option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , height: 500
+                    //,url: '/demo/table/user/' //鏁版嵁鎺ュ彛
+                    , page: true //寮�鍚垎椤�
+                    , cols: [[ //琛ㄥご
+                        { type: 'checkbox', fixed: 'left' }
+                        , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
+                        , { field: 'HEmpID', title: 'HEmpID', edit: 'text', width: 100, hide: true }
+                        , { field: 'HEmpNumber', title: '鑱屽憳浠g爜', edit: 'text', event: 'HEmpCheck', width: 150 }
+                        , { field: 'HEmpName', title: '鑱屽憳鍚嶇О', edit: 'text', width: 100 }
+                        , { field: 'HEmpRate', title: '鑱屽憳绯绘暟', edit: 'text', width: 100 }
+                        , { field: 'HPMTimes', title: '宸ヤ綔宸ユ椂', edit: 'text', width: 100, }
+                        , { field: 'HAMTimes', title: '鏍囧噯宸ユ椂', edit: 'text', width: 100 }
+                        , { field: 'HMoney', title: '宸ヨ祫', width: 100 }
+                        , { field: 'HRemark', title: '澶囨敞', edit: 'text', width: 100 }
+                        , { field: 'HBaseTimes', title: '鍩烘湰宸ユ椂', width: 100, hide: true, hide: true }
+                        , { field: 'HBaseDays', title: '鍩烘湰澶╂暟', edit: 'text', width: 100, hide: true }
+                        , { field: 'HOverTimes', title: '鍔犵彮宸ユ椂', edit: 'text', width: 100, hide: true }
+                        , { field: 'HOverDays', title: '鍔犵彮澶╂暟', edit: 'text', width: 100, hide: true }
+                        , { field: 'HLeaveTimes', title: '璇峰亣宸ユ椂', edit: 'text', width: 100, hide: true }
+                        , { field: 'HLeaveDays', title: '璇峰亣澶╂暟', edit: 'text', width: 100, hide: true }
+                        , { field: 'HLateQty', title: '杩熷埌娆℃暟', edit: 'text', width: 100, hide: true }
+                        , { field: 'HLateTimes', title: '杩熷埌鏃堕棿', edit: 'text', width: 100, hide: true }
+                        , { field: 'HEarlyQty', title: '鏃╅��娆℃暟', edit: 'text', width: 100, hide: true }
+                        , { field: 'HEarlyTimes', title: '鏃╅��鏃堕棿', edit: 'text', width: 100, hide: true }
+                        , { field: 'HOutForEmpQty', title: '绉佸嚭娆℃暟', edit: 'text', width: 100, hide: true }
+                        , { field: 'HOutForEmpTimes', title: '绉佸嚭鏃堕棿', edit: 'text', width: 100, hide: true }
+                        , { field: 'HOutForComQty', title: '鍏嚭娆℃暟', edit: 'text', width: 100, hide: true }
+                        , { field: 'HOutForComTimes', title: '鍏嚭鏃堕棿', edit: 'text', width: 100, hide: true }
+                        , { field: 'HAbsentDays', title: '鏃峰伐澶╂暟', edit: 'text', width: 100, hide: true }
+                        , { field: 'HRestFlag', title: '鍘備紤', edit: 'text', value: "true", width: 100, hide: true }
+                        , { field: 'HSchClassID', title: '鐝', edit: 'text', width: 100, hide: true }
+                        , { field: 'HCTPrjID', title: '鏍哥畻鏂规浠g爜', edit: 'text', width: 100, hide: true }
+                        , { field: 'HCTPrjName', title: '鏍哥畻鏂规鍚嶇О', edit: 'text', event: 'HCTPrjName', width: 100, hide: true }
+                        , { field: 'HWorkTypeID', title: '宸ョ浠g爜', edit: 'text', width: 100, hide: true }
+                        , { field: 'HWorkTypeName', title: '宸ョ鍚嶇О', edit: 'text', event: 'HWorkTypeName', width: 100, hide: true }
+                        , { field: 'HPayMoney', title: '灏忔椂宸ヨ祫', edit: 'text', width: 100, hide: true }
+                        //, { field: 'HNeedTimes	', title: '搴斾笂鐝伐鏃�', edit: 'text', width: 100 }
+                        , { field: 'HMainSourceInterID ', title: '婧愬崟涓诲唴鐮�', edit: 'text', width: 100, hide: true }
+                        , { field: 'HMainSourceEntryID', title: '婧愬崟瀛愬唴鐮�', edit: 'text', width: 100, hide: true }
+                        , { field: 'HMainSourceBillNo', title: '婧愬崟鍗曞彿', edit: 'text', width: 100, hide: true }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', edit: 'text', width: 100, hide: true }
+                        , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+                    ]]
+                    , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+                };
+                //鍒ゆ柇鏄惁鏂板
+                if (OperationType == 1) {
+                    $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
+                    $("#HMaker").val(sessionStorage["HUserName"]);
+                    $("#HCheckDate").val(Format(new Date(), "yyyy-MM-dd"));
+                    $("#HChecker").val(sessionStorage["HUserName"]);
+                    $("#HUpDateDate").val(Format(new Date(), "yyyy-MM-dd"));
+                    $("#HUpDater").val(sessionStorage["HUserName"]);
+                    $("#HCloseDate").val(Format(new Date(), "yyyy-MM-dd"));
+                    $("#HDeleteDate").val(Format(new Date(), "yyyy-MM-dd"));
+                    $("#HDeleteMan").val(sessionStorage["HUserName"]);
+                    $("#HCloseMan").val(sessionStorage["HUserName"]);
+                    //鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
+                    option.data = [{
+                        "HEmpID": "", "HEmpNumber": "", "HEmpName": "", "HEmpID": "", "HEmpRate": 0
+                        , "HPMTimes": 0, "HAMTimes": 0, "HBaseTimes": 0, "HBaseDays": 0, "HOverTimes": 0
+                        , "HOverDays": 0, "HLeaveTimes": 0, "HLeaveDays": 0, "HLateQty": 0, "HLateTimes": 0, "HEarlyQty": 0
+                        , "HEarlyTimes": 0, "HOutForEmpQty": 0, "HOutForEmpTimes": 0, "HOutForComQty": 0, "HOutForComTimes": 0, "HAbsentDays": 0
+                        , "HRestFlag": "true", "HSchClassID": 0, "HCTPrjID": 0, "HCTPrjName": "", "HWorkTypeID": 0, "HWorkTypeName": "", "HPayMoney": 0, "HMoney": 0
+                        , "HNeedTimes": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0
+                        , "HSourceBillType": "", "HRemark": ""
+                    }];
+                    table.render(option);
+                }
+                else {
+                    $("#HInterID").val(hID);//淇敼鏃朵富琛↖D
+                    //缂栬緫鍔犺浇鏁版嵁
+                    $.ajax({
+                        url: GetWEBURL() + 'Pay_WorkTimesBill/Pay_WorkTimesBillListProjectDetai',
+                        type: "GET",
+                        async: false,
+                        data: { "sqlWhere": "and hmainid=" + hID },
+                        success: function (result) {
+
+                            if (result.count == 1) {
+                                option.data = result.data;
+                                table.render(option);
+
+                            } else {
+                                layer.alert(result.code + result.Message, { icon: 5 });
+                            }
+                        }, error: function () {
+                            layer.close(index0);
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+
+                }
+
+                //澶村伐鍏锋爮浜嬩欢
+                var rowid = 0;
+                var rows = 0;
+                table.on('toolbar(mainTable)', function (obj) {
+                    var checkStatus = table.checkStatus('mainTable')
+                        , data = checkStatus.data;;
+                    var AddRow = table.cache['mainTable'];
+                    var NewRow = {
+                        "HEmpID": "", "HEmpNumber": "", "HEmpName": "", "HEmpID": "", "HEmpRate": 0
+                        , "HPMTimes": 0, "HAMTimes": 0, "HBaseTimes": 0, "HBaseDays": 0, "HOverTimes": 0
+                        , "HOverDays": 0, "HLeaveTimes": 0, "HLeaveDays": 0, "HLateQty": 0, "HLateTimes": 0, "HEarlyQty": 0
+                        , "HEarlyTimes": 0, "HOutForEmpQty": 0, "HOutForEmpTimes": 0, "HOutForComQty": 0, "HOutForComTimes": 0, "HAbsentDays": 0
+                        , "HRestFlag": "true", "HSchClassID": 0, "HCTPrjID": 0, "HCTPrjName": "", "HWorkTypeID": 0, "HWorkTypeName": "", "HPayMoney": 0, "HMoney": 0
+                        , "HNeedTimes": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0
+                        , "HSourceBillType": "", "HRemark": ""
+                    };
+                    switch (obj.event) {
+                        case 'btn-AddLine':
+                            //table.cache["mainTable"].push(AddRow[rows]);
+                            table.cache["mainTable"].push(NewRow);
+                            option.data = table.cache["mainTable"];
+                            table.render(option);
+                            rows++;
+                            //layer.msg('澧炲姞涓�琛屾寜閽紒')
+                            break;
+                        case 'btn-CopyLine':
+                            var copydata = JSON.stringify(data);
+                            if (data.length <= 0) {
+                                layer.alert("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+                            }
+                            else if (data.length > 1) {
+                                layer.alert("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+                            }
+                            else {
+                                var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+                                var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+                                table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+                                option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                                table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+                                //layer.alert(copyrow);
+                            }
+                            break;
+                    }
+                });
+                //琛屽唴浜嬩欢
+                table.on('tool(mainTable)', function (obj) {
+                    var data = obj.data;
+                    var rowIndex = $(obj.tr).attr("data-index");
+                    if (obj.event === 'del') {
+                        layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+                            console.log("绱㈠紩涓�:" + rowIndex);
+                            if (rowIndex === '0') {
+                                layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+                            } else {
+                                obj.del();
+                                option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+                                table.reload(option);
+                                layer.close(index);
+                            }
+                        });
+                    }
+                    $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+                        if (event.key == "F7") {
+                            if (obj.event === 'HEmpCheck') {//鑱屽憳
+                                layer.open({
+                                    type: 2,
+                                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                                    title: '鑱屽憳鍒楄〃',
+                                    closeBtn: 1,
+                                    shift: 2,
+                                    area: ['90%', '90%'],
+                                    maxmin: true,
+                                    content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html', 'yes'],
+                                    btn: ['纭畾', '鍙栨秷']
+                                    , btn1: function (index, layero) {
+                                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                        var iframeWindow = window['layui-layer-iframe' + index];
+                                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
+                                        if (checkStatus.data.length === 0) {
+                                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                                        }
+                                        obj.update({
+                                            HEmpName: checkStatus.data[0].HName
+                                            , HEmpID: checkStatus.data[0].HItemID
+                                            , HEmpNumber: checkStatus.data[0].HNumber
+                                            , HEmpRate: checkStatus.data[0].HEmpRate
+                                            , HPMTimes: 0
+                                            , HAMTimes: 0
+                                            , HMoney: 0
+                                        });
+                                        layer.close(layer.index);
+                                    }
+                                    , btn2: function (index, layero) {
+                                    },
+                                    end: function () {
+
+                                    }
+                                });
+                            }
+                            if (obj.event === 'HCTPrjName') {//鏍哥畻鏂规
+                                layer.open({
+                                    type: 2//寮圭獥绫诲瀷
+                                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                                    , area: ['90%', '90%']//澶у皬
+                                    , title: '鏍哥畻鏂瑰紡鍒楄〃'//鏍囬
+                                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_ClassTimePrjList.html', 'yes']
+                                    , btn: ['纭畾', '鍙栨秷']
+                                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                                        if (checkStatus.data.length === 0) {
+                                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                                        }
+                                        obj.update({
+                                            HCTPrjName: checkStatus.data[0].HName
+                                            , HCTPrjID: checkStatus.data[0].HItemID
+                                        });
+                                        layer.close(layer.index);
+                                    }
+                                    , btn2: function (index, layero) { }
+                                })
+                            }
+                            if (obj.event === 'HWorkTypeName') {//宸ョ
+                                layer.open({
+                                    type: 2//寮圭獥绫诲瀷
+                                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                                    , area: ['90%', '90%']//澶у皬
+                                    , title: '宸ョ鍒楄〃'//鏍囬
+                                    , shift: 2//寮瑰嚭鍔ㄧ敾
+                                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WorkTypeList.html', 'yes']
+                                    , btn: ['纭畾', '鍙栨秷']
+                                    , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                                        if (checkStatus.data.length === 0) {
+                                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                                        }
+                                        obj.update({
+                                            HWorkTypeName: checkStatus.data[0].HName
+                                            , HWorkTypeID: checkStatus.data[0].HItemID
+                                        });
+                                        layer.close(layer.index);
+                                    }
+                                    , btn2: function (index, layero) { }
+                                })
+                            }
+                            obj.event = "";
+                            return false;
+
+                        }
+                    })
+                });
+
+                //鐩戝惉鍗曞厓鏍肩紪杈�
+                table.on('edit(mainTable)', function (obj) {
+                    // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
+                    var oldText = $(this).prev().text();
+                    var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
+                        , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
+                        , field = obj.field; //寰楀埌瀛楁
+                    //layer.msg('[ID: ' + data.id + '] ' + field + ' 瀛楁鏇存敼涓猴細' + value);
+
+                    switch (field) {
+                        case "HEmpRate":  //鑱屽憳绯绘暟
+                            value = isNaN(value) ? 0 : value;
+                            var HAvgMoney = $("#HAvgMoney").val();//骞冲潎宸ヨ祫
+                            var HEmpRate = value;
+                            var HPMTimes = Number(isNaN(data.HPMTimes) ? 0 : data.HPMTimes); //宸ヤ綔宸ユ椂
+                            var HAMTimes = Number(isNaN(data.HAMTimes) ? 0 : data.HAMTimes); //鏍囧噯宸ユ椂
+                           
+                            var HMoney;
+                            if (HAMTimes == 0)
+                                HMoney = 0;
+                            else
+                                HMoney = HAvgMoney * HEmpRate * HPMTimes / HAMTimes
+                            //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                            obj.update({
+                                HEmpRate: value,                  //涓嬪崍宸ユ椂
+                                HMoney: HMoney, //
+                            });
+                            break;
+                        case "HPMTimes":  //宸ヤ綔宸ユ椂
+                            value = isNaN(value) ? 0 : value;
+                            var HAvgMoney = $("#HAvgMoney").val();//骞冲潎宸ヨ祫
+                            var HEmpRate = Number(isNaN(data.HEmpRate) ? 0 : data.HEmpRate);
+                            var HAMTimes = Number(isNaN(data.HAMTimes) ? 0 : data.HAMTimes); //鏍囧噯宸ユ椂
+                            var HPMTimes = value;//骞冲潎宸ヨ祫
+                            //鍩烘湰宸ユ椂=涓婂崍宸ユ椂+涓嬪崍宸ユ椂
+                            var HBaseTimes = Number(isNaN(data.HAMTimes) ? 0 : data.HAMTimes) + Number(value);
+                            //宸ヨ祫=灏忔椂宸ヨ祫*鍩烘湰宸ユ椂
+                            var HMoney;
+                            if (HAMTimes == 0)
+                                HMoney = 0;
+                            else
+                                HMoney = HAvgMoney * HEmpRate * HPMTimes / HAMTimes
+                            //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                            obj.update({
+                                HPMTimes: value,                  //涓嬪崍宸ユ椂
+                                HBaseTimes: HBaseTimes,           //鍩烘湰宸ユ椂
+                                HMoney: HMoney, //
+                            });
+                            break;
+                        case "HAMTimes":  //鏍囧噯宸ユ椂
+                            value = isNaN(value) ? 0 : value;
+                            var HAvgMoney = $("#HAvgMoney").val();//骞冲潎宸ヨ祫
+                            var HEmpRate = Number(isNaN(data.HEmpRate) ? 0 : data.HEmpRate);
+                            var HPMTimes = Number(isNaN(data.HPMTimes) ? 0 : data.HPMTimes); //宸ヤ綔宸ユ椂
+                            var HAMTimes = value; //宸ヤ綔宸ユ椂
+                            //鍩烘湰宸ユ椂=涓婂崍宸ユ椂+涓嬪崍宸ユ椂
+                            var HBaseTimes = Number(value) + Number(isNaN(data.HPMTimes) ? 0 : data.HPMTimes);
+                            //宸ヨ祫=灏忔椂宸ヨ祫*鍩烘湰宸ユ椂
+                            var HMoney;
+                            if (value == 0)
+                                HMoney = 0;
+                            else
+                                HMoney = HAvgMoney * HEmpRate * HPMTimes / HAMTimes
+                            //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                            obj.update({
+                                HAMTimes: value,                  //涓婂崍宸ユ椂
+                                HBaseTimes: HBaseTimes,           //鍩烘湰宸ユ椂
+                                HMoney: HMoney, //宸ヨ祫
+                            });
+                            break;
+                        case "HPayMoney":        //灏忔椂宸ヨ祫
+                            value = isNaN(value) ? 0 : value;
+                            //宸ヨ祫=灏忔椂宸ヨ祫*鍩烘湰宸ユ椂
+                            var HMoney = Number(value) * Number(isNaN(data.HBaseTimes) ? 0 : data.HBaseTimes);
+                            //console.log(HMoney);
+                            //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                            obj.update({
+                                HMoney: HMoney, //宸ヨ祫
+                            });
+                            break;
+                        case "HMoney":         //宸ヨ祫
+                            value = isNaN(value) ? 0 : value;
+                            if (data.HPayMoney == 0 || data.HPayMoney == null) {
+                                value = 0;
+                            }
+                            //宸ヨ祫=灏忔椂宸ヨ祫*鍩烘湰宸ユ椂
+                            var HMoney = Number(isNaN(data.HPayMoney) ? 0 : data.HPayMoney) * Number(isNaN(data.HBaseTimes) ? 0 : data.HBaseTimes);
+                            console.log(HMoney);
+                            //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                            obj.update({
+                                HMoney: HMoney, //宸ヨ祫
+                            });
+                            break;
+                            break;
+                        default:
+                    }
+                });
+                function RoadBillMain(hID)//鍔犺浇琛ㄥご
+                {
+                    //alert(hID);
+                    //鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
+                    $.ajax({
+                        url: GetWEBURL() + "Pay_WorkTimesBill/Pay_WorkTimesBillListCheckDetail",
+                        type: "GET",
+                        data: {
+                            "HID": hID
+                        },
+                        success: function (result) {
+
+                            if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                var data = result.data.h_v_Pay_WorkTimesBillList[0];
+                                console.info(data);
+                                form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+                                    "HBillNo": data.鍗曟嵁鍙�
+                                    , "HDate": formatDate(data.鏃ユ湡)
+                                    //, "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
+                                    , "HGroupID": data.HGroupID                    //鐝粍ID
+                                    , "HGroupName": data.鐝粍                 //鐝粍鍚嶇О
+                                    , "HEmpName": data.鑱屽憳         //涓荤鍚嶇О
+                                    , "HDeptID": data.HDeptID                 //閮ㄩ棬ID
+                                    , "HDeptName": data.閮ㄩ棬                //閮ㄩ棬鍚嶇О
+                                    , "HSourceBillType": ""                   //婧愬崟绫诲瀷
+                                    , "HExplanation": data.鎽樿              //鎽樿
+                                    , "HRemark": data.琛ㄥご澶囨敞                    //澶囨敞
+                                    , "HMaker": data.鍒跺崟浜�
+                                    , "HChecker": data.瀹℃牳浜�
+                                    , "HCloseMan": data.鍏抽棴浜�
+                                    , "HMakeDate": data.鍒跺崟鏃ユ湡
+                                    , "HCheckDate": data.瀹℃牳鏃ユ湡
+                                    , "HCloseDate": data.鍏抽棴鏃ユ湡
+                                    , "HUpDateDate": data.淇敼鏃ユ湡
+                                    , "HDeleteDate": data.浣滃簾鏃ユ湡
+                                    , "HAvgMoney": data.HAvgMoney
+                                });
+
+                            } else {
+                                layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                        }, error: function () {
+                            layer.alert("鍙戠敓閿欒!", { icon: 5 });
+                        }
+                    });
+                }
+                var date = new Date();
+                var day = date.getDate();
+                var month = date.getMonth() + 1;
+                var year = date.getFullYear();
+                var shijian = year + "-" + month + "-" + day;
+
+                //鍒ゆ柇鏄惁鏂板
+                if (hID == null || hID == 0) {
+                    //鑾峰彇鏈�澶у崟鎹彿 new
+                    $("#HInterID").val("0");
+                    $("#HBillNo").val("");
+                    $.ajax({
+                        url: GetWEBURL() + "/Web/GetMAXNum",
+                        type: "GET",
+                        async: false,
+                        data: { "HBillType": '2203' },
+                        success: function (d) {
+                            //console.log(d.data);
+                            $("#HBillNo").val(d.data[0].HBillNo);
+                            $("#HDate").val(shijian);
+                            $("#HInterID").val("0");
+                            calcAvgMoney(shijian);
+                        }
+                    });
+                }
+                else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+                    RoadBillMain(hID);
+                    /* RoadBillSub(linterid);*/
+                }
+                //琛ㄥご淇℃伅鐝粍寮圭獥
+                form.on('submit(HGroupList)', function () {
+                    //椤甸潰灞�-鑷畾涔�
+                    layer.open({
+                        type: 2,
+                        skin: 'layui-layer-rim', //鍔犱笂杈规
+                        title: '鐝粍鍒楄〃',
+                        closeBtn: 1,
+                        shift: 2,
+                        area: ['80%', '80%'],
+                        maxmin: true,
+                        content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_GetProductionTeamList.html?Type=HGroupID', 'yes'],
+                        btn: ['纭畾', '鍙栨秷']
+                        , btn1: function (index, layero) {
+
+                            //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                            var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                            var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                            if (checkStatus.data.length === 0) {
+                                return layer.msg('璇烽�夋嫨鏁版嵁');
+                            }
+                            $("#HGroupName").val(checkStatus.data[0].鐝粍);
+                            $("#HGroupID").val(checkStatus.data[0].HItemID);
+                            GetEmployee();
+                            layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                        }
+                        , btn2: function (index, layero) {
+                            //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                            //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                        },
+                        end: function () {
+
+                        },
+                        success: function (layero, index) {
+
+                        }
+                    });
+                });
+                function GetEmployee() {
+                    $.ajax({
+                        url: GetWEBURL() + "/Pay_WorkTimesBill/GetEmployeeByHGroup",
+                        type: "GET",
+                        data: { "HGroupID": $("#HGroupID").val() },
+                        success: function (result) {
+                            if (result != null) {
+                                if (result.count == 1) {
+                                    var BYData = result.list[0];
+                                    var rowdate1 = layui.table.cache["mainTable"];
+                                    option.data = [{
+                                        "HEmpID": "", "HEmpNumber": "", "HEmpName": "", "HEmpID": "", "HEmpRate": 0
+                                        , "HPMTimes": 0, "HAMTimes": 0, "HBaseTimes": 0, "HBaseDays": 0, "HOverTimes": 0
+                                        , "HOverDays": 0, "HLeaveTimes": 0, "HLeaveDays": 0, "HLateQty": 0, "HLateTimes": 0, "HEarlyQty": 0
+                                        , "HEarlyTimes": 0, "HOutForEmpQty": 0, "HOutForEmpTimes": 0, "HOutForComQty": 0, "HOutForComTimes": 0, "HAbsentDays": 0
+                                        , "HRestFlag": "true", "HSchClassID": 0, "HCTPrjID": 0, "HCTPrjName": "", "HWorkTypeID": 0, "HWorkTypeName": "", "HPayMoney": 0, "HMoney": 0
+                                        , "HNeedTimes": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0
+                                        , "HSourceBillType": "", "HRemark": ""
+                                    }];
+                                    table.render(option);
+                                    if (BYData.length != 0)  //琛ㄤ綋鏁版嵁涓虹┖鏃�
+                                    {
+                                        buttonArr = [];//娓呯┖鏁扮粍
+                                        for (var i = 0; i < BYData.length; i++) {
+                                            var checkrow = {
+                                                "HEmpID": BYData[i].HEmpID, "HEmpNumber": BYData[i].HEmpNumber, "HEmpName": BYData[i].HEmpName, "HEmpRate": BYData[i].HEmpRate
+                                                , "HPMTimes": rowdate1[i].HPMTimes, "HAMTimes": rowdate1[i].HAMTimes, "HBaseTimes": rowdate1[i].HBaseTimes, "HBaseDays": rowdate1[i].HBaseDays, "HOverTimes": rowdate1[i].HOverTimes
+                                                , "HOverDays": rowdate1[i].HOverDays, "HLeaveTimes": rowdate1[i].HLeaveTimes, "HLeaveDays": rowdate1[i].HLeaveDays, "HLateQty": rowdate1[i].HLateQty, "HLateTimes": rowdate1[i].HLateTimes, "HEarlyQty": rowdate1[i].HEarlyQty
+                                                , "HEarlyTimes": rowdate1[i].HEarlyTimes, "HOutForEmpQty": rowdate1[i].HOutForEmpQty, "HOutForEmpTimes": rowdate1[i].HOutForEmpTimes, "HOutForComQty": rowdate1[i].HOutForComQty, "HOutForComTimes": rowdate1[i].HOutForComTimes, "HAbsentDays": rowdate1[i].HAbsentDays
+                                                , "HRestFlag": "true", "HSchClassID": rowdate1[i].HSchClassID, "HCTPrjID": BYData[i].HCTPrjID, "HCTPrjName": BYData[i].HCTPrjName, "HWorkTypeID": rowdate1[i].HWorkTypeID, "HWorkTypeName": rowdate1[i].HWorkTypeName, "HPayMoney": rowdate1[i].HPayMoney, "HMoney": rowdate1[i].HMoney
+                                                , "HNeedTimes": rowdate1[i].HNeedTimes, "HMainSourceInterID": rowdate1[i].HMainSourceInterID, "HMainSourceEntryID": rowdate1[i].HMainSourceEntryID, "HMainSourceBillNo": rowdate1[i].HMainSourceBillNo
+                                                , "HSourceBillType": rowdate1[i].HSourceBillType, "HRemark": rowdate1[i].HRemark
+                                            };
+                                            buttonArr.push(checkrow);  //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+                                        }
+                                        table.reload("mainTable", {
+                                            data: buttonArr    //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+                                        })
+                                    }
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                }
+                            }
+                        }
+                    })
+                }
+                //琛ㄥご淇℃伅閮ㄩ棬寮圭獥
+                form.on('submit(Department)', function () {
+                    //椤甸潰灞�-鑷畾涔�
+                    layer.open({
+                        type: 2,
+                        skin: 'layui-layer-rim', //鍔犱笂杈规
+                        title: '閮ㄩ棬鍒楄〃',
+                        closeBtn: 1,
+                        shift: 2,
+                        area: ['80%', '80%'],
+                        maxmin: true,
+                        content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_DepartmentList.html?Type=HDeptID', 'yes'],
+                        btn: ['纭畾', '鍙栨秷']
+                        , btn1: function (index, layero) {
+
+                            //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                            var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                            var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                            if (checkStatus.data.length === 0) {
+                                return layer.msg('璇烽�夋嫨鏁版嵁');
+                            }
+                            $("#HDeptName").val(checkStatus.data[0].HName);
+                            $("#HDeptID").val(checkStatus.data[0].HItemID);
+                            layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                        }
+                        , btn2: function (index, layero) {
+                            //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                            //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                        },
+                        end: function () {
+
+                        },
+                        success: function (layero, index) {
+
+                        }
+                    });
+                });
+                //閫�鍑�
+                form.on('submit(Exit)', function (data) {
+                    if (OperationType == 1) {
+                        Pub_Close(closeType);//鐩存帴鏂板closeType鍊间负2锛屽垪琛ㄨ皟鏂板closeType鍊间粠鍒楄〃浼犻��
+                    }
+                    else if (OperationType == 3) {
+                        Pub_Close(closeType);
+                    }
+                    else {
+                        Pub_Close(2);
+                    }
+                });
+                function formatDate(date) {
+                    var d = new Date(date),
+                        month = '' + (d.getMonth() + 1),
+                        day = '' + d.getDate(),
+                        year = d.getFullYear();
+
+                    if (month.length < 2) month = '0' + month;
+                    if (day.length < 2) day = '0' + day;
+
+                    return [year, month, day].join('-');
+                }
+                //淇濆瓨鎻愪氦
+                form.on('submit(Saver)', function (data) {//鎻愪氦
+                    var refSav = "";
+                    if (linterid == "" || linterid == null) {
+                        refSav = "Add";
+                    }
+                    if (linterid != "" && linterid != null) {
+                        refSav = "Update";
+                    }
+                    data.field.HSTOCKORGID = sessionStorage["OrganizationID"];//缁勭粐
+                    var sMainStr = JSON.stringify(data.field);
+                    var sSubStr = JSON.stringify(table.cache['mainTable']);
+                    var sMainSub = sMainStr + ';' + sSubStr + ';' + refSav + ';' + sessionStorage["HUserName"];
+                    if (!AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
+                    {
+                        return false;
+                    }
+                    $.ajax({
+                        type: "POST",
+                        url: GetWEBURL() + "/Pay_WorkTimesBill/SaveGetWorkTimesBillList",
+                        async: true,
+                        data: { "msg": sMainSub },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
+                                    var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
+                                    parent.layer.close(index); //鍐嶆墽琛屽叧闂�
+                                });
+                            }
+                            else {
+                                f_alert(data.Message);
+                            }
+                        },
+                        error: function (err) {
+                            f_alert("閿欒:" + err);
+                        }
+                    });
+                });
+                function f_alert(sMsg) {
+                    layer.alert(sMsg, { icon: 5 });
+
+                }
+                //鐩戝惉鎻愪氦
+                form.verify({
+                    numberOrEmpty: function (value, item) {
+                        // if (value != '') {
+                        if (!/^\d+$/.test(value)) {
+                            return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+                        }
+                        //}
+                    }
+                });
+                function calcAvgMoney(HDate) {
+                    $.ajax({
+                        type: "POST",
+                        url: GetWEBURL() + "/Pay_WorkTimesBill/calcAvgMoney",
+                        async: true,
+                        data: { "msg": HDate },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                $("#HAvgMoney").val(data.data[0].Column1);
+                            }
+                            else {
+                                f_alert(data.Message);
+                            }
+                        },
+                        error: function (err) {
+                            f_alert("閿欒:" + err);
+                        }
+                    });
+                }
+            });
+            //瀹氫箟鍏ㄥ眬鍙橀噺
+            var HReasonName, ReasonID, EmpName, SQProcName,
+                ProcID, ZRProcName, QRName
+                ;
+            function GetHReasonValue(obj)  //杩斿洖涓嶈壇鍘熷洜
+            {
+                HReasonName = obj[0].HName;
+                ReasonID = obj[0].HItemID;
+            }
+            //杩斿洖鐗╂枡
+            function GetHMaterNameValue(obj) {  //杩斿洖鐗╂枡
+                $("#HMater").val(obj[0].HName);
+                $("#HMaterID").val(obj[0].HItemID);
+                $("#HMaterNumber").val(obj[0].HNumber);
+            }
+            //杩斿洖宸ュ簭
+            function GetHProcValue(obj) {  //杩斿洖宸ュ簭
+                $("#HProcName").val(obj[0].宸ュ簭);
+                $("#HProcID").val(obj[0].HItemID);
+                $("#HProcNumber").val(obj[0].宸ュ簭浠g爜);
+            }
+            function GetHDeptNameValue(obj) {  //杩斿洖閮ㄩ棬
+                $("#HDepName").val(obj[0].HName);
+                $("#HDeptID").val(obj[0].HItemID);
+                $("#HDeptNumber").val(obj[0].HNumber);
+            }
+            //杩斿洖鍗曚綅
+            function GetHUnitNameValue(obj) {
+                $("#HUName").val(obj[0].HName);
+                $("#HUnitID").val(obj[0].HItemID);
+                $("#HUnitNumber").val(obj[0].HNumber);
+            }
+            function GetHKeeperValue(obj) {  //杩斿洖璐d换浜�
+                EmpName = obj[0].HName;
+                // $("#HEmpName").val(obj[0].HName);
+                //$("#HItemID").val(obj[0].HItemID);
+            }
+            //function GetHProcValue(obj) {  //杩斿洖鐢宠宸ュ簭
+            //    SQProcName = obj[0].宸ュ簭;
+            //    ProcID = obj[0].HItemID;
+            //    //$("#HSQProcName").val(obj[0].宸ュ簭);
+            //    //$("#HProcID").val(obj[0].HItemID);
+            //}
+            function GetHZRValue(obj) {   //杩斿洖璐d换宸ュ簭
+                ZRProcName = obj[0].宸ュ簭;
+                //$("#HZRProcName").val(obj[0].宸ュ簭);
+                //$("#HItemID").val(obj[0].HItemID);
+            }
+            //HWorker
+            function GetHWorkerValue(obj) {  //杩斿洖涓嶈壇纭浜�
+                QRName = obj[0].HName;
+                //$("#HQRName").val(obj[0].HName);
+                //$("#HItemID").val(obj[0].HItemID);
+            }
+            function AllowLoadData(sSubStr) {  //闈炵┖楠岃瘉
+                var Result = true;
+                if ($("#HGroupID").val() == '') {
+                    layer.msg("鐝粍娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if ($("#HDeptID").val() == '') {
+                    layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if (typeof (sSubStr) == "undefined") {
+                    layer.msg("娌℃湁鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
+                    sSubStr = JSON.parse(sSubStr);
+                    for (var i = 0; i <= sSubStr.length - 1; i++) {   //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
+                        if (sSubStr[i].HEmpID == "") {
+                            layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,鑱屽憳淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            return Result = false;
+                        }
+                    }
+                }
+                else {
+                    return Result;
+                }
+                return Result;
+
+            }
+
+
+        </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList_yqn.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList_yqn.html"
new file mode 100644
index 0000000..ee73e76
--- /dev/null
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList_yqn.html"
@@ -0,0 +1,349 @@
+锘�<!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">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <!--<script src="../../../layuiadmin/layui/layui.js"></script>-->
+    <script src="../../../layuiadmin/layui/layui.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/zgqCustom/zgqCustom.js"></script>
+
+    <style type="text/css">
+        input.layui-input.layui-unselect {
+            padding-right: 0;
+        }
+    </style>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <!--<div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>-->
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                </button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                <!--<div class="layui-colla-content">
+                                    <div class="layui-inline">
+                                        <div class="layui-inline">
+                                            <span>鍏朵粬鏉′欢></span>
+                                        </div>
+                                    </div>
+
+                                </div>-->
+                            </div>
+                        </div>
+                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--<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>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+                , util = layui.util
+            //鏌ヨ鏉′欢
+            var sWhere = "";
+            var option = [];
+
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+
+            //#endregion
+          
+            //#region 閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                //娓呯┖杩囨护鏉′欢
+                set_ClearQuery();
+            });
+            //#endregion
+
+            //#region 鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery(table, option);
+            });
+            //#endregion
+
+            //#region 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                get_Display(sWhere);
+            }
+            //#endregion
+            //#region 鍒濆鍖栬〃鏍兼柟娉�
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , page: true
+                    , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                    , cols: [[
+                        { type: 'checkbox', fixed: 'left' }
+                        , { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
+                        , { field: '鏃ユ湡', title: '鏃ユ湡', width: 125, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 195 }
+                        , { field: 'HAvgMoney', title: '骞冲潎宸ヨ祫', width: 120 }
+                        //, { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 110 }
+                        //, { field: 'HGroupID', title: 'HGroupID', width: 200, hide: true }
+                        //, { field: '鐝粍浠g爜', title: '鐝粍浠g爜', width: 125 }
+                        //, { field: '鐝粍', title: '鐝粍', width: 125 }
+                        //, { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
+                        //, { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 180 }
+                        //, { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 125 }
+                        //, { field: '鎽樿', title: '鎽樿', width: 125 }
+                        , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 125 }
+                        , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
+                        , { field: 'HEmpNumber', title: '鑱屽憳浠g爜', width: 180 }
+                        , { field: 'HEmpName', title: '鑱屽憳', width: 125 }
+                        , { field: '鑱屽憳绯绘暟', title: '鑱屽憳绯绘暟',  width: 100 }
+                        , { field: '涓嬪崍', title: '宸ヤ綔宸ユ椂',  width: 100 }
+                        , { field: '涓婂崍', title: '鏍囧噯宸ユ椂',  width: 100 }
+                        , { field: 'HMoney', title: '宸ヨ祫', width: 100 }
+                        //, { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 125 }
+                        , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 125 }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 125 }
+                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 125 }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '淇敼浜�', title: '淇敼浜�', width: 125 }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 125 }
+                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 125 }
+                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 125 }
+                        , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 125 }
+                    ]]
+                };
+            }
+            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+            function get_Display(sWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Pay_WorkTimesBill/GetWorkTimesBill',
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.close(ajaxLoad);
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus(obj.config.id);
+                switch (obj.event) {
+                    case 'btn-Add':
+                        //椤甸潰灞�-鑷畾涔�
+                        layer.open({
+                            type: 2,
+                            skin: 'layui-layer-rim', //鍔犱笂杈规
+                            title: '鏂板鑰冨嫟姹囨姤鍗�',
+                            closeBtn: 1,
+                            shift: 2,
+                            area: ['100%', '100%'],
+                            maxmin: true,
+                            content: '../鑰冨嫟姹囨姤鍗�/Pay_WorkTimesBillEdit_yqn.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
+                            end: function () {
+                                //鍒锋柊椤甸潰,
+                                location.reload();
+                            },
+                            success: function (layero, index) {
+
+                            }
+                        });
+                        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: '../鑰冨嫟姹囨姤鍗�/Pay_WorkTimesBillEdit_yqn.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':
+                        var checkStatus = table.checkStatus('mainTable')
+                            , data = checkStatus.data;
+                        if (checkStatus.data.length === 1) {
+                            var InterID = data[0].hmainid.toString();
+                            //閫昏緫鍒犻櫎鏂规硶
+                            layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                                $.ajax({
+                                    type: "GET",
+                                    url: GetWEBURL() + "Pay_WorkTimesBill/DeltetWorkTimesBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                                    data: { "HInterID": InterID, "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 });
+                                        }
+                                    }, error: function () {
+                                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                    }
+                                });
+                            })
+                        }
+                        else {
+                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                        }
+                        break;
+                    //鍒锋柊
+                    case 'get_Refresh': get_Refresh();
+                        break;
+                    //閫�鍑烘寜閽�
+                    case 'get_Exit': Pub_Close(2);
+                        break;
+                };
+            });
+
+            //#region 蹇�熻繃婊�
+            function get_FastQuery(table, option) {
+                var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+                var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
+                var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+                if (HDate) {
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
+                }
+                if (HDate1) {
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HDate1 + "'";
+                }
+                if (HBillNo) {
+                    sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+                }
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            //#endregion
+            //#region 閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                $("#HDate").val("");//寮�濮嬫棩鏈�
+                $("#HDate1").val("");//缁撴潫鏃ユ湡
+                $("#HBillNo").val("");//鍗曟嵁鍙�
+                sWhere = "";
+            }
+            //#endregion
+
+            //#region 鍒锋柊
+            function get_Refresh() {
+                set_ClearQuery();
+                get_Display(sWhere);
+            }
+            //#endregion
+          
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+
+
+
+
+    </script>
+
+</body>
+</html>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\213\243\346\226\231\351\205\215\351\200\201\345\215\225/JIT_ComplementGoodsList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\213\243\346\226\231\351\205\215\351\200\201\345\215\225/JIT_ComplementGoodsList.html"
index f78867f..49e18f0 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\213\243\346\226\231\351\205\215\351\200\201\345\215\225/JIT_ComplementGoodsList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\213\243\346\226\231\351\205\215\351\200\201\345\215\225/JIT_ComplementGoodsList.html"
@@ -29,6 +29,9 @@
                         <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Xc" id="Xc">涓嬫煡</button>
                         <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Ylan" id="Ylan">棰勮</button>
                         <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Dyin" id="Dyin">鎵撳嵃</button>
+                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cx" id="Cx">鏌ヨ</button>
+                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Jlps" id="Jlps">鎷f枡閰嶉��</button>
+                        <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_DeleteBill" id="set_DeleteBill">鍒犻櫎</button>
                     </div>
                     <div class="layui-collapse">
                         <div class="layui-colla-item">
@@ -59,7 +62,7 @@
                                     <input type="text" class="layui-input" name="MaterialModel" id="MaterialModel" onmouseover="this.title=this.value" readonly>
                                 </div>
                             </div>
-                            <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+                            <div class="layui-colla-content" style="padding: 0px; margin-left: 5%;">
                                 <div class="layui-row" style="margin-top:10px;">
                                     <div class="layui-inline">
                                         <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ユ</label>
@@ -92,20 +95,20 @@
                                     <div class="layui-inline">
                                         <label class="layui-form-label" style="width: 85px;">鎷f枡鏃ユ湡</label>
                                         <div class="layui-input-block" style="margin-left: 120px;">
-                                            <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 48px;">
+                                            <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 80px;">
                                         </div>
                                     </div>
                                     <div class="layui-inline">
                                         <label class="layui-form-label" style="width: 85px;">鈥�</label>
                                         <div class="layui-input-block" style="margin-left: 118px;">
-                                            <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 48px;">
+                                            <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 80px;">
                                         </div>
                                     </div>
                                     <div class="layui-inline">
-                                        <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">閮ㄩ棬</label>
+                                        <label class="layui-form-label" style="width: 85px;">閮ㄩ棬</label>
                                         <div class="layui-input-block" style="margin-left: 77px;">
                                             <input type="text" class="layui-input" name="HDeptName" lay-verify="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
-                                            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDeptName" id="btnHDeptName" style="padding: 0 10px;float: right;margin-right: 3px;">
+                                            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDeptName" id="btnHDeptName" style="padding: 0 10px;margin-right: 3px;">
                                                 <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                             </button>
                                         </div>
@@ -123,11 +126,6 @@
                                         </div>
                                     </div>
                                 </div>
-                            </div>
-                            <div class="layui-row" style="text-align: center; margin-bottom: 20px; margin-top: 20px;">
-                                <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Cx" id="Cx">鏌ヨ</button>
-                                <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Jlps" id="Jlps">鎷f枡閰嶉��</button>
-                                <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="set_DeleteBill" id="set_DeleteBill">鍒犻櫎</button>
                             </div>
                             <table class="" id="mainTable" lay-filter="mainTable"></table>
                         </div>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlaBillnList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlaBillnList.html"
index d127421..6fde625 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlaBillnList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\217\220\346\226\231\350\256\241\345\210\222/JIT_LiftMaterPlaBillnList.html"
@@ -260,7 +260,7 @@
                 sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
             }
             if (Organization) {
-                sWhere += " and 涓昏〃閲囪喘缁勭粐 = '" + Organization + "'";
+                sWhere += " and HPURCHASEORGID = '" + Organization + "'";
             }
             if (HWorkShopIDName) {
                 sWhere += " and 杞﹂棿鍚嶇О = '" + HWorkShopIDName + "'";
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
index 9deb464..1bcdfd1 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\217\253\346\226\231\345\271\263\345\217\260/JIT_ComplementGoodBillMain.html"
@@ -129,17 +129,15 @@
                                     <div class="layui-inline">
                                         <label class="layui-form-label" style="width: 85px;">寮�濮嬫棩鏈�</label>
                                         <div class="layui-input-block" style="margin-left: 120px;">
-                                            <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 48px;">
+                                            <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 80px;">
                                         </div>
                                     </div>
                                     <div class="layui-inline">
                                         <label class="layui-form-label" style="width: 85px;text-align:center;">鈥�</label>
-                                        <div class="layui-input-block" style="margin-left: 118px;">
-                                            <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 48px;">
+                                        <div class="layui-input-block" style="margin-left: 120px;">
+                                            <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 80px;">
                                         </div>
                                     </div>
-                                </div>
-                                <div class="layui-row" style="margin-top:10px;">
                                     <div class="layui-inline">
                                         <div class="layui-input-block" style="margin-left: 90px;">
                                             <input type="checkbox" name="ps" id="ps" lay-skin="primary" lay-filter="ps" title="浠呮樉绀烘湭瀹屽叏閰嶉��">
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillList.html"
index a15e125..00029ff 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\346\227\245\350\256\241\345\210\222\345\267\245\345\215\225/JIT_DayPlanBillList.html"
@@ -213,7 +213,7 @@
                 , cols: [[
                     { type: 'checkbox', fixed: 'left' }
                     , { field: 'hmainid', title: 'hmainid', hide: true }
-                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200  }
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 }
                     , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 120 }
                     , { field: '鍗曟嵁鐘舵��', title: '鍗曟嵁鐘舵��' }
                     , { field: '鏃ユ湡', title: '鏃ユ湡' }
@@ -270,6 +270,7 @@
                             Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
                         }
                         $("#Organization").append(Organization);
+                        $("#Organization").val(sessionStorage["OrganizationID"]);
                         form.render('select');
                     }
                     layer.closeAll("loading");
@@ -318,13 +319,13 @@
                 sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
             }
             if (Organization) {
-                sWhere += " and 鐢熶骇缁勭粐 = '" + Organization + "'";
+                sWhere += " and HProdORGID = '" + Organization + "'";
             }
             if (HWorkShopIDName) {
                 sWhere += " and 鐢熶骇杞﹂棿 = '" + HWorkShopIDName + "'";
             }
-            if (HBTimes != "" && HETimes!="") {
-                sWhere += " and 鏃ユ湡 between '" + HBTimes + "' and '" + HETimes+"'  ";
+            if (HBTimes != "" && HETimes != "") {
+                sWhere += " and 鏃ユ湡 between '" + HBTimes + "' and '" + HETimes + "'  ";
             }
             if (HMaterName) {
                 sWhere += " and 鐗╂枡鍚嶇О like'%" + HMaterName + "%'";
@@ -473,7 +474,7 @@
                 }
             })
         }
-            //#endregion
+        //#endregion
 
         //#region 缂栬緫
         function set_ShowBill() {
@@ -498,7 +499,7 @@
                 layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
             }
         }
-            //#endregion
+        //#endregion
 
         //缂栬緫鍗曟嵁 涓嬫帹
         function set_TuiBill() {
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/JIT_DayPlanPlatForm.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/JIT_DayPlanPlatForm.html"
index 22fd485..0ac634c 100644
--- "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/JIT_DayPlanPlatForm.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/JIT_DayPlanPlatForm.html"
@@ -21,6 +21,9 @@
                         <div style="padding: 10px; ">
                             <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="ExcelImport" id="ExcelImport">Excel瀵煎叆</button>
                             <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="btnLock" id="btnLock">閿佸畾</button>
+                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnUnlock" id="btnUnlock">瑙i攣</button>
+                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnCompleteSetAnalysis" id="btnCompleteSetAnalysis">榻愬鍒嗘瀽</button>
                         </div>
                         <div class="layui-collapse">
                             <div class="layui-colla-item">
@@ -108,7 +111,7 @@
                                         <div class="layui-inline">
                                             <label class="layui-form-label" style="width: 85px;">閿佸畾澶╂暟</label>
                                             <div class="layui-input-block" style="margin-left: 120px;">
-                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
+                                                <input type="text" class="layui-input" name="HLockedDay" id="HLockedDay" value="3">
                                             </div>
                                         </div>
                                         <div class="layui-inline">
@@ -263,10 +266,26 @@
             set_ClearQuery();
         });
 
+        //榻愬鍒嗘瀽
+        form.on('submit(btnCompleteSetAnalysis)', function (data) {
+            get_btnCompleteSetAnalysis();
+        })
+
         //琛屽唴浜嬩欢
         table.on('tool(mainTable)', function (obj) {
             set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
         });
+
+        //閿佸畾
+        form.on('submit(btnLock)', function (data) {
+            get_btnLock();
+        })
+
+        //瑙i攣
+        form.on('submit(btnUnlock)', function (data) {
+            get_btnUnlock();
+        })
+
         //#endregion
 
         //#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉�
@@ -310,10 +329,7 @@
         function set_InitGrid() {
             var columns = [];
             var myDate = new Date();
-            var yyyy = myDate.getFullYear();
-            var MM = myDate.getMonth() + 1;
-            var dd = myDate.getDate();
-            var SumMonth = 31; //鍔ㄦ�佷袱鏈堜箣宸� new Date(yyyy, MM, 0).getDate()
+            var oneday = 1000 * 60 * 60 * 24;
 
             columns.push({ type: 'checkbox', fixed: 'left' });
             columns.push({ field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', hide: true });
@@ -335,19 +351,139 @@
             columns.push({ field: '璁㈠崟鍙帓鏁伴噺', title: '璁㈠崟鍙帓鏁伴噺', width:150 });
             columns.push({ field: '鏈叆搴撴暟閲�', title: '鏈叆搴撴暟閲�', width: 150 });//0
             columns.push({ field: '鎷嗗崟鏁伴噺', title: '鎷嗗崟鏁伴噺', width: 150 });//0
-            columns.push({ field: '鏃ヨ鍒掓暟閲忔�婚噺', title: '鏃ヨ鍒掓暟閲忔�婚噺', width: 150 });//0
+            columns.push({field: '鏃ヨ鍒掓暟閲忔�婚噺', title: '鏃ヨ鍒掓暟閲忔�婚噺', width: 150});//0
             columns.push({ field: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', title: '浠婃棩涔嬪墠鏃ヨ鍒掓暟閲�', width: 150 });//0
-            columns.push({ field: '璁″垝寮�濮嬫棩鏈�', title: '棰勮寮�宸ユ棩鏈�', width:150 });
+            columns.push({ field: '璁″垝寮�濮嬫棩鏈�', title: '棰勮寮�宸ユ棩鏈�', width: 150, templet: "<div>{{d.璁″垝寮�濮嬫棩鏈� ==null ?'':layui.util.toDateString(d.璁″垝寮�濮嬫棩鏈�, 'yyyy-MM-dd')}}</div>"});
             columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
             columns.push({ field: '鐢熶骇杞﹂棿', title: '鐢熶骇杞﹂棿', width: 150});
             columns.push({ field: 'HSourceID', title: 'HSourceID', hide:true });
-            columns.push({ field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮', width: 150, edit: 'text', event: "HSourceID"  });
-            for (var i = 0; i <= (SumMonth - dd); i++) {
-                columns.push({ field: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (dd + i), 'MM.dd'), edit: 'text', width: 70 })//0
-            }
-            for (var i = 1; i < dd; i++) {
-                columns.push({ field: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), title: Format(yyyy + '/' + (MM + 1) + '/' + i, 'MM.dd'), edit: 'text', width: 70 })//0
-            }
+            columns.push({ field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮', width: 150, edit: 'text', event: "HSourceID" });
+
+            columns.push({
+                field: Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 0 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 0 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 1 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 1 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 2 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 2 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 3 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 3 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 4 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 4 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 5 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 5 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 6 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 6 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 7 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 7 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 8 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 8 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 9 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 9 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 10 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 10 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd')]);
+                }  })//0
+            columns.push({
+                field: Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 11 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 11 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 12 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 12 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 13 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 13 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 14 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 14 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 15 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 15 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 16 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 16 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 17 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 17 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 18 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 18 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 19 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 19 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 20 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 20 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 21 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 21 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 22 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 22 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd')]);
+                }  })//0
+            columns.push({
+                field: Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 23 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 23 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 24 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 24 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 25 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 25 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 26 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 26 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 27 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 27 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 28 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 28 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 29 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 29 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd')]);
+                } })//0
+            columns.push({
+                field: Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 30 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
+                    return DayColor(d[Format(myDate.getTime() + 30 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd')]);
+                }  })//0
+
             columns.push({ field: 'T31', title: 'T31', width: 70 });//0
             columns.push({ field: '璁㈠崟绫诲瀷', title: '璁㈠崟绫诲瀷', width: 150 });
             columns.push({ field: '鐢熶骇璁㈠崟鍗曟嵁绫诲瀷', title: '婧愬崟璁㈠崟鍗曟嵁绫诲瀷', width: 150 });
@@ -355,7 +491,7 @@
             columns.push({ field: '浜х嚎鍏ュ簱鏁伴噺', title: '浜х嚎鍏ュ簱鏁伴噺', width: 150 });
             columns.push({ field: '鏈帓鏁伴噺', title: '鍙帓鏁伴噺', width: 150 });
             columns.push({ field: '璁㈠崟绛夌骇', title: '璁㈠崟绛夌骇', width: 150 });
-            columns.push({ field: '浜よ揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 150 });
+            columns.push({ field: '浜よ揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 150, templet: "<div>{{d.浜よ揣鏃ユ湡 =='' ?'':layui.util.toDateString(d.浜よ揣鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>"});
             columns.push({ field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 150 });
             columns.push({ field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 150 });
             columns.push({ field: 'hmainid', title: '鏃ヨ鍒掑伐鍗曚富鐮�', width: 150 });
@@ -364,12 +500,12 @@
                 elem: '#mainTable'
                 , toolbar: '#toolbarDemo'
                 , height: 'full-120'
-                , page: true
+                , page: false
                 , cellMinWidth: 90
-                , limit: 50
-                , limits: [50, 500, 5000, 20000]
                 , cols: [columns]
+                , limit: Number.MAX_VALUE//榛樿鏄剧ず鍏ㄩ儴
             };
+
         }
 
         //鏌ヨ鍔犺浇鏁版嵁
@@ -383,6 +519,47 @@
                     if (data1.count == 1) {
                         option.data = data1.data;
                         table.render(option);
+                        var HinterID_S = [];
+                        for (var i = 0; i < data1.data.length; i++) {
+                            HinterID_S.push(data1.data[i]["hmainid"]);
+                        }
+                        layer.close(ajaxLoad);
+                        if (HinterID_S.length > 0) {
+                            get_Display_1(HinterID_S);
+                            get_Display_2(HinterID_S)
+                        }
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //鏌ヨ 琛ㄦ牸鏁版嵁 閿佸畾鐘舵��
+        function get_Display_1(HinterID_S) {
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHinterIDList',
+                type: "GET",
+                data: { "sWhere": HinterID_S.toString(),"num":1 },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        if (data1.data[0]["DayNum"] > 0) {
+                            for (var i = 0; i <= data1.data[0]["DayNum"]; i++) {
+                                option.cols[0][27 + i]["edit"] = "";
+                                option.cols[0][27 + i]["style"] = "	background-color: #e6e6e6";
+                            }
+                        } else {
+                            for (var i = 0; i < 31; i++) {
+                                option.cols[0][27 + i]["edit"] = "text";
+                                option.cols[0][27 + i]["style"] = "";
+                            }
+                        }
+                        table.render(option);
                         layer.close(ajaxLoad);
                         //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                     } else {
@@ -394,6 +571,81 @@
                     layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                 }
             });
+        }
+
+        //鏌ヨ 琛ㄦ牸鏁版嵁 榻愬鐘舵��
+        function get_Display_2(HinterID_S) {
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHinterIDList',
+                type: "GET",
+                data: { "sWhere": HinterID_S.toString(), "num": 2 },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        if (data1.data.length > 0) {
+                            //鑾峰彇姣忎釜鍗曟嵁闇�瑕佹爣璁扮殑 鏁版嵁
+                            var numData = [];
+                            var _numData = data1.data;
+                            for (var i = 0; i < option.data.length; i++) {
+                                numData = _numData;
+                                _numData = [];
+                                for (var j = 0; j < numData.length; j++) {
+                                    if (option.data[i]["HInterID"] == numData[j]["HInterID"]) {
+                                        option.data[i][Format(numData[j]["HMasterDate"], 'yyyy/MM/dd')] = numData[j]["HComplete"];
+                                    } else {
+                                        _numData.push(numData[j]);
+                                    }
+                                }
+                            }
+
+                            //鍘婚噸鑾峰彇闇�瑕佹爣璁扮姸鎬佺殑鏃ユ湡
+                            var _numData2 = [];
+                            for (var i = 0; i < data1.data.length; i++) {
+                                if ($.inArray(data1.data[i]["HMasterDate"], _numData2) == -1) {
+                                    _numData2.push(data1.data[i]["HMasterDate"]);
+                                }
+                            }
+
+                            //鑾峰彇鏃ユ湡涓嬫爣
+                            var _numData3 = [];
+                            for (var i = 0; i < _numData2.length; i++) {
+                                for (var j = 27; j < 58; j++) {
+                                    if (option.cols[0][j]["field"] == _numData2[i]) {
+                                        _numData3[i] = j;
+                                        break;
+                                    }
+                                }
+                            }
+                            table.render(option);
+                        }
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+        }
+
+        //鏁伴噺鏍囪棰滆壊
+        function DayColor(DaySate, DayHQty) {
+            if (DaySate == "榻愬" || DaySate == "鏈綈濂�") {
+                if (DaySate == "榻愬") {
+                    return "<span style='color:green;'>" + DayHQty + "</span>";
+                }
+                else {
+                    return "<span style='color:red;'>" + DayHQty + "</span>";
+                }
+            } else {
+                if (DayHQty == null) {
+                    return "<span></span>";
+                } else {
+                    return "<span>" + DayHQty + "</span>";
+                }
+            }
         }
 
         //Excel瀵煎叆
@@ -486,7 +738,7 @@
             var HSeOrderBillNo = $("#HSeOrderBillNo").val();//閿�鍞鍗曞彿
             var HMaterID = $("#HMaterID").val();//鐗╂枡缂栫爜id
             var HICMOBillNo = $("#HICMOBillNo").val();//鐢熶骇璁㈠崟鍙�
-          
+
             sWhere = {
                 HPlanBeginDate: HPlanBeginDate
                 , HProdORGID: HProdORGID
@@ -515,6 +767,37 @@
             $("#HProdORGID").val(sessionStorage["OrganizationID"])//鐢熶骇璁㈠崟缁勭粐
             form.render('select');
             sWhere = "";
+        }
+
+        //榻愬鍒嗘瀽
+        function get_btnCompleteSetAnalysis() {
+            if ($("#HWorkShopID").val() == 0) {
+                return layer.msg("鐢熶骇杞﹂棿涓嶈兘涓虹┖!");
+            }
+            sWhere = {
+                HProdORGID: $("#HProdORGID").val()
+                , HWorkShopID: $("#HWorkShopID").val()
+            }
+            sWhere = JSON.stringify(sWhere);
+            var ajaxLoad = layer.load();
+            $.ajax({
+                url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_CompleteSetAnalysis',
+                type: "GET",
+                data: { "sWhere": sWhere, "user": sessionStorage["Czybm"] },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        get_FastQuery(2);
+                        layer.msg(data1.Message);
+                        layer.close(ajaxLoad);
+                    } else {
+                        layer.close(ajaxLoad);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(ajaxLoad);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
         }
 
         //淇濆瓨
@@ -603,6 +886,74 @@
             })
         }
 
+        //閿佸畾
+        function get_btnLock() {
+            var data = table.cache["mainTable"];
+
+            if (data.length == 0) {
+                return layer.msg("璇烽�夋嫨鏁版嵁杩涜閿佸畾!")
+            } else {
+
+                var hmainid_s = [];
+                for (var i = 0; i < data.length; i++) {
+                    hmainid_s.push(data[i]["hmainid"]);
+                }
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHLockedDay',
+                    type: "GET",
+                    data: { "sWhere": hmainid_s.toString(), "HLockedDay": $("#HLockedDay").val() },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            layer.msg("宸查攣瀹�");
+                            get_FastQuery(2);
+                            layer.close(ajaxLoad);
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+        }
+
+        //瑙i攣
+        function get_btnUnlock() {
+            var data = table.cache["mainTable"];
+
+            if (data.length == 0) {
+                return layer.msg("璇烽�夋嫨鏁版嵁杩涜瑙i攣!")
+            } else {
+                var hmainid_s = [];
+                for (var i = 0; i < data.length; i++) {
+                    hmainid_s.push(data[i]["hmainid"]);
+                }
+
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHUnlockDay',
+                    type: "GET",
+                    data: { "sWhere": hmainid_s.toString(), "HLockedDay": $("#HLockedDay").val() },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            layer.msg("宸茶В閿�");
+                            get_FastQuery(2);
+                            layer.close(ajaxLoad);
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+        }
+
         //#endregion
         //浠ヤ笂鏄痩ayui妯″潡
     });
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html"
index 6bff735..b38446b 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html"
@@ -55,6 +55,7 @@
                     <div style="padding: 10px; ">
                         <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
                         <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="HideColumn" id="HideColumn">闅愯棌鍒楄缃�</button>
                     </div>
                     <div class="layui-tab" lay-filter="tab-POStockInBill">
                         <div class="layui-tab-content">
@@ -296,7 +297,7 @@
                 RoadBillMain(linterid);
                 //RoadBillSub(linterid);
             }
-
+            var HModName = "JIT_NeedMaterPlanBill";
             var option = {
                 elem: '#mainTable'
                 , toolbar: '#toolbarDemo'
@@ -348,8 +349,7 @@
 
             //鍒濆鍔犺浇琛ㄦ牸
             option.data = rowdata;
-            table.render(option);
-
+            DisPlay_HideColumn();
             //#endregion
 
             //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
@@ -504,6 +504,11 @@
                 if (AllowLoadData()) {
                     set_AddNew(data);
                 }
+            });
+
+            //闅愯棌鍒楄缃�
+            form.on('submit(HideColumn)', function (data) {
+                get_HideColumn();
             });
 
             //鐩戝惉鎻愪氦
@@ -834,6 +839,112 @@
                 })
             }
 
+            //闅愯棌鍒楄缃�
+            function get_HideColumn() {
+                var colName = "";
+                for (var i = 1; i < option.cols[0].length - 1; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+
+                colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
+
+            //鏄剧ず鍒楁暟鎹�
+            function DisPlay_HideColumn() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    type: "GET",
+                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.data.length != 0) {
+
+
+                            var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                            var titleData = ["HMaterID", "HUnitID", "HICMOEmpID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; i++) {
+                                var dataCols = dataCol[i].split('|');
+                                //闅愯棌鍒�
+                                if (dataCols[1] == 1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+                                //璁剧疆鍐呭瀛椾綋澶у皬
+                                if (data1.data[0].HFontSize != 0) {
+                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                                } else {
+                                    option.cols[0][i + 1]["style"] = "font-size:100%";
+                                }
+                                //璁剧疆鍒楀
+                                if (data1.data[0].HColumnWidth != 0) {
+                                    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+                                } else {
+                                    option.cols[0][i + 1]["width"] = "";
+                                }
+                                //鏄剧ず鍒�
+                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                    option.cols[0][i + 1]["hide"] = false;
+                                }
+                                //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                                switch (dataCols[2]) {
+                                    case "L":
+                                        option.cols[0][i + 1]["align"] = "left";
+                                        break;
+                                    case "M":
+                                        option.cols[0][i + 1]["align"] = "center";
+                                        break;
+                                    case "R":
+                                        option.cols[0][i + 1]["align"] = "right";
+                                        break;
+                                }
+                            }
+
+                            //鍙栨秷鍐荤粨鍒�
+                            for (var i = 1; i < option.cols[0].length - 1; i++) {
+                                if (option.cols[0][i]["fixed"] != null) {
+                                    option.cols[0][i]["fixed"] = null;
+                                }
+                                else {
+                                    break;
+                                }
+                            }
+                            //鍐荤粨鍒�
+                            if (data1.data[0].HFixCols != 0) {
+                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                        data1.data[0].HFixCols += 1;
+                                    }
+                                    option.cols[0][i + 1]["fixed"] = "left";
+                                }
+                            }
+                            table.render(option);
+                        } else {
+                            table.render(option);
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                })
+            }
+
             //缂栬緫 椤甸潰璧嬪��
             function RoadBillMain(linterid)//鍔犺浇琛ㄥご
             {
@@ -902,9 +1013,9 @@
                         }
                         form.render('select');
                         form.render('checkbox');
-                    
-                       
-                      
+
+
+
                     }
                 })
             }
@@ -929,7 +1040,7 @@
                 var sMainStr = JSON.stringify(data.field);
                 var sSubStr = JSON.stringify(num);
                 var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"];
-                
+
                 var index = layer.load();
                 $.ajax({
                     type: "POST",
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillList.html"
index 3163db1..9260b91 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillList.html"
@@ -260,7 +260,7 @@
                 sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
             }
             if (Organization) {
-                sWhere += " and 涓昏〃閲囪喘缁勭粐 = '" + Organization + "'";
+                sWhere += " and HProdORGID = '" + Organization + "'";
             }
             if (HWorkShopIDName) {
                 sWhere += " and 杞﹂棿鍚嶇О = '" + HWorkShopIDName + "'";
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html"
index c81895d..5e258ee 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html"
@@ -34,15 +34,16 @@
             margin-left: -15px;
             margin-right: -15px;
         }
+
         .layui-form-item .layui-inline {
             margin-top: 5px;
             margin-bottom: 5px;
             margin-right: 0px;
         }
+
         .layui-form-label {
             width: 25%;
         }
-
     </style>
 </head>
 <body>
@@ -54,6 +55,7 @@
                         <div class="layui-btn-group">
                             <button type="button" id="set_SaveBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">淇濆瓨</button>
                             <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">閫�鍑�</button>
+                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">闅愯棌鍒楄缃�</button>
                         </div>
                     </div>
                     <div class="layui-tab" lay-filter="tab-POStockInBill">
@@ -231,7 +233,7 @@
                                                 </button>
                                             </div>
                                         </div>
-                                        
+
                                     </div>
                                 </div>
                             </div>
@@ -255,7 +257,7 @@
                                                 <input type="text" class="layui-input" name="HProjectNum" id="HProjectNum" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
-                                       
+
                                         <div class="layui-col-xs3 layui-inline">
                                             <label class="layui-form-label">濮斿鍔犲伐鍗曚綅</label>
                                             <div class="layui-input-inline">
@@ -332,15 +334,15 @@
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs3 layui-inline">
-        <label class="layui-form-label">娴佽浆鍗$被鍨�</label>
-        <div class="layui-input-inline">
-            <input type="text" class="layui-input" name="HWorkTypeName" id="HWorkTypeName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
-            <input type="hidden" name="HWorkTypeID" id="HWorkTypeID" value="0">
-            <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHWorkType" id="btnSearchHWorkType" style="width: 40px;">
-                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
-            </button>
-        </div>
-    </div>-->
+                                            <label class="layui-form-label">娴佽浆鍗$被鍨�</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HWorkTypeName" id="HWorkTypeName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <input type="hidden" name="HWorkTypeID" id="HWorkTypeID" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHWorkType" id="btnSearchHWorkType" style="width: 40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>-->
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs3 layui-inline">
@@ -349,7 +351,7 @@
                                                 <input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
-                                      
+
                                     </div>
                                 </div>
                             </div>
@@ -603,7 +605,8 @@
                 , laydate = layui.laydate
                 , element = layui.element;
             var option;
-            var btnHMaterID="";
+            var btnHMaterID = "";
+            var HModName = "Sc_ProcessExchangeBill";
             //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             //if (sessionStorage.login != "login") {
             //    layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
@@ -626,6 +629,7 @@
 
             //鍒濆鍖栬〃鏍�
             set_InitGrid();
+            DisPlay_HideColumn();
 
             //鍒ゆ柇鎿嶄綔绫诲瀷
             if (OperationType == 1) {//鏃犳簮鍗曟柊澧�
@@ -1020,6 +1024,11 @@
                 }
             });
 
+            //闅愯棌鍒楄缃�
+            form.on('submit(HideColumn)', function (data) {
+                get_HideColumn();
+            });
+
 
             //閫夋嫨浜у搧寮圭獥
             form.on('submit(btnSearchMater2)', function () {//浜у搧
@@ -1031,7 +1040,7 @@
                     //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                     , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
                     , content: ['../../Baseset/鍩虹璧勬枡/Gy_MaterialList.html', 'yes']
-                    ,btn: ['纭畾', '鍙栨秷']
+                    , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
                         //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -1276,7 +1285,7 @@
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
                         getRoutingBill(checkStatus.data[0].鍗曟嵁鍙�);
-                     
+
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) { }
@@ -1294,7 +1303,7 @@
                         var Tablerow = [];
 
                         $("#RoutingBill").val(data[0].鍗曟嵁鍙�)
-                     
+
                         for (var i = 0; i < data.length; i++) {
                             Tablerow.push({
                                 "HProcNo": data[i].宸ュ簭鍙�, "HProcID": data[i].hprocid, "HProcNumber": data[i].宸ュ簭浠g爜, "HProcName": data[i].宸ュ簭, "HWorkRemark": data[i].琛ㄤ綋澶囨敞,
@@ -1412,6 +1421,114 @@
                     }
                 });
             });
+
+            //闅愯棌鍒楄缃�
+            function get_HideColumn() {
+                var colName = "";
+                for (var i = 1; i < option.cols[0].length - 1; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+
+                colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+                    , btn: ["纭畾", "鍙栨秷"]
+                    , btn1: function (index, laero) {
+                        //鍒锋柊琛ㄦ牸鏁版嵁
+                        DisPlay_HideColumn();
+                        //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+                        layer.close(index);//鍏抽棴寮圭獥
+                    }
+                })
+            }
+
+            //鏄剧ず鍒楁暟鎹�
+            function DisPlay_HideColumn() {
+                $.ajax({
+                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    type: "GET",
+                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.data.length != 0) {
+
+
+                            var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+                            var titleData = ["HProcID", "HCenterID", "HDeptID", "HSupID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; i++) {
+                                var dataCols = dataCol[i].split('|');
+                                //闅愯棌鍒�
+                                if (dataCols[1] == 1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+                                //璁剧疆鍐呭瀛椾綋澶у皬
+                                if (data1.data[0].HFontSize != 0) {
+                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+                                } else {
+                                    option.cols[0][i + 1]["style"] = "font-size:100%";
+                                }
+                                //璁剧疆鍒楀
+                                if (data1.data[0].HColumnWidth != 0) {
+                                    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+                                } else {
+                                    option.cols[0][i + 1]["width"] = "";
+                                }
+                                //鏄剧ず鍒�
+                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+                                    option.cols[0][i + 1]["hide"] = false;
+                                }
+                                //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+                                switch (dataCols[2]) {
+                                    case "L":
+                                        option.cols[0][i + 1]["align"] = "left";
+                                        break;
+                                    case "M":
+                                        option.cols[0][i + 1]["align"] = "center";
+                                        break;
+                                    case "R":
+                                        option.cols[0][i + 1]["align"] = "right";
+                                        break;
+                                }
+                            }
+
+                            //鍙栨秷鍐荤粨鍒�
+                            for (var i = 1; i < option.cols[0].length - 1; i++) {
+                                if (option.cols[0][i]["fixed"] != null) {
+                                    option.cols[0][i]["fixed"] = null;
+                                }
+                                else {
+                                    break;
+                                }
+                            }
+                            //鍐荤粨鍒�
+                            if (data1.data[0].HFixCols != 0) {
+                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
+                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+                                        data1.data[0].HFixCols += 1;
+                                    }
+                                    option.cols[0][i + 1]["fixed"] = "left";
+                                }
+                            }
+                            table.render(option);
+                        } else {
+                            table.render(option);
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                })
+            }
+
+
             //閫�鍑�
             form.on('submit(Cancel)', function () {
                 if (linterid == undefined) {
@@ -1636,7 +1753,7 @@
                                         var hbillno = result.data[0].鍗曟嵁鍙�
                                         getRoutingBill(hbillno);
                                     }
-                                  
+
                                 },
                                 error: function (result) {
                                     layer.close(index);
@@ -1652,7 +1769,7 @@
                 })
                 //txtHBillNo.Text = sBillNo;
                 //GetICMOBillDetail(hmainid, HEntryID);
-              
+
             }
 
             function GetICMOBillDetail(hmainid, HEntryID) {
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillDyColList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillDyColList.html"
new file mode 100644
index 0000000..0c17851
--- /dev/null
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillDyColList.html"
@@ -0,0 +1,327 @@
+锘�<!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">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <!--<script src="../../../layuiadmin/layui/layui.js"></script>-->
+    <script src="../../../layuiadmin/layui/layui.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/zgqCustom/zgqCustom.js"></script>
+
+    <style type="text/css">
+        input.layui-input.layui-unselect {
+            padding-right: 0;
+        }
+    </style>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="width:190px;">
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                </button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" name="HBillno2" id="HBillno2" style="width:190px;">
+                                    </div>
+                                </div>
+
+                                <div class="layui-colla-content">
+                                    <div class="layui-inline">
+                                        <div class="layui-inline">
+                                            <span>鍏朵粬鏉′欢></span>
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">瀹㈡埛</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input" name="HCusID" id="HCusID" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">閮ㄩ棬</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input" name="HDeptID" id="HDeptID" style="width:190px;">
+                                        </div>
+                                    </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">涓荤</label>
+                                        <div class="layui-input-block">
+                                            <input type="text" class="layui-input" name="HMangerID" id="HMangerID" style="width:190px;">
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--<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>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+                , util = layui.util
+            //鏌ヨ鏉′欢
+            var sWhere = "";
+            var option = [];
+
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+
+            //#endregion
+
+            //#region 閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                //娓呯┖杩囨护鏉′欢
+                set_ClearQuery();
+            });
+            //#endregion
+
+            //#region 鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery(table, option);
+            });
+            //#endregion
+
+            //#region 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                get_Display(sWhere);
+            }
+            //#endregion
+            //#region 鍒濆鍖栬〃鏍兼柟娉�
+            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    //, toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , page: true
+                    , cellMinWidth: 90
+                    , limit: 50
+                    , limits: [50, 500, 5000, 20000]
+                    , cols: [[
+                        { type: 'checkbox', fixed: 'left' }
+                       ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
+                        , { field: '鏃ユ湡', title: '鏃ユ湡', width: 125}
+                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 125 }
+                        , { field: 'HBillType', title: 'HBillType', hide: true }
+                        , { field: 'HCusID', title: 'HCusID', hide: true }
+                        , { field: '瀹㈡埛浠g爜', title: '瀹㈡埛浠g爜', width: 125 }
+                        , { field: '瀹㈡埛', title: '瀹㈡埛' }
+                        , { field: '浜よ揣鍦板潃', title: '浜よ揣鍦板潃', width: 125 }
+                        , { field: 'HSSID', title: 'HSSID', hide: true }
+                        , { field: '缁撶畻鏂瑰紡浠g爜', title: '缁撶畻鏂瑰紡浠g爜', width: 125 }
+                        , { field: '缁撶畻鏂瑰紡', title: '缁撶畻鏂瑰紡', width: 125}
+                        , { field: '缁撶畻鏃ユ湡', title: '缁撶畻鏃ユ湡', width: 170}
+                        , { field: 'HCurID', title: 'HCurID', hide: true }
+                        , { field: '甯佸埆浠g爜', title: '甯佸埆浠g爜' }
+                        , { field: '甯佸埆', title: '甯佸埆' }
+                        , { field: '姹囩巼', title: '姹囩巼' }
+                        , { field: 'HDeptID', title: 'HDeptID', hide: true }
+                        , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 125 }
+                        , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 125 }
+                        , { field: '閿�鍞柟寮�', title: '閿�鍞柟寮�' }
+                        , { field: 'HManagerID', title: 'HManagerID', hide: true }
+                        , { field: '涓荤浠g爜', title: '涓荤浠g爜' }
+                        , { field: '涓荤', title: '涓荤' }
+                        , { field: 'HEmpID', title: 'HEmpID', hide: true }
+                        , { field: '涓氬姟鍛樹唬鐮�', title: '涓氬姟鍛樹唬鐮�' }
+                        , { field: '涓氬姟鍛�', title: '涓氬姟鍛�' }
+                        , { field: '鎽樿', title: '鎽樿' }
+                        , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
+                        , { field: 'hsubid', title: 'hsubid', hide: true }
+                        , { field: 'HMaterID', title: 'HMaterID', hide: true }
+                        , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜' }
+                        , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О' }
+                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
+                        , { field: '鎵瑰彿', title: '鎵瑰彿' }
+                        , { field: 'HUnitID', title: 'HUnitID', hide: true }
+                        , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜' }
+                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅' }
+                        , { field: '鏁伴噺', title: '鏁伴噺' }
+                        , { field: '鍗曚环', title: '鍗曚环' }
+                        , { field: '閲戦', title: '閲戦' }
+                        , { field: '绋庣巼', title: '绋庣巼' }
+                        , { field: '绋庨', title: '绋庨' }
+                        , { field: '浠风◣鍚堣', title: '浠风◣鍚堣' }
+                        , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿' }
+                        , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�' }
+                        , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞' }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 125 }
+                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 125 }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '淇敼浜�', title: '淇敼浜�', width: 125 }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 125 }
+                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 125 }
+                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+
+                    ]]
+                };
+            }
+
+            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+            function get_Display(sWhere) {
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Xs_SeOrderBill/list',
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.close(ajaxLoad);
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+
+            //#region 蹇�熻繃婊�
+            function get_FastQuery(table, option) {
+                var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+                var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
+                var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+                var HCusID = $("#HCusID").val();
+                var HDeptID = $("#HDeptID").val();
+                var HMangerID = $("#HMangerID").val();
+                if (HDate) {
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
+                }
+                if (HDate1) {
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HDate1 + "'";
+                }
+                if (HBillNo) {
+                    sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+                }
+                if (HCusID) {
+                    sWhere += " and 瀹㈡埛 like '%" + HCusID + "%'";
+                }
+                if (HDeptID) {
+                    sWhere += " and 閮ㄩ棬 like '%" + HDeptID + "%'";
+                }
+                if (HMangerID) {
+                    sWhere += " and 涓荤 like '%" + HMangerID + "%'";
+                }
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            //#endregion
+
+            //#region 閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                $("#HDate").val("");//寮�濮嬫棩鏈�
+                $("#HDate1").val("");//缁撴潫鏃ユ湡
+                $("#HBillNo").val("");//
+                $("#HCusID").val("");
+                $("#HDeptID").val("");
+                $("#HMangerID").val("");
+                sWhere = "";
+            }
+            //閲嶆柊鍚屾鎸夐挳
+            function set_ResCnz() {
+                var HBillno2 = $('#HBillno2').val();
+                $.ajax({
+                    url: GetWEBURL() + '/Cg_POOrderBill/Resynchronize',
+                    type: "GET",
+                    data: { "HBillNo": HBillno2, "HBillType": 1401 },
+                    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 });
+                        }
+                    }, error: function () {
+                        layer.close(wait);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+        });
+
+
+
+
+    </script>
+
+</body>
+</html>

--
Gitblit v1.9.1