From 22870b2ceda5ea1dc4e83c8b8d6a11973b834be3 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 24 八月 2023 15:37:56 +0800
Subject: [PATCH] 指引卡开工单列表 指引卡完工单列表

---
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillSubList.html |  961 ++++++++++++++++++++++++++++++
 WebTM/views/车间管理/工序进站接收单/Cj_StationInBillSubList.html  |  931 +++++++++++++++++++++++++++++
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html    |    1 
 WebTM/views/车间管理/工序进站接收单/Cj_StationInBillList.html     |    1 
 4 files changed, 1,894 insertions(+), 0 deletions(-)

diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
index bfc1bc6..c1d6f0d 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
@@ -797,6 +797,7 @@
                         default:
                     }
                 }
+                sWhere += "  and HBillSubType<>'SUB'";
                 get_Display(sWhere);
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillSubList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillSubList.html"
new file mode 100644
index 0000000..cdb086f
--- /dev/null
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillSubList.html"
@@ -0,0 +1,961 @@
+锘�<!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/zgqCustom/zgqCustom.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-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </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="HEmpNumber" id="HEmpNumber">
+                                    </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="HEmpName" id="HEmpName">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鐘舵��</label>
+                                    <div class="layui-input-block">
+                                        <select name="HStatus" lay-filter="HStatus" style="width:190px;">
+                                            <option value="-1" selected="selected">鍏ㄩ儴</option>
+                                            <option value="0">鏈鏍�</option>
+                                            <option value="1">宸插鏍�</option>
+                                            <option value="2">宸插叧闂�</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-row" style="margin-top:5px">
+                                    <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>
+                                <div class="layui-colla-content">
+                                    <div class="layui-row">
+                                        <div class="layui-inline">
+                                            <div class="layui-inline">
+                                                <span>鍏朵粬鏉′欢></span>
+                                            </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="HWorkBillNo" id="HWorkBillNo">
+                                            </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="HBillNo" id="HBillNo">
+                                            </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="HProcExchBillNo" id="HProcExchBillNo">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 80px;">
+                                        <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">
+                                            <div class="layui-input-block">
+                                                <input type="checkbox" name="checkHWasterQty" id="checkHWasterQty" lay-skin="primary" lay-filter="checkHWasterQty" title="鎶ュ簾鏁伴噺涓嶄负0">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 80px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+                                        </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" id="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-ProcessCheck" id="btn-ProcessCheck">宸ュ簭妫�楠�</button>
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print" id="btn-Print"><i class="layui-icon layui-icon-circle"></i>棰勮</button>-->
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell" id="btn-Cell"><i class="layui-icon layui-icon-ok"></i>淇濆瓨鍒楀</button>-->
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell" id="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>榛樿鍒楀</button>-->
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Exit" id="btn-Exit">閫�鍑�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script type="text/html" id="toolBar">
+        <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', '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 = [];
+            var ins;                        //鐢ㄤ簬瀵煎嚭excel
+            var HModName = "Cj_StationOutBillList";
+            var titleData = ["HMaterID", "HUnitID", "HSourceID", "hmainid", "HProcExchInterID", "HProcID", "HunitID", "HEmpID", "HGroupID", "HProcExchEntryID", "HSubID", "HICMOInterID", "閫夋嫨", "鏌ヨ鏃ユ湡", "鎴愭湰瀵硅薄", "鎴愭湰瀵硅薄鍚嶇О", "HBillStatus", "HBillType", "HPRDORGID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+
+            //宸ュ簭娴佽浆鍗′笅鏌ユ爣璁�
+            var lookDownBar = 0;              //(0:涓嬫煡鎿嶄綔锛�1锛氱洿鎺ユ煡鐪�)
+            var params = get_UrlVars();       //鑾峰彇鍙傛暟
+
+
+            //鍒濆鍖栬〃鏍�
+            set_InitGrid();
+
+            //閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                set_ClearQuery();
+            });
+
+            //鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery();
+            });
+
+            //鐢熶骇璁㈠崟鍥炶溅鏂规硶
+            $('#HWorkBillNo').on('keydown', function (event) {
+                var HWorkBillNo = $('#HWorkBillNo').val();
+                if (event.keyCode == 13) {
+                    if (!HWorkBillNo) {
+                        layer.msg("浠诲姟鍗曞彿涓嶈兘涓虹┖锛�")
+                        return;
+                    }
+                    $("#btnSearch").click();
+                }
+            });
+            //鍗曟嵁鍙峰洖杞︽柟娉�
+            $('#HBillNo').on('keydown', function (event) {
+                var HBillNo = $('#HBillNo').val();
+                if (event.keyCode == 13) {
+                    if (!HBillNo) {
+                        layer.msg("鍗曟嵁鍙蜂笉鑳戒负绌猴紒")
+                        return;
+                    }
+                    $("#btnSearch").click();
+                }
+            });
+            //宸ュ簭娴佽浆鍗″洖杞︽柟娉�
+            $('#HProcExchBillNo').on('keydown', function (event) {
+                var HProcExchBillNo = $('#HProcExchBillNo').val();
+                if (event.keyCode == 13) {
+                    if (!HProcExchBillNo) {
+                        layer.msg("宸ュ簭娴佽浆鍗″彿涓嶈兘涓虹┖锛�")
+                        return;
+                    }
+                    $("#btnSearch").click();
+                }
+            });
+
+            //鍒濆鍖栬〃鏍�
+            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: 190 }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
+                        , { field: '宸ュ簭娴佽浆鍗″彿', title: '宸ュ簭娴佽浆鍗″彿', width: 125 }
+                        , { field: 'HProcID', title: 'HProcID', hide: true }
+                        , { field: '娴佹按鍙�', title: '娴佹按鍙�', sort: true }
+                        , { field: '褰撳墠宸ュ簭浠g爜', title: '褰撳墠宸ュ簭浠g爜', width: 125 }
+                        , { field: '褰撳墠宸ュ簭', title: '褰撳墠宸ュ簭' }
+                        , { field: 'HMaterID', title: 'HMaterID', hide: true }
+                        , { field: '浜у搧浠g爜', title: '浜у搧浠g爜' }
+                        , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О', width: 125 }
+                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
+                        , { field: '鍑虹珯鏁伴噺', title: '鍑虹珯鏁伴噺' }
+                        , { field: '涓嶈壇鏁伴噺', title: '涓嶈壇鏁伴噺' }
+                        , { field: '鎶ュ簾鏁伴噺', title: '鎶ュ簾鏁伴噺' }
+                        , { field: '鍖呰鏍囪瘑浠g爜', title: '鍖呰鏍囪瘑浠g爜', width: 115 }
+                        , { field: '鍖呰鏍囪瘑', title: '鍖呰鏍囪瘑', width: 115 }
+                        , {
+                            field: '鍑虹珯鏃堕棿', title: '鍑虹珯鏃堕棿', width: 160, templet: function (d) {
+                                if (d.鍑虹珯鏃堕棿 == null) {
+                                    return "";
+                                }
+                                return util.toDateString(d.鍑虹珯鏃堕棿, "yyyy-MM-dd HH:mm:ss");
+                            }
+                        }
+                        , { field: 'HEmpID', title: 'HEmpID', hide: true }
+                        , { field: '鎿嶄綔鍛樹唬鐮�', title: '鎿嶄綔鍛樹唬鐮�', width: 190 }
+                        , { field: '鎿嶄綔鍛�', title: '鎿嶄綔鍛�' }
+                        , { field: 'HSourceID', title: 'HSourceID', hide: true }
+                        , { field: '鐢熶骇璧勬簮浠g爜', title: '鐢熶骇璧勬簮浠g爜', width: 125 }
+                        , { field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮' }
+                        , { field: 'HGroupID', title: 'HGroupID', hide: true }
+                        , { field: '鐢熶骇鐝粍浠g爜', title: '鐢熶骇鐝粍浠g爜', width: 125 }
+                        , { field: '鐢熶骇鐝粍', title: '鐢熶骇鐝粍' }
+                        , { field: 'LOT鏁伴噺', title: 'LOT鏁伴噺' }
+                    ]]
+                    , text: {
+                        none: '鏃犳暟鎹紒'
+                    }
+                };
+                set_ClearQuery();
+                get_FastQuery();
+
+            }
+
+            //鍔熻兘鎸夐挳鏄惁绂佺敤鏂规硶锛屾瘡娆″姞杞借〃鏍奸兘瑕佽皟鐢�
+            function btnIs() {
+                //$('#btn-Add').addClass("layui-btn-disabled").attr("disabled", true);//鏂板鎸夐挳
+                //$('#btn-Delete').addClass("layui-btn-disabled").attr("disabled", true);//鍒犻櫎鎸夐挳
+                //$('#btn-Audit').addClass("layui-btn-disabled").attr("disabled", true);//瀹℃牳鎸夐挳
+                //$('#btn-DeAudit').addClass("layui-btn-disabled").attr("disabled", true);//鍙嶅鏍告寜閽�
+                $('#btn-Print').addClass("layui-btn-disabled").attr("disabled", true);//棰勮鎸夐挳
+                $('#btn-Cell').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鍒楀鎸夐挳
+                $('#btn-RefreshCell').addClass("layui-btn-disabled").attr("disabled", true);//榛樿鍒楀鎸夐挳
+                //$('#btn-Exit').addClass("layui-btn-disabled").attr("disabled", true);//閫�鍑烘寜閽�
+            }
+
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                switch (obj.event) {
+                    //鏂板
+                    case 'btn-Add': set_AddNew();
+                        break;
+                    //缂栬緫
+                    case 'btn-Edit': set_ShowBill();
+                        break;
+                    //鍒犻櫎
+                    case 'btn-Delete': btn_Delete();
+                        break;
+                    //瀹℃牳
+                    case 'btn-Audit': set_CheckBill();
+                        break;
+                    //鍙嶅鏍�
+                    case 'btn-DeAudit': set_AbandonCheck();
+                        break;
+                    //鍏抽棴
+                    case 'set_CloseBill': set_CloseBill(1);
+                        break;
+                    //鍙嶅叧闂�
+                    case 'set_CancelCloseBill': set_CloseBill(2);
+                        break;
+                    //宸ュ簭妫�
+                    case 'btn-ProcessCheck': set_ProcessCheck();
+                        break;
+                    //棰勮
+                    case 'btn-Cell': layer.msg('棰勮锛�');
+                        break;
+                    //淇濆瓨鍒楀
+                    case 'btn-Cell': layer.msg('淇濆瓨鍒楀锛�');
+                        break;
+                    //榛樿鍒楀
+                    case 'btn-RefreshCell': layer.msg('榛樿鍒楀锛�');
+                        break;
+                    //閫�鍑�
+                    case 'btn-Exit': get_Exit();
+                        break;
+                    //鍒楄缃�
+                    case 'set_HideColumn': get_HideColumn();
+                        break;
+                    //瀵煎嚭excel
+                    case 'get_export':
+                        get_Export();
+                        break;
+                };
+            });
+
+            //琛岀洃鍚簨浠�
+            table.on('row(mainTable)', function (obj) {
+                var flag = !obj.tr.find(':checkbox:first').prop('checked');
+                obj.tr.find(':checkbox').prop('checked', flag);
+                if (flag) {
+                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //璁剧疆澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+                } else {
+                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+                }
+                //mainTable 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = flag;
+                    }
+                });
+            });
+
+            //闅愯棌鍒楄缃�
+            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", "HSourceID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; i++) {
+                                if (dataCol[i]) {
+                                    var dataCols = dataCol[i].split('|');
+                                }
+                                //闅愯棌鍒�
+                                if (dataCols[1] == 1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+                                //璁剧疆鍒楀
+                                if (dataCols[3] > 0) {
+                                    option.cols[0][i + 1]["width"] = dataCols[3];
+                                }
+                                //璁剧疆鍐呭瀛椾綋澶у皬
+                                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 set_CheckBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length > 0) {
+                    var InterID = [];
+                    for (var i = 0; i < data.length; i++) {
+                        InterID.push(data[i].hmainid.toString());
+                    }
+                    //閫昏緫瀹℃牳鏂规硶
+                    var wait = layer.load();
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Cj_StationOutBill/set_CheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID.toString(), "CurUserName": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { icon: 1 });
+                                get_FastQuery(table, option);
+                            } else {
+                                layer.alert(result.Message, { icon: 5 });
+                            }
+                            layer.close(wait);
+                        }, error: function () {
+                            layer.close(wait);
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
+                else {
+                    layer.msg('璇烽�夋嫨鑷冲皯涓�琛屾暟鎹鏍革紒');
+                }
+            }
+
+            //鍙嶅鏍�
+            function set_AbandonCheck() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length > 0) {
+                    var InterID = [];
+                    for (var i = 0; i < data.length; i++) {
+                        InterID.push(data[i].hmainid.toString());
+                    }
+                    //閫昏緫瀹℃牳鏂规硶
+                    var wait = layer.load();
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Cj_StationOutBill/set_AbandonCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                          data: { "HInterID": InterID.toString(), "CurUserName": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { icon: 1 });
+                                get_FastQuery(table, option);
+                            } else {
+                                layer.alert(result.Message, { icon: 5 });
+                            }
+                            layer.close(wait);
+                        }, error: function () {
+                            layer.close(wait);
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
+                else {
+                    layer.msg('璇烽�夋嫨鑷冲皯涓�琛屾暟鎹鏍革紒');
+                }
+            }
+
+            //鍏抽棴  [1 鍏抽棴銆�2 鍙嶅叧闂璢
+            function set_CloseBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.confirm("纭瑕佸叧闂悧?", function (index) {
+                        var wait = layer.load();
+                        var HInterID = data[0].hmainid;
+                        $.ajax({
+                            url: GetWEBURL() + '/Cj_StationOutBill/CloseCj_StationOutBill',
+                            type: "GET",
+                            data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { icon: 1 });
+                                    layer.close(wait);
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+                }
+                else {
+                    layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                }
+            }
+
+            //宸ュ簭妫�
+            function set_ProcessCheck() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var linterid = data[0].hmainid.toString();
+                    //var HICMOEntryID = data[0].HICMOEntryID.toString();
+                    var OperationType = 2;
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '宸ュ簭妫�楠屽崟-缂栬緫'
+                        , shade: 0.6
+                        , maxmin: false
+                        , anim: 0
+                        , content: ['../../璐ㄩ噺绠$悊/宸ュ簭妫�楠屽崟/QC_ProcessCheckBill.html?OperationType=' + OperationType + '&linterid=' + linterid + '&HSouceBillType=3791&HICMOEntryID=0', 'yes']
+                        , resize: false
+                        , cancel: function () {
+                            btnIs();
+                        }
+                        , end: function () {
+                            get_FastQuery(table, option);
+                        }
+                    })
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //鏂板鍗曟嵁
+            function set_AddNew() {
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '宸ュ簭鍑虹珯姹囨姤鍗�-鏂板'
+                    , shade: 0.6
+                    , maxmin: false
+                    , anim: 0
+                    , content: ['Cj_StationOutBill.html?OperationType=1&linterid=0&HSouceBillType=&HBillNo=0&closeType=1', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        btnIs();
+                    }
+                    , end: function () {
+                        get_FastQuery(table, option);
+                    }
+                })
+            }
+
+            //缂栬緫鍗曟嵁
+            function set_ShowBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    //鎵撳紑缂栬緫椤甸潰
+                    set_ShowBill_open(data);
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //#region 鎵撳紑缂栬緫椤甸潰
+            function set_ShowBill_open(data) {
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '宸ュ簭鍑虹珯姹囨姤鍗�-缂栬緫'
+                    , shade: 0.6
+                    , maxmin: false
+                    , anim: 0
+                    , content: ['Cj_StationOutBill.html?OperationType=4&linterid=' + data[0].hmainid + '&HSouceBillType=&HBillNo=' + data[0].鍗曟嵁鍙�, 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        btnIs();
+                    }
+                    , end: function () {
+                        get_FastQuery(table, option);
+                    }
+                })
+            }
+            //#endregion
+
+            //閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                $("#HWorkBillNo").val("");
+                $("#HBillNo").val("");
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 7), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#HProcExchBillNo").val("");
+                $("#ColContent").val("");
+                $("#ColName").val("0");
+                $("#Comparator").val("0");
+                $("#HNumber").val("");
+                $("#HName").val("");
+                $("#HEmpNumber").val("");
+                $("#HEmpName").val("");
+                form.render('select');
+                sWhere = "";
+            }
+
+            //蹇�熻繃婊�
+            function get_FastQuery() {
+                //鍒ゆ柇鏄惁涓轰笅鏌ユ搷浣滐紝鑻ユ槸鍒欏彉鏇存煡璇㈠崟鍙峰拰鏃堕棿杩囨护鏉′欢
+                if (typeof (params[params[0]]) != "undefined" && lookDownBar == 0) {
+                    $("#HProcExchBillNo").val(params[params[0]]);
+                    $("#HBeginDate").val("1990-01-01");
+                    $("#HEndDate").val("2200-12-30");
+                    lookDownBar = 1;
+                }
+
+
+                var HStatus = $("select[name='HStatus']").val();//鐘舵��
+                var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+                var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
+                var HWorkBillNo = $("#HWorkBillNo").val();
+                var HBillNo = $("#HBillNo").val();
+                var HProcExchBillNo = $("#HProcExchBillNo").val();
+                var checkHWasterQty = $("input[name='checkHWasterQty']").prop("checked");//澶嶉�夋
+                var ColName = $("#ColName").val();//澶嶉�夋
+                var Comparator = $("#Comparator").val();
+                var ColContent = $("#ColContent").val();
+                var HNumber = $("#HNumber").val(); //浜у搧浠g爜 鍗崇墿鏂欑紪鐮�
+                var HName = $("#HName").val(); //褰撳墠宸ュ簭
+                var HEmpNumber = $("#HEmpNumber").val(); //鎿嶄綔鍛樹唬鐮�
+                var HEmpName = $("#HEmpName").val(); //鎿嶄綔鍛樺悕绉�
+
+                if (ColName != 0 && Comparator != 0) {
+                    var com = "";
+                    switch (Comparator) {
+                        case "7":
+                            com = "like'%" + ColContent + "%'";
+                            break;
+                        case "8":
+                            com = "like'%" + ColContent + "'";
+                            break;
+                        case "9":
+                            com = "like'" + ColContent + "%'";
+                            break;
+                        case "10":
+                            com = "not like'%" + ColContent + "%'";
+                            break;
+                        default:
+                            com = "" + Comparator + "'" + ColContent + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName+    " "+ com;
+                }
+
+                if (HBeginDate) {
+                    sWhere += " and CONVERT(varchar(100),鍑虹珯鏃堕棿, 23) >= '" + HBeginDate + "'";
+                }
+                if (HEndDate) {
+                    sWhere += " and CONVERT(varchar(100),鍑虹珯鏃堕棿, 23) <= '" + HEndDate + "'";
+                }
+                if (HWorkBillNo) {
+                    sWhere += " and 浠诲姟鍗� like '%" + HWorkBillNo + "%'";
+                }
+                if (HBillNo) {
+                    sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+                }
+                if (HProcExchBillNo) {
+                    sWhere += " and 宸ュ簭娴佽浆鍗″彿 like '%" + HProcExchBillNo + "%'";
+                }
+                if (HProcExchBillNo) {
+                    sWhere += " and 宸ュ簭娴佽浆鍗″彿 like '%" + HProcExchBillNo + "%'";
+                }
+                if (checkHWasterQty) {
+                    sWhere += "  and 鎶ュ簾鏁伴噺>0 ";
+                }
+                if (HNumber) {
+                    sWhere += " and 浜у搧浠g爜 like '%" + HNumber + "%'";
+                }
+                if (HName) {
+                    sWhere += " and 褰撳墠宸ュ簭 like '%" + HName + "%'";
+                }
+                if (HEmpNumber) {
+                    sWhere += " and 鎿嶄綔鍛樹唬鐮� like '%" + HEmpNumber + "%'";
+                }
+                if (HEmpName) {
+                    sWhere += " and 鎿嶄綔鍛� like '%" + HEmpName + "%'";
+                }
+
+                if (HStatus) {
+                    switch (HStatus) {
+                        case '-1':   //鍏ㄩ儴
+                            sWhere += "";
+                            break;
+                        case '0':    //鏈鏍�
+                            sWhere += " and 瀹℃牳浜�=''";
+                            break;
+                        case '1':    //宸插鏍�
+                            sWhere += " and 瀹℃牳浜�<>''";
+                            break;
+                        case '2':    //宸插叧闂�
+                            sWhere += " and 鍏抽棴浜�<>''";
+                        default:
+                    }
+                }
+                sWhere += "  and HBillSubType='SUB'";
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+
+            //鍔犺浇缃戞牸
+            function get_Display(sWhere) {
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                var ajaxLoad = layer.load();
+                var wait = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Cj_StationOutBill/get_Display',
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    //success: function (data1) {
+                    //    if (data1.count == 0) {
+                    //        option.data = [];
+                    //        layer.alert(data1.Message, { icon: 5 });
+                    //    } else {
+                    //        option.data = data1.data;
+                    //    }
+                    //    table.render(option);
+                    //    btnIs();
+                    //    if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                    //        ColFilter();
+                    //    }
+                    //    layer.close(wait);
+                    //}, error: function () {
+                    //    layer.close(wait);
+                    //    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    //}
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
+                            for (var i = 0; i < data.length; i++) {
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            if (data[i].name == '鏁伴噺' || data[i].name == '鍑虹珯鏁伴噺' || data[i].name == '鎶ュ簾鏁伴噺') {
+                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, totalRow: true });
+                                            } else {
+                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                            }
+                                    }
+                                }
+                            }
+
+                            //鍔ㄦ�佹樉绀哄垪鍚�
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data
+                                , height: 'full-50'
+                                , page: true
+                                , totalRow: true
+                                , cellMinWidth: 90
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                            }
+                            ins = table.render(option);
+
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                                ColFilter();
+                            }
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+                layer.close(wait);
+            }
+
+            //鍒犻櫎鍗曟嵁
+            function btn_Delete() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    layer.confirm('纭畾鍒犻櫎' + data[0].鍗曟嵁鍙� + '鍚楋紵', function (index) {
+                        var ajaxLoad = layer.load();
+                        //閫昏緫鍒犻櫎鏂规硶
+                        $.ajax({
+                            url: GetWEBURL() + '/Cj_StationOutBill/del_StationOutBill',
+                            type: "GET",
+                            data: { "HInterID": data[0].hmainid, "HDeleteMan": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    get_FastQuery();
+                                    layer.close(ajaxLoad);
+                                } else {
+                                    layer.close(ajaxLoad);
+                                    layer.alert(result.Message, { icon: 5 });
+                                }
+                            }, error: function () {
+                                layer.close(ajaxLoad);
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                            }
+                        });
+                        layer.close(index);
+                    });
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //閫�鍑�
+            function get_Exit() {
+                Pub_Close(2);
+            }
+
+            //瀵煎嚭Execel
+            function get_Export() {
+                table.exportFile(ins.config.id, option.data, "xls");
+            }
+
+            //鍒楁槑鏄剧ず涓嬫媺妗�
+            function ColFilter() {
+                var Organization = '<option  value="0" selected="selected" ></option>';
+                for (var i = 1; i < option.cols[0].length; i++) {
+                    if (option.cols[0][i].hide != true) {
+                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+                    }
+                }
+                $("#ColName").empty()
+                $("#ColName").append(Organization);
+                form.render('select');
+            }
+
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+
+
+
+
+    </script>
+
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
index 06585f3..792fb4b 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
@@ -566,6 +566,7 @@
                         default:
                     }
                 }
