Browse Source

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

jinsy 7 years ago
parent
commit
efc76ceb37
42 changed files with 384 additions and 101 deletions
  1. 3 3
      README.md
  2. 1 1
      applications/commons/commons-server/src/main/resources/logback-spring.xml
  3. 1 1
      applications/commons/commons-server/src/main/resources/mapper/SystemRemindMapper.xml
  4. 1 1
      applications/document/document-server/src/main/resources/logback-spring.xml
  5. 1 1
      applications/money/money-server/src/main/resources/logback-spring.xml
  6. 1 1
      applications/purchase/purchase-server/src/main/resources/logback-spring.xml
  7. 1 1
      applications/sale/sale-server/src/main/resources/logback-spring.xml
  8. 1 1
      applications/storage/storage-server/src/main/resources/logback-spring.xml
  9. 1 1
      base-servers/account/account-server/src/main/resources/logback-spring.xml
  10. 1 1
      base-servers/admin-server/src/main/resources/logback-spring.xml
  11. 1 1
      base-servers/auth/auth-server/src/main/resources/logback-spring.xml
  12. 1 1
      base-servers/datacenter/datacenter-server/src/main/resources/logback-spring.xml
  13. 1 1
      base-servers/eureka-server/src/main/resources/logback-spring.xml
  14. 2 2
      base-servers/file/file-server/src/main/resources/application.yml
  15. 1 1
      base-servers/file/file-server/src/main/resources/logback-spring.xml
  16. 1 1
      base-servers/gateway-server/src/main/resources/logback-spring.xml
  17. 1 1
      base-servers/mail/mail-server/src/main/resources/logback-spring.xml
  18. 1 1
      base-servers/sms/sms-server/src/main/resources/logback-spring.xml
  19. 1 1
      base-servers/socket/socket-server/src/main/resources/logback-spring.xml
  20. 36 0
      base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/controller/CustomizeController.java
  21. 77 0
      base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/po/Config.java
  22. 38 0
      base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/repository/CustomizeRepository.java
  23. 51 0
      base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/service/CustomizeService.java
  24. 1 1
      base-servers/ui-server/src/main/resources/logback-spring.xml
  25. 1 1
      base-servers/zipkin-server/src/main/resources/application.yml
  26. 1 1
      base-servers/zipkin-server/src/main/resources/logback-spring.xml
  27. 69 42
      frontend/saas-web/app/view/core/base/BasePanelController.js
  28. 2 1
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.scss
  29. 1 0
      frontend/saas-web/app/view/core/form/DataMultiCombo.js
  30. 1 0
      frontend/saas-web/app/view/core/form/RemoteCombo.js
  31. 1 1
      frontend/saas-web/app/view/document/product/FormPanel.js
  32. 1 1
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  33. 2 0
      frontend/saas-web/app/view/home/charts/KeyData.scss
  34. 1 1
      frontend/saas-web/app/view/main/Main.scss
  35. 4 1
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  36. 1 1
      frontend/saas-web/app/view/money/report/ProfitDetail.js
  37. 8 0
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  38. 13 13
      frontend/saas-web/app/view/purchase/report/Purchase.js
  39. 13 13
      frontend/saas-web/app/view/sale/report/Sale.js
  40. 8 0
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  41. 1 1
      frontend/saas-web/app/view/stock/inventory/EditDataList.js
  42. 31 1
      frontend/saas-web/overrides/data/Connection.js

+ 3 - 3
README.md

@@ -118,9 +118,9 @@
 
 > 日志
 
