初始化

main
HUOJIN\92525 2024-08-03 18:26:04 +08:00
commit 4591beebc0
3820 changed files with 227153 additions and 0 deletions

72
.classpath 100644
View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="conf"/>
<classpathentry kind="src" output="target/sdwms" path="src/webapp"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" output="target/sdwms" path="www/com.dev.swms.SWMS"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="MAVEN_REPO/acegisecurity/jars/acegi-security-0.8.3.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/gxt/jars/gwtext-2.0.5.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/telnetd/jars/telnetd-2.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/ognl/jars/ognl-2.6.5.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/hibernate/jars/hibernate-3.2.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/ehcache/jars/ehcache-1.2.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-nodep-2.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/asm/jars/asm-2.2.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/antlr/jars/antlr-2.7.6rc1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/dom4j/jars/dom4j-1.6.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/odmg/jars/odmg-3.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/xalan/jars/xalan-2.4.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-2m.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-2.0-rc3.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jta/jars/jta-1.0.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/javamail/jars/mail-1.3.2.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jaf/jars/activation-1.0.2.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/gwt/jars/gwt-user-1.5.3.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/gwt/jars/gwt-servlet-1.5.3.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-codec/jars/commons-codec-1.3.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-3.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.7.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/opensaml/jars/opensaml-1.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/xml-apis/jars/xml-apis-1.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/xmlsec/jars/xmlsec-20050514.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.2.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-pool/jars/commons-pool-1.2.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.7.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/xstream/jars/xstream-1.1.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/quartz/jars/quartz-1.5.2.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/mysql/jars/mysql-connector-java-5.0.3-bin.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/ojdbc/jars/ojdbc14-10.2.0.1.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/proxool/jars/proxool-0.8.3.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymock-1.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servlet-api-2.4-20040521.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/commons-cli/jars/commons-cli-1.0.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/mssql/jars/msbase-2000.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/mssql/jars/mssqlserver-2000.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/mssql/jars/msutil-2000.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/org.mortbay.jetty.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/org.mortbay.jmx.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/jasper-compiler.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/jasper-runtime.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jetty/jars/javax.servlet.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/web/jars/low-server-1.1.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/web/jars/report-center-1.1.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/web/jars/telnet-1.1.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/web/jars/web-client-1.1.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/web/jars/high-server-1.1.3.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jxl/jars/jxl-2.6.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-dep-1.3.1.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/struts-menu/jars/struts-menu-2.3.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/htmlparser/jars/htmlparser-1.5.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/jaxen/jars/jaxen-1.1-beta-5.jar"/>
<classpathentry kind="var" path="MAVEN_REPO/eclipse/jars/jdt-compiler-3.0.jar"/>
<classpathentry kind="output" path="target/sdwms/WEB-INF/classes"/>
</classpath>

17
.project 100644
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>wms</name>
<comment>使用energy框架的E-LOG Enterprise WMS</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,3 @@
#Thu May 14 13:42:18 CST 2015
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

7
Ajax-compile.cmd 100644
View File

@ -0,0 +1,7 @@
@echo off
java -Xmx512M -cp "%~dp0\src\main\java;%~dp0\target\wms\WEB-INF\classes;%~dp0\..\web_client\src;%~dp0\..\web_client\target\classes;%~dp0\..\report_center\src\main\java;%~dp0\..\report_center\target\classes;%MAVEN_REPO%\gwt\jars\gwt-user-1.5.3.jar;%MAVEN_REPO%\gwt\jars\gwt-dev-windows-1.5.3.jar;%MAVEN_REPO%\gxt\jars\gwtext-2.0.5.jar;" com.google.gwt.dev.GWTCompiler -out "%~dp0\www" %* com.dev.swms.SWMS
if ERRORLEVEL 1 goto error
if ERRORLEVEL 0 goto exit
:error
pause
:exit

28
project.properties 100644
View File

@ -0,0 +1,28 @@
# Copyright (c) 2001-2005 dev Information Technology Co.,Ltd. All Rights Reserved.
#
# This software is the confidential and proprietary information of dev
# Information Technology Co.,Ltd. ("Confidential Information"). You shall not
# disclose such Confidential Information and shall use it only in
# accordance with the terms of the license agreement you entered into
# with dev.
#
# dev MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
# SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
# PURPOSE, OR NON-INFRINGEMENT. dev SHALL NOT BE LIABLE FOR ANY DAMAGES
# SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
# THIS SOFTWARE OR ITS DERIVATIVES.
#
# $Id: project.properties,v 1.2 2010/06/01 09:21:36 peng.lei Exp $
maven.compile.target=1.5
maven.compile.source=1.5
maven.docs.outputencoding=UTF-8
maven.javadoc.links=\
http://java.sun.com/j2se/1.5/docs/api/
maven.license.licenseFile=${basedir}/../LICENSE.txt
maven.compile.encoding=UTF-8

768
project.xml 100644
View File

@ -0,0 +1,768 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<pomVersion>1</pomVersion>
<id>wms</id>
<name>WMS</name>
<currentVersion>1.1.1</currentVersion>
<groupId>e2wms</groupId>
<package>com.dev.${pom.artifactId}</package>
<organization>
<name>dev Information Technology Co., Ltd.</name>
<url>http://www.dev.com/</url>
<logo>/images/dev-logo.gif</logo>
</organization>
<inceptionYear>2006</inceptionYear>
<description><![CDATA[
使用energy框架的E-LOG Enterprise WMS
]]></description>
<shortDescription>E-LOG Enterprise WMS</shortDescription>
<siteAddress>dev.net</siteAddress>
<url>http://${pom.artifactId}.${pom.siteAddress}/</url>
<siteDirectory>/www/develop/${pom.artifactId}</siteDirectory>
<distributionSite>${pom.siteAddress}</distributionSite>
<distributionDirectory>/www/repository</distributionDirectory>
<licenses>
<license>
<name>The dev Software License</name>
<url>http://scm.${pom.siteAddress}/viewcvs.cgi/*checkout*/${pom.artifactId}/LICENSE.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<repository>
<connection>scm:cvs:pserver:anonymous@scm.${pom.siteAddress}:/home/cvsroot:${pom.artifactId}</connection>
<developerConnection>scm:cvs:ext:${maven.username}@scm.${pom.siteAddress}:/home/cvsroot:${pom.artifactId}</developerConnection>
<url>http://scm.${pom.siteAddress}/viewcvs.cgi/${pom.artifactId}/</url>
</repository>
<versions>
</versions>
<mailingLists>
<mailingList>
<name>${pom.artifactId} Commit List</name>
<subscribe>${pom.artifactId}-commit-subscribe@${pom.siteAddress}</subscribe>
<unsubscribe>${pom.artifactId}-commit-unsubscribe@${pom.siteAddress}</unsubscribe>
<archive>http://list.${pom.siteAddress}/pipermail/${pom.artifactId}-commit/</archive>
</mailingList>
</mailingLists>
<developers>
</developers>
<dependencies>
<!-- acegi -->
<dependency>
<groupId>acegisecurity</groupId>
<artifactId>acegi-security</artifactId>
<version>0.8.3</version>
<type>jar</type>
<url>http://acegisecurity.sourceforge.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- energy -->
<dependency>
<groupId>web</groupId>
<artifactId>low-server</artifactId>
<version>1.1.1</version>
<type>jar</type>
<url>http://energy.dev.dtdns.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>web</groupId>
<artifactId>report-center</artifactId>
<version>1.1.1</version>
<type>jar</type>
<url>http://energy.dev.dtdns.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>web</groupId>
<artifactId>high-server</artifactId>
<version>1.1.1</version>
<type>jar</type>
<url>http://energy.dev.dtdns.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>web</groupId>
<artifactId>web-client</artifactId>
<version>1.1.1</version>
<type>jar</type>
<url>http://energy.dev.dtdns.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>web</groupId>
<artifactId>telnet</artifactId>
<version>1.1.1</version>
<type>jar</type>
<url>http://energy.dev.dtdns.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>gxt</groupId>
<artifactId>gwtext</artifactId>
<version>2.0.5</version>
<type>jar</type>
<url>http://repository.dev.net/gxt/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>telnetd</groupId>
<artifactId>telnetd</artifactId>
<version>2.0</version>
<type>jar</type>
<url>http://repository.dev.net/telnetd/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>2.6.5</version>
<type>jar</type>
<url>http://www.ognl.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- logging -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/logging/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
<type>jar</type>
<url>http://logging.apache.org/log4j/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- hibernate -->
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2</version>
<type>jar</type>
<url>http://www.hibernate.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>ehcache</groupId>
<artifactId>ehcache</artifactId>
<type>jar</type>
<url>http://ehcache.sourceforge.net/</url>
<version>1.2</version>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>nodep-2.1</version>
<type>jar</type>
<url>http://cglib.sourceforge.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>2.2</version>
<type>jar</type>
<url>http://asm.objectweb.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.6rc1</version>
<type>jar</type>
<url>http://www.antlr.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/collections/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<type>jar</type>
<url>http://dom4j.sourceforge.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>odmg</groupId>
<artifactId>odmg</artifactId>
<version>3.0</version>
<type>jar</type>
<url>http://www.odmg.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.4.0</version>
<type>jar</type>
<url>http://xml.apache.org/xalan-j/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- spring -->
<dependency>
<groupId>springframework</groupId>
<artifactId>spring</artifactId>
<version>2m</version>
<type>jar</type>
<url>http://www.springframework.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0-rc3</version>
<type>jar</type>
<url>http://www.springframework.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>jta</groupId>
<artifactId>jta</artifactId>
<version>1.0.1</version>
<type>jar</type>
<url>http://java.sun.com/products/jta/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>javamail</groupId>
<artifactId>mail</artifactId>
<version>1.3.2</version>
<type>jar</type>
<url>http://java.sun.com/products/javamail/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>jaf</groupId>
<artifactId>activation</artifactId>
<version>1.0.2</version>
<type>jar</type>
<url>http://java.sun.com/products/javabeans/jaf/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>1.5.3</version>
<type>jar</type>
<url>http://java.sun.com/products/javabeans/jaf/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>1.5.3</version>
<type>jar</type>
<url>http://java.sun.com/products/javabeans/jaf/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/codec/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/commons-httpclient/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.0</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/fileupload/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.7</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/digester/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- efirsta -->
<dependency>
<groupId>opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>1.1</version>
<type>jar</type>
<url>http://repository.dev.net/opensaml/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.0</version>
<type>jar</type>
<url>http://repository.dev.net/xml-apis/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>xmlsec</groupId>
<artifactId>xmlsec</artifactId>
<version>20050514</version>
<type>jar</type>
<url>http://repository.dev.net/xmlsec/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- dbcp -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/dbcp/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.2</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/pool/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- others -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/lang/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/beanutils/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.1.1</version>
<type>jar</type>
<url>http://xstream.codehaus.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.1</version>
<type>jar</type>
<url>http://www.dbunit.org/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.5.2</version>
<type>jar</type>
<url>http://www.ibiblio.org/maven/quartz/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- jdbc -->
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.1</version>
<type>jar</type>
<url>http://hsqldb.sourceforge.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.3-bin</version>
<type>jar</type>
<url>http://www.mysql.com/products/connector/j/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>ojdbc</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.1.0</version>
<type>jar</type>
<url>http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>proxool</groupId>
<artifactId>proxool</artifactId>
<version>0.8.3</version>
<type>jar</type>
<url>http://proxool.sourceforge.net/</url>
</dependency>
<!-- unittest -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<type>jar</type>
<url>http://www.junit.org/</url>
</dependency>
<dependency>
<groupId>easymock</groupId>
<artifactId>easymock</artifactId>
<version>1.1</version>
<type>jar</type>
<url>http://www.easymock.org/</url>
</dependency>
<!-- buildtime -->
<dependency>
<groupId>servletapi</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4-20040521</version>
<type>jar</type>
<url>http://java.sun.com/products/servlet</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.0</version>
<type>jar</type>
<url>http://jakarta.apache.org/commons/cli/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- mssql -->
<dependency>
<groupId>mssql</groupId>
<artifactId>msbase</artifactId>
<version>2000</version>
<type>jar</type>
<url>http://repository.dev.net/mssql/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>mssql</groupId>
<artifactId>mssqlserver</artifactId>
<version>2000</version>
<type>jar</type>
<url>http://repository.dev.net/mssql/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>mssql</groupId>
<artifactId>msutil</artifactId>
<version>2000</version>
<type>jar</type>
<url>http://repository.dev.net/mssql/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>jetty</groupId>
<artifactId>jetty</artifactId>
<version>5.1.10</version>
<jar>org.mortbay.jetty.jar</jar>
<type>jar</type>
<url>http://jetty.dev.dtdns.net/</url>
</dependency>
<dependency>
<groupId>jetty</groupId>
<artifactId>jmx</artifactId>
<version>5.1.10</version>
<jar>org.mortbay.jmx.jar</jar>
<type>jar</type>
<url>http://jetty.dev.dtdns.net/</url>
</dependency>
<dependency>
<groupId>jetty</groupId>
<artifactId>jasper-compiler</artifactId>
<jar>jasper-compiler.jar</jar>
<type>jar</type>
<url>http://jetty.dev.dtdns.net/</url>
</dependency>
<dependency>
<groupId>jetty</groupId>
<artifactId>jasper-runtime</artifactId>
<jar>jasper-runtime.jar</jar>
<type>jar</type>
<url>http://jetty.dev.dtdns.net/</url>
</dependency>
<dependency>
<groupId>jetty</groupId>
<artifactId>javax.servlet</artifactId>
<jar>javax.servlet.jar</jar>
<type>jar</type>
<url>http://jetty.dev.dtdns.net/</url>
</dependency>
<!-- energy-telnet needs -->
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity-dep</artifactId>
<version>1.3.1</version>
<type>jar</type>
<url>http://jakarta.apache.org/velocity/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>struts-menu</groupId>
<artifactId>struts-menu</artifactId>
<version>2.3</version>
<type>jar</type>
<url>http://struts-menu.sourceforge.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>htmlparser</groupId>
<artifactId>htmlparser</artifactId>
<version>1.5</version>
<type>jar</type>
<url>http://htmlparser.sourceforge.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>jxl</groupId>
<artifactId>jxl</artifactId>
<version>2.6</version>
<type>jar</type>
<url>http://energy.dev.dtdns.net/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<!-- jaxen -->
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1-beta-5</version>
<type>jar</type>
<url>http://repository.dev.net/jaxen/jars/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
<dependency>
<groupId>eclipse</groupId>
<artifactId>jdt-compiler</artifactId>
<version>3.0</version>
<type>jar</type>
<url>http://eclipse.org/jdt/</url>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
</dependencies>
<build>
<nagEmailAddress>${pom.artifactId}-commit@${pom.siteAddress}</nagEmailAddress>
<sourceDirectory>src/main/java</sourceDirectory>
<!-- J A R R E S O U R C E S -->
<!-- Resources that are packaged up inside the JAR file -->
<resources>
<resource>
<directory>${pom.build.sourceDirectory}</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
<include>**/*.html</include>
<include>**/*.css</include>
</includes>
</resource>
<resource>
<directory>${pom.build.sourceDirectory}/../resource</directory>
</resource>
</resources>
<!-- Unit test classes -->
<!-- <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<resources>
<resource>
<directory>${pom.build.unitTestSourceDirectory}</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/webapp/WEB-INF/classes</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/test/data</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.dat</include>
</includes>
</resource>
</resources>
</unitTest> -->
</build>
<reports>
<report>maven-changelog-plugin</report>
<report>maven-developer-activity-plugin</report>
<report>maven-file-activity-plugin</report>
<report>maven-checkstyle-plugin</report>
<report>maven-pmd-plugin</report>
<report>maven-simian-plugin</report>
<report>maven-jdepend-plugin</report>
<report>maven-junit-report-plugin</report>
<report>maven-license-plugin</report>
<report>maven-javadoc-plugin</report>
<report>maven-jxr-plugin</report>
<report>maven-tasklist-plugin</report>
<report>maven-changes-plugin</report>
<report>maven-faq-plugin</report>
</reports>
</project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
sql.sql 100644
View File

@ -0,0 +1 @@
alter table WMS_ITEM add (BE_MARKWEIGHT NUMBER(1)) ;

View File

@ -0,0 +1,46 @@
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import org.mortbay.http.SocketListener;
import org.mortbay.jetty.Server;
public class AjaxJettyLauncher {
protected int port = 8088;
protected String contextName = "sdwms";
protected String deployPath = "";
public static void main(String[] args) throws Exception {
AjaxJettyLauncher jl = new AjaxJettyLauncher();
jl.init();
jl.run();
}
protected void init() {
}
protected void run() throws Exception {
Server server = new Server();
SocketListener listener = new SocketListener();
listener.setPort(getPort()); server.addListener(listener);
server.addWebApplication("/" + getContextName() , getDeployPath());
server.start();
}
protected int getPort() {
return port;
}
protected String getContextName() {
return contextName;
}
protected String getDeployPath() {
if (deployPath.length() == 0) {
deployPath = "./target/" + contextName + "/";
}
return deployPath;
}
}

View File

@ -0,0 +1,40 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Arrays;
public class Server {
public static void main(String[] args) throws IOException {
// 1:建立服务器端的tcp socket服务,必须监听一个端口
ServerSocket ss = new ServerSocket(24992);
// 2: 通过服务器端的socket对象的accept方法获取连接上的客户端对象
Socket s = null;
// 3获取客户端的数据
while (true) {
// 接受Socket服务,如果有,没有则堵塞,等待
s = ss.accept();
System.out.println("accept success.......");
try {
// 从Socekt输入流中获取客户端发送过来的输出流
InputStream in = s.getInputStream();
byte[] buf = new byte[1024];
int len = in.read(buf);
System.out.println("从客户端传送来的数据如下:");
System.out.println(Arrays.toString(buf));
// 通过服务器端Socket输出流,写数据,会传送到客户端Socket输入流中
OutputStream out = s.getOutputStream();
String retunStr = "C0 01 01 03 FF 00 C0";
out.write(SocketUtils.hexStrToByteArrs(retunStr));
} catch (Exception e) {
System.out.println("error");
} finally {
s.close();
}
}
}
}

View File

@ -0,0 +1,129 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
public class SocketUtils {
// private static final Logger LOGGER = LoggerFactory.getLogger(Server2.class);
private static Socket socket = null;
private static String archivesCenterAPIIP = StringUtils
.defaultString( "127.0.0.1");
private static String archivesCenterAPIPort = StringUtils
.defaultString("24992");
public static boolean connection() {
if (socket != null) {
return true;
}
try {
socket = new Socket(archivesCenterAPIIP, NumberUtils.toInt(archivesCenterAPIPort));
return true;
} catch (Exception e) {
//LOGGER.error("connection error", e);
return false;
}
}
public static void stop() {
try {
if (socket != null) {
socket.close();
socket = null;
}
} catch (Exception e) {
// LOGGER.error("connection error", e);
}
}
/**
*
*
* @param cmd
* ()
* @return ()
*/
public static String sendCmd(String cmd) {
if (!connection() || socket == null) {
return "error";
}
try {
OutputStream out = socket.getOutputStream();
byte[] hexStrToByteArrs = hexStrToByteArrs(cmd);
if (hexStrToByteArrs == null) {
return "error";
}
// System.out.println("hexStrToByteArrs:"+hexStrToByteArrs);
out.write(hexStrToByteArrs);
InputStream in = socket.getInputStream();
byte[] buf = new byte[1024];
int len = in.read(buf);
stop();
return bytesToHexString(buf);
} catch (IOException e) {
//LOGGER.error("sendCmd error", e);
return "error";
}
}
/**
*
*
* @param hexString
* @return
*/
public static byte[] hexStrToByteArrs(String hexString) {
if (StringUtils.isEmpty(hexString)) {
return null;
}
hexString = hexString.replaceAll(" ", "");
int len = hexString.length();
int index = 0;
byte[] bytes = new byte[len / 2];
while (index < len) {
String sub = hexString.substring(index, index + 2);
bytes[index / 2] = (byte) Integer.parseInt(sub, 16);
index += 2;
}
return bytes;
}
/**
*
*
* @param byte[]
* @return HexString
*/
public static final String bytesToHexString(byte[] bArray) {
StringBuffer sb = new StringBuffer(bArray.length);
String sTemp;
for (int i = 0; i < bArray.length; i++) {
sTemp = Integer.toHexString(0xFF & bArray[i]);
if (sTemp.length() < 2)
sb.append(0);
sb.append(sTemp.toUpperCase());
// 在这里故意追加一个逗号便于最后的区分
sb.append(" ");
}
return sb.toString();
}
public static void main(String[] args) {
System.out.println(sendCmd("C 0 60 0 0 0 11 1 3 3 FA 0"));
//System.out.println(sendCmd("0f 0f"));
}
}

View File

@ -0,0 +1,32 @@
import com.dev.kangaroo.context.ContextLoader;
public class TelnetLuncher {
private ContextLoader contextLoader;
private String locatorFactorySelector = "classpath:telnet-beanRefContext.xml";
private String parentContextKey = "com.dev.telnet";
public String getLocatorFactorySelector() {
return locatorFactorySelector;
}
public void setLocatorFactorySelector(String locatorFactorySelector) {
this.locatorFactorySelector = locatorFactorySelector;
}
public String getParentContextKey() {
return parentContextKey;
}
public void setParentContextKey(String parentContextKey) {
this.parentContextKey = parentContextKey;
}
public static void main(String[] args){
TelnetLuncher luncher = new TelnetLuncher();
luncher.startServer();
}
public void startServer(){
this.contextLoader = new ContextLoader();
this.contextLoader.setLocatorFactorySelector(locatorFactorySelector);
this.contextLoader.setParentContextKey(parentContextKey);
this.contextLoader.createApplicationContext();
}
}

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC
"-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<!--
Copyright (c) 2001-2005 dev Information Technology Co.,Ltd. All Rights Reserved.
This software is the confidential and proprietary information of dev
Information Technology Co.,Ltd. ("Confidential Information"). You shall not
disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement you entered into
with dev.
dev MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. dev SHALL NOT BE LIABLE FOR ANY DAMAGES
SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
THIS SOFTWARE OR ITS DERIVATIVES.
-->
<!-- $Id: actionContext.xml,v 1.2 2010/06/01 09:14:16 peng.lei Exp $ -->
<beans>
<bean id="warehouseHolderAction" class="com.dev.swms.server.action.WarehouseHolderAction" singleton="false"/>
<bean id="pickingAllocateAction" class="com.dev.swms.server.action.PickingAllocateAction" singleton="true">
<constructor-arg index="0">
<ref bean="pickTicketManager"/>
</constructor-arg>
<constructor-arg index="1">
<ref bean="waveDocManager"/>
</constructor-arg>
</bean>
</beans>

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC
"-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<!--
Copyright (c) 2001-2005 dev Information Technology Co.,Ltd. All Rights Reserved.
This software is the confidential and proprietary information of dev
Information Technology Co.,Ltd. ("Confidential Information"). You shall not
disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement you entered into
with dev.
dev MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. dev SHALL NOT BE LIABLE FOR ANY DAMAGES
SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
THIS SOFTWARE OR ITS DERIVATIVES.
-->
<!-- $Id: adapterContext.xml,v 1.2 2010/06/01 09:14:16 peng.lei Exp $ -->
<beans>
<!-- 自动调度任务清单 -->
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="daemonStorageDailyComputeCronTrigger"/>
<ref bean="inventoryCountCronTrigger"/>
<ref bean="batchSendLogsTrigger"/>
<ref bean="dealReceivedLogsTrigger"/>
</list>
</property>
</bean>
<!-- 定时调度计算每日进出存数据 -->
<bean id="daemonStorageDailyComputeJob"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="inventoryManager"/>
</property>
<property name="targetMethod">
<value>compute</value>
</property>
</bean>
<bean id="daemonStorageDailyComputeCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref local="daemonStorageDailyComputeJob"/>
</property>
<property name="cronExpression">
<value>0 00 1 * * ?</value>
</property>
</bean>
<!-- 定时调度计算库存积数 -->
<bean id="inventoryCountComputeJob"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="inventoryCountManager"/>
</property>
<property name="targetMethod">
<value>countInventoty</value>
</property>
</bean>
<bean id="inventoryCountCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref local="inventoryCountComputeJob"/>
</property>
<property name="cronExpression">
<value>00 00 23 * * ?</value>
</property>
</bean>
<!--定时发送READY状态的log消息-->
<bean id="batchSendLogsTrigger"
class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail" ref="batchSendLogsJob"/>
<property name="startDelay" value="10000"/>
<property name="repeatInterval" value="1000"/>
<property name="repeatCount" value="0"/>
</bean>
<bean id="batchSendLogsJob"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="adapterLauncher"/>
<property name="targetMethod" value="batchSendLogs"/>
</bean>
<!-- 定时处理接收到的log消息 -->
<bean id="dealReceivedLogsTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail" ref="dealReceivedLogsJob"/>
<property name="startDelay" value="10000"/>
<property name="repeatInterval" value="1000"/>
<property name="repeatCount" value="0"/>
</bean>
<bean id="dealReceivedLogsJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="adapterLauncher"/>
<property name="targetMethod" value="dealReceivedLogs"/>
</bean>
</beans>

View File

@ -0,0 +1,7 @@
<module>
<inherits name="com.gwtext.GwtExt"/>
<inherits name='com.dev.repc.ReportCenter'/>
<inherits name='com.dev.energy.ApplicationWindow'/>
<entry-point class='com.dev.swms.client.SWMS'/>
<stylesheet src="css/UIinventoryVisibility.css"/>
</module>

View File

