修改费用信息携带内陆运输费、港杂费

This commit is contained in:
zhouc 2024-09-21 20:35:07 +08:00
parent 3648ca1304
commit cd3b39b2ed

View File

@ -87,7 +87,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
OperationStatus status = fsp.getStatus();
String formId = fsp.getFormId();
String appId = fsp.getAppId();
if (OperationStatus.ADDNEW == status&&appId.equals("yem_es")) {
if (OperationStatus.ADDNEW == status && appId.equals("yem_es")) {
SplitContainer splitContainer = this.getControl("yem_splitcontainerap");
splitContainer.setCollapse("yem_splitpanelap1", true);
QFilter qFilter = null;
@ -193,6 +193,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
String name = e.getProperty().getName();
ChangeData changeData = e.getChangeSet()[0];
Object oldValue = changeData.getOldValue();
Object newValue = changeData.getNewValue();
int rowIndex = changeData.getRowIndex();
int ParentRow = changeData.getParentRowIndex();
DynamicObject dataEntity = model.getDataEntity();
@ -526,10 +527,30 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
break;
case "yem_tonsqty":
case "yem_port":
case "yem_padexpense":
case "yem_shippingmethod":
ClientUtils.calcInlandTransportationAmt(model, rowIndex);//计算内陆运费
ClientUtils.calculatePortAmt(model, rowIndex);//计算港杂费
break;
case "yem_padexpense":
DynamicObject padexpense = (DynamicObject) newValue;
if (padexpense != null) {
String number = padexpense.getString("number");
//内陆运输费
if ("FYXM0023.11".equals(number)) {
DynamicObjectCollection entryRows = this.getModel().getEntryEntity("yem_es_materialinfo");
for(int i = 0;i<entryRows.size();i++){
ClientUtils.calcInlandTransportationAmt(model, i);//计算内陆运费
}
}
//港杂费
else if ("FYXM0023.6".equals(number)) {
DynamicObjectCollection entryRows = this.getModel().getEntryEntity("yem_es_materialinfo");
for(int i = 0;i<entryRows.size();i++){
ClientUtils.calculatePortAmt(model, i);//计算内陆运费
}
}
}
break;
case "yem_squareqty":
ClientUtils.calculatePortAmt(model, rowIndex);//计算港杂费
break;
@ -570,6 +591,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
/**
* 选择赠送配件-产品机型汇总明细信息中相同机型的数量
*
* @param rowIndex
*/
private void summarizeModules(int rowIndex) {
@ -598,6 +620,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
/**
* 修改商品明细中数量同步修改礼品赠送中数量
*
* @param model
* @param rowIndex
*/