@Override protected void editing() { NHzInfo hzInfo = StorageModule.getInstance().getHzInfo(); NSpInfo zhspInfo = businessDialog.getHeadPane().getData(); // 组合商品 NSpjgpzInfo rowObject = xTable.getRowObject(editingRow); NSpInfo spInfo = (NSpInfo) KasaSwingTools.getComponentValue(editorComponent); if (null == spInfo) { rowObject.REFERENCE_NSp_yl = null; // 原料商品 not null rowObject.REFERENCE_NSp_yl_desc = null; rowObject.SPDH = null; // 商品代号 null rowObject.SPGG = null; // 商品规格 null rowObject.GJTM = null; // 国际条码 null rowObject.YS = null; // 颜色 null rowObject.KS = null; // 款式 null rowObject.REFERENCE_NSpdw_D = null; rowObject.REFERENCE_NSpdw_D_desc = null; rowObject.REFERENCE_NSpdw_X = null; rowObject.REFERENCE_NSpdw_X_desc = null; rowObject.DXZHL = null; rowObject.SPCBJ = null; // 商品成本价 null rowObject.SPLSJ = null; // 商品零售价 null } else { if (isExist(spInfo)) { KasaSwingTools.resetComponent(editorComponent); StorageModule.showMessageDialog(businessDialog, "商品重复!"); } else { rowObject.REFERENCE_NJt = hzInfo.REFERENCE_NJt; // 集团 not null rowObject.REFERENCE_NJt_desc = hzInfo.REFERENCE_NJt_desc; // 集团 not null rowObject.REFERENCE_NSp = zhspInfo.ID; // 组合商品 not null rowObject.REFERENCE_NSp_desc = zhspInfo.SPMC; rowObject.REFERENCE_NSp_yl = spInfo.ID; // 原料商品 not null rowObject.REFERENCE_NSp_yl_desc = spInfo.SPMC; rowObject.SPDH = spInfo.SPDH; // 商品代号 null rowObject.SPGG = spInfo.SPGG; // 商品规格 null rowObject.GJTM = spInfo.GJTM; // 国际条码 null rowObject.YS = spInfo.YS; // 颜色 null rowObject.KS = spInfo.KS; // 款式 null rowObject.REFERENCE_NSpdw_D = spInfo.REFERENCE_NSpdw_D; rowObject.REFERENCE_NSpdw_D_desc = spInfo.REFERENCE_NSpdw_D_desc; rowObject.REFERENCE_NSpdw_X = spInfo.REFERENCE_NSpdw_X; rowObject.REFERENCE_NSpdw_X_desc = spInfo.REFERENCE_NSpdw_X_desc; rowObject.DXZHL = spInfo.DXZHL; rowObject.SPCBJ = spInfo.SPCBJ; // 商品成本价 null rowObject.SPLSJ = spInfo.SPLSJ; // 商品零售价 null } } xTable.refreshRow(editingRow); }
@Override protected void editing() { NPsdthomsInfo rowObject = xTable.getRowObject(editingRow); NSpInfo spInfo = (NSpInfo) KasaSwingTools.getComponentValue(editorComponent); if (null == spInfo) { DdSpFastSelectDlg.updateRowObject(rowObject, null); } else { if (isExist(spInfo)) { KasaSwingTools.resetComponent(editorComponent); StorageModule.showMessageDialog(businessDialog, "商品重复!"); } else { DdSpFastSelectDlg.updateRowObject(rowObject, spInfo); } } xTable.refreshRow(editingRow); }