essyUI+1次元コード使用
1788 ワード
一、一次元コードドロップダウンリスト
二、リスト項目は一次元コード値を表示する
二、リスト項目は一次元コード値を表示する
{field:'inspectType',title:' ',width:fixWidth(0.2),align:'center',formatter:function(value,rec){
var temp = '';
$.ajax({
url: '${ctx}/jsp/admin/code/findCodeValue.action',
type: 'post',
dataType: 'json',
async : false,
data:{
"codeValue.itemValue" : rec.inspectType,
"codeValue.codeId" : "402881e7497d66f001497d7f65a40007"
},
error: function(){
$.messager.alert(' ',' !');
},
success: function(data){
temp = data.itemText;
}
});
return temp;
}
}
三、詳細表示ページ$(function(){
var temp = "";
$.ajax({
url: '${ctx}/jsp/admin/code/findCodeValue.action',
type: 'post',
dataType: 'json',
async : false,
data:{
"codeValue.itemValue" : ${inspectItem.inspectType},
"codeValue.codeId" : "402881e7497d66f001497d7f65a40007"
},
error: function(){
$.messager.alert(' ',' !');
},
success: function(data){
temp = data.itemText;
}
});
$("#inspectType").html(temp);
});