潜在供应商。外网注册解锁服务区域
This commit is contained in:
parent
a34803449e
commit
cfc41e41da
|
@ -0,0 +1,42 @@
|
||||||
|
package shkd.repc.resm.formplugin;
|
||||||
|
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
|
import kd.repc.resm.formplugin.supplier.RegSupplierEdit;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class TycQzSupplierUSAFormPlugin extends RegSupplierEdit {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void lockServiceAreaAndGroupEntry(DynamicObject dataEntity) {
|
||||||
|
DynamicObjectCollection serviceOrgColl = dataEntity.getDynamicObjectCollection("entry_serviceorg");
|
||||||
|
boolean isregsupplier = dataEntity.getBoolean("isregsupplier");
|
||||||
|
|
||||||
|
for(int i = 0; i < serviceOrgColl.size(); ++i) {
|
||||||
|
this.getView().setEnable(true, i, new String[]{"orgarea"});
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean sameOrgFlag = this.checkIsImportOffSupplier(dataEntity);
|
||||||
|
if (sameOrgFlag) {
|
||||||
|
DynamicObject offSupplier = dataEntity.getDynamicObject("officesupplier");
|
||||||
|
DynamicObjectCollection offServiceOrgEntry = offSupplier.getDynamicObjectCollection("entry_serviceorg");
|
||||||
|
List<String> offOrgAreaIdList = (List)offServiceOrgEntry.stream().map((item) -> {
|
||||||
|
return item.getDynamicObject("orgarea").getPkValue().toString();
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
for(int i = 0; i < serviceOrgColl.size(); ++i) {
|
||||||
|
String pkValue = ((DynamicObject)serviceOrgColl.get(i)).getDynamicObject("orgarea").getPkValue().toString();
|
||||||
|
if (offOrgAreaIdList.contains(pkValue)) {
|
||||||
|
this.getView().setEnable(!sameOrgFlag, i, new String[]{"orgarea", "supgroup"});
|
||||||
|
} else {
|
||||||
|
this.getView().setEnable(Boolean.FALSE, i, new String[]{"orgarea"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getView().setEnable(Boolean.FALSE, new String[]{"recommender"});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue