Browse Source

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

zhuth 7 years ago
parent
commit
ffc3231401
86 changed files with 1724 additions and 474 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java
  3. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java
  4. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/FundinouttypeController.java
  5. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java
  6. 8 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductunitController.java
  7. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/AddressMapper.java
  8. 1 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerListMapper.java
  9. 8 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/FundinouttypeMapper.java
  10. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java
  11. 8 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProducttypeMapper.java
  12. 8 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductunitMapper.java
  13. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorkindMapper.java
  14. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java
  15. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/AddressService.java
  16. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java
  17. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/FundinouttypeService.java
  18. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProducttypeService.java
  19. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductunitService.java
  20. 32 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/AddressServiceImpl.java
  21. 16 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  22. 31 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java
  23. 26 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java
  24. 29 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProducttypeServiceImpl.java
  25. 30 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductunitServiceImpl.java
  26. 24 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorkindServiceImpl.java
  27. 17 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  28. 14 2
      applications/document/document-server/src/main/resources/mapper/AddressMapper.xml
  29. 13 0
      applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml
  30. 2 2
      applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml
  31. 15 3
      applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml
  32. 6 0
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  33. 11 2
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  34. 14 2
      applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml
  35. 6 0
      applications/document/document-server/src/main/resources/mapper/ProductunitMapper.xml
  36. 5 2
      applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml
  37. 5 2
      applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml
  38. 58 0
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/WarehouseMapperTest.java
  39. 13 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/VerificationController.java
  40. 13 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/VerificationService.java
  41. 30 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java
  42. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  43. 52 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java
  44. 20 8
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  45. 2 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  46. 11 11
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  47. 1 0
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  48. 1 0
      applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml
  49. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java
  50. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java
  51. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  52. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  53. 0 1
      frontend/saas-web/app/util/BaseUtil.js
  54. 3 0
      frontend/saas-web/app/view/core/form/RemoteCombo.js
  55. 1 0
      frontend/saas-web/app/view/core/view/BoundListAdd.js
  56. 2 2
      frontend/saas-web/app/view/document/bom/FormPanel.js
  57. 1 0
      frontend/saas-web/app/view/document/customer/BasePanel.js
  58. 2 2
      frontend/saas-web/app/view/document/customer/FormPanel.js
  59. 26 0
      frontend/saas-web/app/view/document/kind/ChildForm.js
  60. 24 1
      frontend/saas-web/app/view/document/kind/Kind.js
  61. 39 0
      frontend/saas-web/app/view/document/kind/KindModel.js
  62. 25 0
      frontend/saas-web/app/view/document/other/Address.js
  63. 25 0
      frontend/saas-web/app/view/document/other/ProductUnit.js
  64. 1 0
      frontend/saas-web/app/view/document/product/BasePanel.js
  65. 2 2
      frontend/saas-web/app/view/document/product/FormPanel.js
  66. 3 4
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  67. 7 15
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  68. 19 13
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  69. 32 6
      frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js
  70. 80 28
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  71. 80 28
      frontend/saas-web/app/view/money/othreceipts/QueryPanelController.js
  72. 49 18
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  73. 45 14
      frontend/saas-web/app/view/money/othspendings/QueryPanelController.js
  74. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  75. 1 1
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  76. 146 67
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  77. 74 37
      frontend/saas-web/app/view/sale/sale/QueryPanelController.js
  78. 5 1
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  79. 112 44
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  80. 5 3
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  81. 71 36
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  82. 3 0
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  83. 132 68
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  84. 2 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  85. 104 37
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  86. 4 2
      frontend/saas-web/resources/json/navigation.json

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

@@ -23,6 +23,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_CLOSE(79301, "只能关闭已审核的单据"),
     BIZ_OPEN(79302, "只能打开已关闭的单据"),
     BOM_SAVE(79401, "产品编号+版本号已存在"),
+    REPEAT_NAME(79501, "名称重复"),
     NO_DATA(79998, "未找到数据"),
     ILLEGAL_ID(79999, "id不正确"),
 

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.controller;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.service.AddressService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -39,4 +40,9 @@ public class AddressController {
         return Result.success(addresseList);
     }
 
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = addressService.getCombo();
+        return Result.success(comboDTOList);
+    }
 }

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java

@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-23 11:39.
  */
