仲国强
2021-09-08 a1012ee8adec17e2a746786bb2843b93925ad9c2
巡检记录单列表优化sz
1个文件已修改
196 ■■■■ 已修改文件
WebTM/views/质量管理/巡检记录单/QC_PatrolProcCheckBillList.html 196 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/ÖÊÁ¿¹ÜÀí/Ѳ¼ì¼Ç¼µ¥/QC_PatrolProcCheckBillList.html
@@ -12,62 +12,57 @@
</head>
<body>
    <div class="layui-card layadmin-header">
    <!--<div class="layui-card layadmin-header">
        <div class="layui-breadcrumb" lay-filter="breadcrumb">
            <a lay-href="">主页</a>
            <!--<a><cite>采购订单</cite></a>
            <a><cite>采购订单表格</cite></a>
            <a><cite>采购订单表格的重载</cite></a>-->
        </div>
    </div>
            <a lay-href="">主页</a>-->
    <!--<a><cite>采购订单</cite></a>
    <a><cite>采购订单表格</cite></a>
    <a><cite>采购订单表格的重载</cite></a>-->
    <!--</div>
    </div>-->
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <!--<div class="test-table-reload-btn" style="margin-bottom: 10px;">-->
                        <form class="layui-form" action="">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                    <div class="layui-card" style="padding: 1px">
                        <form class="layui-form" action="" lay-filter="component-form-group">
                            <div class="layui-collapse">
                                <div class="layui-colla-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width: 85px;">单据号</label>
                                        <div class="layui-input-block" style="margin-left: 120px;">
                                            <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HDate1" id="HDate1">
                                    <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="HDate1" id="HDate1">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HDate2" id="HDate2">
                                    <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="HDate2" id="HDate2">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="f_Query">
                                    <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="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                            <script type="text/html" id="toolbarDemo">
                                <div class="layui-btn-container">
                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                    <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-form"></i>删除</button>
                                </div>
                            </script>
                        </form>
                        <!--</div>-->
                    </div>
                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                    <script type="text/html" id="toolbarDemo">
                        <div class="layui-btn-container">
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-form"></i>删除</button>
                        </div>
                    </script>
                </div>
            </div>
        </div>
