fix:
1.外销合同签订日期默认当前时间
This commit is contained in:
parent
ddb4cdb124
commit
dff38048ab
@ -32,6 +32,10 @@ public class XSalesOrderFromEdit extends AbstractBillPlugIn {
|
||||
super.afterBindData(e);
|
||||
SplitContainer splitContainer = this.getControl("yem_splitcontainerap");
|
||||
splitContainer.setCollapse("yem_splitpanelap1", true);
|
||||
Object yemSigndate = this.getModel().getValue("yem_signdate");
|
||||
if (yemSigndate == null) {
|
||||
this.getModel().setValue("yem_signdate", new Date());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -81,6 +85,7 @@ public class XSalesOrderFromEdit extends AbstractBillPlugIn {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDeleteRow(BeforeDeleteRowEventArgs e) {
|
||||
super.beforeDeleteRow(e);
|
||||
@ -89,21 +94,15 @@ public class XSalesOrderFromEdit extends AbstractBillPlugIn {
|
||||
String name = e.getEntryProp().getName();
|
||||
int[] rowIndexs = e.getRowIndexs();
|
||||
if ("yem_es_materialinfo".equals(name)) {
|
||||
for(int rowIndex : rowIndexs){
|
||||
Long yem_sourceentryid = (Long)model.getValue("yem_sourceentryid",rowIndex);
|
||||
List<BFRow> loadSourceRowIds = BFTrackerServiceHelper.loadSourceRowIds("yem_es_salesorder", name,new Long[]{yem_sourceentryid} );
|
||||
List<BFRow> loadTargetRowIds = BFTrackerServiceHelper.loadTargetRowIds("yem_es_salesorder", name,new Long[]{yem_sourceentryid} );
|
||||
if(loadTargetRowIds.size() > 0) {
|
||||
for (int rowIndex : rowIndexs) {
|
||||
Long yem_sourceentryid = (Long) model.getValue("yem_sourceentryid", rowIndex);
|
||||
List<BFRow> loadSourceRowIds = BFTrackerServiceHelper.loadSourceRowIds("yem_es_salesorder", name, new Long[]{yem_sourceentryid});
|
||||
List<BFRow> loadTargetRowIds = BFTrackerServiceHelper.loadTargetRowIds("yem_es_salesorder", name, new Long[]{yem_sourceentryid});
|
||||
if (loadTargetRowIds.size() > 0) {
|
||||
e.setCancel(true);//阻断增行
|
||||
view.showTipNotification("该分录已存在下游,禁止删除。");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterCreateNewData(EventObject e) {
|
||||
super.afterCreateNewData(e);
|
||||
this.getModel().setValue("yem_signdate",new Date());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user