| | |
| | | </PropertyDef> |
| | | </DataType> |
| | | </Model> |
| | | <View layout="regionPadding:10"> |
| | | <View> |
| | | <Property name="packages">font-awesome,css-common</Property> |
| | | <DataSet id="dsMain"> |
| | | <Property name="dataProvider">granaryPR#getGranary</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"> |
| | | <Property name="text">菜单栏:</Property> |
| | | </Label> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">view.get("#dsMain").insert();
 |
| | | <Container> |
| | | <Property name="exClassName">c-data</Property> |
| | | <ToolBar> |
| | | <ToolBarLabel> |
| | | <Property name="text">菜单栏:</Property> |
| | | <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 dialog= view.get("#dialogMain");
 |
| | | dialog.show();</ClientEvent> |
| | | <Property name="caption">编辑</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-pencil</Property> |
| | | </Button> |
| | | <Button layoutConstraint="left"> |
| | | <ClientEvent name="onClick">var cur = view.get("#dsMain.data:#");
 |
| | | if(!cur) return;
 |
| | | view.get("#ajaxDel").set("parameter",cur).execute(function(result){
 |
| | | if(result){
 |
| | | $alert(result);
 |
| | | return;
 |
| | | }else{
 |
| | | cur.remove();
 |
| | | }
 |
| | | });</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> |
| | | <Property name="caption">新增</Property> |
| | | <Property name="exClassName">btn1</Property> |
| | | <Property name="iconClass">fa fa-plus</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 |
| | | if(select){
 |
| | | view.get("#dialogMain").show();;
 |
| | | }else{
 |
| | | $notify("请选择需要修改的数据……");
 |
| | | }</ClientEvent> |
| | | <Property name="caption">编辑</Property> |
| | | <Property name="exClassName">btn2</Property> |
| | | <Property name="iconClass">fa fa-pencil</Property> |
| | | </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> |
| | | <Property name="caption">删除</Property> |
| | | <Property name="exClassName">btn3</Property> |
| | | <Property name="iconClass">fa fa-trash-o</Property> |
| | | </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> |
| | | <RowSelectorColumn/> |
| | | <RowNumColumn/> |
| | | <DataColumn name="ajdh"> |
| | | <Property name="property">ajdh</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> |
| | | <AutoForm> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="cols">*,*</Property> |
| | | <Property name="labelAlign">right</Property> |
| | | <Property name="labelSeparator">:</Property> |
| | | <Property name="labelWidth">150</Property> |
| | | <AutoFormElement> |
| | | <Property name="name">ajdh</Property> |
| | | <Property name="property">ajdh</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">deptId</Property> |
| | | <Property name="property">deptId</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajmc</Property> |
| | | <Property name="property">ajmc</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">cfbh</Property> |
| | | <Property name="property">cfbh</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajcd</Property> |
| | | <Property name="property">ajcd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajkd</Property> |
| | | <Property name="property">ajkd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajgd</Property> |
| | | <Property name="property">ajgd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajsjcr</Property> |
| | | <Property name="property">ajsjcr</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajlxdh</Property> |
| | | <Property name="property">ajlxdh</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajqyrq</Property> |
| | | <Property name="property">ajqyrq</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajzt</Property> |
| | | <Property name="property">ajzt</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">updateTime</Property> |
| | | <Property name="property">updateTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | | <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> |
| | | <AutoFormElement> |
| | | <Property name="name">ajdh</Property> |
| | | <Property name="property">ajdh</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">deptId</Property> |
| | | <Property name="property">deptId</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajmc</Property> |
| | | <Property name="property">ajmc</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">cfbh</Property> |
| | | <Property name="property">cfbh</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajcd</Property> |
| | | <Property name="property">ajcd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajkd</Property> |
| | | <Property name="property">ajkd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajgd</Property> |
| | | <Property name="property">ajgd</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajsjcr</Property> |
| | | <Property name="property">ajsjcr</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajlxdh</Property> |
| | | <Property name="property">ajlxdh</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajqyrq</Property> |
| | | <Property name="property">ajqyrq</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">ajzt</Property> |
| | | <Property name="property">ajzt</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">updateTime</Property> |
| | | <Property name="property">updateTime</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | | </Children> |
| | | </FieldSet> |
| | | </Children> |
| | | <Tools/> |
| | | </Dialog> |