1.发运明细备注赋值
This commit is contained in:
ljw 2024-11-14 20:52:41 +08:00
parent 399d28e075
commit 5182295971

View File

@ -267,7 +267,7 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
collect(dataEntity);
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
}
if("submit".equals(key)){
if ("submit".equals(key)) {
this.getView().invokeOperation("refresh");
}
}
@ -368,12 +368,12 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
String name = e.getEntryProp().getName();
int[] rowIndexs = e.getRowIndexs();
String string = this.getModel().getDataEntityType().getName();
if ("yem_es_materialinfo".equals(name)&&"yem_xshippingdetails".equals(string)){
if ("yem_es_materialinfo".equals(name) && "yem_xshippingdetails".equals(string)) {
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 yemTradeappqty = (BigDecimal)this.getModel().getValue("yem_tradeappqty", rowIndex);
if (yemStorageqty.compareTo(BigDecimal.ZERO)>0||yemDeliveryqty.compareTo(BigDecimal.ZERO)>0||yemTradeappqty.compareTo(BigDecimal.ZERO)>0){
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) {
this.getView().showMessage("删除单已存在下游单,不允许删除!!!");
e.setCancel(true);
}
@ -575,8 +575,6 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
// carryDeclaration(this.getModel(), this.getView(), rowIndex);
carryTaxRefundRate(this.getModel(), rowIndex);
break;
case "yem_productmodel":
case "yem_materiel":
case "yem_customclass":
carryReportCategoryAndHsCode(this.getModel(), this.getView(), rowIndex, "yem_customclass");
@ -597,6 +595,49 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
case "yem_mincabinetnumbers":
countSmallCabinetQty(model);//汇总表头小柜数量
break;
case "yem_isdismantlecar":
extracted();
case "yem_productmodel":
carryReportCategoryAndHsCode(this.getModel(), this.getView(), rowIndex, "yem_customclass");
extracted();
}
}
private void extracted() {
String value = (String) this.getModel().getValue("yem_billtype.number");
if ("yem_shippingdetails_zj".equals(value)||"yem_shippingdetails_nmzj".equals(value)) {
String yemIsdismantlecar = (String) this.getModel().getValue("yem_isdismantlecar");
if ("B".equals(yemIsdismantlecar)) {
DynamicObjectCollection yemEsMaterialinfo = this.getModel().getEntryEntity("yem_es_materialinfo");
for (DynamicObject dynamicObject : yemEsMaterialinfo) {
DynamicObject yemProductmodel = dynamicObject.getDynamicObject("yem_productmodel");
if (yemProductmodel != null) {
DynamicObject yemProducts = yemProductmodel.getDynamicObject("yem_products");
if (yemProducts != null) {
DynamicObject loadsingle = BusinessDataServiceHelper.loadSingle("yem_bd_productstree", "id,number,yem_vechpowertype,group"
, new QFilter[]{new QFilter("id", QCP.equals, yemProducts.getLong("id"))});
DynamicObject group = loadsingle.getDynamicObject("group");
String yemVechpowertype = loadsingle.getString("yem_vechpowertype");
if (group != null && yemVechpowertype.equals("燃油")) {
String string = group.getString("number");
Boolean tere = false;
if ("ZZJ-7T".equals(string)) {
tere = true;
} else if ("ZZJ-6T".equals(string)) {
tere = true;
} else if ("ZZJ-5T".equals(string)) {
tere = true;
} else if ("ZZJ-4T".equals(string)) {
tere = true;
}
if (tere) {
dynamicObject.set("yem_remarks1", "更换锁紧螺母");
}
}
}
}
}
}
}
}