Procházet zdrojové kódy

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

juney před 2 roky
rodič
revize
369c7730bd

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

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

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

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

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

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

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

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

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

@@ -49,10 +49,10 @@
49 49
 		  </div>
50 50
 		   <div id="ITP_LIST_MORDMNG02010_LIST_ITEM_AREA" class="scroll_area row-2">
51 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 53
 				<li class="history_list3 list-row">
54 54
 			 	  <div class="scroll_btn">
55
-				  	<input type="checkbox">
55
+				  	<input type="checkbox" id="ITP_LIST_MORDMNG02010_LIST_ITEM_CHECKBOX">
56 56
 				  </div>
57 57
 				  <div class="btn_check">
58 58
 					<div class="left">

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

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

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

@@ -69,9 +69,15 @@ let mobPageObj = {
69 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 83
 			$(document).on('click', '#ITP_LIST_MCOLLMNG02010_POP_WHS_ROWS li button', function() {
@@ -120,7 +126,6 @@ let mobContentObj = {
120 126
 		totPage: 0,
121 127
 		isSearch: false,
122 128
 		rows: [],
123
-		iChoice: -1,
124 129
 		init: function() {
125 130
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
126 131
 			this.search();
@@ -129,7 +134,6 @@ let mobContentObj = {
129 134
 			this.listPage = 0;
130 135
 			this.totPage = 0;
131 136
 			this.rows.length = 0;
132
-			this.iChoice = -1;
133 137
 			$('#ITP_LIST_MCOLLMNG02010_LIST_ITEM_ROWS').empty();
134 138
 			this.load();
135 139
 		},
@@ -166,11 +170,18 @@ let mobContentObj = {
166 170
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
167 171
 		},
168 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 181
 				alert("수거서를 선택해주세요 (대표 수거서번호)");
171 182
 				return;
172 183
 			}
173
-			mobContentObj.view.init(this.rows[this.iChoice]);
184
+			mobContentObj.view.init(this.rows[iChoice]);
174 185
 		}
175 186
 	},
176 187
 	view: {

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

@@ -63,15 +63,19 @@ let mobPageObj = {
63 63
 				var id = $(this).attr('id');
64 64
 				switch (id) {
65 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 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 81
 			$(document).on('click', '#ITP_LIST_MCOLLMNG03010_POP_WHS_ROWS li button', function() {
@@ -120,7 +124,6 @@ let mobContentObj = {
120 124
 		totPage: 0,
121 125
 		isSearch: false,
122 126
 		rows: [],
123
-		iChoice: -1,
124 127
 		init: function() {
125 128
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
126 129
 			this.search();
@@ -129,7 +132,6 @@ let mobContentObj = {
129 132
 			this.listPage = 0;
130 133
 			this.totPage = 0;
131 134
 			this.rows.length = 0;
132
-			this.iChoice = -1;
133 135
 			$('#ITP_LIST_MCOLLMNG03010_LIST_ITEM_ROWS').empty();
134 136
 			this.load();
135 137
 		},
@@ -165,11 +167,18 @@ let mobContentObj = {
165 167
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
166 168
 		},
167 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 178
 				alert("수거서를 선택해주세요 (대표 수거서번호)");
170 179
 				return;
171 180
 			}
172
-			mobContentObj.view.init(this.rows[this.iChoice]);
181
+			mobContentObj.view.init(this.rows[iChoice]);
173 182
 		}
174 183
 	},
175 184
 	view: {

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

@@ -74,10 +74,14 @@ let mobPageObj = {
74 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 87
 			$(document).on('click', '#ITP_LIST_MORDMNG02010_POP_WHS_ROWS li button', function() {
@@ -126,7 +130,6 @@ let mobContentObj = {
126 130
 		totPage: 0,
127 131
 		isSearch: false,
128 132
 		rows: [],
129
-		iChoice: -1,
130 133
 		init: function() {
131 134
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
132 135
 			this.search();
@@ -135,7 +138,6 @@ let mobContentObj = {
135 138
 			this.listPage = 0;
136 139
 			this.totPage = 0;
137 140
 			this.rows.length = 0;
138
-			this.iChoice = -1;
139 141
 			$('#ITP_LIST_MORDMNG02010_LIST_ITEM_ROWS').empty();
140 142
 			this.load();
141 143
 		},
@@ -172,11 +174,18 @@ let mobContentObj = {
172 174
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST', errFn);
173 175
 		},
174 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 185
 				alert("납품서를 선택해주세요 (대표 납품서번호)");
177 186
 				return;
178 187
 			}
179
-			mobContentObj.view.init(this.rows[this.iChoice]);
188
+			mobContentObj.view.init(this.rows[iChoice]);
180 189
 		}
181 190
 	},
182 191
 	view: {

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

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