<?xml version="1.0" encoding="UTF-8"?>
|
<ViewConfig>
|
<Arguments/>
|
<Context/>
|
<Model>
|
<DataType name="dtMain">
|
<Property name="creationType">com.ld.igds.models.DrugApply</Property>
|
<PropertyDef name="id">
|
<Property></Property>
|
<Property name="label">id</Property>
|
</PropertyDef>
|
<PropertyDef name="companyId">
|
<Property></Property>
|
<Property name="label">组织编码</Property>
|
</PropertyDef>
|
<PropertyDef name="applyTime">
|
<Property name="dataType">Date</Property>
|
<Property name="label">申请时间</Property>
|
</PropertyDef>
|
<PropertyDef name="applyUser">
|
<Property></Property>
|
<Property name="label">申请人</Property>
|
<Property name="required">true</Property>
|
</PropertyDef>
|
<PropertyDef name="applyReason">
|
<Property></Property>
|
<Property name="label">用途说明</Property>
|
<Property name="readOnly">true</Property>
|
</PropertyDef>
|
<PropertyDef name="drugName">
|
<Property></Property>
|
<Property name="label">申请药品</Property>
|
</PropertyDef>
|
<PropertyDef name="count">
|
<Property name="dataType">int</Property>
|
<Property name="label">数量</Property>
|
</PropertyDef>
|
<PropertyDef name="auditTime">
|
<Property name="dataType">Date</Property>
|
<Property name="label">审核时间</Property>
|
</PropertyDef>
|
<PropertyDef name="auditUser">
|
<Property></Property>
|
<Property name="label">审核人</Property>
|
</PropertyDef>
|
<PropertyDef name="auditReason">
|
<Property></Property>
|
<Property name="label">审核说明</Property>
|
</PropertyDef>
|
<PropertyDef name="status">
|
<Property></Property>
|
<Property name="label">数据状态</Property>
|
<Property name="mapping">
|
<Property name="mapValues">
|
<Collection>
|
<Entity>
|
<Property name="name">通过</Property>
|
<Property name="value">PASS</Property>
|
</Entity>
|
<Entity>
|
<Property name="name">拒接</Property>
|
<Property name="value">UNPASS</Property>
|
</Entity>
|
<Entity>
|
<Property name="name">待审核</Property>
|
<Property name="value">NONE</Property>
|
</Entity>
|
</Collection>
|
</Property>
|
<Property name="valueProperty">name</Property>
|
<Property name="keyProperty">value</Property>
|
</Property>
|
</PropertyDef>
|
<PropertyDef name="remarks">
|
<Property></Property>
|
<Property name="label">备注说明</Property>
|
</PropertyDef>
|
</DataType>
|
</Model>
|
<View layout="padding:5;regionPadding:5">
|
<Property name="packages">font-awesome,css-common</Property>
|
<DataSet id="dsMain">
|
<Property name="dataType">[dtMain]</Property>
|
<Property name="pageSize">20</Property>
|
<Property name="dataProvider">drugApplyPR#pageDrug</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({
|
applyUser : "${loginUser.getCname()}",
|
applyTime : new Date()
|
});
|

|
view.get("^tagAduit").set("readOnly",true);
|
view.get("^tagBtnAudit").set("visible",false);
|
view.get("#btnOk").set("visible",true);
|

|
view.get("#dialogMain").show();</ClientEvent>
|
<Property name="caption">新增</Property>
|
<Property name="exClassName">btn-default</Property>
|
<Property name="iconClass">fa fa-plus</Property>
|
</Button>
|
<Button layoutConstraint="left">
|
<ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
|
if(data){
|
view.get("^tagAduit").set("readOnly",true);
|
view.get("^tagBtnAudit").set("visible",false);
|
view.get("#btnOk").set("visible",true);
|
view.get("#dialogMain").show();
|
}</ClientEvent>
|
<Property name="caption">编辑</Property>
|
<Property name="exClassName">btn-warm</Property>
|
<Property name="iconClass">fa fa-pencil</Property>
|
</Button>
|
<Button layoutConstraint="left">
|
<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="exClassName">btn-warn</Property>
|
<Property name="iconClass">fa fa-minus</Property>
|
</Button>
|
<Button layoutConstraint="left">
|
<ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
|
if(!data){
|
return;
|
}
|

