Browse Source

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

hy 7 years ago
parent
commit
0a0ae2185e
80 changed files with 1091 additions and 472 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 4 0
      applications/document/document-server/pom.xml
  3. 2 0
      applications/document/document-server/src/main/resources/application.yml
  4. 6 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Payablesdetail.java
  5. 6 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Receivablesdetail.java
  6. 3 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  7. 0 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  8. 1 0
      applications/money/money-server/src/main/resources/mapper/PayablesdetailMapper.xml
  9. 2 1
      applications/money/money-server/src/main/resources/mapper/ReceivablesdetailMapper.xml
  10. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/report/PurchasePay.java
  11. 5 4
      applications/purchase/purchase-server/src/main/resources/application.yml
  12. 1 0
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseReportMapper.xml
  13. 5 0
      applications/sale/sale-server/pom.xml
  14. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/report/SalerecView.java
  15. 5 2
      applications/sale/sale-server/src/main/resources/application.yml
  16. 1 0
      applications/sale/sale-server/src/main/resources/mapper/SalerecViewMapper.xml
  17. 1 1
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/InquiryApi.java
  18. 1 1
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/ProductApi.java
  19. 1 1
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/SearchApi.java
  20. 1 1
      applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/SearchUUApi.java
  21. 5 8
      applications/transfers/mall-api/src/test/resources/application.yml
  22. 1 0
      applications/transfers/pom.xml
  23. 20 1
      applications/transfers/transfers-api/pom.xml
  24. 15 0
      applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendApi.java
  25. 19 0
      applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendApiFallBack.java
  26. 15 0
      applications/transfers/transfers-dto/pom.xml
  27. 113 0
      applications/transfers/transfers-dto/src/main/java/com/usoftchina/saas/transfers/dto/MessageInfo.java
  28. 4 0
      applications/transfers/transfers-server/pom.xml
  29. 1 1
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/controller/TransfersController.java
  30. 0 111
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/po/MessageInfo.java
  31. 1 4
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/ReceiveService.java
  32. 1 1
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/SendService.java
  33. 1 1
      applications/transfers/transfers-server/src/test/java/com/usoftchina/saas/transfers/service/RabbitSendServiceTest.java
  34. 5 0
      framework/core/pom.xml
  35. 3 1
      framework/core/src/main/java/com/usoftchina/saas/context/BaseContextHolder.java
  36. 4 4
      frontend/saas-portal-web/src/components/conenter/details.vue
  37. 1 5
      frontend/saas-portal-web/src/components/conenter/enterprise.vue
  38. 47 71
      frontend/saas-portal-web/src/components/conenter/home.vue
  39. 1 1
      frontend/saas-portal-web/src/components/conenter/invitation.vue
  40. 1 0
      frontend/saas-portal-web/static/css/main.css
  41. BIN
      frontend/saas-portal-web/static/img/Waves.png
  42. BIN
      frontend/saas-portal-web/static/img/weiruan.png
  43. BIN
      frontend/saas-portal-web/static/img/weiruan@2x.png
  44. 1 0
      frontend/saas-web/app/model/report/PurchasePay.js
  45. 3 1
      frontend/saas-web/app/model/report/SaleRec.js
  46. 5 10
      frontend/saas-web/app/util/FormUtil.js
  47. 100 0
      frontend/saas-web/app/view/core/dbfind/ConDbfindTrigger.js
  48. 15 0
      frontend/saas-web/app/view/core/dbfind/ConDbfindTrigger.scss
  49. 12 1
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  50. 13 0
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  51. 44 19
      frontend/saas-web/app/view/core/form/FormPanel.js
  52. 9 9
      frontend/saas-web/app/view/document/customer/FormController.js
  53. 35 13
      frontend/saas-web/app/view/document/customer/FormPanel.js
  54. 9 9
      frontend/saas-web/app/view/document/vendor/FormController.js
  55. 36 14
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  56. 9 5
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  57. 32 11
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  58. 11 11
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  59. 33 11
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  60. 11 11
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  61. 22 0
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  62. 21 0
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  63. 4 0
      frontend/saas-web/app/view/money/report/PayDetail.js
  64. 4 0
      frontend/saas-web/app/view/money/report/RecDetail.js
  65. 87 3
      frontend/saas-web/app/view/money/verification/FormPanel.js
  66. 33 11
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  67. 11 11
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  68. 33 11
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  69. 11 11
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  70. 33 11
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  71. 11 11
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  72. 4 0
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  73. 4 0
      frontend/saas-web/app/view/sale/report/SaleRec.js
  74. 33 11
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  75. 11 11
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  76. 33 11
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  77. 11 11
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  78. 23 1
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  79. 11 11
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  80. 5 0
      pom.xml

+ 1 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -115,6 +115,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     DOCUMENTS_AUDITED(74009,"存在已审核单据:%S"),
     DOCUMENTS_UNAUDITED(74010,"存在未审核单据:%S"),
     BANK_AMOUNT_NOTENOUGHS(74011, "资金账户:%S 余额不足"),
+    CURRENCY_NOT_EQUALS(74012, "币别不一致"),
 
     //反结账
     EARLY_USERING(74012, "期初余额被使用,无法反结账"),

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

@@ -59,6 +59,10 @@
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-openfeign</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>document-dto</artifactId>

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

@@ -80,6 +80,8 @@ ribbon:
 feign:
   hystrix:
     enabled: true
+  okhttp:
+    enabled: true
 hystrix:
     command:
         default:

+ 6 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Payablesdetail.java

