1
duan
2024-08-21 f71a02229c1ba00fbecaead19256593ffb052753
提交 | 用户 | age
361c8a 1 //窗体加载
A 2 $(function () {
3     initPartialWorkflowTable();
4 });
5
6
7 //初始化表格
8 function initPartialWorkflowTable() {
9     var code = '';
10     var name = '';
11     var billType = 0;// 不加这个筛选了
12     $('.easyui-datagrid[title="SearchPartialWorkflow"]').datagrid({
13         //分页
14         fitColumns: true,
15         singleSelect: true,
16         url: '../../GlobalM/Workflow/GetWorkflow',
17         queryParams: { Code: code, Name: name, BillTypeId: billType },
18         pagination: true,
19         rownumbers: true,
20         pagePosition: 'bottom',
21         pageSize: 10,
22         pageNumber: 1,
23         pageList: [2, 10, 15, 20, 30, 50],
24         toolbar: '.WorkflowToolBar',
25         fitColumns: true,
26         //数据格式
27         columns: [[
28             //{ checkbox: true, field: 'Id', fixed: true, },
29             { title: '序号', width: 35, field: 'Id', hidden: true, },
30             { title: '编号', width: 130, field: 'Code', },
1bf8ef 31             { title: '名称', width: 230, field: 'Name', },
361c8a 32
1bf8ef 33             { title: '审计地址', width: 120, field: 'AuditUrl', },
A 34             { title: '浏览地址', width: 120, field: 'BrowseUrl', },
35             { title: '开始地址', width: 120, field: 'StartUrl', },
361c8a 36             {
A 37                 title: '创建时间', width: 200, field: 'CreateTime', formatter: function (value, row, index) {
6bb7ad 38                     return toDateStr(value);
361c8a 39                 }
A 40             },
1bf8ef 41             //{ title: '创建人', width: 100, field: 'CreateUserId', hidden: true, },
A 42             //{ title: '创建人', width: 100, field: 'CreateUserName', },
361c8a 43             {
A 44                 title: '变更时间', width: 200, field: 'ChangeTime', formatter: function (value, row, index) {
6bb7ad 45                     return toDateStr(value);
361c8a 46                 }
A 47             },
48             { title: '变更人', width: 100, field: 'ChangeUserId', hidden: true, },
49             { title: '变更人', width: 100, field: 'ChangeUserName', },
50         ]],
51     });
52 }
53
54
55 function clickPartialWorkflowSearch(obj) {
56     var $codeDoc = $(obj).siblings('.easyui-textbox[title="code"]').first();
57     var code = $($codeDoc).textbox('getValue');
58     var $nameDoc = $(obj).siblings('.easyui-textbox[title="name"]').first();
59     var name = $($nameDoc).textbox('getValue');
60     $('.easyui-datagrid[title="SearchPartialWorkflow"]').datagrid('load', {
61         Code: code,
62         Name: name,
63     });
64 }
65
66 function clickPartialWorkflowSearchClear(obj) {
67     var $codeDoc = $(obj).siblings('.easyui-textbox[title="code"]').first();
68     $($codeDoc).textbox('setValue', '');
69     var $nameDoc = $(obj).siblings('.easyui-textbox[title="name"]').first();
70     $($nameDoc).textbox('setValue', '');
71 }
72
73