+@CrossOrigin
 @RestController
 @RequestMapping("/customer")
 public class CustomerController {
@@ -36,6 +37,12 @@ public class CustomerController {
         return Result.success(listData);
     }
 
+    @GetMapping("/dbfind")
+    public Result getDbfind(PageRequest page, ListReqDTO listReqDTO){
+        PageInfo<CustomerList> dbfindData = customerService.getDbfind(page, listReqDTO);
+        return Result.success(dbfindData);
+    }
+
     /**
      * 获取客户资料表单
      *

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/FundinouttypeController.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.controller;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Fundinouttype;
 import com.usoftchina.saas.document.service.FundinouttypeService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -32,4 +33,10 @@ public class FundinouttypeController {
         List<Fundinouttype> fundinouttypeList = fundinouttypeService.findAll();
         return Result.success(fundinouttypeList);
     }
+
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = fundinouttypeService.getCombo();
+        return Result.success(comboDTOList);
+    }
 }

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.document.controller;
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Producttype;
 import com.usoftchina.saas.document.service.ProducttypeService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,5 +34,10 @@ public class ProducttypeController {
         return Result.success();
     }
 
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = producttypeService.getCombo();
+        return Result.success(comboDTOList);
+    }
 
 }

+ 8 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductunitController.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.controller;
 
 
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Productunit;
 import com.usoftchina.saas.document.service.ProductunitService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -10,7 +11,7 @@ import org.springframework.web.bind.annotation.*;
 import java.util.List;
 
 @RestController
-@RequestMapping("/productUnit")
+@RequestMapping("/productunit")
 public class ProductunitController {
 
     @Autowired
@@ -34,4 +35,10 @@ public class ProductunitController {
         return Result.success(productunitList);
     }
 
+    @GetMapping("/getCombo")
+    public Result getCombo(){
+        List<ComboDTO> comboDTOList = productunitService.getCombo();
+        return Result.success(comboDTOList);
+    }
+
 }

+ 7 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/AddressMapper.java

@@ -1,7 +1,10 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Address;
+import org.apache.ibatis.annotations.Param;
+
 import java.util.List;
 
 public interface AddressMapper extends CommonBaseMapper<Address> {
@@ -21,4 +24,8 @@ public interface AddressMapper extends CommonBaseMapper<Address> {
     int updateByPrimaryKey(Address record);
 
     int deleteByIds(String ids);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

+ 1 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerListMapper.java

@@ -8,4 +8,5 @@ import java.util.List;
 public interface CustomerListMapper {
     List<CustomerList> selectCustomerListByCondition(@Param("con") String con, @Param("companyId") Long companyId);
     List<CustomerList> selectCustomerBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+    List<CustomerList> selectDbFind(@Param("condition") String condition, @Param("companyId") Long companyId);
 }

+ 8 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/FundinouttypeMapper.java

@@ -2,7 +2,11 @@ package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Fundinouttype;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface FundinouttypeMapper extends CommonBaseMapper<Fundinouttype> {
     int deleteByPrimaryKey(Long ft_id);
@@ -16,4 +20,8 @@ public interface FundinouttypeMapper extends CommonBaseMapper<Fundinouttype> {
     int updateByPrimaryKeySelective(Fundinouttype record);
 
     int updateByPrimaryKey(Fundinouttype record);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java

@@ -22,4 +22,6 @@ public interface ProductbrandMapper extends CommonBaseMapper<Productbrand> {
     int updateByPrimaryKey(Productbrand record);
 
     List<ComboDTO> getCombo(@Param("companyId") Long companyId);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
 }

+ 8 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProducttypeMapper.java

@@ -1,7 +1,11 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Producttype;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface ProducttypeMapper extends CommonBaseMapper<Producttype> {
     int deleteByPrimaryKey(Long id);
@@ -15,4 +19,8 @@ public interface ProducttypeMapper extends CommonBaseMapper<Producttype> {
     int updateByPrimaryKeySelective(Producttype record);
 
     int updateByPrimaryKey(Producttype record);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

+ 8 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductunitMapper.java

@@ -1,7 +1,11 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Productunit;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface ProductunitMapper extends CommonBaseMapper<Productunit> {
     int deleteByPrimaryKey(Long pu_id);
@@ -15,4 +19,8 @@ public interface ProductunitMapper extends CommonBaseMapper<Productunit> {
     int updateByPrimaryKeySelective(Productunit record);
 
     int updateByPrimaryKey(Productunit record);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    List<ComboDTO> getCombo(@Param("companyId") Long companyId);
 }

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorkindMapper.java

@@ -22,4 +22,6 @@ public interface VendorkindMapper extends CommonBaseMapper<Vendorkind> {
     int updateByPrimaryKey(Vendorkind record);
 
     List<ComboDTO> getCombo(@Param("companyId") Long companyId);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
 }

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java

@@ -32,4 +32,6 @@ public interface WarehouseMapper extends CommonBaseMapper<Warehouse> {
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
     List<Warehouse> selectWarehouseListByCondition(@Param("con") String con,@Param("companyId") Long companyId);
+
+    int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId);
 }

+ 4 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/AddressService.java

@@ -1,11 +1,15 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.mapper.AddressMapper;
 
+import java.util.List;
+
 public interface AddressService extends CommonBaseService<AddressMapper, Address>  {
 
     void removeByIds(String ids);
 
+    List<ComboDTO> getCombo();
 }

+ 4 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java

@@ -11,6 +11,8 @@ import com.usoftchina.saas.document.entities.CustomerList;
 import com.usoftchina.saas.document.mapper.CustomerMapper;
 import com.usoftchina.saas.page.PageRequest;
 
+import java.util.List;
+
 /**
  * Created by zdw
  * 2018-10-23 15:26.
@@ -37,4 +39,6 @@ public interface CustomerService extends CommonBaseService<CustomerMapper, Custo
     void batchClose(BatchDealBaseDTO baseDTOs);
 
     void batchOpen(BatchDealBaseDTO baseDTOs);
+
+    PageInfo<CustomerList> getDbfind(PageRequest page, ListReqDTO listReqDTO);
 }

+ 5 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/FundinouttypeService.java

@@ -1,9 +1,14 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Fundinouttype;
 import com.usoftchina.saas.document.mapper.FundinouttypeMapper;
 
+import java.util.List;
+
 public interface FundinouttypeService extends CommonBaseService<FundinouttypeMapper, Fundinouttype> {
 
+    List<ComboDTO> getCombo();
+
 }

+ 5 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProducttypeService.java

@@ -1,9 +1,14 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Producttype;
 import com.usoftchina.saas.document.mapper.ProducttypeMapper;
 
+import java.util.List;
+
 public interface ProducttypeService extends CommonBaseService<ProducttypeMapper, Producttype> {
 
+    List<ComboDTO> getCombo();
+
 }

+ 5 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductunitService.java

@@ -1,9 +1,14 @@
 package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.entities.Productunit;
 import com.usoftchina.saas.document.mapper.ProductunitMapper;
 
+import java.util.List;
+
 public interface ProductunitService extends CommonBaseService<ProductunitMapper, Productunit> {
 
+    List<ComboDTO> getCombo();
+
 }

+ 32 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/AddressServiceImpl.java

@@ -2,14 +2,20 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.mapper.AddressMapper;
 import com.usoftchina.saas.document.service.AddressService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+import java.util.List;
+
 @Service
 public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Address> implements AddressService {
 
@@ -29,10 +35,18 @@ public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Add
     public boolean save(Address address){
         if(address.getId() == 0){
             address.setCompanyId(BaseContextHolder.getCompanyId());
+            address.setCreateTime(new Date());
+            address.setCreatorId(BaseContextHolder.getUserId());
+            //验证名称是否重复
+            validName(address.getAd_address());
             addressMapper.insertSelective(address);
             //记录LOG
             messageLogService.save(generateMsgObj(address.getId()));
         }else{
+            address.setUpdaterId(BaseContextHolder.getUserId());
+            address.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(address.getAd_address());
             addressMapper.updateByPrimaryKeySelective(address);
             //记录LOG
             messageLogService.update(generateMsgObj(address.getId()));
@@ -65,7 +79,25 @@ public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Add
         }
     }
 
+    @Override
+    public List<ComboDTO> getCombo() {
+       return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
+
     private DocBaseDTO generateMsgObj(Long id){
         return new DocBaseDTO(id, "", "Address");
     }
+
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
 }

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

@@ -331,6 +331,22 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         }
     }
 
+    @Override
+    public PageInfo<CustomerList> getDbfind(PageRequest page, ListReqDTO listReqDTO) {
+        //设置默认分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //查询数据
+        List<CustomerList> lists = customerListMapper.selectDbFind(listReqDTO.getFinalCondition(), BaseContextHolder.getCompanyId());
+        //取分页信息
+        PageInfo<CustomerList> pageInfo = new PageInfo<CustomerList>(lists);
+        return pageInfo;
+    }
+
 
     private List<CustomerList> getListByMode(ListReqDTO req) {
         List<CustomerList> list = null;

+ 31 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/FundinouttypeServiceImpl.java

@@ -2,15 +2,19 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.Messagelog;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Fundinouttype;
 import com.usoftchina.saas.document.mapper.FundinouttypeMapper;
 import com.usoftchina.saas.document.service.FundinouttypeService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -28,10 +32,20 @@ public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<Fundinouttyp
     public boolean save(Fundinouttype fundinouttype){
         if(fundinouttype.getId() == 0){
             fundinouttype.setCompanyId(BaseContextHolder.getCompanyId());
+            fundinouttype.setCreatorId(BaseContextHolder.getUserId());
+            fundinouttype.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(fundinouttype.getFt_name());
+
             getMapper().insertSelective(fundinouttype);
             //记录LOG
             messageLogService.save(generateMsgObj(fundinouttype.getId()));
         }else{
+            fundinouttype.setUpdaterId(BaseContextHolder.getUserId());
+            fundinouttype.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(fundinouttype.getFt_name());
+
             getMapper().updateByPrimaryKeySelective(fundinouttype);
             //记录LOG
             messageLogService.update(generateMsgObj(fundinouttype.getId()));
@@ -58,4 +72,21 @@ public class FundinouttypeServiceImpl extends CommonBaseServiceImpl<Fundinouttyp
         return new DocBaseDTO(id, null, "FundInOutType");
     }
 
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
+
+    @Override
+    public List<ComboDTO> getCombo() {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
 }

+ 26 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java

@@ -4,13 +4,16 @@ import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Productbrand;
 import com.usoftchina.saas.document.mapper.ProductbrandMapper;
 import com.usoftchina.saas.document.service.ProductbrandService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -27,11 +30,21 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
     public boolean save(Productbrand productbrand){
         productbrand.setCompanyId(BaseContextHolder.getCompanyId());
         if(productbrand.getId() == 0){
+            productbrand.setCompanyId(BaseContextHolder.getCompanyId());
+            productbrand.setCreatorId(BaseContextHolder.getUserId());
+            productbrand.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(productbrand.getPb_name());
+
             productbrandMapper.insertSelective(productbrand);
             //记录日志
             DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
             messageLogService.save(docBaseDTO);
         }else{
+            productbrand.setUpdaterId(BaseContextHolder.getUserId());
+            productbrand.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(productbrand.getPb_name());
             productbrandMapper.updateByPrimaryKeySelective(productbrand);
             //记录日志
             DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
@@ -53,4 +66,17 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
     public List<ComboDTO> getCombo() {
         return getMapper().getCombo(BaseContextHolder.getCompanyId());
     }
+
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
 }

+ 29 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProducttypeServiceImpl.java

@@ -2,14 +2,18 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Producttype;
 import com.usoftchina.saas.document.mapper.ProducttypeMapper;
 import com.usoftchina.saas.document.service.ProducttypeService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -29,10 +33,18 @@ public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMap
     public boolean save(Producttype producttype){
         if(producttype.getId() == 0){
             producttype.setCompanyId(BaseContextHolder.getCompanyId());
+            producttype.setCreatorId(BaseContextHolder.getUserId());
+            producttype.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(producttype.getPt_name());
             producttypeMapper.insertSelective(producttype);
             //记录LOG
             messageLogService.save(generateMsgObj(producttype.getId()));
         }else{
+            producttype.setUpdaterId(BaseContextHolder.getUserId());
+            producttype.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(producttype.getPt_name());
             producttypeMapper.updateByPrimaryKeySelective(producttype);
             //记录LOG
             messageLogService.update(generateMsgObj(producttype.getId()));
@@ -64,4 +76,21 @@ public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMap
         return new DocBaseDTO(id, "", "ProductType");
     }
 
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
+
+    @Override
+    public List<ComboDTO> getCombo() {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
 }

+ 30 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductunitServiceImpl.java

@@ -2,14 +2,18 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Productunit;
 import com.usoftchina.saas.document.mapper.ProductunitMapper;
 import com.usoftchina.saas.document.service.ProductunitService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -22,10 +26,19 @@ public class ProductunitServiceImpl extends CommonBaseServiceImpl<ProductunitMap
     public boolean save(Productunit productunit){
         if(productunit.getId() == 0){
             productunit.setCompanyId(BaseContextHolder.getCompanyId());
+            productunit.setCreatorId(BaseContextHolder.getUserId());
+            productunit.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(productunit.getPu_name());
+
             getMapper().insertSelective(productunit);
             //记录LOG
             messageLogService.save(generateMsgObj(productunit.getId()));
         }else{
+            productunit.setUpdaterId(BaseContextHolder.getUserId());
+            productunit.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(productunit.getPu_name());
             getMapper().updateByPrimaryKeySelective(productunit);
             //记录LOG
             messageLogService.update(generateMsgObj(productunit.getId()));
@@ -58,4 +71,21 @@ public class ProductunitServiceImpl extends CommonBaseServiceImpl<ProductunitMap
         return new DocBaseDTO(id, "", "ProductUnit");
     }
 
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
+
+    @Override
+    public List<ComboDTO> getCombo() {
+        return getMapper().getCombo(BaseContextHolder.getCompanyId());
+    }
 }

+ 24 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorkindServiceImpl.java

@@ -4,13 +4,16 @@ import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Vendorkind;
 import com.usoftchina.saas.document.mapper.VendorkindMapper;
 import com.usoftchina.saas.document.service.VendorkindService;
+import com.usoftchina.saas.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -25,10 +28,18 @@ public class VendorkindServiceImpl extends CommonBaseServiceImpl<VendorkindMappe
     public boolean save(Vendorkind vendorkind){
         if(vendorkind.getId() == 0){
             vendorkind.setCompanyId(BaseContextHolder.getCompanyId());
+            vendorkind.setCreatorId(BaseContextHolder.getUserId());
+            vendorkind.setCreateTime(new Date());
+            //验证名称是否重复
+            validName(vendorkind.getVk_name());
             vendorkindMapper.insertSelective(vendorkind);
             //记录LOG
             messageLogService.save(generateMsgObj(vendorkind.getId()));
         }else{
+            vendorkind.setUpdaterId(BaseContextHolder.getUserId());
+            vendorkind.setUpdateTime(new Date());
+            //验证名称是否重复
+            validName(vendorkind.getVk_name());
             vendorkindMapper.updateByPrimaryKeySelective(vendorkind);
             //记录LOG
             messageLogService.update(generateMsgObj(vendorkind.getId()));
@@ -59,4 +70,17 @@ public class VendorkindServiceImpl extends CommonBaseServiceImpl<VendorkindMappe
     public List<ComboDTO> getCombo() {
         return getMapper().getCombo(BaseContextHolder.getCompanyId());
     }
+
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
 }

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

@@ -107,6 +107,8 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
             record.setCreatorId(BaseContextHolder.getUserId());
             record.setCreateTime(new Date());
 
+            //验证名称是否重复
+            validName(record.getWh_description());
             count = getMapper().insertSelective(record);
             //记录LOG
             docBaseDTO = generateMsgObj(record.getId(), code);
@@ -114,6 +116,8 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
         }else{
             record.setUpdateTime(new Date());
             record.setUpdaterId(BaseContextHolder.getUserId());
+            //验证名称是否重复
+            validName(record.getWh_description());
 
             getMapper().updateByPrimaryKeySelective(record);
             //记录LOG
@@ -221,4 +225,17 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
                 getMapper().validateCodeWhenUpdate(code, id, companyId);
         return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.WAREHOUSE.getCaller()).getData();
     }
+
+    /**
+     * 校验
+     * @param name
+     * @return
+     */
+    private boolean validName(String name){
+        int count = getMapper().selectCountByName(name, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.REPEAT_NAME);
+        }
+        return true;
+    }
 }

