Browse Source

모바일 공급업체관리 목록선택 수정

juney 2 years ago
parent
commit
369c7730bd

+ 0 - 3
src/main/webapp/mobile/app/mcollmng/MCOLLMNG01010.html

@@ -53,9 +53,6 @@
53
 			  <ul id="ITP_LIST_MCOLLMNG01010_LIST_ITEM_ROWS" class="panel-group"></ul>
53
 			  <ul id="ITP_LIST_MCOLLMNG01010_LIST_ITEM_ROWS" class="panel-group"></ul>
54
 			  <div id="ITP_LIST_MCOLLMNG01010_LIST_ITEM_ROWCOPY" style="display:none;">
54
 			  <div id="ITP_LIST_MCOLLMNG01010_LIST_ITEM_ROWCOPY" style="display:none;">
55
 				<li class="history_list list-row">
55
 				<li class="history_list list-row">
56
-				  <div class="scroll_btn">
57
-			  		<input type="checkbox">
58
-			  	  </div>
59
 				  <div class="btn_check">
56
 				  <div class="btn_check">
60
 					<div class="left">
57
 					<div class="left">
61
 					  <div class="nomal">
58
 					  <div class="nomal">

+ 1 - 1
src/main/webapp/mobile/app/mcollmng/MCOLLMNG02010.html

@@ -46,7 +46,7 @@
46
 			  <div id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_ROWCOPY" style="display: block;">
46
 			  <div id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_ROWCOPY" style="display: block;">
47
 				<li class="history_list3 list-row">
47
 				<li class="history_list3 list-row">
48
 				  <div class="scroll_btn">
48
 				  <div class="scroll_btn">
49
-			  		<input type="checkbox">
49
+			  		<input type="checkbox" id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_CHECKBOX">
50
 			  	  </div>
50
 			  	  </div>
51
 				  <div class="btn_check">
51
 				  <div class="btn_check">
52
 					<div class="left">
52
 					<div class="left">

+ 1 - 1
src/main/webapp/mobile/app/mcollmng/MCOLLMNG03010.html

@@ -47,7 +47,7 @@
47
 			  <div id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_ROWCOPY" style="display: block;">
47
 			  <div id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_ROWCOPY" style="display: block;">
48
 				<li class="history_list3 list-row">
48
 				<li class="history_list3 list-row">
49
 				  <div class="scroll_btn">
49
 				  <div class="scroll_btn">
50
-			  		<input type="checkbox">
50
+			  		<input type="checkbox" id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_CHECKBOX">
51
 			  	  </div>
51
 			  	  </div>
52
 				  <div class="btn_check">
52
 				  <div class="btn_check">
53
 					<div class="left">
53
 					<div class="left">

+ 0 - 3
src/main/webapp/mobile/app/mordmng/MORDMNG01010.html

@@ -55,9 +55,6 @@
55
 			  <ul id="ITP_LIST_MORDMNG01010_LIST_ITEM_ROWS" class="panel-group"></ul>
55
 			  <ul id="ITP_LIST_MORDMNG01010_LIST_ITEM_ROWS" class="panel-group"></ul>
56
 			  <div id="ITP_LIST_MORDMNG01010_LIST_ITEM_ROWCOPY" style="display: none;">
56
 			  <div id="ITP_LIST_MORDMNG01010_LIST_ITEM_ROWCOPY" style="display: none;">
57
 				<li class="history_list list-row">
57
 				<li class="history_list list-row">
58
-				  <div class="scroll_btn">
59
-			  		<input type="checkbox">
60
-			  	  </div>
61
 				  <div class="btn_check">
58
 				  <div class="btn_check">
62
 					<div class="left">
59
 					<div class="left">
63
 					  <div class="nomal">
60
 					  <div class="nomal">

+ 2 - 2
src/main/webapp/mobile/app/mordmng/MORDMNG02010.html

@@ -49,10 +49,10 @@
49
 		  </div>
49
 		  </div>
50
 		   <div id="ITP_LIST_MORDMNG02010_LIST_ITEM_AREA" class="scroll_area row-2">
50
 		   <div id="ITP_LIST_MORDMNG02010_LIST_ITEM_AREA" class="scroll_area row-2">
51
 			  <ul id="ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS" class="panel-group"></ul>
