GoodsDealForm.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. <!DOCTYPE html>
  2. <html lang="ko"
  3. xmlns:th="http://www.thymeleaf.org">
  4. <!--
  5. *******************************************************************************
  6. * @source : goodsDealForm.html
  7. * @desc : 딜상상품 구성 관리
  8. *============================================================================
  9. * STYLE24
  10. * Copyright(C) 2019 TSIT, All rights reserved.
  11. *============================================================================
  12. * VER DATE AUTHOR DESCRIPTION
  13. * === =========== ========== =============================================
  14. * 1.0 2020.10.29 eskim 최초 작성
  15. *******************************************************************************
  16. -->
  17. <div class="modalPopup" data-width="1200" >
  18. <div class="panelStyle">
  19. <div class="panelTitle">
  20. <h2>딜 상품 구성</h2>
  21. <button type="button" class="close" onclick="fngoodsDealFormClose()"><i class="fa fa-times"></i></button>
  22. </div>
  23. <form id="goodsDealForm" name="goodsDealForm" th:method="post">
  24. <input type="hidden" id="goodsComposeList" name="goodsComposeList" />
  25. <div class="panelContent">
  26. <ul class="notice">
  27. <li>구성상품 등록시 기본값&nbsp;
  28. <!-- 아이콘 툴팁 -->
  29. <div class="iconTooltip">
  30. <i class="fa fa-info" aria-hidden="true"></i>
  31. <span class="left" style="width:450px; text-align:left;">
  32. * 딜상품 정보<br/>
  33. &nbsp;&nbsp;- 상품상태 : 정보부족<br/>
  34. &nbsp;&nbsp;- 정상가 : 판매가 입력값<br/>
  35. &nbsp;&nbsp;- 판매가 : 구성상품의 대표여부 'Y' 상품의 판매가<br/>
  36. &nbsp;&nbsp;- 브랜드코드 : 구성상품의 기준여부 'Y'상품의 브랜드코드<br/>
  37. &nbsp;&nbsp;- 품목코드 : 구성상품의 기준여부 'Y'상품의 품목코드<br/>
  38. &nbsp;&nbsp;- 포인트 : 구성상품의 기준여부 'Y'상품의 브랜드 포인트<br/>
  39. &nbsp;&nbsp;- 배송비정책 : 구성상품의 기준여부 'Y'상품의 브랜드 배송비정책<br/>
  40. <br/>
  41. * 구성상품 정보<br/>
  42. &nbsp;&nbsp;- 구상상품의 기준상품 : 수정 불가<br/>
  43. &nbsp;&nbsp;- 구상상품의 대표상품 : 수정 가능<br/>
  44. </span>
  45. </div>
  46. <!-- //아이콘 툴팁 -->
  47. </li>
  48. </ul>
  49. <table class="frmStyle">
  50. <colgroup>
  51. <col width="10%"/>
  52. <col/>
  53. <col width="10%"/>
  54. <col width="24%"/>
  55. <col width="10%"/>
  56. <col width="20%"/>
  57. </colgroup>
  58. <tr>
  59. <th>상품명<em class="required" title="필수"></em></th>
  60. <td><input type="text" id="goodsNm" name="goodsNm" maxlength="60"/></td>
  61. <th>성별<em class="required" title="필수"></em></th>
  62. <td><select name="sexGb" id="sexGb">
  63. <option value="">[전체]</option>
  64. <option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  65. </select>
  66. </td>
  67. <th>제조년월일<em class="required" title="필수"></em></th>
  68. <td><input type="text" class="w100" id="makeYmd" name="makeYmd" maxlength="8" data-valid-type="date"/></td>
  69. </tr>
  70. <tr>
  71. <th>년도/시즌<em class="required" title="필수"></em></th>
  72. <td><select name="styleYear" id="styleYear">
  73. <option value="">[전체]</option>
  74. <option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  75. </select>
  76. <select name="seasonCd" id="seasonCd">
  77. <option value="">[전체]</option>
  78. <option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  79. </select>
  80. </td>
  81. <th>원산지<em class="required" title="필수"></em></th>
  82. <td ><select name="makeOriginCd" id="makeOriginCd">
  83. <option value="">[전체]</option>
  84. <option th:if="${makOriginList}" th:each="oneData, status : ${makOriginList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
  85. </select>
  86. <input type="hidden" id="makeNm" name="makeNm" />
  87. </td>
  88. <td colspan="2"></td>
  89. </tr>
  90. </table>
  91. </div>
  92. <ul class="panelBar">
  93. <li class="left">
  94. <button type="button" class="btn btn-danger btn-lg" onclick="fnGoodsDealDeleteRow();">행삭제</button>
  95. </li>
  96. <li class="right">
  97. <button type="button" class="btn btnRight btn-default btn-lg" onclick="cfnDownloadSampleFile('SF003');">상품엑셀조회 양식 다운로드</button>
  98. <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDealSearchExcel" >엑셀조회</button>
  99. <button type="button" class="btn btnRight btn-base btn-lg" onclick="fnOpenGoodsDealPopup();">구상상품추가</button>
  100. </li>
  101. </ul>
  102. <div id="gridGoodsDealList" style="height: 450px;" class="ag-theme-balham lh60"></div>
  103. </form>
  104. <ul class="panelBar">
  105. <li class="right">
  106. <th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">
  107. <button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDealSave">저장</button>
  108. </th:block>
  109. </li>
  110. </ul>
  111. </div>
  112. </div>
  113. <script th:inline="javascript">
  114. /*<![CDATA[*/
  115. var useYnList = gagajf.convertToArray([[${useYnList}]]);
  116. var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
  117. // specify the columns
  118. var columnGoodsDealDefs = [
  119. {width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
  120. {headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
  121. {headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center', rowDrag: true },
  122. //{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
  123. {headerName: "이미지", field: "sysImgNm", width: 100, height: 60, cellClass: 'text-center'
  124. ,cellRenderer: function(params) {
  125. return '<img width="60" src="'+ _goodsUrl+ "/" + params.value + '" alt="" onerror="this.src=\'/image/no.png\';"/>';
  126. }
  127. },
  128. {headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
  129. {headerName: "옵션명", field: "compsGoodsOptNm" , width: 250, cellClass: 'text-left',editable: true, required: true},
  130. {headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
  131. ,valueFormatter: function(params) {return params.value.addComma();}
  132. },
  133. {headerName: "기준여부(품목/전시카테)", field: "baseYn" , width: 170, cellClass: 'text-center',editable: true, required: true,
  134. cellEditor: 'agRichSelectCellEditor',
  135. cellEditorParams: { values: gagaAgGrid.extractValues(useYnList) },
  136. valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
  137. valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
  138. },
  139. {headerName: "대표여부(가격)", field: "repYn" , width: 120, cellClass: 'text-center',editable: true, required: true,
  140. cellEditor: 'agRichSelectCellEditor',
  141. cellEditorParams: { values: gagaAgGrid.extractValues(useYnList) },
  142. valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
  143. valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
  144. },
  145. {headerName: "전시여부", field: "useYn" , width: 80, cellClass: 'text-center',editable: true, required: true,
  146. cellEditor: 'agRichSelectCellEditor',
  147. cellEditorParams: { values: gagaAgGrid.extractValues(useYnList) },
  148. valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
  149. valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
  150. },
  151. {headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
  152. cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
  153. valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
  154. valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
  155. },
  156. {headerName: "수량", field: "qty" , width: 80, cellClass: 'text-right',hide:true}
  157. ];
  158. // Get GridOptions
  159. var gridGoodsDealOptions = gagaAgGrid.getGridOptions(columnGoodsDealDefs);
  160. gridGoodsDealOptions.rowSelection = 'multiple';
  161. gridGoodsDealOptions.suppressRowClickSelection = true;
  162. gridGoodsDealOptions.stopEditingWhenGridLosesFocus = true; //그리드 에디터 값 저장가능
  163. // 드래그
  164. gridGoodsDealOptions.rowDragManaged = true;
  165. gridGoodsDealOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
  166. //기준여부 표시
  167. gridGoodsDealOptions.getRowStyle = function(params) {
  168. if ("Y" == params.data.baseYn) {
  169. return { background: '#1ab394' };
  170. }else{
  171. return { background: '#ffffff' };
  172. }
  173. }
  174. // Row
  175. gridGoodsDealOptions.onCellValueChanged = function(event) {
  176. var rowIdx = null;
  177. var isChangColor = true;
  178. if (event.colDef.field == "baseYn"){
  179. if (event.data.baseYn == "Y"){
  180. rowIdx = event.rowIndex;
  181. //다른 기준여부 'Y'가 존재하는지 확인
  182. gridGoodsDealOptions.api.forEachNode(function(rowNode, index) {
  183. if (rowNode.data.baseYn == "Y" && index != rowIdx){
  184. event.data.baseYn = event.oldValue;
  185. gridGoodsDealOptions.api.updateRowData({update: [event.data]});
  186. isChangColor = false;
  187. return;
  188. }
  189. });
  190. if (!isChangColor){
  191. mcxDialog.alert('다른 구성상품에 기준여부가 선택되어 있습니다.');
  192. return;
  193. }
  194. }
  195. }
  196. isChangColor = true;
  197. if (event.colDef.field == "repYn"){
  198. if (event.data.repYn == "Y"){
  199. rowIdx = event.rowIndex;
  200. //다른 대표여부 'Y'가 존재하는지 확인
  201. gridGoodsDealOptions.api.forEachNode(function(rowNode, index) {
  202. if (rowNode.data.repYn == "Y" && index != rowIdx){
  203. event.data.repYn = event.oldValue;
  204. gridGoodsDealOptions.api.updateRowData({update: [event.data]});
  205. isChangColor = false;
  206. return;
  207. }
  208. });
  209. if (!isChangColor){
  210. mcxDialog.alert('다른 구성상품에 대표여부가 선택되어 있습니다.');
  211. return;
  212. }
  213. }
  214. }
  215. }
  216. //창종료
  217. var fngoodsDealFormClose = function(){
  218. uifnPopupClose('popupGoodsDeal');
  219. }
  220. $(document).ready(function() {
  221. gagaAgGrid.createGrid('gridGoodsDealList', gridGoodsDealOptions);
  222. });
  223. var fnOpenGoodsDealPopup = function() {
  224. cfnOpenGoodsPopup('fnCreateGoodsDeal');
  225. }
  226. // 상품추가
  227. var fnCreateGoodsDeal = function(goodsData) {
  228. if (goodsData.length < 1) return;
  229. // 기존상품
  230. var oldGoodsDealList = gagaAgGrid.getAllRowData(gridGoodsDealOptions);
  231. var idx = oldGoodsDealList.length+1;
  232. var isExist = false;
  233. goodsData.forEach(function(goods){
  234. isExist = false;
  235. gridGoodsDealOptions.api.forEachNode(function(rowNode, index) {
  236. if (goods.goodsCd == rowNode.data.compsGoodsCd){
  237. isExist = true;
  238. }
  239. });
  240. if (goods.goodsType != "G056_N"){
  241. isExist = true;
  242. }
  243. // 입점상품 허용 - 20210512
  244. //if (goods.selfGoodsYn != "Y"){
  245. // isExist = true;
  246. //}
  247. if(!isExist){
  248. var data = {
  249. compsGoodsCd: goods.goodsCd
  250. , goodsType: 'G056_D'
  251. , dispOrd: idx
  252. , qty: 1
  253. , compsCurrPrice: goods.currPrice
  254. , compsStaffCurrPrice: goods.currPrice
  255. , baseYn: 'N'
  256. , repYn: 'N'
  257. , goodsStat : goods.goodsStat
  258. , useYn: 'Y'
  259. , compsGoodsOptNm : goods.goodsNm
  260. , currPrice : goods.currPrice
  261. , selfGoodsYn : goods.selfGoodsYn
  262. , sysImgNm : goods.sysImgNm
  263. };
  264. //그리드 마지막에 추가해야함
  265. gridGoodsDealOptions.api.updateRowData({add: [data], addIndex: idx});
  266. idx++;
  267. }
  268. });
  269. gridGoodsDealOptions.api.refreshCells();
  270. }
  271. //엑셀 상품 조회
  272. $('#btnGoodsDealSearchExcel').on('click', function() {
  273. cfnExcelUploadPopup('goodsDealExcelUpload', 'goodsDealExcelUpload');
  274. });
  275. var goodsDealExcelUpload = function(result){
  276. var data = {procJob : result.procJob
  277. ,excelFileNm : result.excelFileNm
  278. };
  279. var jsonData = JSON.stringify(data);
  280. gagajf.ajaxJsonSubmit('/goods/search/excelupload/save', jsonData, fnGoodsDealExcelUploadCallBack);
  281. }
  282. var fnGoodsDealExcelUploadCallBack = function(result){
  283. gagajf.ajaxJsonSubmit('/goods/excel/upload/goods/list', '', fnExcelSearchCallBack);
  284. }
  285. var fnExcelSearchCallBack = function(result){
  286. fnCreateGoodsDeal(result.goodsExcelList);
  287. }
  288. // 저장클릭시
  289. $('#btnGoodsDealSave').on('click', function() {
  290. if(!fnGoodsDealConditionCheck()) return;
  291. mcxDialog.confirm('딜상품을 등록 하시겠습니까?', {
  292. cancelBtnText: "취소",
  293. sureBtnText: "확인",
  294. sureBtnClick: function(){
  295. var goodsComposeList = gagaAgGrid.getAllRowData(gridGoodsDealOptions);
  296. $("#goodsDealForm input[name=goodsComposeList]").val(JSON.stringify(goodsComposeList));
  297. gagajf.ajaxFormSubmit("/goods/deal/save", "#goodsDealForm", fngoodsDealFormClose);
  298. }
  299. });
  300. });
  301. //저장 조건 확인
  302. var fnGoodsDealConditionCheck = function(){
  303. var optCheck = false;
  304. if(gagajf.isNull($("#goodsDealForm input[name=goodsNm]").val())){
  305. mcxDialog.alertC('상품명을 입력해 주세요.', {
  306. sureBtnText: "확인",
  307. sureBtnClick: function() {
  308. $("#goodsDealForm input[name=goodsNm]").focus();
  309. }
  310. });
  311. return false;
  312. }
  313. if(Number($("#goodsDealForm input[name=currPrice]").val()) <= 0){
  314. mcxDialog.alertC('판매가를 바르게 입력해 주세요.', {
  315. sureBtnText: "확인",
  316. sureBtnClick: function() {
  317. $("#goodsDealForm input[name=currPrice]").focus();
  318. }
  319. });
  320. return false;
  321. }
  322. if(gagajf.isNull($("#goodsDealForm select[name=styleYear]").val())){
  323. mcxDialog.alertC('년도을 선택해 주세요.', {
  324. sureBtnText: "확인",
  325. sureBtnClick: function() {
  326. $("#goodsDealForm select[name=styleYear]").focus();
  327. }
  328. });
  329. return false;
  330. }
  331. if(gagajf.isNull($("#goodsDealForm select[name=seasonCd]").val())){
  332. mcxDialog.alertC('시즌을 선택해주세요.', {
  333. sureBtnText: "확인",
  334. sureBtnClick: function() {
  335. $("#goodsDealForm select[name=seasonCd]").focus();
  336. }
  337. });
  338. return false;
  339. }
  340. if(gagajf.isNull($("#goodsDealForm select[name=sexGb]").val())){
  341. mcxDialog.alertC('성별을 선택해주세요.', {
  342. sureBtnText: "확인",
  343. sureBtnClick: function() {
  344. $("#goodsDealForm select[name=sexGb]").focus();
  345. }
  346. });
  347. return false;
  348. }
  349. if(gagajf.isNull($("#goodsDealForm select[name=makeOriginCd]").val())){
  350. mcxDialog.alertC('원산지를 입력해 주세요.', {
  351. sureBtnText: "확인",
  352. sureBtnClick: function() {
  353. $("#goodsDealForm select[name=makeOriginCd]").focus();
  354. }
  355. });
  356. return false;
  357. }
  358. var makeYmd = $("#goodsDealForm input[name=makeYmd]").val();
  359. if(gagajf.isNull(makeYmd)){
  360. mcxDialog.alertC('제조년월일를 입력해 주세요.', {
  361. sureBtnText: "확인",
  362. sureBtnClick: function() {
  363. $("#goodsDealForm input[name=makeYmd]").focus();
  364. }
  365. });
  366. return;
  367. }
  368. if(makeYmd.length < 8){
  369. mcxDialog.alertC('제조년월일를 바르게 주세요.', {
  370. sureBtnText: "확인",
  371. sureBtnClick: function() {
  372. $("#goodsDealForm input[name=makeYmd]").focus();
  373. }
  374. });
  375. return false;
  376. }
  377. if(isNaN(Date.parse(makeYmd.substr(0, 4) +'-'+ makeYmd.substr(4, 2) +'-'+ makeYmd.substr(6, 2)))){
  378. mcxDialog.alertC('날짜형식이 아닙니다.', {
  379. sureBtnText: "확인",
  380. sureBtnClick: function() {
  381. $("#goodsDealForm input[name=makeYmd]").focus();
  382. }
  383. });
  384. return false;
  385. }
  386. var allData = gagaAgGrid.getAllRowData(gridGoodsDealOptions);
  387. // Validation
  388. if (!gagaAgGrid.validation(gridGoodsDealOptions, allData))
  389. return false;
  390. var comSupplyCompCd = '';
  391. var comSelfGoodsYn = '';
  392. //기준여부 Y 존재하는지 확인
  393. var checkBaseYn = false;
  394. //대표여부 Y 존재하는지 확인
  395. var checkRepYn = false;
  396. optCheck = false;
  397. var goodsCnt = 0;
  398. $.each(allData, function(index, item) {
  399. if (index == 0){
  400. comSelfGoodsYn = item.selfGoodsYn;
  401. comSupplyCompCd = item.supplyCompCd;
  402. }
  403. if (item.baseYn == "Y"){
  404. checkBaseYn = true;
  405. }
  406. if (item.repYn == "Y"){
  407. checkRepYn = true;
  408. }
  409. if(item.goodsStat != "G008_90"){
  410. optCheck = true;
  411. mcxDialog.alertC("상품상태를 확인해 주세요.", {
  412. sureBtnText: "확인",
  413. sureBtnClick: function() {
  414. gridGoodsDealOptions.api.setFocusedCell(index, "goodsStat", null);
  415. }
  416. });
  417. return false;
  418. }
  419. if(Number(item.qty) <= 0){
  420. optCheck = true;
  421. mcxDialog.alertC("수량을 입력해 주세요.", {
  422. sureBtnText: "확인",
  423. sureBtnClick: function() {
  424. gridGoodsDealOptions.api.setFocusedCell(index, "qty", null);
  425. }
  426. });
  427. return false;
  428. }
  429. if (comSelfGoodsYn != item.selfGoodsYn){
  430. optCheck = true;
  431. mcxDialog.alertC("구상상품중 자사/입점상품 구분값이 다릅니다.\n확인해 주세요", {
  432. sureBtnText: "확인",
  433. sureBtnClick: function() {
  434. gridGoodsDealOptions.api.setFocusedCell(index, "goodsCd", null);
  435. }
  436. });
  437. return false;
  438. }else{
  439. /* if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
  440. optCheck = true;
  441. mcxDialog.alertC("구상상품중 입점은 같은 업체 상품만 가능합니다.\n확인해 주세요", {
  442. sureBtnText: "확인",
  443. sureBtnClick: function() {
  444. gridGoodsDealOptions.api.setFocusedCell(index, "goodsCd", null);
  445. }
  446. });
  447. return false;
  448. } */
  449. if (comSelfGoodsYn == "N"){
  450. optCheck = true;
  451. mcxDialog.alertC("구상상품중 자사 상품만 가능합니다.\n확인해 주세요", {
  452. sureBtnText: "확인",
  453. sureBtnClick: function() {
  454. gridGoodsDealOptions.api.setFocusedCell(index, "goodsCd", null);
  455. }
  456. });
  457. return false;
  458. }
  459. if (comSupplyCompCd != item.supplyCompCd){
  460. optCheck = true;
  461. mcxDialog.alertC("구상상품은 같은 업체 상품만 가능합니다.\n확인해 주세요", {
  462. sureBtnText: "확인",
  463. sureBtnClick: function() {
  464. gridGoodsDealOptions.api.setFocusedCell(index, "goodsCd", null);
  465. }
  466. });
  467. return false;
  468. }
  469. }
  470. goodsCnt++;
  471. });
  472. if(optCheck) {
  473. return false;
  474. }
  475. if (goodsCnt > 200){
  476. mcxDialog.alert('딜 구성상품은 200개 초과 설정할수 없습니다.');
  477. return false;
  478. }
  479. if (!checkBaseYn){
  480. mcxDialog.alert('구성상품중 기준여부를 선택해 주세요.');
  481. return false;
  482. }
  483. if (!checkRepYn){
  484. mcxDialog.alert('구성상품중 대표여부를 선택해 주세요.');
  485. return false;
  486. }
  487. return true;
  488. }
  489. //상품삭제
  490. var fnGoodsDealDeleteRow = function() {
  491. var selectedData = gagaAgGrid.selectedRowData(gridGoodsDealOptions);
  492. if (selectedData.length == 0) {
  493. mcxDialog.alert('선택된 행이 없습니다.');
  494. return;
  495. }
  496. //화면에서 삭제
  497. var removedData = gagaAgGrid.removeRowData(gridGoodsDealOptions, false);
  498. }
  499. /*]]>*/
  500. </script>
  501. </html>