|
view.get("^tagAduit").set("readOnly",false);
|
view.get("^tagBtnAudit").set("visible",true);
|
view.get("#btnOk").set("visible",false);
|

|
data.set("auditUser","${loginUser.getCname()}");
|
data.set("auditTime",new Date());
|

|
if(data){
|
view.get("#dialogMain").show();
|
};</ClientEvent>
|
<Property name="caption">审核</Property>
|
<Property name="exClassName">btn-normal</Property>
|
<Property name="iconClass">fa fa-gavel</Property>
|
</Button>
|
<Button layoutConstraint="left">
|
<ClientEvent name="onClick">view.get("#dsMain").flushAsync();</ClientEvent>
|
<Property name="caption">刷新</Property>
|
<Property name="exClassName">btn-default</Property>
|
<Property name="iconClass">fa fa-search</Property>
|
</Button>
|
<TextEditor id="paramName" layoutConstraint="right">
|
<Property name="width">200</Property>
|
<Property name="blankText">--申请人--</Property>
|
<Property name="trigger">triggerQuery</Property>
|
</TextEditor>
|
<Trigger id="triggerQuery">
|
<ClientEvent name="onExecute">var name = view.get("#paramName.text");
|
if(null != name && ""!= name){
|
view.get("#dsMain").set("parameter",{name:name}).flushAsync();
|
}</ClientEvent>
|
<Property name="iconClass">fa fa-search</Property>
|
</Trigger>
|
</Container>
|
<Container layoutConstraint="center">
|
<Property name="exClassName">bg-color</Property>
|
<DataGrid>
|
<ClientEvent name="onDataRowDoubleClick">var data = view.get("#dsMain.data:#");
|
if(data){
|
view.get("^tagAduit").set("readOnly",true);
|
view.get("^tagBtnAudit").set("visible",false);
|
view.get("#btnOk").set("visible",true);
|
view.get("#dialogMain").show();
|
}</ClientEvent>
|
<Property name="dataSet">dsMain</Property>
|
<Property name="readOnly">true</Property>
|
<RowNumColumn/>
|
<DataColumn name="applyTime">
|
<Property name="property">applyTime</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="applyUser">
|
<Property name="property">applyUser</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="applyReason">
|
<Property name="property">applyReason</Property>
|
</DataColumn>
|
<DataColumn name="drugName">
|
<Property name="property">drugName</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="count">
|
<Property name="property">count</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="auditTime">
|
<Property name="property">auditTime</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="auditUser">
|
<Property name="property">auditUser</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
<DataColumn name="auditReason">
|
<Property name="property">auditReason</Property>
|
</DataColumn>
|
<DataColumn name="status">
|
<Property name="property">status</Property>
|
<Property name="align">center</Property>
|
</DataColumn>
|
</DataGrid>
|
</Container>
|
<Container layoutConstraint="bottom">
|
<Property name="exClassName">bg-color</Property>
|
<DataPilot layoutConstraint="right">
|
<Property name="dataSet">dsMain</Property>
|
<Property name="itemCodes">pageSize,pages</Property>
|
</DataPilot>
|
</Container>
|
<Dialog id="dialogMain">
|
<Property name="closeable">false</Property>
|
<Property name="caption">数据信息</Property>
|
<Property name="width">60%</Property>
|
<Buttons>
|
<Button id="btnOk">
|
<ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
|

|
if(data.validate() != 'ok'){
|
$notify("数据校验失败!!");
|
return;
|
}
|