+ 14 - 2
applications/document/document-server/src/main/resources/mapper/AddressMapper.xml

@@ -25,6 +25,9 @@
   </sql>
 
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Address">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into address (ad_recorddate, companyId,
       updaterId, updateTime, ad_text1, 
       ad_text2, ad_text3, ad_text4, 
@@ -35,6 +38,9 @@
       #{ad_text5,jdbcType=VARCHAR}, #{ad_address,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Address">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into address
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="ad_recorddate != null">
@@ -135,7 +141,7 @@
         ad_address = #{ad_address,jdbcType=LONGVARCHAR},
       </if>
     </set>
-    where ad_id = #{ad_id,jdbcType=INTEGER}
+    where ad_id = #{id}
   </update>
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Address">
     update address
@@ -164,7 +170,7 @@
       ad_text5 = #{ad_text5,jdbcType=VARCHAR}
     where ad_id = #{id}
   </update>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from address
     where ad_id = #{id}
   </delete>
@@ -175,4 +181,10 @@
   <select id="selectAll" resultMap="ResultMapWithBLOBs">
     SELECT * FROM ADDRESS
   </select>
+  <select id="selectCountByName" resultType="int">
+    SELECT * FROM ADDRESS WHERE AD_ADDRESS=#{name} ADN COMPANYID=#{companyId}
+  </select>
+    <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT AD_ADDRESS display,AD_ADDRESS value FROM ADDRESS WHERE COMPANYID=#{companyId}
+    </select>
 </mapper>

+ 13 - 0
applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml

@@ -63,6 +63,19 @@
     </where>  order by cu_id
   </select>
 
+  <select id="selectDbFind" resultMap="BaseResultMap">
+    SELECT * FROM CUSTOMER LEFT JOIN CUSTOMERADDRESS ON CU_ID=CA_CUID AND CUSTOMERADDRESS.CA_DEFAULT=1
+    <where>
+      <if test="condition != null">
+        ${condition}
+      </if>
+      <if test="companyId!=null">
+        and customer.companyid = #{companyId}
+      </if>
+    </where>
+    order by cu_id
+  </select>
+
   <select id="selectCustomerBycondition"  resultMap="BaseResultMap">
     select  *  from customer
     <where>

+ 2 - 2
applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml

@@ -11,7 +11,7 @@
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
   </resultMap>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
     <include refid="Base_Column_List" />
     from customerkind
@@ -20,7 +20,7 @@
   <sql id="Base_Column_List" >
     ck_id, ck_name, ck_recordid, ck_recorder, ck_date, companyId, updaterId, updateTime
   </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from customerkind
     where ck_id = #{id}
   </delete>

+ 15 - 3
applications/document/document-server/src/main/resources/mapper/FundinouttypeMapper.xml

@@ -20,13 +20,16 @@
     select 
     <include refid="Base_Column_List" />
     from fundinouttype
-    where ft_id = #{id,jdbcType=INTEGER}
+    where ft_id = #{id}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from fundinouttype
-    where ft_id = #{id,jdbcType=INTEGER}
+    where ft_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into fundinouttype (ft_name, ft_kind,
       ft_recordid, ft_recorder, ft_date, 
       companyId, updaterId, updateTime
@@ -37,6 +40,9 @@
       )
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Fundinouttype" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into fundinouttype
     <trim prefix="(" suffix=")" suffixOverrides="," >
       <if test="ft_name != null" >
@@ -131,9 +137,15 @@
       companyId = #{companyId,jdbcType=INTEGER},
       updaterId = #{updaterId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP}
-    where ft_id = #{id,jdbcType=INTEGER}
+    where ft_id = #{id}
   </update>
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM FUNDINOUTTYPE
   </select>
+  <select id="selectCountByName" resultType="int">
+    SELECT COUNT(*) FROM FUNDINOUTTYPE WHERE FT_NAME=#{name} AND COMPANYID=#{companyId}
+  </select>
+    <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT FT_NAME display,FT_NAME value FROM FUNDINOUTTYPE
+    </select>
 </mapper>

+ 6 - 0
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -94,6 +94,9 @@
         where pr_id = #{id}
     </delete>
     <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Product" >
