各种控件赋值回显方式

1、EFPopupInput

IPLAT.EFPopupInput.setAllFields($("#result-0-trainingItem"),a.trainingItem,a.trainingItem) //培训计划名

2、EFTreeInput

  IPLAT.EFTreeInput.setAllFields($("#result-0-organizationDepartment"), a.organizationDepartment, a.orgCname);

3、EFSelect

 IPLAT.EFSelect.value($("#result-0-trainType"), a.trainingType); //分类

取EFSelect上的选项中的文字

IPLAT.EFSelect.text($("#inqu_status-0-product_name"));

4、EFInput

   $("#result-0-trainPlace").val(a.trainingPlace);//培训地点
 IPLAT.EFInput.value($("#detail-0-teachingContents"), educationData[0].educationProject);

回显后设置为disable

1、EFSelect

IPLAT.EFSelect.value($("#result-0-productionLevel"), '20'); //分类:10为公司级,20为部门级
            // $('#result-0-productionLevel').attr("disabled",true);
 IPLAT.EFSelect.enable( $("#result-0-productionLevel"),false);

2、EFTreeInput

  IPLAT.EFTreeInput.enable( $("#detail-0-organizationDepartment"),false);

3、DatePicker

  $("#detail-0-year") .data("kendoDatePicker").enable(false);

4、MultiSelect

取值

$("#detail-0-scheduledEducationMonth").data("kendoMultiSelect").value(monthStr);

取多选(MultiSelect)上的文字

 <EF:EFMultiSelect ename="result-0-checkPerson" cname="检查人" filter="contains"
                          optionLabel="请选择" colWidth="12" ratio="1:11" required="true">
            <EF:EFOptions blockId="checkPersons" textField="name" valueField="iid"/>
        </EF:EFMultiSelect>
   //检查人
    var checkPersonName = _.map($("#result-0-checkPerson").data("kendoMultiSelect").dataItems(), _.iteratee("textField"));
    //使用join函数将上面的数组转化成字符串
    var checkPersonNames = checkPersonName.join(',');

MultiSelect多选控件添加Change方法

 <EF:EFMultiSelect autoClose="false" ename="result-0-orgEname1" cname="受检单位及地点"
                              maxLength="500" filter="contains" colWidth="12" ratio="1:11" required="true"/>
$("#result-0-orgEname1").change(function(){
    var orgEname1= $("#result-0-orgEname1").val()
    if (!isNullAndEmpty(orgEname1)){
        getDirector()
    }
});

时间控件禁用

$("#result-0-effectStartTime").data("kendoDatePicker").enable(false);

5、自定义select修改页面回显

jsp

   <EF:EFSelect ename="result-0-classification" cname="分类" optionLabel="请选择" resultId="result"
                     filter="contains"
                     serviceName="AQFG0101" methodName="query" textField="classification" valueField="serialNumber"
                     ratio="3:9" required="true">
        </EF:EFSelect>

js(在一个js中加一个延时去处理回显方法)

setTimeout(function () {
        IPLAT.EFSelect.value($("#result-0-classification"),"2");
    }, 1000);

自定义SELECT回显(非小代码下拉)

jsp

   <EF:EFSelect ename="result-0-classification" cname="分类" optionLabel="请选择" resultId="result"
                     filter="contains"
                     serviceName="AQFG0101" methodName="query" textField="classification" valueField="serialNumber"
                     ratio="3:9" required="true">
        </EF:EFSelect>

js

IPLATUI.EFSelect={
    "result-0-classification":{
        dataBound:function (e) {
            IPLAT.EFSelect.value($("#result-0-classification"),row.serialNumber);
        }
    }
}
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值