仲国强
2021-09-08 71383b569601fe205b1abff2412e0bbd6d220f14
工序检验单列表优化sz
1个文件已修改
606 ■■■■■ 已修改文件
WebTM/views/质量管理/工序检验单/QC_ProcessCheckBillList.html 606 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/ÖÊÁ¿¹ÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillList.html
@@ -1,19 +1,24 @@
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>工序检验单列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <!--<script src="../../../layuiadmin/layui/layui.js"></script>-->
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <style type="text/css">
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <!--<style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
    </style>-->
</head>
<body>
    <div class="layui-fluid">
@@ -23,33 +28,47 @@
                    <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 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 style="padding: 10px;">
                                    <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnReSearch" style="padding:0 5px">重置</button>
                                    <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btndelete" style="padding:0 5px">删除</button>
                                    <!--<button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnAdd" style="padding:0 5px">新增</button>-->
                                    <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnModify" style="padding:0 5px">修改</button>
                                    <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnJY" style="padding:0 5px">禁用</button>
                                    <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnFJY" style="padding:0 5px">反禁用</button>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
                            </div>
                        </script>
                        <!--<div style="padding: 10px;">
                            <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnReSearch" style="padding:0 5px">重置</button>
                            <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btndelete" style="padding:0 5px">删除</button>-->
                        <!--<button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnAdd" style="padding:0 5px">新增</button>-->
                        <!--<button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnModify" style="padding:0 5px">修改</button>
                            <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnJY" style="padding:0 5px">禁用</button>
                            <button type="button" lay-submit="" class="layui-btn layui-btn-radius" lay-filter="btnFJY" style="padding:0 5px">反禁用</button>
                        </div>-->
                    </form>
                </div>
            </div>
        </div>
    </div>
    <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/Scripts/webConfig.js"></script>-->
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
@@ -65,219 +84,390 @@
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
            var option = [];
            //查询条件
            var sWhere = "";
            var option = {
                elem: '#mainTable'
                //, toolbar: '#toolbarDemo'
                , height: 'full-50'
                , page: true
                , cellMinWidth: 90
                , cols: [[
                    { type: 'radio', fixed: 'left' }
                    , { field: 'hmainid', title: '单据ID', hide: true }
                    , { field: '日期', title: '日期', width: 160 }
                    , { field: '单据号', title: '单据号', width: 160 }
                    , { field: '表头备注', title: '表头备注', width: 160, hide: true }
                    , { field: '物料', title: '物料', width: 200, hide: true }
                    , { field: '物料代码', title: '物料代码', width: 200 }
                    , { field: '物料名称', title: '物料名称', width: 200 }
                    , { field: '工序代码', title: '工序代码', width: 200 }
                    , { field: '工序名称', title: '工序名称', width: 200 }
                    , { field: '生产资源代码', title: '生产资源代码', width: 200 }
                    , { field: '生产资源', title: '生产资源', width: 200 }
                    , { field: '生产人员代码', title: '生产人员代码', width: 160 }
                    , { field: '生产人员', title: '生产人员', width: 160 }
                    , { field: '检验员代码', title: '检验员代码', width: 160 }
                    , { field: '检验员', title: '检验员', width: 200 }
                    , { field: '部门代码', title: '部门代码', width: 200 }
                    , { field: '部门名称', title: '部门名称', width: 200 }
                    , { field: '客户代码', title: '客户代码', width: 200 }
                    , { field: '客户', title: '客户', width: 200 }
                    , { field: '产地代码', title: '产地代码', width: 200 }
                    , { field: '产地', title: '产地', width: 200 }
                    , { field: '加工类型代码', title: '加工类型代码', width: 115 }
                    , { field: '加工类型', title: '加工类型', width: 115 }
                    , { field: '配方号', title: '配方号', width: 200 }
                    , { field: '配方名称', title: '配方名称', width: 200 }
                    , { field: '拉丝方向', title: '拉丝方向', width: 115 }
                    , { field: '包装方式代码', title: '包装方式代码', width: 200 }
                    , { field: '包装方式', title: '包装方式', width: 200 }
                    , { field: '制单人', title: '制单人', width: 200 }
                    , { field: '制单日期', title: '制单日期', width: 200 }
                    , { field: '审核人', title: '审核人', width: 115 }
                    , { field: '审核日期', title: '审核日期', width: 200 }
                    , { field: '修改人', title: '修改人', width: 200 }
                    , { field: '修改日期', title: '修改日期', width: 200 }
                    , { field: '关闭人', title: '关闭人', width: 115 }
                    , { field: '关闭日期', title: '关闭日期', width: 200 }
                    , { field: '作废人', title: '作废人', width: 200 }
                    , { field: '作废日期', title: '作废日期', width: 200 }
                    , { field: '单据类型', title: '单据类型', width: 200 }
                    , { field: 'hsubid', title: 'hsubid', width: 115, hide: true }
                ]]
            };
            //初始化界面
            set_ClearBill();
            var index = layer.load(0);
            //进入页面显示的缓存列表
            $.ajax({
                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                url: GetWEBURL() + '/QC_ProcessCheckBill/GetProcessCheckBillList',
                type: "GET",
                data: { "sWhere": sWhere},
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.close(index);
                    } else {
                        layer.close(index);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(index);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            //#endregion
            //#region å¤´å·¥å…·æ äº‹ä»¶
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //新增
                    case 'set_AddNew': set_AddNew();
                        break;
                    //编辑
                    case 'set_ShowBill': set_ShowBill();
                        break;
                    //删除
                    case 'set_DeleteBill': set_DeleteBill();
                        break;
                    //刷新
                    case 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                };
            });
            //#endregion
            //修改按钮
            form.on('submit(btnModify)', function (data) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '工序检验单'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: false //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['QC_ProcessCheckBill.html?HInterID=' + data[0].hmainid + '&HType=Modify', 'yes']
                    , resize: false
                })
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //#endregion
            //删除
            form.on('submit(btndelete)', function (obj) {
                //var checkStatus = table.checkStatus('mainTable')
                //    , data = checkStatus.data;
                ////console.log(checkStatus.data[0].HBillStatus);
                //if (data.length == 0) {
                //    layer.msg("先选择要删除该单据吗?");
                //    return;
                //}
                //if (checkStatus.data[0].HBillStatus == '已审核') {
                //    layer.msg("该单据已审核无法删除,请先反审核!");
                //    return;
                //}
                var data = obj.data //获得当前行数据
                    , layEvent = obj.event; //获得 lay-event å¯¹åº”的值
                layer.confirm('您确定要删除吗?', {
                    btn: ['Yes', 'No'] //按钮
                    , yes: function (index, layero) {
                        var checkStatus = table.checkStatus('mainTable');
                        var layEvent = checkStatus.event;
                        $.ajax({
                            //url: GetWEBURL() + '/QC_ProcessCheckBill/Delete_Json',
                            url: "http://localhost:12761/QC_ProcessCheckBill/Delete_Json",
                            type: "GET",
                            //async: true,
                            data: { "HItemID": checkStatus.data[0].hmainid},
                            success: function (result) {
                                if (result.count == 1) {
                                    $("#btnSearch").click();
                                    layer.msg(result.Message, { icon: 1 });
                                }
                                else {
                                    layer.msg(result.Message, { icon: 5 });
                                }
                            }
                        })
                        //$.ajax({
                        //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                        //    url: GetWEBURL() + '/Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json',
                        //    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 });
                        //    }
                        //});
                        layer.close(index); //关闭弹层
                    }
                });
            //#region æŸ¥è¯¢æŒ‰é’®
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
            });
            //#endregion
            //查询按钮
            form.on('submit(btnSearch)', function (data) {//选择仓位
                //var HBillType = $("#HBillType").val();//单据类型
                //var HBillNo = $("#HBillNo").val();//单据号
                //var HCreateBy = $("#HCreateBy").val();//制单人
                //var BenginHCreateDate = $("#BenginHCreateDate").val();//开始制单时间
                //var EndHCreateDate = $("#EndHCreateDate").val();//结束制单时间
                //if (HBillNo) {
                //    sWhere += " and HBillNo like '%" + HBillNo + "%'";
                //}
                //if (HCreateBy) {
                //    sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
                //}
                //if (BenginHCreateDate) {
                //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
                //}
                //if (EndHCreateDate) {
                //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
                //}
                var index = layer.load(0);
            //#region åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
                //查询
                get_Display(sWhere);
            }
            //#endregion
            //#region åˆå§‹åŒ–表格方法
            function set_InitGrid() {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , height: 'full-50'
                    , page: true
                    , cellMinWidth: 90
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: '单据ID', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 160 }
                        , { field: '单据号', title: '单据号', width: 160 }
                        , { field: '表头备注', title: '表头备注', width: 160, hide: true }
                        , { field: '物料', title: '物料', width: 200, hide: true }
                        , { field: '物料代码', title: '物料代码', width: 200 }
                        , { field: '物料名称', title: '物料名称', width: 200 }
                        , { field: '工序代码', title: '工序代码', width: 200 }
                        , { field: '工序名称', title: '工序名称', width: 200 }
                        , { field: '生产资源代码', title: '生产资源代码', width: 200 }
                        , { field: '生产资源', title: '生产资源', width: 200 }
                        , { field: '生产人员代码', title: '生产人员代码', width: 160 }
                        , { field: '生产人员', title: '生产人员', width: 160 }
                        , { field: '检验员代码', title: '检验员代码', width: 160 }
                        , { field: '检验员', title: '检验员', width: 200 }
                        , { field: '部门代码', title: '部门代码', width: 200 }
                        , { field: '部门名称', title: '部门名称', width: 200 }
                        , { field: '客户代码', title: '客户代码', width: 200 }
                        , { field: '客户', title: '客户', width: 200 }
                        , { field: '产地代码', title: '产地代码', width: 200 }
                        , { field: '产地', title: '产地', width: 200 }
                        , { field: '加工类型代码', title: '加工类型代码', width: 115 }
                        , { field: '加工类型', title: '加工类型', width: 115 }
                        , { field: '配方号', title: '配方号', width: 200 }
                        , { field: '配方名称', title: '配方名称', width: 200 }
                        , { field: '拉丝方向', title: '拉丝方向', width: 115 }
                        , { field: '包装方式代码', title: '包装方式代码', width: 200 }
                        , { field: '包装方式', title: '包装方式', width: 200 }
                        , { field: '制单人', title: '制单人', width: 200 }
                        , { field: '制单日期', title: '制单日期', width: 200 }
                        , { field: '审核人', title: '审核人', width: 115 }
                        , { field: '审核日期', title: '审核日期', width: 200 }
                        , { field: '修改人', title: '修改人', width: 200 }
                        , { field: '修改日期', title: '修改日期', width: 200 }
                        , { field: '关闭人', title: '关闭人', width: 115 }
                        , { field: '关闭日期', title: '关闭日期', width: 200 }
                        , { field: '作废人', title: '作废人', width: 200 }
                        , { field: '作废日期', title: '作废日期', width: 200 }
                        , { field: '单据类型', title: '单据类型', width: 200 }
                        , { field: 'hsubid', title: 'hsubid', width: 115, hide: true }
                    ]]
                };
            }
            //#region æŸ¥è¯¢
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                    url: GetWEBURL1() + '/QC_ProcessCheckBill/GetProcessCheckBillList',
                    url: GetWEBURL() + '/QC_ProcessCheckBill/GetProcessCheckBillList',
                    type: "GET",
                    data: { "sWhere": sWhere},
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.close(index);
                            layer.alert("查询成功", { icon: 1 });
                            layer.close(ajaxLoad);
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.close(index);
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index);
                        layer.alert("接口失效!", { icon: 5 });
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                //调用接口后清空sWhere缓存
                sWhere = "";
                //$("#HBillType").val("");//单据类型
                //$("#HBillNo").val("");//单据号
                //$("#HSourceBillNo").val("");//源单号
                //$("#HCreateBy").val("");//制单人
                //$("#BenginHCreateDate").val("");//开始制单时间
                //$("#EndHCreateDate").val("");//结束制单时间
            });
            //监听行双击事件
            table.on('rowDouble(mainTable)', function (obj) {
                layer.alert("双击事件", { icon: 1 });
            });
            }
            //#endregion
            ////进入页面显示的缓存列表
            //$.ajax({
            //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //    url: GetWEBURL() + '/QC_ProcessCheckBill/GetProcessCheckBillList',
            //    type: "GET",
            //    data: { "sWhere": sWhere},
            //    success: function (data1) {
            //        if (data1.count == 1) {
            //            option.data = data1.data;
            //            table.render(option);
            //            layer.close(index);
            //        } else {
            //            layer.close(index);
            //            layer.alert(data1.code + data1.Message, { icon: 5 });
            //        }
            //    }, error: function () {
            //        layer.close(index);
            //        layer.alert("接口请求失败!", { icon: 5 });
            //    }
            //});
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery() {
                var HBillNo = $("#HBillNo").val();//单据号
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶æ–¹æ³•
            function set_ClearQuery() {
                $("#HBillNo").val("");
                sWhere = "";
            }
            //#endregion
            //#region æ–°å¢ž
            function set_AddNew() {
                layer.open({
                    type: 2
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['100%', '100%']
                    , title: '工序检验单-新增'
                    , shift: 0//弹出动画
                    , content: '../工序检验单/QC_ProcessCheckBill.html?OperationType=1&linterid=&HSouceBillType='
                })
            }
            //#endregion
            ////修改按钮
            //form.on('submit(btnModify)', function (data) {
            //    var checkStatus = table.checkStatus('mainTable')
            //        , data = checkStatus.data;
            //    layer.open({
            //        type: 2
            //        , area: ['100%', '100%']
            //        , title: '工序检验单'
            //        , shade: 0.6 //遮罩透明度
            //        , maxmin: false //允许全屏最小化
            //        , anim: 0 //0-6的动画形式,-1不开启
            //        , content: ['QC_ProcessCheckBill.html?HInterID=' + data[0].hmainid + '&HType=Modify', 'yes']
            //        , resize: false
            //    })
            //});
            //#region ç¼–辑
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid;
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '工序检验单-编辑'
                        , shift: 0//弹出动画
                        , content: '../工序检验单/QC_ProcessCheckBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
            //#region åˆ é™¤
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var ItemID = data[0];
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        var wait = layer.load();
                        //逻辑删除方法
                        $.ajax({
                            url: GetWEBURL() + '/QC_ProcessCheckBill/Delete_Json',
                            type: "GET",
                            data: { "HItemID": ItemID },
                            success: function (result) {
                                console.log('gouba' + result);
                                if (result.count == 1) {
                                    layer.msg(result.Message, { icon: 1 }, function () {
                                        // å¾—到frame索引
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(wait);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
                                } else {
                                    layer.alert(result.code + result.Message, { icon: 5 });
                                    layer.close(wait);
                                }
                            }, error: function () {
                                layer.alert("接口请求失败!", { icon: 5 });
                                layer.close(wait);
                            }
                        });
                    })
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
            //#endregion
            ////删除
            //form.on('submit(set_DeleteBill)', function (obj) {
            //    //var checkStatus = table.checkStatus('mainTable')
            //    //    , data = checkStatus.data;
            //    ////console.log(checkStatus.data[0].HBillStatus);
            //    //if (data.length == 0) {
            //    //    layer.msg("先选择要删除该单据吗?");
            //    //    return;
            //    //}
            //    //if (checkStatus.data[0].HBillStatus == '已审核') {
            //    //    layer.msg("该单据已审核无法删除,请先反审核!");
            //    //    return;
            //    //}
            //    var data = obj.data //获得当前行数据
            //        , layEvent = obj.event; //获得 lay-event å¯¹åº”的值
            //    layer.confirm('您确定要删除吗?', {
            //        btn: ['Yes', 'No'] //按钮
            //        , yes: function (index, layero) {
            //            var checkStatus = table.checkStatus('mainTable');
            //            var layEvent = checkStatus.event;
            //            $.ajax({
            //                //url: GetWEBURL() + '/QC_ProcessCheckBill/Delete_Json',
            //                url: "http://localhost:12761/QC_ProcessCheckBill/Delete_Json",
            //                type: "GET",
            //                //async: true,
            //                data: { "HItemID": checkStatus.data[0].hmainid},
            //                success: function (result) {
            //                    if (result.count == 1) {
            //                        $("#btnSearch").click();
            //                        layer.msg(result.Message, { icon: 1 });
            //                    }
            //                    else {
            //                        layer.msg(result.Message, { icon: 5 });
            //                    }
            //                }
            //            })
            //            //$.ajax({
            //            //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //            //    url: GetWEBURL() + '/Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json',
            //            //    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 });
            //            //    }
            //            //});
            //            layer.close(index); //关闭弹层
            //        }
            //    });
            //});
            //#region åˆ·æ–°
            function get_Refresh() {
                set_ClearQuery();
                get_Display(sWhere);
            }
            //#endregion
            ////查询按钮
            //form.on('submit(btnSearch)', function (data) {//选择仓位
            //    //var HBillType = $("#HBillType").val();//单据类型
            //    //var HBillNo = $("#HBillNo").val();//单据号
            //    //var HCreateBy = $("#HCreateBy").val();//制单人
            //    //var BenginHCreateDate = $("#BenginHCreateDate").val();//开始制单时间
            //    //var EndHCreateDate = $("#EndHCreateDate").val();//结束制单时间
            //    //if (HBillNo) {
            //    //    sWhere += " and HBillNo like '%" + HBillNo + "%'";
            //    //}
            //    //if (HCreateBy) {
            //    //    sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
            //    //}
            //    //if (BenginHCreateDate) {
            //    //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
            //    //}
            //    //if (EndHCreateDate) {
            //    //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
            //    //}
            //    var index = layer.load(0);
            //    $.ajax({
            //        //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //        url: GetWEBURL1() + '/QC_ProcessCheckBill/GetProcessCheckBillList',
            //        type: "GET",
            //        data: { "sWhere": sWhere},
            //        success: function (data1) {
            //            if (data1.count == 1) {
            //                option.data = data1.data;
            //                table.render(option);
            //                layer.close(index);
            //                layer.alert("查询成功", { icon: 1 });
            //            } else {
            //                layer.close(index);
            //                layer.alert(data1.code + data1.Message, { icon: 5 });
            //            }
            //        }, error: function () {
            //            layer.close(index);
            //            layer.alert("接口失效!", { icon: 5 });
            //        }
            //    });
            //    //调用接口后清空sWhere缓存
            //    sWhere = "";
            //    //$("#HBillType").val("");//单据类型
            //    //$("#HBillNo").val("");//单据号
            //    //$("#HSourceBillNo").val("");//源单号
            //    //$("#HCreateBy").val("");//制单人
            //    //$("#BenginHCreateDate").val("");//开始制单时间
            //    //$("#EndHCreateDate").val("");//结束制单时间
            //});
            ////监听行双击事件
            //table.on('rowDouble(mainTable)', function (obj) {
            //    layer.alert("双击事件", { icon: 1 });
            //});
            //laydate.render({