|
view.get("#ajaxSave").set("parameter",data).execute(function(result){
|
if(result){
|
$alert(result);
|
return;
|
}
|
$notify("数据执行完成!!");
|
self.get("parent").hide();
|
});</ClientEvent>
|
<Property name="caption">确定</Property>
|
<Property name="iconClass">fa fa-check</Property>
|
</Button>
|
<Button>
|
<ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
|

|
if(data.validate() != 'ok'){
|
$notify("数据校验失败!!");
|
return;
|
}
|

|
data.set("status","PASS");//设置为通过
|

|
view.get("#ajaxAudit").set("parameter",data).execute(function(result){
|
if(result){
|
$alert(result);
|
return;
|
}
|
$notify("数据执行完成!!");
|
self.get("parent").hide();
|
});</ClientEvent>
|
<Property name="caption">通过</Property>
|
<Property name="iconClass">fa fa-gavel</Property>
|
<Property name="tags">tagBtnAudit</Property>
|
<Property name="hideMode">display</Property>
|
</Button>
|
<Button>
|
<ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
|

|
if(data.validate() != 'ok'){
|
$notify("数据校验失败!!");
|
return;
|
}
|

|
data.set("status","UNPASS");//设置为不通过
|

|
view.get("#ajaxAudit").set("parameter",data).execute(function(result){
|
if(result){
|
$alert(result);
|
return;
|
}
|
$notify("数据执行完成!!");
|
self.get("parent").hide();
|
});</ClientEvent>
|
<Property name="caption">拒绝</Property>
|
<Property name="iconClass">fa fa-reply</Property>
|
<Property name="tags">tagBtnAudit</Property>
|
<Property name="hideMode">display</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>
|
</Button>
|
</Buttons>
|
<Children>
|
<AutoForm>
|
<Property name="dataSet">dsMain</Property>
|
<Property name="cols">*,*,*</Property>
|
<AutoFormElement>
|
<Property name="name">applyUser</Property>
|
<Property name="property">applyUser</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">applyTime</Property>
|
<Property name="property">applyTime</Property>
|
<Property name="readOnly">true</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement layoutConstraint="colSpan:3">
|
<Property name="name">applyReason</Property>
|
<Property name="property">applyReason</Property>
|
<Property name="editorType">TextArea</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">drugName</Property>
|
<Property name="property">drugName</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">count</Property>
|
<Property name="property">count</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">status</Property>
|
<Property name="property">status</Property>
|
<Property name="readOnly">true</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">auditUser</Property>
|
<Property name="property">auditUser</Property>
|
<Property name="tags">tagAduit</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement>
|
<Property name="name">auditTime</Property>
|
<Property name="property">auditTime</Property>
|
<Property name="readOnly">true</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement layoutConstraint="colSpan:3">
|
<Property name="name">auditReason</Property>
|
<Property name="property">auditReason</Property>
|
<Property name="editorType">TextArea</Property>
|
<Property name="tags">tagAduit</Property>
|
<Editor/>
|
</AutoFormElement>
|
<AutoFormElement layoutConstraint="colSpan:3">
|
<Property name="name">remarks</Property>
|
<Property name="property">remarks</Property>
|
<Property name="editorType">TextArea</Property>
|
<Editor/>
|
</AutoFormElement>
|
</AutoForm>
|
</Children>
|
<Tools/>
|
</Dialog>
|
<AjaxAction id="ajaxSave">
|
<Property name="service">drugApplyPR#updateDrugApply</Property>
|
</AjaxAction>
|
<AjaxAction id="ajaxDel">
|
<Property name="service">drugApplyPR#delDrugApply</Property>
|
<Property name="confirmMessage">确定要执行删除么?</Property>
|
</AjaxAction>
|
<AjaxAction id="ajaxAudit">
|
<Property name="service">drugApplyPR#auditDrugApply</Property>
|
<Property name="confirmMessage">确定要提交么?</Property>
|
</AjaxAction>
|
</View>
|
</ViewConfig>
|