• EasyUI combobox 三级联动


    <script type="text/javascript">

      $(function(){
       loadqsfCombobox();
      });

    function loadqsfCombobox(){
        $('#bigArea').combobox({
            url:'/ydmsy/actions/area_base/getDSFData.do?actionId=ydmsy_area_base_getDSFData',    
            prompt : '输入空格或关键字后自动搜索',
            valueField:'bigArea',    
            textField:'bigArea',
            filter: function(q, row){
                var opts = $(this).combobox('options');
                return row[opts.textField].indexOf(q) >-1;
            },
            onSelect:function(rec){
                $("#province").combobox('clear');
                var url = "/ydmsy/actions/area_base/getDSFData.do?actionId=ydmsy_area_base_getDSFData&bigArea=" + rec.bigArea;
                $("#province").combobox('reload', url);
            },
            loadFilter:function(oData){
                var data = oData.data;
                for(var i in data){
                    data[i].bigArea = data[i].bigArea;
                }
                //data.unshift({"bigArea":"","bigArea":"请选择"});
                return data;
            }
        });
    $(
    '#province').combobox({ url:'', valueField:'provinceId', textField:'provinceName', filter: function(q, row){ var opts = $(this).combobox('options'); return row[opts.textField].indexOf(q) >-1; }, onSelect:function(rec){ $("#distribution").combobox('clear'); var url = "/ydmsy/actions/area_base/getDSFData.do?actionId=ydmsy_area_base_getDSFData&provinceId=" + rec.provinceId; $("#distribution").combobox('reload', url); }, loadFilter:function(oData){ var data = oData.data; //data.unshift({"provinceId":"","provinceName":"请选择"}); return data; } });
    $(
    '#distribution').combobox({ url:'', valueField:'bm', textField:'mc', filter: function(q, row){ var opts = $(this).combobox('options'); return row[opts.textField].indexOf(q) >-1; }, loadFilter:function(oData){ var data = oData.data; //data.unshift({"bm":"","mc":"请选择"}); return data; } }); }; </script>
    <body>
    <table>

    <tr>
    <td align="right">大区:</td>
    <td>
    <input type="text" id="bigArea" name="bigArea" class="easyui-combobox" style="220px;height:26px"/>
    </td>
    <td align="right">省:</td>
    <td>
    <input type="text" id="province" name="province" class="easyui-combobox" style="220px;height:26px"/>
    </td>
    <td align="right">分拨中心:</td>
    <td>
    <input type="text" id="distribution" name="distribution" class="easyui-combobox" style="220px;height:26px"/>
    </td>
    </tr> </table>

    </body>
  • 相关阅读:
    2021年搭建Java环境最快办法
    teprunner测试平台Django引入pytest完整源码
    teprunner测试平台用例前置模块开发
    JMeter扩展Java请求实现WebRTC本地音视频推流压测脚本
    teprunner测试平台部署到Linux系统Docker
    学习版pytest内核测试平台开发万字长文入门篇
    JUC---02
    JUC——01
    【小白学PyTorch】11 MobileNet详解及PyTorch实现
    【小白学PyTorch】10 pytorch常见运算详解
  • 原文地址:https://www.cnblogs.com/zlxbk/p/7120830.html
Copyright © 2020-2023  润新知