@ -0,0 +1,180 @@
package com.dev.swms.client;
import java.util.HashMap;
import java.util.Map;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.ToolbarButton;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.layout.VerticalLayout;
import com.gwtext.client.widgets.tree.TreeNode;
import com.dev.energy.client.ApplicationWindow;
import com.dev.energy.client.config.page.IMainPageConfig;
import com.dev.energy.client.config.page.PageConfig;
import com.dev.energy.client.config.page.ReportPageConfig;
import com.dev.energy.client.context.ConfigContext;
import com.dev.energy.client.rpc.AjaxServiceUtil;
import com.dev.energy.client.rpc.AsyncCallBackAdapter;
import com.dev.energy.client.rpc.CatchPageConfigAsync;
import com.dev.energy.client.rpc.CommitServiceAsync;
import com.dev.energy.client.template.AbstractCustomPageTemplate;
import com.dev.energy.client.template.EditPageTemplate;
import com.dev.energy.client.ui.page.IPage;
import com.dev.energy.client.ui.page.IPopupPage;
import com.dev.energy.client.utils.LocaleUtils;
/**
* @author dev
*/
public class SWMS extends ApplicationWindow {
public static ToolbarButton changeWarehouse;
public void initNativeMethod() {
}
public void afterInitializingUI() {
}
public void afterInitConfigContext() {
}
public void topLinkContent(final Element td) {
}
public void topLinkContent2(Element td) {
DOM.setInnerHTML(td , "&nbsp;");
}
public void setOtherInfo(final String otherMessage) {
changeWarehouse = new ToolbarButton(otherMessage){
public void setText(String text) {
super.setText("<font color='#0000FF'>" + text + "</font>");
}
};
toolbar.addFill();
toolbar.addSeparator();
toolbar.addButton(changeWarehouse);
toolbar.addSeparator();
ToolbarButton changePassword = new ToolbarButton("<font color='#0000FF'>" + LocaleUtils.getText("eidtUserPassword") + "</font>",new ButtonListenerAdapter(){
public void onClick(Button button, EventObject e) {
changePage2("eidtUserPassword");
}
});
toolbar.addButton(changePassword);
AsyncCallBackAdapter acba = new AsyncCallBackAdapter() {
public void exec() {
CommitServiceAsync serviceAsync
= AjaxServiceUtil
.initialAsyncService(ConfigContext.DEFAULT);
serviceAsync.executeCustom("warehouseManager","getThisWarehouse",new HashMap(),this);
}
public void onSuccess() {
final Map map = (Map)result;
changeWarehouse.addListener(new ButtonListenerAdapter(){
public void onClick(Button button, EventObject e) {
changePopPage("switchWareHousePage",map);
}
});
}
public void onFailure() {}
};
acba.exec("");
}
public void bottomLinkContent2(Element td) {
}
public static void changePage2(final String pageId) {
context.getPageConfig(pageId,new CatchPageConfigAsync(){
public void afterInvotion(PageConfig pageConfig) {
if(pageConfig instanceof ReportPageConfig){
changPagePri3(pageConfig, new TreeNode());
}else{
changPagePri2(pageConfig);
}
}
});
}
public static void changPagePri2(PageConfig pageConfig){
if(!(pageConfig instanceof IMainPageConfig)){
final IPopupPage iPage = pageConfig.createPage(new HashMap(),null);
if(iPage instanceof EditPageTemplate){
((EditPageTemplate)iPage).show();
((EditPageTemplate)iPage).initData();
}
ApplicationWindow.getCurrentMessageLabel().setText("");
return;
}
}
private static void changPagePri3(PageConfig pageConfig , TreeNode node){
// ApplicationWindow.aw.pageConfig = pageConfig;
if(pageConfig instanceof IMainPageConfig){
// ApplicationWindow.aw.onHistoryChanged(pageConfig.getId() , node);
Panel panel = new Panel();
panel.setAutoDestroy(true);
panel.setLayout(new VerticalLayout());
IPage page = ((ReportPageConfig)pageConfig).createPage(panel);
pages.put(pageConfig.getId() , page);
addTabPanel(page.getTitle(),panel,pageConfig.getId() , node);
}
}
public static void changePopPage(final String pageId,final Map map) {
context.getPageConfig(pageId,new CatchPageConfigAsync(){
public void afterInvotion(PageConfig pageConfig) {
pageConfig.setTitle(LocaleUtils.getText(pageId));
IPopupPage iPage = pageConfig.createPage(map,null);
if(iPage instanceof AbstractCustomPageTemplate){
((AbstractCustomPageTemplate)iPage).show();
((AbstractCustomPageTemplate)iPage).initData();
}
ApplicationWindow.getCurrentMessageLabel().setText("");
return;
}
});
}
public void drawNorthPanel(Panel northPanel) {
northPanel.setHeight(60);
northPanel.setPaddings(0);
northPanel.setHtml("<IFRAME NAME='north_frame' width='100%' height='100%' frameborder=0 scrolling=no src='north.html' ></IFRAME>");
}
public void drawSouthPanel(Panel southPanel) {
southPanel.setHeight(20);
southPanel.setPaddings(0);
southPanel.setBorder(false);
southPanel.setHtml("<IFRAME NAME='south_frame' width='100%' height='100%' frameborder=0 scrolling=no src='south.html' ></IFRAME>");
}
public native Element getDownloadIframeHandle()/*-{
return $wnd.document.getElementById('__tms_dl');
}-*/;
public native void setDownloadIframeSrc(String src)/*-{
$wnd.document.getElementById('__tms_dl').src = src;
}-*/;
public void appendBottomCompanyName(Element td) {
DOM.setInnerHTML(td , LocaleUtils.getText("logo.company.name"));
}
@Override
public void bottomLinkContent(Element td) {
}
}

View File

@ -0,0 +1,113 @@
package com.dev.swms.client.ui.companent;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.EventPreview;
import com.google.gwt.user.client.ui.MouseListener;
import com.google.gwt.user.client.ui.MouseListenerAdapter;
import com.google.gwt.user.client.ui.MouseListenerCollection;
import com.google.gwt.user.client.ui.SourcesMouseEvents;
import com.google.gwt.user.client.ui.Widget;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.swms.client.ui.javabean.JB_IV;
import com.dev.swms.client.ui.page.Sub_W_Image_Panel;
public final class DraggableUiColumnChartWrapper extends UiColumnChart
implements SourcesMouseEvents,EventPreview
{
private MouseListenerCollection mouseListeners = new MouseListenerCollection();
public void addMouseListener(MouseListener l){
mouseListeners.add(l);
}
public void removeMouseListener(MouseListener l){
mouseListeners.remove(l);
}
public void onBrowserEvent(Event event) {
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEDOWN:
case Event.ONMOUSEUP:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEOVER:
case Event.ONMOUSEOUT:
case Event.MOUSEEVENTS:
mouseListeners.fireMouseEvent(this, event);
break;
}
}
public DraggableUiColumnChartWrapper(final JB_IV iv, final Sub_W_Image_Panel wPanel){
super(iv,wPanel);
DOM.setStyleAttribute(getElement(),"position","absolute");
//We don't want to lose anything already sunk,
//so just ORing it to what's already there.
DOM.sinkEvents(getElement(),DOM.getEventsSunk(getElement())|Event.MOUSEEVENTS);
addMouseListener(new DraggableMouseListener(iv,wPanel));
}
public boolean onEventPreview(Event event) {
if (DOM.eventGetType(event) == Event.ONMOUSEDOWN &&
DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))) {
DOM.eventPreventDefault(event);
}
return true;
}
private class DraggableMouseListener
extends MouseListenerAdapter {
private boolean dragging = false;
private int dragStartX;
private int dragStartY;
Sub_W_Image_Panel wPanel;
JB_IV iv;
public DraggableMouseListener(JB_IV iv,Sub_W_Image_Panel w){
this.wPanel = w;
this.iv = iv;
}
public void onMouseDown(Widget sender, int x, int y) {
dragging = true;
// capturing the mouse to the dragged widget.
DOM.setCapture(getElement());
dragStartX = x;
dragStartY = y;
}
public void onMouseUp(Widget sender, int x, int y) {
dragging = false;
DOM.releaseCapture(getElement());
Page_IV_DataAccessor pid = new Page_IV_DataAccessor(wPanel);
pid.setCur_JB_IV(iv);
pid.setCur_JB_IV_POS(sender.getAbsoluteLeft()-CT_IV.DEFAULT_OFF_WIDTH,
sender.getAbsoluteTop()-CT_IV.DEFAULT_OFF_HEIGHT);
pid.updateIVData();
}
public void onMouseMove(Widget sender, int x, int y) {
if (dragging) {
// we don't want the widget to go off-screen, so the top/left
// values should always remain be positive.
int newX = Math.max(0, x + getAbsoluteLeft() - dragStartX);
int newY = Math.max(0, y + getAbsoluteTop() - dragStartY);
DOM.setStyleAttribute(getElement(), "left", ""+newX);
DOM.setStyleAttribute(getElement(), "top", ""+newY);
}
}
public void onMouseEnter(Widget sender){
applyToolTips(iv);
}
}
/* factory method:
public static DraggableWidgetWrapper makeDraggable(UiColumnChart widget) {
return new DraggableWidgetWrapper(widget);
}
*/
}

View File

@ -0,0 +1,107 @@
package com.dev.swms.client.ui.companent;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.EventPreview;
import com.google.gwt.user.client.ui.MouseListener;
import com.google.gwt.user.client.ui.MouseListenerAdapter;
import com.google.gwt.user.client.ui.MouseListenerCollection;
import com.google.gwt.user.client.ui.SourcesMouseEvents;
import com.google.gwt.user.client.ui.Widget;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
import com.dev.swms.client.ui.page.Sub_Z_Image_Panel;
public final class DraggableUiPieChartWrapper extends UiPieChart
implements SourcesMouseEvents,EventPreview {
private MouseListenerCollection mouseListeners = new MouseListenerCollection();
public void addMouseListener(MouseListener l){
mouseListeners.add(l);
}
public void removeMouseListener(MouseListener l){
mouseListeners.remove(l);
}
public void onBrowserEvent(Event event) {
switch (DOM.eventGetType(event)) {
case Event.ONMOUSEDOWN:
case Event.ONMOUSEUP:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEOVER:
case Event.ONMOUSEOUT:
case Event.MOUSEEVENTS:
mouseListeners.fireMouseEvent(this, event);
break;
}
}
public DraggableUiPieChartWrapper(final JB_Zone_IV ziv, final Sub_Z_Image_Panel zPanel){
super(ziv,zPanel);
DOM.setStyleAttribute(getElement(),"position","absolute");
//We don't want to lose anything already sunk,
//so just ORing it to what's already there.
DOM.sinkEvents(getElement(),DOM.getEventsSunk(getElement())|Event.MOUSEEVENTS);
addMouseListener(new DraggableMouseListener(ziv,zPanel));
}
public boolean onEventPreview(Event event) {
if (DOM.eventGetType(event) == Event.ONMOUSEDOWN &&
DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))) {
DOM.eventPreventDefault(event);
}
return true;
}
private class DraggableMouseListener extends MouseListenerAdapter {
private boolean dragging = false;
private int dragStartX;
private int dragStartY;
Sub_Z_Image_Panel zPanel;
JB_Zone_IV ziv;
public DraggableMouseListener(JB_Zone_IV ziv, Sub_Z_Image_Panel zPanel){
this.zPanel = zPanel;
this.ziv = ziv;
}
public void onMouseDown(Widget sender, int x, int y) {
dragging = true;
// capturing the mouse to the dragged widget.
DOM.setCapture(getElement());
dragStartX = x;
dragStartY = y;
}
public void onMouseUp(Widget sender, int x, int y) {
dragging = false;
DOM.releaseCapture(getElement());
Page_IV_DataAccessor pid = new Page_IV_DataAccessor(zPanel);
pid.setCur_JB_Zone_IV(ziv);
pid.setCur_JB_Zone_IV_POS(sender.getAbsoluteLeft()-CT_IV.DEFAULT_OFF_WIDTH,
sender.getAbsoluteTop()-CT_IV.DEFAULT_OFF_HEIGHT);
pid.updateZIVData();
}
public void onMouseMove(Widget sender, int x, int y) {
if (dragging) {
// we don't want the widget to go off-screen, so the top/left
// values should always remain be positive.
int newX = Math.max(0, x + getAbsoluteLeft() - dragStartX);
int newY = Math.max(0, y + getAbsoluteTop() - dragStartY);
DOM.setStyleAttribute(getElement(), "left", ""+newX);
DOM.setStyleAttribute(getElement(), "top", ""+newY);
ziv.setLoc_xPos(sender.getAbsoluteLeft()-CT_IV.DEFAULT_OFF_WIDTH);
ziv.setLoc_yPos(sender.getAbsoluteTop()-CT_IV.DEFAULT_OFF_HEIGHT);
}
}
public void onMouseEnter(Widget sender){
applyToolTips(ziv);
}
}
}

View File

@ -0,0 +1,50 @@
package com.dev.swms.client.ui.companent;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.ClickListenerCollection;
import com.google.gwt.user.client.ui.SourcesClickEvents;
import com.google.gwt.user.client.ui.VerticalPanel;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class UiClickedPanel extends VerticalPanel implements SourcesClickEvents{
protected ClickListenerCollection clickedCollections;
protected static final String DEFAULT_CLICKEDPANEL_STYLE = "iv_clicked_vertical_panel";
public UiClickedPanel(){
this.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.ONMOUSEWHEEL|Event.ONDBLCLICK);
this.setStyleName(DEFAULT_CLICKEDPANEL_STYLE);
}
public void addClickListener(ClickListener listener) {
if(clickedCollections == null) {
clickedCollections = new ClickListenerCollection();
}
clickedCollections.add(listener);
}
public void removeClickListener(ClickListener listener) {
if(clickedCollections != null) {
clickedCollections.remove(listener);
}
}
public void onBrowserEvent(Event event) {
switch (event.getTypeInt()) {
case Event.ONDBLCLICK:
if(clickedCollections != null) {
clickedCollections.fireClick(this);
}
break;
}
}
}

View File

@ -0,0 +1,65 @@
package com.dev.swms.client.ui.companent;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.HTMLPanel;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.swms.client.ui.javabean.JB_IV;
import com.dev.swms.client.ui.page.Sub_W_Image_Panel;
/**
* @author dev
* @version $Project:swms $Date$Version:V1.1
*/
public class UiColumnChart extends UiColumnChartParent {
public UiColumnChart(final JB_IV iv,final Sub_W_Image_Panel wPanel ) {
final UiClickedPanel mainPanel = new UiClickedPanel();
VerticalPanel panel = new VerticalPanel();
panel.setSize(DEFAULT_WIDTH + "" , DEFAULT_HEIGHT + "");
panel.setStyleName(DEFAULT_VERTICAL_PANEL);
if(iv.getIv_rate() >0) {
HTMLPanel yChart = new HTMLPanel(
"<div style=\"background:" + CT_IV.DEFAULT_CHART_COLOR + ";width:" + DEFAULT_WIDTH + "px;height:" + DEFAULT_HEIGHT + "px;\">&nbsp;&nbsp;&nbsp;&nbsp;</div>");
yChart.setWidth(DEFAULT_WIDTH);
yChart.setFrame(false);
yChart.setHeight(Integer.valueOf(NumberFormat.getFormat(CT_IV.DEFAULT_INTEGER_FORMAT).format(DEFAULT_HEIGHT*iv.getIv_rate())));
panel.add(yChart);
panel.setCellVerticalAlignment(yChart , HasVerticalAlignment.ALIGN_BOTTOM);
panel.setCellHeight(yChart,"100%");
}else{
Label l = new Label();
l.setWidth(DEFAULT_WIDTH + "px");
panel.add(l);
}
Label label = new Label(NumberFormat.getFormat(CT_IV.DEFAULT_PERCENT_FORMAT).format(iv.getIv_rate()));
mainPanel.add(label);
mainPanel.setCellHorizontalAlignment(label,HasHorizontalAlignment.ALIGN_CENTER);
mainPanel.setCellVerticalAlignment(label , HasVerticalAlignment.ALIGN_TOP);
mainPanel.add(panel);
mainPanel.setCellVerticalAlignment(panel, HasVerticalAlignment.ALIGN_BOTTOM);
mainPanel.addClickListener(new ClickListener(){
public void onClick(Widget sender) {
wPanel.curIVDataAccessor().setCur_JB_IV(iv);
wPanel.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_OPEN_Z_IMAGE_PANEL);
}
});
this.add(mainPanel);
this.setPopupPosition(iv.toXY()[0] + CT_IV.DEFAULT_OFF_WIDTH , iv.toXY()[1] + CT_IV.DEFAULT_OFF_HEIGHT);
this.applyToolTips(iv);
}
}

View File

@ -0,0 +1,37 @@
package com.dev.swms.client.ui.companent;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.user.client.ui.PopupPanel;
import com.gwtext.client.widgets.ToolTip;
import com.dev.swms.client.ui.javabean.JB_IV;
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
import com.dev.swms.client.ui.util.Ui_Pie_Chart_Util;
/**
*@author dev
*@version $Project:e2wms $Date$Version:V1.1
*/
public class UiColumnChartParent extends PopupPanel {
protected static final int DEFAULT_WIDTH = 15;
protected static final int DEFAULT_HEIGHT = 50;
protected static final String DEFAULT_UI_CC_SUBPANEL_STYLE = "ui_cc_subpanel_style";
protected static final String DEFAULT_UI_CC_MAINPANEL_STYLE = "ui_cc_mainpanel_style";
protected static final String DEFAULT_VERTICAL_PANEL = "iv_cc_vertical_panel";
protected void applyToolTips(IsSerializable iv) {
if(iv == null) return;
ToolTip tt = null;
if(iv instanceof JB_IV) {
tt = new ToolTip(Ui_Pie_Chart_Util.generateChartToolTip((JB_IV)iv));
} else if(iv instanceof JB_Zone_IV) {
tt = new ToolTip(Ui_Pie_Chart_Util.generatePieToolTip((JB_Zone_IV)iv));
}
if(tt != null) {
tt.setWidth(300);
tt.setMinWidth(200);
tt.setMaxWidth(500);
tt.applyTo(this.getElement());
}
}
}

View File

@ -0,0 +1,144 @@
package com.dev.swms.client.ui.companent;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.HTMLPanel;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
import com.dev.swms.client.ui.page.Sub_Z_Image_Panel;
//package com.dev.swms.client.ui.companent;
//
//import com.google.gwt.i18n.client.NumberFormat;
//import com.google.gwt.user.client.ui.ClickListener;
//import com.google.gwt.user.client.ui.HasHorizontalAlignment;
//import com.google.gwt.user.client.ui.HasVerticalAlignment;
//import com.google.gwt.user.client.ui.Label;
//import com.google.gwt.user.client.ui.PopupPanel;
//import com.google.gwt.user.client.ui.Widget;
//import com.gwtext.client.data.ArrayReader;
//import com.gwtext.client.data.FieldDef;
//import com.gwtext.client.data.FloatFieldDef;
//import com.gwtext.client.data.MemoryProxy;
//import com.gwtext.client.data.RecordDef;
//import com.gwtext.client.data.Store;
//import com.gwtext.client.data.StringFieldDef;
//import com.gwtext.client.widgets.chart.yui.PieChart;
//import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
//import com.dev.swms.client.ui.javabean.JB_Zone_IV;
//import com.dev.swms.client.ui.page.Sub_Z_Image_Panel;
//
///**
// * @author dev
// * @version $Project:swms $Date$Version:V1.1
// */
//public class UiPieChart extends PopupPanel {
//
// protected static final int DEFAULT_WIDTH = 50;
// protected static final int DEFAULT_HEIGHT = 50;
//
// protected static final int DEFAULT_OFF_X = 60;
//// protected static final int DEFAULT_OFF_Y = 60;
//
// public static final String DEFAULT_X_FIELD = "location_rate";
// public static final String DEFAULT_Y_FIELD = "location_name";
//
// protected PieChart chart;
//
// public UiPieChart(final JB_Zone_IV ziv , final Sub_Z_Image_Panel zPanel) {
// this.initPieChart(ziv);
// UiClickedPanel mainPanel = new UiClickedPanel();
// mainPanel.setSize(DEFAULT_WIDTH + "" , DEFAULT_HEIGHT + "");
//
// Label label = new Label(NumberFormat.getPercentFormat().format(ziv.getLoc_rate()));
// mainPanel.add(label);
// mainPanel.setCellHorizontalAlignment(label,HasHorizontalAlignment.ALIGN_CENTER);
// mainPanel.setCellVerticalAlignment(label , HasVerticalAlignment.ALIGN_TOP);
//
// mainPanel.add(chart);
// mainPanel.setCellVerticalAlignment(chart, HasVerticalAlignment.ALIGN_BOTTOM);
// mainPanel.setCellHorizontalAlignment(chart,HasHorizontalAlignment.ALIGN_CENTER);
// mainPanel.addClickListener(new ClickListener(){
//
// public void onClick(Widget sender) {
// zPanel.curIVDataAccessor().setCur_JB_Zone_IV(ziv);
// zPanel.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_OPEN_L_IMAGE_PANEL);
// }
//
// });
// this.add(mainPanel);
// this.setPopupPosition(ziv.getLoc_xPos() + DEFAULT_OFF_X , ziv.getLoc_yPos() + DEFAULT_OFF_Y);
// }
//
// protected void initPieChart(JB_Zone_IV ziv) {
// MemoryProxy proxy = new MemoryProxy(ziv.to2Array());
// RecordDef recordDef = new RecordDef(new FieldDef[] {
// new StringFieldDef(DEFAULT_Y_FIELD), new FloatFieldDef(DEFAULT_X_FIELD)}
// );
// ArrayReader reader = new ArrayReader(recordDef);
// Store store = new Store(proxy, reader);
// store.load();
// chart = new PieChart();
// chart.setBodyBorder(false);
// chart.setBorder(false);
// chart.setWMode("transparent");
// chart.setStore(store);
// chart.setDataField(DEFAULT_X_FIELD);
// chart.setCategoryField(DEFAULT_Y_FIELD);
// chart.setExpressInstall("js/yui/assets/expressinstall.swf");
// chart.setWidth(DEFAULT_WIDTH);
// chart.setHeight(DEFAULT_HEIGHT);
// chart.setAutoShow(true);
// }
//}
public class UiPieChart extends UiColumnChartParent {
public UiPieChart(final JB_Zone_IV ziv,final Sub_Z_Image_Panel zPanel ) {
final UiClickedPanel mainPanel = new UiClickedPanel();
VerticalPanel panel = new VerticalPanel();
panel.setSize(DEFAULT_WIDTH + "" , DEFAULT_HEIGHT + "");
panel.setStyleName(DEFAULT_VERTICAL_PANEL);
if(ziv.getLoc_rate() > 0) {
HTMLPanel yChart = new HTMLPanel(
"<div style=\"background:"+ CT_IV.DEFAULT_CHART_COLOR + ";width:" + DEFAULT_WIDTH + "px;height:" + DEFAULT_HEIGHT + "px;\">&nbsp;&nbsp;&nbsp;&nbsp;</div>");
yChart.setWidth(DEFAULT_WIDTH);
yChart.setFrame(false);
yChart.setHeight(Integer.valueOf(NumberFormat.getFormat(CT_IV.DEFAULT_INTEGER_FORMAT).format(DEFAULT_HEIGHT*ziv.getLoc_rate())));
panel.add(yChart);
panel.setCellVerticalAlignment(yChart , HasVerticalAlignment.ALIGN_BOTTOM);
panel.setCellHeight(yChart,"100%");
}else {
Label l = new Label();
l.setWidth(DEFAULT_WIDTH + "px");
panel.add(l);
}
Label label = new Label(NumberFormat.getFormat(CT_IV.DEFAULT_PERCENT_FORMAT).format(ziv.getLoc_rate()));
mainPanel.add(label);
mainPanel.setCellHorizontalAlignment(label,HasHorizontalAlignment.ALIGN_CENTER);
mainPanel.setCellVerticalAlignment(label , HasVerticalAlignment.ALIGN_TOP);
mainPanel.add(panel);
mainPanel.setCellVerticalAlignment(panel, HasVerticalAlignment.ALIGN_BOTTOM);
mainPanel.addClickListener(new ClickListener(){
public void onClick(Widget sender) {
zPanel.curIVDataAccessor().setCur_JB_Zone_IV(ziv);
zPanel.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_OPEN_L_IMAGE_PANEL);
}
});
this.add(mainPanel);
this.setPopupPosition(ziv.toXY()[0] + CT_IV.DEFAULT_OFF_WIDTH , ziv.toXY()[1] + CT_IV.DEFAULT_OFF_HEIGHT);
//this.applyToolTips(ziv);
}
}

View File

@ -0,0 +1,77 @@
package com.dev.swms.client.ui.constant;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class CT_IV implements IsSerializable{
/** 缺省道、排、行、列的数量 */
public static final int DEFAULT_AISLE = 10;
public static final int DEFAULT_LINE = 10;
public static final int DEFAULT_ROW = 5;
public static final int DEFAULT_COL = 10;
/** 缺省XY离左上角(0,0)的坐标偏差 */
public static final int DEFAULT_OFF_HEIGHT = 80;
public static final int DEFAULT_OFF_WIDTH = 25;
/** 缺省容积率%格式 */
public static final String DEFAULT_PERCENT_FORMAT = "##0.##%";
public static final String DEFAULT_INTEGER_FORMAT = "##0";
/** 缺省柱图的色标 */
public static final String DEFAULT_CHART_COLOR = "red";
/** 缺省带背景面板样式如仓库布局Panel */
public static final String DEFAULT_BODYSTYLE = "text-align:center;padding:1px 1px;" +
"border:1px dotted #99bbe8;background:#dfe8f6 url(images/grid-back.gif) repeat left top;" +
"color:#15428b;cursor:default;margin:0px;" +
"font:bold 11px tahoma,arial,sans-serif;";
/** 导航条箭头IMG */
public static final String DEFAULT_ARROW_IMG = "<img src='images/rule_arrow.gif'/>";
/** 缺省带背景图片的面板如仓库布局Panel */
public static final String DEFAULT_IMAGE_STYLE = "iv_sub_image_panel";
/** 仓库可视化后台manager */
public static final String IV_MANAGER = "warehouseManager";
/** 获取后台仓库可视化的方法 */
public static final String IV_INIT_DATA = "init_WM_IV";
//新增方法
/** 修改后台仓库可视化的方法 */
public static final String IV_UPDATE_DATA = "update_WM_IV";
public static final String ZIV_UPDATE_DATA = "update_WM_ZIV";
/** 获取库区的可视化的方法 */
public static final String IV_INIT_ZONE_DATA = "init_Zone_IV";
/** 获取库位的道排可视化的方法 */
public static final String IV_INIT_LOCATION_DATA = "init_Location_IV";
/** 获取库位行列可视化的方法 */
public static final String IV_INIT_LOCATION_RC_DATA = "init_Location_RC_IV";
/** 获取库存详细的方法 */
public static final String IV_INIT_INVENTORY_DATA = "init_Inventory_Data";
/** 结果集标识key */
public static final String IV_RESULT = "iv_result";
/** 仓库ID */
public static final String IV_WH_ID = "wh_id";
/**仓库的坐标*/
public static final String IV_WH_XPOS = "wh_xPos";
public static final String IV_WH_YPOS = "wh_yPos";
/** 库区ID */
public static final String IV_ZONE_ID = "zone_id";
/**库区的坐标*/
public static final String IV_ZONE_XPOS = "zone_xPos";
public static final String IV_ZONE_YPOS = "zone_yPos";
/** 道 */
public static final String IV_AISLE = "aisle";
/** 排 */
public static final String IV_LINE = "line";
/** 行 */
public static final String IV_ROW = "row";
/** 列 */
public static final String IV_COL = "col";
/** 仓库可视化对象 */
public static final String IV_JB_IV = "jb_iv";
/** 库位ID */
public static final String IV_LOCATION_ID = "loc_id";
}

View File

@ -0,0 +1,19 @@
package com.dev.swms.client.ui.constant;
import com.google.gwt.user.client.rpc.IsSerializable;
public class CT_PA implements IsSerializable {
/** 发货单后台manager */
public static final String PA_MANAGER = "pickTicketManager";
/** 波次后台manager */
public static final String WD_MANAGER = "waveDocManager";
public static final String PT_RESULT = "pt_result";
public static final String PD_RESULT = "pd_result";
public static final String PTA_RESULT = "pta_result";
public static final String PTAD_RESULT = "ptad_result";
}

View File

@ -0,0 +1,135 @@
package com.dev.swms.client.ui.customUI;
import java.util.List;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.FocusListener;
import com.google.gwt.user.client.ui.Widget;
import com.dev.energy.client.config.page.TableConfig;
import com.dev.energy.client.rpc.AsyncCallBackAdapter;
import com.dev.energy.client.ui.RemoteUI;
import com.dev.energy.client.ui.page.IPage;
import com.dev.energy.client.ui.table.RowData;
public class CustomRemoteUI extends RemoteUI{
public CustomRemoteUI(IPage ownerPage) {
super(ownerPage);
}
protected void addTextFocusListener() {
textBox.addFocusListener(new FocusListener(){
public void onFocus(Widget sender) {
if(rowData!=null) {
textBox.setText(rowData.getColumnValue(1).toString());
}
// textBox.setText(code);
textBox.setStyleName("popwin_input01_on");
}
public void onLostFocus(Widget sender) {
String value = textBox.getText().trim();
if(value == null || value.equals("")){
resetValue();
textBox.setStyleName("popwin_input01");
return;
}
if(rowData!=null && value.equals(rowData.getColumnValue(1).toString()) ) {
if(rowData.getColumnValues().size() > 2){
textBox.setText(rowData.getColumnValue(displayColumn - 1).toString());
}else{
textBox.setText(rowData.getColumnValue(1).toString());
}
textBox.setStyleName("popwin_input01");
return;
}
isShow = false;
if(getPercentSignPosition().equals("both"))
invokeRemoteQuery("%"+textBox.getText()+"%");
else if(getPercentSignPosition().equals("left"))
invokeRemoteQuery("%"+textBox.getText());
else
invokeRemoteQuery(textBox.getText()+"%");
textBox.setStyleName("popwin_input02");
}
});
image.addClickListener(new ClickListener(){
public void onClick(Widget sender) {
textBox.setFocus(false);
isShow = false;
SelectorTemplate template = new CustomSelectorTemplate(ownerPage,title,true);
template.setPopupPosition(image.getAbsoluteLeft(),image.getAbsoluteTop(),true);
template.draw();
template.query();
}
});
}
protected void invokeRemoteQuery(final String value){
if(value == null || value.equals("")){
entityId = null;
code = "";
return;
}
SelectorTemplate template = new CustomSelectorTemplate(ownerPage,title,false);
template.setPopupPosition(image.getAbsoluteLeft(),image.getAbsoluteTop(),true);
template.draw();
template.query(value);
}
public SelectorTableUI getSelectorTableUI(SelectorTemplate s,TableConfig t,IPage page){
return new CustomSelectorTableUI(s,t , page);
}
public class CustomSelectorTemplate extends SelectorTemplate{
public CustomSelectorTemplate(IPage parentPage, String uiTitle, boolean onImageClick) {
super(parentPage, uiTitle, onImageClick);
}
}
public class CustomSelectorTableUI extends SelectorTableUI{
public CustomSelectorTableUI(SelectorTemplate template, TableConfig tableConfig, IPage ownerPage) {
super(template, tableConfig, ownerPage);
}
public void pagingPage(final String codeValue,final int currentPage) {
AsyncCallBackAdapter acba = new AsyncCallBackAdapter() {
public void exec() {
// RemoteQueryServiceAsync serviceAsync = AjaxServiceUtil.initialAsyncQueryService(tableConfig.getPageId());
// tableConfig.setCurrentPage(currentPage);
// Map map = template.getFormParams(getQueryParams("param",codeValue));
// serviceAsync.customRemoteQuery(hql,tableConfig,map,this);
}
public void onSuccess() {
List rowDatas = ((TableConfig)result).getTableRows();
// onDataReturned((TableConfig)result);
if(rowDatas.size() == 0){
selectNoneValue();
}
else if(rowDatas.size() == 1){
setValueImpl((RowData) rowDatas.get(0));
}
else{
if(!isShow){
template.show();
isShow = true;
}
}
}
};
// acba.exec(tableConfig.getPageId());
}
}
}

View File

@ -0,0 +1,213 @@
package com.dev.swms.client.ui.data;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.javabean.JB_IV;
import com.dev.swms.client.ui.javabean.JB_Location_IV;
import com.dev.swms.client.ui.javabean.JB_Location_IV_List;
import com.dev.swms.client.ui.javabean.JB_Location_Inventory;
import com.dev.swms.client.ui.javabean.JB_Location_RC_IV_List;
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
import com.dev.energy.client.data.DataAccessor;
import com.dev.energy.client.message.IMessagePage;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class Page_IV_DataAccessor extends DataAccessor{
/** 消息句柄--初始化库存可视化 */
public static final String MSG_INIT_IV_DATA = "msg_initIVDatas";
public static final String MSG_INIT_ZONE_DATAS = "init_zone_datas";
public static final String MSG_INIT_LOCATION_DATAS = "msg_init_location_datas";
public static final String MSG_INIT_LOCATION_RC_DATAS = "msg_init_location_rc_datas";
public static final String MSG_INIT_INVENTORY_DATAS = "msg_init_inventory_datas";
public static final String MSG_CLOSE_ALL_COLUMN_CHART = "msg_close_charts";
public static final String MSG_REFRESH_NAVIGATE_PANEL = "msg_refresh_navigate";
public static final String MSG_OPEN_W_IMAGE_PANEL = "msg_open_w_panel";
public static final String MSG_OPEN_Z_IMAGE_PANEL = "msg_open_z_panel";
public static final String MSG_OPEN_L_IMAGE_PANEL = "msg_open_l_panel";
public static final String MSG_UPDATE_IV_DATA = "msg_updateIVData";
public static final String MSG_UPDATE_ZIV_DATA = "msg_updateZIVData";
/** 所有仓库的容积率 */
private List<JB_IV> ivs;
/** 所有库区的容积率 */
private List<JB_Zone_IV> zivs;
/** 所有库位道排的容积率 */
private List<JB_Location_IV_List> livs;
/** 所有库位层列的容积率 */
private List<JB_Location_RC_IV_List> lrivs;
/** 所有库存 */
private List<JB_Location_Inventory> lis;
/** 当前选中的仓库 */
private JB_IV cur_JB_IV;
/** 当前选中的库区 */
private JB_Zone_IV cur_JB_Zone_IV;
public Page_IV_DataAccessor(IMessagePage page) {
super(page);
}
/** 远程调用后台方法获取库存可视化数据 */
public void initIVDatas(){
this.remoteCall(MSG_INIT_IV_DATA , CT_IV.IV_MANAGER , CT_IV.IV_INIT_DATA , new HashMap());
}
//远程调用后台方法改变库存可视化数据中的坐标值
public void updateIVData(){
this.remoteCall(MSG_UPDATE_IV_DATA,CT_IV.IV_MANAGER,CT_IV.IV_UPDATE_DATA,construct_WarehousePos_Param());
}
public void updateZIVData(){
this.remoteCall(MSG_UPDATE_ZIV_DATA,CT_IV.IV_MANAGER,CT_IV.ZIV_UPDATE_DATA,construct_ZonePos_Param());
}
/** 异步获取后台的库区容积率 */
public void initZoneIvDatas() {
this.remoteCall(MSG_INIT_ZONE_DATAS,CT_IV.IV_MANAGER , CT_IV.IV_INIT_ZONE_DATA ,construct_Zone_Param());
}
/** 异步获取后台的库位道排容积率 */
public void initLocationIvDatas() {
this.remoteCall(MSG_INIT_LOCATION_DATAS,CT_IV.IV_MANAGER , CT_IV.IV_INIT_LOCATION_DATA ,construct_Location_Param());
}
/** 异步获取后台的库位层列容积率 */
public void initLocationIvRCDatas(Map params) {
this.remoteCall(MSG_INIT_LOCATION_RC_DATAS,CT_IV.IV_MANAGER , CT_IV.IV_INIT_LOCATION_RC_DATA ,params);
}
/** 异步获取后台的库存信息 */
public void initInventoryDatas(Map params) {
this.remoteCall(MSG_INIT_INVENTORY_DATAS,CT_IV.IV_MANAGER , CT_IV.IV_INIT_INVENTORY_DATA ,params);
}
/** 设置当前正在操作的仓库容积对象 */
public void setCur_JB_IV(JB_IV cur_JB_IV) {
this.cur_JB_IV = cur_JB_IV;
}
public void setCur_JB_IV_POS(int cur_JB_IV_XPOS,int cur_JB_IV_YPOS){
this.cur_JB_IV.setX_Pos(cur_JB_IV_XPOS);
this.cur_JB_IV.setY_Pos(cur_JB_IV_YPOS);
}
public void setCur_JB_Zone_IV(JB_Zone_IV ziv) {
this.cur_JB_Zone_IV = ziv;
}
public void setCur_JB_Zone_IV_POS(int cur_JB_Zone_IV_XPOS,int cur_JB_Zone_IV_YPOS){
this.cur_JB_Zone_IV.setLoc_xPos(cur_JB_Zone_IV_XPOS);
this.cur_JB_Zone_IV.setLoc_yPos(cur_JB_Zone_IV_YPOS);
}
public JB_Zone_IV getCur_JB_Zone_IV(){
return this.cur_JB_Zone_IV;
}
public JB_IV current_JB_IV(){
return this.cur_JB_IV;
}
public List<JB_IV> all_IV() {
return this.ivs;
}
public List<JB_Zone_IV> all_Zone_IV() {
return this.zivs;
}
public List<JB_Location_IV_List> all_Location_IV(){
return this.livs;
}
public List<JB_Location_RC_IV_List> all_Location_RC_IV(){
return this.lrivs;
}
public List<JB_Location_Inventory> all_Location_Inv(){
return this.lis;
}
public JB_Location_IV getCur_JB_Location_IV(int row ,int col) {
return this.livs.get(row).get(col);
}
//param of the current warehousePos param
public Map construct_WarehousePos_Param(){
Map<String,Long> param = new HashMap<String,Long>();
param.put(CT_IV.IV_WH_ID , this.cur_JB_IV.getIv_wh_id());
Integer itx = new Integer(this.cur_JB_IV.getX_Pos());
Long lox = new Long(itx.longValue());
Integer ity = new Integer(this.cur_JB_IV.getY_Pos());
Long loy = new Long(ity.longValue());
param.put(CT_IV.IV_WH_XPOS,lox);
param.put(CT_IV.IV_WH_YPOS,loy);
return param;
}
//param of zone pos
public Map construct_ZonePos_Param(){
Map<String,Long> param = new HashMap<String,Long>();
param.put(CT_IV.IV_ZONE_ID , this.cur_JB_Zone_IV.getLoc_id());
Integer itx = new Integer(this.cur_JB_Zone_IV.getLoc_xPos());
Long lox = new Long(itx.longValue());
Integer ity = new Integer(this.cur_JB_Zone_IV.getLoc_yPos());
Long loy = new Long(ity.longValue());
param.put(CT_IV.IV_ZONE_XPOS,lox);
param.put(CT_IV.IV_ZONE_YPOS,loy);
return param;
}
public Map construct_Zone_Param() {
Map<String,Long> param = new HashMap<String,Long>();
param.put(CT_IV.IV_WH_ID , this.cur_JB_IV.getIv_wh_id());
return param;
}
private Map construct_Location_Param(){
Map<String,Long> params = new HashMap<String,Long>();
params.put(CT_IV.IV_ZONE_ID , this.getCur_JB_Zone_IV().getLoc_id());
return params;
}
@SuppressWarnings("unchecked")
public void onSuccess(String message, Map result) {
if(MSG_INIT_IV_DATA.equals(message)) {
this.ivs = (List) result.get(CT_IV.IV_RESULT);
this.sendMessage(MSG_INIT_IV_DATA);
}else if(MSG_INIT_ZONE_DATAS.equals(message)) {
this.zivs = (List)result.get(CT_IV.IV_RESULT);
this.sendMessage(MSG_INIT_ZONE_DATAS);
}else if(MSG_INIT_LOCATION_DATAS.equals(message)) {
this.livs = (List)result.get(CT_IV.IV_RESULT);
this.sendMessage(MSG_INIT_LOCATION_DATAS);
}else if(MSG_INIT_LOCATION_RC_DATAS.equals(message)) {
this.lrivs = (List)result.get(CT_IV.IV_RESULT);
this.sendMessage(MSG_INIT_LOCATION_RC_DATAS);
}else if(MSG_INIT_INVENTORY_DATAS.equals(message)) {
this.lis = (List)result.get(CT_IV.IV_RESULT);
this.sendMessage(MSG_INIT_INVENTORY_DATAS);
}else if(MSG_UPDATE_IV_DATA.equals(message)){
this.sendMessage(MSG_UPDATE_IV_DATA);
System.out.println("Success!!!");
}else if(MSG_UPDATE_ZIV_DATA.equals(message)){
this.sendMessage(MSG_UPDATE_ZIV_DATA);
System.out.println("SuccessAgain!!!");
}
}
public void onFailure(String message, Map result) {
}
public boolean onTimeOutFailure(String message) {
return false;
}
}

View File

