Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zhangzhiguo 2025-11-11 17:47:10 +08:00
commit b37b970e04
1 changed files with 40 additions and 1 deletions

View File

@ -20,7 +20,8 @@ import java.util.Map;
/* /*
* 使用插件注册位置支出合同结算表单插件 * 使用插件注册位置支出合同结算表单插件
* 说明新增合同支付项明细后将对应不同分录拆分至工序分摊中 * 说明1:新增合同支付项明细后将对应不同分录拆分至工序分摊中
* 2:新增的入库单分录如上
*/ */
public class CostAllocatorBillPlugin extends AbstractFormPlugin { public class CostAllocatorBillPlugin extends AbstractFormPlugin {
@ -30,6 +31,7 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
this.addItemClickListeners("payitemdetaitoolap");//合同支付项明细工具栏 this.addItemClickListeners("payitemdetaitoolap");//合同支付项明细工具栏
this.addItemClickListeners("entrytoolbar1");//入库单明细工具栏 this.addItemClickListeners("entrytoolbar1");//入库单明细工具栏
} }
@Override @Override
public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) { public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
super.afterDoOperation(afterDoOperationEventArgs); super.afterDoOperation(afterDoOperationEventArgs);
@ -39,6 +41,7 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
this.getView().invokeOperation("refresh"); this.getView().invokeOperation("refresh");
} }
} }
@Override @Override
public void itemClick(ItemClickEvent evt) { public void itemClick(ItemClickEvent evt) {
super.itemClick(evt); super.itemClick(evt);
@ -88,6 +91,7 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
} }
} else if (itemKey.equals("removeline1")) { } else if (itemKey.equals("removeline1")) {
//入库单明细删除按钮 //入库单明细删除按钮
boolean zcgj_transset = (boolean) this.getModel().getValue("zcgj_transset");//按入库运费结算
DynamicObjectCollection materialInEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("materialinentry");//入库单分录 DynamicObjectCollection materialInEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("materialinentry");//入库单分录
DynamicObjectCollection itemEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("itementry");//支付项分录 DynamicObjectCollection itemEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("itementry");//支付项分录
if (itemEntryCollection.size() == 0) { if (itemEntryCollection.size() == 0) {
@ -121,6 +125,23 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
processAllocEntityCollection.add(newProcessAllocEntity); processAllocEntityCollection.add(newProcessAllocEntity);
} }
if (zcgj_transset) {
DynamicObjectCollection expensesummaryCollection = ecma_materialInBill.getDynamicObjectCollection("zcgj_expensesummary");//费用汇总
for (DynamicObject entryEntity : expensesummaryCollection) {
boolean zcgj_isfreightline = entryEntity.getBoolean("zcgj_isfreightline");//运费行
if (!zcgj_isfreightline) {
continue;
}
DynamicObject newProcessAllocEntity = new DynamicObject(processAllocEntityType);
newProcessAllocEntity.set("zcgj_pa_amount", entryEntity.get("zcgj_pa_amount"));//价税合计-价税合计
newProcessAllocEntity.set("zcgj_amountnotax", entryEntity.get("zcgj_amountnotax"));//不含税金额-不含税金额
newProcessAllocEntity.set("zcgj_rateval", entryEntity.get("zcgj_rateval"));//税率%-税率%
newProcessAllocEntity.set("zcgj_taxamt", entryEntity.get("zcgj_taxamt"));//税额-税额
newProcessAllocEntity.set("zcgj_expenseitem", entryEntity.get("zcgj_expenseitem"));//费用项目-费用项目
processAllocEntityCollection.add(newProcessAllocEntity);
}
}
} }
} }
@ -201,6 +222,7 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
} else if ("matinnumber".equals(name)) { } else if ("matinnumber".equals(name)) {
//入库单明细-编码 //入库单明细-编码
this.getModel().beginInit(); this.getModel().beginInit();
boolean zcgj_transset = (boolean) this.getModel().getValue("zcgj_transset");//按入库运费结算
DynamicObject contattr = (DynamicObject) this.getModel().getValue("contattr");//合同属性 DynamicObject contattr = (DynamicObject) this.getModel().getValue("contattr");//合同属性
if (contattr == null) { if (contattr == null) {
return; return;
@ -242,6 +264,23 @@ public class CostAllocatorBillPlugin extends AbstractFormPlugin {
processAllocEntityCollection.add(newProcessAllocEntity); processAllocEntityCollection.add(newProcessAllocEntity);
} }
if (zcgj_transset) {
DynamicObjectCollection expensesummaryCollection = ecma_materialInBill.getDynamicObjectCollection("zcgj_expensesummary");//费用汇总
for (DynamicObject entryEntity : expensesummaryCollection) {
boolean zcgj_isfreightline = entryEntity.getBoolean("zcgj_isfreightline");//运费行
if (!zcgj_isfreightline) {
continue;
}
DynamicObject newProcessAllocEntity = new DynamicObject(processAllocEntityType);
newProcessAllocEntity.set("zcgj_pa_amount", entryEntity.get("zcgj_pa_amount"));//价税合计-价税合计
newProcessAllocEntity.set("zcgj_amountnotax", entryEntity.get("zcgj_amountnotax"));//不含税金额-不含税金额
newProcessAllocEntity.set("zcgj_rateval", entryEntity.get("zcgj_rateval"));//税率%-税率%
newProcessAllocEntity.set("zcgj_taxamt", entryEntity.get("zcgj_taxamt"));//税额-税额
newProcessAllocEntity.set("zcgj_expenseitem", entryEntity.get("zcgj_expenseitem"));//费用项目-费用项目
processAllocEntityCollection.add(newProcessAllocEntity);
}
}
} }
} }