Browse Source

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

rainco 7 years ago
parent
commit
5713d9a8c7
47 changed files with 1304 additions and 98 deletions
  1. 2 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  2. 2 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/ConfigsMapper.java
  3. 16 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ConfigsServiceImpl.java
  4. 3 0
      applications/commons/commons-server/src/main/resources/mapper/ConfigsMapper.xml
  5. 3 3
      applications/document/document-server/src/main/resources/application.yml
  6. 2 1
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  7. 3 0
      applications/money/money-dto/src/main/java/com/usoftchina/saas/money/dto/VerificationListDTO.java
  8. 36 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransfer.java
  9. 3 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/VerificationList.java
  10. 1 1
      applications/money/money-server/src/main/resources/application.yml
  11. 7 1
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  12. 1 1
      applications/money/money-server/src/main/resources/mapper/ProfitdetailMapper.xml
  13. 3 1
      applications/money/money-server/src/main/resources/mapper/VerificationListMapper.xml
  14. 3 3
      applications/money/money-server/src/main/resources/mapper/VerificationMapper.xml
  15. 9 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  16. 3 3
      applications/purchase/purchase-server/src/main/resources/application.yml
  17. 3 3
      applications/sale/sale-server/src/main/resources/application.yml
  18. 0 28
      applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/api/B2BPurchaseApi.java
  19. 1 1
      applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/api/SearchUUApi.java
  20. 55 0
      applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/po/purchase/PurchaseDetailEnd.java
  21. 1 1
      applications/transfers/mall-api/src/test/resources/application.yml
  22. 1 1
      applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendMessageApi.java
  23. 48 0
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/config/B2BConfig.java
  24. 5 0
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/ReceiveService.java
  25. 9 0
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/impl/SaleDownServiceImpl.java
  26. 1 1
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/Executable.java
  27. 79 0
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseEndTask.java
  28. 27 5
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseTask.java
  29. 1 1
      applications/transfers/transfers-server/src/main/resources/application.yml
  30. 2 2
      base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/AccountApi.java
  31. 0 12
      frontend/saas-portal-web/src/components/conenter/home.vue
  32. 2 1
      frontend/saas-portal-web/static/css/main.css
  33. 164 0
      frontend/saas-web/app/view/document/uusetting/UUSetting.js
  34. 79 0
      frontend/saas-web/app/view/document/uusetting/UUSettingController.js
  35. 83 0
      frontend/saas-web/app/view/document/uusetting/UUSettingModel.js
  36. 459 0
      frontend/saas-web/app/view/document/uusetting/UUSettingWin.js
  37. 7 7
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  38. 53 8
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  39. 24 0
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  40. 24 0
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  41. 1 1
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  42. 24 0
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  43. 24 0
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  44. 9 9
      frontend/saas-web/app/view/money/verification/FormPanel.js
  45. 13 1
      frontend/saas-web/app/view/money/verification/QueryPanel.js
  46. 2 2
      frontend/saas-web/app/view/sale/business/QuoteWin.js
  47. 6 0
      frontend/saas-web/resources/json/navigation.json

+ 2 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java

@@ -62,6 +62,8 @@ public enum  BillCodeSeq {
 
     BOM("BOM资料", "Bom"),
 
+    PURCHASEEND("采购单结案", "PURCHASEEND"),
+
     APCHECK("对账单", "APCHECK");
 
 

+ 2 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/ConfigsMapper.java

@@ -23,4 +23,6 @@ public interface ConfigsMapper {
     void updateCreator(@Param("userId") Long userId, @Param("userName") String userName, @Param("id") Long id);
 
     void updateByCodeSelective(Configs con);
+
+    int selectByCodeAndCompanyId(@Param("code") String code, @Param("companyId") Long companyId);
 }

+ 16 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ConfigsServiceImpl.java

@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -109,6 +110,21 @@ public class ConfigsServiceImpl implements ConfigsService{
                 currencyDTO.setCr_name(con.getData());
                 currencyDTO.setCr_standard(1L);
                 currencyApi.setStandard(currencyDTO);
+            } else if("enableB2B".equals(con.getCode())){
+                int count = configsMapper.selectByCodeAndCompanyId(con.getCode(), BaseContextHolder.getCompanyId());
+                if (count == 0){
+                    //不存在,则插入
+                    Configs configs = new Configs();
+                    configs.setCode(con.getCode());
+                    configs.setDescription("启用B2B");
+                    configs.setData(con.getData());
+                    configs.setCompanyId(BaseContextHolder.getCompanyId());
+                    configs.setCreateTime(new Date());
+                    configs.setCreatorName(BaseContextHolder.getUserName());
+                    configs.setCreatorId(Integer.parseInt(String.valueOf(BaseContextHolder.getUserId())));
+                    configsMapper.insertSelective(configs);
+                    continue;
+                }
             }
             configsMapper.updateByCodeSelective(con);
         }

+ 3 - 0
applications/commons/commons-server/src/main/resources/mapper/ConfigsMapper.xml

@@ -180,5 +180,8 @@
     </set>
     where code = #{code,jdbcType=VARCHAR} and companyid = #{companyId}
   </update>
+  <select id="selectByCodeAndCompanyId" resultType="int">
+    SELECT COUNT(*) FROM CONFIGS WHERE CODE = #{code} AND COMPANYID = #{companyId}
+  </select>
 
 </mapper>

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

@@ -75,8 +75,8 @@ mybatis:
 auth:
   public-key: auth/pub.key
 ribbon:
-  ReadTimeout: 5000
-  ConnectTimeout: 5000
+  ReadTimeout: 10000
+  ConnectTimeout: 10000
 feign:
   hystrix:
     enabled: true
@@ -96,4 +96,4 @@ b2b:
     inquiry: https://test-inquiry.uuzcc.cn
     Component: https://test-mall.uuzcc.cn
     product: http://test-product.uuzcc.cn
-    uu: https://test-b2b.uuzcc.cn
+    common: https://test-b2b.uuzcc.cn

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

@@ -24,6 +24,7 @@
     <result column="bk_spending" property="bk_spending" jdbcType="DOUBLE" />
     <result column="bk_income" property="bk_income" jdbcType="DOUBLE" />
     <result column="bk_currency" property="bk_currency" jdbcType="VARCHAR" />
+    <result column="cr_rate" property="cr_rate" jdbcType="DOUBLE" />
   </resultMap>
   <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Bankinformation" extends="BaseResultMap" >
     <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
@@ -31,7 +32,7 @@
   <sql id="Base_Column_List" >
     bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
     bk_status, bk_statuscode, bk_ym, bankinformation.companyid companyid,
-    bankinformation.updaterId updaterId, bankinformation.updateTime updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark,bk_currency
+    bankinformation.updaterId updaterId, bankinformation.updateTime updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark,bk_currency,cr_rate
   </sql>
   <sql id="Blob_Column_List" >
     bk_remark

+ 3 - 0
applications/money/money-dto/src/main/java/com/usoftchina/saas/money/dto/VerificationListDTO.java

@@ -128,4 +128,7 @@ public class VerificationListDTO implements Serializable {
     private String vcd_text4;
 
     private String vcd_text5;
+    private String vc_currency;
+
+    private Double vc_rate;
 }

+ 36 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Fundtransfer.java

