Browse Source

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

guq 7 years ago
parent
commit
6393d1f80a
54 changed files with 782 additions and 573 deletions
  1. 20 1
      applications/document/document-api/src/main/java/com/usoftchina/saas/document/api/ProductApi.java
  2. 94 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductUploadDTO.java
  3. 3 143
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bankinformation.java
  4. 5 0
      applications/document/document-server/pom.xml
  5. 31 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  6. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java
  7. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java
  8. 31 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  9. 4 2
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  10. 2 2
      applications/document/document-server/src/main/resources/mapper/CurrencyMapper.xml
  11. 10 0
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  12. 6 5
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  13. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java
  14. 2 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java
  15. 48 10
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  16. 1 0
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  17. 5 2
      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/PublicProductApi.java
  19. 14 6
      applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/InquiryApiTest.java
  20. 4 4
      applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/PublicProductApiTest.java
  21. 0 15
      applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendApi.java
  22. 23 0
      applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendMessageApi.java
  23. 1 1
      applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendMessageApiFallBack.java
  24. 101 101
      applications/transfers/transfers-dto/src/main/java/com/usoftchina/saas/transfers/dto/MessageInfo.java
  25. 13 0
      applications/transfers/transfers-server/pom.xml
  26. 4 1
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/ReceiveService.java
  27. 3 1
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/Executable.java
  28. 115 0
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendProductTask.java
  29. 1 1
      base-servers/account/account-server/src/main/resources/mapper/CompanyMapper.xml
  30. 13 0
      frontend/saas-web/app/view/core/dbfind/types/BankInfoDbfindTrigger.js
  31. 1 1
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js
  32. 1 1
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  33. 7 1
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  34. 1 1
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  35. 6 0
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  36. 0 4
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  37. 4 56
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  38. 0 66
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  39. 23 34
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  40. 4 0
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  41. 13 0
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  42. 8 19
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  43. 4 0
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  44. 13 0
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  45. 8 19
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  46. 4 0
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  47. 13 0
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  48. 17 28
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  49. 2 2
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  50. 13 0
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  51. 17 28
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  52. 13 0
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  53. 17 16
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  54. 13 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

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

@@ -1,10 +1,13 @@
 package com.usoftchina.saas.document.api;
 package com.usoftchina.saas.document.api;
 
 
 import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.dto.ProductUploadDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 
 
@@ -31,5 +34,21 @@ public interface ProductApi {
     * @Date: 2018/10/16
     * @Date: 2018/10/16
     */
     */
     @RequestMapping("/product/updateLatestPurchasePrice")
     @RequestMapping("/product/updateLatestPurchasePrice")
-    public void updateLatestPurchasePrice(@RequestParam(value = "id") Long pu_id);
+    void updateLatestPurchasePrice(@RequestParam(value = "id") Long pu_id);
+
+    /**
+     * 获取需要上传的物料数据
+     * @return
+     */
+    @GetMapping("/b2b/upload/data")
+    Result<List<ProductUploadDTO>> getUploadData();
+
+    /**
+     * 批量更新物料上传状态
+     * @param ids
+     * @param status
+     * @return
+     */
+    @PostMapping("/b2b/status/update")
+    Result updateStatus(@RequestParam("ids") String ids, @RequestParam("status") String status);
 }
 }

+ 94 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductUploadDTO.java

@@ -0,0 +1,94 @@
+package com.usoftchina.saas.document.dto;
+
+import java.io.Serializable;
+
+/**
+ * @Description 上传B2B 物料对象
+ * @Author chenwei
+ * @Date 2019/01/10
+ */
+public class ProductUploadDTO implements Serializable {
+
+    private String pr_code;
+    private String pr_detail;
+    private Double pr_leadtime;
+    private String pr_spec;
+    private String pr_unit;
+    private Double pr_zxbzs;
+    private Long pr_id;
+    private Double pr_zxdhl;
+    private String pr_orispeccode;
+
+    public String getPr_code() {
+        return pr_code;
+    }
+
+    public void setPr_code(String pr_code) {
+        this.pr_code = pr_code;
+    }
+
+    public String getPr_detail() {
+        return pr_detail;
+    }
+
+    public void setPr_detail(String pr_detail) {
+        this.pr_detail = pr_detail;
+    }
+
+    public Double getPr_leadtime() {
+        return pr_leadtime;
+    }
+
+    public void setPr_leadtime(Double pr_leadtime) {
+        this.pr_leadtime = pr_leadtime;
+    }
+
+    public String getPr_spec() {
+        return pr_spec;
+    }
+
+    public void setPr_spec(String pr_spec) {
+        this.pr_spec = pr_spec;
+    }
+
+    public String getPr_unit() {
+        return pr_unit;
+    }
+
+    public void setPr_unit(String pr_unit) {
+        this.pr_unit = pr_unit;
+    }
+
+    public Double getPr_zxbzs() {
+        return pr_zxbzs;
+    }
+
+    public void setPr_zxbzs(Double pr_zxbzs) {
+        this.pr_zxbzs = pr_zxbzs;
+    }
+
+    public Long getPr_id() {
+        return pr_id;
+    }
+
+    public void setPr_id(Long pr_id) {
+        this.pr_id = pr_id;
+    }
+
+    public Double getPr_zxdhl() {
+        return pr_zxdhl;
+    }
+
+    public void setPr_zxdhl(Double pr_zxdhl) {
+        this.pr_zxdhl = pr_zxdhl;
+    }
+
+    public String getPr_orispeccode() {
+        return pr_orispeccode;
+    }
+
+    public void setPr_orispeccode(String pr_orispeccode) {
+        this.pr_orispeccode = pr_orispeccode;
+    }
+
+}

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

@@ -1,10 +1,12 @@
 package com.usoftchina.saas.document.entities;
 package com.usoftchina.saas.document.entities;
 
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Date;
 
 
+@Data
 public class Bankinformation extends CommonBaseEntity implements Serializable {
 public class Bankinformation extends CommonBaseEntity implements Serializable {
 
 
     private String bk_bankcode;
     private String bk_bankcode;
@@ -43,148 +45,6 @@ public class Bankinformation extends CommonBaseEntity implements Serializable {
 
 
     private String bk_currency;
     private String bk_currency;
 
 
-    public String getBk_currency() {
-        return bk_currency;
-    }
+    private Double cr_rate;
 
 
-    public void setBk_currency(String bk_currency) {
-        this.bk_currency = bk_currency;
-    }
-
-    public Double getBk_income() {
-        return bk_income;
-    }
-
-    public void setBk_income(Double bk_income) {
-        this.bk_income = bk_income;
-    }
-
-    public Double getBk_spending() {
-        return bk_spending;
-    }
-
-    public void setBk_spending(Double bk_spending) {
-        this.bk_spending = bk_spending;
-    }
-
-    public String getBk_bankcode() {
-        return bk_bankcode;
-    }
-
-    public void setBk_bankcode(String bk_bankcode) {
-        this.bk_bankcode = bk_bankcode;
-    }
-
-    public String getBk_bankname() {
-        return bk_bankname;
-    }
-
-    public void setBk_bankname(String bk_bankname) {
-        this.bk_bankname = bk_bankname;
-    }
-
-    public Date getBk_date() {
-        return bk_date;
-    }
-
-    public void setBk_date(Date bk_date) {
-        this.bk_date = bk_date;
-    }
-
-    public String getBk_type() {
-        return bk_type;
-    }
-
-    public void setBk_type(String bk_type) {
-        this.bk_type = bk_type;
-    }
-
-    public Double getBk_beginamount() {
-        return bk_beginamount;
-    }
-
-    public void setBk_beginamount(Double bk_beginamount) {
-        this.bk_beginamount = bk_beginamount;
-    }
-
-    public Double getBk_thisamount() {
-        return bk_thisamount;
-    }
-
-    public void setBk_thisamount(Double bk_thisamount) {
-        this.bk_thisamount = bk_thisamount;
-    }
-
-    public String getBk_status() {
-        return bk_status;
-    }
-
-    public void setBk_status(String bk_status) {
-        this.bk_status = bk_status;
-    }
-
-    public String getBk_statuscode() {
-        return bk_statuscode;
-    }
-
-    public void setBk_statuscode(String bk_statuscode) {
-        this.bk_statuscode = bk_statuscode;
-    }
-
-
-    public Integer getBk_ym() {
-        return bk_ym;
-    }
-
-    public void setBk_ym(Integer bk_ym) {
-        this.bk_ym = bk_ym;
-    }
-
-    public String getBk_text1() {
-        return bk_text1;
-    }
-
-    public void setBk_text1(String bk_text1) {
-        this.bk_text1 = bk_text1;
-    }
-
-    public String getBk_text2() {
-        return bk_text2;
-    }
-
-    public void setBk_text2(String bk_text2) {
-        this.bk_text2 = bk_text2;
-    }
-
-    public String getBk_text3() {
-        return bk_text3;
-    }
-
-    public void setBk_text3(String bk_text3) {
-        this.bk_text3 = bk_text3;
-    }
-
-    public String getBk_text4() {
-        return bk_text4;
-    }
-
-    public void setBk_text4(String bk_text4) {
-        this.bk_text4 = bk_text4;
-    }
-
-    public String getBk_text5() {
-        return bk_text5;
-    }
-
-    public void setBk_text5(String bk_text5) {
-        this.bk_text5 = bk_text5;
-    }
-
-    public String getBk_remark() {
-        return bk_remark;
-    }
-
-    public void setBk_remark(String bk_remark) {
-        this.bk_remark = bk_remark;
-    }
 }
 }

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

@@ -83,6 +83,11 @@
             <groupId>com.usoftchina.saas</groupId>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>account-dto</artifactId>
             <artifactId>account-dto</artifactId>
         </dependency>
         </dependency>
+        <dependency>
+          <groupId>com.usoftchina.saas</groupId>
+          <artifactId>transfers-api</artifactId>
+          <version>1.0.0-SNAPSHOT</version>
+        </dependency>
         <dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>datacenter-client</artifactId>
             <artifactId>datacenter-client</artifactId>

+ 31 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -10,6 +10,7 @@ import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductListDTO;
 import com.usoftchina.saas.document.dto.ProductListDTO;
+import com.usoftchina.saas.document.dto.ProductUploadDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.service.ProductService;
 import com.usoftchina.saas.document.service.ProductService;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
@@ -122,4 +123,34 @@ public class ProductController {
         return Result.success();
         return Result.success();
     }
     }
 
 
