Browse Source

代码合并

chenw 7 years ago
parent
commit
93dc2096c6
83 changed files with 3304 additions and 3464 deletions
  1. 2 1
      .gitignore
  2. 16 16
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java
  3. 0 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java
  4. 4 0
      applications/commons/commons-dto/pom.xml
  5. 16 8
      applications/money/money-server/pom.xml
  6. 7 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/MoneyApplicatiion.java
  7. 2 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java
  8. 2 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java
  9. 3 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java
  10. 2 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetMapper.java
  11. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Banksubledger.java
  12. 6 31
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  13. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  14. 2 30
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java
  15. 352 766
      applications/money/money-server/src/main/resources/mapper/BanksubledgerMapper.xml
  16. 1 556
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  17. 1 556
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  18. 1 429
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  19. 4 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  20. 0 1
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java
  21. 3 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  22. 3 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdIODetailMapper.java
  23. 4 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseListMapper.java
  24. 3 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java
  25. 0 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java
  26. 0 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  27. 2 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java
  28. 29 52
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  29. 33 27
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  30. 396 45
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  31. 0 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  32. 8 30
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  33. 10 23
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  34. 4 1
      framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java
  35. 5 0
      frontend/saas-web/Dockerfile
  36. 7 0
      frontend/saas-web/app/model/document/product.js
  37. 18 0
      frontend/saas-web/app/model/purchase/purchasedetail.js
  38. 2 14
      frontend/saas-web/app/util/FormUtil.js
  39. 4 4
      frontend/saas-web/app/util/QueryUtil.js
  40. 5 1
      frontend/saas-web/app/view/auth/Login.js
  41. 1 1
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  42. 15 10
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  43. 5 3
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  44. 1 0
      frontend/saas-web/app/view/core/form/FormPanelController.js
  45. 37 39
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  46. 192 8
      frontend/saas-web/app/view/core/query/QueryPanel.js
  47. 4 3
      frontend/saas-web/app/view/core/query/QueryPanelController.js
  48. 5 0
      frontend/saas-web/app/view/core/query/QueryPanelModel.js
  49. 1 5
      frontend/saas-web/app/view/core/tab/Controller.js
  50. 34 9
      frontend/saas-web/app/view/document/kind/ChildForm.js
  51. 7 3
      frontend/saas-web/app/view/document/kind/Kind.js
  52. 23 2
      frontend/saas-web/app/view/document/kind/KindController.js
  53. 8 4
      frontend/saas-web/app/view/document/kind/KindModel.js
  54. 2 1
      frontend/saas-web/app/view/main/Main.js
  55. 4 0
      frontend/saas-web/app/view/main/MainContainerWrap.js
  56. 0 29
      frontend/saas-web/app/view/main/MainController.js
  57. 0 552
      frontend/saas-web/app/view/main/MainModel.js
  58. 348 110
      frontend/saas-web/app/view/main/Navigation.js
  59. 2 2
      frontend/saas-web/app/view/purchase/purchase/FormController.js
  60. 18 9
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  61. 23 40
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  62. 1 0
      frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js
  63. 8 3
      frontend/saas-web/app/view/purchase/purchaseIn/FormController.js
  64. 19 5
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  65. 8 3
      frontend/saas-web/app/view/purchase/purchaseOut/FormController.js
  66. 10 7
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  67. 158 0
      frontend/saas-web/app/view/sale/sale/FormController.js
  68. 5 0
      frontend/saas-web/app/view/sale/sale/FormModel.js
  69. 270 0
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  70. 206 0
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  71. 116 0
      frontend/saas-web/app/view/sale/sale/QueryPanelController.js
  72. 5 0
      frontend/saas-web/app/view/sale/sale/QueryPanelModel.js
  73. 158 0
      frontend/saas-web/app/view/sale/saleIn/FormController.js
  74. 5 0
      frontend/saas-web/app/view/sale/saleIn/FormModel.js
  75. 267 0
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  76. 206 0
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  77. 116 0
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  78. 5 0
      frontend/saas-web/app/view/sale/saleIn/QueryPanelModel.js
  79. 5 5
      frontend/saas-web/app/view/test/order/FormPanel.js
  80. 1 1
      frontend/saas-web/index.html
  81. 19 0
      frontend/saas-web/overrides/i18n.js
  82. 20 0
      frontend/saas-web/runtime/nginx/default.conf
  83. 5 0
      pom.xml

+ 2 - 1
.gitignore

@@ -6,7 +6,8 @@ applications/**/target/
 base-servers/**/target/
 framework/**/target/
 !.mvn/wrapper/maven-wrapper.jar
-
+### VSCODE ###
+.vscode
 ### STS ###
 .apt_generated
 .classpath

+ 16 - 16
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java

@@ -5,29 +5,29 @@ import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 /**
-* @Description: 编号接口
-* @Author: guq
-* @Date: 2018/10/20
-*/
+ * @Description: 编号接口
+ * @Author: guq
+ * @Date: 2018/10/20
+ */
 @FeignClient("commons-server")
 public interface MaxnumberService {
     /**
-    * @Description: 更新并获取最大编号
-    * @Param: [count, code, caller]
-    * @return: com.usoftchina.saas.base.Result
-    * @Author: guq
-    * @Date: 2018/10/19 api/commons
-    */
+     * @Description: 更新并获取最大编号
+     * @Param: [count, code, caller]
+     * @return: com.usoftchina.saas.base.Result
+     * @Author: guq
+     * @Date: 2018/10/19 api/commons
+     */
     @PostMapping("/number/pushMaxnubmer")
     public String pushMaxnubmer(@RequestParam("count") Integer count,@RequestParam("code") String code,
                                 @RequestParam("caller") String caller);
     /**
-    * @Description 获取单号
-    * @Param: [caller, update]
-    * @return: com.usoftchina.saas.base.Result
-    * @Author: guq
-    * @Date: 2018/10/22
-    */
+     * @Description 获取单号
+     * @Param: [caller, update]
+     * @return: com.usoftchina.saas.base.Result
+     * @Author: guq
+     * @Date: 2018/10/22
+     */
     @PostMapping("/getMaxnumber")
     public Result getMaxnumber(@RequestParam("caller") String caller, @RequestParam("update") boolean update);
 }

+ 0 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java

@@ -2,7 +2,6 @@ package com.usoftchina.saas.commons.api;
 
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 

+ 4 - 0
applications/commons/commons-dto/pom.xml

@@ -15,6 +15,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
     </dependencies>
 
 

+ 16 - 8
applications/money/money-server/pom.xml

@@ -11,20 +11,16 @@
 
     <artifactId>money-server</artifactId>
     <dependencies>
-        <dependency>
-            <groupId>com.usoftchina.saas</groupId>
-            <artifactId>auth-client</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.usoftchina.saas</groupId>
-            <artifactId>server-starter</artifactId>
-        </dependency>
 
         <!--test-->
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
 
         <!-- db -->
         <dependency>
@@ -62,6 +58,16 @@
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-openfeign</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>5.0.8.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>
@@ -77,4 +83,6 @@
         </plugins>
     </build>
 
+
+
 </project>

+ 7 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/MoneyApplicatiion.java

@@ -1,8 +1,10 @@
 package com.usoftchina.saas.money;
 
 import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+//import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 /**
@@ -10,11 +12,13 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
  * @create: 2018-10-20 11:29
  **/
 @SpringBootApplication
-@EnableEurekaClient
+//@EnableEurekaClient
 @EnableTransactionManagement
+@EnableFeignClients("com.usoftchina.saas")
+//@EnableAuthClient
 @MapperScan("com.usoftchina.saas.money.mapper")
 public class MoneyApplicatiion {
     public static void main(String[] args) {
-
+        SpringApplication.run(MoneyApplicatiion.class, args);
     }
 }

+ 2 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.money.mapper;
 
 
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.money.po.Banksubledger;
 import com.usoftchina.saas.money.po.BanksubledgerExample;
 import org.apache.ibatis.annotations.Param;
@@ -11,7 +12,7 @@ import java.util.List;
  * @author hx
  * @createtime 2018-10-19 15:57
  */
-public interface BanksubledgerMapper {
+public interface BanksubledgerMapper extends CommonBaseMapper<Banksubledger> {
     int countByExample(BanksubledgerExample example);
 
     int deleteByExample(BanksubledgerExample example);

+ 2 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java

@@ -1,11 +1,12 @@
 package com.usoftchina.saas.money.mapper;
 
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.money.po.PaybalanceExample;
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
-public interface PaybalanceMapper {
+public interface PaybalanceMapper extends CommonBaseMapper<Paybalance> {
     int countByExample(PaybalanceExample example);
 
     int deleteByExample(PaybalanceExample example);

+ 3 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java

@@ -1,15 +1,17 @@
 package com.usoftchina.saas.money.mapper;
 
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.money.po.Recbalance;
 import com.usoftchina.saas.money.po.RecbalanceExample;
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
+
 /**
  * @author hx
  * @createtime 2018-10-19 15:58
  */
-public interface RecbalanceMapper {
+public interface RecbalanceMapper extends CommonBaseMapper<Recbalance> {
     int countByExample(RecbalanceExample example);
 
     int deleteByExample(RecbalanceExample example);

+ 2 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetMapper.java

@@ -1,11 +1,12 @@
 package com.usoftchina.saas.money.mapper;
 
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.money.po.Recbalancedet;
 import com.usoftchina.saas.money.po.RecbalancedetExample;
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
-public interface RecbalancedetMapper {
+public interface RecbalancedetMapper extends CommonBaseMapper<Recbalancedet> {
     int countByExample(RecbalancedetExample example);
 
     int deleteByExample(RecbalancedetExample example);

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Banksubledger.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.money.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -9,6 +10,7 @@ import java.util.Date;
  * @author hx
  * @createtime 2018-10-19 15:58
  */
+@Data
 public class Banksubledger extends CommonBaseEntity implements Serializable {
     private Integer bl_id;  //ID
 

+ 6 - 31
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java

@@ -1,5 +1,9 @@
 package com.usoftchina.saas.money.po;
 
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -7,7 +11,8 @@ import java.util.Date;
  * @author hx
  * @createtime 2018-10-19 16:03
  */
-public class Paybalance {
+@Data
+public class Paybalance extends CommonBaseEntity implements Serializable {
     private Integer pb_id;
 
     private String pb_code;
@@ -46,12 +51,6 @@ public class Paybalance {
 
     private String pb_remark;
 
-    private Integer companyid;
-
-    private Integer updaterId;
-
-    private Date updatedate;
-
     private String pb_text1;
 
     private String pb_text2;
@@ -214,30 +213,6 @@ public class Paybalance {
         this.pb_remark = pb_remark == null ? null : pb_remark.trim();
     }
 
-    public Integer getCompanyid() {
-        return companyid;
-    }
-
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
-    }
-
-    public Integer getUpdaterId() {
-        return updaterId;
-    }
-
-    public void setUpdaterId(Integer updaterId) {
-        this.updaterId = updaterId;
-    }
-
-    public Date getUpdatedate() {
-        return updatedate;
-    }
-
-    public void setUpdatedate(Date updatedate) {
-        this.updatedate = updatedate;
-    }
-
     public String getPb_text1() {
         return pb_text1;
     }

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.money.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -9,6 +10,7 @@ import java.util.Date;
  * @author hx
  * @createtime 2018-10-19 15:59
  */
+@Data
 public class Recbalance extends CommonBaseEntity implements Serializable {
     private Integer rb_id;
 

+ 2 - 30
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.money.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -9,6 +10,7 @@ import java.util.Date;
  * @author hx
  * @createtime 2018-10-19 16:03
  */
+@Data
 public class Recbalancedet extends CommonBaseEntity implements Serializable{
     private Integer rd_id;
 
@@ -32,12 +34,6 @@ public class Recbalancedet extends CommonBaseEntity implements Serializable{
 
     private String rd_remark;
 
-    private Integer companyid;
-
-    private Integer updaterId;
-
-    private Date updatedate;
-
     private String rd_text1;
 
     private String rd_text2;
@@ -136,30 +132,6 @@ public class Recbalancedet extends CommonBaseEntity implements Serializable{
         this.rd_remark = rd_remark == null ? null : rd_remark.trim();
     }
 
-    public Integer getCompanyid() {
-        return companyid;
-    }
-
-    public void setCompanyid(Integer companyid) {
-        this.companyid = companyid;
-    }
-
-    public Integer getUpdaterId() {
-        return updaterId;
-    }
-
-    public void setUpdaterId(Integer updaterId) {
-        this.updaterId = updaterId;
-    }
-
-    public Date getUpdatedate() {
-        return updatedate;
-    }
-
-    public void setUpdatedate(Date updatedate) {
-        this.updatedate = updatedate;
-    }
-
     public String getRd_text1() {
         return rd_text1;
     }

File diff suppressed because it is too large
+ 352 - 766
applications/money/money-server/src/main/resources/mapper/BanksubledgerMapper.xml


+ 1 - 556
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -557,560 +557,5 @@
       pb_text5 = #{pb_text5,jdbcType=VARCHAR}
     where pb_id = #{pb_id,jdbcType=INTEGER}
   </update>
-  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Paybalance">
-    <id column="pb_id" jdbcType="INTEGER" property="pb_id" />
-    <result column="pb_code" jdbcType="VARCHAR" property="pb_code" />
-    <result column="pb_kind" jdbcType="VARCHAR" property="pb_kind" />
-    <result column="pb_date" jdbcType="TIMESTAMP" property="pb_date" />
-    <result column="pb_vendid" jdbcType="INTEGER" property="pb_vendid" />
-    <result column="pb_vendcode" jdbcType="VARCHAR" property="pb_vendcode" />
-    <result column="pb_vendname" jdbcType="VARCHAR" property="pb_vendname" />
-    <result column="pb_manname" jdbcType="VARCHAR" property="pb_manname" />
-    <result column="pb_pdamount" jdbcType="DOUBLE" property="pb_pdamount" />
-    <result column="pb_pbdamount" jdbcType="DOUBLE" property="pb_pbdamount" />
-    <result column="pb_preamount" jdbcType="DOUBLE" property="pb_preamount" />
-    <result column="pb_discounts" jdbcType="DOUBLE" property="pb_discounts" />
-    <result column="pb_havebalance" jdbcType="DOUBLE" property="pb_havebalance" />
-    <result column="pb_recorderid" jdbcType="INTEGER" property="pb_recorderid" />
-    <result column="pb_recorder" jdbcType="VARCHAR" property="pb_recorder" />
-    <result column="pb_recorddate" jdbcType="TIMESTAMP" property="pb_recorddate" />
-    <result column="pb_status" jdbcType="INTEGER" property="pb_status" />
-    <result column="pb_statuscode" jdbcType="DECIMAL" property="pb_statuscode" />
-    <result column="pb_remark" jdbcType="VARCHAR" property="pb_remark" />
-    <result column="companyid" jdbcType="INTEGER" property="companyid" />
-    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
-    <result column="updatedate" jdbcType="TIMESTAMP" property="updatedate" />
-    <result column="pb_text1" jdbcType="VARCHAR" property="pb_text1" />
-    <result column="pb_text2" jdbcType="VARCHAR" property="pb_text2" />
-    <result column="pb_text3" jdbcType="VARCHAR" property="pb_text3" />
-    <result column="pb_text4" jdbcType="VARCHAR" property="pb_text4" />
-    <result column="pb_text5" jdbcType="VARCHAR" property="pb_text5" />
-  </resultMap>
-  <sql id="Example_Where_Clause">
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    pb_id, pb_code, pb_kind, pb_date, pb_vendid, pb_vendcode, pb_vendname, pb_manname, 
-    pb_pdamount, pb_pbdamount, pb_preamount, pb_discounts, pb_havebalance, pb_recorderid, 
-    pb_recorder, pb_recorddate, pb_status, pb_statuscode, pb_remark, companyid, updaterId, 
-    updatedate, pb_text1, pb_text2, pb_text3, pb_text4, pb_text5
-  </sql>
-  <select id="selectByExample" parameterType="com.usoftchina.saas.money.po.PaybalanceExample" resultMap="BaseResultMap">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from paybalance
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from paybalance
-    where pb_id = #{pb_id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    delete from paybalance
-    where pb_id = #{pb_id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.money.po.PaybalanceExample">
-    delete from paybalance
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalance">
-    insert into paybalance (pb_id, pb_code, pb_kind, 
-      pb_date, pb_vendid, pb_vendcode, 
-      pb_vendname, pb_manname, pb_pdamount, 
-      pb_pbdamount, pb_preamount, pb_discounts, 
-      pb_havebalance, pb_recorderid, pb_recorder, 
-      pb_recorddate, pb_status, pb_statuscode, 
-      pb_remark, companyid, updaterId, 
-      updatedate, pb_text1, pb_text2, 
-      pb_text3, pb_text4, pb_text5
-      )
-    values (#{pb_id,jdbcType=INTEGER}, #{pb_code,jdbcType=VARCHAR}, #{pb_kind,jdbcType=VARCHAR}, 
-      #{pb_date,jdbcType=TIMESTAMP}, #{pb_vendid,jdbcType=INTEGER}, #{pb_vendcode,jdbcType=VARCHAR}, 
-      #{pb_vendname,jdbcType=VARCHAR}, #{pb_manname,jdbcType=VARCHAR}, #{pb_pdamount,jdbcType=DOUBLE}, 
-      #{pb_pbdamount,jdbcType=DOUBLE}, #{pb_preamount,jdbcType=DOUBLE}, #{pb_discounts,jdbcType=DOUBLE}, 
-      #{pb_havebalance,jdbcType=DOUBLE}, #{pb_recorderid,jdbcType=INTEGER}, #{pb_recorder,jdbcType=VARCHAR}, 
-      #{pb_recorddate,jdbcType=TIMESTAMP}, #{pb_status,jdbcType=INTEGER}, #{pb_statuscode,jdbcType=DECIMAL}, 
-      #{pb_remark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
-      #{updatedate,jdbcType=TIMESTAMP}, #{pb_text1,jdbcType=VARCHAR}, #{pb_text2,jdbcType=VARCHAR}, 
-      #{pb_text3,jdbcType=VARCHAR}, #{pb_text4,jdbcType=VARCHAR}, #{pb_text5,jdbcType=VARCHAR}
-      )
-  </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Paybalance">
-    insert into paybalance
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="pb_id != null">
-        pb_id,
-      </if>
-      <if test="pb_code != null">
-        pb_code,
-      </if>
-      <if test="pb_kind != null">
-        pb_kind,
-      </if>
-      <if test="pb_date != null">
-        pb_date,
-      </if>
-      <if test="pb_vendid != null">
-        pb_vendid,
-      </if>
-      <if test="pb_vendcode != null">
-        pb_vendcode,
-      </if>
-      <if test="pb_vendname != null">
-        pb_vendname,
-      </if>
-      <if test="pb_manname != null">
-        pb_manname,
-      </if>
-      <if test="pb_pdamount != null">
-        pb_pdamount,
-      </if>
-      <if test="pb_pbdamount != null">
-        pb_pbdamount,
-      </if>
-      <if test="pb_preamount != null">
-        pb_preamount,
-      </if>
-      <if test="pb_discounts != null">
-        pb_discounts,
-      </if>
-      <if test="pb_havebalance != null">
-        pb_havebalance,
-      </if>
-      <if test="pb_recorderid != null">
-        pb_recorderid,
-      </if>
-      <if test="pb_recorder != null">
-        pb_recorder,
-      </if>
-      <if test="pb_recorddate != null">
-        pb_recorddate,
-      </if>
-      <if test="pb_status != null">
-        pb_status,
-      </if>
-      <if test="pb_statuscode != null">
-        pb_statuscode,
-      </if>
-      <if test="pb_remark != null">
-        pb_remark,
-      </if>
-      <if test="companyid != null">
-        companyid,
-      </if>
-      <if test="updaterId != null">
-        updaterId,
-      </if>
-      <if test="updatedate != null">
-        updatedate,
-      </if>
-      <if test="pb_text1 != null">
-        pb_text1,
-      </if>
-      <if test="pb_text2 != null">
-        pb_text2,
-      </if>
-      <if test="pb_text3 != null">
-        pb_text3,
-      </if>
-      <if test="pb_text4 != null">
-        pb_text4,
-      </if>
-      <if test="pb_text5 != null">
-        pb_text5,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="pb_id != null">
-        #{pb_id,jdbcType=INTEGER},
-      </if>
-      <if test="pb_code != null">
-        #{pb_code,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_kind != null">
-        #{pb_kind,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_date != null">
-        #{pb_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="pb_vendid != null">
-        #{pb_vendid,jdbcType=INTEGER},
-      </if>
-      <if test="pb_vendcode != null">
-        #{pb_vendcode,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_vendname != null">
-        #{pb_vendname,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_manname != null">
-        #{pb_manname,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_pdamount != null">
-        #{pb_pdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_pbdamount != null">
-        #{pb_pbdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_preamount != null">
-        #{pb_preamount,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_discounts != null">
-        #{pb_discounts,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_havebalance != null">
-        #{pb_havebalance,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_recorderid != null">
-        #{pb_recorderid,jdbcType=INTEGER},
-      </if>
-      <if test="pb_recorder != null">
-        #{pb_recorder,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_recorddate != null">
-        #{pb_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="pb_status != null">
-        #{pb_status,jdbcType=INTEGER},
-      </if>
-      <if test="pb_statuscode != null">
-        #{pb_statuscode,jdbcType=DECIMAL},
-      </if>
-      <if test="pb_remark != null">
-        #{pb_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterId != null">
-        #{updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="updatedate != null">
-        #{updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="pb_text1 != null">
-        #{pb_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_text2 != null">
-        #{pb_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_text3 != null">
-        #{pb_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_text4 != null">
-        #{pb_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_text5 != null">
-        #{pb_text5,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.money.po.PaybalanceExample" resultType="java.lang.Integer">
-    select count(*) from paybalance
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update paybalance
-    <set>
-      <if test="record.pb_id != null">
-        pb_id = #{record.pb_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.pb_code != null">
-        pb_code = #{record.pb_code,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_kind != null">
-        pb_kind = #{record.pb_kind,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_date != null">
-        pb_date = #{record.pb_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pb_vendid != null">
-        pb_vendid = #{record.pb_vendid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pb_vendcode != null">
-        pb_vendcode = #{record.pb_vendcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_vendname != null">
-        pb_vendname = #{record.pb_vendname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_manname != null">
-        pb_manname = #{record.pb_manname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_pdamount != null">
-        pb_pdamount = #{record.pb_pdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_pbdamount != null">
-        pb_pbdamount = #{record.pb_pbdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_preamount != null">
-        pb_preamount = #{record.pb_preamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_discounts != null">
-        pb_discounts = #{record.pb_discounts,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_havebalance != null">
-        pb_havebalance = #{record.pb_havebalance,jdbcType=DOUBLE},
-      </if>
-      <if test="record.pb_recorderid != null">
-        pb_recorderid = #{record.pb_recorderid,jdbcType=INTEGER},
-      </if>
-      <if test="record.pb_recorder != null">
-        pb_recorder = #{record.pb_recorder,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_recorddate != null">
-        pb_recorddate = #{record.pb_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pb_status != null">
-        pb_status = #{record.pb_status,jdbcType=INTEGER},
-      </if>
-      <if test="record.pb_statuscode != null">
-        pb_statuscode = #{record.pb_statuscode,jdbcType=DECIMAL},
-      </if>
-      <if test="record.pb_remark != null">
-        pb_remark = #{record.pb_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="record.companyid != null">
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null">
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatedate != null">
-        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.pb_text1 != null">
-        pb_text1 = #{record.pb_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_text2 != null">
-        pb_text2 = #{record.pb_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_text3 != null">
-        pb_text3 = #{record.pb_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_text4 != null">
-        pb_text4 = #{record.pb_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.pb_text5 != null">
-        pb_text5 = #{record.pb_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update paybalance
-    set pb_id = #{record.pb_id,jdbcType=INTEGER},
-      pb_code = #{record.pb_code,jdbcType=VARCHAR},
-      pb_kind = #{record.pb_kind,jdbcType=VARCHAR},
-      pb_date = #{record.pb_date,jdbcType=TIMESTAMP},
-      pb_vendid = #{record.pb_vendid,jdbcType=INTEGER},
-      pb_vendcode = #{record.pb_vendcode,jdbcType=VARCHAR},
-      pb_vendname = #{record.pb_vendname,jdbcType=VARCHAR},
-      pb_manname = #{record.pb_manname,jdbcType=VARCHAR},
-      pb_pdamount = #{record.pb_pdamount,jdbcType=DOUBLE},
-      pb_pbdamount = #{record.pb_pbdamount,jdbcType=DOUBLE},
-      pb_preamount = #{record.pb_preamount,jdbcType=DOUBLE},
-      pb_discounts = #{record.pb_discounts,jdbcType=DOUBLE},
-      pb_havebalance = #{record.pb_havebalance,jdbcType=DOUBLE},
-      pb_recorderid = #{record.pb_recorderid,jdbcType=INTEGER},
-      pb_recorder = #{record.pb_recorder,jdbcType=VARCHAR},
-      pb_recorddate = #{record.pb_recorddate,jdbcType=TIMESTAMP},
-      pb_status = #{record.pb_status,jdbcType=INTEGER},
-      pb_statuscode = #{record.pb_statuscode,jdbcType=DECIMAL},
-      pb_remark = #{record.pb_remark,jdbcType=VARCHAR},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterId = #{record.updaterId,jdbcType=INTEGER},
-      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
-      pb_text1 = #{record.pb_text1,jdbcType=VARCHAR},
-      pb_text2 = #{record.pb_text2,jdbcType=VARCHAR},
-      pb_text3 = #{record.pb_text3,jdbcType=VARCHAR},
-      pb_text4 = #{record.pb_text4,jdbcType=VARCHAR},
-      pb_text5 = #{record.pb_text5,jdbcType=VARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Paybalance">
-    update paybalance
-    <set>
-      <if test="pb_code != null">
-        pb_code = #{pb_code,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_kind != null">
-        pb_kind = #{pb_kind,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_date != null">
-        pb_date = #{pb_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="pb_vendid != null">
-        pb_vendid = #{pb_vendid,jdbcType=INTEGER},
-      </if>
-      <if test="pb_vendcode != null">
-        pb_vendcode = #{pb_vendcode,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_vendname != null">
-        pb_vendname = #{pb_vendname,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_manname != null">
-        pb_manname = #{pb_manname,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_pdamount != null">
-        pb_pdamount = #{pb_pdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_pbdamount != null">
-        pb_pbdamount = #{pb_pbdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_preamount != null">
-        pb_preamount = #{pb_preamount,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_discounts != null">
-        pb_discounts = #{pb_discounts,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_havebalance != null">
-        pb_havebalance = #{pb_havebalance,jdbcType=DOUBLE},
-      </if>
-      <if test="pb_recorderid != null">
-        pb_recorderid = #{pb_recorderid,jdbcType=INTEGER},
-      </if>
-      <if test="pb_recorder != null">
-        pb_recorder = #{pb_recorder,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_recorddate != null">
-        pb_recorddate = #{pb_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="pb_status != null">
-        pb_status = #{pb_status,jdbcType=INTEGER},
-      </if>
-      <if test="pb_statuscode != null">
-        pb_statuscode = #{pb_statuscode,jdbcType=DECIMAL},
-      </if>
-      <if test="pb_remark != null">
-        pb_remark = #{pb_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterId != null">
-        updaterId = #{updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="updatedate != null">
-        updatedate = #{updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="pb_text1 != null">
-        pb_text1 = #{pb_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_text2 != null">
-        pb_text2 = #{pb_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_text3 != null">
-        pb_text3 = #{pb_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_text4 != null">
-        pb_text4 = #{pb_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="pb_text5 != null">
-        pb_text5 = #{pb_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where pb_id = #{pb_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Paybalance">
-    update paybalance
-    set pb_code = #{pb_code,jdbcType=VARCHAR},
-      pb_kind = #{pb_kind,jdbcType=VARCHAR},
-      pb_date = #{pb_date,jdbcType=TIMESTAMP},
-      pb_vendid = #{pb_vendid,jdbcType=INTEGER},
-      pb_vendcode = #{pb_vendcode,jdbcType=VARCHAR},
-      pb_vendname = #{pb_vendname,jdbcType=VARCHAR},
-      pb_manname = #{pb_manname,jdbcType=VARCHAR},
-      pb_pdamount = #{pb_pdamount,jdbcType=DOUBLE},
-      pb_pbdamount = #{pb_pbdamount,jdbcType=DOUBLE},
-      pb_preamount = #{pb_preamount,jdbcType=DOUBLE},
-      pb_discounts = #{pb_discounts,jdbcType=DOUBLE},
-      pb_havebalance = #{pb_havebalance,jdbcType=DOUBLE},
-      pb_recorderid = #{pb_recorderid,jdbcType=INTEGER},
-      pb_recorder = #{pb_recorder,jdbcType=VARCHAR},
-      pb_recorddate = #{pb_recorddate,jdbcType=TIMESTAMP},
-      pb_status = #{pb_status,jdbcType=INTEGER},
-      pb_statuscode = #{pb_statuscode,jdbcType=DECIMAL},
-      pb_remark = #{pb_remark,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterId = #{updaterId,jdbcType=INTEGER},
-      updatedate = #{updatedate,jdbcType=TIMESTAMP},
-      pb_text1 = #{pb_text1,jdbcType=VARCHAR},
-      pb_text2 = #{pb_text2,jdbcType=VARCHAR},
-      pb_text3 = #{pb_text3,jdbcType=VARCHAR},
-      pb_text4 = #{pb_text4,jdbcType=VARCHAR},
-      pb_text5 = #{pb_text5,jdbcType=VARCHAR}
-    where pb_id = #{pb_id,jdbcType=INTEGER}
-  </update>
+
 </mapper>

+ 1 - 556
applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml

@@ -557,560 +557,5 @@
       rb_text5 = #{rb_text5,jdbcType=VARCHAR}
     where rb_id = #{rb_id,jdbcType=INTEGER}
   </update>
-  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Recbalance">
-    <id column="rb_id" jdbcType="INTEGER" property="rb_id" />
-    <result column="rb_code" jdbcType="VARCHAR" property="rb_code" />
-    <result column="rb_kind" jdbcType="VARCHAR" property="rb_kind" />
-    <result column="rb_date" jdbcType="TIMESTAMP" property="rb_date" />
-    <result column="rb_custid" jdbcType="INTEGER" property="rb_custid" />
-    <result column="rb_custcode" jdbcType="VARCHAR" property="rb_custcode" />
-    <result column="rb_custname" jdbcType="VARCHAR" property="rb_custname" />
-    <result column="rb_manname" jdbcType="VARCHAR" property="rb_manname" />
-    <result column="rb_rdamount" jdbcType="DOUBLE" property="rb_rdamount" />
-    <result column="rb_rbdamount" jdbcType="DOUBLE" property="rb_rbdamount" />
-    <result column="rb_preamount" jdbcType="DOUBLE" property="rb_preamount" />
-    <result column="rb_discounts" jdbcType="DOUBLE" property="rb_discounts" />
-    <result column="rb_havebalance" jdbcType="DOUBLE" property="rb_havebalance" />
-    <result column="rb_recorderid" jdbcType="INTEGER" property="rb_recorderid" />
-    <result column="rb_recorder" jdbcType="VARCHAR" property="rb_recorder" />
-    <result column="rb_recorddate" jdbcType="TIMESTAMP" property="rb_recorddate" />
-    <result column="rb_status" jdbcType="INTEGER" property="rb_status" />
-    <result column="rb_statuscode" jdbcType="DECIMAL" property="rb_statuscode" />
-    <result column="rb_remark" jdbcType="VARCHAR" property="rb_remark" />
-    <result column="companyid" jdbcType="INTEGER" property="companyid" />
-    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
-    <result column="updatedate" jdbcType="TIMESTAMP" property="updatedate" />
-    <result column="rb_text1" jdbcType="VARCHAR" property="rb_text1" />
-    <result column="rb_text2" jdbcType="VARCHAR" property="rb_text2" />
-    <result column="rb_text3" jdbcType="VARCHAR" property="rb_text3" />
-    <result column="rb_text4" jdbcType="VARCHAR" property="rb_text4" />
-    <result column="rb_text5" jdbcType="VARCHAR" property="rb_text5" />
-  </resultMap>
-  <sql id="Example_Where_Clause">
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    rb_id, rb_code, rb_kind, rb_date, rb_custid, rb_custcode, rb_custname, rb_manname, 
-    rb_rdamount, rb_rbdamount, rb_preamount, rb_discounts, rb_havebalance, rb_recorderid, 
-    rb_recorder, rb_recorddate, rb_status, rb_statuscode, rb_remark, companyid, updaterId, 
-    updatedate, rb_text1, rb_text2, rb_text3, rb_text4, rb_text5
-  </sql>
-  <select id="selectByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample" resultMap="BaseResultMap">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from recbalance
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from recbalance
-    where rb_id = #{rb_id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    delete from recbalance
-    where rb_id = #{rb_id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample">
-    delete from recbalance
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.money.po.Recbalance">
-    insert into recbalance (rb_id, rb_code, rb_kind, 
-      rb_date, rb_custid, rb_custcode, 
-      rb_custname, rb_manname, rb_rdamount, 
-      rb_rbdamount, rb_preamount, rb_discounts, 
-      rb_havebalance, rb_recorderid, rb_recorder, 
-      rb_recorddate, rb_status, rb_statuscode, 
-      rb_remark, companyid, updaterId, 
-      updatedate, rb_text1, rb_text2, 
-      rb_text3, rb_text4, rb_text5
-      )
-    values (#{rb_id,jdbcType=INTEGER}, #{rb_code,jdbcType=VARCHAR}, #{rb_kind,jdbcType=VARCHAR}, 
-      #{rb_date,jdbcType=TIMESTAMP}, #{rb_custid,jdbcType=INTEGER}, #{rb_custcode,jdbcType=VARCHAR}, 
-      #{rb_custname,jdbcType=VARCHAR}, #{rb_manname,jdbcType=VARCHAR}, #{rb_rdamount,jdbcType=DOUBLE}, 
-      #{rb_rbdamount,jdbcType=DOUBLE}, #{rb_preamount,jdbcType=DOUBLE}, #{rb_discounts,jdbcType=DOUBLE}, 
-      #{rb_havebalance,jdbcType=DOUBLE}, #{rb_recorderid,jdbcType=INTEGER}, #{rb_recorder,jdbcType=VARCHAR}, 
-      #{rb_recorddate,jdbcType=TIMESTAMP}, #{rb_status,jdbcType=INTEGER}, #{rb_statuscode,jdbcType=DECIMAL}, 
-      #{rb_remark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
-      #{updatedate,jdbcType=TIMESTAMP}, #{rb_text1,jdbcType=VARCHAR}, #{rb_text2,jdbcType=VARCHAR}, 
-      #{rb_text3,jdbcType=VARCHAR}, #{rb_text4,jdbcType=VARCHAR}, #{rb_text5,jdbcType=VARCHAR}
-      )
-  </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Recbalance">
-    insert into recbalance
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="rb_id != null">
-        rb_id,
-      </if>
-      <if test="rb_code != null">
-        rb_code,
-      </if>
-      <if test="rb_kind != null">
-        rb_kind,
-      </if>
-      <if test="rb_date != null">
-        rb_date,
-      </if>
-      <if test="rb_custid != null">
-        rb_custid,
-      </if>
-      <if test="rb_custcode != null">
-        rb_custcode,
-      </if>
-      <if test="rb_custname != null">
-        rb_custname,
-      </if>
-      <if test="rb_manname != null">
-        rb_manname,
-      </if>
-      <if test="rb_rdamount != null">
-        rb_rdamount,
-      </if>
-      <if test="rb_rbdamount != null">
-        rb_rbdamount,
-      </if>
-      <if test="rb_preamount != null">
-        rb_preamount,
-      </if>
-      <if test="rb_discounts != null">
-        rb_discounts,
-      </if>
-      <if test="rb_havebalance != null">
-        rb_havebalance,
-      </if>
-      <if test="rb_recorderid != null">
-        rb_recorderid,
-      </if>
-      <if test="rb_recorder != null">
-        rb_recorder,
-      </if>
-      <if test="rb_recorddate != null">
-        rb_recorddate,
-      </if>
-      <if test="rb_status != null">
-        rb_status,
-      </if>
-      <if test="rb_statuscode != null">
-        rb_statuscode,
-      </if>
-      <if test="rb_remark != null">
-        rb_remark,
-      </if>
-      <if test="companyid != null">
-        companyid,
-      </if>
-      <if test="updaterId != null">
-        updaterId,
-      </if>
-      <if test="updatedate != null">
-        updatedate,
-      </if>
-      <if test="rb_text1 != null">
-        rb_text1,
-      </if>
-      <if test="rb_text2 != null">
-        rb_text2,
-      </if>
-      <if test="rb_text3 != null">
-        rb_text3,
-      </if>
-      <if test="rb_text4 != null">
-        rb_text4,
-      </if>
-      <if test="rb_text5 != null">
-        rb_text5,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="rb_id != null">
-        #{rb_id,jdbcType=INTEGER},
-      </if>
-      <if test="rb_code != null">
-        #{rb_code,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_kind != null">
-        #{rb_kind,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_date != null">
-        #{rb_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rb_custid != null">
-        #{rb_custid,jdbcType=INTEGER},
-      </if>
-      <if test="rb_custcode != null">
-        #{rb_custcode,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_custname != null">
-        #{rb_custname,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_manname != null">
-        #{rb_manname,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_rdamount != null">
-        #{rb_rdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_rbdamount != null">
-        #{rb_rbdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_preamount != null">
-        #{rb_preamount,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_discounts != null">
-        #{rb_discounts,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_havebalance != null">
-        #{rb_havebalance,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_recorderid != null">
-        #{rb_recorderid,jdbcType=INTEGER},
-      </if>
-      <if test="rb_recorder != null">
-        #{rb_recorder,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_recorddate != null">
-        #{rb_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rb_status != null">
-        #{rb_status,jdbcType=INTEGER},
-      </if>
-      <if test="rb_statuscode != null">
-        #{rb_statuscode,jdbcType=DECIMAL},
-      </if>
-      <if test="rb_remark != null">
-        #{rb_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterId != null">
-        #{updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="updatedate != null">
-        #{updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rb_text1 != null">
-        #{rb_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_text2 != null">
-        #{rb_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_text3 != null">
-        #{rb_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_text4 != null">
-        #{rb_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_text5 != null">
-        #{rb_text5,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample" resultType="java.lang.Integer">
-    select count(*) from recbalance
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update recbalance
-    <set>
-      <if test="record.rb_id != null">
-        rb_id = #{record.rb_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.rb_code != null">
-        rb_code = #{record.rb_code,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_kind != null">
-        rb_kind = #{record.rb_kind,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_date != null">
-        rb_date = #{record.rb_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.rb_custid != null">
-        rb_custid = #{record.rb_custid,jdbcType=INTEGER},
-      </if>
-      <if test="record.rb_custcode != null">
-        rb_custcode = #{record.rb_custcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_custname != null">
-        rb_custname = #{record.rb_custname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_manname != null">
-        rb_manname = #{record.rb_manname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_rdamount != null">
-        rb_rdamount = #{record.rb_rdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.rb_rbdamount != null">
-        rb_rbdamount = #{record.rb_rbdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.rb_preamount != null">
-        rb_preamount = #{record.rb_preamount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.rb_discounts != null">
-        rb_discounts = #{record.rb_discounts,jdbcType=DOUBLE},
-      </if>
-      <if test="record.rb_havebalance != null">
-        rb_havebalance = #{record.rb_havebalance,jdbcType=DOUBLE},
-      </if>
-      <if test="record.rb_recorderid != null">
-        rb_recorderid = #{record.rb_recorderid,jdbcType=INTEGER},
-      </if>
-      <if test="record.rb_recorder != null">
-        rb_recorder = #{record.rb_recorder,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_recorddate != null">
-        rb_recorddate = #{record.rb_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.rb_status != null">
-        rb_status = #{record.rb_status,jdbcType=INTEGER},
-      </if>
-      <if test="record.rb_statuscode != null">
-        rb_statuscode = #{record.rb_statuscode,jdbcType=DECIMAL},
-      </if>
-      <if test="record.rb_remark != null">
-        rb_remark = #{record.rb_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="record.companyid != null">
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null">
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatedate != null">
-        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.rb_text1 != null">
-        rb_text1 = #{record.rb_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_text2 != null">
-        rb_text2 = #{record.rb_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_text3 != null">
-        rb_text3 = #{record.rb_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_text4 != null">
-        rb_text4 = #{record.rb_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rb_text5 != null">
-        rb_text5 = #{record.rb_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update recbalance
-    set rb_id = #{record.rb_id,jdbcType=INTEGER},
-      rb_code = #{record.rb_code,jdbcType=VARCHAR},
-      rb_kind = #{record.rb_kind,jdbcType=VARCHAR},
-      rb_date = #{record.rb_date,jdbcType=TIMESTAMP},
-      rb_custid = #{record.rb_custid,jdbcType=INTEGER},
-      rb_custcode = #{record.rb_custcode,jdbcType=VARCHAR},
-      rb_custname = #{record.rb_custname,jdbcType=VARCHAR},
-      rb_manname = #{record.rb_manname,jdbcType=VARCHAR},
-      rb_rdamount = #{record.rb_rdamount,jdbcType=DOUBLE},
-      rb_rbdamount = #{record.rb_rbdamount,jdbcType=DOUBLE},
-      rb_preamount = #{record.rb_preamount,jdbcType=DOUBLE},
-      rb_discounts = #{record.rb_discounts,jdbcType=DOUBLE},
-      rb_havebalance = #{record.rb_havebalance,jdbcType=DOUBLE},
-      rb_recorderid = #{record.rb_recorderid,jdbcType=INTEGER},
-      rb_recorder = #{record.rb_recorder,jdbcType=VARCHAR},
-      rb_recorddate = #{record.rb_recorddate,jdbcType=TIMESTAMP},
-      rb_status = #{record.rb_status,jdbcType=INTEGER},
-      rb_statuscode = #{record.rb_statuscode,jdbcType=DECIMAL},
-      rb_remark = #{record.rb_remark,jdbcType=VARCHAR},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterId = #{record.updaterId,jdbcType=INTEGER},
-      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
-      rb_text1 = #{record.rb_text1,jdbcType=VARCHAR},
-      rb_text2 = #{record.rb_text2,jdbcType=VARCHAR},
-      rb_text3 = #{record.rb_text3,jdbcType=VARCHAR},
-      rb_text4 = #{record.rb_text4,jdbcType=VARCHAR},
-      rb_text5 = #{record.rb_text5,jdbcType=VARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Recbalance">
-    update recbalance
-    <set>
-      <if test="rb_code != null">
-        rb_code = #{rb_code,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_kind != null">
-        rb_kind = #{rb_kind,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_date != null">
-        rb_date = #{rb_date,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rb_custid != null">
-        rb_custid = #{rb_custid,jdbcType=INTEGER},
-      </if>
-      <if test="rb_custcode != null">
-        rb_custcode = #{rb_custcode,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_custname != null">
-        rb_custname = #{rb_custname,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_manname != null">
-        rb_manname = #{rb_manname,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_rdamount != null">
-        rb_rdamount = #{rb_rdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_rbdamount != null">
-        rb_rbdamount = #{rb_rbdamount,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_preamount != null">
-        rb_preamount = #{rb_preamount,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_discounts != null">
-        rb_discounts = #{rb_discounts,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_havebalance != null">
-        rb_havebalance = #{rb_havebalance,jdbcType=DOUBLE},
-      </if>
-      <if test="rb_recorderid != null">
-        rb_recorderid = #{rb_recorderid,jdbcType=INTEGER},
-      </if>
-      <if test="rb_recorder != null">
-        rb_recorder = #{rb_recorder,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_recorddate != null">
-        rb_recorddate = #{rb_recorddate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rb_status != null">
-        rb_status = #{rb_status,jdbcType=INTEGER},
-      </if>
-      <if test="rb_statuscode != null">
-        rb_statuscode = #{rb_statuscode,jdbcType=DECIMAL},
-      </if>
-      <if test="rb_remark != null">
-        rb_remark = #{rb_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterId != null">
-        updaterId = #{updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="updatedate != null">
-        updatedate = #{updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rb_text1 != null">
-        rb_text1 = #{rb_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_text2 != null">
-        rb_text2 = #{rb_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_text3 != null">
-        rb_text3 = #{rb_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_text4 != null">
-        rb_text4 = #{rb_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="rb_text5 != null">
-        rb_text5 = #{rb_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where rb_id = #{rb_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Recbalance">
-    update recbalance
-    set rb_code = #{rb_code,jdbcType=VARCHAR},
-      rb_kind = #{rb_kind,jdbcType=VARCHAR},
-      rb_date = #{rb_date,jdbcType=TIMESTAMP},
-      rb_custid = #{rb_custid,jdbcType=INTEGER},
-      rb_custcode = #{rb_custcode,jdbcType=VARCHAR},
-      rb_custname = #{rb_custname,jdbcType=VARCHAR},
-      rb_manname = #{rb_manname,jdbcType=VARCHAR},
-      rb_rdamount = #{rb_rdamount,jdbcType=DOUBLE},
-      rb_rbdamount = #{rb_rbdamount,jdbcType=DOUBLE},
-      rb_preamount = #{rb_preamount,jdbcType=DOUBLE},
-      rb_discounts = #{rb_discounts,jdbcType=DOUBLE},
-      rb_havebalance = #{rb_havebalance,jdbcType=DOUBLE},
-      rb_recorderid = #{rb_recorderid,jdbcType=INTEGER},
-      rb_recorder = #{rb_recorder,jdbcType=VARCHAR},
-      rb_recorddate = #{rb_recorddate,jdbcType=TIMESTAMP},
-      rb_status = #{rb_status,jdbcType=INTEGER},
-      rb_statuscode = #{rb_statuscode,jdbcType=DECIMAL},
-      rb_remark = #{rb_remark,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterId = #{updaterId,jdbcType=INTEGER},
-      updatedate = #{updatedate,jdbcType=TIMESTAMP},
-      rb_text1 = #{rb_text1,jdbcType=VARCHAR},
-      rb_text2 = #{rb_text2,jdbcType=VARCHAR},
-      rb_text3 = #{rb_text3,jdbcType=VARCHAR},
-      rb_text4 = #{rb_text4,jdbcType=VARCHAR},
-      rb_text5 = #{rb_text5,jdbcType=VARCHAR}
-    where rb_id = #{rb_id,jdbcType=INTEGER}
-  </update>
+
 </mapper>

+ 1 - 429
applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml

@@ -430,433 +430,5 @@
       rd_text5 = #{rd_text5,jdbcType=VARCHAR}
     where rd_id = #{rd_id,jdbcType=INTEGER}
   </update>
-  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Recbalancedet">
-    <id column="rd_id" jdbcType="INTEGER" property="rd_id" />
-    <result column="rd_rbid" jdbcType="INTEGER" property="rd_rbid" />
-    <result column="rd_detno" jdbcType="INTEGER" property="rd_detno" />
-    <result column="rd_ym" jdbcType="INTEGER" property="rd_ym" />
-    <result column="rd_bankid" jdbcType="INTEGER" property="rd_bankid" />
-    <result column="rd_bankcode" jdbcType="VARCHAR" property="rd_bankcode" />
-    <result column="rd_bankname" jdbcType="VARCHAR" property="rd_bankname" />
-    <result column="rd_amount" jdbcType="DOUBLE" property="rd_amount" />
-    <result column="rd_paymethod" jdbcType="VARCHAR" property="rd_paymethod" />
-    <result column="rd_paycode" jdbcType="VARCHAR" property="rd_paycode" />
-    <result column="rd_remark" jdbcType="VARCHAR" property="rd_remark" />
-    <result column="companyid" jdbcType="INTEGER" property="companyid" />
-    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
-    <result column="updatedate" jdbcType="TIMESTAMP" property="updatedate" />
-    <result column="rd_text1" jdbcType="VARCHAR" property="rd_text1" />
-    <result column="rd_text2" jdbcType="VARCHAR" property="rd_text2" />
-    <result column="rd_text3" jdbcType="VARCHAR" property="rd_text3" />
-    <result column="rd_text4" jdbcType="VARCHAR" property="rd_text4" />
-    <result column="rd_text5" jdbcType="VARCHAR" property="rd_text5" />
-  </resultMap>
-  <sql id="Example_Where_Clause">
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    rd_id, rd_rbid, rd_detno, rd_ym, rd_bankid, rd_bankcode, rd_bankname, rd_amount, 
-    rd_paymethod, rd_paycode, rd_remark, companyid, updaterId, updatedate, rd_text1, 
-    rd_text2, rd_text3, rd_text4, rd_text5
-  </sql>
-  <select id="selectByExample" parameterType="com.usoftchina.saas.money.po.RecbalancedetExample" resultMap="BaseResultMap">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from recbalancedet
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
-    <include refid="Base_Column_List" />
-    from recbalancedet
-    where rd_id = #{rd_id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    delete from recbalancedet
-    where rd_id = #{rd_id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.usoftchina.saas.money.po.RecbalancedetExample">
-    delete from recbalancedet
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
-    insert into recbalancedet (rd_id, rd_rbid, rd_detno, 
-      rd_ym, rd_bankid, rd_bankcode, 
-      rd_bankname, rd_amount, rd_paymethod, 
-      rd_paycode, rd_remark, companyid, 
-      updaterId, updatedate, rd_text1, 
-      rd_text2, rd_text3, rd_text4, 
-      rd_text5)
-    values (#{rd_id,jdbcType=INTEGER}, #{rd_rbid,jdbcType=INTEGER}, #{rd_detno,jdbcType=INTEGER}, 
-      #{rd_ym,jdbcType=INTEGER}, #{rd_bankid,jdbcType=INTEGER}, #{rd_bankcode,jdbcType=VARCHAR}, 
-      #{rd_bankname,jdbcType=VARCHAR}, #{rd_amount,jdbcType=DOUBLE}, #{rd_paymethod,jdbcType=VARCHAR}, 
-      #{rd_paycode,jdbcType=VARCHAR}, #{rd_remark,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, 
-      #{updaterId,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{rd_text1,jdbcType=VARCHAR}, 
-      #{rd_text2,jdbcType=VARCHAR}, #{rd_text3,jdbcType=VARCHAR}, #{rd_text4,jdbcType=VARCHAR}, 
-      #{rd_text5,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
-    insert into recbalancedet
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="rd_id != null">
-        rd_id,
-      </if>
-      <if test="rd_rbid != null">
-        rd_rbid,
-      </if>
-      <if test="rd_detno != null">
-        rd_detno,
-      </if>
-      <if test="rd_ym != null">
-        rd_ym,
-      </if>
-      <if test="rd_bankid != null">
-        rd_bankid,
-      </if>
-      <if test="rd_bankcode != null">
-        rd_bankcode,
-      </if>
-      <if test="rd_bankname != null">
-        rd_bankname,
-      </if>
-      <if test="rd_amount != null">
-        rd_amount,
-      </if>
-      <if test="rd_paymethod != null">
-        rd_paymethod,
-      </if>
-      <if test="rd_paycode != null">
-        rd_paycode,
-      </if>
-      <if test="rd_remark != null">
-        rd_remark,
-      </if>
-      <if test="companyid != null">
-        companyid,
-      </if>
-      <if test="updaterId != null">
-        updaterId,
-      </if>
-      <if test="updatedate != null">
-        updatedate,
-      </if>
-      <if test="rd_text1 != null">
-        rd_text1,
-      </if>
-      <if test="rd_text2 != null">
-        rd_text2,
-      </if>
-      <if test="rd_text3 != null">
-        rd_text3,
-      </if>
-      <if test="rd_text4 != null">
-        rd_text4,
-      </if>
-      <if test="rd_text5 != null">
-        rd_text5,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="rd_id != null">
-        #{rd_id,jdbcType=INTEGER},
-      </if>
-      <if test="rd_rbid != null">
-        #{rd_rbid,jdbcType=INTEGER},
-      </if>
-      <if test="rd_detno != null">
-        #{rd_detno,jdbcType=INTEGER},
-      </if>
-      <if test="rd_ym != null">
-        #{rd_ym,jdbcType=INTEGER},
-      </if>
-      <if test="rd_bankid != null">
-        #{rd_bankid,jdbcType=INTEGER},
-      </if>
-      <if test="rd_bankcode != null">
-        #{rd_bankcode,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_bankname != null">
-        #{rd_bankname,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_amount != null">
-        #{rd_amount,jdbcType=DOUBLE},
-      </if>
-      <if test="rd_paymethod != null">
-        #{rd_paymethod,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_paycode != null">
-        #{rd_paycode,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_remark != null">
-        #{rd_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="companyid != null">
-        #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterId != null">
-        #{updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="updatedate != null">
-        #{updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rd_text1 != null">
-        #{rd_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_text2 != null">
-        #{rd_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_text3 != null">
-        #{rd_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_text4 != null">
-        #{rd_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_text5 != null">
-        #{rd_text5,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.money.po.RecbalancedetExample" resultType="java.lang.Integer">
-    select count(*) from recbalancedet
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update recbalancedet
-    <set>
-      <if test="record.rd_id != null">
-        rd_id = #{record.rd_id,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_rbid != null">
-        rd_rbid = #{record.rd_rbid,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_detno != null">
-        rd_detno = #{record.rd_detno,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_ym != null">
-        rd_ym = #{record.rd_ym,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_bankid != null">
-        rd_bankid = #{record.rd_bankid,jdbcType=INTEGER},
-      </if>
-      <if test="record.rd_bankcode != null">
-        rd_bankcode = #{record.rd_bankcode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_bankname != null">
-        rd_bankname = #{record.rd_bankname,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_amount != null">
-        rd_amount = #{record.rd_amount,jdbcType=DOUBLE},
-      </if>
-      <if test="record.rd_paymethod != null">
-        rd_paymethod = #{record.rd_paymethod,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_paycode != null">
-        rd_paycode = #{record.rd_paycode,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_remark != null">
-        rd_remark = #{record.rd_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="record.companyid != null">
-        companyid = #{record.companyid,jdbcType=INTEGER},
-      </if>
-      <if test="record.updaterId != null">
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="record.updatedate != null">
-        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.rd_text1 != null">
-        rd_text1 = #{record.rd_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_text2 != null">
-        rd_text2 = #{record.rd_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_text3 != null">
-        rd_text3 = #{record.rd_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_text4 != null">
-        rd_text4 = #{record.rd_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="record.rd_text5 != null">
-        rd_text5 = #{record.rd_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    update recbalancedet
-    set rd_id = #{record.rd_id,jdbcType=INTEGER},
-      rd_rbid = #{record.rd_rbid,jdbcType=INTEGER},
-      rd_detno = #{record.rd_detno,jdbcType=INTEGER},
-      rd_ym = #{record.rd_ym,jdbcType=INTEGER},
-      rd_bankid = #{record.rd_bankid,jdbcType=INTEGER},
-      rd_bankcode = #{record.rd_bankcode,jdbcType=VARCHAR},
-      rd_bankname = #{record.rd_bankname,jdbcType=VARCHAR},
-      rd_amount = #{record.rd_amount,jdbcType=DOUBLE},
-      rd_paymethod = #{record.rd_paymethod,jdbcType=VARCHAR},
-      rd_paycode = #{record.rd_paycode,jdbcType=VARCHAR},
-      rd_remark = #{record.rd_remark,jdbcType=VARCHAR},
-      companyid = #{record.companyid,jdbcType=INTEGER},
-      updaterId = #{record.updaterId,jdbcType=INTEGER},
-      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
-      rd_text1 = #{record.rd_text1,jdbcType=VARCHAR},
-      rd_text2 = #{record.rd_text2,jdbcType=VARCHAR},
-      rd_text3 = #{record.rd_text3,jdbcType=VARCHAR},
-      rd_text4 = #{record.rd_text4,jdbcType=VARCHAR},
-      rd_text5 = #{record.rd_text5,jdbcType=VARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
-    update recbalancedet
-    <set>
-      <if test="rd_rbid != null">
-        rd_rbid = #{rd_rbid,jdbcType=INTEGER},
-      </if>
-      <if test="rd_detno != null">
-        rd_detno = #{rd_detno,jdbcType=INTEGER},
-      </if>
-      <if test="rd_ym != null">
-        rd_ym = #{rd_ym,jdbcType=INTEGER},
-      </if>
-      <if test="rd_bankid != null">
-        rd_bankid = #{rd_bankid,jdbcType=INTEGER},
-      </if>
-      <if test="rd_bankcode != null">
-        rd_bankcode = #{rd_bankcode,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_bankname != null">
-        rd_bankname = #{rd_bankname,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_amount != null">
-        rd_amount = #{rd_amount,jdbcType=DOUBLE},
-      </if>
-      <if test="rd_paymethod != null">
-        rd_paymethod = #{rd_paymethod,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_paycode != null">
-        rd_paycode = #{rd_paycode,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_remark != null">
-        rd_remark = #{rd_remark,jdbcType=VARCHAR},
-      </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
-      </if>
-      <if test="updaterId != null">
-        updaterId = #{updaterId,jdbcType=INTEGER},
-      </if>
-      <if test="updatedate != null">
-        updatedate = #{updatedate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="rd_text1 != null">
-        rd_text1 = #{rd_text1,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_text2 != null">
-        rd_text2 = #{rd_text2,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_text3 != null">
-        rd_text3 = #{rd_text3,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_text4 != null">
-        rd_text4 = #{rd_text4,jdbcType=VARCHAR},
-      </if>
-      <if test="rd_text5 != null">
-        rd_text5 = #{rd_text5,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where rd_id = #{rd_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
-    update recbalancedet
-    set rd_rbid = #{rd_rbid,jdbcType=INTEGER},
-      rd_detno = #{rd_detno,jdbcType=INTEGER},
-      rd_ym = #{rd_ym,jdbcType=INTEGER},
-      rd_bankid = #{rd_bankid,jdbcType=INTEGER},
-      rd_bankcode = #{rd_bankcode,jdbcType=VARCHAR},
-      rd_bankname = #{rd_bankname,jdbcType=VARCHAR},
-      rd_amount = #{rd_amount,jdbcType=DOUBLE},
-      rd_paymethod = #{rd_paymethod,jdbcType=VARCHAR},
-      rd_paycode = #{rd_paycode,jdbcType=VARCHAR},
-      rd_remark = #{rd_remark,jdbcType=VARCHAR},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterId = #{updaterId,jdbcType=INTEGER},
-      updatedate = #{updatedate,jdbcType=TIMESTAMP},
-      rd_text1 = #{rd_text1,jdbcType=VARCHAR},
-      rd_text2 = #{rd_text2,jdbcType=VARCHAR},
-      rd_text3 = #{rd_text3,jdbcType=VARCHAR},
-      rd_text4 = #{rd_text4,jdbcType=VARCHAR},
-      rd_text5 = #{rd_text5,jdbcType=VARCHAR}
-    where rd_id = #{rd_id,jdbcType=INTEGER}
-  </update>
+
 </mapper>

+ 4 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.purchase.dto;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.entities.Product;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -83,4 +84,7 @@ public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
     private String pd_remark;
 
     private Long pd_ioid;
+
+    private Product product;
+
 }

+ 0 - 1
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java

@@ -69,7 +69,6 @@ public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
-    private Long pi_inid;
 
 
 }

+ 3 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -5,6 +5,7 @@ import com.usoftchina.saas.base.Result;
 
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.*;
 import com.usoftchina.saas.purchase.po.PurchaseList;
@@ -34,7 +35,7 @@ public class PurchaseController {
      * @return
      */
     @GetMapping("/list")
-    public Result<PageInfo<PurchaseList>> getListData(PageRequest page, PurchaseReqDTO req) {
+    public Result<PageInfo<PurchaseList>> getListData(PageRequest page, ListReqDTO req) {
         PageInfo<PurchaseList> listData = purchaseService.getListData(page, req);
         return Result.success(listData);
     }
@@ -163,7 +164,7 @@ public class PurchaseController {
     public Result turnProdin(@PathVariable("id") Long id){
         purchaseService.turnProdin(id);
         return Result.success();
-    };
+    }
 
 
 

+ 3 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdIODetailMapper.java

@@ -40,5 +40,7 @@ public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
 
     void batchUpdate(List<ProdIODetail> list);
 
-    void updatePurchaseYqty(Long id);
+    void updatePurchaseYqty(Integer id);
+
+    List<ProdIODetail> selectByFK(Long id);
 }

+ 4 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseListMapper.java

@@ -1,11 +1,13 @@
 package com.usoftchina.saas.purchase.mapper;
 
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.purchase.dto.PurchaseReqDTO;
 import com.usoftchina.saas.purchase.po.PurchaseList;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
 public interface PurchaseListMapper {
-    List<PurchaseList> selectPurchaseListByCondition(PurchaseReqDTO reqDTO);
-    List<PurchaseList> selectPurchaseBycondition(PurchaseReqDTO reqDTO);
+    List<PurchaseList> selectPurchaseListByCondition(@Param("con") String con,@Param("companyId") Long companyId);
+    List<PurchaseList> selectPurchaseBycondition(@Param("con") String con,@Param("companyId") Long companyId);
 }

+ 3 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.purchase.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.entities.Product;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -79,4 +80,6 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
+    private Product product;
+
 }

+ 0 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java

@@ -62,6 +62,4 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
-    private Long pi_inid;
-
 }

+ 0 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -66,8 +66,6 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_address;
 
-    private Long pi_inid;
-
     private Long pd_piid;
 
     private String pd_inoutno;

+ 2 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java

@@ -8,6 +8,7 @@ import com.usoftchina.saas.base.service.CommonBaseService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
 import com.usoftchina.saas.purchase.dto.PurchaseReqDTO;
@@ -34,7 +35,7 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      * @param page,req
      * @return
      */
-    PageInfo<PurchaseList> getListData(PageRequest page, PurchaseReqDTO req);
+    PageInfo<PurchaseList> getListData(PageRequest page, ListReqDTO req);
 
     /**
      * 采购订单列表查询

+ 29 - 52
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

@@ -74,10 +74,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
               list = prodInOutListMapper.selectProdInOutListByCondition(req);
         } else {
               list = prodInOutListMapper.selectProdInOutBycondition(req);
-
         }
         return list;
-
     }
 
 
@@ -89,12 +87,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         //将prodInOut实体对象转化为传输对象
         ProdInOutDTO main = BeanMapper.map(prodInOut,ProdInOutDTO.class);
         //查询从表
-        ProdIODetailExample prodIODetailExample = new ProdIODetailExample();
-        ProdIODetailExample.Criteria cta = prodIODetailExample.createCriteria();
-        cta.andPd_piidEqualTo(id.intValue());
-        List<ProdIODetail> prodIODetails =prodIODetailMapper.selectByExample(prodIODetailExample);
-        List<ProdIODetailDTO> items = BeanMapper.mapList(prodIODetails,ProdIODetailDTO.class);
 
+        List<ProdIODetail> prodIODetails =prodIODetailMapper.selectByFK(id);
+        List<ProdIODetailDTO> items = BeanMapper.mapList(prodIODetails,ProdIODetailDTO.class);
         prodInOutFormDTO.setMain(main);
         prodInOutFormDTO.setItems(items);
         return prodInOutFormDTO;
@@ -123,6 +118,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         prodInOut.setCompanyId(companyId);
         prodInOut.setCreatorId(userId);
         prodInOut.setCreateTime(new Date());
+        prodInOut.setPi_date(new Date());
+        prodInOut.setPi_puid(main.getPi_puid());
+        prodInOut.setPi_pucode(main.getPi_pucode());
         //编号获取
         pi_inoutno = pushMaxnubmer(pi_inoutno, pi_id);
         prodInOut.setPi_inoutno(pi_inoutno);
@@ -185,10 +183,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     private void singleDelete(Long id) {
         if (null != id) {
             ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-
             //删除主键
             getMapper().deleteByPrimaryKey(prodInOut.getId());
-
             //删除从表
             ProdIODetailExample prodIODetailExample = new ProdIODetailExample();
             ProdIODetailExample.Criteria cta = prodIODetailExample.createCriteria();
@@ -197,7 +193,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             //更新已转数
 //            updateYqty(prodInOut.getPi_puid(),prodInOut.getPi_class());
             updateYqty(prodInOut);
-
        }
     }
 
@@ -246,11 +241,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Object result =  map.get("result");
         System.out.println("result");
         //记录日志
-
-
         if (!StringUtils.isEmpty(result))
             throw new BizException(500, "存在已审核单据,单据编号:" + result);
-
     }
 
 
@@ -274,29 +266,20 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
     private void updateYqty(ProdInOut prodInOut) {
-
         //更新已转数
         if ("采购验收单".equals(prodInOut.getPi_class())){
             purchasedetailMapper.updatePurchaseYqty(prodInOut.getPi_puid());
         }else if ("采购验退单".equals(prodInOut.getPi_class())){
-            prodIODetailMapper.updatePurchaseYqty(prodInOut.getPi_inid());
+            prodIODetailMapper.updatePurchaseYqty(prodInOut.getPi_puid());
         }
-
-
     }
 
     @Override
     public Result turnProdOut(Long id) {
         ProdInOut sourcePi = getMapper().selectByPrimaryKey(id);
-
         Integer count=0;
         double pdInqty=0, pdYqty=0;
-
-        ProdIODetailExample prodIODetailExample = new ProdIODetailExample();
-        ProdIODetailExample.Criteria cta = prodIODetailExample.createCriteria();
-        cta.andPd_piidEqualTo(id.intValue());
-        List<ProdIODetail> sourcePids =prodIODetailMapper.selectByExample(prodIODetailExample);
-
+        List<ProdIODetail> sourcePids =prodIODetailMapper.selectByFK(id);
         //检查从表
         for (ProdIODetail prodIODetail : sourcePids) {
             pdInqty = prodIODetail.getPd_inqty();
@@ -319,45 +302,39 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_recorddate(new Date());
         targetPi.setPi_vendcode(sourcePi.getPi_vendcode());
         targetPi.setPi_vendname(sourcePi.getPi_vendname());
-        targetPi.setPi_puid(sourcePi.getId().intValue());
+        targetPi.setPi_puid(sourcePi.getPi_puid());
         targetPi.setPi_pucode(sourcePi.getPi_pucode());
-        targetPi.setPi_inid(sourcePi.getId());
-
         //设置公司id
         targetPi.setCompanyId(sourcePi.getCompanyId());
         //保存数据
         getMapper().insertSelective(targetPi);
         //插入验退单从表
         long pi_id = targetPi.getId();
-
          for (int i = 0;i<sourcePids.size();i++){
              ProdIODetail sourcePid = sourcePids.get(i);
              ProdIODetail targetPid = new ProdIODetail();
-             targetPid.setPd_piid(pi_id);
-             targetPid.setPd_inoutno(piInoutno);
-             targetPid.setPd_piclass("采购验退单");
-             targetPid.setPd_pdno(i);
-             targetPid.setPd_orderid(sourcePid.getPd_orderid());
-             targetPid.setPd_ordercode(sourcePid.getPd_ordercode());
-             targetPid.setPd_orderdetno(sourcePid.getPd_orderdetno());
-             targetPid.setPd_orderprice(sourcePid.getPd_orderprice());
-             targetPid.setPd_prodid(sourcePid.getPd_prodid());
-             targetPid.setPd_prodcode(sourcePid.getPd_prodcode());
-             targetPid.setPd_ioid(sourcePid.getId());
-             //公司id
-             targetPid.setCompanyId(sourcePid.getCompanyId());
-
-             //本次转单数
-             targetPid.setPd_outqty(sourcePid.getPd_inqty()-sourcePid.getPd_yqty());
-             prodIODetailMapper.insertSelective(targetPid);
-
-             //更新已转数
-             sourcePid.setPd_yqty(sourcePid.getPd_inqty());
-
-             prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
-
+             if(sourcePid.getPd_inqty()-sourcePid.getPd_yqty()>0){
+                 targetPid.setPd_piid(pi_id);
+                 targetPid.setPd_inoutno(piInoutno);
+                 targetPid.setPd_piclass("采购验退单");
+                 targetPid.setPd_pdno(i);
+                 targetPid.setPd_orderid(sourcePid.getPd_orderid());
+                 targetPid.setPd_ordercode(sourcePid.getPd_ordercode());
+                 targetPid.setPd_orderdetno(sourcePid.getPd_orderdetno());
+                 targetPid.setPd_orderprice(sourcePid.getPd_orderprice());
+                 targetPid.setPd_prodid(sourcePid.getPd_prodid());
+                 targetPid.setPd_prodcode(sourcePid.getPd_prodcode());
+                 targetPid.setPd_ioid(sourcePid.getId());
+                 //公司id
+                 targetPid.setCompanyId(sourcePid.getCompanyId());
+                 //本次转单数
+                 targetPid.setPd_outqty(sourcePid.getPd_inqty()-sourcePid.getPd_yqty());
+                 prodIODetailMapper.insertSelective(targetPid);
+                 //更新已转数
+                 sourcePid.setPd_yqty(sourcePid.getPd_inqty());
+                 prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
+             }
          }
-
         return Result.success();
     }
 

+ 33 - 27
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -8,6 +8,7 @@ import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.BizException;
@@ -55,7 +56,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     private MessageLogService messageLogService;
 
     @Override
-    public PageInfo<PurchaseList> getListData(PageRequest page, PurchaseReqDTO req) {
+    public PageInfo<PurchaseList> getListData(PageRequest page, ListReqDTO req) {
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -307,6 +308,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         if ("TURNIN".equals(acceptstatus)){
             return Result.error(ExceptionCode.TURNIN_EXIST);
         }
+        if ("CLOSED".equals(acceptstatus)){
+            return Result.error(ExceptionCode.CLOSED_EXIST);
+        }
 
         List<PurchaseDetail> purchaseDetails = purchasedetailMapper.selectByFK(id);
 
@@ -349,30 +353,27 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         for (int i=0;i<purchaseDetails.size();i++){
             PurchaseDetail purchaseDetail =purchaseDetails.get(i);
             ProdIODetail prodIODetail = new ProdIODetail();
-            prodIODetail.setPd_piid(pi_id);
-            prodIODetail.setPd_inoutno(piInoutno);
-            prodIODetail.setPd_piclass("采购验收单");
-            prodIODetail.setPd_pdno(i);
-            prodIODetail.setPd_orderid(purchaseDetail.getId().intValue());
-            prodIODetail.setPd_ordercode(purchase.getPu_code());
-            prodIODetail.setPd_orderdetno(purchaseDetail.getPd_detno());
-            prodIODetail.setPd_orderprice(purchaseDetail.getPd_price());
-            prodIODetail.setPd_prodid(purchaseDetail.getPd_prodid());
-            prodIODetail.setPd_prodcode(purchaseDetail.getPd_prodcode());
-            //公司id
-            prodIODetail.setCompanyId(purchaseDetail.getCompanyId());
-
-            //本次转单数
-            prodIODetail.setPd_inqty((int) (purchaseDetail.getPd_qty()-purchaseDetail.getPd_yqty()));
-            prodIODetailMapper.insertSelective(prodIODetail);
-
-            //更新已转数
-            purchaseDetail.setPd_yqty(purchaseDetail.getPd_qty());
-//            getMapper().updateByPrimaryKeySelective(purchase);
-            purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
-
+            if ((int) (purchaseDetail.getPd_qty()-purchaseDetail.getPd_yqty())>0){
+                prodIODetail.setPd_piid(pi_id);
+                prodIODetail.setPd_inoutno(piInoutno);
+                prodIODetail.setPd_piclass("采购验收单");
+                prodIODetail.setPd_pdno(i);
+                prodIODetail.setPd_orderid(purchaseDetail.getId().intValue());
+                prodIODetail.setPd_ordercode(purchase.getPu_code());
+                prodIODetail.setPd_orderdetno(purchaseDetail.getPd_detno());
+                prodIODetail.setPd_orderprice(purchaseDetail.getPd_price());
+                prodIODetail.setPd_prodid(purchaseDetail.getPd_prodid());
+                prodIODetail.setPd_prodcode(purchaseDetail.getPd_prodcode());
+                //公司id
+                prodIODetail.setCompanyId(purchaseDetail.getCompanyId());
+                //本次转单数
+                prodIODetail.setPd_inqty((int) (purchaseDetail.getPd_qty()-purchaseDetail.getPd_yqty()));
+                prodIODetailMapper.insertSelective(prodIODetail);
+                //更新已转数
+                purchaseDetail.setPd_yqty(purchaseDetail.getPd_qty());
+                purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
+            }
         }
-
         //更新主表入库状态
         purchase.setPu_acceptstatus("已入库");
         purchase.setPu_acceptstatuscode("TURNIN");
@@ -425,12 +426,17 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
     }
 
-    private List<PurchaseList> getListByMode(PurchaseReqDTO req) {
+    private List<PurchaseList> getListByMode(ListReqDTO req) {
         List<PurchaseList> list = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
         if (null == req || StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
-            list = purchaseListMapper.selectPurchaseBycondition(req);
+            list = purchaseListMapper.selectPurchaseBycondition(con, companyId);
         } else {
-            list = purchaseListMapper.selectPurchaseListByCondition(req);
+            list = purchaseListMapper.selectPurchaseListByCondition(con, companyId);
         }
         return list;
     }

+ 396 - 45
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -41,6 +41,36 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
+      <id column="pr_id" property="id"/>
+      <result column="pr_code" property="pr_code"/>
+      <result column="pr_detail" property="pr_detail"/>
+      <result column="pr_spec" property="pr_spec"/>
+      <result column="pr_unit" property="pr_unit"/>
+      <result column="pr_kind" property="pr_kind"/>
+      <result column="pr_orispeccode" property="pr_orispeccode"/>
+      <result column="pr_whid" property="pr_whid"/>
+      <result column="pr_whcode" property="pr_whcode"/>
+      <result column="pr_whname" property="pr_whname"/>
+      <result column="pr_zxbzs" property="pr_zxbzs"/>
+      <result column="pr_leadtime" property="pr_leadtime"/>
+      <result column="pr_brand" property="pr_brand"/>
+      <result column="pr_standardprice" property="pr_standardprice"/>
+      <result column="pr_purcprice" property="pr_purcprice"/>
+      <result column="pr_saleprice" property="pr_saleprice"/>
+      <result column="pr_vendid" property="pr_vendid"/>
+      <result column="pr_vendname" property="pr_vendname"/>
+      <result column="pr_vendcode" property="pr_vendcode"/>
+      <result column="pr_docdate" property="pr_docdate"/>
+      <result column="pr_recordmanid" property="pr_recordmanid"/>
+      <result column="pr_recordman" property="pr_recordman"/>
+      <result column="pr_status" property="pr_status"/>
+      <result column="pr_statuscode" property="pr_statuscode"/>
+      <result column="pr_text1" property="pr_text1"/>
+      <result column="pr_text2" property="pr_text2"/>
+      <result column="pr_text3" property="pr_text3"/>
+      <result column="pr_text4" property="pr_text4"/>
+    </association>
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.ProdIODetail">
     <result column="pd_remark" jdbcType="LONGVARCHAR" property="pd_remark" />
@@ -131,11 +161,8 @@
   </select>
   <select id="selectByExample" parameterType="com.usoftchina.saas.purchase.po.ProdIODetailExample" resultMap="BaseResultMap">
     select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from prodiodetail
+        *
+    from prodiodetail a left join product b on a.pd_prodid = b.pr_id and a.companyid = b.companyid
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -198,7 +225,6 @@
     </selectKey>
     insert into prodiodetail
     <trim prefix="(" suffix=")" suffixOverrides=",">
-
       <if test="pd_piid != null">
         pd_piid,
       </if>
@@ -316,11 +342,8 @@
       <if test="pd_ioid != null">
         pd_ioid,
       </if>
-
-
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-
       <if test="pd_piid != null">
         #{pd_piid,jdbcType=INTEGER},
       </if>
@@ -901,58 +924,386 @@
       )
     </foreach>
   </insert>
+
+  <insert id="batchInsert1" parameterType="java.util.List" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+      insert into prodiodetail
+      <trim prefix="(" suffix=")" suffixOverrides=",">
+        <if test="item.pd_piid != null">
+          pd_piid,
+        </if>
+        <if test="item.pd_inoutno != null">
+          pd_inoutno,
+        </if>
+        <if test="item.pd_piclass != null">
+          pd_piclass,
+        </if>
+        <if test="item.pd_pdno != null">
+          pd_pdno,
+        </if>
+        <if test="item.pd_ordercode != null">
+          pd_ordercode,
+        </if>
+        <if test="item.pd_orderdetno != null">
+          pd_orderdetno,
+        </if>
+        <if test="item.pd_prodid != null">
+          pd_prodid,
+        </if>
+        <if test="item.pd_prodcode != null">
+          pd_prodcode,
+        </if>
+        <if test="item.pd_unit != null">
+          pd_unit,
+        </if>
+        <if test="item.pd_inqty != null">
+          pd_inqty,
+        </if>
+        <if test="item.pd_outqty != null">
+          pd_outqty,
+        </if>
+        <if test="item.pd_orderprice != null">
+          pd_orderprice,
+        </if>
+        <if test="item.pd_sendprice != null">
+          pd_sendprice,
+        </if>
+        <if test="item.pd_price != null">
+          pd_price,
+        </if>
+        <if test="item.pd_total != null">
+          pd_total,
+        </if>
+        <if test="item.pd_taxrate != null">
+          pd_taxrate,
+        </if>
+        <if test="item.pd_netprice != null">
+          pd_netprice,
+        </if>
+        <if test="item.pd_nettotal != null">
+          pd_nettotal,
+        </if>
+        <if test="item.pd_whid != null">
+          pd_whid,
+        </if>
+        <if test="item.pd_whcode != null">
+          pd_whcode,
+        </if>
+        <if test="item.pd_whname != null">
+          pd_whname,
+        </if>
+        <if test="item.pd_inwhid != null">
+          pd_inwhid,
+        </if>
+        <if test="item.pd_inwhcode != null">
+          pd_inwhcode,
+        </if>
+        <if test="item.pd_inwhname != null">
+          pd_inwhname,
+        </if>
+        <if test="item.pd_orderid != null">
+          pd_orderid,
+        </if>
+        <if test="item.pd_sdid != null">
+          pd_sdid,
+        </if>
+        <if test="item.pd_status != null">
+          pd_status,
+        </if>
+        <if test="item.companyId != null">
+          companyid,
+        </if>
+        <if test="item.updaterId != null">
+          updaterid,
+        </if>
+        <if test="item.updateTime != null">
+          updatetime,
+        </if>
+        <if test="item.pd_text1 != null">
+          pd_text1,
+        </if>
+        <if test="item.pd_text2 != null">
+          pd_text2,
+        </if>
+        <if test="item.pd_text3 != null">
+          pd_text3,
+        </if>
+        <if test="item.pd_text4 != null">
+          pd_text4,
+        </if>
+        <if test="item.pd_text5 != null">
+          pd_text5,
+        </if>
+        <if test="item.pd_ym != null">
+          pd_ym,
+        </if>
+        <if test="item.pd_yqty != null">
+          pd_yqty,
+        </if>
+        <if test="item.pd_remark != null">
+          pd_remark,
+        </if>
+        <if test="item.pd_ioid != null">
+          pd_ioid,
+        </if>
+      </trim>
+      <trim prefix="values (" suffix=")" suffixOverrides=",">
+        <if test="item.pd_piid != null">
+          #{item.pd_piid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_inoutno != null">
+          #{item.pd_inoutno,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_piclass != null">
+          #{item.pd_piclass,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_pdno != null">
+          #{item.pd_pdno,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_ordercode != null">
+          #{item.pd_ordercode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_orderdetno != null">
+          #{item.pd_orderdetno,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_prodid != null">
+          #{item.pd_prodid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_prodcode != null">
+          #{item.pd_prodcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_unit != null">
+          #{item.pd_unit,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inqty != null">
+          #{item.pd_inqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_outqty != null">
+          #{item.pd_outqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_orderprice != null">
+          #{item.pd_orderprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_sendprice != null">
+          #{item.pd_sendprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_price != null">
+          #{item.pd_price,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_total != null">
+          #{item.pd_total,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_taxrate != null">
+          #{item.pd_taxrate,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_netprice != null">
+          #{item.pd_netprice,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_nettotal != null">
+          #{item.pd_nettotal,jdbcType=DOUBLE},
+        </if>
+        <if test="item.pd_whid != null">
+          #{item.pd_whid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_whcode != null">
+          #{item.pd_whcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_whname != null">
+          #{item.pd_whname,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inwhid != null">
+          #{item.pd_inwhid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_inwhcode != null">
+          #{item.pd_inwhcode,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_inwhname != null">
+          #{item.pd_inwhname,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_orderid != null">
+          #{item.pd_orderid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_sdid != null">
+          #{item.pd_sdid,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_status != null">
+          #{item.pd_status,jdbcType=INTEGER},
+        </if>
+        <if test="item.companyId != null">
+          #{item.companyId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updaterId != null">
+          #{item.updaterId,jdbcType=INTEGER},
+        </if>
+        <if test="item.updateTime != null">
+          #{item.updateTime,jdbcType=TIMESTAMP},
+        </if>
+        <if test="item.pd_text1 != null">
+          #{item.pd_text1,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text2 != null">
+          #{item.pd_text2,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text3 != null">
+          #{item.pd_text3,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text4 != null">
+          #{item.pd_text4,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_text5 != null">
+          #{item.pd_text5,jdbcType=VARCHAR},
+        </if>
+        <if test="item.pd_ym != null">
+          #{item.pd_ym,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_yqty != null">
+          #{item.pd_yqty,jdbcType=INTEGER},
+        </if>
+        <if test="item.pd_remark != null">
+          #{item.pd_remark,jdbcType=LONGVARCHAR},
+        </if>
+        <if test="item.pd_ioid != null">
+          #{item.pd_ioid,jdbcType=INTEGER},
+        </if>
+      </trim>
+
+    </foreach>
+  </insert>
+
+
+
+
+
+
+
+
+
   <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail" >
     <foreach collection="list" item="item" index="index" open="" close="" separator=";">
       update prodiodetail <set>
-      pd_piid = #{item.pd_piid},
-      pd_inoutno = #{item.pd_inoutno},
-      pd_piclass = #{item.pd_piclass},
-      pd_pdno = #{item.pd_pdno},
-      pd_ordercode = #{item.pd_orderdetno},
-      pd_orderdetno = #{item.pd_unit},
-      pd_prodid = #{item.pd_prodid},
-      pd_prodcode = #{item.pd_prodcode},
-      pd_unit = #{item.pd_unit},
-      pd_inqty = #{item.pd_inqty},
-      pd_outqty = #{item.pd_outqty},
-      pd_orderprice = #{item.pd_orderprice},
-      pd_sendprice = #{item.pd_sendprice},
-      pd_price = #{item.pd_price},
-      pd_total = #{item.pd_total},
-      pd_taxrate= #{item.pd_taxrate},
-      pd_netprice= #{item.pd_netprice},
-      pd_nettotal= #{item.pd_nettotal},
-      pd_whid= #{item.pd_whid},
-      pd_whcode= #{item.pd_whcode},
-      pd_whname= #{item.pd_whname},
-      pd_inwhid= #{item.pd_inwhid},
-      pd_inwhcode= #{item.pd_inwhcode},
-      pd_inwhname= #{item.pd_inwhname},
-      pd_orderid= #{item.pd_orderid},
-      pd_sdid= #{item.pd_sdid},
-      pd_status= #{item.pd_status},
-      pd_remark= #{item.pd_remark},
-      companyId = #{item.companyId},
-      updaterId = #{item.updaterId},
-      updateTime = #{item.updateTime},
+      <if test="item.pd_piid !=null">
+        pd_piid = #{item.pd_piid},
+      </if>
+      <if test="item.pd_inoutno !=null">
+        pd_inoutno = #{item.pd_inoutno},
+      </if>
+      <if test="item.pd_piclass !=null">
+        pd_piclass = #{item.pd_piclass},
+      </if>
+      <if test="item.pd_pdno !=null">
+        pd_pdno = #{item.pd_pdno},
+      </if>
+      <if test="item.pd_ordercode !=null">
+        pd_ordercode = #{item.pd_ordercode},
+      </if>
+      <if test="item.pd_orderdetno !=null">
+        pd_orderdetno = #{item.pd_orderdetno},
+      </if>
+      <if test="item.pd_prodid !=null">
+        pd_prodid = #{item.pd_prodid},
+      </if>
+      <if test="item.pd_prodcode !=null">
+        pd_prodcode = #{item.pd_prodcode},
+      </if>
+      <if test="item.pd_unit !=null">
+        pd_unit = #{item.pd_unit},
+      </if>
+      <if test="item.pd_inqty !=null">
+        pd_inqty = #{item.pd_inqty},
+      </if>
+      <if test="item.pd_outqty !=null">
+        pd_outqty = #{item.pd_outqty},
+      </if>
+      <if test="item.pd_orderprice !=null">
+        pd_orderprice = #{item.pd_orderprice},
+      </if>
+      <if test="item.pd_sendprice !=null">
+        pd_sendprice = #{item.pd_sendprice},
+      </if>
+      <if test="item.pd_price !=null">
+        pd_price = #{item.pd_price},
+      </if>
+      <if test="item.pd_total !=null">
+        pd_total = #{item.pd_total},
+      </if>
+      <if test="item.pd_taxrate !=null">
+        pd_taxrate = #{item.pd_taxrate},
+      </if>
+      <if test="item.pd_netprice !=null">
+        pd_netprice = #{item.pd_netprice},
+      </if>
+      <if test="item.pd_nettotal !=null">
+        pd_nettotal = #{item.pd_nettotal},
+      </if>
+      <if test="item.pd_whid !=null">
+        pd_whid = #{item.pd_whid},
+      </if>
+      <if test="item.pd_whcode !=null">
+        pd_whcode = #{item.pd_whcode},
+      </if>
+      <if test="item.pd_whname !=null">
+        pd_whname = #{item.pd_whname},
+      </if>
+      <if test="item.pd_inwhid !=null">
+        pd_inwhid = #{item.pd_inwhid},
+      </if>
+      <if test="item.pd_inwhcode !=null">
+        pd_inwhcode = #{item.pd_inwhcode},
+      </if>
+      <if test="item.pd_inwhname !=null">
+        pd_inwhname = #{item.pd_inwhname},
+      </if>
+      <if test="item.pd_orderid !=null">
+        pd_orderid = #{item.pd_orderid},
+      </if>
+      <if test="item.pd_sdid !=null">
+        pd_sdid = #{item.pd_sdid},
+      </if>
+      <if test="item.pd_status !=null">
+        pd_status = #{item.pd_status},
+      </if>
+      <if test="item.pd_remark !=null">
+        pd_remark = #{item.pd_remark},
+      </if>
+      <if test="item.companyId!=null">
+        companyId = #{item.companyId},
+      </if>
+      <if test="item.updaterId!=null">
+        updaterId = #{item.updaterId},
+      </if>
+      <if test="item.updateTime!=null">
+        updateTime = #{item.updateTime},
+      </if>
       pd_text1 = #{item.pd_text1},
       pd_text2 = #{item.pd_text2},
       pd_text3 = #{item.pd_text3},
       pd_text4 = #{item.pd_text4},
       pd_text5 = #{item.pd_text5},
-      pd_ym = #{item.pd_ym},
-      pd_yqty = #{item.pd_yqty}
+      <if test="item.pd_ym!=null">
+        pd_ym = #{item.pd_ym},
+      </if>
+      <if test="item.pd_yqty!=null">
+        pd_yqty = #{item.pd_yqty},
+      </if>
     </set>
       where PD_ID = #{item.id,jdbcType=INTEGER}
     </foreach>
   </update>
 
-  <update id="updatePurchaseYqty" parameterType="java.lang.Long">
+  <update id="updatePurchaseYqty" parameterType="java.lang.Integer">
 
 update prodiodetail a
-set a.pd_yqty =ifnull((select  b.pd_outqty  from  (select pd_outqty,pd_ioid from prodiodetail where pd_piclass='采购验退单') b where ifnull(b.pd_ioid ,0)= a.pd_id ),0)
-where a.pd_piid = #{id,jdbcType=INTEGER}
+set a.pd_yqty =ifnull((select  b.pd_outqty  from  (select pd_ioid,sum(pd_outqty) pd_outqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='采购验退单'
+and pi_puid=#{id,jdbcType=INTEGER}  GROUP BY pd_ioid) b where ifnull(b.pd_ioid ,0)= a.pd_id ),0)
+where a.pd_piid = (select pi_id from prodinout where pi_puid=#{id,jdbcType=INTEGER} and pi_class='采购验收单')
   </update>
 
 
+  <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
+    select * from prodiodetail a left join product b on b.pr_id= a.pd_prodid and a.companyid = b.companyid
+    where pd_piid=#{id} order by pd_pdno
+  </select>
+
+
+
 </mapper>

+ 0 - 1
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -30,7 +30,6 @@
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
-    <result column="pi_inid" jdbcType="INTEGER" property="pi_inid" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
     <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
     <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />

+ 8 - 30
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -32,7 +32,7 @@
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
-    <result column="pi_inid" jdbcType="INTEGER" property="pi_inid" />
+
 
 
   </resultMap>
@@ -101,7 +101,7 @@
     pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
     pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
     pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
-    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_inid
+    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5
   </sql>
   <sql id="Blob_Column_List">
     pi_address
@@ -165,7 +165,7 @@
       pi_printstatuscode, companyid, updaterid, 
       updatetime, pi_text1, pi_text2, 
       pi_text3, pi_text4, pi_text5,
-      pi_address,pi_inid)
+      pi_address)
     values (#{pi_id,jdbcType=INTEGER}, #{pi_inoutno,jdbcType=VARCHAR}, #{pi_class,jdbcType=VARCHAR}, 
       #{pi_date,jdbcType=TIMESTAMP}, #{pi_vendid,jdbcType=INTEGER}, #{pi_vendcode,jdbcType=VARCHAR}, 
       #{pi_vendname,jdbcType=VARCHAR}, #{pi_custid,jdbcType=INTEGER}, #{pi_custcode,jdbcType=VARCHAR}, 
@@ -176,7 +176,7 @@
       #{pi_printstatuscode,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
       #{updatetime,jdbcType=TIMESTAMP}, #{pi_text1,jdbcType=VARCHAR}, #{pi_text2,jdbcType=VARCHAR}, 
       #{pi_text3,jdbcType=VARCHAR}, #{pi_text4,jdbcType=VARCHAR}, #{pi_text5,jdbcType=VARCHAR}, 
-      #{pi_address,jdbcType=LONGVARCHAR}.#{pi_inid,jdbcType=INTEGER})
+      #{pi_address,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
     <selectKey resultType="java.lang.Long" keyProperty="id">
@@ -275,9 +275,6 @@
       <if test="pi_address != null">
         pi_address,
       </if>
-      <if test="pi_inid != null">
-        pi_inid,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -371,11 +368,6 @@
       <if test="pi_address != null">
         #{pi_address,jdbcType=LONGVARCHAR},
       </if>
-      <if test="pi_inid != null">
-        #{pi_inid,jdbcType=INTEGER},
-      </if>
-
-
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.usoftchina.saas.purchase.po.ProdInOutExample" resultType="java.lang.Long">
@@ -480,9 +472,6 @@
       <if test="record.pi_address != null">
         pi_address = #{record.pi_address,jdbcType=LONGVARCHAR},
       </if>
-      <if test="record.pi_inid != null">
-        pi_address = #{record.pi_inid,jdbcType=INTEGER},
-      </if>
 
     </set>
     <if test="_parameter != null">
@@ -521,10 +510,7 @@
       pi_text3 = #{record.pi_text3,jdbcType=VARCHAR},
       pi_text4 = #{record.pi_text4,jdbcType=VARCHAR},
       pi_text5 = #{record.pi_text5,jdbcType=VARCHAR},
-      pi_address = #{record.pi_address,jdbcType=LONGVARCHAR},
-      pi_inid = #{record.pi_inid,jdbcType=INTEGER}
-
-
+      pi_address = #{record.pi_address,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -560,9 +546,7 @@
       pi_text2 = #{record.pi_text2,jdbcType=VARCHAR},
       pi_text3 = #{record.pi_text3,jdbcType=VARCHAR},
       pi_text4 = #{record.pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{record.pi_text5,jdbcType=VARCHAR},
-      pi_inid = #{record.pi_inid,jdbcType=INTEGER}
-
+      pi_text5 = #{record.pi_text5,jdbcType=VARCHAR}
 
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -661,10 +645,6 @@
       <if test="pi_address != null">
         pi_address = #{pi_address,jdbcType=LONGVARCHAR},
       </if>
-      <if test="pi_inid != null">
-        pi_inid = #{pi_inid,jdbcType=INTEGER},
-      </if>
-
 
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
@@ -700,8 +680,7 @@
       pi_text3 = #{pi_text3,jdbcType=VARCHAR},
       pi_text4 = #{pi_text4,jdbcType=VARCHAR},
       pi_text5 = #{pi_text5,jdbcType=VARCHAR},
-      pi_address = #{pi_address,jdbcType=LONGVARCHAR},
-      pi_inid = #{pi_inid,jdbcType=INTEGER}
+      pi_address = #{pi_address,jdbcType=LONGVARCHAR}
 
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </update>
@@ -735,8 +714,7 @@
       pi_text2 = #{pi_text2,jdbcType=VARCHAR},
       pi_text3 = #{pi_text3,jdbcType=VARCHAR},
       pi_text4 = #{pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{pi_text5,jdbcType=VARCHAR},
-      pi_inid = #{pi_inid,jdbcType=INTEGER}
+      pi_text5 = #{pi_text5,jdbcType=VARCHAR}
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

+ 10 - 23
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml

@@ -55,39 +55,26 @@
         <result column="pd_yqty" property="pd_yqty" jdbcType="DOUBLE" />
     </resultMap>
 
-    <select id="selectPurchaseListByCondition" parameterType="com.usoftchina.saas.purchase.dto.PurchaseReqDTO" resultMap="BaseResultMap">
+    <select id="selectPurchaseListByCondition" parameterType="string" resultMap="BaseResultMap">
         select  *  from purchase left join purchasedetail on pu_id=pd_puid
         <where>
-            <if test="begin != null">
-                pu_date &gt;= ${begin}
+            <if test="con != null">
+                 ${con}
             </if>
-            <if test="end!= null">
-                AND  pu_date &lt;= ${end}
+            <if test="companyId != null">
+              and   companyId = #{companyId}
             </if>
-            <if test="status != null">
-                AND pu_status=${status}
-            </if>
-            <if test="keyword != null">
-                AND ${keyword}
-            </if>
-            order by pu_id,pd_detno
-        </where>
+        </where>  order by pu_id,pd_detno
     </select>
 
     <select id="selectPurchaseBycondition" parameterType="com.usoftchina.saas.purchase.dto.PurchaseReqDTO" resultMap="BaseResultMap">
         select  *  from purchase
         <where>
-            <if test="begin != null">
-                pu_date &gt;= ${begin}
-            </if>
-            <if test="end!= null">
-                AND  pu_date &lt;= ${end}
-            </if>
-            <if test="status != null">
-                AND pu_status=${status}
+            <if test="con != null">
+               ${con}
             </if>
-            <if test="keyword != null">
-                AND ${keyword}
+            <if test="companyId != null">
+               and  companyId = #{companyId}
             </if>
         </where>
         order by pu_id

+ 4 - 1
framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java

@@ -43,7 +43,10 @@ public enum ExceptionCode implements BaseExceptionCode {
     FILE_FOLDER_NULL(55502, "文件夹为空"),
 
     TURNIN_EXIST(60000,"已入库"),
-    TURNINNUM_NOT_EXIST(60001,"无可转数")
+    TURNINNUM_NOT_EXIST(60001,"无可转数"),
+
+    CLOSED_EXIST(60002,"已关闭")
+
     ;
 
     private int code;

+ 5 - 0
frontend/saas-web/Dockerfile

@@ -0,0 +1,5 @@
+FROM hub.c.163.com/library/nginx
+MAINTAINER USOFTCHINA <yingp@usoftchina.com>
+RUN rm /etc/nginx/conf.d/default.conf
+ADD runtime/nginx/default.conf /etc/nginx/conf.d/
+COPY build/production/saas/ /usr/share/nginx/html/

+ 7 - 0
frontend/saas-web/app/model/document/product.js

@@ -0,0 +1,7 @@
+Ext.define('saas.model.document.product', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'pr_detail', type: 'string' },
+        { name: 'pr_unit', type: 'string' }
+    ]
+});

+ 18 - 0
frontend/saas-web/app/model/purchase/purchasedetail.js

@@ -0,0 +1,18 @@
+Ext.define('saas.model.purchase.purchasedetail', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'pd_detno', type: 'int' },
+        { name: 'id', type: 'int' },
+        { name: 'pd_prodcode', type: 'string' },
+        { name: 'pd_qty', type: 'int' },
+        { name: 'pd_yqty', type: 'int' },
+        { name: 'pd_price', type: 'float' },
+        { name: 'pd_taxrate', type: 'float' },
+        { name: 'pd_total', type: 'float' },
+        { name: 'pd_delivery', type: 'date' },
+        { name: 'pd_taxtotal', type: 'float' }
+    ],
+    //一对一映射
+    associations: [{ type: 'hasOne', model: 'saas.model.document.product', associationKey: 'product'}]
+});

+ 2 - 14
frontend/saas-web/app/util/FormUtil.js

@@ -69,23 +69,11 @@ Ext.define('saas.util.FormUtil', {
                             formModel.set('_detailBindFields', cnames);
                             item.bind = {
                                 store: '{_detailStore}'
-                            };       
+                            };     
                             formModel.set('_detailStore', Ext.create('Ext.data.Store', {
-                                fields: item.columns ? item.columns.filter(function(c) {
-                                    return !!c.dataIndex;
-                                }).map(function(c) {
-                                    var type = "string";
-                                    if(c.xtype!=""){
-                                        if(c.xtype=="numbercolumn"){
-                                            type = "float"
-                                        }
-                                    }
-                                    return {name: c.dataIndex,type:type};
-                                }) : [],
+                                model:item.storeModel,
                                 data: []
                             }));
-
-
                         }
                     });
                 }

+ 4 - 4
frontend/saas-web/app/util/QueryUtil.js

@@ -25,15 +25,15 @@ Ext.define('saas.util.QueryUtil', {
             }
         }
         if(Mode=="MAIN"){
-            grid._Mode = Mode;
-            grid.reconfigure(grid.store, grid._baseColumn);
+            grid.Mode = Mode;
+            grid.reconfigure(grid.store, grid.baseColumn);
             grid.store.loadPage(1);
         }else{
             //若明细字段含明细字段注意切换数据源 grid.reconfigure(store, columns);
             //关联viewName = 关联viewName+"-RelativeGrid" selModel
             //grid.selModel = '';
-            grid._Mode = Mode;
-            grid.reconfigure(grid.store, grid._relativeColumn);
+            grid.Mode = Mode;
+            grid.reconfigure(grid.store, grid.relativeColumn);
             grid.store.loadPage(1);
         }
     },

+ 5 - 1
frontend/saas-web/app/view/auth/Login.js

@@ -5,6 +5,10 @@ Ext.define('saas.view.auth.Login', {
     extend: 'Ext.container.Container',
     xtype: 'login',
 
+    requires: [
+        'Ext.form.Label'
+    ],
+
     controller: 'login',
 
     cls: 'auth-login',
@@ -37,7 +41,7 @@ Ext.define('saas.view.auth.Login', {
             items: [
                 {
                     xtype: 'label',
-                    text: '账户登录'
+                    text: '账   录'
                 },
                 {
                     xtype: 'textfield',

+ 1 - 1
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -1,7 +1,6 @@
 Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
     extend: 'Ext.grid.Panel',
     xtype: 'dbfindgridpanel',
-    GridUtil: Ext.create('saas.util.GridUtil'),
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     dataUrl: '',
     dbSearchFields: [],
@@ -105,6 +104,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
         },
         itemClick: function(view,record) {
             var me = this;
+            debugger;
             var dbfinds = me.dbfinds;
             if(dbfinds&&dbfinds.length>0){
                 if(me.belong=='grid'){

+ 15 - 10
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -6,8 +6,6 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     displayField: 'dispaly',
     valueField: 'value',
     triggerCls: 'x-form-search-trigger',
-    GridUtil: Ext.create('saas.util.GridUtil'),
-    BaseUtil: Ext.create('saas.util.BaseUtil'),
     minChars:1, // 设置用户输入字符多少时触发查询
     tpl: '',
     enableKeyEvents:true,
@@ -99,20 +97,25 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     },
     onTriggerClick:function(f){
         //判断dbfindtrigger归属
-        var form = f.judge(f);//form
-        var win = form.getController().getView().add(Ext.create('Ext.window.Window', {   
+        // var form = f.judge(f);//form
+        var panel = f.up('core-tab-panel');
+        var panelEl = panel.getEl();
+        var box = panelEl.getBox();
+        var height = box.height;
+        var width = box.width;
+        var win = panel.add(Ext.create('Ext.window.Window', {   
             trigger:f,
             belong:f.ownerCt,  
             modal:true,
-            height: '80%',
-            width: '80%',
+            height: height * 0.8,
+            width: width * 0.8,
             title: '查找',
             scrollable: true,
             bodyPadding: 10,
             constrain: true,
             closable: true,
             layout:'fit',
-            renderTo:Ext.getCmp('main-tab-panel').getActiveTab().getEl(),
+            renderTo:panel.getEl(),
             items:[{
                 xtype:'dbfindgridpanel',
                 columns: f.dbColumns,
@@ -127,11 +130,13 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     },
 
     judge:function(f){
-        if(f.ownerCt.xtype.trim().toUpperCase().indexOf('FORMPANEL')>-1){
+        if(f.ownerCt.xtype.trim().toUpperCase().indexOf('QUERYFORMPANEL')>-1){
+            f.belong = 'query';
+            return f.ownerCt.ownerCt
+        }else if(f.ownerCt.xtype.trim().toUpperCase().indexOf('FORMPANEL')>-1){
             f.belong = 'form';
             return f.ownerCt
-        }
-        else if(f.column){
+        }else if(f.column){
             f.belong = 'grid';
             return f.column.ownerCt.ownerCt.ownerCt
         }

+ 5 - 3
frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js

@@ -166,11 +166,13 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
     },
 
     judge:function(f){
-        if(f.ownerCt.xtype.trim().toUpperCase().indexOf('FORMPANEL')>-1){
+        if(f.ownerCt.xtype.trim().toUpperCase().indexOf('QUERYFORMPANEL')>-1){
+            f.belong = 'query';
+            return f.ownerCt.ownerCt
+        }else if(f.ownerCt.xtype.trim().toUpperCase().indexOf('FORMPANEL')>-1){
             f.belong = 'form';
             return f.ownerCt
-        }
-        else if(f.column){
+        }else if(f.column){
             f.belong = 'grid';
             return f.column.ownerCt.ownerCt.ownerCt
         }

+ 1 - 0
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -39,6 +39,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var me = this;
         var form = this.getView();
         var id = form.getForm().findField(form._idField);
+        var code = form.getForm().findField(form._codeField);
         if(id&&id.value!=0){
             me.BaseUtil.request({
                 url: form._deleteUrl+id.value,

+ 37 - 39
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -7,19 +7,21 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     GridUtil: Ext.create('saas.util.GridUtil'),
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     //字段属性
-    _baseColumn: [],
-    _relativeColumn: [],
-    _idField:'',
-    _codeField:'',
-    _title:'',
-    _addXtype:'',
-    _baseVastUrl:'',
+    baseColumn: [],
+    relativeColumn: [],
+
+    idField:'',
+    codeField:'',
+    addTitle:'',
+    addXtype:'',
+    baseVastUrl:'',
+    queryMode: 'MAIN',
+    defaultCondition: '',
 
     //基础属性
     border: 1,
     anchor: '100% 70%',
     loadMask: true,
-    frame: true,
     showIndex: true,
     columnWidth: 1.0,
     showRowNum: true,
@@ -36,7 +38,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 data: [],
                 proxy: {
                     type: 'ajax',
-                    url: me._baseVastUrl+'list',
+                    url: me.baseVastUrl+'list',
                     actionMethods: {
                         read: 'GET'
                     },
@@ -48,29 +50,22 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 },
                 listeners: {
                     beforeload: function (store, op) {
-                        var condition = '',
-                        queryForm = me.ownerCt.down('form'),
-                        condition = me.QueryUtil.getFormCondition(queryForm),
-                        mode = me._Mode,
-                        defaultCondition = me._defaultCondition;
-                        if(defaultCondition){
-                            if (Ext.isEmpty(condition)) {
-                                condition = defaultCondition + ' and '+condition;
-                            }else{
-                                condition = defaultCondition;
-                            }
-                        }
-                        if (Ext.isEmpty(condition)) {
-                            condition = " 1=1 ";
-                        }
-                        if(!mode){
-                            mode='MAIN';
+                        var queryPanel = me.up('core-query-querypanel'),
+                        condition = queryPanel.getConditions(),
+                        defaultCondition = me.defaultCondition,
+                        mode = queryPanel.getQueryMode();
+
+                        if(defaultCondition) {
+                            condition.push({
+                                type: 'condition',
+                                value: defaultCondition
+                            });
                         }
                         Ext.apply(store.proxy.extraParams, {
                             number: op._page,
                             size: store.pageSize,
                             mode:mode,
-                            keyword: condition
+                            condition: JSON.stringify(condition)
                         });
     
                     }
@@ -79,6 +74,9 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             dockedItems: [{
                 xtype: 'toolbar',
                 dock: 'top',
+                style: {
+                    borderTop: 'none'
+                },
                 defaults: { // defaults 将会应用所有的子组件上,而不是父容器
                     listeners: {
                         'mouseover':function(){
@@ -185,15 +183,15 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         itemdblClick: function (tableView, record, item, index, e, eOpts) {
             var grid = tableView.up('grid'),
                 mainTab = Ext.getCmp('main-tab-panel'),
-                idValue = record.get(grid._idField),
-                codeValue = record.get(grid._codeField),
+                idValue = record.get(grid.idField),
+                codeValue = record.get(grid.codeField),
                 id = grid.xtype + idValue;
                 existingItem = mainTab.down('[id=' + id + ']');
             if (!existingItem) {
                 var form = {
-                    xtype:grid._addXtype,
+                    xtype:grid.addXtype,
                     id,
-                    title:grid._title+"("+codeValue+")",
+                    title:grid.addTitle+"("+codeValue+")",
                     initId:idValue
                 };
                 mainTab.setActiveTab(mainTab.add(form));
@@ -215,9 +213,9 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             existingItem = mainTab.down('[id=' + id + ']');
         if (!existingItem) {
             var form = {
-                xtype:grid._addXtype,
+                xtype:grid.addXtype,
                 id,
-                title:'新增'+grid._title
+                title:'新增'+grid.addTitle
             };
             mainTab.setActiveTab(mainTab.add(form));
         }
@@ -256,7 +254,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         if(data&&data.length>0){
             var params = JSON.stringify({baseDTOs:data});
             me.BaseUtil.request({
-                    url: me._baseVastUrl+type,
+                    url: me.baseVastUrl+type,
                     params: params,
                     method: 'POST',
                     async:false
@@ -281,13 +279,13 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             items = me.selModel.getSelection(),
             data = new Array() ;
             Ext.each(items, function(item, index){
-                if(!Ext.isEmpty(item.data[me._idField])&&!Ext.isEmpty(item.data[me._codeField])){
+                if(!Ext.isEmpty(item.data[me.idField])&&!Ext.isEmpty(item.data[me.codeField])){
                     var o = new Object();
-                    if(me._idField){
-                        o['id'] = item.data[me._idField];
+                    if(me.idField){
+                        o['id'] = item.data[me.idField];
                     }
-                    if(me._codeField){
-                        o['code'] = item.data[me._codeField];
+                    if(me.codeField){
+                        o['code'] = item.data[me.codeField];
                     }
                     data.push(o);
                 }

+ 192 - 8
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -7,7 +7,10 @@ Ext.define('saas.view.core.query.QueryPanel', {
 
     layout: 'anchor',
     autoScroll: true,
+    border: 1,
+    bodyPadding: 5,
     margin: '0',
+    
     items: [{
         anchor: '100% 30%',
         reference: 'queryform',
@@ -20,36 +23,217 @@ Ext.define('saas.view.core.query.QueryPanel', {
 
     initComponent: function () {
         var me = this;
-        me.setQueryItems(me.queryFormItems);
+        me.setQueryFormItems();
         me.setQuertGridConfigs();
         me.callParent(arguments);
     },
 
     getQueryForm: function () {
         var me = this,
-            refs = me.getReferences();
+        queryForm = me.items[0];
 
-        return refs['queryform'];
+        return queryForm;
     },
 
     getQueryGrid: function () {
         var me = this,
-            refs = me.getReferences();
+        queryGrid = me.items[1];
 
-        return refs['querygrid'];
+        return queryGrid;
     },
 
-    setQueryItems: function (items) {
+    /**
+     * 解析查询字段并处理一些初始化配置
+     */
+    setQueryFormItems: function () {
         var me = this,
-        queryForm = me.items[0];
+        items = me.queryFormItems,
+        queryForm = me.getQueryForm(),
+        viewModel = me.getViewModel();
+
+        Ext.Array.each(items, function(item) {
+            var bind = item.bind,
+            name = item.name,
+            ignore = item.ignore,
+            defaultValue = item.defaultValue,
+            showDetail = item.showDetail,
+            shwoDetailFunc = item.shwoDetailFunc;
+
+            // 设置model绑定
+            if(!ignore) {
+                if(bind) {
+                    if(!Ext.isString(bind)) {
+                        bind = name;
+                        Ext.apply(bind, {
+                            value: '{form.' + bind + '}'
+                        });
+                    }else {
+                        bind = bind.replace(/[{|}]/g, '');
+                        item.bind = '{form.' + bind + '}';
+                    }
+                }else {
+                    bind = name;
+                    item.bind = '{form.' + bind + '}';
+                }
+                // 设置默认值
+                if(defaultValue) {
+                    viewModel.set('form.' + bind, defaultValue);
+                }
+                // 设置关联列表
+                if(showDetail) {
+                    var fields = viewModel.get('showDetailFields');
+                    fields.push(bind);
+                    viewModel.set('showDetailFields', fields);
+                }
+            }
+        });
+
         queryForm.items = items;
     },
 
     setQuertGridConfigs: function() {
         var me = this,
         queryGrid = me.items[1];
-        me.queryGridConfig['columns']=me.queryGridConfig._baseColumn || [];
+        me.queryGridConfig['columns']=me.queryGridConfig.baseColumn || [];
         Ext.apply(queryGrid,me.queryGridConfig);
+    },
+
+    /**
+     * 获得过滤条件
+     */
+    getConditions: function() {
+        var me = this,
+        formItems = me.queryFormItems,
+        viewModel = me.getViewModel(),
+        viewModelData = viewModel.getData(),
+        bindItems = viewModelData['form'],
+        condition,
+        conditions = [];
+
+        for(k in bindItems) {
+            var item = Ext.Array.findBy(formItems, function(i) {
+                return i.name == k;
+            });
+            var field = item.name,
+            func = item.getCondition,
+            value = bindItems[k],
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(type),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        }
+
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(type) {
+        var operation;
+
+        if(type == 'string') {
+            operation = 'like';
+        }else if(type == 'number') {
+            operation = '=';
+        }else if(type == 'date') {
+            operation = '=';
+        }else if(type == 'enum') {
+            operation = 'in';
+        }
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s') + ',' + Ext.Date.format(new Date(to), 'Y-m-d h:i:s');
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+
+    /**
+     * 获得是否是关联列表模式
+     */
+    getQueryMode: function() {
+        var me = this,
+        formItems = me.queryFormItems,
+        viewModel = me.getViewModel(),
+        viewModelData = viewModel.getData(),
+        formData = viewModelData['form'],
+        showDetailFields = viewModelData['showDetailFields'],
+        detailModel;
+
+        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;
+            }
+            var isShowDetail = item.isShowDetail || function(value) {
+                return !!value;
+            }
+            var value = formData[name];
+            return isShowDetail(value);
+        });
+
+        return detailModel ? 'DETAIL' : 'MAIN';
     }
 
 });

+ 4 - 3
frontend/saas-web/app/view/core/query/QueryPanelController.js

@@ -28,8 +28,9 @@ Ext.define('saas.view.core.query.QueryPanelController', {
     },
     onQuery: function (btn) {
         var me = this,
-        queryForm = btn.ownerCt.ownerCt,
-        grid = queryForm.ownerCt.down('grid');
-        grid.QueryUtil.turnRelativeGrid(grid,queryForm);
+        queryPanel = me.getView(),
+        queryGrid = queryPanel.down('core-query-querygridpanel');
+
+        queryGrid.store.loadPage(1);
     }
 });

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

@@ -1,4 +1,9 @@
 Ext.define('saas.view.core.query.QueryPanelModel', {
     extend: 'Ext.app.ViewModel',
     alias: 'viewmodel.core-query-querypanel',
+
+    data: {
+        form: {}, // 查询字段记录
+        showDetailFields: [], // 关联列表切换字段
+    }
 });

+ 1 - 5
frontend/saas-web/app/view/core/tab/Controller.js

@@ -5,12 +5,8 @@ Ext.define('saas.view.core.tab.Controller', {
     init: function() {
         var me = this,
         tab = me.getView(),
-        tabConfig = tab.tabViewConfig,
-        type = tabConfig.type,
-        viewType = type == 'form' ? tabConfig.formtype : tabConfig.querytype;
+        viewType = tab.viewType;
 
-        console.log(viewType);
-        
         tab.add({
             xtype: viewType
         });

+ 34 - 9
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -7,6 +7,9 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
     layout: 'fit',
     modal: true,
     width: 400,
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
     height: 220,
     listeners:{
       show:function(w){
@@ -40,10 +43,10 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         vendorkind:{
             items:[{
                 xtype:'hidden',
-                name:'vk_id'
+                name:'id'
             },{
                 xtype:'textfield',
-                name:'vk_kind',
+                name:'vk_name',
                 allowBlank:false,
                 fieldLabel:'类型'
             }],
@@ -91,15 +94,37 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         return Ext.apply(conf, me.etc[kind]);
     },
     onSave:function(){
-
+        var belong = this.belong;
         var form=this.down('form');
-        alert('save');
+        var dataField = form.down('[name='+belong.dataField+']');
+        if(!dataField.value){
+             Ext.Msg.alert('提示','数据有误');
+            return false;
+        }
+        var keyField = form.down('[name='+belong.keyField+']');
+        //保存接口
+        var params = {};
+        params[belong.dataField] = dataField.value;
+        params[belong.keyField] = keyField.value || 0;
+        this.BaseUtil.request({
+            url: belong.reqUrl,
+            params: JSON.stringify(params),
+            method: 'POST',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','保存成功');
+                var grid = form.ownerCt._parent.lookup('document-kind-Grid');
+                grid.store.load();
+                form.ownerCt.close();
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','保存失败');
+        });
     },
     onCancel:function(){
-        alert('cancel');
         this.hide();
-    },
-
-
-
+    }
 });

+ 7 - 3
frontend/saas-web/app/view/document/kind/Kind.js

@@ -4,6 +4,8 @@
 Ext.define('saas.view.document.kind.Kind', {
     extend: 'Ext.panel.Panel',
     xtype: 'document-kind',
+    autoScroll: true,
+    layout:'fit',
     controller:'document-kind',
     viewModel: {
         type: 'document-kind'
@@ -78,11 +80,13 @@ Ext.define('saas.view.document.kind.Kind', {
         vendorkind:{
             columns: [{
                 text: '供应商类型',
-                dataIndex: 'vk_kind',
+                dataIndex: 'vk_name',
                 flex: 1
             }],
-            keyField:'vk_id',
-            reqUrl:''
+            keyField:'id',
+            dataField:'vk_name',
+            reqUrl:'http://192.168.253.41:9480/api/document/vendorkind/save',
+            delUrl:'http://192.168.253.41:9480/api/document/vendorkind/delete'
         },
         productkind:{
             columns: [{

+ 23 - 2
frontend/saas-web/app/view/document/kind/KindController.js

@@ -4,12 +4,16 @@
 Ext.define('saas.view.document.kind.KindController', {
     extend: 'Ext.app.ViewController',
     alias: 'controller.document-kind',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
     loadDefualt:function(grid){
         var me=this,
             view = me.getView(),
             vm = me.getViewModel(),
             defaultKind=vm.getData()['dataKind'].value,
             etc = view.etc[defaultKind];
+
         grid.reconfigure(vm.getStore(defaultKind), me.insertActionColumn(etc.columns));
     },
     onKindToggle:function(container, button, pressed){
@@ -20,6 +24,7 @@ Ext.define('saas.view.document.kind.KindController', {
             vm = me.getViewModel(),
             etc = view.etc[name],
             store=vm.getStore(name);
+
        var columns=me.insertActionColumn(etc.columns);
         grid.reconfigure(store, columns);
         if(store) store.reload();
@@ -68,11 +73,25 @@ Ext.define('saas.view.document.kind.KindController', {
             dataKind=me.getViewModel().getData()['dataKind'].value;
         rec = grid.getStore().getAt(row);
         var keyV=rec.get(view.etc[dataKind].keyField);
-        alert('删除ID:'+keyV);
+        //删除接口
+        this.BaseUtil.request({
+            url: view.etc[dataKind].delUrl,
+            params: {id:keyV},
+            method: 'POST'
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','删除成功');
+                grid.store.load();
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','删除失败');
+        });
     },
     createDialog: function(dataKind,record) {
         var view = this.getView();var me=this;
-
         this.isEdit = !!record;
         this.dialog = view.add({
             xtype: 'document-kind-childwin',
@@ -80,6 +99,8 @@ Ext.define('saas.view.document.kind.KindController', {
                 title: record ? '修改{title}类型' : '新增{title}类型'
             },
             dataKind:dataKind,
+            belong:this.getView().etc[dataKind],
+            _parent:this.getView(),
             record:record,
             session: true
         });

+ 8 - 4
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -26,14 +26,18 @@ Ext.define('saas.view.document.kind.KindModel', {
         },
         vendorkind:{
             fields:[
-                {name: 'vk_id', type: 'int'},
-                {name: 'vk_kind',  type: 'string'}
+                {name: 'id', type: 'int'},
+                {name: 'vk_name',  type: 'string'}
             ],
             proxy: {
                 type: 'ajax',
-                url: 'resources/json/vendor.json',
+                url: 'http://192.168.253.41:9480/api/document/vendorkind/getAll',
+                actionMethods: {
+                    read: 'GET'
+                },
                 reader: {
-                    type: 'json'
+                    type: 'json',
+                    rootProperty: 'data'
                 }
             },
             pageSize: null,

+ 2 - 1
frontend/saas-web/app/view/main/Main.js

@@ -3,7 +3,8 @@ Ext.define('saas.view.main.Main', {
     xtype: 'main',
 
     requires: [
-        'Ext.list.Tree'
+        'Ext.list.Tree',
+        'Ext.Img'
     ],
     
     controller: 'main',

+ 4 - 0
frontend/saas-web/app/view/main/MainContainerWrap.js

@@ -2,6 +2,10 @@ Ext.define('saas.view.main.MainContainerWrap', {
     extend: 'Ext.container.Container',
     xtype: 'maincontainerwrap',
 
+    requires: [
+        'Ext.tab.Panel'
+    ],
+
     id: 'main-view-detail-wrap',
     flex: 1,
 

+ 0 - 29
frontend/saas-web/app/view/main/MainController.js

@@ -7,35 +7,6 @@ Ext.define('saas.view.main.MainController', {
 
     alias: 'controller.main',
 
-    setActiveTab: function(dataset) {
-        var me = this,
-        refs = me.getReferences(),
-        mainTab = refs.mainTabPanel,
-        // existingItem = mainTab.child(type),
-        newView,
-        type = dataset.type,
-        title = dataset.text,
-        tabTitle = title + (type == 'form' ? '' : '查询'),
-        id = dataset.id,
-        tabId = 'maintab-' + type + '-' + id,
-        existingItem = mainTab.down('[id=' + tabId + ']'),
-        lastView = mainTab.getActiveTab();
-
-        if (!existingItem) {
-            existingItem = Ext.create('saas.view.core.tab.Panel', {
-                id: tabId,
-                title: tabTitle,
-                tabViewConfig: dataset
-            });
-            Ext.suspendLayouts();
-            mainTab.setActiveTab(mainTab.add(existingItem));
-            Ext.resumeLayouts(true);
-        }else {
-            mainTab.setActiveTab(existingItem);
-        }
-        
-    },
-
     onToggleNavigationSize: function () {
         var me = this,
         refs = me.getReferences(),

+ 0 - 552
frontend/saas-web/app/view/main/MainModel.js

@@ -8,557 +8,5 @@ Ext.define('saas.view.main.MainModel', {
 
     data: {
         
-    },
-
-    stores: {
-        navItems: {
-            type: 'tree',
-            root: {
-                expanded: true,
-                children: [
-                    {
-                        id: 'gh',
-                        text: '购货',
-                        iconCls: 'x-fa fa-shopping-basket',
-                        children: [
-                            {
-                                id: 'cgdj',
-                                text: '采购单据',
-                                children: [
-                                    {
-                                        id: 'purchaseOrder',
-                                        text: '采购单(维护界面)',
-                                        viewType:'purchase-purchase-formpanel',
-                                        leaf: true
-                                    },{
-                                        id: 'purchaseQuery',
-                                        text: '采购单查询',
-                                        viewType:'purchase-purchase-querypanel',
-                                        leaf: true
-                                    },{
-                                        id: 'purchaseInOrder',
-                                        text: '采购验收单(维护界面)',
-                                        viewType:'purchase-purchaseIn-formpanel',
-                                        leaf: true
-                                    },{
-                                        id: 'purchaseInQuery',
-                                        text: '采购验收单查询',
-                                        viewType:'purchase-purchaseIn-querypanel',
-                                        leaf: true
-                                    },{
-                                        id: 'purchaseOutOrder',
-                                        text: '采购验退单(维护界面)',
-                                        viewType:'purchase-purchaseOut-formpanel',
-                                        leaf: true
-                                    },{
-                                        id: 'purchaseOutQuery',
-                                        text: '采购验退单查询',
-                                        viewType:'purchase-purchaseOut-querypanel',
-                                        leaf: true
-                                    },
-                                    {
-                                        id: 'form1',
-                                        text: '测试-采购单明细界面',
-                                        viewType: 'test-order-formpanel',
-                                        leaf: true
-                                    }, {
-                                        id: 'myform',
-                                        text: '测试-明细界面',
-                                        viewType: 'test-myform-formpanel',
-                                        leaf: true
-                                    },
-                                    {
-                                        id: 'myquerytest',
-                                        text: '测试-采购单查询界面',
-                                        viewType: 'test-query-querypanel',
-                                        leaf: true
-                                    },
-                                    {
-                                        id: 'ghdd',
-                                        text: '购货订单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        id: 'ghd',
-                                        text: '购货单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        id: 'ghthd',
-                                        text: '购货退货单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        id: 'yxdgkb',
-                                        text: '以销定购看板',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        id: 'znbh',
-                                        text: '智能补货',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            },
-                            {
-                                text: '采购报表',
-                                children: [
-                                    {
-                                        text: '采购订单跟踪表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '采购明细表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '采购汇总表(按商品)',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '采购汇总表(按供应商)',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '采购付款一览表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        text: '销货',
-                        iconCls: 'x-fa fa-shopping-cart',
-                        children: [
-                            {
-                                text: '销售单据',
-                                children: [
-                                    {
-                                        text: '销货订单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销货单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销货退货单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '原始单据',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销售开票',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            },
-                            {
-                                text: '销售报表',
-                                children: [
-                                    {
-                                        text: '销售订单跟踪表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销售明细表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销售汇总表(按商品)',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销售汇总表(按客户)',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销售汇总表(按销售人员)',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销售收款一览表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '往来单位欠款表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销售利润表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '销售排行表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        text: '仓库',
-                        iconCls: 'x-fa fa-archive',
-                        children: [
-                            {
-                                text: '仓库单据',
-                                children: [
-                                    {
-                                        text: '调拨单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '盘点',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '盘点记录',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '序列号盘点',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '其他入库单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '其他出库单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '成本调整单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '组装单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '拆卸单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            },
-                            {
-                                text: '仓库报表',
-                                children: [
-                                    {
-                                        text: '商品库存余额表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '商品收发明细表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '商品收发汇总表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '序列号跟踪表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '序列号状态表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '批次保质期清单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '批次跟踪表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        text: '资金',
-                        iconCls: 'x-fa fa-credit-card',
-                        children: [
-                            {
-                                text: '资金单据',
-                                children: [
-                                    {
-                                        text: '收款单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '付款单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '核销单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '其他收入单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '其他支出单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '采购销售费用清单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '资金转账单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            },
-                            {
-                                text: '资金报表',
-                                children: [
-                                    {
-                                        text: '现金银行报表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '应收账款明细表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '应付账款明细表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '客户对账单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '供应商对账单',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '其他收支明细表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '利润表',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        text: '资料',
-                        iconCls: 'x-fa fa-book',
-                        children: [
-                            {
-                                text: '基础资料',
-                                children: [
-                                    {
-                                        text: '客户资料',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '供应商管理',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '商品管理',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '仓库管理',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '职员管理',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '账户管理',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '发货地址管理',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '新手导航',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            },
-                            {
-                                text: '辅助资料',
-                                children: [
-                                    {
-                                        text: '客户类别',
-                                        viewType: 'document-kind',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '供应商类别',
-                                        viewType: 'document-kind',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '商品类别',
-                                        viewType: 'document-kind',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '支出类别',
-                                        viewType: 'document-kind',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '收入类别',
-                                        viewType: 'document-kind',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '计量单位',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '结算方式',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '辅助属性',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '客户物料编码',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    },
-                                    {
-                                        text: '单据编码规则',
-                                        viewType: 'mainlist',
-                                        leaf: true
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        text: '设置',
-                        iconCls: 'x-fa fa-cog',
-                        children: [
-                            {
-                                text: '系统参数',
-                                viewType: 'mainlist',
-                                leaf: true
-                            },
-                            {
-                                text: '权限设置',
-                                viewType: 'mainlist',
-                                leaf: true
-                            },
-                            {
-                                text: '操作日志',
-                                viewType: 'mainlist',
-                                leaf: true
-                            },
-                            {
-                                text: '套打模板',
-                                viewType: 'mainlist',
-                                leaf: true
-                            },
-                            {
-                                text: '备份与恢复',
-                                viewType: 'mainlist',
-                                leaf: true
-                            },
-                            {
-                                text: '结账/反结账',
-                                viewType: 'mainlist',
-                                leaf: true
-                            },
-                            {
-                                text: '重算成本',
-                                viewType: 'mainlist',
-                                leaf: true
-                            },
-                            {
-                                text: '增值服务',
-                                viewType: 'mainlist',
-                                leaf: true
-                            }
-                        ]
-                    }
-                ]
-            }
-        }
     }
 });

+ 348 - 110
frontend/saas-web/app/view/main/Navigation.js

@@ -8,10 +8,10 @@ Ext.define('saas.view.main.Navigation', {
     navCollapsed: false,
     cls: 'x-navpanel',
 
-    initComponent: function() {
+    initComponent: function () {
         var me = this;
         var view = new Ext.DataView({
-            store : Ext.create('Ext.data.Store', {
+            store: Ext.create('Ext.data.Store', {
                 fields: ['text', 'iconCls'],
                 data: [{
                     text: '采购',
@@ -19,33 +19,40 @@ Ext.define('saas.view.main.Navigation', {
                     items: [{
                         text: '制单',
                         items: [{
-                            id: 'purchase',
-                            text: '采购单',
-                            formType:'purchase-purchase-formpanel',
-                            queryType: 'purchase-purchase-querypanel'
-                        }, {
-                            id: 'purchaseIn',
-                            text: '采购验收单',
-                            formType:'purchase-purchaseIn-formpanel',
-                            queryType: 'purchase-purchaseIn-querypanel'
-                        },{
-                            id: 'purchaseOut',
-                            text: '采购验退单',
-                            formType:'purchase-purchaseOut-formpanel',
-                            queryType: 'purchase-purchaseOut-querypanel'
-                        },{
-                            id: 'form1',
-                            text: '测试-采购单明细界面',
-                            formType: 'test-order-formpanel'
-                        }, {
-                            id: 'myform',
-                            text: '测试-明细界面',
-                            formType: 'test-myform-formpanel'
-                        }, {
-                            id: 'myquerytest',
-                            text: '测试-采购单查询界面',
-                            queryType: 'test-query-querypanel',
-                        }]
+                                id: 'purchase',
+                                text: '采购单',
+                                addType: 'purchase-purchase-formpanel',
+                                viewType: 'purchase-purchase-querypanel'
+                            }, {
+                                id: 'purchaseIn',
+                                text: '采购验收单',
+                                addType: 'purchase-purchaseIn-formpanel',
+                                viewType: 'purchase-purchaseIn-querypanel'
+                            }, {
+                                id: 'purchaseOut',
+                                text: '采购验退单',
+                                addType: 'purchase-purchaseOut-formpanel',
+                                viewType: 'purchase-purchaseOut-querypanel'
+                            }, {
+                                id: 'inquiry',
+                                text: '采购询价单',
+                                addType: 'purchase-inquiry-formpanel',
+                                viewType: 'purchase-inquiry-querypanel'
+                            }
+                            // ,{
+                            //     id: 'form1',
+                            //     text: '测试-采购单明细界面',
+                            //     addType: 'test-order-formpanel'
+                            // }, {
+                            //     id: 'myform',
+                            //     text: '测试-明细界面',
+                            //     addType: 'test-myform-formpanel'
+                            // }, {
+                            //     id: 'myquerytest',
+                            //     text: '测试-采购单查询界面',
+                            //     viewType: 'test-query-querypanel',
+                            // }
+                        ]
                     }, {
                         text: '报表',
                         items: [{
@@ -57,24 +64,245 @@ Ext.define('saas.view.main.Navigation', {
                 }, {
                     text: '销售',
                     iconCls: 'x-fa fa-shopping-cart',
-                }],
+                    items: [{
+                        text: '制单',
+                        items: [{
+                            id: 'sale',
+                            text: '销售订单',
+                            addType: 'sale-sale-formpanel',
+                            viewType: 'sale-sale-querypanel'
+                        }, {
+                            id: 'saleOut',
+                            text: '销售出货单',
+                            addType: 'sale-saleOut-formpanel',
+                            viewType: 'sale-saleOut-querypanel'
+                        }, {
+                            id: 'saleIn',
+                            text: '销售退货单',
+                            addType: 'sale-saleIn-formpanel',
+                            viewType: 'sale-saleIn-querypanel'
+                        }, {
+                            id: 'saleToPur',
+                            text: '以销定购',
+                            addType: 'sale-saleToPur-formpanel',
+                            viewType: 'sale-saleToPur-querypanel'
+                        }]
+                    }, {
+                        text: '报表',
+                        items: [{
+                            text: '销售明细表'
+                        }, {
+                            text: '销售收款一览表'
+                        }, {
+                            text: '销售利润表'
+                        }]
+                    }]
+                }, {
+                    text: '库存',
+                    iconCls: 'x-fa fa-shopping-cart',
+                    items: [{
+                        text: '制单',
+                        items: [{
+                            id: 'appropriationInOut',
+                            text: '调拨单',
+                            addType: 'stock-appropriationInOut-formpanel',
+                            viewType: 'stock-appropriationInOut-querypanel'
+                        }, {
+                            id: 'make',
+                            text: '制造单',
+                            addType: 'stock-make-formpanel',
+                            viewType: 'stock-make-querypanel'
+                        }, {
+                            id: 'otherIn',
+                            text: '其它入库单',
+                            addType: 'stock-otherIn-formpanel',
+                            viewType: 'stock-otherIn-querypanel'
+                        }, {
+                            id: 'otherOut',
+                            text: '其它出库单',
+                            addType: 'stock-otherOut-formpanel',
+                            viewType: 'stock-otherOut-querypanel'
+                        }, {
+                            id: 'inventory',
+                            text: '盘点单',
+                            addType: 'stock-inventory-formpanel',
+                            viewType: 'stock-inventory-querypanel'
+                        }]
+                    }, {
+                        text: '报表',
+                        items: [{
+                            text: '物料出入库明细表'
+                        }, {
+                            text: '物料收发汇总表'
+                        }, {
+                            text: '物料库存数量金额表'
+                        }]
+                    }]
+                }, {
+                    text: '资金',
+                    iconCls: 'x-fa fa-shopping-cart',
+                    items: [{
+                        text: '制单',
+                        items: [{
+                            id: 'payBalance',
+                            text: '付款单',
+                            addType: 'money-payBalance-formpanel',
+                            viewType: 'money-payBalance-querypanel'
+                        }, {
+                            id: 'recBbalance',
+                            text: '收款单',
+                            addType: 'money-recBbalance-formpanel',
+                            viewType: 'money-recBbalance-querypanel'
+                        }, {
+                            id: 'verification',
+                            text: '核销单',
+                            addType: 'money-verification-formpanel',
+                            viewType: 'money-verification-querypanel'
+                        }, {
+                            id: 'othReceipts',
+                            text: '其它收支单',
+                            addType: 'money-othReceipts-formpanel',
+                            viewType: 'money-othReceipts-querypanel'
+                        }, {
+                            id: 'fundTransfer',
+                            text: '资金转存',
+                            addType: 'money-fundTransfer-formpanel',
+                            viewType: 'money-fundTransfer-querypanel'
+                        }]
+                    }, {
+                        text: '报表',
+                        items: [{
+                            text: '供应商对账单'
+                        }, {
+                            text: '应付账款明细表'
+                        }, {
+                            text: '客户对账单'
+                        }, {
+                            text: '应收款明细表'
+                        }, {
+                            text: '资金账户余额表'
+                        }]
+                    }]
+                }, {
+                    text: '资料',
+                    iconCls: 'x-fa fa-book',
+                    items: [{
+                            text: '基础资料',
+                            items: [{
+                                    text: '客户资料',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '供应商管理',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '商品管理',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '仓库管理',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '职员管理',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '账户管理',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '发货地址管理',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '新手导航',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                }
+                            ]
+                        },
+                        {
+                            text: '辅助资料',
+                            items: [{
+                                    text: '客户类别',
+                                    viewType: 'document-kind',
+                                    leaf: true
+                                },
+                                {
+                                    text: '供应商类别',
+                                    viewType: 'document-kind',
+                                    leaf: true
+                                },
+                                {
+                                    text: '商品类别',
+                                    viewType: 'document-kind',
+                                    leaf: true
+                                },
+                                {
+                                    text: '支出类别',
+                                    viewType: 'document-kind',
+                                    leaf: true
+                                },
+                                {
+                                    text: '收入类别',
+                                    viewType: 'document-kind',
+                                    leaf: true
+                                },
+                                {
+                                    text: '计量单位',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '结算方式',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '辅助属性',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '客户物料编码',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                },
+                                {
+                                    text: '单据编码规则',
+                                    viewType: 'mainlist',
+                                    leaf: true
+                                }
+                            ]
+                        }
+                    ]
+                }]
             }),
-            tpl : new Ext.XTemplate('<ul class="x-navlist">',
+            tpl: new Ext.XTemplate('<ul class="x-navlist">',
                 '<tpl for=".">',
                 '<li class="x-navitem">',
-                    '<div class="x-navitem-body">',
-                        '<div class="nav-inner-wrap" style="margin-left: 0px;">',
-                        '<div class="nav-inner-icon {iconCls}"></div>',
-                        '<div class="nav-inner-text">{text}</div>',
-                    '</div>',
+                '<div class="x-navitem-body">',
+                '<div class="nav-inner-wrap" style="margin-left: 0px;">',
+                '<div class="nav-inner-icon {iconCls}"></div>',
+                '<div class="nav-inner-text">{text}</div>',
+                '</div>',
                 '</li>',
                 '</tpl>',
-            '</ul>'),
+                '</ul>'),
             trackOver: true,
-            overItemCls : 'x-navitem-over',
-            selectedClass : 'x-navitem-selected',
-            singleSelect : true,
-            itemSelector : '.x-navitem',
+            overItemCls: 'x-navitem-over',
+            selectedClass: 'x-navitem-selected',
+            singleSelect: true,
+            itemSelector: '.x-navitem',
             listeners: {
                 itemmouseenter: me.showNavMenu,
                 itemmouseleave: me.hideNavMenu,
@@ -91,98 +319,108 @@ Ext.define('saas.view.main.Navigation', {
         me.callParent();
     },
 
-    clickNavMenu: function(view, record, item, index, e, eOpts) {
+    clickNavMenu: function (view, record, item, index, e, eOpts) {
         var me = this;
         this.showNavMenu(view, record, item, index, e, eOpts);
     },
 
-    showNavMenu: function(view, record, item, index, e, eOpts) {
+    showNavMenu: function (view, record, item, index, e, eOpts) {
         var recData = record.data,
-        menuItems = recData.items || [],
-        itemBox = item.getBoundingClientRect(),
-        pos = [itemBox.left + itemBox.width, itemBox.top],
-        id = recData.id,
-        menuId = 'navMenu-' + id,
-        menu = Ext.getCmp(menuId);
-
-        if(!menu) {
+            menuItems = recData.items || [],
+            itemBox = item.getBoundingClientRect(),
+            pos = [itemBox.left + itemBox.width, itemBox.top],
+            id = recData.id,
+            menuId = 'navMenu-' + id,
+            menu = Ext.getCmp(menuId);
+
+        if (!menu) {
             var view = new Ext.DataView({
-                store : Ext.create('Ext.data.Store', {
-                   fields: ['id', 'text', 'formType', 'queryType'],
-                   data: menuItems
+                store: Ext.create('Ext.data.Store', {
+                    fields: ['id', 'text', 'addType', 'viewType'],
+                    data: menuItems
                 }),
                 tpl: new Ext.XTemplate('<div class="x-navitem-menu">',
                     '<div class="nav-menu-body">',
-                        '<tpl for=".">',
-                        '<div class="menu">',
-                            '<h3 class="menu-title">{text}</h3>',
-                            '<div class="menu-content">',
-                                '<tpl for="items">',
-                                '<div class="menuitem">',
-                                    '<div class="item-text" title="{text}" data-id="{id}" data-text="{text}" data-type="query" data-queryType="{queryType}">',
-                                        '{text}',
-                                    '</div>',
-                                    '<tpl if="{formType}">',
-                                    '<div class="item-icon" data-id="{id}" data-text="{text}" data-type="form" data-formType="{formType}">新增</div>',
-                                    '</tpl>',
-                                '</div>',
-                                '</tpl>',
-                            '</div>',
-                        '</div>',
-                        '</tpl>',
+                    '<tpl for=".">',
+                    '<div class="menu">',
+                    '<h3 class="menu-title">{text}</h3>',
+                    '<div class="menu-content">',
+                    '<tpl for="items">',
+                    '<div class="menuitem">',
+                    '<div class="item-text" title="{text}" data-id="{id}" data-text="{text}" data-type="query" data-viewType="{viewType}">',
+                    '{text}',
                     '</div>',
-                '</div>'),
+                    '<tpl if="{addType}">',
+                    '<div class="item-icon" data-id="{id}" data-text="{text}" data-type="form" data-viewType="{addType}">新增</div>',
+                    '</tpl>',
+                    '</div>',
+                    '</tpl>',
+                    '</div>',
+                    '</div>',
+                    '</tpl>',
+                    '</div>',
+                    '</div>'),
                 trackOver: true,
-                overItemCls : 'menuitem-over',
-                selectedClass : 'menuitem-selected',
-                singleSelect : true,
-                itemSelector : 'menu',
+                overItemCls: 'menuitem-over',
+                selectedClass: 'menuitem-selected',
+                singleSelect: true,
+                itemSelector: 'menu',
                 listeners: {
-                    boxready: function(view, width, height, eOpts) {
+                    boxready: function (view, width, height, eOpts) {
                         var menu = view.up('menu'),
-                        menuView = view.el.dom.getElementsByClassName('x-navitem-menu')[0],
-                        menuBox = menuView.getBoundingClientRect(),
-                        menuViewWidth = menuBox.width,
-                        menuViewHeight = menuBox.height,
-                        menuItem = menuView.getElementsByClassName('menuitem');
-                        
+                            menuView = view.el.dom.getElementsByClassName('x-navitem-menu')[0],
+                            menuBox = menuView.getBoundingClientRect(),
+                            menuViewWidth = menuBox.width,
+                            menuViewHeight = menuBox.height,
+                            menuItem = menuView.getElementsByClassName('menuitem');
+
                         menu.setWidth(menuViewWidth);
                         menu.setHeight(menuViewHeight);
                         menu.updateLayout();
 
-                        view.el.dom.addEventListener('mouseleave', function(e) {
+                        view.el.dom.addEventListener('mouseleave', function (e) {
                             var ex = e.clientX,
-                            ey = e.clientY,
-                            box = menuView.getBoundingClientRect();
+                                ey = e.clientY,
+                                box = menuView.getBoundingClientRect();
 
-                            if(ey <= box.top || ex >= (box.left + box.width) || ey >= (box.top + box.height) || (ex <= box.left && ey >= (box.top + 64))) {
+                            if (ey <= box.top || ex >= (box.left + box.width) || ey >= (box.top + box.height) || (ex <= box.left && ey >= (box.top + 64))) {
                                 menu.hide();
                             }
                         });
 
-                        Ext.Array.each(menuItem, function(mi) {
+                        Ext.Array.each(menuItem, function (mi) {
                             var menuItemText = mi.getElementsByClassName('item-text');
                             var menuItemIcon = mi.getElementsByClassName('item-icon');
 
-                            Ext.Array.each(menuItemText, function(item) {
-                                item.addEventListener('click', function(e) {
+                            Ext.Array.each(menuItemText, function (item) {
+                                item.addEventListener('click', function (e) {
                                     var target = e.target,
-                                    dataset = target.dataset;
-                                    mainView = Ext.getCmp('mainView'),
-                                    controller = mainView.getController();
+                                    dataset = target.dataset,
+                                    viewType = dataset.viewtype,
+                                    type = dataset.type,
+                                    text = dataset.text,
+                                    id = dataset.id;
+
+                                    var tabTitle = text + (type == 'form' ? '' : '查询'),
+                                    tabId = 'maintab-' + type + '-' + id;
         
-                                    controller.setActiveTab(dataset);
+                                    openTab(viewType, tabTitle, tabId);
                                     menu.hide();
                                 });
                             });
-                            Ext.Array.each(menuItemIcon, function(item) {
-                                item.addEventListener('click', function(e) {
+                            Ext.Array.each(menuItemIcon, function (item) {
+                                item.addEventListener('click', function (e) {
                                     var target = e.target,
-                                    dataset = target.dataset;
-                                    mainView = Ext.getCmp('mainView'),
-                                    controller = mainView.getController();
+                                    dataset = target.dataset,
+                                    viewType = dataset.viewtype,
+                                    type = dataset.type,
+                                    text = dataset.text,
+                                    id = dataset.id;
+
+                                    var tabTitle = text + (type == 'form' ? '' : '查询'),
+                                    tabId = 'maintab-' + type + '-' + id;
         
-                                    controller.setActiveTab(dataset);
+                                    openTab(viewType, tabTitle, tabId);
                                     menu.hide();
                                 });
                             });
@@ -203,17 +441,17 @@ Ext.define('saas.view.main.Navigation', {
         menu.showAt(pos);
     },
 
-    hideNavMenu: function(view, record, item, index, e, eOpts) {
+    hideNavMenu: function (view, record, item, index, e, eOpts) {
         var recData = record.data,
-        cx = e.browserEvent.clientX,
-        cy = e.browserEvent.clientY,
-        itemBox = item.getBoundingClientRect(),
-        id = recData.id,
-        menuId = 'navMenu-' + id,
-        menu = Ext.getCmp(menuId);
-
-        if(cx <= itemBox.left || cy <= itemBox.top || cy >= (itemBox.top + itemBox.height)) {
-            if(menu) {
+            cx = e.browserEvent.clientX,
+            cy = e.browserEvent.clientY,
+            itemBox = item.getBoundingClientRect(),
+            id = recData.id,
+            menuId = 'navMenu-' + id,
+            menu = Ext.getCmp(menuId);
+
+        if (cx <= itemBox.left || cy <= itemBox.top || cy >= (itemBox.top + itemBox.height)) {
+            if (menu) {
                 menu.hide();
             }
         }

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.purchase.purchase.FormController', {
             'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -66,7 +66,7 @@ Ext.define('saas.view.purchase.purchase.FormController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
                         }],

+ 18 - 9
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -5,6 +5,8 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     controller: 'purchase-purchase-formcontroller',
     viewModel: 'purchase-purchase-formmodel',
     
+    caller:'Purchase',
+    
      //字段属性
      _title:'采购单',
      _idField: 'id',
@@ -13,17 +15,17 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
      _statusCodeField: 'pu_statuscode',
      _detnoColumn:  'pd_detno',
      _relationColumn: 'pd_puid',
-     _readUrl:'http://localhost:8800/purchase/read/',
-     _saveUrl:'http://localhost:8800/purchase/save',
-     _auditUrl:'http://localhost:8800/purchase/audit',
-     _deleteUrl:'http://localhost:8800/purchase/delete/',
-     _deleteDetailUrl:'http://localhost:8800/purchase/deleteItem/',
-     _turnInUrl:'http://localhost:8800/purchase/turnProdin/',
+     _readUrl:'http://192.168.0.181:8560/api/purchase/purchase/read/',
+     _saveUrl:'http://192.168.0.181:8560/api/purchase/purchase/save',
+     _auditUrl:'http://192.168.0.181:8560/api/purchase/purchase/audit',
+     _deleteUrl:'http://192.168.0.181:8560/api/purchase/purchase/delete/',
+     _deleteDetailUrl:'http://192.168.0.181:8560/api/purchase/purchase/deleteItem/',
+     _turnInUrl:'http://192.168.253.228:8800/purchase/turnProdin/',
      initId:0,
  
      toolBtns: [{
          xtype: 'button',
-         text: '转验收单按钮',
+         text: '转采购验收单',
          handler: 'turnIn'
      }],
 
@@ -109,6 +111,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
+        storeModel:'saas.model.purchase.purchasedetail',
         columns : [
             {
                 text : "序号", 
@@ -149,12 +152,18 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
             {
                 text : "名称", 
                 dataIndex : "pr_detail",
-                ignore:true
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
+                }
             },
             {
                 text : "规格", 
                 dataIndex : "pr_spec",
-                ignore:true
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
+                }
             },
             {
                 text : "数量", 

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

@@ -4,69 +4,57 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
 
     controller: 'purchase-purchase-querypanel',
     viewModel: 'purchase-purchase-querypanel',
+
     viewName: 'purchase-purchase-formpanel',
-    _baseVastUrl: 'http://192.168.253.58:8800/purchase/',
-    _idField: 'pu_id',
-    _codeField: 'pu_code',
+    
     queryFormItems: [{
         xtype: 'hidden',
         name: 'pu_id',
         bind: '{pu_id}',
         fieldLabel: 'ID',
         allowBlank: true,
-        columnWidth: 0
+        getCondition: function(value) {
+            return 'pu_id=' + value;
+        }
     }, {
         xtype: 'textfield',
         name: 'pu_code',
         bind: '{pu_code}',
-        fieldLabel: '单据编号',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '单据编号'
     }, {
         xtype: 'condatefield',
         name: 'pu_date',
         bind: '{pu_date}',
         fieldLabel: '采购日期',
-        allowBlank: true,
-        columnWidth: 0.5
+        columnWidth: 0.5,
+        operation: 'between'
     }, {
         xtype: 'dbfindtrigger',
         name: 'pu_vendcode',
         bind: '{pu_vendcode}',
-        fieldLabel: '供应商编号',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '供应商编号'
     }, {
         xtype: 'textfield',
         name: 'pu_vendname',
         bind: '{pu_vendname}',
-        fieldLabel: '供应商名称',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '供应商名称'
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pd_prodcode#pd_prodcode',
-        //#pr_detail
+        name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
-        fieldMode: 'DETAIL',
-        queryType: 'VAG',
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
         xtype: 'textfield',
         name: 'pr_detail',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
         xtype: 'combobox',
         name: 'pu_statuscode',
        // bind: '{pu_statuscode}',
         fieldLabel: '审核状态',
-        allowBlank: true,
-        columnWidth: 0.25,
         queryMode: 'local',
         displayField: 'pu_status',
         valueField: 'pu_statuscode',
@@ -84,8 +72,6 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         name: 'pu_acceptstatuscode',
         bind: '{pu_acceptstatuscode}',
         fieldLabel: '入库状态',
-        allowBlank: true,
-        columnWidth: 0.25,
         datas: [
             ["TURNIN", "已入库"],
             ["UNTURNIN", "未入库"],
@@ -96,30 +82,27 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         xtype: 'textfield',
         name: 'pu_buyername',
         bind: '{pu_buyername}',
-        fieldLabel: '采购员',
-        allowBlank: true
+        fieldLabel: '采购员'
     }, {
         xtype: 'textfield',
         name: 'pu_total',
         bind: '{pu_total}',
-        fieldLabel: '金额',
-        allowBlank: true
+        fieldLabel: '金额'
     }, {
         xtype: 'condatefield',
         name: 'pu_delivery',
         bind: '{pu_delivery}',
         fieldLabel: '交货日期',
-        allowBlank: true,
         columnWidth: 1
     }],
     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://192.168.253.58:8800/purchase/',
+        baseColumn: [{
             text: '序号',
             width: 80,
             xtype: 'rownumberer'
@@ -157,7 +140,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             width: 120,
             flex: 1
         }],
-        _relativeColumn: [{
+        relativeColumn: [{
             text: '序号',
             width: 80,
             xtype: 'rownumberer'

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

@@ -63,6 +63,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
                         dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
+                        }, {
                             from:'pr_detail',to:'pr_detail'
                         }],
                         dbtpls:[{

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormController', {
             'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -66,9 +66,14 @@ Ext.define('saas.view.purchase.purchaseIn.FormController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dbfinds:[{
-                            from:'pr_code',to:'pd_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:[{

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

@@ -4,7 +4,9 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
 
     controller: 'purchase-purchaseIn-formcontroller',
     viewModel: 'purchase-purchaseIn-formmodel',
+    caller:'PurchaseIn',
     
+     //字段属性
     _title:'采购验收单',
     _idField: 'id',
     _codeField: 'pi_inoutno',
@@ -23,7 +25,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
 
     toolBtns: [{
         xtype: 'button',
-        text: '转验退单按钮',
+        text: '转采购验退单',
         handler: 'turnOut'
     }],
 
@@ -102,7 +104,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         columnWidth : 0.25
     }, {
         name : "detailGridField", 
-        xtype : "detailGridField", 
+        xtype : "detailGridField",
+        storeModel:'saas.model.purchase.prodIODetail', 
         columns : [
             {
                 text : "序号", 
@@ -119,6 +122,11 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn"
+            },{
+                text : "物料id", 
+                dataIndex : "pd_prodid", 
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
                 text : "物料编号", 
@@ -143,13 +151,19 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             {
                 text : "名称", 
                 dataIndex : "pr_detail",
-                ignore:true
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
+                }
             },
             {
                 text : "规格", 
                 dataIndex : "pr_spec",
-                ignore:true
-            }, 
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
+                }
+            },
             {
                 text : "数量", 
                 dataIndex : "pd_inqty", 

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormController', {
             'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -66,9 +66,14 @@ Ext.define('saas.view.purchase.purchaseOut.FormController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dbfinds:[{
-                            from:'pr_code',to:'pd_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:[{

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

@@ -5,6 +5,9 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     controller: 'purchase-purchaseOut-formcontroller',
     viewModel: 'purchase-purchaseOut-formmodel',
     
+    caller:'PurchaseOut',
+    
+    //字段属性
     _title:'采购验退单',
     _idField: 'id',
     _codeField: 'pi_inoutno',
@@ -81,19 +84,19 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         readOnly: true,
         columnWidth : 0.25
     }, {
+        xtype : "textfield", 
+        name : "pi_puid", 
+        bind : "{pi_puid}", 
+        fieldLabel : "采购单id", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
         xtype : "textfield", 
         name : "pi_pucode", 
         bind : "{pi_pucode}", 
         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", 

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

@@ -0,0 +1,158 @@
+Ext.define('saas.view.sale.sale.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.sale-sale-formcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custcode]':{
+                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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 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:'sd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    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();
+
+    },
+
+    turnOut: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnOutUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
+});

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

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

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

@@ -0,0 +1,270 @@
+Ext.define('saas.view.sale.sale.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'sale-sale-formpanel',
+
+    controller: 'sale-sale-formcontroller',
+    viewModel: 'sale-sale-formmodel',
+    
+    caller:'Sale',
+    
+     //字段属性
+     _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'
+     }],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype : 'hidden', 
+        name : 'sa_cudid', 
+        bind : '{sa_cudid}', 
+        fieldLabel : '客户ID', 
+        allowBlank : true, 
+        columnWidth : 0
+    }, {
+        xtype : 'textfield', 
+        name : 'sa_code', 
+        bind : '{sa_code}', 
+        fieldLabel : '销售单号', 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : 'hidden', 
+        name : 'sa_cucode', 
+        bind : '{sa_cucode}', 
+        fieldLabel : '客户编号', 
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "sa_cuname", 
+        bind : "{sa_cuname}", 
+        fieldLabel : "客户名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "datefield", 
+        name : "sa_recorddate", 
+        bind : "{sa_recorddate}", 
+        fieldLabel : "订单日期", 
+        allowBlank : false, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "sa_recorder", 
+        bind : "{sa_recorder}", 
+        fieldLabel : "录入人", 
+        allowBlank : true, 
+        readOnly:true,
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "sa_total", 
+        bind : "{sa_total}", 
+        fieldLabel : "单据金额", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : 'textfield', 
+        name : 'sa_sendstatus', 
+        bind : '{sa_sendstatus}', 
+        fieldLabel : '出货状态', 
+        allowBlank : true, 
+        readOnly:true,
+        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
+    // }
+    ,{
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        columnWidth : 1,
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "sd_detno", 
+                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 : "sd_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 : "sd_qty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                text : "单价", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                format:'0,000.00',
+                dataIndex : "sd_price", 
+                width : 120.0, 
+                xtype : "numbercolumn",
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "税率", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                dataIndex : "sd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "含税金额", 
+                dataIndex : "sd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, 
+            {
+                text : "未税金额", 
+                dataIndex : "sd_nettotal", 
+                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'
+            },
+        ]
+    }, {
+        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 : "sa_status", 
+        bind : "{sa_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "sa_statuscode", 
+        bind : "{sa_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

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

@@ -0,0 +1,206 @@
+Ext.define('saas.view.sale.sale.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'sale-sale-querypanel',
+
+    controller: 'sale-sale-querypanel',
+    viewModel: 'sale-sale-querypanel',
+    viewName: 'sale-sale-formpanel',
+    _idField: 'sa_id',
+    _codeField: 'sa_code',
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'sa_id',
+        bind: '{sa_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'sa_code',
+        bind: '{sa_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'sa_recorddate',
+        bind: '{sa_recorddate}',
+        fieldLabel: '单据日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'sa_custcode',
+        bind: '{sa_custcode}',
+        fieldLabel: '客户编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'sa_custname',
+        bind: '{sa_custname}',
+        fieldLabel: '客户名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType: 'VAG',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'sa_statuscode',
+        bind: '{sa_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'sa_status',
+        valueField: 'sa_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['sa_statuscode', 'sa_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
+    }],
+    queryGridConfig: {
+        _idField: 'sa_id',
+        _codeField: 'sa_code',
+        _title: '销售订单',
+        _defaultCondition:'',
+        _addXtype: 'sale-sale-formpanel',
+        _baseVastUrl: 'http://192.168.0.181:8560/api/sale/sale/',
+        _baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'sa_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'sa_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'sa_status',
+            width: 120
+        }, {
+            text: '单据日期',
+            dataIndex: 'sa_recorddate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'sa_total',
+            xtype: 'numbercolumn',
+            width: 120
+        }],
+        _relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'sa_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'sa_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'sa_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'sa_recorddate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '明细序号',
+            dataIndex: 'sd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'sd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'sd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'sd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'sd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已出货数',
+            dataIndex: 'sd_sendqty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已审核采购单数',
+            dataIndex: 'sd_pdqty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '备注',
+            dataIndex: 'sd_remark',
+            width: 250,
+            flex: 1
+        }]
+    }
+});

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

@@ -0,0 +1,116 @@
+Ext.define('saas.view.sale.sale.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.sale-sale-querypanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custcode]':{
+                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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 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:'sd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

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

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

+ 158 - 0
frontend/saas-web/app/view/sale/saleIn/FormController.js

@@ -0,0 +1,158 @@
+Ext.define('saas.view.sale.sale.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.sale-sale-formcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custcode]':{
+                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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 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:'sd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    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();
+
+    },
+
+    turnOut: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnOutUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
+});

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

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

+ 267 - 0
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -0,0 +1,267 @@
+Ext.define('saas.view.sale.sale.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'sale-sale-formpanel',
+
+    controller: 'sale-sale-formcontroller',
+    viewModel: 'sale-sale-formmodel',
+    
+    caller:'Sale',
+    
+     //字段属性
+     _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'
+     }],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype : "textfield", 
+        name : "sa_code", 
+        bind : "{sa_code}", 
+        fieldLabel : "销售单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "sa_cudid", 
+        bind : "{sa_cudid}", 
+        fieldLabel : "客户ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "sa_cucode", 
+        bind : "{sa_cucode}", 
+        fieldLabel : "客户编号", 
+        hidden:true,
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "sa_cuname", 
+        bind : "{sa_cuname}", 
+        fieldLabel : "客户名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "datefield", 
+        name : "sa_recorddate", 
+        bind : "{sa_recorddate}", 
+        fieldLabel : "订单日期", 
+        allowBlank : false, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "sa_recorder", 
+        bind : "{sa_recorder}", 
+        fieldLabel : "录入人", 
+        allowBlank : true, 
+        readOnly:true,
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "sa_toplace", 
+        bind : "{sa_toplace}", 
+        fieldLabel : "交货地址", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "sa_total", 
+        bind : "{sa_total}", 
+        fieldLabel : "单据金额", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "sa_remark", 
+        bind : "{sa_remark}", 
+        fieldLabel : "备注", 
+        allowBlank : true, 
+        columnWidth : 1
+    },{
+        xtype : "textfield", 
+        name : "sa_sendstatus", 
+        bind : "{sa_sendstatus}", 
+        fieldLabel : "出货状态", 
+        allowBlank : true, 
+        readOnly:true,
+        columnWidth : 0
+    }, {
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "sd_detno", 
+                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 : "sd_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 : "sd_qty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                text : "单价", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                format:'0,000.00',
+                dataIndex : "sd_price", 
+                width : 120.0, 
+                xtype : "numbercolumn",
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "税率", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                dataIndex : "sd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "含税金额", 
+                dataIndex : "sd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, 
+            {
+                text : "未税金额", 
+                dataIndex : "sd_nettotal", 
+                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'
+            },
+        ]
+    }, {
+        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 : "sa_status", 
+        bind : "{sa_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "sa_statuscode", 
+        bind : "{sa_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

+ 206 - 0
frontend/saas-web/app/view/sale/saleIn/QueryPanel.js

@@ -0,0 +1,206 @@
+Ext.define('saas.view.sale.sale.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'sale-sale-querypanel',
+
+    controller: 'sale-sale-querypanel',
+    viewModel: 'sale-sale-querypanel',
+    viewName: 'sale-sale-formpanel',
+    _idField: 'sa_id',
+    _codeField: 'sa_code',
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'sa_id',
+        bind: '{sa_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'sa_code',
+        bind: '{sa_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'sa_recorddate',
+        bind: '{sa_recorddate}',
+        fieldLabel: '单据日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'sa_custcode',
+        bind: '{sa_custcode}',
+        fieldLabel: '客户编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'sa_custname',
+        bind: '{sa_custname}',
+        fieldLabel: '客户名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType: 'VAG',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'sa_statuscode',
+        bind: '{sa_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'sa_status',
+        valueField: 'sa_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['sa_statuscode', 'sa_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
+    }],
+    queryGridConfig: {
+        _idField: 'sa_id',
+        _codeField: 'sa_code',
+        _title: '销售订单',
+        _defaultCondition:'',
+        _addXtype: 'sale-sale-formpanel',
+        _baseVastUrl: 'http://192.168.0.181:8560/api/sale/sale/',
+        _baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'sa_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'sa_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'sa_status',
+            width: 120
+        }, {
+            text: '单据日期',
+            dataIndex: 'sa_recorddate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'sa_total',
+            xtype: 'numbercolumn',
+            width: 120
+        }],
+        _relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'sa_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'sa_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'sa_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'sa_recorddate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '明细序号',
+            dataIndex: 'sd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'sd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'sd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'sd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'sd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已出货数',
+            dataIndex: 'sd_sendqty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已审核采购单数',
+            dataIndex: 'sd_pdqty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '备注',
+            dataIndex: 'sd_remark',
+            width: 250,
+            flex: 1
+        }]
+    }
+});

+ 116 - 0
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -0,0 +1,116 @@
+Ext.define('saas.view.sale.sale.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.sale-sale-querypanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custcode]':{
+                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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 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:'sd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

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

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

+ 5 - 5
frontend/saas-web/app/view/test/order/FormPanel.js

@@ -15,11 +15,11 @@ Ext.define('saas.view.test.order.FormPanel', {
     _statusCodeField: 'pu_statuscode',
     _detnoColumn:  'pd_detno',
     _relationColumn: 'pd_puid',
-    _readUrl:'http://192.168.253.58:8800/purchase/read/',
-    _saveUrl:'http://192.168.253.58:8800/purchase/save',
-    _auditUrl:'http://192.168.253.58:8800/purchase/audit',
-    _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
-    _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
+    _readUrl:'http://192.168.253.228:8800/purchase/read/',
+    _saveUrl:'http://192.168.253.228:8800/purchase/save',
+    _auditUrl:'http://192.168.253.228:8800/purchase/audit',
+    _deleteUrl:'http://192.168.253.228:8800/purchase/delete/',
+    _deleteDetailUrl:'http://192.168.253.228:8800/purchase/deleteItem/',
     initId:0,
 
     toolBtns: [{

+ 1 - 1
frontend/saas-web/index.html

@@ -1,5 +1,5 @@
 <!DOCTYPE HTML>
-<html manifest="">
+<html lang="zh-cn" manifest="">
 <head>
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta charset="UTF-8">

+ 19 - 0
frontend/saas-web/overrides/i18n.js

@@ -0,0 +1,19 @@
+var basePath = '';
+
+function openTab(xtype, title, id) {
+    var mainTab = Ext.getCmp('main-tab-panel');
+    var panel = Ext.getCmp(id);
+    if(!panel) {
+        panel = Ext.create('saas.view.core.tab.Panel', {
+            id: id,
+            title: title,
+            viewType: xtype
+        });
+
+        Ext.suspendLayouts();
+        mainTab.setActiveTab(mainTab.add(panel));
+        Ext.resumeLayouts(true);
+    }else {
+        mainTab.setActiveTab(panel);
+    }
+}

+ 20 - 0
frontend/saas-web/runtime/nginx/default.conf

@@ -0,0 +1,20 @@
+server {
+    listen       80;
+    server_name  localhost;
+
+    charset utf-8;
+
+    location / {
+        root   /usr/share/nginx/html;
+        index  index.html index.htm;
+    }
+
+    #error_page  404              /404.html;
+
+    # redirect server error pages to the static page /50x.html
+    #
+    error_page   500 502 503 504  /50x.html;
+    location = /50x.html {
+        root   html;
+    }
+}

+ 5 - 0
pom.xml

@@ -297,6 +297,11 @@
                 <artifactId>commons-fileupload</artifactId>
                 <version>${commons.fileupload.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>fastjson</artifactId>
+                <version>${fastjson.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

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