@@ -37,6 +37,12 @@ public class Payablesdetail {
 
     private Integer pd_ym;
 
+    private String pd_currency;
+
+    public String getPd_currency() { return  pd_currency; }
+
+    public void setPd_currency(String pd_currency) { this.pd_currency = pd_currency; }
+
     public Integer getPd_ym() {
         return pd_ym;
     }

+ 6 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Receivablesdetail.java

@@ -37,6 +37,12 @@ public class Receivablesdetail {
 
     private Integer rd_ym;
 
+    private String rd_currency;
+
+    public String getRd_currency() { return  rd_currency; }
+
+    public void setRd_currency(String rd_currency) {this.rd_currency = rd_currency; }
+
     public Integer getRd_ym() {
         return rd_ym;
     }

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

@@ -93,6 +93,9 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             fundtransferdetail.setCompanyId(BaseContextHolder.getCompanyId());
             fundtransferdetail.setFtd_ftid(Math.toIntExact(id));
             fundtransferdetail.setFt_date(fundtransfer.getFt_date());
+            if (!(fundtransferdetail.getFtd_currency().equals(fundtransferdetail.getFtd_incurrency()))){
+                throw new BizException(500, BizExceptionCode.CURRENCY_NOT_EQUALS.getMessage());
+            }
             if (fundtransferdetail.getId() > 0 ){
                 fundtransferdetailMapper.updateByPrimaryKeySelective(fundtransferdetail);
             }else {

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

@@ -104,8 +104,6 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             othreceiptsdetail1.setOr_date(othreceipts.getOr_date());
             othreceiptsdetail1.setOrd_currency(othreceipts.getOr_currency());
             othreceiptsdetail1.setOrd_rate(othreceipts.getOr_rate());
-            othreceiptsdetail1.setOrd_currency(othreceipts.getOr_currency());
-            othreceiptsdetail1.setOrd_rate(othreceipts.getOr_rate());
             if (othreceiptsdetail1.getId() > 0 ){
                 othreceiptsdetailMapper.updateByPrimaryKeySelective(othreceiptsdetail1);
             }else {

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

@@ -19,6 +19,7 @@
     <result column="pd_status" property="pd_status" jdbcType="INTEGER" />
     <result column="pd_query" property="pd_query" jdbcType="INTEGER" />
     <result column="pd_ym" property="pd_ym" jdbcType="INTEGER" />
+    <result column="pd_currency" property="pd_currency" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     pd_id, pd_detno, pd_vendid, pd_vendcode, pd_vendname, pd_date, pd_code, pd_kind, 

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

@@ -19,11 +19,12 @@
     <result column="rd_status" property="rd_status" jdbcType="INTEGER" />
     <result column="rd_query" property="rd_query" jdbcType="INTEGER" />
     <result column="rd_ym" property="rd_ym" jdbcType="INTEGER" />
+    <result column="rd_currency" property="rd_currency" jdbcType="VARCHAR"/>
   </resultMap>
   <sql id="Base_Column_List" >
     rd_id, rd_detno, rd_custid, rd_custcode, rd_custname, rd_date, rd_code, rd_kind, 
     rd_sellerid, rd_sellername, rd_addrec, rd_addpre, rd_remain, companyid, rd_status, 
-    rd_query,rd_ym
+    rd_query,rd_ym,rd_currency
   </sql>
 
   <select id="selectByCondition" resultMap="BaseResultMap">

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/report/PurchasePay.java

@@ -41,4 +41,6 @@ public class PurchasePay  extends CommonBaseEntity implements Serializable {
     private Double pi_nettotal;
 
     private String pb_manname;
+
+    private String pi_currency;
 }

+ 5 - 4
applications/purchase/purchase-server/src/main/resources/application.yml

@@ -90,7 +90,8 @@ hystrix:
                     thread:
                         timeoutInMilliseconds: 4000
 b2b:
-  inquiry:
-    base-url: https://test-inquiry.uuzcc.cn
-  Component:
-    base-url: https://test-mall.uuzcc.cn
+  baseUrl:
+    inquiry: https://test-inquiry.uuzcc.cn
+    Component: https://test-mall.uuzcc.cn
+    product: http://test-product.uuzcc.cn
+    uu: https://test-b2b.uuzcc.cn

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

@@ -21,6 +21,7 @@
     <result column="pi_nettotal" property="pi_nettotal" jdbcType="DOUBLE" />
     <result column="pi_total" property="pi_total" jdbcType="DOUBLE" />
     <result column="pb_manname" property="pb_manname" jdbcType="VARCHAR"/>
+    <result column="pi_currency" property="pi_currency" jdbcType="VARCHAR"/>
   </resultMap>
   <resultMap id="ListMap" type="com.usoftchina.saas.purchase.po.report.PurchaseReportDetail">
     <id column="pu_id" property="pu_id" jdbcType="INTEGER" />

+ 5 - 0
applications/sale/sale-server/pom.xml

@@ -101,6 +101,11 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>purchase-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>transfers-api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/report/SalerecView.java

@@ -41,4 +41,6 @@ public class SalerecView {
     private Double pi_total;
 
     private Double pi_nettotal;
+
+    private String pi_currency;
 }

+ 5 - 2
applications/sale/sale-server/src/main/resources/application.yml

@@ -90,5 +90,8 @@ hystrix:
                     thread:
                         timeoutInMilliseconds: 4000
 b2b:
-  inquiry:
-    base-url: https://test-inquiry.uuzcc.cn
+  baseUrl:
+    inquiry: https://test-inquiry.uuzcc.cn
+    Component: https://test-mall.uuzcc.cn
+    product: http://test-product.uuzcc.cn
+    uu: https://test-b2b.uuzcc.cn

+ 1 - 0
applications/sale/sale-server/src/main/resources/mapper/SalerecViewMapper.xml

@@ -18,6 +18,7 @@
     <result column="rbd_amount" property="rbd_amount" jdbcType="DOUBLE" />
     <result column="pi_nettotal" property="pi_nettotal" jdbcType="DOUBLE" />
     <result column="pi_total" property="pi_total" jdbcType="DOUBLE" />
+    <result column="pi_currency" property="pi_currency" jdbcType="VARCHAR" />
   </resultMap>
   <select id="selectByCondition" resultMap="BaseResultMap">
     select  *  from Salerec_View

+ 1 - 1
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/InquiryApi.java

@@ -5,7 +5,7 @@ import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 
-@FeignClient(url = "${b2b.inquiry.base-url}", name = "inquiry-server")
+@FeignClient(url = "${b2b.baseUrl.inquiry}", name = "inquiry-server")
 @RequestMapping("/inquiry")
 public interface InquiryApi {
 

+ 1 - 1
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/ProductApi.java

@@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
-@FeignClient(url = "${b2b.product.base-url}", name = "product-server")
+@FeignClient(url = "${b2b.baseUrl.product}", name = "product-server")
 @RequestMapping("/product")
 public interface ProductApi {
 

+ 1 - 1
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/SearchApi.java

@@ -4,7 +4,7 @@ import com.usoftchina.inquiry.po.search.SearchComponentResp;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
 
-@FeignClient(url = "${b2b.Component.base-url}", name = "search-server")
+@FeignClient(url = "${b2b.baseUrl.Component}", name = "search-server")
 @RequestMapping("/search")
 public interface SearchApi {
 

+ 1 - 1
applications/transfers/mall-api/src/main/java/com/usoftchina/inquiry/api/SearchUUApi.java

@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.Map;
 
-@FeignClient(url = "${b2b.uu.base-url}", name = "b2b-server")
+@FeignClient(url = "${b2b.baseUrl.uu}", name = "b2b-server")
 @RequestMapping("/public")
 public interface SearchUUApi {
     /**

+ 5 - 8
applications/transfers/mall-api/src/test/resources/application.yml

@@ -1,9 +1,6 @@
 b2b:
-  inquiry:
-    base-url: https://test-inquiry.uuzcc.cn
-  Component:
-    base-url: https://test-mall.uuzcc.cn
-  product:
-    base-url: http://test-product.uuzcc.cn
-  uu:
-    base-url: https://test-b2b.uuzcc.cn
+  baseUrl:
+    inquiry: https://test-inquiry.uuzcc.cn
+    Component: https://test-mall.uuzcc.cn
+    product: http://test-product.uuzcc.cn
+    uu: https://test-b2b.uuzcc.cn

+ 1 - 0
applications/transfers/pom.xml

@@ -16,6 +16,7 @@
         <module>transfers-api</module>
         <module>transfers-server</module>
         <module>mall-api</module>
+        <module>transfers-dto</module>
     </modules>
 
 </project>

+ 20 - 1
applications/transfers/transfers-api/pom.xml

@@ -9,9 +9,28 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <groupId>com.usoftchina.saas</groupId>
     <artifactId>transfers-api</artifactId>
     <version>1.0.0-SNAPSHOT</version>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>transfers-dto</artifactId>
+        </dependency>
+        <!-- test -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
 </project>

+ 15 - 0
applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendApi.java

@@ -0,0 +1,15 @@
+package com.usoftchina.saas.transfers.api;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient(name = "transfers-server" , fallback = SendApiFallBack.class)
+public interface SendApi {
+
+    @PostMapping("/send/Message")
+    public Result sendMsg(@RequestBody MessageInfo info);
+
+}

+ 19 - 0
applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendApiFallBack.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.transfers.api;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+/**
+ * @author: guq
+ * @create: 2019-01-09 13:50
+ **/
+@Component
+public class SendApiFallBack implements SendApi{
+
+    @Override
+    public Result sendMsg(@RequestBody MessageInfo info) {
+        return Result.error("网络异常,请稍后重试!");
+    }
+}

+ 15 - 0
applications/transfers/transfers-dto/pom.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>transfers</artifactId>
+        <groupId>com.usoftchina.saas</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>transfers-dto</artifactId>
+
+
+</project>

+ 113 - 0
applications/transfers/transfers-dto/src/main/java/com/usoftchina/saas/transfers/dto/MessageInfo.java

@@ -0,0 +1,113 @@
+package com.usoftchina.saas.transfers.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.UUID;
+
+/**
+ * @author: guq
+ * @create: 2019-01-09 11:33
+ **/
+public class MessageInfo implements Serializable{
+        /**
+         * 消息ID
+         */
+        private String msgId;
+        /**
+         * 用户ID
+         */
+        private String userId;
+        /**
+         * 应用ID
+         */
+        private String appId;
+        /**
+         * 业务类型
+         */
+        private String bizType;
+
+        /**
+         * 业务单据ID
+         */
+
+        private String bizId;
+        /**
+         * 公司id
+         * @return
+         */
+        private Long companyId;
+
+        /**
+         * 时间戳
+         */
+        private long timestamp;
+
+        public long getTimestamp() {
+            return timestamp;
+        }
+
+        public void setTimestamp(long timestamp) {
+            this.timestamp = timestamp;
+        }
+
+        public String getMsgId() {
+            return msgId;
+        }
+
+        public void setMsgId(String msgId) {
+            this.msgId = msgId;
+        }
+
+        public String getUserId() {
+            return userId;
+        }
+
+        public void setUserId(String userId) {
+            this.userId = userId;
+        }
+
+        public String getAppId() {
+            return appId;
+        }
+
+        public void setAppId(String appId) {
+            this.appId = appId;
+        }
+
+        public String getBizType() {
+            return bizType;
+        }
+
+        public void setBizType(String bizType) {
+            this.bizType = bizType;
+        }
+
+        public String getBizId() {
+            return bizId;
+        }
+
+        public void setBizId(String bizId) {
+            this.bizId = bizId;
+        }
+
+        public MessageInfo(String userId, String bizType, String bizId, Long companyId) {
+            this.msgId = UUID.randomUUID().toString();
+            this.userId = userId;
+            this.appId = "trade";
+            this.bizType = bizType;
+            this.bizId = bizId;
+            this.companyId = companyId;
+            this.timestamp = new Date().getTime();
+        }
+
+        public MessageInfo() {
+
+        }
+        public Long getCompanyId() {
+            return companyId;
+        }
+
+        public void setCompanyId(Long companyId) {
+            this.companyId = companyId;
+        }
+}

+ 4 - 0
applications/transfers/transfers-server/pom.xml

@@ -52,6 +52,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>commons-dto</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>transfers-dto</artifactId>
+        </dependency>
         <!-- db -->
         <dependency>
             <groupId>mysql</groupId>

+ 1 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/controller/TransfersController.java

@@ -1,9 +1,9 @@
 package com.usoftchina.saas.transfers.controller;
 
 import com.usoftchina.saas.base.Result;
-import com.usoftchina.saas.transfers.po.MessageInfo;
 import com.usoftchina.saas.transfers.service.SendService;
 import com.usoftchina.saas.utils.StringUtils;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;

+ 0 - 111
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/po/MessageInfo.java

@@ -1,111 +0,0 @@
-package com.usoftchina.saas.transfers.po;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @Description 消息内容
- * @Author chenwei
- * @Date 2018/12/27
- */
-public class MessageInfo implements Serializable {
-    /**
-     * 消息ID
-     */
-    private String msgId;
-    /**
-     * 用户ID
-     */
-    private String userId;
-    /**
-     * 应用ID
-     */
-    private String appId;
-    /**
-     * 业务类型
-     */
-    private String bizType;
-
-    /**
-     * 业务单据ID
-     */
-
-    private String bizId;
-    /**
-     * 公司id
-     * @return
-     */
-    private Long companyId;
-
-    /**
-     * 时间戳
-     */
-    private long timestamp;
-
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-    public void setTimestamp(long timestamp) {
-        this.timestamp = timestamp;
-    }
-
-    public String getMsgId() {
-        return msgId;
-    }
-
-    public void setMsgId(String msgId) {
-        this.msgId = msgId;
-    }
-
-    public String getUserId() {
-        return userId;
-    }
-
-    public void setUserId(String userId) {
-        this.userId = userId;
-    }
-
-    public String getAppId() {
-        return appId;
-    }
-
-    public void setAppId(String appId) {
-        this.appId = appId;
-    }
-
-    public String getBizType() {
-        return bizType;
-    }
-
-    public void setBizType(String bizType) {
-        this.bizType = bizType;
-    }
-
-    public String getBizId() {
-        return bizId;
-    }
-
-    public void setBizId(String bizId) {
-        this.bizId = bizId;
-    }
-
-    public MessageInfo(String userId, String appId, String bizType, String bizId) {
-        this.userId = userId;
-        this.appId = appId;
-        this.bizType = bizType;
-        this.bizId = bizId;
-        this.timestamp = new Date().getTime();
-    }
-
-    public MessageInfo() {
-
-    }
-    public Long getCompanyId() {
-        return companyId;
-    }
-
-    public void setCompanyId(Long companyId) {
-        this.companyId = companyId;
-    }
-}

+ 1 - 4
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/ReceiveService.java

@@ -2,20 +2,17 @@ package com.usoftchina.saas.transfers.service;
 
 import com.rabbitmq.client.Channel;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
-import com.usoftchina.saas.transfers.config.RabbitConfig;
 import com.usoftchina.saas.transfers.mapper.BrokerMessageLogMapper;
 import com.usoftchina.saas.transfers.po.BrokerMessagelog;
-import com.usoftchina.saas.transfers.po.MessageInfo;
 import com.usoftchina.saas.transfers.task.*;
 import com.usoftchina.saas.utils.JsonUtils;
 import com.usoftchina.saas.utils.StringUtils;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.amqp.rabbit.annotation.*;
 import org.springframework.amqp.support.AmqpHeaders;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.messaging.handler.annotation.Headers;
 import org.springframework.messaging.handler.annotation.Payload;
 import org.springframework.stereotype.Service;

+ 1 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/SendService.java

@@ -4,10 +4,10 @@ import com.usoftchina.saas.transfers.config.ExpirationMessagePostProcessor;
 import com.usoftchina.saas.transfers.config.RabbitConfig;
 import com.usoftchina.saas.transfers.mapper.BrokerMessageLogMapper;
 import com.usoftchina.saas.transfers.po.BrokerMessagelog;
-import com.usoftchina.saas.transfers.po.MessageInfo;
 import com.usoftchina.saas.transfers.po.Status;
 import com.usoftchina.saas.utils.JsonUtils;
 import com.usoftchina.saas.utils.StringUtils;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;

+ 1 - 1
applications/transfers/transfers-server/src/test/java/com/usoftchina/saas/transfers/service/RabbitSendServiceTest.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.transfers.service;
 
-import com.usoftchina.saas.transfers.po.MessageInfo;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;

+ 5 - 0
framework/core/pom.xml

@@ -62,6 +62,11 @@
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>transmittable-thread-local</artifactId>
+            <version>2.10.2</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>

+ 3 - 1
framework/core/src/main/java/com/usoftchina/saas/context/BaseContextHolder.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.context;
 
+import com.alibaba.ttl.TransmittableThreadLocal;
 import com.usoftchina.saas.constant.CommonConstants;
 import com.usoftchina.saas.utils.ObjectUtils;
 
@@ -12,7 +13,8 @@ import java.util.Map;
  */
 public class BaseContextHolder {
 
-    private static final ThreadLocal<Map<String, Object>> threadLocal = new InheritableThreadLocal<>();
+    //private static final ThreadLocal<Map<String, Object>> threadLocal = new InheritableThreadLocal<>();
+    private static final ThreadLocal<Map<String, Object>> threadLocal = new TransmittableThreadLocal<>();
 
     public static void set(String key, Object value) {
         Map<String, Object> map = threadLocal.get();

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

@@ -23,9 +23,9 @@
                 </div>
                 <div class="qy-conent">
                     <ul>
-                        <li><span class="qy-biaoti">姓名</span><span>{{content.admin}}</span></li>
+                        <li><span class="qy-biaoti">姓<span style="width:2em;display: inline-block;"></span>名</span><span>{{content.admin}}</span></li>
                         <li><span class="qy-biaoti">手机号</span><span>{{content.adminMobile}}</span></li>
-                        <li><span class="qy-biaoti">邮箱</span><span>{{content.adminEmail}}</span></li>
+                        <li><span class="qy-biaoti">邮<span style="width:2em;display: inline-block;"></span>箱</span><span>{{content.adminEmail}}</span></li>
                     </ul>
                 </div>
             </div>
@@ -48,7 +48,7 @@
                         </li>
                         <li>
                             <span class="qy-biaoti">所属行业</span>
-                            <select @change="industry" ref="qyindustry" class="industry border" name="selectAge" id="selectAge">   
+                            <select @change="industry" ref="qyindustry" class="industry border" name="selectAge" id="selectAge" style="margin-left: -10px;padding-left: 5px;">   
                                 <option value="" disabled selected hidden>请选择所属行业</option>
                                 <option value="贸易零售">贸易零售</option>
                                 <option value="制造加工">制造加工</option>
@@ -86,7 +86,7 @@
                         <li><span class="qy-biaoti">手机号</span><span>{{content.adminMobile}}</span></li>
                         <li>
                             <span class="qy-biaoti">邮<span style="width:2em;display: inline-block;"></span>箱</span>
-                            <input @blur="email" @focus="heidemail" ref="email" type="text" value="" :class= "{showborder:isemail}">
+                            <input @blur="email" @focus="heidemail" ref="email" type="text" value="" :class= "{showborder:isemail}" style="margin-left: -10px;padding-left: 5px;">
                             <div v-show="isheidemail" class="qy-Tips"><span style="color:red" v-html="Email"></span></div>
                         </li>
                     </ul>

+ 1 - 5
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -38,7 +38,7 @@
                 <li><router-link to="/home"><a @click="setTurnHome"><span style="color: white">首页</span></a></router-link></li>
                 <li><a href="#" @click="feature"><span>特色</span></a></li>
                 <li><a href="#" @click="service"><span>功能</span></a></li>
-                <!-- <li><a href="#" @click="download"><span>下载</span></a></li> -->
+                <li><a href="#" @click="download"><span>下载</span></a></li>
                 <!-- <router-link to="/invitation"><a ><span style="color: white">邀请</span></a></router-link> -->
                 <li>
                     <el-menu  
@@ -519,7 +519,6 @@ import { setTimeout } from 'timers';
     border-bottom: 0 !important;
 }
 .el-menu-item:hover {
-    /* color: green !important; */
     background: #1E88F5 !important;
 }
 .modifyname {
@@ -579,9 +578,6 @@ import { setTimeout } from 'timers';
     color: #243A52;
 }
 .gs-news > ul > li:nth-child(1) {
-    font-family: PingFangSC-Regular;
-    font-size: 14px;
-    color: #243A52;
     font-weight: 600;
     padding: 0px 0px 0px 25px;
 }

+ 47 - 71
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -47,7 +47,7 @@
             <li><a href="#" @click="setTurnHome"><span>首页</span></a></li>
             <li class="xs"><a @click="feature2"><span>特色</span></a></li>
             <li class="xs"><a @click="service2"><span>功能</span></a></li>
-            <!-- <li class="xs"><a @click="download"><span>下载</span></a></li> -->
+            <li class="xs"><a @click="download"><span>下载</span></a></li>
             <li>
               <el-menu  
               class="el-menu-demo" 
@@ -165,7 +165,8 @@
               <p class="ts-text">简易SCM+内部协同+外部连接</p>
             </div>
             <div class="gn-hei">
-              <div class="col-md-3 col-sm-6 col-xs-12">
+              <!-- <div class="col-md-3 col-sm-6 col-xs-12"> -->
+              <div class="col-md-3 col-sm-3 col-xs-3">
                 <div class="service-item">
                   <p class="gn-text gn-color">任务管理</p>
                   <p>任务分配,高效工作</p>
@@ -175,7 +176,7 @@
                   </div>
                 </div>
               </div>
-              <div class="col-md-3 col-sm-6 col-xs-12">
+              <div class="col-md-3 col-sm-3 col-xs-3">
                 <div class="service-item">
                   <p class="gn-text">资源管理</p>
                   <p>一键查询,海量供应商产品信息</p>
@@ -185,7 +186,7 @@
                   </div>
                 </div>
               </div>
-              <div class="col-md-3 col-sm-6 col-xs-12">
+              <div class="col-md-3 col-sm-3 col-xs-3">
                 <div class="service-item">
                   <p class="gn-text">销售管理</p>
                   <p>快速制单</p>
@@ -196,7 +197,7 @@
                   </div>
                 </div>
               </div>
-              <div class="col-md-3 col-sm-6 col-xs-12">
+              <div class="col-md-3 col-sm-3 col-xs-3">
                 <div class="service-item">
                   <p class="gn-text">采购管理</p>
                   <p>寻源.定价.采购</p>
@@ -206,7 +207,7 @@
                   </div>
                 </div>
               </div>
-              <div class="col-md-3 col-sm-6 col-xs-12">
+              <div class="col-md-3 col-sm-3 col-xs-3">
                 <div class="service-item">
                   <div class="gn-img gn-huise">
                     <img src="/static/img/gongneng/cang ku 5@3x.png" alt="">
@@ -217,7 +218,7 @@
                   <p>呆滞分析</p>
                 </div>
               </div>
-              <div class="col-md-3 col-sm-6 col-xs-12">
+              <div class="col-md-3 col-sm-3 col-xs-3">
                 <div class="service-item">
                   <div class="gn-img">
                     <img src="/static/img/gongneng/jia gong 6@3x.png" alt="">
@@ -227,7 +228,7 @@
                   <p>加工单自动出入库作业</p>
                 </div>
               </div>
-              <div class="col-md-3 col-sm-6 col-xs-12">
+              <div class="col-md-3 col-sm-3 col-xs-3">
                 <div class="service-item">
                   <div class="gn-img gn-huise">
                     <img src="/static/img/gongneng/QIAN BAO 7@3x.png" alt="">
@@ -237,7 +238,7 @@
                   <p>实时查看供应商和客户账款情况</p>
                 </div>
               </div>
-              <div class="col-md-3 col-sm-6 col-xs-12">
+              <div class="col-md-3 col-sm-3 col-xs-3">
                 <div class="service-item">
                   <div class="gn-img">
                     <img src="/static/img/gongneng/FEN XI 8@3x.png" alt="">
@@ -254,44 +255,29 @@
       </section>
       <!-- end Service section -->
       <!-- 下载 -->
-      <!-- <section>
+      <section>
         <div class="container ts-worp">
           <div class="section-title text-center" style="margin-bottom: 50px">
             <p class="ts-title">下载</p>
             <p class="ts-text">下载U企云服客户端</p>
           </div>
           <div class="download-conenter">
-            <div class="left download-box">
-              <div class="download-box-shang">
-                <img style="width:140px" src="/static/img/weiruan@2x.png" alt="">
+            <div class="download-box over">
+              <div class="left download-box-shang">
+                <img style="width:200px" src="/static/img/weiruan.png" alt="">
               </div>
-              <div class="download-box-xia">
-                <p class="download-title">U企云服PC版</p>
-                <p>适用于Windows86</p>
-                <p class="download-Edition">
-                  <span>-最新版:16.30.0</span> <br/>
-                  <span>-发布时间:2018-10-20</span>
-                </p>
-                <button class="download-btn" @click="downloadOne">立即下载</button>
-              </div>
-            </div>
-            <div class="right download-box">
-              <div class="download-box-shang">
-                <img style="width:140px" src="/static/img/weiruan@2x.png" alt="">
-              </div>
-              <div class="download-box-xia">
-                <p class="download-title">U企云服PC版</p>
-                <p>适用于Windows64</p>
-                <p class="download-Edition">
-                  <span>-最新版:16.30.0</span> <br/>
-                  <span>-发布时间:2018-10-20</span>
-                </p>
-                <button class="download-btn">立即下载</button>
+              <div class="right download-box-xia">
+                <div>
+                  <p class="download-title">U企云服PC版</p>
+                  <p>适用于Windows</p>
+                  <button class="download-btn" @click="downloadOne">立即下载</button>
+                </div>
               </div>
             </div>
           </div>
+          <div><img style="width:100%" src="/static/img/Waves.png" alt=""></div>
         </div>
-      </section> -->
+      </section>
     </main>
     <problem v-else></problem>
   </div>
@@ -300,7 +286,7 @@
 <script>
   import {subscribe, disconnect} from '@/api/socket'
   import Session from '@/utils/session'
-  import { setTimeout } from 'timers'
+  import { setTimeout, setInterval, clearInterval } from 'timers'
   import problem from '../conenter/problem.vue'
 
   export default {
@@ -523,15 +509,13 @@
       },
       // 下载1
       downloadOne(){
-        console.log('我是下载按钮')
-        let url = '/static/img/banner--X.jpg';
-        // let url = 'http://h.hiphotos.baidu.com/image/h%3D300/sign=f2db86688ccb39dbdec06156e01709a7/2f738bd4b31c87018e9450642a7f9e2f0708ff16.jpg';
+        let url = 'https://saas-assets.usoftchina.com/UsoftchinaSaasClient_setup.exe';
         let alink = document.createElement("a");
         alink.style.display = 'none';
         // let blob = new Blob([url]);
         // alink.href = URL.createObjectURL(blob);
         alink.href = url;//下载地址
-        alink.download = "pic"; //文件名(自定义)
+        // alink.download = "pic"; //文件名(自定义)
         document.body.appendChild(alink);
         alink.click();
         // URL.revokeObjectURL(alink.href);
@@ -553,7 +537,7 @@
       openexperience(mobile){
         let me = this;
         let phone = this.$refs.typhone.value || mobile;
-        let reg = new RegExp('^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$')
+        let reg = new RegExp('^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$');
         if (phone == '') {
           this.$refs.Caution.innerHTML = '号码不能为空'
           setTimeout(()=>{
@@ -599,23 +583,20 @@
       },
       //特色
       feature2(){
-        setTimeout(()=>{
-          document.documentElement.scrollTop = 730;
-        },5);
+        document.documentElement.scrollTop = 730;
         this.setTurnHome();
       },
       //功能
       service2(){
-        setTimeout(()=>{
-          document.documentElement.scrollTop = 3670;
-        },5);
+        document.documentElement.scrollTop = 3670;
         this.setTurnHome();
       },
       // 下载
       download(){
-        setTimeout(()=>{
-          document.documentElement.scrollTop = 4400;
-        },5);
+        document.documentElement.scrollTop = 4400;
+        // $('html,body').animate({
+        //       scrollTop: 4400
+        // },2000);
         this.setTurnHome();
       },
       gohome(e){
@@ -667,7 +648,6 @@
     border-bottom: 0 !important;
 }
 .el-menu-item:hover {
-    /* color: green !important; */
     background: #1E88F5 !important;
 }
 /* 体验 */
@@ -737,40 +717,36 @@
 }
 /* 下载 */
 .download-conenter {
-  width: 55%;
-  height: 420px;
+  width: 400px;
+  height: 233px;
   position: relative;
   left: 50%;
   transform: translateX(-50%);
-  margin-bottom: 100px;
 }
 .download-box {
-  width: 49%;
   height: 100%;
-  border: 1px solid #5DA9F8;
+}
+.download-box > div {
+  width: 50%;
+  height: 100%;
 }
 .download-box-shang {
-  height: 50%;
-  background: #1E88F5;
-  text-align: center;
-  line-height: 210px;
+  text-align: right;
 }
 .download-title {
   font-size: 18px;
   color: #0D253E;
   font-weight: 550;
 }
-.download-box-xia {
+.download-box-xia > div {
   text-align: center;
-  padding: 20px;
-  line-height: 30px;
-  color: rgb(103, 107, 112);
+  margin-left: -30px;
+  line-height: 35px;
+  color:  #9EA8B2;
   font-size: 14px;
-}
-.download-Edition {
-  text-align: left;
-  margin-left: 28%;
-  line-height: 20px;
+  position: relative;
+  top: 50%;
+  transform: translateY(-50%);
 }
 .download-btn {
   font-family: PingFangSC-Regular;
@@ -780,7 +756,7 @@
   background: #1E88F5;
   box-shadow: 0 0 99px 0 #E4F2FF;
   border-radius: 4px;
-  padding: 2px 30px;
+  padding: 0px 30px;
   border: 0;
   margin-top: 5%
 }

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

@@ -252,7 +252,7 @@ import { log } from 'util';
             },
             getUrlParam(name){   
                 var reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)");   
-                var index = window.location.href.indexOf('?')
+                var index = window.location.href.indexOf('?');
                 var r=window.location.href.substr(index+1).match(reg);   
                 if  (r!=null)   return decodeURI(r[2]); 
                 return   null;   

+ 1 - 0
frontend/saas-portal-web/static/css/main.css

@@ -9,6 +9,7 @@ body {
     line-height: 24px;
     font-size: 16px;
     color: #818181;
+    min-width: 1300px;
 }
 
 figure, p, address {

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


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


BIN
frontend/saas-portal-web/static/img/weiruan@2x.png


+ 1 - 0
frontend/saas-web/app/model/report/PurchasePay.js

@@ -20,5 +20,6 @@ Ext.define('saas.model.report.PurchasePay', {
         { name: 'pb_payrate', type: 'float', }, // 付款比例
         { name: 'pb_manname', type: 'string' }, // 付款人
         { name: 'pb_remark', type: 'string' }, // 备注
+        { name: 'pi_currency', type:'string' } //币别
     ],
 });

+ 3 - 1
frontend/saas-web/app/model/report/SaleRec.js

@@ -19,6 +19,8 @@ Ext.define('saas.model.report.SaleRec', {
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
             depends: ['pi_total', 'pi_nettotal']
-        },{ name: 'rb_remark', type: 'string' }
+        },
+        { name: 'rb_remark', type: 'string' },
+        { name: 'pi_currency', type: 'string' }
     ],
 });

+ 5 - 10
frontend/saas-web/app/util/FormUtil.js

@@ -282,26 +282,21 @@ Ext.define('saas.util.FormUtil', {
                     Ext.applyIf(item, {
                         maxLength: 50
                     });
-                }
-                
-                if(item.xtype == 'datefield') {
+                }else if(item.xtype == 'datefield') {
                     Ext.applyIf(item, {
                         editable: false,
                         format: 'Y-m-d'
                     });
-                }
-
-                if(item.xtype == 'numberfield') {
+                }else if(item.xtype == 'numberfield') {
                     Ext.applyIf(item, {
                         hideTrigger: true, // 隐藏trigger
                         mouseWheelEnabled: false // 取消滚轮事件
                     });
                     // 设置默认值为0
                     formModel.set(item.name, 0);
-                }
-
-                // 如果是从表为其绑定store
-                if(item.xtype == 'detailGridField') {
+                }else if(item.xtype == 'condbfindtrigger') {
+                    item.isConField = true;
+                }else if(item.xtype == 'detailGridField') {
                     let index = form.detailCount;
                     let columns = item.columns,
                     cnames = columns.filter(function(c) {

+ 100 - 0
frontend/saas-web/app/view/core/dbfind/ConDbfindTrigger.js

@@ -0,0 +1,100 @@
+/**
+ * 放大镜组合字段
+ */
+Ext.define('saas.view.core.form.field.ConDbfindTrigger', {
+    extend: 'Ext.form.FieldContainer',
+    alias: 'widget.condbfindtrigger',
+
+    cls: 'x-confield',
+
+    layout: 'hbox',
+    height: 32,
+    
+    isConField: true,
+
+    // 额外字段自定义替换属性
+    supFieldConfig: {},
+
+    initComponent: function() {
+        var me = this,
+        allowBlank = Ext.isBoolean(me.allowBlank) ? me.allowBlank : true,
+        dbType = me.dbType,
+        dbfinds = me.dbfinds,
+        name0 = dbfinds[0].to,
+        name1 = dbfinds[1].to;
+
+        Ext.apply(me, {
+            items: [{
+                xtype: dbType,
+                name: name0,
+                allowBlank: allowBlank,
+                msgTarget: 'none',
+                bind: {
+                    value: '{' + name0 + '}'
+                },
+                dbfinds: dbfinds,
+                flex: 0.5,
+                listeners: {
+                    validChange: function() {
+                        me.fireEvent('validChange');
+                    },
+                    validitychange: function() {
+                        me.items.items[1].isValid();
+                        me.fireEvent('validitychange');
+                    },
+                    change: function(f) {
+                        var field1 = me.items.items[1];
+                        if(f.dbValues) {
+                            var value = f.dbValues[f.dbfinds[1].from];
+                            field1.setValue(value);
+                            field1.publishState('value', value);
+                        }
+                    },
+                    blur: function() {
+                        this.fireEvent('change', this)
+                    }
+                }
+            }, Ext.Object.merge({
+                xtype: 'textfield',
+                name: name1,
+                allowBlank: allowBlank,
+                readOnly: true,
+                defaultReadOnly: true,
+                bind: {
+                    value: '{' + name1 + '}'
+                },
+                flex: 0.5
+            }, me.supFieldConfig)]
+        });
+        me.callParent(arguments);
+    },
+
+    listeners: {
+        afterrender: function(me) {
+            me.items.items[1].on('validChange', function() {
+                me.fireEvent('validChange');
+            });
+            me.items.items[1].on('validitychange', function() {
+                me.items.items[0].isValid();
+                me.fireEvent('validitychange');
+            });
+        }
+    },
+
+    setValue: function(values) {
+        var me = this,
+        name0 = dbfinds[0].to,
+        name1 = dbfinds[1].to;
+
+        me.items.items[0].setValue(values[name0]);
+        me.items.items[1].setValue(values[name1]);
+    },
+    
+    isValid: function() {
+        return this.items.items[0].isValid() && this.items.items[1].isValid();
+    },
+
+    isDirty: function() {
+        return this.items.items[0].isDirty() && this.items.items[1].isDirty();
+    }
+});

+ 15 - 0
frontend/saas-web/app/view/core/dbfind/ConDbfindTrigger.scss

@@ -0,0 +1,15 @@
+.x-confield {
+    .x-field {
+        &:first-child {
+            .x-form-trigger-wrap {
+                border-radius: 2px 0 0 2px;
+            }
+        }
+        &:last-child {
+            .x-form-trigger-wrap {
+                border-radius: 0 2px 2px 0;
+                border-left: none;
+            }
+        }
+    }
+}

+ 12 - 1
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -114,6 +114,9 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
         itemClick: function(view,record) {
             var me = this;
             var dbfinds = me.dbfinds;
+            var ownerTrigger = me.ownerCt.trigger;
+            ownerTrigger.dbValues = record.data;
+
             if(dbfinds&&dbfinds.length>0){
                 if(me.belong=='grid'){
                     for (let index = 0; index < dbfinds.length; index++) {
@@ -141,8 +144,16 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                             }    
                         }
                     }
+                }else {
+                    var dbfind = Ext.Array.findBy(dbfinds, function(d) {
+                        return d.to = ownerTrigger.name;
+                    });
+                    if(dbfind) {
+                        ownerTrigger.setValue(record.get(dbfind.from));
+                    }
                 }
-                me.ownerCt.trigger.aftertrigger(me.ownerCt.trigger,record);
+                
+                ownerTrigger.aftertrigger(ownerTrigger,record);
             }
             me.ownerCt.close();
         }

+ 13 - 0
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -236,6 +236,7 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                 });
             }
             if (!f.value || f.value == '' || data.length > 1 || data.length == 0) {
+                me.dbValues = {};
                 if (dbfinds && dbfinds.length > 0) {
                     if (me.belong == 'grid') {
                         for (let index = 0; index < dbfinds.length; index++) {
@@ -265,9 +266,12 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                                 }
                             }
                         }
+                    }else {
+                        me.setValue(null);
                     }
                 }
             } else if (data.length == 1) {
+                me.dbValues = data[0];
                 var dbfinds = me.dbfinds;
                 if (dbfinds && dbfinds.length > 0) {
                     if (me.belong == 'grid') {
@@ -303,6 +307,7 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
         select: function (combo, record, eOpts) {
             var me = combo;
             var dbfinds = me.dbfinds;
+            me.dbValues = record.data;
             if (dbfinds && dbfinds.length > 0) {
                 if (me.belong == 'grid') {
                     for (let index = 0; index < dbfinds.length; index++) {
@@ -330,7 +335,15 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                             }
                         }
                     }
+                }else {
+                    var dbfind = Ext.Array.findBy(dbfinds, function(d) {
+                        return d.to = me.name;
+                    });
+                    if(dbfind) {
+                        me.setValue(record.get(dbfind.from));
+                    }
                 }
+                
                 me.aftertrigger(me, record);
             }
         }

+ 44 - 19
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -395,7 +395,8 @@ Ext.define('saas.view.core.form.FormPanel', {
             bind = item.bind,
             name = item.name,
             ignore = item.ignore,
-            defaultValue = item.defaultValue;
+            defaultValue = item.defaultValue,
+            isConField = item.isConField;
 
             item.listeners = item.listeners || {};
             item.listeners.validChange = function() {
@@ -415,29 +416,53 @@ Ext.define('saas.view.core.form.FormPanel', {
                 item.defaultReadOnly = item.readOnly;
             }
 
-            if (bind) {
-                if (!Ext.isString(bind)) {
-                    Ext.apply(bind, {
-                        value: '{' + name + '}'
-                    });
+            // 如果是组合放大镜
+            if(isConField) {
+                let names = item.dbfinds.map(function(d) {
+                    return d.to;
+                });
+
+                // 设置默认值
+                if (defaultValue != undefined) {
+                    
+
+                    for(let x = 0; x < names.length; x++) {
+                        viewModel.set(names[x], defaultValue[names[x]]);
+                    }
+                }
+
+                // 设置model绑定
+                if (!ignore) {
+                    for(let x = 0; x < names.length; x++) {
+                        if(!Ext.Array.contains(bindFields, names[x])) {
+                            bindFields.push(names[x]);
+                        }
+                    }
+                }
+            }else {
+                if (bind) {
+                    if (!Ext.isString(bind)) {
+                        Ext.apply(bind, {
+                            value: '{' + name + '}'
+                        });
+                    } else {
+                        item.bind = '{' + name + '}';
+                    }
                 } else {
                     item.bind = '{' + name + '}';
                 }
-            } else {
-                item.bind = '{' + name + '}';
-            }
-            // 设置默认值
-            if (defaultValue != undefined) {
-                viewModel.set(name, defaultValue);
-            }
-
-            // 设置model绑定
-            if (!ignore) {
-                if(!Ext.Array.contains(bindFields, name)) {
-                    bindFields.push(name);
+                // 设置默认值
+                if (defaultValue != undefined) {
+                    viewModel.set(name, defaultValue);
+                }
+    
+                // 设置model绑定
+                if (!ignore) {
+                    if(!Ext.Array.contains(bindFields, name)) {
+                        bindFields.push(name);
+                    }
                 }
             }
-            
         });
         viewModel.set('base.bindFields', bindFields);
     },

+ 9 - 9
frontend/saas-web/app/view/document/customer/FormController.js

@@ -18,15 +18,15 @@ Ext.define('saas.view.document.customer.FormController', {
                     }) ;   
                 }
             },
-            'currencyDbfindTrigger[name=cu_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'cu_currency'
-                        }],
-                    }) ;   
-                }
-            }
+            // 'currencyDbfindTrigger[name=cu_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'cu_currency'
+            //             }],
+            //         }) ;   
+            //     }
+            // }
         });
     },
 

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

