Browse Source

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

jinsy 7 years ago
parent
commit
5cefbfe725
100 changed files with 1208 additions and 374 deletions
  1. 5 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Operation.java
  2. 34 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Status.java
  3. 1 1
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersdetailMapper.java
  4. 6 1
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MaxnumberServiceImpl.java
  5. 4 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/SubledgerMapper.java
  6. 24 23
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  7. 23 23
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  8. 6 6
      applications/document/document-server/src/main/resources/mapper/SubledgerMapper.xml
  9. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java
  10. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java
  11. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/VerificationList.java
  12. 5 11
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  13. 3 8
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  14. 33 24
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java
  15. 4 0
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  16. 4 0
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  17. 3 0
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  18. 3 0
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  19. 4 0
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  20. 4 3
      applications/money/money-server/src/main/resources/mapper/VerificationListMapper.xml
  21. 5 2
      applications/money/money-server/src/main/resources/mapper/VerificationMapper.xml
  22. 6 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java
  23. 5 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java
  24. 6 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  25. 14 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  26. 5 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  27. 1 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  28. 22 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  29. 2 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdInOutDTO.java
  30. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  31. 5 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  32. 14 0
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  33. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  34. 9 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/AccountRoleDTO.java
  35. 67 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyRspDTO.java
  36. 9 0
      base-servers/account/account-server/pom.xml
  37. 2 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java
  38. 26 3
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountCenterController.java
  39. 47 2
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java
  40. 7 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/CompanyMapper.java
  41. 10 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/AccountCenterService.java
  42. 7 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/CompanyService.java
  43. 69 32
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/AccountCenterServiceImpl.java
  44. 5 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/CompanyServiceImpl.java
  45. 3 1
      base-servers/account/account-server/src/main/resources/application.yml
  46. 4 2
      base-servers/account/account-server/src/main/resources/mapper/AccountCompanyMapper.xml
  47. 2 2
      base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml
  48. 7 1
      base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml
  49. 35 0
      base-servers/account/account-server/src/test/java/com/usoftchina/saas/account/service/CompanyServiceTest.java
  50. 3 3
      base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/api/AuthApi.java
  51. 31 0
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/api/SsoUserApi.java
  52. 41 0
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/api/SsoUserSpaceApi.java
  53. 19 0
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/dto/SsoCheckMobile.java
  54. 19 1
      base-servers/auth/sso-api/src/test/java/com/usoftchina/sso/test/SsoUserApiTest.java
  55. 40 0
      base-servers/auth/sso-api/src/test/java/com/usoftchina/sso/test/SsoUserSpaceApiTeest.java
  56. 11 1
      base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java
  57. 24 11
      frontend/saas-web/app/Application.scss
  58. 18 0
      frontend/saas-web/app/model/document/stocking.js
  59. 28 0
      frontend/saas-web/app/model/money/Verification2.js
  60. 1 1
      frontend/saas-web/app/util/FormUtil.js
  61. 1 1
      frontend/saas-web/app/view/core/base/GridPanel.js
  62. 2 2
      frontend/saas-web/app/view/core/form/FormPanelController.js
  63. 5 2
      frontend/saas-web/app/view/core/form/RemoteCombo.js
  64. 6 4
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  65. 4 3
      frontend/saas-web/app/view/core/query/QueryFormPanel.js
  66. 4 0
      frontend/saas-web/app/view/core/query/QueryPanelController.js
  67. 1 1
      frontend/saas-web/app/view/document/bom/BasePanel.js
  68. 3 3
      frontend/saas-web/app/view/document/bom/FormPanel.js
  69. 1 1
      frontend/saas-web/app/view/document/customer/BasePanel.js
  70. 4 4
      frontend/saas-web/app/view/document/customer/FormPanel.js
  71. 79 25
      frontend/saas-web/app/view/document/kind/ChildForm.js
  72. 1 1
      frontend/saas-web/app/view/document/product/BasePanel.js
  73. 3 3
      frontend/saas-web/app/view/document/product/FormPanel.js
  74. 1 1
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  75. 3 3
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  76. 2 2
      frontend/saas-web/app/view/home/InfoCard.js
  77. 5 5
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  78. 0 1
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  79. 6 6
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  80. 58 2
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  81. 6 6
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  82. 60 4
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  83. 7 7
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  84. 8 9
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  85. 7 7
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  86. 11 12
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  87. 30 24
      frontend/saas-web/app/view/money/verification/FormPanel.js
  88. 47 17
      frontend/saas-web/app/view/money/verification/FormPanelController.js
  89. 1 7
      frontend/saas-web/app/view/money/verification/FormPanelModel.js
  90. 12 7
      frontend/saas-web/app/view/money/verification/QueryPanel.js
  91. 5 5
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  92. 1 1
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  93. 0 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  94. 5 5
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  95. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  96. 0 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  97. 4 4
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  98. 0 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  99. 8 8
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  100. 2 2
      frontend/saas-web/app/view/sale/sale/FormPanelController.js

+ 5 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Operation.java

