feat:装箱单删除行校验

This commit is contained in:
zzs01@yunemao.com 2024-08-30 20:02:02 +08:00
parent e301c440ee
commit 36c95564ea

View File

@ -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不允许删除");
}
}
}
}
}