@@ -132,21 +132,43 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 columnWidth: 0.25,
                 group: '交易信息',
             }, {
-                xtype: "currencyDbfindTrigger",
-                name: "cu_currency",
-                fieldLabel: "币别",
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
                 allowBlank: false,
-                columnWidth: 0.25,
-                group: '交易信息',
-            }, {
-                xtype: "numberfield",
-                name: "cu_taxrate",
-                fieldLabel: "税率(%)",
-                allowBlank: false,
-                columnWidth: 0.25,
-                minValue: 0,
-                maxValue: 100,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'cu_currency'
+                }, {
+                    from: 'cr_rate', to: 'cu_taxrate'
+                }],
+                defaultValue: {
+                    cu_currency: 'RMB',
+                    cu_taxrate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                },
                 group: '交易信息',
+            // }, {
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "cu_currency",
+            //     fieldLabel: "币别",
+            //     allowBlank: false,
+            //     columnWidth: 0.25,
+            //     group: '交易信息',
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "cu_taxrate",
+            //     fieldLabel: "税率(%)",
+            //     allowBlank: false,
+            //     columnWidth: 0.25,
+            //     decimalPrecision: 6,
+            //     vtype: 'positiveNumber'
+            //     group: '交易信息',
             },{
                 xtype: "numberfield",
                 hideTrigger: true,

+ 9 - 9
frontend/saas-web/app/view/document/vendor/FormController.js

@@ -19,15 +19,15 @@ Ext.define('saas.view.document.vendor.FormController', {
 
                 }
             },
-            'currencyDbfindTrigger[name=ve_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'ve_currency'
-                        }],
-                    }) ;   
-                }
-            }
+            // 'currencyDbfindTrigger[name=ve_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'ve_currency'
+            //             }],
+            //         }) ;   
+            //     }
+            // }
         });
 
     },

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

