沈泽
2021-11-15 4c5e916268592593b6cc1979ba3febe87b4f5a27
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
6个文件已修改
1300 ■■■■■ 已修改文件
WebTM/App_Data/MssqlReportData.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/grf/器具采购入库单.grf 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/home/console.html 305 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/grf/器具采购入库单.grf 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/产量汇报单/Sc_ProductReportBillList.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/委外订单/WW_EntrustOrderBillList.html 982 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/App_Data/MssqlReportData.cs
@@ -19,7 +19,7 @@
    //public const string SqlConnStr = "Data Source=.;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";
    //public const string SqlConnStr = "Data Source=.;Initial Catalog=HX_LimsSys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//ch测试
    //public const string SqlConnStr = "Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//YL测试
    public const string SqlConnStr = "Data Source=192.168.0.200;Initial Catalog=HX_LimsSys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//丸井
    public const string SqlConnStr = "Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//丸井
    
    //public string sServer;
    //public string sDataBase;
WebTM/views/grf/Æ÷¾ß²É¹ºÈë¿âµ¥.grf
@@ -20,7 +20,7 @@
            Items Field
                Item
                    Name='接收单位'
                    DBFieldName='库存组织'
                    DBFieldName='往来单位'
                End
                Item
                    Name='往来单位'
@@ -328,7 +328,7 @@
                        Charset=134
                    End
                    TextAlign=MiddleCenter
                    Text='[#接受单位#]'
                    Text='[#往来单位#]'
                End
                Item
                    Type=MemoBox
WebTM/views/home/console.html
@@ -1,4 +1,6 @@
<!DOCTYPE html>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
@@ -8,11 +10,6 @@
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
    <style type="text/css">
        .atrheight {
            height:375px !important;
        }
    </style>
