zhuguifei
2026-03-10 58402bd5e762361363a0f7d7907153c77dbb819f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
 * 滕州项目combobox数据源
 * combobox :string Easyui comboxbox 对象
 * type   :string 类型 type定义见【com.shlanbao.tzsc.plugin.controller.LoadComboboxController】
 * setAll :boolean 是否设置【全部】选项 不提供本参数时,默认不加载【全部】选项
 * Leejean
 */
$.loadComboboxData = function(combobox,type,setAll) {
    var url=$.basePath+"/plugin/combobox/load.do";
    if(!setAll){//undefined 第三个参数为空时
        setAll = false;
    }
    url+=("?type="+type+"&setAll="+setAll);
    combobox.combobox({
        url:url,
        valueField:'id',
        textField:'name',
        panelHeight:200
    });
};
 
 
/**
 *
 * 功能说明:设备检修,添加,设备型号下拉绑定
 * @author zhanglu
 * @time 2015年9月13日 18:47:18
 *
 * */
$.loadComboboxDataQueryByEqpAll = function(combobox,type,setAll) {
    var url=$.basePath+"/plugin/combobox/load.do";
    if(!setAll){//undefined 第三个参数为空时
        setAll = false;
    }
    //url+=("?type="+type+"&setAll="+setAll);
    $.post(url,{type:type,setAll:setAll},function(date){
        for(var i=0;i<date.length;i++){
                var option = "<option value='"+date[i].id+"'>"+date[i].name+"</option>";
                $('#eqp_id').append(option);
        }
        //console.info(date[1].name+"===="+date[1].id);
    },"JSON");
};
 
 
var defaultSelect = function() {
    var array = $(this).combobox('getData');
    for (var item in array[0]) {
        if (item == 'id') {
            $(this).combobox('select', array[0][item]);
        }
    }
    ;
}