lov使用说明
常规用法
- dataSet下定义field
<a:field name="dimension2_name" autoComplete="true" autoCompleteField="dimension_value_name" fetchRemote="true" lovGridHeight="380" lovHeight="450" lovLabelWidth="120" lovService="tme_expm.tme_exp_report_dimension2_lov" prompt="测试" title="测试">
<a:mapping>
<a:map from="dimension_value_id" to="dimension2_id"/>
<a:map from="dimension_value_name" to="dimension2_name"/>
</a:mapping>
</a:field>
- 显示标签
<a:lov name="dimension2_name" id="dimension2_name_id" bindtarget="exp_report_head" width="340"/>
- grid下
<a:grid id="line_grid" autoAdjustHeight="true" autoFocus="true" bindTarget="exp_report_lines" height="430" marginWidth="45" navBar="true" navBarType="tiny">
<a:columns>
<a:column name="dimension2_name" align="left" editor="line_lov_edit" prompt="项目" width="100"/>
</a:columns>
<a:editors>
<a:lov id="line_lov_edit"/>
</a:editors>
</a:grid>
#代码设置
var record = ds.getAt(0);
record.getField('contract_num').setLovService('expm.tme_con_contract_lov?document_category=EXP_REQUISITION');
record.getField('contract_num').setLovPara('employee_id', record.get('employee_id'));
var mapping = [{
from: 'account_number',
to: 'account_number'
}, {
from: 'account_name',
to: 'account_name'
}];
record.getField('contract_num').setMapping(mapping);