Browse Source

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

rainco 7 years ago
parent
commit
7fcda555c8
49 changed files with 846 additions and 335 deletions
  1. 4 0
      applications/commons/commons-api/pom.xml
  2. 2 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/CommonService.java
  3. 2 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java
  4. 2 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java
  5. 6 1
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/SystemRemindApi.java
  6. 18 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/AddApplyDTO.java
  7. 57 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/AddApplyReqDTO.java
  8. 27 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/AddApply.java
  9. 6 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/SystemRemindController.java
  10. 3 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/SystemRemindMapper.java
  11. 8 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/SystemRemindService.java
  12. 19 7
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/SystemRemindServiceImpl.java
  13. 27 6
      applications/commons/commons-server/src/main/resources/mapper/SystemRemindMapper.xml
  14. 4 0
      applications/document/document-api/pom.xml
  15. 2 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/EmployeeApi.java
  16. 2 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java
  17. 2 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/VendorApi.java
  18. 2 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/WarehouseApi.java
  19. 2 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  20. 4 0
      applications/purchase/purchase-api/pom.xml
  21. 2 1
      applications/purchase/purchase-api/src/main/java/com/usoftchina/saas/purchase/api/PurchaseService.java
  22. 1 1
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseReportMapper.xml
  23. 1 0
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutReportMapper.xml
  24. 7 0
      base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/CompanyApi.java
  25. 9 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountCenterController.java
  26. 11 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/CompanyController.java
  27. 7 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/CompanyMapper.java
  28. 7 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/CompanyService.java
  29. 5 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/CompanyServiceImpl.java
  30. 11 1
      base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml
  31. 1 1
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  32. 1 0
      framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java
  33. 29 21
      frontend/saas-portal-web/src/components/conenter/addenterprise.vue
  34. 12 12
      frontend/saas-portal-web/src/components/conenter/company.vue
  35. 1 2
      frontend/saas-portal-web/src/components/conenter/details.vue
  36. 102 38
      frontend/saas-portal-web/src/components/conenter/enterprise.vue
  37. 12 10
      frontend/saas-portal-web/static/css/gongsi.css
  38. BIN
      frontend/saas-portal-web/static/img/nodata.png
  39. 8 3
      frontend/saas-web/app/view/core/chart/EChartsBase.js
  40. 1 0
      frontend/saas-web/app/view/core/form/field/DetailGridField.scss
  41. 1 1
      frontend/saas-web/app/view/core/report/ReportPanel.js
  42. 6 17
      frontend/saas-web/app/view/core/report/ReportPanel.scss
  43. 11 0
      frontend/saas-web/app/view/home/charts/MonthSale.js
  44. 98 53
      frontend/saas-web/app/view/sys/account/DataList.js
  45. 3 0
      frontend/saas-web/app/view/sys/finish/DataList.js
  46. 91 51
      frontend/saas-web/app/view/sys/invitation/DataList.js
  47. 97 48
      frontend/saas-web/app/view/sys/maxnumbers/DataList.js
  48. 110 50
      frontend/saas-web/app/view/sys/messagelog/DataList.js
  49. 2 2
      frontend/saas-web/ext/packages/ux/src/plugin/MenuClipboard.js

+ 4 - 0
applications/commons/commons-api/pom.xml

@@ -28,5 +28,9 @@
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 2 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/CommonService.java

@@ -1,9 +1,10 @@
 package com.usoftchina.saas.commons.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
-@FeignClient("commons-server")
+@FeignClient(name = "commons-server", configuration = ServiceFeignInterceptor.class)
 public interface CommonService {
 
     @PostMapping("/action/audit")

+ 2 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java

@@ -1,4 +1,5 @@
 package com.usoftchina.saas.commons.api;
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.base.Result;
 
 import org.springframework.cloud.openfeign.FeignClient;
@@ -9,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @Author: guq
  * @Date: 2018/10/20
  */
-@FeignClient(name = "commons-server", fallback = MaxnumberServiceFallback.class)
+@FeignClient(name = "commons-server", fallback = MaxnumberServiceFallback.class, configuration = ServiceFeignInterceptor.class)
 public interface MaxnumberService {
     /**
      * @Description: 更新并获取最大编号

+ 2 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.commons.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.po.Operation;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -13,7 +14,7 @@ import org.springframework.web.context.request.async.DeferredResult;
 * @Author: guq
 * @Date: 2018/10/20
 */
-@FeignClient("commons-server")
+@FeignClient(name = "commons-server", configuration = ServiceFeignInterceptor.class)
 public interface MessageLogService {
 
     @RequestMapping("/messagelog/save")

+ 6 - 1
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/SystemRemindApi.java

@@ -1,15 +1,20 @@
 package com.usoftchina.saas.commons.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.dto.AddApplyDTO;
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
 
-@FeignClient("commons-server")
+@FeignClient(name = "commons-server", configuration = ServiceFeignInterceptor.class)
 public interface SystemRemindApi {
 
     @PostMapping("/remind/apply/save")
     Result save(@RequestBody AddApplyDTO addApplyDTO);
 
+    @GetMapping("/remind/apply/count")
+    Result<Integer> getApplyCountById(@RequestParam("accountId") Long accountId, @RequestParam("companyId")Long companyId);
 }

+ 18 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/AddApplyDTO.java

@@ -22,6 +22,24 @@ public class AddApplyDTO extends CommonBaseDTO implements Serializable {
     private String status;
     private Long creatorId;
     private Long companyId;
+    private String admin;
+    private String adminMobile;
+
+    public String getAdmin() {
+        return admin;
+    }
+
+    public void setAdmin(String admin) {
+        this.admin = admin;
+    }
+
+    public String getAdminMobile() {
+        return adminMobile;
+    }
+
+    public void setAdminMobile(String adminMobile) {
+        this.adminMobile = adminMobile;
+    }
 
     public String getRoleNames() {
         return roleNames;

+ 57 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/AddApplyReqDTO.java

@@ -0,0 +1,57 @@
+package com.usoftchina.saas.commons.dto;
+
+import java.io.Serializable;
+
+/**
+ * @Description 申请列表
+ * @Author chenwei
+ * @Date 2018/12/18
+ */
+public class AddApplyReqDTO implements Serializable {
+
+    private String companyName;
+    private String adminName;
+    private String adminMobile;
+    private String createTime;
+    private String status;
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
+
+    public String getAdminMobile() {
+        return adminMobile;
+    }
+
+    public void setAdminMobile(String adminMobile) {
+        this.adminMobile = adminMobile;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+}

+ 27 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/AddApply.java

@@ -19,6 +19,33 @@ public class AddApply extends CommonBaseEntity implements Serializable {
      */
     private String status;
     private Long companyId;
+    private String companyName;
+    private String admin;
+    private String adminMobile;
+
+    public String getCompanyName() {
+        return companyName;
+    }
+
+    public void setCompanyName(String companyName) {
+        this.companyName = companyName;
+    }
+
+    public String getAdmin() {
+        return admin;
+    }
+
+    public void setAdmin(String admin) {
+        this.admin = admin;
+    }
+
+    public String getAdminMobile() {
+        return adminMobile;
+    }
+
+    public void setAdminMobile(String adminMobile) {
+        this.adminMobile = adminMobile;
+    }
 
     @Override
     public Long getCompanyId() {

+ 6 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/SystemRemindController.java

@@ -49,4 +49,10 @@ public class SystemRemindController {
         return Result.success();
     }
 
+    @GetMapping("/apply/count")
+    public Result getApplyCountById(@RequestParam("accountId") Long accountId, @RequestParam("companyId")Long companyId){
+        int count = systemRemindService.getApplyCountById(accountId, companyId);
+        return Result.success(count);
+    }
+
 }

+ 3 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/SystemRemindMapper.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.commons.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.commons.dto.AddApplyDTO;
+import com.usoftchina.saas.commons.dto.AddApplyReqDTO;
 import com.usoftchina.saas.commons.po.AddApply;
 import org.apache.ibatis.annotations.Param;
 
@@ -12,4 +13,6 @@ public interface SystemRemindMapper extends CommonBaseMapper<AddApply> {
     List<AddApplyDTO> getApplyList(@Param("condition") String condition, @Param("companyId") Long companyId);
 
     void confirmApply(@Param("status") String status, @Param("id") Long id, @Param("updaterId") Long updaterId);
+
+    int getApplyCountById(@Param("accountId") Long accountId, @Param("companyId") Long companyId);
 }

+ 8 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/SystemRemindService.java

@@ -26,4 +26,12 @@ public interface SystemRemindService {
      * @param addApplyDTO
      */
     void confirmApply(AddApplyDTO addApplyDTO);
+
+    /**
+     * 获取当前用户在具体公司申请的条数
+     * @param accountId
+     * @param companyId
+     * @return
+     */
+    int getApplyCountById(Long accountId, Long companyId);
 }

+ 19 - 7
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/SystemRemindServiceImpl.java

@@ -8,6 +8,7 @@ import com.usoftchina.saas.account.dto.AccountDTO;
 import com.usoftchina.saas.account.dto.CompanyDTO;
 import com.usoftchina.saas.account.dto.RoleBaseDTO;
 import com.usoftchina.saas.commons.dto.AddApplyDTO;
+import com.usoftchina.saas.commons.dto.AddApplyReqDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.mapper.SystemRemindMapper;
@@ -18,6 +19,7 @@ import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.BeanMapper;
+import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -51,6 +53,9 @@ public class SystemRemindServiceImpl implements SystemRemindService {
         AddApply addApply = new AddApply();
         addApply.setMobile(addApplyDTO.getMobile());
         addApply.setUsername(addApplyDTO.getUsername());
+        addApply.setCompanyName(addApplyDTO.getCompanyName());
+        addApply.setAdmin(addApplyDTO.getAdmin());
+        addApply.setAdminMobile(addApplyDTO.getAdminMobile());
         addApply.setStatus("2");
         addApply.setCompanyId(addApplyDTO.getCompanyId());
         addApply.setCreateTime(new Date());
@@ -70,14 +75,16 @@ public class SystemRemindServiceImpl implements SystemRemindService {
         for (AddApplyDTO addapplyDTO : addApplyDTOList) {
             AccountDTO accountDTO = accountApi.getAccount(addapplyDTO.getMobile()).getData();
             List<RoleBaseDTO> roleBaseDTOList = accountDTO.getRolesMap().get(companyId);
-            for (RoleBaseDTO roleBaseDTO : roleBaseDTOList){
-                roles.append(roleBaseDTO.getId() + ",");
-                roleNames.append(roleBaseDTO.getName() + ",");
+            if (!CollectionUtils.isEmpty(roleBaseDTOList)) {
+                for (RoleBaseDTO roleBaseDTO : roleBaseDTOList) {
+                    roles.append(roleBaseDTO.getId() + ",");
+                    roleNames.append(roleBaseDTO.getName() + ",");
+                }
+                addapplyDTO.setRoles(roles.substring(0, roles.length() - 1));
+                addapplyDTO.setRoleNames(roleNames.substring(0, roleNames.length() - 1));
+                roles.setLength(0);
+                roleNames.setLength(0);
             }
-            addapplyDTO.setRoles(roles.substring(0, roles.length() - 1));
-            addapplyDTO.setRoleNames(roleNames.substring(0, roleNames.length() - 1));
-            roles.setLength(0);
-            roleNames.setLength(0);
         }
         PageInfo<AddApplyDTO> pageInfo = new PageInfo<AddApplyDTO>(addApplyDTOList);
         return pageInfo;
@@ -98,4 +105,9 @@ public class SystemRemindServiceImpl implements SystemRemindService {
         //更新申请单状态
         systemRemindMapper.confirmApply(addApplyDTO.getStatus(), addApplyDTO.getId(), BaseContextHolder.getUserId());
     }
+
+    @Override
+    public int getApplyCountById(Long accountId, Long companyId) {
+        return systemRemindMapper.getApplyCountById(accountId, companyId);
+    }
 }

+ 27 - 6
applications/commons/commons-server/src/main/resources/mapper/SystemRemindMapper.xml

@@ -9,6 +9,9 @@
         <result column="creatorId" jdbcType="INTEGER" property="creatorId" />
         <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
         <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="re_companyName" jdbcType="VARCHAR" property="companyName" />
+        <result column="re_admin" jdbcType="VARCHAR" property="admin" />
+        <result column="re_adminMobile" jdbcType="VARCHAR" property="adminMobile" />
     </resultMap>
     <select id="getApplyList" resultMap="BaseResultMap">
       SELECT * FROM REMIND
@@ -16,9 +19,6 @@
           <if test="condition != null">
               ${condition}
           </if>
-          <if test="companyId != null">
-              AND COMPANYID = #{companyId}
-          </if>
       </where>
       ORDER BY RE_STATUS DESC,RE_ID DESC
     </select>
@@ -26,6 +26,9 @@
         UPDATE REMIND SET RE_STATUS = #{status}, updateTime = now(), updaterId = #{updaterId}
         where re_id = #{id}
     </update>
+    <select id="getApplyCountById" resultType="int">
+        SELECT COUNT(*) FROM REMIND WHERE COMPANYID = #{companyId} AND CREATORID = #{accountId}
+    </select>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.AddApply">
         <selectKey resultType="java.lang.Long" keyProperty="id">
             SELECT LAST_INSERT_ID() AS ID
@@ -51,7 +54,16 @@
                 companyId,
             </if>
             <if test="status != null">
-                re_status
+                re_status,
+            </if>
+            <if test="admin != null">
+                re_admin,
+            </if>
+            <if test="companyName != null">
+                re_companyName,
+            </if>
+            <if test="adminMobile != null">
+                re_adminMobile
             </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -71,10 +83,19 @@
                 #{createTime, jdbcType=TIMESTAMP},
             </if>
             <if test="companyId != null">
-                #{companyId, jdbcType=TIMESTAMP},
+                #{companyId, jdbcType=INTEGER},
             </if>
             <if test="status != null">
-                #{status, jdbcType=TIMESTAMP}
+                #{status, jdbcType=VARCHAR},
+            </if>
+            <if test="admin != null">
+                #{admin, jdbcType=VARCHAR},
+            </if>
+            <if test="companyName != null">
+                #{companyName, jdbcType=VARCHAR},
+            </if>
+            <if test="adminMobile != null">
+                #{adminMobile, jdbcType=VARCHAR}
             </if>
         </trim>
     </insert>

+ 4 - 0
applications/document/document-api/pom.xml

@@ -26,6 +26,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 2 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/EmployeeApi.java

@@ -1,11 +1,12 @@
 package com.usoftchina.saas.document.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 
 import java.util.Map;
 
-@FeignClient(name = "document-server")
+@FeignClient(name = "document-server", configuration = ServiceFeignInterceptor.class)
 public interface EmployeeApi {
 
     @GetMapping("/employee/getEmployeeByAccount")

+ 2 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.document.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -9,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 
-@FeignClient(name = "document-server")
+@FeignClient(name = "document-server", configuration = ServiceFeignInterceptor.class)
 public interface ProductApi {
 
     /**

+ 2 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/VendorApi.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.document.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.page.PageRequest;
@@ -9,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 
-@FeignClient(name = "document-server")
+@FeignClient(name = "document-server", configuration = ServiceFeignInterceptor.class)
 public interface VendorApi {
 
     /**

+ 2 - 1
applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/WarehouseApi.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.document.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.base.Result;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -8,7 +9,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 
 import java.util.Map;
 
-@FeignClient(name = "document-server")
+@FeignClient(name = "document-server", configuration = ServiceFeignInterceptor.class)
 public interface WarehouseApi {
 
     @PostMapping("/warehouse/post")

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

@@ -227,9 +227,9 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
                 //限制关联单据不可修改金额
                 Customer customer1 = getMapper().selectByPrimaryKey(customer.getId());
-                if (customer.getCu_beginaramount().doubleValue() != customer1.getCu_beginaramount().doubleValue() ||
+                if (customer.getCu_beginaramount()!=null&&(customer.getCu_beginaramount().doubleValue() != customer1.getCu_beginaramount().doubleValue() ||
                         customer.getCu_beginprerecamount().doubleValue() != customer1.getCu_beginprerecamount().doubleValue() ||
-                        customer1.getCu_begindate().compareTo(customer.getCu_begindate()) != 0){
+                        customer1.getCu_begindate().compareTo(customer.getCu_begindate()) != 0)){
                     throw new BizException(BizExceptionCode.BIZ_RELUPDATE_AMOUNT);
                 }
             }

+ 4 - 0
applications/purchase/purchase-api/pom.xml

@@ -26,5 +26,9 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 2 - 1
applications/purchase/purchase-api/src/main/java/com/usoftchina/saas/purchase/api/PurchaseService.java

@@ -1,11 +1,12 @@
 package com.usoftchina.saas.purchase.api;
 
+import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
-@FeignClient("purchase-server")
+@FeignClient(name = "purchase-server", configuration = ServiceFeignInterceptor.class)
 public interface PurchaseService {
 
     @PostMapping("/purchase/getPurchaseCode")

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

@@ -124,7 +124,7 @@
         and   purchase.companyId = #{companyId}
       </if>
       and pu_statuscode='AUDITED'
-    </where>  order by pu_date desc
+    </where>  order by pu_id desc,pd_id
   </select>
 
 

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

@@ -56,6 +56,7 @@
         and  companyid = #{companyId}
       </if>
     </where>
+    order by pd_prodcode,pi_date desc
   </select>
 
 

+ 7 - 0
base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/CompanyApi.java

@@ -79,4 +79,11 @@ public interface CompanyApi {
     @GetMapping("/company/find/{name}")
     Result<List<CompanyRspDTO>> getCompanyByFuzzyName(@PathVariable("name") String name);
 
+    /**
+     * 按企业ID查找企业及企业管理员信息
+     * @param id
+     * @return
+     */
+    @GetMapping(path = "/company/find", params = "id")
+    Result<CompanyRspDTO> getCompanyRspDTOById(@RequestParam("id") Long id);
 }

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

@@ -7,6 +7,7 @@ import com.usoftchina.saas.account.service.AccountCenterService;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.api.SystemRemindApi;
 import com.usoftchina.saas.commons.dto.AddApplyDTO;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.sso.api.SsoUserSpaceApi;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -114,10 +115,18 @@ public class AccountCenterController {
      */
     @PostMapping("/company/join")
     public Result joinCompany(@RequestBody BindCompanyDTO bindCompanyDTO){
+        Integer count = systemRemindApi.getApplyCountById(bindCompanyDTO.getAccountId(), bindCompanyDTO.getCompanyId()).getData();
+        if (count > 0){
+            throw new BizException(ExceptionCode.APPLY_DOING_EXIST);
+        }
         AddApplyDTO addApplyDTO = new AddApplyDTO();
         AccountDTO accountDTO = accountApi.getAccountById(bindCompanyDTO.getAccountId()).getData();
+        CompanyRspDTO companyRspDTO = companyApi.getCompanyRspDTOById(bindCompanyDTO.getCompanyId()).getData();
         addApplyDTO.setMobile(accountDTO.getMobile());
         addApplyDTO.setCompanyId(bindCompanyDTO.getCompanyId());
+        addApplyDTO.setCompanyName(companyRspDTO.getName());
+        addApplyDTO.setAdmin(companyRspDTO.getAdmin());
+        addApplyDTO.setAdminMobile(companyRspDTO.getAdminMobile());
         addApplyDTO.setUsername(bindCompanyDTO.getUsername());
         addApplyDTO.setStatus("2");
         systemRemindApi.save(addApplyDTO);

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

@@ -161,6 +161,17 @@ public class CompanyController {
         return Result.error(ExceptionCode.COMPANY_NOT_EXIST);
     }
 
+    /**
+     * 按企业ID查找企业及企业管理员信息
+     * @param id
+     * @return
+     */
+    @GetMapping(path = "/find", params = "id")
+    public Result<CompanyRspDTO> getCompanyRspDTOById(@RequestParam("id") Long id){
+        CompanyRspDTO companyRspDTO = companyService.getCompanyRspDTOById(id);
+        return Result.success(companyRspDTO);
+    }
+
     /**
      * 当前登录的公司的信息
      *

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

@@ -97,4 +97,11 @@ public interface CompanyMapper {
      * @return
      */
     List<CompanyRspDTO> findByFuzzyName(@Param("name") String name);
+
+    /**
+     * 按企业ID查找企业及企业管理员信息
+     * @param id
+     * @return
+     */
+    CompanyRspDTO getCompanyRspDTOById(Long id);
 }

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

@@ -113,4 +113,11 @@ public interface CompanyService {
      * @return
      */
     List<CompanyRspDTO> findByFuzzyName(String name);
+
+    /**
+     * 按企业ID查找企业及企业管理员信息
+     * @param id
+     * @return
+     */
+    CompanyRspDTO getCompanyRspDTOById(Long id);
 }

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

@@ -65,6 +65,11 @@ public class CompanyServiceImpl implements CompanyService{
         return companyMapper.findByFuzzyName(name);
     }
 
+    @Override
+    public CompanyRspDTO getCompanyRspDTOById(Long id) {
+        return companyMapper.getCompanyRspDTOById(id);
+    }
+
     @Override
     public Company findByName(String name) {
         return companyMapper.selectByName(name);

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

@@ -123,7 +123,17 @@
           INNER JOIN ac_account aa on ac.creator_id = aa.id
         WHERE
           ac.name LIKE concat( '%', #{name,jdbcType=VARCHAR}, '%' )
-          OR aa.realname LIKE concat('%', '陈炜', '%')
+          OR aa.realname LIKE concat('%', #{name,jdbcType=VARCHAR}, '%')
+        ORDER BY ac.id
+    </select>
+    <select id="getCompanyRspDTOById" resultType="com.usoftchina.saas.account.dto.CompanyRspDTO">
+        SELECT
+          ac.id,ac.name,aa.realname admin,aa.mobile adminMobile
+        FROM
+          ac_company ac
+          INNER JOIN ac_account aa on ac.creator_id = aa.id
+        WHERE
+          ac.id = #{id}
         ORDER BY ac.id
     </select>
     <select id="selectByUu" parameterType="java.lang.Long" resultMap="FullResultMap">

+ 1 - 1
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -65,7 +65,7 @@ public class AuthController {
     @Value("${auth.header:Authorization}")
     private String authHeader;
 
-    @Value("${auth.expire:1800000}")
+    @Value("${auth.expire:18000}")
     private int expire;
 
     @Value("${auth.max-errors:5}")

+ 1 - 0
framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java

@@ -47,6 +47,7 @@ public enum ExceptionCode implements BaseExceptionCode {
     MISSING_PERMISSIONS(53030, "权限缺失"),
     USER_COMPANY_EXIST(53007, "企业已存在账户"),
     ROLE_HAS_USE(54030, "存在已使用该角色的账户,不允许删除"),
+    APPLY_DOING_EXIST(54031, "已存在待处理的加入申请"),
 
     // 文件相关
     FOLDER_NOT_EXISTS(55000, "文件夹不存在"),

+ 29 - 21
frontend/saas-portal-web/src/components/conenter/addenterprise.vue

@@ -8,7 +8,7 @@
             <div class="gs-worp qy-worp tj-up">
                 <div class="qy-title" style="position: relative;">
                     <ul class="over">
-                        <li style="width:100%" class="left xs" v-for="(d, i) in tab" :key="i" :class= "{qyactive:nowindex == i}" @click="tabwith(i)">{{d.name}}</li>
+                        <li class="left xs" v-for="(d, i) in tab" :key="i" :class= "{qyactive:nowindex == i}" @click="tabwith(i)">{{d.name}}</li>
                     </ul>
                 </div>
                 <div class="qy-conent" :class= "{showqiye:nowindex == 0}" style="padding-top: 60px;">
@@ -16,7 +16,7 @@
                         <li style="margin: 0">
                             <span class="qy-biaoti"><span class="xingxing">*</span>企业名称</span>
                             <input class="inpind" ref="qyname" @change= "spaceName" type="text" placeholder="请填写企业全称">
-                            <dir class="qy-Tips"><span ref="qyno" style="color:red"></span></dir>
+                            <div class="qy-Tips Tips-buttom"><span ref="qyno" style="color:red"></span></div>
                         </li>
                         <li>
                             <span class="qy-biaoti">所属行业</span>
@@ -83,9 +83,9 @@
                             <div class="lookup">
                                 <ul>
                                     <li v-for="(d, i) in arr" :key="i" @click="qylist(i)" :class="{'hui':newindex === i}">
-                                        <span>企业名称:</span><span>{{d.name}}</span>
-                                        <span class="saasguanli">SaaS管理员:</span><span>{{d.admin}}</span>
-                                        <span>联系方式:</span><span>{{d.adminMobile}}</span>
+                                        <span class="maxtxt">{{d.name}}</span>
+                                        <span class="maxtxt">{{d.admin}}</span>
+                                        <span>{{d.adminMobile}}</span>
                                     </li>
                                 </ul>
                             </div>
@@ -134,7 +134,7 @@ import { setTimeout } from 'timers';
                 // placeholde:{province:"", city:"", area:""},
                 tab:[
                     {name:'创建新企业'},
-                    // {name:'加入企业'},
+                    {name:'加入企业'},
                 ],
                 nowindex:0,
                 newindex:'',
@@ -190,9 +190,6 @@ import { setTimeout } from 'timers';
                                 this.qymingzi = false;
                             }
                         })
-                        .catch(err=>{
-                            // console.log("请求错误",err);
-                        })
                     }
                 }
             },
@@ -205,7 +202,7 @@ import { setTimeout } from 'timers';
                     this.islookup = false;
                 } else {
                     this.$ajax({
-                        url: "http://192.168.253.41:8560/api/account/accountCenter/company/isOpen",//http://192.168.253.41:8560
+                        url: this.$url.api+"/api/account/accountCenter/company/isOpen",//http://192.168.253.41:8560
                         method:'GET',
                         params: {
                             companyName: qyname
@@ -216,16 +213,16 @@ import { setTimeout } from 'timers';
                     })
                     .then(res=>{
                         if (res.data.success) {
-                            this.arr = res.data.data
+                            this.newindex = '';
+                            this.arr = res.data.data;
                             this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/ok.png" alt="">';
                             this.islookup = true;   
-                        } else if (res.data.success = false && res.data.message != null){
+                        } else if (res.data.success == false && res.data.message == '公司不存在') {
                             this.$refs.warningqyname.innerHTML = '<img style="width:14px" src="/static/img/warning.png" alt=""> 该企业不存在';
                         } else {
                             this.$message.error('请求失败,请重试');
                         }
                     })
-                    
                 }
             },
             //验证个人姓名1
@@ -268,7 +265,6 @@ import { setTimeout } from 'timers';
             //加入企业提交按钮
             Submission(){
                 let token = this.mytoken.token;
-                let qyname = this.$refs.lookupqyname.value.replace(/\s+/g, "");//企业名字
                 let username = this.$refs.lookupname.value.replace(/\s+/g, "");//姓名过滤空格
                 if (!this.islookup) {
                     this.$message.error('企业或管理员不能为空');
@@ -278,7 +274,7 @@ import { setTimeout } from 'timers';
                     this.$message.error('姓名不能包含符号、数字等非法字符');
                 } else if (this.companyId){
                     this.$ajax({
-                        url:'http://192.168.253.41:8560/api/account/accountCenter/company/join',
+                        url: this.$url.api+'/api/account/accountCenter/company/join',
                         method:'POST',
                         data:{
                             username:username,
@@ -295,7 +291,10 @@ import { setTimeout } from 'timers';
                             this.$store.state.ishongdian = true;//显示红点
                             setTimeout(()=>{
                                 this.$router.push({name:'company'});
+                                document.documentElement.scrollTop = 0;
                             },3000)
+                        } else {
+                            this.$message.error(res.data.message);
                         }
                     })
                 } else {
@@ -343,10 +342,9 @@ import { setTimeout } from 'timers';
                 let address = this.$refs.address.value.replace(/\s+/g, "");//公司详细地址
                 let name = this.$refs.name.value.replace(/\s+/g, "");//个人姓名
                 let email = this.$refs.email.value;//邮箱
-                let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
-                let token = String(mytoken.token);
-                let uu = mytoken.account.uu;
-                let mobile = mytoken.account.mobile;//手机号
+                let token = this.mytoken.token;
+                let uu = this.mytoken.account.uu;
+                let mobile = this.mytoken.account.mobile;//手机号
                 let company = {'name':qyname,'address':address,'type':qyindustry};
                 let account = {'realname':name,'email':email,'mobile':mobile, 'uu':uu};
                 // console.log('姓名',name)//个人姓名
@@ -380,7 +378,7 @@ import { setTimeout } from 'timers';
                                 this.isadd = true;//添加成功弹窗
                                 setTimeout(()=>{
                                     document.documentElement.scrollTop = 0;
-                                    let session = JSON.parse(window.localStorage.getItem('app-state-session'));
+                                    let session = Session.get();
                                     session.account.realname = name;
                                     Session.set(session);
                                     // this.$router.push({name:'company'})
@@ -496,6 +494,16 @@ import { setTimeout } from 'timers';
     margin-right: 5px;
 }
 .hui {
-    background: #c5c5c5;
+    background: #c5c5c5 !important;
+}
+.lookup > ul > li:hover {
+    background: #f5f4f4
+}
+.lookup > ul {
+    height: 300px;
+    overflow-y: scroll;
+}
+.maxtxt {
+    font-size: 16px !important;
 }
 </style>

+ 12 - 12
frontend/saas-portal-web/src/components/conenter/company.vue

@@ -142,7 +142,7 @@
             let token = String(mytoken.token);
             //企业列表
             this.$ajax({
-                    url: this.$url.api+"/api/account/accountCenter/company/list",//http://192.168.253.29:8560
+                    url: this.$url.api+"/api/account/accountCenter/company/list",//http://192.168.253.41:8560
                     method: 'get',
                     params: {
                         mobile: mytoken.account.mobile
@@ -315,21 +315,21 @@
                 .then(res=>{
                     // console.log('请求成功',res)
                     if (res.data.success) {
-                        this.saasid = res.data.data
+                        this.saasid = res.data.data;
                         this.ktsass = false;
-                        let id = res.data.data
-                        let name = qyname
-                        let logoUrl = null
-                        let addenterprise = {'id':id, 'logoUrl': logoUrl, 'name': name}
-                        let session = JSON.parse(window.localStorage.getItem('app-state-session'))
-                        session.account.companies.push(addenterprise)
+                        let id = res.data.data;
+                        let name = qyname;
+                        let logoUrl = null;
+                        let addenterprise = {'id':id, 'logoUrl': logoUrl, 'name': name};
+                        let session = Session.get();
+                        session.account.companies.push(addenterprise);
                         Session.set(session);
                         this.$router.go(0);
                     } else {
-                        let msg = res.data.message
-                        let name = msg.split(" ")[1]
-                        this.admin = name.split('(')[0]
-                        this.adminMobile = name.split('(')[1].split(')')[0]
+                        let msg = res.data.message;
+                        let name = msg.split(" ")[1];
+                        this.admin = name.split('(')[0];
+                        this.adminMobile = name.split('(')[1].split(')')[0];
                         this.isokopensaas = true;
                     }
                 })

+ 1 - 2
frontend/saas-portal-web/src/components/conenter/details.vue

@@ -173,7 +173,7 @@
                     let company = {'name':qyname,'address':address, 'id':companyId, 'type':qyindustry};
                     let account = {'realname':name,'email':email,'mobile':mobile, 'uu':uu};
                     this.$ajax({
-                        url: this.$url.api+"/api/account/accountCenter/companyAccount/update",//http://192.168.253.31:8560
+                        url: this.$url.api+"/api/account/accountCenter/companyAccount/update",//http://192.168.253.41:8560
                         method: 'post',
                         data: {
                             companyRegDTO:company,
@@ -184,7 +184,6 @@
                         }
                     })
                     .then(res=>{
-                        // console.log("请求成功",res)
                         if (res.data.success) {
                             document.documentElement.scrollTop = 0;
                             this.modify = true;

+ 102 - 38
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -130,18 +130,31 @@
                                 <span>状态</span>
                                 <span>操作</span>
                             </li>
-                            <li class="newslist" v-for="(d, i) in arr" :key="i">
-                                <span>{{d.leixing}}</span>
-                                <span>{{d.time}}</span>
-                                <span class="newscentent">
-                                    <span>{{d.neirong.qyname}}</span>
-                                    <span>{{d.neirong.saas}}</span>
-                                    <span>{{d.neirong.phone}}</span>
+                            <li v-if="isnews" class="newslist" v-for="(d, i) in arr" :key="i">
+                                <span>加入申请</span>
+                                <span>{{d.createTime}}</span>
+                                <span class="newscentent" style="position:relative;top:9px">
+                                    <span>{{d.companyName}}</span>
+                                    <span>{{d.admin}}</span>
+                                    <span>{{d.adminMobile}}</span>
                                 </span>
-                                <span>{{d.zhuangtai}}</span>
-                                <span><button v-if="d.caozuo" @click="Rejoin(i)" class="news-btn">重新加入</button></span>
+                                <span v-if='d.status == 0'>未通过</span>
+                                <span v-else-if='d.status == 1'>已批准</span>
+                                <span v-else-if='d.status == 2'>待批准</span>
+                                <span><button v-if="d.status == 0" @click="Rejoin(i)" class="news-btn">重新加入</button></span>
+                            </li>
+                            <li v-if="!isnews">
+                                <img style="width:100%" src="/static/img/nodata.png" alt="">
                             </li>
                         </ul>
+                        <div v-if="isnews" class="my-pagination">
+                            <el-pagination
+                                background
+                                @current-change="handleCurrentChange"
+                                layout="prev, pager, next"
+                                :total= list>
+                            </el-pagination>
+                        </div>
                     </div>
                 </div>
             </div>
@@ -163,27 +176,27 @@ import { setTimeout } from 'timers';
                 isname:true,//姓名验证
                 reg: new RegExp(/[\@\#\$\%\&\*!\¥]/),//非法字符
                 isheigh:false,//默认高度
+                isnews: false,
                 tab: [
                     {name: '企业信息'},
                     {name: '个人信息'},
                     {name: '安全设置'},
-                    // {name: '消息'},
+                    {name: '消息'},
                 ],
-                arr: [
-                    {leixing:'加入申请',time:'2018/12/01  12:45:21',neirong:{qyname:'X防守对方的发士大夫XX公司',saas:'管理员名称范德萨发达',phone:'1345678923'},zhuangtai:'待批准',caozuo:false},
-                    {leixing:'加入申请',time:'2018/12/01  12:45:21',neirong:{qyname:'XXX公司',saas:'管理员名称',phone:'1345678923'},zhuangtai:'未通过',caozuo:true},
-                ]
+                arr: [],
+                list:1
             }
         },
         mounted(){
-            let mob = this.mytoken.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
-            this.mobile = mob;
+            let phone = this.mytoken.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
+            this.mobile = phone;
             this.boxheight();
         },
         watch:{
             arr:function(){
                 this.$nextTick(function(){
                     this.boxheight();
+                    this.isnews = true;
                 })
             }
         },
@@ -193,26 +206,28 @@ import { setTimeout } from 'timers';
             },
             ishongdian(){
                 return this.$store.state.ishongdian;
-            }
+            },
         },
         methods: {
             // tab切换
             tabswitch(index){
                 if (index == 3) {
                     this.nowindex = 3;
-                    let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
+                    let mytoken = Session.get();
                     let id = mytoken.account.id;
-                    // tab切换到消息的时候执行
                     let param = {
                         type:'condition',
                         value:'creatorId='+id+''
                     }
+                    // tab切换到消息的时候执行
                     this.$ajax({
-                        url:'http://192.168.253.41:8560/api/commons/remind/apply/list',
+                        url: this.$url.api+'/api/commons/remind/apply/list',
                         method:'GET',
                         async:false,
                         params: {
-                            condition:JSON.stringify(param)
+                            condition:JSON.stringify(param),
+                            number:1,
+                            size:10
                         },
                         headers:{
                             'Access-Control-Allow-Origin':'*',
@@ -221,8 +236,11 @@ import { setTimeout } from 'timers';
                         }
                     })
                     .then(res=>{
-                        console.log(res)
-                        this.$store.state.ishongdian = false
+                        if (res.data.success) {
+                            this.arr = res.data.data.list;
+                            this.list = res.data.data.total;
+                            this.$store.state.ishongdian = false;
+                        }
                     })
                 } else {
                     this.nowindex = index;
@@ -230,9 +248,58 @@ import { setTimeout } from 'timers';
                 
             },
             setTurnHome(){
-                // debugger
                 this.$parent.turnHome = true
             },
+            //重新加入
+            Rejoin(i){
+                this.$ajax({
+                    url: this.$url.api+'/api/account/accountCenter/company/join',
+                    method:'POST',
+                    data:{
+                        username:this.arr[i].creatorName,
+                        accountId:this.mytoken.id,
+                        companyId:this.arr[i].companyId,
+                    },
+                    headers:{
+                        "Authorization":Session.getToken(),
+                    }
+                })
+                .then(res=>{
+                    if (res.data.success) {
+                        this.$message.success('提交成功,待管理员批准');
+                        this.tabswitch(3);//本页面刷新
+                    }
+                })
+            },
+            // 分页
+             handleCurrentChange(val) {
+                let mytoken = Session.get();
+                let id = mytoken.account.id;
+                let param = {
+                    type:'condition',
+                    value:'creatorId='+id+''
+                }
+                this.$ajax({
+                    url: this.$url.api+'/api/commons/remind/apply/list',
+                    method:'GET',
+                    async:false,
+                    params: {
+                        condition:JSON.stringify(param),
+                        number:val,
+                        size:10
+                    },
+                    headers:{
+                        'Access-Control-Allow-Origin':'*',
+                        "Authorization":mytoken.token,
+                        'Content-Type':'application/json;charset=UTF-8'
+                    }
+                })
+                .then(res=>{
+                    if (res.data.success) {
+                        this.arr = res.data.data.list;
+                    }
+                })
+            },
             //退出
             loginout(){
                 const frame = window.frames[window.frames.length - 1]
@@ -278,7 +345,6 @@ import { setTimeout } from 'timers';
                 if (this.isname) {
                     let name = this.$refs.realname.value.replace(/\s+/g, "");
                     let id = this.mytoken.id;
-                    let token = JSON.parse(localStorage.getItem('app-state-session')).token;
                     this.$ajax({
                         url: this.$url.api+"/api/account/account/update",
                         method :'post',
@@ -287,12 +353,12 @@ import { setTimeout } from 'timers';
                             realname:name
                         },
                         headers: {
-                            "Authorization":token
+                            "Authorization":Session.getToken()
                         }
                     })
                     .then(res=>{
                         if (res.data.success) {
-                            let session = JSON.parse(window.localStorage.getItem('app-state-session'));
+                            let session = Session.get();
                             session.account.realname = name;
                             Session.set(session);
                             this.$router.go(0);
@@ -303,20 +369,10 @@ import { setTimeout } from 'timers';
                     })
                 }
             },
-            //重新加入
-            Rejoin(i){
-                //成功后提示
-                this.$message({
-                    message: '提交成功,待管理员批准',
-                    type: 'success'
-                });
-                this.arr[i].zhuangtai = '待批准';
-                this.arr[i].caozuo = false;
-            },
             //没有内容也要有一定的高度
             boxheight(){
                 let H = this.$refs.qiyebox.offsetHeight;
-                if (H < 500) {
+                if (H <= 500) {
                     this.isheigh = true
                 } else {
                     this.isheigh = false
@@ -385,6 +441,9 @@ import { setTimeout } from 'timers';
     width: 130%;
     margin-left: -15%;
 }
+.gs-news > img {
+    width: 100%
+}
 .gs-news > ul {
     padding: 0;
     font-family: PingFangSC-Regular;
@@ -457,4 +516,9 @@ import { setTimeout } from 'timers';
     top: -5px;
     left: -25px;
 }
+.my-pagination {
+    margin: 0;
+    text-align: center !important;
+    margin-top: 50px;
+}
 </style>

+ 12 - 10
frontend/saas-portal-web/static/css/gongsi.css

@@ -379,16 +379,9 @@
     color: #243A52;
     text-align: right;
     font-weight: 600;
-    margin-right: 40px;
-    width: 100px;
     display: inline-block;
-}
-.qy-biaoqian {
-    padding: 6px 20px;
-    color: #FFFFFF;
-    background: #1E88F5;
-    border-radius: 2px;
-    margin-right: 8px;
+    width: 15%;
+    margin-right: 6%;
 }
 .jr-conent {
     padding: 60px 30px 30px 30px;
@@ -422,12 +415,21 @@
     margin-bottom: 0 !important;
 } 
 .lookup > ul > li span{
-    width: 16%;
     display: inline-block;
     overflow: hidden;
     text-overflow:ellipsis;
     white-space: nowrap;
 } 
+.lookup > ul > li span:nth-child(1) {
+    width: 47%
+}
+.lookup > ul > li span:nth-child(2) {
+    width: 30%;
+    padding: 0px 20px;
+} 
+.lookup > ul > li span:nth-child(3) {
+    width: 20%;
+} 
 .saasguanli {
     width: 18% !important;
 }

BIN
frontend/saas-portal-web/static/img/nodata.png


+ 8 - 3
frontend/saas-web/app/view/core/chart/EChartsBase.js

@@ -174,11 +174,11 @@ Ext.define('saas.view.core.EChartsBase', {
 
         me.removeEmptyChart();
 
-        if(dataCount > 0) {
+        if(me.isEmpty(store)) {
+            me.appendEmptyChart();
+        }else {
             option = me.createOption(store);
             me.echarts.setOption(option);
-        }else {
-            me.appendEmptyChart();
         }
     },
 
@@ -204,6 +204,11 @@ Ext.define('saas.view.core.EChartsBase', {
         }
     },
 
+    isEmpty: function(store) {
+        var dataCount = store.getCount();
+        return dataCount <= 0;
+    },
+
     createOption: function(store) {
         return null;
     }

+ 1 - 0
frontend/saas-web/app/view/core/form/field/DetailGridField.scss

@@ -17,6 +17,7 @@
     text-align: center;
     font-size:14px;
     font-weight: 500;
+    margin-right: 0;
 }
 .x-grid-necessary .x-column-header-text:before{
     content: '*';

+ 1 - 1
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -321,7 +321,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 me.initSummaryType(c);
                 summarys.push({
                     field: c.dataIndex,
-                    operation: c._summaryType == 'last' ? 'sum' : c._summaryType,
+                    operation: c._summaryType == 'last' ? 'customize_last' : c._summaryType,
                 });
             }
         })

+ 6 - 17
frontend/saas-web/app/view/core/report/ReportPanel.scss

@@ -31,22 +31,6 @@ $border-color: #999;
                         border-right: 1px solid $border-color;
                         border-bottom: 1px solid $border-color;
                     }
-
-                    .x-grid-cell {
-                        &:last-child {
-                            .x-grid-cell-inner {
-                                border-right: none;
-                            }
-                        }
-                    }
-                }
-
-                .x-grid-item {
-                    &:first-child {
-                        .x-grid-group-hd {
-                            border-top: none;
-                        }
-                    }
                 }
             }
 
@@ -63,13 +47,18 @@ $border-color: #999;
         }
 
         .x-grid-group-hd {
-            border-top: 1px solid $border-color;
+            border-top: none;
             border-bottom: 1px solid $border-color;
+            border-right: 1px solid $border-color;
         }
 
         .x-grid-row-summary {
             .x-grid-cell {
                 border-top: none;
+                border-bottom: 1px solid $border-color;
+                &:last-child {
+                    border-right: 1px solid $border-color;
+                }
             }
         }
     }

+ 11 - 0
frontend/saas-web/app/view/home/charts/MonthSale.js

@@ -18,6 +18,7 @@ Ext.define('saas.view.home.charts.MonthSale', {
                 bind: {
                     store: '{month_sale}',
                 },
+                isEmpty: me.isEmpty,
                 createOption: me.createOption
             }]
         });
@@ -25,6 +26,16 @@ Ext.define('saas.view.home.charts.MonthSale', {
         me.callParent(arguments);
     },
 
+    isEmpty: function(store) {
+        var index = store.findBy(function(s) {
+            return s.get('y') > 0;
+        });
+        
+        var flag = index == -1;
+
+        return flag;
+    },
+
     createOption: function(store) {
         var fields = [],
         data = [];

+ 98 - 53
frontend/saas-web/app/view/sys/account/DataList.js

@@ -1,6 +1,3 @@
-/**
- * Created by zhouy on 2018/10/18.
- */
 Ext.define('saas.view.sys.account.DataList', {
     extend: 'Ext.grid.Panel',
     xtype: 'sys-account-datalist',
@@ -13,35 +10,53 @@ Ext.define('saas.view.sys.account.DataList', {
     _openUrl:'/api/account/account/enable',
     _closeUrl:'/api/account/account/disable',              
 
+    plugins: [{
+        ptype: 'menuclipboard'
+    }],
+
     tbar: [{
         width: 150,
         name: 'username',
         xtype: 'textfield',
-        emptyText : '账户名称'
+        emptyText : '账户名称',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 140,
         name: 'mobile',
         xtype: 'textfield',
         emptyText : '手机号码',
         // regex:/^1(3|4|5|7|8|9)\d{9}$/,
-        // regexText:'请输入正确的手机号码'
+        // regexText:'请输入正确的手机号码',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         xtype:'button',
         text:'查询',
         listeners: {
             click:function(b){
-                var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                var grid = b.up('grid');
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -144,6 +159,9 @@ Ext.define('saas.view.sys.account.DataList', {
                 });
             }
         }]
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     dbSearchFields: [],
@@ -279,6 +297,7 @@ Ext.define('saas.view.sys.account.DataList', {
                 width:50,
                 dataIndex:'actioncolumn',
                 text:'操作',
+                align: 'center',
                 items: [{
                     tooltip: '编辑',
                     iconCls: 'x-fa fa-pencil fa-fw',
@@ -319,10 +338,13 @@ Ext.define('saas.view.sys.account.DataList', {
     /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = Ext.Array.filter(tbar.items.items, function(item) {
+            return !!item.name;
+        }),
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
@@ -337,10 +359,9 @@ Ext.define('saas.view.sys.account.DataList', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -354,38 +375,58 @@ Ext.define('saas.view.sys.account.DataList', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
+
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
             type = 'enum';
-        }else {
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
+            type = 'enum';
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -395,32 +436,36 @@ Ext.define('saas.view.sys.account.DataList', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
-    },
-
-    refresh:function(){
-        //debugger
     }
-
 })
 
 

+ 3 - 0
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -103,6 +103,9 @@ Ext.define('saas.view.sys.finish.DataList', {
         text : "结果", 
         dataIndex : "ml_result", 
         width : 250.0, 
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     condition:'',

+ 91 - 51
frontend/saas-web/app/view/sys/invitation/DataList.js

@@ -1,6 +1,3 @@
-/**
- * Created by zhouy on 2018/10/18.
- */
 Ext.define('saas.view.sys.invitation.DataList', {
     extend: 'Ext.grid.Panel',
     xtype: 'sys-invitation-datalist',
@@ -14,13 +11,27 @@ Ext.define('saas.view.sys.invitation.DataList', {
     plugins: [{
         ptype: 'cellediting',
         clicksToEdit: 1
+    }, {
+        ptype: 'menuclipboard'
     }],
 
     tbar: [{
         width: 110,
-        name: 'username',
+        name: 're_applyname',
         xtype: 'textfield',
-        emptyText : '姓名'
+        emptyText : '姓名',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 140,
         name: 're_status',
@@ -45,6 +56,18 @@ Ext.define('saas.view.sys.invitation.DataList', {
             }else {
                 return 're_status=\'' + value + '\'';
             }
+        },
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
         }
     },{
         xtype:'button',
@@ -52,17 +75,7 @@ Ext.define('saas.view.sys.invitation.DataList', {
         listeners: {
             click:function(b){
                 var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -277,10 +290,13 @@ Ext.define('saas.view.sys.invitation.DataList', {
     /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = Ext.Array.filter(tbar.items.items, function(item) {
+            return !!item.name;
+        }),
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
@@ -295,10 +311,9 @@ Ext.define('saas.view.sys.invitation.DataList', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -312,38 +327,58 @@ Ext.define('saas.view.sys.invitation.DataList', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
+
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
             type = 'enum';
-        }else {
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
+            type = 'enum';
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -353,30 +388,35 @@ Ext.define('saas.view.sys.invitation.DataList', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
-    },
-
-    refresh:function(){
-        this.store.load()
     }
 
 })

+ 97 - 48
frontend/saas-web/app/view/sys/maxnumbers/DataList.js

@@ -13,16 +13,44 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     dataUrl:'/api/commons/number/list',                 
     deleteUrl:'/api/commons/number/delete/',
 
+    plugins: [{
+        ptype: 'menuclipboard'
+    }],
+
     tbar: [{
         width: 110,
         name: 'mn_name',
         xtype: 'textfield',
-        emptyText : '单据名称'
+        emptyText : '单据名称',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 110,
         name: 'mn_leadcode',
         xtype: 'textfield',
-        emptyText : '单据前缀'
+        emptyText : '单据前缀',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         cls:'x-formpanel-btn-blue',
         xtype:'button',
@@ -30,17 +58,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
         listeners: {
             click:function(b){
                 var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -101,6 +119,9 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
         text : '流水长度', 
         dataIndex : 'mn_number', 
         width : 110.0 
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     dbSearchFields: [],
@@ -241,6 +262,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                 width:50,
                 dataIndex:'actioncolumn',
                 text:'操作',
+                align: 'center',
                 items: [{
                     tooltip: '编辑',
                     iconCls: 'x-fa fa-pencil fa-fw',
@@ -281,10 +303,13 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = Ext.Array.filter(tbar.items.items, function(item) {
+            return !!item.name;
+        }),
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
@@ -299,10 +324,9 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -316,38 +340,58 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
+
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            type = 'enum';
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
             type = 'enum';
-        }else {
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -357,30 +401,35 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
-    },
-
-    refresh:function(){
-        //debugger
     }
 
 })

+ 110 - 50
frontend/saas-web/app/view/sys/messagelog/DataList.js

@@ -7,21 +7,61 @@ Ext.define('saas.view.sys.messagelog.DataList', {
     layout:'fit',
     dataUrl:'/api/commons/messagelog/list',
 
+    plugins: [{
+        ptype: 'menuclipboard'
+    }],
+
     tbar: [{
         width: 110,
         name: 'ml_name',
         xtype: 'textfield',
-        emptyText : '单据类型'
+        emptyText : '单据类型',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 150,
         name: 'ml_code',
         xtype: 'textfield',
-        emptyText : '单据编号'
+        emptyText : '单据编号',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         width: 110,
         name: 'ml_man',
         xtype: 'textfield',
-        emptyText : '操作人员'
+        emptyText : '操作人员',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('grid');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         cls:'x-formpanel-btn-blue',
         xtype:'button',
@@ -29,17 +69,7 @@ Ext.define('saas.view.sys.messagelog.DataList', {
         listeners: {
             click:function(b){
                 var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -81,6 +111,9 @@ Ext.define('saas.view.sys.messagelog.DataList', {
         text : "操作人员", 
         dataIndex : "ml_man", 
         width : 110, 
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 
     condition:'',
@@ -146,13 +179,16 @@ Ext.define('saas.view.sys.messagelog.DataList', {
         me.callParent(arguments);
     },
 
-     /**
+    /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = Ext.Array.filter(tbar.items.items, function(item) {
+            return !!item.name;
+        }),
         conditions = [];
-
         for(var i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
@@ -167,10 +203,9 @@ Ext.define('saas.view.sys.messagelog.DataList', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -184,38 +219,58 @@ Ext.define('saas.view.sys.messagelog.DataList', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
+
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
             type = 'enum';
-        }else {
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
+            type = 'enum';
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -225,30 +280,35 @@ Ext.define('saas.view.sys.messagelog.DataList', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
+            var from = value.from,
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
-    },
-
-    refresh:function(){
-        //debugger
     }
 
 });

+ 2 - 2
frontend/saas-web/ext/packages/ux/src/plugin/MenuClipboard.js

@@ -80,10 +80,10 @@ Ext.define('Ext.ux.plugin.MenuClipboard', {
     createMenu : function() {
 		var me = this;
 		return Ext.create('Ext.menu.Menu', {
-			bodyCls:'copyMenu',
+			cls: 'x-copy-menu',
 			items: [{
 				copyType : 'cell',
-				iconCls : 'x-button-icon-copy',
+				iconCls : 'x-fa fa-copy',
 				text : '复制单元格',
 				handler: function(item) {
 					if(me.execable) {