我必须模拟以下情况:员工可以提出保险索赔,可以是疾病或事故。事故索赔需要一些额外的输入(位置,警方报告,...)。
我告诉米普西,entity claim has a accident
,后来用select entity accident
和create filed location mandatory
定义。到目前为止,一切顺利,屏幕事故位于一个新选项卡上,如果没有位置值,我无法保存该选项卡。
是否可以在索赔上accident/illness/other
一个选择框,使该选项卡accident
在发生事故时是强制性的,并且仅在发生事故
您可以执行以下操作:
select entity claim
add field Type of claim with type enum and values Accident, Illness, Other
然后在编辑器中打开文件"views>e_claim>show_fields.dust",并在选项卡上添加以下条件:
<ul class="nav nav-tabs">
<li class="active">
<a data-toggle="tab" href="#home">
{@__ key="entity.e_claim.label_entity" /}
</a>
</li>
{@eq key=f_type_of_claim value="Accident"}
<li>
<a id="r_accident-click" data-toggle="tab" href="#r_accident">
{@__ key="entity.e_accident.as_r_accident" /}
</a>
</li>
{/eq}
</ul>
您可以在选项卡内容中设置相同的条件,以避免将不相关的数据发送到浏览器。