fix:出口报关,保存前不能进行报关合并
This commit is contained in:
parent
883fc64c67
commit
1194ed3c99
@ -334,6 +334,10 @@ public class DeclareDocxEdit extends AbstractBillPlugIn implements BeforeF7Selec
|
||||
String operateKey = e.getOperateKey();
|
||||
// if (StringUtils.isNotEmpty(operateKey) && isSuccess) {
|
||||
if (operateKey.equals("cocudeclaration_s") || operateKey.equals("cocudeclaration")) {
|
||||
if (!validatorIsSaved(model)) {
|
||||
view.showErrorNotification("请保存后再进行操作!");
|
||||
return;
|
||||
}
|
||||
model.deleteEntryData("yem_es_declare_ec");
|
||||
model.deleteEntryData("yem_es_declare_ecd");
|
||||
//报关合并
|
||||
@ -670,6 +674,10 @@ public class DeclareDocxEdit extends AbstractBillPlugIn implements BeforeF7Selec
|
||||
}
|
||||
|
||||
if ("mergedata".equals(operateKey)) {
|
||||
if (!validatorIsSaved(model)) {
|
||||
view.showErrorNotification("请保存后再进行操作!");
|
||||
return;
|
||||
}
|
||||
mergeDeclareData();
|
||||
}
|
||||
|
||||
@ -735,6 +743,23 @@ public class DeclareDocxEdit extends AbstractBillPlugIn implements BeforeF7Selec
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否保存,没保存则提示
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
private boolean validatorIsSaved(IDataModel model) {
|
||||
DynamicObject dataEntity = model.getDataEntity(true);
|
||||
DynamicObjectCollection collection = dataEntity.getDynamicObjectCollection("yem_es_materialinfo");
|
||||
for (DynamicObject d : collection) {
|
||||
long id = d.getLong("id");
|
||||
if (id <= 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据合并规则将商品明细的数据生成到报关商品页签
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user