Sjednoceny požadavky na objednávky s požadavky na cestovní příkaz.

closes #115
multitenant
František Přibyl 10 years ago
parent f26e5e12c9
commit 07d78ba3f1

@ -119,7 +119,7 @@ public class RequirementForm extends FormViewModel<Requirement>
@Command @Command
public void addSelectedItem() public void addSelectedItem()
{ {
Window window = (Window) Executions.createComponents("/requirements/selectitems/selectItems.zul", null, null); Window window = (Window) Executions.createComponents("/main/selectItems.zul", null, null);
window.doModal(); window.doModal();
} }

@ -27,11 +27,11 @@
<menuitem <menuitem
image="/img/req-trip-016.png" image="/img/req-trip-016.png"
label="${labels.CurrentRequirements}" label="${labels.CurrentRequirements}"
href="/trips/requirement" /> href="/main/trips/requirements/" />
<menuitem <menuitem
image="/img/pickup-024.png" image="/img/pickup-024.png"
label="${labels.TravelOrders}" label="${labels.TravelOrders}"
href="/trips/bill" /> href="/main/trips/bill" />
</menupopup> </menupopup>
</menu> </menu>
<menuseparator /> <menuseparator />

@ -2,10 +2,10 @@
<zk> <zk>
<label value="Stav schválení: "/> <label value="Stav schválení: "/>
<button label="Schválit" onClick="@command('approve')" disabled="@load(not vmSub.canApprove)"/> <button label="Schválit" onClick="@command('approve')" disabled="@load(not vm.canApprove)"/>
<vbox children="@load(vmSub.dataBean.workflow)"> <vbox children="@load(vm.dataBean.workflow)">
<template name="children"> <template name="children">
<grid model="@load(vmSub.dataBean.authorization)"> <grid model="@load(vm.dataBean.authorization)">
<columns> <columns>
<column label="@load(each.role.description)"/> <column label="@load(each.role.description)"/>
<column label="Datum"/> <column label="Datum"/>

@ -143,7 +143,7 @@
</template> </template>
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/requirements/approveStatus.zul" /> <include src="/main/approveStatus.zul" />
</div> </div>
</hbox> </hbox>
</window> </window>

@ -143,7 +143,7 @@
</template> </template>
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/requirements/approveStatus.zul" /> <include src="/main/approveStatus.zul" />
</div> </div>
</hbox> </hbox>
</window> </window>

@ -143,7 +143,7 @@
</template> </template>
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/requirements/approveStatus.zul" /> <include src="/main/approveStatus.zul" />
</div> </div>
</hbox> </hbox>
</window> </window>

@ -10,7 +10,7 @@
src="/img/pickup-032.png" src="/img/pickup-032.png"
zclass="form-caption" zclass="form-caption"
label="${labels.TravelOrders}" /> label="${labels.TravelOrders}" />
<include src="/requirements/toolbar.zul" /> <include src="/main/toolbar.zul" />
<listbox <listbox
vflex="1" vflex="1"
model="@load(vm.dataList)" model="@load(vm.dataList)"

@ -0,0 +1,10 @@
<?page title="${labels.AgendaActRequirements}" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript>
String gridZul = "setup.zul";
</zscript>
<include src="/app/template.zhtml"/>
</zk>

@ -0,0 +1,127 @@
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window
vflex="1"
border="normal"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.TripRequirementList')">
<include src="/app/toolbar.zul" />
<listbox
vflex="1"
model="@load(vm.dataList)"
selectedItem="@bind(vm.dataBean)"
onAfterRender="@command('afterRender')"
selectedIndex="@bind(vm.selIndex)">
<listhead
menupopup="auto"
sizable="true">
<listheader
label="${labels.RequirementsGridNumberSerie}"
sort="czech(numser)"
width="180px" />
<listheader
label="${labels.RequirementsGridReqDate}"
sort="auto(reqDate)"
width="200px" />
<listheader
label="${labels.RequirementsGridCenter}"
sort="auto(centre)" />
<listheader
label="${labels.RequirementsGridFrom}"
sort="czech(from)" />
<listheader
label="${labels.RequirementsGridTo}"
sort="czech(to)" />
</listhead>
<auxhead
sclass="category-center"
visible="@load(vm.filter)">
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.numser)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<datebox
value="@bind(vm.filterTemplate.reqDate)"
format="${labels.DateFormat}"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<combobox
readonly="true"
width="100%"
selectedItem="@bind(vm.filterTemplate.centre)"
model="@load(vm.myCentres)"
onChange="@command('doFilter')">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.from)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.to)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
</auxhead>
<template name="model">
<listitem style="@load((each.state eq 'PARTIALLY') ? 'background-color: #fffb90' : ((each.state eq 'APPROVED') ? 'background-color: #afffb5' : ''))">
<listcell label="@load(each.numser)" />
<listcell label="@load(each.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
<listcell label="@load(each.centre.fullName)" />
<listcell label="@load(each.from)" />
<listcell label="@load(each.to)" />
</listitem>
</template>
</listbox>
</window>
</zk>

