| | |
| | | </PropertyDef> |
| | | </DataType> |
| | | </Model> |
| | | <View layout="regionPadding:10"> |
| | | <View> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <DataSet id="dsMain"> |
| | | <Property name="dataProvider">buildingPR#loadData</Property> |
| | | <Property name="dataType">[dtMain]</Property> |
| | | </DataSet> |
| | | <Container layout="regionPadding:10" layoutConstraint="top"> |
| | | <Property name="exClassName">bg-color</Property> |
| | | <Property name="height">55</Property> |
| | | <Property name="contentOverflow">hidden</Property> |
| | | <Label layoutConstraint="left"> |
| | | <Container> |
| | | <Property name="exClassName">c-data</Property> |
| | | <ToolBar> |
| | | <ToolBarLabel> |
| | | <Property name="text">菜单栏:</Property> |
| | | </Label> |
| | | <Button layoutConstraint="left"> |
| | | <Property name="exClassName">menu-bar-caption</Property> |
| | | </ToolBarLabel> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">view.get("#dsMain").insert();
 |
| | | view.get("#dialogMain").show();</ClientEvent> |
| | | <Property name="caption">新增</Property> |
| | | <Property name="exClassName">btn1</Property> |
| | | <Property name="iconClass">fa fa-plus</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">
 |
| | | var select = view.get("#dgMain").get("selection");
 |
| | | </ToolBarButton> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#dialogMain").show();;
 |
| | | }else{
 |
| | |
| | | <Property name="caption">编辑</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-pencil</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick"> 
 |
| | | var select = view.get("#dgMain").get("selection");
 |
| | | </ToolBarButton> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#ajaxDel").set("parameter",select).execute(function(){
 |
| | | select.remove();
 |
| | | });
 |
| | | }else{
 |
| | | $notify("请选择需要删除的数据……");
 |
| | | }
 |
| | | </ClientEvent> |
| | | }</ClientEvent> |
| | | <Property name="caption">删除</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="iconClass">fa fa-trash-o</Property> |
| | | </Button> |
| | | </Container> |
| | | <Container layout="regionPadding:10" layoutConstraint="center"> |
| | | <Property name="exClassName">bg-color</Property> |
| | | <DataGrid id="dgMain"> |
| | | <ClientEvent name="onDataRowDoubleClick">var dialog= view.get("#dialogMain");
 |
| | | dialog.show();</ClientEvent> |
| | | </ToolBarButton> |
| | | </ToolBar> |
| | | <DataGrid id="dgMain" layoutConstraint="padding:15px 0px 0px 0px"> |
| | | <ClientEvent name="onDataRowClick">view.get("#dgMain").set("selection",arg.data);</ClientEvent> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Property name="selectionMode">singleRow</Property> |
| | |
| | | </DataColumn> |
| | | </DataGrid> |
| | | </Container> |
| | | <Dialog id="dialogMain"> |
| | | <Dialog id="dialogMain" layout="regionPadding:10"> |
| | | <Property name="iconClass">fa fa-pencil-square-o</Property> |
| | | <Property name="closeable">false</Property> |
| | | <Property name="caption">仓房信息</Property> |
| | | <Property name="width">60%</Property> |
| | |
| | | </Button> |
| | | </Buttons> |
| | | <Children> |
| | | <FieldSet layout="padding:5"> |
| | | <Property name="caption">基本信息</Property> |
| | | <Buttons/> |
| | | <Children> |
| | | <AutoForm> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="cols">*,*</Property> |
| | | <Property name="labelAlign">right</Property> |
| | | <Property name="labelSeparator">:</Property> |
| | | <Property name="labelWidth">150</Property> |
| | | <Property name="labelWidth">120</Property> |
| | | <AutoFormElement> |
| | | <Property name="name">id</Property> |
| | | <Property name="property">id</Property> |
| | |
| | | </Link> |
| | | </AutoForm> |
| | | </Children> |
| | | </FieldSet> |
| | | </Children> |
| | | <Tools/> |
| | | </Dialog> |
| | | <UpdateAction id="uaSave"> |