移动表单 插件控制控件隐藏属性问题
金蝶云社区-zqxign
zqxign
2人赞赏了该文章 1085次浏览 未经作者许可,禁止转载编辑于2017年07月21日 18:26:57

烦请老师帮下忙,谢谢!

移动表单里 根据 单据头【促销结案报告类型】(单选辅助资料列表),来控制单据体的一些字段【总计划用量】的属性问题。比如【高度、可见性】等,只要看不见就行。但是在插件里写了控制属性的代码,仍旧没有效果。
手机页面第二页是点击【增加】按钮,弹出的小窗体,第三页是保存后返回到主窗体上显示的单据体。不知道怎么写才能让【总计划用量】不显示出来。
界面:


==========分割线===============
控件是放在一个流式布局里面的。
BOS设计界面:


==========分割线===============
插件代码:
这部分是写在主窗体里的“ReturnNewRow”部分里的。

这部分是写在主窗体里“AfterBindData”部分的。


==========分割线===============
“ReturnNewRow”部分代码:

//隐藏字段
DynamicObject TypeObj = this.View.Model.GetValue("FCXJABGType") as DynamicObject;
if (TypeObj != null)
this.type = TypeObj["FNumber"].ToString();
if (!string.IsNullOrEmpty(type))
{
if (type == "JALX001")
{
this.View.GetControl("F_PZ_FlowLayout_zjhyll").SetCustomPropertyValue("disabled", false);//总计划用量流式布局锁定取消
this.View.GetControl("F_PZ_FlowLayout_zjhyll").SetCustomPropertyValue("height", 0); //总计划用量流式布局
this.View.GetControl("F_PZ_FlowLayout_zjhyll").SetCustomPropertyValue("backcolor", "255, 0, 0");//背景色
this.View.GetControl("F_PZ_FlowLayout_zjhyll").SetCustomPropertyValue("visible", false);//可见性

this.View.GetControl("FAllPlanQty").SetCustomPropertyValue("disabled", false);//总计划用量控件锁定取消
this.View.GetControl("FAllPlanQty").SetCustomPropertyValue("height", 0); //总计划用量控件
this.View.GetControl("FAllPlanQty").SetCustomPropertyValue("backcolor", "255, 0, 0");//背景色
this.View.GetControl("FAllPlanQty").SetCustomPropertyValue("visible", false);//可见性

this.View.GetControl("F_PZ_FlowLayout_zygxl").SetCustomPropertyValue("height", 0); //总预估销量
this.View.GetControl("F_PAEZ_FlowLayout_sjyl").SetCustomPropertyValue("height", 0); //实际用量
this.View.GetControl("F_PAEZ_FlowLayout_szanfwbfy").SetCustomPropertyValue("height", 0); //水站及网吧促销费用
this.View.GetControl("F_PAEZ_FlowLayout_qtcsfy").SetCustomPropertyValue("height", 0); //其他促销费用
this.View.GetControl("F_PAEZ_FlowLayout_sfsl").SetCustomPropertyValue("height", 0); //实返数量
this.View.GetControl("F_PZ_FlowLayout_fyzb").SetCustomPropertyValue("height", 0); //费用占比
}
else if (type == "JALX002")
{

}
else if (type == "JALX003")
{

}
}
//隐藏字段
this.View.UpdateView("F_PZ_MobileListViewEntity");

==========分割线===============
综上描述,最后运行结果,【总计划用量】还是会显示出来。不知道怎么办了。烦请老师们帮忙解决下。万分感谢!