@ -0,0 +1,176 @@
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window
vflex="1"
border="normal"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.TripRequirementListAll')">
<include src="/main/toolbar.zul" />
<hbox vflex="1">
<listbox
model="@load(vm.dataList)"
selectedItem="@bind(vm.dataBean)"
hflex="7"
onAfterRender="@command('afterRender')"
selectedIndex="@bind(vm.selIndex)"
vflex="1">
<listhead menupopup="auto">
<listheader
label="${labels.RequirementsGridNumberSerie}"
sort="czech(numser)"
width="10%" />
<listheader
label="${labels.RequirementsGridReqDate}"
sort="auto(reqDate)"
width="13%" />
<listheader
label="${labels.RequirementsGridCenter}"
sort="auto(centre)"
width="10%" />
<listheader
label="${labels.RequirementsGridWorkgroup}"
sort="auto(workgroup)"
width="10%" />
<listheader
label="${labels.RequirementsGridFrom}"
sort="czech(from)"
width="30%" />
<listheader
label="${labels.RequirementsGridTo}"
sort="czech(to)"
width="30%" />
<listheader
label="${labels.RequirementsGridOwnedBy}"
sort="auto(ownedBy)"
width="20%" />
</listhead>
<auxhead
sclass="category-center"
visible="@load(vm.filter)">
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.numser)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<datebox
value="@bind(vm.filterTemplate.reqDate)"
format="${labels.DateFormat}"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<combobox
readonly="true"
width="100%"
selectedItem="@bind(vm.filterTemplate.centre)"
model="@load(vm.allCentres)"
onChange="@command('doFilter')">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<combobox
readonly="true"
width="100%"
selectedItem="@bind(vm.filterTemplate.workgroup)"
model="@load(vm.allWorkgroups)"
onChange="@command('doFilter')">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.from)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.to)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.ownedBy.lastName)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
</auxhead>
<template name="model">
<listitem style="@load((each.state eq 'PARTIALLY') ? 'background-color: #fffb90' : ((each.state eq 'APPROVED') ? 'background-color: #afffb5' : ''))">
<listcell label="@load(each.numser)" />
<listcell label="@load(each.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
<listcell label="@load(each.centre.fullName)" />
<listcell label="@load(each.workgroup.fullName)" />
<listcell label="@load(each.from)" />
<listcell label="@load(each.to)" />
<listcell label="@load(each.ownedBy)" />
</listitem>
</template>
</listbox>
<div hflex="3">
<include src="/main/approveStatus.zul" />
</div>
</hbox>
</window>
</zk>

@ -0,0 +1,154 @@
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window
vflex="1"
border="normal"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.TripRequirementListCentre')">
<include src="/main/toolbar.zul" />
<hbox vflex="1">
<listbox
model="@load(vm.dataList)"
selectedItem="@bind(vm.dataBean)"
hflex="7"
onAfterRender="@command('afterRender')"
selectedIndex="@bind(vm.selIndex)"
vflex="1">
<listhead menupopup="auto">
<listheader
label="${labels.RequirementsGridNumberSerie}"
sort="czech(numser)"
width="10%" />
<listheader
label="${labels.RequirementsGridReqDate}"
sort="auto(reqDate)"
width="13%" />
<listheader
label="${labels.RequirementsGridCenter}"
sort="auto(centre)"
width="10%" />
<listheader
label="${labels.RequirementsGridFrom}"
sort="auto(from)"
width="40%" />
<listheader
label="${labels.RequirementsGridTo}"
sort="czech(to)"
width="40%" />
<listheader
label="${labels.RequirementsGridOwnedBy}"
sort="auto(ownedBy)"
width="20%" />
</listhead>
<auxhead
sclass="category-center"
visible="@load(vm.filter)">
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.numser)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<datebox
value="@bind(vm.filterTemplate.reqDate)"
format="${labels.DateFormat}"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<combobox
readonly="true"
width="100%"
selectedItem="@bind(vm.filterTemplate.centre)"
model="@load(vm.myCentres)"
onChange="@command('doFilter')">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.from)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.to)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.ownedBy.lastName)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
</auxhead>
<template name="model">
<listitem style="@load((each.state eq 'PARTIALLY') ? 'background-color: #fffb90' : ((each.state eq 'APPROVED') ? 'background-color: #afffb5' : ''))">
<listcell label="@load(each.numser)" />
<listcell label="@load(each.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
<listcell label="@load(each.centre.fullName)" />
<listcell label="@load(each.from)" />
<listcell label="@load(each.to)" />
<listcell label="@load(each.ownedBy)" />
</listitem>
</template>
</listbox>
<div hflex="3">
<include src="/main/approveStatus.zul" />
</div>
</hbox>
</window>
</zk>

@ -0,0 +1,176 @@
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window
vflex="1"
border="normal"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.TripRequirementListWorkgroup')">
<include src="/main/toolbar.zul" />
<hbox vflex="1">
<listbox
model="@load(vm.dataList)"
selectedItem="@bind(vm.dataBean)"
hflex="7"
onAfterRender="@command('afterRender')"
selectedIndex="@bind(vm.selIndex)"
vflex="1">
<listhead menupopup="auto">
<listheader
label="${labels.RequirementsGridNumberSerie}"
sort="czech(numser)"
width="10%" />
<listheader
label="${labels.RequirementsGridReqDate}"
sort="auto(reqDate)"
width="13%" />
<listheader
label="${labels.RequirementsGridCenter}"
sort="auto(centre)"
width="10%" />
<listheader
label="${labels.RequirementsGridWorkgroup}"
sort="auto(workgroup)"
width="10%" />
<listheader
label="${labels.RequirementsGridFrom}"
sort="czech(from)"
width="30%" />
<listheader
label="${labels.RequirementsGridTo}"
sort="czech(to)"
width="30%" />
<listheader
label="${labels.RequirementsGridOwnedBy}"
sort="auto(ownedBy)"
width="20%" />
</listhead>
<auxhead
sclass="category-center"
visible="@load(vm.filter)">
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.numser)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<datebox
value="@bind(vm.filterTemplate.reqDate)"
format="${labels.DateFormat}"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<combobox
readonly="true"
width="100%"
selectedItem="@bind(vm.filterTemplate.centre)"
model="@load(vm.myCentres)"
onChange="@command('doFilter')">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<combobox
readonly="true"
width="100%"
selectedItem="@bind(vm.filterTemplate.workgroup)"
model="@load(vm.myWorkgroups)"
onChange="@command('doFilter')">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.from)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.to)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTemplate.ownedBy.lastName)"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
</auxhead>
<template name="model">
<listitem style="@load((each.state eq 'PARTIALLY') ? 'background-color: #fffb90' : ((each.state eq 'APPROVED') ? 'background-color: #afffb5' : ''))">
<listcell label="@load(each.numser)" />
<listcell label="@load(each.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
<listcell label="@load(each.centre.fullName)" />
<listcell label="@load(each.workgroup.fullName)" />
<listcell label="@load(each.from)" />
<listcell label="@load(each.to)" />
<listcell label="@load(each.ownedBy)" />
</listitem>
</template>
</listbox>
<div hflex="3">
<include src="/main/approveStatus.zul" />
</div>
</hbox>
</window>
</zk>

@ -0,0 +1,21 @@
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<zk>
<zscript>
String gridMy = "/main/trips/requirements/reqListMy.zul";
String gridMyCenters = "/main/trips/requirements/reqListMyCenters.zul";
String gridMyWorkgroups = "/main/trips/requirements/reqListMyWorkgroups.zul";
String gridAll = "/main/trips/requirements/reqListMyAll.zul";
</zscript>
<window
vflex="1"
border="normal">
<caption
image="/img/req-trip-032.png"
zclass="form-caption"
label="${labels.AgendaActRequirements}" />
<include
vflex="1"
src="/main/tabPanels.zul" />
</window>
</zk>

@ -1,8 +0,0 @@
<?page title="req toolbar" contentType="text/html;charset=UTF-8"?>
<zk>
<toolbar>
<toolbarbutton image="/img/edit.png" tooltiptext="${labels.ToolbarRecEdit}" id="btnEdit" onClick="@command('edit')" disabled="@load(empty vmSub.dataBean ? 'true' : 'false')"/>
<toolbarbutton image="/img/funnel.png" tooltiptext="${labels.ToolbarRecFilter}" id="btnFilter" onClick="@command('filter')" />
<toolbarbutton image="/img/print.png" tooltiptext="${labels.ToolbarPrint}" id="btnPrint" onClick="@command('onPrint')" />
</toolbar>
</zk>

@ -142,17 +142,17 @@
</tabpanel> </tabpanel>
<tabpanel apply="org.zkoss.bind.BindComposer" <tabpanel apply="org.zkoss.bind.BindComposer"
viewModel="@id('vmSub') @init('info.bukova.isspst.ui.requirement.TripRequirementListCentre')" viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.TripRequirementListCentre')"
vflex="1"> vflex="1">
<include src="/requirements/toolbar.zul"/> <include src="/requirements/toolbar.zul"/>
<hbox vflex="1"> <hbox vflex="1">
<listbox <listbox
model="@load(vmSub.dataList)" model="@load(vm.dataList)"
selectedItem="@bind(vmSub.dataBean)" selectedItem="@bind(vm.dataBean)"
hflex="7" hflex="7"
onAfterRender="@command('afterRender')" onAfterRender="@command('afterRender')"
selectedIndex="@bind(vmSub.selIndex)" selectedIndex="@bind(vm.selIndex)"
vflex="1"> vflex="1">
<listhead menupopup="auto"> <listhead menupopup="auto">
<listheader <listheader
@ -182,12 +182,12 @@
</listhead> </listhead>
<auxhead <auxhead
sclass="category-center" sclass="category-center"
visible="@load(vmSub.filter)"> visible="@load(vm.filter)">
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.numser)" value="@bind(vm.filterTemplate.numser)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
@ -201,7 +201,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<datebox <datebox
value="@bind(vmSub.filterTemplate.reqDate)" value="@bind(vm.filterTemplate.reqDate)"
format="${labels.DateFormat}" format="${labels.DateFormat}"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
@ -218,8 +218,8 @@
<combobox <combobox
readonly="true" readonly="true"
width="100%" width="100%"
selectedItem="@bind(vmSub.filterTemplate.centre)" selectedItem="@bind(vm.filterTemplate.centre)"
model="@load(vmSub.myCentres)" model="@load(vm.myCentres)"
onChange="@command('doFilter')"> onChange="@command('doFilter')">
<template name="model"> <template name="model">
<comboitem label="@load(each.fullName)" /> <comboitem label="@load(each.fullName)" />
@ -234,7 +234,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.from)" value="@bind(vm.filterTemplate.from)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
@ -248,7 +248,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.to)" value="@bind(vm.filterTemplate.to)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" sclass="find-grid-textbox"
@ -263,7 +263,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.ownedBy.lastName)" value="@bind(vm.filterTemplate.ownedBy.lastName)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" sclass="find-grid-textbox"
@ -288,23 +288,23 @@
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/requirements/approveStatus.zul"/> <include src="/main/approveStatus.zul"/>
</div> </div>
</hbox> </hbox>
</tabpanel> </tabpanel>
<tabpanel apply="org.zkoss.bind.BindComposer" <tabpanel apply="org.zkoss.bind.BindComposer"
viewModel="@id('vmSub') @init('info.bukova.isspst.ui.requirement.TripRequirementListWorkgroup')" viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.TripRequirementListWorkgroup')"
vflex="1"> vflex="1">
<include src="/requirements/toolbar.zul"/> <include src="/requirements/toolbar.zul"/>
<hbox vflex="1"> <hbox vflex="1">
<listbox <listbox
model="@load(vmSub.dataList)" model="@load(vm.dataList)"
selectedItem="@bind(vmSub.dataBean)" selectedItem="@bind(vm.dataBean)"
hflex="7" hflex="7"
onAfterRender="@command('afterRender')" onAfterRender="@command('afterRender')"
selectedIndex="@bind(vmSub.selIndex)" selectedIndex="@bind(vm.selIndex)"
vflex="1"> vflex="1">
<listhead menupopup="auto"> <listhead menupopup="auto">
<listheader <listheader
@ -338,12 +338,12 @@
</listhead> </listhead>
<auxhead <auxhead
sclass="category-center" sclass="category-center"
visible="@load(vmSub.filter)"> visible="@load(vm.filter)">
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.numser)" value="@bind(vm.filterTemplate.numser)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
@ -357,7 +357,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<datebox <datebox
value="@bind(vmSub.filterTemplate.reqDate)" value="@bind(vm.filterTemplate.reqDate)"
format="${labels.DateFormat}" format="${labels.DateFormat}"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
@ -374,8 +374,8 @@
<combobox <combobox
readonly="true" readonly="true"
width="100%" width="100%"
selectedItem="@bind(vmSub.filterTemplate.centre)" selectedItem="@bind(vm.filterTemplate.centre)"
model="@load(vmSub.myCentres)" model="@load(vm.myCentres)"
onChange="@command('doFilter')"> onChange="@command('doFilter')">
<template name="model"> <template name="model">
<comboitem label="@load(each.fullName)" /> <comboitem label="@load(each.fullName)" />
@ -391,8 +391,8 @@
<combobox <combobox
readonly="true" readonly="true"
width="100%" width="100%"
selectedItem="@bind(vmSub.filterTemplate.workgroup)" selectedItem="@bind(vm.filterTemplate.workgroup)"
model="@load(vmSub.myWorkgroups)" model="@load(vm.myWorkgroups)"
onChange="@command('doFilter')"> onChange="@command('doFilter')">
<template name="model"> <template name="model">
<comboitem label="@load(each.fullName)" /> <comboitem label="@load(each.fullName)" />
@ -407,7 +407,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.from)" value="@bind(vm.filterTemplate.from)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
@ -421,7 +421,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.to)" value="@bind(vm.filterTemplate.to)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" sclass="find-grid-textbox"
@ -436,7 +436,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.ownedBy.lastName)" value="@bind(vm.filterTemplate.ownedBy.lastName)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" sclass="find-grid-textbox"
@ -462,22 +462,22 @@
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/requirements/approveStatus.zul"/> <include src="/main/approveStatus.zul"/>
</div> </div>
</hbox> </hbox>
</tabpanel> </tabpanel>
<tabpanel vflex="1" apply="org.zkoss.bind.BindComposer" <tabpanel vflex="1" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vmSub') @init('info.bukova.isspst.ui.requirement.TripRequirementListAll')"> viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.TripRequirementListAll')">
<include src="/requirements/toolbar.zul"/> <include src="/requirements/toolbar.zul"/>
<hbox vflex="1"> <hbox vflex="1">
<listbox <listbox
model="@load(vmSub.dataList)" model="@load(vm.dataList)"
selectedItem="@bind(vmSub.dataBean)" selectedItem="@bind(vm.dataBean)"
hflex="7" hflex="7"
onAfterRender="@command('afterRender')" onAfterRender="@command('afterRender')"
selectedIndex="@bind(vmSub.selIndex)" selectedIndex="@bind(vm.selIndex)"
vflex="1"> vflex="1">
<listhead menupopup="auto"> <listhead menupopup="auto">
<listheader <listheader
@ -511,12 +511,12 @@
</listhead> </listhead>
<auxhead <auxhead
sclass="category-center" sclass="category-center"
visible="@load(vmSub.filter)"> visible="@load(vm.filter)">
<auxheader> <auxheader>
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.numser)" value="@bind(vm.filterTemplate.numser)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
@ -530,7 +530,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<datebox <datebox
value="@bind(vmSub.filterTemplate.reqDate)" value="@bind(vm.filterTemplate.reqDate)"
format="${labels.DateFormat}" format="${labels.DateFormat}"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
@ -547,8 +547,8 @@
<combobox <combobox
readonly="true" readonly="true"
width="100%" width="100%"
selectedItem="@bind(vmSub.filterTemplate.centre)" selectedItem="@bind(vm.filterTemplate.centre)"
model="@load(vmSub.allCentres)" model="@load(vm.allCentres)"
onChange="@command('doFilter')"> onChange="@command('doFilter')">
<template name="model"> <template name="model">
<comboitem label="@load(each.fullName)" /> <comboitem label="@load(each.fullName)" />
@ -564,8 +564,8 @@
<combobox <combobox
readonly="true" readonly="true"
width="100%" width="100%"
selectedItem="@bind(vmSub.filterTemplate.workgroup)" selectedItem="@bind(vm.filterTemplate.workgroup)"
model="@load(vmSub.allWorkgroups)" model="@load(vm.allWorkgroups)"
onChange="@command('doFilter')"> onChange="@command('doFilter')">
<template name="model"> <template name="model">
<comboitem label="@load(each.fullName)" /> <comboitem label="@load(each.fullName)" />
@ -580,7 +580,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.from)" value="@bind(vm.filterTemplate.from)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" /> sclass="find-grid-textbox" />
@ -594,7 +594,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.to)" value="@bind(vm.filterTemplate.to)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" sclass="find-grid-textbox"
@ -609,7 +609,7 @@
<div sclass="find-grid-cell"> <div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox"> <div sclass="find-grid-divtextbox">
<textbox <textbox
value="@bind(vmSub.filterTemplate.ownedBy.lastName)" value="@bind(vm.filterTemplate.ownedBy.lastName)"
instant="true" instant="true"
onChange="@command('doFilter')" onChange="@command('doFilter')"
sclass="find-grid-textbox" sclass="find-grid-textbox"
@ -635,7 +635,7 @@
</listbox> </listbox>
<div hflex="3"> <div hflex="3">
<include src="/requirements/approveStatus.zul"/> <include src="/main/approveStatus.zul"/>
</div> </div>
</hbox> </hbox>

@ -0,0 +1,167 @@
<?page title="${labels.RequirementsFormTitle}" contentType="text/html;charset=UTF-8"?>
<zk>
<window
id="editWin"
closable="true"
border="normal"
position="center"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.TripRequirementForm')">
<caption
src="/img/reqact.png"
zclass="form-caption"
label="${labels.RequirementsFormTitle}" />
<vlayout form="@id('fx') @load(vm.dataBean) @save(vm.dataBean, before='save') @validator(vm.validator)">
<grid hflex="min">
<columns>
<column
align="right"
hflex="min" />
<column />
</columns>
<rows>
<row>
<cell sclass="row-title">${labels.RequirementsFormNumberSerie} :</cell>
<cell>
<textbox
id="numser"
width="200px"
value="@bind(fx.numser)"
readonly="true" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormReqDate} :</cell>
<cell>
<datebox
id="reqDate"
width="200px"
value="@bind(fx.reqDate)"
format="${labels.DateFormat}" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormCenter} :</cell>
<cell>
<combobox
model="@load(vm.centres)"
readonly="true"
selectedItem="@bind(fx.centre)">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormFrom} :</cell>
<cell>
<textbox
id="from"
width="300px"
value="@bind(fx.from)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormStartDateTime} :</cell>
<cell>
<hbox>
<datebox
id="tripDate"
width="200px"
format="medium"
value="@bind(fx.tripDate)" />
<timebox
id="tripTime"
width="90px"
format="short"
value="@bind(fx.tripDate)" />
</hbox>
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormTo} :</cell>
<cell>
<textbox
id="to"
width="300px"
value="@bind(fx.to)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormPurpose} :</cell>
<cell>
<textbox
id="description"
width="300px"
value="@bind(fx.description)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormEndTravel} :</cell>
<cell>
<textbox
id="end"
width="200px"
value="@bind(fx.end)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormEndDate} :</cell>
<cell>
<datebox
id="endDate"
width="300px"
format="medium"
value="@bind(fx.endDate)" />
</cell>
</row>
</rows>
</grid>
<vbox>
<label value="${labels.RequirementsFormPassengers}"/>
<hbox>
<combobox model="@load(vm.users)"
autocomplete="true"
selectedItem="@bind(vm.selUser)">
<template name="model">
<comboitem label="@load(each)"/>
</template>
</combobox>
<button label="${labels.AddItem}"
onClick="@command('addPassanger')"
sclass="nicebutton"
disabled="@load(vm.selUser eq null)"/>
</hbox>
<grid model="@load(vm.passengers)" width="700px">
<columns>
<column/>
<column/>
</columns>
<rows>
<template name="model">
<row>
<label value="@load(each)"/>
<button label="${labels.RemoveItem}"
onClick="@command('removePassanger', user=each)"
sclass="nicebutton"/>
</row>
</template>
</rows>
</grid>
<hbox>
<label value="${labels.RequirementsFormVehicle}"/>
<combobox model="@load(vm.settings.vehicles)"
selectedItem="@bind(fx.vehicle)"
readonly="true">
<template name="model">
<comboitem label="@load(each)"/>
</template>
</combobox>
</hbox>
</vbox>
<include src="/app/formButtons.zul" />
</vlayout>
</window>
</zk>
Loading…
Cancel
Save