+        <selectKey resultType="java.lang.Long" keyProperty="id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
         insert into product (pr_code, pr_detail,
         pr_spec, pr_unit, pr_kind,
         pr_orispeccode, pr_whid, pr_whcode,
@@ -118,6 +121,9 @@
         #{pr_text4,jdbcType=VARCHAR}, #{pr_text5,jdbcType=VARCHAR})
     </insert>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Product" >
+        <selectKey resultType="java.lang.Long" keyProperty="id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
         insert into product
         <trim prefix="(" suffix=")" suffixOverrides="," >
             <if test="pr_code != null" >

+ 11 - 2
applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml

@@ -11,7 +11,7 @@
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
   </resultMap>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
     *
     from productbrand
@@ -20,11 +20,14 @@
   <sql id="Base_Column_List" >
     pb_id, pb_name, pb_recordid, pb_recorder, pb_date, companyId, updaterId, updateTime
   </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from productbrand
     where pb_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into productbrand (pb_name, pb_recordid,
       pb_recorder, pb_date, companyId, 
       updaterId, updateTime)
@@ -33,6 +36,9 @@
       #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into productbrand
     <trim prefix="(" suffix=")" suffixOverrides="," >
       <if test="pb_name != null" >
@@ -126,4 +132,7 @@
   <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
     SELECT PB_NAME display,PB_NAME value FROM PRODUCTBRAND
   </select>
+  <select id="selectCountByName" resultType="int">
+    SELECT COUNT(*) FROM PRODUCTBRAND WHERE PB_NAME=#{name} AND COMPANYID=#{companyId}
+  </select>
 </mapper>

+ 14 - 2
applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml

@@ -14,17 +14,20 @@
   <sql id="Base_Column_List">
     pt_id, pt_name, pt_recordid, pt_recorder, pt_date, companyId, updaterId, updateTime
   </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
     from producttype
     where pt_id = #{id}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from producttype
     where pt_id = #{id}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into producttype (pt_name, pt_recordid,
       pt_recorder, pt_date, companyId, 
       updaterId, updateTime)
@@ -33,6 +36,9 @@
       #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into producttype
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="pt_name != null">
@@ -122,4 +128,10 @@
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM PRODUCTTYPE
   </select>
+    <select id="selectCountByName" resultType="int">
+        SELECT COUNT(*) FROM PRODUCTTYPE WHERE PT_NAME=#{name} AND COMPANYID=#{companyId}
+    </select>
+    <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT PT_NAME display,PT_NAME value FROM PRODUCTTYPE WHERE COMPANYID=#{companyId}
+    </select>
 </mapper>

+ 6 - 0
applications/document/document-server/src/main/resources/mapper/ProductunitMapper.xml

@@ -122,4 +122,10 @@
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM PRODUCTUNIT
   </select>
+    <select id="selectCountByName" resultType="int">
+        SELECT COUNT(*) FROM productunit WHERE PU_NAME=#{name} AND COMPANYID=#{companyId}
+    </select>
+    <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
+        SELECT PU_NAME display,PU_NAME value FROM PRODUCTUNIT WHERE COMPANYID=#{companyId}
+    </select>
 </mapper>

+ 5 - 2
applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml

@@ -14,13 +14,13 @@
   <sql id="Base_Column_List">
     vk_id, vk_name, vk_recordid, vk_recorder, vk_date, companyId, updaterId, updateTime
   </sql>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />
     from vendorkind
     where vk_id = #{id}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     delete from vendorkind
     where vk_id = #{id}
   </delete>
@@ -131,4 +131,7 @@
   <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
     SELECT VK_NAME display, VK_NAME value FROM VENDORKIND WHERE COMPANYID=#{companyId}
   </select>
+  <select id="selectCountByName" resultType="int">
+    SELECT COUNT(*) FROM VENDORKIND WHERE VK_NAME=#{name} AND COMPANYID=#{companyId}
+  </select>
 </mapper>

+ 5 - 2
applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml

@@ -8,7 +8,7 @@
         <result column="wh_description" property="wh_description" jdbcType="VARCHAR" />
         <result column="wh_statuscode" property="wh_statuscode" jdbcType="VARCHAR" />
         <result column="wh_status" property="wh_status" jdbcType="TIMESTAMP" />
-        <result column="wh_recordid" property="wh_recordid" jdbcType="INTEGER" />
+        <result column="wh_recordid" property="wh_recorderid" jdbcType="INTEGER" />
         <result column="wh_recorder" property="wh_recorder" jdbcType="INTEGER" />
         <result column="wh_date" property="wh_date" jdbcType="INTEGER" />
         <result column="companyId" property="companyId" jdbcType="INTEGER" />
@@ -316,7 +316,7 @@
         select count(*) from WAREHOUSE where WH_CODE = #{code} and WH_ID != #{id} and companyId =#{companyId}
     </select>
 
-    <select id="selectWarehouseListByCondition">
+    <select id="selectWarehouseListByCondition" resultMap="WarehouseResultMapper">
         select  *  from warehouse
         <where>
             <if test="con != null">
@@ -329,6 +329,9 @@
         order by wh_id
     </select>
 
+    <select id="selectCountByName" resultType="int">
+        SELECT COUNT(*) FROM warehouse WHERE wh_description=#{name} AND COMPANYID=#{companyId}
+    </select>
 
 </mapper>
 

+ 58 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/mapper/WarehouseMapperTest.java

@@ -0,0 +1,58 @@
+package com.usoftchina.saas.document.mapper;
+
+import org.junit.Test;
+
+/**
+ * Created by zdw
+ * 2018-10-30 14:00.
+ */
+public class WarehouseMapperTest {
+    @Test
+    public void post() throws Exception {
+    }
+
+    @Test
+    public void validPeriod() throws Exception {
+    }
+
+    @Test
+    public void deleteByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void insert() throws Exception {
+    }
+
+    @Test
+    public void insertSelective() throws Exception {
+    }
+
+    @Test
+    public void selectByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void updateByPrimaryKeySelective() throws Exception {
+    }
+
+    @Test
+    public void updateByPrimaryKey() throws Exception {
+    }
+
+    @Test
+    public void unPost() throws Exception {
+    }
+
+    @Test
+    public void validateCodeWhenInsert() throws Exception {
+    }
+
+    @Test
+    public void validateCodeWhenUpdate() throws Exception {
+    }
+
+    @Test
+    public void selectWarehouseListByCondition() throws Exception {
+    }
+
+}

+ 13 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/VerificationController.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.money.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.dto.VerificationFormDTO;
@@ -106,4 +107,16 @@ public class VerificationController {
         verificationService.resAudit(id);
         return Result.success();
     }
+
+    @RequestMapping("/batchAudit")
+    public Result batchAudit(@RequestBody  BatchDealBaseDTO body) {
+        verificationService.batchAudit(body);
+        return Result.success();
+    }
+
+    @RequestMapping("/batchUnAudit")
+    public Result batchUnAudit(@RequestBody BatchDealBaseDTO body) {
+        verificationService.batchUnAudit(body);
+        return Result.success();
+    }
 }

+ 13 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/VerificationService.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.money.service;
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.dto.VerificationFormDTO;
@@ -69,4 +70,16 @@ public interface VerificationService {
      */
     void resAudit(Long id);
 
+    /**
+     * 批量审核核销单
+     * @param formData
+     * @return
+     */
+    void batchAudit(BatchDealBaseDTO baseDTO);
+
+    /**
+     * 批量反审核核销单
+     * @param id
+     */
+    void batchUnAudit(BatchDealBaseDTO baseDTO);
 }

+ 30 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
@@ -29,6 +30,7 @@ import org.springframework.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.Iterator;
 import java.util.List;
 
 @Service
@@ -294,6 +296,34 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         messageLogService.unAudit(baseDTO);
     }
 
+    @Override
+    public void batchAudit(BatchDealBaseDTO baseDTO) {
+        Iterator isList = baseDTO.getBaseDTOs().iterator();
+        while (isList.hasNext()){
+            DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
+            Long id = docBaseDTO.getId();
+            Verification verification = new Verification();
+            verification.setVc_status(Status.AUDITED.getDisplay());
+            verification.setVc_statuscode(Status.AUDITED.name());
+            verification.setVc_id(Integer.valueOf(String.valueOf(id)));
+            verificationMapper.updateByPrimaryKeySelective(verification);
+        }
+    }
+
+    @Override
+    public void batchUnAudit(BatchDealBaseDTO baseDTO) {
+        Iterator isList = baseDTO.getBaseDTOs().iterator();
+        while (isList.hasNext()){
+            DocBaseDTO docBaseDTO = (DocBaseDTO) isList.next();
+            Long id = docBaseDTO.getId();
+            Verification verification = new Verification();
+            verification.setVc_status(Status.UNAUDITED.getDisplay());
+            verification.setVc_statuscode(Status.UNAUDITED.name());
+            verification.setVc_id(Integer.valueOf(String.valueOf(id)));
+            verificationMapper.updateByPrimaryKeySelective(verification);
+        }
+    }
+
     private String pushMaxnubmer(String code, Long id) {
         if (null == code) {
             throw new BizException(BizExceptionCode.NULL_CODE);

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

@@ -31,7 +31,7 @@
     select 
     <include refid="Base_Column_List" />
     from recbalancedetail
-    where rd_rbid = #{id,jdbcType=INTEGER}
+    where rbd_rbid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from recbalancedetail

+ 52 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java

@@ -0,0 +1,52 @@
+package com.usoftchina.saas.sale.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+
+import java.nio.charset.Charset;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+
+/**
+ * @author: guq
+ * @create: 2018-10-30 11:20
+ **/
+
+@Configuration
+public class WebConfig extends WebMvcConfigurationSupport{
+    @Bean
+    public HttpMessageConverter<String> responseBodyConverter() {
+        StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
+        return converter;
+    }
+
+    @Bean
+    public MappingJackson2HttpMessageConverter MappingJacksonHttpMessageConverter(){
+        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
+        converter.setObjectMapper(objectMapper);
+        return converter;
+    }
+
+    @Override
+    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+        super.configureMessageConverters(converters);
+        converters.add(responseBodyConverter());
+        converters.add(MappingJacksonHttpMessageConverter());
+    }
+
+    @Override
+    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
+        configurer.favorPathExtension(false);
+    }
+
+}
+

