|
|
@@ -135,7 +135,10 @@
|
|
|
{headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
|
|
|
{headerName: "구성상품명", field: "goodsNm" , width: 200, cellClass: 'text-left'},
|
|
|
//{headerName: "순서", field: "dispOrd" , width: 100, cellClass: 'text-center',editable: true, required: true},
|
|
|
- {headerName: "세트구성수량", field: "qty" , width: 120, cellClass: 'text-right',editable: true, required: true},
|
|
|
+ {headerName: "세트구성수량", field: "qty" , width: 120, cellClass: 'text-right',editable: true, required: true,
|
|
|
+ cellEditor: 'textCellEditor',
|
|
|
+ cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
+ },
|
|
|
{headerName: "세트구성상품판매가", field: "compsCurrPrice" , width: 150, cellClass: 'text-right', editable: true, required: true,
|
|
|
cellEditor: 'textCellEditor',
|
|
|
cellEditorParams: { maxlength: 14, validType: 'numeric'}
|
|
|
@@ -179,7 +182,6 @@
|
|
|
return { background: '#ffffff' };
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
|
|
|
// Row
|
|
|
gridGoodsSetOptions.onCellValueChanged = function(event) {
|
|
|
@@ -206,8 +208,24 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //세트구상상품판매가
|
|
|
if (event.colDef.field == "compsCurrPrice"){
|
|
|
- var setGoodsCurrPrice = 0;
|
|
|
+ let setGoodsCurrPrice = 0;
|
|
|
+
|
|
|
+ gridGoodsSetOptions.api.forEachNode(function(rowNode, index) {
|
|
|
+ if (!gagajf.isNull(rowNode.data.compsCurrPrice)){
|
|
|
+ setGoodsCurrPrice += Number(rowNode.data.compsCurrPrice);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#goodsSetForm').find('#setGoodsCurrPrice').html(setGoodsCurrPrice.addComma());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 세트구성수량 수저시
|
|
|
+ if (event.colDef.field == "qty"){
|
|
|
+ event.data.compsCurrPrice = Number(event.data.qty) * Number(event.data.currPrice);
|
|
|
+ gridGoodsSetOptions.api.updateRowData({update: [event.data]});
|
|
|
+
|
|
|
+ let setGoodsCurrPrice = 0;
|
|
|
|
|
|
gridGoodsSetOptions.api.forEachNode(function(rowNode, index) {
|
|
|
if (!gagajf.isNull(rowNode.data.compsCurrPrice)){
|