@@ -137,23 +137,45 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 allowBlank: true,
                 columnWidth: 0.25,
                 group: '交易信息',
-            },{
-                xtype: "currencyDbfindTrigger",
-                name: "ve_currency",
-                fieldLabel: "币别",
-                allowBlank: false,
-                columnWidth: 0.25,
-                group: '交易信息',
             }, {
-                xtype: "numberfield",
-                name: "ve_taxrate",
-                hideTrigger: true,
-                fieldLabel: "税率(%)",
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
                 allowBlank: false,
-                columnWidth: 0.25,
-                minValue: 0,
-                maxValue: 100,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 've_currency'
+                }, {
+                    from: 'cr_rate', to: 've_taxrate'
+                }],
+                defaultValue: {
+                    ve_currency: 'RMB',
+                    ve_taxrate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                },
                 group: '交易信息',
+            // },{
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "ve_currency",
+            //     fieldLabel: "币别",
+            //     allowBlank: false,
+            //     columnWidth: 0.25,
+            //     group: '交易信息',
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "ve_taxrate",
+            //     hideTrigger: true,
+            //     fieldLabel: "税率(%)",
+            //     allowBlank: false,
+            //     columnWidth: 0.25,
+            //     minValue: 0,
+            //     maxValue: 100,
+            //     group: '交易信息',
             },{
                 xtype: "numberfield",
                 hideTrigger: true,

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

@@ -86,9 +86,8 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                         valueField: "value"
                     }
                 }, {
-                    text: "转出账户余额(元)",
-                    width: 200.0,
-                    dataIndex: "bk_outthisamount",
+                    text: "转出账户币别",
+                    dataIndex: "ftd_currency",
                     ignore: true
                 }, {
                     text: "转入账户ID",
@@ -119,8 +118,8 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                         xtype: "bandinfoDbfindTrigger"
                     }
                 }, {
-                    text: "转入账户余额(元)",
-                    dataIndex: "bk_inthisamount",
+                    text: "转入账户币别",
+                    dataIndex: "ftd_incurrency",
                     ignore: true,
                     width: 150.0
                 }, {
@@ -141,6 +140,11 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {
+                        text: "转存汇率",
+                        dataIndex: "ftd_rate",
+                        ignore: true,
+                        width: 150.0
+                    }, {
                     text: "结算方式",
                     width: 110.0,
                     dataIndex: "ftd_paymethod",

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

@@ -62,18 +62,39 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 fieldLabel: '单据日期',
                 defaultValue: new Date(),
                 allowBlank: false
-            },{
-                xtype: "currencyDbfindTrigger",
-                name: "or_currency",
-                fieldLabel: "币别",
-                defaultValue: 'RMB'
             }, {
-                xtype: "numberfield",
-                name: "or_rate",
-                fieldLabel: "汇率",
-                defaultValue: 1,
-                decimalPrecision: 6,
-                vtype: 'positiveNumber'
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'or_currency'
+                }, {
+                    from: 'cr_rate', to: 'or_rate'
+                }],
+                defaultValue: {
+                    or_currency: 'RMB',
+                    or_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                },
+            // }, {
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "or_currency",
+            //     fieldLabel: "币别",
+            //     defaultValue: 'RMB'
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "or_rate",
+            //     fieldLabel: "汇率",
+            //     defaultValue: 1,
+            //     decimalPrecision: 6,
+            //     vtype: 'positiveNumber'
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",

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

