19 package org.turro.erp.task.usage;
21 import org.turro.command.Command;
22 import org.turro.command.Context;
23 import org.turro.elephant.util.ZkossUtils;
24 import org.turro.erp.entity.HumanResource;
25 import org.turro.erp.entity.OrderItem;
26 import org.turro.erp.entity.Resource;
27 import org.turro.erp.purchase.OrderItemWrapper;
28 import org.turro.erp.task.Workload;
29 import org.turro.erp.task.WorkloadSet;
30 import org.turro.erp.task.WorksheetReport;
31 import org.turro.zkoss.grid.PagingGrid;
32 import org.zkoss.zk.ui.ext.AfterCompose;
33 import org.zkoss.zul.Column;
34 import org.zkoss.zul.Include;
35 import org.zkoss.zul.Row;
45 private boolean assigned;
48 this.assigned = assigned;
52 if(!assigned || humanResource !=
null) {
53 this.humanResource = humanResource;
59 if(resource !=
null) {
66 this.workloads = workloads;
92 getRows(
true).getChildren().clear();
98 if(wl.getOrderUnits() != 0.0d) {
109 ZkossUtils.confirmDeletion(
null,
new Command() {
111 public Object execute(Context context) {
120 private void addRows() {
125 Include inc =
new Include(
"/WEB-INF/_zul/erp/task/workload_order.zul");
126 inc.setDynamicProperty(
"orderItem", wl.getOrderItem());
127 inc.setDynamicProperty(
"grid",
this);
128 inc.setDynamicProperty(
"row", r);
129 inc.setDynamicProperty(
"workload", wl);
130 inc.setWidth(
"100%");
131 inc.setHeight(
"100%");
135 for(Workload wl : workloads) {
138 Include inc =
new Include(
"/WEB-INF/_zul/erp/task/workload_usage.zul");
139 inc.setDynamicProperty(
"requiredUsage", wl.getRequiredUsage());
140 inc.setDynamicProperty(
"workload", wl);
141 inc.setWidth(
"100%");
142 inc.setHeight(
"100%");
148 private void addColumns() {
RequiredUsage getRequiredUsage()
void setHumanResource(HumanResource humanResource)
void setOperator(HumanResource operator)
void setWorkloads(WorkloadSet workloads)
void setSendToParticipants(boolean sendToParticipants)
void deleteOrder(final OrderItem oi, final Row row)
void setHumanResource(HumanResource humanResource)
void setResource(Resource resource)
void setAssigned(boolean assigned)
void setWorkloads(WorkloadSet workloads)
Columns getColumns(boolean create)
Rows getRows(boolean create)