-* [kibana](http://192.168.0.63:5601)
-* [logstash](tcp://192.168.0.63:5000)
-* [elasticsearch](http://192.168.0.63:9200/_search?pretty)
+* [kibana](http://10.1.81.1:5601)
+* [logstash](tcp://10.1.81.1:5000)
+* [elasticsearch](http://10.1.81.1:9200/_search?pretty)
 
 > 服务
 

+ 1 - 1
applications/commons/commons-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

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

@@ -27,7 +27,7 @@
         where re_id = #{id}
     </update>
     <select id="getApplyCountById" resultType="int">
-        SELECT COUNT(*) FROM REMIND WHERE COMPANYID = #{companyId} AND CREATORID = #{accountId}
+        SELECT COUNT(*) FROM REMIND WHERE COMPANYID = #{companyId} AND CREATORID = #{accountId} AND RE_STATUS = 2
     </select>
     <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.AddApply">
         <selectKey resultType="java.lang.Long" keyProperty="id">

+ 1 - 1
applications/document/document-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
applications/money/money-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
applications/purchase/purchase-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
applications/sale/sale-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
applications/storage/storage-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/account/account-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/admin-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/auth/auth-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/datacenter/datacenter-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/eureka-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 2 - 2
base-servers/file/file-server/src/main/resources/application.yml

@@ -86,6 +86,6 @@ fdfs:
     width: 150
     height: 150
   tracker-list:
-    - 192.168.0.63:22122
+    - 10.1.81.1:22122
 file:
-  base-url: http://192.168.0.63:8888/
+  base-url: http://10.1.81.1:8888/

+ 1 - 1
base-servers/file/file-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/gateway-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/mail/mail-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/sms/sms-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 1 - 1
base-servers/socket/socket-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 36 - 0
base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/controller/CustomizeController.java

@@ -0,0 +1,36 @@
+package com.usoftchina.saas.ui.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.ui.po.Config;
+import com.usoftchina.saas.ui.service.CustomizeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**自定义字段的处理
+ * @author: guq
+ * @create: 2018-12-26 14:46
+ **/
+@RestController
+@RequestMapping("/customize")
+public class CustomizeController {
+
+    @Autowired
+    private CustomizeService customizeService;
+
+    @GetMapping("/getConfig")
+    public Result getConfig(String name) {
+        return Result.success(customizeService.getConfig(name));
+    }
+
+    @PostMapping("/saveConfig")
+    public Result saveConfig(@RequestBody Config config) {
+        customizeService.save(config);
+        return Result.success();
+    }
+
+    @PostMapping("/deleteConfig")
+    public Result deleteConfig(@RequestParam("name") String name) {
+        customizeService.delete(name);
+        return Result.success();
+    }
+}

+ 77 - 0
base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/po/Config.java

@@ -0,0 +1,77 @@
+package com.usoftchina.saas.ui.po;
+
+import org.springframework.data.annotation.Id;
+import org.springframework.data.mongodb.core.index.Indexed;
+import org.springframework.data.mongodb.core.mapping.Document;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2018-12-26 15:13
+ **/
+@Document(collection = "customize_config")
+public class Config implements Serializable{
+    @Id
+    private String _id;
+    @Indexed(name = "customize_config_index")
+    private String name;
+    private String content;
+    private String position;
+    private Date createTime;
+    @Indexed(name = "customize_config_conpany_index")
+    private Long companyId;
+
+    public String get_id() {
+        return _id;
+    }
+
+
+    public void set_id(String _id) {
+
+        this._id = _id;
+    }
+
+    public Long getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Long companyId) {
+        this.companyId = companyId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+
+}

+ 38 - 0
base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/repository/CustomizeRepository.java

@@ -0,0 +1,38 @@
+package com.usoftchina.saas.ui.repository;
+
+import com.usoftchina.saas.ui.po.Config;
+import org.springframework.data.mongodb.repository.MongoRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CustomizeRepository extends MongoRepository<Config, String> {
+
+    /**
+    * @Description 添加配置
+    * @Param: [name, companyId]
+    * @return: java.util.List<com.usoftchina.saas.ui.po.Config>
+    * @Author: guq
+    * @Date: 2018/12/26
+    */
+    List<Config> findByNameAndCompanyId(String name, Long companyId);
+
+    /**
+    * @Description 删除配置
+    * @Param: [name, companyId]
+    * @return: void
+    * @Author: guq
+    * @Date: 2018/12/26
+    */
+    void deleteConfigByNameAndCompanyId(String name, Long companyId);
+
+    /**
+    * @Description 删除重复配置
+    * @Param: [name, position, companyId]
+    * @return: void
+    * @Author: guq
+    * @Date: 2018/12/27
+    */
+    void deleteConfigByNameAndPositionAndCompanyId(String name, String position, Long companyId);
+}

+ 51 - 0
base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/service/CustomizeService.java

@@ -0,0 +1,51 @@
+package com.usoftchina.saas.ui.service;
+
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.ui.po.Config;
+import com.usoftchina.saas.ui.repository.CustomizeRepository;
+import com.usoftchina.saas.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2018-12-26 16:07
+ **/
+@Service
+public class CustomizeService {
+
+    @Autowired
+    private CustomizeRepository customizeRepository;
+
+    @Cacheable(value = "customizeConfig", key = "#name")
+    public List<Config> getConfig(String name) {
+        if (StringUtils.isEmpty(name)) {
+            return null;
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        return customizeRepository.findByNameAndCompanyId(name, companyId);
+    }
+
+    @CacheEvict(value = "customizeConfig", key = "#config.name")
+    public void save(Config config) {
+        if (!StringUtils.isEmpty(config)) {
+            customizeRepository.deleteConfigByNameAndPositionAndCompanyId(config.getName(), config.getPosition(),
+                    BaseContextHolder.getCompanyId());
+            config.setCompanyId(BaseContextHolder.getCompanyId());
+            config.setCreateTime(new Date());
+            customizeRepository.save(config);
+        }
+    }
+
+    @CacheEvict(value = "customizeConfig", key = "#name")
+    public void delete(String name) {
+        if (!StringUtils.isEmpty(name)) {
+            customizeRepository.deleteConfigByNameAndCompanyId(name, BaseContextHolder.getCompanyId());
+        }
+    }
+}

+ 1 - 1
base-servers/ui-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

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

@@ -41,7 +41,7 @@ zipkin:
   storage:
     type: elasticsearch
     elasticsearch:
-      hosts: 192.168.0.63:9200
+      hosts: 10.1.81.1:9200
       index: zipkin
       index-shards: 5
       index-replicas: 1

+ 1 - 1
base-servers/zipkin-server/src/main/resources/logback-spring.xml

@@ -28,7 +28,7 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
-    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.0.63:5000"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="10.1.81.1:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 

+ 69 - 42
frontend/saas-web/app/view/core/base/BasePanelController.js

@@ -8,14 +8,8 @@ Ext.define('saas.view.core.base.BasePanelController', {
     query: function() {
         var form = this.view;
         var grid = form.down('core-base-gridpanel');
-        grid.condition = '';
-        var fields = form.searchField.map(f => f.name);
-        var items = [];
-        Ext.each(fields, function(f, index){
-            var field = form.dockedItems.items[0].down('[name='+f+']');
-            items.push(field);
-        });
-        grid.condition = this.getCondition(items);
+        
+        grid.condition = this.getConditions();
         grid.store.loadPage(1);
     },
 
@@ -25,11 +19,16 @@ Ext.define('saas.view.core.base.BasePanelController', {
         saas.util.BaseUtil.openTab(form.xtype,'新增' + form._title,id);
     },
 
-    getCondition: function(items) {
-        var me = this,
-        conditions = [];
+    /**
+     * 获得过滤条件
+     */
+    getConditions: function() {
+        var me = this;
+        var form = this.view;
+        var items = form.dockedItems.items[0].items.items;
+        var conditions = [];
 
-        for(var i = 0; i < items.length; i++) {
+        for(let i = 0; i < items.length; i++) {
             var item = items[i];
             var field = item.name,
             func = item.getCondition,
@@ -43,10 +42,9 @@ Ext.define('saas.view.core.base.BasePanelController', {
                         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;
@@ -60,38 +58,58 @@ Ext.define('saas.view.core.base.BasePanelController', {
                 }
                 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';
         }
 
@@ -101,25 +119,34 @@ Ext.define('saas.view.core.base.BasePanelController', {
     /**
      * 处理部分字段值
      */
-    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;
-    }
+    },
 });

+ 2 - 1
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.scss

@@ -34,7 +34,7 @@
     .x-window-body{
         padding-top: 0px !important;
     }
-    .x-toolbar-default {
+    .x-toolbar-docked-top {
         padding: 6px 0 12px 0px;
     }
     .x-grid-header-ct {
@@ -46,6 +46,7 @@
         border-right-width: 1px !important;
         border-left-width: 1px !important;
         border-top-width: 0px !important;
+        border-bottom-width: 1px !important;
     }
     .x-grid-paging-toolbar{
         border: 1px solid #abdaff !important;

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

@@ -13,6 +13,7 @@ Ext.define('saas.view.core.form.DataMultiCombo', {
     publishes: 'value',
     matchFieldWidth: true,
     autoScroll:true,
+    triggerCls:'x-form-trigger',
     value: [],
     cachedConfig: {
         menuAlign: 'tl-bl?',

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

@@ -7,6 +7,7 @@ Ext.define('saas.view.core.form.RemoteCombo', {
     displayField: 'display',
     valueField: 'value',
     queryMode: 'local',//只在组件加载的时候请求一次
+    triggerCls:'x-form-trigger',
     listConfig: {
         maxHeight: (Ext.isIE?screen.height:window.innerHeight)*0.5-50,
     },

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

@@ -276,7 +276,7 @@ Ext.define('saas.view.document.product.FormPanel', {
                 xtype : "detailGridField", 
                 storeModel:'saas.model.document.ProductDetail',
                 detnoColumn: 'pd_detno',
-                emptyRows: 1,
+                emptyRows: 3,
                 showCount: true,
                 allowEmpty:true,
                 // hidden: true,

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

@@ -252,7 +252,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
             },{
                 xtype : "textfield", 
                 name : "ve_address", 
-                fieldLabel : "地址", 
+                fieldLabel : "公司地址", 
                 allowBlank : true, 
                 columnWidth : 0.75
             },{

+ 2 - 0
frontend/saas-web/app/view/home/charts/KeyData.scss

@@ -14,6 +14,7 @@
             cursor: pointer;
             transition: all 0.3s ease;
             outline: none !important;
+            background: transparent;
 
             // &:hover {
             //     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
@@ -71,6 +72,7 @@
                     border-radius: 4px 4px 0 0;
                 }
                 .x-contain {
+                    background: #fff;
                     border-style: solid;
                     border-width: 0 1px 1px 1px;
                     border-radius: 0 0 4px 4px;

+ 1 - 1
frontend/saas-web/app/view/main/Main.scss

@@ -210,7 +210,7 @@ $treelist-nav-ui: (
 }
 body > .x-mask {
     background-image: none;
-    background-color: rgba(142, 141, 141, 0.75);
+    background-color: rgba(0, 0, 0, 0.3);
 }
 .icon-usoftchina{
     margin-top: 0px;

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

@@ -56,16 +56,19 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 xtype: "numberfield",
                 name: "cu_leftamount",
                 fieldLabel: "总欠款",
+                thousandSeparator: ',',
                 ignore: true,
                 readOnly: true
             }, {
                 xtype: 'hidden',
                 name: 'rb_rbdamount',
-                fieldLabel: '本次核销金额(元)'
+                fieldLabel: '本次核销金额(元)',
+                thousandSeparator: ','
             }, {
                 xtype: 'hidden',
                 name: 'rb_rdamount',
                 fieldLabel: '本次付款金额(元)',
+                thousandSeparator: ','
             }, {
                 xtype: "datefield",
                 name: "rb_date",

+ 1 - 1
frontend/saas-web/app/view/money/report/ProfitDetail.js

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.report.ProfitDetail', {
         xtype : "remotecombo", 
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
-        emptyText : "客户类型", 
+        emptyText : "请选择客户类型", 
         columnWidth: 0.15,
         hiddenBtn:true
     }, {

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

@@ -219,6 +219,14 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             renderer : function(v) {
                 return saas.util.BaseUtil.numberFormat(v, 4, true);
             }
+        }, {
+            text: '含税单价(元)',
+            dataIndex: 'pd_price',
+            xtype: 'numbercolumn',
+            width: 110,
+            renderer : function(v) {
+                return saas.util.BaseUtil.numberFormat(v, 4, true);
+            }
         },{
             text: '金额(元)',
             dataIndex: 'pd_taxtotal',

+ 13 - 13
frontend/saas-web/app/view/purchase/report/Purchase.js

@@ -93,19 +93,6 @@ Ext.define('saas.view.purchase.report.Purchase', {
         text: '规格',
         dataIndex: 'pr_spec',
         width: 200
-    }, {
-        text: '采购数量',
-        dataIndex: 'pd_qty',
-        xtype: 'numbercolumn',
-        exportFormat: 'Quantity',
-        width: 110,
-        summaryType: 'sum',
-        renderer: function (v) {
-            return saas.util.BaseUtil.numberFormat(v, 3, false);
-        },
-        summaryRenderer: function (v) {
-            return saas.util.BaseUtil.numberFormat(v, 3, false);
-        }
     }, {
         text: '收货数量',
         dataIndex: 'pd_pdacceptqty',
@@ -120,6 +107,19 @@ Ext.define('saas.view.purchase.report.Purchase', {
         summaryRenderer: function (v) {
             return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
+    }, {
+        text: '采购数量',
+        dataIndex: 'pd_qty',
+        xtype: 'numbercolumn',
+        exportFormat: 'Quantity',
+        width: 110,
+        summaryType: 'sum',
+        renderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 3, false);
+        },
+        summaryRenderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 3, false);
+        }
     }, {
         text: '单位',
         dataIndex: 'pr_unit',

+ 13 - 13
frontend/saas-web/app/view/sale/report/Sale.js

@@ -18,11 +18,6 @@ Ext.define('saas.view.sale.report.Sale', {
         name: 'sa_custname',
         emptyText:'请输入客户名称',
         columnWidth: 0.2
-    }, {
-        xtype: 'condatefield',
-        name: 'sa_date',
-        fieldLabel: '日期',
-        columnWidth: 0.4
     }, {
         xtype: 'multicombo',
         name: 'sa_sendstatuscode',
@@ -35,6 +30,11 @@ Ext.define('saas.view.sale.report.Sale', {
             ["PARTOUT", "部分出库"],
             ["CLOSE", "已关闭"]
         ]
+    }, {
+        xtype: 'condatefield',
+        name: 'sa_date',
+        fieldLabel: '日期',
+        columnWidth: 0.4
     }],
     reportModel: 'saas.model.report.Sale',
     reportColumns: [
@@ -94,9 +94,9 @@ Ext.define('saas.view.sale.report.Sale', {
         text: '规格',
         dataIndex: 'pr_spec',
         width: 200
-    }, {
-        text: '销售数量',
-        dataIndex: 'sd_qty',
+    },{
+        text: '出货数量',
+        dataIndex: 'sd_pdsendqty',
         exportFormat: 'Quantity',
         xtype: 'numbercolumn',
         width: 110,
@@ -104,13 +104,13 @@ Ext.define('saas.view.sale.report.Sale', {
             return saas.util.BaseUtil.numberFormat(v, 3, false);
         },
         summaryType: 'sum',
-        summaryLabel: '销售数量',
+        summaryLabel: '出货数量',
         summaryRenderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 3, false);
         }
-    },{
-        text: '出货数量',
-        dataIndex: 'sd_pdsendqty',
+    }, {
+        text: '销售数量',
+        dataIndex: 'sd_qty',
         exportFormat: 'Quantity',
         xtype: 'numbercolumn',
         width: 110,
@@ -118,7 +118,7 @@ Ext.define('saas.view.sale.report.Sale', {
             return saas.util.BaseUtil.numberFormat(v, 3, false);
         },
         summaryType: 'sum',
-        summaryLabel: '出货数量',
+        summaryLabel: '销售数量',
         summaryRenderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 3, false);
         }

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

@@ -227,6 +227,14 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
             renderer : function(v) {
                 return saas.util.BaseUtil.numberFormat(v, 4, true);
             },
+        }, {
+            text: '含税单价(元)',
+            dataIndex: 'sd_price',
+            xtype: 'numbercolumn',
+            width: 110,
+            renderer : function(v) {
+                return saas.util.BaseUtil.numberFormat(v, 4, true);
+            }
         }, {
             text: '金额(元)',
             dataIndex: 'sd_nettotal',

+ 1 - 1
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -57,7 +57,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         storeUrl:'/api/document/producttype/getCombo',
         name : "pr_kind",
         bind: '{form.pr_kind}',
-        emptyText : "物料类型",
+        emptyText : "请选择物料类型",
         hiddenBtn:true,
         //width:150
     },{

+ 31 - 1
frontend/saas-web/overrides/data/Connection.js

@@ -44,6 +44,36 @@ Ext.define('saas.override.data.Connection', {
             this.setupServerOptions(options);
         }
         return this.callParent([options]);
-    }
+    },
+    onRequestComplete: function(request) {
+        let headers = request.result.getAllResponseHeaders(),
+        Authorization = headers['authorization'];
+
+        if(Authorization) {
+            // 如果返回了token则刷新token
+            let headers = Ext.Ajax.getDefaultHeaders() || {};
+            let session = saas.util.State.get('session');
+            
+            headers['Authorization'] = Authorization;
+            Ext.Ajax.setDefaultHeaders(headers);
+
+            session.token = Authorization;
+
+            saas.util.State.set('session', session);
+
+            let sessionStr = session ? JSON.stringify(session) : '';
+
+            if (typeof require === 'function') {
+                let ipc = require('electron').ipcRenderer;
+                ipc.send('session.change', sessionStr);
+            }else {
+                //解析session 把data作为sessionStr
+                sessionStr = session ? JSON.stringify(session.data) : '';
+                const frame = window.frames[window.frames.length - 1];
+                frame.postMessage(sessionStr, '*');
+            }
+        }
+    },
+
  });