fix:
2.订舱通知单选择f7过滤
This commit is contained in:
parent
7a671ac93e
commit
9a8784964b
@ -255,21 +255,6 @@ public class StorageTransZJEdit extends AbstractBillPlugIn implements BeforeF7Se
|
||||
public void selectF7CustomClass(BeforeF7SelectEvent e) {
|
||||
//1、过滤报关分类时,整机行只能过滤业务分类为整机的报关分类;配件行只能过滤业务分类为配件的报关分类
|
||||
int row = e.getRow();
|
||||
List<Long> ids = new ArrayList();
|
||||
IDataModel model = this.getModel();
|
||||
DynamicObject materiel = (DynamicObject) model.getValue("yem_materiel", row);
|
||||
if (YEM.isNotEmpty(materiel)) {
|
||||
DynamicObject[] declarationEles = BusinessDataServiceHelper.load("yem_bd_declarationele", "id,yem_customclass",
|
||||
new QFilter[]{new QFilter("yem_material", QCP.equals, materiel.getPkValue())});
|
||||
for (DynamicObject declarationEle : declarationEles) {
|
||||
DynamicObject hsCodebase = declarationEle.getDynamicObject("yem_customclass");
|
||||
if (YEM.isNotEmpty(hsCodebase)) {
|
||||
ids.add(hsCodebase.getLong("id"));
|
||||
}
|
||||
}
|
||||
}
|
||||
e.addCustomQFilter(new QFilter("id", QCP.in, ids));
|
||||
|
||||
String businesssort = (String) this.getModel().getValue("yem_businesssort", row);
|
||||
if (businesssort == null) {
|
||||
e.addCustomQFilter(new QFilter("yem_businessclassify", QCP.equals, null));
|
||||
@ -278,6 +263,20 @@ public class StorageTransZJEdit extends AbstractBillPlugIn implements BeforeF7Se
|
||||
e.addCustomQFilter(new QFilter("yem_businessclassify", QCP.equals, "Z"));
|
||||
}
|
||||
if ("P".equals(businesssort)) {
|
||||
List<Long> ids = new ArrayList();
|
||||
IDataModel model = this.getModel();
|
||||
DynamicObject materiel = (DynamicObject) model.getValue("yem_materiel", row);
|
||||
if (YEM.isNotEmpty(materiel)) {
|
||||
DynamicObject[] declarationEles = BusinessDataServiceHelper.load("yem_bd_declarationele", "id,yem_customclass",
|
||||
new QFilter[]{new QFilter("yem_material", QCP.equals, materiel.getPkValue())});
|
||||
for (DynamicObject declarationEle : declarationEles) {
|
||||
DynamicObject hsCodebase = declarationEle.getDynamicObject("yem_customclass");
|
||||
if (YEM.isNotEmpty(hsCodebase)) {
|
||||
ids.add(hsCodebase.getLong("id"));
|
||||
}
|
||||
}
|
||||
}
|
||||
e.addCustomQFilter(new QFilter("id", QCP.in, ids));
|
||||
e.addCustomQFilter(new QFilter("yem_businessclassify", QCP.equals, "P"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user