zoukankan      html  css  js  c++  java
  • easyUI+js下拉框切换数据表格

    html

    <div style="float: left;">

    缴费范围: <select class="easyui-combobox" id="adminFlag" style="float: left; 150px;">
    <option value="">请选择</option>
    <option name="adminFlag" value="0">按年级</option>
    <option name="adminFlag" value="1">按班级</option>
    <option name="adminFlag" value="2">按个人</option>
    </select>
    </div>
    <div   style="display: block; 30%;height:800px;float:  left;border:1px solid #969696">
    <div id="jiaofei"class="easyui-panel" title="缴费范围" style="100%;">

    </div>

    </div>

    js

    (function($) {
    var busMng = rmtCMHelper.createBusMngInst({
    busMngOptions: {
      grade: function () {
    var ctx = $("#ctx").val();
    var accountId = $("#accountId").val();
    var type = $('#adminFlag').combobox("getValue");
    $('#jiaofei').html('<table id ="dg" class="easyui-datagrid"></table>');
    if(type==0){
    var url = ctx + '/wisdom/gradeInfo/getGradeInfo.html';
    $('#dg').datagrid({
    url: url,
    "100%",
    height: "700px",
    striped: true,
    loadMsg: '正在加载年级的信息...',
    pagination: true,
    pageSize: 10,
    pageNumber: 1,
    pageList: [10, 20, 30],
    queryParams: {"accountId": accountId},
    columns: [[
    {field: 'ck', checkbox: true, align: 'left', 50},
    {field: 'id', 100, title: '年级编号'},
    {field: 'gradeName', title: '年级名称', 100},
    ]]
    });
    }
    if(type==1){
    var url = ctx + '/wisdom/classInfo/getClassInFo.html';
    $('#dg').datagrid({
    url: url,
    "100%",
    height: "700px",
    striped: true,
    loadMsg: '正在加载班级的信息...',
    pagination: true,
    pageSize: 10,
    pageNumber: 1,
    pageList: [10, 20, 30],
    queryParams: {"accountId": accountId},
    columns: [[
    {field: 'ck', checkbox: true, align: 'left', 50},
    {field: 'id', 100, hidden: true},
    {field: 'gradeName', title: '年级名称', 80},
    {field: 'className', title: '班级名称', 80},
    ]]
    });
    }
    if(type==2){
    var url =null;
    $('#dg').datagrid({
    url:url,
    "100%",
    height: '400px',
    striped: true,
    loadMsg: '正在加载学生的信息...',
    pagination: true,
    columns: [[
    {field: 'ck', 50,align: 'center',checkbox: true},
    {field: 'gradeId', 50,align: 'center', title: '年级编号'},
    {field: 'gradeName', 50,align: 'center', title: '年级'},
    {field: 'classId', 50,align: 'center', title: '班级编号'},
    {field: 'className', 50,align: 'center', title: '班级'},
    {field: 'studentNo', 50, align: 'center', title: '学号'},
    {field: 'studentName', 50,align: 'center', title: '姓名'},
    ]]
    });
    $('#selectStudent').window({
    900,
    height: 450,
    title: '查找学生',
    minimizable: false,
    maximizable: false,
    collapsible: false,
    modal: true
    });
    $('#selectStudent').window('open');
    }
    }
    }
    });
    }
    What do you want to be?
  • 相关阅读:
    day14(xml 编写及解析)
    day11(多线程,唤醒机制,生产消费者模式,多线程的生命周期)
    day13(反射,BeanUtils包)
    day10(IO流汇总)
    day08(File类 ,字节流)
    day08(异常处理,创建异常,finally,throws和throw的区别)
    [SPOJ-PT07J] Query on tree III (主席树)
    [ZJOI2008] 树的统计(树链剖分)
    长链剖分学习笔记
    [BZOJ4260] Codechef REBXOR (01字典树,异或前缀和)
  • 原文地址:https://www.cnblogs.com/CatsBlog/p/9294891.html
Copyright © 2011-2022 走看看