新增按钮跳过校验
This commit is contained in:
parent
5f13369891
commit
3aea51e7bd
|
|
@ -19,6 +19,9 @@ public class PayBillListPlugin extends AbstractListPlugin implements Plugin {
|
|||
@Override
|
||||
public void beforeItemClick(BeforeItemClickEvent evt) {
|
||||
super.beforeItemClick(evt);
|
||||
|
||||
String key = evt.getItemKey().toLowerCase();
|
||||
if ("tblcancelpay".equals(key)){
|
||||
BillList list = (BillList) this.getView().getControl("billlistap");
|
||||
ListSelectedRowCollection selectedRows = list.getSelectedRows();
|
||||
if (selectedRows == null || selectedRows.isEmpty()) {
|
||||
|
|
@ -35,9 +38,6 @@ public class PayBillListPlugin extends AbstractListPlugin implements Plugin {
|
|||
DynamicObject recBill= BusinessDataServiceHelper.loadSingle(
|
||||
selectedRows.get(0).getPrimaryKeyValue(),
|
||||
EntityMetadataCache.getDataEntityType("cas_paybill"));
|
||||
|
||||
String key = evt.getItemKey().toLowerCase();
|
||||
if ("tblcancelpay".equals(key)){
|
||||
this.cancelPayValidator(evt,recBill);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
|||
@Override
|
||||
public void beforeItemClick(BeforeItemClickEvent evt) {
|
||||
super.beforeItemClick(evt);
|
||||
|
||||
String key = evt.getItemKey().toLowerCase();
|
||||
if ("tblrecchg".equals(key)) {
|
||||
BillList list = (BillList) this.getView().getControl("billlistap");
|
||||
ListSelectedRowCollection selectedRows = list.getSelectedRows();
|
||||
if (selectedRows == null || selectedRows.isEmpty()) {
|
||||
|
|
@ -54,11 +57,24 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
|||
DynamicObject recBill= BusinessDataServiceHelper.loadSingle(
|
||||
selectedRows.get(0).getPrimaryKeyValue(),
|
||||
EntityMetadataCache.getDataEntityType("cas_recbill"));
|
||||
|
||||
String key = evt.getItemKey().toLowerCase();
|
||||
if ("tblrecchg".equals(key)) {
|
||||
this.changeBillValidator(evt,recBill);
|
||||
}else if ("cancelrec".equals(key)){
|
||||
BillList list = (BillList) this.getView().getControl("billlistap");
|
||||
ListSelectedRowCollection selectedRows = list.getSelectedRows();
|
||||
if (selectedRows == null || selectedRows.isEmpty()) {
|
||||
this.getView().showTipNotification("请选择需要操作的收款单!");
|
||||
evt.setCancel(true);
|
||||
return;
|
||||
}
|
||||
if (selectedRows.size()>1){
|
||||
this.getView().showTipNotification("请选择单条数据进行操作");
|
||||
evt.setCancel(true);
|
||||
return;
|
||||
}
|
||||
|
||||
DynamicObject recBill= BusinessDataServiceHelper.loadSingle(
|
||||
selectedRows.get(0).getPrimaryKeyValue(),
|
||||
EntityMetadataCache.getDataEntityType("cas_recbill"));
|
||||
this.cancelRecValidator(evt,recBill);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue