ITP_LOANMNG03010.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. /********************************************************
  2. --------------------------------------------------------
  3. - Object 목록 -
  4. --------------------------------------------------------
  5. * const gridColModel = {} : 화면 Grid Object *
  6. * let pageObj = {} : 화면공통 Object *
  7. * let listObj = {} : 목록화면 Object *
  8. * let viewObj = {} : 상세화면 Object *
  9. * let modifyObj = {} : 수정화면 Object *
  10. * let createObj = {} : 신규화면 Object *
  11. *******************************************************/
  12. /*화면 변수*/
  13. const LOANMNG03010_GRID_ID = '#ITP_LOANMNG03010_jqGrid';
  14. const LOANMNG03010_GRID_LIST = '#ITP_LOANMNG03010_jqGrid_list';
  15. const LOANMNG03010_GRID_PAGER = '#ITP_LOANMNG03010_jqGridPager';
  16. const LOANMNG03010_GRID_EMPTY = '#ITP_LOANMNG03010_jqGridEmpty';
  17. const LOANMNG03010_VIEW_GRID_ID = '#ITP_LOANMNG03010_VIEW_jqGrid';
  18. const LOANMNG03010_VIEW_GRID_LIST = '#ITP_LOANMNG03010_VIEW_jqGrid_list';
  19. const LOANMNG03010_VIEW_GRID_PAGER = '#ITP_LOANMNG03010_VIEW_jqGridPager';
  20. const LOANMNG03010_VIEW_GRID_EMPTY = '#ITP_LOANMNG03010_VIEW_jqGridEmpty';
  21. const LOANMNG03010_DETAIL_GRID_ID = '#ITP_LOANMNG03010_DETAIL_jqGrid';
  22. const LOANMNG03010_DETAIL_GRID_LIST = '#ITP_LOANMNG03010_DETAIL_jqGrid_list';
  23. const LOANMNG03010_DETAIL_GRID_PAGER = '#ITP_LOANMNG03010_DETAIL_jqGridPager';
  24. const LOANMNG03010_DETAIL_GRID_EMPTY = '#ITP_LOANMNG03010_DETAIL_jqGridEmpty';
  25. let ITP_FORM_LOANMNG03010_DETAIL_IS_DUPLICATE = false;
  26. let ITP_FORM_LOANMNG03010_DETAIL_IS_WRITING = false;
  27. let LOANMNG03010_DETAIL_GRID_LAST_ROW_ID;
  28. /*API URL*/
  29. let UNPAID_MNG_DETAIL_GRID_LIST = '/api/unpaid/mng/detail-grid-list';
  30. let UNPAID_MNG_STL_GRID_LIST = '/api/unpaid/mng/stl-grid-list';
  31. let UNPAID_MNG_INFO_UNPAID = '/api/unpaid/mng/info-unpaid';
  32. let WHS_MNG_ADD_WHS = '/api/whs/mng/add-whs';
  33. let WHS_MNG_MIDIFY_WHS = '/api/whs/mng/modify-whs';
  34. let WHS_MNG_REMOVE_WHS = '/api/whs/mng/remove-whs';
  35. /*화면 Grid ColModel*/
  36. const gridColModel = {
  37. list: [
  38. {
  39. index: 'STTL_MGNT_UNQ_NO', name: 'sttlMgntUnqNo',
  40. label: "정산관리고유번호",
  41. width: '0', fixed: false, align: 'center',
  42. sortable: false, hidden: true
  43. },
  44. {
  45. index: 'BRAND_ID', name: 'brandId',
  46. label: "브랜드ID",
  47. width: '0', fixed: false, align: 'center',
  48. sortable: false, hidden: true
  49. },
  50. {
  51. index: 'STORE_ID', name: 'storeId',
  52. label: "매장ID",
  53. width: '0', fixed: false, align: 'center',
  54. sortable: false, hidden: true
  55. },
  56. {
  57. index: 'BRAND_NM', name: 'brandNm',
  58. label: ITP_MSG_LOCALE.label.brandNm, //브랜드
  59. width: '13', fixed: false, align: 'center',
  60. sortable: false, hidden: false
  61. },
  62. {
  63. index: 'STORE_NM', name: 'storeNm',
  64. label: "매장명",
  65. width: '13', fixed: false, align: 'center',
  66. sortable: false, hidden: false
  67. },
  68. {
  69. index: 'STTL_ST_NM', name: 'sttlStNm',
  70. label: "상태",
  71. width: '8', fixed: false, align: 'center',
  72. sortable: false, hidden: false
  73. },
  74. {
  75. index: 'STTL_REQ_DT', name: 'sttlReqDt',
  76. label: "정산요청일",
  77. width: '10', fixed: false, align: 'center',
  78. sortable: false, hidden: false
  79. },
  80. {
  81. index: 'STTL_DT', name: 'sttlDt',
  82. label: "정산일",
  83. width: '10', fixed: false, align: 'center',
  84. sortable: false, hidden: false
  85. },
  86. {
  87. index: 'STTL_REQ_AMT', name: 'sttlReqAmt',
  88. label: '정산요청금액',
  89. width: '10', fixed: false, align: 'center',
  90. sortable: false, hidden: false,
  91. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  92. },
  93. {
  94. index: 'STTL_AMT', name: 'sttlAmt',
  95. label: '정산금액',
  96. width: '10', fixed: false, align: 'center',
  97. sortable: false, hidden: false,
  98. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  99. },
  100. {
  101. index: 'ACCT_BAL', name: 'acctBal',
  102. label: '잔액',
  103. width: '10', fixed: false, align: 'center',
  104. sortable: false, hidden: false,
  105. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  106. }
  107. ],
  108. view: [
  109. {
  110. index: 'VIEW_CD', name: 'viewCd',
  111. label: ITP_MSG_LOCALE.label.viewCd,
  112. width: '10', fixed: false, align: 'center',
  113. sortable: false, hidden: true
  114. },
  115. {
  116. index: 'STTL_MGNT_DTL_NO', name: 'sttlMgntDtlNo',
  117. label: '정산관리상세번호',
  118. width: '10', fixed: false, align: 'center',
  119. sortable: false, hidden: true
  120. },
  121. {
  122. index: 'BRAND_NM', name: 'brandNm',
  123. label: "브랜드",
  124. width: '10', fixed: false, align: 'center',
  125. sortable: false, hidden: true
  126. },
  127. {
  128. index: 'STORE_NM', name: 'storeNm',
  129. label: "매장명",
  130. width: '10', fixed: false, align: 'center',
  131. sortable: false, hidden: true
  132. },
  133. {
  134. index: 'ITEM_ID', name: 'itemId',
  135. label: "품목코드",
  136. width: '10', fixed: false, align: 'center',
  137. sortable: false, editable: false, edittype: 'text'
  138. },
  139. {
  140. index: 'ITEM_NM', name: 'itemNm',
  141. label: "품목명",
  142. width: '10', fixed: false, align: 'center',
  143. sortable: false, editable: false, edittype: 'text'
  144. },
  145. {
  146. index: 'UNIT', name: 'unit',
  147. label: "단위",
  148. width: '8', fixed: false, align: 'center',
  149. sortable: false, editable: false, edittype: 'text'
  150. },
  151. {
  152. index: 'UNIT_AMT', name: 'unitAmt',
  153. label: "단가",
  154. width: '8', fixed: false, align: 'center',
  155. sortable: false, editable: false, edittype: 'text',
  156. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  157. },
  158. {
  159. index: 'PODR_QTY', name: 'podrQty',
  160. label: "발주수량",
  161. width: '8', fixed: false, align: 'center',
  162. sortable: false, editable: false, edittype: 'text',
  163. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  164. },
  165. {
  166. index: 'DLV_QTY', name: 'dlvQty',
  167. label: "납품수량",
  168. width: '8', fixed: false, align: 'center',
  169. sortable: false, editable: false, edittype: 'text',
  170. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  171. },
  172. {
  173. index: 'WHS_COL_QTY', name: 'whsColQty',
  174. label: "입고/수거수량",
  175. width: '8', fixed: false, align: 'center',
  176. sortable: false, editable: false, edittype: 'text',
  177. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  178. },
  179. {
  180. index: 'WHS_COL_DT', name: 'whsColDt',
  181. label: "입고/수거일자",
  182. width: '8', fixed: false, align: 'center',
  183. sortable: false, editable: false, edittype: 'text'
  184. },
  185. {
  186. index: 'WHS_COL_AMT', name: 'whsColAmt',
  187. label: "입고/수거금액",
  188. width: '8', fixed: false, align: 'center',
  189. sortable: false, editable: false, edittype: 'text',
  190. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  191. },
  192. {
  193. index: 'STTL_REQ_AMT', name: 'sttlReqAmt',
  194. label: "정산금액",
  195. width: '8', fixed: false, align: 'center',
  196. sortable: false, editable: false, edittype: 'text',
  197. formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
  198. },
  199. {
  200. index: 'STTL_DVSN_NM', name: 'sttlDvsnNm',
  201. label: "정산구분",
  202. width: '8', fixed: false, align: 'center',
  203. sortable: false, editable: false, edittype: 'text'
  204. },
  205. {
  206. index: 'PODR_UNQ_NO', name: 'podrUnqNo',
  207. label: "발주번호",
  208. width: '8', fixed: false, align: 'center',
  209. sortable: false, editable: false, edittype: 'text'
  210. },
  211. {
  212. index: 'PODR_DTL_NO', name: 'podrDtlNo',
  213. label: "발주항번",
  214. width: '8', fixed: false, align: 'center',
  215. sortable: false, editable: false, edittype: 'text'
  216. }
  217. ]
  218. };
  219. require(['config'], function() {
  220. require([
  221. 'kakao.map.util'
  222. ], function($) {
  223. pageObj.init();
  224. });
  225. });
  226. /*화면공통 Object*/
  227. let pageObj = {
  228. init: function () {
  229. this.ui.init();
  230. this.event.init();
  231. },
  232. ui: {
  233. init: function () {
  234. this.view();
  235. this.grid();
  236. this.ready();
  237. },
  238. view: function() {
  239. // 버튼 권한설정
  240. fn_proc_btn_auth('LOANMNG03010');
  241. // 공통코드 표시
  242. $('select').each(function() {
  243. if($(this).data('select-code')) {
  244. fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
  245. }
  246. });
  247. // 조회일자 지정
  248. var now = new Date();
  249. $('#ITP_TAB_LOANMNG03010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
  250. $('#ITP_FORM_LOANMNG03010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
  251. $('#ITP_FORM_LOANMNG03010_SEARCH_TO_DT').datepicker('setDate', new Date());
  252. },
  253. grid: function() {
  254. itp_fn_jqgrid_resize(LOANMNG03010_GRID_ID, LOANMNG03010_GRID_LIST, 'lg');
  255. listObj.empty.init();
  256. itp_fn_fire_window_resize();
  257. },
  258. ready: function() {
  259. listObj.init();
  260. }
  261. },
  262. event: {
  263. init: function () {
  264. this.button();
  265. },
  266. button: function () {
  267. // 버튼 클릭 이벤트
  268. $('button').each(function() {
  269. var id = $(this).attr('id');
  270. $(this).on('click', function() {
  271. switch (id) {
  272. case 'ITP_BTN_LOANMNG03010_SRH' : listObj.button.search(); break; // 조회 버튼 클릭
  273. case 'ITP_BTN_LOANMNG03010_CANCELLIST' : viewObj.button.cancel(); break; // 취소/목록 버튼
  274. case 'ITP_BTN_LOANMNG03010_PAYMENT' : viewObj.button.payment(); break; // 결제 버튼
  275. }
  276. });
  277. });
  278. $('body').on('click', function(e) {
  279. var gridId = LOANMNG03010_DETAIL_GRID_ID.replace('#', '');
  280. var rids = $(LOANMNG03010_DETAIL_GRID_ID).jqGrid('getDataIDs');
  281. var last_row_id = rids[rids.length - 1];
  282. itp_fn_grid_reset_selection(e, last_row_id, gridId, 'LOANMNG03010_DETAIL');
  283. });
  284. }
  285. },
  286. switchScreen: function(mode) {
  287. if(mode == 'LIST') { // 목록
  288. $('#ITP_BTN_LOANMNG03010_MODIFY').hide();
  289. $('#ITP_BTN_LOANMNG03010_CANCELLIST').hide();
  290. $('#ITP_BTN_LOANMNG03010_DELETE').hide();
  291. $('#ITP_BTN_LOANMNG03010_PAYMENT').hide();
  292. fn_show_btn_auth('#ITP_BTN_LOANMNG03010_SRH');
  293. fn_show_btn_auth('#ITP_BTN_LOANMNG03010_NEWREG');
  294. $('#ITP_AJAX_LOANMNG03010_LIST_CONTAINER').show();
  295. $('#ITP_AJAX_LOANMNG03010_DETAIL_CONTAINER').hide();
  296. $('#ITP_AJAX_LOANMNG03010_VIEW_CONTAINER').hide();
  297. } else if(mode == 'VIEW') { // 보기
  298. $('#ITP_BTN_LOANMNG03010_SRH').hide();
  299. $('#ITP_BTN_LOANMNG03010_NEWREG').hide();
  300. $('#ITP_BTN_LOANMNG03010_DELETE').hide();
  301. fn_show_btn_auth('#ITP_BTN_LOANMNG03010_PAYMENT');
  302. fn_show_btn_auth('#ITP_BTN_LOANMNG03010_CANCELLIST');
  303. $('#ITP_AJAX_LOANMNG03010_LIST_CONTAINER').hide();
  304. $('#ITP_AJAX_LOANMNG03010_DETAIL_CONTAINER').hide();
  305. $('#ITP_AJAX_LOANMNG03010_VIEW_CONTAINER').show();
  306. }
  307. }
  308. };
  309. /*목록화면 Object*/
  310. let listObj = {
  311. init: function () {
  312. this.grid.init();
  313. },
  314. itp_LOANMNG03010_search: false,
  315. button: {
  316. search: function() {
  317. listObj.itp_LOANMNG03010_search = true;
  318. let param = $('#ITP_FORM_LOANMNG03010_SEARCH').serializeObject();
  319. param.gridSize = $.jgrid.defaults.rowNum;
  320. param.gridPage = $.jgrid.defaults.page;
  321. $(LOANMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
  322. },
  323. create: function() {
  324. pageObj.switchScreen('ADD');
  325. itp_fn_form_clear_validate(null, '#ITP_FORM_LOANMNG03010_DETAIL');
  326. // 로케이션 리스트 조회
  327. createObj.init();
  328. }
  329. },
  330. empty: {
  331. init: function() {
  332. var _this = this;
  333. this.push();
  334. $(LOANMNG03010_GRID_EMPTY).on('click', function() {
  335. _this.back();
  336. _this.itp_LOANMNG03010_param.gridSize = $.jgrid.defaults.rowNum;
  337. $(LOANMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_LOANMNG03010_param)}).trigger('reloadGrid');
  338. });
  339. },
  340. itp_LOANMNG03010_param: {},
  341. push: function() {
  342. let param = $('#ITP_FORM_LOANMNG03010_SEARCH').serializeObject();
  343. listObj.itp_LOANMNG03010_param = param;
  344. },
  345. back: function() {
  346. $('#ITP_FORM_LOANMNG03010_SEARCH_STORE_ID').val(listObj.itp_LOANMNG03010_param.sstoreId);
  347. $('#ITP_FORM_LOANMNG03010_SEARCH_STORE_NM').val(listObj.itp_LOANMNG03010_param.sstoreNm);
  348. $('#ITP_FORM_LOANMNG03010_SEARCH_FROM_DT').val(listObj.itp_LOANMNG03010_param.fromDt);
  349. $('#ITP_FORM_LOANMNG03010_SEARCH_TO_DT').val(listObj.itp_LOANMNG03010_param.toDt);
  350. }
  351. },
  352. grid: {
  353. init: function () {
  354. // 데이터 없을때
  355. listObj.empty.push();
  356. this.search();
  357. },
  358. colModel: gridColModel.list,
  359. search: function() {
  360. pageObj.switchScreen('LIST');
  361. this.unload();
  362. this.load();
  363. },
  364. load: function() {
  365. $('#ITP_FORM_LOANMNG03010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));
  366. let param = $('#ITP_FORM_LOANMNG03010_SEARCH').serializeObject();
  367. param.gridSize = $.jgrid.defaults.rowNum;
  368. var option = {
  369. gridId: LOANMNG03010_GRID_ID,
  370. colModel: gridColModel.list,
  371. param: JSON.stringify(param),
  372. url: DOMAIN + UNPAID_MNG_DETAIL_GRID_LIST,
  373. pager: LOANMNG03010_GRID_PAGER,
  374. onCellSelect: function(rowId, cellIdx, cellValue) {
  375. var cm = $(this).jqGrid('getGridParam', 'colModel');
  376. var colNm = cm[cellIdx].name;
  377. if (colNm == 'storeNm') {
  378. const sttlMgntUnqNoVal = $(this).jqGrid('getCell', rowId, 'sttlMgntUnqNo');
  379. const key = {sttlMgntUnqNo: sttlMgntUnqNoVal, viewCd: 'R'};
  380. var param = $.param(key);
  381. viewObj.init(param);
  382. }
  383. },
  384. loadComplete: function(data) {
  385. console.log(data);
  386. itp_fn_grid_load_complete(data, LOANMNG03010_GRID_ID, true, 'number', 'LOANMNG03010', listObj.itp_LOANMNG03010_search, listObj.empty, true, data.gridRecords, true);
  387. var ids = $(LOANMNG03010_GRID_ID).getDataIDs();
  388. $.each(ids, function(idx, rowId) {
  389. $(LOANMNG03010_GRID_ID).jqGrid('setCell', rowId, 'storeNm', '', ITP_GRID_COL_STYLE.link);
  390. });
  391. },
  392. onPaging: function(action) {
  393. itp_fn_grid_paging(LOANMNG03010_GRID_ID, action, param);
  394. }
  395. };
  396. itp_fn_grid_make_remote(option);
  397. },
  398. clearData : function() {
  399. $(LOANMNG03010_GRID_ID).jqGrid('clearGridData', true);
  400. $(LOANMNG03010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
  401. $(LOANMNG03010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
  402. $(LOANMNG03010_GRID_EMPTY).show();
  403. },
  404. unload : function() {
  405. $.jgrid.gridUnload(LOANMNG03010_GRID_ID);
  406. }
  407. }
  408. };
  409. /*상세화면 Object*/
  410. let viewObj = {
  411. init: function (param) {
  412. this.load(param);
  413. },
  414. button: {
  415. cancel: function() {
  416. listObj.grid.search();
  417. },
  418. payment: function() {
  419. }
  420. },
  421. load: function(param) {
  422. fn_ajax_call(UNPAID_MNG_INFO_UNPAID, param, this.callback, 'GET');
  423. },
  424. callback: function (result) {
  425. // console.log(result);
  426. pageObj.switchScreen('VIEW');
  427. $('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_BRAND_ID').val(result.brandId);
  428. $('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_STORE_ID').val(result.storeId);
  429. $('#ITP_FORM_LOANMNG03010_VIEW #ITP_FORM_LOANMNG03010_VIEW_STTL_MGNT_UNQ_NO').val(result.sttlMgntUnqNo);
  430. $('#ITP_FORM_LOANMNG03010_VIEW .fnBrandNm').text(result.brandNm);
  431. $('#ITP_FORM_LOANMNG03010_VIEW .fnStoreNm').text(result.storeNm);
  432. $('#ITP_FORM_LOANMNG03010_VIEW .fnSttlReqDt').text(result.sttlReqDt);
  433. $('#ITP_FORM_LOANMNG03010_VIEW .fnSttlStNm').text(result.sttlStNm);
  434. $('#ITP_FORM_LOANMNG03010_VIEW .fnSysRegDttm').text(result.sysRegDttm);
  435. $('#ITP_FORM_LOANMNG03010_VIEW .fnSysRegNm').text(result.sysRegNm);
  436. $('#ITP_FORM_LOANMNG03010_VIEW .fnSttlReqAmt').text(itp_fn_number_comma(result.sttlReqAmt));
  437. $('#ITP_FORM_LOANMNG03010_VIEW .fnAcctBal').text(itp_fn_number_comma(result.acctBal));
  438. // 리스트 조회
  439. viewObj.grid.init();
  440. },
  441. grid: {
  442. init: function() {
  443. this.unload();
  444. this.load();
  445. },
  446. load : function() {
  447. let param = $('#ITP_FORM_LOANMNG03010_VIEW').serializeObject();
  448. param.gridSize = $.jgrid.defaults.rowNum;
  449. param.pagingYn = false; // 페이징안함
  450. var option = {
  451. gridId: LOANMNG03010_VIEW_GRID_ID,
  452. colModel: gridColModel.view,
  453. param: JSON.stringify(param),
  454. url: DOMAIN + UNPAID_MNG_STL_GRID_LIST,
  455. pager: LOANMNG03010_VIEW_GRID_PAGER,
  456. loadComplete: function(data) {
  457. itp_fn_grid_load_complete(data, LOANMNG03010_VIEW_GRID_ID, true, undefined, 'LOANMNG03010_VIEW');
  458. },
  459. onPaging: function(action) {
  460. var pagingFn = {
  461. callBack: function(args) {
  462. $(args).trigger('reloadGrid');
  463. }
  464. };
  465. if (itp_fn_check_grid_is_writing(LOANMNG03010_VIEW_GRID_ID)) {
  466. itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, LOANMNG03010_VIEW_GRID_ID);
  467. return 'stop';
  468. } else {
  469. itp_fn_grid_paging(LOANMNG03010_VIEW_GRID_ID, action, param);
  470. }
  471. },
  472. onSortCol: function(index, columnIndex, sortOrder) {
  473. var sortingFn = {
  474. callBack: function(args) {
  475. $(args).trigger('reloadGrid');
  476. }
  477. };
  478. if (itp_fn_check_grid_is_writing(LOANMNG03010_VIEW_GRID_ID)) {
  479. itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, LOANMNG03010_VIEW_GRID_ID);
  480. return 'stop';
  481. } else {
  482. itp_fn_grid_sorting(LOANMNG03010_VIEW_GRID_ID, index, sortOrder);
  483. }
  484. }
  485. };
  486. itp_fn_grid_make_remote(option);
  487. },
  488. clearData : function() {
  489. $(LOANMNG03010_VIEW_GRID_ID).jqGrid('clearGridData', true);
  490. $(LOANMNG03010_VIEW_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
  491. $(LOANMNG03010_VIEW_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
  492. $(LOANMNG03010_VIEW_GRID_EMPTY).show();
  493. },
  494. unload : function() {
  495. $.jgrid.gridUnload(LOANMNG03010_VIEW_GRID_ID);
  496. }
  497. }
  498. };