Do agendy Cestovní příkazy byly přidány záložky "Má střediska", "Mé komise" a "Vše", kde se zobrazují vyúčtování služebních ke schválení. V záložkách lze vyúčtování označit jako proplacené. Do e-mailu se generuje odkaz do těchto záložek.
closes #253 closes #250Verze_3.0
parent
84154ccbff
commit
369184940b
@ -0,0 +1,78 @@
|
||||
package info.bukova.isspst.filters;
|
||||
|
||||
import info.bukova.isspst.BooleanUtils;
|
||||
import info.bukova.isspst.DateTimeUtils;
|
||||
import info.bukova.isspst.StringUtils;
|
||||
import info.bukova.isspst.data.TripBillApproval;
|
||||
import info.bukova.isspst.data.User;
|
||||
import org.hamcrest.Description;
|
||||
import org.hamcrest.Factory;
|
||||
import org.hamcrest.Matcher;
|
||||
import org.hamcrest.TypeSafeMatcher;
|
||||
|
||||
public class TripBillApprovalFilter implements Filter<TripBillApproval>
|
||||
{
|
||||
|
||||
private TripBillApproval condition;
|
||||
|
||||
public TripBillApprovalFilter(TripBillApproval cond)
|
||||
{
|
||||
this.condition = cond;
|
||||
}
|
||||
|
||||
private static class TripBillApprovalMatcher extends TypeSafeMatcher<TripBillApproval>
|
||||
{
|
||||
|
||||
private TripBillApproval condition;
|
||||
|
||||
public TripBillApprovalMatcher(TripBillApproval cond)
|
||||
{
|
||||
this.condition = cond;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void describeTo(Description desc)
|
||||
{
|
||||
desc.appendText("requirement matches");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matchesSafely(TripBillApproval item)
|
||||
{
|
||||
if (item.getBill() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean foundNumser = StringUtils.isEqualForFilter(item.getNumser(), condition.getNumser());
|
||||
boolean foundReqDate = DateTimeUtils.isEqualByDateForFilter(item.getBill().getRequirement().getReqDate(), condition.getBill().getRequirement().getReqDate());
|
||||
boolean foundDescription = StringUtils.isEqualForFilter(item.getDescription(), condition.getDescription());
|
||||
boolean foundFrom = StringUtils.isEqualForFilter(item.getBill().getRequirement().getFrom(), condition.getBill().getRequirement().getFrom());
|
||||
boolean foundTo = StringUtils.isEqualForFilter(item.getBill().getRequirement().getTo(), condition.getBill().getRequirement().getTo());
|
||||
boolean foundWorkgroup = (condition.getWorkgroup() == null ||(item.getWorkgroup() != null && item.getWorkgroup().equals(condition.getWorkgroup())));
|
||||
boolean foundCentre = (condition.getCentre() == null || (item.getCentre() != null && item.getCentre().equals(condition.getCentre())));
|
||||
boolean foundOwner = User.isEqualByUserForFilter(item.getBill().getOwnedBy(), condition.getBill().getOwnedBy());
|
||||
boolean foundPaid = BooleanUtils.isEqualByBooleanValue(item.getBill().getPaid(), condition.getBill().getPaid());
|
||||
boolean foundPaidDate = DateTimeUtils.isEqualByDateForFilter(item.getBill().getPaidDate(), condition.getBill().getPaidDate());
|
||||
return foundNumser && foundReqDate && foundDescription && foundFrom && foundTo && foundWorkgroup && foundCentre && foundOwner && foundPaid && foundPaidDate;
|
||||
}
|
||||
|
||||
@Factory
|
||||
public static Matcher<TripBillApproval> matchTripRequirement(TripBillApproval building)
|
||||
{
|
||||
return new TripBillApprovalMatcher(building);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TripBillApprovalMatcher matcher()
|
||||
{
|
||||
return new TripBillApprovalMatcher(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String queryString()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package info.bukova.isspst.services.tripbill;
|
||||
|
||||
import info.bukova.isspst.services.IsspstException;
|
||||
|
||||
/**
|
||||
* @author Pepa Rokos
|
||||
*/
|
||||
public class PayException extends IsspstException {
|
||||
|
||||
public PayException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public PayException(String message) {
|
||||
super(message);
|
||||
setReason(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package info.bukova.isspst.ui.renderers;
|
||||
|
||||
import info.bukova.isspst.data.RequirementState;
|
||||
import info.bukova.isspst.data.TripBillApproval;
|
||||
import org.zkoss.zul.Listbox;
|
||||
import org.zkoss.zul.Listitem;
|
||||
|
||||
/**
|
||||
* @author Pepa Rokos
|
||||
*/
|
||||
public class TripBillApprovalItemRenderer extends GenericListitemRenderer<TripBillApproval> {
|
||||
|
||||
@Override
|
||||
protected void changeProperties(Listbox lb, Listitem li, int index, String varnm) {
|
||||
|
||||
RequirementState state = getObjectOfStates().getState();
|
||||
|
||||
if (state != null) {
|
||||
if (state == RequirementState.PARTIALLY) {
|
||||
li.setSclass("req-select-partially");
|
||||
}
|
||||
else if (state == RequirementState.APPROVED) {
|
||||
Boolean isPaid;
|
||||
|
||||
if (getObjectOfStates().getBill() == null) {
|
||||
isPaid = false;
|
||||
} else {
|
||||
isPaid = getObjectOfStates().getBill().getPaid();
|
||||
}
|
||||
|
||||
if ((isPaid != null) && (isPaid.booleanValue() == true)) {
|
||||
li.setSclass("req-select-approved-project");
|
||||
}
|
||||
else {
|
||||
li.setSclass("req-select-approved");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package info.bukova.isspst.ui.tripbill;
|
||||
|
||||
import info.bukova.isspst.StringUtils;
|
||||
import info.bukova.isspst.data.TripBill;
|
||||
import info.bukova.isspst.services.tripbill.PayException;
|
||||
import info.bukova.isspst.services.tripbill.TripBillService;
|
||||
import info.bukova.isspst.ui.ListViewModel;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.zkoss.bind.BindUtils;
|
||||
import org.zkoss.bind.annotation.BindingParam;
|
||||
import org.zkoss.bind.annotation.Command;
|
||||
import org.zkoss.bind.annotation.ExecutionArgParam;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||
import org.zkoss.zul.Messagebox;
|
||||
import org.zkoss.zul.Window;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Pepa Rokos
|
||||
*/
|
||||
public class PayDialogVM {
|
||||
|
||||
@WireVariable
|
||||
private TripBillService tripBillService;
|
||||
private TripBill bill;
|
||||
private ListViewModel grid;
|
||||
private Date payDate;
|
||||
|
||||
@Init
|
||||
public void init(@ExecutionArgParam("bill") TripBill bill,
|
||||
@ExecutionArgParam("grid") ListViewModel grid) {
|
||||
this.bill = bill;
|
||||
this.grid = grid;
|
||||
}
|
||||
|
||||
@Command
|
||||
public void pay(@BindingParam("window") Window window) {
|
||||
try {
|
||||
tripBillService.setPaid(bill, payDate);
|
||||
BindUtils.postNotifyChange(null, null, grid, "dataBean");
|
||||
BindUtils.postGlobalCommand(null, null, "reload", null);
|
||||
window.detach();
|
||||
} catch (PayException ex) {
|
||||
Messagebox.show(StringUtils.localize(ex.getReason()), StringUtils.localize("Error"), Messagebox.OK,
|
||||
Messagebox.ERROR);
|
||||
} catch (AccessDeniedException ex) {
|
||||
Messagebox.show(StringUtils.localize("ErrorRights"), StringUtils.localize("Error"), Messagebox.OK, Messagebox.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
public Date getPayDate() {
|
||||
return payDate;
|
||||
}
|
||||
|
||||
public void setPayDate(Date payDate) {
|
||||
this.payDate = payDate;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package info.bukova.isspst.ui.tripbill;
|
||||
|
||||
import info.bukova.isspst.data.TripBillApproval;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.zkoss.bind.BindUtils;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pepa Rokos
|
||||
*/
|
||||
public class TripBillListAll extends TripBillListBase {
|
||||
|
||||
@Init(superclass = true)
|
||||
public void initAllList() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<TripBillApproval> getListFromService() {
|
||||
try {
|
||||
return getReqService().getAll();
|
||||
} catch (AccessDeniedException e) {
|
||||
BindUtils.postGlobalCommand(null, null, "disableAll", null);
|
||||
return new ArrayList<TripBillApproval>();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void beforeSelectViaUrl() {
|
||||
BindUtils.postGlobalCommand(null, null, "selectAll", null);
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package info.bukova.isspst.ui.tripbill;
|
||||
|
||||
import info.bukova.isspst.data.TripBill;
|
||||
import info.bukova.isspst.data.TripBillApproval;
|
||||
import info.bukova.isspst.data.TripRequirement;
|
||||
import info.bukova.isspst.data.User;
|
||||
import info.bukova.isspst.filters.TripBillApprovalFilter;
|
||||
import info.bukova.isspst.services.tripbill.TripBillApprovalService;
|
||||
import info.bukova.isspst.services.tripbill.TripBillService;
|
||||
import info.bukova.isspst.services.users.UserService;
|
||||
import info.bukova.isspst.ui.renderers.TripBillApprovalItemRenderer;
|
||||
import info.bukova.isspst.ui.requirement.RequirementSubpage;
|
||||
import org.zkoss.bind.annotation.Command;
|
||||
import org.zkoss.bind.annotation.GlobalCommand;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
import org.zkoss.bind.annotation.NotifyChange;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||
import org.zkoss.zul.Window;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Pepa Rokos
|
||||
*/
|
||||
public class TripBillListBase extends RequirementSubpage<TripBillApproval> {
|
||||
|
||||
@WireVariable
|
||||
private TripBillApprovalService tripBillApprovalService;
|
||||
private TripBillApprovalItemRenderer itemRenderer;
|
||||
@WireVariable
|
||||
private TripBillService tripBillService;
|
||||
@WireVariable
|
||||
private UserService userService;
|
||||
private List<User> allUsers;
|
||||
|
||||
@Init(superclass = true)
|
||||
public void initListBase() {
|
||||
service = tripBillApprovalService;
|
||||
itemRenderer = new TripBillApprovalItemRenderer();
|
||||
dataClass = TripBillApproval.class;
|
||||
TripBillApproval filter = getFilterTemplate();
|
||||
TripBill tb = new TripBill();
|
||||
tb.setRequirement(new TripRequirement());
|
||||
filter.setBill(tb);
|
||||
dataFilter = new TripBillApprovalFilter(filter);
|
||||
allUsers = userService.getUsersForCombo();
|
||||
}
|
||||
|
||||
public TripBillApprovalItemRenderer getItemRenderer() {
|
||||
return itemRenderer;
|
||||
}
|
||||
|
||||
@Command
|
||||
public void pay() {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("bill", getDataBean().getBill());
|
||||
params.put("grid", this);
|
||||
Window payDialog = (Window) Executions.createComponents("payDialog.zul", null, params);
|
||||
payDialog.doModal();
|
||||
}
|
||||
|
||||
@Command
|
||||
@Override
|
||||
public void edit() {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("selected", getDataBean().getBill());
|
||||
tripBillService.loadLazyData(getDataBean().getBill());
|
||||
Window win = (Window) Executions.createComponents("../requirements/tripBill.zul", null, params);
|
||||
win.doModal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<User> getAllUsers() {
|
||||
return allUsers;
|
||||
}
|
||||
|
||||
@GlobalCommand
|
||||
@NotifyChange({ "dataList", "dataBean", "fullFill" })
|
||||
public void reloadRelated()
|
||||
{
|
||||
this.reload();
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package info.bukova.isspst.ui.tripbill;
|
||||
|
||||
import info.bukova.isspst.data.TripBillApproval;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.zkoss.bind.BindUtils;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pepa Rokos
|
||||
*/
|
||||
public class TripBillListCentre extends TripBillListBase {
|
||||
|
||||
@Init(superclass = true)
|
||||
public void initListCentre() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<TripBillApproval> getListFromService() {
|
||||
try {
|
||||
return getReqService().getCentreReq();
|
||||
} catch (AccessDeniedException e) {
|
||||
BindUtils.postGlobalCommand(null, null, "disableCentre", null);
|
||||
return new ArrayList<TripBillApproval>();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void beforeSelectViaUrl() {
|
||||
BindUtils.postGlobalCommand(null, null, "selectCentre", null);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package info.bukova.isspst.ui.tripbill;
|
||||
|
||||
import info.bukova.isspst.data.TripBillApproval;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.zkoss.bind.BindUtils;
|
||||
import org.zkoss.bind.annotation.Init;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pepa Rokos
|
||||
*/
|
||||
public class TripBillListWorkgroup extends TripBillListBase {
|
||||
|
||||
@Init(superclass = true)
|
||||
public void initWorkgroupList() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<TripBillApproval> getListFromService() {
|
||||
try {
|
||||
return getReqService().getWorkgroupReq();
|
||||
} catch (AccessDeniedException e) {
|
||||
BindUtils.postGlobalCommand(null, null, "disableWorkgroup", null);
|
||||
return new ArrayList<TripBillApproval>();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void beforeSelectViaUrl() {
|
||||
BindUtils.postGlobalCommand(null, null, "selectWorkgroup", null);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
<?page title="${labels.TravelOrdersFormTitle}" contentType="text/html;charset=UTF-8"?>
|
||||
|
||||
<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"?>
|
||||
|
||||
<window id="payWin" border="normal" apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.tripbill.PayDialogVM')" width="320px" closable="true">
|
||||
<caption
|
||||
image="/img/invoicing-032.png"
|
||||
zclass="form-caption"
|
||||
label="${labels.TripBilling}" />
|
||||
|
||||
<vbox hflex="1">
|
||||
<hbox>
|
||||
<label value="${labels.TripBillPaidDate}:"/>
|
||||
<datebox
|
||||
instant="true"
|
||||
value="@bind(vm.payDate)"
|
||||
format="${labels.DateFormat}"/>
|
||||
</hbox>
|
||||
<separator bar="true" hflex="1"/>
|
||||
<hbox>
|
||||
<button image="/img/approve-016.png" label="${labels.Confirm}" onClick="@command('pay', window=payWin)" sclass="nicebutton" disabled="@load(empty vm.payDate)"/>
|
||||
<button image="~./zul/img/misc/drag-disallow.png" label="${labels.ButtonStorno}" onClick="payWin.detach()" sclass="nicebutton"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
</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/bill/tripBillGridMy.zul";
|
||||
String gridMyCenters = "/main/trips/bill/tripBillGridCenters.zul";
|
||||
String gridMyWorkgroups = "/main/trips/bill/tripBillGridWorkgroups.zul";
|
||||
String gridAll = "/main/trips/bill/tripBillGridAll.zul";
|
||||
</zscript>
|
||||
<window
|
||||
vflex="1"
|
||||
border="normal">
|
||||
<caption
|
||||
src="/img/pickup-032.png"
|
||||
zclass="form-caption"
|
||||
label="${labels.TravelOrders}" />
|
||||
<include
|
||||
vflex="1"
|
||||
src="/main/tabPanels.zul" />
|
||||
</window>
|
||||
</zk>
|
@ -0,0 +1,14 @@
|
||||
<?page title="${labels.TravelOrders}" contentType="text/html;charset=UTF-8"?>
|
||||
<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"?>
|
||||
<window
|
||||
vflex="1"
|
||||
border="normal"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.tripbill.TripBillListAll')">
|
||||
<include src="../../toolbar.zul" />
|
||||
<include vflex="1" src="tripBillGridInt.zul"/>
|
||||
</window>
|
||||
</zk>
|
@ -0,0 +1,14 @@
|
||||
<?page title="${labels.TravelOrders}" contentType="text/html;charset=UTF-8"?>
|
||||
<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"?>
|
||||
<window
|
||||
vflex="1"
|
||||
border="normal"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.tripbill.TripBillListCentre')">
|
||||
<include src="../../toolbar.zul" />
|
||||
<include vflex="1" src="tripBillGridInt.zul"/>
|
||||
</window>
|
||||
</zk>
|
@ -0,0 +1,198 @@
|
||||
<?page title="${labels.TravelOrdersFormTitle}" contentType="text/html;charset=UTF-8"?>
|
||||
|
||||
<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"?>
|
||||
|
||||
<hbox vflex="1">
|
||||
<listbox
|
||||
vflex="1"
|
||||
hflex="7"
|
||||
model="@load(vm.dataList)"
|
||||
selectedItem="@bind(vm.dataBean)"
|
||||
itemRenderer="@load(vm.itemRenderer)"
|
||||
onAfterRender="@command('afterRender')"
|
||||
selectedIndex="@bind(vm.selIndex)">
|
||||
<listhead menupopup="auto">
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridNumser}"
|
||||
sort="czech(bill.requirement.numser)"
|
||||
onCreate="self.sort(false)"
|
||||
width="30%" />
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridReqDate}"
|
||||
sort="auto(bill.requirement.reqDate)"
|
||||
width="70%" />
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridFrom}"
|
||||
sort="czech(bill.requirement.from)"
|
||||
width="70%" />
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridTo}"
|
||||
sort="czech(bill.requirement.to)"
|
||||
width="70%" />
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridTotal}"
|
||||
sort="auto(bill.total)"
|
||||
align="right"
|
||||
width="70%" />
|
||||
<listheader
|
||||
label="${labels.ownedBy}"
|
||||
width="50%"/>
|
||||
<listheader
|
||||
label="${labels.TripBillPaid}"
|
||||
width="10%"/>
|
||||
<listheader
|
||||
label="${labels.TripBillPaidDate}"
|
||||
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')"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
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.bill.requirement.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">
|
||||
<div sclass="find-grid-divtextbox">
|
||||
<textbox
|
||||
value="@bind(vm.filterTemplate.bill.requirement.from)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthDescription)"
|
||||
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.bill.requirement.to)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthDescription)"
|
||||
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.bill.total) @converter(vm.bigDecimalConverter)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
sclass="find-grid-textbox" />
|
||||
</div>
|
||||
<div sclass="find-grid-img">
|
||||
<image src="/img/funnel.png" />
|
||||
</div>
|
||||
</div>
|
||||
</auxheader>
|
||||
<auxheader>
|
||||
<div zclass="find-grid-cell">
|
||||
<div sclass="find-grid-divtextbox">
|
||||
<combobox
|
||||
ctrlKeys="${labels.HandleComboKeyFilter}"
|
||||
onCtrlKey="@command('handleComboKeyFilter', ctrl=self, keyEvent=event)"
|
||||
onChange="@command('doFilter')"
|
||||
width="100%"
|
||||
selectedItem="@bind(vm.filterTemplate.bill.ownedBy)"
|
||||
model="@load(vm.allUsers)"
|
||||
readonly="true">
|
||||
<template name="model">
|
||||
<comboitem label="@load(each.fullName)" />
|
||||
</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">
|
||||
<checkbox
|
||||
checked="@bind(vm.filterTemplate.bill.paid)"
|
||||
onClick="@command('doFilter')" />
|
||||
</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.bill.paidDate)"
|
||||
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.bill.requirement.numser)" />
|
||||
<listcell label="@load(each.bill.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
|
||||
<listcell label="@load(each.bill.requirement.from)" />
|
||||
<listcell label="@load(each.bill.requirement.to)" />
|
||||
<listcell label="@load(each.bill.total) @converter(vm.standardBigDecimalConverter)"/>
|
||||
<listcell label="@load(each.bill.ownedBy)"/>
|
||||
<listcell label="@load(each.bill.paid) @converter(vm.standardBoolConverter)"/>
|
||||
<listcell label="@load(each.bill.paidDate) @converter('formatedDate', format=labels.DateFormat)"/>
|
||||
</listitem>
|
||||
</template>
|
||||
</listbox>
|
||||
<vbox hflex="3">
|
||||
<include hflex="1" src="/main/approveStatus.zul"/>
|
||||
<button label="${labels.TripBillPay}" image="/img/invoicing-016.png" onClick="@command('pay')" sclass="nicebutton" disabled="@load(not(vm.dataBean.state eq 'APPROVED'))"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
</zk>
|
@ -0,0 +1,84 @@
|
||||
<?page title="${labels.TravelOrders}" contentType="text/html;charset=UTF-8"?>
|
||||
<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"?>
|
||||
<window
|
||||
vflex="1"
|
||||
border="normal"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.tripbill.TripBillList')">
|
||||
<include src="/app/toolbar.zul" />
|
||||
<listbox
|
||||
vflex="1"
|
||||
model="@load(vm.dataList)"
|
||||
selectedItem="@bind(vm.dataBean)">
|
||||
<listhead menupopup="auto">
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridNumser}"
|
||||
sort="czech(numser)"
|
||||
width="30%" />
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridReqDate}"
|
||||
sort="auto(requirement.reqDate)"
|
||||
width="70%" />
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridFrom}"
|
||||
sort="czech(requirement.from)"
|
||||
width="70%" />
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridTo}"
|
||||
sort="czech(requirement.to)"
|
||||
width="70%" />
|
||||
<listheader
|
||||
label="${labels.TravelOrdersGridTotal}"
|
||||
sort="auto(total)"
|
||||
align="right"
|
||||
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.name)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthText)"
|
||||
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.description)"
|
||||
instant="true"
|
||||
onChange="@command('doFilter')"
|
||||
maxlength="@load(vm.lengthDescription)"
|
||||
sclass="find-grid-textbox" />
|
||||
</div>
|
||||
<div sclass="find-grid-img">
|
||||
<image src="/img/funnel.png" />
|
||||
</div>
|
||||
</div>
|
||||
</auxheader>
|
||||
</auxhead> -->
|
||||
<template name="model">
|
||||
<listitem style="@load((empty each.approval ? '' : (each.approval.state eq 'PARTIALLY') ? 'background-color: #fffb90' : ((each.approval.state eq 'APPROVED') ? 'background-color: #afffb5' : 'background-color: #fdfbca') ))">
|
||||
<listcell label="@load(each.requirement.numser)" />
|
||||
<listcell label="@load(each.requirement.reqDate) @converter('formatedDate', format=labels.DateFormat)" />
|
||||
<listcell label="@load(each.requirement.from)" />
|
||||
<listcell label="@load(each.requirement.to)" />
|
||||
<listcell label="@load(each.total) @converter(vm.standardBigDecimalConverter)"/>
|
||||
</listitem>
|
||||
</template>
|
||||
</listbox>
|
||||
</window>
|
||||
</zk>
|
@ -0,0 +1,14 @@
|
||||
<?page title="${labels.TravelOrders}" contentType="text/html;charset=UTF-8"?>
|
||||
<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"?>
|
||||
<window
|
||||
vflex="1"
|
||||
border="normal"
|
||||
apply="org.zkoss.bind.BindComposer"
|
||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.tripbill.TripBillListWorkgroup')">
|
||||
<include src="../../toolbar.zul" />
|
||||
<include vflex="1" src="tripBillGridInt.zul"/>
|
||||
</window>
|
||||
</zk>
|
Loading…
Reference in New Issue