<?xml version="1.0" encoding="UTF-8"?>
|
<ViewConfig>
|
<Arguments/>
|
<Context/>
|
<Model/>
|
<View layout="padding:10">
|
<ClientEvent name="onReady">
|
flushData = function(){
|
var dataTree = view.get("#dataTree1");
|
var current = dataTree.get("currentEntity");
|
view.get("#dsMain").set("parameter",current.get("id")).flushAsync();
|
}
|
</ClientEvent>
|
<Property name="packages">font-awesome,css-common</Property>
|
<DataSet id="dsMain">
|
<Property name="dataType">[dtBank]</Property>
|
<Property name="pageSize">20</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>
|
<Property name="caption">搜索</Property>
|
</Button>
|
<Button>
|
<Property name="caption">重置</Property>
|
</Button>
|
</AutoForm>
|
</Container>
|
<Container>
|
<Property name="className">c-data</Property>
|
<ToolBar>
|
<ToolBarButton>
|
<ClientEvent name="onClick">flushData();</ClientEvent>
|
<Property name="caption">刷新</Property>
|
<Property name="exClassName">btn4</Property>
|
<Property name="width">100</Property>
|
<Property name="iconClass">fa fa-refresh</Property>
|
</ToolBarButton>
|
<ToolBarButton>
|
<ClientEvent name="onClick">var dataTree = view.get("#dataTree1");
|
var current = dataTree.get("currentEntity");
|

|
var newData = {warehouseId:current.get("id")};
|
view.get("#dsMain").insert(newData);
|

|
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-circle</Property>
|
</ToolBarButton>
|
<ToolBarButton>
|
<ClientEvent name="onClick">
|
const data = view.get("#dgMain").get("selection");
|
if (!data) {
|
$alert("请选择数据");
|
return;
|
}
|
view.get("#dialogUpdate").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">
|
let data = view.get("#dgMain").get("selection")
|
if(!data){
|
$alert("请选择数据")
|
}else{
|
view.get("#ajaxDelData").set("parameter", data).execute(function(result){
|
data.remove()
|
})
|
}
|
</ClientEvent>
|
<Property name="caption">删除</Property>
|
<Property name="exClassName">btn3</Property>
|
<Property name="width">100</Property>
|
<Property name="iconClass">fa fa-times-circle</Property>
|
</ToolBarButton>
|
<Separator/>
|
<ToolBarButton>
|
<Property name="caption">导出</Property>
|
<Property name="exClassName">btn4</Property>
|
<Property name="width">100</Property>
|
<Property name="iconClass">fa fa-file-excel-o</Property>
|
</ToolBarButton>
|
<ToolBarButton>
|
<Property name="caption">打印</Property>
|
<Property name="exClassName">btn4</Property>
|
<Property name="iconClass">fa fa-print</Property>
|
<Property name="width">100</Property>
|
</ToolBarButton>
|
<ToolBarButton>
|
<Property name="caption">帮助</Property>
|
<Property name="exClassName">btn4</Property>
|
<Property name="iconClass">fa fa-question-circle</Property>
|
<Property name="width">100</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>
|
<RowNumColumn/>
|
<RowSelectorColumn/>
|
<DataColumn name="name">
|
<Property name="property">name</Property>
|
</DataColumn>
|
<DataColumn name="status">
|
<Property name="property">status</Property>
|
</DataColumn>
|
<DataColumn name="remark">
|
<Property name="property">remark</Property>
|
</DataColumn>
|
<DataColumn name="updateBy">
|
<Property name="property">updateBy</Property>
|
</DataColumn>
|
<DataColumn name="updateTime">
|
<Property name="property">updateTime</Property>
|
</DataColumn>
|
</DataGrid>
|
<ToolBar layoutConstraint="bottom">
|
<Fill/>
|
<DataPilot>
|
<Property name="itemCodes">pageSize,pages</Property>
|
<Property name="dataSet">dsMain</Property>
|
</DataPilot>
|
</ToolBar>
|
</Container>
|
<Dialog id="dialogMain">
|
<Property name="width">90%</Property>
|
<Property name="height">90%</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 layoutConstraint="colSpan:2">
|
<Property name="name">name</Property>
|
<Property name="property">name</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">model</Property>
|
<Property name="property">model</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">unit</Property>
|
<Property name="property">unit</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">warehouseId</Property>
|
<Property name="property">warehouseId</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">disabled</Property>
|
<Property name="property">disabled</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement layoutConstraint="colSpan:3">
|
<Property name="name">spec</Property>
|
<Property name="property">spec</Property>
|
<Property name="editorType">TextArea</Property>
|
<Property name="height">150</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement layoutConstraint="colSpan:3">
|
<Property name="name">remark</Property>
|
<Property name="property">remark</Property>
|
<Property name="editorType">TextArea</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">updateTime</Property>
|
<Property name="property">updateTime</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">updateUser</Property>
|
<Property name="property">updateUser</Property>
|
<Editor/>
|
</AutoFormElement>
|
</AutoForm>
|
</Children>
|
<Tools/>
|
</Dialog>
|
<UpdateAction id="saveAction">
|
<UpdateItem>
|
<Property name="dataSet">dsMain</Property>
|
<Property name="dataPath">[#current]</Property>
|
</UpdateItem>
|
</UpdateAction>
|
<AjaxAction id="ajaxDelData">
|
<Property name="confirmMessage">确定要删除数据么?</Property>
|
<Property name="service">imsProductPR#delete</Property>
|
</AjaxAction>
|
</View>
|
</ViewConfig>
|