@@ -106,17 +106,17 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
 
                 }
             },
-            'currencyDbfindTrigger[name=or_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'or_currency'
-                        },{
-                            from:'cr_rate',to:'or_rate'
-                        }],
-                    }) ;   
-                }
-            }
+            // 'currencyDbfindTrigger[name=or_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'or_currency'
+            //             },{
+            //                 from:'cr_rate',to:'or_rate'
+            //             }],
+            //         }) ;   
+            //     }
+            // }
         });
     },
     onSave: function() {

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

@@ -56,18 +56,40 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 name: "os_bankname",
                 fieldLabel: "账户名称",
                 allowBlank: false
-            },{
-                xtype: "currencyDbfindTrigger",
-                name: "os_currency",
-                fieldLabel: "币别",
-                defaultValue: 'RMB'
             }, {
-                xtype: "numberfield",
-                name: "os_rate",
-                fieldLabel: "汇率",
-                defaultValue: 1,
-                decimalPrecision: 6,
-                vtype: 'positiveNumber'
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'os_currency'
+                }, {
+                    from: 'cr_rate', to: 'os_rate'
+                }],
+                defaultValue: {
+                    os_currency: 'RMB',
+                    os_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    defaultValue: 1,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                }
+            // },{
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "os_currency",
+            //     fieldLabel: "币别",
+            //     defaultValue: 'RMB'
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "os_rate",
+            //     fieldLabel: "汇率",
+            //     defaultValue: 1,
+            //     decimalPrecision: 6,
+            //     vtype: 'positiveNumber'
             }, {
                 xtype: 'datefield',
                 name: 'os_date',

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

@@ -97,17 +97,17 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
 
                 }
             },
