EasyUI-Table-template queryParams

NO IMAGE
1 Star2 Stars3 Stars4 Stars5 Stars 給文章打分!
Loading...

 var gdParams='{"recordSetId":"0","page":"","rows":0,"filterRules":0,"advanceFilter":0,"sort":0,"order":0,"locale":0}';
<!--main-content-start-->
<script>
</script>
<table data-options="id: 'productDg',
url: 'http://10.5.27.9:8080/api/jsonws/invoke',
page:3,
queryParams:{cmd:'{\'/j2eecn-ddl-portlet.ddlenhance/get-records\':{}}', p_auth: j2_authToken},
filter: [{
field: 'name',
type: 'textbox',
op: ['contains', 'equal', 'notequal', 'less', 'greater']
}, {
field: 'code',
type: 'combobox',
options: {
valueField: 'label',
textField: 'value',
data: [{
label: '2103',
value: '2103'
}, {
label: '5103',
value: '5103'
}, {
label: '1204',
value: '1204'
}]
},
op: ['contains', 'equal', 'notequal', 'less', 'greater']
}, {
field: 'spec',
type: 'combobox',
options: {
valueField: 'label',
textField: 'value',
multiple: true,
data: [{
label: 'KC-W200SW',
value: 'KC-W200SW'
}, {
label: '白色LR-1688BY-2',
value: '白色LR-1688BY-2'
}, {
label: '銀灰色BCD-339WBA 339',
value: '銀灰色BCD-339WBA 339'
}]
},
op: ['contains', 'equal', 'notequal', 'less', 'greater']
}]" data-toggle="topjui-datagrid" style="height:640px;">
<thead>
<tr>
<th data-options="field:'uuid',title:'UUID',checkbox:true">?</th>
<th data-options="field:'name',title:'商品名稱',sortable:true">?</th>
<th data-options="field:'code',title:'商品編號',sortable:true">?</th>
<th data-options="field:'spec',title:'規格型號',sortable:true">?</th>
<th data-options="field:'sale_price',title:'銷售單價',sortable:true">?</th>
<th data-options="field:'rate',title:'完成率',sortable:true,formatter:progressFormatter">?</th>
</tr>
</thead>
</table>
<!-- 表格工具欄開始 -->
<div class="topjui-toolbar" data-options="grid:{
type:'datagrid',
id:'productDg'
}" id="productDg-toolbar"><a data-options="method:'openDialog',
extend: '#productDg-toolbar',
iconCls: 'fa fa-plus',
dialog:{
id:'userAddDialog',
href:_ctx   '/html/complex/dialog_add.html',
buttonsGroup:[
{text:'儲存',url:_ctx   '/json/response/failure.json',iconCls:'fa fa-plus',handler:'ajaxForm',btnCls:'topjui-btn-normal'}
]
}" data-toggle="topjui-menubutton" href="javascript:void(0)">新增</a> <a data-options="method: 'openDialog',
extend: '#productDg-toolbar',
iconCls: 'fa fa-pencil',
btnCls: 'topjui-btn',
grid: {
type: 'datagrid',
id: 'productDg'
},
dialog: {
width: 950,
height: 500,
href: _ctx   '/html/complex/dialog_edit.html?uuid={uuid}',
url: _ctx   '/json/product/detail.json?uuid={uuid}',
buttonsGroup: [
{
text: '更新',
url: _ctx   '/json/response/success.json',
iconCls: 'fa fa-save',
handler: 'ajaxForm',
btnCls: 'topjui-btn'
}
]
}" data-toggle="topjui-menubutton" href="javascript:void(0)">編輯</a> <a data-options="method:'doAjax',
extend: '#productDg-toolbar',
btnCls:'topjui-btn-normal',
iconCls:'fa fa-trash',
confirmMsg:'這個是勾選核取方塊實現多條資料的Ajax刪除提交操作,提交grid.param中指定的引數值',
grid: {uncheckedMsg:'請先勾選要刪除的資料',param:'uuid:uuid,code:code'},
url:_ctx   '/json/response/success.json'" data-toggle="topjui-menubutton" href="javascript:void(0)">刪除</a> <a data-options="method:'filter',
extend: '#productDg-toolbar',
btnCls:'topjui-btn-warm'" data-toggle="topjui-menubutton" href="javascript:void(0)">過濾</a> <a data-options="method:'search',
extend: '#productDg-toolbar',
btnCls:'topjui-btn-danger'" data-toggle="topjui-menubutton" href="javascript:void(0)">查詢</a> <a data-options="method:'import',
extend: '#productDg-toolbar',
grid:{
type:'datagrid',
id:'productDg'
},
iconCls:'fa fa-cloud-upload',
btnCls:'topjui-btn-normal',
uploadUrl:_ctx   '/json/response/upload.json',
url:_ctx '/json/response/success.json'" data-toggle="topjui-menubutton" href="javascript:void(0)">匯入</a> <a data-options="method:'export',
extend: '#productDg-toolbar',
iconCls:'fa fa-cloud-download',
btnCls:'topjui-btn',
url:_ctx   '/json/response/export.html'" data-toggle="topjui-menubutton" href="javascript:void(0)">匯出</a> <a data-options="method:'openTab',
extend: '#productDg-toolbar',
btnCls:'topjui-btn-normal',
tab:{
title:'這是新的Tab視窗',
href:_ctx   '/html/complex/panel_add.html'
}" data-toggle="topjui-menubutton" href="javascript:void(0)">開啟Tab視窗</a> <a data-options="method:'openWindow',
extend: '#productDg-toolbar',
btnCls:'topjui-btn-warm',
href:'http://www.topjui.com?uuid={uuid}'" data-toggle="topjui-menubutton" href="javascript:void(0)">開啟新視窗</a> <a data-options="method:'request',
btnCls:'topjui-btn',
url:_ctx   '/json/response/success.json?uuid={uuid}&code={code}'" data-toggle="topjui-menubutton" href="javascript:void(0)">執行普通請求</a> <a data-options="btnCls:'topjui-btn-normal',
onClick:myQuery" data-toggle="topjui-menubutton" href="javascript:void(0)">執行自定義方法</a> <a data-options="menu:'#sourceEdit',
btnCls:'topjui-btn-danger',
hasDownArrow:true,
iconCls:'fa fa-list'" data-toggle="topjui-menubutton" href="javascript:void(0)">原始碼</a>
<div class="topjui-toolbar" id="sourceEdit" style="width:150px;">
<div data-options="method:'request',
url:_ctx   '/json/response/success.json?uuid={uuid}'" data-toggle="topjui-menubutton">匯出 PDF 報表</div>
<div data-options="method:'export',
extend: '#productDg-toolbar',
url: _ctx   '/json/response/export.html'" data-toggle="topjui-menubutton">匯出EXCEL列表</div>
<div data-options="method:'request',
url:_ctx   '/json/response/success.json?uuid={uuid}'" data-toggle="topjui-menubutton">匯出EXCEL報表</div>
<div data-options="method:'request',
url:_ctx   '/json/response/success.json?uuid={uuid}'" data-toggle="topjui-menubutton">匯出WORD報表</div>
</div>
<form class="search-box" id="queryForm"><input data-options="id:'name',prompt:'產品名稱'" data-toggle="topjui-textbox" name="name" type="text" /> <input data-options="id:'code',prompt:'產品型號'" data-toggle="topjui-textbox" name="code" type="text" /> <a data-options="method:'query',
iconCls:'fa fa-search',
btnCls:'topjui-btn-danger',
form:{id:'queryForm'},
grid:{type:'datagrid','id':'productDg'}" data-toggle="topjui-menubutton" href="javascript:void(0)">查詢</a></form>
</div>
<!-- 表格工具欄結束 --><script>
function progressFormatter(value, rowData, rowIndex) {
var htmlstr = '<div id="p" class="easyui-progressbar progressbar" data-options="value:'   value   '" style="width: 398px; height: 26px;">';
htmlstr  = '<div class="progressbar-text" style="width: 398px; height: 26px; line-height: 26px;">'   value   '%</div>';
htmlstr  = '<div class="progressbar-value" style="width: '   value   '%; height: 26px; line-height: 26px;">';
htmlstr  = '<div class="progressbar-text" style="width: 398px; height: 26px; line-height: 26px;">'   value   '%</div>';
htmlstr  = '</div>';
htmlstr  = '</div>';
return htmlstr;
}
// 自定義方法
function myQuery() {
// 提示資訊
$.iMessager.alert('自定義方法', '自定義方法被執行了!', 'messager-info');
// 提交引數查詢表格資料
$('#productDg').iDatagrid('reload', {
name: $('#name').iTextbox('getValue'),
code: $('#code').iTextbox('getValue')
});
}
</script><!--main-content-end-->

IOS開發 最新文章