@@ -44,6 +44,42 @@ public class Fundtransfer extends CommonBaseEntity implements Serializable {
 
     private Date ft_auditdate;
 
+    private String ftd_currency;
+    private String ftd_incurrency;
+    private Double ftd_innowbalance;
+    private Double ftd_rate;
+
+    public String getFtd_currency() {
+        return ftd_currency;
+    }
+
+    public void setFtd_currency(String ftd_currency) {
+        this.ftd_currency = ftd_currency;
+    }
+
+    public String getFtd_incurrency() {
+        return ftd_incurrency;
+    }
+
+    public void setFtd_incurrency(String ftd_incurrency) {
+        this.ftd_incurrency = ftd_incurrency;
+    }
+
+    public Double getFtd_innowbalance() {
+        return ftd_innowbalance;
+    }
+
+    public void setFtd_innowbalance(Double ftd_innowbalance) {
+        this.ftd_innowbalance = ftd_innowbalance;
+    }
+
+    public Double getFtd_rate() {
+        return ftd_rate;
+    }
+
+    public void setFtd_rate(Double ftd_rate) {
+        this.ftd_rate = ftd_rate;
+    }
 
     public String getFtd_remark() {
         return ftd_remark;

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

@@ -96,6 +96,9 @@ public class VerificationList extends CommonBaseEntity implements Serializable {
     private String vd_text4;
 
     private String vd_text5;
+    private String vc_currency;
+
+    private Double vc_rate;
 //
 //    private Integer vcd_id;
 //

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

@@ -82,4 +82,4 @@ b2b:
     inquiry: https://test-inquiry.uuzcc.cn
     Component: https://test-mall.uuzcc.cn
     product: http://test-product.uuzcc.cn
-    uu: https://test-b2b.uuzcc.cn
+    common: https://test-b2b.uuzcc.cn

+ 7 - 1
applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml

@@ -27,6 +27,11 @@
     <result column="ft_auditman" property="ft_auditman" jdbcType="VARCHAR" />
     <result column="ft_auditdate" property="ft_auditdate" jdbcType="TIMESTAMP" />
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+
+    <result column="ftd_currency" property="ftd_currency" jdbcType="VARCHAR" />
+    <result column="ftd_incurrency" property="ftd_incurrency" jdbcType="VARCHAR" />
+    <result column="ftd_innowbalance" property="ftd_innowbalance" jdbcType="DOUBLE" />
+    <result column="ftd_rate" property="ftd_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     ft_id, ft_code, ft_date, ft_status, ft_statuscode,
@@ -35,7 +40,8 @@
     ft_auditman, ft_auditdate
   </sql>
   <sql id="Detail_Column_List" >
-    ftd_bankname,ftd_inbankname,ftd_nowbalance,ftd_paymethod,ftd_paycode,ftd_remark
+    ftd_bankname,ftd_inbankname,ftd_nowbalance,ftd_paymethod,ftd_paycode,ftd_remark,ftd_currency,
+    ftd_incurrency,ftd_innowbalance,ftd_rate
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 

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

@@ -98,7 +98,7 @@ prodinout.companyid= prodiodetail.companyid
 		pi_custname,
 		cu_type,
 		cu_sellername,
-		SUM( (IFNULL( pd_sendprice, 0 ) * ( IFNULL( pd_outqty, 0 ) - IFNULL( pd_inqty, 0 ) )) * ifnull(cr_rate,1) ) AS saamount,,
+		SUM( (IFNULL( pd_sendprice, 0 ) * ( IFNULL( pd_outqty, 0 ) - IFNULL( pd_inqty, 0 ) )) * ifnull(cr_rate,1) ) AS saamount,
 		SUM(
 		IFNULL(pd_netprice,0) * (IFNULL(pd_outqty,0) - IFNULL(pd_inqty,0))
 		) AS netamount,

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

@@ -40,11 +40,13 @@
         <result column="vd_amount" property="vd_amount" jdbcType="DOUBLE" />
         <result column="vd_nowbalance" property="vd_nowbalance" jdbcType="DOUBLE" />
         <result column="vd_remark" property="vd_remark" jdbcType="VARCHAR" />
+        <result column="vc_rate" property="vc_rate" jdbcType="DOUBLE" />
+        <result column="vc_currency" property="vc_currency" jdbcType="VARCHAR" />
 
     </resultMap>
     <sql id="Base_Column_List">
     vc_id, vc_code, vc_kind, vc_date, vc_vendid, vc_vendcode ,vc_custcode ,vc_custid ,vc_amount1,
-    vc_status,vc_statuscode,vc_vendname,vc_custname
+    vc_status,vc_statuscode,vc_vendname,vc_custname,vc_currency,vc_rate
   </sql>
     <select id="selectVerificationListByCondition"  resultMap="BaseResultMap">
         select

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

@@ -346,12 +346,12 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="vc_rate != null" >
-        #{vc_rate,jdbcType=DOUBLE},
-      </if>
       <if test="vc_currency != null" >
         #{vc_currency,jdbcType=VARCHAR},
       </if>
+      <if test="vc_rate != null" >
+        #{vc_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()

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

@@ -401,6 +401,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
         messageLogService.close(docBaseDTO);
+        if (ConfigsCache.current().enableB2B()){
+            MessageInfo messageInfo = new MessageInfo(BaseContextHolder.getUserId(), BillCodeSeq.PURCHASEEND.name(), String.valueOf(id), BaseContextHolder.getCompanyId());
+            sendMessageApi.sendMsg(messageInfo);
+        }
         return docBaseDTO;
     }
 
@@ -464,6 +468,11 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             docBaseDTO = getBaseDTOById(id);
             //日志
             messageLogService.open(docBaseDTO);
+            //启用B2B,采购单结案反结案状态上传
+            if (ConfigsCache.current().enableB2B()){
+                MessageInfo messageInfo = new MessageInfo(BaseContextHolder.getUserId(), BillCodeSeq.PURCHASEEND.name(), String.valueOf(id), BaseContextHolder.getCompanyId());
+                sendMessageApi.sendMsg(messageInfo);
+            }
             return docBaseDTO;
         }
         return docBaseDTO;

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

@@ -75,8 +75,8 @@ mybatis:
 auth:
   public-key: auth/pub.key
 ribbon:
-  ReadTimeout: 5000
-  ConnectTimeout: 5000
+  ReadTimeout: 10000
+  ConnectTimeout: 10000
 feign:
   hystrix:
     enabled: true
@@ -94,4 +94,4 @@ b2b:
     inquiry: https://test-inquiry.uuzcc.cn
     Component: https://test-mall.uuzcc.cn
     product: http://test-product.uuzcc.cn
-    uu: https://test-b2b.uuzcc.cn
+    common: https://test-b2b.uuzcc.cn

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

@@ -75,8 +75,8 @@ mybatis:
 auth:
   public-key: auth/pub.key
 ribbon:
-  ReadTimeout: 5000
-  ConnectTimeout: 5000
+  ReadTimeout: 10000
+  ConnectTimeout: 10000
 feign:
   hystrix:
     enabled: true
@@ -94,4 +94,4 @@ b2b:
     inquiry: https://test-inquiry.uuzcc.cn
     Component: https://test-mall.uuzcc.cn
     product: http://test-product.uuzcc.cn
-    uu: https://test-b2b.uuzcc.cn
+    common: https://test-b2b.uuzcc.cn

+ 0 - 28
applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/api/B2BPurchaseApi.java

@@ -1,28 +0,0 @@
-package com.usoftchina.saas.inquiry.api;
-
-import com.usoftchina.saas.inquiry.po.purchase.SavePurchaseListResp;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-
-@FeignClient(url = "${b2b.baseUrl.uu}", name = "b2b-server")
-@RequestMapping("/erp/purchase")
-public interface B2BPurchaseApi {
-    /**
-     * 上传采购单
-     * @param data
-     * @return
-     */
-    @RequestMapping(method = RequestMethod.POST)
-    SavePurchaseListResp savePurchase(@RequestParam("data") String data);
-
-    /**
-     * 结案、反结案采购单后,传到平台
-     * @param data
-     */
-    @PostMapping("/end")
-    void updatePurchaseDetailEnd(@RequestParam("data") String data);
-
-}

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

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

+ 55 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/po/purchase/PurchaseDetailEnd.java

@@ -0,0 +1,55 @@
+package com.usoftchina.saas.inquiry.po.purchase;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/15
+ */
+public class PurchaseDetailEnd {
+
+    private String pd_code;
+    private short pd_detno;
+    private short pd_ended;
+    private Integer pd_id;
+
+    public String getPd_code() {
+        return pd_code;
+    }
+
+    public void setPd_code(String pd_code) {
+        this.pd_code = pd_code;
+    }
+
+    public short getPd_detno() {
+        return pd_detno;
+    }
+
+    public void setPd_detno(short pd_detno) {
+        this.pd_detno = pd_detno;
+    }
+
+    public short getPd_ended() {
+        return pd_ended;
+    }
+
+    public void setPd_ended(short pd_ended) {
+        this.pd_ended = pd_ended;
+    }
+
+    public Integer getPd_id() {
+        return pd_id;
+    }
+
+    public void setPd_id(Integer pd_id) {
+        this.pd_id = pd_id;
+    }
+
+    public PurchaseDetailEnd() {
+    }
+
+    public PurchaseDetailEnd(String pd_code, short pd_detno, short pd_ended, Integer pd_id) {
+        this.pd_code = pd_code;
+        this.pd_detno = pd_detno;
+        this.pd_ended = pd_ended;
+        this.pd_id = pd_id;
+    }
+}

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

@@ -3,4 +3,4 @@ b2b:
     inquiry: https://test-inquiry.uuzcc.cn
     Component: https://test-mall.uuzcc.cn
     product: http://test-product.uuzcc.cn
-    uu: https://test-b2b.uuzcc.cn
+    common: https://test-b2b.uuzcc.cn

+ 1 - 1
applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendMessageApi.java

@@ -17,7 +17,7 @@ public interface SendMessageApi {
     class SendMessageApiFallBack implements SendMessageApi {
         @Override
         public Result sendMsg(MessageInfo info) {
-            return null;
+            return Result.error("网络异常,请稍后重试!");
         }
     }
 }

+ 48 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/config/B2BConfig.java

@@ -0,0 +1,48 @@
+package com.usoftchina.saas.transfers.config;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/15
+ */
+@ConfigurationProperties(prefix = "b2b.baseUrl")
+public class B2BConfig {
+
+    private String inquiry;
+    private String Component;
+    private String product;
+    private String common;
+
+    public String getInquiry() {
+        return inquiry;
+    }
+
+    public void setInquiry(String inquiry) {
+        this.inquiry = inquiry;
+    }
+
+    public String getComponent() {
+        return Component;
+    }
+
+    public void setComponent(String component) {
+        Component = component;
+    }
+
+    public String getProduct() {
+        return product;
+    }
+
+    public void setProduct(String product) {
+        this.product = product;
+    }
+
+    public String getCommon() {
+        return common;
+    }
+
+    public void setCommon(String common) {
+        this.common = common;
+    }
+}

+ 5 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/ReceiveService.java

@@ -68,6 +68,11 @@ public class ReceiveService {
                case PRODUCT:        //物料库上传
                    task = new SendProductTask();
                    break;
+               case PURCHASEEND:
+                   task = new SendPurchaseEndTask();
+                   break;
+               default:
+                   break;
            }
 
            task.execute(info);

+ 9 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/impl/SaleDownServiceImpl.java

@@ -119,16 +119,25 @@ public class SaleDownServiceImpl implements SaleDownService{
 
     @Override
     public void closeSaleDown(String data) {
+        data = getIds(data);
         Long companyId = TransfersContextHodler.getB2bCompanyId();
         saledownMapper.batchUpdateClose(data, companyId);
     }
 
     @Override
     public void resCloseSaleDown(String data) {
+        data = getIds(data);
         Long companyId = TransfersContextHodler.getB2bCompanyId();
         saledownMapper.batchUpdateResClose(data, companyId);
     }
 
+    private String getIds(String str) {
+        if (str.startsWith("[")) {
+            return str.substring(1, str.length() - 1);
+        } else {
+            return str;
+        }
+    }
    /* public String getMaxnumber(BillCodeSeq bill) {
         String code = maxnumberService.getMaxnumber(bill.getCaller(), false).getData();
         DocBaseDTO base = new DocBaseDTO(0l, code, bill.getName());

+ 1 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/Executable.java

@@ -20,5 +20,5 @@ public abstract class Executable {
     /**
      * 执行任务
      */
-    public abstract void execute(MessageInfo messageInfo);
+    public abstract void execute(MessageInfo messageInfo) throws Exception;
 }

+ 79 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseEndTask.java

@@ -0,0 +1,79 @@
+package com.usoftchina.saas.transfers.task;
+
+import com.usoftchina.saas.account.api.CompanyApi;
+import com.usoftchina.saas.inquiry.po.purchase.PurchaseDetailEnd;
+import com.usoftchina.saas.purchase.api.PurchaseApi;
+import com.usoftchina.saas.purchase.dto.PurchaseDetailDTO;
+import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
+import com.usoftchina.saas.utils.CollectionUtils;
+import com.usoftchina.saas.utils.JsonUtils;
+import com.usoftchina.saas.utils.http.HttpUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author chenwei
+ * @Date 2019/01/15
+ */
+public class SendPurchaseEndTask extends Executable {
+
+    @Autowired
+    private PurchaseApi purchaseApi;
+    @Autowired
+    private CompanyApi companyApi;
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(SendPurchaseEndTask.class);
+    private final String purchaseEndUrl = "/erp/purchase/end";
+
+    @Override
+    public void execute(MessageInfo messageInfo) throws Exception {
+        String accessSecretKey = companyApi.getCompanyById(messageInfo.getCompanyId()).getData().getAccessKey();
+        PurchaseFormDTO purchaseFormDTO = purchaseApi.getFormData(Long.parseLong(messageInfo.getBizId())).getData();
+        short endStatus = 0;
+        //结案、反结案
+        if("CLOSE".equals(purchaseFormDTO.getMain().getPu_statuscode())) {
+            endStatus = 1;     //结案
+        } else {
+            endStatus = 0;     //反结案
+        }
+        List<PurchaseDetailDTO> purchaseDetailDTOList = purchaseFormDTO.getItems();
+        List<PurchaseDetailEnd> purchaseDetailEndList = new ArrayList<PurchaseDetailEnd>();
+        if (!CollectionUtils.isEmpty(purchaseDetailDTOList)) {
+            //构造需要发送的数据
+            for (PurchaseDetailDTO purchaseDetailDTO : purchaseDetailDTOList) {
+                PurchaseDetailEnd purchaseDetailEnd = new PurchaseDetailEnd(purchaseDetailDTO.getPd_code(),
+                        new BigDecimal(purchaseDetailDTO.getPd_detno()).shortValue(), endStatus,
+                        new BigDecimal(purchaseDetailDTO.getId()).intValue());
+                purchaseDetailEndList.add(purchaseDetailEnd);
+            }
+            //发送给b2b
+            sendPurchaseEndToB2B(purchaseEndUrl, Long.parseLong(String.valueOf(messageInfo.getBizId())),
+                    JsonUtils.toJsonString(purchaseDetailEndList), accessSecretKey);
+        }
+
+    }
+
+    /**
+     * 发送http请求,更新上传状态
+     * @param bizId
+     * @param data
+     * @param accessSecretKey
+     * @throws Exception
+     */
+    private void sendPurchaseEndToB2B(String url, Long bizId, String data, String accessSecretKey) throws Exception {
+        Map<String, String> params = new HashMap<String, String>();
+        params.put("data", JsonUtils.toJsonString(data));
+        HttpUtil.Response response = HttpUtil.sendPostRequest(url, params, true, accessSecretKey);
+        if (response.getStatusCode() == 200){
+            purchaseApi.updateB2BStatus(bizId, "已上传");
+        }
+    }
+}

+ 27 - 5
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseTask.java

@@ -1,21 +1,26 @@
 package com.usoftchina.saas.transfers.task;
 
 import com.usoftchina.saas.account.api.CompanyApi;
-import com.usoftchina.saas.inquiry.api.B2BPurchaseApi;
+import com.usoftchina.saas.account.dto.CompanyDTO;
 import com.usoftchina.saas.inquiry.po.purchase.Purchase;
 import com.usoftchina.saas.inquiry.po.purchase.PurchaseDetail;
 import com.usoftchina.saas.purchase.api.PurchaseApi;
 import com.usoftchina.saas.purchase.dto.PurchaseDTO;
 import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
+import com.usoftchina.saas.transfers.config.B2BConfig;
 import com.usoftchina.saas.transfers.dto.MessageInfo;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.JsonUtils;
 import com.usoftchina.saas.utils.ObjectUtils;
+import com.usoftchina.saas.utils.http.HttpUtil;
+import com.usoftchina.saas.utils.http.HttpUtil.Response;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author: guq
@@ -28,12 +33,14 @@ public class SendPurchaseTask extends Executable {
     @Autowired
     private PurchaseApi purchaseApi;
     @Autowired
-    private B2BPurchaseApi b2BPurchaseApi;
+    private B2BConfig b2bConfig;
 
     private static final Logger LOGGER = LoggerFactory.getLogger(SendProductTask.class);
+    private final String purchaseUrl = "/erp/purchase";
 
     @Override
-    public void execute(MessageInfo messageInfo) {
+    public void execute(MessageInfo messageInfo) throws Exception {
+        CompanyDTO companyDTO = companyApi.getCompanyById(messageInfo.getCompanyId()).getData();
         PurchaseFormDTO purchaseFormDTO = purchaseApi.getFormData(Long.parseLong(messageInfo.getBizId())).getData();
         if (!ObjectUtils.isEmpty(purchaseFormDTO)){
             //采购单主表数据
@@ -44,10 +51,25 @@ public class SendPurchaseTask extends Executable {
             List<PurchaseDetail> b2bPurchaseDetailList = BeanMapper.mapList(purchaseFormDTO.getItems(), PurchaseDetail.class);
             b2bPurchase.setPurchaseDetails(b2bPurchaseDetailList);
 
-            /*SavePurchaseListResp savePurchaseListResp = */
-            b2BPurchaseApi.savePurchase(JsonUtils.toJsonString(b2bPurchase));
+            sendPurchaseToB2B(b2bConfig.getCommon() + purchaseUrl, Long.parseLong(messageInfo.getBizId()), JsonUtils.toJsonString(b2bPurchase), companyDTO.getAccessKey());
             purchaseApi.updateB2BStatus(Long.parseLong(messageInfo.getBizId()), "已上传");
         }
 
     }
+
+    /**
+     * 发送http请求
+     * @param bizId
+     * @param data
+     * @param accessSecretKey
+     * @throws Exception
+     */
+    private void sendPurchaseToB2B(String url, Long bizId, String data, String accessSecretKey) throws Exception {
+        Map<String, String> params = new HashMap<String, String>();
+        params.put("data", JsonUtils.toJsonString(data));
+        Response response = HttpUtil.sendPostRequest(url, params, true, accessSecretKey);
+        if (response.getStatusCode() == 200){
+            purchaseApi.updateB2BStatus(bizId, "已上传");
+        }
+    }
 }

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

@@ -92,4 +92,4 @@ b2b:
     inquiry: https://test-inquiry.uuzcc.cn
     Component: https://test-mall.uuzcc.cn
     product: http://test-product.uuzcc.cn
-    uu: https://test-b2b.uuzcc.cn
+    common: https://test-b2b.uuzcc.cn

+ 2 - 2
base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/AccountApi.java

@@ -87,7 +87,7 @@ public interface AccountApi {
      * @param companyId
      * @return
      */
-    @PostMapping("/bind/company")
+    @PostMapping("/account/bind/company")
     Result bindCompany(@RequestParam("accountId") long accountId, @RequestParam("companyId") long companyId);
 
     /**
@@ -96,7 +96,7 @@ public interface AccountApi {
      * @param roleIds
      * @return
      */
-    @PostMapping("/bind/roles")
+    @PostMapping("/account/bind/roles")
     Result bindRoles(@RequestParam("accountId") Long accountId, @RequestParam("roleIds") String roleIds);
 
     /**

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

@@ -371,9 +371,7 @@
           this.download()
           break;
       };
-      // document.documentElement.scrollTop = this.isfeature;
       window.addEventListener("scroll",this.handleFun);
-        // this.scrollH = Math.floor($('#feature').offset().top) - 260;
     },
     computed: {
       setTokenPage() {
@@ -395,7 +393,6 @@
     },
     methods: {
       handleFun(){
-        let top = $(document).scrollTop();
         let Y = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
         if ($('#feature').offset()) {
           // var scrollH = Math.floor($('#feature').offset().top) - 260;//500
@@ -611,7 +608,6 @@
           let featH = Math.floor($('#feature').offset().top) - 70;
           this.animate(featH);//690
         },10);
-        // console.log($(document).scrollTop())
       },
       //功能
       service2(){
@@ -623,7 +619,6 @@
       },
       // 下载
       download(){
-        // document.documentElement.scrollTop = 4190;
         // window.scrollTo(0,4190);
         clearInterval(this.timer);
         setTimeout(()=>{
@@ -644,12 +639,6 @@
             step = step > 0 ? Math.ceil(step) : Math.floor(step);
             leader = leader + step;
             $(document).scrollTop(leader);
-        //     document.documentElement.scrollTop++;
-        //     if(document.documentElement.scrollTop ){
-        //       document.documentElement.scrollTop = leader;
-        //   }else if(document.body.scrolltop){
-        //       document.body.scrolltop = leader;
-        //   }
             if (leader == target) {
                 clearInterval(this.timer);
             }
@@ -662,7 +651,6 @@
         } else {
           this.$store.commit('problemtrue')
         }
-        // this.isproblem = true
       }
     }
   }

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

@@ -334,7 +334,8 @@ main > section {
     width: 14px;
     height: 14px;
     border-radius: 50%;
-    margin: 7px 8px 0 0;
+    margin-top: 1.2%;
+    margin-right: 1%;
 }
 .bz-right-conent li {
     border-bottom: 1px solid #E8ECEF;

+ 164 - 0
frontend/saas-web/app/view/document/uusetting/UUSetting.js

@@ -0,0 +1,164 @@
+Ext.define('saas.view.document.uusetting.UUSetting', {
+    extend: 'Ext.panel.Panel',
+    xtype: 'document-uusetting',
+    autoScroll: true,
+    layout:'fit',
+    controller:'document-uusetting',
+    viewModel: {
+        type: 'document-uusetting'
+    },
+    defaultType:'vendorkind',
+    requires: [
+        'Ext.button.Segmented'
+    ],
+    
+    etc:{
+        common: {
+            columns: [{
+                xtype:'actioncolumn',
+                text:'操作',
+                align: 'center',
+                items: [{
+                    xtype: 'button',
+                    tooltip: 'UU设置',
+                    iconCls: 'x-sa sa-setting',
+                    handler: 'onUUSetting'
+                }]
+            }]
+        },
+        vendorkind:{
+            columns: [{
+                text: '供应商编号',
+                dataIndex: 've_code',
+                width: 120
+            }, {
+                text: '供应商名称',
+                dataIndex: 've_name',
+                width: 120
+            }, {
+                text: '状态',
+                dataIndex: 've_status',
+                width: 80,
+                align: 'center'
+            }, {
+                text: '类型',
+                dataIndex: 've_type',
+                width: 100,
+                align: 'center'
+            }, {
+                text: '采购员',
+                dataIndex: 've_buyername',
+                width: 120,
+            }, {
+                text: '供应商UU',
+                dataIndex: 've_uu',
+                width: 120
+            }],
+        },
+        customerkind:{
+            columns: [{
+                text: '客户编号',
+                dataIndex: 'cu_code',
+                width: 120
+            }, {
+                text: '客户名称',
+                dataIndex: 'cu_name',
+                width: 120
+            }, {
+                text: '状态',
+                dataIndex: 'cu_status',
+                width: 80,
+                align: 'center'
+            }, {
+                text: '类型',
+                dataIndex: 'cu_type',
+                width: 100,
+                align: 'center'
+            }, {
+                text: '业务员',
+                dataIndex: 'cu_sellername',
+                width: 120,
+            }, {
+                text: '客户UU',
+                dataIndex: 'cu_uu',
+                width: 120
+            }],
+        }
+    },
+
+    initComponent: function() {
+        var me = this;
+
+        Ext.apply(me, {
+            dockedItems: [{
+                xtype: 'toolbar',
+                dock: 'top',
+                padding: '12 5 0 12',
+                items: [{
+                    xtype: 'segmentedbutton',
+                    reference: 'dataKind',
+                    value: 'vendorkind',
+                    name : 'segmentedbutton',
+                    items: [{
+                        name:'vendorkind',
+                        text: '供应商',
+                        value: 'vendorkind',
+                    }, {
+                        name:'customerkind',
+                        text: '客户',
+                        value: 'customerkind',
+                    }],
+                    listeners: {
+                        toggle: 'onToggle'
+                    }
+                }, '->', {
+                    xtype: 'textfield',
+                    emptyText: '输入编号/名称'
+                }, {
+                    xtype: 'button',
+                    text: '查询',
+                    handler: 'onQuery'
+                }]
+            }],
+            items:[{
+                xtype:'grid',
+                margin: 12,
+                flex: 1,
+                border: 1,
+                plugins: [{
+                    ptype: 'menuclipboard'
+                }],
+                dockedItems: [{
+                    xtype: 'pagingtoolbar',
+                    dock: 'bottom',
+                    cls:'x-basepanel-pagingtoolbar',
+                    displayInfo: true,
+                    bind: {
+                        store: '{vendorkind}',
+                    },
+                    items: [{
+                        iconCls: 'x-sa sa-setting',
+                        text: '列设置',
+                        handler: 'onColSetting',
+                        bind: {
+                            hidden: '{!configurable || !isAdmin}'
+                        }
+                    }]
+                }],
+                listeners:{
+                    boxready: 'onBoxReady',
+                    render:'loadDefualt'
+                }
+            }],
+        });
+
+        me.callParent(arguments);
+    },
+
+    refresh: function() {
+        var store = this.down('grid').store;
+        store.load();
+    }
+})
+
+

+ 79 - 0
frontend/saas-web/app/view/document/uusetting/UUSettingController.js

@@ -0,0 +1,79 @@
+Ext.define('saas.view.document.uusetting.UUSettingController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.document-uusetting',
+    
+    onBoxReady: function(grid) {
+        var me = this,
+        vm = me.getViewModel();
+
+        var gridBodyBox = grid.body.dom.getBoundingClientRect(),
+        gridBodyBoxHeight = gridBodyBox.height;
+        var pageSize = Math.floor(gridBodyBoxHeight / 33);
+
+        vm.getStore('vendorkind').setPageSize(pageSize);
+        vm.getStore('customerkind').setPageSize(pageSize);
+    },
+
+    loadDefualt:function(grid){
+        var me = this,
+        view = me.getView(),
+        vm = me.getViewModel(),
+        defaultKind = view.defaultType;
+        
+        var etc = view.etc;
+        var columns = etc[defaultKind].columns;
+        var store = vm.getStore(defaultKind);
+        store.load();
+        grid.reconfigure(store, Ext.Array.merge(columns, etc.common.columns));
+        grid.kind = defaultKind
+    },
+
+    onToggle: function(container, button, pressed) {
+        var me = this,
+        view = me.getView(),
+        vm = me.getViewModel(),
+        kind = button.value,
+        grid = view.down('grid');
+        
+        var etc = view.etc;
+        var columns = etc[kind].columns;
+        var store = vm.getStore(kind);
+        store.load();
+        grid.reconfigure(store, Ext.Array.merge(columns, etc.common.columns));
+        grid.kind = kind;
+    },
+
+    onQuery: function() {
+        console.log('onQuery');
+    },
+
+    onUUSetting: function(tableView, rowIdx, colIdx, btn, e, record, tr) {
+        var me = this;
+        var grid = tableView.up('grid');
+        var kind = grid.kind;
+        var config = {
+            kind: kind
+        };
+        if(kind == 'vendorkind') {
+            config.cname = record.get('ve_name');
+        }else {
+            config.cname = record.get('cu_name');
+        }
+        this.getViewModel().setData(record.data);
+        this.showUUSettingWin(config);
+    },
+
+    showUUSettingWin: function(config) {
+        var me = this,
+        view = me.getView();
+
+        var win = Ext.getCmp();
+        if(!win) {
+            win = Ext.create('saas.view.document.uusetting.UUSettingWin', Ext.Object.merge({
+                listView: view,
+            }, config));
+            view.add(win);
+        }
+        win.show();
+    }    
+});

+ 83 - 0
frontend/saas-web/app/view/document/uusetting/UUSettingModel.js

@@ -0,0 +1,83 @@
+Ext.define('saas.view.document.uusetting.UUSettingModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.document-uusetting',
+    data: {
+        title: '客户类型'
+    },
+    stores: {
+        vendorkind:{
+            fields:['ve_code', 've_name', 've_status', 've_type', 've_buyername', 've_uu'],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/vendor/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list',
+                    totalProperty: 'data.total'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + (response.responseJson?response.responseJson.message:'请求超时'));
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: store.exportNumber?store.exportNumber:op._page,
+                        size: store.exportPageSize?store.exportPageSize:store.pageSize,
+                    });
+                }
+            }
+        },
+        customerkind: {
+            fields:['cu_code', 'cu_name', 'cu_status', 'cu_type', 'cu_sellername', 'cu_uu'],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/customer/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list',
+                    totalProperty: 'data.total'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + (response.responseJson?response.responseJson.message:'请求超时'));
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: store.exportNumber?store.exportNumber:op._page,
+                        size: store.exportPageSize?store.exportPageSize:store.pageSize,
+                    });
+                }
+            }
+        }
+    }
+});

+ 459 - 0
frontend/saas-web/app/view/document/uusetting/UUSettingWin.js

@@ -0,0 +1,459 @@
+Ext.define('saas.view.document.uusetting.UUSettingWin', {
+    extend: 'Ext.window.Window',
+    xtype: 'uusettingwin',
+
+    title: '设置企业UU',
+    width: 680,
+    cls: 'x-window-dbfind',
+    closlayout: 'fit',
+    modal: true,
+    resizable: false,
+    bodyPadding: 20,
+
+    etc: {
+        vendorkind: {
+            uuName: 've_uu',
+            getUUUrl: '/api/document/vendor/getVendorUU',
+            saveUrl: '/api/document/vendor/save',
+            formItems: [{
+                xtype: 'hidden',
+                name: 'id',
+                bind: '{id}',
+                fieldLabel: 'id'
+            }, {
+                xtype: 'textfield',
+                name: 've_code',
+                bind: '{ve_code}',
+                fieldLabel: '供应商编号'
+            }, {
+                xtype: 'textfield',
+                name: 've_name',
+                bind: '{ve_name}',
+                fieldLabel: '供应商名称',
+                hidden: false
+            }, {
+                xtype: 'textfield',
+                name: 've_shortname',
+                bind: '{ve_shortname}',
+                fieldLabel: '供应商简称'
+            }, {
+                xtype: 'hidden',
+                name: 've_status',
+                bind: '{ve_status}',
+                fieldLabel: '状态'
+            }, {
+                xtype: 'hidden',
+                name: 've_statuscode',
+                bind: '{ve_statuscode}',
+                fieldLabel: '状态码'
+            }, {
+                xtype: "textfield",
+                name: "ve_type",
+                bind: '{ve_type}',
+                fieldLabel: "供应商类型"
+            }, {
+                xtype: "datefield",
+                name: "ve_begindate",
+                format: 'Y-m-d H:i:s',
+                bind: '{ve_begindate}',
+                fieldLabel: "期初日期"
+            }, {
+                xtype: "textfield",
+                name: "ve_currency",
+                bind: '{ve_currency}',
+                fieldLabel: "币别"
+            }, {
+                xtype: "numberfield",
+                name: "ve_taxrate",
+                bind: '{ve_taxrate}',
+                fieldLabel: "税率(%)"
+            },{
+                xtype: "numberfield",
+                name: "ve_beginapamount",
+                bind: '{ve_beginapamount}',
+                fieldLabel: "期初应付(元)"
+            }, {
+                xtype: "numberfield",
+                hideTrigger: true,
+                name: "ve_beginprepayamount",
+                bind: '{ve_beginprepayamount}',
+                fieldLabel: "期初预付(元)"
+            }, {
+                xtype: "numberfield",
+                name: "ve_leftamount",
+                bind: '{ve_leftamount}',
+                fieldLabel: "应付余额(元)",
+            }, {
+                xtype: "numberfield",
+                name: "ve_promisedays",
+                bind: '{ve_promisedays}',
+                fieldLabel: "结算天数",
+            }, {
+                xtype: "textfield",
+                name: "ve_nsrzh",
+                bind: '{ve_nsrzh}',
+                fieldLabel: "纳税人识别号"
+            }, {
+                xtype: "textfield",
+                name: "ve_bankcode",
+                bind: '{ve_bankcode}',
+                fieldLabel: "开户银行"
+            }, {
+                xtype: "textfield",
+                name: "ve_bankaccount",
+                bind: '{ve_bankaccount}',
+                fieldLabel: "银行账户"
+            }, {
+                xtype: "hidden",
+                name: "ve_buyercode",
+                bind: '{ve_buyercode}',
+                fieldLabel: "采购员编号"
+            }, {
+                xtype: "textfield",
+                name: "ve_buyername",
+                bind: '{ve_buyername}',
+                fieldLabel: "采购员"
+            }, {
+                xtype: "hidden",
+                name: "ve_buyerid",
+                bind: '{ve_buyerid}',
+                fieldLabel: "采购员ID"
+            }, {
+                xtype: "textfield",
+                name: "ve_address",
+                bind: '{ve_address}',
+                fieldLabel: "公司地址"
+            }, {
+                fieldLabel: "备注",
+                xtype: 'textfield',
+                bind: '{ve_remark}',
+                name: "ve_remark"
+            }, {
+                xtype: "textfield",
+                name: "ve_text1",
+                bind: '{ve_text1}',
+                fieldLabel: "自定义字段1"
+            }, {
+                xtype: "textfield",
+                name: "ve_text2",
+                bind: '{ve_text2}',
+                fieldLabel: "自定义字段2"
+            }, {
+                xtype: "textfield",
+                name: "ve_text3",
+                bind: '{ve_text3}',
+                fieldLabel: "自定义字段3"
+            }, {
+                xtype: "textfield",
+                name: "ve_text4",
+                bind: '{ve_text4}',
+                fieldLabel: "自定义字段4"
+            }, {
+                xtype: "textfield",
+                name: "ve_text5",
+                bind: '{ve_text5}',
+                fieldLabel: "自定义字段5"
+            }, {
+                xtype: 'textfield',
+                fieldLabel: '企业UU',
+                name: 've_uu',
+                bind: '{ve_uu}',
+                hidden: false,
+                allowBlank: false,
+                readOnly: true,
+                beforeLabelTextTpl: "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>"
+            }]
+        },
+        customerkind: {
+            uuName: 'cu_uu',
+            getUUUrl: '/api/document/customer/getCustomerUU',
+            saveUrl: '/api/document/customer/save',
+            formItems: [{
+                xtype: 'hidden',
+                name: 'id',
+                bind: '{id}',
+                fieldLabel: 'id'
+            }, {
+                xtype: 'textfield',
+                name: 'cu_code',
+                bind: '{cu_code}',
+                fieldLabel: '客户编号'
+            }, {
+                xtype: 'textfield',
+                name: 'cu_name',
+                bind: '{cu_name}',
+                fieldLabel: '客户名称',
+                hidden: false
+            }, {
+                xtype: 'textfield',
+                name: 'cu_shortname',
+                bind: '{cu_shortname}',
+                fieldLabel: '客户简称'
+            }, {
+                xtype: "textfield",
+                name: "cu_type",
+                bind: '{cu_type}',
+                fieldLabel: "客户类型"
+            }, {
+                xtype: 'hidden',
+                name: 'cu_status',
+                bind: '{cu_status}',
+                fieldLabel: '状态'
+            }, {
+                xtype: 'hidden',
+                name: 'cu_statuscode',
+                bind: '{cu_statuscode}',
+                fieldLabel: '状态码'
+            }, {
+                xtype: "datefield",
+                name: "cu_begindate",
+                format: 'Y-m-d H:i:s',
+                bind: '{cu_begindate}',
+                fieldLabel: "期初日期"
+            }, {
+                xtype: "textfield",
+                name: "cu_currency",
+                bind: '{cu_currency}',
+                fieldLabel: "币别"
+            }, {
+                xtype: "numberfield",
+                name: "cu_taxrate",
+                bind: '{cu_taxrate}',
+                fieldLabel: "税率(%)"
+            },{
+                xtype: "numberfield",
+                hideTrigger: true,
+                name: "cu_beginaramount",
+                bind: '{cu_beginaramount}',
+                fieldLabel: "期初应收(元)"
+            }, {
+                xtype: "numberfield",
+                name: "cu_beginprerecamount",
+                bind: '{cu_beginprerecamount}',
+                fieldLabel: "期初预收(元)"
+            }, {
+                xtype: 'textfield',
+                name: "cu_leftamount",
+                bind: '{cu_leftamount}',
+                fieldLabel: "应收余额(元)"
+            }, {
+                xtype: "numberfield",
+                name: "cu_promisedays",
+                bind: '{cu_promisedays}',
+                fieldLabel: "结算天数"
+            }, {
+                xtype: "hidden",
+                name: "cu_sellerid",
+                bind: '{cu_sellerid}',
+                fieldLabel: "业务员id"
+            }, {
+                xtype: "hidden",
+                name: "cu_sellercode",
+                bind: '{cu_sellercode}',
+                fieldLabel: "业务员code"
+            }, {
+                xtype: "textfield",
+                name: "cu_sellername",
+                bind: '{cu_sellername}',
+                fieldLabel: "业务员"
+            }, {
+                xtype: "hidden",
+                name: "cu_nsrzh",
+                bind: '{cu_nsrzh}',
+                fieldLabel: "纳税人识别号"
+            }, {
+                xtype: "hidden",
+                name: "cu_bankaccount",
+                bind: '{cu_bankaccount}',
+                fieldLabel: "开户银行"
+            }, {
+                xtype: "hidden",
+                name: "cu_bankcode",
+                bind: '{cu_bankcode}',
+                fieldLabel: "银行账户"
+            }, {
+                xtype: 'textfield',
+                name: "cu_uu",
+                bind: '{cu_uu}',
+                fieldLabel: "企业UU",
+                hidden: false,
+                allowBlank: false,
+                readOnly: true,
+                beforeLabelTextTpl: "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>"
+            }, {
+                fieldLabel: "备注",
+                xtype: 'textfield',
+                name: "cu_remark",
+                bind: '{cu_remark}'
+            }, {
+                xtype: "textfield",
+                name: "cu_text1",
+                bind: '{cu_text1}',
+                fieldLabel: "自定义字段1"
+            }, {
+                xtype: "textfield",
+                name: "cu_text2",
+                bind: '{cu_text2}',
+                fieldLabel: "自定义字段2"
+            }, {
+                xtype: "textfield",
+                name: "cu_text3",
+                bind: '{cu_text3}',
+                fieldLabel: "自定义字段3"
+            }, {
+                xtype: "textfield",
+                name: "cu_text4",
+                bind: '{cu_text4}',
+                fieldLabel: "自定义字段4"
+            }, {
+                xtype: "textfield",
+                name: "cu_text5",
+                bind: '{cu_text5}',
+                fieldLabel: "自定义字段5"
+            }]
+        }
+    },
+
+    initComponent: function () {
+        var me = this;
+        var kind = me.kind;
+        me.uuName = me.etc[kind].uuName;
+        me.getUUUrl = me.etc[kind].getUUUrl;
+        me.saveUrl = me.etc[kind].saveUrl;
+        var items = Ext.Array.merge(me.etc[kind].formItems, [{
+            xtype: 'detailGridField',
+            detnoColumn: null,
+            minHeight: 145,
+            emptyRows: 3,
+            showCount: false,
+            width: 280,
+            editable: false,
+            emptyText: '<span style="color: red;">没有查找到匹配的企业,请确认该企业已注册优软商务平台</span>',
+            store: Ext.create('Ext.data.Store', {
+                fields: [{
+                    name: 'name',
+                    type: 'string'
+                }, {
+                    name: 'uu',
+                    type: 'string'
+                }],
+                data: []
+            }),
+            columns: [{
+                text: '企业名称',
+                dataIndex: 'name',
+            }, {
+                text: 'UU',
+                dataIndex: 'uu'
+            }, {
+                xtype:'actioncolumn',
+                text:'操作',
+                align: 'center',
+                items: [{
+                    xtype: 'button',
+                    tooltip: '选择此项填入',
+                    iconCls: 'x-sa sa-edit',
+                    handler: function(tableView, rowIdx, colIdx, btn, e, record, tr) {
+                        var form = tableView.up('form');
+                        var uuField = form.query('[name=' + me.uuName + ']')[0];
+                        uuField.setValue(record.data.uu);
+                    }
+                }]
+            }]
+        }]);
+        Ext.apply(me, {
+            items: [{
+                xtype: 'form',
+                layout: 'column',
+                fieldDefaults: {
+                    hidden: true,
+                    margin: '0 0 10 0',
+                    labelAlign: 'right',
+                    labelWidth: 90,
+                    columnWidth: 0.5,
+                },
+                items: items
+            }],
+            buttonAlign: 'center',
+            buttons: [{
+                text: '确定',
+                formBind: true,
+                handler: function () {
+                    var win = this.up('window'),
+                        form = win.down('form');
+
+                    var uuField = form.query('[name=' + win.uuName + ']')[0];
+                    if (form.isValid()) {
+                        var values = form.getValues();
+                        me.onSave(values);
+                    } else {
+                        saas.util.BaseUtil.showErrorToast('表单校验失败,请检查字段是否合法');
+                    }
+                }
+            }, {
+                text: '取消',
+                handler: function () {
+                    me.close();
+                }
+            }]
+        });
+        me.callParent(arguments);
+    },
+
+    listeners: {
+        boxready: function (win) {
+            win.setLoading(true);
+            var name = win.cname;
+            saas.util.BaseUtil.request({
+                url: win.getUUUrl,
+                method: 'GET',
+                params: {
+                    name: name
+                }
+            }).then(function (res) {
+                var resData = res.data;
+                var data = [];
+                if (!Ext.Object.isEmpty(resData) && resData[name]) {
+                    data.push({
+                        name: name,
+                        uu: resData[name].uu
+                    });
+                }
+                win.setLoading(false);
+                var grid = win.down('grid');
+                var store = grid.store;
+                store.loadData(data);
+            }).catch(function (e) {
+                win.setLoading(false);
+            });
+        }
+    },
+
+    onSave: function (values) {
+        var view = this;
+        var kind = view.kind;
+        var main = values;
+        var params = {
+            codeModified: false,
+            main: main,
+            items: [],
+            items1: [],
+            items2: []
+        };
+
+        view.setLoading(true);
+        saas.util.BaseUtil.request({
+            url: view.saveUrl,
+            params: JSON.stringify(params),
+            method: 'POST'
+        }).then(function (res) {
+            view.setLoading(false);
+            saas.util.BaseUtil.showSuccessToast('修改UU号成功');
+            view.close();
+            view.listView.refresh();
+        }).catch(function (e) {
+            view.setLoading(false);
+            saas.util.BaseUtil.showErrorToast('修改UU号失败: ' + e.message);
+        });
+    },
+});

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

@@ -159,6 +159,13 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                     text: "转存汇率",
                     dataIndex: "ftd_rate",
                     width: 150.0
+                }, {
+                    text: "结算号",
+                    dataIndex: "ftd_paycode",
+                    width: 150,
+                    editor: {
+                        xtype: ''
+                    }
                 }, {
                     text: "结算方式",
                     width: 110.0,
@@ -194,13 +201,6 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                             }]
                         })
                     }
-                }, {
-                    text: "结算号",
-                    dataIndex: "ftd_paycode",
-                    width: 150,
-                    editor: {
-                        xtype: ''
-                    }
                 }, {
                     text: "备注",
                     dataIndex: "ftd_remark",

+ 53 - 8
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -97,26 +97,71 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
                     dataIndex: 'ftd_bankname',
                     width: 150
                 }, {
+                    text: "转出币别",
+                    dataIndex: "ftd_currency",
+                    align:'center'
+                }, {
+                    text: "转出金额(元)",
+                    xtype: 'numbercolumn',
+                    dataIndex: "ftd_nowbalance",
+                    allowBlank: false,
+                    width: 150.0,
+                    editor: {
+                        xtype: "numberfield",
+                        decimalPrecision: 2
+                    },
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 2, true);
+                    },
+                    summaryType: 'sum',
+                    summaryRenderer: function(v, d, f, m) {
+                        return saas.util.BaseUtil.numberFormat(v, 2, true);
+                    }
+                },{
                     text: '转入账户',
                     dataIndex: 'ftd_inbankname',
                     width: 150
                 }, {
-                    text: '金额(元)',
+                    text: "转入币别",
+                    dataIndex: "ftd_incurrency",
+                    align:'center'
+                }, {
+                    text: "转入金额(元)",
                     xtype: 'numbercolumn',
-                    dataIndex: 'ftd_nowbalance',
-                    width: 110,
+                    dataIndex: "ftd_innowbalance",
+                    allowBlank: false,
+                    width: 150.0,
+                    editor: {
+                        xtype: "numberfield",
+                        decimalPrecision: 2
+                    },
                     renderer: function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     },
+                    summaryType: 'sum',
+                    summaryRenderer: function(v, d, f, m) {
+                        return saas.util.BaseUtil.numberFormat(v, 2, true);
+                    }
+                },{
+                    text: '转存汇率(%)',
+                    xtype: 'numbercolumn',
+                    dataIndex: 'ftd_rate',
+                    width: 110,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, true);
+                    },
                 }, {
+                        text: "结算号",
+                        dataIndex: "ftd_paycode",
+                        width: 150,
+                        editor: {
+                            xtype: ''
+                        }
+                },{
                     text: '结算方式',
                     dataIndex: 'ftd_paymethod',
                     width: 150
-                }, {
-                    text: '结算号',
-                    dataIndex: 'ftd_paycode',
-                    hidden: true
-                }, {
+                },  {
                     text: '审核状态',
                     dataIndex: 'ft_status',
                     align: 'center',

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

@@ -127,6 +127,18 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {
+                    text: '币别',
+                    dataIndex: 'or_currency',
+                    width: 120
+                } ,{
+                    text: '汇率(%)',
+                    dataIndex: 'or_rate',
+                    xtype: 'numbercolumn',
+                    width: 120,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    },
+                } ,{
                     text: '单据状态',
                     align: 'center',
                     dataIndex: 'or_status',
@@ -166,6 +178,18 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {
+                    text: '币别',
+                    dataIndex: 'or_currency',
+                    width: 120
+                } ,{
+                    text: '汇率(%)',
+                    dataIndex: 'or_rate',
+                    xtype: 'numbercolumn',
+                    width: 120,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    },
+                } ,{
                     text: '单据状态',
                     align: 'center',
                     dataIndex: 'or_status',

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

@@ -125,6 +125,18 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {
+                    text: '币别',
+                    dataIndex: 'os_currency',
+                    width: 120
+                } ,{
+                    text: '汇率(%)',
+                    dataIndex: 'os_rate',
+                    xtype: 'numbercolumn',
+                    width: 120,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    },
+                } ,{
                     text: '单据状态',
                     align: 'center',
                     dataIndex: 'os_status',
@@ -165,6 +177,18 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {
+                    text: '币别',
+                    dataIndex: 'os_currency',
+                    width: 120
+                } ,{
+                    text: '汇率(%)',
+                    dataIndex: 'os_rate',
+                    xtype: 'numbercolumn',
+                    width: 120,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    },
+                } ,{
                     text: '单据状态',
                     align: 'center',
                     dataIndex: 'os_status',

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

@@ -99,7 +99,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         return false;
                     }
                     Ext.apply(f, {
-                        defaultCondition: "sl_vendid = "+pb_vendid+" and sl_currency ='"+pb_currency+"' AND sl_custid <> 0 AND (  sl_kind IN ( '采购验收单','采购验退单' ) OR ( sl_kind = '期初余额' AND sl_ym = (select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid) ) "+
+                        defaultCondition: "sl_vendid = "+pb_vendid+" and sl_currency ='"+pb_currency+"' AND sl_custid = 0 AND (  sl_kind IN ( '采购验收单','采购验退单' ) OR ( sl_kind = '期初余额' AND sl_ym = (select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid) ) "+
                         ") and sl_namount<>0 "
                     });
                 }

+ 24 - 0
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -98,6 +98,18 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
                             return saas.util.BaseUtil.numberFormat(v, 2, true);
                         },
                     }, {
+                        text: '币别',
+                        dataIndex: 'pb_currency',
+                        width: 120
+                    } ,{
+                        text: '汇率(%)',
+                        dataIndex: 'pb_rate',
+                        xtype: 'numbercolumn',
+                        width: 120,
+                        renderer: function(v, m, r) {
+                            return saas.util.BaseUtil.numberFormat(v, 6, false);
+                        },
+                    } ,{
                         text: '付款人',
                         dataIndex: 'pb_manname',
                         width: 110
@@ -145,6 +157,18 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
                     renderer: function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     },
+                } ,{
+                    text: '币别',
+                    dataIndex: 'pb_currency',
+                    width: 120
+                } ,{
+                    text: '汇率(%)',
+                    dataIndex: 'pb_rate',
+                    xtype: 'numbercolumn',
+                    width: 120,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    },
                 } ,{
                     text: '结算方式',
                     dataIndex: 'pd_paymethod',

+ 24 - 0
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -89,6 +89,18 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {
+                    text: '币别',
+                    dataIndex: 'rb_currency',
+                    width: 120
+                } ,{
+                    text: '汇率(%)',
+                    dataIndex: 'rb_rate',
+                    xtype: 'numbercolumn',
+                    width: 120,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    },
+                } ,{
                     text: '收款人',
                     dataIndex: 'rb_manname',
                     width: 80
@@ -138,6 +150,18 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {
+                    text: '币别',
+                    dataIndex: 'rb_currency',
+                    width: 120
+                } ,{
+                    text: '汇率(%)',
+                    dataIndex: 'rb_rate',
+                    xtype: 'numbercolumn',
+                    width: 120,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    },
+                } ,{
                     text: '结算方式',
                     dataIndex: 'rd_paymethod',
                     width: 120

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

@@ -510,6 +510,15 @@ Ext.define('saas.view.money.verification.FormPanel', {
                         listeners: {
                             change: 'clearDetails'
                         }
+                    }, {
+                        fieldLabel: '客户编号',
+                        xtype: 'hidden',
+                        name: 'vc_custcode',
+                    }, {
+                        fieldLabel: '客户名称',
+                        xtype: 'customerDbfindTrigger',
+                        name: 'vc_custname',
+                        allowBlank: false
                     }, {
                         xtype: 'condbfindtrigger',
                         fieldLabel: '币别汇率',
@@ -533,15 +542,6 @@ Ext.define('saas.view.money.verification.FormPanel', {
                             vtype: 'positiveNumber'
                         },
                     },  {
-                        fieldLabel: '客户编号',
-                        xtype: 'hidden',
-                        name: 'vc_custcode',
-                    }, {
-                        fieldLabel: '客户名称',
-                        xtype: 'customerDbfindTrigger',
-                        name: 'vc_custname',
-                        allowBlank: false
-                    }, {
                         fieldLabel: '日期',
                         xtype: 'datefield',
                         defaultValue: new Date(),

+ 13 - 1
frontend/saas-web/app/view/money/verification/QueryPanel.js

@@ -128,7 +128,19 @@ Ext.define('saas.view.money.verification.QueryPanel', {
                     renderer: function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
-                }]
+                },{
+                    text: '币别',
+                    dataIndex: 'vc_currency',
+                    width: 120
+                } ,{
+                    text: '汇率(%)',
+                    dataIndex: 'vc_rate',
+                    xtype: 'numbercolumn',
+                    width: 120,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    },
+                } ,]
             }
         });
         this.callParent(arguments);

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

@@ -131,7 +131,7 @@ Ext.define('saas.view.sale.business.QuoteWin', {
                 text: '确定',
                 handler: function () {
                     var win = this.up('window'),
-                        form = win.down('form')
+                        form = win.down('form'),
                         grid = form.down('grid');
 
                     if (form.isValid()) {
@@ -148,7 +148,7 @@ Ext.define('saas.view.sale.business.QuoteWin', {
             }, {
                 text: '取消',
                 handler: function () {
-
+                    me.close();
                 }
             }]
         });

+ 6 - 0
frontend/saas-web/resources/json/navigation.json

@@ -241,6 +241,12 @@
             "viewType": "document-customer-basepanel",
             "addType":"document-customer-formpanel",
             "leaf": true
+        }, {
+            "b2b":true,
+            "id": "document-uusetting",
+            "text": "UU设置",
+            "viewType": "document-uusetting",
+            "leaf": true
         }, {
             "id":"product-list-formpanel",
             "text": "物料资料",