Show Posts
|
Pages: [1] 2
|
2
|
General Category / EasyUI for jQuery / in $(function(){} ) combobox method can't call?
|
on: June 18, 2017, 08:49:34 PM
|
I have a page that use combobox ,like this: <input id="ICCardManagement_deposit_department" name="depNo" class="easyui-combobox" data-options="valueField:'depNo',textField:'depName',url:'${pageContext.request.contextPath}/department/getReallyIdValueList'" />
but in the <javascript></javascript> I use the $(function(){ var icinfo=getCardInfoNew(); $('#ICCardManagement_deposit_department').combobox('setValue',icinfo.jqzbh); });
but the ICCardManagement_deposit_department did not play up, the jeasyui do not supply the function?
|
|
|
3
|
General Category / EasyUI for jQuery / in $(function(){} can't access the combobox item? but i need.no one answer me
|
on: June 02, 2017, 02:24:47 AM
|
$(function(){ $('#ICCardManagement_ListICCard_datagrid').datagrid({ url:'${pageContext.request.contextPath}/iccard/getDataGrid', fit:false, fitColumns:false, rownumbers:true, sortName:'cardid', sortOrder:'asc', SelectOnCheck:true, CheckOnSelect:true, singleSelect:true, border:false, pagination:true, pageSize:10, pageList:[10,20,30,40,50], idField:'cardid', queryParams:{"abc":"abc", "companyNo":$('#ICCardManagement_ListICCard_form_company').combobox("getValue") }, columns:[[ ]]
in the queryParams:{"abc":"abc", }, it can work right. but queryParams:{"abc":"abc", "companyNo":$('#ICCardManagement_ListICCard_form_company').combobox("getValue") }, the datagrid did not display?why not?
and it's work right in the function: function searchiccard(){ var data={ "companyNo":$('#ICCardManagement_ListICCard_form_company').combobox("getValue"), "depNum":$('#ICCardManagement_ListICCard_form_dep').combobox("getValue"), "cardtypeid":$('#ICCardManagement_ListICCard_form_cardtype').combobox("getValue") }; $('#ICCardManagement_ListICCard_datagrid').datagrid('load',data); }
|
|
|
6
|
General Category / General Discussion / in $(function(){ }) can't init easyui_form input ?
|
on: April 24, 2017, 10:33:52 PM
|
I need to set value for the textbox input when the page open,but it don't work ,how can i do?
<tr> <td><s:message code="exchangeshift.page.currentshiftno" /></td> <td><input class="easyui-textbox" type="text" name="currentshiftno" style="width:122px"/></td> <td><s:message code="exchangeshift.page.currentshiftno" /></td> <td><input id="bussiness_exchangeshift_bc" style="width:80px" name="shiftno" class="easyui-combobox" data-options="valueField:'shiftno',textField:'
$(function(){ alert(1); $.ajax({ type:'POST', url:'${pageContext.request.contextPath}/exchangeshift/getCurrentExchangeShiftRec', success:function(data){ console.log(data); $('#bussiness_exchangeshift_form').form('load',data); alert(data.bc.shiftno); $('#bussiness_exchangeshift_form input[name=currentshiftno]').setValue(data.bc.shiftno); $('#bussiness_exchangeshift_form input[name=currentbcseqno]').attr("value",data.shiftexchangeSeq); $('#bussiness_exchangeshift_form input[name=fshiftExchangeReco_req]').attr("value",data.fshiftExchangeReco_seq);
$('#business_exchangeshift_gunlog_grid').datagrid('load',data.gunexchangeshiftlogs); },
$('#bussiness_exchangeshift_form input[name=currentshiftno]').setValue(data.bc.shiftno); this did not work But if I delete the class="easyui-textbox" It worked? can any one help me
|
|
|
7
|
General Category / EasyUI for jQuery / how to use dialog to download the excel ?
|
on: April 10, 2017, 09:59:19 PM
|
var d= $("<div />").dialog({ width:600, height:300, modal:true, href:'${pageContext.request.contextPath}/fuelnozzleFlowrecorder/getExcel', title:'下载Excel', method:'GET', queryParams:data, buttons:[ {text:'保存',iconCls:'icon-save',plain:true,handler:function(){ $('#BaseInfo_gasdispensereditform_form').form('submit', { url:'${pageContext.request.contextPath}/gasdispenser/addGasdispenser', success : function(r) { var obj = jQuery.parseJSON(r); if (obj.success) { d.dialog('close'); $('#BaseInfo_Gasdispenser_datagrid').datagrid('insertRow',{ index:0, row:obj.obj }); } $.messager.show({ title : '提示', msg : obj.msg }); } }); }},{text:'取消',iconCls:'icon-cancel',plain:true,handler:function(){ d.dialog('close');}}], onClose:function(){ $(this).dialog('destroy'); } }); I use the above code that use the dialog to download the xls produced by the server ,I get the content that can no't read,did not download the xls file, but the window.location.href can download the file,because I will send a lot parameter to server,I do not use window.location.href to donwload the xls file ,how can i do
|
|
|
8
|
General Category / General Discussion / the datagrid's getChecked() dos not work right
|
on: February 23, 2017, 01:25:44 AM
|
when I check the datagrid on the title and uncheck all the rows later the getchecked method return a row (the last row)。 the code like : columns:[[ {field:'checkf',title:'checked',width:150,checkbox:true},
var rows = $('#BaseInfo_Gasdispenser_datagrid').datagrid('getChecked');
thanks
|
|
|
15
|
General Category / EasyUI for jQuery / combotree can not form load in and setValue in?is it a bug?
|
on: January 02, 2015, 08:22:54 PM
|
hi: I use combotree in a form , when i use the form to modify the recorder ,I get the recorder from server,but I can't load the combotree filed,but other field such as combobox field has no problem,and I get the value and use setValue can't set combotree filed too;when I add a alert("dd") before the setValue,I work!! is not a bug? the easyui version is 1.4.1
the below is not work: onLoad:function(){ $('#dishes_disheseditform_form').form('load',rows[0]); // $('#itemclassNo').combotree('setValue',rows[0].itemclassNo); }
the below when I confirm the alert,it work onLoad:function(){ alert(rows[0].itemclassNo); $('#dishes_disheseditform_form').form('load',rows[0]); } when I use the comboxtree setValue ,the result is the same how can i do?it is cost my 2days to do this!!
my dialog is: var node= $('#dishes_dishes_dishesclass_tree').tree('getSelected'); if (node){ var theItemId=getServerUUID(); var d= $("<div />").dialog({ width:800, height:600, modal:true, href:'${pageContext.request.contextPath}/dishes/DishesEditForm.jsp', title:'新增..', buttons:[{text:'保存',iconCls:'icon-save',plain:true,handler:function(){ $('#dishes_disheseditform_form').form('submit', { url:'${pageContext.request.contextPath}/itemAction!add.action', queryParams:{ itemId:theItemId, onmenu:'1' }, success : function(r) { var obj = jQuery.parseJSON(r); if (obj.success) { d.dialog('close'); $('#dishes_dishes_dishes_datagrid').datagrid('insertRow',{ index:0, row:obj.obj }); } $.messager.show({ title : '提示', msg : obj.msg }); } }); }},{text:'取消',iconCls:'icon-cancel',plain:true,handler:function(){ d.dialog('close');}}], onLoad:function(){ //对话框装载的时候,装载表单数据 //设置默认选中url:'${pageContext.request.contextPath}/itemClassAction!getAllTreeNode.action' var node= $('#dishes_dishes_dishesclass_tree').tree('getSelected'); //$('#itemclassNo').combotree('reload',node.id); //alert(node.id); $('#itemclassNo').combotree('setValues',[node.id]); }, onClose:function(){ $(this).dialog('destroy'); } }); and the form is: DishesEditForm.jsp' <form id="dishes_disheseditform_form" method="post"> <div class="easyui-tabs" data-options="border:false" > <div title="基本信息" data-options="fit:true,border:false"> <table > <tr class="dgtbtr"> <td>xxxx</td> <td><input id="itemclassNo" name="itemclassNo" class="easyui-combotree" data-options="url:'${pageContext.request.contextPath}/itemClassAction!getAllTreeNode.action'" /> </td> <td>yyyy</td> <td align="left"> <select id="dishes_disheseditform_thetypecombox" name="thetype" style="width:150px;" onchange="getDishesNo(this)" > <option value="no"></option> <option value="00">ttt</option> <option value="01">tt2</option> </select> </td> </tr> </table> </div> </div> </form>
|
|
|
|