优化代码 付款申请校验取消 合同计量优化
This commit is contained in:
parent
82805a2a04
commit
6a5ea5764b
|
@ -40,9 +40,9 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin
|
|||
BigDecimal taxPrice = (BigDecimal) this.getModel().getValue("curtaxprice", rowIndex, parentRowIndex);
|
||||
BigDecimal amount = taxPrice.multiply(qty);
|
||||
this.getModel().setValue("thisoftaxmount", amount, rowIndex, parentRowIndex);
|
||||
// if (this.isInContract()) {
|
||||
if (this.isInContract()) {
|
||||
this.countPercent(rowIndex, parentRowIndex);
|
||||
// }
|
||||
}
|
||||
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@ public class InContractMeasurementBillEditPlugin extends InContractMeasureBillEd
|
|||
BigDecimal taxPrice = (BigDecimal) this.getModel().getValue("curtaxprice", rowIndex, parentRowIndex);
|
||||
BigDecimal amount = taxPrice.multiply(qty);
|
||||
this.getModel().setValue("thisoftaxmount", amount, rowIndex, parentRowIndex);
|
||||
// if (this.isInContract()) {
|
||||
if (this.isInContract()) {
|
||||
this.countPercent(rowIndex, parentRowIndex);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package zcgj.zcdev.zcdev.pr.plugin.operate;
|
||||
|
||||
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
||||
import kd.bos.entity.validate.AbstractValidator;
|
||||
import kd.ec.contract.opplugin.fund.PaymentApplyFundOp;
|
||||
import kd.ec.contract.opplugin.fund.validator.PaymentMaxAmountValidator;
|
||||
import kd.ec.contract.opplugin.validator.ContractMeasureValidator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PaymentApplyFundExtOp extends PaymentApplyFundOp {
|
||||
|
||||
@Override
|
||||
public void onAddValidators(AddValidatorsEventArgs e) {
|
||||
super.onAddValidators(e);
|
||||
List<AbstractValidator> validators = e.getValidators();
|
||||
// 删除标品校验器
|
||||
validators.removeIf(validator -> validator instanceof PaymentMaxAmountValidator);
|
||||
|
||||
// 添加定制二开的校验器(位置放第一位,优先执行)
|
||||
// validators.add(0, new ContractMeasurementValidator());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue