Vytvořen formulář pro generování objednávky.

closes #142
This commit is contained in:
2014-09-30 12:15:20 +02:00
parent 1367dc9cdf
commit 0f8974f9cb
18 changed files with 1185 additions and 91 deletions
@@ -269,6 +269,7 @@ false=Ne
Information=Informace
Order=Objednávka
Orders=Objednávky
MaterialRequirement=Požadavek na materiál
@@ -303,6 +304,19 @@ RemoveItem=Smazat
Amount=Částka
Owner=Vlastník
CreateOrder=Vytvořit objednávku
NotYetFilled=Zatím nevyplněno
DeliveryAddress=Dodací adresa
BillingAddress=Fakturační adresa
OrderFormNumber=Číslo objednávky
OrderFormOrderDate=Datum objednávky
OrderFormTotal=Celkem
OrderFormDescription=Popis
OrderFormOrdered=Objednáno
OrderFormDeliveredDate=Dodáno dne
OrderFormInvoiceNumber=Číslo faktury
HandleComboKeyFilter=#del
WorkgroupFormUserIsCenterMember=Uživatel je členem střediska, jehož je komise členem!
WorkgroupFormMemberIsCenterMember=Některý ze členů přidávané komise je členem tohoto střediska!
+17 -4
View File
@@ -1,9 +1,22 @@
<?page title="buttons" contentType="text/html;charset=UTF-8"?>
<zk>
<vlayout>
<div hflex="max" align="right">
<button image="~./zul/img/misc/drag-disallow.png" label="${labels.ButtonStorno}" onClick="editWin.detach()" sclass="nicebutton" />
<button image="/img/save.png" label="${labels.ButtonSave}" onClick="@command('save', window=editWin) @global-command('refresh')" disabled="@load(not vm.canSave)" sclass="nicebutton" />
<vlayout
vflex="min"
hflex="max">
<div
hflex="max"
align="right">
<button
image="~./zul/img/misc/drag-disallow.png"
label="${labels.ButtonStorno}"
onClick="editWin.detach()"
sclass="nicebutton" />
<button
image="/img/save.png"
label="${labels.ButtonSave}"
onClick="@command('save', window=editWin) @global-command('refresh')"
disabled="@load(not vm.canSave)"
sclass="nicebutton" />
</div>
</vlayout>
</zk>
+6
View File
@@ -8,6 +8,12 @@
text-shadow: 2px 2px 2px #000000;
}
.addScrollbar {
overflow: auto;
}
.find-grid-cell {
display: table;
width: 100%;
+20 -14
View File
@@ -26,7 +26,7 @@
multiple="true"
checkmark="true"
vflex="1"
context="popupMenu"
selectedItems="@bind(vm.selectedItems)"
model="@load(vm.dataList)">
<listhead menupopup="auto">
<listheader width="27" />
@@ -182,11 +182,13 @@
<div zclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<combobox
readonly="true"
ctrlKeys="${labels.HandleComboKeyFilter}"
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
onChange="@command('doFilter')"
width="100%"
selectedItem="@bind(vm.filterTemplate.workgroup)"
model="@load(vm.workgroups)"
onChange="@command('doFilter')">
readonly="true">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
@@ -201,11 +203,13 @@
<div zclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<combobox
readonly="true"
ctrlKeys="${labels.HandleComboKeyFilter}"
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
onChange="@command('doFilter')"
width="100%"
selectedItem="@bind(vm.filterTemplate.centre)"
model="@load(vm.centers)"
onChange="@command('doFilter')">
readonly="true">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
@@ -220,11 +224,13 @@
<div zclass="find-grid-cell">
<div sclass="find-grid-divtextbox">
<combobox
readonly="true"
ctrlKeys="${labels.HandleComboKeyFilter}"
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
onChange="@command('doFilter')"
width="100%"
selectedItem="@bind(vm.filterTemplate.ownedBy)"
model="@load(vm.users)"
onChange="@command('doFilter')">
readonly="true">
<template name="model">
<comboitem label="@load(each.fullName)" />
</template>
@@ -251,7 +257,7 @@
</auxheader>
</auxhead>
<template name="model">
<listitem>
<listitem context="popupMenu">
<listcell />
<listcell label="@load(each.code)" />
<listcell label="@load(each.name)" />
@@ -267,11 +273,11 @@
</listitem>
</template>
</listbox>
<menupopup id="popupMenu">
<menuitem
image="/img/autotruck-016.png"
label="${labels.CreateOrder}..."
onClick="@command('onCreateOrder')" />
</menupopup>
</window>
<menupopup id="popupMenu">
<menuitem
image="/img/autotruck-016.png"
label="${labels.CreateOrder}..."
onClick="" />
</menupopup>
</zk>
@@ -0,0 +1,537 @@
<?page title="${labels.Order}" contentType="text/html;charset=UTF-8"?>
<zk>
<window
id="editWin"
width="95%"
height="95%"
closable="true"
border="normal"
position="center"
apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.main.orders.created.OrderForm')"
validationMessages="@id('vmsg')">
<caption
image="/img/autotruck-032.png"
zclass="form-caption"
label="${labels.Order}" />
<vlayout
sclass="addScrollbar"
form="@id('fx') @load(vm.dataBean) @save(vm.dataBean, before='save') @validator(vm.orderFormValidator)"
hflex="1"
vflex="1">
<hlayout
hflex="1"
vflex="min">
<tabbox
hflex="10"
vflex="1">
<tabs>
<tab label="${labels.Information}" />
</tabs>
<tabpanels>
<tabpanel>
<grid
hflex="max"
vflex="max">
<columns>
<column
align="right"
hflex="min" />
<column />
</columns>
<rows vflex="max">
<row>
<cell sclass="row-title">${labels.OrderFormNumber} :</cell>
<cell>
<textbox
id="idOrderNumber"
width="150px"
constraint="@load(vm.constriant)"
value="@bind(fx.numser)"
placeholder="${labels.NotYetFilled}..."
readonly="true" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.OrderFormOrderDate} :</cell>
<cell>
<datebox
id="idOrderDate"
width="150px"
value="@bind(fx.orderDate)"
format="${labels.DateFormat}" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.OrderFormTotal} :</cell>
<cell>
<textbox
id="idOrderTotal"
readonly="true"
width="150px"
value="@bind(fx.total) @converter(vm.standardBigDecimalConverter)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormDeliveryDate} :</cell>
<cell>
<datebox
id="idDeliveryDate"
width="150px"
value="@bind(fx.deliveryDate)"
format="${labels.DateFormat}" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.OrderFormDeliveredDate} :</cell>
<cell>
<datebox
id="idDeliveredDate"
width="150px"
value="@bind(fx.deliveredDate)"
format="${labels.DateFormat}" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.OrderFormInvoiceNumber} :</cell>
<cell>
<textbox
id="idInvoiceNumber"
width="150px"
value="@bind(fx.invoiceNumber)"
placeholder="${labels.NotYetFilled}..."
readonly="@load(empty fx.created)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.OrderFormDescription} :</cell>
<cell>
<textbox
id="idOrderDescription"
width="100%"
rows="5"
value="@bind(fx.description)" />
</cell>
</row>
</rows>
</grid>
</tabpanel>
</tabpanels>
</tabbox>
<tabbox
hflex="15"
vflex="1">
<tabs>
<tab label="${labels.SuppliersFormTitle}" />
<tab label="${labels.DeliveryAddress}" />
<tab label="${labels.BillingAddress}" />
</tabs>
<tabpanels>
<tabpanel>
<grid
hflex="1"
vflex="1">
<columns>
<column
align="right"
hflex="min" />
<column />
<column
align="right"
hflex="min" />
<column />
</columns>
<rows vflex="max">
<row>
<cell sclass="row-title">${labels.SuppliersFormCompany} :</cell>
<cell colspan="3">
<combobox
onChange="@command('doFillSuppAddress')"
width="100%"
selectedItem="@bind(vm.selectedSuppAddrItem)"
model="@load(vm.suppAddresses)"
readonly="false">
<template name="model">
<comboitem label="@load(each)" />
</template>
</combobox>
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormIC} :</cell>
<cell>
<textbox
id="idSuppIC"
value="@bind(fx.suplier.ic)" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormDIC} :</cell>
<cell>
<textbox
id="idSuppDIC"
value="@bind(fx.suplier.dic)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormDepartment} :</cell>
<cell>
<textbox
id="idSuppDepartment"
value="@bind(fx.suplier.department)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormContact} :</cell>
<cell>
<textbox
id="idSuppContactName"
value="@bind(fx.suplier.contactName)"
width="100%" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormStreet} :</cell>
<cell>
<textbox
id="idSuppStreet"
value="@bind(fx.suplier.street)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormNo} :</cell>
<cell>
<textbox
id="idSuppHouseNumber"
value="@bind(fx.suplier.houseNumber)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormCity} :</cell>
<cell>
<textbox
id="idSuppCity"
value="@bind(fx.suplier.city)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormZIP} :</cell>
<cell>
<textbox
id="idSuppZIP"
value="@bind(fx.suplier.zipCode)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormPhone} :</cell>
<cell>
<textbox
id="idSuppPhone"
value="@bind(fx.suplier.phone)" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormEmail} :</cell>
<cell>
<textbox
id="idSuppEmail"
value="@bind(fx.suplier.email)"
width="100%" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormWWW} :</cell>
<cell colspan="3">
<textbox
id="idSuppWWW"
value="@bind(fx.suplier.web)"
width="100%" />
</cell>
</row>
</rows>
</grid>
</tabpanel>
<tabpanel>
<grid
hflex="1"
vflex="1">
<columns>
<column
align="right"
hflex="min" />
<column />
<column
align="right"
hflex="min" />
<column />
</columns>
<rows vflex="max">
<row>
<cell sclass="row-title">${labels.SuppliersFormCompany} :</cell>
<cell colspan="3">
<combobox
onChange="@command('doFillDeliveryAddress')"
width="100%"
selectedItem="@bind(vm.selectedDeliveryAddrItem)"
model="@load(vm.deliveryAddresses)"
readonly="false">
<template name="model">
<comboitem label="@load(each)" />
</template>
</combobox>
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormIC} :</cell>
<cell>
<textbox
id="idDeliveryIC"
value="@bind(fx.deliveryAddress.ic)" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormDIC} :</cell>
<cell>
<textbox
id="idDeliveryDIC"
value="@bind(fx.deliveryAddress.dic)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormDepartment} :</cell>
<cell>
<textbox
id="idDeliveryDepartment"
value="@bind(fx.deliveryAddress.department)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormContact} :</cell>
<cell>
<textbox
id="idDeliveryContactName"
value="@bind(fx.deliveryAddress.contactName)"
width="100%" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormStreet} :</cell>
<cell>
<textbox
id="idDeliveryStreet"
value="@bind(fx.deliveryAddress.street)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormNo} :</cell>
<cell>
<textbox
id="idDeliveryHouseNumber"
value="@bind(fx.deliveryAddress.houseNumber)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormCity} :</cell>
<cell>
<textbox
id="idDeliveryCity"
value="@bind(fx.deliveryAddress.city)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormZIP} :</cell>
<cell>
<textbox
id="idDeliveryZIP"
value="@bind(fx.deliveryAddress.zipCode)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormPhone} :</cell>
<cell>
<textbox
id="idDeliveryPhone"
value="@bind(fx.deliveryAddress.phone)" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormEmail} :</cell>
<cell>
<textbox
id="idDeliveryEmail"
value="@bind(fx.deliveryAddress.email)"
width="100%" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormWWW} :</cell>
<cell colspan="3">
<textbox
id="idDeliveryWWW"
value="@bind(fx.deliveryAddress.web)"
width="100%" />
</cell>
</row>
</rows>
</grid>
</tabpanel>
<tabpanel>
<grid
hflex="1"
vflex="1">
<columns>
<column
align="right"
hflex="min" />
<column />
<column
align="right"
hflex="min" />
<column />
</columns>
<rows vflex="max">
<row>
<cell sclass="row-title">${labels.SuppliersFormCompany} :</cell>
<cell colspan="3">
<textbox
id="idInvoiceCompany"
value="@bind(fx.address.company)"
width="100%" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormIC} :</cell>
<cell>
<textbox
id="idInvoiceIC"
value="@bind(fx.address.ic)" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormDIC} :</cell>
<cell>
<textbox
id="idInvoiceDIC"
value="@bind(fx.address.dic)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormDepartment} :</cell>
<cell>
<textbox
id="idInvoiceDepartment"
value="@bind(fx.address.department)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormContact} :</cell>
<cell>
<textbox
id="idInvoiceContactName"
value="@bind(fx.address.contactName)"
width="100%" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormStreet} :</cell>
<cell>
<textbox
id="idInvoiceStreet"
value="@bind(fx.address.street)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormNo} :</cell>
<cell>
<textbox
id="idInvoiceHouseNumber"
value="@bind(fx.address.houseNumber)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormCity} :</cell>
<cell>
<textbox
id="idInvoiceCity"
value="@bind(fx.address.city)"
width="100%" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormZIP} :</cell>
<cell>
<textbox
id="idInvoiceZIP"
value="@bind(fx.address.zipCode)" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormPhone} :</cell>
<cell>
<textbox
id="idInvoicePhone"
value="@bind(fx.address.phone)" />
</cell>
<cell sclass="row-title">${labels.SuppliersFormEmail} :</cell>
<cell>
<textbox
id="idInvoiceEmail"
value="@bind(fx.address.email)"
width="100%" />
</cell>
</row>
<row>
<cell sclass="row-title">${labels.SuppliersFormWWW} :</cell>
<cell colspan="3">
<textbox
id="idInvoiceWWW"
value="@bind(fx.address.web)"
width="100%" />
</cell>
</row>
</rows>
</grid>
</tabpanel>
</tabpanels>
</tabbox>
</hlayout>
<listbox
vflex="1"
selectedItem="@bind(vm.selectedItem)"
model="@load(fx.items)">
<listhead menupopup="auto">
<listheader
hflex="7"
sort="czech(code)"
label="${labels.RequirementItemCode}" />
<listheader
hflex="15"
sort="czech(name)"
label="${labels.RequirementItemName}" />
<listheader
hflex="20"
sort="czech(textItem)"
label="${labels.RequirementItemText}" />
<listheader
hflex="5"
sort="auto(quantity)"
align="right"
label="${labels.RequirementItemQuantity}" />
<listheader
hflex="5"
sort="auto(munit.name)"
label="${labels.RequirementItemMUnit}" />
<listheader
hflex="7"
align="right"
sort="auto(unitPrice)"
label="${labels.RequirementItemUnitPrice}" />
<listheader
hflex="7"
align="right"
sort="auto(total)"
label="${labels.RequirementItemTotal}" />
<listheader
hflex="15"
sort="czech(description)"
label="${labels.RequirementItemDescription}" />
</listhead>
<template name="model">
<listitem>
<listcell label="@load(each.code)" />
<listcell label="@load(each.name)" />
<listcell label="@load(each.textItem)" />
<listcell label="@load(each.quantity) @converter(vm.standardBigDecimalConverter)" />
<listcell label="@load(each.munit.name)" />
<listcell label="@load(each.unitPrice) @converter(vm.standardBigDecimalConverter)" />
<listcell label="@load(each.total) @converter(vm.standardBigDecimalConverter)" />
<listcell label="@load(each.description)" />
</listitem>
</template>
</listbox>
<include
vflex="min"
src="/app/formButtons.zul" />
</vlayout>
</window>
</zk>
@@ -68,7 +68,7 @@
</cell>
</row>
<row>
<cell sclass="row-title">${labels.RequirementsFormDescription} :</cell>
<cell sclass="row-title">${labels.Description} :</cell>
<cell>
<textbox
id="description"