@ -0,0 +1,253 @@
package com.dev.swms.client.ui.data;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.dev.swms.client.ui.constant.CT_PA;
import com.dev.swms.client.ui.javabean.PT_ALLOCATED;
import com.dev.swms.client.ui.javabean.PT_AVAILABLE;
import com.dev.swms.client.ui.javabean.PT_DETAILS;
import com.dev.swms.client.ui.javabean.PT_INFO;
import com.dev.energy.client.data.DataAccessor;
import com.dev.energy.client.message.IMessagePage;
public class Page_PA_DataAccessor extends DataAccessor {
public static final String INIT_PICK_TICKETS_INFO = "init_pick_tickets_info";
public static final String INIT_DETAILS_INFO = "initDetailsInfo";
public static final String INIT_AVAILABLE_INFO = "initAvailableInfo";
public static final String INIT_ALLOCATED_INFO = "initAllocatedInfo";
public static final String AUTO_ALLOCATE_INFO = "autoAllocateInfo";
public static final String CANCELL_ALLOCATE_INFO = "cancellAllocateInfo";
public static final String MANUAL_ALLOCATE_INFO = "manualAllocateInfo";
public static final String INIT_WAVE_DOC_INFO = "init_wave_doc_info";
public static final String INIT_WD_DETAILS_INFO = "initWDDetailsInfo";
public static final String INIT_WD_AVAILABLE_INFO = "initWDAvailableInfo";
public static final String INIT_WD_ALLOCATED_INFO = "initWDAllocatedInfo";
public static final String AUTO_WD_ALLOCATE_INFO = "autoWDAllocateInfo";
public static final String CANCELL_WD_ALLOCATE_INFO = "cancellWDAllocateInfo";
public static final String MANUAL_WD_ALLOCATE_INFO = "manualWDAllocateInfo";
/**当前选中的发货单*/
private PT_INFO curPickTicket;
/**同一发货单的明细*/
private List<PT_DETAILS> pds;
/**同一条明细的库存*/
private List<PT_AVAILABLE> ptas;
/**同一发货单的已分配记录*/
private List<PT_ALLOCATED> ptad;
/**当前选中的发货单明细号*/
private Long ptdId;
/**当前选中的波次明细号*/
private Long wddId;
/**页面标志*/
private String flag;
public Long getPtdId() {
return ptdId;
}
public void setPtdId(Long ptdId) {
this.ptdId = ptdId;
}
public Long getWddId() {
return wddId;
}
public void setWddId(Long wddId) {
this.wddId = wddId;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public List<PT_DETAILS> all_PDS(){
return this.pds;
}
public List<PT_AVAILABLE> all_PTAS(){
return this.ptas;
}
public List<PT_ALLOCATED> all_PTAD(){
return this.ptad;
}
public PT_INFO currentPickTicket() {
return this.curPickTicket;
}
public void setCurPickTicket(PT_INFO curPickTicket) {
this.curPickTicket = curPickTicket;
}
public Page_PA_DataAccessor(IMessagePage page) {
super(page);
}
/*异步获取后台发货单信息*/
public void initPickTicketInfo(Map params) {
this.remoteCall(INIT_PICK_TICKETS_INFO,CT_PA.PA_MANAGER,"init_PA_INFO",params);
}
/*异步获取后台发货单明细信息*/
public void initDetailsInfo(Map params) {
this.remoteCall(INIT_DETAILS_INFO,CT_PA.PA_MANAGER,"init_PD_INFO",params);
}
/*异步获取后台一条发货单明细的库存信息*/
public void initAvailableInfo(Map params) {
this.remoteCall(INIT_AVAILABLE_INFO,CT_PA.PA_MANAGER,"init_AL_INFO",params);
}
/*异步获取后台发货单已分配信息*/
public void initAllocatedInfo(Map params) {
this.remoteCall(INIT_ALLOCATED_INFO,CT_PA.PA_MANAGER,"init_ALD_INFO",params);
}
//发货单整单分配
public void atuoAllocate(Map params){
this.remoteCall(AUTO_ALLOCATE_INFO,CT_PA.PA_MANAGER,"auto_Allocate",params);
}
//发货单取消分配
public void cancellAllocate(Map params){
this.remoteCall(CANCELL_ALLOCATE_INFO,CT_PA.PA_MANAGER,"cancell_Allocate",params);
}
//发货单部分分配
public void manualAllocate(Map params){
this.remoteCall(MANUAL_ALLOCATE_INFO,CT_PA.PA_MANAGER,"manual_Allocate",params);
}
/*异步获取后台波次信息*/
public void initWaveDocInfo(Map params) {
this.remoteCall(INIT_WAVE_DOC_INFO,CT_PA.WD_MANAGER,"init_WD_INFO",params);
}
/*异步获取后台波次明细信息*/
public void initWaveDocDetailsInfo(Map params) {
this.remoteCall(INIT_WD_DETAILS_INFO,CT_PA.WD_MANAGER,"init_WDD_INFO",params);
}
/*异步获取后台一条波次明细的库存信息*/
public void initWaveDocAvailableInfo(Map params) {
this.remoteCall(INIT_WD_AVAILABLE_INFO,CT_PA.WD_MANAGER,"init_WDAL_INFO",params);
}
/*异步获取后台波次已分配信息*/
public void initWaveDocAllocatedInfo(Map params) {
this.remoteCall(INIT_WD_ALLOCATED_INFO,CT_PA.WD_MANAGER,"init_WDALD_INFO",params);
}
//波次整单分配
public void atuoWaveDocAllocate(Map params){
this.remoteCall(AUTO_WD_ALLOCATE_INFO,CT_PA.WD_MANAGER,"auto_WD_Allocate",params);
}
//波次取消分配
public void cancellWaveDocAllocate(Map params){
this.remoteCall(CANCELL_WD_ALLOCATE_INFO,CT_PA.WD_MANAGER,"cancell_WD_Allocate",params);
}
//波次部分分配
public void manualWaveDocAllocate(Map params){
this.remoteCall(MANUAL_WD_ALLOCATE_INFO,CT_PA.WD_MANAGER,"manual_WD_Allocate",params);
}
@Override
public void onFailure(String message, Map result) {
// TODO Auto-generated method stub
System.out.print("读数据失败!");
}
@Override
public void onSuccess(String message, Map result) {
if(INIT_PICK_TICKETS_INFO.equals(message)) {
this.curPickTicket= (PT_INFO)result.get(CT_PA.PT_RESULT);
this.sendMessage(INIT_PICK_TICKETS_INFO);
}else if(INIT_WAVE_DOC_INFO.equals(message)) {
this.curPickTicket= (PT_INFO)result.get(CT_PA.PT_RESULT);
this.sendMessage(INIT_WAVE_DOC_INFO);
}else if(INIT_DETAILS_INFO.equals(message)){
this.pds= (List)result.get(CT_PA.PD_RESULT);
this.sendMessage(INIT_DETAILS_INFO);
}else if(INIT_WD_DETAILS_INFO.equals(message)){
this.pds= (List)result.get(CT_PA.PD_RESULT);
this.sendMessage(INIT_WD_DETAILS_INFO);
}else if(INIT_AVAILABLE_INFO.equals(message)){
this.ptas= (List)result.get(CT_PA.PTA_RESULT);
this.sendMessage(INIT_AVAILABLE_INFO);
}else if(INIT_WD_AVAILABLE_INFO.equals(message)){
this.ptas= (List)result.get(CT_PA.PTA_RESULT);
this.sendMessage(INIT_WD_AVAILABLE_INFO);
}else if(INIT_ALLOCATED_INFO.equals(message)){
this.ptad= (List)result.get(CT_PA.PTAD_RESULT);
this.sendMessage(INIT_ALLOCATED_INFO);
}else if(INIT_WD_ALLOCATED_INFO.equals(message)){
this.ptad= (List)result.get(CT_PA.PTAD_RESULT);
this.sendMessage(INIT_WD_ALLOCATED_INFO);
}else if(AUTO_ALLOCATE_INFO.equals(message)){
reloadPT(result);
this.sendMessage(AUTO_ALLOCATE_INFO);
}else if(AUTO_WD_ALLOCATE_INFO.equals(message)){
reloadWD(result);
this.sendMessage(AUTO_WD_ALLOCATE_INFO);
}else if(CANCELL_ALLOCATE_INFO.equals(message)){
reloadPT(result);
this.sendMessage(CANCELL_ALLOCATE_INFO);
}else if(CANCELL_WD_ALLOCATE_INFO.equals(message)){
reloadWD(result);
this.sendMessage(CANCELL_WD_ALLOCATE_INFO);
}else if(MANUAL_ALLOCATE_INFO.equals(message)){
final Map result1 = new HashMap();
result1.put("pickTicketId", curPickTicket.getId());
reloadPT(result1);
this.sendMessage(MANUAL_ALLOCATE_INFO);
}else if(MANUAL_WD_ALLOCATE_INFO.equals(message)){
final Map result1 = new HashMap();
result1.put("waveDocId", curPickTicket.getId());
reloadWD(result1);
this.sendMessage(MANUAL_WD_ALLOCATE_INFO);
}
}
/*重新初始化发货单信息*/
public void reloadPT(Map result){
initPickTicketInfo(result);
initDetailsInfo(result);
initAllocatedInfo(result);
}
/*重新初始化波次信息*/
public void reloadWD(Map result){
initWaveDocInfo(result);
initWaveDocDetailsInfo(result);
initWaveDocAllocatedInfo(result);
}
@Override
public boolean onTimeOutFailure(String message) {
// TODO Auto-generated method stub
return false;
}
}

View File

@ -0,0 +1,108 @@
package com.dev.swms.client.ui.javabean;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*
*/
public class JB_IV implements IsSerializable {
private Long iv_wh_id;
private String iv_wh_name;
private Double iv_rate;
private int x_Pos;
private int y_Pos;
private String image_url;//库区布局图
public String getImage_url() {
return image_url;
}
public void setImage_url(String image_url) {
this.image_url = image_url;
}
public JB_IV(){}
public JB_IV(Object id, Object name , Object rate , Object xPos , Object yPos , Object image) {
this(id,name,rate,xPos,yPos);
this.image_url = image == null?"" : (String)image;
}
public JB_IV(Object id, Object name , Object rate , Object xPos , Object yPos) {
this((Long)id,(String)name,(Double)rate);
this.x_Pos = (Integer)xPos;
this.y_Pos = (Integer)yPos;
}
public JB_IV(Long id, String name , Double rate) {
this.iv_wh_id = id;
this.iv_wh_name = name;
this.iv_rate = rate == null ? 0D : rate;
}
public int getX_Pos() {
return x_Pos;
}
public void setX_Pos(int pos) {
x_Pos = pos;
}
public int getY_Pos() {
return y_Pos;
}
public void setY_Pos(int pos) {
y_Pos = pos;
}
public Double getIv_rate() {
return iv_rate;
}
public void setIv_rate(Double iv_rate) {
this.iv_rate = iv_rate;
}
public Long getIv_wh_id() {
return iv_wh_id;
}
public void setIv_wh_id(Long iv_wh_id) {
this.iv_wh_id = iv_wh_id;
}
public String getIv_wh_name() {
return iv_wh_name;
}
public void setIv_wh_name(String iv_wh_name) {
this.iv_wh_name = iv_wh_name;
}
/** 转化为二维数组 */
public Object[][] to2Array() {
return new Object[][]{
new Object[]{this.getIv_wh_name() , this.getIv_rate()}
};
}
/** 获取坐标值 */
public int[] toXY() {
return new int[]{this.x_Pos , this.y_Pos};
}
/** 转化为数组 */
public String[] toStrArray() {
return new String[]{this.iv_wh_name , this.x_Pos + "" , this.y_Pos + ""};
}
/** 属性中文称呼数组 */
public static String[] toLocaliedArray() {
return new String[]{
"序号",
"仓库名称",
"仓库容积率",
"X坐标",
"Y坐标",
"仓库布局图"
};
}
}

View File

@ -0,0 +1,69 @@
package com.dev.swms.client.ui.javabean;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class JB_Location_IV implements IsSerializable {
private Long loc_id;
private int loc_aisle;
private int loc_line;
private Double loc_rate;
public JB_Location_IV(){}
public JB_Location_IV(Object id,Object line , Object aisle,Object rate) {
this.loc_id = (Long)id;
this.loc_rate = ((Double)rate > 1D ? 1D:(Double)rate);
this.loc_aisle = (Integer)aisle;
this.loc_line = (Integer)line;
}
public JB_Location_IV(Object line , Object aisle,Object rate) {
this(null,line,aisle,rate);
}
public int getLoc_aisle() {
return loc_aisle;
}
public void setLoc_aisle(int loc_aisle) {
this.loc_aisle = loc_aisle;
}
public Long getLoc_id() {
return loc_id;
}
public void setLoc_id(Long loc_id) {
this.loc_id = loc_id;
}
public int getLoc_line() {
return loc_line;
}
public void setLoc_line(int loc_line) {
this.loc_line = loc_line;
}
public Double getLoc_rate() {
return loc_rate;
}
public void setLoc_rate(Double loc_rate) {
this.loc_rate = loc_rate;
}
public boolean equals(Object obj) {
JB_Location_IV castOther = (JB_Location_IV)obj;
return this.loc_aisle == castOther.getLoc_aisle() && this.loc_line == castOther.getLoc_line();
}
public int hashCode(){
return -1;
}
}

View File

@ -0,0 +1,28 @@
package com.dev.swms.client.ui.javabean;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class JB_Location_IV_List extends ArrayList<JB_Location_IV> implements IsSerializable{
public JB_Location_IV_List(){
super();
}
public Object[] toArray() {
Object[] objs = new Object[this.size() + 1];
int i = 0;
for(JB_Location_IV liv : this) {
if(i == 0) {
objs[0] = liv.getLoc_line() + "排";
}
objs[++i] = liv.getLoc_rate();
}
return objs;
}
}

View File

@ -0,0 +1,181 @@
package com.dev.swms.client.ui.javabean;
import java.util.Date;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class JB_Location_Inventory implements IsSerializable {
private Long id;
private String org_name;
private String loc_code;
private String item_code;
private String item_name;
private String lot;
private String unit;
private double quantity;
private double weight;
private double volume;
private int age;
private String lp;
public JB_Location_Inventory(){
}
/** 两个日期之间间隔的天数 */
public Integer getBetweenDays(Date sDate,Date eDate) {
long DAY = 24L * 60L * 60L * 1000L;
return new Integer((int)((eDate.getTime() - sDate.getTime())/DAY));
}
public JB_Location_Inventory(Object id ,Object org_name, Object loc_code,Object code,Object name
,Object lot,Object unit,Object quantity,Object weight,Object volume , Object age , Object lp){
this(id ,org_name, loc_code,code, name, lot, unit, quantity, weight, volume);
this.age = age == null ? 0 : getBetweenDays((Date)age , new Date());
this.lp = lp == null ? " " : (String)lp;
}
public JB_Location_Inventory(Object id ,Object org_name, Object loc_code,Object code,Object name
,Object lot,Object unit,Object quantity,Object weight,Object volume){
this.id = (Long)id;
this.org_name = (String)org_name;
this.loc_code = (String)loc_code;
this.item_code = (String)code;
this.item_name = (String)name;
this.lot = (lot == null ? " ":lot.toString());
this.unit = (String)unit;
this.quantity = (Double)quantity;
this.weight = (Double)weight;
this.volume = (Double)volume;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getLp() {
return lp;
}
public void setLp(String lp) {
this.lp = lp;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getItem_code() {
return item_code;
}
public void setItem_code(String item_code) {
this.item_code = item_code;
}
public String getItem_name() {
return item_name;
}
public void setItem_name(String item_name) {
this.item_name = item_name;
}
public String getLoc_code() {
return loc_code;
}
public void setLoc_code(String loc_code) {
this.loc_code = loc_code;
}
public String getLot() {
return lot;
}
public void setLot(String lot) {
this.lot = lot;
}
public double getQuantity() {
return quantity;
}
public void setQuantity(double quantity) {
this.quantity = quantity;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public double getVolume() {
return volume;
}
public void setVolume(double volume) {
this.volume = volume;
}
public double getWeight() {
return weight;
}
public void setWeight(double weight) {
this.weight = weight;
}
public String getOrg_name() {
return org_name;
}
public void setOrg_name(String org_name) {
this.org_name = org_name;
}
public Object[] toArray(){
return new Object[]{
this.org_name,
this.loc_code,
this.item_code,
this.item_name,
this.lot,
this.unit,
this.quantity,
this.weight,
this.volume,
this.age,
this.lp
};
}
public static String[] propertyToArray(){
return new String[]{
"org_name",
"loc_code",
"item_code",
"item_name",
"lot",
"unit",
"quantity",
"weight",
"volume",
"age",
"lp"
};
}
public static String[] localizedToArray(){
return new String[]{
"货主",
"库位",
"货品编码",
"货品名称",
"批次属性",
"包装",
"库存数量",
"重量",
"体积",
"库龄",
"托盘号"
};
}
}

View File

@ -0,0 +1,173 @@
package com.dev.swms.client.ui.javabean;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class JB_Location_RC_IV implements IsSerializable {
private Long id;
private int row;
private int col;
private int aisle;
private int line;
private double rate;
private String code;
private String name;
private double length;// 长
private double width;// 宽
private double height;// 高
private double totalWeight;//总重量
private double totalVolume;//总体积
private double totalQuantity;//总件数
private int totalLP;//总托数
private double fullRate;//库满度
public JB_Location_RC_IV(){}
public JB_Location_RC_IV(Object row,Object col,Object rate) {
this.rate = (Double)rate;
this.row = (Integer)row;
this.col = (Integer)col;
}
public double getFullRate() {
return fullRate;
}
public void setFullRate(double fullRate) {
this.fullRate = fullRate;
}
public double getLength() {
return length;
}
public void setLength(double length) {
this.length = length;
}
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getTotalLP() {
return totalLP;
}
public void setTotalLP(int totalLP) {
this.totalLP = totalLP;
}
public double getTotalQuantity() {
return totalQuantity;
}
public void setTotalQuantity(double totalQuantity) {
this.totalQuantity = totalQuantity;
}
public double getTotalVolume() {
return totalVolume;
}
public void setTotalVolume(double totalVolume) {
this.totalVolume = totalVolume;
}
public double getTotalWeight() {
return totalWeight;
}
public void setTotalWeight(double totalWeight) {
this.totalWeight = totalWeight;
}
public double getWidth() {
return width;
}
public void setWidth(double width) {
this.width = width;
}
public int getCol() {
return col;
}
public void setCol(int col) {
this.col = col;
}
public double getRate() {
return rate;
}
public void setRate(double rate) {
this.rate = rate;
}
public int getRow() {
return row;
}
public void setRow(int row) {
this.row = row;
}
public int getAisle() {
return aisle;
}
public void setAisle(int aisle) {
this.aisle = aisle;
}
public int getLine() {
return line;
}
public void setLine(int line) {
this.line = line;
}
public String[] toTipArray(){
return new String[]{
this.code,
this.length + "",
this.width + "",
this.height + "",
this.totalQuantity + "",
this.totalWeight + "",
this.totalVolume + "",
this.totalLP + "",
this.fullRate + ""
};
}
}

View File

@ -0,0 +1,28 @@
package com.dev.swms.client.ui.javabean;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class JB_Location_RC_IV_List extends ArrayList<JB_Location_RC_IV> implements IsSerializable {
public JB_Location_RC_IV_List(){
super();
}
public Object[] toArray() {
Object[] objs = new Object[this.size() + 1];
int i = 0;
for(JB_Location_RC_IV riv : this) {
if(i == 0) {
objs[0] = riv.getRow() + "层";
}
objs[++i] = riv.getRate();
}
return objs;
}
}

View File

@ -0,0 +1,84 @@
package com.dev.swms.client.ui.javabean;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class JB_Zone_IV implements IsSerializable {
private Long loc_id;
private String loc_name;
private String loc_code;
private Double loc_rate;
private Integer loc_xPos;
private Integer loc_yPos;
public JB_Zone_IV(){}
public JB_Zone_IV(Object id , Object code, Object name , Object rate ,Object x , Object y){
this.loc_id = (Long)id;
this.loc_code = (String)code;
this.loc_name = (String)name;
this.loc_rate = rate == null ? 0D: (Double)rate;
this.loc_xPos = (Integer)x;
this.loc_yPos = (Integer)y;
}
public String getLoc_code() {
return loc_code;
}
public void setLoc_code(String loc_code) {
this.loc_code = loc_code;
}
public Long getLoc_id() {
return loc_id;
}
public void setLoc_id(Long loc_id) {
this.loc_id = loc_id;
}
public String getLoc_name() {
return loc_name;
}
public void setLoc_name(String loc_name) {
this.loc_name = loc_name;
}
public Double getLoc_rate() {
return loc_rate;
}
public void setLoc_rate(Double loc_rate) {
this.loc_rate = loc_rate;
}
public Integer getLoc_xPos() {
return loc_xPos;
}
public void setLoc_xPos(Integer loc_xPos) {
this.loc_xPos = loc_xPos;
}
public Integer getLoc_yPos() {
return loc_yPos;
}
public void setLoc_yPos(Integer loc_yPos) {
this.loc_yPos = loc_yPos;
}
public int[] toXY() {
return new int[]{this.loc_xPos , this.loc_yPos};
}
public String[] toStrArray() {
return new String[]{this.loc_code , this.loc_name , this.loc_xPos + "" , this.loc_yPos + ""};
}
}

View File

@ -0,0 +1,136 @@
package com.dev.swms.client.ui.javabean;
import java.util.Date;
import com.google.gwt.user.client.rpc.IsSerializable;
public class PT_ALLOCATED implements IsSerializable {
//任务号
private Long taskId;
//库存代号
private String locationCode;
//货品代号
private String itemCode;
//货品名称
private String itemName;
//包装单位
private String packageUnit;
//计划移位数量
private double planQuantity;
//计划移位数量MU
private double planQuantityMU;
//取消分配数量
private Integer manualQuantity;
//批次属性
private String lotInfor;
//存货日期
private Date inventoryStorageDate;
private String inventorySOI;
public PT_ALLOCATED(){
}
public PT_ALLOCATED(Object taskId,Object locationCode,Object itemCode,Object itemName,
Object packageUnit,Object planQuantity,Object planQuantityMU,Object manualQuantity,
Object lotInfor,Object inventoryStorageDate,Object inventorySOI){
this.taskId = (Long)taskId;
this.locationCode = (String)locationCode;
this.itemCode = (String)itemCode;
this.itemName = itemName == null?"" : (String)itemName;
this.packageUnit = (String)packageUnit;
this.planQuantity = planQuantity == null ? 0D : (Double)planQuantity;
this.planQuantityMU = planQuantityMU == null ? 0D : (Double)planQuantityMU;
this.manualQuantity = 0;
this.lotInfor = lotInfor == null?" " : lotInfor.toString();
this.inventoryStorageDate = (Date)inventoryStorageDate;
this.inventorySOI = inventorySOI == null?"" : (String)inventorySOI;
}
public Long getTaskId() {
return taskId;
}
public void setTaskId(Long taskId) {
this.taskId = taskId;
}
public String getLocationCode() {
return locationCode;
}
public void setLocationCode(String locationCode) {
this.locationCode = locationCode;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getPackageUnit() {
return packageUnit;
}
public void setPackageUnit(String packageUnit) {
this.packageUnit = packageUnit;
}
public double getPlanQuantity() {
return planQuantity;
}
public void setPlanQuantity(double planQuantity) {
this.planQuantity = planQuantity;
}
public double getPlanQuantityMU() {
return planQuantityMU;
}
public void setPlanQuantityMU(double planQuantityMU) {
this.planQuantityMU = planQuantityMU;
}
public double getManualQuantity() {
return manualQuantity;
}
public void setManualQuantity(Integer manualQuantity) {
this.manualQuantity = manualQuantity;
}
public String getLotInfor() {
return lotInfor;
}
public void setLotInfor(String lotInfor) {
this.lotInfor = lotInfor;
}
public Date getInventoryStorageDate() {
return inventoryStorageDate;
}
public void setInventoryStorageDate(Date inventoryStorageDate) {
this.inventoryStorageDate = inventoryStorageDate;
}
public String getInventorySOI() {
return inventorySOI;
}
public void setInventorySOI(String inventorySOI) {
this.inventorySOI = inventorySOI;
}
}

View File

@ -0,0 +1,133 @@
package com.dev.swms.client.ui.javabean;
import java.util.Date;
import com.google.gwt.user.client.rpc.IsSerializable;
public class PT_AVAILABLE implements IsSerializable {
//库位号
private Long inventoryId;
//库位代号
private String locationCode;
//货品代号
private String itemCode;
//货品名称
private String itemName;
//包装单位
private String packageUnit;
//折算系数
private Integer packageUnitConvertFigure;
//库存数量
private double inventoryQuantity;
//可用数量
private double inventoryAvailableQuantity;
//手工分配数量
private double inventoryManualQuantity;
//批次号
private String itemKeyLot;
//批次属性
private String lotInfor;
//存货日期
private Date inventoryStorageDate;
//SOI
private String inventorySOI;
public PT_AVAILABLE(){
}
public PT_AVAILABLE(Object inventoryId,Object locationCode,Object itemCode,Object itemName,
Object packageUnit,Object packageUnitConvertFigure,Object inventoryQuantity,Object inventoryAvailableQuantity,
Object inventoryManualQuantity,Object itemKeyLot,Object lotInfor,Object inventoryStorageDate,Object inventorySOI){
this.inventoryId = (Long)inventoryId;
this.locationCode = (String)locationCode;
this.itemCode = (String)itemCode;
this.itemName = itemName == null?"" : (String)itemName;
this.packageUnit = (String)packageUnit;
this.packageUnitConvertFigure = packageUnitConvertFigure == null ? 0 : (Integer)packageUnitConvertFigure;
this.inventoryQuantity = inventoryQuantity == null ? 0D : (Double)inventoryQuantity;
this.inventoryAvailableQuantity = (Double)inventoryAvailableQuantity;
this.inventoryManualQuantity = 0D;
this.itemKeyLot = itemKeyLot == null?"" : (String)itemKeyLot;
this.lotInfor = lotInfor == null?"" : lotInfor.toString();
this.inventoryStorageDate = (Date)inventoryStorageDate;
this.inventorySOI = inventorySOI == null?"" : (String)inventorySOI;
}
public Long getInventoryId() {
return inventoryId;
}
public void setInventoryId(Long inventoryId) {
this.inventoryId = inventoryId;
}
public String getLocationCode() {
return locationCode;
}
public void setLocationCode(String locationCode) {
this.locationCode = locationCode;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getPackageUnit() {
return packageUnit;
}
public void setPackageUnit(String packageUnit) {
this.packageUnit = packageUnit;
}
public Integer getPackageUnitConvertFigure() {
return packageUnitConvertFigure;
}
public void setPackageUnitConvertFigure(Integer packageUnitConvertFigure) {
this.packageUnitConvertFigure = packageUnitConvertFigure;
}
public double getInventoryQuantity() {
return inventoryQuantity;
}
public void setInventoryQuantity(double inventoryQuantity) {
this.inventoryQuantity = inventoryQuantity;
}
public double getInventoryAvailableQuantity() {
return inventoryAvailableQuantity;
}
public void setInventoryAvailableQuantity(double inventoryAvailableQuantity) {
this.inventoryAvailableQuantity = inventoryAvailableQuantity;
}
public double getInventoryManualQuantity() {
return inventoryManualQuantity;
}
public void setInventoryManualQuantity(double inventoryManualQuantity) {
this.inventoryManualQuantity = inventoryManualQuantity;
}
public String getItemKeyLot() {
return itemKeyLot;
}
public void setItemKeyLot(String itemKeyLot) {
this.itemKeyLot = itemKeyLot;
}
public String getLotInfor() {
return lotInfor;
}
public void setLotInfor(String lotInfor) {
this.lotInfor = lotInfor;
}
public Date getInventoryStorageDate() {
return inventoryStorageDate;
}
public void setInventoryStorageDate(Date inventoryStorageDate) {
this.inventoryStorageDate = inventoryStorageDate;
}
public String getInventorySOI() {
return inventorySOI;
}
public void setInventorySOI(String inventorySOI) {
this.inventorySOI = inventorySOI;
}
}

View File

@ -0,0 +1,368 @@
package com.dev.swms.client.ui.javabean;
import com.google.gwt.user.client.rpc.IsSerializable;
public class PT_DETAILS implements IsSerializable {
private Long pickTicketDetailId;
private Long itemId;
private Long packageUnitId;
private Integer packageUnitConvertFigure;
private String itemCode;
private String itemName;
private String packageUnit;
private double orderQuantity;
private double orderQtyOfMasterUnit;
private double preAllocatedQuantity;
private double allocatedQuantity;
private double pickedQuantity;
private double shippedQuantity;
private String newLotInfo;
private String propC1;
private String propC2;
private String propC3;
private String propC4;
private String propC5;
private String propC6;
private String propC7;
private String propC8;
private String propC9;
private String propN1;
private String propN2;
private String propN3;
private String propD1;
private String propD2;
private String propD3;
private String propL1;
private String propL2;
private String propL3;
public PT_DETAILS(){
}
public PT_DETAILS(Object pickTicketDetailId,Object itemId,Object packageUnitId,Object packageUnitConvertFigure,
Object itemCode,Object itemName,Object packageUnit,Object orderQuantity,Object orderQtyOfMasterUnit,
Object preAllocatedQuantity,Object allocatedQuantity,Object pickedQuantity,Object shippedQuantity,
Object newLotInfo,Object propC1,Object propC2,Object propC3,Object propC4,Object propC5,Object propC6,
Object propC7,Object propC8,Object propC9,Object propN1,Object propN2,Object propN3,Object propD1,
Object propD2,Object propD3,Object propL1,Object propL2,Object propL3){
this.pickTicketDetailId = (Long)pickTicketDetailId;
this.itemId = (Long)itemId;
this.packageUnitId = (Long)packageUnitId;
this.packageUnitConvertFigure = (Integer)packageUnitConvertFigure;
this.itemCode = (String)itemCode;
this.itemName = (String)itemName;
this.packageUnit = (String)packageUnit;
this.orderQuantity = (Double)orderQuantity;
this.orderQtyOfMasterUnit = (Double)orderQtyOfMasterUnit;
this.preAllocatedQuantity = (Double)preAllocatedQuantity;
this.allocatedQuantity = (Double)allocatedQuantity;
this.pickedQuantity = pickedQuantity == null? 0D : (Double)pickedQuantity;
this.shippedQuantity = shippedQuantity == null? 0D : (Double)shippedQuantity;
//this.newLotInfo = (NewLotInfo)newLotInfo;
this.propC1 = propC1 == null?"" : (String)propC1;
this.propC2 = propC2 == null?"" : (String)propC2;
this.propC3 = propC3 == null?"" : (String)propC3;
this.propC4 = propC4 == null?"" : (String)propC4;
this.propC5 = propC5 == null?"" : (String)propC5;
this.propC6 = propC6 == null?"" : (String)propC6;
this.propC7 = propC7 == null?"" : (String)propC7;
this.propC8 = propC8 == null?"" : (String)propC8;
this.propC9 = propC9 == null?"" : (String)propC9;
this.propN1 = propN1 == null?"" : (String)propN1;
this.propN2 = propN2 == null?"" : (String)propN2;
this.propN3 = propN3 == null?"" : (String)propN3;
this.propD1 = propD1 == null?"" : (String)propD1;
this.propD2 = propD2 == null?"" : (String)propD2;
this.propD3 = propD3 == null?"" : (String)propD3;
this.propL1 = propL1 == null?"" : (String)propL1;
this.propL2 = propL2 == null?"" : (String)propL2;
this.propL3 = propL3 == null?"" : (String)propL3;
this.newLotInfo = this.toLotInfor(this.propC1, this.propC2, this.propC3, this.propC4, this.propC5, this.propC6, this.propC7, this.propC8,
this.propC9, this.propN1, this.propN2, this.propN3, this.propD1, this.propD2, this.propD3, this.propL1, this.propL2, this.propL3);
}
public String toLotInfor(String propC1,String propC2,String propC3,String propC4,String propC5,String propC6,
String propC7,String propC8,String propC9,String propN1,String propN2,String propN3,String propD1,
String propD2,String propD3,String propL1,String propL2,String propL3){
String result = "";
if(propC1 != null && !"".equals(propC1)){
result += "#" + propC1;
}
if(propC2 != null && !"".equals(propC2)){
result += "#" + propC2;
}
if(propC3 != null && !"".equals(propC3)){
result += "#" + propC3;
}
if(propC4 != null && !"".equals(propC4)){
result += "#" + propC4;
}
if(propC5 != null && !"".equals(propC5)){
result += "#" + propC5;
}
if(propC6 != null && !"".equals(propC6)){
result += "#" + propC6;
}
if(propC7 != null && !"".equals(propC7)){
result += "#" + propC7;
}
if(propC8 != null && !"".equals(propC8)){
result += "#" + propC8;
}
if(propC9 != null && !"".equals(propC9)){
result += "#" + propC9;
}
if(propN1 != null && !"".equals(propN1)){
result += "#" + propN1;
}
if(propN2 != null && !"".equals(propN2)){
result += "#" + propN2;
}
if(propN3 != null && !"".equals(propN3)){
result += "#" + propN3;
}
if(propD1 != null && !"".equals(propD1)){
result += "#" + propD1;
}
if(propD2 != null && !"".equals(propD2)){
result += "#" + propD2;
}
if(propD3 != null && !"".equals(propD3)){
result += "#" + propD3;
}
if(propL1 != null && !"".equals(propL1)){
result += "#" + propL1;
}
if(this.propL2 != null && !"".equals(propL2)){
result += "#" + propL2;
}
if(propL3 != null && !"".equals(propL3)){
result += "#" + propL3;
}
if( result != null ){
result = result.replaceFirst("#", "");
}
return result;
}
public Long getPickTicketDetailId() {
return pickTicketDetailId;
}
public void setPickTicketDetailId(Long pickTicketDetailId) {
this.pickTicketDetailId = pickTicketDetailId;
}
public Long getItemId() {
return itemId;
}
public void setItemId(Long itemId) {
this.itemId = itemId;
}
public Long getPackageUnitId() {
return packageUnitId;
}
public void setPackageUnitId(Long packageUnitId) {
this.packageUnitId = packageUnitId;
}
public Integer getPackageUnitConvertFigure() {
return packageUnitConvertFigure;
}
public void setPackageUnitConvertFigure(Integer packageUnitConvertFigure) {
this.packageUnitConvertFigure = packageUnitConvertFigure;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getPackageUnit() {
return packageUnit;
}
public void setPackageUnit(String packageUnit) {
this.packageUnit = packageUnit;
}
public double getOrderQuantity() {
return orderQuantity;
}
public void setOrderQuantity(double orderQuantity) {
this.orderQuantity = orderQuantity;
}
public double getPreAllocatedQuantity() {
return preAllocatedQuantity;
}
public void setPreAllocatedQuantity(double preAllocatedQuantity) {
this.preAllocatedQuantity = preAllocatedQuantity;
}
public double getAllocatedQuantity() {
return allocatedQuantity;
}
public void setAllocatedQuantity(double allocatedQuantity) {
this.allocatedQuantity = allocatedQuantity;
}
public double getPickedQuantity() {
return pickedQuantity;
}
public void setPickedQuantity(double pickedQuantity) {
this.pickedQuantity = pickedQuantity;
}
public double getShippedQuantity() {
return shippedQuantity;
}
public void setShippedQuantity(double shippedQuantity) {
this.shippedQuantity = shippedQuantity;
}
public String getLotInfor() {
return newLotInfo;
}
public void setLotInfor(String newLotInfo) {
this.newLotInfo = newLotInfo;
}
public String getPropC1() {
return propC1;
}
public void setPropC1(String propC1) {
this.propC1 = propC1;
}
public String getPropC2() {
return propC2;
}
public void setPropC2(String propC2) {
this.propC2 = propC2;
}
public String getPropC3() {
return propC3;
}
public void setPropC3(String propC3) {
this.propC3 = propC3;
}
public String getPropC4() {
return propC4;
}
public void setPropC4(String propC4) {
this.propC4 = propC4;
}
public String getPropC5() {
return propC5;
}
public void setPropC5(String propC5) {
this.propC5 = propC5;
}
public String getPropC6() {
return propC6;
}
public void setPropC6(String propC6) {
this.propC6 = propC6;
}
public String getPropC7() {
return propC7;
}
public void setPropC7(String propC7) {
this.propC7 = propC7;
}
public String getPropC8() {
return propC8;
}
public void setPropC8(String propC8) {
this.propC8 = propC8;
}
public String getPropC9() {
return propC9;
}
public void setPropC9(String propC9) {
this.propC9 = propC9;
}
public String getPropN1() {
return propN1;
}
public void setPropN1(String propN1) {
this.propN1 = propN1;
}
public String getPropN2() {
return propN2;
}
public void setPropN2(String propN2) {
this.propN2 = propN2;
}
public String getPropN3() {
return propN3;
}
public void setPropN3(String propN3) {
this.propN3 = propN3;
}
public String getPropD1() {
return propD1;
}
public void setPropD1(String propD1) {
this.propD1 = propD1;
}
public String getPropD2() {
return propD2;
}
public void setPropD2(String propD2) {
this.propD2 = propD2;
}
public String getPropD3() {
return propD3;
}
public void setPropD3(String propD3) {
this.propD3 = propD3;
}
public String getPropL1() {
return propL1;
}
public void setPropL1(String propL1) {
this.propL1 = propL1;
}
public String getPropL2() {
return propL2;
}
public void setPropL2(String propL2) {
this.propL2 = propL2;
}
public String getPropL3() {
return propL3;
}
public void setPropL3(String propL3) {
this.propL3 = propL3;
}
public double getOrderQtyOfMasterUnit() {
return orderQtyOfMasterUnit;
}
public void setOrderQtyOfMasterUnit(double orderQtyOfMasterUnit) {
this.orderQtyOfMasterUnit = orderQtyOfMasterUnit;
}
public Object[] toArray(){
return new Object[]{this.pickTicketDetailId,this.itemId,this.packageUnitId,this.packageUnitConvertFigure,
this.itemCode,this.itemName,this.packageUnit,this.orderQuantity,this.orderQtyOfMasterUnit,
this.preAllocatedQuantity,this.allocatedQuantity,this.pickedQuantity,this.shippedQuantity,
this.newLotInfo,this.propC1,this.propC2,this.propC3,this.propC4,this.propC5,this.propC6,
this.propC7,this.propC8,this.propC9,this.propN1,this.propN2,this.propN3,this.propD1,
this.propD2,this.propD3,this.propL1,this.propL2,this.propL3
};
}
}

View File

@ -0,0 +1,91 @@
package com.dev.swms.client.ui.javabean;
import com.google.gwt.user.client.rpc.IsSerializable;
public class PT_INFO implements IsSerializable {
private Long id;
/** 发货单号 */
private String code;
/** 订单数量 */
private double orderQuantity;
/** 预分配数量 */
private double preAllocatedQuantity;
/** 已分配数量 */
private double allocatedQuantity;
/** 拣货数量 */
private double pickedQuantity;
public PT_INFO(){
}
public PT_INFO(Long id,Object code,Object orderQuantity,Object preAllocatedQuantity,Object allocatedQuantity,Object pickedQuantity){
this.id = (Long)id;
this.code = (String)code;
this.orderQuantity = (Double)orderQuantity;
this.preAllocatedQuantity = (Double)preAllocatedQuantity;
this.allocatedQuantity = (Double)allocatedQuantity;
this.pickedQuantity = (Double)pickedQuantity;
}
public PT_INFO(Object code,Object orderQuantity,Object preAllocatedQuantity,Object allocatedQuantity,Object pickedQuantity){
this(null,code,orderQuantity,preAllocatedQuantity,allocatedQuantity,pickedQuantity);
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public double getOrderQuantity() {
return orderQuantity;
}
public void setOrderQuantity(double orderQuantity) {
this.orderQuantity = orderQuantity;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public double getPreAllocatedQuantity() {
return preAllocatedQuantity;
}
public void setPreAllocatedQuantity(double preAllocatedQuantity) {
this.preAllocatedQuantity = preAllocatedQuantity;
}
public double getAllocatedQuantity() {
return allocatedQuantity;
}
public void setAllocatedQuantity(double allocatedQuantity) {
this.allocatedQuantity = allocatedQuantity;
}
public double getPickedQuantity() {
return pickedQuantity;
}
public void setPickedQuantity(double pickedQuantity) {
this.pickedQuantity = pickedQuantity;
}
}

View File

@ -0,0 +1,325 @@
package com.dev.swms.client.ui.page;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.Position;
import com.gwtext.client.data.Node;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.layout.FitLayout;
import com.gwtext.client.widgets.tree.TreeNode;
import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
import com.dev.energy.client.rpc.DefineRPCAdapter;
import com.dev.energy.client.utils.StringUtils;
/**
*
* @author dev
* @description 西
*
*/
public class AbstractWestPanel extends Panel {
protected BrowseRulePage mainPage;
protected WestTreePanel treePanel;
protected TabPanel tabPanel;
protected Node currentNode;
protected boolean isExpand = false;
private String managerName;
/**
* Tab
*/
protected String westTitle = "";
public AbstractWestPanel(String title,BrowsPutRackRulePage browsPutRackRulePage,String managerName){
this.westTitle = title;
this.mainPage = browsPutRackRulePage;
this.managerName = managerName;
init();
draw();
}
public AbstractWestPanel(String title,BrowsPickItemRulePage browsPickItemRulePage,String managerName){
this.westTitle = title;
this.mainPage = browsPickItemRulePage;
this.managerName = managerName;
init();
draw();
}
protected void init() {
setTitle(westTitle);
setLayout(new FitLayout());
setWidth(210);
setCollapsible(false);
setHideCollapseTool(true);
tabPanel = new TabPanel();
tabPanel.setActiveTab(0);
tabPanel.setDeferredRender(true);
tabPanel.setTabPosition(Position.TOP);
treePanel = new WestTreePanel("");
}
protected void draw() {
// tabPanel.add(treePanel);
add(treePanel);
rpcInitTree(null);
}
/**
* ,,
* @param params
*/
protected void rpcInitTree(Map params){
DefineRPCAdapter rcp = new DefineRPCAdapter() {
public void successProcessor(Map map) {
List items = (List) map.get("result");
appendChildRoot(treePanel.getRoot(),items,"rule_node_root.gif");
}
};
rcp.ajaxRpcCallBackExec(this.managerName,
"getPutRackRuleByWareHouseId",
params);
}
/**
*
* @param rootNode
* @param items
* @param icon
*/
protected void appendChildRoot(Node rootNode,List items,final String icon){
//如果当前规则列表为空,则构造一个临时对象用于打开右边规则显示面板,方便用户新增操作
if(items.size() <= 0) {
TreeNode node = new TreeNode();
node.setUserObject(new CustomEntity());
addNodeClickListener(node);
onNodeClick(node,null);
return;
}
for(Iterator it = items.iterator();it.hasNext();){
CustomEntity entity = (CustomEntity)it.next();
TreeNode node = createTreeNode(entity,icon);
rootNode.appendChild(node);
if(((CustomEntity)node.getUserObject()).getType()!=2){
node.appendChild(createDefaultTreeNode());
//构造一个临时对象用于打开右边规则显示面板,方便用户新增操作
TreeNode temp = new TreeNode();
temp.setUserObject(new CustomEntity());
onNodeClick(temp,null);
}
}
}
/**
*
* @param root
*/
protected void clearRoot(Node root){
Node[] node = root.getChildNodes();
for (int i = 0; i < node.length; i++) {
root.removeChild(node[i]);
}
}
protected void addNodeClickListener(TreeNode node) {
node.addListener(new TreeNodeListenerAdapter() {
public void onExpand(Node node) {
onNodeExpand(node);
}
public void onClick(Node node, EventObject e) {
onNodeClick(node,e);
}
public void onCollapse(Node node) {
collapseNode(node);
clearRoot(node);
node.appendChild(createDefaultTreeNode());
}
});
}
/**
*
* @param node
* @param e
*/
protected void onNodeClick(final Node node, final EventObject e){
currentNode = node;
final Object userObject = node.getUserObject();
mainPage.displayRule((CustomEntity)userObject);
}
/**
*
* @param node
*/
protected void onNodeExpand(Node node){
currentNode = node;
if(refreshParent){
refreshParent = false;
return;
}
if(!((TreeNode)node).isExpandable())
refreshCurrentNode(node,false);
else
node.removeChild(node.getFirstChild());
}
/**
*
*
*/
public void refreshCurrentNode(){
refreshCurrentNode(currentNode,true);
}
boolean refreshParent = false;
/**
*
*
*/
public void refreshParentNode(){
Node node = currentNode.getParentNode();
if(node.getUserObject() == null){
node = currentNode;
}
currentNode = node;
((TreeNode)currentNode).setExpandable(true);
clearRoot(currentNode);
currentNode.appendChild(createDefaultTreeNode());
refreshParent = true;
refreshCurrentNode(currentNode,true);
}
public void refreshCurrentNode(Node refreshNode){
currentNode = refreshNode;
refreshCurrentNode(currentNode,true);
}
/**
* ,
* @return
*/
protected Node createDefaultTreeNode(){
TreeNode defaltNode = new TreeNode("查找");
defaltNode.setId("searching");
defaltNode.setIcon("images/silk/treeLoading.gif");
defaltNode.setDisabled(true);
return defaltNode;
}
protected Node createNoFindChildNode(String text){
TreeNode defaltNode = new TreeNode(text);
defaltNode.setDisabled(true);
return defaltNode;
}
/**
*
* @param userObject
* @param icon
* @return
*/
protected TreeNode createTreeNode(final CustomEntity userObject,final String icon){
TreeNode node = new TreeNode();
node.setId(userObject.getId() + userObject.getName() + userObject.getRandomNum());
node.setText(userObject.getName());
node.setUserObject(userObject);
if(!StringUtils.isEmpty(icon))
node.setIcon("images/" + icon);
addNodeClickListener(node);
return node;
}
protected void setNodeText(Node node,String text){
((TreeNode)node).setText(text);
}
/**
* ,
* @param node
*/
protected void expandNode(Node node){
((TreeNode)node).setExpandable(true);
((TreeNode)node).expand();
}
/**
*
* @param node
*/
protected void collapseNode(Node node){
((TreeNode)node).setExpandable(false);
((TreeNode)node).collapse();
}
public Node getCurrentNode() {
return currentNode;
}
public void setCurrentNode(Node currentNode) {
this.currentNode = currentNode;
}
/**
* ,,
* @param node
* @param map
*/
private void expandCompanyNode(final Node node,Map map){
clearRoot(node);
expandNode(node);
appendChildRoot(node,(List)map.get("billTypes"),"rule_node_child.gif");
}
/**
* ,
* @param node
* @param params
* @param showMsg
*/
private void rpcCompanyNode(final Node node,Map params,final boolean showMsg){
DefineRPCAdapter rcp = new DefineRPCAdapter() {
public void successProcessor(Map map) {
expandCompanyNode(node,map);
}
};
rcp.rpcCallBackExec(this.managerName,
"getBillTypeByCompanyId",
params,showMsg);
}
/**
*
* @param node
* @param showMsg
*/
protected void refreshCurrentNode(final Node node,final boolean showMsg){
final Object userObject = node.getUserObject();
Map params = new HashMap();
params.put("id", ((CustomEntity)userObject).getId());
if(((CustomEntity)userObject).getType()==1){//如果点击的节点是客户
rpcCompanyNode(node,params,showMsg);
}
}
}

View File

@ -0,0 +1,174 @@
package com.dev.swms.client.ui.page;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.gwtext.client.core.Margins;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
import com.dev.energy.client.rpc.DefineRPCAdapter;
import com.dev.energy.client.utils.StringUtils;
public class BrowsPickItemRulePage extends BrowseRulePage {
protected transient TabPanel centerPanel;
protected transient Panel container;
protected transient Panel introPanel;
protected transient Panel westPanel;
protected transient AbstractWestPanel aw;
protected CustomEntity mainNodeObj;
public void draw(VerticalPanel content) {
initContainer();
content.add(container);
}
public BrowsPickItemRulePage(){
params = new HashMap();
}
protected void initContainer(){
this.pageConfig.setTitle("拣货策略管理");
container = new Panel();
container.setWidth(Window.getClientWidth() - 30);
container.setHeight(Window.getClientHeight() - 130);
container.setLayout(new BorderLayout());
centerPanel = new TabPanel();
centerPanel.setBodyBorder(false);
centerPanel.setEnableTabScroll(true);
centerPanel.setAutoDestroy(false);
centerPanel.setActiveTab(0);
Panel centerPanelWrappper = new Panel();
centerPanelWrappper.setLayout(new FitLayout());
centerPanelWrappper.setBorder(false);
centerPanelWrappper.setBodyBorder(false);
westPanel = getWestPanel();
westPanel.setAutoDestroy(true);
westPanel.setBorder(true);
westPanel.setBodyBorder(true);
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
BorderLayoutData westLayoutData = new BorderLayoutData(RegionPosition.WEST);
westLayoutData.setMargins(new Margins(1, 1, 1, 1));
westLayoutData.setCMargins(new Margins(1, 1, 1, 1));
westLayoutData.setMinSize(155);
westLayoutData.setMaxSize(350);
westLayoutData.setSplit(true);
introPanel = new Panel("策略详情");
introPanel.setPaddings(10);
introPanel.setLayout(new FitLayout());
introPanel.setAutoShow(false);
introPanel.setAutoScroll(true);
centerPanel.add(introPanel, centerLayoutData);
centerPanelWrappper.add(centerPanel);
container.add(westPanel,westLayoutData);
container.add(centerPanelWrappper, centerLayoutData);
}
public Panel getWestPanel() {
aw =new AbstractWestPanel("",this,"pickItemRuleManager");
return aw;
}
public void addConterPanel(Component component){
centerPanel.clear();
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
centerPanel.add(component,centerLayoutData);
centerPanel.setActiveTab(0);
}
public void resetConterPanel(){
addConterPanel(introPanel);
}
public void displayRule(CustomEntity nodeObj){
mainNodeObj = nodeObj;
rpcGetTreeByUserObj(nodeObj);
}
/**
* ,
* @param params
*/
protected void rpcGetTreeByUserObj(CustomEntity nodeObj){
Map params = new HashMap();
params.put("nodeObj",nodeObj);
DefineRPCAdapter rcp = new DefineRPCAdapter() {
public void successProcessor(Map map) {
List rules = (List)map.get("result");
disRules(rules);
}
};
rcp.ajaxRpcCallBackExec("pickItemRuleManager",
"getPutRackRules",params);
}
private void disRules(List rules){
addConterPanel(new ListRuleGridPanel(rules,"pick",this,mainNodeObj));
}
/** 
*
* @return
*/
private String getNoticePanel(DisplayEntity displayEntity) {
String html = "";
html += "<TR style=\" line-height:30px;font-weight:normal; color:#666666;\" >"+
"<TD style=\" border-bottom:1px solid #a0c8e0;vertical-align:middle;\" >"+displayEntity.getLeftDis()+
"&nbsp;&nbsp;&nbsp;<img src=\"images/silk/user_female.gif\" />&nbsp;&nbsp;&nbsp;";
if(!StringUtils.isEmpty(displayEntity.getDefaultLocation())){
html += "<img src=\"images/silk/flag_green.gif\" />&nbsp;&nbsp;"+displayEntity.getDefaultLocation()+"("+displayEntity.getMothed()+")";
}
if(!StringUtils.isEmpty(displayEntity.getPosition())){
html += "<img src=\"images/silk/flag_red.gif\" />&nbsp;&nbsp;"+displayEntity.getPosition()+"("+displayEntity.getMothed()+")";
}
html +="</TD></TR>";
return html;
}
public void reload() {
//刷新父节点,显示新加节点
aw.clearRoot(aw.treePanel.getRoot());
aw.rpcInitTree(null);
//刷新右边规则面板
displayRule(mainNodeObj);
}
public void release() {
// TODO Auto-generated method stub
}
}

View File

@ -0,0 +1,166 @@
package com.dev.swms.client.ui.page;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.gwtext.client.core.Margins;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
import com.dev.energy.client.rpc.DefineRPCAdapter;
import com.dev.energy.client.utils.StringUtils;
public class BrowsPutRackRulePage extends BrowseRulePage{
protected transient TabPanel centerPanel;
protected transient Panel container;
protected transient Panel introPanel;
protected CustomEntity mainNodeObj;
protected transient AbstractWestPanel aw;
public void draw(VerticalPanel content) {
initContainer();
content.add(container);
}
public BrowsPutRackRulePage(){
params = new HashMap();
}
protected void initContainer(){
this.pageConfig.setTitle("上架策略管理");
container = new Panel();
container.setWidth(Window.getClientWidth() - 30);
container.setHeight(Window.getClientHeight() - 130);
container.setLayout(new BorderLayout());
centerPanel = new TabPanel();
centerPanel.setBodyBorder(false);
centerPanel.setEnableTabScroll(true);
centerPanel.setAutoDestroy(false);
centerPanel.setActiveTab(0);
Panel centerPanelWrappper = new Panel();
centerPanelWrappper.setLayout(new FitLayout());
centerPanelWrappper.setBorder(false);
centerPanelWrappper.setBodyBorder(false);
Panel westPanel = getWestPanel();
westPanel.setAutoDestroy(true);
westPanel.setBorder(true);
westPanel.setBodyBorder(true);
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
BorderLayoutData westLayoutData = new BorderLayoutData(RegionPosition.WEST);
westLayoutData.setMargins(new Margins(1, 1, 1, 1));
westLayoutData.setCMargins(new Margins(1, 1, 1, 1));
westLayoutData.setMinSize(155);
westLayoutData.setMaxSize(350);
westLayoutData.setSplit(true);
introPanel = new Panel("策略详情");
introPanel.setPaddings(10);
introPanel.setLayout(new FitLayout());
introPanel.setAutoShow(true);
introPanel.setAutoScroll(true);
centerPanel.add(introPanel, centerLayoutData);
centerPanelWrappper.add(centerPanel);
container.add(westPanel,westLayoutData);
container.add(centerPanelWrappper, centerLayoutData);
}
public Panel getWestPanel() {
aw =new AbstractWestPanel("",this,"putRackRuleManager");
return aw;
}
public void addConterPanel(Component component){
centerPanel.clear();
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
centerPanel.add(component,centerLayoutData);
centerPanel.setActiveTab(0);
}
public void resetConterPanel(){
addConterPanel(introPanel);
}
public void displayRule(CustomEntity nodeObj){
mainNodeObj = nodeObj;
rpcGetTreeByUserObj(nodeObj);
}
/**
* ,
* @param params
*/
protected void rpcGetTreeByUserObj(CustomEntity nodeObj){
Map params = new HashMap();
params.put("nodeObj",nodeObj);
DefineRPCAdapter rcp = new DefineRPCAdapter() {
public void successProcessor(Map map) {
List rules = (List)map.get("result");
disRules(rules);
}
};
rcp.ajaxRpcCallBackExec("putRackRuleManager",
"getPutRackRules",params);
}
private void disRules(List rules){
addConterPanel(new ListRuleGridPanel(rules,"put",this,mainNodeObj));
}
/** 
*
* @return
*/
private String getNoticePanel(DisplayEntity displayEntity) {
String html = "";
html += "<TR style=\" line-height:30px;font-weight:normal; color:#666666;\">"+
"<TD style=\" border-bottom:1px solid #a0c8e0;vertical-align:middle;\">"+displayEntity.getLeftDis()+
"&nbsp;&nbsp;&nbsp;<img src=\"images/rule_arrow.gif\" />&nbsp;&nbsp;&nbsp;";
if(!StringUtils.isEmpty(displayEntity.getDefaultLocation())){
html += "<img src=\"images/rule_location.gif\" />&nbsp;&nbsp;"+displayEntity.getDefaultLocation()+"("+displayEntity.getMothed()+")";
}
if(!StringUtils.isEmpty(displayEntity.getPosition())){
html += "<img src=\"images/rule_position.gif\" />&nbsp;&nbsp;"+displayEntity.getPosition()+"("+displayEntity.getMothed()+")";
}
html +="</TD></TR>";
return html;
}
public void reload() {
//刷新父节点,显示新加节点
aw.clearRoot(aw.treePanel.getRoot());
aw.rpcInitTree(null);
//刷新右边规则面板
displayRule(mainNodeObj);
}
public void release() {
}
}

View File

@ -0,0 +1,9 @@
package com.dev.swms.client.ui.page;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.dev.energy.client.template.BaseCustomMaintainTemplate;
public abstract class BrowseRulePage extends BaseCustomMaintainTemplate
implements IsSerializable {
public abstract void displayRule(CustomEntity nodeObj);
}

View File

@ -0,0 +1,80 @@
package com.dev.swms.client.ui.page;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
*
* @author dev
* @description
*
*/
public class CustomEntity implements IsSerializable {
protected Long id;
protected Long companyId;
protected Long billTypeId;
protected String name;
/**
* :1:,2:
*/
protected int type=0;
protected double randomNum = .0;//取一个随机数,避免不同节点上的userObject相同
public double getRandomNum() {
return randomNum;
}
public void setRandomNum(double randomNum) {
this.randomNum = randomNum;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Long getBillTypeId() {
return billTypeId;
}
public void setBillTypeId(Long billTypeId) {
this.billTypeId = billTypeId;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
}

View File

@ -0,0 +1,56 @@
package com.dev.swms.client.ui.page;
import com.google.gwt.user.client.rpc.IsSerializable;
public class DisplayEntity implements IsSerializable{
protected Long id;
protected String leftDis;
protected String position;
protected String defaultLocation;
protected String mothed;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDefaultLocation() {
return defaultLocation;
}
public void setDefaultLocation(String defaultLocation) {
this.defaultLocation = defaultLocation;
}
public String getLeftDis() {
return leftDis;
}
public void setLeftDis(String leftDis) {
this.leftDis = leftDis;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getMothed() {
return mothed;
}
public void setMothed(String mothed) {
this.mothed = mothed;
}
}

View File

@ -0,0 +1,261 @@
package com.dev.swms.client.ui.page;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gwt.user.client.ui.HTML;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.data.ArrayReader;
import com.gwtext.client.data.FieldDef;
import com.gwtext.client.data.MemoryProxy;
import com.gwtext.client.data.Record;
import com.gwtext.client.data.RecordDef;
import com.gwtext.client.data.Store;
import com.gwtext.client.data.StringFieldDef;
import com.gwtext.client.widgets.grid.ColumnConfig;
import com.gwtext.client.widgets.grid.ColumnModel;
import com.gwtext.client.widgets.grid.GridPanel;
import com.gwtext.client.widgets.grid.event.GridListenerAdapter;
import com.gwtext.client.widgets.menu.BaseItem;
import com.gwtext.client.widgets.menu.Item;
import com.gwtext.client.widgets.menu.Menu;
import com.gwtext.client.widgets.menu.event.BaseItemListenerAdapter;
import com.dev.energy.client.ApplicationWindow;
import com.dev.energy.client.config.page.PageConfig;
import com.dev.energy.client.rpc.CatchPageConfigAsync;
import com.dev.energy.client.rpc.DefineRPCAdapter;
import com.dev.energy.client.ui.page.IPage;
import com.dev.energy.client.ui.page.IPopupPage;
import com.dev.energy.client.utils.StringUtils;
public class ListRuleGridPanel extends GridPanel {
protected Menu ruleMenu ;
protected BrowseRulePage parentPage;
protected CustomEntity mainNodeObj;
public ListRuleGridPanel(){
addGridRowListener();
}
public ListRuleGridPanel(List rules, String pageType, BrowseRulePage rulePage, CustomEntity nodeObj){
parentPage = rulePage;
mainNodeObj = nodeObj;
init(rules,pageType);
ruleMenu = getMenu(pageType);
addGridRowListener();
}
private void init(List rules, String pageType){
RecordDef recordDef = new RecordDef(
new FieldDef[]{new StringFieldDef("id"),
new StringFieldDef("rule")
}
);
Object[][] data = getRuleData(rules,pageType);
MemoryProxy proxy = new MemoryProxy(data);
ArrayReader reader = new ArrayReader(recordDef);
Store store = new Store(proxy, reader);
store.load();
this.setStore(store);
ColumnConfig[] columns = new ColumnConfig[]{
new ColumnConfig("id", "id", 0, true, null, "id"),
new ColumnConfig("策略详情", "rule", 750, true, null, "rule")
};
columns[0].setHidden(true);
ColumnModel columnModel = new ColumnModel(columns);
this.setColumnModel(columnModel);
this.setFrame(true);
this.setStripeRows(true);
this.setHeight(350);
this.setWidth(750);
this.setTitle("策略详情");
}
private void addGridRowListener() {
this.addGridListener(new GridListenerAdapter() {
public void onContextMenu(EventObject e) {
e.stopEvent();
int count = ListRuleGridPanel.this.getSelectionModel().getCount();
if(count==0){
ruleMenu.getItems()[0].setDisabled(false);
ruleMenu.getItems()[1].setDisabled(true);
ruleMenu.getItems()[2].setDisabled(true);
}else{
if(count==1){
ruleMenu.getItems()[0].setDisabled(false);
ruleMenu.getItems()[1].setDisabled(false);
ruleMenu.getItems()[2].setDisabled(false);
}else{
ruleMenu.getItems()[0].setDisabled(false);
ruleMenu.getItems()[1].setDisabled(true);
ruleMenu.getItems()[2].setDisabled(false);
}
}
ruleMenu.showAt(e.getXY());
}
});
}
private Object[][] getRuleData(List rules, String pageType) {
int len = rules.size();
Object[][] objs = new Object[len][];
for (int i = 0; i < len; i++) {
DisplayEntity displayEntity = (DisplayEntity)rules.get(i);
String htmlStr=getNoticePanel(displayEntity,pageType);
Object[] obj = new Object[]{displayEntity.getId()+"",new HTML(htmlStr)};
objs[i] = obj;
}
return objs;
}
/** 
*
* @return
*/
private String getNoticePanel(DisplayEntity displayEntity, String pageType) {
String html = "";
html += "<TR>"+
"<TD style=\" border-bottom:1px solid #a0c8e0;vertical-align:middle;\">"+displayEntity.getLeftDis()+
"&nbsp;&nbsp;&nbsp;<img src=\"images/rule_arrow.gif\" />&nbsp;&nbsp;&nbsp;";
if(!StringUtils.isEmpty(displayEntity.getDefaultLocation())){
html += "<img src=\"images/rule_location.gif\" />&nbsp;&nbsp;"+displayEntity.getDefaultLocation()+"-"+displayEntity.getMothed();
}
if(!StringUtils.isEmpty(displayEntity.getPosition())){
html += "<img src=\"images/rule_position.gif\" />&nbsp;&nbsp;"+displayEntity.getPosition()+"("+displayEntity.getMothed()+")";
}
html +="</TD></TR>";
return html;
}
private void createPageForUpdate(final Map params, final String pageId) {
ApplicationWindow.context.getPageConfig(pageId,
new CatchPageConfigAsync() {
public void afterInvotion(PageConfig pageConfig) {
IPopupPage page = pageConfig.createPage(params, parentPage);
page.show();
page.initData();
// parentPage.displayRule(mainNodeObj);
}
});
}
private Menu getMenu(String pageType){
Menu menu = new Menu();
if(pageType.equals("put")){
Item newPutRuleItem = new Item("新增策略",
new BaseItemListenerAdapter() {
public void onClick(BaseItem item, EventObject e) {
final Map params = new HashMap();
createPageForUpdate(params,"editPutRackRulePage");
}
});
Item mdfPutRuleItem = new Item("修改策略",
new BaseItemListenerAdapter() {
public void onClick(BaseItem item, EventObject e) {
final Map params = new HashMap();
Record[] records = ListRuleGridPanel.this.getSelectionModel().getSelections();
params.put("id",new Long(records[0].getAsInteger("id")));
params.put(IPage.IS_EDIT_PAGE,true);
createPageForUpdate(params,"editPutRackRulePage");
}
});
Item delPutRuleItem = new Item("删除策略",
new BaseItemListenerAdapter() {
public void onClick(BaseItem item, EventObject e) {
final Map params = new HashMap();
params.put("pageType","put");
Record[] records = ListRuleGridPanel.this.getSelectionModel().getSelections();
List<Long> ids = new ArrayList<Long>();
for(int i=0;i<records.length;i++){
ids.add(new Long(records[i].getAsInteger("id")));
}
params.put("ids",ids);
asyncDeleteRules(params);
}
});
menu.addItem(newPutRuleItem);
menu.addItem(mdfPutRuleItem);
menu.addItem(delPutRuleItem);
}else{
Item newPickRuleItem = new Item("新增策略",
new BaseItemListenerAdapter() {
public void onClick(BaseItem item, EventObject e) {
final Map params = new HashMap();
createPageForUpdate(params,"editPickItemRulePage");
}
});
Item mdfPickRuleItem = new Item("修改策略",
new BaseItemListenerAdapter() {
public void onClick(BaseItem item, EventObject e) {
final Map params = new HashMap();
Record[] records = ListRuleGridPanel.this.getSelectionModel().getSelections();
params.put("id",new Long(records[0].getAsInteger("id")));
params.put(IPage.IS_EDIT_PAGE,true);
createPageForUpdate(params,"editPickItemRulePage");
}
});
Item delPickRuleItem = new Item("删除策略",
new BaseItemListenerAdapter() {
public void onClick(BaseItem item, EventObject e) {
final Map params = new HashMap();
params.put("pageType","pick");
Record[] records = ListRuleGridPanel.this.getSelectionModel().getSelections();
List<Long> ids = new ArrayList<Long>();
for(int i=0;i<records.length;i++){
ids.add(new Long(records[i].getAsInteger("id")));
}
params.put("ids",ids);
asyncDeleteRules(params);
}
});
menu.addItem(newPickRuleItem);
menu.addItem(mdfPickRuleItem);
menu.addItem(delPickRuleItem);
}
return menu;
}
/**
*
*/
private void asyncDeleteRules(final Map params){
DefineRPCAdapter rcp = new DefineRPCAdapter() {
public void successProcessor(Map map) {
parentPage.displayRule(mainNodeObj);
}
};
String pageType = (String)params.get("pageType");
if(pageType.equals("put")){
rcp.ajaxRpcCallBackExec("putRackRuleManager","deletePutRackRule",
params);
}else{
rcp.ajaxRpcCallBackExec("pickItemRuleManager","deletePickItemRule",
params);
}
}
}

View File

@ -0,0 +1,57 @@
package com.dev.swms.client.ui.page;
import java.util.HashMap;
import java.util.Map;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
import com.dev.energy.client.template.BaseCustomPopupTemplate;
import com.dev.energy.client.ui.page.IPage;
public class ManualAllocateWaveDoc extends BaseCustomPopupTemplate implements
IsSerializable {
public ManualAllocateWaveDoc(){}
/** 绘制主面板--主入口 */
public void draw(VerticalPanel content) {
super.draw(content);
this.initDataAccessor();
this.initDatas();
this.drawMainPanel(content);
}
private void initDatas() {
String flag = "waveDocPage";
Long waveDocId = (Long) params.get(IPage.ENTITY_ID);
final Map<String,Long> param = new HashMap<String,Long>();
param.put("waveDocId", waveDocId);
this.curPADataAccessor().setFlag(flag);
this.curPADataAccessor().initWaveDocInfo(param);
this.curPADataAccessor().initWaveDocDetailsInfo(param);
this.curPADataAccessor().initWaveDocAllocatedInfo(param);
}
/** 绘制主面板 */
protected void drawMainPanel(com.google.gwt.user.client.ui.VerticalPanel content) {
content.add(new Sub_PA_Panel(this));
}
/** 初始化数据存储区 */
protected void initDataAccessor() {
this.data = new Page_PA_DataAccessor(this);
}
protected Page_PA_DataAccessor curPADataAccessor() {
return (Page_PA_DataAccessor)this.data;
}
public String getTitle(){
return "部分分配";
}
public void release() {
}
}

View File

@ -0,0 +1,102 @@
package com.dev.swms.client.ui.page;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.dev.swms.client.ui.constant.CT_PA;
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
import com.dev.energy.client.template.BaseCustomPopupTemplate;
import com.dev.energy.client.ui.page.IPage;
import com.dev.energy.client.utils.LocaleUtils;
public class ManualPickingAllocate extends BaseCustomPopupTemplate implements
IsSerializable {
public ManualPickingAllocate(){}
/** 绘制主面板--主入口 */
public void draw(VerticalPanel content) {
super.draw(content);
this.initDataAccessor();
this.initDatas();
this.drawMainPanel(content);
}
private void initDatas() {
String flag = "pickTicketPage";
Long pickTicketId = (Long) params.get(IPage.ENTITY_ID);
final Map<String,Long> param = new HashMap<String,Long>();
param.put("pickTicketId", pickTicketId);
this.curPADataAccessor().setFlag(flag);
this.curPADataAccessor().initPickTicketInfo(param);
this.curPADataAccessor().initDetailsInfo(param);
this.curPADataAccessor().initAllocatedInfo(param);
}
/** 绘制主面板 */
protected void drawMainPanel(com.google.gwt.user.client.ui.VerticalPanel content) {
content.add(new Sub_PA_Panel(this));
}
/** 初始化数据存储区 */
protected void initDataAccessor() {
this.data = new Page_PA_DataAccessor(this);
}
protected Page_PA_DataAccessor curPADataAccessor() {
return (Page_PA_DataAccessor)this.data;
}
public String getTitle(){
return LocaleUtils.getText("manualPickingAllocatePage");
}
public void release() {
// TODO Auto-generated method stub
}
public List<String> getLocaleMessageKeys() {
List<String> keys = new ArrayList<String>();
keys.add("manualPickingAllocatePage");
keys.add("allocating");
keys.add("cancelAllocate");
keys.add("waveDoc.code");
keys.add("pickTicket.code");
keys.add("pickTicket.orderQuantity");
keys.add("pickTicket.preAllocatedQuantity");
keys.add("pickTicket.allocatedQuantity");
keys.add("pickTicket.pickedQuantity");
keys.add("item.code");
keys.add("item.name");
keys.add("packageUnit.unit");
keys.add("item.code");
keys.add("pickTicketDetail.orderQuantity");
keys.add("pickTicketDetail.orderQtyOfMasterUnit");
keys.add("pickTicketDetail.preAllocatedQuantity");
keys.add("pickTicketDetail.allocatedQuantity");
keys.add("pickTicketDetail.pickedQuantity");
keys.add("pickTicketDetail.shippedQuantity");
keys.add("lotInfor");
keys.add("location.code");
keys.add("packageUnit.convertFigure");
keys.add("inventory.quantity");
keys.add("inventory.availableQuantity");
keys.add("inventory.manualQuantity");
keys.add("itemKey.lot");
keys.add("inventory.storageDate");
keys.add("inventory.SOI");
keys.add("task.packageUnit");
keys.add("task.planQuantity");
keys.add("task.planQuantityMU");
keys.add("pickedRecord.manualQuantity");
keys.add("task.storageDate");
keys.add("task.SOI");
return keys;
}
}

View File

@ -0,0 +1,89 @@
package com.dev.swms.client.ui.page;
import java.util.ArrayList;
import java.util.List;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.gwtext.client.widgets.Panel;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.energy.client.template.BaseCustomMaintainTemplate;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class Page_InventoryVisibility extends BaseCustomMaintainTemplate
implements IsSerializable {
/** 背景主面板--用于仓库地域分布显示 */
protected transient Panel imagePanel;
/** 绘制主面板--主入口 */
public void draw(VerticalPanel content) {
super.draw(content);
this.initDataAccessor();
this.drawMainPanel(content);
// this.initIVDatas();
}
/** 绘制主面板 */
protected void drawMainPanel(VerticalPanel content) {
content.add(new Sub_IV_Panel(this));
}
/** 初始化数据存储区 */
protected void initDataAccessor() {
this.data = new Page_IV_DataAccessor(this);
}
/** 获取当前的数据存储区对象实例 */
protected Page_IV_DataAccessor curIVDataAccessor() {
return (Page_IV_DataAccessor)this.data;
}
/** 初始化库存可视化的数据 */
protected void initIVDatas() {
this.curIVDataAccessor().initIVDatas();
}
public void userFinalize() {
this.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_CLOSE_ALL_COLUMN_CHART);
}
public String getTitle(){
return "库存可视化";
}
public void onPageUnselected() {
this.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_CLOSE_ALL_COLUMN_CHART);
}
public void userChangeTab() {
this.curIVDataAccessor().sendMessage(Page_IV_DataAccessor.MSG_CLOSE_ALL_COLUMN_CHART);
}
public void release() {
}
public List<String> getLocaleMessageKeys() {
List<String> keys = new ArrayList<String>();
keys.add("aisle_1");
keys.add("aisle_2");
keys.add("aisle_3");
keys.add("aisle_4");
keys.add("aisle_5");
keys.add("aisle_6");
keys.add("aisle_7");
keys.add("aisle_8");
keys.add("aisle_9");
keys.add("aisle_10");
keys.add("col_1");
keys.add("col_2");
keys.add("col_3");
keys.add("col_4");
keys.add("col_5");
keys.add("col_6");
keys.add("col_7");
keys.add("col_8");
keys.add("col_9");
keys.add("col_10");
return keys;
}
}

View File

@ -0,0 +1,28 @@
package com.dev.swms.client.ui.page;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.energy.client.message.IMessagePage;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public abstract class Sub_Abstract_Panel extends AbstractSupportPanel {
public Sub_Abstract_Panel(IMessagePage page, String name) {
super(page, name);
}
protected Page_IV_DataAccessor curDataAccessor() {
return (Page_IV_DataAccessor)this.getData();
}
public void doDispath(String message){
if(Page_IV_DataAccessor.MSG_CLOSE_ALL_COLUMN_CHART.equals(message)) {
this.hideCharts();
}
}
public void hideCharts(){}
}

View File

@ -0,0 +1,248 @@
package com.dev.swms.client.ui.page;
import java.util.HashMap;
import java.util.Map;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.Window;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.TextAlign;
import com.gwtext.client.data.ArrayReader;
import com.gwtext.client.data.FieldDef;
import com.gwtext.client.data.IntegerFieldDef;
import com.gwtext.client.data.MemoryProxy;
import com.gwtext.client.data.RecordDef;
import com.gwtext.client.data.Store;
import com.gwtext.client.data.StringFieldDef;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.form.NumberField;
import com.gwtext.client.widgets.grid.ColumnConfig;
import com.gwtext.client.widgets.grid.ColumnModel;
import com.gwtext.client.widgets.grid.EditorGridPanel;
import com.gwtext.client.widgets.grid.GridEditor;
import com.gwtext.client.widgets.grid.GridPanel;
import com.gwtext.client.widgets.grid.RowSelectionModel;
import com.gwtext.client.widgets.grid.event.GridRowListener;
import com.gwtext.client.widgets.layout.RowLayout;
import com.gwtext.client.widgets.layout.RowLayoutData;
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
import com.dev.swms.client.ui.javabean.PT_ALLOCATED;
import com.dev.energy.client.message.IMessagePage;
import com.dev.energy.client.ui.page.IPage;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
import com.dev.energy.client.utils.LocaleUtils;
public class Sub_AllocatedTable_Panel extends AbstractSupportPanel {
protected final static String DEFAULT_NAME = "pickTicketAllocated_Panel";
transient EditorGridPanel allocatedTable;
private RecordDef recordDef;
private ColumnModel columnModel;
private Store store1;
private MemoryProxy proxy1;
private ArrayReader reader;
transient Button cancellAllocateButton;
private String flag;
private static final DateTimeFormat dateFormater = DateTimeFormat.getFormat("yyyy-MM-dd");
public Sub_AllocatedTable_Panel(IMessagePage page) {
super(page, DEFAULT_NAME);
this.drawWidget();
}
private void drawWidget() {
flag = curPADataAccessor().getFlag();
recordDef = new RecordDef(new FieldDef[] {
new IntegerFieldDef("task.id"),
new StringFieldDef("location.code"),
new StringFieldDef("item.code"),
new StringFieldDef("item.name"),
new StringFieldDef("task.packageUnit"),
new IntegerFieldDef("task.planQuantity"),
new IntegerFieldDef("task.planQuantityMU"),
new IntegerFieldDef("pickedRecord.manualQuantity"),
new StringFieldDef("lotInfor"),
new StringFieldDef("task.storageDate"),
new StringFieldDef("task.SOI")
});
ColumnConfig tiColumn = new ColumnConfig(LocaleUtils.getText("task.id"), "task.id");
tiColumn.setHidden(true);
ColumnConfig lcColumn = new ColumnConfig(LocaleUtils.getText("location.code"), "location.code", 150);
lcColumn.setAlign(TextAlign.CENTER);
lcColumn.setSortable(true);
ColumnConfig icColumn = new ColumnConfig(LocaleUtils.getText("item.code"), "item.code", 150);
icColumn.setAlign(TextAlign.CENTER);
icColumn.setSortable(true);
ColumnConfig inColumn = new ColumnConfig(LocaleUtils.getText("item.name"), "item.name", 200);
inColumn.setAlign(TextAlign.CENTER);
ColumnConfig tpColumn = new ColumnConfig(LocaleUtils.getText("task.packageUnit"), "task.packageUnit", 80);
tpColumn.setAlign(TextAlign.CENTER);
ColumnConfig tp1Column = new ColumnConfig(LocaleUtils.getText("task.planQuantity"), "task.planQuantity", 100);
tp1Column.setAlign(TextAlign.CENTER);
ColumnConfig tp2Column = new ColumnConfig(LocaleUtils.getText("task.planQuantityMU"), "task.planQuantityMU", 150);
tp2Column.setAlign(TextAlign.CENTER);
NumberField numberField = new NumberField();
numberField.setAllowBlank(false);
numberField.setAllowNegative(false);
ColumnConfig pmColumn = new ColumnConfig(LocaleUtils.getText("pickedRecord.manualQuantity"), "pickedRecord.manualQuantity", 100);
pmColumn.setAlign(TextAlign.CENTER);
pmColumn.setEditor(new GridEditor(numberField));
ColumnConfig lColumn = new ColumnConfig(LocaleUtils.getText("lotInfor"), "lotInfor", 150);
lColumn.setAlign(TextAlign.CENTER);
ColumnConfig tsColumn = new ColumnConfig(LocaleUtils.getText("task.storageDate"), "task.storageDate", 150);
tsColumn.setAlign(TextAlign.CENTER);
tsColumn.setSortable(true);
ColumnConfig tSColumn = new ColumnConfig(LocaleUtils.getText("task.SOI"),"task.SOI", 100);
tSColumn.setAlign(TextAlign.CENTER);
columnModel = new ColumnModel(new ColumnConfig[]{
tiColumn,lcColumn,icColumn,inColumn,tpColumn,tp1Column,
tp2Column,pmColumn,lColumn,tsColumn,tSColumn
});
proxy1 = new MemoryProxy(new String[][]{});
reader = new ArrayReader(recordDef);
store1 = new Store(proxy1, reader);
store1.load();
allocatedTable = new EditorGridPanel();
allocatedTable.setLayout(new RowLayout());
allocatedTable.setAutoScroll(true);
allocatedTable.setStore(store1);
allocatedTable.setClicksToEdit(1);
allocatedTable.setSelectionModel(new RowSelectionModel(false));
allocatedTable.setColumnModel(columnModel);
ButtonListenerAdapter listener = new ButtonListenerAdapter() {
public void onClick(Button button, EventObject e) {
//取消分配
cancellAllocate();
}
};
cancellAllocateButton = new Button("取消分配",listener);
cancellAllocateButton.setDisabled(true);
allocatedTable.addGridRowListener(new GridRowListener(){
public void onRowClick(GridPanel grid, int rowIndex,
EventObject e) {
cancellAllocateButton.setDisabled(false);
}
public void onRowContextMenu(GridPanel grid, int rowIndex,
EventObject e) {
// TODO Auto-generated method stub
}
public void onRowDblClick(GridPanel grid, int rowIndex,
EventObject e) {
// TODO Auto-generated method stub
}
});
Panel panel = new Panel();
panel.add(cancellAllocateButton);
this.setLayout(new RowLayout());
this.add(allocatedTable,new RowLayoutData("94%"));
this.add(panel,new RowLayoutData("6%"));
}
//取消分配
@SuppressWarnings("unchecked")
private void cancellAllocate() {
final Map param = new HashMap();
if(flag == "pickTicketPage"){
//存放发货单ID以便取消分配后刷新信息
Long pickTicketId = this.curPADataAccessor().currentPickTicket().getId();
param.put("pickTicketId", pickTicketId);
}else if(flag == "waveDocPage"){
//存放波次ID以便取消分配后刷新信息
Long waveDocId = this.curPADataAccessor().currentPickTicket().getId();
param.put("waveDocId", waveDocId);
}
final Map subParam = new HashMap();
for(int i=0; i<allocatedTable.getStore().getCount();i++){
if(allocatedTable.getSelectionModel().isSelected(i)){
Long taskId = Long.valueOf(allocatedTable.getStore().getAt(i).getAsString("task.id"));
Double availableQuantity = Double.valueOf(allocatedTable.getStore().getAt(i).getAsString("task.planQuantityMU"));
Double manualQuantity = Double.valueOf(allocatedTable.getStore().getAt(i).getAsString("pickedRecord.manualQuantity"));
if(manualQuantity.doubleValue() > availableQuantity.doubleValue()){
Window.alert(LocaleUtils.getText("pickedQuantity.not.enough"));
return;
}
subParam.put(taskId, manualQuantity);
}
}
param.put(IPage.TABLE_INPUT_VALUES, subParam);
if(flag == "pickTicketPage"){
//发货单取消分配
this.curPADataAccessor().cancellAllocate(param);
}else if(flag == "waveDocPage"){
//波次取消分配
this.curPADataAccessor().cancellWaveDocAllocate(param);
}
}
public Page_PA_DataAccessor curPADataAccessor() {
return (Page_PA_DataAccessor)super.getData();
}
public void doDispath(String message){
super.doDispath(message);
// System.out.print("还进入这个doDispath()方法了!");
if(Page_PA_DataAccessor.INIT_ALLOCATED_INFO.equals(message) || Page_PA_DataAccessor.INIT_WD_ALLOCATED_INFO.equals(message)){
Object[][] data = new Object[this.curPADataAccessor().all_PTAD().size()][];
for (int i=0;i<this.curPADataAccessor().all_PTAD().size();i++){
data[i] = toArray(this.curPADataAccessor().all_PTAD().get(i));
}
proxy1 = new MemoryProxy(data);
store1.setDataProxy(proxy1);
store1.reload();
allocatedTable.reconfigure(store1, columnModel);
}
}
public Object[] toArray(PT_ALLOCATED allocated){
return new Object[]{allocated.getTaskId() ,
allocated.getLocationCode() ,
allocated.getItemCode() ,
allocated.getItemName() ,
allocated.getPackageUnit() ,
allocated.getPlanQuantity() ,
allocated.getPlanQuantityMU() ,
allocated.getManualQuantity() ,
allocated.getLotInfor() ,
dateFormater.format(allocated.getInventoryStorageDate()).toString() ,
allocated.getInventorySOI() };
}
}

View File

@ -0,0 +1,264 @@
package com.dev.swms.client.ui.page;
import java.util.HashMap;
import java.util.Map;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.Window;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.TextAlign;
import com.gwtext.client.data.ArrayReader;
import com.gwtext.client.data.FieldDef;
import com.gwtext.client.data.IntegerFieldDef;
import com.gwtext.client.data.MemoryProxy;
import com.gwtext.client.data.RecordDef;
import com.gwtext.client.data.Store;
import com.gwtext.client.data.StringFieldDef;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.ToolbarButton;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.form.NumberField;
import com.gwtext.client.widgets.grid.ColumnConfig;
import com.gwtext.client.widgets.grid.ColumnModel;
import com.gwtext.client.widgets.grid.EditorGridPanel;
import com.gwtext.client.widgets.grid.GridEditor;
import com.gwtext.client.widgets.grid.GridPanel;
import com.gwtext.client.widgets.grid.RowSelectionModel;
import com.gwtext.client.widgets.grid.event.GridRowListener;
import com.gwtext.client.widgets.layout.HorizontalLayout;
import com.gwtext.client.widgets.layout.RowLayout;
import com.gwtext.client.widgets.layout.RowLayoutData;
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
import com.dev.swms.client.ui.javabean.PT_AVAILABLE;
import com.dev.energy.client.message.IMessagePage;
import com.dev.energy.client.ui.page.IPage;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
import com.dev.energy.client.utils.LocaleUtils;
public class Sub_AvailableTable_Panel extends AbstractSupportPanel {
protected final static String DEFAULT_NAME = "pickTicketAvailable_Panel";
transient EditorGridPanel availableTable;
private RecordDef recordDef;
private ColumnModel columnModel;
private Store store;
private MemoryProxy proxy;
private ArrayReader reader;
transient ToolbarButton manualAllocateButton;
private String flag;
private static final DateTimeFormat dateFormater = DateTimeFormat.getFormat("yyyy-MM-dd");
public Sub_AvailableTable_Panel(IMessagePage page) {
super(page, DEFAULT_NAME);
this.drawWidget();
}
private void drawWidget() {
flag = curPADataAccessor().getFlag();
recordDef = new RecordDef(new FieldDef[] {
new IntegerFieldDef("inventory.id"),
new StringFieldDef("location.code"),
new StringFieldDef("item.code"),
new StringFieldDef("item.name"),
new StringFieldDef("packageUnit.unit"),
new IntegerFieldDef("packageUnit.convertFigure"),
new IntegerFieldDef("inventory.quantity"),
new IntegerFieldDef("inventory.availableQuantity"),
new IntegerFieldDef("inventory.manualQuantity"),
new StringFieldDef("itemKey.lot"),
new StringFieldDef("lotInfor"),
new StringFieldDef("inventory.storageDate"),
new StringFieldDef("inventory.SOI")
});
ColumnConfig iiColumn = new ColumnConfig(LocaleUtils.getText("inventory.id"), "inventory.id");
iiColumn.setHidden(true);
ColumnConfig lcColumn = new ColumnConfig(LocaleUtils.getText("location.code"), "location.code", 80);
lcColumn.setAlign(TextAlign.CENTER);
lcColumn.setSortable(true);
ColumnConfig icColumn = new ColumnConfig(LocaleUtils.getText("item.code"), "item.code", 100);
icColumn.setAlign(TextAlign.CENTER);
ColumnConfig inColumn = new ColumnConfig(LocaleUtils.getText("item.name"), "item.name", 200);
inColumn.setAlign(TextAlign.CENTER);
ColumnConfig puColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.unit"), "packageUnit.unit", 80);
puColumn.setAlign(TextAlign.CENTER);
ColumnConfig pcColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.convertFigure"), "packageUnit.convertFigure", 80);
pcColumn.setAlign(TextAlign.CENTER);
ColumnConfig iqColumn = new ColumnConfig(LocaleUtils.getText("inventory.quantity"), "inventory.quantity", 80);
iqColumn.setAlign(TextAlign.CENTER);
ColumnConfig iaColumn = new ColumnConfig(LocaleUtils.getText("inventory.availableQuantity"), "inventory.availableQuantity", 80);
iaColumn.setAlign(TextAlign.CENTER);
NumberField numberField = new NumberField();
numberField.setAllowBlank(false);
numberField.setAllowNegative(false);
ColumnConfig imColumn = new ColumnConfig(LocaleUtils.getText("inventory.manualQuantity"), "inventory.manualQuantity", 80);
imColumn.setAlign(TextAlign.CENTER);
imColumn.setEditor(new GridEditor(numberField));
ColumnConfig ilColumn = new ColumnConfig(LocaleUtils.getText("itemKey.lot"), "itemKey.lot", 100);
ilColumn.setAlign(TextAlign.CENTER);
ColumnConfig lColumn = new ColumnConfig(LocaleUtils.getText("lotInfor"), "lotInfor", 150);
lColumn.setAlign(TextAlign.CENTER);
ColumnConfig isColumn = new ColumnConfig(LocaleUtils.getText("inventory.storageDate"), "inventory.storageDate", 150);
isColumn.setAlign(TextAlign.CENTER);
isColumn.setSortable(true);
ColumnConfig iSColumn = new ColumnConfig(LocaleUtils.getText("inventory.SOI"),"inventory.SOI", 100);
iSColumn.setAlign(TextAlign.CENTER);
columnModel = new ColumnModel(new ColumnConfig[]{
iiColumn,lcColumn,icColumn,inColumn,puColumn,pcColumn,
iqColumn,iaColumn,imColumn,ilColumn,lColumn,isColumn,iSColumn
});
proxy = new MemoryProxy(new String[][]{});
reader = new ArrayReader(recordDef);
store = new Store(proxy, reader);
store.load();
availableTable = new EditorGridPanel();
availableTable.setAutoScroll(true);
availableTable.setStore(store);
availableTable.setColumnModel(columnModel);
availableTable.setClicksToEdit(1);
availableTable.setSelectionModel(new RowSelectionModel(false));
ButtonListenerAdapter listener = new ButtonListenerAdapter() {
public void onClick(Button button, EventObject e) {
//部分分配
manualAllocate();
}
};
manualAllocateButton = new ToolbarButton("部分分配",listener);
manualAllocateButton.setDisabled(true);
availableTable.addGridRowListener(new GridRowListener(){
public void onRowClick(GridPanel grid, int rowIndex,
EventObject e) {
manualAllocateButton.setDisabled(false);
}
public void onRowContextMenu(GridPanel grid, int rowIndex,
EventObject e) {
// TODO Auto-generated method stub
}
public void onRowDblClick(GridPanel grid, int rowIndex,
EventObject e) {
// TODO Auto-generated method stub
}
});
Panel panel = new Panel();
panel.add(manualAllocateButton);
this.setLayout(new RowLayout());
this.add(availableTable,new RowLayoutData("88%"));
this.add(panel,new RowLayoutData("12%"));
}
//部分分配
@SuppressWarnings("unchecked")
private void manualAllocate() {
final Map param = new HashMap();
if(flag == "pickTicketPage"){
//存放发货单明细ID以便部分分配后刷新信息
Long pickTicketDetailId = this.curPADataAccessor().getPtdId();
param.put("pickTicketDetailId", pickTicketDetailId);
}else if(flag == "waveDocPage"){
//存放波次明细ID以便部分分配后刷新信息
Long waveDocDetailId = this.curPADataAccessor().getWddId();
param.put("waveDocDetailId", waveDocDetailId);
}
final Map subParam = new HashMap();
for(int i=0; i<availableTable.getStore().getCount();i++){
if(availableTable.getSelectionModel().isSelected(i)){
Long inventoryId = Long.valueOf(availableTable.getStore().getAt(i).getAsString("inventory.id"));
Double availableQuantity = Double.valueOf(availableTable.getStore().getAt(i).getAsString("inventory.availableQuantity"));
Double manualQuantity = Double.valueOf(availableTable.getStore().getAt(i).getAsString("inventory.manualQuantity"));
if(manualQuantity.doubleValue() > availableQuantity.doubleValue()){
Window.alert(LocaleUtils.getText("availableQuantity.not.enough"));
return;
}
subParam.put(inventoryId, manualQuantity);
}
}
param.put(IPage.TABLE_INPUT_VALUES, subParam);
if(flag == "pickTicketPage"){
//发货单部分分配
this.curPADataAccessor().manualAllocate(param);
}else if(flag == "waveDocPage"){
//波次部分分配
this.curPADataAccessor().manualWaveDocAllocate(param);
}
}
public Page_PA_DataAccessor curPADataAccessor() {
return (Page_PA_DataAccessor)super.getData();
}
public void doDispath(String message){
super.doDispath(message);
// System.out.print("还进入这个doDispath()方法了!");
if(Page_PA_DataAccessor.INIT_AVAILABLE_INFO.equals(message) || Page_PA_DataAccessor.INIT_WD_AVAILABLE_INFO.equals(message)){
Object[][] data = new Object[this.curPADataAccessor().all_PTAS().size()][];
for (int i=0;i<this.curPADataAccessor().all_PTAS().size();i++){
data[i] = toArray(this.curPADataAccessor().all_PTAS().get(i));
}
proxy = new MemoryProxy(data);
store.setDataProxy(proxy);
store.reload();
availableTable.reconfigure(store, columnModel);
}else if(Page_PA_DataAccessor.AUTO_ALLOCATE_INFO.equals(message) || Page_PA_DataAccessor.AUTO_WD_ALLOCATE_INFO.equals(message)
|| Page_PA_DataAccessor.CANCELL_ALLOCATE_INFO.equals(message) || Page_PA_DataAccessor.CANCELL_WD_ALLOCATE_INFO.equals(message)
|| Page_PA_DataAccessor.MANUAL_ALLOCATE_INFO.equals(message) || Page_PA_DataAccessor.MANUAL_WD_ALLOCATE_INFO.equals(message)){
proxy = new MemoryProxy(new String[][]{});
store.setDataProxy(proxy);
store.reload();
availableTable.reconfigure(store, columnModel);
}
}
public Object[] toArray(PT_AVAILABLE available){
return new Object[]{available.getInventoryId() ,
available.getLocationCode() ,
available.getItemCode() ,
available.getItemName() ,
available.getPackageUnit() ,
available.getPackageUnitConvertFigure() ,
available.getInventoryQuantity() ,
available.getInventoryAvailableQuantity() ,
available.getInventoryManualQuantity() ,
available.getItemKeyLot() ,
available.getLotInfor() ,
dateFormater.format(available.getInventoryStorageDate()).toString() ,
available.getInventorySOI() };
}
}

View File

@ -0,0 +1,393 @@
package com.dev.swms.client.ui.page;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.TextAlign;
import com.gwtext.client.data.ArrayReader;
import com.gwtext.client.data.FieldDef;
import com.gwtext.client.data.IntegerFieldDef;
import com.gwtext.client.data.MemoryProxy;
import com.gwtext.client.data.RecordDef;
import com.gwtext.client.data.Store;
import com.gwtext.client.data.StringFieldDef;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.ToolbarButton;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.grid.ColumnConfig;
import com.gwtext.client.widgets.grid.ColumnModel;
import com.gwtext.client.widgets.grid.GridPanel;
import com.gwtext.client.widgets.grid.RowSelectionModel;
import com.gwtext.client.widgets.grid.event.GridRowListener;
import com.gwtext.client.widgets.layout.RowLayout;
import com.gwtext.client.widgets.layout.RowLayoutData;
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
import com.dev.energy.client.message.IMessagePage;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
import com.dev.energy.client.utils.LocaleUtils;
public class Sub_DetailsTable_Panel extends AbstractSupportPanel {
private final static String DEFAULT_NAME = "pickTicketDetails_Panel";
transient GridPanel detailsTable;
private RecordDef recordDef;
private ColumnModel columnModel;
private Store store;
private MemoryProxy proxy;
private ArrayReader reader;
transient ToolbarButton autoAllocateButton;
private ColumnConfig ptiColumn;
private ColumnConfig iiColumn;
private ColumnConfig pcColumn;
private ColumnConfig pkuiColumn;
private ColumnConfig icColumn;
private ColumnConfig inColumn;
private ColumnConfig puColumn;
private ColumnConfig po1Column;
private ColumnConfig po2Column;
private ColumnConfig pp1Column;
private ColumnConfig paColumn;
private ColumnConfig pp2Column;
private ColumnConfig psColumn;
private ColumnConfig lColumn;
private String flag;
transient CheckBox checkBox;
public Sub_DetailsTable_Panel(IMessagePage page) {
super(page, DEFAULT_NAME);
this.drawWidget();
}
private void initAvailableDatas(GridPanel grid, int rowIndex,boolean isFitAsLot) {
Long itemId = Long.valueOf(grid.getStore().getAt(rowIndex).getAsString("item.id"));
Integer convertFigure = grid.getStore().getAt(rowIndex).getAsInteger("packageUnit.convertFigure");
String propC1 = grid.getStore().getAt(rowIndex).getAsString("propC1");
String propC2 = grid.getStore().getAt(rowIndex).getAsString("propC2");
String propC3 = grid.getStore().getAt(rowIndex).getAsString("propC3");
String propC4 = grid.getStore().getAt(rowIndex).getAsString("propC4");
String propC5 = grid.getStore().getAt(rowIndex).getAsString("propC5");
String propC6 = grid.getStore().getAt(rowIndex).getAsString("propC6");
String propC7 = grid.getStore().getAt(rowIndex).getAsString("propC7");
String propC8 = grid.getStore().getAt(rowIndex).getAsString("propC8");
String propC9 = grid.getStore().getAt(rowIndex).getAsString("propC9");
String propN1 = grid.getStore().getAt(rowIndex).getAsString("propN1");
String propN2 = grid.getStore().getAt(rowIndex).getAsString("propN2");
String propN3 = grid.getStore().getAt(rowIndex).getAsString("propN3");
String propD1 = grid.getStore().getAt(rowIndex).getAsString("propD1");
String propD2 = grid.getStore().getAt(rowIndex).getAsString("propD2");
String propD3 = grid.getStore().getAt(rowIndex).getAsString("propD3");
String propL1 = grid.getStore().getAt(rowIndex).getAsString("propL1");
String propL2 = grid.getStore().getAt(rowIndex).getAsString("propL2");
String propL3 = grid.getStore().getAt(rowIndex).getAsString("propL3");
final Map<String,Object> param = new HashMap<String,Object>();
param.put("itemId", itemId);
param.put("convertFigure", convertFigure);
if(isFitAsLot){
param.put("propC1", propC1);
param.put("propC2", propC2);
param.put("propC3", propC3);
param.put("propC4", propC4);
param.put("propC5", propC5);
param.put("propC6", propC6);
param.put("propC7", propC7);
param.put("propC8", propC8);
param.put("propC9", propC9);
param.put("propN1", propN1);
param.put("propN2", propN2);
param.put("propN3", propN3);
param.put("propD1", propD1);
param.put("propD2", propD2);
param.put("propD3", propD3);
param.put("propL1", propL1);
param.put("propL2", propL2);
param.put("propL3", propL3);
}
if(flag == "pickTicketPage"){
//查询对应发货单明细的库存信息
this.curPADataAccessor().initAvailableInfo(param);
}else if(flag == "waveDocPage"){
//查询对应波次明细的库存信息
this.curPADataAccessor().initWaveDocAvailableInfo(param);
}
}
protected void drawWidget(){
flag = curPADataAccessor().getFlag();
recordDef = new RecordDef(new FieldDef[] {
new IntegerFieldDef("pickTicketDetail.id"),
new IntegerFieldDef("item.id"),
new IntegerFieldDef("packageUnit.id"),
new StringFieldDef("packageUnit.convertFigure"),
new StringFieldDef("item.code"),
new StringFieldDef("item.name"),
new StringFieldDef("packageUnit.unit"),
new IntegerFieldDef("pickTicketDetail.orderQuantity"),
new IntegerFieldDef("pickTicketDetail.orderQtyOfMasterUnit"),
new IntegerFieldDef("pickTicketDetail.preAllocatedQuantity"),
new IntegerFieldDef("pickTicketDetail.allocatedQuantity"),
new IntegerFieldDef("pickTicketDetail.pickedQuantity"),
new IntegerFieldDef("pickTicketDetail.shippedQuantity"),
new StringFieldDef("lotInfor"),
new StringFieldDef("propC1"),
new StringFieldDef("propC2"),
new StringFieldDef("propC3"),
new StringFieldDef("propC4"),
new StringFieldDef("propC5"),
new StringFieldDef("propC6"),
new StringFieldDef("propC7"),
new StringFieldDef("propC8"),
new StringFieldDef("propC9"),
new StringFieldDef("propN1"),
new StringFieldDef("propN2"),
new StringFieldDef("propN3"),
new StringFieldDef("propD1"),
new StringFieldDef("propD2"),
new StringFieldDef("propD3"),
new StringFieldDef("propL1"),
new StringFieldDef("propL2"),
new StringFieldDef("propL3")
});
ptiColumn = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.id"), "pickTicketDetail.id");
ptiColumn.setHidden(true);
iiColumn = new ColumnConfig(LocaleUtils.getText("item.id"), "item.id");
iiColumn.setHidden(true);
pcColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.convertFigure"), "packageUnit.convertFigure");
pcColumn.setHidden(true);
pkuiColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.id"), "packageUnit.id");
pkuiColumn.setHidden(true);
icColumn = new ColumnConfig(LocaleUtils.getText("item.code"), "item.code", 150, false);
icColumn.setAlign(TextAlign.CENTER);
icColumn.setSortable(true);
inColumn = new ColumnConfig(LocaleUtils.getText("item.name"), "item.name", 200, false);
inColumn.setAlign(TextAlign.CENTER);
puColumn = new ColumnConfig(LocaleUtils.getText("packageUnit.unit"), "packageUnit.unit", 80, false);
puColumn.setAlign(TextAlign.CENTER);
po1Column = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.orderQuantity"), "pickTicketDetail.orderQuantity", 100, false);
po1Column.setAlign(TextAlign.CENTER);
po2Column = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.orderQtyOfMasterUnit"), "pickTicketDetail.orderQtyOfMasterUnit", 100, false);
po2Column.setAlign(TextAlign.CENTER);
pp1Column = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.preAllocatedQuantity"), "pickTicketDetail.preAllocatedQuantity", 100, false);
pp1Column.setAlign(TextAlign.CENTER);
if(flag == "waveDocPage"){
pp1Column.setHidden(true);
}
paColumn = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.allocatedQuantity"), "pickTicketDetail.allocatedQuantity", 100, false);
paColumn.setAlign(TextAlign.CENTER);
pp2Column = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.pickedQuantity"), "pickTicketDetail.pickedQuantity", 100, false);
pp2Column.setAlign(TextAlign.CENTER);
psColumn = new ColumnConfig(LocaleUtils.getText("pickTicketDetail.shippedQuantity"), "pickTicketDetail.shippedQuantity", 100, false);
psColumn.setAlign(TextAlign.CENTER);
if(flag == "waveDocPage"){
psColumn.setHidden(true);
}
lColumn = new ColumnConfig(LocaleUtils.getText("lotInfor"), "lotInfor", 150, false);
lColumn.setAlign(TextAlign.CENTER);
ColumnConfig propC1Column = new ColumnConfig("lotInfo.propC1","lotInfo.propC1");
propC1Column.setHidden(true);
ColumnConfig propC2Column = new ColumnConfig("lotInfo.propC2","lotInfo.propC2");
propC2Column.setHidden(true);
ColumnConfig propC3Column = new ColumnConfig("lotInfo.propC3","lotInfo.propC3");
propC3Column.setHidden(true);
ColumnConfig propC4Column = new ColumnConfig("lotInfo.propC4","lotInfo.propC4");
propC4Column.setHidden(true);
ColumnConfig propC5Column = new ColumnConfig("lotInfo.propC5","lotInfo.propC5");
propC5Column.setHidden(true);
ColumnConfig propC6Column = new ColumnConfig("lotInfo.propC6","lotInfo.propC6");
propC6Column.setHidden(true);
ColumnConfig propC7Column = new ColumnConfig("lotInfo.propC7","lotInfo.propC7");
propC7Column.setHidden(true);
ColumnConfig propC8Column = new ColumnConfig("lotInfo.propC8","lotInfo.propC8");
propC8Column.setHidden(true);
ColumnConfig propC9Column = new ColumnConfig("lotInfo.propC9","lotInfo.propC9");
propC9Column.setHidden(true);
ColumnConfig propN1Column = new ColumnConfig("lotInfo.propN1","lotInfo.propN1");
propN1Column.setHidden(true);
ColumnConfig propN2Column = new ColumnConfig("lotInfo.propN2","lotInfo.propN2");
propN2Column.setHidden(true);
ColumnConfig propN3Column = new ColumnConfig("lotInfo.propN3","lotInfo.propN3");
propN3Column.setHidden(true);
ColumnConfig propD1Column = new ColumnConfig("lotInfo.propD1","lotInfo.propD1");
propD1Column.setHidden(true);
ColumnConfig propD2Column = new ColumnConfig("lotInfo.propD2","lotInfo.propD2");
propD2Column.setHidden(true);
ColumnConfig propD3Column = new ColumnConfig("lotInfo.propD3","lotInfo.propD3");
propD3Column.setHidden(true);
ColumnConfig propL1Column = new ColumnConfig("lotInfo.propL1","lotInfo.propL1");
propL1Column.setHidden(true);
ColumnConfig propL2Column = new ColumnConfig("lotInfo.propL2","lotInfo.propL2");
propL2Column.setHidden(true);
ColumnConfig propL3Column = new ColumnConfig("lotInfo.propL3","lotInfo.propL3");
propL3Column.setHidden(true);
columnModel = new ColumnModel(new ColumnConfig[]{
ptiColumn,iiColumn,pcColumn,pkuiColumn,icColumn,inColumn,puColumn,po1Column,
po2Column,pp1Column,paColumn,pp2Column,psColumn,lColumn,propC1Column,propC2Column,
propC3Column,propC4Column,propC5Column,propC6Column,propC7Column,propC8Column,
propC9Column,propN1Column,propN2Column,propN3Column,propD1Column,propD2Column,
propD3Column,propL1Column,propL2Column,propL3Column
});
proxy = new MemoryProxy(new String[][]{});
reader = new ArrayReader(recordDef);
store = new Store(proxy, reader);
store.load();
detailsTable = new GridPanel();
detailsTable.setAutoScroll(true);
detailsTable.setStore(store);
detailsTable.setColumnModel(columnModel);
detailsTable.setSelectionModel(new RowSelectionModel(false));
ButtonListenerAdapter listener = new ButtonListenerAdapter() {
public void onClick(Button button, EventObject e) {
//整单分配
autoAllocate();
}
};
autoAllocateButton = new ToolbarButton("整单分配",listener);
autoAllocateButton.setDisabled(true);
checkBox = new CheckBox("强制货品批次匹配");
checkBox.setChecked(true);
detailsTable.addGridRowListener(new GridRowListener(){
public void onRowClick(GridPanel grid, int rowIndex,
EventObject e) {
autoAllocateButton.setDisabled(false);
if(checkBox.isChecked()){
initAvailableDatas(grid,rowIndex,true);
}else{
initAvailableDatas(grid,rowIndex,false);
}
if(flag == "pickTicketPage"){
//设置当前选中的发货单ID
final Long ptdId = Long.valueOf(grid.getStore().getAt(rowIndex).getAsString("pickTicketDetail.id"));
curPADataAccessor().setPtdId(ptdId);
}else if(flag == "waveDocPage"){
//设置当前选中的波次ID
final Long wddId = Long.valueOf(grid.getStore().getAt(rowIndex).getAsString("pickTicketDetail.id"));
curPADataAccessor().setWddId(wddId);
}
}
public void onRowContextMenu(GridPanel grid, int rowIndex,
EventObject e) {
// TODO Auto-generated method stub
}
public void onRowDblClick(GridPanel grid, int rowIndex,
EventObject e) {
// TODO Auto-generated method stub
}
});
HorizontalPanel panel2 = new HorizontalPanel();
panel2.add(autoAllocateButton);
panel2.add(checkBox);
panel2.setCellWidth(autoAllocateButton, "120px");
this.setLayout(new RowLayout());
this.add(detailsTable,new RowLayoutData("88%"));
this.add(panel2,new RowLayoutData("12%"));
// this.addButton(autoAllocateButton);
}
//整单分配
@SuppressWarnings("unchecked")
private void autoAllocate() {
final Map param = new HashMap();
if(flag == "pickTicketPage"){
//存放发货单ID以便整单分配后刷新信息
Long pickTicketId = this.curPADataAccessor().currentPickTicket().getId();
param.put("pickTicketId", pickTicketId);
}else if(flag == "waveDocPage"){
//存放波次ID以便整单分配后刷新信息
Long waveDocId = this.curPADataAccessor().currentPickTicket().getId();
param.put("waveDocId", waveDocId);
}
final List<Long> result = new ArrayList<Long>();
for(int i=0; i<detailsTable.getStore().getCount();i++){
if(detailsTable.getSelectionModel().isSelected(i)){
result.add(Long.valueOf(detailsTable.getStore().getAt(i).getAsString("pickTicketDetail.id")));
}
}
param.put("parentIds", result);
if(flag == "pickTicketPage"){
//发货单整单分配
this.curPADataAccessor().atuoAllocate(param);
}else if(flag == "waveDocPage"){
//波次整单分配
this.curPADataAccessor().atuoWaveDocAllocate(param);
}
}
public Page_PA_DataAccessor curPADataAccessor() {
return (Page_PA_DataAccessor)super.getData();
}
public void doDispath(String message){
super.doDispath(message);
// System.out.print("进入doDispath()方法了!");
if(Page_PA_DataAccessor.INIT_DETAILS_INFO.equals(message) || Page_PA_DataAccessor.INIT_WD_DETAILS_INFO.equals(message)){
Object[][] data = new Object[this.curPADataAccessor().all_PDS().size()][];
for (int i=0;i<this.curPADataAccessor().all_PDS().size();i++){
data[i] = this.curPADataAccessor().all_PDS().get(i).toArray();
}
proxy = new MemoryProxy(data);
store.setDataProxy(proxy);
store.reload();
detailsTable.reconfigure(store, columnModel);
}
}
}

View File

@ -0,0 +1,86 @@
package com.dev.swms.client.ui.page;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.Window;
import com.gwtext.client.core.Margins;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
import com.gwtext.client.widgets.layout.RowLayout;
import com.gwtext.client.widgets.layout.RowLayoutData;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.energy.client.message.IMessagePage;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class Sub_IV_Panel extends AbstractSupportPanel {
public static final int DEFAULT_WIDTH = Window.getClientWidth() - 50 ;
public static final int DEFAULT_HEIGHT = Window.getClientHeight() - 170;
private Panel centerPanelWrappper;
private Panel introPanel;
public Sub_IV_Panel(IMessagePage page) {
super(page, "iv_main_panel");
this.initialize();
}
protected void initialize(){
centerPanelWrappper = new Panel();
centerPanelWrappper.setSize(DEFAULT_WIDTH , DEFAULT_HEIGHT);
centerPanelWrappper.setLayout(new FitLayout());
centerPanelWrappper.setBorder(true);
centerPanelWrappper.setBodyBorder(true);
introPanel = new Panel();
introPanel.setLayout(new RowLayout());
introPanel.setAutoDestroy(true);
introPanel.setAutoScroll(true);
centerPanelWrappper.add(introPanel);
Panel northPanel = getNorthPanel();
northPanel.setPaddings(5);
northPanel.setLayout(new FitLayout());
northPanel.setAutoDestroy(true);
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
BorderLayoutData northLayoutData = new BorderLayoutData(RegionPosition.NORTH);
// northLayoutData.setMargins(new Margins(1, 1, 1, 1));
// northLayoutData.setCMargins(new Margins(1, 1, 1, 1));
// northLayoutData.setMinSize(20);
// northLayoutData.setMaxSize(100);
// northLayoutData.setSplit(true);
this.setBodyBorder(true);
this.setBorder(true);
this.setLayout(new BorderLayout());
this.setAutoDestroy(true);
this.setSize(Window.getClientWidth() - 50 , Window.getClientHeight() - 130);
this.add(northPanel,northLayoutData);
this.add(centerPanelWrappper, centerLayoutData);
DeferredCommand.addCommand(new Command(){
public void execute() {
getData().sendMessage(Page_IV_DataAccessor.MSG_OPEN_W_IMAGE_PANEL);
}
});
}
protected Panel getNorthPanel(){
return new Sub_Navigate_Panel(this);
}
public void addCenterPanel(Panel panel) {
introPanel.clear();
introPanel.add(panel , new RowLayoutData("100%"));
}
}

View File

@ -0,0 +1,193 @@
package com.dev.swms.client.ui.page;
import java.util.HashMap;
import java.util.Map;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.ToolTip;
import com.gwtext.client.widgets.grid.EditorGridPanel;
import com.gwtext.client.widgets.grid.GridPanel;
import com.gwtext.client.widgets.grid.event.GridCellListenerAdapter;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
import com.gwtext.client.widgets.layout.HorizontalLayout;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.swms.client.ui.javabean.JB_Location_IV;
import com.dev.swms.client.ui.javabean.JB_Location_RC_IV;
import com.dev.swms.client.ui.util.Sub_L_Image_Panel_Util;
import com.dev.energy.client.message.IMessagePage;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class Sub_L_Image_Panel extends Sub_Abstract_Panel {
private EditorGridPanel leftPanel;
private EditorGridPanel rightTopPanel;
private EditorGridPanel rightBottomPanel;
public Sub_L_Image_Panel(IMessagePage page) {
super(page, Sub_L_Image_Panel_Util.DEFAULT_NAME);
this.initialize();
this.setSize(Sub_IV_Panel.DEFAULT_WIDTH , Sub_IV_Panel.DEFAULT_HEIGHT);
this.setBorder(false);
this.setBodyBorder(false);
this.setLayout(new BorderLayout());
Panel centerPanelWrappper = new Panel();
centerPanelWrappper.setWidth(Sub_IV_Panel.DEFAULT_WIDTH);
centerPanelWrappper.setHeight(Sub_IV_Panel.DEFAULT_HEIGHT*2/3);
centerPanelWrappper.setLayout(new FitLayout());
centerPanelWrappper.setBorder(false);
centerPanelWrappper.setBodyBorder(false);
centerPanelWrappper.setPaddings(1);
leftPanel.setAutoDestroy(true);
Panel introPanel = new Panel();
introPanel.setWidth(Sub_IV_Panel.DEFAULT_WIDTH);
introPanel.setLayout(new HorizontalLayout(0));
introPanel.setAutoDestroy(true);
introPanel.setBodyBorder(false);
introPanel.setBorder(false);
centerPanelWrappper.add(introPanel);
introPanel.add(this.leftPanel , new BorderLayoutData(RegionPosition.WEST));
introPanel.add(this.rightTopPanel , new BorderLayoutData(RegionPosition.CENTER));
BorderLayoutData northLayoutData = new BorderLayoutData(RegionPosition.NORTH);
northLayoutData.setMinSize(10);
northLayoutData.setMaxSize(Sub_IV_Panel.DEFAULT_HEIGHT);
northLayoutData.setSplit(false);
this.add(centerPanelWrappper,northLayoutData);
this.add(this.rightBottomPanel, new BorderLayoutData(RegionPosition.CENTER));
this.initLocationDatas();
}
protected void initLocationDatas() {
this.curIVDataAccessor().initLocationIvDatas();
}
public Page_IV_DataAccessor curIVDataAccessor() {
return (Page_IV_DataAccessor)super.getData();
}
protected void initialize() {
this.initLeftPanel();
this.initRightTopPanel();
this.initRightBottomPanel();
}
protected void initLeftPanel(){
leftPanel = new EditorGridPanel();
leftPanel.setBodyBorder(true);
leftPanel.setBorder(true);
leftPanel.setWidth(Sub_IV_Panel.DEFAULT_WIDTH/2);
leftPanel.setHeight(Sub_IV_Panel.DEFAULT_HEIGHT*2/3);
leftPanel.setLayout(new FitLayout());
leftPanel.setColumnModel(Sub_L_Image_Panel_Util.getALColumnModel());
leftPanel.setStore(Sub_L_Image_Panel_Util.getALStore(new Object[][]{}));
leftPanel.addGridCellListener(new GridCellListenerAdapter(){
public void onCellClick(GridPanel grid, int rowIndex, int colindex, EventObject e) {
initRightTopPanelDatas(rowIndex,colindex);
}
});
leftPanel.setEnableHdMenu(false);
}
protected void initRightTopPanel(){
rightTopPanel = new EditorGridPanel();
rightTopPanel.setBodyBorder(true);
rightTopPanel.setBorder(true);
rightTopPanel.setLayout(new FitLayout());
rightTopPanel.setWidth(Sub_IV_Panel.DEFAULT_WIDTH/2);
rightTopPanel.setHeight(Sub_IV_Panel.DEFAULT_HEIGHT*2/3);
rightTopPanel.setAutoScroll(true);
rightTopPanel.setColumnModel(Sub_L_Image_Panel_Util.getRCColumnModel());
rightTopPanel.setStore(Sub_L_Image_Panel_Util.getRCStore(new Object[][]{}));
rightTopPanel.addGridCellListener(new GridCellListenerAdapter(){
public void onCellClick(GridPanel grid, int rowIndex, int colindex, EventObject e) {
initRightBottomPanelDatas(rowIndex , colindex);
}
});
rightTopPanel.setEnableHdMenu(false);
}
protected void initRightBottomPanel(){
rightBottomPanel = new EditorGridPanel();
rightBottomPanel.setBodyBorder(true);
rightBottomPanel.setBorder(true);
rightBottomPanel.setWidth(Sub_IV_Panel.DEFAULT_WIDTH);
rightBottomPanel.setHeight(Sub_IV_Panel.DEFAULT_HEIGHT/3);
rightBottomPanel.setLayout(new FitLayout());
rightBottomPanel.setAutoScroll(true);
rightBottomPanel.stripeRows(true);
rightBottomPanel.setColumnModel(Sub_L_Image_Panel_Util.getInvColumnModel());
rightBottomPanel.setStore(Sub_L_Image_Panel_Util.getInvStore(new Object[][]{}));
}
protected void initRightTopPanelDatas(int row,int col){
if(col == 0) return;
boolean isNaN = curIVDataAccessor().all_Location_IV().get(row).get(col - 1).getLoc_rate() < 0;
if(isNaN) return;
Map<String,Object> params = new HashMap<String,Object>();
params.put(CT_IV.IV_LINE , row + 1);
params.put(CT_IV.IV_AISLE , col);
params.put(CT_IV.IV_ZONE_ID , this.curDataAccessor().getCur_JB_Zone_IV().getLoc_id());
this.curIVDataAccessor().initLocationIvRCDatas(params);
}
protected void initRightBottomPanelDatas(int row,int col) {
if(col == 0) return;
JB_Location_RC_IV liv = curIVDataAccessor().all_Location_RC_IV().get(row).get(col - 1);
if(liv.getId() == null || liv.getRate() <=0) return;
Map<String,Object> params = new HashMap<String,Object>();
params.put(CT_IV.IV_LOCATION_ID , liv.getId() );
this.curIVDataAccessor().initInventoryDatas(params);
}
protected void applyToToolTip() {
for(int i = 0 ; i < CT_IV.DEFAULT_ROW ; i ++) {
for(int j = 1 ; j <= CT_IV.DEFAULT_COL ; j ++) {
JB_Location_RC_IV lriv = this.curIVDataAccessor().all_Location_RC_IV().get(i).get(j - 1);
if(lriv.getId() == null || lriv.getRate() < 0) continue;
new ToolTip(Sub_L_Image_Panel_Util.generateToolTip(lriv)).applyTo(this.rightTopPanel.getView().getCell(i,j));
}
}
}
protected void applyToToolTip2(){
for(int i = 0 ; i < CT_IV.DEFAULT_LINE ; i ++) {
for(int j = 1 ; j <= CT_IV.DEFAULT_AISLE ; j ++) {
JB_Location_IV lriv = this.curIVDataAccessor().all_Location_IV().get(i).get(j - 1);
if(lriv.getLoc_rate() < 0) continue;
new ToolTip(Sub_L_Image_Panel_Util.generateToolTip(lriv)).applyTo(this.leftPanel.getView().getCell(i,j));
}
}
}
public void doDispath(String message){
super.doDispath(message);
if(Page_IV_DataAccessor.MSG_INIT_LOCATION_DATAS.equals(message)){
leftPanel.reconfigure(Sub_L_Image_Panel_Util.getALStore(
Sub_L_Image_Panel_Util.convertToAL2Array(this.curIVDataAccessor().all_Location_IV())) ,
Sub_L_Image_Panel_Util.getALColumnModel());applyToToolTip2();
}else if(Page_IV_DataAccessor.MSG_INIT_LOCATION_RC_DATAS.equals(message)) {
rightTopPanel.reconfigure(Sub_L_Image_Panel_Util.getRCStore(
Sub_L_Image_Panel_Util.convertToRC2Array(this.curIVDataAccessor().all_Location_RC_IV())) ,
Sub_L_Image_Panel_Util.getRCColumnModel());applyToToolTip();
}else if(Page_IV_DataAccessor.MSG_INIT_INVENTORY_DATAS.equals(message)) {
rightBottomPanel.reconfigure(Sub_L_Image_Panel_Util.getInvStore(
Sub_L_Image_Panel_Util.convertToInv2Array(this.curIVDataAccessor().all_Location_Inv())),
Sub_L_Image_Panel_Util.getInvColumnModel());
}
}
}

View File

@ -0,0 +1,137 @@
package com.dev.swms.client.ui.page;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.layout.FitLayout;
import com.gwtext.client.widgets.layout.HorizontalLayout;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.energy.client.message.IMessagePage;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class Sub_Navigate_Panel extends AbstractSupportPanel{
protected final static String DEFAULT_NAME = "navigate_panel";
/** 仓库链接 */
protected HTML w_HyperLink = new HTML("供应链网络");
/** 库区链接 */
protected HTML z_HyperLink = new HTML("");
/** 库位链接 */
protected HTML l_HyperLink = new HTML("");
protected HTML firstImg = new HTML("");
protected HTML secondImg = new HTML("");
protected Panel subPanel;
protected Sub_Abstract_Panel currentPanel;
public Sub_Navigate_Panel(IMessagePage page) {
super(page, DEFAULT_NAME);
this.initListener();
this.drawWidget();
}
protected void drawWidget(){
w_HyperLink.setStyleName("iv_navigate");
z_HyperLink.setStyleName("iv_navigate");
l_HyperLink.setStyleName("iv_navigate");
subPanel = new Panel();
subPanel.setLayout(new HorizontalLayout(5));
subPanel.add(w_HyperLink);
subPanel.add(firstImg);
subPanel.add(z_HyperLink);
subPanel.add(secondImg);
subPanel.add(l_HyperLink);
subPanel.setWidth("100%");
this.setBodyBorder(true);
this.setBorder(true);
this.setLayout(new FitLayout());
this.setHeight("30px");
this.setWidth("100%");
this.add(subPanel);
}
protected void removeHistoryPanel(){
if(this.currentPanel == null) return;
this.currentPanel.hideCharts();
page.remove(this.currentPanel);
}
protected void addCenterPanel(Sub_Abstract_Panel newPanel){
this.currentPanel = newPanel;
curIvPanel().addCenterPanel(newPanel);
}
protected void initListener(){
w_HyperLink.addClickListener(new ClickListener(){
public void onClick(Widget sender) {
getData().sendMessage(Page_IV_DataAccessor.MSG_OPEN_W_IMAGE_PANEL);
}
});
z_HyperLink.addClickListener(new ClickListener(){
public void onClick(Widget sender) {
getData().sendMessage(Page_IV_DataAccessor.MSG_OPEN_Z_IMAGE_PANEL);
}
});
l_HyperLink.addClickListener(new ClickListener(){
public void onClick(Widget sender) {
getData().sendMessage(Page_IV_DataAccessor.MSG_OPEN_L_IMAGE_PANEL);
}
});
}
private Sub_IV_Panel curIvPanel(){
return (Sub_IV_Panel)this.page;
}
protected void refreshNavigatePanel(){
if(((Page_IV_DataAccessor)page.getData()).current_JB_IV() != null){
firstImg.setHTML(CT_IV.DEFAULT_ARROW_IMG);
z_HyperLink.setHTML(((Page_IV_DataAccessor)page.getData()).current_JB_IV().getIv_wh_name());
}
if(((Page_IV_DataAccessor)page.getData()).getCur_JB_Zone_IV() != null){
secondImg.setHTML(CT_IV.DEFAULT_ARROW_IMG);
l_HyperLink.setHTML(((Page_IV_DataAccessor)page.getData()).getCur_JB_Zone_IV().getLoc_name());
}
}
public void doDispath(String message){
if(Page_IV_DataAccessor.MSG_REFRESH_NAVIGATE_PANEL.equals(message)) {
this.refreshNavigatePanel();
}else if(Page_IV_DataAccessor.MSG_OPEN_W_IMAGE_PANEL.equals(message)) {
this.removeHistoryPanel();
this.addCenterPanel(new Sub_W_Image_Panel(page));
DOM.setStyleAttribute(this.w_HyperLink.getElement() , "border" , "1px solid blue");
DOM.setStyleAttribute(this.z_HyperLink.getElement() , "border" , "none");
DOM.setStyleAttribute(this.l_HyperLink.getElement() , "border" , "none");
}else if(Page_IV_DataAccessor.MSG_OPEN_Z_IMAGE_PANEL.equals(message)) {
this.removeHistoryPanel();
this.addCenterPanel(new Sub_Z_Image_Panel(page));
this.refreshNavigatePanel();
DOM.setStyleAttribute(this.w_HyperLink.getElement() , "border" , "none");
DOM.setStyleAttribute(this.z_HyperLink.getElement() , "border" , "1px solid blue");
DOM.setStyleAttribute(this.l_HyperLink.getElement() , "border" , "none");
}else if(Page_IV_DataAccessor.MSG_OPEN_L_IMAGE_PANEL.equals(message)) {
this.removeHistoryPanel();
this.addCenterPanel(new Sub_L_Image_Panel(page));
this.refreshNavigatePanel();
DOM.setStyleAttribute(this.w_HyperLink.getElement() , "border" , "none");
DOM.setStyleAttribute(this.z_HyperLink.getElement() , "border" , "none");
DOM.setStyleAttribute(this.l_HyperLink.getElement() , "border" , "1px solid blue");
}
}
}

View File

@ -0,0 +1,109 @@
package com.dev.swms.client.ui.page;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
import com.gwtext.client.core.Margins;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.RowLayout;
import com.gwtext.client.widgets.layout.RowLayoutData;
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
import com.dev.energy.client.message.IMessagePage;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
import com.dev.energy.client.utils.LocaleUtils;
public class Sub_PA_Panel extends AbstractSupportPanel {
private TabPanel centerPanel;
transient Long pickTicketId;
transient Panel allocatingPanel;
transient Panel allocatedPanel;
public Sub_PA_Panel(IMessagePage page) {
super(page, "pa_main_panel");
this.initialize();
}
protected void initialize(){
centerPanel = new TabPanel();
allocatingPanel = new Panel();
allocatingPanel.setTitle(LocaleUtils.getText("allocating"));
allocatingPanel.setAutoWidth(true);
allocatingPanel.setLayout(new RowLayout());
Panel detailPanel = getDetailsTable();
allocatingPanel.add(detailPanel,new RowLayoutData("50%"));
Panel availablePanel = getAvailableTable();
allocatingPanel.add(availablePanel,new RowLayoutData("50%"));
centerPanel.add(allocatingPanel);
allocatedPanel = new Panel();
allocatedPanel.setTitle(LocaleUtils.getText("cancelAllocate"));
allocatedPanel.setAutoWidth(true);
allocatedPanel.setLayout(new RowLayout());
Panel allocated1Panel = getAllocatedTable();
allocatedPanel.add(allocated1Panel,new RowLayoutData("100%"));
centerPanel.add(allocatedPanel);
centerPanel.activate(0);
this.setSize("950px", "500px");
Panel northPanel = getNorthPanel();
BorderLayoutData centerLayoutData = new BorderLayoutData(RegionPosition.CENTER);
centerLayoutData.setMargins(new Margins(1, 1, 1, 1));
BorderLayoutData northLayoutData = new BorderLayoutData(RegionPosition.NORTH);
this.setBodyBorder(false);
this.setBorder(false);
this.setLayout(new BorderLayout());
this.setAutoDestroy(true);
this.add(northPanel,northLayoutData);
this.add(centerPanel, centerLayoutData);
DeferredCommand.addCommand(new Command(){
public void execute() {
getData().sendMessage(Page_PA_DataAccessor.INIT_PICK_TICKETS_INFO);
}
});
}
protected Panel getAllocatedTable() {
return new Sub_AllocatedTable_Panel(this);
//return null;
}
protected Panel getDetailsTable() {
return new Sub_DetailsTable_Panel(this);
//return null;
}
protected Panel getAvailableTable() {
return new Sub_AvailableTable_Panel(this);
//return null;
}
protected Panel getNorthPanel(){
return new Sub_PickTicketInfo_Panel(this);
}
}

View File

@ -0,0 +1,140 @@
package com.dev.swms.client.ui.page;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.gwtext.client.widgets.form.Label;
import com.dev.swms.client.ui.data.Page_PA_DataAccessor;
import com.dev.energy.client.message.IMessagePage;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
import com.dev.energy.client.utils.LocaleUtils;
public class Sub_PickTicketInfo_Panel extends AbstractSupportPanel {
protected final static String DEFAULT_NAME = "pickTicketInfo_Panel";
transient HorizontalPanel subPanel;
transient TextBox pickTicketCodeTextBox;
transient TextBox ordersQuantityTextBox;
transient TextBox preAllocateQuantityTextBox;
transient TextBox allocateQuantityTextBox;
transient TextBox pickItemQuantityTextBox;
transient Label pickTicketCodeLabel;
transient Label ordersQuantityLabel;
transient Label preAllocateQuantityLabel;
transient Label allocateQuantityLabel;
transient Label pickItemQuantityLabel;
private String flag;
public Sub_PickTicketInfo_Panel(IMessagePage page) {
super(page, DEFAULT_NAME);
this.drawWidget();
}
protected void drawWidget(){
flag = curPADataAccessor().getFlag();
subPanel = new HorizontalPanel();
subPanel.setWidth("100%");
pickTicketCodeLabel = new Label(LocaleUtils.getText("waveDoc.code"));
// pickTicketCodeLabel.setWidth("80px");
pickTicketCodeTextBox = new TextBox();
// pickTicketCodeTextBox.setWidth("80px");
pickTicketCodeTextBox.setEnabled(false);
ordersQuantityLabel = new Label(LocaleUtils.getText("pickTicket.orderQuantity"));
// ordersQuantityLabel.setWidth("80px");
ordersQuantityTextBox = new TextBox();
// ordersQuantityTextBox.setWidth("80px");
ordersQuantityTextBox.setEnabled(false);
preAllocateQuantityLabel = new Label(LocaleUtils.getText("pickTicket.preAllocatedQuantity"));
// preAllocateQuantityLabel.setWidth("80px");
preAllocateQuantityTextBox = new TextBox();
// preAllocateQuantityTextBox.setWidth("80px");
preAllocateQuantityTextBox.setEnabled(false);
allocateQuantityLabel = new Label(LocaleUtils.getText("pickTicket.allocatedQuantity"));
// allocateQuantityLabel.setWidth("80px");
allocateQuantityTextBox = new TextBox();
// allocateQuantityTextBox.setWidth("80px");
allocateQuantityTextBox.setEnabled(false);
pickItemQuantityLabel = new Label(LocaleUtils.getText("pickTicket.pickedQuantity"));
// pickItemQuantityLabel.setWidth("80px");
pickItemQuantityTextBox = new TextBox();
// pickItemQuantityTextBox.setWidth("80px");
pickItemQuantityTextBox.setEnabled(false);
if(flag != "waveDocPage"){
pickTicketCodeLabel.setText(LocaleUtils.getText("pickTicket.code"));
// preAllocateQuantityLabel.setVisible(false);
// preAllocateQuantityTextBox.setVisible(false);
pickTicketCodeLabel.setWidth("80px");
pickTicketCodeTextBox.setWidth("160px");
ordersQuantityLabel.setWidth("80px");
ordersQuantityTextBox.setWidth("90px");
preAllocateQuantityLabel.setWidth("100px");
preAllocateQuantityTextBox.setWidth("90px");
allocateQuantityLabel.setWidth("80px");
allocateQuantityTextBox.setWidth("80px");
pickItemQuantityLabel.setWidth("80px");
pickItemQuantityTextBox.setWidth("80px");
subPanel.add(pickTicketCodeLabel);
subPanel.add(pickTicketCodeTextBox);
subPanel.add(ordersQuantityLabel);
subPanel.add(ordersQuantityTextBox);
subPanel.add(preAllocateQuantityLabel);
subPanel.add(preAllocateQuantityTextBox);
subPanel.add(allocateQuantityLabel);
subPanel.add(allocateQuantityTextBox);
subPanel.add(pickItemQuantityLabel);
subPanel.add(pickItemQuantityTextBox);
}else{
subPanel.add(pickTicketCodeLabel);
subPanel.add(pickTicketCodeTextBox);
subPanel.add(ordersQuantityLabel);
subPanel.add(ordersQuantityTextBox);
// subPanel.add(preAllocateQuantityLabel);
// subPanel.add(preAllocateQuantityTextBox);
subPanel.add(allocateQuantityLabel);
subPanel.add(allocateQuantityTextBox);
subPanel.add(pickItemQuantityLabel);
subPanel.add(pickItemQuantityTextBox);
}
this.setSize("950px", "25px");
this.setBodyBorder(false);
this.add(subPanel);
}
public Page_PA_DataAccessor curPADataAccessor() {
return (Page_PA_DataAccessor)super.getData();
}
public void doDispath(String message){
super.doDispath(message);
if(Page_PA_DataAccessor.INIT_PICK_TICKETS_INFO.equals(message) || Page_PA_DataAccessor.INIT_WAVE_DOC_INFO.equals(message)){
pickTicketCodeTextBox.setText(String.valueOf(this.curPADataAccessor().currentPickTicket().getCode()));
ordersQuantityTextBox.setText(String.valueOf((int)this.curPADataAccessor().currentPickTicket().getOrderQuantity()));
preAllocateQuantityTextBox.setText(String.valueOf((int)this.curPADataAccessor().currentPickTicket().getPreAllocatedQuantity()));
allocateQuantityTextBox.setText(String.valueOf((int)this.curPADataAccessor().currentPickTicket().getAllocatedQuantity()));
pickItemQuantityTextBox.setText(String.valueOf((int)this.curPADataAccessor().currentPickTicket().getPickedQuantity()));
}
}
}

View File

@ -0,0 +1,94 @@
package com.dev.swms.client.ui.page;
import java.util.ArrayList;
import java.util.List;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.gwtext.client.widgets.layout.FitLayout;
import com.dev.swms.client.ui.companent.DraggableUiColumnChartWrapper;
import com.dev.swms.client.ui.companent.UiColumnChart;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.swms.client.ui.javabean.JB_IV;
import com.dev.energy.client.ApplicationWindow;
import com.dev.energy.client.message.IMessagePage;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class Sub_W_Image_Panel extends Sub_Abstract_Panel {
/** 背景主面板的宽度和高度 */
protected static final String DEFAULT_WIDTH = "100%";
protected static final String DEFAULT_HEIGHT = "100%";
public static final String DEFAULT_NAME = "sub_image_panel";
protected static final String DEFAULT_WAREHOUSE_BGIMAGE = "w_bg_image_url";
protected List<UiColumnChart> uccs;
public Sub_W_Image_Panel(IMessagePage page) {
super(page, DEFAULT_NAME);
this.init_Sub_Image_Panel();
}
protected void init_Sub_Image_Panel() {
this.setSize(Sub_IV_Panel.DEFAULT_WIDTH , Sub_IV_Panel.DEFAULT_HEIGHT);
this.setLayout(new FitLayout());
this.setBodyStyle(CT_IV.DEFAULT_BODYSTYLE);
VerticalPanel panel = new VerticalPanel();
panel.setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);
Object back = ApplicationWindow.context.getGlobalParams().get(DEFAULT_WAREHOUSE_BGIMAGE);
panel.add(new Image(back == null?"" : back.toString()));
this.add(panel);
this.curIVDataAccessor().initIVDatas();
}
public void doDispath(String message){
super.doDispath(message);
if(Page_IV_DataAccessor.MSG_INIT_IV_DATA.equals(message)) {
this.init_WH_IV_ColumnChart();
}
}
public Page_IV_DataAccessor curIVDataAccessor() {
return (Page_IV_DataAccessor)super.getData();
}
/** 绘制仓库布局中的满库率(用柱图显示) */
protected void init_WH_IV_ColumnChart() {
if (this.curIVDataAccessor() != null) {
for(final JB_IV iv : this.curIVDataAccessor().all_IV()) {
UiColumnChart wd = new DraggableUiColumnChartWrapper(iv,this);
//this.regeditSubWidgetAndShow(new UiColumnChart(iv,this));
//add
this.regeditSubWidgetAndShow(wd);
}
}
}
protected void regeditSubWidgetAndShow(UiColumnChart ucc) {
if(uccs == null) {
uccs = new ArrayList<UiColumnChart>();
}
uccs.add(ucc);
ucc.show();
}
public void hideCharts() {
if(uccs == null) return;
for(UiColumnChart ucc : uccs) {
ucc.hide();
}
}
}

View File

@ -0,0 +1,84 @@
package com.dev.swms.client.ui.page;
import java.util.ArrayList;
import java.util.List;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.gwtext.client.widgets.layout.FitLayout;
import com.dev.swms.client.ui.companent.DraggableUiPieChartWrapper;
import com.dev.swms.client.ui.companent.UiPieChart;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.data.Page_IV_DataAccessor;
import com.dev.swms.client.ui.javabean.JB_Zone_IV;
import com.dev.energy.client.message.IMessagePage;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class Sub_Z_Image_Panel extends Sub_Abstract_Panel {
protected static final int DEFAULT_WIDTH = Sub_IV_Panel.DEFAULT_WIDTH;
protected static final int DEFAULT_HEIGHT = Sub_IV_Panel.DEFAULT_HEIGHT;
protected static final String DEFAULT_NAME = "zoneImagePanel";
protected List<UiPieChart> pieCharts;
public Sub_Z_Image_Panel(IMessagePage page) {
super(page, DEFAULT_NAME);
this.init_Sub_Image_Panel();
}
protected void init_Sub_Image_Panel() {
this.setSize(DEFAULT_WIDTH , DEFAULT_HEIGHT);
this.setBodyBorder(false);
this.setBorder(false);
this.setBodyStyle(CT_IV.DEFAULT_BODYSTYLE);
VerticalPanel panel = new VerticalPanel();
panel.setSize("100%","100%");
panel.add(new Image(curIVDataAccessor().current_JB_IV().getImage_url()));
this.add(panel);
this.setLayout(new FitLayout());
this.curDataAccessor().initZoneIvDatas();
}
public void doDispath(String message){
super.doDispath(message);
if(Page_IV_DataAccessor.MSG_INIT_ZONE_DATAS.equals(message)){
this.initPieChart();
}
}
protected void initPieChart() {
if(this.curDataAccessor() !=null){
for(JB_Zone_IV ziv : this.curDataAccessor().all_Zone_IV()){
UiPieChart uip = new DraggableUiPieChartWrapper(ziv,this);
//this.register(new UiPieChart(ziv , this));
this.register(uip);
//add
}
}
}
public Page_IV_DataAccessor curIVDataAccessor() {
return (Page_IV_DataAccessor)super.getData();
}
protected void register(UiPieChart chart) {
if(pieCharts == null) {
pieCharts = new ArrayList<UiPieChart>();
}
chart.show();
pieCharts.add(chart);
}
public void hideCharts() {
if(pieCharts == null) return;
for(UiPieChart pc : pieCharts) {
pc.hide(true);
}
}
}

View File

@ -0,0 +1,210 @@
package com.dev.swms.client.ui.page;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.dev.swms.client.SWMS;
import com.dev.swms.client.ui.page.service.CustomService;
import com.dev.swms.client.ui.page.service.CustomServiceAsync;
import com.dev.energy.client.ApplicationWindow;
import com.dev.energy.client.context.ConfigContext;
import com.dev.energy.client.rpc.AjaxServiceUtil;
import com.dev.energy.client.rpc.AsyncCallBackAdapter;
import com.dev.energy.client.rpc.CommitServiceAsync;
import com.dev.energy.client.template.BaseCustomPopupTemplate;
import com.dev.energy.client.ui.ClickListener;
import com.dev.energy.client.ui.HiddenUI;
import com.dev.energy.client.ui.ListUI;
import com.dev.energy.client.ui.commonWidgets.BeautyButton;
import com.dev.energy.client.ui.panel.AbstractSupportPanel;
import com.dev.energy.client.ui.table.FormTable;
import com.dev.energy.client.ui.table.RowData;
import com.dev.energy.client.utils.Constants;
import com.dev.energy.client.utils.LocaleUtils;
public class SwithWareHousePage extends BaseCustomPopupTemplate implements IsSerializable{
transient FormTable formTable;
transient HiddenUI userIdUI;
transient ListUI wareHousesUI;
private List wareHouses;
transient SwitchButton switchButton;
public void init() {
draw();
}
public void draw() {
AbstractSupportPanel content = new AbstractSupportPanel (this,""){};
content.add(getPagePanel());
userIdUI.setValue((Long)params.get("userId"));
composites.add(content);
reloadFormData();
}
public String getTitle() {
return LocaleUtils.getText("switchWareHousePage");
}
/** 从后台获取页面所有数据,参考参数entity的ID **/
protected void reloadFormData(){
final Map wareHouseParams = new HashMap();
wareHouseParams.put("user.id",userIdUI.getValue());
AsyncCallBackAdapter callBack = new AsyncCallBackAdapter(){
protected void exec() {
CommitServiceAsync serviceAsync = AjaxServiceUtil.initialAsyncService(ConfigContext.DEFAULT);
serviceAsync.executeCustom("warehouseManager","getWareHousesForenergy",wareHouseParams,this);
}
public void onSuccess() {
Map resultParam = (Map)result;
//设置控件值
resultParam.remove(Constants.energy_MESSAGE_KEY);
initAllControlKit(resultParam);
}
};
callBack.exec("");
}
/** 对取回的数据进行处理:将取回的数据写入到页面中,此功能用于修改装运单的时候初始化页面 **/
protected void initAllControlKit(Map map){
wareHouses = new ArrayList();
if(map.get("wareHouses.list")!=null){
wareHouses.addAll((Collection) map.get("wareHouses.list"));
}
((ListBox)wareHousesUI.getInputWidget()).clear();;
for(int i=0; i<wareHouses.size(); i++){
Long key = (Long) ((RowData) wareHouses.get(i)).getColumnValue(0);
String value = (String) ((RowData) wareHouses.get(i)).getColumnValue(1);
((ListBox) wareHousesUI.getInputWidget()).addItem(value,key.toString());
}
// wareHousesUI.initData(wareHouses.toArray());
}
protected Widget getPagePanel(){
VerticalPanel pagePanel = new VerticalPanel();
formTable = new FormTable();
initInputUIsInForm();
pagePanel.add(formTable.getForm());
pagePanel.add(new SwitchButton());
return pagePanel;
}
/** 初始化控件 **/
protected void initInputUIsInForm() {
initUserId();
initWareHouses();
}
private void initWareHouses(){
String hql = "";
/*"select w from UserGroupWarehouse uw "
+"left join uw.warehouse w"
+"left join uw.userGroup ug"
+"where ug.id in (select g.id from Group g,User user where g in elements(user.groups) and user.id = ${user.id} ) and w.disabled=false"*/;
this.wareHousesUI = this.makeListUI("wareHouse.List");
this.wareHousesUI.setRow(1);
this.wareHousesUI.setForceOverride(true);
this.wareHousesUI.setForceSpace(false);
this.wareHousesUI.setRequired(true);
this.wareHousesUI.setHql(hql);
this.wareHousesUI.setSpan(1);
this.wareHousesUI.setWidth("300px");
this.wareHousesUI.afterPropertySet();
// this.wareHousesUI.initData(new RowData[]{});
this.wareHousesUI.addToTable(this.formTable);
}
private void initUserId(){
this.userIdUI = this.makeHiddenUI("user.id",false);
this.userIdUI.addToTable(formTable);
}
/** 创建ListBox控件 **/
private ListUI makeListUI(String id){
ListUI listUI = new ListUI();
listUI.setId(id);
listUI.setTitle(LocaleUtils.getText(id));
return listUI;
}
/** 创建hidden控件 **/
public HiddenUI makeHiddenUI(String id,boolean reserve){
HiddenUI ui = new HiddenUI(id,reserve);
return ui;
}
protected class SwitchButton extends BeautyButton implements ClickListener {
SwitchButton() {
super(LocaleUtils.getText("switchWareHouse"));
this.setEnabled(true);
switchButton = this;
this.addClickListener(this);
}
public void onClick(Object obj) {
// Map map = getCommitData();
// Object wareHouseId = map.get("wareHouseId");
int index = ((ListBox)wareHousesUI.getInputWidget()).getSelectedIndex();
RowData rowData = (RowData) wareHouses.get(index);
final Object wareHouseId = rowData.getColumnValue(0);
CustomServiceAsync asyncService = (CustomServiceAsync) GWT.create(CustomService.class);
ServiceDefTarget endpoint = (ServiceDefTarget) asyncService;
String server = GWT.getModuleBaseURL()+ "*.changeWarehouse";
endpoint.setServiceEntryPoint(server);
asyncService.swichWarehouse((Long)wareHouseId , new AsyncCallback<Map>(){
public void onFailure(Throwable caught) {
}
public void onSuccess(Map result) {
ApplicationWindow.aw.context.setGlobalParams((Map<String, Object>) result.get("globals"));
ApplicationWindow.tabPanelClear();
SWMS.changeWarehouse.setText("仓库:"+result.get("warehouseName"));
hide();
}
});
// HTTPRequest.asyncGet(GWT.getModuleBaseURL()+"*.changeWarehouse?warehouseId="+wareHouseId,new ResponseTextHandler(){
// public void onCompletion(String responseText) {
// if(responseText.startsWith("success")){
// ApplicationWindow.getMyTabPanel().clear();
// SWMS.changeWarehouse.setText("仓库:"+responseText.substring(responseText.indexOf("_")+1));
// hide();
// }
// }
// });
}
}
public void release() {
}
public List<String> getLocaleMessageKeys() {
List<String> keys = new ArrayList<String>();
keys.add("switchWareHousePage");
keys.add("switchWareHouse");
keys.add("wareHouse.List");
return keys;
}
}

View File

@ -0,0 +1,64 @@
package com.dev.swms.client.ui.page;
import com.gwtext.client.dd.DragData;
import com.gwtext.client.dd.DragDrop;
import com.gwtext.client.widgets.tree.DropNodeCallback;
import com.gwtext.client.widgets.tree.TreeNode;
import com.gwtext.client.widgets.tree.TreePanel;
import com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter;
/**
*
* @author dev
* @description 西,''
*
*/
public class WestTreePanel extends TreePanel {
protected TreeNode root;
private String title;
public WestTreePanel(String title) {
this.title = title;
init();
}
protected void init() {
setTitle(title);
setWidth(170);
setCollapsible(true);
setAnimate(true);
setAutoScroll(true);
setContainerScroll(true);
setRootVisible(false);
setBorder(false);
setEnableDD(true);
setHlDrop(true);
setEnableDrop(true);
this.addListener(new TreePanelListenerAdapter() {
public boolean doBeforeNodeDrop(TreePanel treePanel,
TreeNode target, DragData dragData, String point,
DragDrop source, TreeNode dropNode,
DropNodeCallback dropNodeCallback) {
return false;
}
});
root = new TreeNode("仓库");
root.expand();
setRootNode(root);
}
public TreeNode getRoot() {
return root;
}
public void setRoot(TreeNode root) {
this.root = root;
}
}

View File

@ -0,0 +1,9 @@
package com.dev.swms.client.ui.page.service;
import java.util.Map;
import com.google.gwt.user.client.rpc.RemoteService;
public interface CustomService extends RemoteService {
public Map<String,Object> swichWarehouse(Long warehouseId) throws Exception;
}

View File

@ -0,0 +1,9 @@
package com.dev.swms.client.ui.page.service;
import java.util.Map;
import com.google.gwt.user.client.rpc.AsyncCallback;
public interface CustomServiceAsync {
void swichWarehouse(Long warehouseId , AsyncCallback<Map> callBack);
}

View File

@ -0,0 +1,215 @@
package com.dev.swms.client.ui.util;
import java.util.List;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.Window;
import com.gwtext.client.core.Ext;
import com.gwtext.client.core.TextAlign;
import com.gwtext.client.data.Record;
import com.gwtext.client.data.SimpleStore;
import com.gwtext.client.data.Store;
import com.gwtext.client.widgets.grid.CellMetadata;
import com.gwtext.client.widgets.grid.ColumnConfig;
import com.gwtext.client.widgets.grid.ColumnModel;
import com.gwtext.client.widgets.grid.Renderer;
import com.dev.swms.client.ui.constant.CT_IV;
import com.dev.swms.client.ui.javabean.JB_Location_IV;
import com.dev.swms.client.ui.javabean.JB_Location_IV_List;
import com.dev.swms.client.ui.javabean.JB_Location_Inventory;
import com.dev.swms.client.ui.javabean.JB_Location_RC_IV;
import com.dev.swms.client.ui.javabean.JB_Location_RC_IV_List;
import com.dev.energy.client.utils.LocaleUtils;
/**
*@author dev
*@version $Project:swms $Date$Version:V1.1
*/
public class Sub_L_Image_Panel_Util {
public static final int DEFAULT_WIDTH = Window.getClientWidth() - 100 ;
public static final int DEFAULT_HEIGHT = Window.getClientHeight() - 100;
public static final String DEFAULT_NAME = "l_image_panel";
public static final int DEFAULT_PROGRESS_WIDTH = 60;
public static final int DEFAULT_INVENTORY_COLUMN_WIDTH = 90;
public static final int DEFAULT_INVENTORY_ROW_HEIGHT = 20;
public static ColumnModel AL_MODEL , RC_MODEL , INV_MODEL;
public static String[] RC_COLUMN_DEFINES , AL_COLUMN_DEFINES ;
private static void initALColumnDefine(){
AL_COLUMN_DEFINES = new String[CT_IV.DEFAULT_AISLE + 1];
AL_COLUMN_DEFINES[0] = "line";
for(int i = 1 ; i <= CT_IV.DEFAULT_AISLE ; i++) {
AL_COLUMN_DEFINES[i] = "aisle_" + i;
}
}
private static void initRCColumnDefine(){
RC_COLUMN_DEFINES = new String[CT_IV.DEFAULT_COL + 1];
RC_COLUMN_DEFINES[0] = "row";
for(int i = 1 ; i <= CT_IV.DEFAULT_COL ; i++) {
RC_COLUMN_DEFINES[i] = "col_" + i;
}
}
private static void initRCColumnConfig(){
if(RC_COLUMN_DEFINES == null) initRCColumnDefine();
ColumnConfig[] rc_configs = new ColumnConfig[CT_IV.DEFAULT_COL + 1] ;
rc_configs[0] = new ColumnConfig("层\\列" , RC_COLUMN_DEFINES[0],40);
rc_configs[0].setResizable(false);
for(int i = 1 ; i <= CT_IV.DEFAULT_COL ; i++) {
rc_configs[i] = new ColumnConfig(LocaleUtils.getText(RC_COLUMN_DEFINES[i]) , RC_COLUMN_DEFINES[i] , DEFAULT_PROGRESS_WIDTH);
rc_configs[i].setRenderer(new Renderer(){
public String render(Object value, CellMetadata cellMetadata, Record record, int rowIndex, int colNum, Store store) {
return generateProgressHTML(value,cellMetadata);
}
});
rc_configs[i].setAlign(TextAlign.LEFT);
rc_configs[i].setResizable(false);
}
RC_MODEL = new ColumnModel(rc_configs);
}
private static void initALColumnConfig(){
if(AL_COLUMN_DEFINES == null) initALColumnDefine();
ColumnConfig[] al_configs= new ColumnConfig[CT_IV.DEFAULT_AISLE + 1] ;
al_configs[0] = new ColumnConfig("排\\道" , AL_COLUMN_DEFINES[0],40);
al_configs[0].setResizable(false);
for(int i = 1 ; i <= CT_IV.DEFAULT_AISLE ; i++) {
al_configs[i] = new ColumnConfig(LocaleUtils.getText(AL_COLUMN_DEFINES[i]) , AL_COLUMN_DEFINES[i] , DEFAULT_PROGRESS_WIDTH);
al_configs[i].setRenderer(new Renderer(){
public String render(Object value, CellMetadata cellMetadata, Record record, int rowIndex, int colNum, Store store) {
return generateProgressHTML(value,cellMetadata);
}
});
al_configs[i].setAlign(TextAlign.LEFT);
al_configs[i].setResizable(false);
}
AL_MODEL = new ColumnModel(al_configs);
}
private static void initInvColumnConfig(){
String[] properties = JB_Location_Inventory.propertyToArray();
ColumnConfig[] configs= new ColumnConfig[properties.length] ;
for(int i = 0 ; i < properties.length ; i++) {
configs[i] = new ColumnConfig(JB_Location_Inventory.localizedToArray()[i] , properties[i] , DEFAULT_INVENTORY_COLUMN_WIDTH);
configs[i].setRenderer(new Renderer(){
public String render(Object value, CellMetadata cellMetadata, Record record, int rowIndex, int colNum, Store store) {
cellMetadata.setHtmlAttribute("style='height:18px;border-left:1px solid #d0d0d0;'");
return value.toString();
}
});
}
INV_MODEL = new ColumnModel(configs);
}
public static ColumnModel getInvColumnModel(){
if(INV_MODEL == null){
initInvColumnConfig();
}
return INV_MODEL;
}
private static String generateProgressHTML(Object value , CellMetadata cellMetadata) {
int realWidth = Ext.isIE()?DEFAULT_PROGRESS_WIDTH : DEFAULT_PROGRESS_WIDTH - 10;
int realHeght = Ext.isIE()?DEFAULT_INVENTORY_ROW_HEIGHT : DEFAULT_INVENTORY_ROW_HEIGHT - 2;
if(value == null || "".equals(value)){
return "";
}
Double realValue = Double.valueOf(value.toString());
//不存在库位,背景为灰色
if(realValue < 0) {
cellMetadata.setHtmlAttribute("style='height:" + realHeght + "px;background:#d0d0d0;BORDER-LEFT: #d0d0d0 1px solid;'");
return "";
}
//存在库位但是容积率为0,背景为白色
if(realValue == 0) {
cellMetadata.setHtmlAttribute("style='BORDER-LEFT: #d0d0d0 1px solid;" + " height:" + realHeght + "px;width:" + realWidth + "px'");
return "";
}
realHeght = Ext.isIE()? realHeght - 1 : (realHeght - 2);
realValue = realValue >= 1? realWidth : realWidth*realValue;
cellMetadata.setHtmlAttribute(
"style='BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #d0ecff 1px solid; " +
"BORDER-LEFT: #d0ecff 1px solid; COLOR: #ffff00; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #0099ff;" +
"height:" + realHeght + "px;width:" +
NumberFormat.getFormat(CT_IV.DEFAULT_INTEGER_FORMAT).format(realValue) + "px'");
return "";
}
public static ColumnModel getRCColumnModel(){
if(RC_MODEL == null) {
initRCColumnConfig();
}
return RC_MODEL;
}
public static ColumnModel getALColumnModel(){
if(AL_MODEL == null) {
initALColumnConfig();
}
return AL_MODEL;
}
public static Store getALStore(Object[][] objss){
SimpleStore store = new SimpleStore(AL_COLUMN_DEFINES,objss);
store.load();
return store;
}
public static Store getRCStore(Object[][] objss) {
SimpleStore store = new SimpleStore(RC_COLUMN_DEFINES,objss);
store.load();
return store;
}
public static Store getInvStore(Object[][] objss) {
SimpleStore store = new SimpleStore(JB_Location_Inventory.propertyToArray(),objss);
store.load();
return store;
}
public static Object[][] convertToAL2Array(List<JB_Location_IV_List> livs) {
Object[][] objss = new Object[CT_IV.DEFAULT_LINE][];
for(int line = 0; line < CT_IV.DEFAULT_LINE ; line++) {
objss[line] = livs.get(line).toArray();
}
return objss;
}
public static Object[][] convertToRC2Array(List<JB_Location_RC_IV_List> lrivs) {
Object[][] objss = new Object[CT_IV.DEFAULT_ROW][];
for(int row = 0; row < CT_IV.DEFAULT_ROW ; row++) {
objss[row] = lrivs.get(row).toArray();
}
return objss;
}
public static Object[][] convertToInv2Array(List<JB_Location_Inventory> lis) {
Object[][] objss = new Object[lis.size()][];
for(int row = 0; row < lis.size() ; row++) {
objss[row] = lis.get(row).toArray();
}
return objss;
}
public static String generateToolTip(JB_Location_IV iv) {
String disValue = "<table width='100%'>" +
"<tr><td style='text-aglin:left;'>库存容积:" + NumberFormat.getFormat(CT_IV.DEFAULT_PERCENT_FORMAT).format(iv.getLoc_rate()) + "</td></tr>" +
"<tr><td style='text-aglin:left;'>库位道:" + iv.getLoc_aisle() + "</td></tr>" +
"<tr><td style='text-aglin:left;'>库位排:" + iv.getLoc_line() + "</td></tr></table>";
return disValue;
}
public static String generateToolTip(JB_Location_RC_IV lriv) {
String[] realValues = lriv.toTipArray();
String disValue = "<table width='100%'>" +
"<tr><td style='text-aglin:left;'>库存容积:" + NumberFormat.getFormat(CT_IV.DEFAULT_PERCENT_FORMAT).format(lriv.getRate()) + "</td></tr>" +
"<tr><td style='text-aglin:left;'>库位编码:" + realValues[0] + "</td></tr>" +
"<tr><td style='text-aglin:left;'>长x宽x高" + realValues[1] + "x" + realValues[2] + "x" + realValues[3] + "</td></tr>" +
"<tr><td style='text-aglin:left;'>件数x重量x体积x托数" + realValues[4] + "x" + realValues[5] + "x" + realValues[6] + "x" + realValues[7] + "</td></tr>" +
"<tr><td style='text-aglin:left;'>额定库满度:" + realValues[8]+"</td></tr></table>";
return disValue;
}
}

Some files were not shown because too many files have changed in this diff Show More