工序过滤
This commit is contained in:
parent
4924430ebf
commit
43f0642671
|
|
@ -38,6 +38,7 @@ import kd.bos.form.field.events.BeforeF7SelectListener;
|
|||
import kd.bos.form.operate.FormOperate;
|
||||
import kd.bos.list.ListShowParameter;
|
||||
import kd.bos.orm.ORM;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
|
|
@ -57,7 +58,7 @@ import kd.ec.cost.utils.CostTypeUtils;
|
|||
import kd.ec.cost.utils.CurrencyFormatUtil;
|
||||
|
||||
//二开系统插件
|
||||
//工序成本预算表单插件:项目基础资料过滤和保存校验逻辑修改
|
||||
//工序成本预算表单插件:项目基础资料过滤和保存校验逻辑修改(项目年度预算)
|
||||
public class AimcostcbsbillEditUIExt extends AbstractEccoBillPlugin implements BeforeF7SelectListener, RowClickEventListener {
|
||||
private static final String IS_CANCEL = "isCancel";
|
||||
private static final String EDITONUNIT = "editonunit";
|
||||
|
|
@ -95,6 +96,12 @@ public class AimcostcbsbillEditUIExt extends AbstractEccoBillPlugin implements B
|
|||
boqEdit.addBeforeF7SelectListener(this);
|
||||
TreeEntryGrid grid = (TreeEntryGrid) this.getControl("treeentryentity");
|
||||
grid.addRowClickListener(this);
|
||||
|
||||
//工序过滤
|
||||
BasedataEdit cbs = this.getControl("cbs");
|
||||
if (cbs != null) {
|
||||
cbs.addBeforeF7SelectListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void entryRowClick(RowClickEvent rowclickevent) {
|
||||
|
|
@ -140,6 +147,20 @@ public class AimcostcbsbillEditUIExt extends AbstractEccoBillPlugin implements B
|
|||
}/* else if ("project".equals(name)) {
|
||||
this.beforeProjectSelected(beforef7selectevent);//二开注释掉的
|
||||
}*/
|
||||
else if ("cbs".equals(name)) {
|
||||
//工序过滤
|
||||
Object projectObj = this.getModel().getValue("project");//工程项目
|
||||
if (projectObj == null) {
|
||||
this.getView().showMessage(ResManager.loadKDString("请选择项目。", "EntCostSplitEditPlugin_0", "ec-ecco-formplugin", new Object[0]));
|
||||
}else {
|
||||
DynamicObject projectInfo = (DynamicObject)projectObj;
|
||||
QFilter qFilter = new QFilter("project.id", QCP.equals, projectInfo.getLong("id"));
|
||||
QFilter treeFilter = new QFilter("project.number", QCP.equals, projectInfo.getString("number"));
|
||||
ListShowParameter showParameter = (ListShowParameter) beforef7selectevent.getFormShowParameter();
|
||||
showParameter.getListFilterParameter().getQFilters().add(qFilter);
|
||||
showParameter.getTreeFilterParameter().getQFilters().add(treeFilter);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -353,8 +374,18 @@ public class AimcostcbsbillEditUIExt extends AbstractEccoBillPlugin implements B
|
|||
entryColl.add(newValue);
|
||||
}
|
||||
}
|
||||
//本年计划利润 zcgj_profitamount
|
||||
this.getModel().setValue("zcgj_profitamount", project.getBigDecimal("zcgj_profitamount"));
|
||||
//上年实际利润 zcgj_lastprofitamount
|
||||
this.getModel().setValue("zcgj_lastprofitamount", project.getBigDecimal("zcgj_lastprofitamount"));
|
||||
//上年实际产量 zcgj_alllastyearcount
|
||||
this.getModel().setValue("zcgj_alllastyearcount", project.getBigDecimal("zcgj_alllastyearcount"));
|
||||
//上年实际产值 zcgj_alllastyearamount
|
||||
this.getModel().setValue("zcgj_alllastyearamount", project.getBigDecimal("zcgj_alllastyearamount"));
|
||||
|
||||
|
||||
DynamicObjectCollection newInfundprojectEntry = this.getModel().getDataEntity().getDynamicObjectCollection("zcgj_infundproject_entry");
|
||||
//上期项目收入预算
|
||||
//产出物收入预算
|
||||
DynamicObjectCollection infundprojectEntry = project.getDynamicObjectCollection("zcgj_infundproject_entry");
|
||||
if(!infundprojectEntry.isEmpty()) {
|
||||
for (DynamicObject dynamicObject : infundprojectEntry) {
|
||||
|
|
@ -366,6 +397,13 @@ public class AimcostcbsbillEditUIExt extends AbstractEccoBillPlugin implements B
|
|||
dynamicObject1.set("zcgj_yearrecamount",dynamicObject.getBigDecimal("zcgj_yearrecamount"));
|
||||
dynamicObject1.set("zcgj_in_remarks",dynamicObject.getString("zcgj_in_remarks"));
|
||||
dynamicObject1.set("zcgj_in_seq",dynamicObject.getBigDecimal("zcgj_in_seq"));
|
||||
//zcgj_producttype 产出物
|
||||
dynamicObject1.set("zcgj_producttype",dynamicObject.getDynamicObject("zcgj_producttype"));
|
||||
//zcgj_lastyearcount 上年实际产量
|
||||
dynamicObject1.set("zcgj_lastyearcount",dynamicObject.getBigDecimal("zcgj_lastyearcount"));
|
||||
//zcgj_lastyearamount 上年实际产值
|
||||
dynamicObject1.set("zcgj_lastyearamount",dynamicObject.getBigDecimal("zcgj_lastyearamount"));
|
||||
|
||||
|
||||
}
|
||||
this.getView().updateView("zcgj_infundproject_entry");
|
||||
|
|
|
|||
Loading…
Reference in New Issue