瀏覽代碼

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

zhoudw 7 年之前
父節點
當前提交
dcd0485abd
共有 70 個文件被更改,包括 1380 次插入795 次删除
  1. 6 0
      base-servers/account/account-server/pom.xml
  2. 2 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java
  3. 6 6
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/CompanyMapper.java
  4. 0 24
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/Resources.java
  5. 6 6
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/CompanyService.java
  6. 4 4
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/CompanyServiceImpl.java
  7. 17 2
      base-servers/account/account-server/src/main/resources/application.yml
  8. 4 1
      base-servers/account/account-server/src/main/resources/config/application-docker.yml
  9. 4 11
      base-servers/account/account-server/src/main/resources/mapper/AccountMapper.xml
  10. 14 15
      base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml
  11. 43 0
      base-servers/account/account-server/src/test/java/com/usoftchina/saas/account/test/CompanyTest.java
  12. 1 1
      base-servers/auth/auth-server/src/main/resources/application.yml
  13. 1 0
      framework/pom.xml
  14. 25 0
      framework/test-starter/pom.xml
  15. 18 0
      framework/test-starter/src/main/java/com.usoftchina.saas.test/DefaultContextHolderListener.java
  16. 3 0
      framework/test-starter/src/main/resources/META-INF/spring.factories
  17. 27 28
      frontend/saas-web/app/view/core/query/QueryPanel.js
  18. 0 1
      frontend/saas-web/app/view/core/query/QueryPanelModel.js
  19. 40 39
      frontend/saas-web/app/view/main/Navigation.js
  20. 0 9
      frontend/saas-web/app/view/purchase/list/GridPanel.js
  21. 0 9
      frontend/saas-web/app/view/purchase/list/GridPanel1.js
  22. 0 9
      frontend/saas-web/app/view/purchase/list/GridPanel2.js
  23. 0 26
      frontend/saas-web/app/view/purchase/list/ListController.js
  24. 0 12
      frontend/saas-web/app/view/purchase/list/ListController1.js
  25. 0 12
      frontend/saas-web/app/view/purchase/list/ListController2.js
  26. 0 6
      frontend/saas-web/app/view/purchase/order/FormController.js
  27. 0 15
      frontend/saas-web/app/view/purchase/order/FormModel.js
  28. 0 10
      frontend/saas-web/app/view/purchase/order/FormPanel.js
  29. 0 22
      frontend/saas-web/app/view/purchase/panel/FormPanel.js
  30. 0 25
      frontend/saas-web/app/view/purchase/panel/FormPanelController.js
  31. 0 11
      frontend/saas-web/app/view/purchase/panel/GridPanel.js
  32. 1 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  33. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormController.js
  34. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormModel.js
  35. 5 5
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  36. 14 14
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  37. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  38. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelModel.js
  39. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormController.js
  40. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormModel.js
  41. 5 5
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  42. 14 14
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  43. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  44. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelModel.js
  45. 16 17
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  46. 11 11
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  47. 39 25
      frontend/saas-web/app/view/sale/saleIn/FormController.js
  48. 5 3
      frontend/saas-web/app/view/sale/saleIn/FormModel.js
  49. 123 113
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  50. 114 115
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  51. 6 52
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  52. 2 2
      frontend/saas-web/app/view/sale/saleIn/QueryPanelModel.js
  53. 147 0
      frontend/saas-web/app/view/sale/saleOut/FormController.js
  54. 7 0
      frontend/saas-web/app/view/sale/saleOut/FormModel.js
  55. 264 0
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  56. 205 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  57. 68 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  58. 4 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanelModel.js
  59. 0 5
      frontend/saas-web/app/view/sale/salelist/FormController.js
  60. 0 12
      frontend/saas-web/app/view/sale/salelist/FormModel.js
  61. 0 30
      frontend/saas-web/app/view/sale/salelist/GridController1.js
  62. 0 14
      frontend/saas-web/app/view/sale/salelist/GridController2.js
  63. 1 1
      frontend/saas-web/app/view/storage/prodInOutOtherIn/FormController.js
  64. 1 1
      frontend/saas-web/app/view/storage/prodInOutOtherIn/FormModel.js
  65. 3 3
      frontend/saas-web/app/view/storage/prodInOutOtherIn/FormPanel.js
  66. 13 14
      frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanel.js
  67. 1 1
      frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanelController.js
  68. 1 1
      frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanelModel.js
  69. 5 0
      pom.xml
  70. 76 24
      script/mysql/init/account.sql

+ 6 - 0
base-servers/account/account-server/pom.xml

@@ -43,6 +43,12 @@
             <groupId>net.logstash.logback</groupId>
             <groupId>net.logstash.logback</groupId>
             <artifactId>logstash-logback-encoder</artifactId>
             <artifactId>logstash-logback-encoder</artifactId>
         </dependency>
         </dependency>
+        <!-- test -->
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>test-starter</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
     </dependencies>
     <build>
     <build>
         <plugins>
         <plugins>

+ 2 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account;
 package com.usoftchina.saas.account;
 
 
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@@ -12,6 +13,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 @SpringBootApplication
 @SpringBootApplication
 @EnableEurekaClient
 @EnableEurekaClient
 @EnableTransactionManagement
 @EnableTransactionManagement
+@MapperScan(basePackages = "com.usoftchina.saas.account.mapper")
 public class AccountApplication {
 public class AccountApplication {
     public static void main(String[] args) {
     public static void main(String[] args) {
         SpringApplication.run(AccountApplication.class, args);
         SpringApplication.run(AccountApplication.class, args);

+ 6 - 6
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/CompanyMapper.java

@@ -44,18 +44,18 @@ public interface CompanyMapper {
     Company selectByBusinessCode(@Param("businessCode") String businessCode);
     Company selectByBusinessCode(@Param("businessCode") String businessCode);
 
 
     /**
     /**
-     * 按二级域名查找
+     * 按个人账户ID查找全部绑定企业基础信息
      *
      *
-     * @param domain
+     * @param accountId
      * @return
      * @return
      */
      */
-    Company selectByDomain(@Param("domain") String domain);
+    List<CompanyBaseVO> selectBaseByAccountId(@Param("accountId") Long accountId);
 
 
     /**
     /**
-     * 按个人账户ID查找全部绑定企业基础信息
+     * 删除
      *
      *
-     * @param accountId
+     * @param id
      * @return
      * @return
      */
      */
-    List<CompanyBaseVO> selectBaseByAccountId(@Param("accountId") Long accountId);
+    int deleteByPrimaryKey(@Param("id") Long id);
 }
 }

+ 0 - 24
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/Resources.java

@@ -37,14 +37,6 @@ public class Resources extends CommonBaseEntity implements Serializable {
      * 资源请求方式 POST/GET/PUT/DELETE
      * 资源请求方式 POST/GET/PUT/DELETE
      */
      */
     private String method;
     private String method;
-    /**
-     * 菜单打开方式 _self,_top,_blank,_parent
-     */
-    private String target;
-    /**
-     * 菜单图标
-     */
-    private String icon;
 
 
     /**
     /**
      * 排序
      * 排序
@@ -96,22 +88,6 @@ public class Resources extends CommonBaseEntity implements Serializable {
         this.method = method;
         this.method = method;
     }
     }
 
 
-    public String getTarget() {
-        return target;
-    }
-
-    public void setTarget(String target) {
-        this.target = target;
-    }
-
-    public String getIcon() {
-        return icon;
-    }
-
-    public void setIcon(String icon) {
-        this.icon = icon;
-    }
-
     public Integer getOrderNum() {
     public Integer getOrderNum() {
         return orderNum;
         return orderNum;
     }
     }

+ 6 - 6
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/CompanyService.java

@@ -35,18 +35,18 @@ public interface CompanyService {
     Company findByBusinessCode(String businessCode);
     Company findByBusinessCode(String businessCode);
 
 
     /**
     /**
-     * 按二级域名查
+     * 按个人账户查找全部绑定企业
      *
      *
-     * @param domain
+     * @param accountId
      * @return
      * @return
      */
      */
-    Company findByDomain(String domain);
+    List<CompanyBaseVO> findBaseByAccountId(Long accountId);
 
 
     /**
     /**
-     * 按个人账户查找全部绑定企业
+     * 删除
      *
      *
-     * @param accountId
+     * @param id
      * @return
      * @return
      */
      */
-    List<CompanyBaseVO> findBaseByAccountId(Long accountId);
+    boolean removeByPrimaryKey(Long id);
 }
 }

+ 4 - 4
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/CompanyServiceImpl.java

@@ -43,12 +43,12 @@ public class CompanyServiceImpl implements CompanyService{
     }
     }
 
 
     @Override
     @Override
-    public Company findByDomain(String domain) {
-        return companyMapper.selectByDomain(domain);
+    public List<CompanyBaseVO> findBaseByAccountId(Long accountId) {
+        return companyMapper.selectBaseByAccountId(accountId);
     }
     }
 
 
     @Override
     @Override
-    public List<CompanyBaseVO> findBaseByAccountId(Long accountId) {
-        return companyMapper.selectBaseByAccountId(accountId);
+    public boolean removeByPrimaryKey(Long id) {
+        return companyMapper.deleteByPrimaryKey(id) > 0;
     }
     }
 }
 }

+ 17 - 2
base-servers/account/account-server/src/main/resources/application.yml

@@ -7,8 +7,23 @@ spring:
     user:
     user:
       name: admin
       name: admin
       password: select111***
       password: select111***
+  rabbitmq:
+    host: 192.168.0.176
+    port: 5672
+    virtual-host: dev
+    username: saas
+    password: select123***
+  zipkin:
+    sender:
+      type: rabbit
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      probability: 1.0
   datasource:
   datasource:
-    driver-class-name: com.mysql.jdbc.Driver
+    driver-class-name: com.mysql.cj.jdbc.Driver
     url: jdbc:mysql://192.168.253.12:3306/saas_account?characterEncoding=utf-8&useSSL=false
     url: jdbc:mysql://192.168.253.12:3306/saas_account?characterEncoding=utf-8&useSSL=false
     username: root
     username: root
     password: select111***
     password: select111***
@@ -31,7 +46,7 @@ eureka:
   client:
   client:
     registryFetchIntervalSeconds: 5
     registryFetchIntervalSeconds: 5
     serviceUrl:
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8500/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
 server:
 server:
   port: 8580
   port: 8580
   tomcat:
   tomcat:

+ 4 - 1
base-servers/account/account-server/src/main/resources/config/application-docker.yml

@@ -4,4 +4,7 @@ eureka:
     prefer-ip-address: false
     prefer-ip-address: false
   client:
   client:
     serviceUrl:
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server:8500/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server:8500/eureka/
+spring:
+  rabbitmq:
+    virtual-host: docker

+ 4 - 11
base-servers/account/account-server/src/main/resources/mapper/AccountMapper.xml

@@ -3,14 +3,13 @@
 <mapper namespace="com.usoftchina.saas.account.mapper.AccountMapper">
 <mapper namespace="com.usoftchina.saas.account.mapper.AccountMapper">
     <resultMap id="BaseResultMap" type="com.usoftchina.saas.account.po.Account">
     <resultMap id="BaseResultMap" type="com.usoftchina.saas.account.po.Account">
         <id column="id" jdbcType="BIGINT" property="id"/>
         <id column="id" jdbcType="BIGINT" property="id"/>
-        <result column="company_id" jdbcType="BIGINT" property="companyId"/>
         <result column="username" jdbcType="VARCHAR" property="username"/>
         <result column="username" jdbcType="VARCHAR" property="username"/>
         <result column="password" jdbcType="VARCHAR" property="password"/>
         <result column="password" jdbcType="VARCHAR" property="password"/>
         <result column="salt" jdbcType="VARCHAR" property="salt"/>
         <result column="salt" jdbcType="VARCHAR" property="salt"/>
         <result column="realname" jdbcType="VARCHAR" property="realname"/>
         <result column="realname" jdbcType="VARCHAR" property="realname"/>
         <result column="email" jdbcType="VARCHAR" property="email"/>
         <result column="email" jdbcType="VARCHAR" property="email"/>
         <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
         <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
-        <result column="type" jdbcType="INT" property="type"/>
+        <result column="type" jdbcType="INTEGER" property="type"/>
         <result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
         <result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
         <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
         <result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
@@ -20,17 +19,14 @@
         id,company_id,username,password,salt,realname,email,mobile,type,creator_id,create_time,updater_id,update_time
         id,company_id,username,password,salt,realname,email,mobile,type,creator_id,create_time,updater_id,update_time
     </sql>
     </sql>
     <insert id="insert" parameterType="com.usoftchina.saas.account.po.Account">
     <insert id="insert" parameterType="com.usoftchina.saas.account.po.Account">
