Browse Source

Merge remote-tracking branch 'origin/dev' into dev

zhoudw 7 years ago
parent
commit
d0c6b531e9
92 changed files with 1358 additions and 647 deletions
  1. 13 3
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 2 1
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java
  3. 1 1
      applications/commons/commons-server/src/main/resources/application.yml
  4. 4 4
      applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties
  5. 1 1
      applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml
  6. 4 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  7. 5 5
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  8. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/EmployeeServiceImpl.java
  9. 15 12
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  10. 9 7
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  11. 35 35
      applications/document/document-server/src/main/resources/mapper/ProductDetailMapper.xml
  12. 4 4
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  13. 2 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/FundtransferdetailMapper.java
  14. 21 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransfer.java
  15. 30 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java
  16. 18 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java
  17. 19 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  18. 17 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  19. 32 19
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  20. 10 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  21. 7 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  22. 5 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java
  23. 1 1
      applications/money/money-server/src/main/resources/mapper/BankinformationMapper.xml
  24. 19 1
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  25. 1 1
      applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml
  26. 18 1
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  27. 21 5
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  28. 18 1
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  29. 18 1
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  30. 6 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  31. 12 8
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  32. 11 6
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  33. 7 3
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  34. 15 7
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  35. 5 3
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  36. 4 0
      base-servers/account/account-dto/pom.xml
  37. 39 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyDTO.java
  38. 41 5
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyRegDTO.java
  39. 12 0
      base-servers/account/account-server/pom.xml
  40. 2 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java
  41. 9 2
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java
  42. 12 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/CompanyController.java
  43. 7 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/AccountRoleMapper.java
  44. 7 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/CompanyMapper.java
  45. 28 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/Company.java
  46. 4 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/AccountService.java
  47. 17 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/CompanyService.java
  48. 21 2
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/AccountServiceImpl.java
  49. 29 2
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/CompanyServiceImpl.java
  50. 11 0
      base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml
  51. 32 4
      base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml
  52. 13 13
      base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java
  53. 2 0
      base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/FileApplication.java
  54. 16 16
      base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java
  55. 1 6
      base-servers/gateway-server/src/main/resources/application.yml
  56. 4 4
      frontend/saas-web/app/Application.scss
  57. 7 4
      frontend/saas-web/app/view/core/base/BasePanel.js
  58. 2 0
      frontend/saas-web/app/view/core/base/BasePanel.scss
  59. 7 1
      frontend/saas-web/app/view/core/base/GridPanel.js
  60. 21 43
      frontend/saas-web/app/view/core/form/DataMultiCombo.js
  61. 1 1
      frontend/saas-web/app/view/core/form/MultiCombo.js
  62. 2 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  63. 25 1
      frontend/saas-web/app/view/core/query/QueryGridPanel.scss
  64. 5 9
      frontend/saas-web/app/view/document/employee/BasePanel.js
  65. 72 1
      frontend/saas-web/app/view/document/kind/ChildForm.js
  66. 12 0
      frontend/saas-web/app/view/document/kind/Kind.js
  67. 7 1
      frontend/saas-web/app/view/home/charts/MonthIO.js
  68. 9 3
      frontend/saas-web/app/view/home/charts/MonthPurchase.js
  69. 31 15
      frontend/saas-web/app/view/home/charts/MonthSale.js
  70. 19 0
      frontend/saas-web/app/view/home/charts/MonthSale.scss
  71. 18 11
      frontend/saas-web/app/view/home/charts/PurchaseTrend.js
  72. 16 14
      frontend/saas-web/app/view/home/charts/SaleTrend.js
  73. 18 11
      frontend/saas-web/app/view/home/charts/StockAmount.js
  74. 1 1
      frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js
  75. 12 4
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  76. 2 1
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  77. 12 4
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  78. 2 1
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  79. 12 4
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  80. 2 1
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  81. 12 4
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  82. 1 1
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  83. 12 4
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  84. 26 0
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  85. 37 258
      frontend/saas-web/app/view/sys/baseconfig/FormPanel.js
  86. 20 9
      frontend/saas-web/app/view/sys/baseconfig/FormPanelController.js
  87. 179 13
      frontend/saas-web/app/view/sys/config/FormPanel.js
  88. 27 15
      frontend/saas-web/app/view/sys/guide/FormPanel.js
  89. 9 0
      frontend/saas-web/app/view/sys/manager/FormPanel.scss
  90. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/Date.js
  91. BIN
      frontend/saas-web/resources/images/default/basePhoto.png
  92. 0 4
      frontend/saas-web/resources/json/navigation.json

+ 13 - 3
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -30,22 +30,28 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_RELDELETE_UPDATEPROD(79307,"存在关联单据,不允许更新"),
     BIZ_RELDELETE_DELETEPROD(79308,"存在关联单据,不允许删除"),
     BIZ_PRODWHCODE_REPEAT(79309, "明细仓库重复"),
+    BIZ_UNENDPRODUCT(79310,"系统还未结账,不能反结账"),
     NO_OPRATIONDATA(79400,"无可操作单据"),
     BOM_SAVE(79401, "产品编号+版本号已存在"),
     REPEAT_NAME(79501, "名称重复"),
     REPEAT_CODE(79502, "编号重复"),
+    REPEAT_CUSTOMERCODE(79503, "客户名称或编号重复"),
+    REPEAT_TEL(79504, "电话号码重复"),
     NO_DATA(79998, "未找到数据"),
     ILLEGAL_ID(79999, "id不正确"),
     PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库资料,无法删除"),
     PRODUCTWH_HAS_WAREHOUSE(79503, "该仓库资料存在库存,无法删除"),
     ACCOUNT_EXISTS(79503, "账号已存在"),
+    DEAL_FAILED(79800, "编号:<u>%s</u>处理失败,%s"),
     USING_EXISTS(79504, ""),
 
 
 
     //采购 70000-71999
     PURCCHECKIN_POST_ERROR(70000,""),
-    PURCHASE_UNAUDIT_ERROR(72006,"采购订单已转采购验收单,无法反审核"),
+    PURCHASE_UNAUDIT_ERROR(71001,"采购订单已转采购验收单,无法反审核"),
+    PURCHASE_DETAIL_OVERNUM(70001, "明细行数量超过来源采购验收单明细行数量"),
+    PURCHASE_ORDER_HASAUDIT(70002, "存在已审核单据,单据编号:%s"),
 
 
     //销售