-            'currencyDbfindTrigger[name=os_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'os_currency'
-                        },{
-                            from:'cr_rate',to:'os_rate'
-                        }],
-                    }) ;   
-                }
-            }
+            // 'currencyDbfindTrigger[name=os_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'os_currency'
+            //             },{
+            //                 from:'cr_rate',to:'os_rate'
+            //             }],
+            //         }) ;   
+            //     }
+            // }
         });
 
     },

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

@@ -67,6 +67,28 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
                 defaultValue: new Date(),
                 allowBlank: false
             }, {
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'pb_currency'
+                }, {
+                    from: 'cr_rate', to: 'pb_rate'
+                }],
+                defaultValue: {
+                    pb_currency: 'RMB',
+                    pb_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                }
+            },
+                {
                 xtype: 'textfield',
                 name: 'pb_manname',
                 fieldLabel: '付款人',

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

@@ -76,6 +76,27 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 defaultValue: new Date(),
                 allowBlank: false
             }, {
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'rb_currency'
+                }, {
+                    from: 'cr_rate', to: 'rb_rate'
+                }],
+                defaultValue: {
+                    rb_currency: 'RMB',
+                    rb_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                }
+                }, {
                 xtype: "textfield",
                 name: "rb_manname",
                 fieldLabel: "收款人",

+ 4 - 0
frontend/saas-web/app/view/money/report/PayDetail.js

@@ -44,6 +44,10 @@ Ext.define('saas.view.money.report.PayDetail', {
         text: '采购员',
         dataIndex: 'pd_buyername',
         width: 80
+    }, {
+        text: '币别',
+        dataIndex: 'pd_currency',
+        width: 80
     },{
         text: '增加应付(元)',
         xtype: 'numbercolumn',

+ 4 - 0
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -45,6 +45,10 @@ Ext.define('saas.view.money.report.RecDetail', {
         text: '业务员',
         dataIndex: 'rd_sellername',
         width: 80
+    }, {
+        text: '币别',
+        dataIndex: 'rd_currency',
+        width: 80
     }, {
         text: '增加应收(元)',
         dataIndex: 'rd_addrec',

+ 87 - 3
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -565,7 +565,28 @@ Ext.define('saas.view.money.verification.FormPanel', {
                         defaultValue: new Date(),
                         allowBlank: false,
                         name: 'vc_date'
-                    }, {
+                    },  {
+                        xtype: 'condbfindtrigger',
+                        fieldLabel: '币别汇率',
+                        allowBlank: false,
+                        dbType: 'currencyDbfindTrigger',
+                        dbfinds: [{
+                            from: 'cr_name', to: 'vc_currency'
+                        }, {
+                            from: 'cr_rate', to: 'vc_rate'
+                        }],
+                        defaultValue: {
+                            vc_currency: 'RMB',
+                            vc_rate: 1
+                        },
+                        supFieldConfig: {
+                            xtype: 'numberfield',
+                            readOnly: false,
+                            defaultReadOnly: false,
+                            decimalPrecision: 6,
+                            vtype: 'positiveNumber'
+                        },
+                    },{
                         xtype: 'hidden',
                         name: 'vc_amount1',
                         thousandSeparator: ',',
@@ -623,6 +644,27 @@ Ext.define('saas.view.money.verification.FormPanel', {
                         allowBlank: false,
                         name: 'vc_date'
                     }, {
+                            xtype: 'condbfindtrigger',
+                            fieldLabel: '币别汇率',
+                            allowBlank: false,
+                            dbType: 'currencyDbfindTrigger',
+                            dbfinds: [{
+                                from: 'cr_name', to: 'vc_currency'
+                            }, {
+                                from: 'cr_rate', to: 'vc_rate'
+                            }],
+                            defaultValue: {
+                                vc_currency: 'RMB',
+                                vc_rate: 1
+                            },
+                            supFieldConfig: {
+                                xtype: 'numberfield',
+                                readOnly: false,
+                                defaultReadOnly: false,
+                                decimalPrecision: 6,
+                                vtype: 'positiveNumber'
+                            },
+                        },{
                         xtype: 'hidden',
                         name: 'vc_amount1',
                         thousandSeparator: ',',
@@ -678,7 +720,28 @@ Ext.define('saas.view.money.verification.FormPanel', {
                         defaultValue: new Date(),
                         allowBlank: false,
                         name: 'vc_date'
-                    }, {
+                    },  {
+                        xtype: 'condbfindtrigger',
+                        fieldLabel: '币别汇率',
+                        allowBlank: false,
+                        dbType: 'currencyDbfindTrigger',
+                        dbfinds: [{
+                            from: 'cr_name', to: 'vc_currency'
+                        }, {
+                            from: 'cr_rate', to: 'vc_rate'
+                        }],
+                        defaultValue: {
+                            vc_currency: 'RMB',
+                            vc_rate: 1
+                        },
+                        supFieldConfig: {
+                            xtype: 'numberfield',
+                            readOnly: false,
+                            defaultReadOnly: false,
+                            decimalPrecision: 6,
+                            vtype: 'positiveNumber'
+                        },
+                    },{
                         xtype: 'hidden',
                         name: 'vc_amount1',
                         thousandSeparator: ',',
@@ -734,7 +797,28 @@ Ext.define('saas.view.money.verification.FormPanel', {
                         defaultValue: new Date(),
                         allowBlank: false,
                         name: 'vc_date'
-                    }, {
+                    },  {
+                        xtype: 'condbfindtrigger',
+                        fieldLabel: '币别汇率',
+                        allowBlank: false,
+                        dbType: 'currencyDbfindTrigger',
+                        dbfinds: [{
+                            from: 'cr_name', to: 'vc_currency'
+                        }, {
+                            from: 'cr_rate', to: 'vc_rate'
+                        }],
+                        defaultValue: {
+                            vc_currency: 'RMB',
+                            vc_rate: 1
+                        },
+                        supFieldConfig: {
+                            xtype: 'numberfield',
+                            readOnly: false,
+                            defaultReadOnly: false,
+                            decimalPrecision: 6,
+                            vtype: 'positiveNumber'
+                        },
+                    },{
                         xtype: 'hidden',
                         name: 'vc_amount1',
                         thousandSeparator: ',',

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

@@ -74,17 +74,39 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     this.dialog.show();
                 }
             }, {
-                xtype: "currencyDbfindTrigger",
-                name: "pu_currency",
-                fieldLabel: "币别",
-                defaultValue: 'RMB'
-            }, {
-                xtype: "numberfield",
-                name: "pu_rate",
-                fieldLabel: "汇率",
-                defaultValue: 1,
-                decimalPrecision: 6,
-                vtype: 'positiveNumber'
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'pu_currency'
+                }, {
+                    from: 'cr_rate', to: 'pu_rate'
+                }],
+                defaultValue: {
+                    pu_currency: 'RMB',
+                    pu_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    defaultValue: 1,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                }
+            // }, {
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "pu_currency",
+            //     fieldLabel: "币别",
+            //     defaultValue: 'RMB'
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "pu_rate",
+            //     fieldLabel: "汇率",
+            //     defaultValue: 1,
+            //     decimalPrecision: 6,
+            //     vtype: 'positiveNumber'
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",

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

@@ -68,17 +68,17 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
 
                 }
             },
-            'currencyDbfindTrigger[name=pu_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'pu_currency'
-                        },{
-                            from:'cr_rate',to:'pu_rate'
-                        }],
-                    }) ;   
-                }
-            },
+            // 'currencyDbfindTrigger[name=pu_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'pu_currency'
+            //             },{
+            //                 from:'cr_rate',to:'pu_rate'
+            //             }],
+            //         }) ;   
+            //     }
+            // },
         });
     },
 

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