+    /**
+     * 上传至B2B平台
+     * @return
+     */
+    @PostMapping("/b2b/upload")
+    public Result uploadToB2B(){
+        productService.uploadToB2B();
+        return Result.success();
+    }
+
+    /**
+     * 获取需要上传的物料数据
+     * @return
+     */
+    @GetMapping("/b2b/upload/data")
+    public Result<List<ProductUploadDTO>> getUploadData(){
+        return Result.success(productService.getUploadData());
+    }
+
+    /**
+     * 批量更新物料上传状态
+     * @param ids
+     * @param status
+     * @return
+     */
+    @PostMapping("/b2b/status/update")
+    public Result updateStatus(@RequestParam("ids") String ids, @RequestParam("status") String status){
+        productService.updateB2BStatus(ids, status);
+        return Result.success();
+    }
 }
 }

+ 5 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java

@@ -4,6 +4,7 @@ import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
+import com.usoftchina.saas.document.dto.ProductUploadDTO;
 import com.usoftchina.saas.document.entities.ProdIODetail;
 import com.usoftchina.saas.document.entities.ProdIODetail;
 import com.usoftchina.saas.document.entities.ProdInOut;
 import com.usoftchina.saas.document.entities.ProdInOut;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.entities.Product;
@@ -62,4 +63,8 @@ public interface ProductMapper extends CommonBaseMapper<Product> {
     int selectSale(Long id);
     int selectSale(Long id);
 
 
     int selectPurchase(Long id);
     int selectPurchase(Long id);
+
+    List<ProductUploadDTO> selectUploadProdByCompanyId(@Param("companyId") Long companyId);
+
+    void updateB2BStatus(List<String> idsList, @Param("status") String status);
 }
 }

+ 18 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java

@@ -11,6 +11,7 @@ import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductListDTO;
 import com.usoftchina.saas.document.dto.ProductListDTO;
 import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
+import com.usoftchina.saas.document.dto.ProductUploadDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;
 import com.usoftchina.saas.document.mapper.ProductMapper;
 
 
@@ -120,4 +121,21 @@ public interface ProductService extends CommonBaseService<ProductMapper, Product
     boolean deleteDetailById(Long id);
     boolean deleteDetailById(Long id);
 
 
     void saveToFormal(Integer id, boolean update);
     void saveToFormal(Integer id, boolean update);
+
+    /**
+     * 上传至B2B
+     */
+    void uploadToB2B();
+
+    /**
+     * 获取需要上传的数据
+     */
+    List<ProductUploadDTO> getUploadData();
+
+    /**
+     * 批量更新物料上传状态
+     * @param ids
+     * @param status
+     */
+    void updateB2BStatus(String ids, String status);
 }
 }

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

@@ -21,6 +21,7 @@ import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.dto.ProductListDTO;
 import com.usoftchina.saas.document.dto.ProductListDTO;
 import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
+import com.usoftchina.saas.document.dto.ProductUploadDTO;
 import com.usoftchina.saas.document.entities.*;
 import com.usoftchina.saas.document.entities.*;
 import com.usoftchina.saas.document.mapper.DataImportMapper;
 import com.usoftchina.saas.document.mapper.DataImportMapper;
 import com.usoftchina.saas.document.mapper.ProductDetailMapper;
 import com.usoftchina.saas.document.mapper.ProductDetailMapper;
@@ -29,6 +30,8 @@ import com.usoftchina.saas.document.mapper.WarehouseMapper;
 import com.usoftchina.saas.document.service.*;
 import com.usoftchina.saas.document.service.*;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.transfers.api.SendMessageApi;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.ObjectUtils;
 import com.usoftchina.saas.utils.ObjectUtils;
 import com.usoftchina.saas.utils.RegexpUtils;
 import com.usoftchina.saas.utils.RegexpUtils;
@@ -39,6 +42,8 @@ import org.springframework.util.StringUtils;
 
 
 import java.util.*;
 import java.util.*;
 
 
+import static java.util.Arrays.asList;
+
 @Service
 @Service
 public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Product> implements ProductService {
 public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Product> implements ProductService {
 
 
@@ -60,6 +65,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
     private ProductunitService productunitService;
     private ProductunitService productunitService;
     @Autowired
     @Autowired
     private ProducttypeService producttypeService;
     private ProducttypeService producttypeService;
+    @Autowired
+    private SendMessageApi sendMessageApi;
 
 
     @Override
     @Override
     public PageInfo<ProductDTO> getProductsByCondition(PageRequest page, ListReqDTO listReqDTO) {
     public PageInfo<ProductDTO> getProductsByCondition(PageRequest page, ListReqDTO listReqDTO) {
@@ -737,6 +744,30 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         }
         }
     }
     }
 
 
