| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760 |
- work_parameter = {
- first : '(0)',
- last : '(0)',
- count : 20
- };
- function work_count_init() {
- $('#result').html('');
- var str = '<table border="1" width="100%">';
- str += '<thead>';
- str += '<tr><td colspan="2"><a href="#" id="countWithPerson">countWithPerson</a> <a href="#" id="countWithApplication">countWithApplication</a> <a href="#" id="countWithProcess">countWithProcess</a></td></tr>';
- str += '</thead>'
- str += '<tbody id="grid">';
- str += '<tr><td>person:</td><td><input type="text" id="person" style="width:95%"></td></tr>';
- str += '<tr><td>applicationFlag:</td><td><input type="text" id="applicationFlag" style="width:95%"></td></tr>';
- str += '</tbody>';
- str += '</table>';
- $('#content').html(str);
- $('#countWithPerson').click(function() {
- work_countWithPerson($('#person').val());
- });
- $('#countWithApplication').click(function() {
- work_countWithApplication();
- });
- $('#countWithProcess').click(function() {
- work_countWithProcess($('#applicationFlag').val());
- });
- }
- function work_countWithPerson(person) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/count/' + person,
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_countWithApplication() {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/count/application',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_countWithProcess(applicationFlag) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/count/application/' + applicationFlag + '/process',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_get_init() {
- $('#result').html('');
- var str = '<table border="1" width="100%">';
- str += '<thead>';
- str += '<tr><td colspan="2"><a href="#" id="complex">complex</a> <a href="#" id="complexMobile">complexMobile</a> <a href="#" id="complexAppointForm">complexAppointForm</a> <a href="#" id="complexAppointFormMobile">complexAppointFormMobile</a></td></tr>';
- str += '<tr><td colspan="2"><a href="#" id="processing">processing</a> <a href="#" id="reroute">reroute</a> <a href="#" id="retract">retract</a> <a href="#" id="delete">delete</a></td></tr>';
- str += '</thead>';
- str += '<tbody id="grid">';
- str += '<tr><td>workId:</td><td><input type="text" id="workId" style="width:95%"></td></tr>';
- str += '<tr><td>formFlag:</td><td><input type="text" id="formFlag" style="width:95%"></td></tr>';
- str += '<tr><td>activityId:</td><td><input type="text" id="activityId" style="width:95%"></td></tr>';
- str += '<tr><td>activityType:</td><td><input type="text" id="activityType" style="width:95%"></td></tr>';
- str += '</tbody>';
- str += '</table>';
- $('#content').html(str);
- $('#complex').click(function() {
- work_complex($('#workId').val());
- });
- $('#complexMobile').click(function() {
- work_complexMobile($('#workId').val());
- });
- $('#complexAppointForm').click(function() {
- work_complexAppointForm($('#workId').val(), $('#formFlag').val());
- });
- $('#complexAppointFormMobile').click(function() {
- work_complexAppointFormMobile($('#workId').val(), $('#formFlag').val());
- });
- $('#processing').click(function() {
- work_processing($('#workId').val());
- });
- $('#reroute').click(function() {
- work_reroute($('#workId').val(), $('#activityId').val(), $('#activityType').val());
- });
- $('#retract').click(function() {
- work_retract($('#workId').val());
- });
- $('#delete').click(function() {
- work_retract($('#delete').val());
- });
- }
- function work_complex(workId) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/complex',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_complexMobile(workId) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/complex/mobile',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_complexAppointForm(workId, formFlag) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/complex/appoint/form/' + formFlag,
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_complexAppointFormMobile(workId, formFlag) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/complex/appoint/form/' + formFlag + '/mobile',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_processing(workId) {
- $('#result').html('');
- $.ajax({
- type : 'put',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/processing',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_reroute(workId, activityId, activityType) {
- $('#result').html('');
- $.ajax({
- type : 'put',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/reroute/activity/' + activityId + '/activitytype/' + activityType,
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_retract(workId) {
- $('#result').html('');
- $.ajax({
- type : 'put',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/retract',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_delete(workId) {
- $('#result').html('');
- $.ajax({
- type : 'delete',
- dataType : 'json',
- url : '../jaxrs/work/' + workId,
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_listWithApplication_init() {
- $('#result').html('');
- str = '<table border="1" width="100%">';
- str += '<thead>';
- str += '<tr><th colspan="4"><a href="#" id="prev">prev</a> <a href="#" id="next">next</a> <span id="total">0</span></th></tr>';
- str += '<tr><th>applicationFlag:</th><th colspan="3"><input type="text" id="applicationFlag" style="width:95%"/></th></tr>';
- str += '<tr><th>rank</th><th>id</th><th>title</th><th>processName</th></tr></thead>';
- str += '</thead>';
- str += '<tbody id="gird">';
- str += '</tbody>';
- str += '</table>';
- $('#content').html(str);
- $('#next').click(function() {
- work_listWithApplication_next(null, $('#applicationFlag').val());
- });
- $('#prev').click(function() {
- work_listWithApplication_prev(null, $('#applicationFlag').val());
- });
- work_parameter.first = '(0)';
- work_parameter.last = '(0)';
- }
- function work_listWithApplication_next(id, applicationFlag) {
- var id = (id ? id : work_parameter.last);
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/' + id + '/next/' + work_parameter.count + '/application/{applicationFlag}',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- if (json.data.length > 0) {
- work_parameter.first = json.data[0].id;
- work_parameter.last = json.data[json.data.length - 1].id;
- } else {
- work_parameter.first = '(0)';
- }
- work_list_grid(json);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_listWithApplication_prev(id, applicationFlag) {
- var id = (id ? id : work_parameter.first);
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/' + id + '/prev/' + work_parameter.count + '/application/{applicationFlag}',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- if (json.data.length > 0) {
- work_parameter.first = json.data[0].id;
- work_parameter.last = json.data[json.data.length - 1].id;
- } else {
- work_parameter.last = '(0)';
- }
- work_list_grid(json);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_listWithProcess_init() {
- $('#result').html('');
- str = '<table border="1" width="100%">';
- str += '<thead>';
- str += '<tr><th colspan="4"><a href="#" id="prev">prev</a> <a href="#" id="next">next</a> <span id="total">0</span></th></tr>';
- str += '<tr><th>processFlag:</th><th colspan="3"><input type="text" id="processFlag" style="width:95%"/></th></tr>';
- str += '<tr><th>rank</th><th>id</th><th>title</th><th>processName</th></tr></thead>';
- str += '</thead>';
- str += '<tbody id="gird">';
- str += '</tbody>';
- str += '</table>';
- $('#content').html(str);
- $('#next').click(function() {
- work_listWithProcess_next(null, $('#processFlag').val());
- });
- $('#prev').click(function() {
- work_listWithProcess_prev(null, $('#processFlag').val());
- });
- work_parameter.first = '(0)';
- work_parameter.last = '(0)';
- }
- function work_listWithProcess_next(id, processFlag) {
- var id = (id ? id : work_parameter.last);
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/' + id + '/next/' + work_parameter.count + '/process/{processFlag}',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- if (json.data.length > 0) {
- work_parameter.first = json.data[0].id;
- work_parameter.last = json.data[json.data.length - 1].id;
- } else {
- work_parameter.first = '(0)';
- }
- work_list_grid(json);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_listWithProcess_prev(id, processFlag) {
- var id = (id ? id : work_parameter.first);
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/' + id + '/prev/' + work_parameter.count + '/process/{processFlag}',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- if (json.data.length > 0) {
- work_parameter.first = json.data[0].id;
- work_parameter.last = json.data[json.data.length - 1].id;
- } else {
- work_parameter.last = '(0)';
- }
- work_list_grid(json);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_list_grid(json) {
- if (json.data && json.data.length > 0) {
- str = '';
- $.each(json.data, function(index, item) {
- str += '<tr>';
- str += '<td>' + item.rank + '</td>';
- str += '<td>' + item.id + '</td>';
- str += '<td>' + item.title + '</td>';
- str += '<td>' + item.processName + '</td>';
- str += '</tr>';
- });
- $('#total').html(json.count);
- $('#grid').html(str);
- } else {
- $('#total').html('0');
- $('#grid').html('');
- }
- }
- function work_manage_get_init() {
- $('#result').html('');
- var str = '<table border="1" width="100%">';
- str += '<thead>';
- str += '<tr><td colspan="2"><a href="#" id="get">get</a> <a href="#" id="assignment">assignment</a> <a href="#" id="listRelative">listRelative</a> <a href="#" id="deleteSingle">deleteSingle</a> <a href="#" id="deleteRelative">deleteRelative</a></td></tr>';
- str += '<tr><td>workId:</td><td><input type="text" id="workId" style="width:95%"/></td></tr>';
- str += '</thead>';
- str += '</table>';
- $('#content').html(str);
- $('#get').click(function() {
- work_manage_get($('#workId').val());
- });
- $('#assignment').click(function() {
- work_manage_assignment($('#workId').val());
- });
- $('#listRelative').click(function() {
- work_manage_listRelative($('#workId').val());
- });
- $('#deleteSingle').click(function() {
- work_manage_deleteSingle($('#workId').val());
- });
- $('#deleteRelative').click(function() {
- work_manage_deleteRelative($('#workId').val());
- });
- }
- function work_manage_get(workId) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_manage_assignment(workId) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/assignment/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_manage_listRelative(workId) {
- $('#result').html('');
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/relative/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_manage_deleteSingle(workId) {
- $('#result').html('');
- $.ajax({
- type : 'delete',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/single/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_manage_deleteRelative(workId) {
- $('#result').html('');
- $.ajax({
- type : 'delete',
- dataType : 'json',
- url : '../jaxrs/work/' + workId + '/relative/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_manage_countWithProcess_init() {
- $('#result').html('');
- str = '<table border="1" width="100%">';
- str += '<thead>';
- str += '<tr><td colspan="2"><a href="#" id="get">get</a></td></tr>';
- str += '<tr><td>applicationFlag:</td><td colspan="3"><input type="text" id="applicationFlag" style="width:95%"/></td></tr>';
- str += '</thead>';
- str += '</table>';
- $('#content').html(str);
- $('#get').click(function() {
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/count/application/' + $('#applicationFlag').val() + '/process/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- });
- }
- function work_manage_list_init() {
- $('#result').html('');
- str = '<table border="1" width="100%">';
- str += '<thead>';
- str += '<tr><td colspan="4"><a href="#" id="prev">prev</a> <a href="#" id="next">next</a> <span id="total">0</span></td></tr>';
- str += '<tr><td>applicationFlag:</td><td colspan="3"><input type="text" id="applicationFlag" style="width:95%"/></td></tr>';
- str += '<tr><th>rank</th><th>id</th><th>title</th><th>processName</th></tr>';
- str += '</thead>';
- str += '<tbody id="gird">';
- str += '</tbody>';
- str += '</table>';
- $('#content').html(str);
- $('#next').click(function() {
- work_manage_list_next(null, $('#applicationFlag').val());
- });
- $('#prev').click(function() {
- work_manage_list_prev(null, $('#applicationFlag').val());
- });
- work_parameter.first = '(0)';
- work_parameter.last = '(0)';
- }
- function work_manage_list_next(id, applicationFlag) {
- var id = (id ? id : work_parameter.last);
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/' + id + '/next/' + work_parameter.count + '/application/' + applicationFlag + '/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- if (json.data.length > 0) {
- work_parameter.first = json.data[0].id;
- work_parameter.last = json.data[json.data.length - 1].id;
- } else {
- work_parameter.first = '(0)';
- }
- work_list_grid(json);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_manage_list_prev(id, applicationFlag) {
- var id = (id ? id : work_parameter.first);
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/list/' + id + '/prev/' + work_parameter.count + '/application/' + applicationFlag + '/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- if (json.data.length > 0) {
- work_parameter.first = json.data[0].id;
- work_parameter.last = json.data[json.data.length - 1].id;
- } else {
- work_parameter.last = '(0)';
- }
- work_list_grid(json);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_manage_filter_init() {
- $('#result').html('');
- str = '<table border="1" width="100%">';
- str += '<thead>';
- str += '<tr><td colspan="4"><a href="#" id="filterAttribute">filterAttribute</a> <a href="#" id="clear">clear</a> <a href="#" id="prev">prev</a> <a href="#" id="next">next</a> <span id="total">0</span></td></tr>';
- str += '<tr><td>applicationFlag:</td><td colspan="3"><input type="text" id="applicationFlag" style="width:95%"/></td></tr>';
- str += '<tr><td>processFilter:</td><td colspan="3"><select id="processFilter"/></td></tr>';
- str += '<tr><td>creatorCompanyFilter:</td><td colspan="3"><select id="creatorCompanyFilter"/></td></tr>';
- str += '<tr><td>creatorDepartment:</td><td colspan="3"><select id="creatorDepartment"/></td></tr>';
- str += '<tr><td>activityName:</td><td colspan="3"><select id="activityName"/></td></tr>';
- str += '<tr><td>startTimeMonth:</td><td colspan="3"><select id="startTimeMonth"/></td></tr>';
- str += '<tr><td>workStatus:</td><td colspan="3"><select id="workStatus"/></td></tr>';
- str += '<tr><td>key:</td><td colspan="3"><input type="text" id = "keyFilter" style="width:95%"/></td></tr>';
- str += '<tr><th>rank</th><th>id</th><th>title</th><th>processName</th></tr>';
- str += '</thead>';
- str += '<tbody id="gird">';
- str += '</tbody>';
- str += '</table>';
- $('#content').html(str);
- $('#next').click(function() {
- work_manage_filter_list_next(null, $('#applicationFlag').val());
- });
- $('#prev').click(function() {
- work_manage_filter_list_prev(null, $('#applicationFlag').val());
- });
- $('#clear').click(function() {
- work_parameter.first = '(0)';
- work_parameter.last = '(0)';
- });
- $('#filterAttribute').click(function() {
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/work/filter/attribute/application/' + $('#applicationFlag').val() + '/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- var txt = '<option value="">all</option>';
- if (json.data.processList) {
- $.each(json.data.processList, function(index, item) {
- txt += '<option value="' + item.value + '">' + item.name + '</option>';
- });
- }
- $('#processFilter').html(txt);
- txt = '<option value="">all</option>';
- if (json.data.creatorCompanyList) {
- $.each(json.data.creatorCompanyList, function(index, item) {
- txt += '<option value="' + item.value + '">' + item.name + '</option>';
- });
- }
- $('#creatorCompanyFilter').html(txt);
- txt = '<option value="">all</option>';
- if (json.data.creatorDepartmentList) {
- $.each(json.data.creatorDepartmentList, function(index, item) {
- txt += '<option value="' + item.value + '">' + item.name + '</option>';
- });
- }
- $('#creatorDepartmentFilter').html(txt);
- txt = '<option value="">all</option>';
- if (json.data.creatorDepartmentList) {
- $.each(json.data.creatorDepartmentList, function(index, item) {
- txt += '<option value="' + item.value + '">' + item.name + '</option>';
- });
- }
- $('#creatorDepartmentFilter').html(txt);
- txt = '<option value="">all</option>';
- if (json.data.activityNameList) {
- $.each(json.data.activityNameList, function(index, item) {
- txt += '<option value="' + item.value + '">' + item.name + '</option>';
- });
- }
- $('#activityNameFilter').html(txt);
- txt = '<option value="">all</option>';
- if (json.data.startTimeMonthList) {
- $.each(json.data.startTimeMonthList, function(index, item) {
- txt += '<option value="' + item.value + '">' + item.name + '</option>';
- });
- }
- $('#startTimeMonthFilter').html(txt);
- txt = '<option value="">all</option>';
- if (json.data.workStatusList) {
- $.each(json.data.workStatusList, function(index, item) {
- txt += '<option value="' + item.value + '">' + item.name + '</option>';
- });
- }
- $('#workStatusFilter').html(txt);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- });
- work_parameter.first = '(0)';
- work_parameter.last = '(0)';
- }
- function work_manage_filter_list_next(id, applicationFlag) {
- var id = (id ? id : work_parameter.last);
- $.ajax({
- type : 'post',
- dataType : 'json',
- url : '../jaxrs/work/list/' + id + '/next/' + work_parameter.count + '/application/{applicationFlag}/filter/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- data : JSON.stringify({
- process : $('#processFilter').val(),
- creatorCompany : $('#creatorCompanyFilter').val(),
- creatorDepartment : $('#creatorDepartmentFilter').val(),
- activityName : $('#activityNameFilter').val(),
- startTimeMonth : $('#startTimeMonthFilter').val(),
- workStatus : $('#workStatusFilter').val(),
- key : $('#keyFilter').val()
- }),
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- if (json.data.length > 0) {
- work_parameter.first = json.data[0].id;
- work_parameter.last = json.data[json.data.length - 1].id;
- } else {
- work_parameter.first = '(0)';
- }
- work_list_grid(json);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function work_manage_filter_list_prev(id, applicationFlag) {
- var id = (id ? id : work_parameter.first);
- $.ajax({
- type : 'post',
- dataType : 'json',
- url : '../jaxrs/work/list/' + id + '/prev/' + work_parameter.count + '/application/{applicationFlag}/filter/manage',
- xhrFields : {
- 'withCredentials' : true
- },
- data : JSON.stringify({
- process : $('#processFilter').val(),
- creatorCompany : $('#creatorCompanyFilter').val(),
- creatorDepartment : $('#creatorDepartmentFilter').val(),
- activityName : $('#activityNameFilter').val(),
- startTimeMonth : $('#startTimeMonthFilter').val(),
- workStatus : $('#workStatusFilter').val(),
- key : $('#keyFilter').val()
- }),
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- if (json.data.length > 0) {
- work_parameter.first = json.data[0].id;
- work_parameter.last = json.data[json.data.length - 1].id;
- } else {
- work_parameter.last = '(0)';
- }
- work_list_grid(json);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
|