@@ -72,17 +72,39 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 columnWidth: 0.25,
                 defaultValue: new Date()
             }, {
-                xtype: "currencyDbfindTrigger",
-                name: "pi_currency",
-                fieldLabel: "币别",
-                defaultValue: 'RMB'
-            }, {
-                xtype: "numberfield",
-                name: "pi_rate",
-                fieldLabel: "汇率",
-                defaultValue: 1,
-                decimalPrecision: 6,
-                vtype: 'positiveNumber'
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'pi_currency'
+                }, {
+                    from: 'cr_rate', to: 'pi_rate'
+                }],
+                defaultValue: {
+                    pi_currency: 'RMB',
+                    pi_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    defaultValue: 1,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                },
+            // }, {
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "pi_currency",
+            //     fieldLabel: "币别",
+            //     defaultValue: 'RMB'
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "pi_rate",
+            //     fieldLabel: "汇率",
+            //     defaultValue: 1,
+            //     decimalPrecision: 6,
+            //     vtype: 'positiveNumber'
             },{
                 xtype: "hidden",
                 name: "pi_puid",

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

@@ -92,17 +92,17 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                     }) ;   
                 }
             },
-            'currencyDbfindTrigger[name=pi_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'pi_currency'
-                        },{
-                            from:'cr_rate',to:'pi_rate'
-                        }],
-                    }) ;   
-                }
-            },
+            // 'currencyDbfindTrigger[name=pi_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'pi_currency'
+            //             },{
+            //                 from:'cr_rate',to:'pi_rate'
+            //             }],
+            //         }) ;   
+            //     }
+            // },
 
         });
 

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

