|
@@ -1,8 +1,7 @@
|
1
|
1
|
require(['config'], function() {
|
2
|
2
|
require([
|
3
|
|
- 'jquery.bootstrap.fileUpload' //파일 업로드가 있는 페이지에서 로딩
|
4
|
3
|
], function($) {
|
5
|
|
- pageObj.init();
|
|
4
|
+ pageObj.init();
|
6
|
5
|
});
|
7
|
6
|
});
|
8
|
7
|
|
|
@@ -24,104 +23,114 @@ const POMNG05010_GRID_LIST = '#ITP_POMNG05010_jqGrid_list';
|
24
|
23
|
const POMNG05010_GRID_PAGER = '#ITP_POMNG05010_jqGridPager';
|
25
|
24
|
const POMNG05010_GRID_EMPTY = '#ITP_POMNG05010_jqGridEmpty';
|
26
|
25
|
|
27
|
|
-let ITP_FORM_POMNG05010_DETAIL_IS_DUPLICATE = false;
|
28
|
|
-let ITP_FORM_POMNG05010_DETAIL_IS_WRITING = false;
|
29
|
|
-
|
30
|
26
|
/*API URL*/
|
31
|
27
|
let API_DETAIL_GRID_LIST = '/api/pomng/inoutmng/deli-grid-list';// 목록
|
32
|
28
|
let API_DETAIL_INFO = '/api/pomng/inoutmng/info-inv'; // 상세
|
33
|
29
|
|
34
|
30
|
/*화면 Grid ColModel*/
|
35
|
31
|
const gridColModel = {
|
36
|
|
- list: [
|
37
|
|
-
|
|
32
|
+ list: [
|
|
33
|
+ {
|
|
34
|
+ index: 'Brand_ID', name: 'brandId', //서버로 전송시 데이터 명 , 데이터명
|
|
35
|
+ label: ITP_MSG_LOCALE.label.brandId, //브랜드아이디
|
|
36
|
+ width: '18', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
37
|
+ sortable: false, hidden: true //정렬가능 여부,화면표시 여부
|
|
38
|
+ },
|
|
39
|
+ {
|
|
40
|
+ index: 'Brand_Nm', name: 'brandNm', //정렬가능 여부,화면표시 여부
|
|
41
|
+ label: ITP_MSG_LOCALE.label.brandNm, //브랜드이름
|
|
42
|
+ width: '20', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
43
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
|
44
|
+ },
|
|
45
|
+ {
|
|
46
|
+ index: 'DLV_STTMT_NO', name: 'dlvSttmtUnqNo', //서버로 전송시 데이터 명 , 데이터명
|
|
47
|
+ label: ITP_MSG_LOCALE.label.dlvSttmtUnqNo, //납품서번호
|
|
48
|
+ width: '20', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
49
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
|
50
|
+ },
|
38
|
51
|
{
|
39
|
|
- index: 'Brand_Nm', name: 'brandNm',
|
40
|
|
- label: ITP_MSG_LOCALE.label.brandNm, //브랜드
|
41
|
|
- width: '8', fixed: false, align: 'center',
|
42
|
|
- sortable: false, hidden: false
|
|
52
|
+ index: 'DLV_ST_CD', name: 'dlvStCd', //서버로 전송시 데이터 명 , 데이터명
|
|
53
|
+ label: '납품상태', //납품서상태
|
|
54
|
+ width: '12', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
55
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
43
|
56
|
},
|
44
|
57
|
{
|
45
|
|
- index: 'DLV_STTMT_NO', name: 'dlvSttmtUnqNo',
|
46
|
|
- label: ITP_MSG_LOCALE.label.dlvSttmtUnqNo, //납품서번호
|
47
|
|
- width: '10', fixed: false, align: 'center',
|
48
|
|
- sortable: false, hidden: false
|
|
58
|
+ index: 'PODR_REG_DT', name: 'podrRegDt', //서버로 전송시 데이터 명 , 데이터명
|
|
59
|
+ label: '수주일자', //수주일자
|
|
60
|
+ width: '14', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
61
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
49
|
62
|
},
|
50
|
63
|
{
|
51
|
|
- index: 'poBsnsRegno', name: 'poBsnsRegno',
|
52
|
|
- label: ITP_MSG_LOCALE.label.poBsnsRegno, //발주번호
|
53
|
|
- width: '10', fixed: false, align: 'center',
|
54
|
|
- sortable: false, hidden: false
|
|
64
|
+ index: 'DLV_REQ_DT', name: 'dlvReqDt', //서버로 전송시 데이터 명 , 데이터명
|
|
65
|
+ label: ITP_MSG_LOCALE.label.dlvReqDt, //납품요청일
|
|
66
|
+ width: '14', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
67
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
55
|
68
|
},
|
56
|
69
|
{
|
57
|
|
- index: 'ITEM_CLASS_NM', name: 'SPPLY_NM',
|
58
|
|
- label: ITP_MSG_LOCALE.label.itemClassNm, //공급업체
|
59
|
|
- width: '10', fixed: false, align: 'center',
|
60
|
|
- sortable: false, hidden: false
|
|
70
|
+ index: 'DLV_SCH_DT', name: 'dlvSchDt', //서버로 전송시 데이터 명 , 데이터명
|
|
71
|
+ label: ITP_MSG_LOCALE.label.dlvSchDt, //납품예정일
|
|
72
|
+ width: '14', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
73
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
61
|
74
|
},
|
62
|
75
|
{
|
63
|
|
- index: 'ITEM_ST_CD', name: 'stCd',
|
64
|
|
- label: ITP_MSG_LOCALE.label.stNm, //납품서상태
|
65
|
|
- width: '6', fixed: false, align: 'center',
|
66
|
|
- sortable: false, hidden: true
|
|
76
|
+ index: 'DLV_CMPLT_DT', name: 'dlvCmpltDt', //서버로 전송시 데이터 명 , 데이터명
|
|
77
|
+ label: ITP_MSG_LOCALE.label.dlvCmpltDt, //납품완료일
|
|
78
|
+ width: '10', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
79
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
67
|
80
|
},
|
68
|
81
|
{
|
69
|
|
- index: 'PODR_PSSBLDVSN_NM', name: 'podrPssblDvsnNm',
|
70
|
|
- label: ITP_MSG_LOCALE.label.podrPssblDvsnNm, //발입고처
|
71
|
|
- width: '6', fixed: false, align: 'center',
|
72
|
|
- sortable: false, hidden: false
|
|
82
|
+ index: 'ITEM_ID', name: 'itemId', //서버로 전송시 데이터 명 , 데이터명
|
|
83
|
+ label: ITP_MSG_LOCALE.label.itemId, //품목번호
|
|
84
|
+ width: '11', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
85
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
73
|
86
|
},
|
74
|
87
|
{
|
75
|
|
- index: 'UNIT', name: 'unit',
|
76
|
|
- label: ITP_MSG_LOCALE.label.unit, //발주생성일
|
77
|
|
- width: '6', fixed: false, align: 'center',
|
78
|
|
- sortable: false, hidden: true
|
|
88
|
+ index: 'ITEM_NM', name: 'itemNm', //서버로 전송시 데이터 명 , 데이터명
|
|
89
|
+ label: ITP_MSG_LOCALE.label.itemNm, //품목명
|
|
90
|
+ width: '10', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
91
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
79
|
92
|
},
|
80
|
93
|
{
|
81
|
|
- index: 'PCH_ITEM_YN', name: 'pchItemYn',
|
82
|
|
- label: ITP_MSG_LOCALE.label.pchItemYn, //납품요청일
|
83
|
|
- width: '6', fixed: false, align: 'center',
|
84
|
|
- sortable: false, hidden: false
|
|
94
|
+ index: 'PODR_QTY', name: 'podrQty', //서버로 전송시 데이터 명 , 데이터명
|
|
95
|
+ label: ITP_MSG_LOCALE.label.podrQty, //수주수량
|
|
96
|
+ width: '6', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
97
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
85
|
98
|
},
|
86
|
99
|
{
|
87
|
|
- index: 'SALE_ITEM_YN', name: 'saleItemYn',
|
88
|
|
- label: ITP_MSG_LOCALE.label.saleItemYn, //납품생성일
|
89
|
|
- width: '10', fixed: false, align: 'center',
|
90
|
|
- sortable: false, hidden: false
|
|
100
|
+ index: 'DLV_QTY', name: 'dlvQty', //서버로 전송시 데이터 명 , 데이터명
|
|
101
|
+ label: ITP_MSG_LOCALE.label.dlvQty, //납품수량
|
|
102
|
+ width: '6', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
103
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
91
|
104
|
},
|
92
|
|
- ],
|
93
|
|
- detail: [
|
94
|
105
|
{
|
95
|
|
- index: 'VIEW_CD', name: 'viewCd',
|
96
|
|
- label: ITP_MSG_LOCALE.label.viewCd,
|
97
|
|
- width: '10', fixed: false, align: 'center',
|
98
|
|
- sortable: false, hidden: true
|
|
106
|
+ index: 'UNIT', name: 'unit', //서버로 전송시 데이터 명 , 데이터명
|
|
107
|
+ label: ITP_MSG_LOCALE.label.unit, //납품수량
|
|
108
|
+ width: '6', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
109
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
99
|
110
|
},
|
100
|
111
|
{
|
101
|
|
- index: 'AUTH_NO', name: 'authNo',
|
102
|
|
- label: ITP_MSG_LOCALE.label.permitCd,
|
103
|
|
- width: '20', fixed: false, align: 'center',
|
104
|
|
- sortable: false, editable: false, edittype: 'text',
|
105
|
|
- editrules: {required: true}
|
|
112
|
+ index: 'UNIT_AMT', name: 'unitAmt', //서버로 전송시 데이터 명 , 데이터명
|
|
113
|
+ label: ITP_MSG_LOCALE.label.unitAmt, //납품금액
|
|
114
|
+ width: '6', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
115
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
106
|
116
|
},
|
107
|
117
|
{
|
108
|
|
- index: 'AUTH_NM', name: 'authNm',
|
109
|
|
- label: ITP_MSG_LOCALE.label.permitName,
|
110
|
|
- width: '30', fixed: false, align: 'center',
|
111
|
|
- sortable: true, editable: false, edittype: 'text',
|
112
|
|
- editrules: {required: true}
|
|
118
|
+ index: 'WHS_NM', name: 'whsNm', //서버로 전송시 데이터 명 , 데이터명
|
|
119
|
+ label: ITP_MSG_LOCALE.label.whsNm, //납품장소
|
|
120
|
+ width: '6', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
121
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
113
|
122
|
},
|
114
|
123
|
{
|
115
|
|
- index: 'USE_YN_NM', name: 'useYnNm',
|
116
|
|
- label: ITP_MSG_LOCALE.label.status,
|
117
|
|
- width: '10', fixed: false, align: 'center',
|
118
|
|
- sortable: false, editable: false, edittype: 'text'
|
|
124
|
+ index: 'DLV_MGR_NM', name: 'dlvMgrNm', //서버로 전송시 데이터 명 , 데이터명
|
|
125
|
+ label: ITP_MSG_LOCALE.label.dlvMgrNm, //납품담당자
|
|
126
|
+ width: '8', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
127
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
119
|
128
|
},
|
120
|
129
|
{
|
121
|
|
- index: 'ADD_DT', name: 'addDt',
|
122
|
|
- label: ITP_MSG_LOCALE.label.regDt,
|
123
|
|
- width: '10', fixed: false, align: 'center',
|
124
|
|
- sortable: false, editable: false, edittype: 'text'
|
|
130
|
+ index: 'DLV_MGR_TEL_NO', name: 'dlvMgrTelNo', //서버로 전송시 데이터 명 , 데이터명
|
|
131
|
+ label: ITP_MSG_LOCALE.label.dlvMgrTelNo, //납품담당연락처
|
|
132
|
+ width: '10', fixed: false, align: 'center', // cell가로넓이,고정 여부 ,text정렬
|
|
133
|
+ sortable: false, hidden: false //정렬가능 여부,화면표시 여부
|
125
|
134
|
}
|
126
|
135
|
]
|
127
|
136
|
};
|
|
@@ -129,135 +138,52 @@ const gridColModel = {
|
129
|
138
|
/*화면공통 Object*/
|
130
|
139
|
let pageObj = {
|
131
|
140
|
init: function () {
|
132
|
|
- this.ui.init();
|
133
|
|
- this.event.init();
|
134
|
|
- this.fileUpload();
|
|
141
|
+ this.ui.init();
|
|
142
|
+ this.event.init();
|
135
|
143
|
},
|
136
|
144
|
ui: {
|
137
|
|
- init: function () {
|
138
|
|
- this.view();
|
139
|
|
- this.grid();
|
140
|
|
- this.ready();
|
141
|
|
- },
|
142
|
|
- view: function() {
|
143
|
|
- // 버튼 권한설정
|
144
|
|
- fn_proc_btn_auth('POMNG05010');
|
145
|
|
-
|
146
|
|
- // 공통코드 표시
|
147
|
|
- $('select').each(function() {
|
148
|
|
- if($(this).data('select-code')) {
|
149
|
|
- fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
|
150
|
|
- }
|
151
|
|
- });
|
|
145
|
+ init: function () {
|
|
146
|
+ this.view();
|
|
147
|
+ listObj.init();
|
|
148
|
+ },
|
|
149
|
+ view: function() {
|
|
150
|
+ // 버튼 권한설정
|
|
151
|
+ fn_proc_btn_auth('POMNG05010');
|
152
|
152
|
|
153
|
|
- itemClassLevel.make(1, 'LIST');
|
154
|
|
- },
|
155
|
|
- grid: function() {
|
156
|
|
- itp_fn_jqgrid_resize(POMNG05010_GRID_ID, POMNG05010_GRID_LIST, 'lg');
|
157
|
|
- listObj.empty.init();
|
158
|
|
- itp_fn_fire_window_resize();
|
159
|
|
- },
|
160
|
|
- ready: function() {
|
161
|
|
- listObj.init();
|
162
|
|
- }
|
|
153
|
+ // 공통코드 표시
|
|
154
|
+ $('select').each(function() {
|
|
155
|
+ if($(this).data('select-code')) {
|
|
156
|
+ fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
|
|
157
|
+ }
|
|
158
|
+ });
|
|
159
|
+ },
|
163
|
160
|
},
|
164
|
161
|
event: {
|
165
|
|
- init: function () {
|
166
|
|
- this.button();
|
167
|
|
- },
|
168
|
|
- button: function () {
|
169
|
|
- // 버튼 클릭 이벤트
|
170
|
|
- $('button').each(function() {
|
171
|
|
- var id = $(this).attr('id');
|
172
|
|
- $(this).on('click', function() {
|
173
|
|
- switch (id) {
|
174
|
|
- case 'ITP_BTN_POMNG05010_SRH' : listObj.button.search(); break; // 조회 버튼 클릭
|
175
|
|
- case 'ITP_BTN_POMNG05010_NEWREG' : listObj.button.create(); break; // 신규등록 버튼
|
176
|
|
- case 'ITP_BTN_POMNG05010_MODIFY' : modifyObj.button.modify(); break; // 수정 버튼
|
177
|
|
- case 'ITP_BTN_POMNG05010_CANCELLIST' : createObj.button.cancel(); break; // 취소/목록 버튼
|
178
|
|
- case 'ITP_BTN_POMNG05010_DELETE' : break; // 삭제 버튼
|
179
|
|
- case 'ITP_BTN_POMNG05010_SAVE' : createObj.button.save(); break; // 저장 버튼
|
180
|
|
- case 'ITP_FORM_POMNG05010_DETAIL_DUP' : createObj.button.duplicate(); break; // 중복체크
|
181
|
|
- case 'ITP_BTN_POMNG05010_RESET_PW' : createObj.button.resetPass(); break; // 상세:비밀번호 초기화
|
182
|
|
- }
|
183
|
|
- });
|
184
|
|
- });
|
185
|
|
-
|
186
|
|
- $('body').on('click', function(e) {
|
187
|
|
- var gridId = POMNG05010_DETAIL_GRID_ID.replace('#', '');
|
188
|
|
- var rids = $(POMNG05010_DETAIL_GRID_ID).jqGrid('getDataIDs');
|
189
|
|
- var last_row_id = rids[rids.length - 1];
|
190
|
|
- itp_fn_grid_reset_selection(e, last_row_id, gridId, 'POMNG05010_DETAIL');
|
191
|
|
- });
|
192
|
|
-
|
193
|
|
- }
|
194
|
|
- },
|
195
|
|
- fileUpload: function() {
|
196
|
|
- //파일업로드(등록/수정화면)
|
197
|
|
- var id = 'POMNG05010';
|
198
|
|
- $('#ITP_' + id + '_DETAIL_UPLOAD').empty();
|
199
|
|
- const fileArgs = {
|
200
|
|
- 'fileNo': $('#ITP_FORM_' + id + '_DETAIL_FILE_NO').val(),
|
201
|
|
- 'viewCd': $('#ITP_FORM_' + id + '_DETAIL_VIEW_CD').val(),
|
202
|
|
- 'showYn': $('#ITP_' + id + '_DETAIL_UPLOAD').attr('data-show-yn'),
|
203
|
|
- 'fileId': '#ITP_FORM_' + id + '_DETAIL_FILE_NO' //파일번호를 서버에서 받아서 넣을 파일번호 인풋박스 아이디
|
204
|
|
- };
|
205
|
|
- itp_fn_set_file_upload('ITP_' + id + '_DETAIL_UPLOAD', 'notice', true, false, id, fileArgs);
|
206
|
|
- },
|
207
|
|
- switchScreen: function(mode) {
|
208
|
|
- $('.itp_det_head').find('button[id^="ITP_BTN_POMNG05010_"]').each(function(i) {
|
209
|
|
- $(this).hide();
|
210
|
|
- });
|
211
|
|
- $('#ITP_TAB_POMNG05010').find('div[id$="_CONTAINER"]').each(function(i) {
|
212
|
|
- $(this).hide();
|
|
162
|
+ init: function () {
|
|
163
|
+ this.button();
|
|
164
|
+ },
|
|
165
|
+ button: function () {
|
|
166
|
+ // 버튼 클릭 이벤트
|
|
167
|
+ $('button').each(function() {
|
|
168
|
+ var id = $(this).attr('id');
|
|
169
|
+ $(this).on('click', function() {
|
|
170
|
+ switch (id) {
|
|
171
|
+ case 'ITP_BTN_POMNG05010_SRH' : listObj.button.search(); break; // 조회 버튼 클릭
|
|
172
|
+ case 'ITP_BTN_POMNG05010_NEWREG' : listObj.button.create(); break; // 신규등록 버튼
|
|
173
|
+ }
|
|
174
|
+ });
|
213
|
175
|
});
|
214
|
|
- if(mode == 'LIST') { // 목록
|
215
|
|
- $('#ITP_AJAX_POMNG05010_LIST_CONTAINER').show();
|
216
|
|
- fn_show_btn_auth_array(['#ITP_BTN_POMNG05010_SRH', '#ITP_BTN_POMNG05010_MODIFY']);
|
217
|
|
- } else if(mode == 'ADD') { // 등록
|
218
|
|
- $('#ITP_AJAX_POMNG05010_DETAIL_CONTAINER').show();
|
219
|
|
- fn_show_btn_auth_array(['#ITP_BTN_POMNG05010_CANCELLIST', '#ITP_BTN_POMNG05010_SAVE']);
|
220
|
|
-
|
221
|
|
- $('#ITP_FORM_POMNG05010_DETAIL').find('input, textarea, select, checkbox').each(function(i, elem) {
|
222
|
|
- $(this).attr('id') === 'ITP_FORM_POMNG05010_DETAIL_VIEW_CD' ? $(this).val('C') : $(this).val('');
|
223
|
|
- if(elem.type === 'select') {
|
224
|
|
- $(this).val('').prop('selected', true);
|
225
|
|
- }
|
226
|
|
- });
|
227
|
|
-
|
228
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_STORE_ID').removeAttr('readonly');
|
229
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_DUP').removeAttr('disabled');
|
230
|
|
-
|
231
|
|
- // 가맹점 정보 설정
|
232
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_AFFL_SHOP_ID').val(fn_make_user_info.get('afflShopId'));
|
233
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
|
234
|
|
- $('#ITP_FORM_POMNG05010_DETAIL .fnBrandNm').text(fn_make_user_info.get('brandNm'));
|
235
|
|
- $('#ITP_FORM_POMNG05010_DETAIL .fnItemClassMgntNo').text('(자동부여)');
|
236
|
|
- } else if(mode == 'MODIFY') { // 수정
|
237
|
|
- $('#ITP_AJAX_POMNG05010_DETAIL_CONTAINER').show();
|
238
|
|
- fn_show_btn_auth_array(['#ITP_BTN_POMNG05010_CANCELLIST', '#ITP_BTN_POMNG05010_SAVE', '#ITP_BTN_POMNG05010_RESET_PW']);
|
239
|
|
-
|
240
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_AFFL_SHOP_ID').val(fn_make_user_info.get('afflShopId'));
|
241
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
|
242
|
|
- $('#ITP_FORM_POMNG05010_DETAIL .fnBrandNm').text(fn_make_user_info.get('brandNm'));
|
243
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_STORE_ID').attr('readonly', true);
|
244
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_DUP').attr('disabled', true);
|
245
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_SEARCH_AFFL_SHOP_NM').attr('readonly', true);
|
246
|
|
-
|
247
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_SEARCH_AFFL_SHOP').hide();
|
248
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_DELETE_AFFL_SHOP').hide();
|
249
|
|
- } else if(mode == 'VIEW') { // 보기
|
250
|
|
- $('#ITP_AJAX_POMNG05010_VIEW_CONTAINER').show();
|
251
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnBrandNm').text(fn_make_user_info.get('brandNm'));
|
252
|
|
- fn_show_btn_auth_array(['#ITP_BTN_POMNG05010_MODIFY', '#ITP_BTN_POMNG05010_CANCELLIST']);
|
253
|
|
- }
|
|
176
|
+ }
|
|
177
|
+ },
|
|
178
|
+ screen: function() {
|
|
179
|
+ $('#ITP_FORM_POMNG05010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));//input hidden 값 넣기
|
|
180
|
+ $('#ITP_FORM_POMNG05010_SEARCH_DTL_GUBUN').val(('dtlGubun'));
|
254
|
181
|
}
|
255
|
182
|
};
|
256
|
183
|
|
257
|
184
|
/*목록화면 Object*/
|
258
|
185
|
let listObj = {
|
259
|
186
|
init: function () {
|
260
|
|
- this.form();
|
261
|
187
|
this.grid.init();
|
262
|
188
|
},
|
263
|
189
|
itp_POMNG05010_search: false,
|
|
@@ -271,21 +197,9 @@ let listObj = {
|
271
|
197
|
},
|
272
|
198
|
create: function() {
|
273
|
199
|
if(!fn_make_user_info.isEmpty()) {
|
274
|
|
- createObj.init();
|
275
|
200
|
}
|
276
|
201
|
}
|
277
|
202
|
},
|
278
|
|
- form: function() {
|
279
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_CLASS1').on('change', function() {
|
280
|
|
- ($(this).val() === '') ? itemClassLevel.clear(2): itemClassLevel.change(2);
|
281
|
|
- });
|
282
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_CLASS2').on('change', function() {
|
283
|
|
- ($(this).val() === '') ? itemClassLevel.clear(3): itemClassLevel.change(3);
|
284
|
|
- });
|
285
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_CLASS3').on('change', function() {
|
286
|
|
- ($(this).val() === '') ? itemClassLevel.clear(4): itemClassLevel.change(4);
|
287
|
|
- });
|
288
|
|
- },
|
289
|
203
|
empty: {
|
290
|
204
|
init: function() {
|
291
|
205
|
var _this = this;
|
|
@@ -304,13 +218,10 @@ let listObj = {
|
304
|
218
|
back: function() {
|
305
|
219
|
$('#ITP_FORM_POMNG05010_SERVICE_ST_CD').val(this.itp_POMNG05010_param.sitemStCd);
|
306
|
220
|
$('#ITP_FORM_POMNG05010_SEARCH_PODR_PSSBL_DVSN').val(this.itp_POMNG05010_param.spodrPssblDvsn);
|
307
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_KIND').val(this.itp_POMNG05010_param.sitemKind);
|
308
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_TYPE').val(this.itp_POMNG05010_param.sitemType);
|
309
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_CLASS1').val(this.itp_POMNG05010_param.sitemClass1);
|
310
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_CLASS2').val(this.itp_POMNG05010_param.sitemClass2);
|
311
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_CLASS3').val(this.itp_POMNG05010_param.sitemClass3);
|
312
|
|
- $('#ITP_FORM_POMNG05010_SEARCH_ITEM_CLASS4').val(this.itp_POMNG05010_param.sitemClass4);
|
|
221
|
+ $('#ITP_FORM_POMNG05010_SEARCH_SPPLY_NM').val(this.itp_POMNG05010_param.sspplyNm);
|
|
222
|
+ $('#ITP_FORM_POMNG05010_SEARCH_DLV_PLACE').val(this.itp_POMNG05010_param.sdlvPlace);
|
313
|
223
|
$('#ITP_FORM_POMNG05010_SEARCH_ITEM_NM').val(this.itp_POMNG05010_param.sitemNm);
|
|
224
|
+
|
314
|
225
|
}
|
315
|
226
|
},
|
316
|
227
|
grid: {
|
|
@@ -321,270 +232,30 @@ let listObj = {
|
321
|
232
|
},
|
322
|
233
|
colModel: gridColModel.list,
|
323
|
234
|
search: function() {
|
324
|
|
- pageObj.switchScreen('LIST');
|
325
|
|
- this.unload();
|
326
|
|
- this.load();
|
|
235
|
+ pageObj.screen();
|
|
236
|
+ this.load();
|
327
|
237
|
},
|
328
|
238
|
load: function() {
|
329
|
239
|
let param = $('#ITP_FORM_POMNG05010_SEARCH').serializeObject();
|
330
|
240
|
param.gridSize = $.jgrid.defaults.rowNum;
|
331
|
241
|
param.sbrandId = fn_make_user_info.get('brandId');
|
332
|
|
- // param.sbrandId = sessionStorage.getItem('itp_brand_id') !== null ? sessionStorage.getItem('itp_brand_id') : 'BRD221000001';
|
333
|
242
|
|
334
|
243
|
var option = {
|
335
|
244
|
gridId: POMNG05010_GRID_ID,
|
336
|
245
|
colModel: gridColModel.list,
|
337
|
|
- param: JSON.stringify(param),
|
|
246
|
+ param: param,
|
338
|
247
|
url: DOMAIN + API_DETAIL_GRID_LIST,
|
339
|
248
|
pager: POMNG05010_GRID_PAGER,
|
340
|
|
- onCellSelect: function(rowId, cellIdx, cellValue) {
|
341
|
|
- var cm = $(this).jqGrid('getGridParam', 'colModel');
|
342
|
|
- var colNm = cm[cellIdx].name;
|
343
|
|
- if (colNm == 'itemId') {
|
344
|
|
- const selectVal = $(this).jqGrid('getCell', rowId, 'itemId');
|
345
|
|
- const key = {brandId:fn_make_user_info.get('brandId'), itemId: selectVal, viewCd: 'R'};
|
346
|
|
- var param = $.param(key);
|
347
|
|
- viewObj.init(param);
|
348
|
|
- }
|
349
|
|
- },
|
|
249
|
+ multiselect: true,
|
350
|
250
|
loadComplete: function(data) {
|
351
|
|
- console.log(data);
|
352
|
251
|
itp_fn_grid_load_complete(data, POMNG05010_GRID_ID, true, 'number', 'POMNG05010', listObj.itp_POMNG05010_search, listObj.empty, true, data.gridRecords, true);
|
353
|
|
- var ids = $(POMNG05010_GRID_ID).getDataIDs();
|
354
|
|
- $.each(ids, function(idx, rowId) {
|
355
|
|
- $(POMNG05010_GRID_ID).jqGrid('setCell', rowId, 'itemId', '', ITP_GRID_COL_STYLE.link);
|
356
|
|
- });
|
357
|
252
|
},
|
358
|
253
|
onPaging: function(action) {
|
359
|
254
|
itp_fn_grid_paging(POMNG05010_GRID_ID, action, param);
|
360
|
255
|
}
|
361
|
256
|
};
|
362
|
257
|
itp_fn_grid_make_remote(option);
|
363
|
|
- },
|
364
|
|
- clearData : function() {
|
365
|
|
- $(POMNG05010_GRID_ID).jqGrid('clearGridData', true);
|
366
|
|
- $(POMNG05010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
|
367
|
|
- $(POMNG05010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
|
368
|
|
- $(POMNG05010_GRID_EMPTY).show();
|
369
|
|
- },
|
370
|
|
- unload : function() {
|
371
|
|
- $.jgrid.gridUnload(POMNG05010_GRID_ID);
|
372
|
|
- }
|
373
|
|
- }
|
374
|
|
-};
|
375
|
|
-
|
376
|
|
-/*상세화면 Object*/
|
377
|
|
-let viewObj = {
|
378
|
|
- init: function (param) {
|
379
|
|
- this.load(param);
|
380
|
|
- },
|
381
|
|
- load: function(param) {
|
382
|
|
- fn_ajax_call(API_DETAIL_INFO, param, this.callback, 'GET');
|
383
|
|
- },
|
384
|
|
- callback: function (result) {
|
385
|
|
- console.log(result);
|
386
|
|
- pageObj.switchScreen('VIEW');
|
387
|
|
- $('#ITP_FORM_POMNG05010_VIEW #ITP_FORM_POMNG05010_VIEW_ITEM_ID').val(result.itemId);
|
388
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnStCd').text(result.itemStCd);
|
389
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemClass1').text(result.itemClass1);
|
390
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemClass2').text(result.itemClass2);
|
391
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemClass3').text(result.itemClass3);
|
392
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemClass4').text(result.itemClass4);
|
393
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemClassMgntNo').text(result.itemClassMgntNo);
|
394
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemId').text(result.itemId);
|
395
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemTypeNm').text(result.itemTypeNm);
|
396
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemNm').text(result.itemClassNm);
|
397
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnImpDvsnNm').text(result.impDvsnNm);
|
398
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnPodrPssblDvsn').text(result.podrPssblDvsnNm);
|
399
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnUnit').text(result.unit);
|
400
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnWeightUnit').text(result.weightUnit);
|
401
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnVolumeUnit').text(result.volumeUnit);
|
402
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnWidthUnit').text(result.widthUnit);
|
403
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnHeightUnit').text(result.heightUnit);
|
404
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnHighUnit').text(result.highUnit);
|
405
|
|
-
|
406
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnPchItemYn').text(result.pchItemYn);
|
407
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnViewPchUnit').text(result.pchUnit);
|
408
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnSaleItemYn').text(result.saleItemYn);
|
409
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnSaleUnit').text(result.saleUnit);
|
410
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnAssetInfo').text(result.assetInfo);
|
411
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnStckUnit').text(result.stckUnit);
|
412
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnWeight').text(result.weight);
|
413
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnVolume').text(result.volume);
|
414
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnWidth').text(result.width);
|
415
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnHeight').text(result.height);
|
416
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnHigh').text(result.high);
|
417
|
|
-
|
418
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnOneBoxQty').text(result.oneBoxQty);
|
419
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnExpryYn').text(result.expryYn);
|
420
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnExpryPeriod').text(result.expryPeriod);
|
421
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnRtnPssblYn').text(result.rtnPssblYn);
|
422
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnRtnDvsn').text(result.rtnDvsnNm);
|
423
|
|
- // $('#ITP_FORM_POMNG05010_VIEW .fnItemImage').text(result.imageFileNoList);
|
424
|
|
- $.each(result.imageFileNoList, function(index, item) {
|
425
|
|
- $('#ITP_FORM_POMNG05010_VIEW .fnItemImage').append('<img src=" + item.filePath +" />');
|
426
|
|
- });
|
427
|
|
- }
|
428
|
|
-};
|
429
|
|
-
|
430
|
|
-/*수정화면 Object*/
|
431
|
|
-let modifyObj = {
|
432
|
|
- init: function () {
|
433
|
|
- },
|
434
|
|
- button: {
|
435
|
|
- modify: function (param) {
|
436
|
|
- itp_fn_form_clear_validate(null, '#ITP_FORM_POMNG05010_DETAIL');
|
437
|
|
- const selectVal = $('#ITP_FORM_POMNG05010_VIEW_ITEM_ID').val();
|
438
|
|
- const key = {brandId:fn_make_user_info.get('brandId'), itemId: selectVal, viewCd: 'R'};
|
439
|
|
- var param = $.param(key);
|
440
|
|
- modifyObj.load(param);
|
441
|
258
|
}
|
442
|
|
- },
|
443
|
|
- load: function(param) {
|
444
|
|
- fn_ajax_call(API_DETAIL_INFO, param, this.callback, 'GET');
|
445
|
|
- },
|
446
|
|
- callback: function (result) {
|
447
|
|
- console.log(result);
|
448
|
|
- pageObj.switchScreen('MODIFY');
|
449
|
|
-
|
450
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_VIEW_CD').val('U');
|
451
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_ITEM_ID').val(result.itemId);
|
452
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_STORE_ST_CD').val(result.itemStCd);
|
453
|
|
- $('#ITP_FORM_POMNG05010_DETAIL .fnItemClassMgntNo').text(result.itemId);
|
454
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_ITEM_TYPE').val(result.itemType);
|
455
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_ITEM_NM').val(result.itemClassNm);
|
456
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_IMP_DVSN').val(result.impDvsn);
|
457
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_PODR_PSSBL_DVSN').val(result.podrPssblDvsn);
|
458
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_UNIT').val(result.unit);
|
459
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_PCH_ITEM_YN').val(result.pchItemYn);
|
460
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_PCH_UNIT').val(result.pchUnit);
|
461
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_SALE_ITEM_YN').val(result.saleItemYn);
|
462
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_SALE_UNIT').val(result.saleUnit);
|
463
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_ASSET_INFO').val(result.assetInfo);
|
464
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_STCK_UNIT').val(result.stckUnit);
|
465
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_WEIGHT').val(result.weight);
|
466
|
|
- $('#ITP_FORM_POMNG05010_DETAIL .item_unit').text(result.unit);
|
467
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_VOLUME').val(result.volume);
|
468
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_WIDTH').val(result.width);
|
469
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_HEIGHT').val(result.height);
|
470
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_HIGH').val(result.high);
|
471
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_ONE_BOX_QTY').val(result.oneBoxQty);
|
472
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_EXPRY_YN').val(result.expryYn);
|
473
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_EXPRY_PERIOD').val(result.expryPeriod);
|
474
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_RTN_PSSBL_YN').val(result.rtnPssblYn);
|
475
|
|
- $('#ITP_FORM_POMNG05010_DETAIL #ITP_FORM_POMNG05010_DETAIL_RTN_DVSN').val(result.rtnDvsn);
|
476
|
|
- $.each(result.imageFileNoList, function(index, item) {
|
477
|
|
- $('#ITP_FORM_POMNG05010_VIEW .ITEM_IMAGE').append('<img src=" + item.filePath +" />');
|
478
|
|
- });
|
479
|
|
-
|
480
|
|
- itemClassLevel.data.push(result.itemClass1);
|
481
|
|
- itemClassLevel.data.push(result.itemClass2);
|
482
|
|
- itemClassLevel.data.push(result.itemClass3);
|
483
|
|
- itemClassLevel.data.push(result.itemClass4);
|
484
|
|
- itemClassLevel.make(1, 'MODIFY');
|
485
|
259
|
}
|
486
|
260
|
};
|
487
|
261
|
|
488
|
|
-/*신규화면 Object*/
|
489
|
|
-let createObj = {
|
490
|
|
- init: function () {
|
491
|
|
- pageObj.switchScreen('ADD');
|
492
|
|
- itp_fn_form_clear_validate(null, '#ITP_FORM_POMNG05010_DETAIL');
|
493
|
|
- this.button.init();
|
494
|
|
- itemClassLevel.make(1, 'ADD');
|
495
|
|
- },
|
496
|
|
- button: {
|
497
|
|
- init: function() {
|
498
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_ITEM_CLASS1').off('change').on('change', function() {
|
499
|
|
- ($(this).val() === '') ? itemClassLevel.clear(2): itemClassLevel.change(2);
|
500
|
|
- });
|
501
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_ITEM_CLASS2').off('change').on('change', function() {
|
502
|
|
- ($(this).val() === '') ? itemClassLevel.clear(3): itemClassLevel.change(3);
|
503
|
|
- });
|
504
|
|
- $('#ITP_FORM_POMNG05010_DETAIL_ITEM_CLASS3').off('change').on('change', function() {
|
505
|
|
- ($(this).val() === '') ? itemClassLevel.clear(4): itemClassLevel.change(4);
|
506
|
|
- });
|
507
|
|
- },
|
508
|
|
- cancel: function() {
|
509
|
|
- listObj.grid.search();
|
510
|
|
- },
|
511
|
|
- save: function() {
|
512
|
|
- const formId = '#ITP_FORM_POMNG05010_DETAIL';
|
513
|
|
- itp_fn_form_clear_validate(null, formId);
|
514
|
|
- if (createObj.isValid(formId)) {
|
515
|
|
- let param = $(formId).serializeObject();
|
516
|
|
- console.log(JSON.stringify(param));
|
517
|
|
- var searhFn = function() {
|
518
|
|
- ITP_FORM_POMNG05010_DETAIL_IS_WRITING = false;
|
519
|
|
- listObj.grid.search();
|
520
|
|
- };
|
521
|
|
- fn_ajax_call(API_DETAIL_SAVE, JSON.stringify(param), searhFn, 'POST');
|
522
|
|
- }
|
523
|
|
- }
|
524
|
|
- },
|
525
|
|
- isValid: function(formId) {
|
526
|
|
- var isValid = false;
|
527
|
|
- $(formId).find('input, select, checkbox, textarea').each(function(k) {
|
528
|
|
- if($(this).data('check-required')) {
|
529
|
|
- var arry = $(this).data('check-required').split(',');
|
530
|
|
- isValid = itp_fn_form_validate(formId, '#' + $(this).attr('id'), arry, undefined);
|
531
|
|
- if(!isValid) return false;
|
532
|
|
- }
|
533
|
|
- });
|
534
|
|
- return isValid;
|
535
|
|
- }
|
536
|
|
-};
|
537
|
|
-
|
538
|
|
-var itemClassLevel = {
|
539
|
|
- level: 1,
|
540
|
|
- levelID: '',
|
541
|
|
- data: [],
|
542
|
|
- keys: function() {
|
543
|
|
- var keys = {sBrandId:fn_make_user_info.get('brandId'), sItemLevel: this.level};
|
544
|
|
- for(var i=1; i<=this.level; i++) {
|
545
|
|
- var key = 'sItemClass' + i;
|
546
|
|
- var id = '#' + this.levelID + i;
|
547
|
|
- keys[key] = $(id + ' option:selected').val();
|
548
|
|
- }
|
549
|
|
- return keys;
|
550
|
|
- },
|
551
|
|
- make: function(level, mode) {
|
552
|
|
- this.level = level;
|
553
|
|
- this.levelID = (mode === 'LIST' ? 'ITP_FORM_POMNG05010_SEARCH_ITEM_CLASS' : 'ITP_FORM_POMNG05010_DETAIL_ITEM_CLASS');
|
554
|
|
- if(mode !== 'MODIFY') {
|
555
|
|
- this.data.length = 0;
|
556
|
|
- this.clear(1);
|
557
|
|
- }
|
558
|
|
- this.call($.param(this.keys()), mode === 'MODIFY');
|
559
|
|
- },
|
560
|
|
- change: function(level) {
|
561
|
|
- this.level = level;
|
562
|
|
- this.clear(level);
|
563
|
|
- this.call($.param(this.keys()), false);
|
564
|
|
- },
|
565
|
|
- call: function(param, isModify) {
|
566
|
|
- var _this = this;
|
567
|
|
- var callbackFn = function(result) {
|
568
|
|
- var id = _this.levelID + _this.level;
|
569
|
|
- fn_make_select_item_class(result.searchList, id, true, _this.emptyText());
|
570
|
|
- if(isModify) {
|
571
|
|
- $('#' + id).val(_this.data[ _this.level - 1]);
|
572
|
|
- if(_this.level < _this.data.length) {
|
573
|
|
- if(_this.data[_this.level] !== '') {
|
574
|
|
- _this.level++;
|
575
|
|
- _this.call( $.param(_this.keys()), isModify);
|
576
|
|
- }
|
577
|
|
- }
|
578
|
|
- }
|
579
|
|
- };
|
580
|
|
- fn_ajax_call(API_ITEM_CLASS_LEVEL, param, callbackFn, 'GET');
|
581
|
|
- },
|
582
|
|
- emptyText: function() {
|
583
|
|
- return '품목분류Level' + this.level;
|
584
|
|
- },
|
585
|
|
- clear: function(level) {
|
586
|
|
- for(var i=level; i<5; i++) {
|
587
|
|
- $('#' + (this.levelID + i)).find('option:not(:first)').remove();
|
588
|
|
- }
|
589
|
|
- }
|
590
|
|
-};
|