支出合同计量 当前单价变更提醒
This commit is contained in:
parent
5447c0109c
commit
8d13c5bf87
|
@ -139,12 +139,24 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin
|
||||||
doLockFieldWithPriceAdjustMode((PriceAdjustModeEnum)null);
|
doLockFieldWithPriceAdjustMode((PriceAdjustModeEnum)null);
|
||||||
} else if (StringUtils.equals(propName,"currentprice")) {
|
} else if (StringUtils.equals(propName,"currentprice")) {
|
||||||
BigDecimal oldValue = (BigDecimal)changeData.getOldValue();
|
BigDecimal oldValue = (BigDecimal)changeData.getOldValue();
|
||||||
if(oldValue.compareTo(new BigDecimal(0)) == 0){return;}
|
if(oldValue.compareTo(new BigDecimal(0)) == 0){
|
||||||
|
BigDecimal initialValue = (BigDecimal) changeData.getNewValue();
|
||||||
|
this.getView().getPageCache().put("currentprice", initialValue.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String initialValue = this.getView().getPageCache().get("currentprice");
|
||||||
|
BigDecimal initialvalue = new BigDecimal(initialValue);
|
||||||
BigDecimal newValue = (BigDecimal)changeData.getNewValue();
|
BigDecimal newValue = (BigDecimal)changeData.getNewValue();
|
||||||
PriceChangedWarn(oldValue,newValue,rowIndex,parentRowIndex);
|
PriceChangedWarn(initialvalue,newValue,rowIndex,parentRowIndex);
|
||||||
} else if (StringUtils.equals(propName, "thisqty") || StringUtils.equals(propName, "thisoftaxmount")) {
|
} else if (StringUtils.equals(propName, "thisqty") || StringUtils.equals(propName, "thisoftaxmount")) {
|
||||||
BigDecimal oldValue = (BigDecimal)changeData.getOldValue();
|
BigDecimal oldValue = (BigDecimal)changeData.getOldValue();
|
||||||
if(oldValue.compareTo(new BigDecimal(0)) == 0){return;}
|
if(oldValue.compareTo(new BigDecimal(0)) == 0){
|
||||||
|
BigDecimal initialValue = (BigDecimal) changeData.getNewValue();
|
||||||
|
this.getView().getPageCache().put("currentprice", initialValue.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String initialValue = this.getView().getPageCache().get("currentprice");
|
||||||
|
BigDecimal initialvalue = new BigDecimal(initialValue);
|
||||||
BigDecimal thisqty = (BigDecimal)this.getModel().getValue("thisqty", rowIndex, parentRowIndex);
|
BigDecimal thisqty = (BigDecimal)this.getModel().getValue("thisqty", rowIndex, parentRowIndex);
|
||||||
BigDecimal thisoftaxmount =(BigDecimal) this.getModel().getValue("thisoftaxmount", rowIndex, parentRowIndex);
|
BigDecimal thisoftaxmount =(BigDecimal) this.getModel().getValue("thisoftaxmount", rowIndex, parentRowIndex);
|
||||||
BigDecimal totalqty =(BigDecimal) this.getModel().getValue("totalqty", rowIndex, parentRowIndex);
|
BigDecimal totalqty =(BigDecimal) this.getModel().getValue("totalqty", rowIndex, parentRowIndex);
|
||||||
|
@ -165,8 +177,9 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin
|
||||||
listentry.set("currenttaxamt",curtaxprice.multiply(totalqty).subtract(currentprice.multiply(totalqty)));
|
listentry.set("currenttaxamt",curtaxprice.multiply(totalqty).subtract(currentprice.multiply(totalqty)));
|
||||||
listentry.set("currentoftax",curtaxprice.multiply(totalqty));
|
listentry.set("currentoftax",curtaxprice.multiply(totalqty));
|
||||||
this.getView().updateView("listentry");
|
this.getView().updateView("listentry");
|
||||||
|
PriceChangedWarn(initialvalue,currentprice,rowIndex, parentRowIndex);
|
||||||
}
|
}
|
||||||
PriceChangedWarn(oldPrice,currentprice,rowIndex, parentRowIndex);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,16 +188,28 @@ public class InContractMeasurementBillEditPlugin extends InContractMeasureBillEd
|
||||||
if (StringUtils.equals(propName, "zcgj_hsjell")) {
|
if (StringUtils.equals(propName, "zcgj_hsjell")) {
|
||||||
doLockFieldWithPriceAdjustMode((PriceAdjustModeEnum)null);
|
doLockFieldWithPriceAdjustMode((PriceAdjustModeEnum)null);
|
||||||
} else if (StringUtils.equals(propName,"currentprice")) {
|
} else if (StringUtils.equals(propName,"currentprice")) {
|
||||||
|
// 获取初始单价
|
||||||
|
BigDecimal initialPrice = (BigDecimal) this.getModel().getValue("currentprice", rowIndex, parentRowIndex);
|
||||||
BigDecimal oldValue = (BigDecimal)changeData.getOldValue();
|
BigDecimal oldValue = (BigDecimal)changeData.getOldValue();
|
||||||
if(oldValue.compareTo(new BigDecimal(0)) == 0){return;}
|
if(oldValue.compareTo(new BigDecimal(0)) == 0){
|
||||||
|
BigDecimal initialValue = (BigDecimal) changeData.getNewValue();
|
||||||
|
this.getView().getPageCache().put("currentprice", initialValue.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String initialValue = this.getView().getPageCache().get("currentprice");
|
||||||
|
BigDecimal initialvalue = new BigDecimal(initialValue);
|
||||||
BigDecimal newValue = (BigDecimal)changeData.getNewValue();
|
BigDecimal newValue = (BigDecimal)changeData.getNewValue();
|
||||||
PriceChangedWarn(oldValue,newValue,rowIndex,parentRowIndex);
|
PriceChangedWarn(initialvalue,newValue,rowIndex,parentRowIndex);
|
||||||
} else if ( StringUtils.equals(propName, "thisoftaxmount")) {//StringUtils.equals(propName, "thisqty") ||
|
} else if ( StringUtils.equals(propName, "thisoftaxmount")) {//StringUtils.equals(propName, "thisqty") ||
|
||||||
|
BigDecimal initialPrice = (BigDecimal) this.getModel().getValue("currentprice", rowIndex, parentRowIndex);
|
||||||
BigDecimal oldValue = (BigDecimal)changeData.getOldValue();
|
BigDecimal oldValue = (BigDecimal)changeData.getOldValue();
|
||||||
if(oldValue.compareTo(new BigDecimal(0)) == 0){return;}
|
if(oldValue.compareTo(new BigDecimal(0)) == 0){
|
||||||
|
BigDecimal initialValue = (BigDecimal) changeData.getNewValue();
|
||||||
|
this.getView().getPageCache().put("currentprice", initialValue.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String initialValue = this.getView().getPageCache().get("currentprice");
|
||||||
|
BigDecimal initialvalue = new BigDecimal(initialValue);
|
||||||
|
|
||||||
BigDecimal thisqty = (BigDecimal)this.getModel().getValue("thisqty", rowIndex, parentRowIndex);//本期计量数量
|
BigDecimal thisqty = (BigDecimal)this.getModel().getValue("thisqty", rowIndex, parentRowIndex);//本期计量数量
|
||||||
BigDecimal thisoftaxmount =(BigDecimal) this.getModel().getValue("thisoftaxmount", rowIndex, parentRowIndex);//本期计量含税金额
|
BigDecimal thisoftaxmount =(BigDecimal) this.getModel().getValue("thisoftaxmount", rowIndex, parentRowIndex);//本期计量含税金额
|
||||||
|
@ -226,7 +238,7 @@ public class InContractMeasurementBillEditPlugin extends InContractMeasureBillEd
|
||||||
// this.getModel().setValue("currenttaxamt",curtaxprice.multiply(totalqty).subtract(currentprice.multiply(totalqty)),rowIndex, parentRowIndex);
|
// this.getModel().setValue("currenttaxamt",curtaxprice.multiply(totalqty).subtract(currentprice.multiply(totalqty)),rowIndex, parentRowIndex);
|
||||||
// this.getModel().setValue("currentoftax",curtaxprice.multiply(totalqty),rowIndex, parentRowIndex);
|
// this.getModel().setValue("currentoftax",curtaxprice.multiply(totalqty),rowIndex, parentRowIndex);
|
||||||
this.getView().updateView();
|
this.getView().updateView();
|
||||||
PriceChangedWarn(oldPrice,currentprice,rowIndex, parentRowIndex);
|
PriceChangedWarn(initialvalue,currentprice,rowIndex, parentRowIndex);
|
||||||
}
|
}
|
||||||
// String resname = (String)this.getModel().getValue("resname", rowIndex, parentRowIndex);
|
// String resname = (String)this.getModel().getValue("resname", rowIndex, parentRowIndex);
|
||||||
// PriceChangedWarn(oldPrice,currentprice,rowIndex, parentRowIndex);
|
// PriceChangedWarn(oldPrice,currentprice,rowIndex, parentRowIndex);
|
||||||
|
|
Loading…
Reference in New Issue