+    /**
+     * 生成物料上传的消息
+     */
+    @Override
+    public void uploadToB2B() {
+        MessageInfo messageInfo = new MessageInfo(BaseContextHolder.getUserId(), BillCodeSeq.PRODUCT.name(), "", BaseContextHolder.getCompanyId());
+        sendMessageApi.sendMsg(messageInfo);
+    }
+
+    /**
+     * 获取需要上传的数据, 上传状态为待上传
+     * @return
+     */
+    @Override
+    public List<ProductUploadDTO> getUploadData(){
+        return getMapper().selectUploadProdByCompanyId(BaseContextHolder.getCompanyId());
+    }
+
+    @Override
+    public void updateB2BStatus(String ids, String status){
+        List<String> idsList = new ArrayList<String>(Arrays.asList(ids.split(",")));
+        getMapper().updateB2BStatus(idsList, status);
+    }
+
     private List<ProductReserveCostDTO> geReserveCost(ListReqDTO listReqDTO) {
     private List<ProductReserveCostDTO> geReserveCost(ListReqDTO listReqDTO) {
         Long companyId = BaseContextHolder.getCompanyId();
         Long companyId = BaseContextHolder.getCompanyId();
         String condition = listReqDTO.getFinalCondition();
         String condition = listReqDTO.getFinalCondition();

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

@@ -24,14 +24,15 @@
     <result column="bk_spending" property="bk_spending" jdbcType="DOUBLE" />
     <result column="bk_spending" property="bk_spending" jdbcType="DOUBLE" />
     <result column="bk_income" property="bk_income" jdbcType="DOUBLE" />
     <result column="bk_income" property="bk_income" jdbcType="DOUBLE" />
     <result column="bk_currency" property="bk_currency" jdbcType="VARCHAR" />
     <result column="bk_currency" property="bk_currency" jdbcType="VARCHAR" />
+    <result column="cr_rate" property="cr_rate" jdbcType="DOUBLE" />
   </resultMap>
   </resultMap>
   <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Bankinformation" extends="BaseResultMap" >
   <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Bankinformation" extends="BaseResultMap" >
     <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
     <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
   </resultMap>
   </resultMap>
   <sql id="Base_Column_List" >
   <sql id="Base_Column_List" >
     bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
     bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
-    bk_status, bk_statuscode, bk_ym, companyid,
-    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark,bk_currency
+    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,cr_rate
   </sql>
   </sql>
   <sql id="Blob_Column_List" >
   <sql id="Blob_Column_List" >
     bk_remark
     bk_remark
@@ -320,6 +321,7 @@
     select
     select
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from bankinformation
     from bankinformation
+    left join currencys on currencys.companyId = Bankinformation.companyid and cr_name = bk_currency
     <where>
     <where>
       <if test="con != null">
       <if test="con != null">
         ${con}
         ${con}

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

@@ -131,10 +131,10 @@
       ORDER BY CR_ID DESC
       ORDER BY CR_ID DESC
     </select>
     </select>
     <update id="clearStandard">
     <update id="clearStandard">
-      UPDATE CURRENCYS SET CR_STANDARD = 0 WHERE COMPANYID = #{companyId}
+      UPDATE CURRENCYS SET CR_STANDARD = 0, CR_RATE = 0 WHERE COMPANYID = #{companyId}
     </update>
     </update>
     <update id="setStandard">
     <update id="setStandard">
-      UPDATE CURRENCYS SET CR_STANDARD = #{standard} WHERE COMPANYID = #{companyId} AND CR_NAME = #{name}
+      UPDATE CURRENCYS SET CR_STANDARD = #{standard}, CR_RATE = 1 WHERE COMPANYID = #{companyId} AND CR_NAME = #{name}
     </update>
     </update>
     <select id="selectCountByName" resultType="int">
     <select id="selectCountByName" resultType="int">
       SELECT COUNT(*) FROM CURRENCYS WHERE CR_NAME = #{name} AND COMPANYID = #{companyId}
       SELECT COUNT(*) FROM CURRENCYS WHERE CR_NAME = #{name} AND COMPANYID = #{companyId}

+ 10 - 0
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -960,5 +960,15 @@
     <select id="selectPurchase" resultType="int">
     <select id="selectPurchase" resultType="int">
         SELECT COUNT(*) FROM PURCHASE LEFT JOIN PURCHASEDETAIL ON PU_ID = PD_PUID WHERE IFNULL(PU_ACCEPTSTATUS,' ') != '已出库' AND IFNULL(PU_ACCEPTSTATUSCODE,' ') != '已关闭' AND IFNULL(PD_PRODID,0) = #{id}
         SELECT COUNT(*) FROM PURCHASE LEFT JOIN PURCHASEDETAIL ON PU_ID = PD_PUID WHERE IFNULL(PU_ACCEPTSTATUS,' ') != '已出库' AND IFNULL(PU_ACCEPTSTATUSCODE,' ') != '已关闭' AND IFNULL(PD_PRODID,0) = #{id}
     </select>
     </select>
+    <select id="selectUploadProdByCompanyId" resultType="com.usoftchina.saas.document.dto.ProductUploadDTO">
+        SELECT pr_id,pr_code,pr_spec,pr_detail,pr_leadtime,pr_unit,pr_zxbzs,pr_brand,pr_orispeccode
+        FROM PRODUCT WHERE COMPANYID = #{companyId} AND IFNULL(B2BSTATUS, '待上传') = '待上传'
+    </select>
+    <update id="updateB2BStatus">
+        UPDATE PRODUCT SET B2BSTATUS = #{status} WHERE PR_ID IN
+        <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
+          #{id}
+        </foreach>
+    </update>
 </mapper>
 </mapper>
 
 

+ 6 - 5
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -11,6 +11,7 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.*;
 import com.usoftchina.saas.purchase.dto.*;
 import com.usoftchina.saas.purchase.po.PurchaseList;
 import com.usoftchina.saas.purchase.po.PurchaseList;
 import com.usoftchina.saas.purchase.service.PurchaseService;
 import com.usoftchina.saas.purchase.service.PurchaseService;
+import com.usoftchina.saas.utils.JsonUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
@@ -208,7 +209,7 @@ public class PurchaseController {
      * @return
      * @return
      */
      */
     @PostMapping("/inquiry/deal")
     @PostMapping("/inquiry/deal")
-    public Result dealInquiry(InquiryDealReqDTO inquiryDealReqDTO){
+    public Result dealInquiry(@RequestBody InquiryDealReqDTO inquiryDealReqDTO){
         purchaseService.DealInquiry(inquiryDealReqDTO);
         purchaseService.DealInquiry(inquiryDealReqDTO);
         return Result.success();
         return Result.success();
     }
     }
@@ -217,9 +218,9 @@ public class PurchaseController {
      * 发起询价
      * 发起询价
      * @return
      * @return
      */
      */
-    @PostMapping("/inquiry/save")
-    public Result saveInquiry(List<InquiryAddDTO> inquiryAddDTO){
-        purchaseService.saveInquiry(inquiryAddDTO);
-        return Result.success();
+    @PostMapping("/inquiry/send")
+    public Result saveInquiry(@RequestBody String data){
+        List<InquiryAddDTO> inquiryAddDTOList = JsonUtils.fromJsonArray(data, InquiryAddDTO.class);
+        return Result.success(purchaseService.saveInquiry(inquiryAddDTOList));
     }
     }
 }
 }

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

@@ -77,6 +77,8 @@ public class PurchaseList extends CommonBaseEntity implements Serializable {
 
 
     private String pu_currency;
     private String pu_currency;
 
 
+    private Double pu_rate;
+
     //从表字段
     //从表字段
     private Long pd_id;
     private Long pd_id;
 
 

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

@@ -14,6 +14,7 @@ import com.usoftchina.saas.purchase.po.Purchase;
 import com.usoftchina.saas.purchase.po.PurchaseList;
 import com.usoftchina.saas.purchase.po.PurchaseList;
 
 
 import java.util.List;
 import java.util.List;
+import java.util.Map;
 
 
 /**
 /**
  * @author yingp
  * @author yingp
@@ -164,5 +165,5 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      * 发起询价
      * 发起询价
      * @param inquiryAddDTO
      * @param inquiryAddDTO
      */
      */
-    void saveInquiry(List<InquiryAddDTO> inquiryAddDTO);
+    List<Map<String, String>> saveInquiry(List<InquiryAddDTO> inquiryAddDTO);
 }
 }

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

@@ -38,6 +38,9 @@ import com.usoftchina.saas.purchase.service.ProdInOutService;
 import com.usoftchina.saas.purchase.service.PurchaseService;
 import com.usoftchina.saas.purchase.service.PurchaseService;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.CollectionUtils;
+import com.usoftchina.saas.utils.JsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -45,6 +48,7 @@ import org.springframework.util.StringUtils;
 
 
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.*;
+import java.util.concurrent.CountDownLatch;
 
 
 
 
 /**
 /**
@@ -81,6 +85,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     @Autowired
     @Autowired
     private AccountApi accountApi;
     private AccountApi accountApi;
 
 
+    private static final Logger LOGGER = LoggerFactory.getLogger(PurchaseServiceImpl.class);
 
 
     @Override
     @Override
     public PageInfo<PurchaseList> getListData(PageRequest page, ListReqDTO req) {
     public PageInfo<PurchaseList> getListData(PageRequest page, ListReqDTO req) {
@@ -187,10 +192,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             return baseDTO;
             return baseDTO;
         }
         }
         //校验有来源的验收验退币别是否与源单据一致
         //校验有来源的验收验退币别是否与源单据一致
-        String puCode = purchaseMapper.validateCurrency(pu_id,purchase.getPu_currency());
-        if(puCode!=null){
-            throw new BizException(BizExceptionCode.CURRENCY_VALID);
-        }
+       // String puCode = purchaseMapper.validateCurrency(pu_id,purchase.getPu_currency());
+//        if(puCode!=null){
+//            throw new BizException(BizExceptionCode.CURRENCY_VALID);
+//        }
         //更新操作
         //更新操作
         purchaseMapper.updateByPrimaryKeySelective(purchase);
         purchaseMapper.updateByPrimaryKeySelective(purchase);
         //添加从表传输对象
         //添加从表传输对象
@@ -682,9 +687,11 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         IPage<PurcInquiryItemInfo> purcInquiryItemInfoIPage = null;
         IPage<PurcInquiryItemInfo> purcInquiryItemInfoIPage = null;
         Long enUU = companyApi.getCompanyById(BaseContextHolder.getCompanyId()).getData().getUu();
         Long enUU = companyApi.getCompanyById(BaseContextHolder.getCompanyId()).getData().getUu();
         if (inquiryReqDTO.getQuoted() == 1){
         if (inquiryReqDTO.getQuoted() == 1){
-            purcInquiryItemInfoIPage = inquiryApi.findQuotationsByPage("done", enUU, inquiryReqDTO.getPageNumber(), inquiryReqDTO.getPageSize());
+            purcInquiryItemInfoIPage = inquiryApi.findQuotationsByPage("done", enUU, inquiryReqDTO.getPageNumber(), inquiryReqDTO.getPageSize(),
+                    inquiryReqDTO.getFromDate(), inquiryReqDTO.getKeyword(), inquiryReqDTO.getOverdue(), inquiryReqDTO.getEndDate());
         }else{
         }else{
-            purcInquiryItemInfoIPage = inquiryApi.getInquiryList(enUU, inquiryReqDTO.getOverdue(), inquiryReqDTO.getPageNumber(), inquiryReqDTO.getPageSize(), "todo");
+            purcInquiryItemInfoIPage = inquiryApi.getInquiryList(enUU, inquiryReqDTO.getOverdue(), inquiryReqDTO.getPageNumber(), inquiryReqDTO.getPageSize(),
+                    "todo", inquiryReqDTO.getFromDate(), inquiryReqDTO.getKeyword(), inquiryReqDTO.getEndDate());
         }
         }
         List<PurcInquiryItemInfo> purcInquiryItemInfoList =  purcInquiryItemInfoIPage.getContent();
         List<PurcInquiryItemInfo> purcInquiryItemInfoList =  purcInquiryItemInfoIPage.getContent();
         if (CollectionUtils.isEmpty(purcInquiryItemInfoList)){
         if (CollectionUtils.isEmpty(purcInquiryItemInfoList)){
@@ -718,7 +725,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
      * @param inquiryAddDTOList
      * @param inquiryAddDTOList
      */
      */
     @Override
     @Override
-    public void saveInquiry(List<InquiryAddDTO> inquiryAddDTOList) {
+    public List<Map<String, String>> saveInquiry(List<InquiryAddDTO> inquiryAddDTOList) {
         List<PurcInquiry> purcInquiryList = new ArrayList<PurcInquiry>();
         List<PurcInquiry> purcInquiryList = new ArrayList<PurcInquiry>();
         CompanyRspDTO companyRspDTO = companyApi.getCompanyRspDTOById(BaseContextHolder.getCompanyId()).getData();
         CompanyRspDTO companyRspDTO = companyApi.getCompanyRspDTOById(BaseContextHolder.getCompanyId()).getData();
         AccountDTO accountDTO = accountApi.getAccountById(BaseContextHolder.getUserId()).getData();
         AccountDTO accountDTO = accountApi.getAccountById(BaseContextHolder.getUserId()).getData();
@@ -734,6 +741,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             PurcInquiry purcInquiry = new PurcInquiry();
             PurcInquiry purcInquiry = new PurcInquiry();
             //询价主表信息
             //询价主表信息
             purcInquiry.setEnterprise(enterprise);
             purcInquiry.setEnterprise(enterprise);
+            purcInquiry.setEnUU(companyRspDTO.getUu());
             purcInquiry.setEnName(companyRspDTO.getName());
             purcInquiry.setEnName(companyRspDTO.getName());
             purcInquiry.setRecorderUU(accountDTO.getUu());
             purcInquiry.setRecorderUU(accountDTO.getUu());
             purcInquiry.setDate(new Date());
             purcInquiry.setDate(new Date());
@@ -758,8 +766,37 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             purcInquiry.setInquiryItems(purcInquiryItemSet);
             purcInquiry.setInquiryItems(purcInquiryItemSet);
             purcInquiryList.add(purcInquiry);
             purcInquiryList.add(purcInquiry);
         }
         }
-        //调用商城ap,保存询价
-
+        //开启线程调用商城ap,保存询价
+        int length = purcInquiryList.size();
+        CountDownLatch latch = new CountDownLatch(length);
+        List<Map<String, String>> result = new ArrayList<Map<String, String>>();    //失败数据
+        for (int i = 0; i < length; i++) {
+            PurcInquiry purcInquiry = purcInquiryList.get(i);
+            new Thread(new Runnable() {
+                @Override
+                public void run() {
+                    try {
+                        PurcInquiry result = inquiryApi.saveInquiry(purcInquiry);
+                        LOGGER.info("发起询价,成功,返回数据: {}", JsonUtils.toJsonString(result));
+                        latch.countDown();
+                    }catch (Exception e){
+                        LOGGER.info("发起询价,失败,传入数据: {}, 失败原因: {}, 返回结果: {}", JsonUtils.toJsonString(purcInquiry), e.getMessage(), JsonUtils.toJsonString(result));
+                        Map<String, String> map = new HashMap<String, String>();
+                        map.put("errCode", purcInquiry.getInquiryItems().iterator().next().getProdCode());
+                        result.add(map);
+                        latch.countDown();
+                    }
+                }
+            }).start();
+        }
+        try {
+            latch.await();
+            LOGGER.info("发起询价,处理完成.");
+            return result;
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        return null;
     }
     }
 
 
     /**
     /**
@@ -777,7 +814,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             inquiryRspDTO.setProdBrand(purcInquiryItemInfo.getProduct().getBrand());
             inquiryRspDTO.setProdBrand(purcInquiryItemInfo.getProduct().getBrand());
             inquiryRspDTO.setProdName(purcInquiryItemInfo.getProdTitle());
             inquiryRspDTO.setProdName(purcInquiryItemInfo.getProdTitle());
             inquiryRspDTO.setProdSpec(purcInquiryItemInfo.getSpec());
             inquiryRspDTO.setProdSpec(purcInquiryItemInfo.getSpec());
-            inquiryRspDTO.setStartDate(purcInquiryItemInfo.getFromDate());
+            inquiryRspDTO.setStartDate(purcInquiryItemInfo.getDate());
             inquiryRspDTO.setEndDate(purcInquiryItemInfo.getEndDate());
             inquiryRspDTO.setEndDate(purcInquiryItemInfo.getEndDate());
             inquiryRspDTO.setQuoted(purcInquiryItemInfo.getQuoted());
             inquiryRspDTO.setQuoted(purcInquiryItemInfo.getQuoted());
             //报价信息
             //报价信息
@@ -792,6 +829,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                     quotationRspDTO.setLeadTime(publicInquiryItem.getLeadtime());
                     quotationRspDTO.setLeadTime(publicInquiryItem.getLeadtime());
                     quotationRspDTO.setTel(publicInquiryItem.getUserTel());
                     quotationRspDTO.setTel(publicInquiryItem.getUserTel());
                     quotationRspDTO.setAgreed(publicInquiryItem.getAgreed());
                     quotationRspDTO.setAgreed(publicInquiryItem.getAgreed());
+                    quotationRspDTO.setRefusereason(publicInquiryItem.getRefusereason());
                     quotationRspDTO.setReplaceOrispeccode(publicInquiryItem.getCmpCode());
                     quotationRspDTO.setReplaceOrispeccode(publicInquiryItem.getCmpCode());
                     //分段报价信息
                     //分段报价信息
                     List<PublicInquiryReply> publicInquiryReplyList = publicInquiryItem.getReplies();
                     List<PublicInquiryReply> publicInquiryReplyList = publicInquiryItem.getReplies();

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

@@ -37,6 +37,7 @@
         <result column="pu_said" property="pu_said" jdbcType="INTEGER" />
         <result column="pu_said" property="pu_said" jdbcType="INTEGER" />
         <result column="pu_sacode" property="pu_sacode" jdbcType="VARCHAR" />
         <result column="pu_sacode" property="pu_sacode" jdbcType="VARCHAR" />
         <result column="pu_currency" property="pu_currency" jdbcType="VARCHAR" />
         <result column="pu_currency" property="pu_currency" jdbcType="VARCHAR" />
+        <result column="pu_rate" property="pu_rate" jdbcType="DOUBLE" />
         <result column="PD_ID" property="pd_id" jdbcType="INTEGER" />
         <result column="PD_ID" property="pd_id" jdbcType="INTEGER" />
         <result column="PD_PUID" property="pd_puid" jdbcType="INTEGER" />
         <result column="PD_PUID" property="pd_puid" jdbcType="INTEGER" />
         <result column="PD_CODE" property="pd_code" jdbcType="VARCHAR" />
         <result column="PD_CODE" property="pd_code" jdbcType="VARCHAR" />

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

@@ -87,7 +87,8 @@ public interface InquiryApi {
     @GetMapping("/buyer/list")
     @GetMapping("/buyer/list")
     IPage<PurcInquiryItemInfo> getInquiryList(@RequestParam("enUU") Long enUU, @RequestParam("overdue") Integer overdue,
     IPage<PurcInquiryItemInfo> getInquiryList(@RequestParam("enUU") Long enUU, @RequestParam("overdue") Integer overdue,
                                               @RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize,
                                               @RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize,
-                                              @RequestParam("state") String state);
+                                              @RequestParam("state") String state, @RequestParam("fromDate") Long fromDate,
+                                              @RequestParam("keyword") String keyword, @RequestParam("endDate") Long endDate);
 
 
     /**
     /**
      * 查看已报价列表
      * 查看已报价列表
@@ -99,7 +100,9 @@ public interface InquiryApi {
      */
      */
     @GetMapping("/buyer/quotations")
     @GetMapping("/buyer/quotations")
     IPage<PurcInquiryItemInfo> findQuotationsByPage(@RequestParam("state") String state, @RequestParam("enUU") Long enUU,
     IPage<PurcInquiryItemInfo> findQuotationsByPage(@RequestParam("state") String state, @RequestParam("enUU") Long enUU,
-                                                    @RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize);
+                                                    @RequestParam("pageNumber") int pageNumber, @RequestParam("pageSize") int pageSize,
+                                                    @RequestParam("fromDate") Long fromDate, @RequestParam("keyword") String keyword,
+                                                    @RequestParam("overdue") Integer overdue, @RequestParam("endDate") Long endDate);
 
 
     /**
     /**
      * 采纳
      * 采纳

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

@@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 
 
 @FeignClient(url = "${b2b.baseUrl.product}", name = "product-server")
 @FeignClient(url = "${b2b.baseUrl.product}", name = "product-server")
 @RequestMapping("/product")
 @RequestMapping("/product")
-public interface ProductApi {
+public interface PublicProductApi {
 
 
     @PostMapping("/erp/save")
     @PostMapping("/erp/save")
     void saveProducts(@RequestParam("data") String data, @RequestParam("enUU")Long enUU);
     void saveProducts(@RequestParam("data") String data, @RequestParam("enUU")Long enUU);

+ 14 - 6
applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/InquiryApiTest.java

@@ -122,14 +122,14 @@ public class InquiryApiTest {
 
 
         //询价明细
         //询价明细
         PurcInquiryItem purcInquiryItem = new PurcInquiryItem();
         PurcInquiryItem purcInquiryItem = new PurcInquiryItem();
-        purcInquiryItem.setCmpCode("MT8783V");
+        purcInquiryItem.setCmpCode("123123");
         purcInquiryItem.setUserUU(1000012297L);
         purcInquiryItem.setUserUU(1000012297L);
         purcInquiryItem.setUserName("何炎");
         purcInquiryItem.setUserName("何炎");
         purcInquiryItem.setUserTel("13978887888");
         purcInquiryItem.setUserTel("13978887888");
-        purcInquiryItem.setProdCode("CPU0000001");
-        purcInquiryItem.setProdTitle("控制器IC");
-        purcInquiryItem.setSpec("MT8783V/CT,VFBGA641,SMD,无卤");
-        purcInquiryItem.setInbrand("MTK");
+        purcInquiryItem.setProdCode("PR0006");
+        purcInquiryItem.setProdTitle("1");
+        purcInquiryItem.setSpec("1");
+        purcInquiryItem.setInbrand("YAGEO");
 
 
         Set<PurcInquiryItem> purcInquiryItemSet = new HashSet<PurcInquiryItem>();
         Set<PurcInquiryItem> purcInquiryItemSet = new HashSet<PurcInquiryItem>();
         purcInquiryItemSet.add(purcInquiryItem);
         purcInquiryItemSet.add(purcInquiryItem);
@@ -139,9 +139,17 @@ public class InquiryApiTest {
         System.out.println(JsonUtils.toJsonString(result));
         System.out.println(JsonUtils.toJsonString(result));
     }
     }
 
 
+    @Test
+    public void testE_saveInquiry2(){
+        String data = "{\"id\":null,\"enUU\":null,\"enterprise\":{\"uu\":null,\"enName\":\"何炎\",\"enTel\":null,\"enAddress\":null,\"businesscode\":null,\"adminUU\":null},\"enName\":\"何炎\",\"recorderUU\":1000012297,\"code\":null,\"date\":\"2019-01-10 10:38:17\",\"recorder\":\"何炎\",\"endDate\":\"2019-01-11 10:38:17\",\"remark\":null,\"environment\":null,\"inquiryItems\":[{\"id\":null,\"number\":null,\"inquiry\":null,\"userUU\":1000012297,\"userName\":\"何炎\",\"userTel\":\"18702604709\",\"productId\":null,\"product\":null,\"prodCode\":\"PR0006\",\"prodTitle\":\"1\",\"spec\":\"1\",\"cmpCode\":\"123123\",\"inbrand\":\"YAGEO\",\"currency\":null,\"taxrate\":null,\"fromDate\":null,\"replies\":null,\"status\":null,\"agreed\":null,\"overdue\":null,\"source\":null,\"needquantity\":null,\"sourceid\":null,\"date\":null,\"enuu\":null,\"offerAmount\":null,\"endDate\":null,\"remainingTime\":null,\"valid\":null}],\"attachs\":null,\"enteryStatus\":null,\"ship\":null,\"invoice\":null,\"ifTax\":null,\"currency\":null,\"inquirytype\":null,\"sourceapp\":\"sp\",\"erpid\":null,\"erpdate\":null,\"amount\":null,\"spec\":null,\"count\":1,\"quotedAmount\":null,\"replaceQuotedAmount\":null,\"minPriceSum\":null,\"minDeliverySum\":null}";
+        PurcInquiry purcInquiry = JsonUtils.fromJsonString(data, PurcInquiry.class);
+        PurcInquiry result  = inquiryApi.saveInquiry(purcInquiry);
+        System.out.println(JsonUtils.toJsonString(result));
+    }
+
     @Test
     @Test
     public void testF_getInquiryList(){
     public void testF_getInquiryList(){
-        IPage<PurcInquiryItemInfo> getInquiryList = inquiryApi.getInquiryList(enUU, 1, pageNum, pageSize, "todo");
+        IPage<PurcInquiryItemInfo> getInquiryList = inquiryApi.getInquiryList(enUU, 1, pageNum, pageSize, "todo", null, null, null);
         System.out.println(JsonUtils.toJsonString(getInquiryList));
         System.out.println(JsonUtils.toJsonString(getInquiryList));
     }
     }
 
 

+ 4 - 4
applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/ProductApiTest.java → applications/transfers/mall-api/src/test/java/com/usoftchina/inquiry/test/PublicProductApiTest.java

@@ -1,6 +1,6 @@
 package com.usoftchina.inquiry.test;
 package com.usoftchina.inquiry.test;
 
 
-import com.usoftchina.inquiry.api.ProductApi;
+import com.usoftchina.inquiry.api.PublicProductApi;
 import org.junit.FixMethodOrder;
 import org.junit.FixMethodOrder;
 import org.junit.Test;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runner.RunWith;
@@ -12,16 +12,16 @@ import org.springframework.test.context.junit4.SpringRunner;
 @RunWith(SpringRunner.class)
 @RunWith(SpringRunner.class)
 @SpringBootTest
 @SpringBootTest
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
-public class ProductApiTest {
+public class PublicProductApiTest {
 
 
     @Autowired
     @Autowired
-    private ProductApi productApi;
+    private PublicProductApi publicProductApi;
 
 
     @Test
     @Test
     public void testA_saveProduct(){
     public void testA_saveProduct(){
         String data = "[{\"pr_code\":\"0204020020015\",\"pr_detail\":\"P沟道场效应管\",\"pr_id\":3057682,\"pr_ispubsale\":0,\"pr_ispurchase\":1,\"pr_issale\":1,\"pr_isshow\":0,\"pr_leadtime\":28.0,\"pr_ltinstock\":0.0,\"pr_spec\":\"WPM1485-6/TR,-7.4A,-12V,DFN8,SMD,无卤/WPM1485-6/TR/Will SEMI\",\"pr_unit\":\"PCS\",\"pr_zxbzs\":3000.0,\"pr_zxdhl\":3000.0},{\"pr_code\":\"B2B001\",\"pr_detail\":\"B2B平台测试\",\"pr_id\":50688771,\"pr_ispubsale\":0,\"pr_ispurchase\":1,\"pr_issale\":1,\"pr_isshow\":0,\"pr_leadtime\":0.0,\"pr_orispeccode\":\"LMK01020ISQX/NOPB\",\"pr_spec\":\"B2B平台测试01\",\"pr_unit\":\"PCS\",\"pr_uuid\":\"1200200000000521\",\"pr_zxbzs\":0.0,\"pr_zxdhl\":0.0}]";
         String data = "[{\"pr_code\":\"0204020020015\",\"pr_detail\":\"P沟道场效应管\",\"pr_id\":3057682,\"pr_ispubsale\":0,\"pr_ispurchase\":1,\"pr_issale\":1,\"pr_isshow\":0,\"pr_leadtime\":28.0,\"pr_ltinstock\":0.0,\"pr_spec\":\"WPM1485-6/TR,-7.4A,-12V,DFN8,SMD,无卤/WPM1485-6/TR/Will SEMI\",\"pr_unit\":\"PCS\",\"pr_zxbzs\":3000.0,\"pr_zxdhl\":3000.0},{\"pr_code\":\"B2B001\",\"pr_detail\":\"B2B平台测试\",\"pr_id\":50688771,\"pr_ispubsale\":0,\"pr_ispurchase\":1,\"pr_issale\":1,\"pr_isshow\":0,\"pr_leadtime\":0.0,\"pr_orispeccode\":\"LMK01020ISQX/NOPB\",\"pr_spec\":\"B2B平台测试01\",\"pr_unit\":\"PCS\",\"pr_uuid\":\"1200200000000521\",\"pr_zxbzs\":0.0,\"pr_zxdhl\":0.0}]";
         Long enUU = 10050573L;
         Long enUU = 10050573L;
-        productApi.saveProducts(data, enUU);
+        publicProductApi.saveProducts(data, enUU);
         System.out.println("success");
         System.out.println("success");
     }
     }
 
 

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

@@ -1,15 +0,0 @@
-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);
-
-}

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

@@ -0,0 +1,23 @@
+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.stereotype.Component;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient(name = "transfers-server" , fallback = SendMessageApiFallBack.class)
+public interface SendMessageApi {
+
+    @PostMapping("/send/Message")
+    Result sendMsg(@RequestBody MessageInfo info);
+
+    @Component
+    class SendMessageApiFallBack implements SendMessageApi {
+        @Override
+        public Result sendMsg(MessageInfo info) {
+            return null;
+        }
+    }
+}

+ 1 - 1
applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendApiFallBack.java → applications/transfers/transfers-api/src/main/java/com/usoftchina/saas/transfers/api/SendMessageApiFallBack.java

@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestBody;
  * @create: 2019-01-09 13:50
  * @create: 2019-01-09 13:50
  **/
  **/
 @Component
 @Component