@@ -130,12 +125,12 @@
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'code', 'table', 'element', 'layer'], function () {
            var $ = layui.$
            , admin = layui.admin
            , layer = layui.layer
            , laydate = layui.laydate
            , table = layui.table
            , form = layui.form
            , element = layui.element;
                , admin = layui.admin
                , layer = layui.layer
                , laydate = layui.laydate
                , table = layui.table
                , form = layui.form
                , element = layui.element;
            //常规用法
            laydate.render({
                elem: '#HDate1'
@@ -156,43 +151,43 @@
                , toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板
                , defaultToolbar: ['filter', 'exports', 'print']
                // , where: { msg: "", NowPage: 1, OnePage: 10 }
              , cellMinWidth: 100
              , cols: [[
                  { type: 'checkbox', fixed: 'left' }
                  , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
                  , { field: 'hsubid', title: 'hsubid' ,hide: true }
                  , { field: '日期', title: '日期', sort: true, width: 120 }
                  , { field: '单据号', title: '单据号', sort: true, width: 170 }
                  , { field: '表头备注 ', title: '表头备注', width: 105 }
                  , { field: '生产资源名称', title: '生产资源名称' }
                  , { field: '生产资源代码', title: '生产资源代码' }
                  , { field: '产品内码', title: '产品内码' }
                  , { field: '产品名称', title: '产品名称' }
                  , { field: '产品型号', title: '产品型号', width: 115 }
                  , { field: '检验员代码', title: '检验员代码', width: 115 }
                  , { field: '检验员名称', title: '检验员名称' }
                  , { field: '制单人', title: '制单人', width: 160 }
                  , { field: '制单日期', title: '制单日期', width: 160 }
                  , { field: '审核人', title: '审核人', width: 160 }
                  , { field: '审核日期', title: '审核日期', width: 160 }
                  , { field: '修改人', title: '修改人', width: 160 }
                  , { field: '修改日期', title: '修改日期', width: 160 }
                  , { field: '关闭人', title: '关闭人', width: 160 }
                  , { field: '关闭日期', title: '关闭日期', width: 160 }
                  , { field: '作废人', title: '作废人', hide: true, width: 160 }
                  , { field: '作废日期 ', title: '作废日期', width: 215 }
                  , { field: '单据类型 ', title: '单据类型 ', width: 115 }
              ]]
                , cellMinWidth: 100
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
                    , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
                    , { field: 'hsubid', title: 'hsubid', hide: true }
                    , { field: '日期', title: '日期', sort: true, width: 120 }
                    , { field: '单据号', title: '单据号', sort: true, width: 170 }
                    , { field: '表头备注 ', title: '表头备注', width: 105 }
                    , { field: '生产资源名称', title: '生产资源名称' }
                    , { field: '生产资源代码', title: '生产资源代码' }
                    , { field: '产品内码', title: '产品内码' }
                    , { field: '产品名称', title: '产品名称' }
                    , { field: '产品型号', title: '产品型号', width: 115 }
                    , { field: '检验员代码', title: '检验员代码', width: 115 }
                    , { field: '检验员名称', title: '检验员名称' }
                    , { field: '制单人', title: '制单人', width: 160 }
                    , { field: '制单日期', title: '制单日期', width: 160 }
                    , { field: '审核人', title: '审核人', width: 160 }
                    , { field: '审核日期', title: '审核日期', width: 160 }
                    , { field: '修改人', title: '修改人', width: 160 }
                    , { field: '修改日期', title: '修改日期', width: 160 }
                    , { field: '关闭人', title: '关闭人', width: 160 }
                    , { field: '关闭日期', title: '关闭日期', width: 160 }
                    , { field: '作废人', title: '作废人', hide: true, width: 160 }
                    , { field: '作废日期 ', title: '作废日期', width: 215 }
                    , { field: '单据类型 ', title: '单据类型 ', width: 115 }
                ]]
                //, skin: 'row' //表格风格
                // , even: true
            , page: true //是否显示分页
            , limits: [10, 20, 50, 100]
            , limit: 50 //每页默认显示的数量
                , page: true //是否显示分页
                , limits: [10, 20, 50, 100]
                , limit: 50 //每页默认显示的数量
                //, height: 500
            , done: function (res, curr, count) {
                _cur_page = curr;
                layer.closeAll("loading");
            }
                , done: function (res, curr, count) {
                    _cur_page = curr;
                    layer.closeAll("loading");
                }
            });
            //头工具栏事件
@@ -269,36 +264,37 @@
            ///加载显示数据
            function RoadHBillNo(sqlWhere) {
                var ajaxLoad = layer.load();
                where = sqlWhere;
                $.ajax({
                    type: "get",
                    url: GetWEBURL() +"/QC_Management/MES_QC_PatrolProcCheckBillList_Json",
                    url: GetWEBURL() + "/QC_Management/MES_QC_PatrolProcCheckBillList_Json",
                    async: true,
                    data: { "sqlWhere": sqlWhere },//"HSupNo": sessionStorage["HUserName"],
                    success: function (result) {
                        if (result.count == 1) {
                        ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                        table.reload('mainTable', {
                            data: ajaxReturnData
                            , height: 'full-10'
                            , page: {
                                curr: _cur_page //必须从第 1 é¡µå¼€å§‹
                            }
                            , loading: false
                            , done: function (index, res) {
                            ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                            table.reload('mainTable', {
                                data: ajaxReturnData
                                , height: 'full-10'
                                , page: {
                                    curr: _cur_page //必须从第 1 é¡µå¼€å§‹
                                }
                                , loading: false
                                , done: function (index, res) {
                            }
                        });
                        layer.close(index0);
                    } else {
                            layer.close(index0);
                                }
                            });
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(result.code + result.Message, { icon: 5 });
                    }
                        }
                    },
                    error: function (result) {
                        layer.close(index0);
                    layer.alert("接口请求失败!", { icon: 5 });
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            };
@@ -314,7 +310,7 @@
                var HDate2 = $("#HDate2").val();//结束日期
                if (HBillNo)
                    sqlWhere += " and å•据号 like '%" + HBillNo+ "%'";
                    sqlWhere += " and å•据号 like '%" + HBillNo + "%'";
                if (HNumber)
                    sqlWhere += " and ç‰©æ–™ä»£ç  like '%" + HNumber + "%'";
                if (HName)