</head>
<body layadmin-themealias="default">
@@ -210,263 +207,60 @@
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <!-- å¿«æ·æ–¹å¼ -->
                    <div class="layui-col-md12">
                        <!-- æ•°æ®æ¦‚览 -->
                        <div class="layui-card">
                            <div class="layui-card-header">器具管理</div>
                            <div class="layui-card-header">数据概览</div>
                            <div class="layui-card-body">
                                <div class="layui-carousel layadmin-carousel atrheight layadmin-shortcut">
                                    <div carousel-item="">
                                        <ul class="layui-row layui-col-space10 layui-this">
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldProdInBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-console"></i>
                                                    <cite>器具采购入库单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldProdOutBillEdit.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-template-1"></i>
                                                    <cite>器具领用出库单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldProdBackBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-template-1"></i>
                                                    <cite>器具领用退库单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldScrapOutBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chart"></i>
                                                    <cite>器具处理出库单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldScrapInBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chart"></i>
                                                    <cite>器具报废入库单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldRepairChangeBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chat"></i>
                                                    <cite>器具改制申请单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldRepairInBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>器具改制入库单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldRepairOutBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>器具改制出库单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldProdMoveBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chat"></i>
                                                    <cite>器具直接调拨单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldMoveStockStepInBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>器具分步式调入单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldMoveStockStepOutBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>器具分步式调出单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具管理/Sc_MouldOtherInBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chat"></i>
                                                    <cite>器具其他入库单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../模治具管理/模治具仓库管理/Sc_MouldOtherOutBillList.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>器具其他出库单</cite>
                                                </a>
                                            </li>
                                <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-dataview" lay-anim="fade" lay-indicator="inside" lay-arrow="none" style="width: 100%; height: 280px;">
                                    <div carousel-item="" id="LAY-index-dataview">
                                        <div class="" _echarts_instance_="1621151534573" style="-webkit-tap-highlight-color: transparent; user-select: none; background-color: rgba(0, 0, 0, 0);">
                                            <div style="position: relative; overflow: hidden; width: 698px; height: 332px;">
                                                <div data-zr-dom-id="bg" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none;"></div>
                                                <canvas width="698" height="332" data-zr-dom-id="0" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                                <canvas width="698" height="332" data-zr-dom-id="1" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                                <canvas width="698" height="332" data-zr-dom-id="_zrender_hover_" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                            </div>
                                        </div>
                                        <div class="layui-this" _echarts_instance_="1621151534574" style="-webkit-tap-highlight-color: transparent; user-select: none; cursor: default; background-color: rgba(0, 0, 0, 0);">
                                            <div style="position: relative; overflow: hidden; width: 698px; height: 332px;">
                                                <div data-zr-dom-id="bg" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none;"></div>
                                                <canvas width="698" height="332" data-zr-dom-id="0" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                                <canvas width="698" height="332" data-zr-dom-id="1" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                                <canvas width="698" height="332" data-zr-dom-id="_zrender_hover_" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                            </div>
                                        </div>
                                        <div class="" _echarts_instance_="1621151534575" style="-webkit-tap-highlight-color: transparent; user-select: none; background-color: rgba(0, 0, 0, 0);">
                                            <div style="position: relative; overflow: hidden; width: 698px; height: 332px;">
                                                <div data-zr-dom-id="bg" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none;"></div>
                                                <canvas width="698" height="332" data-zr-dom-id="0" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                                <canvas width="698" height="332" data-zr-dom-id="1" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                                <canvas width="698" height="332" data-zr-dom-id="_zrender_hover_" class="zr-element" style="position: absolute; left: 0px; top: 0px; width: 698px; height: 332px; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-carousel-ind"><ul><li class=""></li><li class="layui-this"></li><li class=""></li></ul></div><button class="layui-icon layui-carousel-arrow" lay-type="sub"></button><button class="layui-icon layui-carousel-arrow" lay-type="add"></button>
                                </div>
                            </div>
                        </div>
                        <!--新闻版块-->
                        <!--<div class="layui-card">
                          <div class="layui-tab layui-tab-brief layadmin-latestData">
                            <ul class="layui-tab-title">
                              <li class="layui-this">今日热搜</li>
                              <li>今日热帖</li>
                                        </ul>
                                        <!--<ul class="layui-row layui-col-space10">
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Cc_LookingForReturnBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>上架归还单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/工序流转/MES_StationInBill_PDA.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>工序进站接收单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/工序流转/MES_StationOutBill_PDA.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>工序出站汇报单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/委外工序发出单/Cj_StationEntrustInBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>委外工序发出单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                <a lay-href="set/user/info.html">
                                    <i class="layui-icon layui-icon-set"></i>
                                    <cite>我的资料</cite>
                                </a>
                            </li>
                                        </ul>-->
                            <div class="layui-tab-content">
                              <div class="layui-tab-item layui-show">
                                <table id="LAY-index-topSearch"></table>
                                    </div>
                                    <div class="layui-carousel-ind"><ul><li class="layui-this"></li><li class=""></li></ul></div><button class="layui-icon layui-carousel-arrow" lay-type="sub"></button><button class="layui-icon layui-carousel-arrow" lay-type="add"></button>
                              <div class="layui-tab-item">
                                <table id="LAY-index-topCard"></table>
                                </div>
                            </div>
                        </div>
                        </div>-->
                    </div>
                    <div class="layui-col-md6">
                        <!-- å¿«æ·æ–¹å¼ -->
                        <div class="layui-card">
                            <div class="layui-card-header">wms管理</div>
                            <div class="layui-card-body">
                                <div class="layui-carousel layadmin-carousel atrheight layadmin-shortcut">
                                    <div carousel-item="">
                                        <ul class="layui-row layui-col-space10 layui-this">
                                            <li class="layui-col-xs3">
                                                <a href="../验收入库/外购入库/Kf_POStockInBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-console"></i>
                                                    <cite>外购入库</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../验收入库/委外入库/Kf_EntrustInBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-template-1"></i>
                                                    <cite>委外入库</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../验收入库/产品入库/Kf_ProductInBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-template-1"></i>
                                                    <cite>产品入库</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../领料发货/领料出库/Kf_MateOutBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chart"></i>
                                                    <cite>领料出库</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../领料发货/委外出库/Kf_EntrustOutBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chart"></i>
                                                    <cite>委外出库</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../领料发货/销售出库/Kf_SellOutBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chat"></i>
                                                    <cite>销售出库</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>调拨单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Cc_LookingForBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>下架找货单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../领料发货/销售出库/Kf_SellOutBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chat"></i>
                                                    <cite>销售出库</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>调拨单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Cc_LookingForBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>下架找货单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../领料发货/销售出库/Kf_SellOutBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-chat"></i>
                                                    <cite>销售出库</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Kf_MoveStockBill_Fast.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>调拨单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Cc_LookingForBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>下架找货单</cite>
                                                </a>
                                            </li>
                                        </ul>
                                        <ul class="layui-row layui-col-space10">
                                            <li class="layui-col-xs3">
                                                <a href="../仓存管理/仓库调拨/Cc_LookingForReturnBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>上架归还单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/工序流转/MES_StationInBill_PDA.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>工序进站接收单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/工序流转/MES_StationOutBill_PDA.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>工序出站汇报单</cite>
                                                </a>
                                            </li>
                                            <li class="layui-col-xs3">
                                                <a href="../车间管理/委外工序发出单/Cj_StationEntrustInBill.html" target="main_self_frame">
                                                    <i class="layui-icon layui-icon-find-fill"></i>
                                                    <cite>委外工序发出单</cite>
                                                </a>
                                            </li>
                                            <!--<li class="layui-col-xs3">
                                <a lay-href="set/user/info.html">
                                    <i class="layui-icon layui-icon-set"></i>
                                    <cite>我的资料</cite>
                                </a>
                            </li>-->
                                        </ul>
                                    </div>
                                    <div class="layui-carousel-ind"><ul><li class="layui-this"></li><li class=""></li></ul></div><button class="layui-icon layui-carousel-arrow" lay-type="sub"></button><button class="layui-icon layui-carousel-arrow" lay-type="add"></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md4">
