parent
8687cf8a67
commit
023dbdc7ca
|
@ -25,6 +25,7 @@ import kd.bos.form.control.events.UploadEvent;
|
|||
import kd.bos.form.control.events.UploadListener;
|
||||
import kd.bos.form.events.AfterDoOperationEventArgs;
|
||||
import kd.bos.form.events.BeforeDoOperationEventArgs;
|
||||
import kd.bos.form.operate.FormOperate;
|
||||
import kd.bos.list.plugin.AbstractListPlugin;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
|
@ -78,7 +79,23 @@ public class ContractBillExtList extends AbstractListPlugin implements Plugin, U
|
|||
}
|
||||
|
||||
public void beforeDoOperation(BeforeDoOperationEventArgs args) {
|
||||
|
||||
FormOperate operate = (FormOperate)args.getSource();
|
||||
// 下推预付单 or 对公报销 or 下推暂估单 检查补充附件的数量,0件的情况不允许操作
|
||||
if("pushtoprepay".equals(operate.getOperateKey())
|
||||
|| "publicreimburse".equals(operate.getOperateKey())
|
||||
|| "pushcostestimatebill".equals(operate.getOperateKey())){
|
||||
ListSelectedRowCollection selected = args.getListSelectedData();
|
||||
for(ListSelectedRow row : selected) {
|
||||
List<Map<String, Object>> temp2 = AttachmentServiceHelper.getAttachments("er_contractbill",
|
||||
row.getPrimaryKeyValue() + "", "shkd_attachmentpanelap");
|
||||
if(temp2.size() == 0) {
|
||||
System.out.println(operate.getOperateKey());
|
||||
this.getView().showTipNotification("单据编号:" + row.getBillNo() + ", 请先上传归档附件。");
|
||||
args.setCancel(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue