Browse Source

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

zhuth 7 years ago
parent
commit
c329fbc3dd
41 changed files with 449 additions and 558 deletions
  1. 3 2
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 3 3
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bom.java
  3. 3 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BankinformationMapper.java
  4. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BomMapper.java
  5. 28 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BankinformationServiceImpl.java
  6. 16 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  7. 3 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  8. 5 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  9. 3 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  10. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  11. 1 1
      applications/document/document-server/src/main/resources/application.yml
  12. 10 3
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  13. 3 0
      applications/document/document-server/src/main/resources/mapper/BomMapper.xml
  14. 3 3
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  15. 2 2
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  16. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  17. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java
  18. 1 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  19. 5 6
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  20. 4 4
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  21. 2 1
      base-servers/account/account-server/src/main/resources/mapper/AccountRoleMapper.xml
  22. 6 0
      framework/core/src/main/java/com/usoftchina/saas/utils/RegexpUtils.java
  23. 4 2
      frontend/saas-portal-web/config/env.js
  24. 10 10
      frontend/saas-portal-web/src/css/main.css
  25. 17 298
      frontend/saas-portal-web/src/index.html
  26. 73 185
      frontend/saas-portal-web/src/js/main.js
  27. 1 0
      frontend/saas-portal-web/src/js/sockjs.min.js
  28. 7 0
      frontend/saas-portal-web/src/js/stomp.min.js
  29. 16 16
      frontend/saas-web/app.json
  30. 89 0
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js~2496f4a5e0d652d0a04afaa39f7ce066459fbea1
  31. 110 0
      frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js~2496f4a5e0d652d0a04afaa39f7ce066459fbea1
  32. 2 2
      frontend/saas-web/app/view/document/customer/FormPanel.js
  33. 1 1
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  34. 1 0
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  35. 1 0
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  36. 1 0
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  37. 1 0
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  38. 1 1
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  39. 2 2
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  40. 1 1
      frontend/saas-web/app/view/stock/make/FormPanel.js
  41. 0 1
      frontend/saas-web/overrides/form/field/Date.js

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