51
 			  <ul id="ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS" class="panel-group"></ul>
52
-			  <div id="ITP_LIST_MORDMNG02010_LIST_ITEM_ROWCOPY" style="display: block;">
52
+			  <div id="ITP_LIST_MORDMNG02010_LIST_ITEM_ROWCOPY" style="display: none;">
53
 				<li class="history_list3 list-row">
53
 				<li class="history_list3 list-row">
54
 			 	  <div class="scroll_btn">
54
 			 	  <div class="scroll_btn">
55
-				  	<input type="checkbox">
55
+				  	<input type="checkbox" id="ITP_LIST_MORDMNG02010_LIST_ITEM_CHECKBOX">
56
 				  </div>
56
 				  </div>
57
 				  <div class="btn_check">
57
 				  <div class="btn_check">
58
 					<div class="left">
58
 					<div class="left">

+ 1 - 1
src/main/webapp/mobile/app/mordmng/MORDMNG03010.html

@@ -46,7 +46,7 @@
46
 				<div id="ITP_LIST_MORDMNG03010_LIST_ITEM_ROWCOPY" style="display:none;">
46
 				<div id="ITP_LIST_MORDMNG03010_LIST_ITEM_ROWCOPY" style="display:none;">
47
 					<li class="history_list3 list-row">
47
 					<li class="history_list3 list-row">
48
 					<div class="scroll_btn">
48
 					<div class="scroll_btn">
49
-				  		<input type="checkbox">
49
+				  		<input type="checkbox" id="ITP_LIST_MORDMNG03010_LIST_ITEM_CHECKBOX">
50
 				  	</div>
50
 				  	</div>
51
 						<div class="btn_check">
51
 						<div class="btn_check">
52
 							<div class="left">
52
 							<div class="left">

+ 18 - 7
src/main/webapp/mobile/js/app/mcollmng/ITP_MCOLLMNG02010.js

@@ -69,9 +69,15 @@ let mobPageObj = {
69
 				return false;
69
 				return false;
70
 			});
70
 			});
71
 
71
 
72
-			$(document).on('click', '#ITP_LIST_MCOLLMNG02010_LIST_ITEM_ROWS li button', function() {
73
-				var item = mobContentObj.list.rows[$(this).index()];
74
-				mobContentObj.view.init(item);
72
+			// $(document).on('click', '#ITP_LIST_MCOLLMNG02010_LIST_ITEM_ROWS li button', function() {
73
+			// 	var item = mobContentObj.list.rows[$(this).index()];
74
+			// 	mobContentObj.view.init(item);
75
+			// });
76
+			$(document).on('click', 'input[type="checkbox"][id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_CHECKBOX"]', function() {
77
+				if($(this).prop('checked')) {
78
+					$('input[type="checkbox"][id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_CHECKBOX"]').prop('checked', false);
79
+					$(this).prop('checked', true);
80
+				}
75
 			});
81
 			});
76
 
82
 