+ 20 - 8
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java

@@ -91,12 +91,16 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         prodInOut.setCompanyId(companyId);
         prodInOut.setCreatorId(userId);
         prodInOut.setCreateTime(new Date());
-        prodInOut.setPi_date(new Date());
+        prodInOut.setPi_recordmanid(userId);
+        prodInOut.setPi_recorddate(new Date());
+        prodInOut.setPi_recordman("TESTADMIN");
 
+        if(prodInOut.getPi_date() == null){
+            prodInOut.setPi_date(new Date());
+        }
         //编号获取
         pi_inoutno = pushMaxnubmer(prodInOut);
         prodInOut.setPi_inoutno(pi_inoutno);
-
         prodInOut.setPi_class(main.getPi_class());
         prodInOut.setPi_said(main.getPi_said());
         prodInOut.setPi_sacode(main.getPi_sacode());
@@ -112,6 +116,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 detail.setPd_piid(pi_id);
                 detail.setPd_inoutno(pi_inoutno);
                 detail.setPd_piclass(pi_class);
+                detail.setCompanyId(companyId);
+                detail.setCreateTime(new Date());
                 detail.setPd_yqty(0.0);
                 insertDetails.add(detail);
             }
@@ -394,10 +400,17 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         String piInoutno =
                 //BillCodeSeq.SALEIN.getCaller() + Math.abs(Math.random()*100);
                 maxnumberService.getMaxnumber(BillCodeSeq.SALEIN.getCaller(),true).getData();
+        //设置公司id
+        targetPi.setCompanyId(sourcePi.getCompanyId());
+        targetPi.setCreateTime(new Date());
+        targetPi.setCreatorId(BaseContextHolder.getUserId());
+        targetPi.setPi_recordmanid(BaseContextHolder.getUserId());
+        targetPi.setPi_recorddate(new Date());
+        targetPi.setPi_recordman("TESTADMIN");
+
         targetPi.setPi_inoutno(piInoutno);
         targetPi.setPi_class(BillCodeSeq.SALEIN.getName());
         targetPi.setPi_date(new Date());
-        targetPi.setPi_recorddate(new Date());
         targetPi.setPi_status(Status.UNAUDITED.getDisplay());
         targetPi.setPi_statuscode(Status.UNAUDITED.name());
         //客户信息
@@ -406,9 +419,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_custname(sourcePi.getPi_custname());
         targetPi.setPi_said(sourcePi.getPi_said());
         targetPi.setPi_sacode(sourcePi.getPi_sacode());
-
-        //设置公司id
-        targetPi.setCompanyId(sourcePi.getCompanyId());
         //保存数据
         getMapper().insertSelective(targetPi);
         //插入销售退货单从表