-public class SendApiFallBack implements SendApi{
+public class SendMessageApiFallBack implements SendMessageApi {
 
 
     @Override
     @Override
     public Result sendMsg(@RequestBody MessageInfo info) {
     public Result sendMsg(@RequestBody MessageInfo info) {

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

@@ -9,105 +9,105 @@ import java.util.UUID;
  * @create: 2019-01-09 11:33
  * @create: 2019-01-09 11:33
  **/
  **/
 public class MessageInfo implements Serializable{
 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;
-        }
+    /**
+     * 消息ID
+     */
+    private String msgId;
+    /**
+     * 用户ID
+     */
+    private Long 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 Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long 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(Long 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;
+    }
 }
 }

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

@@ -56,6 +56,19 @@
             <groupId>com.usoftchina.saas</groupId>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>transfers-dto</artifactId>
             <artifactId>transfers-dto</artifactId>
         </dependency>
         </dependency>
+        <dependency>
+          <groupId>com.usoftchina.saas</groupId>
+          <artifactId>document-api</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>com.usoftchina.saas</groupId>
+          <artifactId>account-api</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>com.usoftchina.saas</groupId>
+          <artifactId>mall-api</artifactId>
+          <version>1.0.0-SNAPSHOT</version>
+        </dependency>
         <!-- db -->
         <!-- db -->
         <dependency>
         <dependency>
             <groupId>mysql</groupId>
             <groupId>mysql</groupId>

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

@@ -65,9 +65,12 @@ public class ReceiveService {
                case PURCHASEOUT:
                case PURCHASEOUT:
                    task = new SendPurchaseOutTask();
                    task = new SendPurchaseOutTask();
                    break;
                    break;
+               case PRODUCT:        //物料库上传
+                   task = new SendProductTask();
+                   break;
            }
            }
 
 
-           task.execute();
+           task.execute(info);
 
 
            //更新状态
            //更新状态
            brokerMessageLogMapper.updateSuccess(info.getMsgId());
            brokerMessageLogMapper.updateSuccess(info.getMsgId());

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

@@ -1,5 +1,7 @@
 package com.usoftchina.saas.transfers.task;
 package com.usoftchina.saas.transfers.task;
 
 
+import com.usoftchina.saas.transfers.dto.MessageInfo;
+
 /**
 /**
  * @author: guq
  * @author: guq
  * @create: 2019-01-08 13:38
  * @create: 2019-01-08 13:38
@@ -18,5 +20,5 @@ public abstract class Executable {
     /**
     /**
      * 执行任务
      * 执行任务
      */
      */
-    public abstract void execute();
+    public abstract void execute(MessageInfo messageInfo);
 }
 }

