Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
42eb31e767
|
@ -8,6 +8,7 @@ import kd.bos.form.CloseCallBack;
|
||||||
import kd.bos.form.ShowFormHelper;
|
import kd.bos.form.ShowFormHelper;
|
||||||
import kd.bos.list.ListShowParameter;
|
import kd.bos.list.ListShowParameter;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.ec.contract.common.enums.PriceAdjustModeEnum;
|
||||||
import kd.ec.contract.formplugin.ContractMeasureBillEditPlugin;
|
import kd.ec.contract.formplugin.ContractMeasureBillEditPlugin;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -28,10 +29,10 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin
|
||||||
BigDecimal totalqty = (BigDecimal) this.getModel().getValue("totalqty", rowIndex, parentRowIndex);
|
BigDecimal totalqty = (BigDecimal) this.getModel().getValue("totalqty", rowIndex, parentRowIndex);
|
||||||
BigDecimal preQty = (BigDecimal) this.getModel().getValue("preqty", rowIndex, parentRowIndex);
|
BigDecimal preQty = (BigDecimal) this.getModel().getValue("preqty", rowIndex, parentRowIndex);
|
||||||
BigDecimal balanceQty = totalqty.subtract(preQty);
|
BigDecimal balanceQty = totalqty.subtract(preQty);
|
||||||
if (qty.compareTo(balanceQty) > 0) {
|
// if (qty.compareTo(balanceQty) > 0) {
|
||||||
// this.getView().showMessage(String.format(ResManager.loadKDString("本期计量数量不能超过%s(总数量-期初累计计量数量)。", "ContractMeasureBillEditPlugin_4", "ec-contract-formplugin", new Object[0]), balanceQty.intValue()));
|
//// this.getView().showMessage(String.format(ResManager.loadKDString("本期计量数量不能超过%s(总数量-期初累计计量数量)。", "ContractMeasureBillEditPlugin_4", "ec-contract-formplugin", new Object[0]), balanceQty.intValue()));
|
||||||
// this.getModel().setValue("thisqty", BigDecimal.ZERO, rowIndex, parentRowIndex);
|
//// this.getModel().setValue("thisqty", BigDecimal.ZERO, rowIndex, parentRowIndex);
|
||||||
} else {
|
// } else {
|
||||||
this.getModel().setValue("lstqty", preQty.add(qty), rowIndex, parentRowIndex);
|
this.getModel().setValue("lstqty", preQty.add(qty), rowIndex, parentRowIndex);
|
||||||
BigDecimal taxPrice = (BigDecimal) this.getModel().getValue("curtaxprice", rowIndex, parentRowIndex);
|
BigDecimal taxPrice = (BigDecimal) this.getModel().getValue("curtaxprice", rowIndex, parentRowIndex);
|
||||||
BigDecimal amount = taxPrice.multiply(qty);
|
BigDecimal amount = taxPrice.multiply(qty);
|
||||||
|
@ -40,7 +41,7 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin
|
||||||
this.countPercent(rowIndex, parentRowIndex);
|
this.countPercent(rowIndex, parentRowIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -80,6 +81,32 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin
|
||||||
@Override
|
@Override
|
||||||
public void propertyChanged(PropertyChangedArgs e) {
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
super.propertyChanged(e);
|
super.propertyChanged(e);
|
||||||
|
|
||||||
|
String propName = e.getProperty().getName();
|
||||||
|
ChangeData changeData = e.getChangeSet()[0];
|
||||||
|
if (StringUtils.equals(propName, "contract")) {
|
||||||
|
this.onContractChanged(changeData);
|
||||||
|
} else if (StringUtils.equals(propName, "period")) {
|
||||||
|
this.onPeriodChanged(changeData);
|
||||||
|
} else if (!StringUtils.equals(propName, "begindate") && !StringUtils.equals(propName, "enddate")) {
|
||||||
|
if (StringUtils.equals(propName, "thisqty")) {
|
||||||
|
this.onThisQtyChanged(changeData);
|
||||||
|
} else if (StringUtils.equals(propName, "thisamount")) {
|
||||||
|
this.onThisAmountChanged(changeData);
|
||||||
|
} else if (StringUtils.equals(propName, "thisoftaxmount")) {
|
||||||
|
this.onThisOfTaxAmountChanged(changeData);
|
||||||
|
} else if (StringUtils.equals(propName, "thistax")) {
|
||||||
|
this.onThisTaxChanged(changeData);
|
||||||
|
} else if (StringUtils.equals(propName, "ismeasurebymatin")) {
|
||||||
|
this.isMeasureByMaterialInChanged(changeData);
|
||||||
|
} else if (StringUtils.equals(propName, PriceAdjustModeEnum.ADJUST_AMOUNT.getValue())) {
|
||||||
|
this.onAdjustAmountChange(changeData);
|
||||||
|
} else if (StringUtils.equals(propName, PriceAdjustModeEnum.ADJUST_TAX.getValue())) {
|
||||||
|
this.onAdjustTaxChange(changeData);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.onDateChanged(changeData, propName);
|
||||||
|
}
|
||||||
// String name = e.getProperty().getName();
|
// String name = e.getProperty().getName();
|
||||||
// ChangeData changeData = e.getChangeSet()[0];
|
// ChangeData changeData = e.getChangeSet()[0];
|
||||||
// int rowIndex = changeData.getRowIndex();
|
// int rowIndex = changeData.getRowIndex();
|
||||||
|
@ -88,49 +115,49 @@ public class ContractEeasurementBillPlugin extends ContractMeasureBillEditPlugin
|
||||||
// BigDecimal currentprice = BigDecimal.ZERO;//当前单价
|
// BigDecimal currentprice = BigDecimal.ZERO;//当前单价
|
||||||
// BigDecimal qty = BigDecimal.ZERO;//数量
|
// BigDecimal qty = BigDecimal.ZERO;//数量
|
||||||
// BigDecimal taxrate = BigDecimal.ZERO;//税率
|
// BigDecimal taxrate = BigDecimal.ZERO;//税率
|
||||||
// if(name.equals("curtaxprice")||name.equals("currentprice")) {
|
//// if(name.equals("curtaxprice")||name.equals("currentprice")) {
|
||||||
// if (parentRowIndex>=0&&rowIndex>=0){
|
//// if (parentRowIndex>=0&&rowIndex>=0){
|
||||||
// Object curtaxpriceobj = this.getModel().getValue("curtaxprice", rowIndex, parentRowIndex);
|
//// Object curtaxpriceobj = this.getModel().getValue("curtaxprice", rowIndex, parentRowIndex);
|
||||||
// if (curtaxpriceobj != null) {
|
//// if (curtaxpriceobj != null) {
|
||||||
// curtaxprice = (BigDecimal) curtaxpriceobj;
|
//// curtaxprice = (BigDecimal) curtaxpriceobj;
|
||||||
// }
|
//// }
|
||||||
// Object currentpriceobj = this.getModel().getValue("currentprice", rowIndex, parentRowIndex);
|
//// Object currentpriceobj = this.getModel().getValue("currentprice", rowIndex, parentRowIndex);
|
||||||
// if (currentpriceobj != null) {
|
//// if (currentpriceobj != null) {
|
||||||
// currentprice = (BigDecimal) currentpriceobj;
|
//// currentprice = (BigDecimal) currentpriceobj;
|
||||||
// ;
|
//// ;
|
||||||
// }
|
//// }
|
||||||
// Object totalqtyibj = this.getModel().getValue("totalqty", rowIndex, parentRowIndex);
|
//// Object totalqtyibj = this.getModel().getValue("totalqty", rowIndex, parentRowIndex);
|
||||||
// if (totalqtyibj != null) {
|
//// if (totalqtyibj != null) {
|
||||||
// qty = (BigDecimal) totalqtyibj;
|
//// qty = (BigDecimal) totalqtyibj;
|
||||||
// }
|
//// }
|
||||||
// Object entrytaxrateobj = this.getModel().getValue("entrytaxrate", rowIndex, parentRowIndex);
|
//// Object entrytaxrateobj = this.getModel().getValue("entrytaxrate", rowIndex, parentRowIndex);
|
||||||
// if (entrytaxrateobj != null) {
|
//// if (entrytaxrateobj != null) {
|
||||||
// BigDecimal entrytaxrate = (BigDecimal) entrytaxrateobj;
|
//// BigDecimal entrytaxrate = (BigDecimal) entrytaxrateobj;
|
||||||
// taxrate = entrytaxrate.divide(new BigDecimal(100)).add(new BigDecimal(1));
|
//// taxrate = entrytaxrate.divide(new BigDecimal(100)).add(new BigDecimal(1));
|
||||||
// }
|
//// }
|
||||||
// if (name.equals("curtaxprice") && curtaxprice.compareTo(new BigDecimal(0))>0) {
|
//// if (name.equals("curtaxprice") && curtaxprice.compareTo(new BigDecimal(0))>0) {
|
||||||
// BigDecimal divide = curtaxprice.divide(taxrate,6, RoundingMode.HALF_UP);//当前单价
|
//// BigDecimal divide = curtaxprice.divide(taxrate,6, RoundingMode.HALF_UP);//当前单价
|
||||||
// BigDecimal multiply = divide.multiply(qty);//当前金额
|
//// BigDecimal multiply = divide.multiply(qty);//当前金额
|
||||||
// BigDecimal multiply1 = curtaxprice.multiply(qty);//当前价税合计
|
//// BigDecimal multiply1 = curtaxprice.multiply(qty);//当前价税合计
|
||||||
// BigDecimal subtract = multiply1.subtract(multiply);//当前税额
|
//// BigDecimal subtract = multiply1.subtract(multiply);//当前税额
|
||||||
//// this.getModel().getDataEntity().set("currentprice",divide, rowIndex, parentRowIndex);
|
////// this.getModel().getDataEntity().set("currentprice",divide, rowIndex, parentRowIndex);
|
||||||
// this.getModel().setValue("currentprice",divide, rowIndex, parentRowIndex);//当前单价
|
//// this.getModel().setValue("currentprice",divide, rowIndex, parentRowIndex);//当前单价
|
||||||
// this.getModel().setValue("currentamt", multiply,rowIndex, parentRowIndex);//当前金额
|
//// this.getModel().setValue("currentamt", multiply,rowIndex, parentRowIndex);//当前金额
|
||||||
// this.getModel().setValue("currenttaxamt", subtract,rowIndex, parentRowIndex);//当前税额
|
//// this.getModel().setValue("currenttaxamt", subtract,rowIndex, parentRowIndex);//当前税额
|
||||||
// this.getModel().setValue("currentoftax", multiply1,rowIndex, parentRowIndex);//当前价税合计
|
//// this.getModel().setValue("currentoftax", multiply1,rowIndex, parentRowIndex);//当前价税合计
|
||||||
// } else if (name.equals("currentprice")&¤tprice.compareTo(new BigDecimal(0))>0) {
|
//// } else if (name.equals("currentprice")&¤tprice.compareTo(new BigDecimal(0))>0) {
|
||||||
// BigDecimal divide = currentprice.multiply(taxrate);//当前含税单价
|
//// BigDecimal divide = currentprice.multiply(taxrate);//当前含税单价
|
||||||
// BigDecimal multiply = currentprice.multiply(qty);//当前金额
|
//// BigDecimal multiply = currentprice.multiply(qty);//当前金额
|
||||||
// BigDecimal multiply1 = divide.multiply(qty);//当前价税合计
|
//// BigDecimal multiply1 = divide.multiply(qty);//当前价税合计
|
||||||
// BigDecimal subtract = multiply1.subtract(multiply);//当前税额
|
//// BigDecimal subtract = multiply1.subtract(multiply);//当前税额
|
||||||
// this.getModel().setValue("curtaxprice",divide, rowIndex, parentRowIndex);//当前含税单价
|
//// this.getModel().setValue("curtaxprice",divide, rowIndex, parentRowIndex);//当前含税单价
|
||||||
// this.getModel().setValue("currentamt", multiply,rowIndex, parentRowIndex);//当前金额
|
//// this.getModel().setValue("currentamt", multiply,rowIndex, parentRowIndex);//当前金额
|
||||||
// this.getModel().setValue("currenttaxamt",multiply1, rowIndex, parentRowIndex);//当前税额
|
//// this.getModel().setValue("currenttaxamt",multiply1, rowIndex, parentRowIndex);//当前税额
|
||||||
// this.getModel().setValue("currentoftax",subtract, rowIndex, parentRowIndex);//当前价税合计
|
//// this.getModel().setValue("currentoftax",subtract, rowIndex, parentRowIndex);//当前价税合计
|
||||||
// }
|
//// }
|
||||||
// this.getView().updateView();
|
//// this.getView().updateView();
|
||||||
// }
|
//// }
|
||||||
//
|
////
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,16 +26,16 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug
|
||||||
@Override
|
@Override
|
||||||
public void afterCreateNewData(EventObject e) {
|
public void afterCreateNewData(EventObject e) {
|
||||||
super.afterCreateNewData(e);
|
super.afterCreateNewData(e);
|
||||||
Object changetype = this.getModel().getValue("changetype");
|
// Object changetype = this.getModel().getValue("changetype");
|
||||||
if(changetype!=null){
|
// if(changetype!=null){
|
||||||
if(changetype.toString().equals("03")){
|
// if(changetype.toString().equals("03")){
|
||||||
this.getView().setVisible(true,"zcgj_partb");
|
// this.getView().setVisible(true,"zcgj_partb");
|
||||||
this.getView().setVisible(true,"zcgj_otherpart");
|
// this.getView().setVisible(true,"zcgj_otherpart");
|
||||||
}else {
|
// }else {
|
||||||
this.getView().setVisible(false,"zcgj_partb");
|
// this.getView().setVisible(false,"zcgj_partb");
|
||||||
this.getView().setVisible(false,"zcgj_otherpart");
|
// this.getView().setVisible(false,"zcgj_otherpart");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,7 +44,7 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug
|
||||||
// 注册按钮点击事件
|
// 注册按钮点击事件
|
||||||
// this.addClickListeners("bar_audit");
|
// this.addClickListeners("bar_audit");
|
||||||
// this.addItemClickListeners("bar_audit");
|
// this.addItemClickListeners("bar_audit");
|
||||||
// Button button = this.getView().getControl("bar_audit");
|
// Button button = this.getView().getControl("bar_save");
|
||||||
// button.addClickListener(this);
|
// button.addClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,35 +67,35 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug
|
||||||
String key = source.getKey();
|
String key = source.getKey();
|
||||||
if (StringUtils.equals("bar_audit", key)) {
|
if (StringUtils.equals("bar_audit", key)) {
|
||||||
// 在此添加业务逻辑
|
// 在此添加业务逻辑
|
||||||
Object changetype = this.getModel().getValue("changetype");
|
// Object changetype = this.getModel().getValue("changetype");
|
||||||
if (changetype != null) {
|
// if (changetype != null) {
|
||||||
if (changetype.toString().equals("03")) {
|
// if (changetype.toString().equals("03")) {
|
||||||
Object contract = this.getModel().getValue("contract");
|
// Object contract = this.getModel().getValue("contract");
|
||||||
DynamicObject contractInfo = (DynamicObject) contract;
|
// DynamicObject contractInfo = (DynamicObject) contract;
|
||||||
String billName = contractInfo.getDataEntityType().getName();
|
// String billName = contractInfo.getDataEntityType().getName();
|
||||||
DynamicObject zcgjpartb = (DynamicObject)this.getModel().getValue("zcgj_partb");
|
// DynamicObject zcgjpartb = (DynamicObject)this.getModel().getValue("zcgj_partb");
|
||||||
Object zcgjOtherpart = this.getModel().getValue("zcgj_otherpart");
|
// Object zcgjOtherpart = this.getModel().getValue("zcgj_otherpart");
|
||||||
if (billName.equals("ec_out_contract_f7")) {
|
// if (billName.equals("ec_out_contract_f7")) {
|
||||||
QFilter f1 = new QFilter("number", "=", contractInfo.getString("number"));
|
// QFilter f1 = new QFilter("number", "=", contractInfo.getString("number"));
|
||||||
DynamicObject outContractF7 = BusinessDataServiceHelper.loadSingle("ec_out_contract_f7", new QFilter[]{f1});
|
// DynamicObject outContractF7 = BusinessDataServiceHelper.loadSingle("ec_out_contract_f7", new QFilter[]{f1});
|
||||||
outContractF7.set("partb",zcgjpartb);
|
// outContractF7.set("partb",zcgjpartb);
|
||||||
OperationResult saveOperationResult = SaveServiceHelper.saveOperate("ec_out_contract_f7", new DynamicObject[]{outContractF7}, null);//支出合同F7实体
|
// OperationResult saveOperationResult = SaveServiceHelper.saveOperate("ec_out_contract_f7", new DynamicObject[]{outContractF7}, null);//支出合同F7实体
|
||||||
|
//
|
||||||
QFilter f2 = new QFilter("billno", "=", contractInfo.getString("number"));
|
// QFilter f2 = new QFilter("billno", "=", contractInfo.getString("number"));
|
||||||
DynamicObject outContract = BusinessDataServiceHelper.loadSingle("ec_out_contract", new QFilter[]{f2});
|
// DynamicObject outContract = BusinessDataServiceHelper.loadSingle("ec_out_contract", new QFilter[]{f2});
|
||||||
outContract.set("partb",zcgjpartb);
|
// outContract.set("partb",zcgjpartb);
|
||||||
if(zcgjOtherpart!=null){
|
// if(zcgjOtherpart!=null){
|
||||||
DynamicObjectCollection otherpart = (DynamicObjectCollection) this.getModel().getValue("zcgj_otherpart");
|
// DynamicObjectCollection otherpart = (DynamicObjectCollection) this.getModel().getValue("zcgj_otherpart");
|
||||||
outContract.set("otherpart",otherpart);
|
// outContract.set("otherpart",otherpart);
|
||||||
outContract.set("ismulticontract",true);
|
// outContract.set("ismulticontract",true);
|
||||||
}
|
// }
|
||||||
OperationResult saveOperationResult1 = SaveServiceHelper.saveOperate("ec_out_contract", new DynamicObject[]{outContractF7}, null);//支出合同实体
|
// OperationResult saveOperationResult1 = SaveServiceHelper.saveOperate("ec_out_contract", new DynamicObject[]{outContractF7}, null);//支出合同实体
|
||||||
System.out.println(saveOperationResult1);
|
// System.out.println(saveOperationResult1);
|
||||||
}else{
|
// }else{
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
evt.setCancel(true); // 取消后续处理,将不会再触发click事件
|
evt.setCancel(true); // 取消后续处理,将不会再触发click事件
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,17 +104,17 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug
|
||||||
public void propertyChanged(PropertyChangedArgs e) {
|
public void propertyChanged(PropertyChangedArgs e) {
|
||||||
super.propertyChanged(e);
|
super.propertyChanged(e);
|
||||||
String name = e.getProperty().getName();
|
String name = e.getProperty().getName();
|
||||||
if(name.equals("changetype")){
|
// if(name.equals("changetype")){
|
||||||
Object changetype = this.getModel().getValue("changetype");
|
// Object changetype = this.getModel().getValue("changetype");
|
||||||
if(changetype!=null){
|
// if(changetype!=null){
|
||||||
if(changetype.toString().equals("03")){
|
// if(changetype.toString().equals("03")){
|
||||||
this.getView().setVisible(true,"zcgj_partb");
|
// this.getView().setVisible(true,"zcgj_partb");
|
||||||
this.getView().setVisible(true,"zcgj_otherpart");
|
// this.getView().setVisible(true,"zcgj_otherpart");
|
||||||
}else {
|
// }else {
|
||||||
this.getView().setVisible(false,"zcgj_partb");
|
// this.getView().setVisible(false,"zcgj_partb");
|
||||||
this.getView().setVisible(false,"zcgj_otherpart");
|
// this.getView().setVisible(false,"zcgj_otherpart");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -28,13 +28,14 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
|
||||||
|
|
||||||
// contractType="ck";
|
// contractType="ck";
|
||||||
if (contractType != null) {
|
if (contractType != null) {
|
||||||
if (contractType.toString().equals("wzcg")) {//物资采购
|
if (contractType.toString().equals("wzcg01")) {//物资采购
|
||||||
this.setResourceTypeStyle("material");
|
this.setResourceTypeStyle("material");
|
||||||
this.afterSelectedTag("material");
|
this.afterSelectedTag("material");
|
||||||
} else if (contractType.toString().equals("sbcg")) {//设备采购
|
} else if (contractType.toString().equals("sbcg")) {//设备采购
|
||||||
this.setResourceTypeStyle("equipment");
|
this.setResourceTypeStyle("equipment");
|
||||||
this.afterSelectedTag("equipment");
|
this.afterSelectedTag("equipment");
|
||||||
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")) {//产出物
|
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")|| contractType.toString().equals("ck")||
|
||||||
|
contractType.toString().equals("zyfbcc")|| contractType.toString().equals("jjbc")) {//产出物
|
||||||
this.setResourceTypeStyle("turnover");
|
this.setResourceTypeStyle("turnover");
|
||||||
this.afterSelectedTag("turnover");
|
this.afterSelectedTag("turnover");
|
||||||
}else {
|
}else {
|
||||||
|
@ -54,17 +55,19 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
|
||||||
Map<String, Object> customParams = formShowParameter.getCustomParams();
|
Map<String, Object> customParams = formShowParameter.getCustomParams();
|
||||||
Object contractType = customParams.get("contractType");
|
Object contractType = customParams.get("contractType");
|
||||||
String firstOpen = this.getPageCache().get("firstOpen");
|
String firstOpen = this.getPageCache().get("firstOpen");
|
||||||
if (firstOpen == null) {
|
if (firstOpen != null) {
|
||||||
this.getPageCache().put("firstOpen", "false");
|
// this.getPageCache().put("firstOpen", "false");
|
||||||
// contractType = "ck";
|
// contractType = "ck";
|
||||||
|
// this.getPageCache().remove("firstOpen");
|
||||||
if (contractType != null) {
|
if (contractType != null) {
|
||||||
if (contractType.toString().equals("wzcg")) {//物资采购
|
if (contractType.toString().equals("wzcg01")) {//物资采购
|
||||||
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
|
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
|
||||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"});
|
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"});
|
||||||
} else if (contractType.toString().equals("sbcg")) {//设备采购
|
} else if (contractType.toString().equals("sbcg")) {//设备采购
|
||||||
this.getView().setVisible(true, new String[]{"flexpanelequipment"});
|
this.getView().setVisible(true, new String[]{"flexpanelequipment"});
|
||||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"});
|
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"});
|
||||||
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")) {//产出物
|
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")|| contractType.toString().equals("ck")||
|
||||||
|
contractType.toString().equals("zyfbcc")|| contractType.toString().equals("jjbc")) {//产出物
|
||||||
this.getView().setVisible(true, new String[]{"flexpanelturnover"});
|
this.getView().setVisible(true, new String[]{"flexpanelturnover"});
|
||||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"});
|
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"});
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,13 +26,9 @@ public class InContractSettlementValidator extends InContractSettleValidator {
|
||||||
if (contractTemp == null) {
|
if (contractTemp == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long id = dataEntity.getDataEntity().getLong("id");
|
DynamicObjectCollection itementry = dataEntity.getDataEntity().getDynamicObjectCollection("itementry");
|
||||||
QFilter f1 = new QFilter("id", "=", id);
|
if (itementry != null) {
|
||||||
DynamicObject incontractsettle = BusinessDataServiceHelper.loadSingle("ec_in_contract_settle", new QFilter[]{f1});
|
if (itementry.size() == 0) {
|
||||||
if(incontractsettle!=null){
|
|
||||||
DynamicObjectCollection itementry = incontractsettle.getDynamicObjectCollection("itementry");
|
|
||||||
if(itementry == null) {
|
|
||||||
if(itementry.isEmpty()) {
|
|
||||||
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项不能为空", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项不能为空", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
||||||
}
|
}
|
||||||
DynamicObject contract = BusinessDataServiceHelper.loadSingle(dataEntity.getDataEntity().getDynamicObject("contract").getPkValue(), "ec_in_contract");
|
DynamicObject contract = BusinessDataServiceHelper.loadSingle(dataEntity.getDataEntity().getDynamicObject("contract").getPkValue(), "ec_in_contract");
|
||||||
|
@ -46,7 +42,6 @@ public class InContractSettlementValidator extends InContractSettleValidator {
|
||||||
validateAmount = !StringUtils.equals("09", contractAttr.getString("basictype"));
|
validateAmount = !StringUtils.equals("09", contractAttr.getString("basictype"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// DynamicObjectCollection payitemdetailap = incontractsettle.getDynamicObjectCollection("payitemdetailap");
|
// DynamicObjectCollection payitemdetailap = incontractsettle.getDynamicObjectCollection("payitemdetailap");
|
||||||
// if (validateAmount && settleOfTaxAmount.compareTo(totalOfTaxAmount.subtract(totalSettleOfTaxAmount)) > 0) {
|
// if (validateAmount && settleOfTaxAmount.compareTo(totalOfTaxAmount.subtract(totalSettleOfTaxAmount)) > 0) {
|
||||||
// this.addErrorMessage(dataEntity, ResManager.loadKDString("本期结算价税合计不能大于合同剩余金额价税合计", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
// this.addErrorMessage(dataEntity, ResManager.loadKDString("本期结算价税合计不能大于合同剩余金额价税合计", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
||||||
|
|
|
@ -17,12 +17,8 @@ public class OutContractSettlementValidator extends OutContractSettleValidator {
|
||||||
{
|
{
|
||||||
BigDecimal settleOfTaxAmount = dataEntity.getDataEntity().getBigDecimal("settleoftaxamount");
|
BigDecimal settleOfTaxAmount = dataEntity.getDataEntity().getBigDecimal("settleoftaxamount");
|
||||||
DynamicObject contractTemp = dataEntity.getDataEntity().getDynamicObject("contract");
|
DynamicObject contractTemp = dataEntity.getDataEntity().getDynamicObject("contract");
|
||||||
long id = dataEntity.getDataEntity().getLong("id");
|
|
||||||
QFilter f1 = new QFilter("id", "=", id);
|
DynamicObjectCollection itementry = dataEntity.getDataEntity().getDynamicObjectCollection("itementry");
|
||||||
DynamicObject incontractsettle = BusinessDataServiceHelper.loadSingle("ec_in_contract_settle", new QFilter[]{f1});
|
|
||||||
if(incontractsettle!=null){
|
|
||||||
DynamicObjectCollection itementry = incontractsettle.getDynamicObjectCollection("itementry");
|
|
||||||
// DynamicObjectCollection payitemdetailap = incontractsettle.getDynamicObjectCollection("payitemdetailap");
|
|
||||||
if(itementry.isEmpty()) {
|
if(itementry.isEmpty()) {
|
||||||
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项不能为空", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
this.addErrorMessage(dataEntity, ResManager.loadKDString("支付合同项不能为空", "InContractSettleValidator_0", "ec-contract-opplugin", new Object[0]));
|
||||||
}
|
}
|
||||||
|
@ -49,8 +45,5 @@ public class OutContractSettlementValidator extends OutContractSettleValidator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue