Formulář ag. Služební cesty / Aktuální požadavky
• přidáno textové pole "Cizí osoby" • upraven popisek formuláře • upraven vzhled a zarovnání prvků • přidána kontrola ukazatele při promazávání souborů na disku i v databázi • sjednocena maska pro formátování data v <datebox> closes #197
This commit is contained in:
@@ -15,7 +15,7 @@ RequirementsFormPurpose=Účel cesty
|
||||
RequirementsFormStartDateTime=Datum a čas odjezdu
|
||||
RequirementsFormEndTravel=Konec cesty
|
||||
RequirementsFormEndDate=Datum příjezdu
|
||||
RequirementsFormPassengers=Spolucestující:
|
||||
RequirementsFormPassengers=Spolucestující
|
||||
RequirementsFormVehicle=Dopravní prostředek:
|
||||
RequirementsGridNumberSerie=Číslo
|
||||
RequirementsGridReqDate=Datum požadavku
|
||||
@@ -393,3 +393,9 @@ Search=Hledat
|
||||
Pending = Nevyřízené
|
||||
Archive = Archiv
|
||||
Completed = Vyřízeno
|
||||
|
||||
GenerateBillingForPassengers = Generovat vyúčtování pro spolucestující
|
||||
Passenger = Pasažér
|
||||
ChooseThePasseger = Vyberte pasažéra
|
||||
TransportMode = Způsob dopravy
|
||||
ForeignPersons = Cizí osoby
|
||||
|
||||
@@ -1,37 +1,54 @@
|
||||
<?page title="${labels.TravelOrdersFormTitle}" contentType="text/html;charset=UTF-8"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul"
|
||||
<zk
|
||||
xmlns="http://www.zkoss.org/2005/zul"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
|
||||
<vbox>
|
||||
<button image="/img/upload-016.png"
|
||||
label="Připojit soubor"
|
||||
upload="true"
|
||||
onUpload="@command('uploadAttachment')"
|
||||
sclass="nicebutton" />
|
||||
<grid model="@load(vm.attachments)" height="180px">
|
||||
<vbox vflex="1">
|
||||
<button
|
||||
vflex="min"
|
||||
image="/img/upload-016.png"
|
||||
label="Připojit soubor"
|
||||
upload="true"
|
||||
onUpload="@command('uploadAttachment')"
|
||||
sclass="nicebutton" />
|
||||
<grid
|
||||
model="@load(vm.attachments)"
|
||||
vflex="1">
|
||||
<columns>
|
||||
<column label="Soubor" width="220px"/>
|
||||
<column label="Popis" hflex="max"/>
|
||||
<column width="200px"/>
|
||||
<column
|
||||
label="Soubor"
|
||||
width="220px" />
|
||||
<column
|
||||
label="Popis"
|
||||
hflex="max" />
|
||||
<column width="200px" />
|
||||
</columns>
|
||||
<rows>
|
||||
<template name="model">
|
||||
<row>
|
||||
<a href="@load('/api/dl/'.concat(each.pathInFilesystem).concat('/').concat(each.fileName))"
|
||||
label="@load(each.fileName)"
|
||||
target="blank"/>
|
||||
<textbox value="@bind(each.description)" sclass="grid-textbox-max"/>
|
||||
<a
|
||||
href="@load('/api/dl/'.concat(each.pathInFilesystem).concat('/').concat(each.fileName))"
|
||||
label="@load(each.fileName)"
|
||||
target="blank" />
|
||||
<textbox
|
||||
value="@bind(each.description)"
|
||||
sclass="grid-textbox-max" />
|
||||
<hbox>
|
||||
<button image="/img/delete-016.png" label="Odebrat" onClick="@command('deleteAttachment', attachment=each)" sclass="nicebutton"/>
|
||||
<button image="/img/download-016.png" label="Stáhnout" onClick="@command('downloadAttachment', attachment=each)" sclass="nicebutton"/>
|
||||
<button
|
||||
image="/img/delete-016.png"
|
||||
label="Odebrat"
|
||||
onClick="@command('deleteAttachment', attachment=each)"
|
||||
sclass="nicebutton" />
|
||||
<button
|
||||
image="/img/download-016.png"
|
||||
label="Stáhnout"
|
||||
onClick="@command('downloadAttachment', attachment=each)"
|
||||
sclass="nicebutton" />
|
||||
</hbox>
|
||||
</row>
|
||||
</template>
|
||||
</rows>
|
||||
</grid>
|
||||
</vbox>
|
||||
|
||||
</zk>
|
||||
@@ -15,7 +15,9 @@
|
||||
<vbox hflex="1">
|
||||
<hbox>
|
||||
<label value="${labels.RequirementApproveDate}"/>
|
||||
<datebox value="@bind(vm.approveDate)"/>
|
||||
<datebox
|
||||
value="@bind(vm.approveDate)"
|
||||
format="${labels.DateFormat}" />
|
||||
</hbox>
|
||||
<separator bar="true" hflex="1"/>
|
||||
<hbox>
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
<listcell>
|
||||
<datebox
|
||||
value="@bind(each.invoiceDate)"
|
||||
format="${labels.DateFormat}"
|
||||
inplace="true"
|
||||
onFocus="@command('onFocus', item=each)" />
|
||||
</listcell>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?page title="${labels.RequirementsFormTitle}" contentType="text/html;charset=UTF-8"?>
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul"
|
||||
<zk
|
||||
xmlns="http://www.zkoss.org/2005/zul"
|
||||
xmlns:h="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
|
||||
@@ -15,10 +16,19 @@
|
||||
<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)">
|
||||
<hbox>
|
||||
<grid hflex="min">
|
||||
label="${labels.TripRequirement}" />
|
||||
<!-- Dialog -->
|
||||
<vlayout
|
||||
form="@id('fx') @load(vm.dataBean) @save(vm.dataBean, before='save') @validator(vm.validator)"
|
||||
sclass="addScrollbar"
|
||||
vflex="1">
|
||||
<!-- Formulář + soubory -->
|
||||
<hbox
|
||||
hflex="1"
|
||||
vflex="min">
|
||||
<grid
|
||||
hflex="min"
|
||||
vflex="1">
|
||||
<columns>
|
||||
<column
|
||||
align="right"
|
||||
@@ -74,17 +84,16 @@
|
||||
<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)" />
|
||||
|
||||
<datebox
|
||||
id="tripDate"
|
||||
width="200px"
|
||||
format="${labels.DateFormat}"
|
||||
value="@bind(fx.tripDate)" />
|
||||
<timebox
|
||||
id="tripTime"
|
||||
width="90px"
|
||||
format="short"
|
||||
value="@bind(fx.tripDate)" />
|
||||
</hbox>
|
||||
</cell>
|
||||
</row>
|
||||
@@ -124,76 +133,148 @@
|
||||
<datebox
|
||||
id="endDate"
|
||||
width="300px"
|
||||
format="medium"
|
||||
format="${labels.DateFormat}"
|
||||
value="@bind(fx.endDate)" />
|
||||
</cell>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<include src="/app/uploadComponents.zul"/>
|
||||
<include
|
||||
src="/app/uploadComponents.zul"
|
||||
vflex="1" />
|
||||
</hbox>
|
||||
<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.Confirm}"
|
||||
onClick="@command('addPassanger')"
|
||||
sclass="nicebutton"
|
||||
disabled="@load(vm.selUser eq null)"/>
|
||||
</hbox>
|
||||
<checkbox label="Generovat vyúčtování pro spolucestující"
|
||||
checked="@bind(vm.dataBean.billForPassengers)"
|
||||
disabled="@load(empty vm.passengers)"/>
|
||||
<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>
|
||||
|
||||
<grid hflex="min">
|
||||
<columns>
|
||||
<column hflex="min"/>
|
||||
<column hflex="min"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${labels.RequirementsFormVehicle}"/>
|
||||
<combobox model="@load(vm.settings.vehicles)"
|
||||
selectedItem="@bind(fx.vehicle)"
|
||||
readonly="true">
|
||||
<!-- Spolucestující -->
|
||||
<groupbox
|
||||
closable="false"
|
||||
hflex="1"
|
||||
vflex="min"
|
||||
mold="3d">
|
||||
<caption label="${labels.RequirementsFormPassengers}" />
|
||||
<hlayout
|
||||
hflex="1"
|
||||
vflex="min">
|
||||
<vlayout
|
||||
hflex="1"
|
||||
vflex="1">
|
||||
<grid>
|
||||
<columns>
|
||||
<column hflex="min" />
|
||||
<column />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<cell sclass="row-title">${labels.ChooseThePasseger} :</cell>
|
||||
<cell>
|
||||
<combobox
|
||||
model="@load(vm.users)"
|
||||
autocomplete="true"
|
||||
selectedItem="@bind(vm.selUser)">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each)" />
|
||||
</template>
|
||||
</combobox>
|
||||
<button
|
||||
label="${labels.Confirm}"
|
||||
onClick="@command('addPassanger')"
|
||||
sclass="nicebutton"
|
||||
disabled="@load(vm.selUser eq null)" />
|
||||
</cell>
|
||||
</row>
|
||||
<row>
|
||||
<cell sclass="row-title">${labels.ForeignPersons} :</cell>
|
||||
<cell>
|
||||
<textbox
|
||||
id="foreignPersons"
|
||||
hflex="1"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
value="@bind(fx.foreignPersons)" />
|
||||
</cell>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<checkbox
|
||||
label="${labels.GenerateBillingForPassengers}"
|
||||
checked="@bind(vm.dataBean.billForPassengers)"
|
||||
disabled="@load(empty vm.passengers)" />
|
||||
</vlayout>
|
||||
<vlayout
|
||||
hflex="1"
|
||||
vflex="1">
|
||||
<grid
|
||||
model="@load(vm.passengers)"
|
||||
sizedByContent="true"
|
||||
hflex="1"
|
||||
height="200px">
|
||||
<columns>
|
||||
<column hflex="10" />
|
||||
<column hflex="min" />
|
||||
<column hflex="1" />
|
||||
</columns>
|
||||
<rows>
|
||||
<template name="model">
|
||||
<comboitem label="@load(each)"/>
|
||||
<row>
|
||||
<label value="@load(each)" />
|
||||
<button
|
||||
label="${labels.RemoveItem}"
|
||||
onClick="@command('removePassanger', user=each)"
|
||||
sclass="nicebutton" />
|
||||
</row>
|
||||
</template>
|
||||
</combobox>
|
||||
</row>
|
||||
<row>
|
||||
<checkbox label="Požaduji zálohu" checked="@bind(vm.dataBean.requireDownPayment)"/>
|
||||
<textbox
|
||||
value="@bind(vm.dataBean.downPayment)"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
disabled="@bind(not vm.dataBean.requireDownPayment)" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</rows>
|
||||
</grid>
|
||||
</vlayout>
|
||||
</hlayout>
|
||||
</groupbox>
|
||||
<!-- Způsob dopravy -->
|
||||
<vbox
|
||||
hflex="1"
|
||||
vflex="min">
|
||||
<groupbox
|
||||
closable="false"
|
||||
vflex="min"
|
||||
hflex="1"
|
||||
mold="3d">
|
||||
<caption label="${labels.TransportMode}" />
|
||||
<hbox>
|
||||
<grid hflex="min">
|
||||
<columns>
|
||||
<column hflex="min" />
|
||||
<column hflex="min" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<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>
|
||||
</row>
|
||||
<row>
|
||||
<checkbox
|
||||
label="Požaduji zálohu"
|
||||
checked="@bind(vm.dataBean.requireDownPayment)" />
|
||||
<textbox
|
||||
value="@bind(vm.dataBean.downPayment)"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
disabled="@bind(not vm.dataBean.requireDownPayment)" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</vbox>
|
||||
<!-- Prázdný vbox = ostatní mají min. plochu a tento se roztahuje podle toho co zbyde. Když nic nezbyde, zobrazí se na min. plochou scrollbar a tohle není vidět -->
|
||||
<vbox
|
||||
hflex="1"
|
||||
vflex="1">
|
||||
</vbox>
|
||||
<include src="/app/formButtons.zul" />
|
||||
</vlayout>
|
||||
<include
|
||||
src="/app/formButtons.zul"
|
||||
vflex="min" />
|
||||
</window>
|
||||
</zk>
|
||||
@@ -46,7 +46,7 @@
|
||||
sclass="nicebutton"/>
|
||||
<div visible="@load(not empty vm.bills)" vflex="1">
|
||||
<separator bar="true" width="100%"/>
|
||||
<label value="${labels.RequirementsFormPassengers}"/>
|
||||
<label value="${labels.RequirementsFormPassengers}:"/>
|
||||
<grid model="@load(vm.bills)" vflex="1">
|
||||
<columns>
|
||||
<column />
|
||||
|
||||
@@ -49,7 +49,10 @@
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${labels.TripBillResultMessage}"/>
|
||||
<datebox value="@bind(vm.dataBean.resultMessageDate)" disabled="${disabled}"/>
|
||||
<datebox
|
||||
value="@bind(vm.dataBean.resultMessageDate)"
|
||||
disabled="${disabled}"
|
||||
format="${labels.DateFormat}" />
|
||||
</row>
|
||||
<row>
|
||||
<cell colspan="2">
|
||||
|
||||
Reference in New Issue
Block a user