@@ -605,3 +399,4 @@
    </style>
</body>
</html>
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/grf/Æ÷¾ß²É¹ºÈë¿âµ¥.grf
@@ -328,7 +328,7 @@
                        Charset=134
                    End
                    TextAlign=MiddleCenter
                    Text='[#接受单位#]'
                    Text='[#接收单位#]'
                End
                Item
                    Type=MemoBox
@@ -540,7 +540,7 @@
                    Top=1.79917
                    Width=2.80458
                    Height=0.608542
                    Text='供应商:'
                    Text='供应商222:'
                End
                Item
                    Type=FieldBox
WebTM/views/Éú²ú¹ÜÀí/²úÁ¿»ã±¨µ¥/Sc_ProductReportBillList.html
@@ -266,12 +266,13 @@
                    var InterID = data[0].HInterID.toString();
                    var HICMOInID = data[0].HICMOInterID.toString();
                    var HICMOEnID = data[0].HICMOEntryID.toString();
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "Sc_MESBeginWorkBill/DeltetMESProductReportBill", //方法所在页面和方法名
                            data: { "HInterID": InterID, "HICMOInterID": HICMOInID, "HICMOEntryID": HICMOEnID },
                            data: { "HInterID": InterID, "HICMOInterID": HICMOInID, "HICMOEntryID": HICMOEnID, "UserName":sessionStorage["HUserName"] },
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { time: 1 * 2000, icon: 1 });
WebTM/views/²É¹º¹ÜÀí/ίÍâ¶©µ¥/WW_EntrustOrderBillList.html
@@ -9,6 +9,12 @@
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    
</head>
<body>
@@ -25,28 +31,32 @@
                                    </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="1">未分配</option>
                                            <option value="2">已分配</option>
                                            <option value="3">已发布</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="HDate">
                                        <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="HDate1">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">订单跟踪号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO">
                                    </div>
                                </div>-->
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
@@ -66,12 +76,16 @@
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fp"><i class="layui-icon layui-icon-tips"></i>分配</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fb"><i class="layui-icon layui-icon-tips"></i>发布</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>撤销</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-yxj"><i class="layui-icon layui-icon-tips"></i>优先级</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详情</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>生成送货单</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                            </div>
                        </script>
@@ -80,16 +94,13 @@
            </div>
        </div>
    </div>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
    <script type="text/javascript">
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage','laydate'], function () {
            //#region å…¬å…±å˜é‡
            var $ = layui.$
            , admin = layui.admin
            , layer = layui.layer
