| <?xml version="1.0" encoding="UTF-8"?> | 
| <ViewConfig> | 
|   <Arguments/> | 
|   <Context/> | 
|   <Model> | 
|     <DataType name="dtMain"> | 
|       <Property name="creationType">com.ld.igds.models.DicCheckItem</Property> | 
|       <PropertyDef name="code"> | 
|         <Property></Property> | 
|         <Property name="label">化验项编码</Property> | 
|         <Property name="required">true</Property> | 
|         <Validator name="validator1" type="length"> | 
|           <Property name="maxLength">10</Property> | 
|           <Property name="minLength">1</Property> | 
|         </Validator> | 
|       </PropertyDef> | 
|       <PropertyDef name="companyId"> | 
|         <Property></Property> | 
|         <Property name="label">组织编码</Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="name"> | 
|         <Property></Property> | 
|         <Property name="label">化验项名称</Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="type"> | 
|         <Property></Property> | 
|         <Property name="label">所属指标</Property> | 
|         <Property name="mapping"> | 
|           <Property name="keyProperty">code</Property> | 
|           <Property name="valueProperty">name</Property> | 
|           <Property name="mapValues">${dorado.getDataProvider("dicCheckItemPR#triggerType").getResult()}</Property> | 
|         </Property> | 
|         <Property name="required">true</Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="unit"> | 
|         <Property></Property> | 
|         <Property name="label">单位</Property> | 
|       </PropertyDef> | 
|       <PropertyDef name="remark"> | 
|         <Property></Property> | 
|         <Property name="label">备注</Property> | 
|       </PropertyDef> | 
|     </DataType> | 
|   </Model> | 
|   <View layout="padding:10"> | 
|     <Property name="packages">font-awesome,css-common</Property> | 
|     <DataSet id="dsMain"> | 
|       <Property name="dataType">[dtMain]</Property> | 
|       <Property name="dataProvider">dicCheckItemPR#findData</Property> | 
|     </DataSet> | 
|     <Container layoutConstraint="top"> | 
|       <Property name="height">55</Property> | 
|       <Property name="contentOverflow">hidden</Property> | 
|       <Property name="exClassName">bg-color</Property> | 
|       <Label layoutConstraint="left padding:10"> | 
|         <Property name="text">菜单栏:</Property> | 
|       </Label> | 
|       <Button layoutConstraint="left padding:10"> | 
|         <ClientEvent name="onClick">view.get("#dsMain").insert();
 | 
| view.get("#code").set("readOnly",false);
 | 
| view.get("#dialogMain").show();</ClientEvent> | 
|         <Property name="caption">新增</Property> | 
|         <Property name="iconClass">fa fa-plus</Property> | 
|         <Property name="exClassName">btn-default</Property> | 
|       </Button> | 
|       <Button layoutConstraint="left padding:10"> | 
|         <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 | 
| if(data){
 | 
|     view.get("#code").set("readOnly",true);
 | 
|     view.get("#dialogMain").show();
 | 
| }</ClientEvent> | 
|         <Property name="caption">修改</Property> | 
|         <Property name="iconClass">fa fa-pencil</Property> | 
|         <Property name="exClassName">btn-warm</Property> | 
|       </Button> | 
|       <Button layoutConstraint="left padding:10"> | 
|         <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 | 
| if(!data){
 | 
|     return;
 | 
| }
 | 
| view.get("#ajaxDel").set("parameter",data).execute(function(result){
 | 
|     if(result){
 | 
|         $alert(result);
 | 
|         return;
 | 
|     }else{
 | 
|         data.remove();
 | 
|     }
 | 
| });</ClientEvent> | 
|         <Property name="caption">删除</Property> | 
|         <Property name="iconClass">fa fa-times</Property> | 
|         <Property name="exClassName">btn-warn</Property> | 
|       </Button> | 
|       <Button layoutConstraint="left padding:10"> | 
|         <ClientEvent name="onClick">view.get("#dsMain").flushAsync();
 | 
