You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/03/09 17:59:51 UTC
svn commit: r516461 - in /ofbiz/trunk/applications/manufacturing: config/
webapp/manufacturing/WEB-INF/
webapp/manufacturing/WEB-INF/actions/jobshopmgt/
webapp/manufacturing/jobshopmgt/ widget/manufacturing/
Author: jacopoc
Date: Fri Mar 9 08:59:49 2007
New Revision: 516461
URL: http://svn.apache.org/viewvc?view=rev&rev=516461
Log:
Misc improvements to the edit production run screen: rewritten a lot of very old and bad code, now widgets are better used.
Still a lot of work needs to be done.
Also added a new screen to manage production run materials.
This issue fixed OFBIZ-772
Added:
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.bsh
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunComponents.ftl
Modified:
ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl
ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
Modified: ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties?view=diff&rev=516461&r1=516460&r2=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties (original)
+++ ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.properties Fri Mar 9 08:59:49 2007
@@ -126,6 +126,7 @@
ManufacturingManagerApplication=Manufacturing Manager Application
ManufacturingMandatoryWorkEfforts=Mandatory Production Runs
ManufacturingManufacturingRules=Manufacturing Rules
+ManufacturingMaterials=Materials
ManufacturingMrp=MRP
ManufacturingMrpInitialisation=IEP init.
ManufacturingNewCalendar=New calendar
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh?view=diff&rev=516461&r1=516460&r2=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh Fri Mar 9 08:59:49 2007
@@ -143,59 +143,12 @@
}
// RoutingTasks list
List productionRunRoutingTasks = productionRun.getProductionRunRoutingTasks();
- HtmlFormWrapper ListProductionRunRoutingTasksWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "ListProductionRunRoutingTasks", request, response);
- ListProductionRunRoutingTasksWrapper.putInContext("productionRunRoutingTasks", productionRunRoutingTasks);
- context.put("ListProductionRunRoutingTasksWrapper",ListProductionRunRoutingTasksWrapper);
+ context.put("productionRunRoutingTasks", productionRunRoutingTasks);
- //---------------
- // Components
- //---------------
- // Product component add sub-screen
- if (actionForm.equals("AddProductComponent")){
- Map productComponentData = UtilMisc.toMap("productionRunId", productionRunId);
- HtmlFormWrapper editPrProductComponentWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "EditProductionRunComponent", request, response);
- editPrProductComponentWrapper.putInContext("productComponentData", productComponentData);
- editPrProductComponentWrapper.putInContext("actionForm", "addProductComponent");
- editPrProductComponentWrapper.putInContext("actionIsAdd","Y");
- context.put("editPrProductComponentWrapper",editPrProductComponentWrapper);
- }
- // Product component update sub-screen
- productId = request.getParameter("productId");
- if (productId != null && (actionForm.equals("updateProductComponent") || actionForm.equals("EditProductComponent"))){
- workEffortId = request.getParameter("workEffortId");
- List productComponents = delegator.findByAnd("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", workEffortId, "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED", "productId",productId));
- GenericValue productComponent = EntityUtil.getFirst(productComponents);
- Map productComponentData = productComponent.getAllFields();
- productComponentData.put("productionRunId", productionRunId);
- internalName = productComponent.getRelatedOne("Product").getString("internalName");
- productComponentData.put("internalName",internalName);
- HtmlFormWrapper editPrProductComponentWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "EditProductionRunComponent", request, response);
- editPrProductComponentWrapper.putInContext("productComponentData", productComponentData);
- editPrProductComponentWrapper.putInContext("actionForm", "updateProductComponent");
- editPrProductComponentWrapper.putInContext("actionIsAdd", "null");
- context.put("editPrProductComponentWrapper",editPrProductComponentWrapper);
- context.put("productId",productId);
- }
// Product component/parts list
- List productionRunComponents = productionRun.getProductionRunComponents();
- List productionRunComponentsData = new LinkedList();
- if (productionRunComponents != null){
- GenericValue component;
- for (Iterator iter=productionRunComponents.iterator(); iter.hasNext();){
- component = (GenericValue) iter.next();
- String componentName = component.getRelatedOne("Product").getString("internalName");
- String workEffortName = component.getRelatedOne("WorkEffort").getString("workEffortName");
- Map componentData = component.getAllFields();
- componentData.put("internalName", componentName);
- componentData.put("workEffortName", workEffortName);
- productionRunComponentsData.add(componentData);
- }
- }
- HtmlFormWrapper ListProductionRunComponentsWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "ListProductionRunComponents", request, response);
- ListProductionRunComponentsWrapper.putInContext("productionRunId", productionRunId);
- ListProductionRunComponentsWrapper.putInContext("productionRunComponentsData", productionRunComponentsData);
- context.put("ListProductionRunComponentsWrapper",ListProductionRunComponentsWrapper);
-
+ List productionRunComponentsData = productionRun.getProductionRunComponents();
+ context.put("productionRunComponents", productionRunComponentsData);
+
//------------------------
// Machines (fixed assets)
//------------------------
@@ -235,11 +188,7 @@
List taskFixedAssets = prodRunTask.getRelated("WorkEffortFixedAssetAssign");
productionRunFixedAssetsData.addAll(taskFixedAssets);
}
- HtmlFormWrapper ListProductionRunFixedAssetsWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "ListProductionRunTaskFixedAssets", request, response);
- ListProductionRunFixedAssetsWrapper.putInContext("productionRunId", productionRunId);
- ListProductionRunFixedAssetsWrapper.putInContext("productionRunFixedAssetsData", productionRunFixedAssetsData);
- ListProductionRunFixedAssetsWrapper.putInContext("declarationScreen", "N");
- context.put("ListProductionRunFixedAssetsWrapper", ListProductionRunFixedAssetsWrapper);
+ context.put("productionRunFixedAssetsData", productionRunFixedAssetsData);
}
}
@@ -253,4 +202,3 @@
if (errorMessage != null && errorMessage.length() > 0) {
tryEntity = false;
}
-
Added: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.bsh?view=auto&rev=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.bsh (added)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.bsh Fri Mar 9 08:59:49 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.widget.html.HtmlFormWrapper;
+
+
+productionRunId = request.getParameter("productionRunId");
+if (UtilValidate.isEmpty(productionRunId)) {
+ productionRunId = request.getParameter("workEffortId");
+}
+
+List taskComponents = new ArrayList();
+List tasks = delegator.findByAnd("WorkEffort", UtilMisc.toMap("workEffortParentId", productionRunId), UtilMisc.toList("workEffortId"));
+Iterator tasksIt = tasks.iterator();
+while (tasksIt.hasNext()) {
+ GenericValue task = (GenericValue)tasksIt.next();
+ List components = delegator.findByAnd("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", task.getString("workEffortId")));
+ HtmlFormWrapper taskComponentsForm = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "ProductionRunTaskComponents", request, response);
+ taskComponentsForm.putInContext("taskComponents", components);
+ taskComponents.add(UtilMisc.toMap("task", task, "componentsForm", taskComponentsForm));
+}
+context.put("taskComponents", taskComponents);
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh?view=diff&rev=516461&r1=516460&r2=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh Fri Mar 9 08:59:49 2007
@@ -197,26 +197,6 @@
context.put("ListProductionRunRoutingTasksWrapper",ListProductionRunRoutingTasksWrapper);
context.put("productionRunRoutingTasks", productionRunRoutingTasks);
- //---------------
- // Components
- //---------------
- // Product component update sub-screen
- productId = request.getParameter("productId");
- if (productId != null && (actionForm.equals("updateProductComponent") || actionForm.equals("EditProductComponent"))){
- workEffortId = request.getParameter("workEffortId");
- List productComponents = delegator.findByAnd("WorkEffortGoodStandard", UtilMisc.toMap("workEffortId", workEffortId, "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED", "productId",productId));
- GenericValue productComponent = EntityUtil.getFirst(productComponents);
- Map productComponentData = productComponent.getAllFields();
- productComponentData.put("productionRunId", productionRunId);
- internalName = productComponent.getRelatedOne("Product").getString("internalName");
- productComponentData.put("internalName",internalName);
- HtmlFormWrapper editPrProductComponentWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml", "EditProductionRunComponent", request, response);
- editPrProductComponentWrapper.putInContext("productComponentData", productComponentData);
- editPrProductComponentWrapper.putInContext("actionForm", "updateProductComponent");
- editPrProductComponentWrapper.putInContext("uiLabelButton",request.getAttribute("uiLabelMap").get("CommonUpdate"));
- context.put("editPrProductComponentWrapper",editPrProductComponentWrapper);
- context.put("productId",productId);
- }
// Product components list
List productionRunComponents = productionRun.getProductionRunComponents();
List productionRunComponentsData = new LinkedList();
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml?view=diff&rev=516461&r1=516460&r2=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml Fri Mar 9 08:59:49 2007
@@ -511,6 +511,28 @@
<security https="true" auth="true"/>
<response name="success" type="view" value="ProductionRunCosts"/>
</request-map>
+ <request-map uri="ProductionRunComponents">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ProductionRunComponents"/>
+ </request-map>
+ <request-map uri="addProductionRunComponent">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="addProductionRunComponent"/>
+ <response name="success" type="view" value="ProductionRunComponents"/>
+ <response name="error" type="view" value="ProductionRunComponents"/>
+ </request-map>
+ <request-map uri="updateProductionRunComponent">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="updateProductionRunComponent"/>
+ <response name="success" type="view" value="ProductionRunComponents"/>
+ <response name="error" type="view" value="ProductionRunComponents"/>
+ </request-map>
+ <request-map uri="deleteProductionRunComponent">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="removeWorkEffortGoodStandard"/>
+ <response name="success" type="view" value="ProductionRunComponents"/>
+ <response name="error" type="view" value="ProductionRunComponents"/>
+ </request-map>
<request-map uri="ProductionRunAssocs">
<security https="true" auth="true"/>
<response name="success" type="view" value="ProductionRunAssocs"/>
@@ -533,12 +555,6 @@
<response name="success" type="view" value="EditProductionRun"/>
<response name="error" type="view" value="EditProductionRun"/>
</request-map>
- <request-map uri="deleteProductionRunComponent">
- <security https="true" auth="true"/>
- <event type="service" invoke="removeWorkEffortGoodStandard"/>
- <response name="success" type="view" value="EditProductionRun"/>
- <response name="error" type="view" value="EditProductionRun"/>
- </request-map>
<request-map uri="removeProductionRunFixedAsset">
<security https="true" auth="true"/>
<event type="simple" path="org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml" invoke="removeProductionRunFixedAsset" />
@@ -735,6 +751,7 @@
<view-map name="PrintProductionRun" type="screenfop" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunPdf" content-type="application/pdf" encoding="none"/>
<view-map name="ProductionRunDeclaration" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunDeclaration" type="screen"/>
<view-map name="ProductionRunCosts" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunCosts" type="screen"/>
+ <view-map name="ProductionRunComponents" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunComponents" type="screen"/>
<view-map name="ProductionRunAssocs" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunAssocs" type="screen"/>
<view-map name="WorkWithShipmentPlans" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#WorkWithShipmentPlans" type="screen"/>
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl?view=diff&rev=516461&r1=516460&r2=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl Fri Mar 9 08:59:49 2007
@@ -123,27 +123,6 @@
</table>
</td>
</#if>
- <#-- Product component sub-screen Update or Add -->
- <#if productId?has_content || actionForm=="AddProductComponent">
-
- <td> </td>
- <td>
- <table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside">
- <tr><td>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop">
- <tr>
- <#if productId?has_content> <#-- Product component Update -->
- <td><div class="boxhead">${uiLabelMap.CommonEdit} ${uiLabelMap.ManufacturingProductionRunProductComponent} : ${productId}</div></td>
- <#else> <#-- Product component Add -->
- <td><div class="boxhead">${uiLabelMap.ManufacturingAddProductionRunProductComponent}</div></td>
- </#if>
- </tr>
- </table>
- ${editPrProductComponentWrapper.renderFormString(context)}
- </td></tr>
- </table>
- </td>
- </#if>
<#-- Fixed Asset assign sub-screen Update or Add -->
<#if fixedAssetId?has_content || actionForm=="AddFixedAsset">
<td> </td>
@@ -168,53 +147,6 @@
</table>
<br/>
- <#-- List Of ProductionRun RoutingTasks sub-screen -->
- <table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside">
- <tr><td>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop">
- <tr>
- <td><div class="boxhead">${uiLabelMap.ManufacturingListOfProductionRunRoutingTasks}</div></td>
- <td align="right">
- <a href="<@o...@ofbizUrl>" class="submenutextright">
- ${uiLabelMap.ManufacturingAddRoutingTask}</a>
- </td>
- </tr>
- </table>
- ${ListProductionRunRoutingTasksWrapper.renderFormString(context)}
- </td></tr>
- </table>
-
- <#-- List Of ProductionRun Components sub-screen -->
- <table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside">
- <tr><td>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop">
- <tr>
- <td><div class="boxhead">${uiLabelMap.ManufacturingListOfProductionRunComponents}</div></td>
- <td align="right">
- <a href="<@o...@ofbizUrl>" class="submenutextright">
- ${uiLabelMap.ManufacturingAddProductionRunProductComponent}</a>
- </td>
- </tr>
- </table>
- ${ListProductionRunComponentsWrapper.renderFormString(context)}
- </td></tr>
- </table>
-
- <#-- List of ProductionRun Fixed Assets sub-screen -->
- <table border="0" width="100%" cellspacing="0" cellpadding="0" class="boxoutside">
- <tr><td>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxtop">
- <tr>
- <td><div class="boxhead">${uiLabelMap.ManufacturingListOfProductionRunFixedAssets}</div></td>
- <td align="right">
- <a href="<@o...@ofbizUrl>" class="submenutextright">
- ${uiLabelMap.ManufacturingAddProductionRunFixedAssetAssign}</a>
- </td>
- </tr>
- </table>
- ${ListProductionRunFixedAssetsWrapper.renderFormString(context)}
- </td></tr>
- </table>
<#else>
<h1>${uiLabelMap.ManufacturingNoProductionRunSelected}</h1>
</#if>
Added: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunComponents.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunComponents.ftl?view=auto&rev=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunComponents.ftl (added)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunComponents.ftl Fri Mar 9 08:59:49 2007
@@ -0,0 +1,29 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<br/>
+<#list taskComponents as taskComponent>
+ <#assign task = taskComponent.task>
+ <#assign componentsForm = taskComponent.componentsForm>
+ <div>
+ <span class="head2">${task.workEffortName?if_exists} [${task.workEffortId}]</span>
+ </div>
+ ${componentsForm.renderFormString(context)}
+ <br/>
+</#list>
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml?view=diff&rev=516461&r1=516460&r2=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml Fri Mar 9 08:59:49 2007
@@ -121,21 +121,14 @@
</field>
</form>
- <form name="ListProductionRunComponents" type="list" target="EditProductionRun" title="" list-name="productionRunComponentsData">
+ <form name="ListProductionRunComponents" type="list" target="EditProductionRun" title="" list-name="productionRunComponents">
<field name="workEffortId" title="${uiLabelMap.ManufacturingRoutingTaskId}">
- <display description="${workEffortName} [${workEffortId}]"/>
+ <display-entity entity-name="WorkEffort" description="${workEffortName} [${workEffortId}]"/>
</field>
- <field name="internalName" title="${uiLabelMap.ProductProductName}">
- <display description="${productName} [${productId}]"/>
+ <field name="productId" title="${uiLabelMap.ProductProductName}">
+ <display-entity entity-name="Product" description="${internalName} [${productId}]"/>
</field>
<field name="estimatedQuantity" title="${uiLabelMap.ManufacturingQuantity}"><display/></field>
- <field name="editLink" title="" widget-style="smallSubmit">
- <hyperlink target="EditProductionRun?actionForm=EditProductComponent&workEffortId=${workEffortId}&productId=${productId}&productionRunId=${productionRunId}" description="${uiLabelMap.CommonEdit}" also-hidden="false"/>
- </field>
- <field name="deleteLink" title="" widget-style="smallSubmit">
- <!--<hyperlink target="RemoveWorkEffortGoodStandard?workEffortId=${workEffortId}&productId=${productId}&fromDate=${fromDate}" description="[${uiLabelMap.CommonDelete}]" also-hidden="false"/>-->
- <hyperlink target="deleteProductionRunComponent?workEffortId=${workEffortId}&productId=${productId}&fromDate=${fromDate}&productionRunId=${productionRunId}&workEffortGoodStdTypeId=PRUNT_PROD_NEEDED" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
- </field>
</form>
<form name="EditProductionRunRoutingTask" type="single" target="EditProductionRun" title="" default-map-name="routingTaskData">
@@ -177,43 +170,6 @@
</field>
</form>
- <form name="EditProductionRunComponent" type="single" target="EditProductionRun" title="" default-map-name="productComponentData">
- <field name="actionForm">
- <hidden value="${actionForm}"/>
- </field>
- <field name="productionRunId">
- <hidden value="${productComponentData.productionRunId}"/>
- </field>
- <field name="productId" use-when="${actionIsAdd}==null">
- <hidden value="${productComponentData.productId}"/>
- </field>
- <field name="workEffortId" use-when="${actionIsAdd}==null">
- <hidden value="${productComponentData.workEffortId}"/>
- </field>
- <field name="productId" use-when="${actionIsAdd}!=null">
- <lookup target-form-name="LookupProduct"/>
- </field>
- <field name="internalName" title="${uiLabelMap.ProductProductName}" use-when="${actionIsAdd}==null">
- <display description="${productComponentData.internalName} [${productComponentData.productId}]"/>
- </field>
- <field name="estimatedQuantity" title="${uiLabelMap.ManufacturingQuantity}">
- <text size="10"/>
- </field>
- <field name="workEffortId" title="${uiLabelMap.ManufacturingRoutingTaskId}" use-when="${actionIsAdd}!=null">
- <drop-down allow-empty="false">
- <entity-options entity-name="WorkEffort" description="${workEffortId}">
- <entity-constraint name="workEffortParentId" value="${productComponentData.productionRunId}"/>
- </entity-options>
- </drop-down>
- </field>
- <field name="workEffortName" title="${uiLabelMap.ManufacturingRoutingTaskId}" use-when="${actionIsAdd}==null">
- <display description="${productComponentData.workEffortId}"/>
- </field>
- <field name="submitButton" title="${uiLabelButton}">
- <submit button-type="button"/>
- </field>
- </form>
-
<!-- Production Run Declaration -->
<form name="ShowProductionRun" type="single" target="productionRunProduce" title="" default-map-name="productionRunData">
<field name="workEffortId"><hidden/></field>
@@ -395,11 +351,10 @@
<hyperlink target="/facility/control/EditInventoryItem?inventoryItemId=${inventoryItemId}" description="${inventoryItemId}" also-hidden="false" target-type="inter-app"/>
</field>
</form>
- <form name="ListProductionRunTaskFixedAssets" type="list" target="EditProductionRun" title="" list-name="productionRunFixedAssetsData">
- <alt-target use-when="declarationScreen.equals("Y")" target="ProductionRunDeclaration" />
+ <form name="ListProductionRunTaskFixedAssets" type="list" title="" list-name="productionRunFixedAssetsData">
<auto-fields-entity entity-name="WorkEffortFixedAssetAssign" default-field-type="display" />
<field name="workEffortId">
- <display-entity entity-name="WorkEffort" description="[${workEffortId}] ${workEffortName}" />
+ <display-entity entity-name="WorkEffort" description="${workEffortName} [${workEffortId}]" />
</field>
<field name="fixedAssetId">
<display-entity entity-name="FixedAsset" description="${fixedAssetName}" />
@@ -561,6 +516,35 @@
</field>
<field name="costComponentCalcId">
<display-entity entity-name="CostComponentCalc"/>
+ </field>
+ </form>
+ <form name="AddProductionRunComponent" type="single" target="addProductionRunComponent" title="">
+ <auto-fields-service service-name="addProductionRunComponent"/>
+ <field name="productionRunId"><hidden/></field>
+ <field name="workEffortId" title="${uiLabelMap.ManufacturingTask}" widget-style="selectBox">
+ <drop-down allow-empty="false">
+ <entity-options entity-name="WorkEffort" description="${workEffortName} [${workEffortId}]">
+ <entity-constraint name="workEffortParentId" env-name="productionRunId"/>
+ <entity-order-by field-name="workEffortId"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="productId">
+ <lookup target-form-name="LookupProduct"/>
+ </field>
+ <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+ <form name="ProductionRunTaskComponents" type="list" target="updateProductionRunComponent" paginate-target="ProductionRunComponents" title="" list-name="taskComponents">
+ <field name="productId"><display/></field>
+ <field name="internalName" entry-name="productId">
+ <display-entity entity-name="Product" key-field-name="productId" description="${internalName}"/>
+ </field>
+ <field name="workEffortId"><hidden/></field>
+ <field name="productionRunId"><hidden/></field>
+ <field name="estimatedQuantity"><text/></field>
+ <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ <field name="deleteLink" title="" widget-style="smallSubmit">
+ <hyperlink target="deleteProductionRunComponent?workEffortId=${workEffortId}&fromDate=${fromDate}&productId=${productId}&workEffortGoodStdTypeId=${workEffortGoodStdTypeId}&productionRunId=${productionRunId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
</field>
</form>
</forms>
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl?view=diff&rev=516461&r1=516460&r2=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunTabBar.ftl Fri Mar 9 08:59:49 2007
@@ -28,6 +28,7 @@
<a href="<@o...@ofbizUrl>" class="${selectedClassMap.declaration?default(unselectedClassName)}">${uiLabelMap.ManufacturingProductionRunDeclaration}</a>
<a href="<@o...@ofbizUrl>" class="${selectedClassMap.costs?default(unselectedClassName)}">${uiLabelMap.ManufacturingActualCosts}</a>
</#if>
+ <a href="<@o...@ofbizUrl>" class="${selectedClassMap.components?default(unselectedClassName)}">${uiLabelMap.ManufacturingMaterials}</a>
<a href="<@o...@ofbizUrl>" class="${selectedClassMap.assocs?default(unselectedClassName)}">${uiLabelMap.ManufacturingProductionRunAssocs}</a>
</#if>
</div>
Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?view=diff&rev=516461&r1=516460&r2=516461
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml Fri Mar 9 08:59:49 2007
@@ -81,6 +81,8 @@
<set field="titleProperty" value="ManufacturingEditProductionRun"/>
<set field="tabButtonItem" value="edit"/>
<set field="headerItem" value="jobshop"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="500"/>
<script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/EditProductionRun.bsh"/>
</actions>
<widgets>
@@ -89,6 +91,24 @@
<platform-specific>
<html><html-template location="component://manufacturing/webapp/manufacturing/jobshopmgt/EditProductionRun.ftl"/></html>
</platform-specific>
+ <container>
+ <label style="head2">${uiLabelMap.ManufacturingListOfProductionRunRoutingTasks}</label>
+ </container>
+ <container>
+ <link target="EditProductionRun?productionRunId=${productionRunId}&actionForm=AddRoutingTask" text="${uiLabelMap.ManufacturingAddRoutingTask}" style="buttontext"/>
+ </container>
+ <include-form name="ListProductionRunRoutingTasks" location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+ <container>
+ <label style="head2">${uiLabelMap.ManufacturingMaterials}</label>
+ </container>
+ <include-form name="ListProductionRunComponents" location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+ <container>
+ <label style="head2">${uiLabelMap.ManufacturingListOfProductionRunFixedAssets}</label>
+ </container>
+ <container>
+ <link target="EditProductionRun?productionRunId=${productionRunId}&actionForm=AddFixedAsset" text="${uiLabelMap.ManufacturingAddProductionRunFixedAssetAssign}" style="buttontext"/>
+ </container>
+ <include-form name="ListProductionRunTaskFixedAssets" location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -102,6 +122,8 @@
<set field="tabButtonItem" value="declaration"/>
<!--<set field="labelTitleProperty" value="ProductProductBom"/>-->
<set field="headerItem" value="jobshop"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="500"/>
<script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.bsh"/>
</actions>
@@ -175,6 +197,37 @@
<label style="head2">${uiLabelMap.ManufacturingDependentWorkEfforts}</label>
</container>
<include-form name="dependentWorkEfforts" location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+ <screen name="ProductionRunComponents">
+ <section>
+ <actions>
+ <set field="title" value="Production Run Components"/>
+ <set field="titleProperty" value="ManufacturingProductionRunComponents"/>
+ <set field="tabButtonItem" value="components"/>
+ <set field="headerItem" value="jobshop"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="500"/>
+
+ <set field="productionRunId" from-field="parameters.productionRunId"/>
+ <entity-one entity-name="WorkEffort" value-name="productionRun">
+ <field-map field-name="workEffortId" env-name="productionRunId"/>
+ </entity-one>
+ <script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.bsh"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonJobshopDecorator">
+ <decorator-section name="body">
+ <container>
+ <label style="head2">${uiLabelMap.ManufacturingTaskComponents}</label>
+ </container>
+ <include-form name="AddProductionRunComponent" location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunForms.xml"/>
+ <platform-specific>
+ <html><html-template location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunComponents.ftl"/></html>
+ </platform-specific>
</decorator-section>
</decorator-screen>
</widgets>