标签:list find inline == gety func UNC append primary
//检测参数 关于列表编辑弹出页问题
function jccselem(value, options) {
var rowid = options.rowId;
var html = ‘<div><input type="text" id="v_JCCS‘+rowid+‘" class="editable inline-edit-cell form-control" style="float:left; margin: 0px -35px 0px 0px;width: 100%;"/>‘;
html = html + ‘</div>‘;
var a = $(html);
var btn = $(‘<button class="btn btn-primary btn-ingrid" type="button" id="btn_‘+options.id+‘" ><i class="fa fa-list"></i></button>‘);
var me = this;
btn.on(‘click‘,function(){
UI.Window.ShowDialog("储存位置选择","pages/GZGL/Jccsxz.jsp?ID="+rowid,‘95%‘,‘520px‘,true,‘确定‘, true,
function(data){
data=data+"";
YpdjRunserver.getYpxxByid(data,function(rdata){
$("#v_JCCS"+rowid).val(rdata.WZMC);
grid.setCellValue(rowid,"JCXM",rdata.JCXM); //给列表字段赋值
grid.setCellValue(rowid,"XMFZR",rdata.XMFZR); //给列表字段赋值
});
}
);
});
a.append(btn);
if (value) {
a.find(‘input‘).val(value);
}
return a.get(0);
}
function jccsvalue(elem, operation, value) {
if (operation === ‘get‘) {
return $(elem).find(‘input‘).val() || ‘‘;
} else if (operation === ‘set‘) {
$(‘input‘, elem).val(value);
}
}
列表字段
{
label:‘检测参数‘,
name: ‘JCCS‘,
index: ‘JCCS‘,
width: 300,
align: "left",
sorttype: "String",
editable : true,
edittype:‘custom‘,
editoptions: {custom_element:jccselem,
custom_value:jccsvalue}
},
标签:list find inline == gety func UNC append primary
原文地址:https://www.cnblogs.com/StuM/p/9702906.html