+ 115 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendProductTask.java

@@ -0,0 +1,115 @@
+package com.usoftchina.saas.transfers.task;
+
+import com.usoftchina.inquiry.api.PublicProductApi;
+import com.usoftchina.saas.account.api.CompanyApi;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.api.ProductApi;
+import com.usoftchina.saas.document.dto.ProductUploadDTO;
+import com.usoftchina.saas.transfers.dto.MessageInfo;
+import com.usoftchina.saas.transfers.service.SendService;
+import com.usoftchina.saas.utils.CollectionUtils;
+import com.usoftchina.saas.utils.DateUtils;
+import com.usoftchina.saas.utils.JsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * @Description 物料上传
+ * @Author chenwei
+ * @Date 2019/01/09
+ */
+public class SendProductTask extends Executable{
+
+    @Autowired
+    private ProductApi productApi;
+    @Autowired
+    private PublicProductApi publicProductApi;
+    @Autowired
+    private CompanyApi companyApi;
+    @Autowired
+    private SendService sendService;
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(SendProductTask.class);
+
+    @Override
+    public void execute(MessageInfo messageInfo) {
+        Long enUU = companyApi.getCompanyById(BaseContextHolder.getCompanyId()).getData().getUu();
+        //需要上传的物料信息
+        List<ProductUploadDTO> productUploadDTOList = productApi.getUploadData().getData();
+        //上传结果反馈
+        List<Long> successIds = new ArrayList<Long>();
+        List<Long> failedIds = new ArrayList<Long>();
+        if (!CollectionUtils.isEmpty(productUploadDTOList)){
+            //分批次上传,每次50条. 物料服务提供接口采用@requestParam接收物料数据,存在数据长度限制
+            if (productUploadDTOList.size() >= 50){
+                int count = (int) Math.ceil(productUploadDTOList.size() / 50.0);
+                CountDownLatch latch = new CountDownLatch(count);
+                for (int i = 0; i < count; i++) {
+                    //第loop次循环
+                    int loop = i;
+                    new Thread(new Runnable() {
+                        @Override
+                        public void run() {
+                            int startPoint = loop * 50;
+                            int endPoint = 0;
+                            if (loop + 1 == count) {
+                                endPoint = productUploadDTOList.size() - 1;
+                            }else{
+                                endPoint = (loop + 1) * 50;
+                            }
+                            List<ProductUploadDTO> subList = productUploadDTOList.subList(startPoint, endPoint);
+                            try {
+                                publicProductApi.saveProducts(JsonUtils.toJsonString(subList), enUU);
+                                subList.forEach(ProductUploadDTO -> successIds.add(ProductUploadDTO.getPr_id()));
+                                LOGGER.info("本批次第{}至{},物料上传成功, 发起时间 {}",startPoint, endPoint, DateUtils.format(new Date(System.currentTimeMillis()), "yyyy-MM-dd hh:mm:ss"));
+                            }catch (Exception e){
+                                subList.forEach(ProductUploadDTO -> failedIds.add(ProductUploadDTO.getPr_id()));
+                                LOGGER.info("本批次第{}至{},物料上传失败,原因:{}, 发起时间 {}",startPoint, endPoint, e.getMessage(), DateUtils.format(new Date(System.currentTimeMillis()), "yyyy-MM-dd hh:mm:ss"));
+                            }finally {
+                                latch.countDown();
+                            }
+                        }
+                    }).start();
+                }
+                try {
+                    latch.await();
+                    LOGGER.info("物料上传完成, 成功{}条,失败{}条", successIds.size(), failedIds.size());
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+            }else{
+                try {
+                    publicProductApi.saveProducts(JsonUtils.toJsonString(productUploadDTOList), enUU);
+                    productUploadDTOList.forEach(productUploadDTO -> successIds.add(productUploadDTO.getPr_id()));
+                    LOGGER.info(",物料上传成功,条数{}, 发起时间 {}",productUploadDTOList.size(), DateUtils.format(new Date(System.currentTimeMillis()), "yyyy-MM-dd hh:mm:ss"));
+                }catch (Exception e){
+                    productUploadDTOList.forEach(productUploadDTO -> failedIds.add(productUploadDTO.getPr_id()));
+                    LOGGER.info("物料上传失败,条数{},原因:{}, 发起时间 {}", productUploadDTOList.size(), e.getMessage(), DateUtils.format(new Date(System.currentTimeMillis()), "yyyy-MM-dd hh:mm:ss"));
+                }
+            }
+            //更新物料状态
+            if (successIds.size() > 0) {
+                Iterator<Long> it = successIds.iterator();
+                StringBuilder success = new StringBuilder();
+                while (it.hasNext()){
+                    success.append(it.next() + ",");
+                }
+                productApi.updateStatus(success.substring(0, success.length() - 1), "已上传");
+            }
+            if (failedIds.size() > 0){
+                Iterator<Long> it = failedIds.iterator();
+                StringBuilder failed = new StringBuilder();
+                while (it.hasNext()){
+                    failed.append(it.next() + ",");
+                }
+                String failedStr = failed.substring(0, failed.length() - 1);
+                MessageInfo newMessageInfo = new MessageInfo(messageInfo.getUserId(), messageInfo.getBizType(), failedStr, messageInfo.getCompanyId());
+                sendService.sendMessage(newMessageInfo);
+            }
+        }
+    }
+}

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

@@ -129,7 +129,7 @@
     </select>
     </select>
     <select id="getCompanyRspDTOById" resultType="com.usoftchina.saas.account.dto.CompanyRspDTO">
     <select id="getCompanyRspDTOById" resultType="com.usoftchina.saas.account.dto.CompanyRspDTO">
         SELECT
         SELECT
-          ac.id,ac.name,aa.realname admin,aa.mobile adminMobile
+          ac.id,ac.name,aa.realname admin,aa.mobile adminMobile,aa.uu adminUU,ac.uu,ac.tel,ac.address,ac.business_code businessCode
         FROM
         FROM
           ac_company ac
           ac_company ac
           INNER JOIN ac_account aa on ac.creator_id = aa.id
           INNER JOIN ac_account aa on ac.creator_id = aa.id

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

@@ -46,6 +46,19 @@ Ext.define('saas.view.core.dbfind.types.BankInfoDbfindTrigger', {
         dataIndex: "bk_type",
         dataIndex: "bk_type",
         width: 110,
         width: 110,
         xtype: ""
         xtype: ""
+    }, {
+        text: "币别",
+        dataIndex: "bk_currency",
+        align:'center',
+        width: 65
+    }, {
+        text: "汇率",
+        dataIndex: "cr_rate",
+        xtype: 'numbercolumn',
+        width: 80,
+        renderer: function(v, m, r) {
+            return saas.util.BaseUtil.numberFormat(v, 6, false);
+        }
     }, {
     }, {
         text: "账户余额",
         text: "账户余额",
         dataIndex: "bk_thisamount",
         dataIndex: "bk_thisamount",

+ 1 - 1
frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js

@@ -66,7 +66,7 @@ Ext.define('saas.view.core.dbfind.types.CustomerDbfindTrigger', {
         xtype:'numbercolumn',
         xtype:'numbercolumn',
         dataIndex: "cr_rate",
         dataIndex: "cr_rate",
         width:80
         width:80
-    },, {
+    }, {
         text: "业务员编号",
         text: "业务员编号",
         dataIndex: "cu_sellercode",
         dataIndex: "cu_sellercode",
         width:150,
         width:150,

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

@@ -77,7 +77,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 //     or_rate: 1
                 //     or_rate: 1
                 // },
                 // },
                 mainFieldConfig: {
                 mainFieldConfig: {
-                    readOnly: false,
+                    readOnly: true,
                     defaultReadOnly: false,
                     defaultReadOnly: false,
                 },
                 },
                 supFieldConfig: {
                 supFieldConfig: {

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

@@ -99,8 +99,14 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                             from: 'bk_bankname',
                             from: 'bk_bankname',
                             to: 'or_bankname'
                             to: 'or_bankname'
                         }, {
                         }, {
-                            from: 'id',
+                            from: 'id', 
                             to: 'or_bankid',ignore:true
                             to: 'or_bankid',ignore:true
+                        }, {
+                            from: 'bk_currency',
+                            to: 'or_currency'
+                        }, {
+                            from: 'cr_rate',
+                            to: 'or_rate'
                         }],
                         }],
                     });
                     });
 
 

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