77
 			$(document).on('click', '#ITP_LIST_MCOLLMNG02010_POP_WHS_ROWS li button', function() {
83
 			$(document).on('click', '#ITP_LIST_MCOLLMNG02010_POP_WHS_ROWS li button', function() {
@@ -120,7 +126,6 @@ let mobContentObj = {
120
 		totPage: 0,
126
 		totPage: 0,
121
 		isSearch: false,
127
 		isSearch: false,
122
 		rows: [],
128
 		rows: [],
123
-		iChoice: -1,
124
 		init: function() {
129
 		init: function() {
125
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
130
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
126
 			this.search();
131
 			this.search();
@@ -129,7 +134,6 @@ let mobContentObj = {
129
 			this.listPage = 0;
134
 			this.listPage = 0;
130
 			this.totPage = 0;
135
 			this.totPage = 0;
131
 			this.rows.length = 0;
136
 			this.rows.length = 0;
132
-			this.iChoice = -1;
133
 			$('#ITP_LIST_MCOLLMNG02010_LIST_ITEM_ROWS').empty();
137
 			$('#ITP_LIST_MCOLLMNG02010_LIST_ITEM_ROWS').empty();
134
 			this.load();
138
 			this.load();
135
 		},
139
 		},
@@ -166,11 +170,18 @@ let mobContentObj = {
166
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
170
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
167
 		},
171
 		},
168
 		colPrint: function() {
172
 		colPrint: function() {
169
-			if(this.iChoice < 0) {
173
+			var iChoice = -1;
174
+			$('input[type="checkbox"][id="ITP_LIST_MCOLLMNG02010_LIST_ITEM_CHECKBOX"]').each(function(index) {
175
+				if($(this).is(":checked")) {
176
+					iChoice = index;
177
+					return false;
178
+				}
179
+			});
180
+			if(iChoice === -1) {
170
 				alert("수거서를 선택해주세요 (대표 수거서번호)");
181
 				alert("수거서를 선택해주세요 (대표 수거서번호)");
171
 				return;
182
 				return;
172
 			}
183
 			}
173
-			mobContentObj.view.init(this.rows[this.iChoice]);
184
+			mobContentObj.view.init(this.rows[iChoice]);
174
 		}
185
 		}
175
 	},
186
 	},
176
 	view: {
187
 	view: {

+ 18 - 9
src/main/webapp/mobile/js/app/mcollmng/ITP_MCOLLMNG03010.js

@@ -63,15 +63,19 @@ let mobPageObj = {
63
 				var id = $(this).attr('id');
63
 				var id = $(this).attr('id');
64
 				switch (id) {
64
 				switch (id) {
65
 					case 'ITP_BTN_MCOLLMNG03010_VIEW_ADD'			: mobContentObj.view.add();	break;
65
 					case 'ITP_BTN_MCOLLMNG03010_VIEW_ADD'			: mobContentObj.view.add();	break;
66
-					case 'ITP_BTN_MCOLLMNG03010_VIEW_CANCEL_LIST'	: mobContentObj.view.cancel();	break;
66
+					case 'ITP_BTN_MCOLLMNG03010_VIEW_CONFIRM'		: mobContentObj.view.cancel();	break;
67
 				}
67
 				}
68
 				return false;
68
 				return false;
69
 			});
69
 			});
70
 
70
 
71
-			$(document).on('click', '#ITP_LIST_MCOLLMNG03010_LIST_ITEM_ROWS li', function() {
72
-				// var item = mobContentObj.list.rows[$(this).index()];
73
-				// mobContentObj.view.init(item);
74
-				mobContentObj.list.iChoice = $(this).index();
71
+			// $(document).on('click', '#ITP_LIST_MCOLLMNG03010_LIST_ITEM_ROWS li', function() {
72
+			// 	mobContentObj.list.iChoice = $(this).index();
73
+			// });
74
+			$(document).on('click', 'input[type="checkbox"][id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_CHECKBOX"]', function() {
75
+				if($(this).prop('checked')) {
76
+					$('input[type="checkbox"][id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_CHECKBOX"]').prop('checked', false);
77
+					$(this).prop('checked', true);
78
+				}
75
 			});
79
 			});
76
 
80
 
77
 			$(document).on('click', '#ITP_LIST_MCOLLMNG03010_POP_WHS_ROWS li button', function() {
81
 			$(document).on('click', '#ITP_LIST_MCOLLMNG03010_POP_WHS_ROWS li button', function() {
@@ -120,7 +124,6 @@ let mobContentObj = {
120
 		totPage: 0,
124
 		totPage: 0,
121
 		isSearch: false,
125
 		isSearch: false,
122
 		rows: [],
126
 		rows: [],
123
-		iChoice: -1,
124
 		init: function() {
127
 		init: function() {
125
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
128
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
126
 			this.search();
129
 			this.search();
@@ -129,7 +132,6 @@ let mobContentObj = {
129
 			this.listPage = 0;
132
 			this.listPage = 0;
130
 			this.totPage = 0;
133
 			this.totPage = 0;
131
 			this.rows.length = 0;
134
 			this.rows.length = 0;
132
-			this.iChoice = -1;
133
 			$('#ITP_LIST_MCOLLMNG03010_LIST_ITEM_ROWS').empty();
135
 			$('#ITP_LIST_MCOLLMNG03010_LIST_ITEM_ROWS').empty();
134
 			this.load();
136
 			this.load();
135
 		},
137
 		},
@@ -165,11 +167,18 @@ let mobContentObj = {
165
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
167
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
166
 		},
168
 		},
167
 		colPrint: function() {
169
 		colPrint: function() {
168
-			if(this.iChoice < 0) {
170
+			var iChoice = -1;
171
+			$('input[type="checkbox"][id="ITP_LIST_MCOLLMNG03010_LIST_ITEM_CHECKBOX"]').each(function(index) {
172
+				if($(this).is(":checked")) {
173
+					iChoice = index;
174
+					return false;
175
+				}
176
+			});
177
+			if(iChoice === -1) {
169
 				alert("수거서를 선택해주세요 (대표 수거서번호)");
178
 				alert("수거서를 선택해주세요 (대표 수거서번호)");
170
 				return;
179
 				return;
171
 			}
180
 			}
172
-			mobContentObj.view.init(this.rows[this.iChoice]);
181
+			mobContentObj.view.init(this.rows[iChoice]);
173
 		}
182
 		}
174
 	},
183
 	},
175
 	view: {
184
 	view: {

+ 17 - 8
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG02010.js

@@ -74,10 +74,14 @@ let mobPageObj = {
74
 				return false;
74
 				return false;
75
 			});
75
 			});
76
 
76
 
77
-			$(document).on('click', '#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS li', function() {
78
-				// var item = mobContentObj.list.rows[$(this).index()];
79
-				// mobContentObj.view.init(item);
80
-				mobContentObj.list.iChoice = $(this).index();
77
+			// $(document).on('click', '#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS li', function() {
78
+			// 	mobContentObj.list.iChoice = $(this).index();
79
+			// });
80
+			$(document).on('click', 'input[type="checkbox"][id="ITP_LIST_MORDMNG02010_LIST_ITEM_CHECKBOX"]', function() {
81
+				if($(this).prop('checked')) {
82
+					$('input[type="checkbox"][id="ITP_LIST_MORDMNG02010_LIST_ITEM_CHECKBOX"]').prop('checked', false);
83
+					$(this).prop('checked', true);
84
+				}
81
 			});
85
 			});
82
 
86
 
83
 			$(document).on('click', '#ITP_LIST_MORDMNG02010_POP_WHS_ROWS li button', function() {
87
 			$(document).on('click', '#ITP_LIST_MORDMNG02010_POP_WHS_ROWS li button', function() {
@@ -126,7 +130,6 @@ let mobContentObj = {
126
 		totPage: 0,
130
 		totPage: 0,
127
 		isSearch: false,
131
 		isSearch: false,
128
 		rows: [],
132
 		rows: [],
129
-		iChoice: -1,
130
 		init: function() {
133
 		init: function() {
131
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
134
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
132
 			this.search();
135
 			this.search();
@@ -135,7 +138,6 @@ let mobContentObj = {
135
 			this.listPage = 0;
138
 			this.listPage = 0;
136
 			this.totPage = 0;
139
 			this.totPage = 0;
137
 			this.rows.length = 0;
140
 			this.rows.length = 0;
138
-			this.iChoice = -1;
139
 			$('#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS').empty();
141
 			$('#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS').empty();
140
 			this.load();
142
 			this.load();
141
 		},
143
 		},
@@ -172,11 +174,18 @@ let mobContentObj = {
172
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
174
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
173
 		},
175
 		},
174
 		dlvPrint: function() {
176
 		dlvPrint: function() {
175
-			if(this.iChoice < 0) {
177
+			var iChoice = -1;
178
+			$('input[type="checkbox"][id="ITP_LIST_MORDMNG02010_LIST_ITEM_CHECKBOX"]').each(function(index) {
179
+				if($(this).is(":checked")) {
180
+					iChoice = index;
181
+					return false;
182
+				}
183
+			});
184
+			if(iChoice ===  -1) {
176
 				alert("납품서를 선택해주세요 (대표 납품서번호)");
185
 				alert("납품서를 선택해주세요 (대표 납품서번호)");
177
 				return;
186
 				return;
178
 			}
187
 			}
179
-			mobContentObj.view.init(this.rows[this.iChoice]);
188
+			mobContentObj.view.init(this.rows[iChoice]);
180
 		}
189
 		}
181
 	},
190
 	},
182
 	view: {
191
 	view: {

+ 17 - 9
src/main/webapp/mobile/js/app/mordmng/ITP_MORDMNG03010.js

@@ -68,10 +68,14 @@ let mobPageObj = {
68
 				return false;
68
 				return false;
69
 			});
69
 			});
70
 
70
 
71
-			$(document).on('click', '#ITP_LIST_MORDMNG03010_LIST_ITEM_ROWS li', function() {
72
-				// var item = mobContentObj.list.rows[$(this).index()];
73
-				// mobContentObj.view.init(item);
74
-				mobContentObj.list.iChoice = $(this).index();
71
+			// $(document).on('click', '#ITP_LIST_MORDMNG03010_LIST_ITEM_ROWS li', function() {
72
+			// 	mobContentObj.list.iChoice = $(this).index();
73
+			// });
74
+			$(document).on('click', 'input[type="checkbox"][id="ITP_LIST_MORDMNG03010_LIST_ITEM_CHECKBOX"]', function() {
75
+				if($(this).prop('checked')) {
76
+					$('input[type="checkbox"][id="ITP_LIST_MORDMNG03010_LIST_ITEM_CHECKBOX"]').prop('checked', false);
77
+					$(this).prop('checked', true);
78
+				}
75
 			});
79
 			});
76
 
80
 
77
 			$(document).on('click', '#ITP_LIST_MORDMNG03010_POP_WHS_ROWS li button', function() {
81
 			$(document).on('click', '#ITP_LIST_MORDMNG03010_POP_WHS_ROWS li button', function() {
@@ -83,7 +87,6 @@ let mobPageObj = {
83
 		$('#ITP_MOBILE_MORDMNG03010').find('div[id$="_CONTAINER"]').each(function(i) {
87
 		$('#ITP_MOBILE_MORDMNG03010').find('div[id$="_CONTAINER"]').each(function(i) {
84
 			$(this).hide();
88
 			$(this).hide();
85
 		});
89
 		});
86
-		console.log(mode);
87
 		if(mode === PAGE_MODE_LIST) {
90
 		if(mode === PAGE_MODE_LIST) {
88
 			$('#ITP_AJAX_MORDMNG03010_LIST_CONTAINER').show();
91
 			$('#ITP_AJAX_MORDMNG03010_LIST_CONTAINER').show();
89
 			this.moreView(true);
92
 			this.moreView(true);
@@ -121,7 +124,6 @@ let mobContentObj = {
121
 		totPage: 0,
124
 		totPage: 0,
122
 		isSearch: false,
125
 		isSearch: false,
123
 		rows: [],
126
 		rows: [],
124
-		iChoice: -1,
125
 		init: function() {
127
 		init: function() {
126
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
128
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
127
 			this.search();
129
 			this.search();
@@ -130,7 +132,6 @@ let mobContentObj = {
130
 			this.listPage = 0;
132
 			this.listPage = 0;
131
 			this.totPage = 0;
133
 			this.totPage = 0;
132
 			this.rows.length = 0;
134
 			this.rows.length = 0;
133
-			this.iChoice = -1;
134
 			$('#ITP_LIST_MORDMNG03010_LIST_ITEM_ROWS').empty();
135
 			$('#ITP_LIST_MORDMNG03010_LIST_ITEM_ROWS').empty();
135
 			this.load();
136
 			this.load();
136
 		},
137
 		},
@@ -166,11 +167,18 @@ let mobContentObj = {
166
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
167
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
167
 		},
168
 		},
168
 		dlvPrint: function() {
169
 		dlvPrint: function() {
169
-			if(this.iChoice < 0) {
170
+			var iChoice = -1;
171
+			$('input[type="checkbox"][id="ITP_LIST_MORDMNG03010_LIST_ITEM_CHECKBOX"]').each(function(index) {
172
+				if($(this).is(":checked")) {
173
+					iChoice = index;
174
+					return false;
175
+				}
176
+			});
177
+			if(iChoice === -1) {
170
 				alert("납품서를 선택해주세요 (대표 납품서번호)");
178
 				alert("납품서를 선택해주세요 (대표 납품서번호)");
171
 				return;
179
 				return;
172
 			}
180
 			}
173
-			mobContentObj.view.init(this.rows[this.iChoice]);
181
+			mobContentObj.view.init(this.rows[iChoice]);
174
 		}
182
 		}
175
 	},
183
 	},
176
 	view: {
184
 	view: {