@@ -98,158 +109,859 @@
            , element = layui.element
            , laypage = layui.laypage
            , laydate = layui.laydate
            //var sWhere = " äº§å“ä»£ç  = 'BX0002'";
                , util = layui.util
            //查询条件
            var sWhere = "";
            var option = [];
            var Name = "MouldProdInHouseCellWidth";
            //#endregion
            var option = {
                elem: '#mainTable'
                //, toolbar: '#toolbarDemo'
                ,height: 'full-50'
                , page: true
                ,cellMinWidth: 90
                , cols: [[
                    { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                    , { field: '日期', title: '日期' }
                    , { field: '单据号', title: '单据号' }
                    , { field: 'HBillType', title: 'HBillType', hide: true }
                    , { field: 'HSupID', title: 'HSupID', hide: true }
                    , { field: '供应商代码', title: '供应商代码' }
                    , { field: '供应商', title: '供应商' }
                    , { field: '地址', title: '地址' }
                    , { field: 'HSSID', title: 'HSSID', hide: true }
                    , { field: '结算方式代码', title: '结算方式代码' }
                    , { field: '结算方式', title: '结算方式' }
                    , { field: '结算日期', title: '结算日期' }
                    , { field: 'HCurID', title: 'HCurID', hide: true }
                    , { field: '币别代码', title: '币别代码' }
                    , { field: '币别', title: '币别' }
                    , { field: '汇率', title: '汇率' }
                    , { field: 'HDeptID', title: 'HDeptID', hide: true }
                    , { field: '部门代码', title: '部门代码' }
                    , { field: '部门', title: '部门' }
                    , { field: 'HManagerID', title: 'HManagerID', hide: true }
                    , { field: '主管代码', title: '主管代码' }
                    , { field: '主管', title: '主管' }
                    , { field: 'HEmpID', title: 'HEmpID', hide: true }
                    , { field: '业务员代码', title: '业务员代码' }
                    , { field: '业务员', title: '业务员' }
                    , { field: '摘要', title: '摘要' }
                    , { field: '表头备注', title: '表头备注' }
                    , { field: 'hsubid', title: 'hsubid', hide: true }
                    , { field: 'HMaterID', title: 'HMaterID', hide: true }
                    , { field: '物料代码', title: '物料代码' }
                    , { field: '物料名称', title: '物料名称' }
                    , { field: '规格型号', title: '规格型号' }
                    , { field: '批号', title: '批号' }
                    , { field: 'HUnitID', title: 'HUnitID', hide: true }
                    , { field: '计量单位代码', title: '计量单位代码' }
                    , { field: '计量单位', title: '计量单位' }
                    , { field: '数量', title: '数量' }
                    , { field: '单价', title: '单价' }
                    , { field: '金额', title: '金额' }
                    , { field: '税率', title: '税率' }
                    , { field: '税额', title: '税额' }
                    , { field: '价税合计', title: '价税合计' }
                    , { field: '到货日期', title: '到货日期' }
                    , { field: '源单单号', title: '源单单号' }
                    , { field: '计划跟踪号', title: '计划跟踪号' }
                    , { field: '表体备注', title: '表体备注' }
                    , { field: '制单人', title: '制单人' }
                    , { field: '制单日期', title: '制单日期' }
                    , { field: '审核人', title: '审核人' }
                    , { field: '审核日期', title: '审核日期' }
                    , { field: '修改人', title: '修改人' }
                    , { field: '修改日期', title: '修改日期' }
                    , { field: '关闭人', title: '关闭人' }
                    , { field: '关闭日期', title: '关闭日期' }
                    , { field: '作废人', title: '作废人' }
                    , { field: '作废日期', title: '作废日期' }
                ]]
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //初始化表格
            set_InitGrid();
            //加载数据到网格
            get_Display(sWhere);
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶åŒ…括on form事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //新增按钮
                    case 'btn-Add': set_AddNew();
                        break;
                    //编辑按钮
                    case 'btn-Edit': set_ShowBill();
                        break;
                    //删除按钮
                    case 'btn-Delete': set_DeleteBill();
                        break;
                    //浏览
                    case 'btn-view': get_ViewReport();
                        break;
                    //打印
                    case 'btn-print': get_PrintReport();
                        break;
                    //刷新
                    case 'get_Refresh': set_Refresh();
                        break;
                    //退出
                    case 'get_Exit': Pub_Close(2);
                        break;
                    //分配
                    case 'btn-fp': set_Distribut();
                        break;
                    //发布
                    case 'btn-fb': set_Release();
                        break;
                    //优先级
                    case 'btn-yxj': set_Yxj();
                        break;
                    case 'btn-back': set_Back();
                        break;
            };
            //进入页面显示的缓存列表
            var index0 = layer.load(0, { shade: false });
            $.ajax({
                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                url: GetWEBURL() + '/WW_EntrustOrderBill/list',
                type: "GET",
                data: { "sWhere": sWhere },
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.close(index0);
                    } else {
                        layer.close(index0);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(index0);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            }); 
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                $("#HDate").val("");//开始日期
                $("#HDate1").val("");//结束日期
                $("#WorkCenter").val("");//单据号
                $("#btnSearch").click();
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {//选择仓位
                var HDate = $("#HDate").val();//开始日期
                var HDate1 = $("#HDate1").val();//结束日期
                var HOrderProcNO = $("#HOrderProcNO").val();//订单跟踪号
                var WorkCenter = $("#WorkCenter").val();//单据号
                if (HDate) {
                    sWhere += " and æ—¥æœŸ >= '" + HDate + "'";
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(table, option);
            });
            //表头信息部门弹窗
            form.on('submit(Department)', function () {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '供应商列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/SupplierInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                }
                if (HDate1) {
                    sWhere += " and æ—¥æœŸ <= '" + HDate1 + "'";
                        $("#HSupName").val(checkStatus.data[0].HName);
                        $("#HSupID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                if (WorkCenter) {
                    sWhere += " and å•据号 like '%" + WorkCenter + "%'";
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                }
                var index = layer.load(0, { shade: false });
                });
            });
            //#endregion
            //#region æ­¤é¡µé¢æ‰€æœ‰æ–¹æ³•
            //初始化表格
            function set_InitGrid() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                var columns = [
                    { type: 'checkbox', fixed: 'left', totalRowText: '合计' }
                    ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                    , { field: '日期', title: '日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '单据号', title: '单据号', width: 150 }
                    , { field: 'HBillType', title: 'HBillType', hide: true }
                    , { field: 'HSupID', title: 'HSupID', hide: true }
                    , { field: '业务状态', title: '业务状态', width: 100 }
                    , { field: '供应商协同状态', title: '供应商协同状态', width: 135 }
                    , { field: '反馈状态', title: '供应商反馈状态', width: 135 }
                    , { field: '供应商代码', title: '供应商代码', width: 120}
                    , { field: '供应商', title: '供应商', width: 100 }
                    , { field: '业务员代码', title: '业务员代码', width: 100 }
                    , { field: '业务员', title: '业务员', width: 100 }
                    , { field: 'HPriority', title: 'HPriority', width: 100, hide: true }
                    , { field: '优先级', title: '优先级', width: 100 }
                    , { field: '交货地点', title: '交货地点', width: 100}
                    , { field: 'HPSStyleID', title: 'HPSStyleID', hide: true }
                    , { field: '采购方式代码', title: '采购方式代码', width: 120}
                    , { field: '采购方式', title: '采购方式', width: 100}
                    , { field: 'HSSID', title: 'HSSID', hide: true }
                    , { field: '结算方式代码', title: '结算方式代码', width: 120}
                    , { field: '结算方式', title: '结算方式', width: 100}
                    , { field: '结算日期', title: '结算日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.结算日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: 'HCurID', title: 'HCurID', hide: true }
                    , { field: '币别代码', title: '币别代码', width: 100}
                    , { field: '币别', title: '币别', width: 100}
                    , { field: '汇率', title: '汇率', width: 100}
                    , { field: 'HDeptID', title: 'HDeptID', hide: true }
                    , { field: '部门代码', title: '部门代码', width: 100}
                    , { field: '部门', title: '部门', width: 100}
                    , { field: 'HManagerID', title: 'HManagerID', hide: true }
                    , { field: '主管代码', title: '主管代码', width: 100}
                    , { field: '主管', title: '主管', width: 100}
                    , { field: 'HEmpID', title: 'HEmpID', hide: true }
                    , { field: '摘要', title: '摘要', width: 100}
                    , { field: '表头备注', title: '表头备注', width: 100}
                    , { field: 'hsubid', title: 'hsubid', hide: true }
                    , { field: 'HMaterID', title: 'HMaterID', hide: true }
                    , { field: '物料代码', title: '物料代码', width: 100}
                    , { field: '物料名称', title: '物料名称', width: 100}
                    , { field: '规格型号', title: '规格型号', width: 100}
                    , { field: '批号', title: '批号', width: 100}
                    , { field: 'HUnitID', title: 'HUnitID', hide: true }
                    , { field: '计量单位代码', title: '计量单位代码', width: 120}
                    , { field: '计量单位', title: '计量单位', width: 100}
                    , { field: '数量', title: '数量', width: 100}
                    , { field: '单价', title: '单价', width: 100}
                    , { field: '金额', title: '金额', width: 100}
                    , { field: '税率', title: '税率', width: 100}
                    , { field: '税额', title: '税额', width: 100}
                    , { field: '价税合计', title: '价税合计', width: 100}
                    , { field: '交货日期', title: '交货日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.交货日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '源单单号', title: '源单单号', width: 100}
                    , { field: '计划跟踪号', title: '计划跟踪号', width: 100}
                    , { field: '表体备注', title: '表体备注', width: 100}
                    , { field: '制单人', title: '制单人', width: 100}
                    , { field: '制单日期', title: '制单日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '审核人', title: '审核人', width: 100}
                    , { field: '审核日期', title: '审核日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '修改人', title: '修改人', width: 100}
                    , { field: '修改日期', title: '修改日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '关闭人', title: '关闭人', width: 100}
                    , { field: '关闭日期', title: '关闭日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '作废人', title: '作废人', width: 100}
                    , { field: '作废日期', title: '作废日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd')}}</div>" }
                ];
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    , cellMinWidth: 120
                    , totalRow: true
                    , limit: 10
                    , height: 'full-50'
                    , cols: [columns]
                    , limits: [50, 500, 1000, 5000]
                    , done: function (res, curr, count) {
                    }
                };
                ////设置列宽
                //var colWidth = getColumnsWidth();
                //if (colWidth == "" || colWidth == []) {
                //}
                //else {
                //    $.each(columns, function (x, m) {
                //        m["width"] = colWidth[x];
                //    });
                //}
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                }
                $.ajax({
                    url: GetWEBURL() + '/WW_EntrustOrderBill/list',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"],},
                    success: function (data1) {
                        if (data1.count == 1) {
                            DataList = data1.data;
                            option.data = data1.data;
                            table.render(option);
                            layer.close(index);
                            layer.alert("查询成功", { icon: 1 });
                            layer.close(wait);
                        } else {
                            layer.close(index);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index);
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //新增
            function set_AddNew() {
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '新增器具采购入库单',
                    closeBtn: 1,
                    shift: 2,
                    area: ['100%', '100%'],
                    maxmin: true,
                    content: '../模治具仓库管理/Sc_MouldProdInBillEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
                    end: function () {
                        //刷新页面,
                        get_FastQuery(table, option);
                    },
                    success: function (layero, index) {
                    }
                });
            }
            //编辑单据
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '编辑器具采购入库单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../模治具仓库管理/Sc_MouldProdInBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                        , resize: false,
                        end: function () {
                            get_FastQuery(table, option);
                        }
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        var wait = layer.load();
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "/Sc_MouldProdInBill/set_DeleteBill", //方法所在页面和方法名
                            data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                        // å¾—到frame索引
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(index);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
                                } else {
                                    layer.alert(result.code + result.Message, { icon: 5 });
                                }
                                layer.close(wait);
                            }, error: function () {
                                layer.close(wait);
                                layer.alert("接口请求失败!", { icon: 5 });
                            }
                        });
                    })
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
            //预览
            function get_ViewReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //打印
            function get_PrintReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //审核
            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() + "/Sc_MouldProdInBill/set_CheckBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    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() + "/Sc_MouldProdInBill/set_AbandonCheck", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    get_FastQuery(table, option);
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                            layer.close(wait);
                        }, error: function () {
                            layer.close(wait);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据反审核!');
                }
            }
            //获取列宽
            function getColumnsWidth() {
                var result = [];
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                //获取列宽
                $.ajax({
                    url: GetWEBURL() + '/WW_EntrustOrderBill/list',
                    async: false,
                    type: "Get",
                    dataType: "json",
                    data: { "colNum": colNum, "Name": Name },
                    success: function (data1) {
                        if (data1.code == 1) {
                            result = data1.data;
                        }
                        else if (data1.code == -1) {
                        }
                        else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                return result;
            }
            //保存列宽
            function set_SaveGridColWidth() {
                var arr = [];
                // åˆ—æ•°
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                for (var i = 0; i <= colNum; i++) {
                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
                    var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
                    if (colName != "" && colName != null) {
                        arr.push(colWidth == -1 ? 200 : colWidth);
                    }
                }
                arr.unshift(40); //首位追加
                $.ajax({
                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
                    async: false,
                    type: "POST",
                    dataType: "json",
                    data: { "myMap": JSON.stringify(arr), "Name": Name },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                //设置赋值列宽
                var colWidth = getColumnsWidth();
                if (colWidth == "" || colWidth == []) {
                }
                else {
                    $.each(columns, function (x, m) {
                        m["width"] = colWidth[x];
                    });
                }
                get_FastQuery(table, option);
            }
            //默认列宽
            function set_DefaultGridColWidth() {
                var arr = [];
                // åˆ—æ•°
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                for (var i = 0; i <= colNum; i++) {
                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
                    if (colName != "" && colName != null) {
                        arr.push(200);   //默认宽度200
                    }
                }
                arr.unshift(40); //首位追加
                $.ajax({
                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
                    async: false,
                    type: "POST",
                    dataType: "json",
                    data: { "myMap": JSON.stringify(arr), "Name": Name },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                //设置赋值列宽
                var colWidth = getColumnsWidth();
                if (colWidth == "" || colWidth == []) {
                }
                else {
                    $.each(columns, function (x, m) {
                        m["width"] = colWidth[x];
                    });
                }
                get_FastQuery(table, option);
            }
            //复制单据
            function set_CopyBill() {
            }
            //关闭单据
            function set_CloseBill() {
            }
            //反关闭单据
            function set_CancelCloseBill() {
            }
            //作废单据
            function set_CancelltionBill() {
            }
            //反作废
            function set_AbandonCancelltion() {
            }
            //分配
            function set_Distribut() {
                var hmainid='';
                var checkStatus = table.checkStatus('mainTable'),
                     data = checkStatus.data;
                if (checkStatus.data.length == 0) {
                    //var InterID = data[0].hmainid.toString();
                    return layer.msg('请选择数据');
                }
                for (var i = 0; i < data.length; i++) {
                    hmainid += data[i]["hmainid"] + ',';
                    if (data[i]["业务状态"] == "已发布") {
                        return layer.msg('单据号:' + data[i]["单据号"]+'已发布');
                    }
                }
                hmainid = hmainid.substring(0, hmainid.length-1)
                var HSupplierId='';
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '采购员列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/UserInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        HSupplierId = checkStatus.data[0].HItemID.toString();
                        $.ajax({
                            url: GetWEBURL() + '/WW_EntrustOrderBill/distribut',
                            async: false,
                            type: "GET",
                            dataType: "json",
                            data: { "Hmainid": hmainid, "HSupplierId": HSupplierId },
                            success: function (data1) {
                                if (data1.Message.indexOf("成功") > 0) {
                                    layer.msg("分配成功", { time: 3 * 1000, icon: 1 }, function () {
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(index);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
                                } else {
                                    layer.alert(data1.Message, { icon: 5 });
                                }
                            }, error: function (e) {
                                layer.alert(data1.Message, { icon: 5 });
                            }
                        });
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
            });
            //laydate.render({
            //    elem: '#HDate'
            //    , type: 'datetime'
            //    , trigger: 'click'
            //    , format:'yyyy-MM-dd HH:mm'
            //});
            }
            //发布
            function set_Release() {
                var hmainid = '';
                var checkStatus = table.checkStatus('mainTable'),
                    data = checkStatus.data;
                if (checkStatus.data.length == 0) {
                    //var InterID = data[0].hmainid.toString();
                    return layer.msg('请选择数据');
                }
                for (var i = 0; i < data.length; i++) {
                    hmainid += data[i]["hmainid"] + ',';
                    if (data[i]["业务状态"] == "未分配" || data[i]["业务状态"] == "" ) {
                        return layer.msg('单据号:' + data[i]["单据号"] + '未分配');
                    }
                }
                hmainid = hmainid.substring(0, hmainid.length - 1)
                $.ajax({
                    url: GetWEBURL() + '/WW_EntrustOrderBill/release',
                    async: false,
                    type: "GET",
                    dataType: "json",
                    data: { "Hmainid": hmainid},
                    success: function (data1) {
                        if (data1.Message.indexOf("成功") > 0) {
                            layer.msg("发布成功", { time: 1 * 1000, icon: 1 }, function () {
                                //修改为功后刷新界面
                                window.location.reload();
                            });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(data1.Message, { icon: 5 });
                    }
                });
            }
            //撤销
            function set_Back() {
                var hmainid = '';
                var checkStatus = table.checkStatus('mainTable'),
                    data = checkStatus.data;
                if (checkStatus.data.length == 0) {
                    return layer.msg('请选择数据');
                }
                for (var i = 0; i < data.length; i++) {
                    hmainid += data[i]["hmainid"] + ',';
                    if (data[i]["业务状态"] != "已发布") {
                        return layer.msg('单据号:' + data[i]["单据号"] + '未发布');
                    }
                    if (data[i]["供应商协同状态"] != "未确认") {
                        return layer.msg('单据号:' + data[i]["单据号"] + ',供应商已确认');
                    }
                }
                hmainid = hmainid.substring(0, hmainid.length - 1)
                $.ajax({
                    url: GetWEBURL() + '/WW_EntrustOrderBill/Back',
                    async: false,
                    type: "GET",
                    dataType: "json",
                    data: { "Hmainid": hmainid },
                    success: function (data1) {
                        if (data1.Message.indexOf("成功") > 0) {
                            layer.msg("操作成功", { time: 1 * 1000, icon: 1 }, function () {
                                //修改为功后刷新界面
                                window.location.reload();
                            });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(data1.Message, { icon: 5 });
                    }
                });
            }
            //优先级
            function set_Yxj() {
                var hmainid = '';
                var checkStatus = table.checkStatus('mainTable'),
                    data = checkStatus.data;
                if (checkStatus.data.length == 0) {
                    //var InterID = data[0].hmainid.toString();
                    return layer.msg('请选择数据');
                }
                for (var i = 0; i < data.length; i++) {
                    hmainid += data[i]["hmainid"] + ',';
                }
                hmainid = hmainid.substring(0, hmainid.length - 1)
                var HyxjId = '';
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '优先级列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/OrderLevInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        HyxjId = checkStatus.data[0].HItemID.toString();
                        $.ajax({
                            url: GetWEBURL() + '/WW_EntrustOrderBill/yxj',
                            async: false,
                            type: "GET",
                            dataType: "json",
                            data: { "Hmainid": hmainid, "HyxjId": HyxjId },
                            success: function (data1) {
                                if (data1.Message.indexOf("成功") > 0) {
                                    layer.msg("操作成功", { time: 3 * 1000, icon: 1 }, function () {
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(index);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
                                } else {
                                    layer.alert(data1.Message, { icon: 5 });
                                }
                            }, error: function (e) {
                                layer.alert(data1.Message, { icon: 5 });
                            }
                        });
                       // layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
                        //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                    },
                    end: function () {
                    },
                    success: function (layero, index) {
                    }
                });
            }
            //快速过滤
            function get_FastQuery(table, option) {
                var HStatus = $("select[name='HStatus']").val();//状态
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号
                var HSupID = $("#HSupID").val();       //供应商信息
                if (HStatus) {
                    switch (HStatus) {
                        case '-1':   //全部
                            sWhere += "";
                            break;
                        case '1':    //未分配
                            sWhere += " and ä¸šåŠ¡çŠ¶æ€='未分配'";
                            break;
                        case '2':    //已审核
                            sWhere += " and ä¸šåŠ¡çŠ¶æ€='已分配'";
                            break;
                        case '3':    //已关闭
                            sWhere += " and ä¸šåŠ¡çŠ¶æ€='已发布'";
                        default:
                    }
                }
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                }
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HSupID) {
                    sWhere += " and HSupID = '" + HSupID + "'";
                }
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
            }
            //重置过滤条件
            function set_ClearQuery() {
                $('#HStatus').find("option[value='-1']").attr("selected", true);
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HBillNo").val("");
                $("#HSupName").val("");
                $("#HSupID").val("");
                sWhere = "";
                get_Display(sWhere);
            }
            //#endregion
            //刷新
            function set_Refresh() {
                $("#btnSearch").click();
            }
            //以上是layui模块
        });
    </script>
</body>