@@ -71,7 +71,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 //     os_rate: 1
                 //     os_rate: 1
                 // },
                 // },
                 mainFieldConfig: {
                 mainFieldConfig: {
-                    readOnly: false,
+                    readOnly: true,
                     defaultReadOnly: false,
                     defaultReadOnly: false,
                 },
                 },
                 supFieldConfig: {
                 supFieldConfig: {

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

@@ -92,6 +92,12 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                         }, {
                         }, {
                             from: 'id',
                             from: 'id',
                             to: 'os_bankid',ignore:true
                             to: 'os_bankid',ignore:true
+                        }, {
+                            from: 'bk_currency',
+                            to: 'os_currency'
+                        }, {
+                            from: 'cr_rate',
+                            to: 'os_rate'
                         }],
                         }],
                     });
                     });
 
 

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

@@ -76,10 +76,6 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
                 }, {
                 }, {
                     from: 'cr_rate', to: 'pb_rate'
                     from: 'cr_rate', to: 'pb_rate'
                 }],
                 }],
-                // defaultValue: {
-                //     pb_currency: 'RMB',
-                //     pb_rate: 1
-                // },
                 supFieldConfig: {
                 supFieldConfig: {
                     xtype: 'numberfield',
                     xtype: 'numberfield',
                     readOnly: false,
                     readOnly: false,

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

@@ -9,62 +9,6 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             'dbfindtrigger[name=pb_vendname]':{
             'dbfindtrigger[name=pb_vendname]':{
                 beforerender: function (f) {
                 beforerender: function (f) {
                     Ext.apply(f, {
                     Ext.apply(f, {
-                        dbColumns:[{
-                            text: "供应商ID",
-                            hidden: true,
-                            dataIndex: "id",
-                            xtype: "numbercolumn"
-                        },{
-                            text: "供应商编号",
-                            dataIndex: "ve_code",
-                            width: 150
-                        }, {
-                            text: "供应商名称",
-                            dataIndex: "ve_name",
-                            width: 200
-                        }, {
-                            text: "供应商类型",
-                            dataIndex: "ve_type",
-                            width: 110,
-                        }, {
-                            text: "税率(%)",
-                            dataIndex: "ve_taxrate",
-                            width: 80,
-                            xtype: 'numbercolumn',
-                            align:'end',
-                            renderer : function(v, m, r) {
-                                return saas.util.BaseUtil.numberFormat(v, 2, false);
-                            }
-                        }, {
-                            text: "应付款余额",
-                            dataIndex: "ve_leftamount",
-                            width:110,
-                            xtype: 'numbercolumn',
-                            renderer : function(v, m, r) {
-                                return saas.util.BaseUtil.numberFormat(v, 2, true);
-                            }
-                        },{
-                            text: "结算天数",
-                            dataIndex: "ve_promisedays",
-                            width: 110,
-                            xtype: 'numbercolumn',
-                            align: 'end',
-                            renderer : function(v, m, r) {
-                                return Ext.util.Format.number(v, '0');
-                            }
-                        }, {
-                            text: "纳税人识别号",
-                            dataIndex: "ve_nsrzh",
-                            width: 150
-                        }, {
-                            text: "开户银行",
-                            dataIndex: "ve_bankcode",
-                            width: 150
-                        }, {
-                            text: "银行账户",
-                            dataIndex: "ve_bankaccount",
-                            width: 200
-                        }],
                         dbfinds: [{
                         dbfinds: [{
                             from: 've_code',
                             from: 've_code',
                             to: 'pb_vendcode'
                             to: 'pb_vendcode'
@@ -78,6 +22,10 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             from: 'id',
                             from: 'id',
                             to: 'pb_vendid',
                             to: 'pb_vendid',
                             ignore:true
                             ignore:true
+                        },{
+                            from:'ve_currency',to:'pb_currency'
+                        },{
+                            from:'cr_rate',to:'pb_rate'
                         }],
                         }],
                     });
                     });
 
 

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

@@ -9,72 +9,6 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
             'dbfindtrigger[name=rb_custname]':{
             'dbfindtrigger[name=rb_custname]':{
                 beforerender:function(f){
                 beforerender:function(f){
                     Ext.apply(f,{
                     Ext.apply(f,{
-                        dbColumns: [{
-                            conditionCode: 'id',
-                            text: "客户ID",
-                            dataIndex: "id",
-                            hidden:true,
-                            xtype: "",
-                        }, {
-                            conditionCode: 'cu_code',
-                            text: "客户编号",
-                            dataIndex: "cu_code",
-                            width: 150,
-                            xtype: "",
-                        }, {
-                            conditionCode: 'cu_name',
-                            text: "客户名称",
-                            dataIndex: "cu_name",
-                            width: 200,
-                            xtype: "",
-                        }, {
-                            conditionCode: 'cu_type',
-                            text: "客户类型",
-                            dataIndex: "cu_type",
-                            width: 110,
-                            xtype: "",
-                        }, {
-                            text: "业务员编号",
-                            dataIndex: "cu_sellercode",
-                            width:110
-                        }, {
-                            text: "业务员",
-                            dataIndex: "cu_sellername",
-                            width:110
-                        }, {
-                            text: "税率(%)",
-                            dataIndex: "cu_taxrate",
-                            xtype: 'numbercolumn',
-                            width:80,
-                            renderer: function(v, m, r) {
-                                return saas.util.BaseUtil.numberFormat(v, 2, false);
-                            }
-                        },{
-                            text: "应收款余额",
-                            dataIndex: "cu_leftamount",
-                            width:110,
-                            xtype: 'numbercolumn',
-                            renderer : function(v, m, r) {
-                                return saas.util.BaseUtil.numberFormat(v, 2, true);
-                            }
-                        }, {
-                            text: "结算天数",
-                            dataIndex: "cu_promisedays",
-                            width:110,
-                            xtype: 'numbercolumn',
-                            renderer: function(v, m, r) {
-                                return Ext.util.Format.number(v, '0');
-                            }
-                        }, {
-                            text: "额度",
-                            dataIndex: "cu_credit",
-                            width:110,
-                            xtype: 'numbercolumn',
-                        }, {
-                            text: "客户地址",
-                            dataIndex: "ca_address",
-                            width: 250
-                        }],
                         //赋值 
                         //赋值 
                         dbfinds:[{
                         dbfinds:[{
                             from: 'id', to: 'rb_custid',ignore:true
                             from: 'id', to: 'rb_custid',ignore:true

+ 23 - 34
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -43,6 +43,29 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 name: "pu_vendname",
                 name: "pu_vendname",
                 fieldLabel: "供应商名称",
                 fieldLabel: "供应商名称",
                 allowBlank: false,
                 allowBlank: false,
+                columnWidth: 0.5
+            }, {
+                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: "datefield",
                 xtype: "datefield",
                 name: "pu_delivery",
                 name: "pu_delivery",
@@ -73,40 +96,6 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     });
                     });
                     this.dialog.show();
                     this.dialog.show();
                 }
                 }
-            }, {
-                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",
                 name: "detailGridField",
                 xtype: "detailGridField",
                 xtype: "detailGridField",

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

@@ -21,6 +21,10 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             from:'ve_buyercode',to:'pu_buyercode'
                             from:'ve_buyercode',to:'pu_buyercode'
                         },{
                         },{
                             from:'ve_buyername',to:'pu_buyername'
                             from:'ve_buyername',to:'pu_buyername'
+                        },{
+                            from:'ve_currency',to:'pu_currency'
+                        },{
+                            from:'cr_rate',to:'pu_rate'
                         }],
                         }],
                     }) ; 
                     }) ; 
                 }
                 }

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

@@ -252,6 +252,19 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
                     renderer: function(v, m, r) {
                     renderer: function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                     }
+                }, {
+                    text: '币别',
+                    dataIndex: 'pu_currency',
+                    align: 'center',
+                    width: 65
+                }, {
+                    text: "汇率",
+                    dataIndex: "pu_rate",
+                    xtype: 'numbercolumn',
+                    width: 80,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    }
                 }, {
                 }, {
                     text: '关联销售单号',
                     text: '关联销售单号',
                     dataIndex: 'pd_salecode',
                     dataIndex: 'pd_salecode',

+ 8 - 19
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -64,13 +64,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 name: 'pi_vendname',
                 name: 'pi_vendname',
                 fieldLabel: '供应商名称',
                 fieldLabel: '供应商名称',
                 allowBlank: false,
                 allowBlank: false,
-            }, {
-                xtype: "datefield",
-                name: "pi_date",
-                fieldLabel: "单据日期",
-                allowBlank: false,
-                columnWidth: 0.25,
-                defaultValue: new Date()
+                columnWidth: 0.5
             }, {
             }, {
                 xtype: 'condbfindtrigger',
                 xtype: 'condbfindtrigger',
                 fieldLabel: '币别汇率',
                 fieldLabel: '币别汇率',
@@ -93,18 +87,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                     decimalPrecision: 6,
                     decimalPrecision: 6,
                     vtype: 'positiveNumber'
                     vtype: 'positiveNumber'
                 },
                 },
