当前单价变动提醒
This commit is contained in:
parent
83cb4ad7d5
commit
f5538eda9f
|
@ -193,17 +193,22 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin
|
|||
private void PriceChangedWarn(BigDecimal oldPrice, BigDecimal newPrice , int rowIndex, int parentRowIndex) {
|
||||
String resname = (String)this.getModel().getValue("resname", rowIndex, parentRowIndex);
|
||||
// String desc = (String)this.getModel().getValue("desc", rowIndex, parentRowIndex);
|
||||
//设置说明字段的必录属性
|
||||
TextEdit descEdit = this.getView().getControl("desc");
|
||||
if((newPrice.compareTo(oldPrice.multiply(new BigDecimal(2)))>=0)||
|
||||
(newPrice.compareTo(oldPrice.multiply(new BigDecimal(0.5)))<=0)){
|
||||
this.getView().showTipNotification(
|
||||
"请注意,清单项:"+resname+"的单价变动较大,\n" +
|
||||
" 请检查是否存在错误",5000);
|
||||
//设置说明字段的必录属性
|
||||
TextEdit descEdit = this.getView().getControl("desc");
|
||||
|
||||
if(descEdit != null){
|
||||
descEdit.setMustInput(true);
|
||||
}
|
||||
|
||||
}else{
|
||||
if(descEdit != null){
|
||||
descEdit.setMustInput(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -251,18 +251,21 @@ public class InContractMeasurementBillEditPlugin extends InContractMeasureBillEd
|
|||
private void PriceChangedWarn(BigDecimal oldPrice, BigDecimal newPrice , int rowIndex, int parentRowIndex) {
|
||||
String resname = (String)this.getModel().getValue("resname", rowIndex, parentRowIndex);
|
||||
// String desc = (String)this.getModel().getValue("desc", rowIndex, parentRowIndex);
|
||||
//设置说明字段的必录属性
|
||||
TextEdit descEdit = this.getView().getControl("desc");
|
||||
if((newPrice.compareTo(oldPrice.multiply(new BigDecimal(2)))>=0)||
|
||||
(newPrice.compareTo(oldPrice.multiply(new BigDecimal(0.5)))<=0)){
|
||||
this.getView().showTipNotification(
|
||||
"请注意,清单项:"+resname+"的单价变动较大,\n" +
|
||||
" 请检查是否存在错误",5000);
|
||||
//设置说明字段的必录属性
|
||||
TextEdit descEdit = this.getView().getControl("desc");
|
||||
|
||||
if(descEdit != null){
|
||||
descEdit.setMustInput(true);
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
if(descEdit != null){
|
||||
descEdit.setMustInput(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue