rainco 7 years ago
parent
commit
4612614317
76 changed files with 569 additions and 522 deletions
  1. 4 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 10 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Status.java
  3. 6 6
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  4. 8 8
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  5. 6 6
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  6. 6 7
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  7. 6 7
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  8. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  9. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java
  10. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  11. 5 4
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  12. 2 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  13. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java
  14. 2 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java
  15. 2 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  16. 6 5
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  17. 1 0
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  18. 1 1
      frontend/saas-web/app.json
  19. 9 0
      frontend/saas-web/app/view/core/base/BasePanel.scss
  20. 1 1
      frontend/saas-web/app/view/core/base/GridPanel.js
  21. 1 1
      frontend/saas-web/app/view/core/dbfind/types/BomDbfindTrigger.js
  22. 1 1
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js
  23. 5 1
      frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js
  24. 6 2
      frontend/saas-web/app/view/core/dbfind/types/ProductMultiDbfindTrigger.js
  25. 1 1
      frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js
  26. 1 1
      frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js
  27. 10 1
      frontend/saas-web/app/view/core/form/FormPanelController.js
  28. 2 5
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  29. 10 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.scss
  30. 3 2
      frontend/saas-web/app/view/document/bom/BasePanel.js
  31. 2 2
      frontend/saas-web/app/view/document/bom/FormPanel.js
  32. 3 2
      frontend/saas-web/app/view/document/customer/BasePanel.js
  33. 2 2
      frontend/saas-web/app/view/document/customer/FormPanel.js
  34. 1 1
      frontend/saas-web/app/view/document/kind/ChildForm.js
  35. 3 2
      frontend/saas-web/app/view/document/product/BasePanel.js
  36. 3 3
      frontend/saas-web/app/view/document/product/FormPanel.js
  37. 3 2
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  38. 2 2
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  39. 3 2
      frontend/saas-web/app/view/home/infoCardList/Payment.js
  40. 3 2
      frontend/saas-web/app/view/home/infoCardList/Recment.js
  41. 3 2
      frontend/saas-web/app/view/home/infoCardList/UnauditCheckIn.js
  42. 3 2
      frontend/saas-web/app/view/home/infoCardList/UnauditSaleOut.js
  43. 12 10
      frontend/saas-web/app/view/main/Navigation.js
  44. 1 0
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  45. 1 0
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  46. 1 0
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  47. 4 0
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  48. 1 0
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  49. 4 0
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  50. 1 0
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  51. 7 49
      frontend/saas-web/app/view/money/verification/FormPanelController.js
  52. 1 0
      frontend/saas-web/app/view/money/verification/QueryPanel.js
  53. 4 0
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  54. 1 0
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  55. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  56. 12 8
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  57. 3 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  58. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  59. 8 8
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  60. 3 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  61. 0 7
      frontend/saas-web/app/view/sale/report/SaleRec.js
  62. 99 76
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  63. 15 12
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  64. 1 0
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  65. 4 0
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  66. 1 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  67. 10 35
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  68. 67 115
      frontend/saas-web/app/view/stock/inventory/EditDataList.js
  69. 125 105
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  70. 1 0
      frontend/saas-web/app/view/stock/make/QueryPanel.js
  71. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  72. 2 1
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  73. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  74. 2 1
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  75. 5 0
      frontend/saas-web/overrides/form/field/TextField.js
  76. 15 0
      frontend/saas-web/overrides/form/field/TrimVtype.js

+ 4 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -34,6 +34,10 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_UNENDPRODUCT(79310,"系统还未结账,不能反结账"),
     BIZ_RELUPDATE_CODEANDNAME(79311,"存在关联单据,不允许更新编号,名称"),
     BIZ_RELUPDATE_AMOUNT(79312,"存在关联单据,不允许更新期初应收,期初预收,期初日期"),
+    BIZ_BANNED(79313, "只能禁用已开启的单据"),
+    BIZ_ENABLE(79314, "只能开启已禁用的单据"),
+
+
     NO_OPRATIONDATA(79400,"无可操作单据"),
     NULL_DATA(23232,"无数据"),
 

+ 10 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Status.java

@@ -17,6 +17,16 @@ public enum Status {
     OPEN("已开启"),
 
 
+    /**
+     * 已禁用
+     */
+    BANNED("已禁用"),
+
+    /**
+     * 已启用
+     */
+    ENABLE("已启用"),
+
     /**
      * 已审核
      */

+ 6 - 6
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java

@@ -209,8 +209,8 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
 
             bom = new Bom();
             bom.setId(id);
-            bom.setBo_status(Status.CLOSE.getDisplay());
-            bom.setBo_statuscode(Status.CLOSE.name());
+            bom.setBo_status(Status.BANNED.getDisplay());
+            bom.setBo_statuscode(Status.BANNED.name());
             bom.setUpdaterId(BaseContextHolder.getUserId());
             bom.setUpdateTime(new Date());
 
@@ -232,12 +232,12 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
             if(bom == null){
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (Status.CLOSE.name().equals(bom.getBo_statuscode())){
+            if (Status.BANNED.name().equals(bom.getBo_statuscode())){
                 String code = bom.getBo_mothercode();
                 bom = new Bom();
                 bom.setId(id);
-                bom.setBo_statuscode(Status.OPEN.name());
-                bom.setBo_status(Status.OPEN.getDisplay());
+                bom.setBo_statuscode(Status.ENABLE.name());
+                bom.setBo_status(Status.ENABLE.getDisplay());
                 bom.setUpdateTime(new Date());
                 bom.setUpdaterId(BaseContextHolder.getUserId());
                 getMapper().updateByPrimaryKeySelective(bom);
@@ -246,7 +246,7 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
                 messageLogService.customizeLog(docBaseDTO, Operation.ENABLE);
                 return docBaseDTO;
             }else {
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }
         }else {
             throw new BizException(BizExceptionCode.ILLEGAL_ID);

+ 8 - 8
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java

@@ -399,11 +399,11 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
             Customer customer = getMapper().selectByPrimaryKey(id);
-            if(Status.CLOSE.name().equals(customer.getCu_statuscode())){
-                throw new BizException(BizExceptionCode.BIZ_CLOSE);
+            if(Status.BANNED.name().equals(customer.getCu_statuscode())){
+                throw new BizException(BizExceptionCode.BIZ_BANNED);
             }
-            customer.setCu_statuscode(Status.CLOSE.name());
-            customer.setCu_status(Status.CLOSE.getDisplay());
+            customer.setCu_statuscode(Status.BANNED.name());
+            customer.setCu_status(Status.BANNED.getDisplay());
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志
@@ -434,11 +434,11 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
             Customer customer = getMapper().selectByPrimaryKey(id);
-            if(Status.OPEN.name().equals(customer.getCu_statuscode())){
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+            if(Status.ENABLE.name().equals(customer.getCu_statuscode())){
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }
-            customer.setCu_statuscode(Status.OPEN.name());
-            customer.setCu_status(Status.OPEN.getDisplay());
+            customer.setCu_statuscode(Status.ENABLE.name());
+            customer.setCu_status(Status.ENABLE.getDisplay());
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志

+ 6 - 6
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -326,8 +326,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             String code = getMapper().getCodeById(id);
             Product product = new Product();
             product.setId(id);
-            product.setPr_status(Status.CLOSE.getDisplay());
-            product.setPr_statuscode(Status.CLOSE.name());
+            product.setPr_status(Status.BANNED.getDisplay());
+            product.setPr_statuscode(Status.BANNED.name());
             product.setUpdaterId(BaseContextHolder.getUserId());
             product.setUpdateTime(new Date());
             getMapper().updateByPrimaryKeySelective(product);
@@ -349,12 +349,12 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             if (product == null) {
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (!Status.CLOSE.getDisplay().equals(product.getPr_status())){
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+            if (!Status.ENABLE.getDisplay().equals(product.getPr_status())){
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }else{
                 product.setId(id);
-                product.setPr_statuscode(Status.OPEN.name());
-                product.setPr_status(Status.OPEN.getDisplay());
+                product.setPr_statuscode(Status.ENABLE.name());
+                product.setPr_status(Status.ENABLE.getDisplay());
                 product.setUpdaterId(BaseContextHolder.getUserId());
                 product.setUpdateTime(new Date());
                 getMapper().updateByPrimaryKeySelective(product);

+ 6 - 7
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java

@@ -2,7 +2,6 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -330,8 +329,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
         if(id != null && id > 0){
             Vendor vendor = new Vendor();
             vendor.setId(id);
-            vendor.setVe_status(Status.CLOSE.getDisplay());
-            vendor.setVe_statuscode(Status.CLOSE.name());
+            vendor.setVe_status(Status.BANNED.getDisplay());
+            vendor.setVe_statuscode(Status.BANNED.name());
             vendor.setUpdaterId(BaseContextHolder.getUserId());
             vendor.setUpdateTime(new Date());
 
@@ -358,19 +357,19 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             if(vendor == null){
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (Status.CLOSE.name().equals(vendor.getVe_statuscode())){
+            if (Status.BANNED.name().equals(vendor.getVe_statuscode())){
                 String code = vendor.getVe_code();
                 vendor = new Vendor();
                 vendor.setId(id);
-                vendor.setVe_statuscode(Status.OPEN.name());
-                vendor.setVe_status(Status.OPEN.getDisplay());
+                vendor.setVe_statuscode(Status.ENABLE.name());
+                vendor.setVe_status(Status.ENABLE.getDisplay());
                 getMapper().updateByPrimaryKeySelective(vendor);
                 //记录LOG
                 DocBaseDTO docBaseDTO = generateMsgObj(id, code);
                 messageLogService.customizeLog(docBaseDTO, Operation.ENABLE);
                 return docBaseDTO;
             }else {
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }
         }else {
             throw new BizException(BizExceptionCode.ILLEGAL_ID);

+ 6 - 7
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java

@@ -21,7 +21,6 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.RegexpUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.HashMap;
@@ -172,8 +171,8 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
             }
             Warehouse warehouse = new Warehouse();
             warehouse.setId(id);
-            warehouse.setWh_status(Status.CLOSE.getDisplay());
-            warehouse.setWh_statuscode(Status.CLOSE.name());
+            warehouse.setWh_status(Status.BANNED.getDisplay());
+            warehouse.setWh_statuscode(Status.BANNED.name());
             warehouse.setUpdaterId(BaseContextHolder.getUserId());
             warehouse.setUpdateTime(new Date());
 
@@ -195,12 +194,12 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
             if(warehouse == null){
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (Status.CLOSE.name().equals(warehouse.getWh_statuscode())){
+            if (Status.BANNED.name().equals(warehouse.getWh_statuscode())){
                 String code = warehouse.getWh_code();
                 warehouse = new Warehouse();
                 warehouse.setId(id);
-                warehouse.setWh_statuscode(Status.OPEN.name());
-                warehouse.setWh_status(Status.OPEN.getDisplay());
+                warehouse.setWh_statuscode(Status.ENABLE.name());
+                warehouse.setWh_status(Status.ENABLE.getDisplay());
                 warehouse.setUpdaterId(BaseContextHolder.getUserId());
                 warehouse.setUpdateTime(new Date());
 
@@ -210,7 +209,7 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
                 messageLogService.customizeLog(docBaseDTO, Operation.ENABLE);
                 return docBaseDTO;
             }else {
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }
         }else {
             throw new BizException(BizExceptionCode.ILLEGAL_ID);

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

@@ -49,6 +49,8 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

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

@@ -44,6 +44,8 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

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

@@ -102,6 +102,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

+ 5 - 4
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -21,6 +21,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -654,15 +655,15 @@
 
   <update id="calcProdIn">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 

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

@@ -48,6 +48,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -148,6 +149,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <!--<result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />-->
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java

@@ -49,6 +49,8 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Long pd_whid;
 
     private String pd_whcode;

+ 2 - 2
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java

@@ -45,6 +45,8 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Long pd_whid;
 
     private String pd_whcode;
@@ -81,8 +83,6 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
-    private Double pd_ordertotal;
-
     private ProductDTO productDTO;
 
 }

+ 2 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -96,6 +96,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;
@@ -130,7 +132,6 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pd_remark;
 
-    private Double pd_ordertotal;
 
     private Long pd_ioid;
 

+ 6 - 5
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -21,6 +21,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -739,19 +740,19 @@
 
   <update id="calcProdIn">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <delete id="deleteByInOutNo" >
       DELETE FROM prodiodetail WHERE PD_INOUTNO=#{code} AND PD_PICLASS=#{type} AND COMPANYID=#{companyId}
   </delete>
-</mapper>
+</mapper>

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

@@ -48,6 +48,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />

+ 1 - 1
frontend/saas-web/app.json

@@ -344,7 +344,7 @@
             "accountEnterprise":"http://192.168.0.181:8000/#/enterprise",
             "basePath": {
                 "https": "https://saas-api-dev.usoftchina.com:5443",
-                "http": "http://192.168.0.181:8560"
+                "http": "http://192.168.253.58:8560"
             },
             "urlPattern": "^\/api\/"
         }

+ 9 - 0
frontend/saas-web/app/view/core/base/BasePanel.scss

@@ -19,6 +19,15 @@
         border-bottom-color: #fff !important;
         border-bottom-width: 1px !important;
     }
+    .x-btn-menu-active{
+        .x-btn-wrap{
+            .x-btn-button{
+                .x-btn-inner{
+                    color:#fff;
+                }
+            }
+        }
+    }
 }
 .core-base-gridpanel{
     .x-grid-body{

+ 1 - 1
frontend/saas-web/app/view/core/base/GridPanel.js

@@ -53,7 +53,7 @@ Ext.define('saas.view.core.base.GridPanel', {
                                 }
                             }else {
                                 console.error('exception: ', response.responseJson);
-                                saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                                saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson?response.responseJson.message:'请求超时');
                             }
                         }
                     }

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

@@ -18,7 +18,7 @@ Ext.define('saas.view.core.dbfind.types.BomDbfindTrigger', {
         width: 200
     }],
     
-    defaultCondition: "bo_statuscode='OPEN'",
+    defaultCondition: "bo_statuscode='ENABLE'",
     //窗口字段设置
     dbSearchFields: [{
         emptyText: '输入BOM编号或名称',

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

@@ -8,7 +8,7 @@ Ext.define('saas.view.core.dbfind.types.CustomerDbfindTrigger', {
     dataUrl: '/api/document/customer/dbfind',
     addXtype: 'document-customer-formpanel',
     addTitle: '客户资料',
-    defaultCondition: "cu_statuscode='OPEN'",
+    defaultCondition: "cu_statuscode='ENABLE'",
     
     dbtpls: [{
         field: 'cu_code',

+ 5 - 1
frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js

@@ -13,7 +13,7 @@ Ext.define('saas.view.core.dbfind.types.ProductDbfindTrigger', {
     },{
         field:'pr_detail',width:200
     }],
-    defaultCondition: "pr_statuscode='OPEN'",
+    defaultCondition: "pr_statuscode='ENABLE'",
     dbSearchFields:[{
         emptyText:'输入物料编号、名称或规格',
         xtype : "textfield", 
@@ -64,5 +64,9 @@ Ext.define('saas.view.core.dbfind.types.ProductDbfindTrigger', {
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
         }
+    },{
+        text: "采购提前期",
+        dataIndex: "pr_leadtime",
+        xtype:'hidden'
     }]
 });

+ 6 - 2
frontend/saas-web/app/view/core/dbfind/types/ProductMultiDbfindTrigger.js

@@ -40,7 +40,7 @@ Ext.define('saas.view.core.dbfind.types.ProductMultiDbfindTrigger', {
         field: 'pr_detail',
         width: 200
     }],
-    defaultCondition: "pr_statuscode='OPEN'",
+    defaultCondition: "pr_statuscode='ENABLE'",
     dbSearchFields: [{
         emptyText: '输入物料编号、名称或规格',
         width: 200,
@@ -91,7 +91,11 @@ Ext.define('saas.view.core.dbfind.types.ProductMultiDbfindTrigger', {
             var xr = (new Array(arr[1].length)).fill('0');
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
-        }
+        },
+    }, {
+        text: "采购提前期",
+        dataIndex: "pr_leadtime",
+        xtype:'hidden'
     }]
 
 });

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

@@ -9,7 +9,7 @@ Ext.define('saas.view.core.dbfind.types.VendorDbfindTrigger', {
     dataUrl:'/api/document/vendor/list',
     addXtype: 'document-vendor-formpanel',
     addTitle: '供应商资料',
-    defaultCondition:"ve_statuscode='OPEN'",
+    defaultCondition:"ve_statuscode='ENABLE'",
 
     //联想设置
     dbtpls:[{

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

@@ -9,7 +9,7 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
     // dataUrl:'http://localhost:9480/warehouse/list',
     addXtype: 'other-warehouse',
     addTitle: '仓库资料',
-    defaultCondition: "wh_statuscode='OPEN'",
+    defaultCondition: "wh_statuscode='ENABLE'",
     dbtpls: [{
         field: 'wh_code',
         width: 150

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

@@ -180,28 +180,31 @@ Ext.define('saas.view.core.form.FormPanelController', {
             delete params.items1;
         }
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._saveUrl,
             params: JSON.stringify(params),
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var id = localJson.data.id;
                 var code = localJson.data.code;
                 form.initId = id;
                 saas.util.FormUtil.loadData(form);
-                saas.util.BaseUtil.showSuccessToast('保存成功');
 
                 var newId = form.xtype + '-' + id;
                 var newTitle = form._title + '(' + code + ')';
 
                 saas.util.BaseUtil.refreshTabTitle(newId, newTitle);
 
+                saas.util.BaseUtil.showSuccessToast('保存成功');
                 form.fireEvent('aftersave', true, form, localJson);
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
             form.fireEvent('aftersave', false, form, res);
@@ -263,12 +266,14 @@ Ext.define('saas.view.core.form.FormPanelController', {
             delete params.items1;
         }
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._auditUrl,
             params: JSON.stringify(params),
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 // 未保存直接审核会返回id
                 if(localJson.data) {
@@ -289,6 +294,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             if(res.data) {
                 var id = localJson.data.id;
@@ -330,11 +336,13 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var id = viewModel.get(form._idField);
         var code = viewModel.get(form._codeField);
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._unAuditUrl + '/' + id,
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 //解析参数
                 saas.util.BaseUtil.showSuccessToast('反审核成功');
@@ -342,6 +350,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('反审核失败: ' + res.message);
         });

+ 2 - 5
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -93,7 +93,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                                 if(response.timedout) {
                                     saas.util.BaseUtil.showErrorToast('请求超时');
                                 }else{
-                                    saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                                    saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson?response.responseJson.message:'请求超时');
                                 }
                             }
                         }
@@ -316,10 +316,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     onExport: function () {
         var grid = this.up('grid');
         //导出接口权限设置
-        var _url = grid.baseVastUrl.substring(0,grid.baseVastUrl.length-1);
-        var lastIndex = _url.lastIndexOf('/');
-        var caller = _url.substring(lastIndex);
-        var url = '/api/commons'+caller+'/export';
+        var url = '/api/commons/'+grid.caller+'/export';
         saas.util.BaseUtil.request({
             url: url,
             params: '',

+ 10 - 0
frontend/saas-web/app/view/core/query/QueryGridPanel.scss

@@ -9,6 +9,16 @@
         }
     }
 
+    .x-btn-menu-active{
+        .x-btn-wrap{
+            .x-btn-button{
+                .x-btn-inner{
+                    color:#fff;
+                }
+            }
+        }
+    }
+
     .x-panel-default-outer-border-trl {
         border-top-color: #fff !important;
         border-top-width: 1px !important;

+ 3 - 2
frontend/saas-web/app/view/document/bom/BasePanel.js

@@ -34,8 +34,8 @@ Ext.define('saas.view.document.bom.BasePanel', {
         fields: ['bo_statuscode', 'bo_status'],
         data: [
             ["ALL", "全部"],
-            ["OPEN", "已启"],
-            ["CLOSE", "已关闭"]
+            ["ENABLE", "已启"],
+            ["BANNED", "已禁用"]
         ]
         }),
         getCondition: function(value) {
@@ -61,6 +61,7 @@ Ext.define('saas.view.document.bom.BasePanel', {
         codeField: 'bo_mothercode',
         statusCodeField:'bo_statuscode',
         dataUrl: '/api/document/bom/list',
+        caller: 'Bom',
         columns : [{
             text : "id", 
             width : 0, 

+ 2 - 2
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -220,9 +220,9 @@ Ext.define('saas.view.document.bom.FormPanel', {
 
     auditTexts: {
         auditCode: 'CLOSE',
-        auditText: '已关闭',
+        auditText: '已禁用',
         unAuditCode: 'OPEN',
-        unAuditText: '已启',
+        unAuditText: '已启',
         auditBtnText: '禁用',
         unAuditBtnText: '启用',
     }

+ 3 - 2
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -43,8 +43,8 @@ Ext.define('saas.view.document.customer.BasePanel', {
         fields: ['cu_statuscode', 'cu_status'],
         data: [
             ["ALL", "全部"],
-            ["OPEN", "已启"],
-            ["CLOSE", "已关闭"]
+            ["ENABLE", "已启"],
+            ["BANNED", "已禁用"]
         ]
         }),
         getCondition: function(value) {
@@ -70,6 +70,7 @@ Ext.define('saas.view.document.customer.BasePanel', {
         codeField: 'cu_code',
         statusCodeField:'cu_statuscode',
         dataUrl: '/api/document/customer/list',
+        caller: 'Customer',
         columns : [
         {
             text : "客户id", 

+ 2 - 2
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -438,9 +438,9 @@ Ext.define('saas.view.document.customer.FormPanel', {
     }],
     auditTexts: {
         auditCode: 'CLOSE',
-        auditText: '已关闭',
+        auditText: '已禁用',
         unAuditCode: 'OPEN',
-        unAuditText: '已启',
+        unAuditText: '已启',
         auditBtnText: '禁用',
         unAuditBtnText: '启用',
     }

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

@@ -465,7 +465,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 fieldLabel: '仓库状态',
                 name: 'wh_status',   
-                value:'已启',
+                value:'已启',
                 maxLength: 20
             },{
                 xtype:'hidden',

+ 3 - 2
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -44,8 +44,8 @@ Ext.define('saas.view.document.product.BasePanel', {
         fields: ['pr_statuscode', 'pr_status'],
         data: [
             ["ALL", "全部"],
-            ["OPEN", "已启"],
-            ["CLOSE", "已关闭"]
+            ["ENABLE", "已启"],
+            ["BANNED", "已禁用"]
         ]
         }),
         getCondition: function(value) {
@@ -71,6 +71,7 @@ Ext.define('saas.view.document.product.BasePanel', {
         codeField: 'pr_code',
         statusCodeField:'pr_statuscode',
         dataUrl: '/api/document/product/list',
+        caller: 'Product',
         columns : [{
             text : "id", 
             width : 0, 

+ 3 - 3
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -198,7 +198,7 @@ Ext.define('saas.view.document.product.FormPanel', {
         fieldLabel : "更新时间"
     }, {
         xtype: 'numberfield',
-        fieldLabel: 'L/T',
+        fieldLabel: '采购提前期',
         name: 'pr_leadtime',
         minValue: 0,
         maxLength: 10
@@ -357,9 +357,9 @@ Ext.define('saas.view.document.product.FormPanel', {
     }],
     auditTexts: {
         auditCode: 'CLOSE',
-        auditText: '已关闭',
+        auditText: '已禁用',
         unAuditCode: 'OPEN',
-        unAuditText: '已启',
+        unAuditText: '已启',
         auditBtnText: '禁用',
         unAuditBtnText: '启用',
     },

+ 3 - 2
frontend/saas-web/app/view/document/vendor/BasePanel.js

@@ -38,8 +38,8 @@ Ext.define('saas.view.document.vendor.BasePanel', {
         fields: ['ve_statuscode', 've_status'],
         data: [
             ["ALL", "全部"],
-            ["OPEN", "已启"],
-            ["CLOSE", "已关闭"]
+            ["ENABLE", "已启"],
+            ["BANNED", "已禁用"]
         ]
         }),
         getCondition: function(value) {
@@ -65,6 +65,7 @@ Ext.define('saas.view.document.vendor.BasePanel', {
         codeField: 've_code',
         statusCodeField:'ve_statuscode',
         dataUrl: '/api/document/vendor/list',
+        caller: 'Vendor',
         columns : [{
             text : "供应商id", 
             width : 0, 

+ 2 - 2
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -322,9 +322,9 @@ Ext.define('saas.view.document.vendor.FormPanel', {
     }],
     auditTexts: {
         auditCode: 'CLOSE',
-        auditText: '已关闭',
+        auditText: '已禁用',
         unAuditCode: 'OPEN',
-        unAuditText: '已启',
+        unAuditText: '已启',
         auditBtnText: '禁用',
         unAuditBtnText: '启用',
     }

+ 3 - 2
frontend/saas-web/app/view/home/infoCardList/Payment.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.home.infoCardList.Payment', {
     extend: 'saas.view.home.infoCardList.InfoList',
     xtype: 'home-infocardlist-payment',
 
-    listUrl: '/api/purchase/prodinout/list',
+    listUrl: '/api/purchase/prodinout/homepageList',
     idField: 'id',
     codeField: 'pi_inoutno',
     // detailTitle: '采购验收单',
@@ -68,7 +68,8 @@ Ext.define('saas.view.home.infoCardList.Payment', {
         width: 80
     }, {
         text: '数量',
-        dataIndex: 'pd_inqty',
+        // dataIndex: 'pd_inqty',
+        dataIndex: 'qty',
         xtype: 'numbercolumn',
         width: 110,
         renderer: function (v) {

+ 3 - 2
frontend/saas-web/app/view/home/infoCardList/Recment.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.home.infoCardList.Recment', {
     extend: 'saas.view.home.infoCardList.InfoList',
     xtype: 'home-infocardlist-recment',
 
-    listUrl: '/api/sale/prodinout/list',
+    listUrl: '/api/sale/prodinout/homepageList/',
     idField: 'id',
     codeField: 'pi_inoutno',
     // detailTitle: '出货单',
@@ -66,7 +66,8 @@ Ext.define('saas.view.home.infoCardList.Recment', {
         width: 150
     }, {
         text: '出货数量',
-        dataIndex: 'pd_outqty',
+        // dataIndex: 'pd_outqty',
+        dataIndex: 'qty',
         xtype:'numbercolumn',
         width: 110,
         renderer : function(v) {

+ 3 - 2
frontend/saas-web/app/view/home/infoCardList/UnauditCheckIn.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.home.infoCardList.UnauditCheckIn', {
     extend: 'saas.view.home.infoCardList.InfoList',
     xtype: 'home-infocardlist-unauditcheckin',
 
-    listUrl: '/api/purchase/prodinout/list',
+    listUrl: '/api/purchase/prodinout/homepageList',
     idField: 'id',
     codeField: 'pi_inoutno',
     // detailTitle: '采购验收单',
@@ -68,7 +68,8 @@ Ext.define('saas.view.home.infoCardList.UnauditCheckIn', {
         width: 80
     }, {
         text: '数量',
-        dataIndex: 'pd_inqty',
+        // dataIndex: 'pd_inqty',
+        dataIndex: 'qty',
         xtype: 'numbercolumn',
         width: 110,
         renderer: function (v) {

+ 3 - 2
frontend/saas-web/app/view/home/infoCardList/UnauditSaleOut.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.home.infoCardList.UnauditSaleOut', {
     extend: 'saas.view.home.infoCardList.InfoList',
     xtype: 'home-infocardlist-unauditsaleout',
 
-    listUrl: '/api/sale/prodinout/list',
+    listUrl: '/api/sale/prodinout/homepageList',
     idField: 'id',
     codeField: 'pi_inoutno',
     // detailTitle: '出货单',
@@ -66,7 +66,8 @@ Ext.define('saas.view.home.infoCardList.UnauditSaleOut', {
         width: 150
     }, {
         text: '数量',
-        dataIndex: 'pd_outqty',
+        // dataIndex: 'pd_outqty',
+        dataIndex: 'qty',
         xtype:'numbercolumn',
         width: 110,
         renderer : function(v) {

+ 12 - 10
frontend/saas-web/app/view/main/Navigation.js

@@ -124,16 +124,18 @@ Ext.define('saas.view.main.Navigation', {
                         });
 
                         view.el.dom.addEventListener('mouseleave', function (e) {
-                            var ex = e.clientX,
-                                ey = e.clientY,
-                                box = menuView.getBoundingClientRect(),
-                                navItem = menu.navItem,
-                                navBox = navItem.getBoundingClientRect();
-
-                            if (ey <= box.top || ex >= (box.left + box.width) || ey >= (box.top + box.height) || (ex <= box.left && (ey <= navBox.top || ey >= (navBox.top + navBox.height)))) {
-                                menu.navItem.classList.remove(menu.navView.overItemCls);
-                                menu.hide();
-                            }
+                            menu.navItem.classList.remove(menu.navView.overItemCls);
+                            menu.hide();
+                            // var ex = e.clientX,
+                            //     ey = e.clientY,
+                            //     box = menuView.getBoundingClientRect(),
+                            //     navItem = menu.navItem,
+                            //     navBox = navItem.getBoundingClientRect();
+
+                            // if ((ex <= box.left && (ey <= (navBox.top - 5) || ey >= (navBox.top + navBox.height))) || ey <= (box.top - 5) || ex >= (box.left + box.width + 5) || ey >= (box.top + box.height + 5)) {
+                            //     menu.navItem.classList.remove(menu.navView.overItemCls);
+                            //     menu.hide();
+                            // }
                         });
 
                         Ext.Array.each(menuItem, function (mi) {

+ 1 - 0
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -74,6 +74,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         addXtype: 'money-fundtransfer-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/fundtransfer/',
+        caller:'FundTransfer',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 1 - 0
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -94,6 +94,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         addXtype: 'money-othreceipts-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/othreceipts/',
+        caller:'OthReceipts',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 1 - 0
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -91,6 +91,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         addXtype: 'money-othspendings-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/othspendings/',
+        caller:'OthSpendings',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 4 - 0
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -177,17 +177,21 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._turnInUrl+id.value,
             method: 'GET',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 saas.util.BaseUtil.showSuccessToast('转单成功');
               
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

+ 1 - 0
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -66,6 +66,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         addXtype: 'money-paybalance-formpanel',
         defaultCondition: '',
         baseVastUrl: '/api/money/paybalance/',
+        caller: 'PayBalance',
         baseColumn: [
             {
                 text: 'id',

+ 4 - 0
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -174,17 +174,21 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._turnInUrl+id.value,
             method: 'GET',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 saas.util.BaseUtil.showSuccessToast('转单成功');
               
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

+ 1 - 0
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -58,6 +58,7 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         addXtype: 'money-recbalance-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/recbalance/',
+        caller: 'RecBalance',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 7 - 49
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -485,55 +485,6 @@ Ext.define('saas.view.money.verification.FormPanelController', {
         return defaultCondition;
     },
 
-    /**
-     * 清空所有从表数据
-     */
-    clearDetails: function() {
-        var me = this;
-        
-        me.clearDetail0();
-        me.clearDetail1();
-    },
-
-    /**
-     * 清空第一个从表数据
-     */
-    clearDetail0: function(f, n, o) {
-        var me = this,
-        form = me.getView(),
-        grid = form.query('detailGridField')[0];
-        me.clearDetail(grid);
-    },
-
-    /**
-     * 清空第二个从表数据
-     */
-    clearDetail1: function() {
-        var me = this,
-        form = me.getView(),
-        grid = form.query('detailGridField')[1];
-        me.clearDetail(grid);
-    },
-
-    /**
-     * 清空一个从表数据
-     */
-    clearDetail: function(grid) {
-        var datas = [],
-        emptyRows = grid.emptyRows,
-        detnoColumn = grid.detnoColumn,
-        detno = 0,
-        store = grid.getStore();
-        
-        Ext.Array.each(new Array(emptyRows), function() {
-            detno += 1;
-            var data = {};
-            data[detnoColumn] = detno;
-            datas.push(data);
-        })
-        store.removeAll();
-        store.add(datas);
-    },
     onSave: function() {
         var me = this,
             form = me.getView(),
@@ -573,12 +524,14 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             params['items' + ( i + 1)] = formData['detail' + i];
         }
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._saveUrl,
             params: JSON.stringify(params),
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var id = localJson.data.id;
                 var code = localJson.data.code;
@@ -595,11 +548,13 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
             form.fireEvent('aftersave', false, form, res);
         });
     },
+
     audit: function() {
         var me = this,
         form = me.getView(),
@@ -617,12 +572,14 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             params['items' + ( i + 1)] = formData['detail' + i];
         }
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._auditUrl,
             params: JSON.stringify(params),
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 // 未保存直接审核会返回id
                 if(localJson.data) {
@@ -643,6 +600,7 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             if(res.data) {
                 var id = localJson.data.id;

+ 1 - 0
frontend/saas-web/app/view/money/verification/QueryPanel.js

@@ -77,6 +77,7 @@ Ext.define('saas.view.money.verification.QueryPanel', {
         addXtype: 'money-verification-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/verification/',
+        caller: 'Verification',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

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

@@ -63,11 +63,14 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(false);
         saas.util.BaseUtil.request({
             url: form._turnInUrl+'/'+id.value,
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var intValue = localJson.data.id,
                     codeValue= localJson.data.code,
@@ -79,6 +82,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

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

@@ -106,6 +106,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         addXtype: 'purchase-purchase-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/purchase/purchase/',
+        caller:'Purchase',
         baseColumn: [
         {
             text: 'id',

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

@@ -266,7 +266,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             },{
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0, 
                 // editor : {
                 //     xtype : "numberfield",

+ 12 - 8
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -111,14 +111,14 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
         main[form._statusCodeField] = auditTexts.unAuditCode;
         main[form._statusField] = auditTexts.unAuditText;
         //录入人,录入日期,审核人,审核日期清空
-        main['creatorId'] = null;
-        main['creatorName'] = null;
-        main['createTime'] = null;
-        main['updaterId'] = null;
-        main['updaterName'] = null;
-        main['updateTime'] = null;
-        main[form._auditmanField] = null;
-        main[form._auditdateField] = null;
+        main['creatorId'] = undefined;
+        main['creatorName'] = undefined;
+        main['createTime'] = undefined;
+        main['updaterId'] = undefined;
+        main['updaterName'] = undefined;
+        main['updateTime'] = undefined;
+        main[form._auditmanField] = undefined;
+        main[form._auditdateField] = undefined;
 
         for(var k in main) {
             // 主表日期改为当前日期
@@ -153,11 +153,14 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._turnOutUrl+'/'+id.value,
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var intValue = localJson.data.id,
                 codeValue= localJson.data.code,
@@ -170,6 +173,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

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

@@ -106,6 +106,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         addXtype:'purchase-purchasein-formpanel',
         defaultCondition:' pi_class = \'采购验收单\'',
         baseVastUrl:'/api/purchase/prodinout/',
+        caller:'PurchaseIn',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -134,7 +135,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             width: 150
         },{
             text: '总金额',
-            dataIndex: 'pi_total',
+            dataIndex: 'pd_ordertotal',
             width: 110
         },{
             text: '单据状态',
@@ -251,7 +252,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {

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

@@ -253,7 +253,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             {
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0, 
                 // editor : {
                 //     xtype : "numberfield",

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

@@ -113,14 +113,14 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
         main[form._statusCodeField] = auditTexts.unAuditCode;
         main[form._statusField] = auditTexts.unAuditText;
         //录入人,录入日期,审核人,审核日期清空
-        main['creatorId'] = null;
-        main['creatorName'] = null;
-        main['createTime'] = null;
-        main['updaterId'] = null;
-        main['updaterName'] = null;
-        main['updateTime'] = null;
-        main[form._auditmanField] = null;
-        main[form._auditdateField] = null;
+        main['creatorId'] = undefined;
+        main['creatorName'] = undefined;
+        main['createTime'] = undefined;
+        main['updaterId'] = undefined;
+        main['updaterName'] = undefined;
+        main['updateTime'] = undefined;
+        main[form._auditmanField] = undefined;
+        main[form._auditdateField] = undefined;
 
         for(var k in main) {
             // 主表日期改为当前日期

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

@@ -109,6 +109,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         addXtype:'purchase-purchaseout-formpanel',
         defaultCondition:' pi_class = \'采购验退单\'',
         baseVastUrl:'/api/purchase/prodinout/',
+        caller:'PurchaseOut',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -137,7 +138,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             width: 150
         },{
             text: '总金额',
-            dataIndex: 'pi_total',
+            dataIndex: 'pd_ordertotal',
             width: 110
         },{
             text: '单据状态',
@@ -254,7 +255,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
                 },
             },{
                 text: '金额',
-                dataIndex: 'pd_total',
+                dataIndex: 'pd_ordertotal',
                 xtype:'numbercolumn',
                 width: 110,
                 renderer : function(v) {

+ 0 - 7
frontend/saas-web/app/view/sale/report/SaleRec.js

@@ -64,13 +64,6 @@ Ext.define('saas.view.sale.report.SaleRec', {
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
-        },
-        summaryType: 'sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join();
-            return Ext.util.Format.number(v, format);
         }
     }, {
         text: '本次收款',

+ 99 - 76
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -5,111 +5,134 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=sa_custname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[
-                            {
-                                from:'id',to:'sa_custid',ignore:true
-                            },{
-                                from:'cu_code',to:'sa_custcode'
-                            },{
-                                from:'cu_name',to:'sa_custname'
-                            },{
-                                from:'ca_address',to:'sa_toplace'
-                            },{
-                                from:'cu_sellercode',to:'sa_sellercode'
-                            },{
-                                from:'cu_sellername',to:'sa_seller'
-                            }],
-                    }) ;   
+            'dbfindtrigger[name=sa_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'sa_custid',
+                            ignore: true
+                        }, {
+                            from: 'cu_code',
+                            to: 'sa_custcode'
+                        }, {
+                            from: 'cu_name',
+                            to: 'sa_custname'
+                        }, {
+                            from: 'ca_address',
+                            to: 'sa_toplace'
+                        }, {
+                            from: 'cu_sellercode',
+                            to: 'sa_sellercode'
+                        }, {
+                            from: 'cu_sellername',
+                            to: 'sa_seller'
+                        }],
+                    });
 
                 }
-            },// 主表-采购员名称
-            'dbfindtrigger[name=sa_sellercode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'id',to:'sa_sellerid',ignore:true
-                        },{
-                            from:'em_code',to:'sa_sellercode'
-                        },{
-                            from:'em_name',to:'sa_seller'
+            }, // 主表-采购员名称
+            'dbfindtrigger[name=sa_sellercode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'sa_sellerid',
+                            ignore: true
+                        }, {
+                            from: 'em_code',
+                            to: 'sa_sellercode'
+                        }, {
+                            from: 'em_name',
+                            to: 'sa_seller'
                         }],
-                    }) ;   
+                    });
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'multidbfindtrigger[name=sd_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[
-                        {
-                            from:'pr_code',to:'sd_prodcode'
+            'multidbfindtrigger[name=sd_prodcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'pr_code',
+                            to: 'sd_prodcode'
+                        }, {
+                            from: 'pr_saleprice',
+                            to: 'sd_price'
                         }, {
-                            from:'pr_saleprice',to:'sd_price'
-                        },{
-                            from:'pr_detail',to:'pr_detail'
+                            from: 'pr_detail',
+                            to: 'pr_detail'
                         }, {
-                            from:'pr_spec',to:'pr_spec'
+                            from: 'pr_spec',
+                            to: 'pr_spec'
                         }, {
-                            from:'id',to:'sd_prodid',ignore:true
+                            from: 'id',
+                            to: 'sd_prodid',
+                            ignore: true
                         }],
-                    }) ;   
+                    });
 
                 }
             }
         });
 
     },
-    turnOut: function() {
-        var me = this,
-        form = me.getView(),
-        id = form.getForm().findField(form._idField);
-        saas.util.BaseUtil.request({
-            url: form._turnOutUrl+'/'+id.value,
-            method: 'POST',
-        })
-        .then(function(localJson) {
-            if(localJson.success){
-                var intValue = localJson.data.id,
-                    codeValue= localJson.data.code,
-                    name = '出货单';
-                saas.util.BaseUtil.openTab('sale-saleout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
-                    initId: intValue
-                });
-                saas.util.BaseUtil.showSuccessToast('转单成功');  
-                saas.util.FormUtil.loadData(form);
-            }
-        })
-        .catch(function(res) {
-            console.error(res);
-            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
-        });
-     },
-    turnPurchase : function(){
+    turnOut: function () {
         var me = this,
             form = me.getView(),
             id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
-            url: form._turnPurchase+'/'+id.value,
-            method: 'POST',
-        })
-            .then(function(localJson) {
-                if(localJson.success){
+                url: form._turnOutUrl + '/' + id.value,
+                method: 'POST',
+            })
+            .then(function (localJson) {
+                form.setLoading(false);
+                if (localJson.success) {
                     var intValue = localJson.data.id,
-                        codeValue= localJson.data.code,
-                        name = localJson.data.name;
-                    saas.util.BaseUtil.openTab('purchase-purchase-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                        codeValue = localJson.data.code,
+                        name = '出货单';
+                    saas.util.BaseUtil.openTab('sale-saleout-formpanel', name + "(" + codeValue + ")", codeValue + intValue, {
                         initId: intValue
                     });
                     saas.util.BaseUtil.showSuccessToast('转单成功');
                     saas.util.FormUtil.loadData(form);
                 }
             })
-            .catch(function(res) {
+            .catch(function (res) {
+                form.setLoading(false);
                 console.error(res);
                 saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
             });
+    },
+    turnPurchase: function () {
+        var me = this,
+            form = me.getView(),
+            id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
+        saas.util.BaseUtil.request({
+            url: form._turnPurchase + '/' + id.value,
+            method: 'POST',
+        })
+        .then(function (localJson) {
+            form.setLoading(false);
+            if (localJson.success) {
+                var intValue = localJson.data.id,
+                    codeValue = localJson.data.code,
+                    name = localJson.data.name;
+                saas.util.BaseUtil.openTab('purchase-purchase-formpanel', name + "(" + codeValue + ")", codeValue + intValue, {
+                    initId: intValue
+                });
+                saas.util.BaseUtil.showSuccessToast('转单成功');
+                saas.util.FormUtil.loadData(form);
+            }
+        })
+        .catch(function (res) {
+            form.setLoading(false);
+            console.error(res);
+            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
+        });
     }
 });

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

@@ -96,6 +96,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         addXtype: 'sale-sale-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/sale/sale/',
+        caller:'Sale',
         baseColumn: [{
             text: 'id',
             dataIndex: 'sa_id',
@@ -253,18 +254,20 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
                 var format = '0.' + xr.join();
                 return Ext.util.Format.number(v, format);
             },
-        }, {
-            text: '已审核采购单数',
-            dataIndex: 'sd_pdqty',
-            xtype: 'numbercolumn',
-            width: 180,
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                var format = '0.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            },
-        }, {
+        },
+        //  {
+        //     text: '已审核采购单数',
+        //     dataIndex: 'sd_pdqty',
+        //     xtype: 'numbercolumn',
+        //     width: 180,
+        //     renderer : function(v) {
+        //         var arr = (v + '.').split('.');
+        //         var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+        //         var format = '0.' + xr.join();
+        //         return Ext.util.Format.number(v, format);
+        //     },
+        // } 
+        {
             text: '备注',
             dataIndex: 'sd_remark',
             width: 250

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

@@ -95,6 +95,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         addXtype:'sale-salein-formpanel',
         defaultCondition:' pi_class = \'销售退货单\'',
         baseVastUrl: '/api/sale/prodinout/',
+        caller:'SaleIn',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

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

@@ -59,11 +59,14 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._turnInUrl + '/' + id.value,
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var intValue = localJson.data.id,
                     codeValue= localJson.data.code,
@@ -76,6 +79,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
            // console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

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

@@ -97,6 +97,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         addXtype:'sale-saleout-formpanel',
         defaultCondition:' pi_class = \'出货单\'',
         baseVastUrl: '/api/sale/prodinout/',
+        caller:'SaleOut',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 10 - 35
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -116,6 +116,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         addXtype:'stock-appropriationinout-formpanel',
         defaultCondition:' pi_class = \'调拨单\'',
         baseVastUrl:'/api/storage/prodinout/',
+        caller:'AppropriationInOut',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -180,10 +181,6 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
                 text: '序号',
                 dataIndex: 'pd_pdno',
                 width: 80
-            },{
-                text: '相关单号',
-                dataIndex: 'pd_ordercode',
-                width: 150
             },{
                 text: '物料编号',
                 dataIndex: 'pd_prodcode',
@@ -193,7 +190,11 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
                 dataIndex: 'pr_detail',
                 width: 200
             },{
-                text: '物料规格',
+                text: '型号',
+                dataIndex: 'pr_orispeccode',
+                width: 150
+            },{
+                text: '规格',
                 dataIndex: 'pr_spec',
                 width: 150
             },{
@@ -206,39 +207,13 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
                 xtype:'numbercolumn',
                 width: 110
             },{
-                text: '仓',
+                text: '拨出仓',
                 dataIndex: 'pd_whname',
                 width: 150
             },{
-                text: '单价',
-                dataIndex: 'pd_orderprice',
-                xtype:'numbercolumn',
-                width: 110,
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
-                }         
-            },{
-                text: '税率',
-                dataIndex: 'pd_taxrate',
-                xtype:'numbercolumn',
-                width: 80,            
-                renderer : function(v) {
-                    return Ext.util.Format.number(v, '0');
-                },
-            },{
-                text: '金额',
-                dataIndex: 'pd_total',
-                xtype:'numbercolumn',            
-                width: 110,
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
-                }
+                text: '拨入仓',
+                dataIndex: 'pd_inwhname',
+                width: 150
             },{
                 text: '备注',
                 dataIndex: 'pd_remark',

+ 67 - 115
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -29,23 +29,11 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         gridexporter: true
     },
     tbar: [{
-        xtype: 'hidden',
-        name: 'wh_id',
-        bind:'{wh_id}',
-        fieldLabel: 'wh_id'
-    },{
-        xtype: 'hidden',
-        name: 'wh_code',
-        fieldLabel: 'wh_code'
-    },{		
         xtype: 'warehouseDbfindTrigger',
         name: 'wh_description',
+        bind: '{form.wh_description}',
         emptyText: '仓库',
         dbfinds:[{
-            from:'id',to:'wh_id',ignore:true 
-        }, { 
-            from:'wh_code',to:'wh_code'
-        }, {
             from:'wh_description',to:'wh_description'
         }],
         width:150,
@@ -54,32 +42,25 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         xtype : "remotecombo", 
         storeUrl:'/api/document/producttype/getCombo',
         name : "pr_kind",
-        bind:'{pr_kind}', 
+        bind: '{form.pr_kind}',
         emptyText : "类型",
         hiddenBtn:true, 
         allowBlank : false,
         width:150
     },{
-        xtype: 'hidden',
-        name: 'pr_id',
-        bind:'{pr_id}',
-        fieldLabel: 'pr_id'
-    },{
-        xtype: 'hidden',
-        name: 'pr_code',
-        fieldLabel: 'pr_code'
-    },{
-        xtype: 'productDbfindTrigger',
+        // xtype: 'productDbfindTrigger',
+        xtype: 'textfield',
         name: 'pr_detail',
         emptyText:'输入物料编号或名称',
         width:200,
-        dbfinds:[{
-            from:'id',to:'pr_id',ignore:true
-        },{
-            from:'pr_code',to:'pr_code',
-        }, {
-            from:'pr_detail',to:'pr_detail'
-        }]
+        bind: '{form.pr_detail}',
+        getCondition: function(value) {
+            if(value) {
+                return 'pr_detail like %' + value + '% or pr_code like%' + value + '%';
+            }else {
+                return '1 = 1';
+            }
+        }
     },{
         cls:'x-formpanel-btn-blue',
         xtype:'button',
@@ -235,8 +216,6 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         }  
     }],
 
-    condition:'',
-
     listeners:{
         boxready: function(grid, width, height, eOpts) {
             var store = grid.getStore(),
@@ -288,7 +267,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
                 },
                 listeners: {
                     beforeload: function (store, op) {
-                        var condition = me.condition;
+                        var condition = me.getConditions();
                         if (Ext.isEmpty(condition)) {
                             condition = "";
                         }
@@ -315,6 +294,27 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     },
 
     listeners: {
+        beforerender: function(grid) {
+            var tbar = grid.dockedItems.items[2];
+            var fields = tbar.items.items;
+            var items = [];
+
+            Ext.each(fields, function(f, index){
+                items.push(f);
+                f.enableKeyEvents = true;
+                f.on && f.on({
+                    keydown: {
+                        fn: function(th, e, eOpts) {
+                            if(e.keyCode == 13) {
+                                grid.store.load();
+                            }
+                        }
+                    }
+                });
+            });
+
+            grid.formItems = items;
+        },
         boxready: function(grid, width, height, eOpts) {
             var store = grid.getStore(),
             gridBodyBox = grid.body.dom.getBoundingClientRect(),
@@ -329,83 +329,46 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
      /**
      * 获得过滤条件
      */
-    getConditions: function(moreQuery) {
+    getConditions: function() {
         var me = this,
-        formItems = me.queryFormItems,
-        moreQueryFormItems = me.moreQueryFormItems,
+        formItems = me.formItems,
         viewModel = me.getViewModel(),
         viewModelData = viewModel.getData(),
         bindItems = viewModelData['form'],
-        moreItems = viewModelData['moreForm'],
         condition,
         conditions = [];
 
-        if(moreQuery) {
-            for(k in moreItems) {
-                var item = Ext.Array.findBy(moreQueryFormItems, function(i) {
-                    return i.name == k;
-                });
-                var field = item.name,
-                func = item.getCondition,
-                value = moreItems[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(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
-        
-                    if(!conditionValue) {
-                        continue;
-                    }
-                    condition = {
-                        type: type,
-                        field: field,
-                        operation: operation,
-                        value: conditionValue
-                    }
+        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)
                 }
-                conditions.push(condition);
-            }
-        }else {
-            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;
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
     
-                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(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
-        
-                    if(!conditionValue) {
-                        continue;
-                    }
-                    condition = {
-                        type: type,
-                        field: field,
-                        operation: operation,
-                        value: conditionValue
-                    }
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
                 }
-                conditions.push(condition);
             }
+            conditions.push(condition);
         }
 
         return conditions;
@@ -515,18 +478,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     onbuild:function(){
         var me =this;
         var grid = me;
-        var tbar = me.dockedItems.items[2];
-        var data;
-        grid.condition = '';
-        var items = [];
-        var fields = tbar.items.items.map(f => f.name);
-        Ext.each(fields, function(f, index){
-            var field = tbar.down('[name='+f+']');
-            if(field){
-                items.push(field);
-            }
-        });
-        grid.condition = grid.getCondition(items);
+        grid.condition = grid.getConditions(me.formItems);
 
         var data = grid.condition;
         param = {
@@ -545,14 +497,14 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });        
     },
     onSave:function(){
         var me = this,
         gridData = me.getDirtyData();
         if(gridData==null){
-            saas.util.BaseUtil.showToast('未修改数据');
+            saas.util.BaseUtil.showErrorToast('未修改数据');
         }
         saas.util.BaseUtil.request({
             url: me.saveUrl,
@@ -566,7 +518,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });        
     },
     getDirtyData: function() {

+ 125 - 105
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -5,83 +5,103 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=ma_whname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'id',to:'ma_whid',ignore:true                          
-                        },{
-                            from:'wh_code',to:'ma_whcode'                          
-                        },{
-                            from:'wh_description',to:'ma_whname'
+            'dbfindtrigger[name=ma_whname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'ma_whid',
+                            ignore: true
+                        }, {
+                            from: 'wh_code',
+                            to: 'ma_whcode'
+                        }, {
+                            from: 'wh_description',
+                            to: 'ma_whname'
                         }],
-                    }) ;   
+                    });
 
                 }
-            },            
+            },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=mm_whname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'id',to:'mm_whid',ignore:true                          
-                        },{
-                            from:'wh_code',to:'mm_whcode'                          
-                        },{
-                            from:'wh_description',to:'mm_whname'
+            'dbfindtrigger[name=mm_whname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'mm_whid',
+                            ignore: true
+                        }, {
+                            from: 'wh_code',
+                            to: 'mm_whcode'
+                        }, {
+                            from: 'wh_description',
+                            to: 'mm_whname'
                         }]
-                    }) ;   
+                    });
 
                 }
             },
-            'multidbfindtrigger[name=mm_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'pr_code',to:'mm_prodcode'
-                        },{
-                            from:'id',to:'mm_prodid'
-                        },{
-                            from:'pr_detail',to:'pr_detail'
-                        },{
-                            from:'pr_spec',to:'pr_spec'
-                        },{
-                            from:'pr_unit',to:'pr_unit'
-                        },{
-                            from:'pr_purcprice',to:'mm_price'
+            'multidbfindtrigger[name=mm_prodcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'pr_code',
+                            to: 'mm_prodcode'
+                        }, {
+                            from: 'id',
+                            to: 'mm_prodid'
+                        }, {
+                            from: 'pr_detail',
+                            to: 'pr_detail'
+                        }, {
+                            from: 'pr_spec',
+                            to: 'pr_spec'
+                        }, {
+                            from: 'pr_unit',
+                            to: 'pr_unit'
+                        }, {
+                            from: 'pr_purcprice',
+                            to: 'mm_price'
                         }],
-                    }) ;   
+                    });
 
                 }
             },
-            'bomDbfindTrigger[name=ma_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
+            'bomDbfindTrigger[name=ma_prodcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
                         //放大镜赋值设置
-                        dbfinds:[{
-                            from:'bo_motherid',to:'ma_prodid'
-                        },{
-                            from:'bo_mothercode',to:'ma_prodcode'
-                        },{
-                            from:'bo_mothername',to:'ma_proddetail'
-                        },{
-                            from:'pr_spec',to:'ma_prodspec'
-                        },{
-                            from:'pr_unit',to:'ma_produnit'
-                        },{
-                            from:'bo_version',to:'ma_version'
+                        dbfinds: [{
+                            from: 'bo_motherid',
+                            to: 'ma_prodid'
+                        }, {
+                            from: 'bo_mothercode',
+                            to: 'ma_prodcode'
+                        }, {
+                            from: 'bo_mothername',
+                            to: 'ma_proddetail'
+                        }, {
+                            from: 'pr_spec',
+                            to: 'ma_prodspec'
+                        }, {
+                            from: 'pr_unit',
+                            to: 'ma_produnit'
+                        }, {
+                            from: 'bo_version',
+                            to: 'ma_version'
                         }],
-                        aftertrigger:function(f,record){
+                        aftertrigger: function (f, record) {
                             me.getBomData(record.data.id)
                         }
-                    }) ;   
+                    });
 
                 }
             },
 
         });
     },
-    initCopyData: function(formData) {
+    initCopyData: function (formData) {
         var me = this;
         var form = this.getView();
         var detailCount = form.detailCount;
@@ -107,26 +127,26 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         main['ma_qty'] = 0;
         main['ma_price'] = 0;
         main['ma_total'] = 0;
-        for(var k in main) {
+        for (var k in main) {
             // 主表日期改为当前日期
-            if(saas.util.BaseUtil.isDateString(main[k])) {
+            if (saas.util.BaseUtil.isDateString(main[k])) {
                 main[k] = Ext.Date.format(new Date, 'Y-m-d H:i:s');
             }
         }
 
-        for(var j = 0; j < detailCount; j++) {
+        for (var j = 0; j < detailCount; j++) {
             var detail = formData['detail' + j];
-            for(var x = 0; x < detail.length; x ++) {
+            for (var x = 0; x < detail.length; x++) {
                 var d = detail[x];
 
-                for(var k in d) {
+                for (var k in d) {
                     // 从表id清空
                     delete d['id'];
                     delete d['mm_price'];
                     delete d['mm_qty'];
                     delete d['mm_amount'];
                     // 从表日期清空
-                    if(saas.util.BaseUtil.isDateString(d[k])) {
+                    if (saas.util.BaseUtil.isDateString(d[k])) {
                         d[k] = '';
                     }
                 }
@@ -134,54 +154,54 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         }
         return me.myInitCopyData(formData);;
     },
-    price_change:function(v) {
+    price_change: function (v) {
         var me = this,
-        viewModel = me.getViewModel(),
-        store = viewModel.get('detail0').detailStore,
-        type = viewModel.get('ma_type');
-        if('拆件'==type && v==0){
+            viewModel = me.getViewModel(),
+            store = viewModel.get('detail0').detailStore,
+            type = viewModel.get('ma_type');
+        if ('拆件' == type && v == 0) {
             saas.util.BaseUtil.showErrorToast('成本单价为0!');
         }
     },
-    getBomData: function(v) {
-    var me = this,
-    form = me.getView(),
-    viewModel = me.getViewModel(),
-    store = viewModel.get('detail0').detailStore,
-    type = viewModel.get('ma_type'),
-    loadData = new Array();
+    getBomData: function (v) {
+        var me = this,
+            form = me.getView(),
+            viewModel = me.getViewModel(),
+            store = viewModel.get('detail0').detailStore,
+            type = viewModel.get('ma_type'),
+            loadData = new Array();
 
-    //请求bom资料
-    saas.util.BaseUtil.request({
-        url: form._getBomUrl+'/'+v,
-        method: 'GET',
-    })
-    .then(function(localJson) {
-        if(localJson.success){
-            var data = localJson.data.items;
-            Ext.Array.each(data, function(item, i) {
-                loadData.push({
-                    mm_detno:item.bd_detno,
-                    mm_prodid:item.productDTO.id,
-                    mm_prodcode:item.productDTO.pr_code,
-                    mm_oneuseqty:item.bd_baseqty,
-                    pr_detail:item.productDTO.pr_detail,
-                    pr_spec:item.productDTO.pr_spec,
-                    pr_unit:item.productDTO.pr_unit,
-                    mm_repprodcode:item.bd_replace,
-                    mm_remark:item.bd_remark,                        
-                    mm_whid:item.productDTO.pr_whid,                        
-                    mm_whcode:item.productDTO.pr_whcode,
-                    mm_whname:item.productDTO.pr_whname,
-                    mm_price:type=='拆件'?item.productDTO.pr_purcprice:null
-                })                
-            });
-            store.loadData(loadData);
-        }
-    })
-    .catch(function(res) {
-        console.error(res);
-        saas.util.BaseUtil.showErrorToast('获取BOM资料失败: ' + res.message);
-    });
+        //请求bom资料
+        saas.util.BaseUtil.request({
+            url: form._getBomUrl + '/' + v,
+            method: 'GET',
+        })
+        .then(function (localJson) {
+            if (localJson.success) {
+                var data = localJson.data.items;
+                Ext.Array.each(data, function (item, i) {
+                    loadData.push({
+                        mm_detno: item.bd_detno,
+                        mm_prodid: item.productDTO.id,
+                        mm_prodcode: item.productDTO.pr_code,
+                        mm_oneuseqty: item.bd_baseqty,
+                        pr_detail: item.productDTO.pr_detail,
+                        pr_spec: item.productDTO.pr_spec,
+                        pr_unit: item.productDTO.pr_unit,
+                        mm_repprodcode: item.bd_replace,
+                        mm_remark: item.bd_remark,
+                        mm_whid: item.productDTO.pr_whid,
+                        mm_whcode: item.productDTO.pr_whcode,
+                        mm_whname: item.productDTO.pr_whname,
+                        mm_price: type == '拆件' ? item.productDTO.pr_purcprice : null
+                    })
+                });
+                store.loadData(loadData);
+            }
+        })
+        .catch(function (res) {
+            console.error(res);
+            saas.util.BaseUtil.showErrorToast('获取BOM资料失败: ' + res.message);
+        });
     }
 });

+ 1 - 0
frontend/saas-web/app/view/stock/make/QueryPanel.js

@@ -113,6 +113,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         addXtype: 'stock-make-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/storage/make/',
+        caller:'Make',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -224,7 +224,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
            {
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0,
                 // editor : {
                 //     xtype : "numberfield",

+ 2 - 1
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -103,6 +103,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         addXtype:'stock-otherin-formpanel',
         defaultCondition:' pi_class = \'其它入库单\'',
         baseVastUrl:'/api/storage/prodinout/',
+        caller:'OtherIn',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -225,7 +226,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {

+ 1 - 1
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -202,7 +202,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
             {
                 text: "含税金额",
                 xtype: 'numbercolumn',
-                dataIndex: "pd_total",
+                dataIndex: "pd_ordertotal",
                 width: 110.0,
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 2 - 1
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -97,6 +97,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         addXtype:'stock-otherout-formpanel',
         defaultCondition:' pi_class = \'其它出库单\'',
         baseVastUrl:'/api/storage/prodinout/',
+        caller: 'OtherOut',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -219,7 +220,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {

+ 5 - 0
frontend/saas-web/overrides/form/field/TextField.js

@@ -0,0 +1,5 @@
+Ext.define('saas.override.form.field.TextField', {
+    override: 'Ext.form.field.Text',
+    vtype: 'trim'
+
+});

+ 15 - 0
frontend/saas-web/overrides/form/field/TrimVtype.js

@@ -0,0 +1,15 @@
+Ext.define('saas.override.form.field.TrimVtype', {
+    override: 'Ext.form.field.VTypes',
+
+    // vtype validation function
+    trim: function(value) {
+        return this.trimRe.test(value);
+    },
+    // RegExp for the value to be tested against within the validation function
+    trimRe: /^(?! ).*(?<! )$/i,
+    // vtype Text property: The error text to display when the validation function returns false
+    trimText: '请不要在内容的开头和结尾添加空格',
+    // vtype Mask property: The keystroke filter mask
+    trimMask: /[\d\s:amp]/i
+
+});