<?xml version="1.0" encoding="UTF-8"?>
|
<ViewConfig>
|
<Arguments/>
|
<Context/>
|
<Model/>
|
<View layout="padding:10">
|
<ClientEvent name="onClick">
|
/**
|
* 查询
|
*/
|
query = function(){
|
view.get("#dsMain").flushAsync();
|
}
</ClientEvent>
|
<Property name="packages">font-awesome,css-common</Property>
|
<DataSet id="dsMain">
|
<Property name="loadMode">lazy</Property>
|
<Property name="dataType">[dtBank]</Property>
|
<Property name="dataProvider">bankPR#listAll</Property>
|
</DataSet>
|
<DataSet id="dsParam">
|
<ClientEvent name="onReady">self.insert({});</ClientEvent>
|
<Property name="dataType">dtBaseParam</Property>
|
</DataSet>
|
<Container>
|
<Property name="className">c-param</Property>
|
<AutoForm>
|
<Property name="cols">*,90,90,*,*</Property>
|
<Property name="dataSet">dsParam</Property>
|
<Property name="labelAlign">right</Property>
|
<AutoFormElement>
|
<Property name="name">name</Property>
|
<Property name="property">name</Property>
|
<Property name="label">银行名称</Property>
|
<Property name="labelWidth">90</Property>
|
<Editor/>
|
</AutoFormElement>
|
<Button>
|
<ClientEvent name="onClick">var param = view.get("#dsParam.data");
|
console.log("param");
|
view.get("#dsMian").set("parameter",param).flushAsync();
|
</ClientEvent>
|
<Property name="caption">搜索</Property>
|
<Property name="iconClass">fa fa-search</Property>
|
<Property name="exClassName">btn-q1</Property>
|
</Button>
|
<Button>
|
<ClientEvent name="onClick">view.get("#dsParam").set("data",{});</ClientEvent>
|
<Property name="caption">重置</Property>
|
<Property name="exClassName">btn-q2</Property>
|
<Property name="iconClass">fa fa-refresh</Property>
|
</Button>
|
</AutoForm>
|
</Container>
|
<Container>
|
<Property name="className">c-data</Property>
|
<ToolBar>
|
<ToolBarButton>
|
<ClientEvent name="onClick">view.get("#dsMain").insert({});
|
view.get("#dialogMain").show();</ClientEvent>
|
<Property name="caption">新增</Property>
|
<Property name="exClassName">btn1</Property>
|
<Property name="width">100</Property>
|
<Property name="iconClass">fa fa-plus</Property>
|
</ToolBarButton>
|
<ToolBarButton>
|
<ClientEvent name="onClick">var data = view.get("#dgMain").get("selection");
|
view.get("#dialogMain").show();
|
</ClientEvent>
|
<Property name="id">btnUpdate</Property>
|
<Property name="caption">修改</Property>
|
<Property name="exClassName">btn2</Property>
|
<Property name="width">100</Property>
|
<Property name="iconClass">fa fa-pencil-square-o</Property>
|
</ToolBarButton>
|
<ToolBarButton>
|
<ClientEvent name="onClick">var data = view.get("#dgMain").get("selection")
|
if(!data){
|
$alert("请选择数据");
|
}else{
|
view.get("#ajaxDelData").set("parameter", data).execute(function(result){
|
if("200"!=result.code){
|
$alert("异常信息:"+result.message);
|
}else{
|
$notify("执行成功");
|
query();
|
}
|
})
|
}</ClientEvent>
|
<Property name="caption">删除</Property>
|
<Property name="exClassName">btn3</Property>
|
<Property name="width">100</Property>
|
<Property name="iconClass">fa fa-times</Property>
|
</ToolBarButton>
|
</ToolBar>
|
<DataGrid id="dgMain" layoutConstraint="padding:8" selectionMode="singleRow">
|
<ClientEvent name="onDataRowClick">self.set("selection", arg.data)</ClientEvent>
|
<Property name="dataSet">dsMain</Property>
|
<Property name="readOnly">true</Property>
|
<RowSelectorColumn/>
|
<RowNumColumn/>
|
<DataColumn name="name">
|
<Property name="property">name</Property>
|
<Property name="width">400</Property>
|
</DataColumn>
|
<DataColumn name="status">
|
<Property name="property">status</Property>
|
<Property name="align">center</Property>
|
<Property name="width">150</Property>
|
</DataColumn>
|
<DataColumn name="remark">
|
<Property name="property">remark</Property>
|
</DataColumn>
|
<DataColumn name="updateBy">
|
<Property name="property">updateBy</Property>
|
<Property name="align">center</Property>
|
<Property name="width">160</Property>
|
</DataColumn>
|
<DataColumn name="updateTime">
|
<Property name="property">updateTime</Property>
|
<Property name="align">center</Property>
|
<Property name="width">200</Property>
|
</DataColumn>
|
</DataGrid>
|
</Container>
|
<Dialog id="dialogMain">
|
<Property name="width">550</Property>
|
<Property name="caption">银行信息</Property>
|
<Property name="closeable">false</Property>
|
<Property name="iconClass">fa fa-tasks</Property>
|
<Buttons>
|
<Button>
|
<ClientEvent name="onClick">view.get("#saveAction").execute(function(){
|
self.get("parent").hide();
|
});</ClientEvent>
|
<Property name="caption">保存</Property>
|
<Property name="iconClass">fa fa-check-circle</Property>
|
<Property name="exClassName">btn1</Property>
|
<Property name="width">120</Property>
|
</Button>
|
<Button>
|
<ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
|
self.get("parent").hide();</ClientEvent>
|
<Property name="caption">取消</Property>
|
<Property name="exClassName">btn3</Property>
|
<Property name="iconClass">fa fa-times-circle</Property>
|
<Property name="width">120</Property>
|
</Button>
|
</Buttons>
|
<Children>
|
<AutoForm layoutConstraint="padding:10">
|
<Property name="cols">*</Property>
|
<Property name="dataSet">dsMain</Property>
|
<Property name="labelSeparator">:</Property>
|
<Property name="labelAlign">right</Property>
|
<Property name="labelWidth">100</Property>
|
<AutoFormElement>
|
<Property name="name">name</Property>
|
<Property name="property">name</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">status</Property>
|
<Property name="property">status</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">remark</Property>
|
<Property name="property">remark</Property>
|
<Property name="editorType">TextArea</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">updateBy</Property>
|
<Property name="property">updateBy</Property>
|
<Property name="readOnly">true</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">updateTime</Property>
|
<Property name="property">updateTime</Property>
|
<Property name="readOnly">true</Property>
|
<Editor/>
|
</AutoFormElement>
|
</AutoForm>
|
</Children>
|
<Tools/>
|
</Dialog>
|
<UpdateAction id="saveAction">
|
<Property name="dataResolver">bankPR#saveUpdate</Property>
|
<UpdateItem>
|
<Property name="dataSet">dsMain</Property>
|
<Property name="dataPath">[#current]</Property>
|
</UpdateItem>
|
</UpdateAction>
|
<AjaxAction id="ajaxDelData">
|
<Property name="confirmMessage">确定要删除数据么?</Property>
|
<Property name="service">bankPR#delete</Property>
|
</AjaxAction>
|
</View>
|
</ViewConfig>
|