-        insert into ac_account(company_id,username,password,salt,realname,email,mobile,type,creator_id,create_time,updater_id,update_time)
-        values (#{companyId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR},#{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR},
-        #{realname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{type,jdbcType=INT},
+        insert into ac_account(username,password,salt,realname,email,mobile,type,creator_id,create_time,updater_id,update_time)
+        values (#{username,jdbcType=VARCHAR},#{password,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR},
+        #{realname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
         #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
         #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
     </insert>
     </insert>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Account">
     <insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Account">
         insert into ac_account
         insert into ac_account
         <trim prefix="(" suffix=")" suffixOverrides=",">
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="companyId != null">
-                company_id,
-            </if>
             <if test="username != null">
             <if test="username != null">
                 username,
                 username,
             </if>
             </if>
@@ -66,9 +62,6 @@
             </if>
             </if>
         </trim>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="companyId != null">
-                #{companyId,jdbcType=BIGINT},
-            </if>
             <if test="username != null">
             <if test="username != null">
                 #{username,jdbcType=VARCHAR},
                 #{username,jdbcType=VARCHAR},
             </if>
             </if>

+ 14 - 15
base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml

@@ -6,7 +6,6 @@
         <result column="name" jdbcType="VARCHAR" property="name"/>
         <result column="name" jdbcType="VARCHAR" property="name"/>
         <result column="business_code" jdbcType="VARCHAR" property="businessCode"/>
         <result column="business_code" jdbcType="VARCHAR" property="businessCode"/>
         <result column="address" jdbcType="VARCHAR" property="address"/>
         <result column="address" jdbcType="VARCHAR" property="address"/>
-        <result column="domain" jdbcType="VARCHAR" property="domain"/>
         <result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
         <result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
         <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
         <result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
@@ -18,12 +17,12 @@
         <result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
         <result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
     </resultMap>
     </resultMap>
     <sql id="baseColumns">
     <sql id="baseColumns">
-        id,name,business_code,address,domain,creator_id,create_time,updater_id,update_time
+        id,name,business_code,address,creator_id,create_time,updater_id,update_time
     </sql>
     </sql>
     <insert id="insert" parameterType="com.usoftchina.saas.account.po.Company">
     <insert id="insert" parameterType="com.usoftchina.saas.account.po.Company">
-        insert into ac_company(name, business_code, address, domain, creator_id, create_time, updater_id, update_time)
+        insert into ac_company(name, business_code, address, logo_url, creator_id, create_time, updater_id, update_time)
         values (#{name,jdbcType=VARCHAR}, #{businessCode,jdbcType=VARCHAR},
         values (#{name,jdbcType=VARCHAR}, #{businessCode,jdbcType=VARCHAR},
-        #{address,jdbcType=VARCHAR}, #{domain,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
+        #{address,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
         #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
         #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
     </insert>
     </insert>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Company">
     <insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Company">
@@ -38,19 +37,19 @@
             <if test="address != null">
             <if test="address != null">
                 address,
                 address,
             </if>
             </if>
-            <if test="domain != null">
-                domain,
+            <if test="logoUrl != null">
+                logo_url,
             </if>
             </if>
-            <if test="creator_id != null">
+            <if test="creatorId != null">
                 creator_id,
                 creator_id,
             </if>
             </if>
-            <if test="create_time != null">
+            <if test="createTime != null">
                 create_time,
                 create_time,
             </if>
             </if>
-            <if test="updater_id != null">
+            <if test="updaterId != null">
                 updater_id,
                 updater_id,
             </if>
             </if>
-            <if test="update_time != null">
+            <if test="updateTime != null">
                 update_time,
                 update_time,
             </if>
             </if>
         </trim>
         </trim>
@@ -64,8 +63,8 @@
             <if test="address != null">
             <if test="address != null">
                 #{address,jdbcType=VARCHAR},
                 #{address,jdbcType=VARCHAR},
             </if>
             </if>
-            <if test="domain != null">
-                #{domain,jdbcType=VARCHAR},
+            <if test="logoUrl != null">
+                #{logoUrl,jdbcType=VARCHAR},
             </if>
             </if>
             <if test="creatorId != null">
             <if test="creatorId != null">
                 #{creatorId,jdbcType=BIGINT},
                 #{creatorId,jdbcType=BIGINT},
@@ -87,11 +86,11 @@
     <select id="selectByBusinessCode" parameterType="java.lang.String" resultMap="FullResultMap">
     <select id="selectByBusinessCode" parameterType="java.lang.String" resultMap="FullResultMap">
         select <include refid="baseColumns"/> from ac_company where business_code=#{businessCode}
         select <include refid="baseColumns"/> from ac_company where business_code=#{businessCode}
     </select>
     </select>
-    <select id="selectByDomain" parameterType="java.lang.String" resultMap="FullResultMap">
-        select <include refid="baseColumns"/> from ac_company where domain=#{domain}
-    </select>
     <select id="selectBaseByAccountId" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <select id="selectBaseByAccountId" parameterType="java.lang.Long" resultMap="BaseResultMap">
         select ac_company.id,ac_company.name,ac_company.logo_url from ac_account_company,ac_company
         select ac_company.id,ac_company.name,ac_company.logo_url from ac_account_company,ac_company
         where ac_account_company.company_id=ac_company.id and ac_account_company.account_id=#{accountId}
         where ac_account_company.company_id=ac_company.id and ac_account_company.account_id=#{accountId}
     </select>
     </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+        delete from ac_company where id=#{id}
+    </delete>
 </mapper>
 </mapper>

+ 43 - 0
base-servers/account/account-server/src/test/java/com/usoftchina/saas/account/test/CompanyTest.java

@@ -0,0 +1,43 @@
+package com.usoftchina.saas.account.test;
+
+import com.usoftchina.saas.account.po.Company;
+import com.usoftchina.saas.account.service.CompanyService;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+/**
+ * @author yingp
+ * @date 2018/10/22
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class CompanyTest {
+
+    @Autowired
+    private CompanyService companyService;
+
+    private final String name = "spring.test";
+
+    @Test
+    public void addCompany() {
+        Company company = new Company();
+        company.setName(name);
+        company.setBusinessCode("T00000000000000000");
+        company.setAddress("深圳市南山区粤海街道高新技术产业园科技南五路英唐大厦六楼");
+        company.setLogoUrl("https://co-image.qichacha.com/CompanyImage/104eb3c232bbac93393a5e204d6a47d1.jpg?x-oss-process=style/qcc_cmp");
+
+        companyService.save(company);
+    }
+
+    @After
+    public void deleteCompany() {
+        Company company = companyService.findByName(name);
+        if (null != company) {
+            companyService.removeByPrimaryKey(company.getId());
+        }
+    }
+}

+ 1 - 1
base-servers/auth/auth-server/src/main/resources/application.yml

@@ -26,7 +26,7 @@ eureka:
   client:
   client:
     registryFetchIntervalSeconds: 5
     registryFetchIntervalSeconds: 5
     serviceUrl:
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
 server:
 server:
   port: 8580
   port: 8580
   tomcat:
   tomcat:

+ 1 - 0
framework/pom.xml

@@ -15,6 +15,7 @@
     <modules>
     <modules>
         <module>core</module>
         <module>core</module>
         <module>server-starter</module>
         <module>server-starter</module>
+        <module>test-starter</module>
     </modules>
     </modules>
 
 
 </project>
 </project>

+ 25 - 0
framework/test-starter/pom.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>framework</artifactId>
+        <groupId>com.usoftchina.saas</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>test-starter</artifactId>
+    <description>test starter</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 18 - 0
framework/test-starter/src/main/java/com.usoftchina.saas.test/DefaultContextHolderListener.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.test;
+
+import com.usoftchina.saas.context.BaseContextHolder;
+import org.springframework.test.context.TestContext;
+import org.springframework.test.context.support.AbstractTestExecutionListener;
+
+/**
+ * @author yingp
+ * @date 2018/10/22
+ */
+public class DefaultContextHolderListener extends AbstractTestExecutionListener {
+    @Override
+    public void beforeTestClass(TestContext testContext) throws Exception {
+        // 设置测试环境默认用户
+        BaseContextHolder.setCompanyId(1);
+        BaseContextHolder.setUserId(1);
+    }
+}

+ 3 - 0
framework/test-starter/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,3 @@
+# Test Execution Listeners
+org.springframework.test.context.TestExecutionListener=\
+com.usoftchina.saas.test.DefaultContextHolderListener

+ 27 - 28
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -55,9 +55,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
             var bind = item.bind,
             var bind = item.bind,
             name = item.name,
             name = item.name,
             ignore = item.ignore,
             ignore = item.ignore,
-            defaultValue = item.defaultValue,
-            showDetail = item.showDetail,
-            shwoDetailFunc = item.shwoDetailFunc;
+            defaultValue = item.defaultValue;
 
 
             if(!item.columnWidth){
             if(!item.columnWidth){
                 item.columnWidth = 0.25;
                 item.columnWidth = 0.25;
@@ -83,12 +81,6 @@ Ext.define('saas.view.core.query.QueryPanel', {
                 if(defaultValue) {
                 if(defaultValue) {
                     viewModel.set('form.' + bind, defaultValue);
                     viewModel.set('form.' + bind, defaultValue);
                 }
                 }
-                // 设置关联列表
-                if(showDetail) {
-                    var fields = viewModel.get('showDetailFields');
-                    fields.push(bind);
-                    viewModel.set('showDetailFields', fields);
-                }
             }
             }
         });
         });
 
 
@@ -214,28 +206,35 @@ Ext.define('saas.view.core.query.QueryPanel', {
         viewModel = me.getViewModel(),
         viewModel = me.getViewModel(),
         viewModelData = viewModel.getData(),
         viewModelData = viewModel.getData(),
         formData = viewModelData['form'],
         formData = viewModelData['form'],
-        showDetailFields = viewModelData['showDetailFields'],
-        detailModel;
+        detailModel = false;
 
 
-        detailModel = !!Ext.Array.findBy(showDetailFields, function(name) {
-            var item = Ext.Array.findBy(formItems, function(i) {
-                var b = i.bind, bname;
-                if(!Ext.isString(b)) {
-                    bname = b.value.replace(/[{|}]/g, '').split('.')[1];
-                }else {
-                    bname = b.replace(/[{|}]/g, '').split('.')[1];
-                }
-                return bname == name;
-            });
-            if(!item) {
-                return false;
+        for(var i = 0; i < formItems.length; i++) {
+            var item = formItems[i],
+            showDetail = item.showDetail,
+            isShowDetail = item.isShowDetail,
+            b = item.bind, bname;
+
+            if(!Ext.isString(b)) {
+                bname = b.value.replace(/[{|}]/g, '').split('.')[1];
+            }else {
+                bname = b.replace(/[{|}]/g, '').split('.')[1];
             }
             }
-            var isShowDetail = item.isShowDetail || function(value) {
-                return !!value;
+
+            var value = formData[bname];
+
+            if(showDetail) {
+                isShowDetail = isShowDetail || function(value) {
+                    return !!value;
+                };
+                if(!Ext.isFunction(isShowDetail)) {
+                    console.warn('field ' + item.name + '\'s property \'isShowDetail\' must been a function.');
+                }
+                if(isShowDetail(value)) {
+                    detailModel = true
+                    break;
+                }
             }
             }
-            var value = formData[name];
-            return isShowDetail(value);
-        });
+        }
 
 
         return detailModel ? 'DETAIL' : 'MAIN';
         return detailModel ? 'DETAIL' : 'MAIN';
     }
     }

+ 0 - 1
frontend/saas-web/app/view/core/query/QueryPanelModel.js

@@ -4,6 +4,5 @@ Ext.define('saas.view.core.query.QueryPanelModel', {
 
 
     data: {
     data: {
         form: {}, // 查询字段记录
         form: {}, // 查询字段记录
-        showDetailFields: [], // 关联列表切换字段
     }
     }
 });
 });

+ 40 - 39
frontend/saas-web/app/view/main/Navigation.js

@@ -26,13 +26,13 @@ Ext.define('saas.view.main.Navigation', {
                             }, {
                             }, {
                                 id: 'purchaseIn',
                                 id: 'purchaseIn',
                                 text: '采购验收单',
                                 text: '采购验收单',
-                                addType: 'purchase-purchaseIn-formpanel',
-                                viewType: 'purchase-purchaseIn-querypanel'
+                                addType: 'purchase-purchasein-formpanel',
+                                viewType: 'purchase-purchasein-querypanel'
                             }, {
                             }, {
                                 id: 'purchaseOut',
                                 id: 'purchaseOut',
                                 text: '采购验退单',
                                 text: '采购验退单',
-                                addType: 'purchase-purchaseOut-formpanel',
-                                viewType: 'purchase-purchaseOut-querypanel'
+                                addType: 'purchase-purchaseout-formpanel',
+                                viewType: 'purchase-purchaseout-querypanel'
                             }, {
                             }, {
                                 id: 'inquiry',
                                 id: 'inquiry',
                                 text: '采购询价单',
                                 text: '采购询价单',
@@ -74,18 +74,18 @@ Ext.define('saas.view.main.Navigation', {
                         }, {
                         }, {
                             id: 'saleOut',
                             id: 'saleOut',
                             text: '销售出货单',
                             text: '销售出货单',
-                            addType: 'sale-saleOut-formpanel',
-                            viewType: 'sale-saleOut-querypanel'
+                            addType: 'sale-saleout-formpanel',
+                            viewType: 'sale-saleout-querypanel'
                         }, {
                         }, {
                             id: 'saleIn',
                             id: 'saleIn',
                             text: '销售退货单',
                             text: '销售退货单',
-                            addType: 'sale-saleIn-formpanel',
-                            viewType: 'sale-saleIn-querypanel'
+                            addType: 'sale-salein-formpanel',
+                            viewType: 'sale-salein-querypanel'
                         }, {
                         }, {
                             id: 'saleToPur',
                             id: 'saleToPur',
                             text: '以销定购',
                             text: '以销定购',
-                            addType: 'sale-saleToPur-formpanel',
-                            viewType: 'sale-saleToPur-querypanel'
+                            addType: 'sale-saletopur-formpanel',
+                            viewType: 'sale-saletopur-querypanel'
                         }]
                         }]
                     }, {
                     }, {
                         text: '报表',
                         text: '报表',
@@ -105,8 +105,8 @@ Ext.define('saas.view.main.Navigation', {
                         items: [{
                         items: [{
                             id: 'appropriationInOut',
                             id: 'appropriationInOut',
                             text: '调拨单',
                             text: '调拨单',
-                            addType: 'stock-appropriationInOut-formpanel',
-                            viewType: 'stock-appropriationInOut-querypanel'
+                            addType: 'stock-appropriationinout-formpanel',
+                            viewType: 'stock-appropriationinout-querypanel'
                         }, {
                         }, {
                             id: 'make',
                             id: 'make',
                             text: '制造单',
                             text: '制造单',
@@ -115,13 +115,13 @@ Ext.define('saas.view.main.Navigation', {
                         }, {
                         }, {
                             id: 'otherIn',
                             id: 'otherIn',
                             text: '其它入库单',
                             text: '其它入库单',
-                            addType: 'stock-otherIn-formpanel',
-                            viewType: 'stock-otherIn-querypanel'
+                            addType: 'stock-otherin-formpanel',
+                            viewType: 'stock-otherin-querypanel'
                         }, {
                         }, {
                             id: 'otherOut',
                             id: 'otherOut',
                             text: '其它出库单',
                             text: '其它出库单',
-                            addType: 'stock-otherOut-formpanel',
-                            viewType: 'stock-otherOut-querypanel'
+                            addType: 'stock-otherout-formpanel',
+                            viewType: 'stock-otherout-querypanel'
                         }, {
                         }, {
                             id: 'inventory',
                             id: 'inventory',
                             text: '盘点单',
                             text: '盘点单',
@@ -146,13 +146,13 @@ Ext.define('saas.view.main.Navigation', {
                         items: [{
                         items: [{
                             id: 'payBalance',
                             id: 'payBalance',
                             text: '付款单',
                             text: '付款单',
-                            addType: 'money-payBalance-formpanel',
-                            viewType: 'money-payBalance-querypanel'
+                            addType: 'money-paybalance-formpanel',
+                            viewType: 'money-paybalance-querypanel'
                         }, {
                         }, {
                             id: 'recBbalance',
                             id: 'recBbalance',
                             text: '收款单',
                             text: '收款单',
-                            addType: 'money-recBbalance-formpanel',
-                            viewType: 'money-recBbalance-querypanel'
+                            addType: 'money-recbalance-formpanel',
+                            viewType: 'money-recbalance-querypanel'
                         }, {
                         }, {
                             id: 'verification',
                             id: 'verification',
                             text: '核销单',
                             text: '核销单',
@@ -161,13 +161,13 @@ Ext.define('saas.view.main.Navigation', {
                         }, {
                         }, {
                             id: 'othReceipts',
                             id: 'othReceipts',
                             text: '其它收支单',
                             text: '其它收支单',
-                            addType: 'money-othReceipts-formpanel',
-                            viewType: 'money-othReceipts-querypanel'
+                            addType: 'money-othreceipts-formpanel',
+                            viewType: 'money-othreceipts-querypanel'
                         }, {
                         }, {
                             id: 'fundTransfer',
                             id: 'fundTransfer',
                             text: '资金转存',
                             text: '资金转存',
-                            addType: 'money-fundTransfer-formpanel',
-                            viewType: 'money-fundTransfer-querypanel'
+                            addType: 'money-fundtransfer-formpanel',
+                            viewType: 'money-fundtransfer-querypanel'
                         }]
                         }]
                     }, {
                     }, {
                         text: '报表',
                         text: '报表',
@@ -325,7 +325,8 @@ Ext.define('saas.view.main.Navigation', {
     },
     },
 
 
     showNavMenu: function (view, record, item, index, e, eOpts) {
     showNavMenu: function (view, record, item, index, e, eOpts) {
-        var recData = record.data,
+        var me = this,
+            recData = record.data,
             menuItems = recData.items || [],
             menuItems = recData.items || [],
             itemBox = item.getBoundingClientRect(),
             itemBox = item.getBoundingClientRect(),
             pos = [itemBox.left + itemBox.width, itemBox.top],
             pos = [itemBox.left + itemBox.width, itemBox.top],
@@ -395,15 +396,15 @@ Ext.define('saas.view.main.Navigation', {
                             Ext.Array.each(menuItemText, function (item) {
                             Ext.Array.each(menuItemText, function (item) {
                                 item.addEventListener('click', function (e) {
                                 item.addEventListener('click', function (e) {
                                     var target = e.target,
                                     var target = e.target,
-                                    dataset = target.dataset,
-                                    viewType = dataset.viewtype,
-                                    type = dataset.type,
-                                    text = dataset.text,
-                                    id = dataset.id;
+                                        dataset = target.dataset,
+                                        viewType = dataset.viewtype,
+                                        type = dataset.type,
+                                        text = dataset.text,
+                                        id = dataset.id;
 
 
                                     var tabTitle = text + (type == 'form' ? '' : '查询'),
                                     var tabTitle = text + (type == 'form' ? '' : '查询'),
-                                    tabId = 'maintab-' + type + '-' + id;
-        
+                                        tabId = 'maintab-' + type + '-' + id;
+
                                     openTab(viewType, tabTitle, tabId);
                                     openTab(viewType, tabTitle, tabId);
                                     menu.hide();
                                     menu.hide();
                                 });
                                 });
@@ -411,15 +412,15 @@ Ext.define('saas.view.main.Navigation', {
                             Ext.Array.each(menuItemIcon, function (item) {
                             Ext.Array.each(menuItemIcon, function (item) {
                                 item.addEventListener('click', function (e) {
                                 item.addEventListener('click', function (e) {
                                     var target = e.target,
                                     var target = e.target,
-                                    dataset = target.dataset,
-                                    viewType = dataset.viewtype,
-                                    type = dataset.type,
-                                    text = dataset.text,
-                                    id = dataset.id;
+                                        dataset = target.dataset,
+                                        viewType = dataset.viewtype,
+                                        type = dataset.type,
+                                        text = dataset.text,
+                                        id = dataset.id;
 
 
                                     var tabTitle = text + (type == 'form' ? '' : '查询'),
                                     var tabTitle = text + (type == 'form' ? '' : '查询'),
-                                    tabId = 'maintab-' + type + '-' + id;
-        
+                                        tabId = 'maintab-' + type + '-' + id;
+
                                     openTab(viewType, tabTitle, tabId);
                                     openTab(viewType, tabTitle, tabId);
                                     menu.hide();
                                     menu.hide();
                                 });
                                 });

+ 0 - 9
frontend/saas-web/app/view/purchase/list/GridPanel.js

@@ -1,9 +0,0 @@
-Ext.define('saas.view.purchase.list.GridPanel', {
-    extend: 'saas.view.core.grid.GridPanel',
-    xtype: 'purchase-list-gridpanel',
-
-    controller: 'purchase-list-listcontroller',
-    
-    configUrl: 'resources/json/gridColumns1.json',
-    dataUrl: 'resources/json/gridData1.json'
-});

+ 0 - 9
frontend/saas-web/app/view/purchase/list/GridPanel1.js

@@ -1,9 +0,0 @@
-Ext.define('saas.view.purchase.list.GridPanel1', {
-    extend: 'saas.view.core.grid.GridPanel',
-    xtype: 'purchase-list-gridpanel1',
-
-    controller: 'purchase-list-listcontroller1',
-    
-    configUrl: 'resources/json/gridColumns1.json',
-    dataUrl: 'resources/json/gridData1.json'
-});

+ 0 - 9
frontend/saas-web/app/view/purchase/list/GridPanel2.js

@@ -1,9 +0,0 @@
-Ext.define('saas.view.purchase.list.GridPanel2', {
-    extend: 'saas.view.core.grid.GridPanel',
-    xtype: 'purchase-list-gridpanel2',
-
-    controller: 'purchase-list-listcontroller2',
-    
-    configUrl: 'resources/json/gridColumns2.json',
-    dataUrl: 'resources/json/gridData2.json'
-});

+ 0 - 26
frontend/saas-web/app/view/purchase/list/ListController.js

@@ -1,26 +0,0 @@
-Ext.define('saas.view.purchase.list.ListController', {
-    extend: 'saas.view.core.grid.GridPanelController',
-    alias: 'controller.purchase-list-listcontroller',
-
-    control: {
-        'grid': {
-            itemClick: function(view,record) {
-                console.log('grid1: click.....');
-                var id = record.get('id');
-                var mainTab = Ext.getCmp('main-tab-panel');
-                var title = '采购单明细',
-                existingItem = mainTab.down('[id=' + id + ']');
-
-                lastView = mainTab.getActiveTab();
-
-                if (!existingItem) {
-                    var form = Ext.create('saas.view.purchase.panel.FormPanel', {
-                        id,
-                        title
-                    });
-                    mainTab.setActiveTab(mainTab.add(form));
-                }
-            }
-        }
-    }
-});

+ 0 - 12
frontend/saas-web/app/view/purchase/list/ListController1.js

@@ -1,12 +0,0 @@
-Ext.define('saas.view.purchase.list.ListController1', {
-    extend: 'saas.view.core.grid.GridPanelController',
-    alias: 'controller.purchase-list-listcontroller1',
-
-    control: {
-        'grid': {
-            itemClick: function() {
-                console.log('grid1: click.....');
-            }
-        }
-    },
-});

+ 0 - 12
frontend/saas-web/app/view/purchase/list/ListController2.js

@@ -1,12 +0,0 @@
-Ext.define('saas.view.purchase.list.ListController2', {
-    extend: 'saas.view.core.grid.GridPanelController',
-    alias: 'controller.purchase-list-listcontroller2',
-
-    control: {
-        'grid': {
-            itemClick: function() {
-                console.log('grid2: click.....');
-            }
-        }
-    },
-});

+ 0 - 6
frontend/saas-web/app/view/purchase/order/FormController.js

@@ -1,6 +0,0 @@
-Ext.define('saas.view.purchase.order.FormController', {
-    extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-order-formcontroller',
-
-
-});

+ 0 - 15
frontend/saas-web/app/view/purchase/order/FormModel.js

@@ -1,15 +0,0 @@
-Ext.define('saas.view.purchase.order.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.purchase-order-formmodel',
-
-    data: {
-        num1:2,
-        id: 'TC-1032301'
-    },
-
-    formulas: {
-        sum: function(get) {
-            return get('num1') + get('num2');
-        }
-    }
-});

+ 0 - 10
frontend/saas-web/app/view/purchase/order/FormPanel.js

@@ -1,10 +0,0 @@
-Ext.define('saas.view.purchase.order.FormPanel', {
-    extend: 'saas.view.core.form.FormPanel',
-    xtype: 'purchase-order-formpanel',
-
-    controller: 'purchase-order-formcontroller',
-    viewModel: 'purchase-order-formmodel',
-
-    configUrl: 'resources/json/formItems.json',
-
-});

+ 0 - 22
frontend/saas-web/app/view/purchase/panel/FormPanel.js

@@ -1,22 +0,0 @@
-Ext.define('saas.view.purchase.panel.FormPanel', {
-    extend: 'saas.view.core.form.FormPanel',
-    xtype: 'purchase-panel-FormPanel',
-    controller: 'purchase-panel-FormPanelController',
-
-    frame: true,
-    resizable: true,
-    width: 610,
-    minWidth: 610,
-    minHeight: 300,
-
-    layout: 'column',
-
-    defaults: {
-        columnWidth:0.25,
-        xtype: 'textfield',
-        margin:'5'
-    },
-
-    configUrl: 'resources/json/purchase/formItems.json',
-
-});

+ 0 - 25
frontend/saas-web/app/view/purchase/panel/FormPanelController.js

@@ -1,25 +0,0 @@
-Ext.define('saas.view.purchase.panel.FormPanelController', {
-    extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-panel-FormPanelController',
-
-    control: {
-        //放大镜赋值关系 以及 tpl模板
-        'dbfindtrigger[name=pu_vendorcode]':{
-            beforerender:function(f){
-                Ext.apply(f,{
-                    dbfinds:[{
-                        from:'pu_vendorcode',to:'pu_vendorcode'
-                    },{
-                        from:'pu_vendorname',to:'pu_vendorname'
-                    }],
-                    dbtpls:[{
-                        field:'pu_vendorcode',width:100
-                    },{
-                        field:'pu_vendorname',width:120
-                    }]
-                }) ;   
-
-            }
-        }
-    },
-});

+ 0 - 11
frontend/saas-web/app/view/purchase/panel/GridPanel.js

@@ -1,11 +0,0 @@
-Ext.define('saas.view.purchase.grid.GridPanel', {
-    extend: 'saas.view.core.grid.GridPanel',
-    xtype: 'purchase-panel-GridPanel',
-
-    configUrl: 'resources/json/gridColumns1.json',
-    dataUrl: 'resources/json/gridData1.json',
-
-    frame:true,
-
-    margin:'3'
-});

+ 1 - 1
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
     controller: 'purchase-purchase-querypanel',
     controller: 'purchase-purchase-querypanel',
     viewModel: 'purchase-purchase-querypanel',
     viewModel: 'purchase-purchase-querypanel',
 
 
-    viewName: 'purchase-purchase-formpanel',
+    viewName: 'purchase-purchase-querypanel',
     
     
     queryFormItems: [{
     queryFormItems: [{
         xtype: 'hidden',
         xtype: 'hidden',

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/FormController.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.purchase.purchaseIn.FormController', {
 Ext.define('saas.view.purchase.purchaseIn.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-purchaseIn-formcontroller',
+    alias: 'controller.purchase-purchasein-formcontroller',
     init: function (form) {
     init: function (form) {
         var me = this;
         var me = this;
         this.control({
         this.control({

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/FormModel.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.purchase.purchaseIn.FormModel', {
 Ext.define('saas.view.purchase.purchaseIn.FormModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.purchase-purchaseIn-formmodel',
+    alias: 'viewmodel.purchase-purchasein-formmodel',
     data: {
     data: {
         pi_class: '采购验收单'
         pi_class: '采购验收单'
      }
      }

+ 5 - 5
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -1,17 +1,17 @@
 Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
 Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'purchase-purchaseIn-formpanel',
+    xtype: 'purchase-purchasein-formpanel',
 
 
-    controller: 'purchase-purchaseIn-formcontroller',
-    viewModel: 'purchase-purchaseIn-formmodel',
+    controller: 'purchase-purchasein-formcontroller',
+    viewModel: 'purchase-purchasein-formmodel',
     caller:'PurchaseIn',
     caller:'PurchaseIn',
     
     
      //字段属性
      //字段属性
     _title:'采购验收单',
     _title:'采购验收单',
     _idField: 'id',
     _idField: 'id',
     _codeField: 'pi_inoutno',
     _codeField: 'pi_inoutno',
-    _statusField: 'pu_status',
-    _statusCodeField: 'pu_statuscode',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
     _detnoColumn:  'pd_pdno',
     _detnoColumn:  'pd_pdno',
     _relationColumn: 'pd_piid',
     _relationColumn: 'pd_piid',
     _readUrl:'http://192.168.253.228:8800/prodinout/read/',
     _readUrl:'http://192.168.253.228:8800/prodinout/read/',

+ 14 - 14
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -1,12 +1,12 @@
 Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
 Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
     extend: 'saas.view.core.query.QueryPanel',
-    xtype: 'purchase-purchaseIn-querypanel',
+    xtype: 'purchase-purchasein-querypanel',
+
+    controller: 'purchase-purchasein-queryformcontroller',
+    viewModel: 'purchase-purchasein-queryformmodel',
+
+    viewName: 'purchase-purchasein-querypanel',
 
 
-    controller: 'purchase-purchaseIn-queryformcontroller',
-    viewModel: 'purchase-purchaseIn-queryformmodel',
-    _baseVastUrl:'http://192.168.253.58:8800/purchase/',
-    _idField:'id',
-    _codeField:'pi_inoutno',
     queryFormItems: [{
     queryFormItems: [{
         xtype: 'hidden',
         xtype: 'hidden',
         name: 'id',
         name: 'id',
@@ -100,13 +100,13 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         columnWidth: 1
         columnWidth: 1
     }],
     }],
     queryGridConfig: {
     queryGridConfig: {
-        _idField:'id',
-        _codeField:'pi_inoutno',
-        _title:'采购验收单',
-        _defaultCondition:' pi_class = \'采购验收单\'',
-        _addXtype:'purchase-purchaseIn-formpanel',
-        _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
-        _baseColumn: [{
+        idField:'id',
+        codeField:'pi_inoutno',
+        addTitle:'采购验收单',
+        addXtype:'purchase-purchasein-formpanel',
+        defaultCondition:' pi_class = \'采购验收单\'',
+        baseVastUrl:'http://192.168.253.228:8800/prodinout/',
+        baseColumn: [{
             text: '序号',
             text: '序号',
             width: 80,
             width: 80,
             xtype: 'rownumberer'
             xtype: 'rownumberer'
@@ -152,7 +152,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             width: 120,
             width: 120,
             flex: 1
             flex: 1
         }],
         }],
-        _relativeColumn: [{
+        relativeColumn: [{
             text : "序号", 
             text : "序号", 
             dataIndex : "pd_pdno", 
             dataIndex : "pd_pdno", 
             width : 100, 
             width : 100, 

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
 Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.purchase-purchaseIn-queryformcontroller',
+    alias: 'controller.purchase-purchasein-queryformcontroller',
     init: function (form) {
     init: function (form) {
         var me = this;
         var me = this;
         this.control({
         this.control({

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelModel.js

@@ -1,5 +1,5 @@
 Ext.define('saas.view.purchase.purchaseIn.QueryPanelModel', {
 Ext.define('saas.view.purchase.purchaseIn.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchaseIn-queryformmodel'
+    alias: 'viewmodel.purchase-purchasein-queryformmodel'
 
 
 });
 });

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/FormController.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.purchase.purchaseOut.FormController', {
 Ext.define('saas.view.purchase.purchaseOut.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-purchaseOut-formcontroller',
+    alias: 'controller.purchase-purchaseout-formcontroller',
     init: function (form) {
     init: function (form) {
         var me = this;
         var me = this;
         this.control({
         this.control({

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/FormModel.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.purchase.purchaseOut.FormModel', {
 Ext.define('saas.view.purchase.purchaseOut.FormModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.purchase-purchaseOut-formmodel',
+    alias: 'viewmodel.purchase-purchaseout-formmodel',
     data: {
     data: {
         pi_class: '采购验退单'
         pi_class: '采购验退单'
      }
      }

+ 5 - 5
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -1,9 +1,9 @@
 Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
 Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'purchase-purchaseOut-formpanel',
+    xtype: 'purchase-purchaseout-formpanel',
 
 
-    controller: 'purchase-purchaseOut-formcontroller',
-    viewModel: 'purchase-purchaseOut-formmodel',
+    controller: 'purchase-purchaseout-formcontroller',
+    viewModel: 'purchase-purchaseout-formmodel',
     
     
     caller:'PurchaseOut',
     caller:'PurchaseOut',
     
     
@@ -11,8 +11,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     _title:'采购验退单',
     _title:'采购验退单',
     _idField: 'id',
     _idField: 'id',
     _codeField: 'pi_inoutno',
     _codeField: 'pi_inoutno',
-    _statusField: 'pu_status',
-    _statusCodeField: 'pu_statuscode',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
     _detnoColumn:  'pd_pdno',
     _detnoColumn:  'pd_pdno',
     _relationColumn: 'pd_piid',
     _relationColumn: 'pd_piid',
     _readUrl:'http://192.168.253.228:8800/prodinout/read/',
     _readUrl:'http://192.168.253.228:8800/prodinout/read/',

+ 14 - 14
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -1,12 +1,12 @@
 Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
 Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
     extend: 'saas.view.core.query.QueryPanel',
-    xtype: 'purchase-purchaseOut-querypanel',
+    xtype: 'purchase-purchaseout-querypanel',
+
+    controller: 'purchase-purchaseout-queryformcontroller',
+    viewModel: 'purchase-purchaseout-queryformmodel',
+
+    viewName: 'purchase-purchaseout-querypanel',
 
 
-    controller: 'purchase-purchaseOut-queryformcontroller',
-    viewModel: 'purchase-purchaseOut-queryformmodel',
-    _baseVastUrl:'http://192.168.253.58:8800/purchase/',
-    _idField:'id',
-    _codeField:'pi_inoutno',
     queryFormItems: [{
     queryFormItems: [{
         xtype: 'hidden',
         xtype: 'hidden',
         name: 'id',
         name: 'id',
@@ -100,13 +100,13 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         columnWidth: 1
         columnWidth: 1
     }],
     }],
     queryGridConfig: {
     queryGridConfig: {
-        _idField:'id',
-        _codeField:'pi_inoutno',
-        _title:'采购验退单',
-        _defaultCondition:' pi_class = \'采购验退单\'',
-        _addXtype:'purchase-purchaseOut-formpanel',
-        _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
-        _baseColumn: [{
+        idField:'id',
+        codeField:'pi_inoutno',
+        addTitle:'采购验退单',
+        addXtype:'purchase-purchaseout-formpanel',
+        defaultCondition:' pi_class = \'采购验退单\'',
+        baseVastUrl:'http://192.168.253.228:8800/prodinout/',
+        baseColumn: [{
             text: '序号',
             text: '序号',
             width: 80,
             width: 80,
             xtype: 'rownumberer'
             xtype: 'rownumberer'
@@ -152,7 +152,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             width: 120,
             width: 120,
             flex: 1
             flex: 1
         }],
         }],
-        _relativeColumn: [{
+        relativeColumn: [{
             text : "序号", 
             text : "序号", 
             dataIndex : "pd_pdno", 
             dataIndex : "pd_pdno", 
             width : 100, 
             width : 100, 

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
 Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.purchase-purchaseOut-queryformcontroller',
+    alias: 'controller.purchase-purchaseout-queryformcontroller',
     init: function (form) {
     init: function (form) {
         var me = this;
         var me = this;
         this.control({
         this.control({

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelModel.js

@@ -1,4 +1,4 @@
 Ext.define('saas.view.purchase.purchaseOut.QueryPanelModel', {
 Ext.define('saas.view.purchase.purchaseOut.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchaseOut-queryformmodel'
+    alias: 'viewmodel.purchase-purchaseout-queryformmodel'
 });
 });

+ 16 - 17
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -95,23 +95,22 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         allowBlank : true, 
         allowBlank : true, 
         readOnly:true,
         readOnly:true,
         columnWidth : 0.25
         columnWidth : 0.25
-     }
-     //, {
-    //     xtype : "textfield", 
-    //     name : "sa_toplace", 
-    //     bind : "{sa_toplace}", 
-    //     fieldLabel : "交货地址", 
-    //     allowBlank : true, 
-    //     columnWidth : 0.5
-    // }
-    // , {
-    //     xtype : "textfield", 
-    //     name : "sa_remark", 
-    //     bind : "{sa_remark}", 
-    //     fieldLabel : "备注", 
-    //     allowBlank : true, 
-    //     columnWidth : 1
-    // }
+     }, {
+        xtype : "textfield", 
+        name : "sa_toplace", 
+        bind : "{sa_toplace}", 
+        fieldLabel : "交货地址", 
+        allowBlank : true, 
+        columnWidth : 0.5
+    }
+    , {
+        xtype : "textfield", 
+        name : "sa_remark", 
+        bind : "{sa_remark}", 
+        fieldLabel : "备注", 
+        allowBlank : true, 
+        columnWidth : 1
+    }
     ,{
     ,{
         name : "detailGridField", 
         name : "detailGridField", 
         xtype : "detailGridField", 
         xtype : "detailGridField", 

+ 11 - 11
frontend/saas-web/app/view/sale/sale/QueryPanel.js

@@ -4,9 +4,9 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
 
 
     controller: 'sale-sale-querypanel',
     controller: 'sale-sale-querypanel',
     viewModel: 'sale-sale-querypanel',
     viewModel: 'sale-sale-querypanel',
-    viewName: 'sale-sale-formpanel',
-    _idField: 'sa_id',
-    _codeField: 'sa_code',
+
+    viewName: 'sale-sale-querypanel',
+    
     queryFormItems: [{
     queryFormItems: [{
         xtype: 'hidden',
         xtype: 'hidden',
         name: 'sa_id',
         name: 'sa_id',
@@ -98,13 +98,13 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         allowBlank: true
         allowBlank: true
     }],
     }],
     queryGridConfig: {
     queryGridConfig: {
-        _idField: 'sa_id',
-        _codeField: 'sa_code',
-        _title: '销售订单',
-        _defaultCondition:'',
-        _addXtype: 'sale-sale-formpanel',
-        _baseVastUrl: 'http://192.168.0.181:8560/api/sale/sale/',
-        _baseColumn: [{
+        idField: 'sa_id',
+        codeField: 'sa_code',
+        addTitle: '销售订单',
+        addXtype: 'sale-sale-formpanel',
+        defaultCondition:'',
+        baseVastUrl: 'http://192.168.0.181:8560/api/sale/sale/',
+        baseColumn: [{
             text: '序号',
             text: '序号',
             width: 80,
             width: 80,
             xtype: 'rownumberer'
             xtype: 'rownumberer'
@@ -136,7 +136,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
             xtype: 'numbercolumn',
             xtype: 'numbercolumn',
             width: 120
             width: 120
         }],
         }],
-        _relativeColumn: [{
+        relativeColumn: [{
             text: '序号',
             text: '序号',
             width: 80,
             width: 80,
             xtype: 'rownumberer'
             xtype: 'rownumberer'

+ 39 - 25
frontend/saas-web/app/view/sale/saleIn/FormController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.sale.sale.FormController', {
+Ext.define('saas.view.sale.saleIn.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.sale-sale-formcontroller',
+    alias: 'controller.sale-salein-formcontroller',
     init: function (form) {
     init: function (form) {
         var me = this;
         var me = this;
         this.control({
         this.control({
@@ -11,50 +11,48 @@ Ext.define('saas.view.sale.sale.FormController', {
                 }
                 }
             },
             },
             //放大镜赋值关系 以及 tpl模板
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=sa_custcode]':{
+            'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                 beforerender:function(f){
                     Ext.apply(f,{
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.0.181:8570/api/document/customer/getCustomerByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
                         dbfinds:[{
                         dbfinds:[{
-                            from:'cu_id',to:'sa_custid'
+                            from:'ve_code',to:'pu_vendcode'
                         },{
                         },{
-                            from:'cu_code',to:'sa_custcode'
-                        },{
-                            from:'cu_name',to:'sa_custname'
+                            from:'ve_name',to:'pu_vendname'
                         }],
                         }],
                         dbtpls:[{
                         dbtpls:[{
-                            field:'cu_code',width:100
+                            field:'ve_code',width:100
                         },{
                         },{
-                            field:'cu_name',width:100
+                            field:'ve_name',width:100
                         }],
                         }],
                         dbColumns:[{
                         dbColumns:[{
-                            conditionCode:'cu_id',
-                            "text": "客户ID",
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
                             "flex": 0,
                             "flex": 0,
-                            "dataIndex": "cu_id",
+                            "dataIndex": "ve_id",
                             "width": 0,
                             "width": 0,
                             "xtype": "",
                             "xtype": "",
                             "items": null
                             "items": null
                         },{
                         },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
                             "flex": 1,
                             "flex": 1,
-                            "dataIndex": "cu_code",
+                            "dataIndex": "ve_code",
                             "width": 100,
                             "width": 100,
                             "xtype": "",
                             "xtype": "",
                             "items": null
                             "items": null
                         }, {
                         }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
                             "flex": 1,
                             "flex": 1,
-                            "dataIndex": "cu_name",
+                            "dataIndex": "ve_name",
                             "xtype": "",
                             "xtype": "",
                             "items": null
                             "items": null
                         }, {
                         }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
                             "flex": 0,
                             "flex": 0,
-                            "dataIndex": "cu_type",
+                            "dataIndex": "ve_type",
                             "width": 200,
                             "width": 200,
                             "xtype": "",
                             "xtype": "",
                             "items": null
                             "items": null
@@ -70,12 +68,21 @@ Ext.define('saas.view.sale.sale.FormController', {
                         conditionCode:'pr_code',
                         conditionCode:'pr_code',
                         dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dbfinds:[{
                         dbfinds:[{
-                            from:'pr_code',to:'sd_prodcode'
-                        }],
+                            from:'pr_id',to:'pd_prodid'                          
+                        },{
+                            from:'pr_code',to:'pd_prodcode'                          
+                        },{
+                            from:'pr_detail',to:'pr_detail'
+                        },{
+                            from:'pr_unit',to:'pd_unit'
+                        }
+                    ],
                         dbtpls:[{
                         dbtpls:[{
                             field:'pr_code',width:100
                             field:'pr_code',width:100
                         },{
                         },{
                             field:'pr_detail',width:100
                             field:'pr_detail',width:100
+                        },{
+                            field:'pr_unit',width:100
                         }],
                         }],
                         dbColumns:[{
                         dbColumns:[{
                             "text": "物料ID",
                             "text": "物料ID",
@@ -104,6 +111,13 @@ Ext.define('saas.view.sale.sale.FormController', {
                             "width": 200,
                             "width": 200,
                             "xtype": "",
                             "xtype": "",
                             "items": null
                             "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
                         }]
                         }]
                     }) ;   
                     }) ;   
 
 
@@ -136,7 +150,6 @@ Ext.define('saas.view.sale.sale.FormController', {
         }).show();
         }).show();
 
 
     },
     },
-
     turnOut: function() {
     turnOut: function() {
         var me = this,
         var me = this,
         form = me.getView(),
         form = me.getView(),
@@ -149,6 +162,7 @@ Ext.define('saas.view.sale.sale.FormController', {
             var localJson = new Ext.decode(res.responseText);
             var localJson = new Ext.decode(res.responseText);
             if(localJson.success){
             if(localJson.success){
                 Ext.Msg.alert('提示','转单成功');
                 Ext.Msg.alert('提示','转单成功');
+              
             }
             }
         })
         })
         .catch(function() {
         .catch(function() {

+ 5 - 3
frontend/saas-web/app/view/sale/saleIn/FormModel.js

@@ -1,5 +1,7 @@
-Ext.define('saas.view.sale.sale.FormModel', {
+Ext.define('saas.view.sale.saleIn.FormModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.sale-sale-formmodel',
-
+    alias: 'viewmodel.sale-salein-formmodel',
+    data: {
+        pi_class: '销售退货单'
+     }
 });
 });

+ 123 - 113
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -1,34 +1,33 @@
-Ext.define('saas.view.sale.sale.FormPanel', {
+Ext.define('saas.view.sale.saleIn.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'sale-sale-formpanel',
+    xtype: 'sale-salein-formpanel',
 
 
-    controller: 'sale-sale-formcontroller',
-    viewModel: 'sale-sale-formmodel',
-    
-    caller:'Sale',
+    controller: 'sale-salein-formcontroller',
+    viewModel: 'sale-salein-formmodel',
+    caller:'SaleIn',
     
     
      //字段属性
      //字段属性
-     _title:'销售订单',
-     _idField: 'id',
-     _codeField: 'sa_code',
-     _statusField: 'sa_status',
-     _statusCodeField: 'sa_statuscode',
-     _detnoColumn:  'sd_detno',
-     _relationColumn: 'sd_puid',
-     _readUrl:'',
-     _saveUrl:'',
-     _auditUrl:'',
-     _deleteUrl:'',
-     _deleteDetailUrl:'',
-     _turnInUrl:'',
-     _turnOutUrl:'',
-     initId:0,
- 
-     toolBtns: [{
-         xtype: 'button',
-         text: '转出货单',
-         handler: 'turnIn'
-     }],
+    _title:'销售退货单',
+    _idField: 'id',
+    _codeField: 'pi_inoutno',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
+    _detnoColumn:  'pd_pdno',
+    _relationColumn: 'pd_piid',
+    _readUrl:'',
+    _saveUrl:'',
+    _auditUrl:'',
+    _deleteUrl:'',
+    _deleteDetailUrl:'',
+   _baseVastUrl:'',
+   _turnOutUrl:'',
+    initId:0,
+
+    // toolBtns: [{
+    //     xtype: 'button',
+    //     text: '',
+    //     handler: 'turnOut'
+    // }],
 
 
     defaultItems: [{
     defaultItems: [{
         xtype: 'hidden',
         xtype: 'hidden',
@@ -39,84 +38,77 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         columnWidth: 0
         columnWidth: 0
     }, {
     }, {
         xtype : "textfield", 
         xtype : "textfield", 
-        name : "sa_code", 
-        bind : "{sa_code}", 
-        fieldLabel : "销售单号", 
+        name : "pi_inoutno", 
+        bind : "{pi_inoutno}", 
+        fieldLabel : "退货单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_class", 
+        bind : "{pi_class}", 
+        fieldLabel : "单据类型", 
+        readOnly:true,
         allowBlank : true, 
         allowBlank : true, 
         columnWidth : 0.25
         columnWidth : 0.25
     }, {
     }, {
         xtype : "hidden", 
         xtype : "hidden", 
-        name : "sa_cudid", 
-        bind : "{sa_cudid}", 
+        name : "pi_custid", 
+        bind : "{pi_custid}", 
         fieldLabel : "客户ID", 
         fieldLabel : "客户ID", 
         allowBlank : true, 
         allowBlank : true, 
         columnWidth : 0.0
         columnWidth : 0.0
     }, {
     }, {
         xtype : "textfield", 
         xtype : "textfield", 
-        name : "sa_cucode", 
-        bind : "{sa_cucode}", 
+        name : "pi_custcode", 
+        bind : "{pi_custcode}", 
         fieldLabel : "客户编号", 
         fieldLabel : "客户编号", 
         hidden:true,
         hidden:true,
         allowBlank : true, 
         allowBlank : true, 
         columnWidth : 0, 
         columnWidth : 0, 
     }, {
     }, {
         xtype : "dbfindtrigger", 
         xtype : "dbfindtrigger", 
-        name : "sa_cuname", 
-        bind : "{sa_cuname}", 
+        name : "pi_custname", 
+        bind : "{pi_custname}", 
         fieldLabel : "客户名称", 
         fieldLabel : "客户名称", 
         allowBlank : true, 
         allowBlank : true, 
         columnWidth : 0.25
         columnWidth : 0.25
     },{
     },{
         xtype : "datefield", 
         xtype : "datefield", 
-        name : "sa_recorddate", 
-        bind : "{sa_recorddate}", 
-        fieldLabel : "单日期", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单日期", 
         allowBlank : false, 
         allowBlank : false, 
         columnWidth : 0.25
         columnWidth : 0.25
-    }, {
-        xtype : "textfield", 
-        name : "sa_recorder", 
-        bind : "{sa_recorder}", 
-        fieldLabel : "录入人", 
-        allowBlank : true, 
-        readOnly:true,
-        columnWidth : 0.0
-    }, {
+    },{
         xtype : "textfield", 
         xtype : "textfield", 
-        name : "sa_toplace", 
-        bind : "{sa_toplace}", 
-        fieldLabel : "交货地址", 
-        allowBlank : true, 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "总额", 
+        allowBlank : true,
+        readOnly: true,
         columnWidth : 0.25
         columnWidth : 0.25
     }, {
     }, {
-        xtype : "textfield", 
-        name : "sa_total", 
-        bind : "{sa_total}", 
-        fieldLabel : "单据金额", 
+        xtype : "hidden", 
+        name : "pi_said", 
+        bind : "{pi_said}", 
+        fieldLabel : "销售单id", 
         allowBlank : true, 
         allowBlank : true, 
         columnWidth : 0.25
         columnWidth : 0.25
-    }, {
-        xtype : "textfield", 
-        name : "sa_remark", 
-        bind : "{sa_remark}", 
-        fieldLabel : "备注", 
-        allowBlank : true, 
-        columnWidth : 1
     },{
     },{
         xtype : "textfield", 
         xtype : "textfield", 
-        name : "sa_sendstatus", 
-        bind : "{sa_sendstatus}", 
-        fieldLabel : "出货状态", 
+        name : "pi_sacode", 
+        bind : "{pi_sacode}", 
+        fieldLabel : "采购单号", 
         allowBlank : true, 
         allowBlank : true, 
-        readOnly:true,
-        columnWidth : 0
+        columnWidth : 0.25
     }, {
     }, {
         name : "detailGridField", 
         name : "detailGridField", 
         xtype : "detailGridField", 
         xtype : "detailGridField", 
         columns : [
         columns : [
             {
             {
                 text : "序号", 
                 text : "序号", 
-                dataIndex : "sd_detno", 
+                dataIndex : "pd_pdno", 
                 width : 100, 
                 width : 100, 
                 xtype : "numbercolumn",
                 xtype : "numbercolumn",
                 align : 'center',
                 align : 'center',
@@ -129,11 +121,16 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "id", 
                 text : "id", 
                 dataIndex : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn"
                 xtype : "numbercolumn"
+            },{
+                text : "物料id", 
+                dataIndex : "pd_prodid", 
+                xtype : "numbercolumn",
+                hidden:true
             },
             },
             {
             {
                 text : "物料编号", 
                 text : "物料编号", 
                 width : 200.0, 
                 width : 200.0, 
-                dataIndex : "sd_prodcode", 
+                dataIndex : "pd_prodcode", 
                 xtype : "", 
                 xtype : "", 
                 items : null,
                 items : null,
                 editor : {
                 editor : {
@@ -159,10 +156,10 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "规格", 
                 text : "规格", 
                 dataIndex : "pr_spec",
                 dataIndex : "pr_spec",
                 ignore:true
                 ignore:true
-            },
+            }, 
             {
             {
                 text : "数量", 
                 text : "数量", 
-                dataIndex : "sd_qty", 
+                dataIndex : "pd_inqty", 
                 editor : {
                 editor : {
                     xtype : "numberfield"
                     xtype : "numberfield"
                 },
                 },
@@ -171,64 +168,77 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 format:'0',
                 format:'0',
                 items : null,
                 items : null,
                 summaryType: 'sum'
                 summaryType: 'sum'
-            },
-            {
-                text : "单价", 
+            },            {
+                text : "已转数", 
+                dataIndex : "pd_yqty", 
                 editor : {
                 editor : {
                     xtype : "numberfield"
                     xtype : "numberfield"
                 },
                 },
-                format:'0,000.00',
-                dataIndex : "sd_price", 
                 width : 120.0, 
                 width : 120.0, 
-                xtype : "numbercolumn",
+                xtype : "numbercolumn", 
+                format:'0',
                 items : null,
                 items : null,
                 summaryType: 'sum'
                 summaryType: 'sum'
             }, 
             }, 
             {
             {
-                text : "税率", 
+                text : "仓库", 
+                dataIndex : "pd_whname", 
+                width : 120.0, 
+                items : null,
                 editor : {
                 editor : {
-                    xtype : "numberfield"
-                },
-                dataIndex : "sd_taxrate", 
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },
+            {
+                text : "单价", 
+                dataIndex : "pd_sendprice", 
                 width : 120.0, 
                 width : 120.0, 
                 xtype : "numbercolumn", 
                 xtype : "numbercolumn", 
                 items : null
                 items : null
-            },
-            {
+            }, 
+           {
                 text : "含税金额", 
                 text : "含税金额", 
-                dataIndex : "sd_total", 
+                dataIndex : "pd_total", 
                 width : 120.0, 
                 width : 120.0, 
                 xtype : "numbercolumn"
                 xtype : "numbercolumn"
-            }, 
+            }, {
+                text : "税率", 
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
             {
             {
                 text : "未税金额", 
                 text : "未税金额", 
-                dataIndex : "sd_nettotal", 
+                dataIndex : "pd_nettotal", 
                 xtype : "numbercolumn"
                 xtype : "numbercolumn"
-            },{
-                text : "交货日期", 
-                dataIndex : "sd_delivery", 
-                flex : 1.0, 
-                xtype:'datecolumn',
-                format : "Y-m-d H:i:s", 
-                editor : {
-                    xtype : "datefield",
-                    editable : true, 
-                    format : "Y-m-d H:i:s", 
-                    hideTrigger : false
-                }
             },
             },
             {
             {
-                text : "已转数", 
-                dataIndex : "sd_yqty", 
-                editor : {
-                    xtype : "numberfield"
-                },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                text : "销售订单明细id", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                hidden:true
             },
             },
+            {
+                text : "销售单号", 
+                dataIndex : "pd_ordercode", 
+                width : 120.0
+            },{
+                text : "销售序号", 
+                dataIndex : "pd_orderdetno", 
+                xtype : "numbercolumn",
+                flex:1
+            }
         ]
         ]
     }, {
     }, {
         format : "Y-m-d", 
         format : "Y-m-d", 
@@ -249,8 +259,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         xtype : "textfield", 
         xtype : "textfield", 
         readOnly : true, 
         readOnly : true, 
         editable : false, 
         editable : false, 
-        name : "sa_status", 
-        bind : "{sa_status}", 
+        name : "pi_status", 
+        bind : "{pi_status}", 
         fieldLabel : "单据状态", 
         fieldLabel : "单据状态", 
         allowBlank : true, 
         allowBlank : true, 
         columnWidth : 0.25
         columnWidth : 0.25
@@ -258,8 +268,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         xtype : "hidden", 
         xtype : "hidden", 
         readOnly : true, 
         readOnly : true, 
         editable : false, 
         editable : false, 
-        name : "sa_statuscode", 
-        bind : "{sa_statuscode}", 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
         fieldLabel : "单据状态码", 
         fieldLabel : "单据状态码", 
         allowBlank : true, 
         allowBlank : true, 
         columnWidth : 0.0
         columnWidth : 0.0

+ 114 - 115
frontend/saas-web/app/view/sale/saleIn/QueryPanel.js

@@ -1,205 +1,204 @@
-Ext.define('saas.view.sale.sale.QueryPanel', {
+Ext.define('saas.view.sale.saleIn.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
     extend: 'saas.view.core.query.QueryPanel',
-    xtype: 'sale-sale-querypanel',
+    xtype: 'sale-salein-querypanel',
+
+    controller: 'sale-salein-queryformcontroller',
+    viewModel: 'sale-salein-queryformmodel',
+
+    viewName: 'sale-salein-querypanel',
 
 
-    controller: 'sale-sale-querypanel',
-    viewModel: 'sale-sale-querypanel',
-    viewName: 'sale-sale-formpanel',
-    _idField: 'sa_id',
-    _codeField: 'sa_code',
     queryFormItems: [{
     queryFormItems: [{
         xtype: 'hidden',
         xtype: 'hidden',
-        name: 'sa_id',
-        bind: '{sa_id}',
+        name: 'id',
+        bind: '{id}',
         fieldLabel: 'ID',
         fieldLabel: 'ID',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0
         columnWidth: 0
     }, {
     }, {
         xtype: 'textfield',
         xtype: 'textfield',
-        name: 'sa_code',
-        bind: '{sa_code}',
+        name: 'pi_inoutno',
+        bind: '{pi_inoutno}',
         fieldLabel: '单据编号',
         fieldLabel: '单据编号',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25
         columnWidth: 0.25
     }, {
     }, {
         xtype: 'condatefield',
         xtype: 'condatefield',
-        name: 'sa_recorddate',
-        bind: '{sa_recorddate}',
+        name: 'pi_date',
+        bind: '{pi_date}',
         fieldLabel: '单据日期',
         fieldLabel: '单据日期',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.5
         columnWidth: 0.5
     }, {
     }, {
-        xtype: 'dbfindtrigger',
-        name: 'sa_custcode',
-        bind: '{sa_custcode}',
+        xtype: 'textfield',
+        name: 'pi_custcode',
+        bind: '{pi_custcode}',
         fieldLabel: '客户编号',
         fieldLabel: '客户编号',
         allowBlank: true,
         allowBlank: true,
+        hidden:true,
         columnWidth: 0.25
         columnWidth: 0.25
     }, {
     }, {
         xtype: 'textfield',
         xtype: 'textfield',
-        name: 'sa_custname',
-        bind: '{sa_custname}',
+        name: 'pi_custname',
+        bind: '{pi_custname}',
         fieldLabel: '客户名称',
         fieldLabel: '客户名称',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25
         columnWidth: 0.25
     }, {
     }, {
         xtype: 'dbfindtrigger',
         xtype: 'dbfindtrigger',
-        name: 'pd_prodcode#pd_prodcode',
+        name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
         fieldLabel: '物料编号',
         fieldMode: 'DETAIL',
         fieldMode: 'DETAIL',
-        queryType: 'VAG',
+        queryType:'VAG',
+        hidden:true,
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25
         columnWidth: 0.25
     }, {
     }, {
-        xtype: 'textfield',
-        name: 'pr_detail',
+        xtype: 'dbfindtrigger',
+        name: 'pr_detail#pd_prodcode',
         bind: '{pr_detail}',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
         fieldLabel: '物料名称',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25
         columnWidth: 0.25
     }, {
     }, {
         xtype: 'combobox',
         xtype: 'combobox',
-        name: 'sa_statuscode',
-        bind: '{sa_statuscode}',
+        name: 'pi_statuscode',
+        bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         fieldLabel: '审核状态',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25,
         columnWidth: 0.25,
         queryMode: 'local',
         queryMode: 'local',
-        displayField: 'sa_status',
-        valueField: 'sa_statuscode',
-        editable:false,
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
         store: Ext.create('Ext.data.ArrayStore', {
         store: Ext.create('Ext.data.ArrayStore', {
-        fields: ['sa_statuscode', 'sa_status'],
-        data: [
-            ["$ALL", "全部"],
-            ["AUDITED", "已审核"],
-            ["UNAUDITED", "未审核"]
-        ]
+            fields: ['pi_statuscode', 'pi_status'],
+            data: [
+                ["$ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
         })
         })
-    }, {
-        xtype: 'multicombo',
-        name: 'sa_sendstatuscode',
-        bind: '{sa_sendstatuscode}',
-        fieldLabel: '出库状态',
-        allowBlank: true,
-        columnWidth: 0.25,
-        datas: [
-            ["TURNOUT", "已出库"],
-            ["UNTURNOUT", "未出库"],
-            ["PARTOUT", "部分出库"]
-        ]
-    }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        bind: '{pu_buyername}',
-        fieldLabel: '采购员',
-        allowBlank: true
     }],
     }],
+    moreQueryFormItems: [],
     queryGridConfig: {
     queryGridConfig: {
-        _idField: 'sa_id',
-        _codeField: 'sa_code',
-        _title: '销售订单',
-        _defaultCondition:'',
-        _addXtype: 'sale-sale-formpanel',
-        _baseVastUrl: 'http://192.168.0.181:8560/api/sale/sale/',
-        _baseColumn: [{
+        idField:'id',
+        codeField:'pi_inoutno',
+        addTitle:'销售出货单',
+        addXtype:'purchase-purchaseIn-formpanel',
+        defaultCondition:' pi_class = \'销售出货单\'',
+        baseVastUrl:'http://192.168.253.228:8800/prodinout/',
+        baseColumn: [{
             text: '序号',
             text: '序号',
             width: 80,
             width: 80,
             xtype: 'rownumberer'
             xtype: 'rownumberer'
         }, {
         }, {
             text: 'id',
             text: 'id',
-            dataIndex: 'sa_id',
+            dataIndex: 'id',
             width: 100,
             width: 100,
             xtype: 'numbercolumn'
             xtype: 'numbercolumn'
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
-            dataIndex: 'sa_code',
+            dataIndex: 'pi_inoutno',
             width: 120
             width: 120
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
-            dataIndex: 'sa_status',
+            dataIndex: 'pi_status',
             width: 120
             width: 120
         }, {
         }, {
-            text: '单据日期',
-            dataIndex: 'sa_recorddate',
-            xtype: 'datecolumn',
-            width: 200
+            text: '单据类型',
+            dataIndex: 'pi_class',
+            width: 120
         }, {
         }, {
+            text: '下单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
+        },{
+            text: '销售单号',
+            dataIndex: 'pi_pucode',
+            width: 200
+        },{
             text: '客户名称',
             text: '客户名称',
-            dataIndex: 'sa_cuname',
+            dataIndex: 'pi_custname',
             width: 120
             width: 120
-        }, {
-            text: '金额',
-            dataIndex: 'sa_total',
-            xtype: 'numbercolumn',
+        },{
+            text: '含税金额',
+            dataIndex: 'pi_total',
+            xtype:'numbercolumn',
             width: 120
             width: 120
+        },{
+            text: '不含税金额',
+            dataIndex: 'pi_nettotal',
+            xtype:'numbercolumn',
+            width: 120,
+            flex: 1
         }],
         }],
-        _relativeColumn: [{
-            text: '序号',
-            width: 80,
-            xtype: 'rownumberer'
+        relativeColumn: [{
+            text : "序号", 
+            dataIndex : "pd_pdno", 
+            width : 100, 
+            xtype : "numbercolumn",
+            align : 'center'
         }, {
         }, {
             text: 'id',
             text: 'id',
-            dataIndex: 'sa_id',
-            width: 100,
+            dataIndex: 'pu_id',
+            width: 0,
             xtype: 'numbercolumn'
             xtype: 'numbercolumn'
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
-            dataIndex: 'sa_code',
+            dataIndex: 'pd_inoutno',
             width: 120
             width: 120
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
-            dataIndex: 'sa_status',
+            dataIndex: 'pi_status',
             width: 120
             width: 120
         }, {
         }, {
-            text: '单日期',
-            dataIndex: 'sa_recorddate',
-            xtype: 'datecolumn',
+            text: '单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
             width: 200
             width: 200
-        }, {
+        },{
             text: '客户名称',
             text: '客户名称',
-            dataIndex: 'sa_cuname',
+            dataIndex: 'pi_custname',
             width: 120
             width: 120
-        }, {
-            text: '明细序号',
-            dataIndex: 'sd_detno',
-            xtype: 'numbercolumn',
+        },{
+            text: '销售单号',
+            dataIndex: 'pd_ordercode',
             width: 120
             width: 120
-        }, {
+        },{
+            text: '销售序号',
+            dataIndex: 'pd_orderdetno',
+            xtype:'numbercolumn',
+            width: 120
+        },{
             text: '物料编号',
             text: '物料编号',
-            dataIndex: 'sd_prodcode',
+            dataIndex: 'pd_prodcode',
             width: 120
             width: 120
-        }, {
-            text: '数量',
-            dataIndex: 'sd_qty',
-            xtype: 'numbercolumn',
+        },{
+            text: '验收数量',
+            dataIndex: 'pd_inqty',
+            xtype:'numbercolumn',
             width: 120
             width: 120
-        }, {
-            text: '单价',
-            dataIndex: 'sd_price',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '已转数',
-            dataIndex: 'sd_ytqy',
-            xtype: 'numbercolumn',
+        },{
+            text: '销售单价',
+            dataIndex: 'pd_sendprice',
+            xtype:'numbercolumn',
             width: 120
             width: 120
-        }, {
-            text: '已出货数',
-            dataIndex: 'sd_sendqty',
-            xtype: 'numbercolumn',
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
             width: 120
             width: 120
-        }, {
-            text: '已审核采购单数',
-            dataIndex: 'sd_pdqty',
-            xtype: 'numbercolumn',
+        },{
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype:'numbercolumn',
             width: 120
             width: 120
-        }, {
-            text: '备注',
-            dataIndex: 'sd_remark',
-            width: 250,
+        },{
+            text: '成本单价',
+            dataIndex: 'pd_price',
+            xtype:'numbercolumn',
+            width: 120,
             flex: 1
             flex: 1
         }]
         }]
     }
     }

+ 6 - 52
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -1,60 +1,13 @@
-Ext.define('saas.view.sale.sale.QueryPanelController', {
+Ext.define('saas.view.sale.saleIn.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.sale-sale-querypanel',
+    alias: 'controller.sale-salein-queryformcontroller',
     init: function (form) {
     init: function (form) {
         var me = this;
         var me = this;
         this.control({
         this.control({
             //放大镜赋值关系 以及 tpl模板
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=sa_custcode]':{
+            'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                 beforerender:function(f){
-                    Ext.apply(f,{
-                        dataUrl:'http://192.168.0.181:8570/api/document/customer/getCustomerByCondition',
-                        dbfinds:[{
-                            from:'cu_id',to:'sa_custid'
-                        },{
-                            from:'cu_code',to:'sa_custcode'
-                        },{
-                            from:'cu_name',to:'sa_custname'
-                        }],
-                        dbtpls:[{
-                            field:'cu_code',width:100
-                        },{
-                            field:'cu_name',width:100
-                        }],
-                        dbColumns:[{
-                            conditionCode:'cu_id',
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "cu_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
-                    }) ;   
-
+                  //Todo  
                 }
                 }
             },
             },
             //放大镜赋值关系 以及 tpl模板
             //放大镜赋值关系 以及 tpl模板
@@ -64,7 +17,8 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                         conditionCode:'pr_code',
                         conditionCode:'pr_code',
                         dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
                         dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
                         dbfinds:[{
                         dbfinds:[{
-                            from:'pr_code',to:'sd_prodcode'
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_unit',to:'pd_unit'
                         }],
                         }],
                         dbtpls:[{
                         dbtpls:[{
                             field:'pr_code',width:100
                             field:'pr_code',width:100

+ 2 - 2
frontend/saas-web/app/view/sale/saleIn/QueryPanelModel.js

@@ -1,5 +1,5 @@
-Ext.define('saas.view.sale.sale.QueryPanelModel', {
+Ext.define('saas.view.sale.saleIn.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.sale-sale-querypanel'
+    alias: 'viewmodel.sale-salein-queryformmodel'
 
 
 });
 });

+ 147 - 0
frontend/saas-web/app/view/sale/saleOut/FormController.js

@@ -0,0 +1,147 @@
+Ext.define('saas.view.sale.saleout.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.sale-saleout-formcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_unit',to:'pd_unit'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        },{
+                            field:'pr_unit',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    addCombo:function(){
+        var combo=this.ownerCmp;
+        Ext.create('Ext.window.Window',{
+            layout:'vbox',
+            bodyPadding: 15,
+            width:500,
+            items:[{
+                fieldLabel:'实际值',
+                xtype:'textfield'
+            },{
+                fieldLabel:'显示值',
+                xtype:'textfield'
+            }],
+            buttons:[{
+                text:'确认',
+                handler:function(b){
+                    combo.setValue('ok');
+                    b.up('window').close();
+                }
+            }],
+            renderTo:this.ownerCmp.ownerCt.getEl()
+        }).show();
+
+    }
+});

+ 7 - 0
frontend/saas-web/app/view/sale/saleOut/FormModel.js

@@ -0,0 +1,7 @@
+Ext.define('saas.view.sale.saleout.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.sale-saleout-formmodel',
+    data: {
+        pi_class: '销售出货单'
+     }
+});

+ 264 - 0
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -0,0 +1,264 @@
+Ext.define('saas.view.sale.saleout.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'sale-saleout-formpanel',
+
+    controller: 'sale-saleout-formcontroller',
+    viewModel: 'sale-saleout-formmodel',
+
+    viewName: 'sale-saleout-formpanel',
+    
+    caller:'saleOut',
+    
+    //字段属性
+    _title:'销售出货单',
+    _idField: 'id',
+    _codeField: 'pi_inoutno',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
+    _detnoColumn:  'pd_pdno',
+    _relationColumn: 'pd_piid',
+    _readUrl:'http://192.168.253.228:8800/prodinout/read/',
+    _saveUrl:'http://192.168.253.228:8800/prodinout/save',
+    _auditUrl:'http://192.168.253.228:8800/prodinout/audit',
+    _deleteUrl:'http://192.168.253.228:8800/prodinout/delete/',
+    _deleteDetailUrl:'http://192.168.253.228:8800/prodinout/deleteItem/',
+    initId:0,
+
+    toolBtns: [],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype : "textfield", 
+        name : "pi_inoutno", 
+        bind : "{pi_inoutno}", 
+        fieldLabel : "单据编号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_class", 
+        bind : "{pi_class}", 
+        fieldLabel : "单据类型", 
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "pi_custid", 
+        bind : "{pi_custid}", 
+        fieldLabel : "客户ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "pi_custcode", 
+        bind : "{pi_custcode}", 
+        fieldLabel : "客户编号", 
+        hidden:true,
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "pi_custname", 
+        bind : "{pi_custname}", 
+        fieldLabel : "客户名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
+        allowBlank : false, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "总额", 
+        allowBlank : true,
+        readOnly: true,
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "pi_said", 
+        bind : "{pi_said}", 
+        fieldLabel : "销售单id", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_sacode", 
+        bind : "{pi_sacode}", 
+        fieldLabel : "销售单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "pi_inid", 
+        bind : "{pi_inid}", 
+        fieldLabel : "出入库单id", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "pd_pdno", 
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
+            }, {
+                text : "id", 
+                dataIndex : "id", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "物料编号", 
+                width : 200.0, 
+                dataIndex : "pd_prodcode", 
+                xtype : "", 
+                items : null,
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },
+            {
+                text : "名称", 
+                dataIndex : "pr_detail",
+                ignore:true
+            },
+            {
+                text : "规格", 
+                dataIndex : "pr_spec",
+                ignore:true
+            }, 
+            {
+                text : "出货数量", 
+                dataIndex : "pd_outqty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "仓库", 
+                dataIndex : "pd_whname", 
+                width : 120.0, 
+                items : null,
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },
+            {
+                text : "单价", 
+                dataIndex : "pd_sendprice", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            }, 
+           {
+                text : "含税金额", 
+                dataIndex : "pd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, {
+                text : "税率", 
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "未税金额", 
+                dataIndex : "pd_nettotal", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "销售单号", 
+                dataIndex : "pd_ordercode", 
+                width : 120.0
+            },{
+                text : "销售序号", 
+                dataIndex : "pd_orderdetno", 
+                xtype : "numbercolumn",
+                flex:1
+            }, {
+                text : "出入库明细id", 
+                dataIndex : "pd_ioid", 
+                width : 120.0,
+                hidden:true
+            }
+        ]
+    }, {
+        format : "Y-m-d", 
+        xtype : "datefield", 
+        name : "createTime", 
+        bind : "{createTime}", 
+        fieldLabel : "创建时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "updateTime", 
+        bind : "{updateTime}", 
+        fieldLabel : "更新时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_status", 
+        bind : "{pi_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

+ 205 - 0
frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

@@ -0,0 +1,205 @@
+Ext.define('saas.view.sale.saleout.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'sale-saleout-querypanel',
+
+    controller: 'sale-saleout-queryformcontroller',
+    viewModel: 'sale-saleout-queryformmodel',
+    
+    viewName: 'sale-saleout-querypanel',
+
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'pi_inoutno',
+        bind: '{pi_inoutno}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'pi_date',
+        bind: '{pi_date}',
+        fieldLabel: '单据日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'textfield',
+        name: 'pi_custcode',
+        bind: '{pi_custcode}',
+        fieldLabel: '客户编号',
+        allowBlank: true,
+        hidden:true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pi_custname',
+        bind: '{pi_custname}',
+        fieldLabel: '客户名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType:'VAG',
+        hidden:true,
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pr_detail#pd_prodcode',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'pi_statuscode',
+        bind: '{pi_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['pi_statuscode', 'pi_status'],
+            data: [
+                ["$ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
+        })
+    }],
+    moreQueryFormItems: [],
+    queryGridConfig: {
+        idField:'id',
+        codeField:'pi_inoutno',
+        addTitle:'销售出货单',
+        addXtype:'sale-saleout-formpanel',
+        defaultCondition:' pi_class = \'销售出货单\'',
+        baseVastUrl:'http://192.168.253.228:8800/prodinout/',
+        baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pi_inoutno',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pi_status',
+            width: 120
+        },{
+            text: '单据类型',
+            dataIndex: 'pi_class',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
+        },{
+            text: '销售单号',
+            dataIndex: 'pi_sacode',
+            width: 200
+        },{
+            text: '客户名称',
+            dataIndex: 'pi_custname',
+            width: 120
+        },{
+            text: '含税金额',
+            dataIndex: 'pi_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '不含税金额',
+            dataIndex: 'pi_nettotal',
+            xtype:'numbercolumn',
+            width: 120,
+            flex: 1
+        }],
+        relativeColumn: [{
+            text : "序号", 
+            dataIndex : "pd_pdno", 
+            width : 100, 
+            xtype : "numbercolumn",
+            align : 'center'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 0,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pd_inoutno',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pi_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
+        },{
+            text: '客户名称',
+            dataIndex: 'pi_custname',
+            width: 120
+        },{
+            text: '销售单号',
+            dataIndex: 'pd_ordercode',
+            width: 120
+        },{
+            text: '销售序号',
+            dataIndex: 'pd_orderdetno',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
+            width: 120
+        },{
+            text: '出货数量',
+            dataIndex: 'pd_outqty',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '销售单价',
+            dataIndex: 'pd_sendprice',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '成本单价',
+            dataIndex: 'pd_price',
+            xtype:'numbercolumn',
+            width: 120,
+            flex: 1
+        }]
+    }
+});

+ 68 - 0
frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

@@ -0,0 +1,68 @@
+Ext.define('saas.view.sale.saleout.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.sale-saleout-queryformcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custname]':{
+                beforerender:function(f){}
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_unit',to:'pd_unit'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/sale/saleOut/QueryPanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sale.saleout.QueryPanelModel', {
+    extend: 'saas.view.core.query.QueryPanelModel',
+    alias: 'viewmodel.sale-saleout-queryformmodel'
+});

+ 0 - 5
frontend/saas-web/app/view/sale/salelist/FormController.js

@@ -1,5 +0,0 @@
-Ext.define('saas.view.sale.salelist.FormController', {
-    extend: 'saas.view.core.grid.GridPanelController',
-    alias: 'controller.saledetail',
-
-});

+ 0 - 12
frontend/saas-web/app/view/sale/salelist/FormModel.js

@@ -1,12 +0,0 @@
-Ext.define('saas.view.sale.salelist.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.saledetail',
-
-    formulas: {
-        sum: {
-            get: function(get) {
-                return get('num1') + get('num2');
-            }
-        }
-    }
-});

+ 0 - 30
frontend/saas-web/app/view/sale/salelist/GridController1.js

@@ -1,30 +0,0 @@
-Ext.define('saas.view.sale.salelist.GridController1', {
-    extend: 'saas.view.core.grid.GridPanelController',
-    alias: 'controller.salelist1',
-
-    control: {
-        'grid': {
-            itemClick: function() {
-                console.log('grid1: click.....');
-            }
-        }
-    },
-
-    onDecline: function() {
-        var me = this,
-            grid = me.getView();
-            tab = grid.tabComponent;
-        
-        var win = Ext.create('Ext.window.Window', {
-            title: 'Hello',
-            html: '1111111111111',
-            height: 200,
-            width: 400,
-            layout: 'fit',
-            renderTo: tab.getEl()
-        });
-
-        win.show();
-    },
-
-});

+ 0 - 14
frontend/saas-web/app/view/sale/salelist/GridController2.js

@@ -1,14 +0,0 @@
-Ext.define('saas.view.sale.salelist.GridController2', {
-    extend: 'saas.view.core.grid.GridPanelController',
-    alias: 'controller.salelist2',
-
-    listen: {
-        component: {
-            'grid': {
-                itemClick: function() {
-                    console.log('grid2: click.....');
-                }
-            }
-        }
-    }
-});

+ 1 - 1
frontend/saas-web/app/view/storage/prodInOutOtherIn/FormController.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.storage.prodInOutOtherIn.FormController', {
 Ext.define('saas.view.storage.prodInOutOtherIn.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.storage-prodInOutOtherIn-formcontroller',
+    alias: 'controller.storage-prodinoutotherin-formcontroller',
     init: function (form) {
     init: function (form) {
         var me = this;
         var me = this;
         this.control({
         this.control({

+ 1 - 1
frontend/saas-web/app/view/storage/prodInOutOtherIn/FormModel.js

@@ -1,5 +1,5 @@
 Ext.define('saas.view.storage.prodInOutOtherIn.FormModel', {
 Ext.define('saas.view.storage.prodInOutOtherIn.FormModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.storage-prodInOutOtherIn-formmodel',
+    alias: 'viewmodel.storage-prodinoutotherin-formmodel',
 
 
 });
 });

+ 3 - 3
frontend/saas-web/app/view/storage/prodInOutOtherIn/FormPanel.js

@@ -1,9 +1,9 @@
 Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
 Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'storage-prodInOutOtherIn-formpanel',
+    xtype: 'storage-prodinoutotherin-formpanel',
 
 
-    controller: 'storage-prodInOutOtherIn-formcontroller',
-    viewModel: 'storage-prodInOutOtherIn-formmodel',
+    controller: 'storage-prodinoutotherin-formcontroller',
+    viewModel: 'storage-prodinoutotherin-formmodel',
     
     
      //字段属性
      //字段属性
      _title:'其它入库单',
      _title:'其它入库单',

+ 13 - 14
frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanel.js

@@ -2,12 +2,11 @@ Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
     extend: 'saas.view.core.query.QueryPanel',
     xtype: 'storage-prodInOutOtherIn-querypanel',
     xtype: 'storage-prodInOutOtherIn-querypanel',
 
 
-    controller: 'storage-prodInOutOtherIn-querypanel',
-    viewModel: 'storage-prodInOutOtherIn-querypanel',
-    viewName: 'storage-prodInOutOtherIn-formpanel',
-    _baseVastUrl: 'http://192.168.253.58:8800/purchase/',
-    _idField: 'pu_id',
-    _codeField: 'pu_code',
+    controller: 'storage-prodinoutotherin-querypanel',
+    viewModel: 'storage-prodinoutotherin-querypanel',
+
+    viewName: 'storage-prodinoutotherin-querypanel',
+
     queryFormItems: [{
     queryFormItems: [{
         xtype: 'hidden',
         xtype: 'hidden',
         name: 'pu_id',
         name: 'pu_id',
@@ -113,13 +112,13 @@ Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanel', {
         columnWidth: 1
         columnWidth: 1
     }],
     }],
     queryGridConfig: {
     queryGridConfig: {
-        _idField: 'pu_id',
-        _codeField: 'pu_code',
-        _title: '采购单',
-        _defaultCondition:'',
-        _addXtype: 'purchase-purchase-formpanel',
-        _baseVastUrl: 'http://localhost:8800/purchase/',
-        _baseColumn: [{
+        idField: 'pu_id',
+        codeField: 'pu_code',
+        addTitle: '采购单',
+        addXtype: 'purchase-purchase-formpanel',
+        defaultCondition:'',
+        baseVastUrl: 'http://localhost:8800/purchase/',
+        baseColumn: [{
             text: '序号',
             text: '序号',
             width: 80,
             width: 80,
             xtype: 'rownumberer'
             xtype: 'rownumberer'
@@ -157,7 +156,7 @@ Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanel', {
             width: 120,
             width: 120,
             flex: 1
             flex: 1
         }],
         }],
-        _relativeColumn: [{
+        relativeColumn: [{
             text: '序号',
             text: '序号',
             width: 80,
             width: 80,
             xtype: 'rownumberer'
             xtype: 'rownumberer'

+ 1 - 1
frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanelController.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanelController', {
 Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.storage-prodInOutOtherIn-querypanel',
+    alias: 'controller.storage-prodinoutotherin-querypanel',
     init: function (form) {
     init: function (form) {
         var me = this;
         var me = this;
         this.control({
         this.control({

+ 1 - 1
frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanelModel.js

@@ -1,5 +1,5 @@
 Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanelModel', {
 Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.storage-prodInOutOtherIn-querypanel'
+    alias: 'viewmodel.storage-prodinoutotherin-querypanel'
 
 
 });
 });

+ 5 - 0
pom.xml

@@ -281,6 +281,11 @@
                 <artifactId>document-dto</artifactId>
                 <artifactId>document-dto</artifactId>
                 <version>${project.release.version}</version>
                 <version>${project.release.version}</version>
             </dependency>
             </dependency>
+            <dependency>
+                <groupId>com.usoftchina.saas</groupId>
+                <artifactId>test-starter</artifactId>
+                <version>${project.release.version}</version>
+            </dependency>
             <!-- file upload -->
             <!-- file upload -->
             <dependency>
             <dependency>
                 <groupId>io.github.openfeign.form</groupId>
                 <groupId>io.github.openfeign.form</groupId>

+ 76 - 24
script/mysql/init/account.sql

@@ -2,29 +2,81 @@ CREATE DATABASE `saas_account` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_c
 use `saas_account`;
 use `saas_account`;
 
 
 create table `ac_company` (
 create table `ac_company` (
-id int unsigned primary key not null auto_increment,
-name varchar(500) not null,
-business_code varchar(100),
-address varchar(500),
-domain varchar(100) not null,
-creator_id int unsigned,
-create_time datetime,
-updater_id int unsigned,
-update_time datetime
-);
+  id int unsigned primary key not null auto_increment,
+  name varchar(500) not null comment '名称',
+  business_code varchar(100) comment '商业登记证号',
+  address varchar(500) comment '注册地址',
+  logo_url varchar(500) comment 'Logo',
+  creator_id int unsigned,
+  create_time datetime,
+  updater_id int unsigned,
+  update_time datetime
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公司';
 
 
 create table `ac_account` (
 create table `ac_account` (
-id int unsigned primary key not null auto_increment,
-username varchar(100) not null,
-password varchar(100) not null,
-salt varchar(100) not null,
-realname varchar(100) not null,
-email varchar(100) not null,
-mobile varchar(100) not null,
-type int,
-company_id int unsigned not null,
-creator_id int unsigned,
-create_time datetime,
-updater_id int unsigned,
-update_time datetime
-);
+  id int unsigned primary key not null auto_increment,
+  username varchar(100) not null comment '账号',
+  password varchar(100) not null comment '加密密码',
+  salt varchar(100) not null comment '加密盐值',
+  realname varchar(100) comment '真实姓名',
+  email varchar(100) comment '邮箱',
+  mobile varchar(100) not null comment '手机号',
+  type int comment '账户类型 0, 1',
+  creator_id int unsigned,
+  create_time datetime,
+  updater_id int unsigned,
+  update_time datetime
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='个人账户';
+
+create table `ac_account_company` (
+  company_id int unsigned,
+  account_id int unsigned
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账户绑定企业';
+
+create table `ac_role` (
+  id int unsigned primary key not null auto_increment,
+  code varchar(100) not null comment '编号',
+  name varchar(300) not null comment '名称',
+  description varchar(1000) comment '描述',
+  company_id int unsigned,
+  creator_id int unsigned,
+  create_time datetime,
+  updater_id int unsigned,
+  update_time datetime
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色';
+
+create table `ac_account_role` (
+  account_id int unsigned,
+  role_id int unsigned
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账户绑定角色';
+
+create table `ac_resource` (
+  id int unsigned primary key not null auto_increment,
+  code varchar(100) not null comment '编号',
+  name varchar(300) not null comment '名称',
+  description varchar(1000) comment '描述',
+  type varchar(100) comment '类型 MENU,BUTTON,API',
+  url varchar(300) comment 'URL',
+  method varchar(10) comment 'Http Method: POST/GET/PUT/DELETE',
+  order_num int,
+  company_id int unsigned,
+  creator_id int unsigned,
+  create_time datetime,
+  updater_id int unsigned,
+  update_time datetime
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色';
+
+create table `ac_role_resource` (
+  role_id int unsigned,
+  resource_id int unsigned
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色绑定资源';
+
+insert into ac_account(id,username,password,salt,realname,email,mobile,type,
+                       creator_id,create_time,updater_id,update_time)
+values (1,'18888888888','3e8451e274a8ee847872194e584a4145','18888888888','Administrator',
+          'admin@usoftchina.com', '18888888888', 0, 1, now(), 1, now());
+
+insert into ac_company(name, business_code, address, logo_url, creator_id, create_time, updater_id, update_time)
+values ('测试账套', '000000000000000000','深圳市南山区粤海街道高新技术产业园科技南五路英唐大厦六楼',
+        'https://co-image.qichacha.com/CompanyImage/104eb3c232bbac93393a5e204d6a47d1.jpg?x-oss-process=style/qcc_cmp',
+        1, now(), 1, now());