| | |
| | | <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> |
| | | <Property name="dataProvider">bankPR#listAll</Property> |
| | | </DataSet> |
| | | <DataSet id="dsParam"> |
| | | <ClientEvent name="onReady">self.insert();</ClientEvent> |
| | |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <Button> |
| | | <ClientEvent name="onClick">var param = view.get("#dsParam.data");
 |
| | | 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> |
| | |
| | | <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> |
| | | <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-circle</Property> |
| | | <Property name="iconClass">fa fa-plus</Property> |
| | | </ToolBarButton> |
| | | <ToolBarButton> |
| | | <ClientEvent name="onClick"> |
| | | const data = view.get("#dgMain").get("selection"); |
| | | if (!data) { |
| | | $alert("请选择数据"); |
| | | return; |
| | | } |
| | | view.get("#dialogUpdate").show(); |
| | | <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="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> |
| | | <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("执行成功"); |
| | | 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> |
| | | <Property name="iconClass">fa fa-times</Property> |
| | | </ToolBarButton> |
| | | </ToolBar> |
| | | <DataGrid id="dgMain" layoutConstraint="padding:8" selectionMode="singleRow"> |
| | |
| | | <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="width">550</Property> |
| | | <Property name="caption">银行信息</Property> |
| | | <Property name="closeable">false</Property> |
| | | <Property name="iconClass">fa fa-tasks</Property> |
| | | <Buttons> |
| | |
| | | </Buttons> |
| | | <Children> |
| | | <AutoForm layoutConstraint="padding:10"> |
| | | <Property name="cols">*,*,*</Property> |
| | | <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"> |
| | | <AutoFormElement> |
| | | <Property name="name">name</Property> |
| | | <Property name="property">name</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">model</Property> |
| | | <Property name="property">model</Property> |
| | | <Property name="name">status</Property> |
| | | <Property name="property">status</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> |
| | | <Property name="name">updateBy</Property> |
| | | <Property name="property">updateBy</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | <AutoFormElement> |
| | | <Property name="name">updateUser</Property> |
| | | <Property name="property">updateUser</Property> |
| | | <Property name="name">updateTime</Property> |
| | | <Property name="property">updateTime</Property> |
| | | <Property name="readOnly">true</Property> |
| | | <Editor/> |
| | | </AutoFormElement> |
| | | </AutoForm> |
| | |
| | | <Tools/> |
| | | </Dialog> |
| | | <UpdateAction id="saveAction"> |
| | | <Property name="dataResolver">bankPR#saveUpdate</Property> |
| | | <UpdateItem> |
| | | <Property name="dataSet">dsMain</Property> |
| | | <Property name="dataPath">[#current]</Property> |
| | |
| | | </UpdateAction> |
| | | <AjaxAction id="ajaxDelData"> |
| | | <Property name="confirmMessage">确定要删除数据么?</Property> |
| | | <Property name="service">imsProductPR#delete</Property> |
| | | <Property name="service">bankPR#delete</Property> |
| | | </AjaxAction> |
| | | </View> |
| | | </ViewConfig> |