feat:装箱单删除行校验
This commit is contained in:
parent
e301c440ee
commit
36c95564ea
@ -820,6 +820,8 @@ public class EncaseMentEdit extends AbstractBillPlugIn implements Plugin, Before
|
||||
@Override
|
||||
public void beforeDeleteRow(BeforeDeleteRowEventArgs e) {
|
||||
super.beforeDeleteRow(e);
|
||||
IDataModel model = this.getModel();
|
||||
IFormView view = this.getView();
|
||||
String name = e.getEntryProp().getName();
|
||||
int[] rowIndexs = e.getRowIndexs();
|
||||
// switch (name) {
|
||||
@ -830,6 +832,17 @@ public class EncaseMentEdit extends AbstractBillPlugIn implements Plugin, Before
|
||||
// deleteMaterialInfo(e, rowIndexs);
|
||||
// break;
|
||||
// }
|
||||
if ("yem_sumpartspack".equals(name)) {
|
||||
if (rowIndexs != null) {
|
||||
for (int rowIndex : rowIndexs) {
|
||||
BigDecimal stuffingpiece = (BigDecimal) model.getValue("yem_stuffingpiece", rowIndex);
|
||||
if (stuffingpiece.compareTo(BigDecimal.ZERO) > 0) {
|
||||
e.setCancel(true);
|
||||
view.showErrorNotification("已装柜数量大于0,不允许删除!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user