1、修改元数据类型
image.png
2、设置参照实体的dataset
<!-- 采购方案 -->
<RefMdDataset caption="采购方案" controlwidgetopeStatus="false" enabled="false" id="$refds_ebpur_PurProjectVO" lazyLoad="true" notNullBody="false" objMeta="ebpur.PurProjectVO" voMeta="nc.vo.ebpur.purproject.PurProjectVO">
<Fields>
</Fields>
</RefMdDataset>
名称空间和实体名称
3、设置当前字段的属性参照配置
<!-- 中标单号 -->
<FieldRelation id="hitnum_rel" needProcess="true" refDataset="$refds_ebpur_PurProjectVO" useCache="true">
<MatchFields>
<Field readField="project_name" writeField="hitnum_project_name">
</Field>
</MatchFields>
<WhereField>
<Field key="pk_pur_project" value="hitnum">
</Field>
</WhereField>
</FieldRelation>
image.png
4、设置参照refnode
<!-- 中标通知单号 -->
<NCRefNode allowInput="false" dataListener="" dialogHeight="" dialogWidth="" filterRefNodeNames="false" hrOrgs="false" i18nName="" id="refnode_listDS_hitnum_project_name" langDir="" multiSel="false" orgs="false" pagemeta="reference" pagemodel="" read="false" readDs="masterDs" readFields="pk_pur_project,project_name" refId="" refcode="采购方案" refnodeDelegator="" relationRefNodeId="" selLeafOnly="false" text="采购方案" usePower="false" writeDs="listDS" writeFields="hitnum,hitnum_project_name">
</NCRefNode>
image.png
5、页面组件定义
<!-- 中标通知到单号 卡片页面 -->
<Element id="hitnum" field="hitnum" text="中标通知单号" visible="false" allowExtendValue="false" attachNext="false" canUpload="false" colSpan="1" editable="true" editorType="StringText" enabled="true" height="" imageOnly="false" langDir="" nextLine="false" nullAble="true" rowSpan="1" selectOnly="true" toolbarType="Custom" width="">
</Element>
<Element id="hitnum_project_name" field="hitnum_project_name" text="中标通知单号" refNode="refnode_listDS_hitnum_project_name" allowExtendValue="false" attachNext="false" canUpload="false" colSpan="1" editable="true" editorType="Reference" enabled="true" height="" imageOnly="false" nextLine="false" nullAble="true" rowSpan="1" selectOnly="true" toolbarType="Custom" visible="true" width="">
</Element>
<!-- 列表页面 -->
<Column autoExpand="false" dataType="String" editable="true" editorType="StringText" field="pk_project" fixedHeader="false" id="pk_project" imageOnly="false" langDir="ProjectSubcontract" nullAble="true" renderType="DefaultRender" showCheckBox="true" sortable="true" sumCol="false" text="项目" textAlign="left" visible="false" width="120">
</Column>
<Column autoExpand="false" dataType="String" editable="true" editorType="Reference" field="pk_project_project_name" fixedHeader="false" id="pk_project_project_name" imageOnly="false" nullAble="true" refNode="refnode_editbDS_pk_project_project_name" renderType="DefaultRender" showCheckBox="true" sortable="true" sumCol="false" text="项目" textAlign="left" visible="true" width="120">
</Column>
image.png
网友评论