登录  /  注册
首页 > web前端 > js教程 > 正文

jQuery EasyUI在WIN中怎么使用

php中世界最好的语言
发布: 2018-04-19 14:01:51
原创
1106人浏览过

这次给大家带来jQuery EasyUI在WIN中怎么使用,jQuery EasyUI在WIN中使用的注意事项有哪些,下面就是实战案例,一起来看一下。

nbsp;html>

  
    <meta>
    <title>管理取派员</title>
    <!-- 导入jquery核心类库 -->
    <script></script>
    <!-- 导入easyui类库 -->
    <link>
    <link>
    <link>
    <link>
    <script></script>
    <script></script>
    <script></script>
    <script></script>
    <script>
      function doAdd(){
        $(&#39;#addWindow&#39;).window("open");
      }
      function doEdit(){
        alert("修改...");
      }
      function doDelete(){
        alert("删除...");
      }
      function doRestore(){
        alert("将取派员还原...");
      }
      //工具栏
      var toolbar = [ {
        id : &#39;button-add&#39;, 
        text : &#39;增加&#39;,
        iconCls : &#39;icon-add&#39;,
        handler : doAdd
      }, {
        id : &#39;button-edit&#39;,
        text : &#39;修改&#39;,
        iconCls : &#39;icon-edit&#39;,
        handler : doEdit
      }, {
        id : &#39;button-delete&#39;,
        text : &#39;作废&#39;,
        iconCls : &#39;icon-cancel&#39;,
        handler : doDelete
      },{
        id : &#39;button-restore&#39;,
        text : &#39;还原&#39;,
        iconCls : &#39;icon-save&#39;,
        handler : doRestore
      }];
      // 定义列
      var columns = [ [ {
        field : &#39;id&#39;,
        checkbox : true,
      },{
        field : &#39;courierNum&#39;,
        title : &#39;工号&#39;,
        width : 80,
        align : &#39;center&#39;
      },{
        field : &#39;name&#39;,
        title : &#39;姓名&#39;,
        width : 80,
        align : &#39;center&#39;
      }, {
        field : &#39;telephone&#39;,
        title : &#39;手机号&#39;,
        width : 120,
        align : &#39;center&#39;
      }, {
        field : &#39;checkPwd&#39;,
        title : &#39;查台密码&#39;,
        width : 120,
        align : &#39;center&#39;
      }, {
        field : &#39;pda&#39;,
        title : &#39;PDA号&#39;,
        width : 120,
        align : &#39;center&#39;
      }, {
        field : &#39;standard.name&#39;,
        title : &#39;取派标准&#39;,
        width : 120,
        align : &#39;center&#39;,
        formatter : function(data,row, index){
          if(row.standard != null){
            return row.standard.name;
          }
          return "";
        }
      }, {
        field : &#39;type&#39;,
        title : &#39;取派员类型&#39;,
        width : 120,
        align : &#39;center&#39;
      }, {
        field : &#39;company&#39;,
        title : &#39;所属单位&#39;,
        width : 200,
        align : &#39;center&#39;
      }, {
        field : &#39;deltag&#39;,
        title : &#39;是否作废&#39;,
        width : 80,
        align : &#39;center&#39;,
        formatter : function(data,row, index){
          if(data=="0"){
            return "正常使用"
          }else{
            return "已作废";
          }
        }
      }, {
        field : &#39;vehicleType&#39;,
        title : &#39;车型&#39;,
        width : 100,
        align : &#39;center&#39;
      }, {
        field : &#39;vehicleNum&#39;,
        title : &#39;车牌号&#39;,
        width : 120,
        align : &#39;center&#39;
      } ] ];
      $(function(){
        // 先将body隐藏,再显示,不会出现页面刷新效果
        $("body").css({visibility:"visible"});
        // 取派员信息表格
        $(&#39;#grid&#39;).datagrid( {
          iconCls : &#39;icon-forward&#39;,
          fit : true,
          border : false,
          rownumbers : true,
          striped : true,
          pageList: [30,50,100],
          pagination : true,
          toolbar : toolbar,
          url : "../../data/courier.json",
          idField : &#39;id&#39;,
          columns : columns,
          onDblClickRow : doDblClickRow
        });
        // 添加取派员窗口
        $(&#39;#addWindow&#39;).window({
          title: &#39;添加取派员&#39;,
          width: 800,
          modal: true,
          shadow: true,
          closed: true,
          height: 400,
          resizable:false
        });
        //对收派标准save按钮,添加点击事件
        $("#save").click(function(){
          //判断是否form中的所有表单对象都通过校验
          if($("#standardForm").form(&#39;validate&#39;)){
            //都通过校验
            $("#standardForm").submit();
          }else{
            $.messager.alert("警告","表单存在非法内容,请重新填写","warning");
          }
          //关闭窗口
          $("#addWindow").window(&#39;sclose&#39;);
        });
      });
      function doDblClickRow(){
        alert("双击表格数据...");
      }
    </script>
  
  
    <p>
      </p>
登录后复制
         

      

        

          保存         

             

        

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
收派员信息
快递员工号                                姓名                                
手机                                所属单位                                
查台密码                                PDA号码                                
快递员类型                                取派标准                                
车型                                车牌号                                
        
                     

      

        

                                                                                                                                                                                                                                                                                                                                       
查询条件
工号                                
收派标准                                
所属单位                                
类型                                
查询 
        
              

相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

推荐阅读:

jquery在输入框查找关键字并高亮

使用JS做出60秒后重新发送验证码功能

JS数组去重图文详解

以上就是jQuery EasyUI在WIN中怎么使用的详细内容,更多请关注php中文网其它相关文章!

智能AI问答
PHP中文网智能助手能迅速回答你的编程问题,提供实时的代码和解决方案,帮助你解决各种难题。不仅如此,它还能提供编程资源和学习指导,帮助你快速提升编程技能。无论你是初学者还是专业人士,AI智能助手都能成为你的可靠助手,助力你在编程领域取得更大的成就。
相关标签:
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
关于CSS思维导图的课件在哪? 课件
凡人来自于2024-04-16 10:10:18
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号