入库单修改入库来源字段下拉显示逻辑
This commit is contained in:
parent
725c8ce0f6
commit
e7142a269f
|
@ -852,25 +852,29 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
private void projectChanged() {
|
private void projectChanged() {
|
||||||
int rowCount = this.getModel().getEntryRowCount("entryentity");
|
int rowCount = this.getModel().getEntryRowCount("entryentity");//获取分录行
|
||||||
|
|
||||||
for (int i = 0; i < rowCount; ++i) {
|
for (int i = 0; i < rowCount; ++i) {
|
||||||
this.getModel().setValue("procbs", (Object) null, i);
|
this.getModel().setValue("procbs", (Object) null, i);//工序
|
||||||
this.getModel().setValue("proboq", (Object) null, i);
|
this.getModel().setValue("proboq", (Object) null, i);//BOQ(工程量清单)
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicObject contract = (DynamicObject) this.getModel().getValue("contract");
|
DynamicObject contract = (DynamicObject) this.getModel().getValue("contract");//合同编号
|
||||||
DynamicObject contractProject = contract == null ? null : contract.getDynamicObject("project");
|
DynamicObject contractProject = contract == null ? null : contract.getDynamicObject("project");//合同编号-项目
|
||||||
DynamicObject project = (DynamicObject) this.getModel().getValue("project");
|
DynamicObject project = (DynamicObject) this.getModel().getValue("project");//项目
|
||||||
if (project == null && contractProject != null || project != null && contractProject != null && project.getLong("id") != contractProject.getLong("id")) {
|
if (project == null && contractProject != null || project != null && contractProject != null && project.getLong("id") != contractProject.getLong("id")) {
|
||||||
this.getModel().setValue("contract", (Object) null);
|
this.getModel().setValue("contract", (Object) null);//合同编号
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<ComboItem> comboItems = new ArrayList(3);
|
ArrayList<ComboItem> comboItems = new ArrayList(4);
|
||||||
String[] caption = new String[]{ResManager.loadKDString("合同清单", "MaterialInBillEditPlugin_9", "ec-ecma-formplugin", new Object[0]), ResManager.loadKDString("采购订单", "MaterialInBillEditPlugin_10", "ec-ecma-formplugin", new Object[0]), ResManager.loadKDString("资源清单", "MaterialInBillEditPlugin_11", "ec-ecma-formplugin", new Object[0])};
|
String[] caption = new String[]{
|
||||||
String[] value = new String[]{"1", "2", "4"};
|
ResManager.loadKDString("合同清单", "MaterialInBillEditPlugin_9", "ec-ecma-formplugin", new Object[0]),
|
||||||
|
ResManager.loadKDString("采购订单", "MaterialInBillEditPlugin_10", "ec-ecma-formplugin", new Object[0]),
|
||||||
|
ResManager.loadKDString("资源清单", "MaterialInBillEditPlugin_11", "ec-ecma-formplugin", new Object[0]),
|
||||||
|
ResManager.loadKDString("采购申请", "MaterialInBillEditPlugin_12", "ec-ecma-formplugin", new Object[0])};
|
||||||
|
String[] value = new String[]{"1", "2", "4","6"};
|
||||||
|
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
if ((Boolean) this.getVisMap().get(value[i])) {
|
if ((Boolean) this.getVisMap().get(value[i])) {
|
||||||
ComboItem comboItem = new ComboItem();
|
ComboItem comboItem = new ComboItem();
|
||||||
comboItem.setCaption(new LocaleString(caption[i]));
|
comboItem.setCaption(new LocaleString(caption[i]));
|
||||||
|
@ -879,9 +883,9 @@ public class MaterialInBillEditPluginExt extends AbstractEcmaBillPlugin implemen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboEdit matinsource = (ComboEdit) this.getControl("matinsource");
|
ComboEdit matinsource = (ComboEdit) this.getControl("matinsource");//入库来源
|
||||||
if (project != null) {
|
if (project != null) {
|
||||||
String costcontrol = project.getString("costcontrol");
|
String costcontrol = project.getString("costcontrol");//项目-成本管控模式
|
||||||
if ("RESOURCE".equals(costcontrol)) {
|
if ("RESOURCE".equals(costcontrol)) {
|
||||||
if (comboItems.size() > 2) {
|
if (comboItems.size() > 2) {
|
||||||
matinsource.setComboItems(comboItems.subList(0, 2));
|
matinsource.setComboItems(comboItems.subList(0, 2));
|
||||||
|
|
Loading…
Reference in New Issue