@@ -39,9 +39,10 @@ public enum BizExceptionCode implements BaseExceptionCode {
     REPEAT_TEL(79504, "电话号码重复"),
     NO_DATA(79998, "未找到数据"),
     ILLEGAL_ID(79999, "id不正确"),
-    PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库资料,无法删除"),
+    PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库,无法删除"),
+    CLOSE_WAREHOUSE(79506, "存在物料默认仓库资料为该仓库,无法关闭"),
     PRODUCTWH_HAS_WAREHOUSE(79503, "该仓库资料存在库存,无法删除"),
-    ACCOUNT_EXISTS(79503, "账号已存在"),
+    ACCOUNT_EXISTS(79505, "账号已存在"),
     DEAL_FAILED(79800, "编号:<u>%s</u>处理失败,%s"),
     USING_EXISTS(79504, ""),
 

+ 3 - 3
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bom.java

@@ -7,7 +7,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 public class Bom extends CommonBaseEntity implements Serializable {
-    private Integer bo_motherid;
+    private Long bo_motherid;
 
     private String bo_mothercode;
 
@@ -75,11 +75,11 @@ public class Bom extends CommonBaseEntity implements Serializable {
         this.pr_orispeccode = pr_orispeccode;
     }
 
-    public Integer getBo_motherid() {
+    public Long getBo_motherid() {
         return bo_motherid;
     }
 
-    public void setBo_motherid(Integer bo_motherid) {
+    public void setBo_motherid(Long bo_motherid) {
         this.bo_motherid = bo_motherid;
     }
 

+ 3 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BankinformationMapper.java

@@ -6,6 +6,7 @@ import com.usoftchina.saas.document.entities.Bankinformation;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 public interface BankinformationMapper extends CommonBaseMapper<Bankinformation> {
     int deleteByPrimaryKey(Integer bkId);
@@ -26,4 +27,6 @@ public interface BankinformationMapper extends CommonBaseMapper<Bankinformation>
     String selectBankcode(String bk_bankcode);
     Long selectBankId(String bk_bankcode);
 
+    void check(Map<String, Object> map);
+
 }

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

@@ -26,4 +26,6 @@ public interface BomMapper extends CommonBaseMapper<Bom> {
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
     List<Bom> getListData(@Param("condition") String condition, @Param("companyId") Long companyId);
+
+    int getCountFromMake(Long id);
 }

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

@@ -3,7 +3,9 @@ package com.usoftchina.saas.document.service.impl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.ComboDTO;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.context.BaseContextHolder;
@@ -22,7 +24,9 @@ import org.springframework.util.StringUtils;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author heqw
@@ -34,6 +38,8 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
     private BankinformationMapper bankinformationMapper;
     @Autowired
     private BanksubledgerMapper banksubledgerMapper;
+    @Autowired
+    private MessageLogService messageLogService;
 
     @Transactional
     @Override
@@ -101,11 +107,31 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
     @Transactional
     @Override
     public boolean removeByPrimaryKey(int id){
-        bankinformationMapper.deleteByPrimaryKey(id);
-        banksubledgerMapper.deleteByBankid(id);
+        DocBaseDTO docBaseDTO = getBaseDTOById(id);
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("v_id",id);
+        map.put("v_code", docBaseDTO.getCode());
+        map.put("v_type","bank");
+        map.put("v_companyid",BaseContextHolder.getCompanyId());
+        map.put("v_res","");
+        bankinformationMapper.check(map);
+        Object result =  map.get("v_res");
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.USING_EXISTS.getCode(),result.toString());
+        }else {
+            bankinformationMapper.deleteByPrimaryKey(id);
+            banksubledgerMapper.deleteByBankid(id);
+            //日志
+            messageLogService.delete(docBaseDTO);
+        }
         return true;
     }
 
+    private DocBaseDTO getBaseDTOById(int id) {
+        String code = bankinformationMapper.selectByPrimaryKey(id).getBk_bankcode();
+        DocBaseDTO baseDTO = new DocBaseDTO(Long.valueOf(String.valueOf(id)), code, "BankInformation");
+        return baseDTO;
+    }
     @Override
     public PageInfo<Bankinformation> selectList(PageRequest page, ListReqDTO condition) {
         //设置默认分页

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

@@ -112,9 +112,17 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
         if(id == null || id <= 0){
             throw new BizException(BizExceptionCode.ILLEGAL_ID);
         }
+        //校验BOM资料是否已被使用
+        Long prodId = getMapper().selectByPrimaryKey(id).getBo_motherid();
+        int count = getMapper().getCountFromMake(prodId);
+        if (count > 0){
+            throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+        }
+
         String code = getMapper().selectByPrimaryKey(id).getBo_mothercode();
-        getMapper().deleteByPrimaryKey(id);
         bomDetailMapper.deleteByFK(id);
+        getMapper().deleteByPrimaryKey(id);
+
         //记录LOG
         messageLogService.delete(generateMsgObj(id, code));
     }
@@ -174,6 +182,13 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
     @Override
     public DocBaseDTO close(Long id) {
         if(id != null && id > 0){
+            //校验BOM资料是否已被使用
+            Long prodId = getMapper().selectByPrimaryKey(id).getBo_motherid();
+            int count = getMapper().getCountFromMake(prodId);
+            if (count > 0){
+                throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+            }
+
             Bom bom = new Bom();
             bom.setId(id);
             bom.setBo_status(Status.CLOSE.getDisplay());

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

@@ -291,7 +291,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Transactional
-    private void singleDelete(Long id) {
+    public void singleDelete(Long id) {
         if (null!=id) {
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
             Map<String, Object> map = new HashMap<String, Object>();
@@ -363,7 +363,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志
-        messageLogService.close(docBaseDTO);
+            messageLogService.close(docBaseDTO);
         }
         return docBaseDTO;
     }
@@ -398,7 +398,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志
-        messageLogService.close(docBaseDTO);
+        messageLogService.open(docBaseDTO);
         }
         return docBaseDTO;
     }

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

@@ -24,6 +24,7 @@ import com.usoftchina.saas.document.service.ProductService;
 import com.usoftchina.saas.document.service.WarehouseService;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.utils.RegexpUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -88,10 +89,11 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         //校验明细仓库是否重复
         validRepeatWarehouse(productDetailList);
 
-        //保存
-        String code = pushMaxnubmer(product.getPr_code(), product.getId());
-
+        String prCode = product.getPr_code().trim().toUpperCase();
+        prCode = RegexpUtils.replaceSpecCharacter(prCode);
+        String code = pushMaxnubmer(prCode, product.getId());
         if(product.getId() == 0){
+            //保存
             product.setCompanyId(companyId);
             product.setCreatorId(userId);
             product.setCreateTime(new Date());

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

@@ -113,11 +113,10 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             throw new BizException(BizExceptionCode.EMPTY_DATA);
         }
         Vendor main = vendorListDTO.getMain();
-        String code = null;
         main.setCompanyId(BaseContextHolder.getCompanyId());
         List<Vendorcontact> items = vendorListDTO.getItems();
+        String code = pushMaxnubmer(main.getVe_code(), main.getId());
         if(main.getId() == 0){
-            code = pushMaxnubmer(main.getVe_code(), main.getId());
             int count = getMapper().getCountByCode(code, companyId);
             if(count > 0){
                 throw new BizException(BizExceptionCode.REPEAT_NAME);
@@ -150,9 +149,10 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             //记录LOG
             messageLogService.save(generateMsgObj(mainId, code));
         }else{
-            code = main.getVe_code();
+            main.setVe_code(code);
             Long mainId = main.getId();
             Vendor oldVendor = getMapper().selectByPrimaryKey(main.getId());
+
             int count = getMapper().getCountByCode(code, companyId);
             if (!code.equals(oldVendor.getVe_code())){
                 if (count > 0){

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

@@ -162,6 +162,10 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
     @Override
     public DocBaseDTO close(Long id) {
         if(id != null && id > 0){
+            int num = warehouseMapper.deleteCheckProduct(id, BaseContextHolder.getCompanyId());
+            if (num > 0) {
+                throw new BizException(BizExceptionCode.CLOSE_WAREHOUSE);
+            }
             Warehouse warehouse = new Warehouse();
             warehouse.setId(id);
             warehouse.setWh_status(Status.CLOSE.getDisplay());

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

@@ -47,7 +47,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 management:
   endpoints:
     web:

+ 10 - 3
applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml

@@ -39,7 +39,7 @@
     bk_remark
   </sql>
   <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
-    select 
+    select
     <include refid="Base_Column_List" />
     ,
     <include refid="Blob_Column_List" />
@@ -340,7 +340,14 @@
         select bk_bankcode from bankinformation where bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR}
     </select>
 
-  <select id="selectBankId" parameterType="java.lang.String" resultType="java.lang.Long">
-        select bk_id from bankinformation where bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR}
+  <select id="check" parameterMap="checkParamMap" statementType="CALLABLE">
+        CALL SP_LIMITBASE(?, ?, ?, ?,?)
     </select>
+  <parameterMap id="checkParamMap" type="java.util.Map">
+    <parameter property="v_type" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_id" jdbcType="INTEGER" mode="IN" />
+    <parameter property="v_code" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_companyid" jdbcType="INTEGER" mode="IN" />
+    <parameter property="v_res" jdbcType="VARCHAR" mode="OUT" />
+  </parameterMap>
 </mapper>

+ 3 - 0
applications/document/document-server/src/main/resources/mapper/BomMapper.xml

@@ -273,4 +273,7 @@
     </where>
     ORDER BY BO_ID DESC
   </select>
+    <select id="getCountFromMake" parameterType="java.lang.Long">
+        SELECT COUNT(*) FROM MAKE WHERE MA_PRODID = #{id}
+    </select>
 </mapper>

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

@@ -41,7 +41,7 @@
     cu_recamount,cu_preamount
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     from customer
     where cu_id = #{cu_id,jdbcType=INTEGER}
@@ -392,13 +392,13 @@
   and companyId =#{companyId};
   </select>
   <select id="check" parameterMap="checkParamMap" statementType="CALLABLE">
-        CALL SP_LIMITBASE(?, ?, ?, ?, ?)
+        CALL SP_LIMITBASE(?, ?, ?, ?,?)
     </select>
   <parameterMap id="checkParamMap" type="java.util.Map">
     <parameter property="v_type" jdbcType="VARCHAR" mode="IN" />
     <parameter property="v_id" jdbcType="INTEGER" mode="IN" />
     <parameter property="v_code" jdbcType="VARCHAR" mode="IN" />
-    <parameter property="v_companyid" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_companyid" jdbcType="INTEGER" mode="IN" />
     <parameter property="v_res" jdbcType="VARCHAR" mode="OUT" />
   </parameterMap>
 

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

@@ -478,13 +478,13 @@
     </select>
 
     <select id="check" parameterMap="checkParamMap" statementType="CALLABLE">
-        CALL SP_LIMITBASE(?, ?, ?, ?, ?)
+        CALL SP_LIMITBASE(?, ?, ?, ?,?)
     </select>
     <parameterMap id="checkParamMap" type="java.util.Map">
         <parameter property="v_type" jdbcType="VARCHAR" mode="IN" />
         <parameter property="v_id" jdbcType="INTEGER" mode="IN" />
         <parameter property="v_code" jdbcType="VARCHAR" mode="IN" />
-        <parameter property="v_companyid" jdbcType="VARCHAR" mode="IN" />
+        <parameter property="v_companyid" jdbcType="INTEGER" mode="IN" />
         <parameter property="v_res" jdbcType="VARCHAR" mode="OUT" />
     </parameterMap>
 </mapper>

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

@@ -124,7 +124,7 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
         Double nowbalanceTotal = new Double(0);
         for(Recbalancedetail detail : recbalancedetail){
             //本次核销金额
-            Double nowbalance = detail.getRbd_nowbalance();
+            Double nowbalance = detail.getRbd_nowbalance()==null?new Double(0):detail.getRbd_nowbalance();
             nowbalanceTotal = nowbalanceTotal + nowbalance;
             //来源单号
             Integer sourceId = detail.getRbd_slid();
@@ -132,7 +132,7 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             Double namount = new Double(0);
             if(sourceId!=0){
                 Subledger subledger = subledgerMapper.selectByPrimaryKey(sourceId);
-                namount = subledger.getSl_namount();
+                namount = subledger.getSl_namount()==null?new Double(0):subledger.getSl_namount();
             }
             //本次核销金额不能大于未核销金额
             if(nowbalance>namount){

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java

@@ -43,4 +43,6 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
     void updatePiTotal(Long id);
 
     List<HashMap<String, Object>> getWareHouseByCode(@Param("code") String code, @Param("companyId") Long companyId);
+
+    void updateCreator(@Param("userId") Long userId, @Param("userName") String userName, @Param("id") Long id);
 }

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

@@ -116,6 +116,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             //插入操作
             prodInOutMapper.insertSelective(prodInOut);
             pi_id = prodInOut.getId();
+            prodInOutMapper.updateCreator(userId, BaseContextHolder.getUserName(), pi_id);
             //添加从表传输对象
             for (ProdIODetailDTO item : items) {
                 ProdIODetail detail = BeanMapper.map(item,ProdIODetail.class);

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

@@ -38,6 +38,7 @@
     <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
     <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
     <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
+    <result column="pd_remark" jdbcType="VARCHAR" property="pd_remark" />
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
@@ -73,9 +74,9 @@
       <result column="pr_text4" property="pr_text4"/>
     </association>
   </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdIODetail">
+<!--  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdIODetail">
     <result column="pd_remark" jdbcType="LONGVARCHAR" property="pd_remark" />
-  </resultMap>
+  </resultMap>-->
   <sql id="Example_Where_Clause">
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -144,11 +145,9 @@
   <sql id="Blob_Column_List">
     pd_remark
   </sql>
-   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
+    *
     from prodiodetail
     where pd_id = #{pd_id,jdbcType=INTEGER}
   </select>

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

@@ -109,9 +109,7 @@
   </sql>
     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
     select 
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
+    *
     from prodinout
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </select>
@@ -560,5 +558,7 @@ update ProdInOut SET
   <select id="getWareHouseByCode" resultType="java.util.HashMap">
     select pr_whid,pr_whcode,pr_whname from product where pr_code=#{code} and companyid=#{companyId} and pr_statuscode='OPEN'
   </select>
-
+  <update id="updateCreator">
+    update ProdInOut set creatorId = #{userId} , creatorName=#{userName} where pi_id=#{id}
+  </update>
 </mapper>

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

@@ -19,6 +19,7 @@
     <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
         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
         left join ac_role c  on b.role_id = c.id
         <where>
@@ -26,7 +27,7 @@
                 ${condition}
             </if>
             <if test="companyId!=null">
-                AND C.COMPANY_ID = #{companyId}
+                AND d.COMPANY_ID = #{companyId}
             </if>
         </where>
         group by a.id,a.username,a.realname,a.email,a.mobile

+ 6 - 0
framework/core/src/main/java/com/usoftchina/saas/utils/RegexpUtils.java

@@ -11,6 +11,7 @@ public class RegexpUtils {
     private static final String CN_MOBILE_EXP = "^((13[0-9])|(15[0-3, 5-9])|(18[0,2,3,5-9])|(17[0-8])|(147))\\d{8}$";
     private static final String HK_MOBILE_EXP = "^(5|6|8|9)\\d{7}$";
     private static final String EMAIL_EXP = "^\\w+([-.]\\w+)*@\\w+([-]\\w+)*\\.(\\w+([-]\\w+)*\\.)*[a-z]{2,4}$";
+    private static final String SPECCHARACTER_EXP = "[\\\\s~·`!!@#¥$%^……&*(())\\\\-——\\\\-_=+【\\\\[\\\\]】{{}}\\\\|、\\\\\\\\;;::‘'“”\\\",,《<。.》>、/??]";
 
     /**
      * 匹配手机号码
@@ -55,4 +56,9 @@ public class RegexpUtils {
         return m.matches();
     }
 
+    public static String replaceSpecCharacter(String str){
+        Pattern p = Pattern.compile(SPECCHARACTER_EXP);
+        Matcher m = p.matcher(str);
+        return m.replaceAll("");
+    }
 }

+ 4 - 2
frontend/saas-portal-web/config/env.js

@@ -2,14 +2,16 @@ if (process.env.NODE_ENV == 'production') {
     window.env = {
         profile: 'production',
         server: {
-            baseUrl: 'http://192.168.0.181:8560'
+            baseUrl: 'http://192.168.0.181:8560',
+            ssoUrl: 'http://192.168.253.12:32323'
         }
     }
 } else {
     window.env = {
         profile: 'development',
         server: {
-            baseUrl: 'http://192.168.0.181:8560'
+            baseUrl: 'http://192.168.0.174:8560',
+            ssoUrl: 'http://192.168.253.12:32323'
         }
     }
 }

+ 10 - 10
frontend/saas-portal-web/src/css/main.css

@@ -123,10 +123,8 @@ main > section {
     /* width: 100%;
     height: 100%; */
 }
-.box,.box-zc{
+.box{
     display:none;
-    width: 378px;
-    height: 382px; 
     position: fixed;
     background:white; 
     top: 55%;
@@ -135,9 +133,6 @@ main > section {
     margin-top: -225px;
     z-index: 10;
 }
-.box-zc {
-    height: 450px;
-}
 .tc-login {
     text-align: center;
     color: black;
@@ -269,19 +264,24 @@ main > section {
     border: #0080E6 1px solid;
 }
 /* 11/12注册页面 ..........................................*/
-.login {
-    margin-top: 12px;
+.login,.profile {
     color: white;
     font-size: 14px;
 }
-.login img {
+.login {
+    margin-top: 12px;
+}
+.login img,.profile img {
     width: 25px;
     height: 24px;
 }
-.login > span:hover{
+.login > span:hover, .profile > span:hover{
     cursor:pointer;
     color: #0aa6bd;
 }
+.profile .user-info {
+    margin: 0 18px;
+}
 .my-label {
     float: left;
     line-height: 40px;

+ 17 - 298
frontend/saas-portal-web/src/index.html

@@ -35,8 +35,8 @@
 		<!-- bootstrap.min -->
         <link rel="stylesheet" href="css/animate.css">
 		<!-- Main Stylesheet -->
-        <link rel="stylesheet" href="css/main.css">
-
+		<link rel="stylesheet" href="css/main.css">
+		
 		<!-- Modernizer Script for old Browsers -->
         <script src="js/modernizr-2.6.2.min.js"></script>
 
@@ -90,6 +90,13 @@
 							<span class="btn1"><img src="./img/assets/denglu3x.png" alt="">登录  &nbsp;</span>
 							<span class="register"><img src="./img/assets/zhuce3x.png" alt="">注册</span>
 						</li>
+						<li class="profile" style="display:none">
+							<span class="user-info">
+								<img src="./img/assets/denglu3x.png" alt="">
+								<span id="user-info"></span>
+							</span>|
+							<a href="#">账户管理</a>
+						</li>
                     </ul>
                 </nav>
 				<!-- /main nav -->
@@ -99,158 +106,11 @@
 		
 		<main class="site-content" role="main">
 			<!-- 遮罩 -->
-			<div class="zhezhao"></div> 
-		<!-- 登录嵌套 -->
-			<iframe id="box" class="qiantao" src="http://10.1.51.91:3001/sassLogin?appId=sp&returnURL=https://www.usoftchina.com"></iframe>
-		<!-- 注册嵌套 -->
-			<iframe id="box-zc" class="qiantao"src="http://10.1.51.91:3001/sassLogin/register?appId=sp&returnURL=https://www.usoftchina.com "></iframe>
-			<!-- 注册 -->
-			<div id="box-zc1" class="box-zc">
-				<div class="tc-login" id="zhuce">
-					<div class="tc-out"><img class="tc-on" src="./img/assets/chahao.png" alt=""></div>
-					<div><img class="tc-logoimg" src="./img/assets/dalogo@3x.png" alt=""></div>
-					<!-- <div class="tc-logo"><img class="tc-logoimg" src="./img/assets/logo-lan3x.png" alt="">企云服</div> -->
-					<div class="tc-title"><hr class="tc-hrleft"/>注册<hr class="tc-hrright"/></div>
-					<form action="#" method="post">
-						<div class="tc-phone">
-							<div class="tc-phonebox">
-								<span><img src="./img/assets/phone.png"></span>
-								<input type="text" class="tc-phonecon" placeholder="请输入您的手机号" name="zc-phone" id="zc-phone">
-							</div>
-							<span class="tishi zc-phone"></span>
-						</div>
-						<div class="tc-over">
-							<div class="tc-phone left" style="margin: 0 0 16px 0;">
-								<div class="tc-phonebox">
-									<input type="text" class="tc-yanzhengma tc-shibiema" name="zc-tuxingma" id="zc-tuxingma">
-								</div>
-								<span class="tishi"><img src="./img/assets/tishi1x.png"/>验证错误</span>
-							</div>
-							<div class="left"><img class="tc-yanzhengimg" src="./img/assets/timg.jpg" alt=""></div>
-							<div class="right" style="line-height: 40px;"><img src="./img/assets/shuaxin.png" alt=""></div>
-						</div>
-						<div style="width: 100%;">
-							<div class="tc-phone left" style="margin: 0 0 16px 0;">
-								<div class="tc-phonebox">
-									<span><img src="./img/assets/yanzhengma.png"></span>
-									<input type="text" class="tc-yanzhengma" placeholder="请输入验证码" name="zc-yanzhengma" id="zc-yanzhengma">
-								</div>
-								<span class="tishi"><img src="./img/assets/tishi1x.png"/>验证错误</span>
-							</div>
-							<button class="tc-huoqu right">获取验证码</button>
-						</div>
-						
-						<div>
-							<button class="tc-login-pwd form-btn" id="login-pwd">注册</button>
-						</div>
-					</form>
-					<div>
-						<div class="xieyi">
-							<input class="checked" type="checkbox" checked name="xieyi"/> 
-							<span>
-								我已阅读并同意
-								<a href="https://sso.ubtob.com/common/agreement">《优软云服务条款》</a>
-							</span>
-						</div>
-						<span class="form-buttom">已有账号,去<a href="#" class="go-login">登录</a></span>
-					</div>
-				</div>
-			</div>
-			<!-- 登录窗 -->
-			<div id="box1" class="box">
-			<!-- 账号登录 -->
-				<div class="tc-login" id="zhanghao">
-					<div class="tc-out"><img class="tc-on" src="./img/assets/chahao.png" alt=""></div>
-					<div><img class="tc-logoimg" src="./img/assets/dalogo@3x.png" alt=""></div>
-					<!-- <div class="tc-logo"><img class="tc-logoimg" src="./img/assets/logo-lan3x.png" alt="">企云服</div> -->
-					<div class="tc-title"><hr class="tc-hrleft"/>账号登录<hr class="tc-hrright"/></div>
-					<form action="#" method="post">
-						<div class="tc-phone">
-							<div class="tc-phonebox">
-								<span><img src="./img/assets/phone.png"></span>
-								<input type="text" class="tc-phonecon" placeholder="手机号/优软云账号" name="zh-phone" id="zh-phone">
-							</div>
-							<span class="tishi zh-phone"></span>
-						</div>
-						<div class="tc-phone">
-							<div class="tc-phonebox">
-								<span><img src="./img/assets/password.png"></span>
-								<input type="password" class="tc-phonepwd" placeholder="请输入您的密码" name="pwd" id="zh-pwd">
-							</div>
-							<span class="tishi"><img src="./img/assets/tishi1x.png"/>验证错误</span>
-						</div>
-						<div>
-							<button class="tc-login-pwd" id="zh-login">登录</button>
-						</div>
-					</form>
-					<div class="tc-over" id="qiehuan">
-						<span id="message" class="left tc-duanxin"><a href="#">短信登录</a></span>
-						<span class="right">
-							<a href="#" class="fr tc-color" id="register">注册 | </a>
-							<a href="#" class="fr tc-color" id="example">忘记密码?</a>
-						</span>
-					</div>
-					<!-- <div class="clearfix" style="margin-top: 47px;">
-						<div class="fl" style="color:#999999;font-size: 14px;text-align: center">
-							<span>-----------------第三方登录------------------</span>
-						</div>
-						<div class="aui-form-content-item1" id="weixin-login">
-							<a href="#">
-								<img src="./img/assets/weixin.png">
-								<p class="tc-weixin">微信登录</p>
-							</a>
-						</div>
-					</div> -->
-				</div>
-			<!-- 短信登录 -->
-				<div class="tc-login" id="duanxin" style="display:none">
-					<div class="tc-out"><img class="tc-on" src="./img/assets/chahao.png" alt=""></div>
-					<div><img class="tc-logoimg" src="./img/assets/dalogo@3x.png" alt=""></div>
-					<!-- <div class="tc-logo"><img class="tc-logoimg" src="./img/assets/logo-lan3x.png" alt="">企云服</div> -->
-					<div class="tc-title"><hr class="tc-hrleft"/>短信登录<hr class="tc-hrright"/></div>
-					<form action="#" method="post">
-						<div class="tc-phone">
-							<div class="tc-phonebox">
-								<span><img src="./img/assets/phone.png"></span>
-								<input type="text" class="tc-phonecon" placeholder="请输入您的手机号" name="dx-phone" id="dx-phone">
-							</div>
-							<span class="tishi dx-phone"></span>
-						</div>
-						<div style="width: 100%;">
-							<div class="tc-phone left" style="margin: 0 0 16px 0;">
-								<div class="tc-phonebox">
-									<span><img src="./img/assets/yanzhengma.png"></span>
-									<input type="text" class="tc-yanzhengma" placeholder="请输入验证码" name="dx-yanzhengma" id="dx-yanzhengma">
-								</div>
-								<span class="tishi"><img src="./img/assets/tishi1x.png"/>验证错误</span>
-							</div>
-							<button class="tc-huoqu right">获取验证码</button>
-						</div>
-						<div>
-							<button class="tc-login-pwd" id="dx-login">登录</button>
-						</div>
-					</form>
-					<div class="tc-over" id="qiehuan">
-						<span id="user-phone" class="left tc-duanxin"><a href="#">密码登录</a></span>
-						<span class="right">
-							<a href="#" class="fr tc-color dx-zc">注册</a>
-						</span>
-					</div>
-					<!-- <div class="clearfix" style="margin-top: 47px;">
-						<div class="fl" style="color:#999999;font-size: 14px;text-align: center">
-							<span>-----------------第三方登录------------------</span>
-						</div>
-						<div class="aui-form-content-item1" id="weixin-login">
-							<a href="#">
-								<img src="./img/assets/weixin.png">
-								<p class="tc-weixin">微信登录</p>
-							</a>
-						</div>
-					</div> -->
-				</div>
+			<div class="zhezhao"></div>
+			<div id="box" class="box">
+				<iframe width="346" height="511"></iframe>
 			</div>
-<!--Home Slider==================================== -->
-
+			
 		<section id="home-slider">
             <div id="slider" class="sl-slider-wrapper">
 
@@ -626,8 +486,6 @@
         <script src="js/jquery.singlePageNav.min.js"></script>
 		<!-- jquery.fancybox.pack -->
         <script src="js/jquery.fancybox.pack.js"></script>
-		<!-- Google Map API -->
-		<!--<script src="http://maps.google.com/maps/api/js?sensor=false"></script>-->
 		<!-- Owl Carousel -->
         <script src="js/owl.carousel.min.js"></script>
         <!-- jquery easing -->
@@ -637,152 +495,13 @@
         <script src="js/jquery.slitslider.js"></script>
         <script src="js/jquery.ba-cond.min.js"></script>
 		<!-- onscroll animation -->
-        <script src="js/wow.min.js"></script>
+		<script src="js/wow.min.js"></script>
+		<!-- socket -->
+		<script src="js/sockjs.min.js"></script>
+		<script src="js/stomp.min.js"></script>
 		<!-- Custom Functions jq表单提交插件-->
         <!-- <script src="js/jquery.form.min.js"></script> -->
         <!-- <script src="js/jquery.validate.min.js"></script> -->
         <script src="js/main.js"></script>
-        <script>
-        	// $(function() {
-			// 	$.validator.addMethod("isMobile", function(value, element) {       
-			// 		var length = value.length;   
-			// 		var mobile = /^[1][3,4,5,7,8][0-9]{9}$/;   
-			// 		return this.optional(element) || (length == 11 && mobile.test(value));       
-			// 	}, "请正确填写您的手机号码");
-    		// 	$("#contact-form").validate({//自定义验证规则
-    		// 		rules: {
-    		// 			phone: {
-			// 				required: true,
-			// 				isMobile:true
-    		// 				// minlength: 8
-			// 			},
-			// 			// realName: "required",
-    		//             email: {
-    		//                 required: true,
-    		//                 email: true
-    		//             },
-    		// 			subject: {
-    		// 				required: true,
-    		//                 minlength: 2
-    		// 			},
-    		// 			message: {
-    		// 				required: true,
-    		//                 minlength: 2
-    		// 			}
-    		// 		},
-			// 		messages: {//提示文字
-			// 			phone: {
-			// 				required: "号码不能为空",
-			// 				// telephone: '请填写正确的手机号'
-			// 			},
-    		// 			// name: {
-    		// 			// 	required: "姓名不能为空",
-    		// 			// 	minlength: "至少输入8位字母和数字"
-    		// 			// },
-    		//             email: {
-			// 				required: "没有电子邮件",
-			// 				email: "请输入正确格式的电子邮件",
-    		//             },
-    		// 			subject: {
-    		// 				required: "你有理由联系,把它写在这里",
-    		//                 minlength: "这一切?真的?"
-    		// 			},
-    		// 			message: {
-    		// 				required: "嗯……嗯,你必须写一些东西寄这张表格。",
-    		// 				minlength: "这一切?真的?"
-    		// 			}
-    		// 		},
-    				// submitHandler: function(form) {
-    				// 	$(form).ajaxSubmit({//jq表单提交
-    				// 		type:"POST",
-    				// 		data: $(form).serialize(),//获取form中的所有数据
-    				// 		url:"mail.php",
-    				// 		success: function() {
-    				// 			$(".contact-form").fadeTo( "slow", 1, function() {
-    		        //                 $(".contact-form").resetForm();//清空form
-    				// 				$(".success").slideDown("slow");//滑动方式显示隐藏元素
-    				// 			});
-    				// 		},
-    				// 		error: function() {
-    				// 			$(".contact-form").fadeTo( "slow", 1, function() {
-    				// 				$(".error").slideDown("slow");
-    				// 			});
-    				// 		}
-    				// 	});
-    				// },
-    		//         errorPlacement: function(error, element) {
-    		//             element.after(error);
-    		//             error.hide().slideDown();
-    		//         }
-    		// 	});
-			// });
-			// 关闭弹窗X
-			$(".tc-on").click(function(){
-				$('#box-zc').css('display','none');
-				$('#box').css('display','none');
-				$(".zhezhao").css("display","none")
-			})
-			// 登录弹出
-            $(".btn1").click(function(){
-				if($('#box').css('display') =="none") {
-					$('#box').show();
-					$('#box-zc').css('display','none');
-					$(".zhezhao").css("display","block")
-				}else {
-					$('#box').hide();
-					$(".zhezhao").css("display","none")
-				}
-            });
-            /*点击短信登录*/
-            $("#message").click(function(){
-				$("#zhanghao").css("display","none")
-				$("#duanxin").css("display","block")
-			})
-			// 点击账号登录
-            $("#user-phone").click(function(){
-				$("#zhanghao").css("display","block")
-				$("#duanxin").css("display","none")
-
-            })
-
-			// 注册弹出
-			$('.register').click(function(){
-				if($('#box-zc').css('display') =="none") {
-					$('#box-zc').show();
-					$('#box').css('display','none');
-					$(".zhezhao").css("display","block")
-				}else {
-					$('#box-zc').hide();
-					$(".zhezhao").css("display","none")
-				}
-			})
-			$('#register').click(function(){
-				$("#box").css('display','none');
-				$('#box-zc').css('display','block');
-			})
-			$('.dx-zc').click(function(){
-				$("#box").css('display','none');
-				$('#box-zc').css('display','block');
-			})
-			// 返回登录
-			$("#go-login").click(function(){
-				$("#box").css('display','block');
-				$('#box-zc').css('display','none');
-			})
-			$(".go-login").click(function(){
-				$("#box").css('display','block');
-				$('#box-zc').css('display','none');
-			})
-
-		// ----------------
-			$("#callback").click(function(){
-                $("#bbb").css("display","none");
-                $("#aaa").css("display","block");
-            })
-            $("#weixin-login").click(function(){
-                $("#bbb").css("display","block");
-                $("#aaa").css("display","none");
-            })
-        </script>
     </body>
 </html>

+ 73 - 185
frontend/saas-portal-web/src/js/main.js

@@ -7,97 +7,6 @@ jQuery(window).load(function(){
     $("#preloader").fadeOut("slow");
     
     // ........................
-    // 手机验证
-    isPhone = function (phone) {
-        var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
-        if (!myreg.test(phone)) {
-            return false;
-        } else {
-            return true;
-        }
-    };
-    // 密码验证
-    isMima = function(mima){
-        let mimareg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,20}$/;
-        if (!mimareg.test(mima)) {
-            return false;
-        } else {
-            return true;
-        }
-    };
-    // $('#pwd').change(function(){
-    //     if (isMima($(this).val())) {
-    //         return
-    //     } else {
-    //         alert("密码格式不对")
-    //     }
-    // })
-    // 注册手机号验证
-    $("#zc-phone").bind('input propertychange',function(){
-        if (isPhone($(this).val())) {
-            $(".zc-phone").html("");
-            $(this).parent().parent().css('border','1px #D8DCE8 solid');
-            $(this).css('outline','');
-        } else {
-            $(".zc-phone").html("<img src='./img/assets/tishi1x.png'/>请输入正确的手机号码");
-            $(this).parent().parent().css('border','1px red solid');
-            $(this).css('outline','none');
-        }
-    })
-    // 账号手机号验证
-    $("#zh-phone").bind('input propertychange',function(){
-        if (isPhone($(this).val())) {
-            $(".zh-phone").html("");
-            $(this).parent().parent().css('border','1px #D8DCE8 solid');
-            $(this).css('outline','');
-        } else {
-            $(".zh-phone").html("<img src='./img/assets/tishi1x.png'/>请输入正确的手机号码");
-            $(this).parent().parent().css('border','1px red solid');
-            $(this).css('outline','none');
-        }
-    })
-    // 短信手机号验证
-    $("#dx-phone").bind('input propertychange',function(){
-        if (isPhone($(this).val())) {
-            $(".dx-phone").html("");
-            $(this).parent().parent().css('border','1px #D8DCE8 solid');
-            $(this).css('outline','');
-        } else {
-            $(".dx-phone").html("<img src='./img/assets/tishi1x.png'/>请输入正确的手机号码");
-            $(this).parent().parent().css('border','1px red solid');
-            $(this).css('outline','none');
-        }
-    })
-    // 账号登录
-    // $("#zh-login").click(function(){
-    //     let name = $("#zh-phone").val();
-    //     let pwd = $("#zh-pwd").val();
-    //     console.log('姓名是'+name+'密码是'+pwd)
-    // })
-    // // 短信登录
-    // $("#dx-login").click(function(){
-    //     let name = $("#dx-phone").val();
-    //     let pwd = $("#dx-yanzhengma").val();
-    //     console.log('姓名是'+name+'密码是'+pwd)
-    // })
-    // // 注册点击
-    // $("#zc-login").click(function(){
-    //     let name = $("#zc-phone").val();
-    //     let tuxingma = $("#zc-tuxingma").val();
-    //     let yanzheng  = $("#zc-yanzhengma").val();
-    //     console.log('姓名是'+name+'图形码是'+tuxingma+'验证码是'+yanzheng)
-    // })
-
-    // 注册协议按钮同意可以点击注册
-    $(".checked").click(function(){
-        if ($(".checked").get(0).checked) {
-            $(".form-btn").attr('disabled',false);
-            $(".form-btn").removeClass("back");
-        } else {
-            $(".form-btn").attr('disabled',true);
-            $(".form-btn").addClass("back");
-        }
-    })
     
     // 帮助中心
     $(".bz-right-conent>div").eq(0).show()
@@ -181,10 +90,80 @@ $(function() {
 
 });
 
-
-
 $(document).ready(function(){
-
+    var Store = (function(){
+        var storeKey = 'app-state', store = window.localStorage;
+        return {
+            get: function(key, defaultValue) {
+                var value = store.getItem(storeKey + '-' + key);
+                return value === undefined? defaultValue : JSON.parse(value);
+            },
+            set: function(key, value) {
+                store.setItem(storeKey + '-' + key, JSON.stringify(value));
+            }
+        };
+    })();
+    var setUserProfile = function(account) {
+        if (account) {
+            $(".login").css("display","none");
+            // 显示用户信息
+            $("#user-info").text(account.realname || account.username);
+            $(".profile").css("display","block")
+        } else {
+            $(".login").css("display","block");
+            $(".profile").css("display","none")
+        }
+    };
+    // 已经登录过从Store取出信息
+    setUserProfile(Store.get('account'));
+    // socket
+    var listenOnCallback = function(clientId, resolve) {
+        var socket = new SockJS(env.server.baseUrl + "/ws");
+        stompClient = Stomp.over(socket);
+        stompClient.connect({}, function(frame) {
+            stompClient.subscribe('/clients/' + clientId + '/sso/callback', function(message){
+                resolve(JSON.parse(message.body));
+            });
+        });
+    };
+    // 关闭弹窗X
+    $(".tc-on").click(function(){
+        $('#box-zc').css('display','none');
+        $('#box').css('display','none');
+        $(".zhezhao").css("display","none")
+    })
+    // 登录弹出
+    $(".btn1").click(function(){
+        if ($('#box').css('display') =="none") {
+            // 随机生成clientId
+            var clientId = Math.random().toString(36).substr(2);
+            $(".zhezhao").css("display","block");
+            $('#box iframe').attr('src', env.server.ssoUrl + '/sassLogin?appId=sp&baseUrl=' + 
+                encodeURIComponent(env.server.baseUrl + '/api/auth/sso/callback/' + clientId));
+            $('#box').show();
+            listenOnCallback(clientId, function(data){
+                var account = data.account;
+                Store.set('account', account);
+                setUserProfile(account);
+                $('#box').hide();
+                $(".zhezhao").css("display","none");
+            });
+        } else {
+            $('#box').hide();
+            $(".zhezhao").css("display","none")
+        }
+    });
+    // 注册弹出
+    $('.register').click(function(){
+        if ($('#box').css('display') =="none") {
+            $(".zhezhao").css("display","block");
+            $('#box iframe').attr('src', env.server.ssoUrl + '/sassLogin/register?appId=sp');
+            $('#box').show();
+        } else {
+            $('#box').hide();
+            $(".zhezhao").css("display","none")
+        }
+    });
     /* ========================================================================= */
     /*  Portfolio
     /* ========================================================================= */
@@ -302,97 +281,6 @@ $(document).ready(function(){
 	
 });
 
-
-/* ==========  START GOOGLE MAP ========== */
-
-/**
-// When the window has finished loading create our google map below
- google.maps.event.addDomListener(window, 'load', init);
-
-function init() {
-    // Basic options for a simple Google Map
-    // For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions
-
-	    var myLatLng = new google.maps.LatLng(22.402789, 91.822156);
-
-	    var mapOptions = {
-	        zoom: 15,
-	        center: myLatLng,
-	        disableDefaultUI: true,
-	        scrollwheel: false,
-	        navigationControl: true,
-	        mapTypeControl: false,
-	        scaleControl: false,
-	        draggable: true,
-
-        // How you would like to style the map. 
-        // This is where you would paste any style found on Snazzy Maps.
-        styles: [{
-            featureType: 'water',
-            stylers: [{
-                color: '#46bcec'
-            }, {
-                visibility: 'on'
-            }]
-        }, {
-            featureType: 'landscape',
-            stylers: [{
-                color: '#f2f2f2'
-            }]
-        }, {
-            featureType: 'road',
-            stylers: [{
-                saturation: -100
-            }, {
-                lightness: 45
-            }]
-        }, {
-            featureType: 'road.highway',
-            stylers: [{
-                visibility: 'simplified'
-            }]
-        }, {
-            featureType: 'road.arterial',
-            elementType: 'labels.icon',
-            stylers: [{
-                visibility: 'off'
-            }]
-        }, {
-            featureType: 'administrative',
-            elementType: 'labels.text.fill',
-            stylers: [{
-                color: '#444444'
-            }]
-        }, {
-            featureType: 'transit',
-            stylers: [{
-                visibility: 'off'
-            }]
-        }, {
-            featureType: 'poi',
-            stylers: [{
-                visibility: 'off'
-            }]
-        }]
-    };
-
-    // Get the HTML DOM element that will contain your map 
-    // We are using a div with id="map" seen below in the <body>
-    var mapElement = document.getElementById('map-canvas');
-
-    // Create the Google Map using our element and options defined above
-    var map = new google.maps.Map(mapElement, mapOptions);
-
-    // Let's also add a marker while we're at it
-    var marker = new google.maps.Marker({
-        position: new google.maps.LatLng(22.402789, 91.822156),
-        map: map,
-		icon: 'img/icons/map-marker.png',
-    });
-}
-**/
-// ========== END GOOGLE MAP ========== //
-
 var wow = new WOW ({
 	offset:       75,          // distance to the element when triggering the animation (default is 0)
 	mobile:       false,       // trigger animations on mobile devices (default is true)

File diff suppressed because it is too large
+ 1 - 0
frontend/saas-portal-web/src/js/sockjs.min.js


File diff suppressed because it is too large
+ 7 - 0
frontend/saas-portal-web/src/js/stomp.min.js


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

@@ -259,21 +259,21 @@
      * are supported.
      *
      */
-     "loader": {
-         // This property controls how the loader manages caching for requests:
-         //
-         //   - true: allows requests to receive cached responses
-         //   - false: disable cached responses by adding a random "cache buster"
-         //   - other: a string (such as the build.timestamp shown here) to allow
-         //     requests to be cached for this build.
-         //
-         "cache": false,
-
-         // When "cache" is not true, this value is the request parameter used
-         // to control caching.
-         //
-         "cacheParam": "_dc"
-     },
+    "loader": {
+        // This property controls how the loader manages caching for requests:
+        //
+        //   - true: allows requests to receive cached responses
+        //   - false: disable cached responses by adding a random "cache buster"
+        //   - other: a string (such as the build.timestamp shown here) to allow
+        //     requests to be cached for this build.
+        //
+        "cache": false,
+
+        // When "cache" is not true, this value is the request parameter used
+        // to control caching.
+        //
+        "cacheParam": "_dc"
+    },
 
     /**
      * Settings specific to production builds.
@@ -296,7 +296,7 @@
         },*/
         "compressor":null,
         "server": {
-            "basePath": "http://192.168.0.181:8560",
+            "basePath": "http://192.168.253.181:8560",
             "urlPattern": "^\/api\/"
         }
     },

+ 89 - 0
frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js~2496f4a5e0d652d0a04afaa39f7ce066459fbea1

@@ -0,0 +1,89 @@
+/**
+ * 客户资料放大镜
+ */
+Ext.define('saas.view.core.dbfind.types.CustomerDbfindTrigger', {
+    extend: 'saas.view.core.dbfind.DbfindTrigger',
+    xtype: 'customerDbfindTrigger',
+
+    dataUrl: '/api/document/customer/dbfind',
+    addXtype: 'document-customer-formpanel',
+    addTitle: '客户资料',
+    defaultCondition: "cu_statuscode='OPEN'",
+    
+    dbtpls: [{
+        field: 'cu_code',
+        width: 100
+    }, {
+        field: 'cu_name',
+        width: 100
+    }],
+    dbSearchFields: [{
+        emptyText: '输入客户编号或客户名称',
+        xtype: "textfield",
+        name: "search",
+        getCondition: function (v) {
+            return "(upper(cu_code) like '%" + v.toUpperCase() + "%' or upper(cu_name) like '%" + v.toUpperCase() + "%')";
+        },
+        allowBlank: true,
+        columnWidth: 0.25
+    }],
+    dbColumns: [{
+        conditionCode: 'id',
+        text: "客户ID",
+        dataIndex: "id",
+        width: 0,
+        xtype: "",
+    }, {
+        conditionCode: 'cu_code',
+        text: "客户编号",
+        dataIndex: "cu_code",
+        width: 150,
+        xtype: "",
+    }, {
+        conditionCode: 'cu_name',
+        text: "客户名称",
+        dataIndex: "cu_name",
+        width: 180,
+        xtype: "",
+    }, {
+        conditionCode: 'cu_type',
+        text: "客户类型",
+        dataIndex: "cu_type",
+        width: 150,
+        xtype: "",
+    }, {
+        text: "业务员编号",
+        dataIndex: "cu_sellercode",
+        width:150
+    }, {
+        text: "业务员",
+        dataIndex: "cu_sellername",
+        width:180
+    }, {
+        text: "税率",
+        dataIndex: "cu_taxrate",
+        xtype: 'numbercolumn',
+        width:80,
+        renderer: function (v) {
+            return Ext.util.Format.number(v, '0');
+        }
+    }, {
+        text: "承付天数",
+        dataIndex: "cu_promisedays",
+        width:100,
+        xtype: 'numbercolumn',
+        renderer: function (v) {
+            return Ext.util.Format.number(v, '0');
+        }
+    }, {
+        text: "额度",
+        dataIndex: "cu_credit",
+        width:100,
+        xtype: 'numbercolumn',
+    }, {
+        text: "客户地址",
+        dataIndex: "ca_address",
+        width: 250
+    }]
+
+});

+ 110 - 0
frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js~2496f4a5e0d652d0a04afaa39f7ce066459fbea1

@@ -0,0 +1,110 @@
+/**
+ * 物料资料放大镜(单选)
+ */
+Ext.define('saas.view.core.dbfind.types.ProductDbfindTrigger', {
+    extend: 'saas.view.core.dbfind.DbfindTrigger',
+    xtype: 'productDbfindTrigger',
+
+    dataUrl:'/api/document/product/list',
+    addXtype: 'document-product-formpanel',
+    addTitle: '物料资料',
+    dbtpls:[{
+        field:'pr_code',width:100
+    },{
+        field:'pr_detail',width:100
+    }],
+    defaultCondition: "pr_statuscode='OPEN'",
+    dbSearchFields:[{
+        emptyText:'输入物料编号、名称或规格',
+        xtype : "textfield", 
+        name : "search", 
+        width: 200,
+        getCondition: function(v) {
+            return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+        },
+        allowBlank : true, 
+        columnWidth : 0.25
+    }],
+    dbColumns:[{
+        text: "物料ID",
+        hidden: true,
+        dataIndex: "id",
+    }, {
+        text: "物料编号",       
+        dataIndex: "pr_code",
+        width: 200,
+    }, {
+        text: "物料名称",
+        width: 200,
+        dataIndex: "pr_detail",
+    }, {
+        text: "规格",
+        dataIndex: "pr_spec",
+        width: 100,
+    }, {
+        text: "单位",
+        dataIndex: "pr_spec",
+        width: 100,
+    },{
+        text: "仓库id",
+        dataIndex: "pr_whid",
+        hidden: true,
+    },{
+        text: "仓库编号",
+        dataIndex: "pr_whcode",
+        hidden: true,
+    },{
+        text: "仓库",
+        dataIndex: "pr_whname",
+        width: 200,
+        hidden: true
+    },{
+        text: "总库存数",
+        dataIndex: "po_onhand",
+        width: 100,
+        xtype: 'numbercolumn',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },                            
+        align:'end'
+    },{
+        text: "类型",
+        dataIndex: "pr_kind",
+        width: 100,
+    },{
+        text: "型号",
+        dataIndex: "pr_orispeccode",
+        width: 100,
+    },{
+        text: "品牌",
+        dataIndex: "pr_brand",
+        width: 100,
+    },{
+        text: "供应商",
+        dataIndex: "pr_vendname",
+        width: 100,
+    },{
+        text: "最小包装",
+        dataIndex: "pr_zxbzs",
+        width: 100,
+        xtype: 'numbercolumn',
+        align: 'end',
+        renderer : function(v) {
+            if(!v) {
+                return 0;
+            }
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    },{
+        text: "L/T",
+        dataIndex: "pr_leadtime",
+        width: 100,
+    }]
+
+});

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

@@ -305,7 +305,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                         }
                     }
                 }, 
-                text : "是否默认联系人", 
+                text : "默认联系人", 
                 width : 200.0, 
                 dataIndex : "cc_default", 
                 xtype : "",
@@ -401,7 +401,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                         }
                     }
                 }, 
-                text : "是否默认地址", 
+                text : "默认地址", 
                 dataIndex : "ca_default", 
                 xtype : "",
                 renderer: function (v, m, r) {

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

@@ -275,7 +275,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                         }
                     }
                 }, 
-                text : "是否默认联系人", 
+                text : "默认联系人", 
                 dataIndex : "vc_default", 
                 xtype : "",
                 renderer: function (v, m, r) {

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

@@ -87,6 +87,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 width : 200.0, 
                 dataIndex : "ord_type",
                 items : null,
+                hiddenBtn:false,//true 则会关闭新增按钮功能
                 editor : {
                     xtype : "remotecombo", 
                     storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',

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

@@ -76,6 +76,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         fieldLabel: '收入类别',
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
+        hiddenBtn:true//true 则会关闭新增按钮功能
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

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

@@ -87,6 +87,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 width : 200.0, 
                 dataIndex : "osd_type",
                 items : null,
+                hiddenBtn:false,//true 则会关闭新增按钮功能
                 editor : {
                     xtype : "remotecombo",
                     storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',

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

@@ -75,6 +75,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         fieldLabel: '支出类别',
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
+        hiddenBtn:true//true 则会关闭新增按钮功能
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

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

@@ -27,7 +27,7 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                     Ext.apply(f,{
                         //赋值 
                         dbfinds:[{
-                            from: 'id', to: 'rb_bankid'
+                            from: 'id', to: 'rd_bankid'
                         }, {
                             from:'bk_bankcode', to:'rd_bankcode'
                         },{

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

@@ -94,10 +94,10 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         dataIndex: 'pb_payrate',
         xtype: 'numbercolumn',
         renderer : function(v) {
-            var arr = (v*100 + '.').split('.');
+            var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0.' + xr.join();
-            return Ext.util.Format.number(v*100, format);
+            return Ext.util.Format.number(v, format);
         }
     }, {
         text: '备注',

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

@@ -327,7 +327,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
             },{
                 text : "替代料",
                 dataIndex : "mm_repprodcode",
-                width : 200.0,
+                width : 0,
                 editor : {
                     xtype : "textfield"
                 },

+ 0 - 1
frontend/saas-web/overrides/form/field/Date.js

@@ -3,7 +3,6 @@ Ext.define('saas.override.form.field.Date', {
     formatText: '',
 
     setValue: function (v) {
-        debugger;
         var me = this;
 
         if(v && me.format) {

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