feat:信保回填,合同回款金额必录
This commit is contained in:
parent
c99aa0488a
commit
84314ea5f4
@ -123,14 +123,33 @@ public class CreditBackFillEdit extends AbstractFormPlugin {
|
||||
Control control = (Control) e.getSource();
|
||||
String key = control.getKey();
|
||||
if ("btnok".equals(key)) {
|
||||
|
||||
if (!beforeOkOperationValidator()) {
|
||||
return;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
IFormView view = this.getView();
|
||||
IDataModel model = this.getModel();
|
||||
DynamicObject dataEntity = model.getDataEntity(true);
|
||||
|
||||
DynamicObjectCollection c = dataEntity.getDynamicObjectCollection("yem_creditentry");
|
||||
for (DynamicObject d : c) {
|
||||
int par = c.indexOf(d);
|
||||
DynamicObjectCollection subC = d.getDynamicObjectCollection("yem_crecollection");
|
||||
for (DynamicObject subD : subC) {
|
||||
int son = subC.indexOf(subD);
|
||||
BigDecimal contractpayamt_e = subD.getBigDecimal("yem_contractpayamt_e");
|
||||
if (contractpayamt_e.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
sb.append(String.format("请填写明细信息第 %s 行,信保收款明细第 %s 行 合同回款金额!", par + 1, son + 1)).append("\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sb.length() > 0) {
|
||||
view.showMessage(sb.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
IFormView parentView = view.getParentView();
|
||||
IDataModel parentModel = parentView.getModel();
|
||||
DynamicObject parentDataEntity = parentModel.getDataEntity(true);
|
||||
|
Loading…
Reference in New Issue
Block a user