@@ -82,6 +82,11 @@ public enum Operation {
      */
     TURNPRODOUT("msg.turnProdIO","msg.turnSuccess"),
 
+    /**
+     * 销售转采购
+     */
+    TURNPURCHASE("msg.turnPurchase","msg.turnSuccess"),
+
     /**
      * 转销售验退单
      */

+ 34 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Status.java

@@ -50,10 +50,43 @@ public enum Status {
     /**
      * 未出库
      */
-    UNTURNOUT("未出库");
+    UNTURNOUT("未出库"),
+
+    /**
+     *未收款
+     */
+    RECNONE("未收款"),
+
+    /**
+     * 部分收款
+     */
+    RECPART("部分收款"),
 
 
+    /**
+     * 已收款
+     */
+    RECALL("已收款"),
+
+
+    /**
+     * 未付款
+     */
+    PAYNONE("未付款"),
+
+
+    /**
+     * 部分付款
+     */
+    PAYPART("部分付款"),
+
+    /**
+     * 已付款
+     */
+    PAYALL("已付款")
     ;
+
+
     private String display;
     private Status(String display){
         this.display = display;

+ 1 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersdetailMapper.java

@@ -18,7 +18,7 @@ public interface MaxnumbersdetailMapper {
 
     int insertSelective(Maxnumbersdetail record);
 
-    Maxnumbersdetail selectByExample(MaxnumbersdetailExample example);
+    List<Maxnumbersdetail> selectByExample(MaxnumbersdetailExample example);
 
     Maxnumbersdetail selectByPrimaryKey(Integer md_id);
 

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

@@ -263,7 +263,12 @@ public class MaxnumberServiceImpl extends CommonBaseServiceImpl<MaxnumbersMapper
         detailcta.andCompanyIdEqualTo(BaseContextHolder.getCompanyId());
         detailcta.andMd_callerEqualTo(caller);
         detailcta.andMd_leadcodeEqualTo(rulecode);
-        return maxnumbersdetailMapper.selectByExample(detailexample);
+        List<Maxnumbersdetail> details = maxnumbersdetailMapper.selectByExample(detailexample);
+        Maxnumbersdetail detail = null;
+        if (null != details && details.size() > 0) {
+            detail = details.get(0);
+        }
+        return detail;
     }
 
     /**

+ 4 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/SubledgerMapper.java

@@ -25,11 +25,11 @@ public interface SubledgerMapper {
 
     List<Subledger> selectSubledgerBycondition(@Param("con") String con, @Param("companyId") Long companyId);
 
-    Subledger selectByKindCodeCustid(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
-                                     @Param("sl_custid") Integer sl_custid);
+    Long selectByKindCodeCustid(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
+                                     @Param("sl_custid") Integer sl_custid ,@Param("companyid") Long companyid);
 
-    Subledger selectByKindCodeVendid(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
-                                     @Param("sl_vendid") Integer sl_vendid);
+    Long selectByKindCodeVendid(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
+                                     @Param("sl_vendid") Integer sl_vendid ,@Param("companyid") Long companyid);
 
     void deleteCustomer(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
                         @Param("sl_custid") Integer sl_custid);

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

@@ -267,29 +267,30 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         //插入中间表
         Double amount = (customer.getCu_beginaramount() == null ? new Double(0) : customer.getCu_beginaramount())
                 - (customer.getCu_beginprerecamount() == null ? new Double(0) : customer.getCu_beginprerecamount());
-            Subledger subledger = new Subledger();
-            subledger.setSl_code("期初余额");
-            subledger.setSl_kind("期初余额");
-            subledger.setSl_vendid(0);
-            subledger.setSl_custid(Math.toIntExact(customer.getId()));
-            subledger.setCompanyId(BaseContextHolder.getCompanyId());
-            subledger.setSl_date(DateUtils.getFirstDay(customer.getCu_begindate()));
-            subledger.setSl_ym(DateUtils.getYm(customer.getCu_begindate()));
-            if (amount > new Double(0)){
-                subledger.setSl_amount(amount);
-            }else {
-                subledger.setSl_preamount(amount);
-            }
-            subledger.setSl_orderamount(Math.abs(amount));
-            subledger.setSl_namount(Math.abs(amount));
-
-            Subledger subledger1 = subledgerMapper.selectByKindCodeCustid("期初余额","期初余额",
-                    Math.toIntExact(customer.getId()));
-            if (subledger1 == null) {
-                subledgerMapper.insertSelective(subledger);
-            }else {
-                subledgerMapper.updateByPrimaryKeySelective(subledger);
-            }
+        Subledger subledger = new Subledger();
+        subledger.setSl_code("期初余额");
+        subledger.setSl_kind("期初余额");
+        subledger.setSl_vendid(0);
+        subledger.setSl_custid(Math.toIntExact(customer.getId()));
+        subledger.setCompanyId(BaseContextHolder.getCompanyId());
+        subledger.setSl_date(DateUtils.getFirstDay(customer.getCu_begindate()));
+        subledger.setSl_ym(DateUtils.getYm(customer.getCu_begindate()));
+        if (amount > new Double(0)){
+            subledger.setSl_amount(amount);
+        }else {
+            subledger.setSl_preamount(amount);
+        }
+        subledger.setSl_orderamount(Math.abs(amount));
+        subledger.setSl_namount(Math.abs(amount));
+
+        Long sl_id  = subledgerMapper.selectByKindCodeCustid("期初余额","期初余额",
+                Math.toIntExact(customer.getId()),BaseContextHolder.getCompanyId());
+        subledger.setId(sl_id);
+        if ( sl_id!=null && sl_id > 0 ) {
+            subledgerMapper.updateByPrimaryKeySelective(subledger);
+        }else {
+            subledgerMapper.insertSelective(subledger);
+        }
 
         baseDTO = getBaseDTOById(cu_id);
         //日志记录

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

@@ -221,29 +221,29 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
         //插入中间表
         Double amount = (main.getVe_beginapamount() == null ? new Double(0) : main.getVe_beginapamount())
                 - (main.getVe_beginprepayamount() == null ? new Double(0) : main.getVe_beginprepayamount());
-            Subledger subledger = new Subledger();
-            subledger.setSl_code("期初余额");
-            subledger.setSl_kind("期初余额");
-            subledger.setSl_vendid(Math.toIntExact(main.getId()));
-            subledger.setSl_custid(0);
-            subledger.setCompanyId(BaseContextHolder.getCompanyId());
-            subledger.setSl_date(DateUtils.getFirstDay(main.getVe_begindate()));
-            subledger.setSl_ym(DateUtils.getYm(main.getVe_begindate()));
-            if (amount > new Double(0)){
-                subledger.setSl_amount(amount);
-            }else {
-                subledger.setSl_preamount(amount);
-            }
-            subledger.setSl_orderamount(Math.abs(amount));
-            subledger.setSl_namount(Math.abs(amount));
-
-            Subledger subledger1 = subledgerMapper.selectByKindCodeVendid("期初余额","期初余额",
-                    Math.toIntExact(main.getId()));
-            if (subledger1 == null) {
-                subledgerMapper.insertSelective(subledger);
-            }else {
-                subledgerMapper.updateByPrimaryKeySelective(subledger);
-            }
+        Subledger subledger = new Subledger();
+        subledger.setSl_code("期初余额");
+        subledger.setSl_kind("期初余额");
+        subledger.setSl_vendid(Math.toIntExact(main.getId()));
+        subledger.setSl_custid(0);
+        subledger.setCompanyId(BaseContextHolder.getCompanyId());
+        subledger.setSl_date(DateUtils.getFirstDay(main.getVe_begindate()));
+        subledger.setSl_ym(DateUtils.getYm(main.getVe_begindate()));
+        if (amount > new Double(0)){
+            subledger.setSl_amount(amount);
+        }else {
+            subledger.setSl_preamount(amount);
+        }
+        subledger.setSl_orderamount(Math.abs(amount));
+        subledger.setSl_namount(Math.abs(amount));
+        Long sl_id = subledgerMapper.selectByKindCodeVendid("期初余额","期初余额",
+                Math.toIntExact(main.getId()),BaseContextHolder.getCompanyId());
+        subledger.setId(sl_id);
+        if ( sl_id!=null && sl_id > 0 ) {
+            subledgerMapper.updateByPrimaryKeySelective(subledger);
+        }else {
+            subledgerMapper.insertSelective(subledger);
+        }
 
         return generateMsgObj(main.getId(), code);
     }

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

@@ -247,20 +247,20 @@
         where sl_code = #{sl_code,jdbcType=VARCHAR}
     </select>
 
-  <select id="selectByKindCodeCustid" resultMap="BaseResultMap">
+  <select id="selectByKindCodeCustid" resultType="java.lang.Long">
   select
-  <include refid="Base_Column_List" />
+  ifnull(sl_id,0)
   from subledger
   where sl_code = #{sl_code,jdbcType=VARCHAR} and sl_kind = #{sl_kind,jdbcType=VARCHAR} and
-    sl_custid = #{sl_custid,jdbcType=INTEGER}
+    sl_custid = #{sl_custid,jdbcType=INTEGER} and companyId = #{companyid,jdbcType=INTEGER}
   </select>
 
-  <select id="selectByKindCodeVendid" resultMap="BaseResultMap">
+  <select id="selectByKindCodeVendid" resultType="java.lang.Long">
     select
-    <include refid="Base_Column_List" />
+    ifnull(sl_id,0)
     from subledger
     where sl_code = #{sl_code,jdbcType=VARCHAR} and sl_kind = #{sl_kind,jdbcType=VARCHAR} and
-    sl_vendid = #{sl_vendid,jdbcType=INTEGER}
+    sl_vendid = #{sl_vendid,jdbcType=INTEGER} and companyId = #{companyid,jdbcType=INTEGER}
   </select>
 
   <delete id="deleteCustomer">

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

@@ -43,4 +43,6 @@ public interface PaybalanceMapper extends CommonBaseMapper<Paybalance> {
     Double selectThisamount(Integer id);
 
     void updateBankAmount(@Param("bk_thisamount") Double bk_thisamount, @Param("id") Integer id);
+
+    int checkStatus(@Param("id") Long id);
 }

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalanceMapper.java

@@ -50,4 +50,6 @@ public interface RecbalanceMapper extends CommonBaseMapper<Recbalance> {
     Customer selectCustomerByPrimaryKey(Integer bkId);
 
     int updateCustomerByPrimaryKeySelective(Customer record);
+
+    int checkStatus(@Param("id") Long id);
 }

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

@@ -55,9 +55,9 @@ public class VerificationList extends CommonBaseEntity implements Serializable {
 
     private Date vc_recorddate;
 
-    private Integer vc_status;
+    private String vc_status;
 
-    private BigDecimal vc_statuscode;
+    private String vc_statuscode;
 
     private String vc_remark;
 

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

@@ -202,12 +202,8 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
         paybalance.setPb_auditman(BaseContextHolder.getUserName());
         paybalance.setPb_auditdate(new Date());
         pay.setMain(paybalance);
-        Subledger subledger = this.changSubledgerUntil(paybalance);
-        if (subledger.getSl_code() == null){
-            subledgerMapper.insertSelective(subledger);
-        }else {
-            subledgerMapper.updateByPrimaryKeySelective(subledger);
-        }
+        this.changSubledgerUntil(paybalance);
+
         this.changBankUntil(pay);
         DocBaseDTO docBaseDTO = this.insert(pay);
         Long id = docBaseDTO.getId();
@@ -508,15 +504,13 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
 
 
     //插入中间表
-    public Subledger changSubledgerUntil(Paybalance paybalance){
+    public void changSubledgerUntil(Paybalance paybalance){
         Subledger subledger = new Subledger();
-//        BeanUtils.copyProperties(subledger, paybalance);
         subledger.setCompanyId(BaseContextHolder.getCompanyId());
         subledger.setSl_code(paybalance.getPb_code());
         subledger.setSl_kind(paybalance.getPb_kind());
         subledger.setSl_custid(0);
-//        subledger.setSl_vendid(paybalance.getPb_vendid());
-        subledger.setSl_vendid(1);
+        subledger.setSl_vendid(paybalance.getPb_vendid());
         subledger.setSl_date(paybalance.getPb_date());
         subledger.setSl_ym(DateUtils.getYm(paybalance.getPb_date()));
         if (paybalance.getPb_pdamount() == null){
@@ -546,7 +540,7 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
         subledger.setSl_remark(subledger.getSl_remark());
         subledger.setSl_preamount(subledger.getSl_preamount());
 
-        return subledger;
+        subledgerMapper.insertSelective(subledger);
     }
 
     //插入bank中间表

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

@@ -238,12 +238,7 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
         recbalance.setRb_auditman(BaseContextHolder.getUserName());
         recbalance.setRb_auditdate(new Date());
         rec.setMain(recbalance);
-        Subledger subledger = this.changSubledgerUntil(recbalance);
-        if (subledger.getSl_code() == null){
-            subledgerMapper.insertSelective(subledger);
-        }else {
-            subledgerMapper.updateByPrimaryKeySelective(subledger);
-        }
+        this.changSubledgerUntil(recbalance);
         this.changBankUntil(rec);
         DocBaseDTO docBaseDTO = this.insert(rec);
         Long id = docBaseDTO.getId();
@@ -512,7 +507,7 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
     }
 
     //插入中间表
-    public Subledger changSubledgerUntil(Recbalance recbalance){
+    public void changSubledgerUntil(Recbalance recbalance){
         Subledger subledger = new Subledger();
         subledger.setCompanyId(BaseContextHolder.getCompanyId());
         subledger.setSl_code(recbalance.getRb_code());
@@ -548,7 +543,7 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
         subledger.setSl_remark(subledger.getSl_remark());
         subledger.setSl_preamount(subledger.getSl_preamount());
 
-        return subledger;
+        subledgerMapper.insertSelective(subledger);
     }
 
     //插入bank中间表

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

@@ -135,6 +135,10 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         if(id.longValue() > 0 ){
             String kind = verification.getVc_kind();
             verification.setVc_kind(transferKind(kind));
+            verification.setCompanyId(companyId);
+            verification.setUpdateTime(new Date());
+            verification.setUpdaterName(BaseContextHolder.getUserName());
+            verification.setUpdaterId(userId);
             verificationMapper.updateByPrimaryKey(verification);
             baseDTO = new DocBaseDTO(id, code, BillCodeSeq.VERIFICATION.getCaller());
             if (!("AUDITED".equals(verification.getVc_statuscode()))) {
@@ -166,6 +170,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
             Verificationdet detail = BeanMapper.map(item,Verificationdet.class);
             Long vd_id = detail.getId();
             detail.setVd_vcid(id);
+            detail.setVd_id(Math.toIntExact(vd_id));
             detail.setCompanyId(companyId);
             detail.setVd_ym(numberYM);
             if (vd_id>0){
@@ -174,48 +179,52 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
                 verificationdetMapper.insertSelective(detail);
             }
         }
-        for (VerificationdetailDTO item : items2) {
-            Verificationdetail detail = BeanMapper.map(item,Verificationdetail.class);
-            detail.setVcd_vcid(id);
-            detail.setVcd_ym(numberYM);
-            detail.setCompanyId(companyId);
-            Long vcd_id = detail.getId();
-            if(vcd_id>0){
-                verificationdetailMapper.updateByPrimaryKey(detail);
-            }else{
-                verificationdetailMapper.insertSelective(detail);
+        if(items2!=null){
+            for (VerificationdetailDTO item : items2) {
+                Verificationdetail detail = BeanMapper.map(item,Verificationdetail.class);
+                Long vcd_id = detail.getId();
+                detail.setVcd_vcid(id);
+                detail.setVcd_id(Math.toIntExact(vcd_id));
+                detail.setVcd_ym(numberYM);
+                detail.setCompanyId(companyId);
+                if(vcd_id>0){
+                    verificationdetailMapper.updateByPrimaryKey(detail);
+                }else{
+                    verificationdetailMapper.insertSelective(detail);
+                }
             }
         }
-        updateCorrespondingData(formdata);
+
+        updateCorrespondingData(id);
         return baseDTO;
     }
 
-    private void updateCorrespondingData(VerificationFormDTO formdata) {
+    private void updateCorrespondingData(Long id) {
         //获取主表信息
-        VerificationDTO main = formdata.getMain();
+        Verification main = verificationMapper.selectByPrimaryKey(Math.toIntExact(id));
         //获取从表1
-        List<VerificationdetDTO> items1 = formdata.getItems1();
+        List<Verificationdet> items1 = verificationdetMapper.selectByFK(id);
         //获取从表2
-        List<VerificationdetailDTO> items2 = formdata.getItems2();
+        List<Verificationdetail> items2 = verificationdetailMapper.selectByFK(id);
 
         String type = main.getVc_kind();
         if(type.equals("receipts_offset_receivable") || type.equals("prepaid_offset_payable") ||
                 type.equals("receivable_offset_payable")){
             Double total1 = new Double(0);
-            for(VerificationdetDTO det : items1){
+            for(Verificationdet det : items1){
                 Double nowbalanceDet = det.getVd_nowbalance()==null?new Double(0):det.getVd_nowbalance();
                 total1 += nowbalanceDet;
 
                 //单据金额
                 Double amount = det.getVd_amount();
                 //核销金额
-                if(amount>0 && nowbalanceDet<0){
+                if(amount.doubleValue()>0 && nowbalanceDet.doubleValue()<0){
                     String msg = BizExceptionCode.MONEY_NOWAMOUNT_POSITIVE.getMessage();
                     int code = BizExceptionCode.MONEY_NOWAMOUNT_POSITIVE.getCode();
                     String error = String.format(msg, det.getVd_slkind());
                     throw new BizException(code, error);
                 }
-                if(amount<0 && nowbalanceDet>0){
+                if(amount.doubleValue()<0 && nowbalanceDet.doubleValue()>0){
                     String msg = BizExceptionCode.MONEY_NOWAMOUNT_POSITIVE.getMessage();
                     int code = BizExceptionCode.MONEY_NOWAMOUNT_POSITIVE.getCode();
                     String error = String.format(msg, det.getVd_slkind());
@@ -223,20 +232,20 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
                 }
             }
             Double total2 = new Double(0);
-            for(VerificationdetailDTO detail : items2){
+            for(Verificationdetail detail : items2){
                 Double nowbalanceDet = detail.getVcd_nowbalance()==null?new Double(0):detail.getVcd_nowbalance();
                 total2 += nowbalanceDet;
 
                 //单据金额
                 Double amount = detail.getVcd_amount();
                 //核销金额
-                if(amount>0 && nowbalanceDet<0){
+                if(amount.doubleValue()>0 && nowbalanceDet.doubleValue()<0){
                     String msg = BizExceptionCode.MONEY_NOWAMOUNT_POSITIVE.getMessage();
                     int code = BizExceptionCode.MONEY_NOWAMOUNT_POSITIVE.getCode();
                     String error = String.format(msg, detail.getVcd_slkind());
                     throw new BizException(code, error);
                 }
-                if(amount<0 && nowbalanceDet>0){
+                if(amount.doubleValue()<0 && nowbalanceDet.doubleValue()>0){
                     String msg = BizExceptionCode.MONEY_NOWAMOUNT_POSITIVE.getMessage();
                     int code = BizExceptionCode.MONEY_NOWAMOUNT_POSITIVE.getCode();
                     String error = String.format(msg, detail.getVcd_slkind());
@@ -247,10 +256,10 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
                 throw new BizException(500, BizExceptionCode.VERIFICATION_CHECK_BALANCE.getMessage());
             }
         }else if(type.equals("receivable_to_receivable") || type.equals("payable_to_payable")){
-            for(VerificationdetDTO det : items1){
+            for(Verificationdet det : items1){
                 Double namount = det.getSl_namount()==null?new Double(0):det.getSl_namount();
                 Double nowbalance = det.getVd_nowbalance()==null?new Double(0):det.getVd_nowbalance();
-                if(namount<nowbalance){
+                if(namount.doubleValue()<nowbalance.doubleValue()){
                     throw new BizException(500, BizExceptionCode.VERIFICATION_CHECK_BALANCE.getMessage());
                 }
             }
@@ -403,7 +412,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
     public void deleteDetail1(Long id) {
         if (null != id) {
             Verificationdet verificationdet = verificationdetMapper.selectByPrimaryKey(Integer.valueOf(String.valueOf(id)));
-            Verification verification = verificationMapper.selectByPrimaryKey(verificationdet.getVd_vcid());
+            Verification verification = verificationMapper.selectByPrimaryKey(Math.toIntExact(verificationdet.getVd_vcid()));
             DocBaseDTO baseDTO = new DocBaseDTO();
             baseDTO.setId(id);
             baseDTO.setCode(verification.getVc_code());

+ 4 - 0
applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml

@@ -297,4 +297,8 @@
     from fundtransfer
     where ft_id = #{id,jdbcType=INTEGER}
   </select>
+
+  <select id="checkStatus" resultType="int">
+    select count(1) from fundtransfer where ifnull(ft_statuscode,'')='AUDITED' and ft_id= #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 4 - 0
applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml

@@ -375,4 +375,8 @@
     from othreceipts
     where or_id = #{id,jdbcType=INTEGER}
   </select>
+
+  <select id="checkStatus" resultType="int">
+    select count(1) from othreceipts where ifnull(or_statuscode,'')='AUDITED' and or_id= #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 3 - 0
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -373,4 +373,7 @@
     from othspendings
     where os_id = #{id,jdbcType=INTEGER}
   </select>
+  <select id="checkStatus" resultType="int">
+    select count(1) from othspendings where ifnull(os_statuscode,'')='AUDITED' and os_id= #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 3 - 0
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -767,4 +767,7 @@
     </set>
     where ve_id = #{id}
   </update>
+  <select id="checkStatus" resultType="int">
+    select count(1) from paybalance where ifnull(pb_statuscode,'')='AUDITED' and pb_id= #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 4 - 0
applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml

@@ -893,4 +893,8 @@
     </set>
     where cu_id = #{id}
   </update>
+
+  <select id="checkStatus" resultType="int">
+    select count(1) from recbalance where ifnull(rb_statuscode,0)='AUDITED' and rb_id= #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 4 - 3
applications/money/money-server/src/main/resources/mapper/VerificationListMapper.xml

@@ -22,8 +22,8 @@
         <result column="vc_recorderid" property="vc_recorderid" jdbcType="INTEGER" />
         <result column="vc_recorder" property="vc_recorder" jdbcType="VARCHAR" />
         <result column="vc_recorddate" property="vc_recorddate" jdbcType="TIMESTAMP" />
-        <result column="vc_status" property="vc_status" jdbcType="INTEGER" />
-        <result column="vc_statuscode" property="vc_statuscode" jdbcType="DECIMAL" />
+        <result column="vc_status" property="vc_status" jdbcType="VARCHAR" />
+        <result column="vc_statuscode" property="vc_statuscode" jdbcType="VARCHAR" />
         <result column="vc_remark" property="vc_remark" jdbcType="VARCHAR" />
         <result column="vc_text1" property="vc_text1" jdbcType="VARCHAR" />
         <result column="vc_text2" property="vc_text2" jdbcType="VARCHAR" />
@@ -46,7 +46,8 @@
 
     </resultMap>
     <sql id="Base_Column_List">
-    vc_id, vc_code, vc_kind, vc_date, vc_vendid, vc_vendcode ,vc_custcode ,vc_custid ,vc_amount1
+    vc_id, vc_code, vc_kind, vc_date, vc_vendid, vc_vendcode ,vc_custcode ,vc_custid ,vc_amount1,
+    vc_status,vc_statuscode,vc_vendname,vc_custname
   </sql>
     <select id="selectVerificationListByCondition"  resultMap="BaseResultMap">
         select

+ 5 - 2
applications/money/money-server/src/main/resources/mapper/VerificationMapper.xml

@@ -23,8 +23,8 @@
     <result column="vc_recorderid" property="vc_recorderid" jdbcType="INTEGER" />
     <result column="vc_recorder" property="vc_recorder" jdbcType="VARCHAR" />
     <result column="vc_recorddate" property="vc_recorddate" jdbcType="TIMESTAMP" />
-    <result column="vc_status" property="vc_status" jdbcType="INTEGER" />
-    <result column="vc_statuscode" property="vc_statuscode" jdbcType="DECIMAL" />
+    <result column="vc_status" property="vc_status" jdbcType="VARCHAR" />
+    <result column="vc_statuscode" property="vc_statuscode" jdbcType="VARCHAR" />
     <result column="vc_remark" property="vc_remark" jdbcType="VARCHAR" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
@@ -648,4 +648,7 @@
   <select id="validateSetAcount" parameterType="long" resultType="java.lang.String">
     select count(1) from periodsdetail where pd_detno = #{detno} and IFNULL(pd_status,0)=0
   </select>
+  <select id="checkStatus" resultType="int">
+    select count(1) from Verification where ifnull(vc_statuscode,'')='AUDITED' and vc_id= #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

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

@@ -81,4 +81,10 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private Long pi_maid;
 
+    private String pi_iocode;
+
+    private String pi_prstatus;
+
+    private String pi_prstatuscode;
+
 }

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

@@ -77,4 +77,9 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private Long pi_maid;
 
+    private String pi_iocode;
+
+    private String pi_prstatus;
+
+    private String pi_prstatuscode;
 }

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

@@ -144,6 +144,12 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Long pd_ioid;
 
+    private String pi_iocode;
+
+    private String pi_prstatus;
+
+    private String pi_prstatuscode;
+
     //private ProductDTO productDTO;
     private Long pr_id;
     private String pr_code;

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

@@ -142,6 +142,16 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         pi_inoutno = pushMaxnubmer(baseDTO);
         prodInOut.setPi_inoutno(pi_inoutno);
 
+
+        if ("采购验收单".equals(pi_class)){
+            prodInOut.setPi_prstatus(Status.PAYNONE.getDisplay());
+            prodInOut.setPi_prstatuscode(Status.PAYNONE.name());
+        }else if ("采购验退单".equals(pi_class)){
+            prodInOut.setPi_prstatus(Status.RECNONE.getDisplay());
+            prodInOut.setPi_prstatuscode(Status.RECNONE.name());
+        }
+
+
         //判断更新与保存动作
         if (StringUtils.isEmpty(pi_id) || "0".equals(pi_id.toString())){
             prodInOut.setCompanyId(companyId);
@@ -441,6 +451,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_puid(sourcePi.getPi_puid());
         targetPi.setPi_pucode(sourcePi.getPi_pucode());
         targetPi.setPi_ioid(sourcePi.getId());
+        targetPi.setPi_iocode(sourcePi.getPi_inoutno());
+        //设置付款状态
+        targetPi.setPi_prstatus(Status.RECNONE.getDisplay());
+        targetPi.setPi_prstatuscode(Status.RECNONE.name());
         //设置公司id
         targetPi.setCompanyId(sourcePi.getCompanyId());
         targetPi.setCreateTime(new Date());

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

@@ -438,6 +438,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         prodInOut.setPi_vendname(purchase.getPu_vendname());
         prodInOut.setPi_puid(purchase.getId().intValue());
         prodInOut.setPi_pucode(purchase.getPu_code());
+        //设置付款状态
+        prodInOut.setPi_prstatus(Status.PAYNONE.getDisplay());
+        prodInOut.setPi_prstatuscode(Status.PAYNONE.name());
+
         //设置公司id
         prodInOut.setCompanyId(purchase.getCompanyId());
         prodInOut.setCreatorId(userId);
@@ -518,7 +522,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //生成更新对象
         purchase.setId(id);
         purchase.setPu_acceptstatus(Status.UNTURNIN.getDisplay());
-        purchase.setPu_acceptstatuscode(Status.UNAUDITED.name());
+        purchase.setPu_acceptstatuscode(Status.UNTURNIN.name());
         purchase.setUpdateTime(new Date());
         purchase.setUpdaterId(BaseContextHolder.getUserId());
         getMapper().updateByPrimaryKeySelective(purchase);

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

@@ -75,6 +75,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <result column="pi_iocode" jdbcType="VARCHAR" property="pi_iocode" />
     <result column="pd_remark" jdbcType="VARCHAR" property="pd_remark" />
     <result column="pr_id" property="pr_id"/>
     <result column="pr_code" property="pr_code"/>

+ 22 - 1
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -40,6 +40,9 @@
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
     <result column="pi_ioid" jdbcType="INTEGER" property="pi_ioid" />
+    <result column="pi_iocode" jdbcType="VARCHAR" property="pi_iocode" />
+    <result column="pi_prstatus" jdbcType="VARCHAR" property="pi_prstatus" />
+    <result column="pi_prstatuscode" jdbcType="VARCHAR" property="pi_prstatuscode" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.purchase.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
@@ -52,7 +55,7 @@
     pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
     pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
     companyid, updaterid,updaterName,updatetime,creatorid,creatorName,createtime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
-    pi_auditman,pi_remark,pi_ioid
+    pi_auditman,pi_remark,pi_ioid,pi_iocode,pi_prstatus,pi_prstatuscode
   </sql>
   <sql id="Blob_Column_List">
     pi_address
@@ -190,6 +193,15 @@
       <if test="pi_ioid != null">
         pi_ioid,
       </if>
+      <if test="pi_iocode != null">
+        pi_iocode,
+      </if>
+      <if test="pi_prstatus != null">
+        pi_prstatus,
+      </if>
+      <if test="pi_prstatuscode != null">
+        pi_prstatuscode,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -306,6 +318,15 @@
       <if test="pi_ioid != null">
         #{pi_ioid,jdbcType=INTEGER},
       </if>
+      <if test="pi_iocode != null">
+        #{pi_iocode,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_prstatus != null">
+        #{pi_prstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_prstatuscode != null">
+        #{pi_prstatuscode,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
 

+ 2 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdInOutDTO.java

@@ -73,4 +73,6 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_remark;
 
+    private String pi_iocode;
+
 }

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

@@ -482,7 +482,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         setTotal(targetPi);
 
         //日志记录
-        DocBaseDTO log = new DocBaseDTO(id, sourcePi.getPi_inoutno(), BillCodeSeq.SALEIN.getCaller());
+        DocBaseDTO log = new DocBaseDTO(id, sourcePi.getPi_inoutno(), BillCodeSeq.SALEOUT.getCaller());
         messageLogService.customizeLog(log, Operation.TURNPRODOUTRETURN);
 
         baseDTO.setId(pi_id);

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

@@ -597,7 +597,11 @@ public class SaleServiceImpl implements SaleService{
         baseDTO.setCode(result);
         baseDTO.setId(Long.valueOf(String.valueOf(purchaseId)));
         baseDTO.setName(BillCodeSeq.PURCHASE.getName());
-        return baseDTO;
+
+
+        DocBaseDTO log = new DocBaseDTO(sale.getId(),sale.getSa_code(),BillCodeSeq.SALE.getCaller());
+        messageLogService.customizeLog(log, Operation.TURNPURCHASE);
+        return log;
     }
 
     //更新最新销售总额

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

@@ -36,6 +36,8 @@
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
+    <result column="pi_iocode" jdbcType="VARCHAR" property="pi_iocode" />
+      <result column="pi_ioid" jdbcType="INTEGER" property="pi_ioid" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
@@ -242,6 +244,12 @@
       <if test="pi_remark != null">
         pi_remark,
       </if>
+      <if test="pi_iocode != null">
+        pi_iocode,
+      </if>
+        <if test="pi_ioid != null">
+            pi_ioid,
+        </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -338,6 +346,12 @@
       <if test="pi_remark != null">
         #{pi_remark,jdbcType=LONGVARCHAR},
       </if>
+      <if test="pi_iocode != null">
+        #{pi_iocode,jdbcType=LONGVARCHAR},
+      </if>
+        <if test="pi_ioid != null">
+            #{pi_ioid},
+        </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.po.ProdInOut">

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

@@ -76,4 +76,6 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
     private String pi_macode;
 
     private Long pi_maid;
+
+    private String pi_iocode;
 }

+ 9 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/AccountRoleDTO.java

@@ -9,9 +9,18 @@ public class AccountRoleDTO implements Serializable {
     private String realname;
     private String email;
     private String mobile;
+    private boolean enabled;
     private String roleNames;
     private String roleIds;
 
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+
     public String getRoleNames() {
         return roleNames;
     }

+ 67 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/CompanyRspDTO.java

@@ -14,9 +14,62 @@ public class CompanyRspDTO implements Serializable {
      */
     private String businessCode;
     private String address;
+    /**
+     * 是否是默认企业
+     */
     private boolean default_;
+    /**
+     * 是否开通saas
+     */
     private boolean saas_;
     private String uu;
+    /**
+     * 是否有默认企业
+     */
+    private boolean hasDefaultCompany;
+    /**
+     * 默认企业ID
+     */
+    private Long defaultCompanyId;
+
+    /**
+     * 管理员名称
+     */
+    private String admin;
+
+    private Long adminId;
+
+    public Long getAdminId() {
+        return adminId;
+    }
+
+    public void setAdminId(Long adminId) {
+        this.adminId = adminId;
+    }
+
+    public String getAdmin() {
+        return admin;
+    }
+
+    public void setAdmin(String admin) {
+        this.admin = admin;
+    }
+
+    public boolean isHasDefaultCompany() {
+        return hasDefaultCompany;
+    }
+
+    public void setHasDefaultCompany(boolean hasDefaultCompany) {
+        this.hasDefaultCompany = hasDefaultCompany;
+    }
+
+    public Long getDefaultCompanyId() {
+        return defaultCompanyId;
+    }
+
+    public void setDefaultCompanyId(Long defaultCompanyId) {
+        this.defaultCompanyId = defaultCompanyId;
+    }
 
     public String getUu() {
         return uu;
@@ -73,4 +126,18 @@ public class CompanyRspDTO implements Serializable {
     public void setDefault_(boolean default_) {
         this.default_ = default_;
     }
+
+    public CompanyRspDTO(String name, String businessCode, String address, boolean default_, boolean saas_, String uu, String admin, Long adminId) {
+        this.name = name;
+        this.businessCode = businessCode;
+        this.address = address;
+        this.default_ = default_;
+        this.saas_ = saas_;
+        this.uu = uu;
+        this.admin = admin;
+        this.adminId = adminId;
+    }
+
+    public CompanyRspDTO() {
+    }
 }

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

@@ -21,10 +21,19 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>account-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>sso-api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>file-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-api</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>auth-client</artifactId>

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

@@ -14,7 +14,8 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
  */
 @SpringBootApplication
 @EnableEurekaClient
-@EnableFeignClients("com.usoftchina.saas")
+@EnableFeignClients({"com.usoftchina.sso",
+                     "com.usoftchina.saas"})
 @EnableTransactionManagement
 @MapperScan(basePackages = "com.usoftchina.saas.account.mapper")
 @EnableAuthClient

+ 26 - 3
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountCenterController.java

@@ -2,9 +2,9 @@ package com.usoftchina.saas.account.controller;
 
 import com.usoftchina.saas.account.dto.BindCompanyDTO;
 import com.usoftchina.saas.account.dto.CompanyAccountDTO;
-import com.usoftchina.saas.account.dto.CompanyListDTO;
 import com.usoftchina.saas.account.service.AccountCenterService;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.sso.api.SsoUserSpaceApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -14,6 +14,8 @@ public class AccountCenterController {
 
     @Autowired
     private AccountCenterService accountCenterService;
+    @Autowired
+    private SsoUserSpaceApi ssoUserSpaceApi;
 
     /**
      * 信息完善界面   保存接口
@@ -22,12 +24,23 @@ public class AccountCenterController {
      */
     @PostMapping("/companyAccount/save")
     public Result saveCompanyAccount(@RequestBody CompanyAccountDTO companyAccountDTO){
-        return Result.success(accountCenterService.saveCompanyAccount(companyAccountDTO));
+        return Result.success(accountCenterService.saveCompanyAccount(companyAccountDTO).getData());
+    }
+
+    /**
+     * 信息完善界面   更新接口
+     * @param companyAccountDTO
+     * @return
+     */
+    @PostMapping("/companyAccount/update")
+    public Result updateCompanyAccount(@RequestBody CompanyAccountDTO companyAccountDTO){
+        accountCenterService.updateCompanyAccount(companyAccountDTO);
+        return Result.success();
     }
 
     /**
      * 获取企业信息列表
-     * @param mobile      用户UU号
+     * @param mobile
      * @return
      */
     @GetMapping("/company/list")
@@ -46,4 +59,14 @@ public class AccountCenterController {
         return Result.success();
     }
 
+    /**
+     * 校验企业名称时候已在账户中心注册过
+     * @param spaceName
+     * @return
+     */
+    @GetMapping("/checkSpaceName")
+    public Result checkSpaceName(@RequestParam("spaceName") String spaceName){
+        return Result.success(ssoUserSpaceApi.checkSpaceName(spaceName));
+    }
+
 }

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

@@ -17,6 +17,7 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.RegexpUtils;
+import com.usoftchina.sso.api.SsoUserApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -34,12 +35,12 @@ public class AccountController {
 
     @Autowired
     private AccountService accountService;
-
     @Autowired
     private CompanyService companyService;
-
     @Autowired
     private RoleService roleService;
+    @Autowired
+    private SsoUserApi ssoUserApi;
 
     /**
      * 注册
@@ -104,6 +105,46 @@ public class AccountController {
         return Result.success();
     }
 
+    /**
+     * SAAS手动添加账户,并默认绑定当前公司
+     *
+     * @param accountCopyDTO
+     * @return
+     */
+    @PostMapping("/register/add")
+    public Result AddAccount(@RequestBody AccountCopyDTO accountCopyDTO) {
+        // 判断是否已注册
+        Account account = accountService.findByUsername(accountCopyDTO.getUsername());
+        if (null != account) {
+            return Result.error(ExceptionCode.USER_NAME_EXIST);
+        }
+        account = accountService.findByMobile(accountCopyDTO.getMobile());
+        if (null != account) {
+            return Result.error(ExceptionCode.USER_MOBILE_EXIST);
+        }
+        account = accountService.findByEmail(accountCopyDTO.getEmail());
+        if (null != account) {
+            return Result.error(ExceptionCode.USER_EMAIL_EXIST);
+        }
+
+        account = BeanMapper.map(accountCopyDTO, Account.class);
+        account.setEnabled(true);
+        accountService.save(account);
+        //绑定企业
+        accountService.bindCompany(account.getId(), BaseContextHolder.getCompanyId());
+        return Result.success();
+    }
+
+    /**
+     * 校验该手机号是否已在账户中心注册
+     * @param mobile
+     * @return
+     */
+    @GetMapping("/checkMobile")
+    public Result checkMobile(@RequestParam("mobile") String mobile){
+        return Result.success(ssoUserApi.checkMobile(mobile));
+    }
+
     /**
      * 修改
      *
@@ -356,6 +397,10 @@ public class AccountController {
     @PostMapping("/disable")
     public Result disableAccount(@RequestParam long accountId) {
         accountService.disable(accountId);
+        //同步到优软云
+        Long userUU = accountService.findByPrimaryKey(accountId).getUu();
+        Long companyUU = companyService.findByPrimaryKey(BaseContextHolder.getCompanyId()).getUu();
+        String result = ssoUserApi.unbind("unbind", userUU, companyUU);
         accountService.clearCache(accountId);
         return Result.success();
     }

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

@@ -82,4 +82,11 @@ public interface CompanyMapper {
      * @return
      */
     int updateByPrimaryKeySelective(CompanyRegDTO companyRegDTO);
+
+    /**
+     * 更新UU号
+     * @param companyId
+     * @param uu
+     */
+    void updateUUByPrimaryKey(@Param("companyId") Long companyId, @Param("uu") Long uu);
 }

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

@@ -6,6 +6,7 @@ import com.usoftchina.saas.account.dto.CompanyRspDTO;
 import com.usoftchina.saas.base.Result;
 
 import java.util.List;
+import java.util.Map;
 
 public interface AccountCenterService {
 
@@ -16,12 +17,20 @@ public interface AccountCenterService {
      */
     Result saveCompanyAccount(CompanyAccountDTO companyAccountDTO);
 
+
+    /**
+     * 企业账户信息完善  更新
+     * @param companyAccountDTO
+     * @return
+     */
+    boolean updateCompanyAccount(CompanyAccountDTO companyAccountDTO);
+
     /**
      * 获取企业信息列表
      * @param mobile
      * @return
      */
-    List<CompanyRspDTO> getCompanyList(String mobile);
+    Map<String, Object> getCompanyList(String mobile);
 
     /**
      * 更新默认企业

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

@@ -98,4 +98,11 @@ public interface CompanyService {
      * @param companyRegDTO
      */
     void update(CompanyRegDTO companyRegDTO);
+
+    /**
+     * 更新公司UU号
+     * @param companyId
+     * @param uu
+     */
+    void updateUUByPrimaryKey(Long companyId, Long uu);
 }

+ 69 - 32
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/AccountCenterServiceImpl.java

@@ -7,11 +7,18 @@ import com.usoftchina.saas.account.po.Company;
 import com.usoftchina.saas.account.service.AccountCenterService;
 import com.usoftchina.saas.account.service.AccountService;
 import com.usoftchina.saas.account.service.CompanyService;
+import com.usoftchina.saas.auth.api.AuthApi;
+import com.usoftchina.saas.auth.dto.TokenDTO;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.StringUtils;
+import com.usoftchina.sso.api.SsoUserApi;
+import com.usoftchina.sso.api.SsoUserSpaceApi;
+import com.usoftchina.sso.dto.SsoUserSpace;
+import com.usoftchina.sso.dto.SsoUserSpaceList;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.LinkedMultiValueMap;
@@ -19,7 +26,9 @@ import org.springframework.util.MultiValueMap;
 import org.springframework.web.client.RestTemplate;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 @Service
 public class AccountCenterServiceImpl implements AccountCenterService {
@@ -29,11 +38,14 @@ public class AccountCenterServiceImpl implements AccountCenterService {
     @Autowired
     private AccountService accountService;
     @Autowired
+    private SsoUserApi ssoUserApi;
+    @Autowired
+    private SsoUserSpaceApi ssoUserSpaceApi;
+    @Autowired
+    private AuthApi authApi;
+    @Autowired
     private AccountCompanyMapper accountCompanyMapper;
 
-    private final String ACCOUNTCNETER_URL_DEV = "http://192.168.253.12:32323";
-    //private final String ACCOUNTCNETER_URL_PROD = "https://sso.ubtob.com";
-
     @Override
     @Transactional
     public Result saveCompanyAccount(CompanyAccountDTO companyAccountDTO) {
@@ -59,9 +71,9 @@ public class AccountCenterServiceImpl implements AccountCenterService {
         companyService.save(company);
         //b. 同步企业信息到优软云 ——>  创建企业
         if ("0".equals(type)) {
-            String result = postToAccount(company.getName(), company.getBusinessCode(), accountRegDTO.getUu());
-            accountCompanyMapper.insert(accountId, company.getId());
+            String result = ssoUserSpaceApi.registerLogin(company.getName(), company.getBusinessCode(), Long.parseLong(accountRegDTO.getUu()));
         }
+        accountCompanyMapper.insert(accountId, company.getId());
         //2.更新账户信息
         Account account = BeanMapper.map(accountRegDTO, Account.class);
 
@@ -70,27 +82,26 @@ public class AccountCenterServiceImpl implements AccountCenterService {
         return null;
     }
 
-    /**
-     * 将企业信息同步到优软云
-     * @param spaceName
-     * @param businesscode
-     * @param uu
-     * @return
-     */
-    private String postToAccount(String spaceName, String businesscode, String uu) {
-        String url = "/sso/userspace/register/admin";
-        RestTemplate restTemplate = new RestTemplate();
-        MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
-        requestEntity.add("spaceName", spaceName);
-        requestEntity.add("businessCode", businesscode);
-        requestEntity.add("userUU", uu);
-        String result = restTemplate.postForObject(ACCOUNTCNETER_URL_DEV + url, requestEntity, String.class);
-        return result;
+    @Override
+    public boolean updateCompanyAccount(CompanyAccountDTO companyAccountDTO) {
+        CompanyRegDTO companyRegDTO = companyAccountDTO.getCompanyRegDTO();
+        AccountRegDTO accountRegDTO = companyAccountDTO.getAccountRegDTO();
+        Long accountId = accountService.findByMobile(accountRegDTO.getMobile()).getId();
+        //更新企业信息
+        companyService.update(companyRegDTO);
+        //更新账户信息
+        Account account = BeanMapper.map(accountRegDTO, Account.class);
+        account.setId(accountId);
+        accountService.updateByPrimaryKeySelective(account);
+        return true;
     }
 
     @Override
-    public List<CompanyRspDTO> getCompanyList(String mobile) {
-        List<CompanyRspDTO> result = new ArrayList<CompanyRspDTO>();
+    public Map<String, Object> getCompanyList(String mobile) {
+        Map<String, Object> resultMap = new HashMap<String, Object>();
+        List<CompanyRspDTO> resultList = new ArrayList<CompanyRspDTO>();
+        resultMap.put("hasDefaultCompany", false);
+        resultMap.put("defaultCompanyId", -1);
         //1、获取本SAAS系统的企业信息
         List<CompanyRspDTO> companyRspDTOList = accountCompanyMapper.getCompanyListByAccountMobile(mobile);
         //如果只有一条记录,将该企业设置为默认企业
@@ -99,21 +110,47 @@ public class AccountCenterServiceImpl implements AccountCenterService {
             Long companyId = companyRspDTOList.get(0).getId();
             accountCompanyMapper.bindDefault(accountId, companyId);
         }
-        result.addAll(companyRspDTOList);
+        resultList.addAll(companyRspDTOList);
         //2、优软云返回的企业信息
-        //TODO 通过接口获取优软云的企业信息
+        SsoUserSpaceList ssoUserSpaceList = ssoUserApi.getUserSpacesByMobile(mobile);
+        List<SsoUserSpace> ssoUserSpaces = ssoUserSpaceList.getSpaces();
 
         //3、去重复
-        /*for (CompanyRspDTO companyRspDTO : companyRspDTOList){
-            for (CompanyBaseDTO companyBaseDTO : companyBaseDTOList){
-                if (companyRspDTO.getName().equals(companyBaseDTO.getName())){
-                    companyBaseDTOList.remove(companyRspDTO);
+        for (CompanyRspDTO companyRspDTO : companyRspDTOList) {
+            for (int i = 0; i < ssoUserSpaces.size(); i++){
+                if (companyRspDTO.getName().equals(ssoUserSpaces.get(i).getSpaceName())){
+                    //更新公司UU号
+                    if (StringUtils.isEmpty(companyRspDTO.getUu())){
+                        companyService.updateUUByPrimaryKey(companyRspDTO.getId(), ssoUserSpaces.get(i).getSpaceUU());
+                    }
+                    ssoUserSpaces.remove(ssoUserSpaces.get(i));
                 }
             }
+            if (companyRspDTO.isDefault_()){
+                resultMap.put("hasDefaultCompany", true);
+                resultMap.put("defaultCompanyId", companyRspDTO.getId());
+                TokenDTO tokenDTO = authApi.switchCompany(companyRspDTO.getId()).getData();
+                resultMap.put("token", tokenDTO);
+            }
+        }
+        //构造返回数据
+        if (ssoUserSpaces.size() > 0) {
+            for (SsoUserSpace ssoUserSpace : ssoUserSpaces) {
+                CompanyRspDTO companyRspDTO = new CompanyRspDTO(
+                        ssoUserSpace.getSpaceName(),
+                        ssoUserSpace.getBusinessCode(),
+                        ssoUserSpace.getRegAddress(),
+                        false,
+                        false,
+                        ssoUserSpace.getSpaceUU().toString(),
+                        ssoUserSpace.getAdmin().getVipName(),
+                        0l
+                );
+                resultList.add(companyRspDTO);
+            }
         }
-        List<CompanyRspDTO> companyBaseRspDTOList = BeanMapper.mapList(companyBaseDTOList, CompanyRspDTO.class);
-        result.addAll(companyBaseRspDTOList);*/
-        return result;
+        resultMap.put("spaces", resultList);
+        return resultMap;
     }
 
     @Override

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

@@ -54,6 +54,11 @@ public class CompanyServiceImpl implements CompanyService{
         }
     }
 
+    @Override
+    public void updateUUByPrimaryKey(Long companyId, Long uu) {
+        companyMapper.updateUUByPrimaryKey(companyId, uu);
+    }
+
     @Override
     public Company findByName(String name) {
         return companyMapper.selectByName(name);

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

@@ -80,4 +80,6 @@ mybatis:
   type-aliases-package: com.usoftchina.saas.account.po,com.usoftchina.saas.account.vo
   mapper-locations: classpath:mapper/*.xml
 auth:
-  public-key: auth/pub.key
+  public-key: auth/pub.key
+sso:
+  base-url: http://192.168.253.12:32323

+ 4 - 2
base-servers/account/account-server/src/main/resources/mapper/AccountCompanyMapper.xml

@@ -14,10 +14,12 @@
         delete from ac_account_company where company_id=#{companyId}
     </delete>
     <select id="getCompanyListByAccountMobile" resultType="com.usoftchina.saas.account.dto.CompanyRspDTO">
-        SELECT cmp.id,cmp.name,cmp.uu,cmp.business_code businessCode,cmp.address,accmp.is_default default_,'1' saas_ from ac_company cmp
+        SELECT cmp.id,cmp.name,cmp.uu,cmp.business_code businessCode,cmp.address,accmp.is_default default_,'1' saas_,aci.realname admin,cmp.creator_id adminId from ac_company cmp
         left join ac_account_company accmp on accmp.company_id=cmp.id
         left join ac_account ac on ac.id = accmp.account_id
-        where ac.mobile = #{mobile};
+        left join ac_account aci on aci.id = cmp.creator_id
+        where ac.mobile = #{mobile}
+        order by is_default desc
     </select>
     <update id="unBindDefault" >
         UPDATE AC_ACCOUNT_COMPANY SET IS_DEFAULT = 0 WHERE ACCOUNT_ID = #{accountId}

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

@@ -17,7 +17,7 @@
         delete from ac_account_role where company_id=#{companyId}
     </delete>
     <select id="selectAccountRole" resultType="com.usoftchina.saas.account.dto.AccountRoleDTO">
-        SELECT a.id id,a.username,a.realname,a.email,a.mobile,GROUP_CONCAT(c.name) roleNames,GROUP_CONCAT(c.id) roleIds
+        SELECT a.id id,a.username,a.realname,a.email,a.mobile,GROUP_CONCAT(c.name) roleNames,GROUP_CONCAT(c.id) roleIds,a.enabled
         FROM ac_account a
         left join ac_account_company d on a.id = d.account_id
         left join ac_account_role b on a.id=b.account_id and d.company_id = b.company_id
@@ -30,7 +30,7 @@
                 AND d.COMPANY_ID = #{companyId}
             </if>
         </where>
-        group by a.id,a.username,a.realname,a.email,a.mobile
+        group by a.id,a.username,a.realname,a.email,a.mobile,a.enabled
     </select>
     <delete id="unBindRolesById" parameterType="java.lang.Long">
         DELETE FROM AC_ACCOUNT_ROLE WHERE ACCOUNT_ID = #{id}

+ 7 - 1
base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml

@@ -119,9 +119,12 @@
     <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 id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.account.dto.CompanyRegDTO">
         UPDATE ac_company
         <set>
+            <if test="name != null">
+                name = #{name, jdbcType=VARCHAR},
+            </if>
             <if test="address != null">
                 address = #{address,jdbcType=VARCHAR},
             </if>
@@ -140,4 +143,7 @@
         </set>
         where id = #{id}
     </update>
+    <update id="updateUUByPrimaryKey">
+        UPDATE ac_company set uu = #{uu} where id = #{companyId}
+    </update>
 </mapper>

+ 35 - 0
base-servers/account/account-server/src/test/java/com/usoftchina/saas/account/service/CompanyServiceTest.java

@@ -1,12 +1,24 @@
 package com.usoftchina.saas.account.service;
 
+import com.alibaba.fastjson.JSONObject;
 import com.usoftchina.saas.account.po.Company;
+import com.usoftchina.saas.utils.StringUtils;
+import com.usoftchina.saas.utils.http.HttpUtil;
 import org.junit.*;
 import org.junit.runner.RunWith;
 import org.junit.runners.MethodSorters;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
 import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * @author yingp
@@ -41,4 +53,27 @@ public class CompanyServiceTest {
         boolean removed = companyService.removeByPrimaryKey(company.getId());
         Assert.assertTrue(removed);
     }
+
+    @Test
+    public void testC_postToAccountCenter(){
+        String url = "/sso/userspace/register/admin";
+        RestTemplate restTemplate = new RestTemplate();
+        MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
+        requestEntity.add("spaceName", "测试企业001");
+        requestEntity.add("businessCode", StringUtils.createBusinessCode());
+        requestEntity.add("userUU", "1000027260");
+        String result = restTemplate.postForObject("http://192.168.253.12:32323" + url, requestEntity, String.class);
+        System.out.println(result);
+    }
+
+    @Test
+    public void TestE_getCompanyByMobile() throws Exception {
+        String url = "http://10.1.51.83:8081/api/userspace/erp/info";
+        Map<String, String> map = new HashMap<String, String>();
+        map.put("_by", "mobile");
+        map.put("mobile", "18702604854");
+        HttpUtil.Response response = HttpUtil.sendGetRequest(url, map, true, "b4uzn6vf1db06qmn");
+        JSONObject json = JSONObject.parseObject(response.getResponseText());
+        System.out.println(json.get("content"));
+    }
 }

+ 3 - 3
base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/api/AuthApi.java

@@ -21,7 +21,7 @@ public interface AuthApi {
      * @param password
      * @return
      */
-    @PostMapping(value = "/api/auth")
+    @PostMapping(value = "/authorize")
     Result<AuthDTO> authorize(@RequestParam(value = "username") String username, @RequestParam(value = "password") String password);
 
     /**
@@ -30,8 +30,8 @@ public interface AuthApi {
      * @param companyId
      * @return
      */
-    @GetMapping(value = "/api/auth/switch/company")
-    Result<TokenDTO> switchCompany(@RequestParam(value = "companyId") String companyId);
+    @GetMapping(value = "/switch/company")
+    Result<TokenDTO> switchCompany(@RequestParam(value = "companyId") Long companyId);
 
     /**
      * 获取auth信息

+ 31 - 0
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/api/SsoUserApi.java

@@ -2,12 +2,14 @@ package com.usoftchina.sso.api;
 
 import com.usoftchina.sso.auth.Signature;
 import com.usoftchina.sso.config.SsoFeignConfig;
+import com.usoftchina.sso.dto.SsoCheckMobile;
 import com.usoftchina.sso.dto.SsoResult;
 import com.usoftchina.sso.dto.SsoUser;
 import com.usoftchina.sso.dto.SsoUserSpaceList;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
@@ -40,6 +42,24 @@ public interface SsoUserApi {
     @Deprecated
     SsoUserSpaceList getUserSpacesByMobile(@RequestParam("mobile") String mobile);
 
+    /**
+     * 校验手机号是否已注册
+     * @param mobile
+     * @return
+     */
+    @GetMapping("/checkMobile")
+    SsoCheckMobile checkMobile(@RequestParam("mobile") String mobile);
+
+    /**
+     * 解除用户企业绑定
+     * @param _operate
+     * @param userUU
+     * @param spaceUU
+     * @return
+     */
+    @PostMapping("")
+    String unbind(@RequestParam("_operate") String _operate, @RequestParam("userUU") Long userUU, @RequestParam("spaceUU") Long spaceUU);
+
     @Component
     class DefaultFallback implements SsoUserApi{
         @Override
@@ -51,5 +71,16 @@ public interface SsoUserApi {
         public SsoUserSpaceList getUserSpacesByMobile(String mobile) {
             return null;
         }
+
+        @Override
+        public SsoCheckMobile checkMobile(String mobile) {
+            return null;
+        }
+
+        @Override
+        public String unbind(String _operate, Long userUU, Long spaceUU) {
+            return null;
+        }
+
     }
 }

+ 41 - 0
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/api/SsoUserSpaceApi.java

@@ -1,8 +1,49 @@
 package com.usoftchina.sso.api;
 
+import com.usoftchina.sso.dto.SsoResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
 /**
  * @author yingp
  * @date 2018/11/23
  */
+@FeignClient(url = "${sso.base-url}", name = "sso-server", fallback = SsoUserApi.DefaultFallback.class)
 public interface SsoUserSpaceApi {
+    /**
+     * 校验企业名称是否已注册
+     * @param spacename
+     * @return
+     */
+    @GetMapping("/api/userspace/checkSpaceName")
+    SsoResult checkSpaceName(@RequestParam("spaceName") String spacename);
+
+    /**
+     * <p>账户中心接口: 通过登录管理员注册企业</p>
+     * <p>将企业信息同步到优软云</p>
+     * @param spaceName
+     * @param businessCode
+     * @param userUU
+     * @return
+     */
+    @PostMapping("/sso/userspace/register/admin")
+    String registerLogin(@RequestParam("spaceName") String spaceName, @RequestParam("businessCode") String businessCode, @RequestParam("userUU") Long userUU);
+
+    @Component
+    class DefaultFallback implements SsoUserSpaceApi{
+
+        @Override
+        public SsoResult checkSpaceName(String spaceName) {
+            return null;
+        }
+
+        @Override
+        public String registerLogin(String spaceName, String businessCode, Long userUU) {
+            return null;
+        }
+    }
+
 }

+ 19 - 0
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/dto/SsoCheckMobile.java

@@ -0,0 +1,19 @@
+package com.usoftchina.sso.dto;
+
+import java.io.Serializable;
+
+/**
+ * 校验手机号是否已经注册
+ */
+public class SsoCheckMobile implements Serializable {
+
+    private boolean hasRegister;
+
+    public boolean isHasRegister() {
+        return hasRegister;
+    }
+
+    public void setHasRegister(boolean hasRegister) {
+        this.hasRegister = hasRegister;
+    }
+}

+ 19 - 1
base-servers/auth/sso-api/src/test/java/com/usoftchina/sso/test/SsoUserApiTest.java

@@ -2,6 +2,7 @@ package com.usoftchina.sso.test;
 
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.sso.api.SsoUserApi;
+import com.usoftchina.sso.dto.SsoCheckMobile;
 import com.usoftchina.sso.dto.SsoResult;
 import com.usoftchina.sso.dto.SsoUser;
 import com.usoftchina.sso.dto.SsoUserSpaceList;
@@ -12,6 +13,7 @@ import org.junit.runners.MethodSorters;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.web.bind.annotation.RequestParam;
 
 /**
  * @author yingp
@@ -27,7 +29,7 @@ public class SsoUserApiTest {
 
     final static long userUU = 200040149;
 
-    final static String mobile = "13798490565";
+    final static String mobile = "18702604854";
 
     @Test
     public void testA_getUserByUu() {
@@ -44,4 +46,20 @@ public class SsoUserApiTest {
             list.getSpaces().forEach(space -> System.out.println(space.getSpaceName()));
         }
     }
+
+    @Test
+    public void testC_checkMobile(){
+        SsoCheckMobile checked = ssoUserApi.checkMobile(mobile);
+        System.out.println(checked);
+    }
+
+
+    @Test
+    public void testD_unbind(){
+        Long companyUU = 10050435l;
+        Long userUU = 1000027276l;
+        String result = ssoUserApi.unbind("unbind", userUU, companyUU);
+        System.out.println(result);
+    }
+
 }

+ 40 - 0
base-servers/auth/sso-api/src/test/java/com/usoftchina/sso/test/SsoUserSpaceApiTeest.java

@@ -0,0 +1,40 @@
+package com.usoftchina.sso.test;
+
+import com.usoftchina.saas.utils.StringUtils;
+import com.usoftchina.sso.api.SsoUserSpaceApi;
+import com.usoftchina.sso.dto.SsoResult;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+/**
+ * @author  chenw
+ * @date 2018/11/23
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class SsoUserSpaceApiTeest {
+
+    @Autowired
+    private SsoUserSpaceApi ssoUserSpaceApi;
+
+    @Test
+    public void testA_checkSpaceName(){
+        SsoResult result = ssoUserSpaceApi.checkSpaceName("上海宇声电子科技有限公司");
+        System.out.println(result);
+    }
+
+    @Test
+    public void testB_registerLogin(){
+        String spaceName = "测试企业009";
+        String businessCode = StringUtils.createBusinessCode();
+        Long userUU = 1000027276l;
+        String result = ssoUserSpaceApi.registerLogin(spaceName, businessCode, userUU);
+        System.out.println(result);
+    }
+}

+ 11 - 1
base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java

@@ -12,6 +12,7 @@ import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.gateway.error.PermissionException;
 import com.usoftchina.saas.gateway.util.AntPathRequestMatcher;
 import com.usoftchina.saas.utils.CollectionUtils;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.cloud.gateway.filter.GatewayFilterChain;
@@ -74,11 +75,20 @@ public class AuthFilter implements GlobalFilter, Ordered {
     private void checkPermission(ServerHttpRequest request, JwtInfo jwt, AccountDTO accountDTO) {
         if (!accountDTO.isAdmin(jwt.getCompanyId())) {
             // 非管理账户,需要鉴权
+            ResourceCache.current().hdel();
             List<UrlResourceDTO> resources = ResourceCache.current().getUrlResources();
             if (!CollectionUtils.isEmpty(resources)) {
                 // 本次请求相关的资源
                 List<UrlResourceDTO> permissions = resources.parallelStream().filter(resource -> {
-                    AntPathRequestMatcher matcher = new AntPathRequestMatcher(resource.getUrl(), resource.getMethod());
+                    if (StringUtils.isEmpty(resource.getUrl())) {
+                        return false;
+                    }
+                    //处理删除、查询时 url变动无法匹配的问题
+                    String url = resource.getUrl();
+                    if (url.substring(url.length() - 1).equals("/")) {
+                        url += "*";
+                    }
+                    AntPathRequestMatcher matcher = new AntPathRequestMatcher(url, resource.getMethod());
                     return matcher.matches(request);
                 }).collect(Collectors.toList());
                 if (!CollectionUtils.isEmpty(permissions)) {

+ 24 - 11
frontend/saas-web/app/Application.scss

@@ -99,13 +99,14 @@ body.launching {
 // toolbar button
 .x-btn-default-toolbar-small {
   color: #fff;
-  background-color: #35BAF6;
+  background-color: #F8FCFF;
   border-color: #35BAF6;
+  border-radius: 2px;
   min-width: 86px;
   transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
 
   .x-btn-inner-default-toolbar-small {
-    color: #FFFFFF;
+    color: #34BAF6 ;
   }
 }
 
@@ -131,17 +132,30 @@ body.launching {
   opacity: 0.72;
 }
 
+.x-btn-over{
+  .x-btn-wrap{
+    .x-btn-button{
+      .x-btn-inner{
+        color:#fff !important;
+      }
+    }
+  }
+}
+
 .x-keyboard-mode .x-btn-focus.x-btn-default-toolbar-small {
-  background: #34BAF6;
-  opacity: 0.72;
+  background: inherit;
+  opacity: 1;
   box-shadow: none;
+  border:1px solid #34BAF6;
 }
+
 .x-keyboard-mode .x-btn-focus.x-btn-over.x-btn-default-toolbar-small {
+  background: #34BAF6;
   box-shadow: none;
 }
 
 .x-btn-wrap-default-toolbar-small.x-btn-arrow-right:after {
-  color: #FFFFFF;
+  color: #79d3dc;
 }
 
 .x-btn.x-btn-disabled.x-btn-default-toolbar-small {
@@ -168,9 +182,8 @@ body.launching {
 }
 
 .x-formpanel-btn-blue {
-  border-color: #346fb9;
-  background: linear-gradient(to bottom,#3876c3 0,#346fb9 100%) !important;
-
+  background: #34BAF6;
+  border-color: #34BAF6;
   .x-btn-inner-default-toolbar-small{
       color:#fff !important;
   }
@@ -178,15 +191,15 @@ body.launching {
 .x-formpanel-btn-white {
     border: 1px solid #c1c1c1 !important;
     //border-radius: 2px;
-    box-shadow: 0 1px 1px rgba(0,0,0,.15);
+    //box-shadow: 0 1px 1px rgba(0,0,0,.15);
     /*background: #fff;
     background: -moz-linear-gradient(top,#fff,#f4f4f4);
     background: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f4f4f4));
     background: -o-linear-gradient(top,#fff,#f4f4f4);
     background: -ms-linear-gradient(top,#fff 0,#f4f4f4 100%);
     background: linear-gradient(top,#fff,#f4f4f4); */
-    border-color: #fff;
-    background: linear-gradient(to bottom,#fff,#f4f4f4 100%) !important;
+    // border-color: #fff;
+    // background: linear-gradient(to bottom,#fff,#f4f4f4 100%) !important;
     .x-btn-inner-default-toolbar-small{
       color: #555;
   }

+ 18 - 0
frontend/saas-web/app/model/document/stocking.js

@@ -0,0 +1,18 @@
+Ext.define('saas.model.document.stocking', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'st_prodid', type: 'int' },
+        { name: 'st_prodcode', type: 'string' },
+        { name: 'st_proddetail', type: 'string' },
+        { name: 'st_prodorispeccode', type: 'string' },
+        { name: 'st_prodkind', type: 'string' },
+        { name: 'st_produnit', type: 'string' },
+        { name: 'st_whid', type: 'int' },
+        { name: 'st_whcode', type: 'string' },
+        { name: 'st_whname', type: 'string' },
+        { name: 'st_batchqty', type: 'float' },
+        { name: 'st_actqty', type: 'float' },
+        { name: 'st_num', type: 'float' }
+    ]
+});

+ 28 - 0
frontend/saas-web/app/model/money/Verification2.js

@@ -0,0 +1,28 @@
+Ext.define('saas.model.money.Verification2', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'vcd_id', type: 'int' },
+        { name: 'vcd_vcid', type: 'int' },
+        { name: 'vcd_detno', type: 'int' },
+        { name: 'vcd_ym', type: 'int' },
+        { name: 'vcd_slid', type: 'int' },
+        { name: 'vcd_slcode', type: 'string' },
+        { name: 'vcd_slkind', type: 'string' },
+        { name: 'vcd_sldate', type: 'date' },
+        { name: 'vcd_amount', type: 'float' },
+        { name: 'vcd_nowbalance', type: 'float' },
+        { name: 'vcd_remark', type: 'string' },
+        { name: 'companyId', type: 'int' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'vcd_text1', type: 'string' },
+        { name: 'vcd_text2', type: 'string' },
+        { name: 'vcd_text3', type: 'string' },
+        { name: 'vcd_text4', type: 'string' },
+        { name: 'vcd_text5', type: 'string' },
+        { name: 'creator', type: 'string' },
+        { name: 'creatorId', type: 'int' },
+        { name: 'createTime', type: 'date' },
+        { name: 'updater', type: 'string' },
+    ]
+});

+ 1 - 1
frontend/saas-web/app/util/FormUtil.js

@@ -200,7 +200,7 @@ Ext.define('saas.util.FormUtil', {
             var me = this;
             form.setLoading(true);
             if(form.initId && form.initId!=0) {
-                var url = form._readUrl + form.initId;
+                var url = form._readUrl + '/' + form.initId;
                 saas.util.BaseUtil.request({url })
                 .then(function(res) {
                     form.setLoading(false);

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

@@ -252,7 +252,7 @@ Ext.define('saas.view.core.base.GridPanel', {
                     .then(function(yes) {
                         if(yes == 'yes') {
                             saas.util.BaseUtil.request({
-                                url: form._deleteUrl+id,
+                                url: form._deleteUrl+'/'+id,
                                 method: 'POST',
                             })
                             .then(function(localJson) {

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

@@ -87,7 +87,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
             saas.util.BaseUtil.deleteWarn(form._deleteMsg,function(btn){
                 if(btn == 'yes'){
                     saas.util.BaseUtil.request({
-                        url: form._deleteUrl+id,
+                        url: form._deleteUrl+'/'+id,
                         method: 'POST',
                     })
                     .then(function(localJson) {
@@ -299,7 +299,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var code = viewModel.get(form._codeField);
 
         saas.util.BaseUtil.request({
-            url: form._unAuditUrl+id,
+            url: form._unAuditUrl + '/' + id,
             method: 'POST',
         })
         .then(function(localJson) {

+ 5 - 2
frontend/saas-web/app/view/core/form/RemoteCombo.js

@@ -18,8 +18,8 @@ Ext.define('saas.view.core.form.RemoteCombo', {
     setStore:function(v){
        var me=this;
        var store=Ext.create('Ext.data.Store',{
+           autoLoad:true,
            fields:['display','value'],
-           autoLoad: true,
            proxy: {
                type: 'ajax',
                url: me.storeUrl,
@@ -30,12 +30,15 @@ Ext.define('saas.view.core.form.RemoteCombo', {
            }
        });
        me.store=store;
-
     },
     createPicker: function() {
         var me = this,
             picker;
         var count = this.store.getCount();
+        if(count==0){
+            this.store.filters.removeAll();
+            count = this.store.getCount();
+        }
         var pickerCfg = Ext.apply({
                 height: count>5?248-(me.hiddenBtn?50:0):(33*count+(me.hiddenBtn?0:50)),
                 hiddenBtn:me.hiddenBtn,

+ 6 - 4
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -289,7 +289,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
             .then(function(yes) {
                 if(yes == 'yes') {
                     saas.util.BaseUtil.request({
-                        url: me.deleteDetailUrl+id,
+                        url: me.deleteDetailUrl + '/' + id,
                         params: '',
                         method: 'POST',
                     })
@@ -384,9 +384,11 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         me.editable = able;
 
         Ext.Array.each(columns, function(c) {
-            var e = c.getEditor();
-            if(e) {
-                typeof e.setDisabled == 'function' && e.setDisabled(!able);
+            if(typeof c.getEditor != 'undefined'){
+                var e = c.getEditor();
+                if(e) {
+                    typeof e.setDisabled == 'function' && e.setDisabled(!able);
+                }
             }
         });
     },

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

@@ -23,7 +23,7 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
 	},
 
     dockedItems: [{
-        width:110,
+        width:140,
         height: 40,
         xtype: 'toolbar',
         dock: 'right',
@@ -36,11 +36,12 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
                 width:50,
                 style:'min-width: 0px;min-height: 0px;',
                 xtype: 'button',
+                name:'query',
                 text: '查询',
                 handler: 'onQuery',
             },{
                 height:24,
-                style:'min-width: 0px;min-height: 0px;border-color: #fff;background-color: #fff; height: 24px;width: 24px;margin-top: -4px;',
+                style:'margin-left: 2px;min-width: 0px;min-height: 0px;border-color: #fff;background-color: #fff; height: 24px;width: 36px;margin-top: -4px;',
                 xtype: 'button',
                 iconCls:'x-fa fa-caret-square-o-down',
                 handler: 'showMore',
@@ -66,7 +67,7 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
                 hidden:true,
                 height:24,
                 tooltip:'隐藏',
-                style:'min-width: 0px;min-height: 0px;border-color: #fff;background-color: #fff; height: 24px;width: 24px;margin-top: -4px;',
+                style:'margin-left: 2px;min-width: 0px;min-height: 0px;border-color: #fff;background-color: #fff; height: 24px;width: 36px;margin-top: -4px;',
                 xtype: 'button',
                 iconCls:'x-fa fa-caret-square-o-up',
                 handler: 'hideMore'

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

@@ -39,6 +39,8 @@ Ext.define('saas.view.core.query.QueryPanelController', {
             queryForm.animate({dynamic: true, duration: 500, to: {height: (24+42*columnWidthCount)+'px'}})
             queryForm.dockedItems.items[0].down('[name=showMore]').hide();
             queryForm.dockedItems.items[0].down('[name=hideMore]').show();
+            var b = queryForm.dockedItems.items[0].down('[name=query]');
+            b.removeFocusCls();
         }
     },
     hideMore:function (){
@@ -49,6 +51,8 @@ Ext.define('saas.view.core.query.QueryPanelController', {
         queryForm.animate({dynamic: true, duration: 500, to: {height: '56px'}})
         queryForm.dockedItems.items[0].down('[name=hideMore]').hide();
         queryForm.dockedItems.items[0].down('[name=showMore]').show();
+        var b = queryForm.dockedItems.items[0].down('[name=query]');
+        b.removeFocusCls();
     },
     onMoreQuery: function() {
         var me = this,

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

@@ -46,7 +46,7 @@ Ext.define('saas.view.document.bom.BasePanel', {
     //字段属性
     _formXtype:'document-bom-formpanel',
     _title:'BOM资料',
-    _deleteUrl:'/api/document/bom/delete/',
+    _deleteUrl:'/api/document/bom/delete',
     _batchOpenUrl:'/api/document/bom/batchOpen',
     _batchCloseUrl:'/api/document/bom/batchClose',
     _batchDeleteUrl:'/api/document/bom/batchDelete',

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

@@ -13,11 +13,11 @@ Ext.define('saas.view.document.bom.FormPanel', {
     _codeField: 'codefied',
     _statusField: 'bo_status',
     _statusCodeField: 'bo_statuscode',
-    _readUrl:'/api/document/bom/read/',
+    _readUrl:'/api/document/bom/read',
     _saveUrl:'/api/document/bom/save',
     _openUrl:'/api/document/bom/open',
     _closeUrl:'/api/document/bom/close',
-    _deleteUrl:'/api/document/bom/delete/',
+    _deleteUrl:'/api/document/bom/delete',
     initId:0,
     _deleteMsg: '删除的BOM资料将不能恢复,请确认是否删除?',
     codeInHeader: false,
@@ -84,7 +84,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
         detnoColumn: 'bd_detno',
         showCount: false,
         storeModel:'saas.model.document.bomdetail',
-        deleteDetailUrl:'/api/document/bom/deleteDetail/',
+        deleteDetailUrl:'/api/document/bom/deleteDetail',
         columns : [
             {
                 text : "ID", 

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

@@ -59,7 +59,7 @@ Ext.define('saas.view.document.customer.BasePanel', {
     caller:'Customer',
     _formXtype:'document-customer-formpanel',
     _title:'客户资料',
-    _deleteUrl:'/api/document/customer/delete/',
+    _deleteUrl:'/api/document/customer/delete',
     _batchOpenUrl:'/api/document/customer/batchOpen',
     _batchCloseUrl:'/api/document/customer/batchClose',
     _batchDeleteUrl:'/api/document/customer/batchDelete',

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

@@ -13,11 +13,11 @@ Ext.define('saas.view.document.customer.FormPanel', {
     _codeField: 'cu_code',
     _statusField: 'cu_status',
     _statusCodeField: 'cu_statuscode',
-    _readUrl:'/api/document/customer/read/',
+    _readUrl:'/api/document/customer/read',
     _saveUrl:'/api/document/customer/save',
     _openUrl:'/api/document/customer/open',
     _closeUrl:'/api/document/customer/close',
-    _deleteUrl:'/api/document/customer/delete/',
+    _deleteUrl:'/api/document/customer/delete',
     initId:0,
 
     codeInHeader: false,
@@ -225,7 +225,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         storeModel:'saas.model.document.customercontact',
         detnoColumn: 'cc_detno',
         showCount: false,
-        deleteDetailUrl:'/api/document/customer/deletecontact/',
+        deleteDetailUrl:'/api/document/customer/deletecontact',
         columns : [
             {
                 text : "ID", 
@@ -326,7 +326,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         storeModel:'saas.model.document.customeraddress',
         detnoColumn: 'ca_detno',
         showCount: false,
-        deleteDetailUrl:'/api/document/customer/deleteaddress/',
+        deleteDetailUrl:'/api/document/customer/deleteaddress',
         columns : [
             {
                 text : "ID", 

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

@@ -277,32 +277,39 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 regexText:'请输入正确的手机号码',
                 listeners:{
                     blur:function(f,a,b,c){
+                        var form = f.ownerCt;
+                        form.setLoading(true);
                         if(f.value&&f.value!=''&&f.isValid()){
-                            // var url = 'https://sso.ubtob.com' + '/api/user/checkMobile?mobile='+f.value;
-                            // saas.util.BaseUtil.request({url })
-                            // .then(function(res) {
-                            //     if(res.success) {
-                            //     }
-                            // })
-                            // .catch(function(response) {
-                            // });
-                            // Ext.Ajax.request({
-                            //     url: Ext.manifest.server.accountPath + '/api/user/checkMobile',
-                            //     params: {
-                            //         mobile: f.value
-                            //     },
-                            //     method: 'GET',
-                            //     headers:{
-                            //         'Access-Control-Allow-Origin': '*',
-                            //         "Content-Type": 'application/json;charset=UTF-8'
-                            //     },
-                            //     success: function (response) {
-                            //         debugger
-                            //     },
-                            //     failure: function (response) {
-                            //         debugger
-                            //     }
-                            // });
+                            Ext.Ajax.request({
+                                url: '/api/account/account/checkMobile?mobile='+f.value,
+                                method: 'GET',
+                                headers:{
+                                    'Access-Control-Allow-Origin': '*',
+                                    "Content-Type": 'application/json;charset=UTF-8'
+                                },
+                                success: function (response) {
+                                    form.setLoading(false);
+                                    var localJson = Ext.decode(response.responseText);
+                                    if(localJson.success){
+                                        if(!localJson.data.hasRegister){
+                                            saas.util.BaseUtil.showSuccessToast('校验成功:手机号未被注册');
+                                        }else{
+                                            saas.util.BaseUtil.showErrorToast('校验失败:手机号已被注册');
+                                            f.setValue('');
+                                        }
+                                    }else{
+                                        saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
+                                    }
+                                },
+                                failure: function (response) {
+                                    if(response.responseText){
+                                        var localJson = Ext.decode(response.responseText);
+                                        saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
+                                    }else{
+                                        saas.util.BaseUtil.showErrorToast('手机号校验接口连接超时');
+                                    }
+                                }
+                            });
                         }
                     }
                 }
@@ -317,6 +324,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 fieldLabel: '邮箱',
                 name: 'email',
                 allowBlank:false,
+                regex:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
+                regexText:'请输入正确的邮箱',
                 maxLength: 30,
             }]
         },
@@ -517,6 +526,11 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
             me.accountinformation();
             return;
         }
+        //账户资料新增特殊保存逻辑
+        if(me.dataKind=='accountadd'){
+            me.accountadd();
+            return;
+        }
 
         Ext.Array.each(names,function(name) {
             if(name){
@@ -618,5 +632,45 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
             console.error(res);
             saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });
+    },
+    accountadd: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;
+                }
+            }
+        });
+        params['username'] = params['mobile'];
+        params['type'] = 1;
+        //保存接口
+        saas.util.BaseUtil.request({
+            url: belong.reqUrl,
+            params: JSON.stringify(params),
+            method: 'POST'
+        })
+        .then(function(localJson) {
+            me.setLoading(false);
+            if(localJson.success){
+                form.ownerCt._parent.store.load();
+                saas.util.BaseUtil.showSuccessToast('保存成功');
+                form.ownerCt.close();
+            }
+        })
+        .catch(function(res) {
+            me.setLoading(false);
+            console.error(res);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
+        });
     }
 });

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

@@ -60,7 +60,7 @@ Ext.define('saas.view.document.product.BasePanel', {
     caller:'Product',
     _formXtype:'document-product-formpanel',
     _title:'物料资料',
-    _deleteUrl:'/api/document/product/delete/',
+    _deleteUrl:'/api/document/product/delete',
     _batchOpenUrl:'/api/document/product/batchOpen',
     _batchCloseUrl:'/api/document/product/batchClose',
     _batchDeleteUrl:'/api/document/product/batchDelete',

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

@@ -13,11 +13,11 @@ Ext.define('saas.view.document.product.FormPanel', {
     _codeField: 'pr_code',
     _statusField: 'pr_status',
     _statusCodeField: 'pr_statuscode',
-    _readUrl:'/api/document/product/read/',
+    _readUrl:'/api/document/product/read',
     _saveUrl:'/api/document/product/save',
     _openUrl:'/api/document/product/open',
     _closeUrl:'/api/document/product/close',
-    _deleteUrl:'/api/document/product/delete/',
+    _deleteUrl:'/api/document/product/delete',
     initId:0,
 
     codeInHeader: false,
@@ -219,7 +219,7 @@ Ext.define('saas.view.document.product.FormPanel', {
         showCount: false,
         allowEmpty:true,
         hidden: true,
-        deleteDetailUrl:'/api/document/product/deleteDetail/',
+        deleteDetailUrl:'/api/document/product/deleteDetail',
         columns : [{
             text : "ID", 
             dataIndex : "id", 

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

@@ -53,7 +53,7 @@ Ext.define('saas.view.document.vendor.BasePanel', {
     caller:'Vendor',
     _formXtype:'document-vendor-formpanel',
     _title:'供应商资料',
-    _deleteUrl:'/api/document/vendor/delete/',
+    _deleteUrl:'/api/document/vendor/delete',
     _batchOpenUrl:'/api/document/vendor/batchOpen',
     _batchCloseUrl:'/api/document/vendor/batchClose',
     _batchDeleteUrl:'/api/document/vendor/batchDelete',

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

@@ -13,11 +13,11 @@ Ext.define('saas.view.document.vendor.FormPanel', {
     _codeField: 've_code',
     _statusField: 've_status',
     _statusCodeField: 've_statuscode',
-    _readUrl:'/api/document/vendor/read/',
+    _readUrl:'/api/document/vendor/read',
     _saveUrl:'/api/document/vendor/save',
     _openUrl:'/api/document/vendor/open',
     _closeUrl:'/api/document/vendor/close',
-    _deleteUrl:'/api/document/vendor/delete/',
+    _deleteUrl:'/api/document/vendor/delete',
     initId:0,
 
     codeInHeader: false,
@@ -198,7 +198,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         storeModel:'saas.model.document.vendorcontact',
         detnoColumn: 'vc_detno',
         showCount: false,
-        deleteDetailUrl:'/api/document/vendor/deleteContact/',
+        deleteDetailUrl:'/api/document/vendor/deleteContact',
         columns : [
             {
                 text : "ID", 

+ 2 - 2
frontend/saas-web/app/view/home/InfoCard.js

@@ -51,13 +51,13 @@ Ext.define('saas.view.home.InfoCard', {
                     condition: 'purchase.companyId=' + companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail detail where pd_id=purchasedetail.pd_id and IFNULL(pd_acceptqty,0) < ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <= 7)'
                 },
                 unpay: {
-                    title: '未收款出货',
+                    title: '未付款验收单',
                     color: 'red',
                     viewType: 'purchase-purchasein-querypanel',
                     condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now()) <= 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
                 },
                 unreceive: {
-                    title: '未审核出货单',
+                    title: '未收款出货',
                     color: 'pink',
                     viewType: 'sale-saleout-querypanel',
                     condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now()) <= 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'

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

@@ -15,11 +15,11 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
      _statusField: 'ft_status',
      _statusCodeField: 'ft_statuscode',
      _relationColumn: 'ftd_ftid',
-     _readUrl:'/api/money/fundtransfer/read/',
+     _readUrl:'/api/money/fundtransfer/read',
      _saveUrl:'/api/money/fundtransfer/save',
-     _auditUrl:'/api/money/fundtransfer/audit/',
-     _unAuditUrl: '/api/money/fundtransfer/unAudit/',
-     _deleteUrl:'/api/money/fundtransfer/delete/',
+     _auditUrl:'/api/money/fundtransfer/audit',
+     _unAuditUrl: '/api/money/fundtransfer/unAudit',
+     _deleteUrl:'/api/money/fundtransfer/delete',
      initId:0,
 
     defaultItems: [{
@@ -37,7 +37,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         xtype : "detailGridField", 
         storeModel:'saas.model.money.FundTransfer',
         detnoColumn:  'ftd_detno',
-        deleteDetailUrl:'/api/money/fundtransfer/deleteItem/',
+        deleteDetailUrl:'/api/money/fundtransfer/deleteItem',
         columnWidth : 1,
         columns : [
             {

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

@@ -11,7 +11,6 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         xtype: 'textfield',
         name:'ft_code',
         emptyText:'请输入单号',
-        style:{paddingLeft: '95px'},
     },{
         xtype : "condatefield",
         name : "ft_date",

+ 6 - 6
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -15,11 +15,11 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
      _statusField: 'or_status',
      _statusCodeField: 'or_statuscode',
      _relationColumn: 'ord_orid',
-     _readUrl:'/api/money/othreceipts/read/',
-     _saveUrl:'/api/money/othreceipts/save/',
-     _auditUrl:'/api/money/othreceipts/audit/',
-     _unAuditUrl: '/api/money/othreceipts/unAudit/',
-     _deleteUrl:'/api/money/othreceipts/delete/',  
+     _readUrl:'/api/money/othreceipts/read',
+     _saveUrl:'/api/money/othreceipts/save',
+     _auditUrl:'/api/money/othreceipts/audit',
+     _unAuditUrl: '/api/money/othreceipts/unAudit',
+     _deleteUrl:'/api/money/othreceipts/delete',  
      initId:0,
 
     defaultItems: [{
@@ -63,7 +63,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
         xtype : "detailGridField", 
         storeModel:'saas.model.money.Othreceipts',
         detnoColumn:  'ord_detno',
-        deleteDetailUrl:'/api/money/othreceipts/deleteDetail/',
+        deleteDetailUrl:'/api/money/othreceipts/deleteDetail',
         columnWidth : 1,
         columns : [
             {

+ 58 - 2
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -11,7 +11,6 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         xtype: 'textfield',
         name: 'or_code',
         emptyText:'请输入单号或客户或账号',
-        style:{paddingLeft: '95px'},
         getCondition: function(value) {
            return  ' (or_code like\'%' + value + '%\'' 
                 +' or or_custcode like \'%'+value+'%\''
@@ -32,6 +31,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         xtype : "remotecombo",
         columnWidth: 0.25,
         emptyText :'全部',
+        showDetail: true,
         storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
         hiddenBtn:true,//true 则会关闭新增按钮功能
         getCondition: function(value) {
@@ -124,6 +124,62 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
             dataIndex: 'or_remark',
             width: 250
         }],
-        relativeColumn: []
+        relativeColumn: [{
+            text: 'id',
+            dataIndex: 'id',
+            hidden:true
+        }, {
+            text: '单据编号',
+            dataIndex: 'or_code',
+            width: 150
+        }  ,{
+            text: '日期',
+            dataIndex: 'or_date',
+            xtype: 'datecolumn',
+            width: 110
+        }, {
+            text: '客户名称',
+            dataIndex: 'or_custname',
+            width: 250
+        },  {
+            text: '结算账户',
+            dataIndex: 'or_bankname',
+            width: 150
+        }, {
+            text: '收款金额',
+            xtype: 'numbercolumn',
+            dataIndex: 'or_amount',
+            width: 110,
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '单据状态',
+            dataIndex: 'or_status',
+            width: 90
+        }, {
+            text: '录入人',
+            dataIndex: 'creatorName',
+            width: 110
+        },{
+            text: '审核人',
+            dataIndex: 'or_auditman',
+            width: 110
+        },{
+            text: '收入类别',
+            dataIndex: 'ord_type',
+            width: 110
+        } ,{
+            text: '明细金额',
+            dataIndex: 'ord_nowbalance',
+            width: 110
+        } ,{
+            text: '备注',
+            dataIndex: 'ord_remark',
+            width: 250
+        }]
     }
 });

+ 6 - 6
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -15,11 +15,11 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
      _statusField: 'os_status',
      _statusCodeField: 'os_statuscode',
      _relationColumn: 'osd_osid',
-     _readUrl:'/api/money/othspendings/read/',
-     _saveUrl:'/api/money/othspendings/save/',
-     _auditUrl:'/api/money/othspendings/audit/',
-     _unAuditUrl: '/api/money/othspendings/unAudit/',
-     _deleteUrl:'/api/money/othspendings/delete/', 
+     _readUrl:'/api/money/othspendings/read',
+     _saveUrl:'/api/money/othspendings/save',
+     _auditUrl:'/api/money/othspendings/audit',
+     _unAuditUrl: '/api/money/othspendings/unAudit',
+     _deleteUrl:'/api/money/othspendings/delete', 
      initId:0,
 
     defaultItems: [{
@@ -63,7 +63,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
         xtype : "detailGridField", 
         storeModel:'saas.model.money.Othspendings',
         detnoColumn:  'osd_detno',
-        deleteDetailUrl:'/api/money/othspendings/deleteDetail/',
+        deleteDetailUrl:'/api/money/othspendings/deleteDetail',
         columnWidth : 1,
         columns : [
             {

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

@@ -20,7 +20,6 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         xtype: 'textfield',
         name: 'os_code',
         emptyText:'请输入单号或客户或账号',
-        style:{paddingLeft: '95px'},
         getCondition: function(value) {
             if(value == 'ALL') {
                 return '1=1';
@@ -39,17 +38,18 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         columnWidth: 0.5,
         fieldLabel: '日期'
     },{
-        name: 'ord_type',
+        name: 'osd_type',
         fieldLabel: '支出类别',
         xtype : "remotecombo",
         emptyText :'全部',
+        showDetail: true,
         storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
         hiddenBtn:true,//true 则会关闭新增按钮功能
         getCondition: function(value) {
             if(!value) {
                 return '1=1';
             }else {
-                return 'ord_type like \'%' + value + '%\'';
+                return 'osd_type like \'%' + value + '%\'';
             }
         }
     },{
@@ -134,6 +134,62 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
             dataIndex: 'os_remark',
             width: 250
         }],
-        relativeColumn: []
+        relativeColumn: [{
+            text: 'id',
+            dataIndex: 'id',
+            hidden:true,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'os_code',
+            width: 150
+        }, {
+            text: '日期',
+            dataIndex: 'os_date',
+            xtype: 'datecolumn',
+            width: 110
+        }, {
+            text: '供应商名称',
+            dataIndex: 'os_vendname',
+            width:250
+        },{
+            text: '结算账户',
+            dataIndex: 'os_bankname',
+            width: 150
+        },{
+            text: '付款金额',
+            dataIndex: 'os_amount',
+            width: 110,
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '单据状态',
+            dataIndex: 'os_status',
+            width: 90
+        },{
+            text: '录入人',
+            dataIndex: 'creatorName',
+            width: 110
+        }, {
+            text: '审核人',
+            dataIndex: 'os_auditman',
+            width: 110
+        }, {
+            text: '支出类别',
+            dataIndex: 'osd_type',
+            width: 110
+        }, {
+            text: '明细金额',
+            dataIndex: 'osd_nowbalance',
+            width: 110
+        },{
+            text: '备注',
+            dataIndex: 'osd_remark',
+            width: 250
+        }]
     }
 });

+ 7 - 7
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -15,11 +15,11 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     _statusField: 'pb_status',
     _statusCodeField: 'pb_statuscode',
     
-    _readUrl: '/api/money/paybalance/read/',
-    _saveUrl: '/api/money/paybalance/save/',
-    _auditUrl: '/api/money/paybalance/audit/',
-    _unAuditUrl: '/api/money/paybalance/unAudit/',
-    _deleteUrl: '/api/money/paybalance/delete/',
+    _readUrl: '/api/money/paybalance/read',
+    _saveUrl: '/api/money/paybalance/save',
+    _auditUrl: '/api/money/paybalance/audit',
+    _unAuditUrl: '/api/money/paybalance/unAudit',
+    _deleteUrl: '/api/money/paybalance/delete',
     initId: 0,
 
     toolBtns: [],
@@ -89,7 +89,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: "detailGridField",
         storeModel: 'saas.model.money.PayBalance1',
         detnoColumn: 'pd_detno',
-        deleteDetailUrl: '/api/money/paybalance/deleteDetail1/',
+        deleteDetailUrl: '/api/money/paybalance/deleteDetail1',
         columns: [
         {
             text: 'ID',
@@ -181,7 +181,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         storeModel: 'saas.model.money.PayBalance2',
         detnoColumn: 'pbd_detno',
         allowEmpty: true,
-        deleteDetailUrl: '/api/money/paybalance/deleteDetail2/',
+        deleteDetailUrl: '/api/money/paybalance/deleteDetail2',
         columns: [
         {
             text: 'ID',

+ 8 - 9
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -19,7 +19,6 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         xtype: 'textfield',
         name: 'pb_code',
         emptyText :'请输入单号或供应商',
-        style:{paddingLeft: '95px'},
         getCondition: function(value) {
             if(value == 'ALL') {
                 return '1=1';
@@ -83,16 +82,16 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
             }, {
                 text: '付款单号',
                 dataIndex: 'pb_code',
-                width: 150
+                width: 130
             }, {
                 text: '日期',
                 dataIndex: 'pb_date',
                 xtype: 'datecolumn',
-                width: 110
+                width: 100
             }, {
                 text: '供应商名称',
                 dataIndex: 'pb_vendname',
-                width: 250,
+                width: 180,
             }, {
                 text: '单据状态',
                 dataIndex: 'pb_status',
@@ -115,16 +114,16 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         }, {
             text: '付款单号',
             dataIndex: 'pb_code',
-            width: 150
+            width: 130
         }, {
             text: '日期',
             dataIndex: 'pb_date',
             xtype: 'datecolumn',
-            width: 110
+            width: 100
         }, {
             text: '供应商名称',
             dataIndex: 'pb_vendname',
-            width: 250,
+            width: 180,
         }, {
             text: '单据状态',
             dataIndex: 'pb_status',
@@ -151,11 +150,11 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         } ,{
             text: '结算方式',
             dataIndex: 'pd_paymethod',
-            width: 250
+            width: 100
         },{
             text: '结算号',
             dataIndex: 'pd_paycode',
-            width: 250
+            width: 100
         },{
             text: '备注',
             dataIndex: 'pd_remark',

+ 7 - 7
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -16,11 +16,11 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
     _statusField: 'rb_status',
     _statusCodeField: 'rb_statuscode',
     
-    _readUrl: '/api/money/recbalance/read/',
-    _saveUrl: '/api/money/recbalance/save/',
-    _auditUrl: '/api/money/recbalance/audit/',
-    _unAuditUrl: '/api/money/recbalance/unAudit/',
-    _deleteUrl: '/api/money/recbalance/delete/',
+    _readUrl: '/api/money/recbalance/read',
+    _saveUrl: '/api/money/recbalance/save',
+    _auditUrl: '/api/money/recbalance/audit',
+    _unAuditUrl: '/api/money/recbalance/unAudit',
+    _deleteUrl: '/api/money/recbalance/delete',
     initId: 0,
 
     defaultItems: [{
@@ -84,7 +84,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         xtype: "detailGridField",
         storeModel: 'saas.model.money.RecBalance1',
         detnoColumn: 'rd_detno',
-        deleteDetailUrl: '/api/money/recbalance/deleteDetail1/',
+        deleteDetailUrl: '/api/money/recbalance/deleteDetail1',
         columns: [{
             text: 'ID',
             dataIndex: 'id',
@@ -180,7 +180,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         storeModel: 'saas.model.money.RecBalance2',
         detnoColumn: 'rbd_detno',
         allowEmpty: true,
-        deleteDetailUrl: '/api/money/recbalance/deleteDetail2/',
+        deleteDetailUrl: '/api/money/recbalance/deleteDetail2',
         columns: [{
             text: 'ID',
             dataIndex: 'id',

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

@@ -11,7 +11,6 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         xtype: 'textfield',
         name: 'rb_code',
         emptyText :'请输入单号或客户',
-        style:{paddingLeft: '95px'},
         getCondition: function(value) {
             if(value == 'ALL') {
                 return '1=1';
@@ -74,20 +73,20 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         }, {
             text: '收款单号',
             dataIndex: 'rb_code',
-            width: 150
+            width: 130
         }, {
             text: '日期',
             dataIndex: 'rb_date',
             xtype: 'datecolumn',
-            width: 110
+            width: 100
         }, {
             text: '客户名称',
             dataIndex: 'rb_custname',
-            width: 250,
+            width: 180,
         }, {
             text: '单据状态',
             dataIndex: 'rb_status',
-            width: 90
+            width: 80
         }, {
             text: '收款人',
             dataIndex: 'rb_manname',
@@ -106,33 +105,33 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         }, {
             text: '收款单号',
             dataIndex: 'rb_code',
-            width: 150
+            width: 130
         }, {
             text: '日期',
             dataIndex: 'rb_date',
             xtype: 'datecolumn',
-            width: 110
+            width: 100
         }, {
             text: '单据状态',
             dataIndex: 'rb_status',
-            width: 90
+            width: 80
         }, {
             text: '客户名称',
             dataIndex: 'rb_custname',
-            width: 250,
+            width: 180,
         },{
             text: '收款人',
             dataIndex: 'rb_manname',
-            width: 110
+            width: 100
         },{
             text: '资金账户',
             dataIndex: 'rd_bankname',
-            width: 110
+            width: 100
         },{
             text: '收款金额',
             xtype: 'numbercolumn',
             dataIndex: 'rd_amount',
-            width: 120,
+            width: 100,
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');

+ 30 - 24
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -17,11 +17,11 @@ Ext.define('saas.view.money.verification.FormPanel', {
     _statusField: 'vc_status',
     _statusCodeField: 'vc_statuscode',
 
-    _readUrl: '/api/money/verification/read/',
-    _saveUrl: '/api/money/verification/save/',
-    _auditUrl: '/api/money/verification/audit/',
-    _unAuditUrl: '/api/money/verification/unAudit/',
-    _deleteUrl: '/api/money/verification/delete/',
+    _readUrl: '/api/money/verification/read',
+    _saveUrl: '/api/money/verification/save',
+    _auditUrl: '/api/money/verification/audit',
+    _unAuditUrl: '/api/money/verification/unAudit',
+    _deleteUrl: '/api/money/verification/delete',
 
     defatulType: 'receipts_offset_receivable',
 
@@ -49,12 +49,10 @@ Ext.define('saas.view.money.verification.FormPanel', {
             ],
             listeners:{
                 beforerender:function(f){
-                    f.firstLoad=true;
-                },
-                change:function(f){
-                    if(f.bindError){
-                        f.setValue(f.defaultValue);
-                        f.bindError = false
+                    f.firstLoad = true;
+                    if(f.ownerCt.initId!=0){
+                        f.setReadOnly(true);
+                        f.setDisabled(true);
                     }
                 }
             }
@@ -64,7 +62,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
             xtype: "detailGridField",
             storeModel: 'saas.model.money.Verification1',
             detnoColumn: 'vd_detno',
-            deleteDetailUrl: '/api/money/verification/deleteDetail1/',
+            deleteDetailUrl: '/api/money/verification/deleteDetail1',
             columnWidth: 1,
             columns: [{
                 text: 'ID',
@@ -183,9 +181,9 @@ Ext.define('saas.view.money.verification.FormPanel', {
         },
         detail2: {
             xtype: "detailGridField",
-            storeModel: 'saas.model.money.Verification1',
+            storeModel: 'saas.model.money.Verification2',
             detnoColumn: 'vcd_detno',
-            deleteDetailUrl: '/api/money/verification/deleteDetail2/',
+            deleteDetailUrl: '/api/money/verification/deleteDetail2',
             columnWidth: 1,
             columns: [{
                 text: 'ID',
@@ -327,6 +325,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 fieldLabel: '客户名称',
                 xtype: 'customerDbfindTrigger',
                 name: 'vc_custname',
+                allowBlank : false
             }, {
                 fieldLabel: '日期',
                 xtype: 'datefield',
@@ -400,7 +399,8 @@ Ext.define('saas.view.money.verification.FormPanel', {
             }, {
                 fieldLabel: '客户名称',
                 xtype: 'customerDbfindTrigger',
-                name: 'vc_custname'
+                name: 'vc_custname',
+                allowBlank : false,
             }, {
                 xtype: 'hidden',
                 name: 'vc_vendid',
@@ -440,7 +440,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
             main: [{
                 fieldLabel: '转出客户',
                 xtype: 'textfield',
-                name: 'vc_outcustid',
+                name: 'vc_custid',
                 hidden: true,
                 listeners: {
                     change: 'clearDetail0'
@@ -448,12 +448,13 @@ Ext.define('saas.view.money.verification.FormPanel', {
             }, {
                 fieldLabel: '转出客户编号',
                 xtype: 'textfield',
-                name: 'vc_outcustcode',
+                name: 'vc_custcode',
                 hidden: true
             }, {
                 fieldLabel: '转出客户',
                 xtype: 'customerDbfindTrigger',
-                name: 'vc_outcustname'
+                name: 'vc_custname',
+                allowBlank : false,
             }, {
                 fieldLabel: '转入客户id',
                 xtype: 'textfield',
@@ -468,6 +469,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 fieldLabel: '转入客户',
                 xtype: 'customerDbfindTrigger',
                 name: 'vc_turncustname',
+                allowBlank : false,
             }, {
                 fieldLabel: '日期',
                 xtype: 'datefield',
@@ -491,7 +493,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
             main: [{
                 fieldLabel: '转出供应商',
                 xtype: 'textfield',
-                name: 'vc_outvendid',
+                name: 'vc_vendid',
                 hidden: true,
                 listeners: {
                     change: 'clearDetail0'
@@ -499,12 +501,13 @@ Ext.define('saas.view.money.verification.FormPanel', {
             }, {
                 fieldLabel: '转出供应商编号',
                 xtype: 'textfield',
-                name: 'vc_outvendcode',
+                name: 'vc_vendcode',
                 hidden: true
             }, {
                 fieldLabel: '转出供应商',
                 xtype: 'vendorDbfindTrigger',
-                name: 'vc_outvendname'
+                name: 'vc_vendname',
+                allowBlank : false,
             }, {
                 fieldLabel: '转入供应商id',
                 xtype: 'textfield',
@@ -519,6 +522,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 fieldLabel: '转入供应商',
                 xtype: 'vendorDbfindTrigger',
                 name: 'vc_turnvendname',
+                allowBlank : false,
             }, {
                 fieldLabel: '日期',
                 xtype: 'datefield',
@@ -544,8 +548,10 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
             receivable_offset_payable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0',
                 'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
-            receivable_to_receivable: ['ifnull(sl_custid,0)={vc_outcustid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
-            payable_to_payable: ['ifnull(sl_vendtid,0)={vc_outvendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0']
+            receivable_to_receivable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
+            'and sl_kind in (\'期初余额\',\'出货单\',\'销售退货单\')'],
+            payable_to_payable: ['ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
+            'and sl_kind in (\'期初余额\',\'采购验收单\',\'采购验退单\')']
         }
     },
 
@@ -599,7 +605,7 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 FormUtil.loadData(me);
             })
             .catch(function(response) {
-                saas.util.BaseUtil.showToast('错误:' + response.message);
+                saas.util.BaseUtil.showErrorToast('错误:' + response.message);
                 console.error(response);
             });
         }

+ 47 - 17
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -21,22 +21,6 @@ Ext.define('saas.view.money.verification.FormPanelController', {
 
                 }
             },
-            // 转出客户
-            'dbfindtrigger[name=vc_outcustname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        //赋值 
-                        dbfinds:[{
-                            from: 'id', to: 'vc_outcustid',ignore:true
-                        }, {
-                            from:'cu_code', to:'vc_outcustcode'
-                        },{
-                            from:'cu_name', to:'vc_outcustname'
-                        }],
-                    }) ;   
-
-                }
-            },
             // 转入客户
             'dbfindtrigger[name=vc_turncustname]':{
                 beforerender:function(f){
@@ -97,7 +81,7 @@ Ext.define('saas.view.money.verification.FormPanelController', {
                     Ext.apply(f, {
                         dbfinds: [{
                             from: 'id',
-                            to: 'vc_turncustid',
+                            to: 'vc_turnvendid',
                             ignore: true
                         }, {
                             from: 've_code',
@@ -309,4 +293,50 @@ Ext.define('saas.view.money.verification.FormPanelController', {
 
         me.save();
     },
+
+    save:function(){
+        var me = this,
+        form = this.getView(),
+        detailCount = form.detailCount,
+        viewModel = me.getViewModel(),
+        modelData = viewModel.getData();
+
+        //form里面数据
+        var formData = form.getDirtyData();
+
+        var params = {
+            main:formData.main
+        };
+
+        for(var i = 0; i < detailCount; i++) {
+            params['items' + ( i + 1)] = formData['detail' + i];
+        }
+
+        saas.util.BaseUtil.request({
+            url: form._saveUrl,
+            params: JSON.stringify(params),
+            method: 'POST',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                var id = localJson.data.id;
+                var code = localJson.data.code;
+                form.initId = id;
+                saas.util.FormUtil.loadData(form);
+                saas.util.BaseUtil.showSuccessToast('保存成功');
+
+                var newId = form.xtype + '-' + id;
+                var newTitle = form._title + '(' + code + ')';
+
+                saas.util.BaseUtil.refreshTabTitle(newId, newTitle);
+
+                form.fireEvent('aftersave', true, form, localJson);
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
+            form.fireEvent('aftersave', false, form, res);
+        });
+    }
 });

+ 1 - 7
frontend/saas-web/app/view/money/verification/FormPanelModel.js

@@ -14,14 +14,8 @@ Ext.define('saas.view.money.verification.FormPanelModel', {
                 }
                 if(vc_kind.firstLoad){
                     vc_kind.firstLoad = false;
-                    if(vc_kind.defaultValue!=v&&vc_kind.defaultValue==vc_kind.value){
-                        vc_kind.bindError = true;
-                        return vc_kind.value;
-                    }
-                }else{
-                    return v;
                 }
-                
+                return v;
             }
         }
     }

+ 12 - 7
frontend/saas-web/app/view/money/verification/QueryPanel.js

@@ -96,20 +96,20 @@ Ext.define('saas.view.money.verification.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'vc_code',
-            width: 200
+            width: 180
         },  {
             text: '单据日期',
             dataIndex: 'vc_date',
             xtype: 'datecolumn',
-            width: 120
+            width: 100
         },{
             text: '审核状态',
             dataIndex: 'vc_status',
-            width: 120
+            width: 100
         },{
             text: '业务类型',
             dataIndex: 'vc_kind',
-            width: 200
+            width: 100
         }, {
             text: '客户编号',
             dataIndex: 'vc_custcode',
@@ -117,15 +117,20 @@ Ext.define('saas.view.money.verification.QueryPanel', {
         }, {
             text: '客户名称',
             dataIndex: 'vc_custname',
+            width: 130
+        }, {
+            text: '供应商编号',
+            dataIndex: 'vc_vendcode',
+            hidden: true
         }, {
             text: '供应商名称',
-            dataIndex: 'vc_vendcode'
+            dataIndex: 'vc_vendname',
+            width: 130
         }, {
             text: '核销金额',
             dataIndex: 'vc_amount1',
             xtype: 'numbercolumn',
-            width: 120,
-            flex: 1,
+            width: 100,
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');

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

@@ -16,12 +16,12 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
      _statusCodeField: 'pu_statuscode',
      _relationColumn: 'pd_puid',
 
-     _readUrl:'/api/purchase/purchase/read/',
+     _readUrl:'/api/purchase/purchase/read',
      _saveUrl:'/api/purchase/purchase/save',
      _auditUrl:'/api/purchase/purchase/audit',
-     _unAuditUrl: '/api/purchase/purchase/unAudit/',
-     _deleteUrl:'/api/purchase/purchase/delete/',
-     _turnInUrl:'/api/purchase/purchase/turnProdin/',
+     _unAuditUrl: '/api/purchase/purchase/unAudit',
+     _deleteUrl:'/api/purchase/purchase/delete',
+     _turnInUrl:'/api/purchase/purchase/turnProdin',
      initId:0,
  
      toolBtns: [{
@@ -89,7 +89,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         xtype : "detailGridField", 
         storeModel:'saas.model.purchase.Purchasedetail',
         detnoColumn:  'pd_detno',
-        deleteDetailUrl:'/api/purchase/purchase/deleteDetail/',
+        deleteDetailUrl:'/api/purchase/purchase/deleteDetail',
         allowEmpty: false,
         columns : [
             {

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

@@ -64,7 +64,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
         form = me.getView(),
         id = form.getForm().findField(form._idField);
         saas.util.BaseUtil.request({
-            url: form._turnInUrl+id.value,
+            url: form._turnInUrl+'/'+id.value,
             method: 'POST',
         })
         .then(function(localJson) {

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

@@ -21,7 +21,6 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         fieldLabel: ' ',
         labelSeparator:' ',
         emptyText:'请输入单号或供应商',
-        style:{paddingLeft: '95px'},
         getCondition: function(value) {
             return  ' (pu_code like\'%' + value + '%\' or pu_vendcode like \'%'+value+'%\' or pu_vendname like \'%'+value+'%\') ';
         }

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

@@ -16,12 +16,12 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     _statusCodeField: 'pi_statuscode',
     
     _relationColumn: 'pd_piid',
-    _readUrl:'/api/purchase/prodinout/read/',
+    _readUrl:'/api/purchase/prodinout/read',
     _saveUrl:'/api/purchase/prodinout/save',
     _auditUrl:'/api/purchase/prodinout/audit',
-    _unAuditUrl:'/api/purchase/prodinout/unAudit/',
-    _deleteUrl:'/api/purchase/prodinout/delete/',
-    _turnOutUrl:'/api/purchase/prodinout/turnProdOut/',
+    _unAuditUrl:'/api/purchase/prodinout/unAudit',
+    _deleteUrl:'/api/purchase/prodinout/delete',
+    _turnOutUrl:'/api/purchase/prodinout/turnProdOut',
     initId:0,
 
     toolBtns: [{
@@ -91,7 +91,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         name : "detailGridField", 
         xtype : "detailGridField",
         storeModel:'saas.model.purchase.ProdIODetail',
-        deleteDetailUrl:'/api/purchase/prodinout/deleteDetail/',
+        deleteDetailUrl:'/api/purchase/prodinout/deleteDetail',
         detnoColumn:  'pd_pdno',
         columns : [
             {

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

@@ -99,7 +99,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
         form = me.getView(),
         id = form.getForm().findField(form._idField);
         saas.util.BaseUtil.request({
-            url: form._turnOutUrl+id.value,
+            url: form._turnOutUrl+'/'+id.value,
             method: 'POST',
         })
         .then(function(localJson) {

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

@@ -16,7 +16,6 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         xtype: 'textfield',
         name: 'pi_inoutno',
         emptyText:'请输入单号或供应商',
-        style:{paddingLeft: '95px'},
         getCondition: function(value) {
             return  ' (pi_inoutno like\'%' + value + '%\' or pi_vendcode like \'%'+value+'%\' or pi_vendname like \'%'+value+'%\') ';
         }

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

@@ -16,11 +16,11 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     _statusCodeField: 'pi_statuscode',
     
     _relationColumn: 'pd_piid',
-    _readUrl:'/api/purchase/prodinout/read/',
+    _readUrl:'/api/purchase/prodinout/read',
     _saveUrl:'/api/purchase/prodinout/save',
     _auditUrl:'/api/purchase/prodinout/audit',
-    _unAuditUrl:'/api/purchase/prodinout/unAudit/',
-    _deleteUrl:'/api/purchase/prodinout/delete/',
+    _unAuditUrl:'/api/purchase/prodinout/unAudit',
+    _deleteUrl:'/api/purchase/prodinout/delete',
     initId:0,
     toolBtns: [],
     defaultItems: [{
@@ -89,7 +89,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         name : "detailGridField", 
         xtype : "detailGridField",
         storeModel:'saas.model.purchase.ProdIODetail',
-        deleteDetailUrl:'/api/purchase/prodinout/deleteDetail/',
+        deleteDetailUrl:'/api/purchase/prodinout/deleteDetail',
         detnoColumn:  'pd_pdno',
         columns : [
             {

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

@@ -19,7 +19,6 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         xtype: 'textfield',
         name: 'pi_inoutno',
         emptyText:'请输入单号或供应商',
-        style:{paddingLeft: '95px'},
         getCondition: function(value) {
             return  ' (pi_inoutno like\'%' + value + '%\' or pi_vendcode like \'%'+value+'%\' or pi_vendname like \'%'+value+'%\') ';
         }

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

@@ -16,13 +16,13 @@ Ext.define('saas.view.sale.sale.FormPanel', {
      _statusCodeField: 'sa_statuscode',
      
      _relationColumn: 'sd_puid',
-     _readUrl:'/api/sale/sale/read/',
-     _saveUrl:'/api/sale/sale/save/',
-     _auditUrl:'/api/sale/sale/audit/',
-     _unAuditUrl: '/api/sale/sale/unAudit/',
-     _deleteUrl:'/api/sale/sale/delete/',
-     _turnOutUrl:'/api/sale/sale/turnProdOut/',
-     _turnPurchase:'/api/sale/sale/saleTurnPurchase/',
+     _readUrl:'/api/sale/sale/read',
+     _saveUrl:'/api/sale/sale/save',
+     _auditUrl:'/api/sale/sale/audit',
+     _unAuditUrl: '/api/sale/sale/unAudit',
+     _deleteUrl:'/api/sale/sale/delete',
+     _turnOutUrl:'/api/sale/sale/turnProdOut',
+     _turnPurchase:'/api/sale/sale/saleTurnPurchase',
      initId:0,
  
      toolBtns: [{
@@ -92,7 +92,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         xtype : "detailGridField", 
         detnoColumn: 'sd_detno',
         storeModel:'saas.model.sale.Saledetail',
-        deleteDetailUrl:'/api/sale/sale/deleteDetail/',
+        deleteDetailUrl:'/api/sale/sale/deleteDetail',
         columns : [
            {
                 text : "id", 

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

@@ -63,7 +63,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
         form = me.getView(),
         id = form.getForm().findField(form._idField);
         saas.util.BaseUtil.request({
-            url: form._turnOutUrl+id.value,
+            url: form._turnOutUrl+'/'+id.value,
             method: 'POST',
         })
         .then(function(localJson) {
@@ -88,7 +88,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
             form = me.getView(),
             id = form.getForm().findField(form._idField);
         saas.util.BaseUtil.request({
-            url: form._turnPurchase+id.value,
+            url: form._turnPurchase+'/'+id.value,
             method: 'POST',
         })
             .then(function(localJson) {

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