-            // }, {
-            //     xtype: "currencyDbfindTrigger",
-            //     name: "pi_currency",
-            //     fieldLabel: "币别",
-            //     defaultValue: 'RMB'
-            // }, {
-            //     xtype: "numberfield",
-            //     name: "pi_rate",
-            //     fieldLabel: "汇率",
-            //     defaultValue: 1,
-            //     decimalPrecision: 6,
-            //     vtype: 'positiveNumber'
+            }, {
+                xtype: "datefield",
+                name: "pi_date",
+                fieldLabel: "单据日期",
+                allowBlank: false,
+                columnWidth: 0.25,
+                defaultValue: new Date()
             },{
             },{
                 xtype: "hidden",
                 xtype: "hidden",
                 name: "pi_puid",
                 name: "pi_puid",

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

@@ -27,6 +27,10 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                             from:'ve_buyercode',to:'pi_buyercode'
                             from:'ve_buyercode',to:'pi_buyercode'
                         },{
                         },{
                             from:'ve_buyername',to:'pi_buyername'
                             from:'ve_buyername',to:'pi_buyername'
+                        },{
+                            from:'ve_currency',to:'pi_currency'
+                        },{
+                            from:'cr_rate',to:'pi_rate'
                         }],
                         }],
                     }) ;   
                     }) ;   
 
 

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

@@ -263,6 +263,19 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
                     renderer: function(v, m, r) {
                     renderer: function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     },
                     },
+                }, {
+                    text: '币别',
+                    dataIndex: 'pi_currency',
+                    align: 'center',
+                    width: 65
+                }, {
+                    text: "汇率",
+                    dataIndex: "pi_rate",
+                    xtype: 'numbercolumn',
+                    width: 80,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    }
                 }, {
                 }, {
                     text: '关联采购单号',
                     text: '关联采购单号',
                     dataIndex: 'pi_pucode',
                     dataIndex: 'pi_pucode',

+ 8 - 19
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -60,13 +60,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 name: 'pi_vendname',
                 name: 'pi_vendname',
                 fieldLabel: '供应商名称',
                 fieldLabel: '供应商名称',
                 allowBlank: false,
                 allowBlank: false,
-            }, {
-                xtype: "datefield",
-                name: "pi_date",
-                fieldLabel: "单据日期",
-                allowBlank: false,
-                columnWidth: 0.25,
-                defaultValue: new Date()
+                columnWidth: 0.5
             }, {
             }, {
                 xtype: 'condbfindtrigger',
                 xtype: 'condbfindtrigger',
                 fieldLabel: '币别汇率',
                 fieldLabel: '币别汇率',
@@ -89,18 +83,13 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     decimalPrecision: 6,
                     decimalPrecision: 6,
                     vtype: 'positiveNumber'
                     vtype: 'positiveNumber'
                 }
                 }
-            // }, {
-            //     xtype: "currencyDbfindTrigger",
-            //     name: "pi_currency",
-            //     fieldLabel: "币别",
-            //     defaultValue: 'RMB'
-            // }, {
-            //     xtype: "numberfield",
-            //     name: "pi_rate",
-            //     fieldLabel: "汇率",
-            //     defaultValue: 1,
-            //     decimalPrecision: 6,
-            //     vtype: 'positiveNumber'
+            }, {
+                xtype: "datefield",
+                name: "pi_date",
+                fieldLabel: "单据日期",
+                allowBlank: false,
+                columnWidth: 0.25,
+                defaultValue: new Date()
             }, {
             }, {
                 xtype: "hidden",
                 xtype: "hidden",
                 name: "pi_puid",
                 name: "pi_puid",

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

@@ -27,6 +27,10 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                             from:'ve_buyercode',to:'pi_buyercode'
                             from:'ve_buyercode',to:'pi_buyercode'
                         },{
                         },{
                             from:'ve_buyername',to:'pi_buyername'
                             from:'ve_buyername',to:'pi_buyername'
+                        },{
+                            from:'ve_currency',to:'pi_currency'
+                        },{
+                            from:'cr_rate',to:'pi_rate'
                         }],
                         }],
                     }) ;   
                     }) ;   
 
 

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

@@ -268,6 +268,19 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
                     renderer: function(v, m, r) {
                     renderer: function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     },
                     },
+                }, {
+                    text: '币别',
+                    dataIndex: 'pi_currency',
+                    align: 'center',
+                    width: 65
+                }, {
+                    text: "汇率",
+                    dataIndex: "pi_rate",
+                    xtype: 'numbercolumn',
+                    width: 80,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    }
                 }, {
                 }, {
                     text: '关联验收单号',
                     text: '关联验收单号',
                     dataIndex: 'pi_iocode',
                     dataIndex: 'pi_iocode',

+ 17 - 28
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -44,6 +44,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 name: "sa_custname",
                 name: "sa_custname",
                 fieldLabel: "客户名称",
                 fieldLabel: "客户名称",
                 allowBlank: false,
                 allowBlank: false,
+                columnWidth: 0.5,
                 setValue: function (value) {
                 setValue: function (value) {
                     var me = this,
                     var me = this,
                         bind, valueBind;
                         bind, valueBind;
@@ -79,22 +80,6 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                     }
                     }
                     return me;
                     return me;
                 }
                 }