| </ClientEvent> | 
|         <Property name="caption">刷新</Property> | 
|         <Property name="iconClass">fa fa-refresh</Property> | 
|         <Property name="exClassName">btn-normal</Property> | 
|       </Button> | 
|     </Container> | 
|     <Container layout="regionPadding:10" layoutConstraint="center"> | 
|       <Property name="exClassName">bg-color</Property> | 
|       <DataGrid layoutConstraint="center padding:5px"> | 
|         <ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsMain.data:#");
 | 
| if(data){
 | 
|     view.get("#dialogMain").show();
 | 
| }</ClientEvent> | 
|         <Property name="dataSet">dsMain</Property> | 
|         <Property name="readOnly">true</Property> | 
|         <RowNumColumn/> | 
|         <DataColumn name="code"> | 
|           <Property name="property">code</Property> | 
|         </DataColumn> | 
|         <DataColumn name="name"> | 
|           <Property name="property">name</Property> | 
|         </DataColumn> | 
|         <DataColumn> | 
|           <Property name="property">unit</Property> | 
|           <Property name="name">unit</Property> | 
|         </DataColumn> | 
|         <DataColumn name="type"> | 
|           <Property name="property">type</Property> | 
|         </DataColumn> | 
|         <DataColumn name="remark"> | 
|           <Property name="property">remark</Property> | 
|         </DataColumn> | 
|       </DataGrid> | 
|     </Container> | 
|     <Dialog id="dialogMain"> | 
|       <Property name="visible">false</Property> | 
|       <Property name="caption">质量信息</Property> | 
|       <Property name="width">30%</Property> | 
|       <Property name="height">300</Property> | 
|       <Property name="closeable">false</Property> | 
|       <Buttons> | 
|         <Button> | 
|           <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 | 
| if(data.validate() != 'ok'){
 | 
|     $notify("数据校验失败!!");
 | 
|     return;
 | 
| }
 | 
| view.get("#uaAction").set("parameter",data).execute(function(){
 | 
|     self.get("parent").hide();
 | 
| });</ClientEvent> | 
|           <Property name="caption">保存</Property> | 
|           <Property name="iconClass">fa fa-check</Property> | 
|           <Property name="exClassName">btn-normal</Property> | 
|         </Button> | 
|         <Button> | 
|           <ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
 | 
| self.get("parent").hide();</ClientEvent> | 
|           <Property name="caption">取消</Property> | 
|           <Property name="iconClass">fa fa-times</Property> | 
|           <Property name="exClassName">btn-warn</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">100</Property> | 
|           <AutoFormElement id="code"> | 
|             <Property name="name">code</Property> | 
|             <Property name="property">code</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|           <AutoFormElement> | 
|             <Property name="name">companyId</Property> | 
|             <Property name="property">companyId</Property> | 
|             <Property name="hideMode">display</Property> | 
|             <Property name="visible">false</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|           <AutoFormElement> | 
|             <Property name="name">name</Property> | 
|             <Property name="property">name</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|           <AutoFormElement> | 
|             <Property name="name">unit</Property> | 
|             <Property name="property">unit</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|           <AutoFormElement> | 
|             <Property name="name">type</Property> | 
|             <Property name="property">type</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|           <AutoFormElement> | 
|             <Property name="name">remark</Property> | 
|             <Property name="property">remark</Property> | 
|             <Editor/> | 
|           </AutoFormElement> | 
|         </AutoForm> | 
|       </Children> | 
|       <Tools/> | 
|     </Dialog> | 
|     <UpdateAction id="uaAction"> | 
|       <Property name="dataResolver">dicCheckItemPR#saveData</Property> | 
|       <UpdateItem> | 
|         <Property name="dataSet">dsMain</Property> | 
|         <Property name="dataPath">[#current]</Property> | 
|       </UpdateItem> | 
|     </UpdateAction> | 
|     <AjaxAction id="ajaxDel"> | 
|       <Property name="confirmMessage">确定要删除吗?</Property> | 
|       <Property name="service">dicCheckItemPR#delData</Property> | 
|     </AjaxAction> | 
|   </View> | 
| </ViewConfig> |