@@ -68,17 +68,39 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 columnWidth: 0.25,
                 defaultValue: new Date()
             }, {
-                xtype: "currencyDbfindTrigger",
-                name: "pi_currency",
-                fieldLabel: "币别",
-                defaultValue: 'RMB'
-            }, {
-                xtype: "numberfield",
-                name: "pi_rate",
-                fieldLabel: "汇率",
-                defaultValue: 1,
-                decimalPrecision: 6,
-                vtype: 'positiveNumber'
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'pi_currency'
+                }, {
+                    from: 'cr_rate', to: 'pi_rate'
+                }],
+                defaultValue: {
+                    pi_currency: 'RMB',
+                    pi_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    defaultValue: 1,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                }
+            // }, {
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "pi_currency",
+            //     fieldLabel: "币别",
+            //     defaultValue: 'RMB'
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "pi_rate",
+            //     fieldLabel: "汇率",
+            //     defaultValue: 1,
+            //     decimalPrecision: 6,
+            //     vtype: 'positiveNumber'
             }, {
                 xtype: "hidden",
                 name: "pi_puid",

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

@@ -95,17 +95,17 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                     }) ;   
                 }
             },
-            'currencyDbfindTrigger[name=pi_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'pi_currency'
-                        },{
-                            from:'cr_rate',to:'pi_rate'
-                        }],
-                    }) ;   
-                }
-            },
+            // 'currencyDbfindTrigger[name=pi_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'pi_currency'
+            //             },{
+            //                 from:'cr_rate',to:'pi_rate'
+            //             }],
+            //         }) ;   
+            //     }
+            // },
         });
 
     },

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

@@ -89,6 +89,10 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         summaryRenderer: function(v) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
+    }, {
+        text: '币别',
+        dataIndex: 'pi_currency',
+        width: 80
     }, {
         text: '付款比例(%)',
         dataIndex: 'pb_payrate',

+ 4 - 0
frontend/saas-web/app/view/sale/report/SaleRec.js

@@ -92,6 +92,10 @@ Ext.define('saas.view.sale.report.SaleRec', {
         renderer : function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
+    }, {
+        text: '币别',
+        dataIndex: 'pi_currency',
+        width: 80
     }, {
         text: '回款比例(%)',
         dataIndex: 'rb_backrate',

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

@@ -96,17 +96,39 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 storeUrl: '/api/document/customer/getAddressCombo',
                 hiddenBtn: true, //true 则会关闭新增按钮功能
             }, {
-                xtype: "currencyDbfindTrigger",
-                name: "sa_currency",
-                fieldLabel: "币别",
-                defaultValue: 'RMB'
-            }, {
-                xtype: "numberfield",
-                name: "sa_rate",
-                fieldLabel: "汇率",
-                defaultValue: 1,
-                decimalPrecision: 6,
-                vtype: 'positiveNumber'
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'sa_currency'
+                }, {
+                    from: 'cr_rate', to: 'sa_rate'
+                }],
+                defaultValue: {
+                    sa_currency: 'RMB',
+                    sa_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    defaultValue: 1,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                }
+            // }, {
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "sa_currency",
+            //     fieldLabel: "币别",
+            //     defaultValue: 'RMB'
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "sa_rate",
+            //     fieldLabel: "汇率",
+            //     defaultValue: 1,
+            //     decimalPrecision: 6,
+            //     vtype: 'positiveNumber'
             },{
                 name: "detailGridField",
                 xtype: "detailGridField",

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

@@ -96,17 +96,17 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                     }
                 }
             },
-            'currencyDbfindTrigger[name=sa_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'sa_currency'
-                        },{
-                            from:'cr_rate',to:'sa_rate'
-                        }],
-                    }) ;   
-                }
-            },
+            // 'currencyDbfindTrigger[name=sa_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'sa_currency'
+            //             },{
+            //                 from:'cr_rate',to:'sa_rate'
+            //             }],
+            //         }) ;   
+            //     }
+            // },
         });
 
     },

+ 33 - 11
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -104,17 +104,39 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 storeUrl: '/api/document/customer/getAddressCombo',
                 hiddenBtn: true, //true 则会关闭新增按钮功能
             }, {
-                xtype: "currencyDbfindTrigger",
-                name: "pi_currency",
-                fieldLabel: "币别",
-                defaultValue: 'RMB'
-            }, {
-                xtype: "numberfield",
-                name: "pi_rate",
-                fieldLabel: "汇率",
-                defaultValue: 1,
-                decimalPrecision: 6,
-                vtype: 'positiveNumber'
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'pi_currency'
+                }, {
+                    from: 'cr_rate', to: 'pi_rate'
+                }],
+                defaultValue: {
+                    pi_currency: 'RMB',
+                    pi_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    defaultValue: 1,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                }
+            // }, {
+            //     xtype: "currencyDbfindTrigger",
+            //     name: "pi_currency",
+            //     fieldLabel: "币别",
+            //     defaultValue: 'RMB'
+            // }, {
+            //     xtype: "numberfield",
+            //     name: "pi_rate",
+            //     fieldLabel: "汇率",
+            //     defaultValue: 1,
+            //     decimalPrecision: 6,
+            //     vtype: 'positiveNumber'
             },{
                 name: "detailGridField",
                 xtype: "detailGridField",

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

@@ -111,17 +111,17 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                     }
                 }
             },
-            'currencyDbfindTrigger[name=pi_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'pi_currency'
-                        },{
-                            from:'cr_rate',to:'pi_rate'
-                        }],
-                    }) ;   
-                }
-            },
+            // 'currencyDbfindTrigger[name=pi_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'pi_currency'
+            //             },{
+            //                 from:'cr_rate',to:'pi_rate'
+            //             }],
+            //         }) ;   
+            //     }
+            // },
         });
     }
 });

+ 23 - 1
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -112,7 +112,29 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 allowBlank: false,
                 storeUrl: '/api/document/customer/getAddressCombo',
                 hiddenBtn: true, //true 则会关闭新增按钮功能
-            },{
+            }, {
+                xtype: 'condbfindtrigger',
+                fieldLabel: '币别汇率',
+                allowBlank: false,
+                dbType: 'currencyDbfindTrigger',
+                dbfinds: [{
+                    from: 'cr_name', to: 'pi_currency'
+                }, {
+                    from: 'cr_rate', to: 'pi_rate'
+                }],
+                defaultValue: {
+                    pi_currency: 'RMB',
+                    pi_rate: 1
+                },
+                supFieldConfig: {
+                    xtype: 'numberfield',
+                    readOnly: false,
+                    defaultReadOnly: false,
+                    defaultValue: 1,
+                    decimalPrecision: 6,
+                    vtype: 'positiveNumber'
+                }
+            }, {
                 xtype: "currencyDbfindTrigger",
                 name: "pi_currency",
                 fieldLabel: "币别",

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

@@ -103,17 +103,17 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                     }
                 }
             },
-            'currencyDbfindTrigger[name=pi_currency]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'cr_name',to:'pi_currency'
-                        },{
-                            from:'cr_rate',to:'pi_rate'
-                        }],
-                    }) ;   
-                }
-            },
+            // 'currencyDbfindTrigger[name=pi_currency]':{
+            //     beforerender:function(f){
+            //         Ext.apply(f,{
+            //             dbfinds:[{
+            //                 from:'cr_name',to:'pi_currency'
+            //             },{
+            //                 from:'cr_rate',to:'pi_rate'
+            //             }],
+            //         }) ;   
+            //     }
+            // },
         });
     },
     turnProdIn: function() {

+ 5 - 0
pom.xml

@@ -221,6 +221,11 @@
                 <artifactId>mail-dto</artifactId>
                 <version>${project.release.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.usoftchina.saas</groupId>
+                <artifactId>transfers-dto</artifactId>
+                <version>${project.release.version}</version>
+            </dependency>
             <dependency>
                 <groupId>com.usoftchina.saas</groupId>
                 <artifactId>mail-api</artifactId>