@@ -57,19 +63,23 @@ public enum BizExceptionCode implements BaseExceptionCode {
     SALEOUT_POSTSTATUS_ERROR(72004,"当前单据状态无法进行此操作。"),
     SALEOUT_POST_ERROR(72005,""),
     SALEOUT_UNAUDIT_ERROR(72006,"销售订单已转出货单,无法反审核"),
+    SALE_ORDER_HASAUDIT(72003, "存在已审核单据,单据编号:%s"),
 
     //资金
     PAYBALANCE_OUTNOWBALANCE(74001,"本次核销金额不能大于未核销金额"),
     PAYBALANCE_UNIQUESOURCECODE(74002, "保存失败!不能选择重复的源单"),
-
+    PAYBALANCE_NOWAMOUNT_POSITIVE(74005, "单据类型为<u>%s</u>的单据,核销金额必须为正数"),
+    PAYBALANCE_NOWAMOUNT_NEGATIVE(74005, "单据类型为<u>%s</u>的单据,核销金额必须为负数"),
     RECALANCE_OUTNOWBALANCE(74003,"本次核销金额不能大于未核销金额"),
-
+    BEFORE_UNAUDIT(74006, "单据:<u>%s</u>未审核,无法反审核"),
     BANK_AMOUNT_NOTENOUGH(74004, "资金账号不足"),
 
 
 
     //库存
     EMPTY_DATA(76100,"数据为空,请填写后再保存"),
+    UNENOUGH_DETAIL_STOCK(76300, "行%s库存不足"),
+    UNENOUGH_STOCK(76400, "%s :库存不足"),
     STORAGE_POST_ERROR(76200,""),
     ;
     private int code;

+ 2 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.dto.MessagelogDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.mapper.EndProductMapper;
 import com.usoftchina.saas.commons.mapper.MessagelogMapper;
 import com.usoftchina.saas.commons.po.Operation;
@@ -72,7 +73,7 @@ public class EndProductServiceImpl implements EndProductService {
     public void unEndAccount() {
         String period = endProductMapper.selectUnPeriod(BaseContextHolder.getCompanyId());
         if (StringUtils.isEmpty(period)){
-            throw new BizException(79306,"系统还未结账,不能反结账");
+            throw new BizException(BizExceptionCode.BIZ_UNENDPRODUCT);
         }else{
             endProductMapper.updatePeriodStatus(0L, period, BaseContextHolder.getCompanyId());
             messageLogService.customizeLog(generateMsgObj(Long.parseLong(period)), Operation.UNENDPRODUCT);

+ 1 - 1
applications/commons/commons-server/src/main/resources/application.yml

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

+ 4 - 4
applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties

@@ -116,7 +116,7 @@ msg.getBill=\u83b7\u53d6\u53d1\u7968\u660e\u7ec6
 msg.getARBill=\u83b7\u53d6\u5e94\u6536\u53d1\u7968
 msg.getAPBill=\u83b7\u53d6\u5e94\u4ed8\u53d1\u7968
 msg.getSuccess=\u83b7\u53d6\u6210\u529f
-msg.endProdudct=\u8bb0\u8d26\u64cd\u4f5c
-msg.endProdudctSuccess=\u8bb0\u8d26\u6210\u529f
-msg.unEndProduct=\u53cd\u8bb0\u8d26\u64cd\u4f5c
-msg.unEndProductSuccess=\u53cd\u8bb0\u8d26\u6210\u529f
+msg.endProdudct=\u7ed3\u8d26\u64cd\u4f5c
+msg.endProdudctSuccess=\u7ed3\u8d26\u6210\u529f
+msg.unEndProduct=\u53cd\u7ed3\u8d26\u64cd\u4f5c
+msg.unEndProductSuccess=\u53cd\u7ed3\u8d26\u6210\u529f

+ 1 - 1
applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml

@@ -22,7 +22,7 @@
         <result column="ml_keyvalue" property="ml_keyvalue" jdbcType="INTEGER" />
     </resultMap>
     <select id="getListData" resultMap="MsgResult">
-        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result like '%账成功' ORDER BY ML_ID DESC
+        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result like '%账成功' ORDER BY ML_ID DESC
     </select>
 
     <select id="endProduct" parameterMap="spParamMap" statementType="CALLABLE">

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

@@ -228,7 +228,8 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
             try{
                 close(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -241,7 +242,8 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
             try{
                 open(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();

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

@@ -99,7 +99,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     @Transactional
     public DocBaseDTO saveFormData(CustomerFormDTO data) {
         if (null == data || null == data.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -139,7 +139,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             //检查名称和编号
             int count = getMapper().validNameAndCodeWhenInsert(customer);
             if (count>0) {
-                throw new BizException(500, "客户名称或编号重复");
+                throw new BizException(BizExceptionCode.REPEAT_CUSTOMERCODE);
             }
             //插入操作
             getMapper().insertSelective(customer);
@@ -174,7 +174,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             //检查名称和编号
             int count = getMapper().validNameAndCodeWhenUpdate(customer);
             if (count > 0) {
-                throw new BizException(500, "客户名称或编号重复");
+                throw new BizException(BizExceptionCode.REPEAT_CUSTOMERCODE);
             }
 
             //检查期初日期是否已结转
@@ -350,7 +350,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Transactional
-    private DocBaseDTO singleClose(Long id) {
+    public DocBaseDTO singleClose(Long id) {
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
             Customer customer = getMapper().selectByPrimaryKey(id);
@@ -385,7 +385,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Transactional
-    private DocBaseDTO singleOpen(Long id) {
+    public DocBaseDTO singleOpen(Long id) {
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
             Customer customer = getMapper().selectByPrimaryKey(id);

+ 2 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/EmployeeServiceImpl.java

@@ -73,7 +73,7 @@ public class EmployeeServiceImpl extends CommonBaseServiceImpl<EmployeeMapper, E
             //检查电话号码
             int count = getMapper().validatePhoneWhenInsert(employee.getEm_mobile(),BaseContextHolder.getCompanyId());
             if (count>0) {
-                throw new BizException(500, "电话号码重复");
+                throw new BizException(BizExceptionCode.REPEAT_TEL);
             }
             getMapper().insertSelective(employee);
             docBaseDTO = generateMsgObj(employee.getId(), code);
@@ -85,7 +85,7 @@ public class EmployeeServiceImpl extends CommonBaseServiceImpl<EmployeeMapper, E
             //检查电话号码
             int count = getMapper().validatePhoneWhenUpdate(employee.getEm_mobile(),employee.getId(),BaseContextHolder.getCompanyId());
             if (count>0) {
-                throw new BizException(500, "电话号码重复");
+                throw new BizException(BizExceptionCode.REPEAT_TEL);
             }
             getMapper().updateByPrimaryKeySelective(employee);
             docBaseDTO = generateMsgObj(employee.getId(), employee.getEm_code());

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

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -113,7 +114,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         }else{
             String oldCode = getMapper().getCodeById(product.getId());
             if (!product.getPr_code().equals(oldCode)){
-                validEnableUpdate(product.getId());
+                validEnableUpdateCode(product.getId());
             }
             //物料发生过除库存初始化外的出入库单时,不能新增,修改,删除
             validProductOperation(product.getId(), BizExceptionCode.BIZ_RELDELETE_UPDATEPROD);
@@ -123,8 +124,9 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
                 //找到原始单据,反过账并删除
                 String inoutCode = getMapper().selectProdIOCode(product.getPr_code(), BaseContextHolder.getCompanyId(), "库存初始化");
                 post(inoutCode, "反过账");
-                getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
                 getMapper().deleteProdIODetailByCode(inoutCode, BaseContextHolder.getCompanyId());
+                getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
+
                 //此种情况不可能发生明细行数量,只会发生明细行数据修改/新增明细行
                 //a.更新明细行数据
                 List<ProductDetail> insertItems = new ArrayList<ProductDetail>();
@@ -226,7 +228,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             List<ProdIODetail> insertItems = new ArrayList<ProdIODetail>();
             //生成库存初始化单据明细表
             for(ProductDetail productDetail : productDetailList){
-                ProdIODetail prodIODetail = generateProdIODetail(product, productDetail);
+                ProdIODetail prodIODetail = generateProdIODetail(product, productDetail, inoutCode, pi_id);
                 insertItems.add(prodIODetail);
             }
             //明细插入
@@ -253,7 +255,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         }else if ("反过账".equals(type)){
             warehouseService.unPost(map);
         }
-        if (StringUtils.isEmpty(map.get("result"))){
+        if (!StringUtils.isEmpty(map.get("result"))){
             throw new BizException(76203, map.get("result").toString());
         }
     }
@@ -264,11 +266,11 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
      * @param productDetail
      * @return
      */
-    private ProdIODetail generateProdIODetail(Product product, ProductDetail productDetail){
+    private ProdIODetail generateProdIODetail(Product product, ProductDetail productDetail, String inoutCode, Long pi_id){
         ProdIODetail prodIODetail = new ProdIODetail();
         prodIODetail.setPd_piclass("库存初始化");
-        prodIODetail.setPd_inoutno(product.getPr_code());
-        prodIODetail.setPd_piid(product.getId());
+        prodIODetail.setPd_inoutno(inoutCode);
+        prodIODetail.setPd_piid(pi_id);
         prodIODetail.setPd_pdno(productDetail.getPd_detno());
         prodIODetail.setPd_ordercode(product.getPr_code());         //订单号 -> 物料编号
         prodIODetail.setPd_orderdetno(productDetail.getPd_detno()); //订单序号 -> 物料明细序号
@@ -288,7 +290,6 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
 
     @Override
     public DocBaseDTO close(Long id) {
-        validEnableUpdate(id);
         DocBaseDTO docBaseDTO = null;
         if(id != null && id > 0){
             String code = getMapper().getCodeById(id);
@@ -343,7 +344,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             try{
                 close(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -356,7 +358,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             try{
                 open(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -411,7 +414,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
      * 校验是否存在关联单据,不存在时才允许更新物料编号
      * @param id
      */
-    private void validEnableUpdate(Long id){
+    private void validEnableUpdateCode(Long id){
         int count = 0;
         //采购
         count = getMapper().getCountFromPurc(id, BaseContextHolder.getCompanyId());
@@ -477,8 +480,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         String inoutCode = getMapper().selectProdIOCode(prCode, BaseContextHolder.getCompanyId(), "库存初始化");
         if (!StringUtils.isEmpty(inoutCode)) {
             post(inoutCode, "反过账");
-            getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
             getMapper().deleteProdIODetailByCode(inoutCode, BaseContextHolder.getCompanyId());
+            getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
         }
 
         productDetailMapper.deleteByPrimaryKey(id);

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

@@ -110,7 +110,7 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
     public DocBaseDTO saveFormData(VendorListDTO vendorListDTO) {
         Long companyId = BaseContextHolder.getCompanyId();
         if (null == vendorListDTO || null == vendorListDTO.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         Vendor main = vendorListDTO.getMain();
         String code = null;
@@ -120,11 +120,11 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             code = pushMaxnubmer(main.getVe_code(), main.getId());
             int count = getMapper().getCountByCode(code, companyId);
             if(count > 0){
-                throw new BizException(500, "编号重复!");
+                throw new BizException(BizExceptionCode.REPEAT_NAME);
             }
             count = getMapper().getCountByName(main.getVe_name(), companyId);
             if (count > 0){
-                throw new BizException(500, "名称重复!");
+                throw new BizException(BizExceptionCode.REPEAT_NAME);
             }
             //保存主表信息
             main.setVe_code(code);
@@ -156,13 +156,13 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             int count = getMapper().getCountByCode(code, companyId);
             if (!code.equals(oldVendor.getVe_code())){
                 if (count > 0){
-                    throw new BizException(500, "编号重复!");
+                    throw new BizException(BizExceptionCode.REPEAT_CODE);
                 }
             }
             if (!main.getVe_name().equals(oldVendor.getVe_name())){
                 count = getMapper().getCountByName(main.getVe_name(), companyId);
                 if (count > 0){
-                    throw new BizException(500, "名称重复!");
+                    throw new BizException(BizExceptionCode.REPEAT_CODE);
                 }
             }
 
@@ -344,7 +344,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             try{
                 close(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -357,7 +358,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             try{
                 open(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();

+ 35 - 35
applications/document/document-server/src/main/resources/mapper/ProductDetailMapper.xml

@@ -268,59 +268,59 @@
         <foreach collection="list" item="item" index="index" separator=";">
             update productdetail
             <set >
-                <if test="pd_prodid != null" >
-                    pd_prodid = #{pd_prodid,jdbcType=INTEGER},
+                <if test="item.pd_prodid != null" >
+                    pd_prodid = #{item.pd_prodid,jdbcType=INTEGER},
                 </if>
-                <if test="pd_prodcode != null" >
-                    pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
+                <if test="item.pd_prodcode != null" >
+                    pd_prodcode = #{item.pd_prodcode,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_detno != null" >
-                    pd_detno = #{pd_detno,jdbcType=INTEGER},
+                <if test="item.pd_detno != null" >
+                    pd_detno = #{item.pd_detno,jdbcType=INTEGER},
                 </if>
-                <if test="pd_whcode != null" >
-                    pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
+                <if test="item.pd_whcode != null" >
+                    pd_whcode = #{item.pd_whcode,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_whname != null" >
-                    pd_whname = #{pd_whname,jdbcType=VARCHAR},
+                <if test="item.pd_whname != null" >
+                    pd_whname = #{item.pd_whname,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_whid != null" >
-                    pd_whid = #{pd_whid,jdbcType=INTEGER},
+                <if test="item.pd_whid != null" >
+                    pd_whid = #{item.pd_whid,jdbcType=INTEGER},
                 </if>
-                <if test="pd_price != null" >
-                    pd_price = #{pd_price,jdbcType=DOUBLE},
+                <if test="item.pd_price != null" >
+                    pd_price = #{item.pd_price,jdbcType=DOUBLE},
                 </if>
-                <if test="pd_amount != null" >
-                    pd_amount = #{pd_amount,jdbcType=DOUBLE},
+                <if test="item.pd_amount != null" >
+                    pd_amount = #{item.pd_amount,jdbcType=DOUBLE},
                 </if>
-                <if test="companyId != null" >
-                    companyId = #{companyId,jdbcType=INTEGER},
+                <if test="item.companyId != null" >
+                    companyId = #{item.companyId,jdbcType=INTEGER},
                 </if>
-                <if test="updaterId != null" >
-                    updaterId = #{updaterId,jdbcType=INTEGER},
+                <if test="item.updaterId != null" >
+                    updaterId = #{item.updaterId,jdbcType=INTEGER},
                 </if>
-                <if test="updateTime != null" >
-                    updateTime = #{updateTime,jdbcType=TIMESTAMP},
+                <if test="item.updateTime != null" >
+                    updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
                 </if>
-                <if test="pd_text1 != null" >
-                    pd_text1 = #{pd_text1,jdbcType=VARCHAR},
+                <if test="item.pd_text1 != null" >
+                    pd_text1 = #{item.pd_text1,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_text2 != null" >
-                    pd_text2 = #{pd_text2,jdbcType=VARCHAR},
+                <if test="item.pd_text2 != null" >
+                    pd_text2 = #{item.pd_text2,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_text3 != null" >
-                    pd_text3 = #{pd_text3,jdbcType=VARCHAR},
+                <if test="item.pd_text3 != null" >
+                    pd_text3 = #{item.pd_text3,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_text4 != null" >
-                    pd_text4 = #{pd_text4,jdbcType=VARCHAR},
+                <if test="item.pd_text4 != null" >
+                    pd_text4 = #{item.pd_text4,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_text5 != null" >
-                    pd_text5 = #{pd_text5,jdbcType=VARCHAR},
+                <if test="item.pd_text5 != null" >
+                    pd_text5 = #{item.pd_text5,jdbcType=VARCHAR},
                 </if>
-                <if test="pd_num != null" >
-                    pd_num = #{pd_num,jdbcType=DOUBLE},
+                <if test="item.pd_num != null" >
+                    pd_num = #{item.pd_num,jdbcType=DOUBLE},
                 </if>
             </set>
-            where id = #{id}
+            where id = #{item.id}
         </foreach>
     </update>
     <select id="selectProdidByPrimaryKey" resultType="java.lang.Long">

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

@@ -504,7 +504,7 @@
         SELECT COUNT(*) FROM BOMDETAIL WHERE BD_SONID=#{id} AND COMPANYID=#{companyId}
     </select>
     <select id="getCountFromProdIO" resultType="int">
-        SELECT COUNT(*) FROM PRODIODETAIL WHERE PD_PRODID=#{id} AND COMPANYID=#{companyId}
+        SELECT COUNT(*) FROM PRODIODETAIL WHERE PD_PRODID=#{id} AND COMPANYID=#{companyId} and pd_piclass!='库存初始化'
     </select>
 
     <insert id="saveProdInOut" parameterType="com.usoftchina.saas.document.entities.ProdInOut">
@@ -905,14 +905,14 @@
 
     <select id="selectOrderCountByProdCode" resultType="java.lang.Integer">
         SELECT COUNT(*) FROM PRODINOUT LEFT JOIN PRODIODETAIL ON PI_ID=PD_PIID AND PRODINOUT.COMPANYID=PRODIODETAIL.COMPANYID
-        WHERE PRODIODETAIL.COMPANYID = #{companyId} AND PD_PRODID = #{id}
+        WHERE PRODIODETAIL.COMPANYID = #{companyId} AND PD_PRODID = #{id} and pd_piclass != '库存初始化';
     </select>
 
     <delete id="deleteProdIOByCode" >
-        DELETE FROM PRODINOUT WHERE PI_TEXT1=#{code} AND COMPANYID = #{companyId}
+        DELETE FROM PRODINOUT WHERE PI_INOUTNO=#{code} AND COMPANYID = #{companyId}
     </delete>
     <delete id="deleteProdIODetailByCode">
-        DELETE FROM PRODIODETAIL WHERE PD_PIID IN (SELECT PI_ID FROM PRODINOUT WHERE PI_TEXT1=#{code} AND PRODINOUT.COMPANYID = #{companyId}) AND PRODIODETAIL.COMPANYID = #{companyId}
+        DELETE FROM PRODIODETAIL WHERE PD_PIID IN (SELECT PI_ID FROM PRODINOUT WHERE PI_INOUTNO=#{code} AND PRODINOUT.COMPANYID = #{companyId}) AND PRODIODETAIL.COMPANYID = #{companyId}
     </delete>
 </mapper>
 

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

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.money.mapper;
 
 import com.usoftchina.saas.money.po.Fundtransferdetail;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -12,7 +13,7 @@ public interface FundtransferdetailMapper {
 
     int insertSelective(Fundtransferdetail record);
 
-    List<Fundtransferdetail> selectByPrimaryKey(Integer ftdId);
+    List<Fundtransferdetail> selectByPrimaryKey(@Param("id") Integer ftdId, @Param("companyId") Integer companyId);
 
     int updateByPrimaryKeySelective(Fundtransferdetail record);
 

+ 21 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransfer.java

@@ -45,6 +45,27 @@ public class Fundtransfer extends CommonBaseEntity implements Serializable {
 
     private String ftd_paycode;
 
+    private String ft_auditman;
+
+    private Date ft_auditdate;
+
+
+    public String getFt_auditman() {
+        return ft_auditman;
+    }
+
+    public void setFt_auditman(String ft_auditman) {
+        this.ft_auditman = ft_auditman;
+    }
+
+    public Date getFt_auditdate() {
+        return ft_auditdate;
+    }
+
+    public void setFt_auditdate(Date ft_auditdate) {
+        this.ft_auditdate = ft_auditdate;
+    }
+
     public String getFt_code() {
         return ft_code;
     }

+ 30 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java

@@ -55,6 +55,36 @@ public class Othreceipts extends CommonBaseEntity implements Serializable {
 
     private String ord_remark;
 
+    private String or_auditman;
+
+    private Date or_auditdate;
+
+    public String getOr_auditman() {
+        return or_auditman;
+    }
+
+    public void setOr_auditman(String or_auditman) {
+        this.or_auditman = or_auditman;
+    }
+
+    public Date getOr_auditdate() {
+        return or_auditdate;
+    }
+
+    public void setOr_auditdate(Date or_auditdate) {
+        this.or_auditdate = or_auditdate;
+    }
+
+    @Override
+    public String getCreatorName() {
+        return creatorName;
+    }
+
+    @Override
+    public void setCreatorName(String creatorName) {
+        this.creatorName = creatorName;
+    }
+
     public String getOr_code() {
         return or_code;
     }

+ 18 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java

@@ -56,7 +56,25 @@ public class Othspendings extends CommonBaseEntity implements Serializable {
 
     private String osd_remark;
 
+    private String os_auditman;
 
+    private Date os_auditdate;
+
+    public String getOs_auditman() {
+        return os_auditman;
+    }
+
+    public void setOs_auditman(String os_auditman) {
+        this.os_auditman = os_auditman;
+    }
+
+    public Date getOs_auditdate() {
+        return os_auditdate;
+    }
+
+    public void setOs_auditdate(Date os_auditdate) {
+        this.os_auditdate = os_auditdate;
+    }
 
     public String getOs_code() {
         return os_code;

+ 19 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java

@@ -83,6 +83,25 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
 
     private Double pbd_nowbalance;
 
+    private Date pb_auditdate;
+
+    private String pb_auditman;
+
+    public Date getPb_auditdate() {
+        return pb_auditdate;
+    }
+
+    public void setPb_auditdate(Date pb_auditdate) {
+        this.pb_auditdate = pb_auditdate;
+    }
+
+    public String getPb_auditman() {
+        return pb_auditman;
+    }
+
+    public void setPb_auditman(String pb_auditman) {
+        this.pb_auditman = pb_auditman;
+    }
 
     public Date getUpdatedate() {
         return updatedate;

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

@@ -83,8 +83,25 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
 
     private Double rbd_nowbalance;
 
+    private String rb_auditman;
 
+    private Date rb_auditdate;
 
+    public String getRb_auditman() {
+        return rb_auditman;
+    }
+
+    public void setRb_auditman(String rb_auditman) {
+        this.rb_auditman = rb_auditman;
+    }
+
+    public Date getRb_auditdate() {
+        return rb_auditdate;
+    }
+
+    public void setRb_auditdate(Date rb_auditdate) {
+        this.rb_auditdate = rb_auditdate;
+    }
 
     public Date getUpdatedate() {
         return updatedate;

+ 32 - 19
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java

@@ -104,6 +104,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
         DocBaseDTO docBaseDTO = this.insert(fundtran);
         Long id = docBaseDTO.getId();
 
+
         //取从表金额更新中间表、资金账号表
         List<Fundtransferdetail> fundtransferdetailList = fundtran.getItems();
         Iterator isList = fundtransferdetailList.iterator();
@@ -151,21 +152,27 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
 //            }
             Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
             Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
-            bankinformation.setBk_thisamount(beginamount + incomme - spending - bk_amount);
-            bankinformation.setBk_income(incomme);
-            bankinformation.setBk_spending(spending + bk_amount);
+            Bankinformation newbankinformation = new Bankinformation();
+            newbankinformation.setBk_thisamount(beginamount + incomme - (spending + bk_amount));
+            newbankinformation.setBk_income(incomme);
+            newbankinformation.setBk_spending(spending + bk_amount);
+            newbankinformation.setId(bankinformation.getId());
+            newbankinformation.setCompanyId(BaseContextHolder.getCompanyId());
+            bankinformationMapper.updateByPrimaryKeySelective(newbankinformation);
 
             //收款方
             Bankinformation inbankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
             Double inbeginamount = inbankinformation.getBk_beginamount()== null ? new Double(0) : inbankinformation.getBk_beginamount();
             Double inspending = inbankinformation.getBk_spending() == null ? new Double(0) : inbankinformation.getBk_spending();
             Double inincomme = inbankinformation.getBk_income() == null ? new Double(0) : inbankinformation.getBk_income();
-            inbankinformation.setBk_thisamount(inbeginamount + inincomme - inspending + bk_amount);
-            inbankinformation.setBk_income(inincomme + bk_amount);
-            inbankinformation.setBk_spending(inspending);
+            Bankinformation newinbankinformation = new Bankinformation();
+            newinbankinformation.setBk_thisamount(inbeginamount + (inincomme + bk_amount) - inspending );
+            newinbankinformation.setBk_income(inincomme + bk_amount);
+            newinbankinformation.setBk_spending(inspending);
+            newinbankinformation.setId(inbankinformation.getId());
+            newinbankinformation.setCompanyId(BaseContextHolder.getCompanyId());
+            bankinformationMapper.updateByPrimaryKeySelective(newinbankinformation);
 
-            bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
-            bankinformationMapper.updateByPrimaryKeySelective(inbankinformation);
         }
         DocBaseDTO baseDTO = getBaseDTOById(id);
         //日志记录
@@ -187,7 +194,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
 
         //资金
         //取从表金额
-        List<Fundtransferdetail> fundtransferdetailList = fundtransferdetailMapper.selectByPrimaryKey(id);
+        List<Fundtransferdetail> fundtransferdetailList = fundtransferdetailMapper.selectByPrimaryKey(id, Math.toIntExact(BaseContextHolder.getCompanyId()));
         Iterator isList = fundtransferdetailList.iterator();
         while (isList.hasNext()){
             Fundtransferdetail fundtransferdetail = (Fundtransferdetail) isList.next();
@@ -208,21 +215,27 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             Double beginamount = bankinformation.getBk_beginamount()== null ? new Double(0) : bankinformation.getBk_beginamount();
             Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
             Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
-            bankinformation.setBk_thisamount(beginamount + incomme - spending + bk_amount);
-            bankinformation.setBk_income(incomme);
-            bankinformation.setBk_spending(spending - bk_amount);
+            Bankinformation newbankinformation = new Bankinformation();
+            newbankinformation.setBk_thisamount(beginamount + incomme - (spending - bk_amount));
+            newbankinformation.setBk_income(incomme);
+            newbankinformation.setBk_spending(spending - bk_amount);
+            newbankinformation.setId(Long.valueOf(bk_id));
+            newbankinformation.setCompanyId(BaseContextHolder.getCompanyId());
 
             //收款方
             Bankinformation inbankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
             Double inbeginamount = inbankinformation.getBk_beginamount()== null ? new Double(0) : inbankinformation.getBk_beginamount();
             Double inspending = inbankinformation.getBk_spending() == null ? new Double(0) : inbankinformation.getBk_spending();
             Double inincomme = inbankinformation.getBk_income() == null ? new Double(0) : inbankinformation.getBk_income();
-            inbankinformation.setBk_thisamount(inbeginamount + inincomme - inspending - bk_amount);
-            inbankinformation.setBk_income(inincomme - bk_amount);
-            inbankinformation.setBk_spending(inspending);
-
-            bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
-            bankinformationMapper.updateByPrimaryKeySelective(inbankinformation);
+            Bankinformation newinbankinformation = new Bankinformation();
+            newinbankinformation.setBk_thisamount(inbeginamount + (inincomme-bk_amount) - inspending );
+            newinbankinformation.setBk_income(inincomme-bk_amount);
+            newinbankinformation.setBk_spending(inspending);
+            newinbankinformation.setId(Long.valueOf(bk_inid));
+            newinbankinformation.setCompanyId(BaseContextHolder.getCompanyId());
+
+            bankinformationMapper.updateByPrimaryKeySelective(newbankinformation);
+            bankinformationMapper.updateByPrimaryKeySelective(newinbankinformation);
         }
 
         DocBaseDTO baseDTO = getBaseDTOById(Long.valueOf(id));
@@ -286,7 +299,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
     public Fundtran select(int id) {
         Fundtran fundtran = new Fundtran();
         fundtran.setMain(fundtransferMapper.selectByPrimaryKey(id));
-        fundtran.setItems(fundtransferdetailMapper.selectByPrimaryKey(id));
+        fundtran.setItems(fundtransferdetailMapper.selectByPrimaryKey(id, Math.toIntExact(BaseContextHolder.getCompanyId())));
         return fundtran;
     }
 

+ 10 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -138,24 +138,28 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
             }
             //本次核销金额不能大于未核销金额
             if(nowbalance>namount){
-                throw new BizException(500, BizExceptionCode.PAYBALANCE_OUTNOWBALANCE.getMessage());
+                throw new BizException(BizExceptionCode.PAYBALANCE_OUTNOWBALANCE);
             }
             //单据金额
             Double amount = detail.getPbd_amount();
             if(amount>0 && nowbalance<0){
-                String error = "单据类型为" + detail.getPbd_slkind() + "的单据,核销金额必须为正数";
-                throw new BizException(500, error);
+                String msg = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getMessage();
+                int code = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getCode();
+                String error = String.format(msg, detail.getPbd_slkind());
+                throw new BizException(code, error);
             }
             if(amount<0 && nowbalance>0){
-                String error = "单据类型为" + detail.getPbd_slkind() + "的单据,核销金额必须为负数";
-                throw new BizException(500, error);
+                String msg = BizExceptionCode.PAYBALANCE_NOWAMOUNT_NEGATIVE.getMessage();
+                int code = BizExceptionCode.PAYBALANCE_NOWAMOUNT_NEGATIVE.getCode();
+                String error = String.format(msg, detail.getPbd_slkind());
+                throw new BizException(code, error);
             }
         }
         //不能选择重复的源单
         for  ( int  i  =   0 ; i  <  paybalancedetail.size()  -   1 ; i ++ )  {
             for  ( int  j  =  paybalancedetail.size()  -   1 ; j  >  i; j -- )  {
                 if  (paybalancedetail.get(j).getPbd_slcode().equals(paybalancedetail.get(i).getPbd_slcode()))  {
-                    throw new BizException(500, BizExceptionCode.PAYBALANCE_UNIQUESOURCECODE.getMessage());
+                    throw new BizException(BizExceptionCode.PAYBALANCE_UNIQUESOURCECODE);
                 }
             }
         }

+ 7 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java

@@ -141,12 +141,16 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             //单据金额
             Double amount = detail.getRbd_amount();
             if(amount>0 && nowbalance<0){
-                String error = "单据类型为" + detail.getRbd_slkind() + "的单据,核销金额必须为正数";
+                String msg = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getMessage();
+                int code = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getCode();
+                String error = String.format(msg, detail.getRbd_slkind());
                 throw new BizException(500, error);
             }
             if(amount<0 && nowbalance>0){
-                String error = "单据类型为" + detail.getRbd_slkind() + "的单据,核销金额必须为负数";
-                throw new BizException(500, error);
+                String msg = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getMessage();
+                int code = BizExceptionCode.PAYBALANCE_NOWAMOUNT_POSITIVE.getCode();
+                String error = String.format(msg, detail.getRbd_slkind());
+                throw new BizException(code, error);
             }
         }
         //不能选择重复的源单

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

@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import javax.print.DocFlavor;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
@@ -102,7 +103,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
     @Override
     public DocSavedDTO saveFormData(VerificationFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -277,7 +278,9 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         }
         String code = verificationMapper.validateResAudit(id);
         if (null != code) {
-            throw new BizException(500, "单据:" + code + " 未审核,无法反审核");
+            String msg = BizExceptionCode.BEFORE_UNAUDIT.getMessage();
+            int errCode = BizExceptionCode.BEFORE_UNAUDIT.getCode();
+            throw new BizException(errCode, String.format(msg, code));
         }
         Verification verification = new Verification();
         //生成更新对象

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

@@ -33,7 +33,7 @@
   <sql id="Base_Column_List" >
     bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
     bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid, 
-    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark
+    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_spending,  bk_income
   </sql>
   <sql id="Blob_Column_List" >
     bk_remark

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

@@ -24,11 +24,17 @@
     <result column="ftd_nowbalance" property="ftd_nowbalance" jdbcType="DOUBLE" />
     <result column="ftd_paymethod" property="ftd_paymethod" jdbcType="VARCHAR" />
     <result column="ftd_paycode" property="ftd_paycode" jdbcType="VARCHAR" />
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
+    <result column="ft_auditman" property="ft_auditman" jdbcType="VARCHAR" />
+    <result column="ft_auditdate" property="ft_auditdate" jdbcType="TIMESTAMP" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
     ft_id, ft_code, ft_date, ft_recorderid, ft_recorder, ft_recorddate, ft_status, ft_statuscode, 
     ft_remark, fundtransfer.companyId, fundtransfer.updaterId, fundtransfer.updatedate,
-    ft_text1, ft_text2, ft_text3, ft_text4, ft_text5
+    ft_text1, ft_text2, ft_text3, ft_text4, ft_text5, fundtransfer.creatorName, fundtransfer.createTime,
+    ft_auditman, ft_auditdate
   </sql>
   <sql id="Detail_Column_List" >
     ftd_bankname,ftd_inbankname,ftd_nowbalance,ftd_paymethod,ftd_paycode
@@ -109,6 +115,12 @@
       <if test="ft_text5 != null" >
         ft_text5,
       </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="ft_code != null" >
@@ -154,6 +166,12 @@
       <if test="ft_text5 != null" >
         #{ft_text5,jdbcType=VARCHAR},
       </if>
+      <if test="creatorName != null" >
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()

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

@@ -35,7 +35,7 @@
     select 
     <include refid="Base_Column_List" />
     from fundtransferdetail
-    where ftd_ftid = #{id,jdbcType=INTEGER}
+    where ftd_ftid = #{id,jdbcType=INTEGER} and companyId = #{companyId}
   </select>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >

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

@@ -29,12 +29,17 @@
     <result column="ord_type" property="ord_type" jdbcType="VARCHAR" />
     <result column="ord_nowbalance" property="ord_nowbalance" jdbcType="DOUBLE" />
     <result column="ord_remark" property="ord_remark" jdbcType="VARCHAR" />
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
+    <result column="or_auditman" property="or_auditman" jdbcType="VARCHAR" />
+    <result column="or_auditdate" property="or_auditdate" jdbcType="TIMESTAMP" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
     or_id, or_code, or_date, or_custid, or_custcode, or_custname, or_bankcode, or_bankid, 
     or_bankname, or_amount, or_recorderid, or_recorder, or_recorddate, or_status, or_statuscode, 
     or_remark, Othreceipts.companyId, Othreceipts.updaterId, Othreceipts.updatedate, or_text1,
-    or_text2, or_text3, or_text4, or_text5
+    or_text2, or_text3, or_text4, or_text5, othreceipts.creatorName, othreceipts.createTime, or_auditman, or_auditdate
   </sql>
   <sql id="Detail_Column_List" >
     ord_type,ord_nowbalance,ord_remark
@@ -143,6 +148,12 @@
       <if test="or_text5 != null" >
         or_text5,
       </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
+      <if test="creatorTime != null" >
+        creatorTime,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="or_code != null" >
@@ -209,6 +220,12 @@
       <if test="or_text5 != null" >
         #{or_text5,jdbcType=VARCHAR},
       </if>
+      <if test="creatorName != null" >
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatorTime != null" >
+        #{creatorTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()

+ 21 - 5
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -29,13 +29,17 @@
     <result column="osd_type" property="osd_type" jdbcType="VARCHAR" />
     <result column="osd_nowbalance" property="osd_nowbalance" jdbcType="DOUBLE" />
     <result column="osd_remark" property="osd_remark" jdbcType="VARCHAR" />
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="os_auditman" property="os_auditman" jdbcType="VARCHAR" />
+    <result column="os_auditdate" property="os_auditdate" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List" >
     os_id, os_code, os_date, os_vendid, os_vendcode, os_vendname, os_bankid, os_bankcode, 
     os_bankname, os_amount, os_recorderid, os_recorder, os_recorddate, os_status, os_statuscode, 
     os_remark, othspendings.companyId, othspendings.updaterId,
     othspendings.updatedate, os_text1, os_text2, os_text3, os_text4,
-    os_text5
+    os_text5,othspendings.creatorName, othspendings.createTime, os_auditman, os_auditdate
   </sql>
   <sql id="Detail_Column_List" >
     osd_type,osd_nowbalance,osd_remark
@@ -138,6 +142,12 @@
       <if test="os_text5 != null" >
         os_text5,
       </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="os_code != null" >
@@ -167,13 +177,13 @@
       <if test="os_amount != null" >
         #{os_amount,jdbcType=DOUBLE},
       </if>
-      now(),
+      <if test="os_recorderid != null" >
+        #{os_recorderid,jdbcType=INTEGER},
+      </if>
       <if test="os_recorder != null" >
         #{os_recorder,jdbcType=VARCHAR},
       </if>
-      <if test="os_recorddate != null" >
-        #{os_recorddate,jdbcType=TIMESTAMP},
-      </if>
+      now(),
       <if test="os_status != null" >
         #{os_status,jdbcType=VARCHAR},
       </if>
@@ -204,6 +214,12 @@
       <if test="os_text5 != null" >
         #{os_text5,jdbcType=VARCHAR},
       </if>
+      <if test="creatorName != null" >
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()

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

@@ -40,6 +40,10 @@
     <result column="pbd_sldate" jdbcType="TIMESTAMP" property="pbd_sldate" />
     <result column="pbd_amount" jdbcType="DOUBLE" property="pbd_amount" />
     <result column="pbd_nowbalance" jdbcType="DOUBLE" property="pbd_nowbalance" />
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="pb_auditdate" property="pb_auditdate" jdbcType="TIMESTAMP" />
+    <result column="pb_auditman" property="pb_auditman" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -103,7 +107,8 @@
     pb_id, pb_code, pb_kind, pb_date, pb_vendid, pb_vendcode, pb_vendname, pb_manname, 
     pb_pdamount, pb_pbdamount, pb_preamount, pb_discounts, pb_havebalance, pb_recorderid, 
     pb_recorder, pb_recorddate, pb_status, pb_statuscode, pb_remark, paybalance.companyId,
-    paybalance.updaterId,paybalance.updatedate, pb_text1, pb_text2, pb_text3, pb_text4, pb_text5
+    paybalance.updaterId,paybalance.updatedate, pb_text1, pb_text2, pb_text3, pb_text4, pb_text5, paybalance.creatorName,
+    paybalance.createTime, pb_auditdate, pb_auditman
   </sql>
   <sql id="left_Column_List">
     ve_leftamount
@@ -232,6 +237,12 @@
       <if test="pb_text5 != null">
         pb_text5,
       </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pb_code != null">
@@ -307,6 +318,12 @@
       <if test="pb_text5 != null">
         #{pb_text5,jdbcType=VARCHAR},
       </if>
+      <if test="creatorName != null" >
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()

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

@@ -40,6 +40,10 @@
     <result column="rbd_sldate" jdbcType="TIMESTAMP" property="rbd_sldate" />
     <result column="rbd_amount" jdbcType="DOUBLE" property="rbd_amount" />
     <result column="rbd_nowbalance" jdbcType="DOUBLE" property="rbd_nowbalance" />
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="rb_auditman" property="rb_auditman" jdbcType="VARCHAR" />
+    <result column="rb_auditdate" property="rb_auditdate" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -103,7 +107,8 @@
     rb_id, rb_code, rb_kind, rb_date, rb_custid, rb_custcode, rb_custname, rb_manname,
     rb_rdamount, rb_rbdamount, rb_preamount, rb_discounts, rb_havebalance, rb_recorderid,
     rb_recorder, rb_recorddate, rb_status, rb_statuscode, rb_remark, recbalance.companyId,
-    recbalance.updaterId,recbalance.updatedate, rb_text1, rb_text2, rb_text3, rb_text4, rb_text5
+    recbalance.updaterId,recbalance.updatedate, rb_text1, rb_text2, rb_text3, rb_text4, rb_text5,
+    recbalance.creatorName, recbalance.createTime, rb_auditman, rb_auditdate
   </sql>
   <sql id="left_Column_List">
     cu_leftamount
@@ -278,6 +283,12 @@
       <if test="rb_text5 != null">
         rb_text5,
       </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="rb_code != null">
@@ -353,6 +364,12 @@
       <if test="rb_text5 != null">
         #{rb_text5,jdbcType=VARCHAR},
       </if>
+      <if test="creatorName != null" >
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()

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

@@ -114,7 +114,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     @Transactional(propagation = Propagation.REQUIRED)
     public DocBaseDTO saveFormData(ProdInOutFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -299,7 +299,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleAudit(prodInOutDTO);
             } catch (Exception e) {
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -351,7 +352,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleUnAudit(prodInOutDTO);
             }catch (Exception e) {
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -393,7 +395,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         if ("采购验退单".equals(pi_class)) {
             count = getMapper().checkQtyFromProdIn(pu_code);
             if (count>0){
-                throw new BizException(500, "明细行数量超过来源采购验收单明细行数量");
+                throw new BizException(BizExceptionCode.PURCHASE_DETAIL_OVERNUM);
             }
         }
 

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

@@ -104,7 +104,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     @Transactional
     public DocBaseDTO saveFormData(PurchaseFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -242,7 +242,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
         String validate = purchaseMapper.validateAudit(baseDTOs.getBaseDTOs());
         if (!StringUtils.isEmpty(validate)) {
-            throw new BizException(500, "存在已审核单据,单据编号:" + validate);
+            String msg = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getMessage();
+            int code = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getCode();
+            throw new BizException(code, String.format(msg, validate));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleAudit(base.getId());
@@ -268,7 +270,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         String code = purchaseMapper.validateUnAudit(id);
         if (null != code) {
-            throw new BizException(500, "单据:" + code + " 未审核,无法反审核");
+            throw new BizException(BizExceptionCode.BIZ_UNAUDITED);
         }
         singleUnAudit(id);
     }
@@ -282,7 +284,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
         String msg = purchaseMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
         if (null != msg) {
-            throw new BizException(500, "存在未审核单据,单据编号:" + msg);
+            String message = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getMessage();
+            int code = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getCode();
+            throw new BizException(code, String.format(message, msg));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleUnAudit(base.getId());
@@ -492,7 +496,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Transactional
-    private Result singleAudit(Long id) {
+    public Result singleAudit(Long id) {
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         Result result = Result.success(docBaseDTO);
         //检查最小包装数
@@ -514,7 +518,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Transactional
-    private void singleUnAudit(Long id) {
+    public void singleUnAudit(Long id) {
         Purchase purchase = new Purchase();
         //检查是否已转验收单
         Integer num = getMapper().checkTurnInstatus(id);
@@ -534,7 +538,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Transactional
-    private void singleDelete(Long id) {
+    public void singleDelete(Long id) {
         if (null != id) {
             //从表删除
             purchasedetailMapper.deleteByForeignKey(id);
@@ -599,7 +603,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Transactional
-    private void calcPurchase(Long pu_id) {
+    public void calcPurchase(Long pu_id) {
         purchasedetailMapper.calcPurchase(pu_id);
     }
 

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

@@ -71,7 +71,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     public DocBaseDTO saveFormData(ProdInOutFormDTO formdata) {
 
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -224,7 +224,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             try{
                 singleDelete(base.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -286,7 +287,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleAudit(prodInOutDTO);
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -339,7 +341,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleUnAudit(prodInOutDTO);
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -515,7 +518,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             try{
                 close(base.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -549,7 +553,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             try{
                 open(base.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();

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

@@ -94,7 +94,7 @@ public class SaleServiceImpl implements SaleService{
     @Transactional
     public DocBaseDTO saveFormData(SaleFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -262,7 +262,9 @@ public class SaleServiceImpl implements SaleService{
 
         String validate = saleMapper.validateAudit(baseDTOs.getBaseDTOs());
         if (!StringUtils.isEmpty(validate)) {
-            throw new BizException(500, "存在已审核单据,单据编号:" + validate);
+            String message = BizExceptionCode.SALE_ORDER_HASAUDIT.getMessage();
+            int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
+            throw new BizException(code, String.format(message, validate));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleAudit(base.getId());
@@ -310,7 +312,9 @@ public class SaleServiceImpl implements SaleService{
 
         String msg = saleMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
         if (null != msg) {
-            throw new BizException(500, "存在未审核单据,单据编号:" + msg);
+            String message = BizExceptionCode.SALE_ORDER_HASAUDIT.getMessage();
+            int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
+            throw new BizException(code, String.format(message, msg));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleUnAudit(base.getId());

+ 15 - 7
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java

@@ -166,7 +166,9 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
                     onHand=0d;
                 }
                 if(onHand < qty){
-                    throw new BizException(79402, "行" + i + "库存不足");
+                    String msg = BizExceptionCode.UNENOUGH_DETAIL_STOCK.getMessage();
+                    int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
+                    throw new BizException(code, String.format(msg, i));
                 }
             }
         }else if ("拆件".equals(make.getMa_type())){
@@ -175,10 +177,14 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             try {
                 onHand = getMapper().getOnHand(make.getMa_prodcode(), make.getMa_whcode(), BaseContextHolder.getCompanyId());
             }catch (Exception e){
-                throw new BizException(79402, make.getMa_prodcode() + ":库存不足");
+                String msg = BizExceptionCode.UNENOUGH_STOCK.getMessage();
+                int code = BizExceptionCode.UNENOUGH_STOCK.getCode();
+                throw new BizException(code, String.format(msg, make.getMa_prodcode()));
             }
             if(onHand < qty){
-                throw new BizException(79402, make.getMa_prodcode() + ":库存不足");
+                String msg = BizExceptionCode.UNENOUGH_STOCK.getMessage();
+                int code = BizExceptionCode.UNENOUGH_STOCK.getCode();
+                throw new BizException(code, String.format(msg, make.getMa_prodcode()));
             }
         }
     }
@@ -323,7 +329,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
      * @param makeListDTO
      */
     @Transactional(rollbackFor = Exception.class)
-    private void generateProdIO(MakeListDTO makeListDTO) {
+    public void generateProdIO(MakeListDTO makeListDTO) {
         Make make = makeListDTO.getMain();
         Long ma_id = make.getId();
         List<MakeMaterial> items = makeListDTO.getItems();
@@ -619,7 +625,8 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             try{
                 close(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -632,7 +639,8 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             try{
                 open(docBaseDTO.getId());
             }catch (Exception e){
-                errorMsg.append("编号:" + docBaseDTO.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -657,7 +665,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
      * @param make
      */
     @Transactional(rollbackFor = Exception.class)
-    private void selectProdIO(Make make) {
+    public void selectProdIO(Make make) {
         String code = make.getMa_code();
         String type = make.getMa_type();
         String outCode="";

+ 5 - 3
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java

@@ -106,7 +106,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     @Transactional(propagation = Propagation.REQUIRED)
     public DocBaseDTO saveFormData(ProdInOutFormDTO formdata) {
         if (null == formdata || null == formdata.getMain()){
-            throw new BizException(500, "数据为空,请填写后再保存");
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         //公司ID
         Long companyId = BaseContextHolder.getCompanyId();
@@ -277,7 +277,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleAudit(prodInOutDTO);
             } catch (Exception e){
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();
@@ -329,7 +330,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
                 singleUnAudit(prodInOutDTO);
             }catch (Exception e) {
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, base.getCode(), e.getMessage()));
             }
         }
         return errorMsg.toString();

+ 4 - 0
base-servers/account/account-dto/pom.xml

@@ -22,6 +22,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>commons-dto</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>file-dto</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 39 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyDTO.java

@@ -1,8 +1,11 @@
 package com.usoftchina.saas.account.dto;
 
+import com.usoftchina.saas.file.dto.FileInfoDTO;
 import io.swagger.annotations.ApiModel;
 
 import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @author yingp
@@ -21,6 +24,42 @@ public class CompanyDTO implements Serializable{
     private String businessCode;
     private String address;
     private String logoUrl;
+    private String tel;
+    private String fax;
+    private String signet;      //电子章
+    private List<Map<String, FileInfoDTO>> fileInfoList;
+
+    public List<Map<String, FileInfoDTO>> getFileInfoList() {
+        return fileInfoList;
+    }
+
+    public void setFileInfoList(List<Map<String, FileInfoDTO>> fileInfoList) {
+        this.fileInfoList = fileInfoList;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getSignet() {
+        return signet;
+    }
+
+    public void setSignet(String signet) {
+        this.signet = signet;
+    }
     private Long uu;
 
     public Long getId() {

+ 41 - 5
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyRegDTO.java

@@ -10,6 +10,7 @@ import java.io.Serializable;
  */
 @ApiModel(value = "CompanyReg", description = "公司注册信息")
 public class CompanyRegDTO implements Serializable{
+    private Long id;
     /**
      * 唯一名称
      */
@@ -19,7 +20,42 @@ public class CompanyRegDTO implements Serializable{
      */
     private String businessCode;
     private String address;
-    private String logoUrl;
+    private String logoId;
+    private String tel;
+    private String fax;
+    private String signet;      //电子章
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getSignet() {
+        return signet;
+    }
+
+    public void setSignet(String signet) {
+        this.signet = signet;
+    }
 
     public String getName() {
         return name;
@@ -46,11 +82,11 @@ public class CompanyRegDTO implements Serializable{
     }
 
     public String getLogoUrl() {
-        return logoUrl;
+        return logoId;
     }
 
-    public void setLogoUrl(String logoUrl) {
-        this.logoUrl = logoUrl;
+    public void setLogoUrl(String logoId) {
+        this.logoId = logoId;
     }
 
     @Override
@@ -59,7 +95,7 @@ public class CompanyRegDTO implements Serializable{
                 "name='" + name + '\'' +
                 ", businessCode='" + businessCode + '\'' +
                 ", address='" + address + '\'' +
-                ", logoUrl='" + logoUrl + '\'' +
+                ", logoUrl='" + logoId + '\'' +
                 '}';
     }
 }

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

@@ -21,10 +21,18 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>account-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>file-api</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>auth-client</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>file-dto</artifactId>
+        </dependency>
         <!-- db -->
         <dependency>
             <groupId>mysql</groupId>
@@ -34,6 +42,10 @@
             <groupId>org.mybatis.spring.boot</groupId>
             <artifactId>mybatis-spring-boot-starter</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
         <!-- sleuth -->
         <dependency>
             <groupId>org.springframework.cloud</groupId>

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

@@ -5,6 +5,7 @@ import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 /**
@@ -13,6 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
  */
 @SpringBootApplication
 @EnableEurekaClient
+@EnableFeignClients("com.usoftchina.saas")
 @EnableTransactionManagement
 @MapperScan(basePackages = "com.usoftchina.saas.account.mapper")
 @EnableAuthClient

+ 9 - 2
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java

@@ -9,8 +9,11 @@ import com.usoftchina.saas.account.service.RoleService;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
 import com.usoftchina.saas.auth.client.annotation.IgnoreAuth;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.ExceptionCode;
+import com.usoftchina.saas.page.PageDefault;
+import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.RegexpUtils;
@@ -321,9 +324,13 @@ public class AccountController {
         return Result.success();
     }
 
+    /**
+     * 账户角色列表
+     * @return
+     */
     @GetMapping("/accountRole/list")
-    public Result getAccountRole(){
-        return Result.success(accountService.selectAccountRole());
+    public Result getAccountRole(@PageDefault(number = 1, size = 10) PageRequest pageRequest, ListReqDTO listReqDTO){
+        return Result.success(accountService.selectAccountRole(pageRequest, listReqDTO));
     }
 
     /**

+ 12 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/CompanyController.java

@@ -8,10 +8,14 @@ import com.usoftchina.saas.account.service.CompanyService;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.ExceptionCode;
+import com.usoftchina.saas.file.dto.FileInfoDTO;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author yingp
  * @date 2018/10/2
@@ -47,6 +51,12 @@ public class CompanyController {
         return Result.success();
     }
 
+    @PostMapping("/save")
+    public Result save(@RequestBody CompanyRegDTO companyRegDTO){
+        companyService.update(companyRegDTO);
+        return Result.success();
+    }
+
     /**
      * 从其他平台复制已注册企业信息
      *
@@ -143,8 +153,10 @@ public class CompanyController {
     @GetMapping(path = "/read/current")
     public Result<CompanyDTO> getCurrentCompany() {
         Company company = companyService.findByPrimaryKey(BaseContextHolder.getCompanyId());
+        List<Map<String, FileInfoDTO>> fileInfoList = companyService.getFileByCompany(company);
         if (null != company) {
             CompanyDTO companyDTO = BeanMapper.map(company, CompanyDTO.class);
+            companyDTO.setFileInfoList(fileInfoList);
             return Result.success(companyDTO);
         }
         return Result.error(ExceptionCode.COMPANY_NOT_EXIST);

+ 7 - 1
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/AccountRoleMapper.java

@@ -49,5 +49,11 @@ public interface AccountRoleMapper {
      */
     void deleteByRoleId(@Param("roleId") Long roleId);
 
-    List<AccountRoleDTO> selectAccountRole();
+    List<AccountRoleDTO> selectAccountRole(@Param("condition") String condition, @Param("companyId") Long companyId);
+
+    /**
+     * 解除账户绑定的所有角色
+     * @param id
+     */
+    void unBindRolesById(Long id);
 }

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

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account.mapper;
 
+import com.usoftchina.saas.account.dto.CompanyRegDTO;
 import com.usoftchina.saas.account.po.Company;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
 import org.apache.ibatis.annotations.Param;
@@ -75,5 +76,10 @@ public interface CompanyMapper {
      */
     int deleteByPrimaryKey(@Param("id") Long id);
 
-
+    /**
+     * 更新
+     * @param companyRegDTO
+     * @return
+     */
+    int updateByPrimaryKeySelective(CompanyRegDTO companyRegDTO);
 }

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

@@ -24,6 +24,34 @@ public class Company implements Serializable {
      * 企业logo
      */
     private String logoUrl;
+    private String tel;
+    private String fax;
+    private String signet;
+
+    public String getTel() {
+        return tel;
+    }
+
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getSignet() {
+        return signet;
+    }
+
+    public void setSignet(String signet) {
+        this.signet = signet;
+    }
+
     private Date createTime;
     private long creatorId;
     private Date updateTime;

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

@@ -1,8 +1,11 @@
 package com.usoftchina.saas.account.service;
 
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.account.dto.AccountRoleDTO;
 import com.usoftchina.saas.account.po.Account;
 import com.usoftchina.saas.account.po.RoleResource;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.page.PageRequest;
 
 import java.util.List;
 
@@ -129,7 +132,7 @@ public interface AccountService {
      * 账号+角色信息列表
      * @return
      */
-    List<AccountRoleDTO> selectAccountRole();
+    PageInfo<AccountRoleDTO> selectAccountRole(PageRequest pageRequest, ListReqDTO listReqDTO);
 
     /**
      * 解除个人账号与角色的绑定

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

@@ -1,9 +1,12 @@
 package com.usoftchina.saas.account.service;
 
+import com.usoftchina.saas.account.dto.CompanyRegDTO;
 import com.usoftchina.saas.account.po.Company;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
+import com.usoftchina.saas.file.dto.FileInfoDTO;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author yingp
@@ -50,6 +53,14 @@ public interface CompanyService {
      */
     Company findByPrimaryKey(Long id);
 
+    /**
+     * 查找公司的附件信息
+     *
+     * @param company
+     * @return
+     */
+    List<Map<String,FileInfoDTO>> getFileByCompany(Company company);
+
     /**
      * 按个人账户查找全部绑定企业
      *
@@ -81,4 +92,10 @@ public interface CompanyService {
      * @param appId
      */
     void unbindApp(long companyId, String appId);
+
+    /**
+     * 更新公司信息
+     * @param companyRegDTO
+     */
+    void update(CompanyRegDTO companyRegDTO);
 }

+ 21 - 2
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/AccountServiceImpl.java

@@ -1,5 +1,7 @@
 package com.usoftchina.saas.account.service.impl;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.account.cache.AccountCache;
 import com.usoftchina.saas.account.dto.AccountRoleDTO;
 import com.usoftchina.saas.account.mapper.AccountCompanyMapper;
@@ -11,7 +13,9 @@ import com.usoftchina.saas.account.po.Role;
 import com.usoftchina.saas.account.po.RoleResource;
 import com.usoftchina.saas.account.service.AccountService;
 import com.usoftchina.saas.account.service.RoleService;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -121,6 +125,7 @@ public class AccountServiceImpl implements AccountService {
 
     @Override
     public void bindRoles(Long accountId, String roleIds) {
+        accountRoleMapper.unBindRolesById(accountId);
         String[] array = roleIds.split(",");
         for (int i = 0; i < array.length; i++){
             bindRole(accountId, Long.parseLong(array[i]));
@@ -128,8 +133,22 @@ public class AccountServiceImpl implements AccountService {
     }
 
     @Override
-    public List<AccountRoleDTO> selectAccountRole(){
-        return accountRoleMapper.selectAccountRole();
+    public PageInfo<AccountRoleDTO> selectAccountRole(PageRequest page, ListReqDTO listReqDTO){
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<AccountRoleDTO> accountRoleDTOList = getList(listReqDTO);
+        //取分页信息
+        PageInfo<AccountRoleDTO> pageInfo = new PageInfo<AccountRoleDTO>(accountRoleDTOList);
+        return pageInfo;
+    }
+
+    private List<AccountRoleDTO> getList(ListReqDTO listReqDTO) {
+        Long companyId = BaseContextHolder.getCompanyId();
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<AccountRoleDTO> AccountRoleDTOList = accountRoleMapper.selectAccountRole(condition, companyId);
+        return AccountRoleDTOList;
     }
 
     @Override

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

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account.service.impl;
 
+import com.usoftchina.saas.account.dto.CompanyRegDTO;
 import com.usoftchina.saas.account.mapper.AccountCompanyMapper;
 import com.usoftchina.saas.account.mapper.CompanyAppMapper;
 import com.usoftchina.saas.account.mapper.CompanyMapper;
@@ -7,12 +8,14 @@ import com.usoftchina.saas.account.po.Company;
 import com.usoftchina.saas.account.service.CompanyService;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.file.api.FileApi;
+import com.usoftchina.saas.file.dto.FileInfoDTO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
 
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * @author yingp
@@ -30,6 +33,9 @@ public class CompanyServiceImpl implements CompanyService{
     @Autowired
     private CompanyAppMapper companyAppMapper;
 
+    @Autowired
+    private FileApi fileApi;
+
     @Override
     public boolean save(Company company) {
         Date nowDate = new Date();
@@ -41,6 +47,13 @@ public class CompanyServiceImpl implements CompanyService{
         return companyMapper.insert(company) > 0;
     }
 
+    @Override
+    public void update(CompanyRegDTO companyRegDTO){
+        if (companyRegDTO.getId() > 0) {
+            companyMapper.updateByPrimaryKeySelective(companyRegDTO);
+        }
+    }
+
     @Override
     public Company findByName(String name) {
         return companyMapper.selectByName(name);
@@ -61,6 +74,20 @@ public class CompanyServiceImpl implements CompanyService{
         return companyMapper.selectByPrimaryKey(id);
     }
 
+    @Override
+    public List<Map<String, FileInfoDTO>> getFileByCompany(Company company){
+        List<Map<String,FileInfoDTO>> fileInfoList = new ArrayList<Map<String, FileInfoDTO>>();
+        Map<String, FileInfoDTO> fileInfoMap = new HashMap<String, FileInfoDTO>();
+        if (!StringUtils.isEmpty(company.getLogoUrl())){
+            fileInfoMap.put("logo", fileApi.getFileInfoByPath(company.getLogoUrl()).getData());
+        }
+        if (!StringUtils.isEmpty(company.getSignet())){
+            fileInfoMap.put("signet", fileApi.getFileInfoByPath(company.getSignet()).getData());
+        }
+        fileInfoList.add(fileInfoMap);
+        return fileInfoList;
+    }
+
     @Override
     public List<CompanyBaseVO> findBaseByAccountId(Long accountId) {
         return companyMapper.selectBaseByAccountId(accountId);

+ 11 - 0
base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml

@@ -21,6 +21,17 @@
         FROM ac_account a
         left join ac_account_role b on a.id=b.account_id
         left join ac_role c  on b.role_id = c.id
+        <where>
+            <if test="condition!=null">
+                ${condition}
+            </if>
+            <if test="companyId!=null">
+                AND C.COMPANY_ID = #{companyId}
+            </if>
+        </where>
         group by a.id,a.username,a.realname,a.email,a.mobile
     </select>
+    <delete id="unBindRolesById" parameterType="java.lang.Long">
+        DELETE FROM AC_ACCOUNT_COMPANY WHERE ACCOUNT_ID = #{id}
+    </delete>
 </mapper>

+ 32 - 4
base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml

@@ -12,6 +12,11 @@
         <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
         <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="fax" jdbcType="VARCHAR" property="fax"/>
+        <result column="tel" jdbcType="VARCHAR" property="tel"/>
+        <result column="signet" jdbcType="VARCHAR" property="signet"/>
+        <result column="uu" jdbcType="VARCHAR" property="uu"/>
+        <result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
     </resultMap>
     <resultMap id="BaseResultMap" type="com.usoftchina.saas.account.vo.CompanyBaseVO">
         <id column="id" jdbcType="BIGINT" property="id"/>
@@ -19,14 +24,16 @@
         <result column="logo_url" jdbcType="VARCHAR" property="logoUrl"/>
     </resultMap>
     <sql id="baseColumns">
-        id,name,business_code,address,uu,creator_id,create_time,updater_id,update_time
+        id,name,business_code,address,uu,creator_id,create_time,updater_id,update_time,fax,tel,signet,uu,logo_url
     </sql>
     <insert id="insert" parameterType="com.usoftchina.saas.account.po.Company"
             useGeneratedKeys="true" keyProperty="id">
-        insert into ac_company(name, business_code, address, logo_url, uu, creator_id, create_time, updater_id, update_time)
+        insert into ac_company(name, business_code, address, logo_url, creator_id, create_time, updater_id, update_time,
+        tel, fax, signet, uu)
         values (#{name,jdbcType=VARCHAR}, #{businessCode,jdbcType=VARCHAR},
-        #{address,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR}, #{uu,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
-        #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
+        #{address,jdbcType=VARCHAR}, #{logoUrl,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
+        #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
+        #{tel,jdbcType=VARCHAR}, #{fax,jdbcType=VARCHAR}, #{signet,jdbcType=VARCHAR}, #{uu,jdbcType=VARCHAR})
     </insert>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.account.po.Company"
             useGeneratedKeys="true" keyProperty="id">
@@ -109,4 +116,25 @@
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
         delete from ac_company where id=#{id,jdbcType=BIGINT}
     </delete>
+    <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.account.po.Company">
+        UPDATE ac_company
+        <set>
+            <if test="address != null">
+                address = #{address,jdbcType=VARCHAR},
+            </if>
+            <if test="logoUrl != null">
+                logo_url = #{logoUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="tel != null">
+                tel = #{tel,jdbcType=VARCHAR},
+            </if>
+            <if test="fax != null">
+                fax = #{fax,jdbcType=VARCHAR},
+            </if>
+            <if test="signet != null">
+                signet = #{signet,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id}
+    </update>
 </mapper>

+ 13 - 13
base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java

@@ -39,7 +39,7 @@ public interface FileApi {
      * @return
      */
     @PostMapping(value = "/folder")
-    Result<FolderDTO> createFolder(FolderSaveDTO newFolder);
+    Result<FolderDTO> createFolder(@RequestBody FolderSaveDTO newFolder);
 
     /**
      * 根据id查看文件详情
@@ -57,7 +57,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/info")
-    Result<FileInfoDTO> getFileInfoByPath(@RequestParam String path);
+    Result<FileInfoDTO> getFileInfoByPath(@RequestParam("path") String path);
 
     /**
      * 查看子文件
@@ -66,7 +66,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/list")
-    Result<List<FileInfoDTO>> listFiles(Long folderId);
+    Result<List<FileInfoDTO>> listFiles(@RequestParam("folderId") Long folderId);
 
     /**
      * 上传文件到指定文件夹
@@ -77,7 +77,7 @@ public interface FileApi {
      * @throws Exception
      */
     @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
-    Result<FileInfoDTO> upload(Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception;
+    Result<FileInfoDTO> upload(@RequestParam("folderId") Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception;
 
     /**
      * 文件下载
@@ -86,7 +86,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/download/{id}")
-    byte[] download(@PathVariable Long id);
+    byte[] download(@PathVariable("id") Long id);
 
     /**
      * 文件下载
@@ -95,7 +95,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/download")
-    byte[] downloadByPath(@RequestParam String path);
+    byte[] downloadByPath(@RequestParam("path") String path);
 
     /**
      * 删除文件
@@ -105,8 +105,8 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/delete/{id}")
-    Result delete(@PathVariable Long id,
-                  @RequestParam(required = false, defaultValue = "false") Boolean purge);
+    Result delete(@PathVariable("id") Long id,
+                  @RequestParam(required = false, defaultValue = "false", value = "purge") Boolean purge);
 
     /**
      * 删除文件
@@ -116,8 +116,8 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/delete")
-    Result deleteByPath(@PathVariable Long id,
-                  @RequestParam(required = false, defaultValue = "false") Boolean purge);
+    Result deleteByPath(@PathVariable("id") Long id,
+                  @RequestParam(required = false, defaultValue = "false", value = "purge") Boolean purge);
 
     /**
      * 还原文件
@@ -126,7 +126,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/restore/{id}")
-    Result restore(@PathVariable Long id);
+    Result restore(@PathVariable("id") Long id);
 
     /**
      * 还原文件
@@ -135,7 +135,7 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/restore")
-    Result restoreByPath(@RequestParam String path);
+    Result restoreByPath(@RequestParam("path") String path);
 
     /**
      * 移动文件到文件夹
@@ -145,5 +145,5 @@ public interface FileApi {
      * @return
      */
     @GetMapping(value = "/move")
-    Result move(@RequestParam Long fileId, @RequestParam Long folderId);
+    Result move(@RequestParam("fileId") Long fileId, @RequestParam("folderId") Long folderId);
 }

+ 2 - 0
base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/FileApplication.java

@@ -10,6 +10,7 @@ import org.springframework.context.annotation.EnableMBeanExport;
 import org.springframework.context.annotation.Import;
 import org.springframework.jmx.support.RegistrationPolicy;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
 /**
  * @author yingp
@@ -22,6 +23,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 @EnableAuthClient
 @Import(FdfsClientConfig.class)
 @EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
+@EnableSwagger2
 public class FileApplication {
     public static void main(String[] args) {
         SpringApplication.run(FileApplication.class, args);

+ 16 - 16
base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java

@@ -82,7 +82,7 @@ public class FileController {
 
     @ApiOperation(value = "创建文件夹")
     @PostMapping(value = "/folder")
-    public Result<FolderDTO> createFolder(FolderSaveDTO newFolder) {
+    public Result<FolderDTO> createFolder(@RequestBody FolderSaveDTO newFolder) {
         BizAssert.notNull(newFolder.getName(), ExceptionCode.FOLDER_NAME_EMPTY);
         // 检查父文件夹
         FileInfo parent = checkFolder(newFolder.getFolderId());
@@ -93,7 +93,7 @@ public class FileController {
 
     @ApiOperation(value = "上传文件")
     @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
-    public Result<FileInfoDTO> upload(Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception {
+    public Result<FileInfoDTO> upload(@RequestParam("folderId") Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception {
         // 检查父文件夹
         FileInfo parent = checkFolder(folderId);
         FileInfo info = FileInfo.newFile(file).folder(parent.getId())
@@ -104,7 +104,7 @@ public class FileController {
 
     @ApiOperation(value = "下载文件")
     @GetMapping(value = "/download/{id}")
-    public void download(@PathVariable Long id, HttpServletResponse response) throws Exception {
+    public void download(@PathVariable("id") Long id, HttpServletResponse response) throws Exception {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null == info) {
             throw new BizException(ExceptionCode.FILE_NOT_EXISTS);
@@ -135,7 +135,7 @@ public class FileController {
 
     @ApiOperation(value = "下载文件")
     @GetMapping(value = "/download")
-    public void download(@RequestParam String path, HttpServletResponse response) throws Exception {
+    public void download(@RequestParam("path") String path, HttpServletResponse response) throws Exception {
         FileInfo info = fileService.findByFullPath(path);
         if (null == info) {
             throw new BizException(ExceptionCode.FILE_NOT_EXISTS);
@@ -145,7 +145,7 @@ public class FileController {
 
     @ApiOperation(value = "查看文件")
     @GetMapping(value = "/view/{id}")
-    public void view(@PathVariable Long id, HttpServletResponse response) throws Exception {
+    public void view(@PathVariable("id") Long id, HttpServletResponse response) throws Exception {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null == info) {
             throw new BizException(ExceptionCode.FILE_NOT_EXISTS);
@@ -169,7 +169,7 @@ public class FileController {
 
     @ApiOperation(value = "查看文件")
     @GetMapping(value = "/view")
-    public void view(@RequestParam String path, HttpServletResponse response) throws Exception {
+    public void view(@RequestParam("path") String path, HttpServletResponse response) throws Exception {
         FileInfo info = fileService.findByFullPath(path);
         if (null == info) {
             throw new BizException(ExceptionCode.FILE_NOT_EXISTS);
@@ -179,7 +179,7 @@ public class FileController {
 
     @ApiOperation(value = "查看文件信息")
     @GetMapping(value = "/info/{id}")
-    public Result<FileInfoDTO> getFileInfo(@PathVariable Long id) {
+    public Result<FileInfoDTO> getFileInfo(@PathVariable("id") Long id) {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null != info) {
             return Result.success(BeanMapper.map(info, FileInfoDTO.class));
@@ -189,7 +189,7 @@ public class FileController {
 
     @ApiOperation(value = "查看文件信息")
     @GetMapping(value = "/info")
-    public Result<FileInfoDTO> getFileInfo(@RequestParam String path) {
+    public Result<FileInfoDTO> getFileInfo(@RequestParam("path") String path) {
         FileInfo info = fileService.findByFullPath(path);
         if (null != info) {
             return Result.success(BeanMapper.map(info, FileInfoDTO.class));
@@ -199,7 +199,7 @@ public class FileController {
 
     @ApiOperation(value = "查看子文件")
     @GetMapping(value = "/list")
-    public Result<List<FileInfoDTO>> listFiles(Long folderId) {
+    public Result<List<FileInfoDTO>> listFiles(@RequestParam("folderId") Long folderId) {
         List<FileInfo> files = fileService.findByFolderId(checkFolder(folderId).getId());
         return Result.success(BeanMapper.mapList(files, FileInfoDTO.class));
     }
@@ -287,8 +287,8 @@ public class FileController {
 
     @ApiOperation(value = "删除文件")
     @GetMapping(value = "/delete/{id}")
-    public Result delete(@PathVariable Long id,
-                         @RequestParam(required = false, defaultValue = "false") Boolean purge) {
+    public Result delete(@PathVariable("id") Long id,
+                         @RequestParam(required = false, defaultValue = "false", value = "purge") Boolean purge) {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null != info) {
             if (purge) {
@@ -302,8 +302,8 @@ public class FileController {
 
     @ApiOperation(value = "删除文件")
     @GetMapping(value = "/delete")
-    public Result delete(@RequestParam String path,
-                         @RequestParam(required = false, defaultValue = "false") Boolean purge) {
+    public Result delete(@RequestParam("id") String path,
+                         @RequestParam(required = false, defaultValue = "false", value = "purge") Boolean purge) {
         FileInfo info = fileService.findByFullPath(path);
         if (null != info) {
             if (purge) {
@@ -317,7 +317,7 @@ public class FileController {
 
     @ApiOperation(value = "还原文件")
     @GetMapping(value = "/restore/{id}")
-    public Result restore(@PathVariable Long id) {
+    public Result restore(@PathVariable("id") Long id) {
         FileInfo info = fileService.findByPrimaryKey(id);
         if (null != info) {
             cascadeRestore(info);
@@ -327,7 +327,7 @@ public class FileController {
 
     @ApiOperation(value = "还原文件")
     @GetMapping(value = "/restore")
-    public Result restore(@RequestParam String path) {
+    public Result restore(@RequestParam("path") String path) {
         FileInfo info = fileService.findByFullPath(path);
         if (null != info) {
             cascadeRestore(info);
@@ -337,7 +337,7 @@ public class FileController {
 
     @ApiOperation(value = "移动文件到文件夹")
     @GetMapping(value = "/move")
-    public Result move(@RequestParam Long fileId, @RequestParam Long folderId) {
+    public Result move(@RequestParam("fileId") Long fileId, @RequestParam("folderId") Long folderId) {
         FileInfo info = fileService.findByPrimaryKey(fileId);
         if (null != info) {
             info.setFolderId(folderId);

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

@@ -104,10 +104,6 @@ spring:
         - Path=/api/commons/**
         filters:
         - RewritePath=/api/commons/(?<segment>.*), /$\{segment}
-      - id: SOCKET-SERVER
-        uri: lb:ws://SOCKET-SERVER
-        predicates:
-        - Path=/ws/**
   redis:
     host: 192.168.253.12
     port: 6379
@@ -179,7 +175,6 @@ auth:
   public-key: auth/pub.key
   ignores:
     - /api/auth/authorize
-    - /api/auth/sso/callback/**
     - /api/account/account/register
     - /api/auth/info
-    - /ws/**
+    - /api/file/download

+ 4 - 4
frontend/saas-web/app/Application.scss

@@ -230,10 +230,10 @@ body.launching {
 }
 
 .x-panel-default-outer-border-rl {
-  border-right-color: #ABDAFF;
-  border-right-width: 1px;
-  border-left-color: #ABDAFF;
-  border-left-width: 1px;
+  border-right-color: #ABDAFF !important;
+  border-right-width: 1px !important;
+  border-left-color: #ABDAFF !important;
+  border-left-width: 1px !important;
 }
 
 .x-grid-item-alt {

+ 7 - 4
frontend/saas-web/app/view/core/base/BasePanel.js

@@ -13,8 +13,8 @@ Ext.define('saas.view.core.base.BasePanel', {
     //基础属性
     frame:false,
     autoScroll: true,
-    border: 1,
-    bodyPadding: 5,
+    border: 0,
+    bodyPadding: 0,
     layout: 'fit',
     
     fieldDefaults: {
@@ -46,10 +46,12 @@ Ext.define('saas.view.core.base.BasePanel', {
                 xtype: 'toolbar',
                 dock: 'top',
                 style: {
-                    'border-bottom': '1px solid #35baf6 !important'
+                    // 'border-bottom': '1px solid #35baf6 !important',
+                    margin: '0 0 12px 0',
+                    padding: '10px 0 14px 8px',
                 },
                 items: me.searchField.concat([{
-                    cls:'x-formpanel-btn-orange',
+                    // cls:'x-formpanel-btn-orange',
                     xtype: 'button',
                     text: '查询',
                     handler: 'query'
@@ -58,6 +60,7 @@ Ext.define('saas.view.core.base.BasePanel', {
             items: [{
                 layout: 'fit',
                 xtype: 'core-base-gridpanel',
+                padding: '8 12',
                 dataUrl: gridDataUrl,
                 idField: gridIdField,
                 codeField: gridCodeField,

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

@@ -1,4 +1,6 @@
 .core-base-basepanel{
+    background: #EEF4F9;
+
     .x-panel-default-outer-border-trl {
         border-top-color: #fff !important;
         border-top-width: 1px !important;

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

@@ -222,7 +222,7 @@ Ext.define('saas.view.core.base.GridPanel', {
     insertFirstColumn:function(columns){
         var me=this;
         if(columns.length>0 && columns[0].xtype!='actioncolumn'){
-            return Ext.Array.insert(columns,0,[{
+            Ext.Array.insert(columns,0,[{
                 xtype:'actioncolumn',
                 width:70,
                 dataIndex:'actioncolumn',
@@ -239,6 +239,12 @@ Ext.define('saas.view.core.base.GridPanel', {
                 }]
             }]);
         }
+        if(columns[columns.length - 1].flex != 1) {
+            columns.push({
+                flex: 1,
+                allowBlank: true
+            });
+        }
         return columns;
     },
 

+ 21 - 43
frontend/saas-web/app/view/core/form/DataMultiCombo.js

@@ -18,53 +18,31 @@ Ext.define('saas.view.core.form.DataMultiCombo', {
             Ext.Ajax.request({  
                 url : me.dataUrl,
                 timeout: 100000000,  
-                method : 'post',  
-                params : {}  ,
+                async:false,
                 headers:{
                     'Access-Control-Allow-Origin': '*',
-                    'Authorization':  saas.util.State.get('session').token
+                    'Authorization':  saas.util.State.get('session').token,
+                    "Content-Type": 'application/json;charset=UTF-8'
                 },
                 success: function(fp, o){
-                    // if(o.result.error){
-                    //     showError(o.result.error);
-                    // } else {
-                    //     var msg = Ext.getCmp('baseform').ownerCt.ownerCt.down('htmleditor[name=msg]');
-                    //     var imgel=msg.getEl().dom.getElementsByTagName('iframe')[0].contentWindow.document.body;
-                    //     if(imgel.getElementsByTagName('img').length>0){
-                    //       imgel.removeChild(imgel.getElementsByTagName('img')[0]);
-                    //     }
-                    //     //Ext.getCmp('baseform').ownerCt.ownerCt.down('hidden').setValue('../../../'+o.result.path);
-                    //     Ext.getCmp('baseform').ownerCt.setValue(o.result.path);
-                    //     var element = document.createElement("img");
-                    //     element.src = basePath + 'common/download.action?path=' + o.result.path.replace(/\+/g, '%2B');
-                    //     element.style="width:100%;height:100%";            
-                    //     element.title = '&img' + o.result.filepath + ";";
-                    //     msg.setValue('<img src="'+element.src+'" style=width:100%;height:100%;>');
-                    // }
+                    var res = Ext.decode(fp.responseText);
+                    var data = res.data,datas=[];
+                    if(data.length>0){
+                        Ext.each(data, function(item, index){
+                            var o = [];
+                            o[0] = item.name;
+                            o[1] = item.id;
+                            datas.push(o);
+                        });
+                    }else{
+                        saas.util.BaseUtil.showToast('下拉框读取数据为空!');
+                    }
+                    me.datas = datas;
                 },
                 failure: function (response, opts) {
                     saas.util.BaseUtil.showToast('上传失败: ' + response.responseText);
                 }
             });
-            me.BaseUtil.request({
-                url: me.dataUrl,
-                params: '',
-                method: 'POST',
-                async:false
-            })
-            .then(function(localJson) {
-                if(localJson.success){
-                }
-            })
-            .catch(function(res) {
-                console.error(res);
-                saas.util.BaseUtil.showToast('保存失败: ' + res.message);
-            });
-
-            // datas: [
-            //     ["已审核", "已审核"],
-            //     ["未审核", "未审核"]
-            // ]
         }
         me.callParent(arguments);
     },
@@ -114,12 +92,12 @@ Ext.define('saas.view.core.form.DataMultiCombo', {
         for (; i < itemsLn; i++) {
             item = items[i];
             var checked = !!value.find(function(v) {
-                return v.value = iem[0];
+                return v.value == item[1];
             });
             menuItem = new Ext.menu.CheckItem({
-                text: item[1],
+                text: item[0],
                 checked: checked,
-                checkValue:item[0],
+                checkValue:item[1],
                 hideOnClick: false,
                 checkHandler: this.onCheckChange,
                 scope: this
@@ -155,8 +133,8 @@ Ext.define('saas.view.core.form.DataMultiCombo', {
                     return d[0] == item;
                 });
                 items[index] = {
-                    text: data[1],
-                    value: data[0]
+                    text: data[0],
+                    value: data[1]
                 }
             }
         })

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

@@ -61,7 +61,7 @@ Ext.define('saas.view.core.form.MultiCombo', {
         for (; i < itemsLn; i++) {
             item = items[i];
             var checked = !!value.find(function(v) {
-                return v.value = iem[0];
+                return v.value == iem[0];
             });
             menuItem = new Ext.menu.CheckItem({
                 text: item[1],

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

@@ -155,6 +155,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     handler: me.onAudit,
                     menu: {
                         cls:'x-query-menu',
+                        anchor: '100%',
                         items: [{
                             text:'反审核',
                             handler:function(){
@@ -243,6 +244,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 }]
             }, {
                 xtype: 'pagingtoolbar',
+                cls: 'core-query-pagingtoolbar',
                 dock: 'bottom',
                 displayInfo: true,
                 store: me.store

+ 25 - 1
frontend/saas-web/app/view/core/query/QueryGridPanel.scss

@@ -4,8 +4,32 @@
 
         .x-grid-cell-inner {
             text-decoration: underline;
-            color: blue;
+            color: #3E80F6;
             cursor: pointer;
         }
     }
+
+    .x-panel-default-outer-border-trl {
+        border-top-color: #fff !important;
+        border-top-width: 1px !important;
+        border-right-color: #fff !important;
+        border-right-width: 1px !important;
+        border-left-color: #fff !important;
+        border-left-width: 1px !important;
+    }
+    .x-panel-default-outer-border-rbl {
+        border-top-color: #fff !important;
+        border-top-width: 1px !important;
+        border-right-color: #fff !important;
+        border-right-width: 1px !important;
+        border-left-color: #fff !important;
+        border-left-width: 1px !important;
+        border-bottom-color: #fff !important;
+        border-bottom-width: 1px !important;
+    }
+
+    .core-query-pagingtoolbar {
+        border:1px solid #abdaff !important;
+        border-top-width: 0 !important;
+    }
 }

+ 5 - 9
frontend/saas-web/app/view/document/employee/BasePanel.js

@@ -46,31 +46,27 @@ Ext.define('saas.view.document.employee.BasePanel', {
             text : "账号", 
             width : 200.0, 
             dataIndex : "em_code", 
-            xtype : "", 
         }, 
         {
             text : "姓名", 
             dataIndex : "em_name", 
-            width : 120.0, 
-            xtype : "", 
+            width : 180.0, 
         },
         {
             text : "密码", 
             dataIndex : "em_password", 
-            width : 120.0, 
-            xtype : ""
+            width : 180.0, 
         }, 
         {
             text : "类型", 
             dataIndex : "em_class", 
-            width : 0, 
-            xtype : ""
+            width : 120.0, 
+            hidden : true,
         }, 
         {
             text : "电话", 
             dataIndex : "em_mobile", 
-            width : 120.0, 
-            xtype : "",
+            width : 120.0,
         }]
     },
 

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

@@ -222,7 +222,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         accountinformation:{
             items:[{
                 xtype:'hidden',
-                name:'roleIds',
+                name:'accountId',
                 hidden:true,
             },{
                 xtype:'datamulticombo',
@@ -235,6 +235,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 fieldLabel: '联系电话',
                 name: 'mobile',
+                readOnly:true,
+                editable:false,
                 allowBlank:true,
                 maxLength: 30,
                 beforeLabelTextTpl: "",
@@ -242,6 +244,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 fieldLabel: '联系邮件',
                 name: 'email',
+                readOnly:true,
+                editable:false,
                 allowBlank:true,
                 maxLength: 30,
                 beforeLabelTextTpl: "",
@@ -313,6 +317,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 fieldLabel: '单据前缀',
                 name: 'mn_leadcode',
+                beforeLabelTextTpl: '',
                 allowBlank:false,
                 maxLength: 20
             },{
@@ -384,6 +389,13 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         var combo = this._combo;
         var params = {};
         var names = belong.columns.map(column => column.dataIndex);
+
+        //账户资料特殊保存逻辑
+        if(me.dataKind=='accountinformation'){
+            me.accountinformation();
+            return;
+        }
+
         Ext.Array.each(names,function(name) {
             if(name){
                 var dataField = form.down('[name='+name+']');
@@ -425,5 +437,64 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
     },
     onCancel:function(){
         this.hide();
+    },
+    accountinformation:function(){
+        var me = this;
+        var belong = this.belong;
+        me.setLoading(true);
+        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) {
+            if(name){
+                var dataField = form.down('[name='+name+']');
+                if(dataField&&dataField.value){
+                    params[name] = dataField.value;
+                    params._value = dataField.value;
+                }
+            }
+        });
+
+        //更改参数
+        var o = '';
+        Ext.Array.each(params.roleNames,function(item) {
+            o+=item.value+','
+        });
+        o = o.substring(0,o.length-1);
+
+        var _params = {
+            accountId:Number(params['accountId']),
+            roleIds:o,
+        };
+
+        //保存接口
+        saas.util.BaseUtil.request({
+            url: belong.reqUrl,
+            params: _params,
+            method: 'POST'
+        })
+        .then(function(localJson) {
+            me.setLoading(false);
+            if(localJson.success){
+                saas.util.BaseUtil.showToast('保存成功');
+                var grid = form.ownerCt._parent.lookup('document-kind-Grid');
+                if(grid){
+                    grid.store.load();
+                }
+                if(combo){
+                    combo.store.load(function() {
+                        typeof combo.setValue == 'function' && combo.setValue(params._value);
+                    });
+                }
+                form.ownerCt.close();
+            }
+        })
+        .catch(function(res) {
+            me.setLoading(false);
+            console.error(res);
+            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+        });
     }
 });

+ 12 - 0
frontend/saas-web/app/view/document/kind/Kind.js

@@ -246,6 +246,18 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl:'/api/account/role/save',
             updateUrl:'/api/account/role/update',
         },
+        accountinformation:{
+            columns:[{
+                dataIndex:'accountId',
+            },{
+                dataIndex: 'roleNames',
+            },{
+                dataIndex: 'mobile',
+            },{
+                dataIndex: 'email',
+            }],
+            reqUrl:'http://192.168.253.31:8560/api/account/account/bind/roles',
+        },
         warehouse:{
             columns: [{
                 text: '编号',

+ 7 - 1
frontend/saas-web/app/view/home/charts/MonthIO.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.home.charts.MonthIO', {
         Ext.apply(me, {
             items: [{
                 xtype: 'cartesian',
-                reference: 'chart',
+                insetPadding: '28 0 0 0',
                 colors: [
                     '#2C82BE',
                     '#82CCFF'
@@ -38,6 +38,9 @@ Ext.define('saas.view.home.charts.MonthIO', {
                     adjustByMajorUnit: true,
                     fields: ['main'],
                     minimum: 0,
+                    label: {
+                        fillStyle: '#485465'
+                    },
                     grid: {
                         even: {
                             stroke: '#F7F8FA'
@@ -54,6 +57,9 @@ Ext.define('saas.view.home.charts.MonthIO', {
                     type: 'category',
                     position: 'bottom',
                     fields: ['x'],
+                    label: {
+                        fillStyle: '#485465'
+                    },
                     style: {
                         fill: '#F7F8FA',
                         strokeStyle: 'transparent'

+ 9 - 3
frontend/saas-web/app/view/home/charts/MonthPurchase.js

@@ -10,6 +10,7 @@ Ext.define('saas.view.home.charts.MonthPurchase', {
         Ext.apply(me, {
             items: [{
                 xtype: 'cartesian',
+                insetPadding: '28 0 0 0',
                 colors: [
                     '#34BAF6'
                 ],
@@ -18,12 +19,10 @@ Ext.define('saas.view.home.charts.MonthPurchase', {
                     captions: {
                         title: {
                             text: '本月采购额(万元):{month_purchase_amount}',
+                            align: 'left',
                             style: {
-                                'font-size': '14px',
                                 'color': '#485465',
-                                'letter-spacing': '-0.07px'
                             },
-                            align: 'left'
                         }
                     },
                 },
@@ -31,6 +30,9 @@ Ext.define('saas.view.home.charts.MonthPurchase', {
                     type: 'category',
                     fields: ['x'],
                     position: 'bottom',
+                    label: {
+                        fillStyle: '#485465'
+                    },
                     style: {
                         fill: '#F7F8FA',
                         strokeStyle: 'transparent'
@@ -48,6 +50,10 @@ Ext.define('saas.view.home.charts.MonthPurchase', {
                             stroke: '#F7F8FA',
                         }
                     },
+                    label: {
+                        fillStyle: '#485465',
+                        textAlign: 'end'
+                    },
                     style: {
                         fill: '#fff',
                         strokeStyle: 'transparent'

+ 31 - 15
frontend/saas-web/app/view/home/charts/MonthSale.js

@@ -10,7 +10,8 @@ Ext.define('saas.view.home.charts.MonthSale', {
         Ext.apply(me, {
             items: [{
                 xtype: 'polar',
-                reference: 'chart',
+                width: '100%',
+                height: '100%',
                 bind: {
                     captions: {
                         title: {
@@ -49,33 +50,45 @@ Ext.define('saas.view.home.charts.MonthSale', {
                     '#1E90FF',
                     '#B0E0E6'
                 ],
-                width: '100%',
-                innerPadding: 20,
-                // legend: {
-                //     type: 'dom',
-                //     docked: 'right'
-                // },
+                innerPadding: 0,
+                legend: {
+                    type: 'dom',
+                    docked: 'right',
+                    width: 120,
+                    padding: 0,
+                    bodyPadding: 0,
+                    border: 0,
+                    // liveDrag: true,
+                    cls: 'x-pie-legend'
+                },
                 style: {
+                    lineWidth: 0,
                     stroke: "#789"
                 },
-                interactions: ['rotate', 'itemhighlight'],
+                // interactions: [{
+                //     type: 'panzoom',
+                //     zoomOnPan: true
+                // }],
                 series: [{
                     type: 'pie',
                     angleField: 'y',
                     donut: 55,
                     label: {
                         field: 'x',
-                        renderer: me.onLabelRender
+                        display: 'inside',
+                        renderer: me.onLabelRender,
+                        color: '#fff',
+                        font: '12px Microsoft YaHei'
                     },
+                    // label: {
+                    //     field: 'x',
+                    //     renderer: me.onLabelRender
+                    // },
                     highlight: true,
                     tooltip: {
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender
-                    },
-                    style: {
-                        lineWidth: 0,
-                        strokeStyle: 'transparent',
-                    },
+                    }
                 }]
             }],
         });
@@ -86,7 +99,10 @@ Ext.define('saas.view.home.charts.MonthSale', {
     onLabelRender: function(text, sprite, config, rendererData, index) {
         var homeModel = Ext.getCmp('home').getViewModel();
         var monthSaleAmount = homeModel.get('month_sale_amount');
-        return text;
+        var store = rendererData.store;
+        var data = store.getAt(index);
+        var v = data.get('y');
+        return Ext.util.Format.number((v/monthSaleAmount)*100, '0.00') + '%';
     },
 
     onSeriesTooltipRender: function (tooltip, record, item) {

+ 19 - 0
frontend/saas-web/app/view/home/charts/MonthSale.scss

@@ -0,0 +1,19 @@
+.x-pie-legend {
+
+    .x-legend-inner {
+        padding: 0;
+
+        .x-legend-container {
+
+            .x-legend-item {
+                border: none !important;
+                outline: none !important;
+                text-align: left;
+
+                .x-legend-item-marker {
+                    border-radius: 50%;
+                }
+            }
+        }
+    }
+}

+ 18 - 11
frontend/saas-web/app/view/home/charts/PurchaseTrend.js

@@ -10,21 +10,22 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
         Ext.apply(me, {
             items: [{
                 xtype: 'cartesian',
+                insetPadding: '28 0 0 0',
                 colors: [
                     '#34BAF6'
                 ],
-                captions: {
-                    title: {
-                        text: '采购金额(万元)',
-                        style: {
-                            'font-size': '14px',
-                            'color': '#485465',
-                            'letter-spacing': '-0.07px'
-                        },
-                        align: 'left'
-                    }
-                },
                 bind: {
+                    captions: {
+                        title: {
+                            text: '采购金额(万元)',
+                            style: {
+                                'font-size': '14px',
+                                'color': '#485465',
+                                'letter-spacing': '-0.07px'
+                            },
+                            align: 'left'
+                        }
+                    },
                     store: '{purchase_trend}',
                 },
                 axes: [{
@@ -35,6 +36,9 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                     type: 'category',
                     fields: ['x'],
                     position: 'bottom',
+                    label: {
+                        fillStyle: '#485465'
+                    },
                     style: {
                         fill: '#F7F8FA',
                         strokeStyle: 'transparent'
@@ -52,6 +56,9 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                             stroke: '#F7F8FA',
                         }
                     },
+                    label: {
+                        fillStyle: '#485465'
+                    },
                     style: {
                         fill: '#fff',
                         strokeStyle: 'transparent'

+ 16 - 14
frontend/saas-web/app/view/home/charts/SaleTrend.js

@@ -10,22 +10,23 @@ Ext.define('saas.view.home.charts.SaleTrend', {
         Ext.apply(me, {
             items: [{
                 xtype: 'cartesian',
+                insetPadding: '28 0 0 0',
                 colors: [
                     '#64B0E4',
                     '#FF1038'
                 ],
-                captions: {
-                    title: {
-                        text: '销售趋势图',
-                        style: {
-                            'font-size': '14px',
-                            'color': '#485465',
-                            'letter-spacing': '-0.07px'
-                        },
-                        align: 'left'
-                    }
-                },
                 bind: {
+                    captions: {
+                        title: {
+                            text: '销售趋势图',
+                            style: {
+                                'font-size': '14px',
+                                'color': '#485465',
+                                'letter-spacing': '-0.07px'
+                            },
+                            align: 'left'
+                        }
+                    },
                     store: '{sale_trend}',
                 },
                 // legend: {
@@ -42,9 +43,7 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     fields: ['x'],
                     position: 'bottom',
                     label: {
-                        style: {
-                            fontSize: 12,
-                        }
+                        fillStyle: '#485465',
                     },
                     style: {
                         fill: '#F7F8FA',
@@ -63,6 +62,9 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                             stroke: '#F7F8FA',
                         }
                     },
+                    label: {
+                        fillStyle: '#485465',
+                    },
                     style: {
                         fill: '#fff',
                         strokeStyle: 'transparent'

+ 18 - 11
frontend/saas-web/app/view/home/charts/StockAmount.js

@@ -10,21 +10,22 @@ Ext.define('saas.view.home.charts.StockAmount', {
         Ext.apply(me, {
             items: [{
                 xtype: 'cartesian',
+                insetPadding: '28 0 0 0',
                 colors: [
                     '#34BAF6'
                 ],
-                captions: {
-                    title: {
-                        text: '库存金额(万元)',
-                        style: {
-                            'font-size': '14px',
-                            'color': '#485465',
-                            'letter-spacing': '-0.07px'
-                        },
-                        align: 'left'
-                    }
-                },
                 bind: {
+                    captions: {
+                        title: {
+                            text: '库存金额(万元)',
+                            style: {
+                                'font-size': '14px',
+                                'color': '#485465',
+                                'letter-spacing': '-0.07px'
+                            },
+                            align: 'left'
+                        }
+                    },
                     store: '{stock_amount}',
                 },
                 axes: [{
@@ -35,6 +36,9 @@ Ext.define('saas.view.home.charts.StockAmount', {
                     type: 'category',
                     fields: ['x'],
                     position: 'bottom',
+                    label: {
+                        fillStyle: '#485465'
+                    },
                     style: {
                         fill: '#F7F8FA',
                         strokeStyle: 'transparent'
@@ -52,6 +56,9 @@ Ext.define('saas.view.home.charts.StockAmount', {
                             stroke: '#F7F8FA',
                         }
                     },
+                    label: {
+                        fillStyle: '#485465'
+                    },
                     style: {
                         fill: '#fff',
                         strokeStyle: 'transparent'

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

@@ -17,7 +17,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                         },{
                             from:'bk_bankname',to:'ftd_bankname'
                         },{
-                            from:'id',to:'ftd_bankid'
+                            from:'id',to:'ftd_bankid',ignore:true
                         }],
                         dbtpls:[{
                             field:'bk_bankcode',width:100

+ 12 - 4
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -26,12 +26,20 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         columnWidth: 0.5
     },{
         xtype: 'multicombo',
-        name: 'ft_status',
+        name: 'ft_statuscode',
         fieldLabel: '审核状态',
         datas: [
-            ["已审核", "已审核"],
-            ["未审核", "未审核"]
-        ]
+            ["ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ],
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'ft_statuscode=\'' + value + '\'';
+            }
+        }
     },{
         name : "ft_status",
         fieldLabel : "结算方式",

+ 2 - 1
frontend/saas-web/app/view/money/othreceipts/FormPanelController.js

@@ -14,7 +14,8 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                         defaultCondition: "cu_statuscode='OPEN'",
                         dbfinds: [{
                             from: 'id',
-                            to: 'or_custid'
+                            to: 'or_custid',
+                            ignore:true
                         }, {
                             from: 'cu_code',
                             to: 'or_custcode'

+ 12 - 4
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -49,12 +49,20 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         operation: 'between'
     }, {
         xtype: 'multicombo',
-        name: 'or_status',
+        name: 'or_statuscode',
         fieldLabel: '审核状态',
         datas: [
-            ["已审核", "已审核"],
-            ["未审核", "未审核"]
-        ]
+            ["ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ],
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'or_statuscode=\'' + value + '\'';
+            }
+        }
     }, {
         name: 'ord_type',
         fieldLabel: '收入类别',

+ 2 - 1
frontend/saas-web/app/view/money/othspendings/FormPanelController.js

@@ -13,7 +13,8 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                         addTitle: '供应商资料',
                         dbfinds: [{
                             from: 'id',
-                            to: 'os_vendid'
+                            to: 'os_vendid',
+                            ignore:true
                         }, {
                             from: 've_code',
                             to: 'os_vendcode'

+ 12 - 4
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -48,12 +48,20 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         fieldLabel: '单据日期'
     },{
         xtype: 'multicombo',
-        name: 'os_status',
+        name: 'os_statuscode',
         fieldLabel: '审核状态',
         datas: [
-            ["已审核", "已审核"],
-            ["未审核", "未审核"]
-        ]
+            ["ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ],
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'os_statuscode=\'' + value + '\'';
+            }
+        }
     },{
         name: 'ord_type',
         fieldLabel: '支出类别',

+ 2 - 1
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -23,7 +23,8 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             to: 've_leftamount'
                         },{
                             from: 'id',
-                            to: 'pb_vendid'
+                            to: 'pb_vendid',
+                            ignore:true
                         }],
                         dbtpls: [{
                             field: 've_code',

+ 12 - 4
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -31,12 +31,20 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         operation: 'between'
     },{
         xtype: 'multicombo',
-        name: 'pb_status',
+        name: 'pd_statuscode',
         fieldLabel: '审核状态',
         datas: [
-            ["已审核", "已审核"],
-            ["未审核", "未审核"]
-        ]
+            ["ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ],
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'pu_statuscode=\'' + value + '\'';
+            }
+        }
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                         addTitle: '客户资料',
                         //赋值 
                         dbfinds:[{
-                            from: 'id', to: 'rb_custid'
+                            from: 'id', to: 'rb_custid',ignore:true
                         }, {
                             from:'cu_code', to:'rb_custcode'
                         },{

+ 12 - 4
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -39,12 +39,20 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         operation: 'between'
     },{
         xtype: 'multicombo',
-        name: 'rb_status',
+        name: 'rb_statuscode',
         fieldLabel: '审核状态',
         datas: [
-            ["已审核", "已审核"],
-            ["未审核", "未审核"]
-        ]
+            ["ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ],
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'rb_statuscode=\'' + value + '\'';
+            }
+        }
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

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

@@ -137,6 +137,32 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             text: '关联销售单',
             dataIndex: 'pu_salecode',
             width: 120
+        }, {
+            text: '录入人ID',
+            dataIndex: 'creatorId',
+            width: 0
+        }, {
+            text: '录入人',
+            dataIndex: 'creatorName',
+            width: 0
+        }, {
+            text: '录入日期',
+            dataIndex: 'createTime',
+            xtype: 'datecolumn',
+            width: 0
+        }, {
+            text: '更新人ID',
+            dataIndex: 'updaterId',
+            width: 0
+        }, {
+            text: '更新人',
+            dataIndex: 'updater',
+            width: 0
+        }, {
+            text: '更新日期',
+            dataIndex: 'updateTime',
+            xtype: 'datecolumn',
+            width: 0
         }],
         relativeColumn: [{
             text: 'id',

+ 37 - 258
frontend/saas-web/app/view/sys/baseconfig/FormPanel.js

@@ -10,8 +10,8 @@ Ext.define('saas.view.sys.baseconfig.FormPanel', {
     
     //字段属性
     _idField: 'id',
-    _readUrl:'http://192.168.253.31:8560/api/account/company/read/current',
-    _saveUrl:'http://192.168.253.31:8560/api/account/company/save',
+    _readUrl:'/api/commons/configs/list',
+    _saveUrl:'/api/commons/configs/update',
 
     //基础属性
     frame:true,
@@ -38,274 +38,53 @@ Ext.define('saas.view.sys.baseconfig.FormPanel', {
         },'->']
     },
 
-    items: [{
-        bind:'{id}',
-        xtype: 'hidden',
-        name: 'id',
-        fieldLabel: 'id',
-        allowBlank: true,
-        width:600
-    },{
-        bind:'{name}',
-        xtype: 'textfield',
-        name: 'name',
-        fieldLabel: '公司名称',
-        allowBlank: true,
+    items: [{ 
+        bind:'{cucaltor}',
+        displayField : "display", 
         editable:false,
-        readOnly:true,
-        width:600
-    },{
-        bind:'{address}',
-        xtype: 'textfield',
-        name: 'address',
-        fieldLabel: '公司地址',
-        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
-        allowBlank: false,
-        width:600
-    },{
-        bind:'{tel}',
-        xtype: 'textfield',
-        name: 'tel',
-        fieldLabel: '电话',
+        hideTrigger : false, 
+        maxLength : 100.0, 
+        width:500,
+        minValue : null, 
+        queryMode : "local", 
+        valueField : "value", 
+        xtype : "combo",
+        value:'WACC',
+        store:{
+            fields: ['display', 'value'],
+            data : [
+                {"display":"加权平均法", "value":'WACC'},
+                {"display":"先进先出法", "value":'FIFO'}
+            ]
+        },
+        name : "cucaltor", 
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
-        allowBlank: false,
-        width:500
+        fieldLabel : "库存计算方式", 
+        allowBlank : false, 
     },{
-        bind:'{fax}',
-        xtype: 'textfield',
-        name: 'fax',
-        fieldLabel: '传真',
-        allowBlank: true,
+        bind:'{printUrl}',
+        xtype : "textfield", 
+        name : "printUrl",
+        fieldLabel : "打印地址Url", 
+        allowBlank : false, 
         width:500
-    }
-    // ,{
-    //     bind:'{en_begindate}',
-    //     xtype : "datefield", 
-    //     name : "en_begindate",
-    //     format:'Y-m-d H:i:s', 
-    //     fieldLabel : "开账日期", 
-    //     allowBlank : true, 
-    //     editable:false,
-    //     hideTrigger:true,
-    //     readOnly:true,
-    //     width:500
-    // }
-    // ,{ 
-    //     bind:'{en_pricemethod}',
-    //     displayField : "display", 
-    //     editable:false,
-    //     hideTrigger : false, 
-    //     maxLength : 100.0, 
-    //     width:500,
-    //     minValue : null, 
-    //     queryMode : "local", 
-    //     valueField : "value", 
-    //     xtype : "combo",
-    //     value:'WACC',
-    //     store:{
-    //         fields: ['display', 'value'],
-    //         data : [
-    //             {"display":"加权平均法", "value":'WACC'},
-    //             {"display":"先进先出法", "value":'FIFO'}
-    //         ]
-    //     },
-    //     name : "en_pricemethod", 
-    //     beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
-    //     fieldLabel : "库存计算方式", 
-    //     allowBlank : false, 
-    // }
-    // ,{  
-    //     ignore:true,
-    //     bind:'{updateTime}',
-    //     xtype : "datefield", 
-    //     name : "updateTime", 
-    //     fieldLabel : "更新时间", 
-    //     allowBlank : true, 
-    //     hideTrigger:true,
-    //     format:'Y-m-d H:i:s',
-    //     editable:false,
-    //     readOnly:true,
-    //     width:500,
-    // }
-    ,{
-        xtype: 'form',
-		width:600,
-		frame: false,
-		border: false,
-		minHeight: 22,
-		bodyStyle: 'padding:2px;',
-        layout: 'hbox',
-        items:[{
-            bind:'{signet}',
-            name : "signet", 
-            allowBlank : true, 
-            hidden:true,
-            xtype:'numberfield'
-        },{
-            allowBlank : true, 
-            width:500,
-            fieldLabel:'打印章上传',
-            xtype: 'filefield',
-            emptyText: '请选择图片',
-            buttonText: '',
-            buttonConfig: {
-                iconCls: 'x-fa fa-picture-o',
-            },
-            createFileInput : function() {
-                    var me = this;
-                    me.fileInputEl = me.button.el.createChild({
-                    name: me.getName(),
-                    cls: Ext.baseCSSPrefix + 'form-file-input',
-                    tag: 'input',
-                    type: 'file',
-                    size: 1,
-                    accept:"image/*"
-                }).on('change', me.onFileChange, me);
-            },
-            listeners: {
-                afterrender:function(field,ops){
-                    var fileEl = field.fileInputEl.dom;
-                    fileEl.setAttribute("accept","image/*");
-                },
-                change: function(field){
-                    var form = field.ownerCt.ownerCt;
-                    var myForm = field.ownerCt;
-                    var fileEl = field.fileInputEl.dom;
-                    var fd = new FormData();
-                    fd.append('file', fileEl.files[0]);
-                    form.setLoading(true);
-                    Ext.Ajax.request({
-                        url: 'http://192.168.253.31:8560/api/file/upload',//这里是填写需要跨域访问的URL
-                        cors: true,
-                        useDefaultXhrHeader: false,
-                        method: 'post',
-                        rawData: fd,
-                        headers: {
-                            'Access-Control-Allow-Origin': '*',
-                            'Authorization':  saas.util.State.get('session').token,
-                            //"Content-Type": 'multipart/form-data'  //文件上传的格式, 
-                            "Content-Type":null
-                        },
-                        success: function (response, opts) {
-                            form.setLoading(false);
-                            saas.util.BaseUtil.showToast('上传成功');
-                            var res = Ext.decode(response.responseText);
-                            if(res.success){
-                                var data = res.data;
-                                var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
-                                myForm.down('[name=signet]').setValue(data.id);
-                                field.setRawValue(name);
-                            }else{
-                                saas.util.BaseUtil.showToast('上传失败: ' + res.message);
-                            }
-                        },
-                        failure: function (response, opts) {
-                            form.setLoading(false);
-                            var res = Ext.decode(response.responseText);
-                            saas.util.BaseUtil.showToast('上传失败: ' + res.message);
-                        }
-                    });
-                }
-            }
-        },{
-            hidden:true,
-            name:'showSignetPhoto',
-            xtype:'button',
-            iconCls: 'x-fa fa-picture-o'
-        }]
-    },{
-        xtype: 'form',
-		width:600,
-		frame: false,
-		border: false,
-		minHeight: 22,
-		bodyStyle: 'padding:2px;',
-        layout: 'hbox',
-        items:[{
-            bind:'{logoUrl}',
-            name : "logoUrl", 
-            allowBlank : true, 
-            hidden:true,
-            xtype:'numberfield'
-        },{
-            allowBlank : true, 
-            width:500,
-            fieldLabel:'Logo上传',
-            xtype: 'filefield',
-            emptyText: '请选择图片',
-            buttonText: '',
-            buttonConfig: {
-                iconCls: 'x-fa fa-picture-o',
-            },
-            createFileInput : function() {
-                    var me = this;
-                    me.fileInputEl = me.button.el.createChild({
-                    name: me.getName(),
-                    cls: Ext.baseCSSPrefix + 'form-file-input',
-                    tag: 'input',
-                    type: 'file',
-                    size: 1,
-                    accept:"image/*"
-                }).on('change', me.onFileChange, me);
-            },
-            listeners: {
-                change: function(field){
-                    var form = field.ownerCt.ownerCt;
-                    var myForm = field.ownerCt;
-                    var fileEl = field.fileInputEl.dom;
-                    var fd = new FormData();
-                    fd.append('file', fileEl.files[0]);
-                    form.setLoading(true);
-                    Ext.Ajax.request({
-                        url: 'http://192.168.253.31:8560/api/file/upload',//这里是填写需要跨域访问的URL
-                        cors: true,
-                        useDefaultXhrHeader: false,
-                        method: 'post',
-                        rawData: fd,
-                        headers: {
-                            'Access-Control-Allow-Origin': '*',
-                            'Authorization':  saas.util.State.get('session').token,
-                            //"Content-Type": 'multipart/form-data'  //文件上传的格式, 
-                            "Content-Type":null
-                        },
-                        success: function (response, opts) {
-                            form.setLoading(false);
-                            saas.util.BaseUtil.showToast('上传成功');
-                            var res = Ext.decode(response.responseText);
-                            if(res.success){
-                                var data = res.data;
-                                var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
-                                myForm.down('[name=logoUrl]').setValue(data.id);
-                                field.setRawValue(name);
-                            }else{
-                                saas.util.BaseUtil.showToast('上传失败: ' + res.message);
-                            }
-                        },
-                        failure: function (response, opts) {
-                            form.setLoading(false);
-                            var res = Ext.decode(response.responseText);
-                            saas.util.BaseUtil.showToast('上传失败: ' + res.message);
-                        }
-                    });
-                }
-            }
-        },{
-            hidden:true,
-            name:'showLogoPhoto',
-            xtype:'button',
-            iconCls: 'x-fa fa-picture-o'
-        }]
     }],
 
     initComponent: function () {
         var me = this,
         viewModel = me.getViewModel();
         var url = me._readUrl;
-        me.BaseUtil.request({url })
+        saas.util.BaseUtil.request({url })
         .then(function(res) {
             if(res.success) {
-                var d = res.data;
-                viewModel.setData(d)
+                var list = res.data.list;
+                if(list.length>0){
+                    var d = {};
+                    Ext.each(list, function(item, index){
+                        d[item.code] = item.data;
+                    });
+                    viewModel.setData(d);
+                }
             }
         })
         .catch(function(response) {

+ 20 - 9
frontend/saas-web/app/view/sys/baseconfig/FormPanelController.js

@@ -30,12 +30,18 @@ Ext.define('saas.view.sys.baseconfig.FormPanelController', {
             saas.util.BaseUtil.showToast('未修改数据,请修改后保存');
             return false;
         }
-        
         viewModel = me.getViewModel();
-        var formData = viewModel.data;
-        formData.en_name = null;
-        formData.updateTime = null;
-        me.BaseUtil.request({
+        var formData = [];
+
+        var items = me.view.getForm().getFields().items;
+        Ext.each(items, function(item, index){
+            formData.push({
+                code:item.name,
+                data:item.value
+            })
+        });
+
+        saas.util.BaseUtil.request({
             url: form._saveUrl,
             params: JSON.stringify(formData),
             method: 'POST',
@@ -45,11 +51,17 @@ Ext.define('saas.view.sys.baseconfig.FormPanelController', {
                 saas.util.BaseUtil.showToast('保存成功');
                 viewModel = form.getViewModel();
                 var url = form._readUrl;
-                form.BaseUtil.request({url })
+                saas.util.BaseUtil.request({url })
                 .then(function(res) {
                     if(res.success) {
-                        var d = res.data;
-                        viewModel.setData(d)
+                        var list = res.data.list;
+                        if(list.length>0){
+                            var d = {};
+                            Ext.each(list, function(item, index){
+                                d[item.code] = item.data;
+                            });
+                            viewModel.setData(d);
+                        }
                     }
                 })
                 .catch(function(response) {
@@ -62,5 +74,4 @@ Ext.define('saas.view.sys.baseconfig.FormPanelController', {
             saas.util.BaseUtil.showToast('保存失败: ' + res.message);
         });
     }
-
 });

+ 179 - 13
frontend/saas-web/app/view/sys/config/FormPanel.js

@@ -131,18 +131,19 @@ Ext.define('saas.view.sys.config.FormPanel', {
 		border: false,
 		minHeight: 22,
 		bodyStyle: 'padding:2px;',
-        layout: 'hbox',
+        layout: 'vbox',
         items:[{
             bind:'{signet}',
             name : "signet", 
             allowBlank : true, 
             hidden:true,
-            xtype:'numberfield'
+            xtype:'textfield'
         },{
             allowBlank : true, 
             width:500,
             fieldLabel:'打印章上传',
             xtype: 'filefield',
+            name:'signetFilefield',
             emptyText: '请选择图片',
             buttonText: '',
             buttonConfig: {
@@ -190,8 +191,15 @@ Ext.define('saas.view.sys.config.FormPanel', {
                             if(res.success){
                                 var data = res.data;
                                 var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
-                                myForm.down('[name=signet]').setValue(data.id);
+                                myForm.down('[name=signet]').setValue(data.fullPath);
                                 field.setRawValue(name);
+                                //读取图片
+                                if(data.id){
+                                    var img = myForm.down('[name=SignetPhoto]');
+                                    img.el.dom.src = 'http://192.168.253.31:8560/api/file/download?path='+data.fullPath;
+                                    var showSignetPhoto = form.down('[name=showSignetPhoto]');
+                                    showSignetPhoto.show();
+                                }
                             }else{
                                 saas.util.BaseUtil.showToast('上传失败: ' + res.message);
                             }
@@ -205,10 +213,40 @@ Ext.define('saas.view.sys.config.FormPanel', {
                 }
             }
         },{
-            hidden:true,
+            xtype: 'image',
+            width: 100,
+            height: 100,
+            margin:'5 0 5 150',
+            src:'resources/images/default/basePhoto.png',
+            name:'SignetPhoto',
+        },{
+            margin:'0 0 5 151',
+            xtype:'container',
             name:'showSignetPhoto',
-            xtype:'button',
-            iconCls: 'x-fa fa-picture-o'
+            cls:'x-container-group',
+            hidden:true,
+            items:[{
+                width: 45,
+                height: 24,
+                xtype:'button',
+                text:'查看',
+                handler:function(b){
+                    var form = b.ownerCt.ownerCt.ownerCt;
+                    var img = form.down('[name=SignetPhoto]');
+                    form.lookPic(img);
+                }
+            },{
+                margin:'0 0 0 10',
+                width: 45,
+                height: 24,
+                xtype:'button',
+                text:'下载',
+                handler:function(b){
+                    var form = b.ownerCt.ownerCt.ownerCt;
+                    var path = form.down('[name=signet]').value;
+                    form.downLoad(path);
+                }
+            }]
         }]
     },{
         xtype: 'form',
@@ -217,17 +255,18 @@ Ext.define('saas.view.sys.config.FormPanel', {
 		border: false,
 		minHeight: 22,
 		bodyStyle: 'padding:2px;',
-        layout: 'hbox',
+        layout: 'vbox',
         items:[{
             bind:'{logoUrl}',
             name : "logoUrl", 
             allowBlank : true, 
             hidden:true,
-            xtype:'numberfield'
+            xtype:'textfield'
         },{
             allowBlank : true, 
             width:500,
             fieldLabel:'Logo上传',
+            name:'logoFilefield',
             xtype: 'filefield',
             emptyText: '请选择图片',
             buttonText: '',
@@ -276,8 +315,15 @@ Ext.define('saas.view.sys.config.FormPanel', {
                             if(res.success){
                                 var data = res.data;
                                 var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
-                                myForm.down('[name=logoUrl]').setValue(data.id);
+                                myForm.down('[name=logoUrl]').setValue(data.fullPath);
                                 field.setRawValue(name);
+                                //读取图片
+                                if(data.id){
+                                    var img = myForm.down('[name=LogoPhoto]');
+                                    img.el.dom.src = 'http://192.168.253.31:8560/api/file/download?path='+data.fullPath;
+                                    var showLogoPhoto = form.down('[name=showLogoPhoto]');
+                                    showLogoPhoto.show();
+                                }
                             }else{
                                 saas.util.BaseUtil.showToast('上传失败: ' + res.message);
                             }
@@ -291,10 +337,41 @@ Ext.define('saas.view.sys.config.FormPanel', {
                 }
             }
         },{
-            hidden:true,
+            xtype: 'image',
+            style:'border:1px solid #f7f7f7;',
+            width: 100,
+            height: 100,
+            margin:'5 0 5 150',
+            src:'resources/images/default/basePhoto.png',
+            name:'LogoPhoto',
+        },{
             name:'showLogoPhoto',
-            xtype:'button',
-            iconCls: 'x-fa fa-picture-o'
+            margin:'0 0 5 151',
+            xtype:'container',
+            cls:'x-container-group',
+            hidden:true,
+            items:[{
+                width: 45,
+                height: 24,
+                xtype:'button',
+                text:'查看',
+                handler:function(b){
+                    var form = b.ownerCt.ownerCt.ownerCt;
+                    var img = form.down('[name=LogoPhoto]');
+                    form.lookPic(img);
+                }
+            },{
+                margin:'0 0 0 10',
+                width: 45,
+                height: 24,
+                xtype:'button',
+                text:'下载',
+                handler:function(b){
+                    var form = b.ownerCt.ownerCt.ownerCt;
+                    var path = form.down('[name=logoUrl]').value;
+                    form.downLoad(path);
+                }
+            }]
         }]
     }],
 
@@ -306,7 +383,9 @@ Ext.define('saas.view.sys.config.FormPanel', {
         .then(function(res) {
             if(res.success) {
                 var d = res.data;
-                viewModel.setData(d)
+                viewModel.setData(d);
+                viewModel.notify();
+                me.load(me);
             }
         })
         .catch(function(response) {
@@ -318,5 +397,92 @@ Ext.define('saas.view.sys.config.FormPanel', {
 
     refresh:function(){
         this.ownerCt.setTitle('参数设置')
+    },
+
+    load:function(form){
+        //打印章
+        var signet = form.down('[name=signet]').value;
+        if(signet&&signet!=''){
+            var img = form.down('[name=SignetPhoto]');
+            img.el.dom.src = 'http://192.168.253.31:8560/api/file/download?path='+signet;
+            // var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
+            // myForm.down('[name=signet]').setValue(data.fullPath);
+            // field.setRawValue(name);
+            var showSignetPhoto = form.down('[name=showSignetPhoto]');
+            showSignetPhoto.show();
+        }
+        //Logo
+        var logoUrl = form.down('[name=logoUrl]').value;
+        if(logoUrl&&logoUrl!=''){
+            var img = form.down('[name=LogoPhoto]');
+            img.el.dom.src = 'http://192.168.253.31:8560/api/file/download?path='+logoUrl;
+            var showLogoPhoto = form.down('[name=showLogoPhoto]');
+            showLogoPhoto.show();
+        }
+        //文件名称
+        var viewModel = form.getViewModel();
+        if(viewModel.data.fileInfoList&&viewModel.data.fileInfoList.length!=0){
+            var logo = viewModel.data.fileInfoList[0].logo;
+            var logoName = logo.name + "  (" + Ext.util.Format.fileSize(logo.size) + ")";
+            form.down('[name=logoFilefield]').setRawValue(logoName);
+            var signet = viewModel.data.fileInfoList[0].signet;
+            var signetName = signet.name + "  (" + Ext.util.Format.fileSize(signet.size) + ")";
+            form.down('[name=signetFilefield]').setRawValue(signetName);
+        }
+    },
+
+    lookPic:function(img){
+        var me = this, resizer = me.resizer,
+        imageframe = document.getElementById('ext-image-frame');
+        var src = img.el.dom.src;
+        if (!imageframe) {
+            var el = Ext.DomHelper.append(document.body, '<img id="ext-image-frame" src="' + src +
+                    '" width="500" height="400" style="position:absolute;left:0;top:0px;"/>', true);
+            imageframe = el.dom;
+        } else {
+            imageframe.src = src;
+        }
+        if (!resizer) {
+            resizer = this.resizer = Ext.create('Ext.resizer.Resizer', {
+                target: 'ext-image-frame',
+                pinned: true,
+                width: 410,
+                height: 310,
+                minWidth: 100,
+                minHeight: 80,
+                preserveRatio: true,
+                handles: 'all',
+                dynamic: true,
+                constrainTo:me.getEl()
+            });
+            var resizerEl = resizer.getEl();
+            resizerEl.on('dblclick', function(){
+                resizerEl.hide(true);
+            });
+        }
+        resizer.getEl().center();
+        resizer.getEl().show(true);
+        Ext.DomHelper.applyStyles(imageframe, 'position:absolute;z-index:100;');
+    },
+
+    downLoad:function(path){
+        //ajax 响应下载必须要创建一个form实例
+
+        window.location.href = 'http://192.168.253.31:8560/api/file/download?path='+path;
+
+        // if (!Ext.fly('ext-attach-download')) {  
+		// 	var frm = document.createElement('form');  
+		// 	frm.id = 'ext-attach-download';  
+		// 	frm.name = id;  
+		// 	frm.className = 'x-hidden';
+		// 	document.body.appendChild(frm);
+        // }
+		// Ext.Ajax.request({
+		// 	url: 'http://192.168.253.31:8560/api/file/download?path='+path,  
+		// 	method: 'post',
+		// 	form: Ext.fly('ext-attach-download'),
+		// 	isUpload: true,
+		// 	params: ''
+		// });
     }
 });

+ 27 - 15
frontend/saas-web/app/view/sys/guide/FormPanel.js

@@ -157,9 +157,18 @@ Ext.define('saas.view.sys.guide.FormPanel', {
     },
 
     refresh:function(){
-        this.ownerCt.setTitle('新手指引');
-        this.view.store.load();
+        this.ownerCt.setTitle('新手导航');
         //刷新store数据
+        this.view.store.load();
+        //刷新窗口
+        var win = this.down('[name=messagebox]');
+        if(win){
+            win.show({
+                title : '模块介绍',
+                msg : win.msg.html,
+                icon : win._icon
+            });
+        }
     },
 
     showInformation:function(type,value){
@@ -168,37 +177,37 @@ Ext.define('saas.view.sys.guide.FormPanel', {
         var icon = 'x-gudie-information';
         var title = '';
         if(type=='baseSet'){
-            message = '<h4>您可以在参数设置中编辑公司的信息。</br>'+
-            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
-            xtype = 'sys-config-formpanel';
+            message = '<span>您可以在参数设置中编辑公司的信息。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</span>';
+            xtype = 'sys-manager-formpanel';
         }
         if(type=='warehouse'){
-            message = '<h4>因为新增物料时需要告知该物料所属仓库是哪里,所以需要首先进行仓库管理。</br>'+
-            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            message = '<span>因为新增物料时需要告知该物料所属仓库是哪里,所以需要首先进行仓库管理。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</span>';
             xtype = 'other-warehouse';
             title = '仓库资料'
         }
         if(type=='product'){
-            message = '<h4>录入物料及其期初数量;开账后也可通过录采购单对物料库存进行增加,</br>录销售单物料库存相应减少。</br>'+
-            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            message = '<span>录入物料及其期初数量;开账后也可通过录采购单对物料库存进行增加,</br>录销售单物料库存相应减少。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</span>';
             xtype = 'document-product-basepanel';
             title = '物料资料'
         }
         if(type=='customer'){
-            message = '<h4>对客户资料进行录入及管理。</br>'+
-            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            message = '<span>对客户资料进行录入及管理。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</span>';
             xtype = 'document-customer-basepanel';
             title = '客户资料'
         }
         if(type=='vendor'){
-            message = '<h4>录采购单时需选择供应商,在单据页面选择供应商时</br>也提供供应商新增功能,您也可以跳过此步。</br>'+
-            '录入完成后切换到“新手导航”页签继续下一步。</h4>';
+            message = '<span>录采购单时需选择供应商,在单据页面选择供应商时</br>也提供供应商新增功能,您也可以跳过此步。</br>'+
+            '录入完成后切换到“新手导航”页签继续下一步。</span>';
             xtype = 'document-vendor-basepanel';
             title = '供应商资料'
         }
         if(type=='begin'){
-            message = '<h4>欢迎您使用优企云进销存!</br>'+
-            '温馨提示:开账后您还是可以通过左侧菜单栏对基础资料进行维护。</h4>';
+            message = '<span>欢迎您使用优企云进销存!</br>'+
+            '温馨提示:开账后您还是可以通过左侧菜单栏对基础资料进行维护。</span>';
             xtype = "begin";
             icon = 'x-gudie-end';
             if(value=='false'){
@@ -214,6 +223,9 @@ Ext.define('saas.view.sys.guide.FormPanel', {
         var width = box.width;
 
         var win = form.add(Ext.create('Ext.window.MessageBox', {
+            name:'messagebox',
+            closeAction:'destroy',
+            _icon:icon,
             msg:message,
             buttonAlign : 'right',
             height:0.5*height,

+ 9 - 0
frontend/saas-web/app/view/sys/manager/FormPanel.scss

@@ -32,6 +32,15 @@
             width:100px !important;
         }
     }
+    .x-img-default{
+        border: 1px solid #bdbdbd !important;
+    }
+    .x-container-group{
+        .x-btn-inner-default-small {
+            margin-bottom: 9px !important;
+            padding: 0 !important; 
+        }
+    }
 }
 .sys-account-datalist{
     .x-grid-body{

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/Date.js

@@ -6,7 +6,7 @@ Ext.define('Ext.locale.zh_CN.field.Date', {
     override: 'Ext.form.field.Date',
 
     config: {
-        formatText: '当前日期格式为 {0}.',
+        formatText: '',//当前日期格式为 {0}.
         minDateMessage: '该输入项的日期必须在 {0} 之后',
         maxDateMessage: '该输入项的日期必须在 {0} 之前',
         minText: "日期必须大于等于 {0}",

BIN
frontend/saas-web/resources/images/default/basePhoto.png


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

@@ -272,10 +272,6 @@
             "text": "收支类别",
             "viewType": "document-kind",
             "leaf": true
-        }, {
-            "text": "用户角色",
-            "viewType": "mainlist",
-            "leaf": true
         }]
     }]
 },{