@@ -419,6 +429,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             pdOutqty = sourcePid.getPd_outqty()==null?0.0:sourcePid.getPd_outqty();
             pdYqty = sourcePid.getPd_yqty()==null?0.0:sourcePid.getPd_yqty();
             if(pdOutqty-pdYqty>0){
+                //公司id
+                targetPid.setCompanyId(sourcePid.getCompanyId());
+                targetPid.setCreateTime(new Date());
                 targetPid.setPd_piid(pi_id);
                 targetPid.setPd_inoutno(piInoutno);
                 targetPid.setPd_piclass(BillCodeSeq.SALEIN.getName());
@@ -436,8 +449,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 targetPid.setPd_unit(sourcePid.getPd_unit());
                 targetPid.setPd_ioid(sourcePid.getId());
                 targetPid.setPd_status(0);
-                //公司id
-                targetPid.setCompanyId(sourcePid.getCompanyId());
+
                 //本次转单数
                 targetPid.setPd_inqty(pdOutqty-pdYqty);
                 prodIODetailMapper.insertSelective(targetPid);

+ 2 - 2
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -439,7 +439,7 @@ public class SaleServiceImpl implements SaleService{
         String pi_inoutno = maxnumberService.getMaxnumber(BillCodeSeq.SALEOUT.getCaller(),
                 true).getData();
         prodInOut.setPi_inoutno(pi_inoutno);
-        prodInOut.setPi_class("出货单");
+        prodInOut.setPi_class(BillCodeSeq.SALEOUT.getName());
         prodInOut.setPi_date(new Date());
         prodInOut.setPi_status(Status.UNAUDITED.getDisplay());
         prodInOut.setPi_statuscode(Status.UNAUDITED.name());
@@ -461,7 +461,7 @@ public class SaleServiceImpl implements SaleService{
             ProdIODetail prodIODetail = new ProdIODetail();
             prodIODetail.setPd_piid(pi_id);
             prodIODetail.setPd_inoutno(pi_inoutno);
-            prodIODetail.setPd_piclass("出货单");
+            prodIODetail.setPd_piclass(BillCodeSeq.SALEOUT.getName());
             prodIODetail.setPd_pdno(i);
             prodIODetail.setPd_orderid(sale.getId());
             prodIODetail.setPd_ordercode(sale.getSa_code());

+ 11 - 11
applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -41,7 +41,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-    <association property="productDTO" javaType="com.usoftchina.saas.document.entities.Product">
+    <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
       <result column="pr_detail" property="pr_detail"/>
@@ -739,16 +739,16 @@
 
   <update id="updateSaleOutYqty" parameterType="long">
 update prodiodetail
-  set a.pd_yqty =ifnull((select  b.pd_inqty  from  (select pi_said,sum(pd_inqty) pd_inqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售退货单'
-and pi_said=#{id}  GROUP BY pd_ioid) b where ifnull(b.pd_ioid ,0)= a.pd_id ),0)
+  set a.pd_yqty =IFNULL((select  b.pd_inqty  from  (select pi_said,sum(pd_inqty) pd_inqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售退货单'
+and pi_said=#{id}  GROUP BY pd_ioid) b where IFNULL(b.pd_ioid ,0)= a.pd_id ),0)
 where a.pd_piid = (select pi_id from prodinout where pi_said=#{id} and pi_class='销售出货单')
   </update>
   <update id="updateSaleYqty" parameterType="long">
     update saledtail
-    set a.sd_yqty =ifnull((
+    set a.sd_yqty =IFNULL((
     select  b.pd_ounqty  from  (select pi_said,sum(pd_outqty) pd_outqty
       from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售出货单'
-      and pi_said=#{id}  GROUP BY pi_said) b where ifnull(b.pd_ioid ,0)= a.pd_id
+      and pi_said=#{id}  GROUP BY pi_said) b where IFNULL(b.pd_ioid ,0)= a.pd_id
       ),0)
     where a.sd_said = #{id}
   </update>
@@ -760,16 +760,16 @@ where a.pd_piid = (select pi_id from prodinout where pi_said=#{id} and pi_class=
 
   <update id="updatePDSaleIN" parameterType="long">
    update prodiodetail set
-   pd_total=ifnull(pd_inqty,0)*ifnull(pd_orderprice,0),
-   pd_netprice = ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100),
-   pd_nettotal = (ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100))*ifnull(pd_inqty)
+   pd_total=IFNULL(pd_inqty,0)*IFNULL(pd_orderprice,0),
+   pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
+   pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_inqty,0)
    where pd_piid=#{id}
   </update>
   <update id="updatePDSaleOut" parameterType="long">
     update prodiodetail set
-    pd_total=ifnull(pd_outqty,0)*ifnull(pd_orderprice,0),
-    pd_netprice = ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100),
-    pd_nettotal = (ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100))*ifnull(pd_outqty)
+    pd_total=IFNULL(pd_outqty,0)*IFNULL(pd_orderprice,0),
+    pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
+    pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0)
     where pd_piid=#{id}
   </update>
 </mapper>

+ 1 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -34,6 +34,7 @@
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+    <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />

+ 1 - 0
applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml

@@ -16,6 +16,7 @@
     <result column="sd_delivery" property="sd_delivery" jdbcType="TIMESTAMP" />
     <result column="sd_sendqty" property="sd_sendqty" jdbcType="DOUBLE" />
     <result column="sd_pdqty" property="sd_pdqty" jdbcType="DOUBLE" />
+    <result column="sd_yqty" property="sd_yqty" jdbcType="DOUBLE" />
     <result column="sd_remark" property="sd_remark" jdbcType="VARCHAR" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />

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

@@ -43,7 +43,7 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

+ 1 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java

@@ -41,7 +41,7 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

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

@@ -37,7 +37,7 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

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

@@ -40,7 +40,7 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

+ 0 - 1
frontend/saas-web/app/util/BaseUtil.js

@@ -15,7 +15,6 @@ Ext.define('saas.util.BaseUtil', {
                 'Access-Control-Allow-Origin': '*',
                 "Content-Type": 'application/json;charset=UTF-8' 
             };
-
         return new Ext.Promise(function (resolve, reject) {
             Ext.Ajax.request({
                 url: url,

+ 3 - 0
frontend/saas-web/app/view/core/form/RemoteCombo.js

@@ -4,6 +4,8 @@
 Ext.define('saas.view.core.form.RemoteCombo', {
     extend: 'Ext.form.field.ComboBox',
     alias: 'widget.remotecombo',
+    displayField: 'display',
+    valueField: 'value',
     queryMode: 'local',//只在组件加载的时候请求一次
     initComponent: function() {
         var me = this;
@@ -34,6 +36,7 @@ Ext.define('saas.view.core.form.RemoteCombo', {
         var me = this,
             picker,
             pickerCfg = Ext.apply({
+                hiddenBtn:me.hiddenBtn,
                 xtype: 'boundlistadd',
                 id: me.id + '-picker',
                 pickerField: me,

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

@@ -255,6 +255,7 @@ Ext.define('saas.view.core.view.BoundListAdd', {
             id: me.id + '-toolbar',
             border: true,
             ownerCt: me,
+            hidden:me.hiddenBtn,
             items:[{
                 text:'新增',
                 handler:me.addHandler,

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

@@ -150,13 +150,13 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 bind: '{' + statusCodeField + '}',
                 get: function(value) {
                     viewModel.set(statusField, value == 'OPEN' ? '已开启' : '已关闭');
-                    return value == 'OPEN' ? '已关闭' : '已开启'
+                    return value == 'OPEN' ? '禁用' : '启用'
                 }
             };
             viewModel.setFormulas(o);
             viewModel.set(statusCodeField, "OPEN");
         }else {
-            viewModel.set('auditBtnText', "已关闭");
+            viewModel.set('auditBtnText', "禁用");
         }
     }
 });

+ 1 - 0
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -6,6 +6,7 @@ Ext.define('saas.view.document.customer.BasePanel', {
     viewModel: 'document-customer-basepanel',
 
     searchField:[{
+        hiddenBtn:true,
         xtype : "remotecombo", 
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 

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

@@ -348,13 +348,13 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 bind: '{' + statusCodeField + '}',
                 get: function(value) {
                     viewModel.set(statusField, value == 'OPEN' ? '已开启' : '已关闭');
-                    return value == 'OPEN' ? '已关闭' : '已开启'
+                    return value == 'OPEN' ? '禁用' : '启用'
                 }
             };
             viewModel.setFormulas(o);
             viewModel.set(statusCodeField, "OPEN");
         }else {
-            viewModel.set('auditBtnText', "已关闭");
+            viewModel.set('auditBtnText', "禁用");
         }
     }
 });

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

@@ -96,6 +96,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 allowBlank:false,
                 fieldLabel:'类型'
             }]
+        },  
+        productunit:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'pu_name',
+                allowBlank:false,
+                fieldLabel:'计量单位'
+            }]
         },
         inoutkind:{
             items:[{
@@ -108,6 +119,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 fieldLabel:'类型'
             }]
         },
+        address:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'ad_address',
+                allowBlank:false,
+                fieldLabel:'地址详情'
+            }]
+        },
         warehouse:{
             items:[{
                 xtype:'hidden',
@@ -167,6 +189,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
     onSave:function(){
         var belong = this.belong;
         var form=this.down('form');
+        var combo = this._combo;
         var params = {};
         var names = belong.columns.map(column => column.dataIndex);
         Ext.Array.each(names,function(name) {
@@ -192,6 +215,9 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 if(grid){
                     grid.store.load();
                 }
+                if(combo){
+                    combo.store.load();
+                }
                 form.ownerCt.close();
             }
         })

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

@@ -10,6 +10,9 @@ Ext.define('saas.view.document.kind.Kind', {
     viewModel: {
         type: 'document-kind'
     },
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
     defaultType:'',
     requires: [
         'Ext.button.Segmented'
@@ -92,7 +95,7 @@ Ext.define('saas.view.document.kind.Kind', {
             keyField:'id',
             reqUrl:'/api/document/producttype/save',
             delUrl:'/api/document/producttype/delete'
-        },
+        }, 
         productbrand:{
             columns: [{
                 text: '物料品牌',
@@ -103,6 +106,16 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl:'/api/document/productbrand/save',
             delUrl:'/api/document/productbrand/delete'
         },
+        productunit:{
+            columns: [{
+                text: '计量单位',
+                dataIndex: 'pu_name',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl:'/api/document/productunit/save',
+            delUrl:'/api/document/productunit/delete'
+        },
         bankinformation:{
             columns: [{
                 text: '账户编号',
@@ -144,6 +157,16 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl: '/api/document/fundinouttype/save',
             delUrl: '/api/document/fundinouttype/delete'
         },
+        address:{
+            columns: [{
+                text: '地址名称',
+                dataIndex: 'ad_address',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl: '/api/document/address/save',
+            delUrl: '/api/document/address/delete'
+        },
         warehouse:{
             columns: [{
                 text: '仓库编号',

+ 39 - 0
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -149,6 +149,45 @@ Ext.define('saas.view.document.kind.KindModel', {
             },
             pageSize: null,
             autoLoad: false
+        },
+        address: {
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'ad_address',  type: 'string'},
+                {name: 'ad_recorddate',  type: 'date'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/address/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: false
+        },
+        productunit: {
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'pu_name',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/productunit/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: false
         }
     }
 });

+ 25 - 0
frontend/saas-web/app/view/document/other/Address.js

@@ -0,0 +1,25 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.other.Address', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'other-address',
+    autoScroll: true,
+    layout:'fit',
+    defaultType:'address',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }]
+})
+
+

+ 25 - 0
frontend/saas-web/app/view/document/other/ProductUnit.js

@@ -0,0 +1,25 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.other.ProductUnit', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'other-productunit',
+    autoScroll: true,
+    layout:'fit',
+    defaultType:'productunit',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }]
+})
+
+

+ 1 - 0
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -6,6 +6,7 @@ Ext.define('saas.view.document.product.BasePanel', {
     viewModel: 'document-product-basepanel',
 
     searchField:[{
+        hiddenBtn:true,
         xtype : "remotecombo", 
         storeUrl: '/api/document/producttype/getCombo',
         name : "pr_type", 

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

@@ -222,13 +222,13 @@ Ext.define('saas.view.document.product.FormPanel', {
                 bind: '{' + statusCodeField + '}',
                 get: function(value) {
                     viewModel.set(statusField, value == 'OPEN' ? '已开启' : '已关闭');
-                    return value == 'OPEN' ? '已关闭' : '已开启'
+                    return value == 'OPEN' ? '禁用' : '启用'
                 }
             };
             viewModel.setFormulas(o);
             viewModel.set(statusCodeField, "OPEN");
         }else {
-            viewModel.set('auditBtnText', "已关闭");
+            viewModel.set('auditBtnText', "禁用");
         }
     }
 });

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

@@ -9,11 +9,8 @@ Ext.define('saas.view.document.vendor.BasePanel', {
         storeUrl:'/api/document/vendorkind/getCombo',
         name : "ve_type", 
         emptyText : "请选择供应商类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
         columnWidth : 0.25,
+        hiddenBtn:true,
         etc:{
             vendorkind:{
                 keyField:'id',
@@ -24,6 +21,8 @@ Ext.define('saas.view.document.vendor.BasePanel', {
         },
         addHandler:function(b){
             var form = this.ownerCmp.ownerCt.ownerCt;
+            var document = Ext.create('document-kind',{});
+            debugger
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {

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

@@ -51,24 +51,15 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         allowBlank: true,
         columnWidth: 0.25
     },{
+        editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/vendorkind/getCombo',
         name : "ve_type", 
         fieldLabel : "供应商类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            vendorkind:{
-                keyField:'id',
-                dataField:'vk_name',
-                reqUrl:'/api/document/vendorkind/save',
-                delUrl:'/api/document/vendorkind/delete'
-            }
-        },
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
@@ -76,8 +67,9 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                     title: '新增供应商类型'
                 },
                 dataKind:'vendorkind',
-                belong:this.ownerCmp.etc['vendorkind'],
+                belong:document.etc['vendorkind'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });
@@ -255,13 +247,13 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 bind: '{' + statusCodeField + '}',
                 get: function(value) {
                     viewModel.set(statusField, value == 'OPEN' ? '已开启' : '已关闭');
-                    return value == 'OPEN' ? '已关闭' : '已开启'
+                    return value == 'OPEN' ? '禁用' : '启用'
                 }
             };
             viewModel.setFormulas(o);
             viewModel.set(statusCodeField, "OPEN");
         }else {
-            viewModel.set('auditBtnText', "已关闭");
+            viewModel.set('auditBtnText', "禁用");
         }
     }
 });

+ 19 - 13
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -125,23 +125,29 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                 }
             }, {
                 text : "结算方式", 
-                width : 200.0, 
+                width : 150.0, 
                 dataIndex : "ftd_paymethod", 
                 xtype : "", 
                 items : null,
-                editor : {
-                    displayField : "display", 
-                    editable : true, 
-                    format : "", 
-                    hideTrigger : false, 
-                    maxLength : 100.0, 
-                    minValue : null, 
-                    positiveNum : false, 
-                    queryMode : "local", 
-                    store : null, 
-                    valueField : "value", 
-                    xtype : "dbfindtrigger"
+                editor:{
+                    xtype: 'combobox',
+                    name: 'ftd_paymethod',
+                    queryMode: 'local',
+                    displayField: 'ftd_paymethod_d',
+                    valueField: 'ftd_paymethod',
+                    editable:false,
+                    store: Ext.create('Ext.data.ArrayStore', {
+                        fields: ['ftd_paymethod', 'ftd_paymethod_d'],
+                        data: [
+                            ["无", "无"],
+                            ["支付宝转账", "支付宝转账"],
+                            ["微信转账", "微信转账"],
+                            ["现金", "现金"],
+                            ["银行转账", "银行转账"]
+                        ]
+                    })
                 }
+                
             }, {
                 text : "备注", 
                 dataIndex : "ftd_remark",

+ 32 - 6
frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js

@@ -32,19 +32,32 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
+                            "width": 120,
                             "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
+                            "width": 150,
                             "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
+                            "width": 120,
                             "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 
@@ -77,19 +90,32 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
+                            "width": 120,
                             "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
+                            "width": 150,
                             "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
+                            "width": 120,
                             "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 

+ 80 - 28
frontend/saas-web/app/view/money/othreceipts/FormPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
             'dbfindtrigger[name=or_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[{
@@ -23,30 +23,69 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                         },{
                             field:'cu_name',width:100
                         }],
-                        dbColumns:[{
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": ""
-                        },{
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": ""
-                        }, {
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": ""
-                        }, {
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": ""
-                        }]
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
 
                 }
@@ -78,19 +117,32 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
+                            "width": 120,
                             "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
+                            "width": 150,
                             "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
+                            "width": 120,
                             "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 

+ 80 - 28
frontend/saas-web/app/view/money/othreceipts/QueryPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
             'dbfindtrigger[name=or_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[{
@@ -23,30 +23,69 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
                         },{
                             field:'cu_name',width:100
                         }],
-                        dbColumns:[{
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": ""
-                        },{
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": ""
-                        }, {
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": ""
-                        }, {
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": ""
-                        }]
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
 
                 }
@@ -78,19 +117,32 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
+                            "width": 120,
                             "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
+                            "width": 150,
                             "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
+                            "width": 120,
                             "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 

+ 49 - 18
frontend/saas-web/app/view/money/othspendings/FormPanelController.js

@@ -28,31 +28,53 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                             field: 've_name',
                             width: 100
                         }],
-                        dbColumns: [{
+                        dbColumns:[{
                             "text": "供应商ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 100,
                             "xtype": "numbercolumn"
-                        }, {
-                            conditionCode: 've_code',
+                        },{
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
                             "width": 100
                         }, {
-                            conditionCode: 've_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
                             "width": 100
                         }, {
-                            conditionCode: 'cu_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     });
 
@@ -80,33 +102,42 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                             field: 'bk_bankname',
                             width: 100
                         }],
-                        dbColumns: [{
+                        dbColumns:[{
                             "text": "账户ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
-                            "xtype": "",
-                            "items": null
-                        }, {
+                            "xtype": ""
+                        },{
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 120,
+                            "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
-                            "xtype": "",
-                            "items": null
+                            "width": 150,
+                            "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     });
 

+ 45 - 14
frontend/saas-web/app/view/money/othspendings/QueryPanelController.js

@@ -30,24 +30,46 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
                             "width": 100,
                             "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
                             "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
                             "width": 100
                         }, {
-                            conditionCode:'cu_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 
@@ -76,28 +98,37 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
-                            "xtype": "numbercolumn",
-                            "items": null
+                            "xtype": ""
                         },{
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 120,
+                            "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
-                            "xtype": "",
-                            "items": null
+                            "width": 150,
+                            "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 

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

@@ -153,7 +153,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             },
             {
                 text : "数量", 
-                dataIndex : "pd_inqty", 
+                dataIndex : "pd_outqty", 
                 editor : {
                     xtype : "numberfield"
                 },

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

@@ -66,7 +66,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 width:0
             }, {
                 text : "物料id", 
-                dataIndex : "pd_prodid", 
+                dataIndex : "sd_prodid", 
                 width : 0
             }, {
                 text : "物料编号", 

+ 146 - 67
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -8,53 +8,87 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
             'dbfindtrigger[name=sa_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
-                        dbfinds:[{
-                            from:'id',to:'sa_custid'
-                        },{
-                            from:'cu_code',to:'sa_custcode'
-                        },{
-                            from:'cu_name',to:'sa_custname'
+                        dbfinds:[
+                            {
+                                from:'id',to:'sa_custid'
+                            },{
+                                from:'cu_code',to:'sa_custcode'
+                            },{
+                                from:'cu_name',to:'sa_custname'
+                            },{
+                                from:'ca_address',to:'sa_address'
                         }],
                         dbtpls:[{
                             field:'cu_code',width:100
                         },{
                             field:'cu_name',width:100
                         }],
-                        dbColumns:[{
-                            conditionCode:'id',
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
 
                 }
@@ -73,40 +107,85 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                             from:'pr_detail',to:'pr_detail'
                         }, {
                             from:'pr_spec',to:'pr_spec'
+                        }, {
+                            from:'id',to:'sd_prodid'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
                         },{
                             field:'pr_detail',width:100
                         }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "text": "物料编号",
+                                "flex": 1,
+                                "dataIndex": "pr_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "物料名称",
+                                "flex": 1,
+                                "dataIndex": "pr_detail",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "规格",
+                                "flex": 1,
+                                "dataIndex": "pr_spec",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "单位",
+                                "flex": 1,
+                                "dataIndex": "pr_unit",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "品牌",
+                                "flex": 1,
+                                "dataIndex": "pr_brand",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商ID",
+                                "flex": 0,
+                                "dataIndex": "pr_vendid",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商编号",
+                                "flex": 1,
+                                "dataIndex": "pr_vendcode",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商名称",
+                                "flex": 1,
+                                "dataIndex": "pr_vendname",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "最小包装量",
+                                "flex": 1,
+                                "dataIndex": "pr_zxbzs",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }]
                     }) ;   
 
                 }

+ 74 - 37
frontend/saas-web/app/view/sale/sale/QueryPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
             'dbfindtrigger[name=sa_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[{
@@ -67,7 +67,8 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'pr_code',to:'sd_prodcode',
+                            from:'pr_code',to:'sd_prodcode'
+                        },{
                             from:'pr_detail',to:'pr_detail'
                         }],
                         dbtpls:[{
@@ -75,41 +76,77 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "text": "物料编号",
+                                "flex": 1,
+                                "dataIndex": "pr_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "物料名称",
+                                "flex": 1,
+                                "dataIndex": "pr_detail",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "规格",
+                                "flex": 1,
+                                "dataIndex": "pr_spec",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "单位",
+                                "flex": 1,
+                                "dataIndex": "pr_unit",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "品牌",
+                                "flex": 1,
+                                "dataIndex": "pr_brand",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商ID",
+                                "flex": 0,
+                                "dataIndex": "pr_vendid",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商编号",
+                                "flex": 1,
+                                "dataIndex": "pr_vendcode",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商名称",
+                                "flex": 1,
+                                "dataIndex": "pr_vendname",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "最小包装量",
+                                "flex": 1,
+                                "dataIndex": "pr_zxbzs",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }]
                     }) ;   
 
                 }

+ 5 - 1
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -43,6 +43,10 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         xtype : "hidden", 
         name : "pi_custcode",  
         fieldLabel : "客户编号"
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "pi_custname", 
+        fieldLabel : "客户名称"
     }, {
         xtype : "textfield", 
         name : "pi_address", 
@@ -53,7 +57,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         xtype : "detailGridField", 
         detnoColumn:  'pd_pdno',
         storeModel:'saas.model.sale.ProdIODetail',
-        deleteDetailUrl:'/api/prodinout/deleteDetail/',
+        deleteDetailUrl:'/api/sale/prodinout/deleteDetail/',
         columns : [
             {
                 text : "id", 

+ 112 - 44
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -8,16 +8,18 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
             'dbfindtrigger[name=pi_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[
-                        {
-                            from:'id',to:'pi_custid'
-                        },{
-                            from:'cu_code',to:'pi_custcode'
-                        },{
-                            from:'cu_name',to:'pi_custname'
+                            {
+                                from:'id',to:'pi_custid'
+                            },{
+                                from:'cu_code',to:'pi_custcode'
+                            },{
+                                from:'cu_name',to:'pi_custname'
+                            },{
+                                from:'ca_address',to:'pi_address'
                         }],
                         dbtpls:[
                         {
@@ -31,7 +33,7 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                             "text": "客户ID",
                             "flex": 0,
                             "dataIndex": "id",
-                            "width": 100,
+                            "width": 0,
                             "xtype": "",
                             "items": null
                         },{
@@ -52,11 +54,41 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         }, {
                             conditionCode:'cu_type',
                             "text": "客户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "cu_type",
                             "width": 200,
                             "xtype": "",
                             "items": null
+                        }, {
+                            "text": "业务员编号",
+                            "flex": 1,
+                            "dataIndex": "cu_sellercode",
+                            "width": 100
+                        }, {
+                            "text": "业务员",
+                            "flex": 1,
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "cu_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "cu_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "额度",
+                            "flex": 1,
+                            "dataIndex": "cu_credit",
+                            "width": 100
+                        }, {
+                            "text": "客户地址",
+                            "flex": 1,
+                            "dataIndex": "ca_address",
+                            "width": 250
                         }]
                     }) ;   
                 }
@@ -83,41 +115,77 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "text": "物料编号",
+                                "flex": 1,
+                                "dataIndex": "pr_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "物料名称",
+                                "flex": 1,
+                                "dataIndex": "pr_detail",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "规格",
+                                "flex": 1,
+                                "dataIndex": "pr_spec",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "单位",
+                                "flex": 1,
+                                "dataIndex": "pr_unit",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "品牌",
+                                "flex": 1,
+                                "dataIndex": "pr_brand",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商ID",
+                                "flex": 0,
+                                "dataIndex": "pr_vendid",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商编号",
+                                "flex": 1,
+                                "dataIndex": "pr_vendcode",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商名称",
+                                "flex": 1,
+                                "dataIndex": "pr_vendname",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "最小包装量",
+                                "flex": 1,
+                                "dataIndex": "pr_zxbzs",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }]
                     }) ;   
 
                 }

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

@@ -31,11 +31,13 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
     }, {
         xtype: 'dbfindtrigger',
         name: 'pd_prodcode',
-        fieldLabel: '物料编号'
+        fieldLabel: '物料编号',
+        showDetail: true
     }, {
         xtype: 'textfield',
         name: 'pr_detail',
-        fieldLabel: '物料名称'
+        fieldLabel: '物料名称',
+        showDetail: true
     }, {
         xtype: 'combobox',
         name: 'pi_statuscode',
@@ -68,7 +70,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         addTitle:'销售退货单',
         addXtype:'sale-salein-formpanel',
         defaultCondition:' pi_class = \'销售退货单\'',
-        baseVastUrl: '/api/sale/prodinout/',
+        baseVastUrl: 'http://192.168.253.48:8820/prodinout/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 71 - 36
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanelController', {
             'dbfindtrigger[name=pi_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[
@@ -82,41 +82,76 @@ Ext.define('saas.view.sale.saleIn.QueryPanelController', {
                             field:'pr_detail',width:100
                         }],
                         dbColumns:[
-                        {
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "text": "物料编号",
+                                "flex": 1,
+                                "dataIndex": "pr_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "物料名称",
+                                "flex": 1,
+                                "dataIndex": "pr_detail",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "规格",
+                                "flex": 1,
+                                "dataIndex": "pr_spec",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "单位",
+                                "flex": 1,
+                                "dataIndex": "pr_unit",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "品牌",
+                                "flex": 1,
+                                "dataIndex": "pr_brand",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商ID",
+                                "flex": 0,
+                                "dataIndex": "pr_vendid",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商编号",
+                                "flex": 1,
+                                "dataIndex": "pr_vendcode",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商名称",
+                                "flex": 1,
+                                "dataIndex": "pr_vendname",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "最小包装量",
+                                "flex": 1,
+                                "dataIndex": "pr_zxbzs",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }]
                     }) ;   
 
                 }

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

@@ -166,6 +166,9 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_taxrate", 
                 width : 120.0, 
                 xtype : "numbercolumn", 
+                editor : {
+                    xtype : "numberfield"
+                },
                 items : null
             },
             {

+ 132 - 68
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
             'dbfindtrigger[name=pi_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[
@@ -19,6 +19,8 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                             from:'cu_code',to:'pi_custcode'
                         },{
                             from:'cu_name',to:'pi_custname'
+                        },{
+                            from:'ca_address',to:'pi_address'
                         }],
                         dbtpls:[
                         {
@@ -27,38 +29,64 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                             field:'cu_name',width:100
                         }],
                         dbColumns:[
-                        {
-                            conditionCode:'id',
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                            {
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
                 }
             },
@@ -85,41 +113,77 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "text": "物料编号",
+                                "flex": 1,
+                                "dataIndex": "pr_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "物料名称",
+                                "flex": 1,
+                                "dataIndex": "pr_detail",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "规格",
+                                "flex": 1,
+                                "dataIndex": "pr_spec",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "单位",
+                                "flex": 1,
+                                "dataIndex": "pr_unit",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "品牌",
+                                "flex": 1,
+                                "dataIndex": "pr_brand",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商ID",
+                                "flex": 0,
+                                "dataIndex": "pr_vendid",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商编号",
+                                "flex": 1,
+                                "dataIndex": "pr_vendcode",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "供应商名称",
+                                "flex": 1,
+                                "dataIndex": "pr_vendname",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "最小包装量",
+                                "flex": 1,
+                                "dataIndex": "pr_zxbzs",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }]
                     }) ;   
 
                 }

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

@@ -33,7 +33,8 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
     }, {
         xtype: 'hidden',
         name: 'pd_prodcode',
-        fieldLabel: '物料编号'
+        fieldLabel: '物料编号',
+        showDetail: true
     }, {
         xtype: 'dbfindtrigger',
         name: 'pr_detail',

+ 104 - 37
frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
             'dbfindtrigger[name=pi_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[
@@ -19,6 +19,8 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                             from:'cu_code',to:'pi_custcode'
                         },{
                             from:'cu_name',to:'pi_custname'
+                        },{
+                            from:'ca_address',to:'pi_address'
                         }],
                         dbtpls:[
                         {
@@ -27,38 +29,68 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                             field:'cu_name',width:100
                         }],
                         dbColumns:[
-                        {
-                            conditionCode:'id',
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
 
                 }
@@ -103,19 +135,54 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
+                            "flex": 1,
                             "dataIndex": "pr_spec",
                             "width": 200,
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
+                            "text": "单位",
+                            "flex": 1,
                             "dataIndex": "pr_unit",
                             "width": 200,
                             "xtype": "",
                             "items": null
+                        }, {
+                            "text": "品牌",
+                            "flex": 1,
+                            "dataIndex": "pr_brand",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "pr_vendid",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "pr_vendcode",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "pr_vendname",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "最小包装量",
+                            "flex": 1,
+                            "dataIndex": "pr_zxbzs",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
                         }]
                     }) ;   
 

+ 4 - 2
frontend/saas-web/resources/json/navigation.json

@@ -211,8 +211,9 @@
             "viewType": "document-kind",
             "leaf": true
         }, {
+            "id":"other-address",
             "text": "采购交货地址",
-            "viewType": "document-kind",
+            "viewType": "other-address",
             "leaf": true
         }, {
             "id":"document-kind",
@@ -220,8 +221,9 @@
             "viewType": "document-kind",
             "leaf": true
         }, {
+            "id":"other-productunit",
             "text": "计量单位",
-            "viewType": "document-kind",
+            "viewType": "other-productunit",
             "leaf": true
         }, {
             "id":"document-kind",