Implementovány požadavky

closes #100
This commit is contained in:
2014-07-16 10:33:54 +02:00
parent 91fdbd7a9d
commit 0cd4e039f8
31 changed files with 1074 additions and 440 deletions
@@ -3,3 +3,4 @@ DataTypeErr=Chybný datový typ...
UserPasswordIsEmpty=Uživatelské heslo musí být zadané...
UserPasswordsAreNotSame=Znovu zadané heslo není stejné...
RequirementCenterIsEmpty=Musíte zadat středisko...
@@ -36,10 +36,8 @@ AgendaOrdersHistory=Ukončené
AgendaMUnits=Měrné jednotky
MUnitsFormTitle=Měrná jednotka
MUnitsFormCode=Kód
MUnitsFormName=Název
MUnitsFormDescription=Popis
MUnitsGridColumnCode=Kód
MUnitsGridColumnName=Název
MUnitsGridColumnDescription=Popis
@@ -193,5 +191,7 @@ false=Ne
DateFormat=dd. MM. yyyy
AddItem=Přidat položku...
RemoveItem=Smazat položku...
RemoveItem=Smazat
Amount=Částka
+13
View File
@@ -25,4 +25,17 @@
.find-grid-textbox {
width: 100%;
}
.grid-textbox-max {
width: 100%;
}
.grid-textbox-max-right {
width: 100%;
text-align: right;
}
.row-title {
vertical-align: top;
}
+22 -3
View File
@@ -9,8 +9,8 @@
<listhead menupopup="auto">
<listheader label="${labels.code}" sort="czech(code)" width="10%" />
<listheader label="${labels.name}" sort="czech(name)" width="25%" />
<listheader label="${labels.description}" sort="czech(description)" width="55%" />
<listheader label="${labels.munit}" width="10%"/>
<listheader label="${labels.munit}" width="15%"/>
<listheader label="${labels.description}" sort="czech(description)" width="50%" />
</listhead>
<auxhead sclass="category-center" visible="@load(vm.filter)">
@@ -34,6 +34,25 @@
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<combobox
model="@load(vm.munitList)"
selectedItem="@bind(vm.filterTemplate.munit)"
onChange="@command('doFilter')"
readonly="true"
sclass="find-grid-textbox">
<template name="model">
<comboitem label="@load(each.name)" />
</template>
</combobox>
</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">
@@ -50,8 +69,8 @@
<listitem>
<listcell label="@load(each.code)" />
<listcell label="@load(each.name)" />
<listcell label="@load(each.munit.name)"/>
<listcell label="@load(each.description)" />
<listcell label="@load(each.munit.code)"/>
</listitem>
</template>
</listbox>
@@ -22,22 +22,22 @@
<textbox id="name" width="200px" value="@bind(vm.dataBean.name)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.description} :</cell>
<cell>
<textbox id="description" width="300px" value="@bind(vm.dataBean.description)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.munit} :</cell>
<cell>
<combobox model="@load(vm.munits)" selectedItem="@bind(vm.dataBean.munit)" readonly="true">
<template name="model">
<comboitem label="@load(each.code)"/>
<comboitem label="@load(each.name)"/>
</template>
</combobox>
</cell>
</row>
<row>
<cell sclass="row-title">${labels.description} :</cell>
<cell>
<textbox id="description" width="300px" value="@bind(vm.dataBean.description)" />
</cell>
</row>
</rows>
</grid>
<include src="/app/formButtons.zul" />
@@ -9,12 +9,6 @@
<column />
</columns>
<rows>
<row>
<cell sclass="row-title">${labels.MUnitsFormCode} :</cell>
<cell>
<textbox id="code" constraint="@load(vm.constriant)" width="200px" value="@bind(vm.dataBean.code)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.MUnitsFormName} :</cell>
<cell>
+3 -15
View File
@@ -7,26 +7,15 @@
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)">
<listhead menupopup="auto">
<listheader label="${labels.MUnitsGridColumnCode}" sort="czech(code)" width="10%" />
<listheader label="${labels.MUnitsGridColumnName}" sort="czech(name)" width="30%" />
<listheader label="${labels.MUnitsGridColumnDescription}" sort="czech(description)" width="60%" />
<listheader label="${labels.MUnitsGridColumnDescription}" sort="czech(description)" width="70%" />
</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.code)" 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.nameSpecial)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
<textbox value="@bind(vm.filterTemplate.name)" instant="true" onChange="@command('doFilter')" sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
@@ -47,8 +36,7 @@
<template name="model">
<listitem>
<listcell label="@load(each.code)" />
<listcell label="@load(each.nameSpecial)" />
<listcell label="@load(each.name)" />
<listcell label="@load(each.description)" />
</listitem>
</template>
@@ -25,14 +25,19 @@
label="${labels.RequirementsGridCenter}"
sort="czech(description)"
width="10%" />
<listheader
label="${labels.RequirementsGridDescription}"
sort="czech(description)"
width="70%" />
<listheader
label="${labels.RequirementsGridDeliveryDate}"
sort="auto(reqDate)"
width="13%" />
<listheader
label="${labels.Amount}"
sort="auto(sumTotal)"
align="right"
width="10%" />
<listheader
label="${labels.RequirementsGridDescription}"
sort="czech(description)"
width="60%" />
</listhead>
<auxhead
sclass="category-center"
@@ -59,8 +64,7 @@
format="${labels.DateFormat}"
instant="true"
onChange="@command('doFilter')"
sclass="find-grid-textbox"
width="100%" />
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
@@ -70,11 +74,12 @@
<auxheader>
<div sclass="find-grid-cell">
<combobox
model="@load(vm.centres)"
readonly="true"
width="100%"
selectedItem="@bind(vm.filterTemplate.workgroup)">
<template name="modelW">
<comboitem label="@load(each.workgroup.fullName)" />
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
<div sclass="find-grid-img">
@@ -82,6 +87,35 @@
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<datebox
value="@bind(vm.filterTemplate.deliveryDate)"
format="${labels.DateFormat}"
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.sumTotal) @converter(vm.bigDecimalConverter)"
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">
@@ -96,30 +130,15 @@
</div>
</div>
</auxheader>
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<datebox
value="@bind(vm.filterTemplate.deliveryDate)"
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>
</auxhead>
<template name="model">
<listitem>
<listcell label="@load(each.numser)" />
<listcell label="@load(each.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
<listcell label="@load(each.workgroup.fullName)" />
<listcell label="@load(each.description)" />
<listcell label="@load(each.deliveryDate) @converter('formatedDate', format=labels.DateFormat)" />
<listcell label="@load(each.sumTotal) @converter(vm.bigDecimalConverter)" />
<listcell label="@load(each.description)" />
</listitem>
</template>
</listbox>
@@ -6,12 +6,15 @@
border="normal"
position="center"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.RequirementForm')">
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.RequirementForm')"
validationMessages="@id('vmsg')">
<caption
src="/img/reqact.png"
zclass="form-caption"
label="${labels.RequirementsFormTitle}" />
<vlayout>
<vlayout
form="@id('fx') @load(vm.dataBean) @save(vm.dataBean, before='save') @validator(vm.requirementFormValidator)"
hflex="1">
<grid hflex="min">
<columns>
<column
@@ -25,9 +28,9 @@
<cell>
<textbox
id="numser"
width="150px"
constraint="@load(vm.constriant)"
width="200px"
value="@bind(vm.dataBean.numser)"
value="@bind(fx.numser)"
readonly="true" />
</cell>
</row>
@@ -36,8 +39,8 @@
<cell>
<datebox
id="reqDate"
width="200px"
value="@bind(vm.dataBean.reqDate)"
width="150px"
value="@bind(fx.reqDate)"
format="${labels.DateFormat}" />
</cell>
</row>
@@ -45,122 +48,153 @@
<cell sclass="row-title">${labels.RequirementsFormCenter} :</cell>
<cell>
<combobox
id="idReqCenter"
width="150px"
model="@load(vm.centres)"
readonly="true"
selectedItem="@bind(vm.dataBean.workgroup)">
disabled="@load(vm.editRec)"
selectedItem="@bind(fx.workgroup)">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
</combobox>
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormDescription} :</cell>
<cell>
<textbox
id="description"
width="300px"
value="@bind(vm.dataBean.description)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormDeliveryDate} :</cell>
<cell>
<datebox
id="deliveryDate"
width="200px"
value="@bind(vm.dataBean.deliveryDate)"
width="150px"
value="@bind(fx.deliveryDate)"
format="${labels.DateFormat}" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.Amount} :</cell>
<cell>
<textbox
id="idSumTotal"
readonly="true"
width="150px"
value="@bind(fx.sumTotal) @converter(vm.bigDecimalConverter)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormDescription} :</cell>
<cell>
<textbox
id="description"
width="400px"
rows="5"
value="@bind(fx.description)" />
</cell>
</row>
</rows>
</grid>
<hbox>
<button
disabled="@load(empty fx.workgroup)"
image="/img/item-add.png"
label="${labels.AddItem}"
onClick="@command('addItem')"
onClick="@command('addSelectedItem')"
sclass="nicebutton" />
</hbox>
<listbox
height="180px"
model="@load(vm.dataBean.items)"
selectedItem="@bind(vm.item)"
model="@load(vm.syncItems)"
selectedItem="@bind(vm.selectedItem)"
selectedIndex="@bind(vm.selItemIndex)">
<listhead>
<listheader
hflex="1"
Label="${labels.RequirementItemCode}" />
label="${labels.RequirementItemCode}" />
<listheader
hflex="3"
label="${labels.RequirementItemName}" />
<listheader
hflex="1"
align="right"
label="${labels.RequirementItemQuantity}" />
<listheader
hflex="1"
label="${labels.RequirementItemMUnit}" />
<listheader
hflex="2"
hflex="1"
align="right"
label="${labels.RequirementItemUnitPrice}" />
<listheader
hflex="2"
hflex="1"
align="right"
label="${labels.RequirementItemTotal}" />
<listheader
width="120px"
hflex="3"
label="${labels.RequirementItemDescription}" />
<listheader hflex="2" />
<listheader hflex="1" />
</listhead>
<template name="model">
<listitem>
<listcell>
<textbox
inplace="true"
onFocus="@command('selectItem', item=each)"
sclass="grid-textbox-max"
readonly="true"
onFocus="@command('onFocusItem', item=each, ctrl=self)"
value="@bind(each.code)" />
</listcell>
<listcell>
<textbox
inplace="true"
onFocus="@command('selectItem', item=each)"
sclass="grid-textbox-max"
onFocus="@command('onFocusItem', item=each, ctrl=self)"
value="@bind(each.name)" />
</listcell>
<listcell>
<spinner
<textbox
inplace="true"
onFocus="@command('selectItem', item=each)"
__onChange="@command('recalculate', zeroPrice=false)"
value="@bind(each.quantity)" />
sclass="grid-textbox-max-right"
onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='quantity')"
value="@bind(each.quantity) @converter(vm.bigDecimalConverter)" />
</listcell>
<listcell>
<textbox
inplace="true"
onFocus="@command('selectItem', item=each)"
value="@bind(each.mUnit)" />
sclass="grid-textbox-max"
readonly="true"
onFocus="@command('onFocusItem', item=each, ctrl=self)"
value="@bind(each.munit.name)" />
</listcell>
<listcell>
<textbox
inplace="true"
onFocus="@command('selectItem', item=each)"
value="@bind(each.unitPrice) @converter(vm.numConverter)" />
sclass="grid-textbox-max-right"
onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='unitprice')"
value="@bind(each.unitPrice) @converter(vm.bigDecimalConverter)" />
</listcell>
<listcell>
<textbox
inplace="true"
onFocus="@command('selectItem', item=each)"
value="@bind(each.total) @converter(vm.numConverter)" />
sclass="grid-textbox-max-right"
onFocus="@command('onFocusItem', item=each, ctrl=self)"
onChange="@command('recalculate', form=fx, changed='total')"
value="@bind(each.total) @converter(vm.bigDecimalConverter)" />
</listcell>
<listcell>
<textbox
inplace="true"
onFocus="@command('selectItem', item=each)"
sclass="grid-textbox-max"
onFocus="@command('onFocusItem', item=each, ctrl=self)"
value="@bind(each.description)" />
</listcell>
<listcell>
<listcell
sclass="grid-textbox-max"
style="text-align:center">
<button
image="/img/item-remove.png"
image="~./zul/img/misc/drag-disallow.png"
label="${labels.RemoveItem}"
onClick="@command('removeItem', item=each)"
onClick="@command('removeItem', item=each, ctrl=self)"
sclass="nicebutton" />
</listcell>
</listitem>
@@ -6,7 +6,7 @@
border="normal"
position="center"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirements.SelectItems')">
viewModel="@id('vm') @init('info.bukova.isspst.ui.requirement.SelectItems')">
<caption
src="/img/item-add.png"
zclass="form-caption"
@@ -27,9 +27,16 @@
</tabs>
<tabpanels>
<tabpanel>
<toolbar>
<toolbarbutton
image="/img/funnel.png"
tooltiptext="${labels.ToolbarRecFilter}"
id="btnFilterMaterial"
onClick="@command('onFilterMaterial')" />
</toolbar>
<listbox
model="@load(vm.materialList)"
selectedItem="@bind(vm.selectedMaterial)">
selectedItem="@bind(vm.selectedItem)">
<listhead menupopup="auto">
<listheader
label="${labels.code}"
@@ -39,28 +46,101 @@
label="${labels.name}"
sort="czech(name)"
width="25%" />
<listheader
label="${labels.munit}"
width="15%" />
<listheader
label="${labels.description}"
sort="czech(description)"
width="55%" />
<listheader
label="${labels.munit}"
width="10%" />
width="50%" />
</listhead>
<auxhead
sclass="category-center"
visible="@load(vm.activeFilterMaterial)">
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTmpMaterial.code)"
instant="true"
onChange="@command('doFilterMaterial')"
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.filterTmpMaterial.name)"
instant="true"
onChange="@command('doFilterMaterial')"
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">
<combobox
instant="true"
model="@load(vm.munitList)"
selectedItem="@bind(vm.filterTmpMaterial.munit)"
onChange="@command('doFilterMaterial')"
readonly="true"
sclass="find-grid-textbox">
<template name="model">
<comboitem label="@load(each.name)" />
</template>
</combobox>
</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.filterTmpMaterial.description)"
instant="true"
onChange="@command('doFilterMaterial')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
</auxhead>
<template name="model">
<listitem>
<listcell label="@load(each.code)" />
<listcell label="@load(each.name)" />
<listcell label="@load(each.munit.name)" />
<listcell label="@load(each.description)" />
<listcell label="@load(each.munit.code)" />
</listitem>
</template>
</listbox>
</tabpanel>
<tabpanel>
<toolbar>
<toolbarbutton
image="/img/funnel.png"
tooltiptext="${labels.ToolbarRecFilter}"
id="btnFilterService"
onClick="@command('onFilterService')" />
</toolbar>
<listbox
model="@load(vm.serviceItemList)"
selectedItem="@bind(vm.selectedServiceItem)">
selectedItem="@bind(vm.selectedItem)">
<listhead menupopup="auto">
<listheader
label="${labels.code}"
@@ -75,6 +155,52 @@
sort="czech(description)"
width="60%" />
</listhead>
<auxhead
sclass="category-center"
visible="@load(vm.activeFilterService)">
<auxheader>
<div sclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<textbox
value="@bind(vm.filterTmpService.code)"
instant="true"
onChange="@command('doFilterService')"
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.filterTmpService.name)"
instant="true"
onChange="@command('doFilterService')"
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.filterTmpService.description)"
instant="true"
onChange="@command('doFilterService')"
sclass="find-grid-textbox" />
</div>
<div sclass="find-grid-img">
<image src="/img/funnel.png" />
</div>
</div>
</auxheader>
</auxhead>
<template name="model">
<listitem>
<listcell label="@load(each.code)" />
@@ -99,8 +225,8 @@
<button
image="/img/item-add.png"
label="${labels.AddItem}"
onClick="@command('addItem', window=selectItemsWnd)"
disabled="false"
onClick="@global-command('insertSelectedItem', selected=vm.selectedItem, window=selectItemsWnd)"
disabled="@load(empty vm.selectedItem ? 'true' : 'false')"
sclass="nicebutton" />
</div>
</vlayout>