入库单优化
This commit is contained in:
parent
2c5b990c8a
commit
3533ebc274
|
|
@ -40,11 +40,14 @@ public class ContractTreeListExtPlugin extends ContractTreeListingPlugin {
|
|||
this.getModel().setValue("isincost", true);
|
||||
BasedataEdit basedataEdit = (BasedataEdit) this.getControl("cbs");
|
||||
basedataEdit.setMustInput(false);
|
||||
this.getView().setVisible(true,"cbs");
|
||||
} else if(number.equals("wzcg01")||number.equals("sbcg")||number.equals("ZCHLX02")) {
|
||||
//合同类型-物资采购类(已禁用)或设备采购或物资采购
|
||||
this.getView().setVisible(false, new String[]{"treecbsnumber", "treecbsname", "cbs", "isincost"});//成本分解结构/成本分解结构名称/项目成本分解结构/计入成本
|
||||
this.getView().setEnable(false, "isincost");//计入成本
|
||||
this.getModel().setValue("isincost", false);//计入成本
|
||||
} else {
|
||||
this.getView().setVisible(true, "cbs");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,9 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
|||
this.getModel().setValue("entrytaxrate", bd_taxrate, rowIndex);//入库单明细-税率
|
||||
}
|
||||
}
|
||||
} else if ("zcgj_entryentity".equals(entryName)) {
|
||||
//合同进项发票信息发票分录-新增行
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -221,8 +224,8 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
|||
} else {
|
||||
this.getModel().setValue("zcgj_applidepart", null);//清空申请人部门字段
|
||||
}
|
||||
} else if ("totaloftaxamount".equals(key) || "taxamount".equals(key) || "splittype".equals(key)) {
|
||||
//入库含税总金额,税额,分摊类型
|
||||
} else if ("totaloftaxamount".equals(key) || "taxamount".equals(key) || "splittype".equals(key) || "zcgj_notraninvoice".equals(key)) {
|
||||
//入库含税总金额,税额,分摊类型,无运费发票
|
||||
if ("taxamount".equals(key)) {
|
||||
//税额
|
||||
Boolean adjustamount = (Boolean) this.getModel().getValue("adjustamount");//微调金额
|
||||
|
|
@ -385,6 +388,12 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
|||
}
|
||||
}
|
||||
setNewExpenseSummary();
|
||||
} else if ("qty".equals(key) || "price".equals(key)) {
|
||||
//数量、入库单价
|
||||
BigDecimal matAmount = (BigDecimal) this.getModel().getValue("matamount");//材料总金额
|
||||
BigDecimal transAmount = (BigDecimal) this.getModel().getValue("transamount");//总运费
|
||||
BigDecimal totalAmount = matAmount.add(transAmount);
|
||||
this.getModel().setValue("totalamount", totalAmount);//入库总金额
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,28 @@ public class OutContractValidatorSubOp extends AbstractOperationServicePlugIn {
|
|||
if (isEqSettle && eqSettleEntryCollection.size() == 0) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "设备维保类合同,按设备费用结算单结算为是,设备费用结算单明细必填!!");
|
||||
}
|
||||
DynamicObject contract = dataEntity.getDynamicObject("contract");//合同名称
|
||||
if (contract != null) {
|
||||
String priceType = contract.getString("zcgj_pricetype");//计价方式
|
||||
boolean priceTypeMatch = "zjbg".equals(priceType) || "bdlbdj".equals(priceType);
|
||||
|
||||
DynamicObject contractType = contract.getDynamicObject("contracttype");//合同类型
|
||||
boolean contractTypeMatch = false;
|
||||
if (contractType != null) {
|
||||
String contractTypeNumber = contractType.getString("number");//合同类型编号
|
||||
contractTypeMatch = "sbzl".equals(contractTypeNumber) || "zzfbzy".equals(contractTypeNumber) ||
|
||||
"lwlzy".equals(contractTypeNumber) || "lwlcc".equals(contractTypeNumber) ||
|
||||
"yslht".equals(contractTypeNumber) || "qtzclht".equals(contractTypeNumber) ||
|
||||
"qtzchtzy".equals(contractTypeNumber);
|
||||
}
|
||||
|
||||
DynamicObjectCollection processAllocEntityCollection = dataEntity.getDynamicObjectCollection("zcgj_processallocatentity");//设备费用结算分录
|
||||
boolean processAllocEmpty = processAllocEntityCollection.size() == 0;
|
||||
|
||||
if (priceTypeMatch && contractTypeMatch && processAllocEmpty) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "工序分摊必填!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue