合同台账

下推预付单 or 对公报销 or 下推暂估单 检查归档附件的数量,0件的情况不允许操作
This commit is contained in:
李靖 2024-06-18 18:42:46 +08:00
parent 8687cf8a67
commit 023dbdc7ca
1 changed files with 18 additions and 1 deletions

View File

@ -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