-            }, {
-                xtype: "datefield",
-                name: "sa_delivery",
-                fieldLabel: "交货日期",
-                allowBlank: false,
-                defaultValue: new Date(),
-                columnWidth: 0.25,
-            }, {
-                name: "sa_toplace",
-                xtype: "remotecombo",
-                fieldLabel: "交货地址",
-                editable: false,
-                allowBlank: false,
-                columnWidth: 0.5,
-                storeUrl: '/api/document/customer/getAddressCombo',
-                hiddenBtn: true, //true 则会关闭新增按钮功能
             }, {
             }, {
                 xtype: 'condbfindtrigger',
                 xtype: 'condbfindtrigger',
                 fieldLabel: '币别汇率',
                 fieldLabel: '币别汇率',
@@ -117,18 +102,22 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                     decimalPrecision: 6,
                     decimalPrecision: 6,
                     vtype: 'positiveNumber'
                     vtype: 'positiveNumber'
                 }
                 }
-            // }, {
-            //     xtype: "currencyDbfindTrigger",
-            //     name: "sa_currency",
-            //     fieldLabel: "币别",
-            //     defaultValue: 'RMB'
-            // }, {
-            //     xtype: "numberfield",
-            //     name: "sa_rate",
-            //     fieldLabel: "汇率",
-            //     defaultValue: 1,
-            //     decimalPrecision: 6,
-            //     vtype: 'positiveNumber'
+            }, {
+                xtype: "datefield",
+                name: "sa_delivery",
+                fieldLabel: "交货日期",
+                allowBlank: false,
+                defaultValue: new Date(),
+                columnWidth: 0.25,
+            }, {
+                name: "sa_toplace",
+                xtype: "remotecombo",
+                fieldLabel: "交货地址",
+                editable: false,
+                allowBlank: false,
+                columnWidth: 0.5,
+                storeUrl: '/api/document/customer/getAddressCombo',
+                hiddenBtn: true, //true 则会关闭新增按钮功能
             },{
             },{
                 name: "detailGridField",
                 name: "detailGridField",
                 xtype: "detailGridField",
                 xtype: "detailGridField",

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

@@ -5,7 +5,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
         var me = this;
         var me = this;
         this.control({
         this.control({
             //放大镜赋值关系 以及 tpl模板
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=sa_custname]': {
+            'customerDbfindTrigger[name=sa_custname]': {
                 beforerender: function (f) {
                 beforerender: function (f) {
                     Ext.apply(f, {
                     Ext.apply(f, {
                         dbfinds: [{
                         dbfinds: [{
@@ -30,7 +30,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                         }, {
                         }, {
                             from:'cu_sellerid',to:'cu_sellerid'
                             from:'cu_sellerid',to:'cu_sellerid'
                         },{
                         },{
-                            from:'cu_currency',to:'sa_currency'
+                            from:'cu_currency',to:'sa_currency' 
                         },{
                         },{
                             from:'cr_rate',to:'sa_rate'
                             from:'cr_rate',to:'sa_rate'
                         }
                         }

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

@@ -260,6 +260,19 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
                     renderer : function(v, m, r) {
                     renderer : function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                     }
+                }, {
+                    text: '币别',
+                    dataIndex: 'sa_currency',
+                    align:'center',
+                    width: 65
+                }, {
+                    text: '汇率',
+                    dataIndex: 'sa_rate',
+                    xtype: 'numbercolumn',
+                    width: 80,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    }
                 }, {
                 }, {
                     text: '备注',
                     text: '备注',
                     dataIndex: 'sd_remark',
                     dataIndex: 'sd_remark',

+ 17 - 28
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -52,6 +52,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 name: "pi_custname",
                 name: "pi_custname",
                 fieldLabel: "客户名称",
                 fieldLabel: "客户名称",
                 allowBlank: false,
                 allowBlank: false,
+                columnWidth: 0.5,
                 setValue: function (value) {
                 setValue: function (value) {
                     var me = this,
                     var me = this,
                         bind, valueBind;
                         bind, valueBind;
@@ -87,22 +88,6 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                     }
                     }
                     return me;
                     return me;
                 }
                 }
-            }, {
-                xtype: "datefield",
-                name: "pi_date",
-                fieldLabel: "单据日期",
-                allowBlank: false,
-                columnWidth: 0.25,
-                defaultValue: new Date()
-            }, {
-                columnWidth: 0.5,
-                name: "pi_address",
-                xtype: "remotecombo",
-                fieldLabel: "交货地址",
-                editable: false,
-                allowBlank: false,
-                storeUrl: '/api/document/customer/getAddressCombo',
-                hiddenBtn: true, //true 则会关闭新增按钮功能
             }, {
             }, {
                 xtype: 'condbfindtrigger',
                 xtype: 'condbfindtrigger',
                 fieldLabel: '币别汇率',
                 fieldLabel: '币别汇率',
@@ -125,18 +110,22 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                     decimalPrecision: 6,
                     decimalPrecision: 6,
                     vtype: 'positiveNumber'
                     vtype: 'positiveNumber'
                 }
                 }
-            // }, {
-            //     xtype: "currencyDbfindTrigger",
-            //     name: "pi_currency",
-            //     fieldLabel: "币别",
-            //     defaultValue: 'RMB'
-            // }, {
-            //     xtype: "numberfield",
-            //     name: "pi_rate",
-            //     fieldLabel: "汇率",
-            //     defaultValue: 1,
-            //     decimalPrecision: 6,
-            //     vtype: 'positiveNumber'
+            }, {
+                xtype: "datefield",
+                name: "pi_date",
+                fieldLabel: "单据日期",
+                allowBlank: false,
+                columnWidth: 0.25,
+                defaultValue: new Date()
+            }, {
+                columnWidth: 0.5,
+                name: "pi_address",
+                xtype: "remotecombo",
+                fieldLabel: "交货地址",
+                editable: false,
+                allowBlank: false,
+                storeUrl: '/api/document/customer/getAddressCombo',
+                hiddenBtn: true, //true 则会关闭新增按钮功能
             },{
             },{
                 name: "detailGridField",
                 name: "detailGridField",
                 xtype: "detailGridField",
                 xtype: "detailGridField",

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

@@ -262,6 +262,19 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
                     renderer: function(v, m, r) {
                     renderer: function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                     }
+                }, {
+                    text: '币别',
+                    dataIndex: 'pi_currency',
+                    align:'center',
+                    width: 65
+                }, {
+                    text: '汇率',
+                    dataIndex: 'pi_rate',
+                    xtype: 'numbercolumn',
+                    width: 80,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    }
                 }, {
                 }, {
                     text: '关联出货单号',
                     text: '关联出货单号',
                     dataIndex: 'pi_iocode',
                     dataIndex: 'pi_iocode',

+ 17 - 16
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -61,6 +61,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 name: "pi_custname",
                 name: "pi_custname",
                 fieldLabel: "客户名称",
                 fieldLabel: "客户名称",
                 allowBlank: false,
                 allowBlank: false,
+                columnWidth: 0.5,
                 setValue: function (value) {
                 setValue: function (value) {
                     var me = this,
                     var me = this,
                         bind, valueBind;
                         bind, valueBind;
@@ -96,22 +97,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                     }
                     }
                     return me;
                     return me;
                 }
                 }
-            }, {
-                xtype: "datefield",
-                name: "pi_date",
-                fieldLabel: "单据日期",
-                allowBlank: false,
-                columnWidth: 0.25,
-                defaultValue: new Date()
-            }, {
-                columnWidth: 0.5,
-                name: "pi_address",
-                xtype: "remotecombo",
-                fieldLabel: "交货地址",
-                editable: false,
-                allowBlank: false,
-                storeUrl: '/api/document/customer/getAddressCombo',
-                hiddenBtn: true, //true 则会关闭新增按钮功能
             }, {
             }, {
                 xtype: 'condbfindtrigger',
                 xtype: 'condbfindtrigger',
                 fieldLabel: '币别汇率',
                 fieldLabel: '币别汇率',
@@ -134,6 +119,22 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                     decimalPrecision: 6,
                     decimalPrecision: 6,
                     vtype: 'positiveNumber'
                     vtype: 'positiveNumber'
                 }
                 }
+            }, {
+                xtype: "datefield",
+                name: "pi_date",
+                fieldLabel: "单据日期",
+                allowBlank: false,
+                columnWidth: 0.25,
+                defaultValue: new Date()
+            }, {
+                columnWidth: 0.5,
+                name: "pi_address",
+                xtype: "remotecombo",
+                fieldLabel: "交货地址",
+                editable: false,
+                allowBlank: false,
+                storeUrl: '/api/document/customer/getAddressCombo',
+                hiddenBtn: true, //true 则会关闭新增按钮功能
             }, {
             }, {
                 name: "detailGridField",
                 name: "detailGridField",
                 xtype: "detailGridField",
                 xtype: "detailGridField",

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

@@ -262,6 +262,19 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
                     renderer: function(v, m, r) {
                     renderer: function(v, m, r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                     }
+                }, {
+                    text: '币别',
+                    dataIndex: 'pi_currency',
+                    align: 'center',
+                    width: 65
+                }, {
+                    text: "汇率",
+                    dataIndex: "pi_rate",
+                    xtype: 'numbercolumn',
+                    width: 80,
+                    renderer: function(v, m, r) {
+                        return saas.util.BaseUtil.numberFormat(v, 6, false);
+                    }
                 }, {
                 }, {
                     text: '关联销售单号',
                     text: '关联销售单号',
                     dataIndex: 'pd_ordercode',
                     dataIndex: 'pd_ordercode',