1.发运明细变更单删除行效验
This commit is contained in:
ljw 2024-11-04 19:57:28 +08:00
parent 00c31c5890
commit 4a57b0f90a

View File

@ -399,14 +399,15 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
super.beforeDeleteRow(e); super.beforeDeleteRow(e);
String name = e.getEntryProp().getName(); String name = e.getEntryProp().getName();
int[] rowIndexs = e.getRowIndexs(); int[] rowIndexs = e.getRowIndexs();
if ("yem_es_materialinfo".equals(name)){ String string = this.getModel().getDataEntityType().getName();
if ("yem_es_materialinfo".equals(name)&&"yem_xshippingdetails".equals(string)){
for (int rowIndex : rowIndexs) { for (int rowIndex : rowIndexs) {
BigDecimal yemStorageqty = (BigDecimal)this.getModel().getValue("yem_storageqty", rowIndex); BigDecimal yemStorageqty = (BigDecimal)this.getModel().getValue("yem_storageqty", rowIndex);
BigDecimal yemDeliveryqty = (BigDecimal) this.getModel().getValue("yem_deliveryqty", rowIndex); BigDecimal yemDeliveryqty = (BigDecimal) this.getModel().getValue("yem_deliveryqty", rowIndex);
BigDecimal yemTradeappqty = (BigDecimal)this.getModel().getValue("yem_tradeappqty", rowIndex); BigDecimal yemTradeappqty = (BigDecimal)this.getModel().getValue("yem_tradeappqty", rowIndex);
if (yemStorageqty.compareTo(BigDecimal.ZERO)>0||yemDeliveryqty.compareTo(BigDecimal.ZERO)>0||yemTradeappqty.compareTo(BigDecimal.ZERO)>0){ if (yemStorageqty.compareTo(BigDecimal.ZERO)>0||yemDeliveryqty.compareTo(BigDecimal.ZERO)>0||yemTradeappqty.compareTo(BigDecimal.ZERO)>0){
this.getView().showMessage("删除单已存在下游单,不允许删除!!!"); this.getView().showMessage("删除单已存在下游单,不允许删除!!!");
e.setCancel(false); e.setCancel(true);
} }
} }
} }