+                sWhere += "  and HBillSubType<>'SUB'";
                 get_Display(sWhere);
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillSubList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillSubList.html"
new file mode 100644
index 0000000..f2e9b32
--- /dev/null
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillSubList.html"
@@ -0,0 +1,931 @@
+锘�<!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/zgqCustom/zgqCustom.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-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">
+                                        <select name="HStatus" lay-filter="HStatus" style="width:190px;">
+                                            <option value="-1" selected="selected">鍏ㄩ儴</option>
+                                            <option value="0">鏈鏍�</option>
+                                            <option value="1">宸插鏍�</option>
+                                            <option value="2">宸插叧闂�</option>
+                                        </select>
+                                    </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-row">
+                                        <div class="layui-inline">
+                                            <div class="layui-inline">
+                                                <span>鍏朵粬鏉′欢></span>
+                                            </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="HWorkBillNo" id="HWorkBillNo">
+                                            </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="HBillNo" id="HBillNo">
+                                            </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="宸ュ簭娴佽浆鍗″彿" id="宸ュ簭娴佽浆鍗″彿">
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 80px;">
+                                        <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>
+                                    <div class="layui-row" style=" margin-top: 10px; margin-left: 80px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">杩囨护</label>
+                                            <div class="layui-input-block">
+                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+                                                </select>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+                                                <option value="0" selected="selected"></option>
+                                                <option value="=">=</option>
+                                                <option value=">=">>=</option>
+                                                <option value=">">></option>
+                                                <option value="<="><=</option>
+                                                <option value="<"><</option>
+                                                <option value="<>"><></option>
+                                                <option value="7">鍖呭惈</option>
+                                                <option value="8">宸﹀寘鍚�</option>
+                                                <option value="9">鍙冲寘鍚�</option>
+                                                <option value="10">涓嶅寘鍚�</option>
+                                            </select>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+                                        </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" id="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-FirstPieceCheck" id="btn-FirstPieceCheck">棣栨</button>
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print" id="btn-Print"><i class="layui-icon layui-icon-circle"></i>棰勮</button>-->
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell" id="btn-Cell"><i class="layui-icon layui-icon-ok"></i>淇濆瓨鍒楀</button>-->
+                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell" id="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>榛樿鍒楀</button>-->
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Exit" id="btn-Exit">閫�鍑�</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script type="text/html" id="toolBar">
+        <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </script>
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', '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 = [];
+            var ins;                        //鐢ㄤ簬瀵煎嚭excel
+            var HModName = "Cj_StationInBillList";
+            var titleData = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID", "HInterID", "HProcExchInterID", "HProcExchEntryID", "HICMOInterID", "HICMOEntryID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+            //宸ュ簭娴佽浆鍗′笅鏌ユ爣璁�
+            var lookDownBar = 0;              //(0:涓嬫煡鎿嶄綔锛�1锛氱洿鎺ユ煡鐪�)
+            var params = get_UrlVars();       //鑾峰彇鍙傛暟
+
+
+            //鍒濆鍖栬〃鏍�
+            set_InitGrid();
+            //DisPlay_HideColumn();
+
+            //閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                set_ClearQuery();
+            });
+
+            //鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery();
+            });
+
+            //鐢熶骇璁㈠崟鍥炶溅鏂规硶
+            $('#HWorkBillNo').on('keydown', function (event) {
+                var HWorkBillNo = $('#HWorkBillNo').val();
+                if (event.keyCode == 13) {
+                    if (!HWorkBillNo) {
+                        layer.msg("浠诲姟鍗曞彿涓嶈兘涓虹┖锛�")
+                        return;
+                    }
+                    $("#btnSearch").click();
+                }
+            });
+            //鍗曟嵁鍙峰洖杞︽柟娉�
+            $('#HBillNo').on('keydown', function (event) {
+                var HBillNo = $('#HBillNo').val();
+                if (event.keyCode == 13) {
+                    if (!HBillNo) {
+                        layer.msg("鍗曟嵁鍙蜂笉鑳戒负绌猴紒")
+                        return;
+                    }
+                    $("#btnSearch").click();
+                }
+            });
+            //宸ュ簭娴佽浆鍗″洖杞︽柟娉�
+            $('#宸ュ簭娴佽浆鍗″彿').on('keydown', function (event) {
+                var HStepBillNo = $('#宸ュ簭娴佽浆鍗″彿').val();
+                if (event.keyCode == 13) {
+                    if (!HStepBillNo) {
+                        layer.msg("宸ュ簭娴佽浆鍗″彿涓嶈兘涓虹┖锛�")
+                        return;
+                    }
+                    $("#btnSearch").click();
+                }
+            });
+
+            //琛岀洃鍚簨浠�
+            table.on('row(mainTable)', function (obj) {
+                var flag = !obj.tr.find(':checkbox:first').prop('checked');
+                obj.tr.find(':checkbox').prop('checked', flag);
+                if (flag) {
+                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //璁剧疆澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+                } else {
+                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+                    $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+                }
+                //mainTable 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+                layui.each(table.cache.mainTable, function (i, l) {
+                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+                        l.LAY_CHECKED = flag;
+                    }
+                });
+            });
+
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                switch (obj.event) {
+                    //鏂板
+                    case 'btn-Add': set_AddNew();
+                        break;
+                    //缂栬緫
+                    case 'btn-Edit': set_ShowBill();
+                        break;
+                    //鍒犻櫎
+                    case 'btn-Delete': btn_Delete();
+                        break;
+                    //瀹℃牳
+                    case 'btn-Audit': set_CheckBill();
+                        break;
+                    //鍙嶅鏍�
+                    case 'btn-DeAudit': set_AbandonCheck();
+                        break;
+                    //鍏抽棴
+                    case 'set_CloseBill': set_CloseBill(1);
+                        break;
+                    //鍙嶅叧闂�
+                    case 'set_CancelCloseBill': set_CloseBill(2);
+                        break;
+                    //棣栨
+                    case 'btn-FirstPieceCheck': set_FirstPieceCheck();
+                        break;
+                    //棰勮
+                    case 'btn-Cell': layer.msg('棰勮锛�');
+                        break;
+                    //淇濆瓨鍒楀
+                    case 'btn-Cell': layer.msg('淇濆瓨鍒楀锛�');
+                        break;
+                    //榛樿鍒楀
+                    case 'btn-RefreshCell': layer.msg('榛樿鍒楀锛�');
+                        break;
+                    //鍒楄缃�
+                    case 'set_HideColumn': get_HideColumn();
+                        break;
+                    //閫�鍑�
+                    case 'btn-Exit': get_Exit();
+                        break;
+                    //瀵煎嚭excel
+                    case 'get_export':
+                        get_Export();
+                        break;
+                };
+            });
+
+
+            //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
+
+            //#region缂栬緫鍓嶅垽鏂�
+            function set_ShowBillJudge(data) {
+                var HBillNo = data[0].鍗曟嵁鍙�;
+                var wait = layer.load();
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Cj_StationInBill/set_ShowBillJudge", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "HBillNo": HBillNo },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            //鎵撳紑缂栬緫椤甸潰
+                            set_ShowBill_open(data);
+                        } else {
+                            layer.alert(result.Message, { icon: 5 });
+                        }
+                        layer.close(wait);
+                    }, error: function () {
+                        layer.close(wait);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
+            //#region 鎵撳紑缂栬緫椤甸潰
+            function set_ShowBill_open(data) {
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '宸ュ簭杩涚珯鎺ユ敹鍗�-缂栬緫'
+                    , shade: 0.6
+                    , maxmin: false
+                    , anim: 0
+                    , content: ['Cj_StationInBill.html?OperationType=4&linterid=' + data[0].HInterID + '&HSouceBillType=&HBillNo=' + data[0].鍗曟嵁鍙�, 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        btnIs();
+                    }
+                    , end: function () {
+                        get_FastQuery(table, option);
+                    }
+                })
+            }
+            //#endregion
+
+            //#endregion
+
+            //鍔熻兘鎸夐挳鏄惁绂佺敤鏂规硶锛屾瘡娆″姞杞借〃鏍奸兘瑕佽皟鐢�
+            function btnIs() {
+                //$('#btn-Add').addClass("layui-btn-disabled").attr("disabled", true);//鏂板鎸夐挳
+                //$('#btn-Delete').addClass("layui-btn-disabled").attr("disabled", true);//鍒犻櫎鎸夐挳
+                //$('#btn-Audit').addClass("layui-btn-disabled").attr("disabled", true);//瀹℃牳鎸夐挳
+                //$('#btn-DeAudit').addClass("layui-btn-disabled").attr("disabled", true);//鍙嶅鏍告寜閽�
+                $('#btn-Print').addClass("layui-btn-disabled").attr("disabled", true);//棰勮鎸夐挳
+                $('#btn-Cell').addClass("layui-btn-disabled").attr("disabled", true);//淇濆瓨鍒楀鎸夐挳
+                $('#btn-RefreshCell').addClass("layui-btn-disabled").attr("disabled", true);//榛樿鍒楀鎸夐挳
+                //$('#btn-Exit').addClass("layui-btn-disabled").attr("disabled", true);//閫�鍑烘寜閽�
+            }
+
+            //鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 7), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , defaultToolbar: ['filter', 'exports', 'print']
+                    , 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: 190 }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
+                        , { field: '娴佽浆鍗″彿', title: '宸ュ簭娴佽浆鍗″彿', width: 125 }
+                        , { field: 'HProcID', title: 'HProcID', hide: true }
+                        , { field: '褰撳墠宸ュ簭浠g爜', title: '褰撳墠宸ュ簭浠g爜', width: 125 }
+                        , { field: '褰撳墠宸ュ簭', title: '褰撳墠宸ュ簭' }
+                        , { field: 'HMaterID', title: 'HMaterID', hide: true }
+                        , { field: '浜у搧浠g爜', title: '浜у搧浠g爜' }
+                        , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О', width: 125 }
+                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
+                        , {
+                            field: '杩涚珯鏃堕棿', title: '杩涚珯鏃堕棿', width: 105, templet: function (d) {
+                                if (d.杩涚珯鏃堕棿 == null) {
+                                    return "";
+                                }
+                                return util.toDateString(d.杩涚珯鏃堕棿, "yyyy-MM-dd HH:mm:ss");
+                            }
+                        }
+                        , { field: '鎺ユ敹鏁伴噺', title: '杩涚珯鎺ユ敹鏁伴噺' }
+                        , { field: 'HEmpID', title: 'HEmpID', hide: true }
+                        , { field: '鎿嶄綔鍛樹唬鐮�', title: '鎿嶄綔鍛樹唬鐮�', width: 125 }
+                        , { field: '鎿嶄綔鍛�', title: '鎿嶄綔鍛�' }
+                        , { field: 'HSourceID', title: 'HSourceID', hide: true }
+                        , { field: '鐢熶骇璧勬簮浠g爜', title: '鐢熶骇璧勬簮浠g爜', width: 125 }
+                        , { field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮' }
+                        , { field: 'HGroupID', title: 'HGroupID', hide: true }
+                        , { field: '鐢熶骇鐝粍浠g爜', title: '鐢熶骇鐝粍浠g爜', width: 125 }
+                        , { field: '鐢熶骇鐝粍浠g爜', title: '鐢熶骇鐝粍浠g爜', width: 125 }
+                        , { field: '鐢熶骇鐝粍', title: '鐢熶骇鐝粍' }
+                        , { field: 'LOT鏁伴噺', title: 'LOT鏁伴噺' }
+                    ]]
+                    , text: {
+                        none: '鏃犳暟鎹紒'
+                    }
+                };
+                set_ClearQuery();
+                get_FastQuery();
+            }
+
+            //鍔犺浇缃戞牸
+            function get_Display(sWhere) {
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                var ajaxLoad = layer.load();
+                var wait = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + '/Cj_StationInBill/get_Display',
+                    type: "GET",
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left' });
+                            for (var i = 0; i < data.length; i++) {
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+
+                            //鍔ㄦ�佹樉绀哄垪鍚�
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data
+                                , height: 'full-50'
+                                , page: true
+                                , cellMinWidth: 90
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                            }
+                            ins = table.render(option);
+
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                                ColFilter();
+                            }
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                        } else {
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+                layer.close(wait);
+            }
+
+            //蹇�熻繃婊�
+            function get_FastQuery() {
+                //鍒ゆ柇鏄惁涓轰笅鏌ユ搷浣滐紝鑻ユ槸鍒欏彉鏇存煡璇㈠崟鍙峰拰鏃堕棿杩囨护鏉′欢
+                if (typeof (params[params[0]]) != "undefined" && lookDownBar == 0) {
+                    $("#宸ュ簭娴佽浆鍗″彿").val(params[params[0]]);
+                    $("#HBeginDate").val("1990-01-01");
+                    $("#HEndDate").val("2200-12-30");
+                    lookDownBar = 1;
+                }
+
+                var HStatus = $("select[name='HStatus']").val();//鐘舵��
+                var 宸ュ簭娴佽浆鍗″彿 = $("#宸ュ簭娴佽浆鍗″彿").val();
+                var HWorkBillNo = $("#HWorkBillNo").val();  //浠诲姟鍗曞彿
+                var HBillNo = $("#HBillNo").val();  //鍗曟嵁鍙�
+                var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+                var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
+                var ColName = $("#ColName").val();//澶嶉�夋
+                var Comparator = $("#Comparator").val()
+                var ColContent = $("#ColContent").val();
+                var HNumber = $("#HNumber").val(); //浜у搧浠g爜 鍗崇墿鏂欑紪鐮�
+                var HName = $("#HName").val(); //褰撳墠宸ュ簭
+
+                if (ColName != 0 && Comparator != 0) {
+                    var com = "";
+                    switch (Comparator) {
+                        case "7":
+                            com = "like'%" + ColContent + "%'";
+                            break;
+                        case "8":
+                            com = "like'%" + ColContent + "'";
+                            break;
+                        case "9":
+                            com = "like'" + ColContent + "%'";
+                            break;
+                        case "10":
+                            com = "not like'%" + ColContent + "%'";
+                            break;
+                        default:
+                            com = "" + Comparator + "'" + ColContent + "'";
+                            break;
+                    }
+                    sWhere += " and " + ColName + " " + com;
+                }
+
+                if (宸ュ簭娴佽浆鍗″彿) {
+                    sWhere += " and 娴佽浆鍗″彿 like '%" + 宸ュ簭娴佽浆鍗″彿 + "%'";
+                }
+                if (HBeginDate) {
+                    sWhere += " and CONVERT(varchar(100),杩涚珯鏃堕棿, 23) >= '" + HBeginDate + "'";
+                }
+                if (HEndDate) {
+                    sWhere += " and CONVERT(varchar(100),杩涚珯鏃堕棿, 23) <= '" + HEndDate + "'";
+                }
+                if (HWorkBillNo) {
+                    sWhere += " and 浠诲姟鍗� like '%" + HWorkBillNo + "%'";
+                }
+                if (HBillNo) {
+                    sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
+                }
+                if (HNumber) {
+                    sWhere += " and 浜у搧浠g爜 like '%" + HNumber + "%'";
+                }
+                if (HName) {
+                    sWhere += " and 褰撳墠宸ュ簭 like '%" + HName + "%'";
+                }
+                if (HStatus) {
+                    switch (HStatus) {
+                        case '-1':   //鍏ㄩ儴
+                            sWhere += "";
+                            break;
+                        case '0':    //鏈鏍�
+                            sWhere += " and 瀹℃牳浜�=''";
+                            break;
+                        case '1':    //宸插鏍�
+                            sWhere += " and 瀹℃牳浜�<>''";
+                            break;
+                        case '2':    //宸插叧闂�
+                            sWhere += " and 鍏抽棴浜�<>''";
+                        default:
+                    }
+                }
+                sWhere += " and HBillSubType='SUB'";
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+
+            //閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                $("#HWorkBillNo").val("");
+                $("#HBillNo").val("");
+                $("#宸ュ簭娴佽浆鍗″彿").val("");
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 7), "yyyy-MM-dd"));
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+                $("#ColContent").val("");
+                $("#ColName").val("0");
+                $("#Comparator").val("0");
+                $("#HNumber").val("");
+                $("#HName").val("");
+                form.render('select');
+                sWhere = "";
+            }
+
+            //缂栬緫鍗曟嵁
+            function set_ShowBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    //鎵撳紑缂栬緫椤甸潰
+                    set_ShowBill_open(data);
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //鍒犻櫎鍗曟嵁
+            function btn_Delete() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    layer.confirm('纭畾鍒犻櫎' + data[0].鍗曟嵁鍙� + '鍚楋紵', function (index) {
+                        var ajaxLoad = layer.load();
+                        //閫昏緫鍒犻櫎鏂规硶
+                        $.ajax({
+                            url: GetWEBURL() + '/Cj_StationInBill/del_StationInBill',
+                            type: "GET",
+                            data: { "HInterID": data[0].HInterID, "HDeleteMan": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    get_FastQuery();
+                                    layer.close(ajaxLoad);
+                                } else {
+                                    layer.close(ajaxLoad);
+                                    layer.alert(result.Message, { icon: 5 });
+                                }
+                            }, error: function () {
+                                layer.close(ajaxLoad);
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                            }
+                        });
+                        layer.close(index);
+                    });
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //鏂板鍗曟嵁
+            function set_AddNew() {
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '宸ュ簭杩涚珯鎺ユ敹鍗�-鏂板'
+                    , shade: 0.6
+                    , maxmin: false
+                    , anim: 0
+                    , content: ['Cj_StationInBill.html?OperationType=1&linterid=0&HSouceBillType=&HBillNo=0&closeType=1', 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        btnIs();
+                    }
+                    , end: function () {
+                        get_FastQuery(table, option);
+                    }
+                })
+            }
+
+            //棣栨
+            function set_FirstPieceCheck() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var linterid = data[0].HInterID.toString();
+                    var OperationType = 2;
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '棣栦欢妫�楠屽崟-缂栬緫'
+                        , shade: 0.6
+                        , maxmin: false
+                        , anim: 0
+                        , content: ['../../璐ㄩ噺绠$悊/棣栦欢妫�楠屽崟/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=' + OperationType + '&linterid=' + linterid + '&HSouceBillType=3790&HICMOEntryID=0', 'yes']
+                        , resize: false
+                        , cancel: function () {
+                            btnIs();
+                        }
+                        , end: function () {
+                            get_FastQuery(table, option);
+                        }
+                    })
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+
+            //瀵煎嚭Execel
+            function get_Export() {
+                table.exportFile(ins.config.id, option.data, "xls");
+            }
+
+
+
+            //閫�鍑�
+            function get_Exit() {
+                Pub_Close(2);
+            }
+
+            //瀹℃牳
+            function set_CheckBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    var wait = layer.load();
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Cj_StationInBill/set_CheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { icon: 1 });
+                                get_FastQuery(table, option);
+                            } else {
+                                layer.alert(result.Message, { icon: 5 });
+                            }
+                            layer.close(wait);
+                        }, error: function () {
+                            layer.close(wait);
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+
+            //鍙嶅鏍�
+            function set_AbandonCheck() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var InterID = data[0].hmainid.toString();
+                    //閫昏緫瀹℃牳鏂规硶
+                    var wait = layer.load();
+                    $.ajax({
+                        type: "GET",
+                        url: GetWEBURL() + "/Cj_StationInBill/set_AbandonCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.msg(result.Message, { icon: 1 });
+                                get_FastQuery(table, option);
+                            } else {
+                                layer.alert(result.Message, { icon: 5 });
+                            }
+                            layer.close(wait);
+                        }, error: function () {
+                            layer.close(wait);
+                            layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                        }
+                    });
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+                }
+            }
+
+            //鍏抽棴  [1 鍏抽棴銆�2 鍙嶅叧闂璢
+            function set_CloseBill(num) {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+
+                if (data.length == 1) {
+                    layer.confirm("纭瑕佸叧闂悧?", function (index) {
+                        var wait = layer.load();
+                        var HInterID = data[0].hmainid;
+                        $.ajax({
+                            url: GetWEBURL() + '/Cj_StationInBill/CloseCj_StationInBill',
+                            type: "GET",
+                            data: { "HInterID": HInterID, "Type": num, "user": sessionStorage["HUserName"] },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { icon: 1 });
+                                    layer.close(wait);
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+                }
+                else {
+                    layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+                }
+            }
+
+            //鍒楁槑鏄剧ず涓嬫媺妗�
+            function ColFilter() {
+                var Organization = '<option  value="0" selected="selected" ></option>';
+                for (var i = 1; i < option.cols[0].length; i++) {
+                    if (option.cols[0][i].hide != true) {
+                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+                    }
+                }
+                $("#ColName").empty();
+                $("#ColName").append(Organization);
+                form.render('select');
+            }
+
+            //闅愯棌鍒楄缃�
+            function get_HideColumn() {
+                var colName = "";
+                var contentUrl = "";
+                for (var i = 1; i < option.cols[0].length - 1; i++) {
+                    colName += option.cols[0][i]["title"] + ",";
+                }
+                var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+                var urlLen = urlStr.split('/');
+                for (var i = 0; i < urlLen.length - 4; i++) {
+                    contentUrl += "../";
+                }
+                colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+                contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+                layer.open({
+                    type: 2
+                    , skin: "layui-layer-rim" //鍔犱笂杈规
+                    , title: "闅愯棌鍒楄缃�"  //鏍囬
+                    , closeBtn: 1  //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+                    , shift: 2 //寮瑰嚭鍔ㄧ敾
+                    , area: ["50%", "90%"] //绐椾綋澶у皬
+                    , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+                    , content: [contentUrl, "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 = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
+
+                            dataCol = data1.data[0].HGridString.split(',');
+
+                            for (var i = 0; i < option.cols[0].length - 2; i++) {
+                                if (dataCol[i]) {
+                                    var dataCols = dataCol[i].split('|');
+                                }
+                                //闅愯棌鍒�
+                                if (dataCols[1] == 1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+                                //璁剧疆鍒楀
+                                if (dataCols[3] > 0) {
+                                    option.cols[0][i + 1]["width"] = dataCols[3];
+                                }
+                                //璁剧疆鍐呭瀛椾綋澶у皬
+                                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 });
+                    }
+                })
+            }
+
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+
+
+
+
+    </script>
+
+</body>
+</html>
\ No newline at end of file

--
Gitblit v1.9.1