yangle
2022-12-28 7d990c71c703a9874f76d701a4046d28a8dfda11
WebTM/views/Ä£Öξ߹ÜÀí/Æ÷¾ßµã¼ì¹æ³Ìµ¥/Sc_MouldDotCheckRuleBillList.html
@@ -91,20 +91,6 @@
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">点检项信息</li>
                                <li>配件信息</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
                                </div>
                            </div>
                        </div>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btnAdd"><i class="layui-icon layui-icon-add-1"></i>新增</button>
@@ -116,12 +102,6 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                            </div>
                        </script>
                        <script type="text/html" id="xuhao">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
                        <script type="text/html" id="xuhao1">
                            {{d.LAY_TABLE_INDEX+1}}
                        </script>
                    </form>
                </div>
@@ -151,8 +131,6 @@
            , laydate = layui.laydate
            var sWhere = "";
            var option = [];
            var option1 = [];
            var option2 = [];
            var HModName = "Sc_MouldDotCheckRuleBillList";
            var titleData = ["hmainid", "点检项目ID", "负责人ID", "hbilltype", "HMoudType", "hsubid","内部单据号"];//不需要显示的字段 å¯æ‰©å±•
            //#endregion
@@ -203,28 +181,6 @@
                get_Refresh();
            });
            //点击主表带出从表数据
            table.on('row(mainTable)', function (obj) { //注:tool æ˜¯å·¥å…·æ¡äº‹ä»¶åï¼Œtest æ˜¯ table åŽŸå§‹å®¹å™¨çš„å±žæ€§ lay-filter="对应的值"
                var datas = obj.data; //获得当前行数据
                var linterid = datas.hmainid;
                $.ajax({
                    url: GetWEBURL() + '/Sc_MouldDotCheckRuleBill/Sc_MouldDotCheckRuleBillSubAndSubItem',
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option1.data = data1.list[0];
                            table.render(option1);
                            option2.data = data1.list[1];
                            table.render(option2);
                        } else {
                            layer.alert("获取失败", { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
                    }
                });
            });
            //#endregion
@@ -234,10 +190,6 @@
                $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd"));
                //查询
                get_Display(sWhere);
                //初始化表格(子表1)
                set_InitGrid1();
                //初始化表格(子表2)
                set_InitGrid2();
            }
            //查询
@@ -281,7 +233,7 @@
                                , toolbar: '#toolbarDemo'
                                , cols: [col]
                                , data: data1.data
                                , height: 450
                                , height: 750
                                , page: true
                                , cellMinWidth: 90
                                , limit: 50
@@ -308,66 +260,6 @@
                });
            }
            //初始化表格(子表1)
            function set_InitGrid1() {
                var ajaxLoad = layer.load();
                option1 = {
                    elem: '#mainTable1'
                    //, toolbar: '#toolbarDemo'
                    , height: '250'
                    , page: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , loading: false
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left' }
                        , { field: 'HDotCheckItemID', title: '点检项目ID', width: 200, hide: true }
                        , { field: 'HDotCheckItem', title: '点检项目', width: 200 }
                        , { field: 'HDotCheckPart', title: '点检部位', width: 200 }
                        , { field: 'HClaim', title: '具体要求', width: 200 }
                        , { field: 'HManagerID', title: '负责人ID', width: 200, hide: true }
                        , { field: 'HManagerNumber', title: '负责人代码', width: 200 }
                        , { field: 'HManagerName', title: '负责人', width: 200 }
                        , { field: 'HRemark', title: '备注', width: 200 }
                    ]]
                };
                option1.data = [];
                table.render(option1);
                layer.close(ajaxLoad);
            }
            //初始化表格(子表2)
            function set_InitGrid2() {
                var ajaxLoad = layer.load();
                option2 = {
                    elem: '#mainTable2'
                    //, toolbar: '#toolbarDemo'
                    , height: '250'
                    , page: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , loading: false
                    , cols: [[
                        //{ type: 'checkbox', fixed: 'left' }
                        , { templet: '#xuhao1', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                        , { field: 'HMaterID', title: '配件ID', width: 200, hide: true }
                        , { field: 'HMaterNumber', title: '配件代码', width: 200 }
                        , { field: 'HMaterName', title: '配件名称', width: 200 }
                        , { field: 'HUnitID', title: '单位ID', width: 200, hide: true }
                        , { field: 'HUnitNumber', title: '计量单位代码', width: 200 }
                        , { field: 'HUnitName', title: '计量单位名称', width: 200 }
                        , { field: 'HQty', title: '用量', width: 200 }
                        , { field: 'HQtyMust', title: '标准用量', width: 200 }
                        , { field: 'HRemark', title: '备注', width: 200 }
                    ]]
                };
                option2.data = [];
                table.render(option2);
                layer.close(ajaxLoad);
            }
            //快速过滤
            function get_FastQuery() {