瀏覽代碼

구매발주현황작업-3

yhl88 2 年之前
父節點
當前提交
8d126459a9
共有 1 個文件被更改,包括 14 次插入10 次删除
  1. 14 10
      src/main/webapp/js/app/pomng/ITP_POMNG04010.js

+ 14 - 10
src/main/webapp/js/app/pomng/ITP_POMNG04010.js

@@ -442,7 +442,6 @@ let modifyObj = {
442 442
 			listObj.grid.search();
443 443
 		},
444 444
 		del: function() {
445
-			console.log('here');
446 445
 			const formId = '#ITP_FORM_POMNG04010_DETAIL';
447 446
 			itp_fn_form_clear_validate(null, formId);
448 447
 			itp_fn_grid_save_rows(POMNG04010_DETAIL_GRID_ID);
@@ -451,24 +450,20 @@ let modifyObj = {
451 450
 				$(POMNG04010_DETAIL_GRID_ID).jqGrid('saveCell', i+1, 2)
452 451
 			}
453 452
 			const selection = $(POMNG04010_DETAIL_GRID_ID).getGridParam('selarrrow');
454
-			console.log(selection);
455 453
 			let param = $(formId).serializeObject();
456 454
 			let newData = [];
457 455
 			for(let i = 0; i < selection.length; i++){
458 456
 				let before = $(POMNG04010_DETAIL_GRID_ID).getRowData(selection[i]);
459 457
 				before.pchPodrUnqNo = param.pchPodrUnqNo;
460
-				//console.log(before)
461 458
 				newData.push(before);
462 459
 			}
463
-			console.log(newData);
464 460
 			param.gridUpdateData = newData;
465 461
 			console.log(JSON.stringify(param));
466 462
 			var searhFn = function() {
467 463
 				ITP_FORM_POMNG02010_DETAIL_IS_WRITING = false;
468 464
 				listObj.grid.search();
469 465
 			};
470
-			fn_ajax_call(API_POMNG_PO_CANCEL_PCHPO, JSON.stringify(param), searhFn, 'POST');
471
-			
466
+			fn_ajax_call(API_POMNG_PO_CANCEL_PCHPO, JSON.stringify(param), searhFn, 'POST');			
472 467
 		}
473 468
 	},
474 469
 	empty: {
@@ -547,10 +542,18 @@ let modifyObj = {
547 542
 				colModel: gridColModel.detail,
548 543
 				data: gridData,
549 544
 				multiselect: true,
545
+				onSelectRow: function(index, status) {
546
+					if(index) {
547
+						var row = $(POMNG04010_DETAIL_GRID_ID).jqGrid('getRowData', index);
548
+						if(row.podrDtlStCd == 'POD2') {
549
+							$("#jqg_list_" + index).prop("checked", false);
550
+						}
551
+					}
552
+				},
550 553
 				onSelectAll: function(rowIds, status) {
551 554
 					for(let i = 0; i < rowIds.length; i++){
552 555
 						let podrDtlStCd = $(POMNG04010_DETAIL_GRID_ID).getCell(rowIds[i], 'podrDtlStCd');
553
-						if(podrDtlStCd == 'POD2'){
556
+						if(podrDtlStCd == 'POD2') {
554 557
 							$("#jqg_list_" + rowIds[i]).prop("checked", false);
555 558
 						} else {
556 559
 							$("#jqg_list_" + rowIds[i]).prop("checked", status);
@@ -559,16 +562,17 @@ let modifyObj = {
559 562
 				},
560 563
 				loadComplete: function(data) {
561 564
 					console.log(data);
562
-					itp_fn_grid_load_complete(data, POMNG04010_DETAIL_GRID_ID, true, 'number', 'POMNG04010', modifyObj.itp_POMNG04010_search, modifyObj.empty, true, data.gridRecords, true);
563 565
 					let datas = data.rows;
566
+					console.log(2222);
564 567
 					console.log(datas);
565 568
 					for(let i = 0; i < datas.length; i++) {
566 569
 						let podrDtlStCd = datas[i].podrDtlStCd;
567 570
 						if(podrDtlStCd == 'POD2') {
568
-							$("#jqg_list_" + (i + 1)).attr('disabled', true);
571
+							$("#jqg_list_" + i).attr('disabled', true);
569 572
 						}
570 573
 					}
571
-				}				
574
+					itp_fn_grid_load_complete(data, POMNG04010_DETAIL_GRID_ID, true, 'number', 'POMNG04010', modifyObj.itp_POMNG04010_search, modifyObj.empty, true, data.gridRecords, true);
575
+				}
572 576
 			};
573 577
 			itp_fn_grid_make_local(option);
574 578
 		},