Browse Source

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

hy 7 years ago
parent
commit
230490b0a6
97 changed files with 1478 additions and 1329 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 59 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Feedback.java
  3. 34 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/FeedbackController.java
  4. 1 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ShareController.java
  5. 9 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/FeedbackMapper.java
  6. 12 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/FeedbackService.java
  7. 26 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/FeedbackServiceImpl.java
  8. 5 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductReserveCostDTO.java
  9. 31 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bom.java
  10. 3 3
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/BomDetail.java
  11. 7 7
      applications/document/document-server/src/main/resources/mapper/BomDetailMapper.xml
  12. 3 0
      applications/document/document-server/src/main/resources/mapper/BomMapper.xml
  13. 2 1
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  14. 25 9
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/CustomerCheckView.java
  15. 7 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/VendorAcountView.java
  16. 2 1
      applications/money/money-server/src/main/resources/mapper/CustomerCheckViewMapper.xml
  17. 1 0
      applications/money/money-server/src/main/resources/mapper/VendorAcountViewMapper.xml
  18. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  19. 6 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/report/PurchasePay.java
  20. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  21. 3 3
      applications/purchase/purchase-server/src/main/resources/logback-spring.xml
  22. 1 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  23. 3 0
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseReportMapper.xml
  24. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java
  25. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/report/SaleProfitView.java
  26. 4 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/report/SalerecView.java
  27. 6 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  28. 5 0
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  29. 1 0
      applications/sale/sale-server/src/main/resources/mapper/SaleProfitViewMapper.xml
  30. 2 0
      applications/sale/sale-server/src/main/resources/mapper/SalerecViewMapper.xml
  31. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/StockTaking.java
  32. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/report/ProdinoutCountView.java
  33. 2 8
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  34. 2 0
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutReportMapper.xml
  35. 4 3
      applications/storage/storage-server/src/main/resources/mapper/StockTakingMapper.xml
  36. 2 2
      base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/interceptor/AuthRestInterceptor.java
  37. 1 1
      frontend/saas-web/app.json
  38. 29 0
      frontend/saas-web/app/model/report/CustomerCheck.js
  39. 20 0
      frontend/saas-web/app/model/report/ProfitDetail.js
  40. 13 23
      frontend/saas-web/app/model/report/Purchase.js
  41. 24 0
      frontend/saas-web/app/model/report/PurchasePay.js
  42. 1 2
      frontend/saas-web/app/model/report/Sale.js
  43. 35 0
      frontend/saas-web/app/model/report/SaleProfit.js
  44. 24 0
      frontend/saas-web/app/model/report/SaleRec.js
  45. 22 0
      frontend/saas-web/app/model/report/TotalPayDetail.js
  46. 22 0
      frontend/saas-web/app/model/report/TotalRecDetail.js
  47. 28 0
      frontend/saas-web/app/model/report/VendorCheck.js
  48. 12 0
      frontend/saas-web/app/view/core/dbfind/types/BomDbfindTrigger.js
  49. 1 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  50. 10 9
      frontend/saas-web/app/view/core/report/ReportPanel.js
  51. 16 24
      frontend/saas-web/app/view/document/bom/FormPanel.js
  52. 3 2
      frontend/saas-web/app/view/document/product/FormPanel.js
  53. 1 1
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  54. 0 21
      frontend/saas-web/app/view/home/charts/KeyData.js
  55. 1 1
      frontend/saas-web/app/view/home/infoCardList/Payment.js
  56. 1 1
      frontend/saas-web/app/view/home/infoCardList/PurchaseIn.js
  57. 1 1
      frontend/saas-web/app/view/home/infoCardList/SaleOut.js
  58. 1 1
      frontend/saas-web/app/view/home/infoCardList/UnauditCheckIn.js
  59. 18 43
      frontend/saas-web/app/view/money/report/AccountBalance.js
  60. 20 26
      frontend/saas-web/app/view/money/report/AccountDetails.js
  61. 44 71
      frontend/saas-web/app/view/money/report/CustomerCheck.js
  62. 7 0
      frontend/saas-web/app/view/money/report/CustomerCheckController.js
  63. 7 7
      frontend/saas-web/app/view/money/report/OtherIODetail.js
  64. 7 24
      frontend/saas-web/app/view/money/report/PayDetail.js
  65. 39 49
      frontend/saas-web/app/view/money/report/ProfitDetail.js
  66. 31 55
      frontend/saas-web/app/view/money/report/RecDetail.js
  67. 116 78
      frontend/saas-web/app/view/money/report/TotalPayDetail.js
  68. 114 76
      frontend/saas-web/app/view/money/report/TotalRecDetail.js
  69. 50 98
      frontend/saas-web/app/view/money/report/VendorCheck.js
  70. 7 0
      frontend/saas-web/app/view/money/report/VendorCheckController.js
  71. 1 9
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  72. 11 3
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  73. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  74. 1 4
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  75. 46 88
      frontend/saas-web/app/view/purchase/report/Purchase.js
  76. 21 29
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  77. 26 51
      frontend/saas-web/app/view/sale/report/Sale.js
  78. 55 68
      frontend/saas-web/app/view/sale/report/SaleProfit.js
  79. 20 34
      frontend/saas-web/app/view/sale/report/SaleRec.js
  80. 1 1
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  81. 1 1
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  82. 5 1
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  83. 1 1
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  84. 25 28
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  85. 40 61
      frontend/saas-web/app/view/stock/inventory/EditDataList.js
  86. 44 96
      frontend/saas-web/app/view/stock/make/FormPanel.js
  87. 9 0
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  88. 3 12
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  89. 5 15
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  90. 16 28
      frontend/saas-web/app/view/stock/report/DataList.js
  91. 14 15
      frontend/saas-web/app/view/stock/report/ProdinoutCount.js
  92. 32 40
      frontend/saas-web/app/view/stock/report/Prodiodetail.js
  93. 27 5
      frontend/saas-web/ext/packages/ux/src/feature/MySummary.js
  94. 0 21
      frontend/saas-web/lib/echarts.common.min.js
  95. 0 0
      frontend/saas-web/lib/echarts.min.js
  96. 47 41
      frontend/saas-web/overrides/exporter/Stylesheet.js
  97. 20 22
      frontend/saas-web/overrides/exporter/file/Style.js

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

@@ -128,6 +128,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     UNPOSTSTOCKPROFIT_EXISTS(76500, "存在当前仓库+物料未审核的盘盈盘亏单"),
     STORAGE_WAREHOUSE_SAME(76501, "调拨单拨入拨出仓库一致"),
     STORAGE_WAREHOUSE_SAMES(76502, "调拨单: %s 拨入拨出仓库一致"),
+    SALEIN_OUTOFQTY(76503, "销售退货单数量大于出货单数量"),
     STOCKPROFIT_NULL(76600, "没有需要生成的盘盈盘亏单")
     ;
     private int code;

+ 59 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Feedback.java

@@ -0,0 +1,59 @@
+package com.usoftchina.saas.commons.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+
+/**
+ * @Description 意见反馈
+ * @Author chenwei
+ * @Date 2018/12/22
+ */
+public class Feedback extends CommonBaseEntity implements Serializable {
+
+    private String fb_msg;
+    private String fb_mobile;
+    private String fb_emial;
+    private String fb_qq;
+    private String fb_wechar;
+
+    public String getFb_msg() {
+        return fb_msg;
+    }
+
+    public void setFb_msg(String fb_msg) {
+        this.fb_msg = fb_msg;
+    }
+
+    public String getFb_mobile() {
+        return fb_mobile;
+    }
+
+    public void setFb_mobile(String fb_mobile) {
+        this.fb_mobile = fb_mobile;
+    }
+
+    public String getFb_emial() {
+        return fb_emial;
+    }
+
+    public void setFb_emial(String fb_emial) {
+        this.fb_emial = fb_emial;
+    }
+
+    public String getFb_qq() {
+        return fb_qq;
+    }
+
+    public void setFb_qq(String fb_qq) {
+        this.fb_qq = fb_qq;
+    }
+
+    public String getFb_wechar() {
+        return fb_wechar;
+    }
+
+    public void setFb_wechar(String fb_wechar) {
+        this.fb_wechar = fb_wechar;
+    }
+}

+ 34 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/FeedbackController.java

@@ -0,0 +1,34 @@
+package com.usoftchina.saas.commons.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.po.Feedback;
+import com.usoftchina.saas.commons.service.FeedbackService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Description 意见反馈
+ * @Author chenwei
+ * @Date 2018/12/22
+ */
+@RestController
+@RequestMapping("/feedBack")
+public class FeedbackController {
+
+    @Autowired
+    private FeedbackService feedbackService;
+
+    /**
+     * 意见反馈
+     * @return
+     */
+    @PostMapping("/save")
+    public Result saveFeedback(@RequestBody Feedback feedback){
+        feedbackService.save(feedback);
+        return Result.success();
+    }
+
+}

+ 1 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ShareController.java

@@ -74,6 +74,7 @@ public class ShareController {
      * @return
      */
     @GetMapping("/pc")
+    @ResponseBody
     public Result getPcUrl(String basePath, String companyName, @RequestParam(value = "delay", defaultValue = "1")Long delay){
         Long companyId = BaseContextHolder.getCompanyId();
         String username = BaseContextHolder.getUserName();

+ 9 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/FeedbackMapper.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.commons.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.po.Feedback;
+
+public interface FeedbackMapper extends CommonBaseMapper<Feedback> {
+
+
+}

+ 12 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/FeedbackService.java

@@ -0,0 +1,12 @@
+package com.usoftchina.saas.commons.service;
+
+import com.usoftchina.saas.commons.po.Feedback;
+
+public interface FeedbackService {
+    /**
+     * 保存
+     * @param feedback
+     * @return
+     */
+    boolean save(Feedback feedback);
+}

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

@@ -0,0 +1,26 @@
+package com.usoftchina.saas.commons.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.mapper.FeedbackMapper;
+import com.usoftchina.saas.commons.po.Feedback;
+import com.usoftchina.saas.commons.service.FeedbackService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description 意见反馈
+ * @Author chenwei
+ * @Date 2018/12/22
+ */
+@Service
+public class FeedbackServiceImpl extends CommonBaseServiceImpl<FeedbackMapper, Feedback> implements FeedbackService {
+
+    @Autowired
+    private FeedbackMapper feedbackMapper;
+
+    @Override
+    public boolean save(Feedback feedback){
+        return feedbackMapper.insertSelective(feedback) > 0;
+    }
+
+}

+ 5 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductReserveCostDTO.java

@@ -57,4 +57,9 @@ public class ProductReserveCostDTO extends CommonBaseDTO implements Serializable
      * 型号
      * */
     private String rc_prodOrispec;
+
+    /**
+     * 类型
+     * */
+    private String rc_prodKind;
 }

+ 31 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bom.java

@@ -37,6 +37,37 @@ public class Bom extends CommonBaseEntity implements Serializable {
 
     private String pr_unit;
 
+    private String pr_whid;
+
+    private String pr_whcode;
+
+    public String getPr_whname() {
+        return pr_whname;
+    }
+
+    public void setPr_whname(String pr_whname) {
+        this.pr_whname = pr_whname;
+    }
+
+    public String getPr_whid() {
+
+        return pr_whid;
+    }
+
+    public void setPr_whid(String pr_whid) {
+        this.pr_whid = pr_whid;
+    }
+
+    public String getPr_whcode() {
+        return pr_whcode;
+    }
+
+    public void setPr_whcode(String pr_whcode) {
+        this.pr_whcode = pr_whcode;
+    }
+
+    private String pr_whname;
+
     public String getPr_unit() {
         return pr_unit;
     }

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

@@ -16,7 +16,7 @@ public class BomDetail extends CommonBaseEntity implements Serializable {
 
     private String bd_unit;
 
-    private Integer bd_baseqty;
+    private Double bd_baseqty;
 
     private String bd_replace;
 
@@ -82,11 +82,11 @@ public class BomDetail extends CommonBaseEntity implements Serializable {
         this.bd_unit = bd_unit == null ? null : bd_unit.trim();
     }
 
-    public Integer getBd_baseqty() {
+    public Double getBd_baseqty() {
         return bd_baseqty;
     }
 
-    public void setBd_baseqty(Integer bd_baseqty) {
+    public void setBd_baseqty(Double bd_baseqty) {
         this.bd_baseqty = bd_baseqty;
     }
 

+ 7 - 7
applications/document/document-server/src/main/resources/mapper/BomDetailMapper.xml

@@ -8,7 +8,7 @@
     <result column="bd_sonid" property="bd_sonid" jdbcType="INTEGER" />
     <result column="bd_soncode" property="bd_soncode" jdbcType="VARCHAR" />
     <result column="bd_unit" property="bd_unit" jdbcType="VARCHAR" />
-    <result column="bd_baseqty" property="bd_baseqty" jdbcType="INTEGER" />
+    <result column="bd_baseqty" property="bd_baseqty" jdbcType="DOUBLE" />
     <result column="bd_replace" property="bd_replace" jdbcType="VARCHAR" />
     <result column="bd_remark" property="bd_remark" jdbcType="VARCHAR" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
@@ -73,7 +73,7 @@
       creatorId,createTime,creatorName)
     values ( #{bd_bomid,jdbcType=INTEGER}, #{bd_detno,jdbcType=INTEGER},
       #{bd_sonid,jdbcType=INTEGER}, #{bd_soncode,jdbcType=VARCHAR}, #{bd_unit,jdbcType=VARCHAR}, 
-      #{bd_baseqty,jdbcType=INTEGER}, #{bd_replace,jdbcType=VARCHAR}, #{bd_remark,jdbcType=VARCHAR}, 
+      #{bd_baseqty,jdbcType=DOUBLE}, #{bd_replace,jdbcType=VARCHAR}, #{bd_remark,jdbcType=VARCHAR},
       #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, 
       #{bd_text1,jdbcType=VARCHAR}, #{bd_text2,jdbcType=VARCHAR}, #{bd_text3,jdbcType=VARCHAR}, 
       #{bd_text4,jdbcType=VARCHAR}, #{bd_text5,jdbcType=VARCHAR},
@@ -157,7 +157,7 @@
         #{bd_unit,jdbcType=VARCHAR},
       </if>
       <if test="bd_baseqty != null" >
-        #{bd_baseqty,jdbcType=INTEGER},
+        #{bd_baseqty,jdbcType=DOUBLE},
       </if>
       <if test="bd_replace != null" >
         #{bd_replace,jdbcType=VARCHAR},
@@ -219,7 +219,7 @@
         bd_unit = #{bd_unit,jdbcType=VARCHAR},
       </if>
       <if test="bd_baseqty != null" >
-        bd_baseqty = #{bd_baseqty,jdbcType=INTEGER},
+        bd_baseqty = #{bd_baseqty,jdbcType=DOUBLE},
       </if>
       <if test="bd_replace != null" >
         bd_replace = #{bd_replace,jdbcType=VARCHAR},
@@ -261,7 +261,7 @@
       bd_sonid = #{bd_sonid,jdbcType=INTEGER},
       bd_soncode = #{bd_soncode,jdbcType=VARCHAR},
       bd_unit = #{bd_unit,jdbcType=VARCHAR},
-      bd_baseqty = #{bd_baseqty,jdbcType=INTEGER},
+      bd_baseqty = #{bd_baseqty,jdbcType=DOUBLE},
       bd_replace = #{bd_replace,jdbcType=VARCHAR},
       bd_remark = #{bd_remark,jdbcType=VARCHAR},
       companyId = #{companyId,jdbcType=INTEGER},
@@ -287,7 +287,7 @@
       (
       #{item.bd_bomid,jdbcType=INTEGER}, #{item.bd_detno,jdbcType=INTEGER},
       #{item.bd_sonid,jdbcType=INTEGER}, #{item.bd_soncode,jdbcType=VARCHAR}, #{item.bd_unit,jdbcType=VARCHAR},
-      #{item.bd_baseqty,jdbcType=INTEGER}, #{item.bd_replace,jdbcType=VARCHAR}, #{item.bd_remark,jdbcType=VARCHAR},
+      #{item.bd_baseqty,jdbcType=DOUBLE}, #{item.bd_replace,jdbcType=VARCHAR}, #{item.bd_remark,jdbcType=VARCHAR},
       #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP},
       #{item.bd_text1,jdbcType=VARCHAR}, #{item.bd_text2,jdbcType=VARCHAR}, #{item.bd_text3,jdbcType=VARCHAR},
       #{item.bd_text4,jdbcType=VARCHAR}, #{item.bd_text5,jdbcType=VARCHAR},
@@ -316,7 +316,7 @@
           bd_unit = #{item.bd_unit,jdbcType=VARCHAR},
         </if>
         <if test="item.bd_baseqty != null" >
-          bd_baseqty = #{item.bd_baseqty,jdbcType=INTEGER},
+          bd_baseqty = #{item.bd_baseqty,jdbcType=DOUBLE},
         </if>
         <if test="item.bd_replace != null" >
           bd_replace = #{item.bd_replace,jdbcType=VARCHAR},

+ 3 - 0
applications/document/document-server/src/main/resources/mapper/BomMapper.xml

@@ -25,6 +25,9 @@
     <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
     <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR" />
     <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
+    <result column="pr_whid" property="pr_whid" jdbcType="VARCHAR" />
+    <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
+    <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     bo_id, bo_motherid, bo_mothercode, bo_mothername, bo_version, bo_status, bo_statuscode, 

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

@@ -465,6 +465,7 @@
         <result column="po_amount" property="rc_amount" jdbcType="DOUBLE"/>
         <result column="pr_brand" property="rc_prodBrand" jdbcType="VARCHAR"/>
         <result column="pr_orispeccode" property="rc_prodOrispec" jdbcType="VARCHAR"/>
+        <result column="pr_kind" property="rc_prodKind" jdbcType="VARCHAR"/>
     </resultMap>
     <select id="selectReserveCost" resultMap="ProdReserveCostResultMap">
         select pr_code,pr_spec,pr_detail,pr_unit,wh_code,wh_description,pw_onhand onhand,pr_brand,pr_orispeccode
@@ -481,7 +482,7 @@
         ORDER BY PR_ID DESC
     </select>
     <select id="selectReserveCostByIgnoreWarehouse" resultMap="ProdReserveCostResultMap">
-        select pr_code,pr_spec,pr_detail,pr_unit,po_onhand onhand,po_avprice,po_amount,pr_brand,pr_orispeccode
+        select pr_code,pr_spec,pr_detail,pr_unit,po_onhand onhand,po_avprice,po_amount,pr_brand,pr_orispeccode,pr_kind
         from productonhand  left join product on pr_id = po_prodid and productonhand.companyId = product.companyId
         <where>
             <if test="con!=null">

+ 25 - 9
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/CustomerCheckView.java

@@ -25,7 +25,7 @@ public class CustomerCheckView {
 
     private Double qty;
 
-    private Double pd_orderprice;
+    private Double pd_sendprice;
 
     private Double pd_taxrate;
 
@@ -41,13 +41,29 @@ public class CustomerCheckView {
 
     private String pr_orispeccode;
 
-    public String getPr_brand(){return pr_brand;}
+    private Double pd_ordertotal;
 
-    public void setPr_brand(String pr_brand){ this.pr_brand = pr_brand;}
+    public Double getPd_ordertotal(){
+        return pd_ordertotal;
+    }
+    public void setPd_ordertotal(Double pd_ordertotal){
+        this.pd_ordertotal = pd_ordertotal;
+    }
+    public String getPr_brand(){
+        return pr_brand;
+    }
 
-    public String getPr_orispeccode(){return pr_orispeccode;}
+    public void setPr_brand(String pr_brand){
+        this.pr_brand = pr_brand;
+    }
 
-    public void setPr_orispeccode(String pr_orispeccode){ this.pr_orispeccode = pr_orispeccode;}
+    public String getPr_orispeccode(){
+        return pr_orispeccode;
+    }
+
+    public void setPr_orispeccode(String pr_orispeccode){
+        this.pr_orispeccode = pr_orispeccode;
+    }
 
     public Long getCompanyId() {
         return companyId;
@@ -145,12 +161,12 @@ public class CustomerCheckView {
         this.qty = qty;
     }
 
-    public Double getPd_orderprice() {
-        return pd_orderprice;
+    public Double getPd_sendprice() {
+        return pd_sendprice;
     }
 
-    public void setPd_orderprice(Double pd_orderprice) {
-        this.pd_orderprice = pd_orderprice;
+    public void setPd_sendprice(Double pd_sendprice) {
+        this.pd_sendprice = pd_sendprice;
     }
 
     public Double getPd_taxrate() {

+ 7 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/VendorAcountView.java

@@ -40,7 +40,14 @@ public class VendorAcountView {
     private Integer companyId;
     private String pd_remark;
     private int ym;
+    private Double pd_ordertotal;
 
+    public Double getPd_ordertotal(){
+        return pd_ordertotal;
+    }
+    public void setPd_ordertotal(Double pd_ordertotal){
+        this.pd_ordertotal = pd_ordertotal;
+    }
     public String getPr_orispeccode() {
         return pr_orispeccode;
     }

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

@@ -13,7 +13,8 @@
         <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
         <result column="pd_unit" property="pd_unit" jdbcType="VARCHAR" />
         <result column="qty" property="qty" jdbcType="DOUBLE" />
-        <result column="pd_orderprice" property="pd_orderprice" jdbcType="DOUBLE" />
+        <result column="pd_sendprice" property="pd_sendprice" jdbcType="DOUBLE" />
+        <result column="pd_ordertotal" property="pd_ordertotal" jdbcType="DOUBLE" />
         <result column="pd_taxrate" property="pd_taxrate" jdbcType="DOUBLE" />
         <result column="pd_total" property="pd_total" jdbcType="DOUBLE" />
         <result column="pd_netprice" property="pd_netprice" jdbcType="DOUBLE" />

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

@@ -16,6 +16,7 @@
     <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
     <result column="qty" property="qty" jdbcType="DOUBLE" />
     <result column="pd_orderprice" property="pd_orderprice" jdbcType="DOUBLE" />
+    <result column="pd_ordertotal" property="pd_ordertotal" jdbcType="DOUBLE" />
     <result column="pd_taxrate" property="pd_taxrate" jdbcType="DOUBLE" />
     <result column="pd_total" property="pd_total" jdbcType="DOUBLE" />
     <result column="pd_netprice" property="pd_netprice" jdbcType="DOUBLE" />

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

@@ -40,6 +40,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pi_total;
 
+    private Double pi_nettotal;
+
     private String pi_status;
 
     private String pi_statuscode;

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

@@ -35,4 +35,10 @@ public class PurchasePay  extends CommonBaseEntity implements Serializable {
     private String pd_remark;
 
     private Integer companyid;
+
+    private Double pi_total;
+
+    private Double pi_nettotal;
+
+    private String pb_manname;
 }

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

@@ -526,7 +526,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         result.setMessage(purchasedetailMapper.checkzxbzs(id));
         //检测单据是否关闭
         Integer checkClose = purchaseMapper.checkClose(id);
-        if (count > 0) {
+        if (checkClose > 0) {
             throw new BizException(BizExceptionCode.SALE_CLOSE.getCode(), String.format(BizExceptionCode.SALE_CLOSE.getMessage(),"审核"));
         }
 

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

@@ -96,9 +96,9 @@
     </springProfile>
 
     <springProfile name="docker">
-        <logger name="org.springframework" level="WARN"/>
-        <logger name="com.usoftchina.saas" level="WARN"/>
-        <root level="WARN">
+        <logger name="org.springframework" level="INFO"/>
+        <logger name="com.usoftchina.saas" level="INFO"/>
+        <root level="INFO">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>
         </root>

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

@@ -41,6 +41,7 @@
     <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
     <result column="pd_inqty" jdbcType="DOUBLE" property="pd_inqty" />
     <result column="pd_outqty" jdbcType="DOUBLE" property="pd_outqty" />
+    <result column="pi_nettotal" jdbcType="DOUBLE" property="pi_nettotal" />
     <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
     <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
     <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />

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

@@ -18,6 +18,9 @@
     <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="pi_nettotal" property="pi_nettotal" jdbcType="DOUBLE" />
+    <result column="pi_total" property="pi_total" jdbcType="DOUBLE" />
+    <result column="pb_manname" property="pb_manname" jdbcType="VARCHAR"/>
   </resultMap>
   <resultMap id="ListMap" type="com.usoftchina.saas.purchase.po.report.PurchaseReportDetail">
     <id column="pu_id" property="pu_id" jdbcType="INTEGER" />

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/ProdInOutMapper.java

@@ -47,4 +47,6 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
     List<HashMap<String, Object>> getWareHouseByCode(@Param("code") String code, @Param("companyId") Long companyId);
 
     void updateCreator(@Param("userId") Long userId, @Param("userName") String userName, @Param("id") Long id);
+
+    Integer checkSaleInQty(Long pi_id);
 }

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

@@ -47,6 +47,8 @@ public class SaleProfitView {
 
     private Double pd_total;
 
+    private Double pd_nettotal;
+
     private Double pd_profit;
 
     private Double pd_price;

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

@@ -37,4 +37,8 @@ public class SalerecView {
     private Double rbd_amount;
 
     private Integer companyid;
+
+    private Double pi_total;
+
+    private Double pi_nettotal;
 }

+ 6 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java

@@ -165,6 +165,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 updateDetails.add(detail);
             }
         }
+
         //插入从表
         if (insertDetails.size()>0) {
             prodIODetailMapper.batchInsert(insertDetails);
@@ -173,7 +174,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         if (updateDetails.size()>0) {
             prodIODetailMapper.batchUpdate(updateDetails);
         }
-
+        //销售退货单的数量必须小于出货单数量
+        Integer inQty = prodInOutMapper.checkSaleInQty(pi_id);
+        if (inQty > 0) {
+            throw new BizException(BizExceptionCode.SALEIN_OUTOFQTY);
+        }
         baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
         ProdInOut prodInOutNow = checkAndReturnOrder(pi_id);
         //更新明细金额等

+ 5 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -565,4 +565,9 @@ update ProdInOut SET
   <update id="updateCreator">
     update ProdInOut set creatorId = #{userId} , createTime=now(), creatorName=#{userName} where pi_id=#{id}
   </update>
+
+  <select id="checkSaleInQty" resultType="int" parameterType="long">
+    select count(1) from prodinout left join prodiodetail a on pi_id=pd_piid where
+    pi_class='销售退货单' and ifnull(pd_inqty,0) > (select ifnull(pd_outqty,0) from prodiodetail where pd_id=a.pd_ioid) and pi_id=#{pi_id};
+  </select>
 </mapper>

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

@@ -27,6 +27,7 @@
     <result column="companyid" property="companyid" jdbcType="INTEGER" />
       <result column="pd_remark" property="pd_remark" jdbcType="VARCHAR" />
     <result column="pw_costprice" property="pw_costprice" jdbcType="DOUBLE" />
+    <result column="pd_nettotal" property="pd_nettotal" jdbcType="DOUBLE" />
     <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
     <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
   </resultMap>

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

@@ -16,6 +16,8 @@
     <result column="rb_remark" property="rb_remark" jdbcType="VARCHAR" />
     <result column="companyid" property="companyid" jdbcType="INTEGER" />
     <result column="rbd_amount" property="rbd_amount" jdbcType="DOUBLE" />
+    <result column="pi_nettotal" property="pi_nettotal" jdbcType="DOUBLE" />
+    <result column="pi_total" property="pi_total" jdbcType="DOUBLE" />
   </resultMap>
   <select id="selectByCondition" resultMap="BaseResultMap">
     select  *  from Salerec_View

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/StockTaking.java

@@ -31,4 +31,6 @@ public class StockTaking extends CommonBaseEntity implements Serializable {
 
     private Double st_num;
 
+    private String pr_brand;
+
 }

+ 2 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/report/ProdinoutCountView.java

@@ -27,6 +27,8 @@ public class ProdinoutCountView implements Serializable{
     private Double pwm_endqty;
     private Double pwm_endamount;
     private Integer companyid;
+    private String pr_orispeccode;
+    private String pr_brand;
 
 
 }

+ 2 - 8
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -757,17 +757,11 @@
   </delete>
 
   <update id="calcProdIn">
-    update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
-    update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <delete id="deleteByInOutNo" >

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

@@ -33,6 +33,8 @@
     <result column="pr_detail" jdbcType="VARCHAR" property="pr_detail" />
     <result column="pr_spec" jdbcType="VARCHAR" property="pr_spec" />
     <result column="pr_unit" jdbcType="VARCHAR" property="pr_unit" />
+    <result column="pr_brand" jdbcType="VARCHAR" property="pr_brand" />
+    <result column="pr_orispeccode" jdbcType="VARCHAR" property="pr_orispeccode" />
     <result column="wh_description" jdbcType="VARCHAR" property="wh_description" />
     <result column="pwm_beginqty" jdbcType="DOUBLE" property="pwm_beginqty" />
     <result column="pwm_beginamount" jdbcType="DOUBLE" property="pwm_beginamount" />

+ 4 - 3
applications/storage/storage-server/src/main/resources/mapper/StockTakingMapper.xml

@@ -22,6 +22,7 @@
     <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="updaterName" jdbcType="TIMESTAMP" property="updaterName" />
     <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+    <result column="pr_brand" jdbcType="VARCHAR" property="pr_brand" />
   </resultMap>
   <sql id="Base_Column_List">
     st_id, st_prodid, st_prodcode, st_proddetail, st_prodorispeccode, st_prodkind, st_produnit, 
@@ -231,14 +232,14 @@
 
   <select id="selectStockTakingBycondition" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
-    <include refid="Base_Column_List" />
-    from stocktaking
+    stocktaking.*,pr_brand
+    from stocktaking left join product on pr_id = st_prodid
     <where>
       <if test="con != null">
         ${con}
       </if>
       <if test="companyId != null">
-      and companyId = #{companyId}
+      and stocktaking.companyId = #{companyId}
       </if>
 
     </where>

+ 2 - 2
base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/interceptor/AuthRestInterceptor.java

@@ -45,8 +45,8 @@ public class AuthRestInterceptor extends HandlerInterceptorAdapter {
                 BaseContextHolder.setUserName(infoFromToken.getRealName());
                 BaseContextHolder.setCompanyId(infoFromToken.getCompanyId());
                 BaseContextHolder.setToken(token);
-                log.info("request={} token={} \\r\\n userName={}", request.getRequestURI(),
-                        token, infoFromToken.getUserName());
+                log.info("request={} CompanyId={} token={} \\r\\n userName={}  ", request.getRequestURI(),
+                        infoFromToken.getCompanyId(), token, infoFromToken.getUserName());
             }
         } else {
             // no mapping

+ 1 - 1
frontend/saas-web/app.json

@@ -212,7 +212,7 @@
             "path": "${framework.dir}/build/ext-all-rtl-debug.js"
         },
         {
-            "path": "lib/echarts.common.min.js"
+            "path": "lib/echarts.min.js"
         },
         {
             "path": "app.js",

+ 29 - 0
frontend/saas-web/app/model/report/CustomerCheck.js

@@ -0,0 +1,29 @@
+Ext.define('saas.model.report.CustomerCheck', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'pi_date', type: 'date' }, // 单据日期
+        { name: 'pi_inoutno', type: 'string' }, // 单号
+        { name: 'pi_class', type: 'string' }, // 业务类型
+        { name: 'pd_pdno', type: 'int' }, // 序号
+        { name: 'pr_code', type: 'string' }, // 物料编号
+        { name: 'pr_brand', type: 'string' }, // 品牌
+        { name: 'pr_detail', type: 'string' }, // 名称
+        { name: 'pr_orispeccode', type: 'string' }, // 型号
+        { name: 'pr_spec', type: 'string' }, // 规格
+        { name: 'qty', type: 'float' }, // 数量
+        { name: 'pd_unit', type: 'string' }, // 单位
+        { name: 'pd_netprice', type: 'float' }, // 单价
+        { name: 'pd_orderprice', type: 'float' }, // 含税单价
+        { name: 'pd_nettotal', type: 'float' }, // 金额
+        { name: 'pd_taxrate', type: 'float' }, // 税率
+        { name: 'pd_ordertotal-pd_nettotal', type: 'float', // 税额
+            convert: function(v, rec) {
+                var t = (rec.get('pd_ordertotal') || 0.0) - (rec.get('pd_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['pd_ordertotal', 'pd_nettotal']
+        },
+        { name: 'pd_ordertotal', type: 'float' }, // 价税合计
+    ],
+});

+ 20 - 0
frontend/saas-web/app/model/report/ProfitDetail.js

@@ -0,0 +1,20 @@
+Ext.define('saas.model.report.ProfitDetail', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'cu_type', type: 'string' }, // 客户类型
+        { name: 'pi_custname', type: 'string' }, // 客户名称
+        { name: 'netamount', type: 'float' }, // 金额
+        { name: 'saamount-netamount', type: 'float', // 税额
+            convert: function(v, rec) {
+                var t = (rec.get('saamount') || 0.0) - (rec.get('netamount') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['saamount', 'netamount']    
+        },
+        { name: 'saamount', type: 'float' }, // 价税合计
+        { name: 'costamount', type: 'float' }, // 成本金额
+        { name: 'profit', type: 'float' }, // 毛利润
+        { name: 'profitpresent', type: 'float' }, // 毛利率
+    ],
+});

+ 13 - 23
frontend/saas-web/app/model/report/Purchase.js

@@ -3,34 +3,24 @@ Ext.define('saas.model.report.Purchase', {
 
     fields: [
 
-        { name: 'id', type: 'int' },
-        { name: 'pu_code', type: 'string' },
-        { name: 'pu_vendcode', type: 'string' },
-        { name: 'pu_vendname', type: 'string' },
-        { name: 'pu_acceptstatus', type: 'string' },
-        { name: 'pu_buyername', type: 'string' },
-        { name: 'pu_date', type: 'date' },
-        { name: 'pd_detno', type: 'int' },
-        { name: 'pd_prodcode', type: 'string' },
-        { name: 'pr_detail', type: 'string' },
-        { name: 'pr_spec', type: 'string' },
-        { name: 'pr_brand', type: 'string' },
-        { name: 'pr_unit', type: 'string' },
-        { name: 'pd_qyt', type: 'float' },
-        { name: 'pd_price', type: 'float' },
-        { name: 'pd_taxrate', type: 'float' },
-        { name: 'pd_total', type: 'float' },
-        { name: 'pd_taxprice', type: 'float' },
-        { name: 'pd_taxtotal', type: 'float' },
-        { name: 'pd_taxamount', type: 'float',
+        { name: 'pr_detail', type: 'string' }, // 名称
+        { name: 'pr_orispeccode', type: 'string' }, // 型号
+        { name: 'pr_spec', type: 'string' }, // 规格
+        { name: 'pd_qty', type: 'float' }, // 采购数量
+        { name: 'pr_unit', type: 'string' }, // 单位
+        { name: 'pd_taxprice', type: 'float' }, // 单价
+        { name: 'pd_price', type: 'float' }, // 含税单价
+        { name: 'pd_taxtotal', type: 'float' }, // 金额
+        { name: 'pd_taxrate', type: 'int' }, // 税率
+        { name: 'pd_total-pd_taxtotal', type: 'float', // 税额
             convert: function(v, rec) {
                 var t = (rec.get('pd_total') || 0.0) - (rec.get('pd_taxtotal') || 0.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },
             depends: ['pd_total', 'pd_taxtotal']
         },
-        { name: 'pd_acceptqty', type: 'float' },
-        { name: 'pd_accepttotal', type: 'float' },
-        { name: 'pd_remark', type: 'string' },
+        { name: 'pd_total', type: 'float' }, // 价税合计
+        { name: 'pd_pdacceptqty', type: 'float' }, // 收货数量
+        { name: 'pd_remark', type: 'string' }, // 备注
     ],
 });

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

@@ -0,0 +1,24 @@
+Ext.define('saas.model.report.PurchasePay', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'pb_code', type: 'string' }, // 付款单号
+        { name: 'pu_vendname', type: 'string' }, // 供应商名称
+        { name: 'createTime', type: 'date' }, // 日期
+        { name: 'pbd_slcode', type: 'string' }, // 来源单号
+        { name: 'pbd_slkind', type: 'string' }, // 业务类型
+        { name: 'pi_nettotal', type: 'float' }, // 金额
+        { name: 'pd_total-pi_nettotal', type: 'float', // 税额
+            convert: function(v, rec) {
+                var t = (rec.get('pi_total') || 0.0) - (rec.get('pi_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['pi_total', 'pi_nettotal']
+        },
+        { name: 'pi_total', type: 'float' }, // 价税合计
+        { name: 'pbd_nowbalance', type: 'float' }, // 付款金额
+        { name: 'pb_payrate', type: 'float', }, // 付款比例
+        { name: 'pb_manname', type: 'string' }, // 付款人
+        { name: 'pb_remark', type: 'string' }, // 备注
+    ],
+});

+ 1 - 2
frontend/saas-web/app/model/report/Sale.js

@@ -20,9 +20,8 @@ Ext.define('saas.model.report.Sale', {
         { name: 'sd_price', type: 'float' },
         { name: 'sd_nettotal', type: 'float' },
         { name: 'sd_taxrate', type: 'float' },
-        { name: 'sd_taxamount', type: 'float',
+        { name: 'sd_total - sd_nettotal', type: 'float',
             convert: function(v, rec) {
-                debugger;
                 var t = (rec.get('sd_total') || 0.0) - (rec.get('sd_nettotal') || 0.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
             },

+ 35 - 0
frontend/saas-web/app/model/report/SaleProfit.js

@@ -0,0 +1,35 @@
+Ext.define('saas.model.report.SaleProfit', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'pi_date', type: 'date' },
+        { name: 'sa_custname', type: 'string' },
+        { name: 'sa_seller', type: 'string' },
+        { name: 'pd_inoutno', type: 'string' },
+        { name: 'pr_code', type: 'string' },
+        { name: 'pr_brand', type: 'string' },
+        { name: 'pr_detail', type: 'string' },
+        { name: 'pr_orispeccode', type: 'string' },
+        { name: 'pr_spec', type: 'string' },
+        { name: 'pd_outqty', type: 'float' },
+        { name: 'pr_unit', type: 'string' },
+        { name: 'pd_netprice', type: 'float' },
+        { name: 'pd_sendprice', type: 'float' },
+        { name: 'pd_nettotal', type: 'float' },
+        { name: 'pd_taxrate', type: 'int' },
+        { name: 'pd_ordertotal-pd_nettotal', type: 'float',
+            convert: function(v, rec) {
+                var t = (rec.get('pd_ordertotal') || 0.0) - (rec.get('pd_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['pd_ordertotal', 'pd_nettotal']
+        }, 
+        { name: 'pd_ordertotal', type: 'float' },
+        { name: 'pd_price', type: 'float' },
+        { name: 'pd_total', type: 'float' },
+        { name: 'pd_profit', type: 'float' },
+        { name: 'pd_profitpresent', type: 'float' },
+        { name: 'pd_remark', type: 'string' }
+    ],
+});

+ 24 - 0
frontend/saas-web/app/model/report/SaleRec.js

@@ -0,0 +1,24 @@
+Ext.define('saas.model.report.SaleRec', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'rb_code', type: 'string' },
+        { name: 'rb_custname', type: 'string' },
+        { name: 'rb_date', type: 'date' },
+        { name: 'sd_prodcode', type: 'string' },
+        { name: 'rbd_slcode', type: 'string' },
+        { name: 'rbd_slkind', type: 'string' },
+        { name: 'pi_nettotal', type: 'float' },
+        { name: 'pi_total', type: 'float' },
+        { name: 'rbd_nowbalance', type: 'float' },
+        { name: 'rb_backrate', type: 'float' },
+        { name: 'pi_total-pi_nettotal', type: 'float',
+            convert: function(v, rec) {
+                var t = (rec.get('sd_total') || 0.0) - (rec.get('sd_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['pi_total', 'pi_nettotal']
+        },{ name: 'rb_remark', type: 'string' }
+    ],
+});

+ 22 - 0
frontend/saas-web/app/model/report/TotalPayDetail.js

@@ -0,0 +1,22 @@
+Ext.define('saas.model.report.TotalPayDetail', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'vm_yearmonth', type: 'string' }, // 期间
+        { name: 'vm_vendname', type: 'string' }, // 供应商名称
+        { name: 'vm_beginpreamount', type: 'float' }, // 期初预付
+        { name: 'vm_beginamount', type: 'float' }, // 期初应付
+        { name: 'vm_nowpreamount', type: 'float' }, // 本期预付
+        { name: 'vm_nowamount', type: 'float' }, // 本期应付
+        { name: 'vm_nowpayamount', type: 'float' }, // 本期核销
+        { name: 'vm_endpreamount', type: 'float' }, // 期末预付
+        { name: 'vm_endamount', type: 'float' }, // 期末应付
+        { name: 'vm_endamount-vm_endpreamount', type: 'float', // 应付余额
+            convert: function(v, rec) {
+                var t = (rec.get('vm_endamount') || 0.0) - (rec.get('vm_endpreamount') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['vm_endamount', 'vm_endpreamount']
+        }
+    ],
+});

+ 22 - 0
frontend/saas-web/app/model/report/TotalRecDetail.js

@@ -0,0 +1,22 @@
+Ext.define('saas.model.report.TotalRecDetail', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'cm_yearmonth', type: 'string' }, // 期间
+        { name: 'cm_custname', type: 'string' }, // 客户名称
+        { name: 'cm_beginpreamount', type: 'float' }, // 期初预收
+        { name: 'cm_beginamount', type: 'float' }, // 期初应收
+        { name: 'cm_nowpreamount', type: 'float' }, // 本期预收
+        { name: 'cm_nowamount', type: 'float' }, // 本期应收
+        { name: 'cm_nowpayamount', type: 'float' }, // 本期核销
+        { name: 'cm_endpreamount', type: 'float' }, // 期末预收
+        { name: 'cm_endamount', type: 'float' }, // 期末应收
+        { name: 'cm_endamount-cm_endpreamount', type: 'float', // 应收余额
+            convert: function(v, rec) {
+                var t = (rec.get('cm_endamount') || 0.0) - (rec.get('cm_endpreamount') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['cm_endamount', 'cm_endpreamount']
+        }
+    ],
+});

+ 28 - 0
frontend/saas-web/app/model/report/VendorCheck.js

@@ -0,0 +1,28 @@
+Ext.define('saas.model.report.VendorCheck', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'pi_date', type: 'date' }, // 单据日期
+        { name: 'pi_inoutno', type: 'string' }, // 单号
+        { name: 'pi_class', type: 'string' }, // 业务类型
+        { name: 'pd_pdno', type: 'int' }, // 序号
+        { name: 'pr_code', type: 'string' }, // 物料编号
+        { name: 'pr_brand', type: 'string' }, // 品牌
+        { name: 'pr_detail', type: 'string' }, // 名称
+        { name: 'pr_orispeccode', type: 'string' }, // 型号
+        { name: 'pr_spec', type: 'string' }, // 规格
+        { name: 'qty', type: 'float' }, // 数量
+        { name: 'pd_unit', type: 'string' }, // 单位
+        { name: 'pd_netprice', type: 'float' }, // 单价
+        { name: 'pd_nettotal', type: 'float' }, // 金额
+        { name: 'pd_taxrate', type: 'float' }, // 税率
+        { name: 'pd_ordertotal-pd_nettotal', type: 'float', // 税额
+            convert: function(v, rec) {
+                var t = (rec.get('pd_ordertotal') || 0.0) - (rec.get('pd_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['pd_ordertotal', 'pd_nettotal']
+        },
+        { name: 'pd_ordertotal', type: 'float' }, // 价税合计
+    ],
+});

+ 12 - 0
frontend/saas-web/app/view/core/dbfind/types/BomDbfindTrigger.js

@@ -56,6 +56,18 @@ Ext.define('saas.view.core.dbfind.types.BomDbfindTrigger', {
         text: "版本",
         width: 80,
         dataIndex: "bo_version"
+    }, {
+        text: "默认仓库id",
+        hidden: true,
+        dataIndex: "pr_whid"
+    }, {
+        text: "默认仓库编号",
+        hidden: true,
+        dataIndex: "pr_whcode"
+    }, {
+        text: "默认仓库名称",
+        hidden: true,
+        dataIndex: "pr_whname"
     }, {
         dataIndex: '',
         flex: 1

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

@@ -31,7 +31,7 @@ Ext.define('saas.view.core.form.FormPanel', {
     remoteConfig: true, // 是否需要从远端读取form配置
     toolBtns: [], // 自定义按钮
     codeInHeader: true, // 单据编号显示在toolbar
-    invalidText: '表单校验有误,请检查', // 校验未通过提示内容
+    invalidText: '表单校验有误,请检查后重试', // 校验未通过提示内容
     dirtyAuditText: '表单数据有修改,是否先保存修改?', // 有修改时点击审核提示内容
     noDirtySaveText: '表单数据无修改', // 无修改点击保存提示内容
 

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

@@ -189,15 +189,18 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
     initStore: function () {
         var me = this, cfg = {};
-        if(me.groupField) {
-            cfg.sorters = {
-                property: me.groupField,
-                direction: 'ASC'
-            }
+        // if(me.groupField) {
+        //     cfg.sorters = {
+        //         property: me.groupField,
+        //         direction: 'ASC'
+        //     }
+        // }
+        if(me.reportModel) {
+            cfg.model = me.reportModel;
+        }else {
+            cfg.fields = me.getFields();
         }
         var store = Ext.create('Ext.data.Store', Ext.Object.merge({
-            //fields: me.getFields(),
-            model: me.reportModel,
             autoLoad: me.autoLoad,
             pageSize: 15,
             data: [],
@@ -212,8 +215,6 @@ Ext.define('saas.view.core.report.ReportPanel', {
                     type: 'json',
                     rootProperty: me.rootProperty,
                     totalProperty: me.totalProperty,
-                    // rootProperty: 'data.list.list',
-                    // totalProperty: 'data.list.total',
                 },
                 listeners: {
                     exception: function (proxy, response, operation, eOpts) {

+ 16 - 24
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -98,14 +98,12 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 dataIndex : "id", 
                 hidden : true, 
                 xtype : "numbercolumn"
-            },
-            {
+            }, {
                 text : "关联ID", 
                 dataIndex : "bd_bomid", 
                 hidden : true,  
                 xtype : "numbercolumn"
-            },
-            {
+            }, {
                 allowBlank:false,
                 text : "物料编号", 
                 dataIndex : "bd_soncode", 
@@ -128,14 +126,13 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 text : "物料ID", 
                 hidden : true, 
                 dataIndex : "bd_sonid", 
-            },{
+            }, {
                 text: 'model映射需要',
                 dataIndex: 'productDTO',
                 hidden: true,
-            },
-            {
+            }, {
                 text : "品牌", 
-                width : 150.0, 
+                width : 100.0, 
                 dataIndex : "pr_brand",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -144,10 +141,9 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     }                     
                     return v;
                 }
-            },
-            {
-                text : "名称", 
-                width : 200.0, 
+            }, {
+                text : "物料名称", 
+                width : 150.0, 
                 dataIndex : "pr_detail",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -170,7 +166,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 }
             },{
                 text : "规格", 
-                width : 150, 
+                width : 200, 
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -179,15 +175,10 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     }                     
                     return v;
                 }
-            },{
-                text : "单位", 
-                dataIndex : "bd_unit", 
-                width : 80 
-            },
-            {
+            }, {
                 allowBlank:false,
                 text : "用量", 
-                width : 80, 
+                width : 110, 
                 dataIndex : "bd_baseqty",
                 editor : {
                     xtype : "numberfield",
@@ -196,11 +187,12 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     maxLength: 10,
                 },
                 renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 3, true);
                 }
+            }, {
+                text : "单位", 
+                dataIndex : "bd_unit", 
+                width : 65 
             }, {
                 text : "替代料", 
                 dataIndex : "bd_replace", 

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

@@ -170,7 +170,8 @@ Ext.define('saas.view.document.product.FormPanel', {
     }, {
         xtype : "textfield", 
         name : "pr_vendname", 
-        fieldLabel : "供应商名称"
+        fieldLabel : "供应商名称",
+        readOnly: true
     },{
         ignore:true,
         readOnly:true,
@@ -237,7 +238,7 @@ Ext.define('saas.view.document.product.FormPanel', {
         xtype : "detailGridField", 
         storeModel:'saas.model.document.ProductDetail',
         detnoColumn: 'pd_detno',
-        showCount: false,
+        showCount: true,
         allowEmpty:true,
         // hidden: true,
         deleteDetailUrl:'/api/document/product/deleteDetail',

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

@@ -107,7 +107,7 @@ Ext.define('saas.view.document.vendor.BasePanel', {
                 return Ext.util.Format.number(v, '0');
             }
         },{
-            text: '应付余额',
+            text: '应付余额(元)',
             xtype: 'numbercolumn',
             dataIndex : 've_leftamount',
             width : 120,

+ 0 - 21
frontend/saas-web/app/view/home/charts/KeyData.js

@@ -97,27 +97,6 @@ Ext.define('saas.view.home.charts.KeyData', {
                 itemclick: function(th, record, item, index, e, eOpts) {
                     saas.util.BaseUtil.openTab(record.get('viewType'), record.get('title'), record.get('id'));
                 },
-                // itemmouseenter: function(th, record, item, index, e, eOpts) {
-                //     var tip = th.tip;
-                //     if(!tip) {
-                //         var tip = Ext.create('Ext.tip.ToolTip', {
-                //             target: th.el,
-                //             minWidth: 100,
-                //             title: record.get('label'),
-                //             html: record.get('value'),
-                //             showOnTap: true,
-                //             trackMouse: true
-                //         });
-                //         th.tip = tip;
-                //         tip.showAt(e.getXY());
-                //     }
-                // },
-                // itemmouseleave: function(th, record, item, index, e, eOpts) {
-                //     var tip = th.tip;
-                //     if(tip) {
-                //         th.tip = Ext.destroy(th.tip);
-                //     }
-                // }
             }
         });
 

+ 1 - 1
frontend/saas-web/app/view/home/infoCardList/Payment.js

@@ -47,7 +47,7 @@ Ext.define('saas.view.home.infoCardList.Payment', {
         dataIndex: 'pi_pucode',
         width: 110
     },{
-        text: '总额',
+        text: '总额(元)',
         dataIndex: 'pi_total',
         width: 80,
         renderer: function (v) {

+ 1 - 1
frontend/saas-web/app/view/home/infoCardList/PurchaseIn.js

@@ -56,7 +56,7 @@ Ext.define('saas.view.home.infoCardList.PurchaseIn', {
         dataIndex: 'pr_brand',
         width: 200
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
         width: 200
     }, {

+ 1 - 1
frontend/saas-web/app/view/home/infoCardList/SaleOut.js

@@ -56,7 +56,7 @@ Ext.define('saas.view.home.infoCardList.SaleOut', {
         dataIndex: 'pr_brand',
         width: 200
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
         width: 200
     }, {

+ 1 - 1
frontend/saas-web/app/view/home/infoCardList/UnauditCheckIn.js

@@ -47,7 +47,7 @@ Ext.define('saas.view.home.infoCardList.UnauditCheckIn', {
         dataIndex: 'pi_pucode',
         width: 110
     },{
-        text: '总额',
+        text: '总额(元)',
         dataIndex: 'pi_total',
         width: 80,
         renderer: function (v) {

+ 18 - 43
frontend/saas-web/app/view/money/report/AccountBalance.js

@@ -13,7 +13,7 @@ Ext.define('saas.view.money.report.AccountBalance', {
     defaultCondition: null,
     reportTitle: '账户收支明细表',
     QueryWidth: 0.25,
-    //筛选:账户、日期(必填)
+
     searchItems: [{
         xtype: 'bandinfoDbfindTrigger',
         name: 'bankname',
@@ -27,81 +27,56 @@ Ext.define('saas.view.money.report.AccountBalance', {
     }],
 
     reportColumns: [{
+        text: '日期',
+        dataIndex: 'date',
+        xtype: 'datecolumn',
+        width: 110
+    }, {
         text: '账户编号',
         dataIndex: 'bankcode',
-        width: 150
+        width: 80
     }, {
         text: '账户名称',
         dataIndex: 'bankname',
-        width: 200
-    }, {
-        text: '日期',
-        dataIndex: 'date',
-        xtype: 'datecolumn',
-        width: 110
+        width: 150
     }, {
         text: '业务类型',
         dataIndex: 'kind',
-        width: 110
+        width: 100
     }, {
         text: '收入',
         dataIndex: 'inamount',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 110,
+        width: 120,
         renderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
         summaryRenderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '支出',
         dataIndex: 'outamount',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        width: 110,
+        width: 120,
         renderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
         summaryRenderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
-    },
-    //     {
-    //     text: '账户余额',
-    //     dataIndex: 'thisamount',
-    //     xtype: 'numbercolumn',
-    //     width: 110,
-    //     renderer: function (v) {
-    //         var arr = (v + '.').split('.');
-    //         var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-    //         var format = '0,000.' + xr.join('');
-    //         return Ext.util.Format.number(v, format);
-    //     }
-    // },
-        {
+    }, {
         text: '往来单位',
         dataIndex: 'bname',
-        width: 150
+        width: 200
     }, {
         text: '收付款人',
         dataIndex: 'bmanname',
-        width: 110
+        width: 80
     }, {
         text: '备注',
         dataIndex: 'remark',

+ 20 - 26
frontend/saas-web/app/view/money/report/AccountDetails.js

@@ -50,18 +50,20 @@ Ext.define('saas.view.money.report.AccountDetails', {
         emptyText: '供应商编号/名称',
         columnWidth: 0.15
     }],
+
     reportColumns: [{
-        text: 'id',
-        dataIndex: 'pi_id',
-        hidden: true
-    }, {
-        text: '单据编号',
-        dataIndex: 'sl_code',
+        text: '核销单号',
+        dataIndex: 'pb_code',
         width: 150
     }, {
-        text: '单据类型',
-        dataIndex: 'sl_kind',
+        text: '单据日期',
+        dataIndex: 'pb_date',
+        xtype: 'datecolumn',
         width: 110
+    }, {
+        text: '业务类型',
+        dataIndex: 'sl_kind',
+        width: 100
     }, {
         text: '供应商名称',
         dataIndex: 've_name',
@@ -71,37 +73,29 @@ Ext.define('saas.view.money.report.AccountDetails', {
         dataIndex: 'cu_name',
         width: 200
     }, {
-        text: '核销单号',
-        dataIndex: 'pb_code',
-        width: 200
-    }, {
-        text: '单据日期',
-        dataIndex: 'pb_date',
-        xtype: 'datecolumn',
-        width: 110
+        text: '来源单号',
+        dataIndex: 'sl_code',
+        width: 150
     }, {
         text: '本期核销金额(元)',
         dataIndex: 'pbd_nowbalance',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 130,
+        width: 150,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '总金额(元)',
         dataIndex: 'sl_orderamount',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        width: 110,
+        width: 120,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
+    }, {
+        dataIndex: '',
+        flex: 1
     }],
 });

+ 44 - 71
frontend/saas-web/app/view/money/report/CustomerCheck.js

@@ -22,7 +22,8 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
         listeners: {
             beforequery: function(f) {
                 return !!f.value;
-            }
+            },
+            change: 'pi_custname_change'
         }
     }, {
         xtype: 'condatefield',
@@ -31,11 +32,9 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
         columnWidth: 0.4
     }],
 
+    reportModel: 'saas.model.report.CustomerCheck',
+
     reportColumns: [{
-        text: 'id',
-        dataIndex: 'pi_id',
-        hidden: true
-    },  {
         text: '单据日期',
         dataIndex: 'pi_date',
         xtype: 'datecolumn',
@@ -44,12 +43,16 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
         text: '单号',
         dataIndex: 'pi_inoutno',
         width: 150
+    }, {
+        text: '业务类型',
+        dataIndex: 'pi_class',
+        width: 100
     }, {
         text: '序号',
         dataIndex: 'pd_pdno',
         exportFormat: 'Integer',
         xtype: 'numbercolumn',
-        width: 80
+        width: 65
     }, {
         text: '物料编号',
         width: 150,
@@ -57,11 +60,11 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
-        width: 200
+        width: 100
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -69,7 +72,7 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
     }, {
         text: '规格',
         dataIndex: 'pr_spec',
-        width: 150
+        width: 200
     }, {
         text: '数量',
         xtype: 'numbercolumn',
@@ -85,13 +88,13 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
     }, {
         text: '单位',
         dataIndex: 'pd_unit',
-        width: 80
+        width: 65
     }, {
         text: '单价(元)',
-        dataIndex: 'pd_orderprice',
+        dataIndex: 'pd_netprice',
         exportFormat: 'Price',
         xtype: 'numbercolumn',
-        width: 110,
+        width: 120,
         renderer: function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
@@ -99,92 +102,62 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
             return Ext.util.Format.number(v, format);
         }
     }, {
-        text: '税率',
-        dataIndex: 'pd_taxrate',
-        exportFormat: 'Integer',
+        text: '含税单价(元)',
+        dataIndex: 'pd_sendprice',
+        exportFormat: 'Price',
         xtype: 'numbercolumn',
-        width: 80,
+        width: 120,
         renderer: function(v) {
-            return Ext.util.Format.number(v, '0');
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join('');
+            return Ext.util.Format.number(v, format);
         }
     }, {
         text: '金额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        width: 110,
-        dataIndex: 'pd_total',
+        width: 120,
+        dataIndex: 'pd_nettotal',
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         },
-        // summaryType: 'sum',
-        // summaryRenderer: function(v) {
-        //     var arr = (v + '.').split('.');
-        //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-        //     var format = '0,000.' + xr.join('');
-        //     return Ext.util.Format.number(v, format);
-        // }
-    }, {
-        text: '不含税单价(元)',
-        width: 150,
-        dataIndex: 'pd_netprice',
-        exportFormat: 'Price',
+    }, {
+        text: '税率(%)',
+        dataIndex: 'pd_taxrate',
+        exportFormat: 'Integer',
         xtype: 'numbercolumn',
+        width: 80,
         renderer: function(v) {
+            return Ext.util.Format.number(v, '0');
+        }
+    }, {
+        text: '税额(元)',
+        width: 120,
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: 'pd_ordertotal-pd_nettotal',
+        renderer : function(v) {
             var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         }
     }, {
-        text: '不含税金额(元)',
-        width: 150,
+        text: '价税合计(元)',
+        width: 120,
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'pd_nettotal',
+        dataIndex: 'pd_ordertotal',
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         }
-        // summaryType: 'sum',
-        // summaryRenderer: function(v) {
-        //     var arr = (v + '.').split('.');
-        //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-        //     var format = '0,000.' + xr.join('');
-        //     return Ext.util.Format.number(v, format);
-        // }
-    }, {
-        text: '单据类型',
-        dataIndex: 'pi_class',
-        width: 110
-    }, {
-        text: '期初应收',
-        dataIndex: 'beginamount',
-        hidden: true,
-        width: 0,
-        summaryType: 'cus',
-    }, {
-        text: '增加应收',
-        dataIndex: 'nowamount',
-        hidden: true,
-        width: 0,
-        summaryType: 'cus',
-    }, {
-        text: '增加预收',
-        dataIndex: 'nowpay',
-        hidden: true,
-        width: 0,
-        summaryType: 'cus',
-    }, {
-        text: '应收余额',
-        dataIndex: 'nowbalance',
-        hidden: true,
-        width: 0,
-        summaryType: 'cus',
     }],
 
     listeners: {

+ 7 - 0
frontend/saas-web/app/view/money/report/CustomerCheckController.js

@@ -15,5 +15,12 @@ Ext.define('saas.view.money.report.CustomerCheckController', {
                 }
             }
         });
+    },
+
+    pi_custname_change: function(field, value) {
+        var me = this,
+        reportPanel = me.getView();
+
+        reportPanel.reportTitle = '客户对账单(' + value + ')'
     }
 });

+ 7 - 7
frontend/saas-web/app/view/money/report/OtherIODetail.js

@@ -66,15 +66,15 @@ Ext.define('saas.view.money.report.OtherIODetail', {
     reportColumns: [{
         text: '日期',
         dataIndex: 'bl_date',
-        width: 200
+        width: 110
     }, {
         text: '单据编号',
         dataIndex: 'bl_code',
-        width: 200,
+        width: 150,
     }, {
         text: '收支类别',
         dataIndex: 'bl_kind',
-        width: 200,
+        width: 100,
     }, {
         text: '资金账户',
         dataIndex: 'bl_bankname',
@@ -83,7 +83,7 @@ Ext.define('saas.view.money.report.OtherIODetail', {
         text: '收入',
         dataIndex: 'bl_income',
         exportFormat: 'Amount',
-        width: 150,
+        width: 120,
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -101,7 +101,7 @@ Ext.define('saas.view.money.report.OtherIODetail', {
         text: '支出',
         dataIndex: 'bl_spending',
         exportFormat: 'Amount',
-        width: 150,
+        width: 120,
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -118,10 +118,10 @@ Ext.define('saas.view.money.report.OtherIODetail', {
     }, {
         text: '往来单位',
         dataIndex: 'bl_assname',
-        width: 150,
+        width: 200,
     }, {
         text: '备注',
         dataIndex: 'bl_remark',
-        width: 150
+        width: 250
     }]
 });

+ 7 - 24
frontend/saas-web/app/view/money/report/PayDetail.js

@@ -28,10 +28,6 @@ Ext.define('saas.view.money.report.PayDetail', {
     }],
 
     reportColumns: [{
-        text: 'id',
-        dataIndex: 'pd_id',
-        hidden: true
-    }, {
         text: '单据日期',
         xtype: 'datecolumn',
         dataIndex: 'pd_date',
@@ -41,29 +37,19 @@ Ext.define('saas.view.money.report.PayDetail', {
         dataIndex: 'pd_code',
         width: 150
     }, {
-        text: '单据类型',
+        text: '业务类型',
         dataIndex: 'pd_kind',
-        width: 110
-    }, {
-        text:'供应商编号',
-        dataIndex:'pd_vendcode',
-        width: 150,
-        hidden: true
-    },{
-        text:'供应商名称',
-        width: 200,
-        dataIndex:'pd_vendname',
-        hidden: true
+        width: 100
     },{
         text: '采购员',
         dataIndex: 'pd_buyername',
-        width: 110
+        width: 80
     },{
         text: '增加应付',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'pd_addpay',
-        width: 180,
+        width: 120,
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -82,7 +68,7 @@ Ext.define('saas.view.money.report.PayDetail', {
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'pd_addpre',
-        width: 180,
+        width: 120,
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -101,7 +87,7 @@ Ext.define('saas.view.money.report.PayDetail', {
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'pd_remain',
-        width: 110,
+        width: 120,
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -142,10 +128,7 @@ Ext.define('saas.view.money.report.PayDetail', {
             return Ext.Array.sum(arr);
         }
     }, {
-        text: '供应商名称',
-        dataIndex: 'pd_vendname',
-        hidden:true
-    }, {
+        dataIndex: '',
         flex: 1
     }]
 });

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

@@ -38,92 +38,82 @@ Ext.define('saas.view.money.report.ProfitDetail', {
         columnWidth: 0.5
     }],
 
+    reportModel: 'saas.model.report.ProfitDetail',
+
     reportColumns: [{
-        text: '客户',
-        dataIndex: 'pi_custname',
-        width: 200,
-    },{
         text: '客户类型',
         dataIndex: 'cu_type',
-        width: 200,
+        width: 100,
     }, {
-        text: '业务员',
-        dataIndex: 'cu_sellername',
+        text: '客户名称',
+        dataIndex: 'pi_custname',
         width: 200,
     }, {
-        text: '销售总额',
-        dataIndex: 'saamount',
+        text: '金额(元)',
+        dataIndex: 'netamount',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 110,
+        width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
-        summaryType: 'sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
     }, {
-        text: '不含税金额(元)',
-        dataIndex: 'netamount',
+        text: '税额(元)',
+        dataIndex: 'saamount-netamount',
+        exportFormat: 'Amount',
+        xtype: 'numbercolumn',
+        width: 120,
+        renderer : function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        },
+    }, {
+        text: '价税合计(元)',
+        dataIndex: 'saamount',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 150,
+        width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
+        summaryType: 'sum',
+        summaryLabel: '价税合计',
+        summaryRenderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        }
     }, {
         text: '成本金额(元)',
         dataIndex: 'costamount',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 110,
+        width: 120,
+        summaryLabel: '成本金额',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
     }, {
-        text: '毛利润',
+        text: '毛利润(元)',
         dataIndex: 'profit',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 110,
+        width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '毛利润',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '毛利率%',
+        text: '毛利率(%)',
         dataIndex: 'profitpresent',
-        width: 130,
+        width: 100,
         xtype: 'numbercolumn',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v * 100, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
     },{
+        dataIndex: '',
         flex: 1
     }]
 });

+ 31 - 55
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -12,11 +12,11 @@ Ext.define('saas.view.money.report.RecDetail', {
     listUrl: '/api/money/report/recDetail',
     defaultCondition: null,
     reportTitle: '应收账款明细',
-    QueryWidth:0.25,
+    QueryWidth: 0.25,
     allowPaging: false,
 
     //筛选:客户、日期(必填)
-    searchItems: [ {
+    searchItems: [{
         xtype: 'customerDbfindTrigger',
         name: 'rd_custname',
         fieldLabel: '客户名称',
@@ -29,10 +29,6 @@ Ext.define('saas.view.money.report.RecDetail', {
     }],
 
     reportColumns: [{
-        text: 'id',
-        dataIndex: 'rd_id',
-        hidden: true
-    }, {
         text: '单据日期',
         xtype: 'datecolumn',
         dataIndex: 'rd_date',
@@ -42,99 +38,82 @@ Ext.define('saas.view.money.report.RecDetail', {
         dataIndex: 'rd_code',
         width: 150
     }, {
-        text: '单据类型',
+        text: '业务类型',
         dataIndex: 'rd_kind',
-        width: 110
-    },{
-        text: '客户编号',
-        dataIndex: 'pi_custcode',
-        width: 150,
-        hidden: true
+        width: 100
     }, {
-        text: '客户名称',
-        dataIndex: 'pi_custname',
-        width: 200,
-        hidden: true
-    },{
         text: '业务员',
         dataIndex: 'rd_sellername',
-        width: 110
+        width: 80
     }, {
-        text: '序号',
-        dataIndex: 'rd_detno',
-        exportFormat: 'Integer',
-        xtype: 'numbercolumn',
-        width: 80,
-        hidden: true
-    },{
-        text:'增加应收',
-        dataIndex:'rd_addrec',
+        text: '增加应收',
+        dataIndex: 'rd_addrec',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 110,
-        renderer : function(v) {
+        width: 120,
+        renderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         },
         summaryType: 'sum',
-        summaryRenderer: function(v) {
+        summaryRenderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         }
-    },{
-        text:'增加预收',
+    }, {
+        text: '增加预收',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex:'rd_addpre',
-        width: 180,
-        renderer : function(v) {
+        dataIndex: 'rd_addpre',
+        width: 120,
+        renderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         },
         summaryType: 'sum',
-        summaryRenderer: function(v) {
+        summaryRenderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         }
-    },{
+    }, {
         text: '应收余额',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'rd_remain',
-        width: 110,
-        renderer : function(v) {
+        width: 120,
+        renderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         },
         summaryType: 'customize_last',
-        summaryRenderer: function(v) {
+        summaryRenderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         },
-        mySummaryRenderer: function(grid, column, datas) {
+        mySummaryRenderer: function (grid, column, datas) {
             datas = datas || [];
             var store = grid.store,
-            dataIndex = column.dataIndex,
-            groupField = store.getGroupField(),
-            count = datas.length,
-            data = datas,
-            lasts = {},
-            keys = [],
-            arr = [];
+                dataIndex = column.dataIndex,
+                groupField = store.getGroupField(),
+                count = datas.length,
+                data = datas,
+                lasts = {},
+                keys = [],
+                arr = [];
 
-            for(var i = 0; i < count; i++) {
+            for (var i = 0; i < count; i++) {
                 var d = data[i];
                 var n = Number(d[dataIndex]);
                 var v = isNaN(n) ? 0 : n;
@@ -144,17 +123,14 @@ Ext.define('saas.view.money.report.RecDetail', {
             }
 
             keys = Ext.Object.getAllKeys(lasts);
-            arr = keys.map(function(key) {
+            arr = keys.map(function (key) {
                 return lasts[key];
             });
 
             return Ext.Array.sum(arr);
         }
     }, {
-        text: '客户名称',
-        dataIndex: 'rd_custname',
-        hidden:true
-    }, {
+        dataIndex: '',
         flex: 1
     }]
 });

+ 116 - 78
frontend/saas-web/app/view/money/report/TotalPayDetail.js

@@ -23,8 +23,8 @@ Ext.define('saas.view.money.report.TotalPayDetail', {
         name: 'vm_vendcode',
         emptyText: '供应商编号/名称',
         columnWidth: 0.25,
-        getCondition: function(v) {
-            return "(upper(vm_vendcode) like '%"+v.toUpperCase()+"%' or upper(vm_vendname) like '%"+v.toUpperCase()+"%')";
+        getCondition: function (v) {
+            return "(upper(vm_vendcode) like '%" + v.toUpperCase() + "%' or upper(vm_vendname) like '%" + v.toUpperCase() + "%')";
         },
     }, {
         xtype: 'conmonthfield',
@@ -33,106 +33,144 @@ Ext.define('saas.view.money.report.TotalPayDetail', {
         columnWidth: 0.4
     }],
 
-    reportColumns: [
-        {
+    reportModel: 'saas.model.report.TotalPayDetail',
+
+    reportColumns: [{
         text: '期间',
         dataIndex: 'vm_yearmonth',
-        width: 110,
-        },{
-        text: '供应商编号',
-        dataIndex: 'vm_vendcode',
-        width: 190
+        width: 80,
     }, {
         text: '供应商名称',
         dataIndex: 'vm_vendname',
-        width: 210,
+        width: 200,
     }, {
-        text: '期初预付',
-        xtype: 'numbercolumn',
-        exportFormat: 'Amount',
-        dataIndex: 'vm_beginpreamount',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
-    },{
-        text: '期初应付',
-        xtype: 'numbercolumn',
-        exportFormat: 'Amount',
-        dataIndex: 'vm_beginamount',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
+        text: '期初',
+        columns: [{
+            text: '预付',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'vm_beginpreamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '应付',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'vm_beginamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }]
     }, {
-        text: '本期应付',
-        xtype: 'numbercolumn',
-        exportFormat: 'Amount',
-        dataIndex: 'vm_nowamount',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
+        text: '本期',
+        columns: [{
+            text: '预付',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'vm_nowpreamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '应付',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'vm_nowamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '核销',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'vm_nowpayamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            } 
+        }]
     }, {
-        text: '本期核销',
-        xtype: 'numbercolumn',
-        exportFormat: 'Amount',
-        dataIndex: 'vm_nowpayamount',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
+        text: '期末',
+        columns: [{
+            text: '预付',
+            dataIndex: 'vm_endpreamount',
+            exportFormat: 'Amount',
+            xtype: 'numbercolumn',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '应付',
+            dataIndex: 'vm_endamount',
+            exportFormat: 'Amount',
+            xtype: 'numbercolumn',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }]
     }, {
-        text: '预付余额',
-        dataIndex: 'vm_endpreamount',
-        exportFormat: 'Amount',
-        xtype: 'numbercolumn',
-        width: 110,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        },
-        summaryType: 'sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
-    },{
         text: '应付余额',
-        dataIndex: 'vm_endamount',
+        dataIndex: 'vm_endamount-vm_endpreamount',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 110,
-        renderer : function(v) {
+        width: 120,
+        renderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         },
         summaryType: 'sum',
-        summaryRenderer: function(v) {
+        summaryRenderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         }
     }, {
+        dataIndex: '',
         flex: 1
     }]
 });

+ 114 - 76
frontend/saas-web/app/view/money/report/TotalRecDetail.js

@@ -33,106 +33,144 @@ Ext.define('saas.view.money.report.TotalRecDetail', {
         columnWidth: 0.4
     }],
 
-    reportColumns: [
-    {
+    reportModel: 'saas.model.report.TotalRecDetail',
+
+    reportColumns: [{
         text: '期间',
         dataIndex: 'cm_yearmonth',
-        width: 110
-    },{
-        text: '客户编号',
-        dataIndex: 'cm_custcode',
-        width: 190
+        width: 80,
     }, {
         text: '客户名称',
         dataIndex: 'cm_custname',
-        width: 210,
-    },{
-        text: '期初预收',
-        dataIndex: 'cm_beginpreamount',
-        exportFormat: 'Amount',
-        xtype: 'numbercolumn',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
-    },{
-        text: '期初应收',
-        dataIndex: 'cm_beginamount',
-        exportFormat: 'Amount',
-        xtype: 'numbercolumn',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
+        width: 200,
     }, {
-        text: '本期应收',
-        xtype: 'numbercolumn',
-        exportFormat: 'Amount',
-        dataIndex: 'cm_nowamount',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
+        text: '期初',
+        columns: [{
+            text: '预收',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'cm_beginpreamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '应收',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'cm_beginamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }]
     }, {
-        text: '本期核销',
-        xtype: 'numbercolumn',
-        exportFormat: 'Amount',
-        dataIndex: 'cm_nowpayamount',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
+        text: '本期',
+        columns: [{
+            text: '预收',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'cm_nowpreamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '应收',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'cm_nowamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '核销',
+            xtype: 'numbercolumn',
+            exportFormat: 'Amount',
+            dataIndex: 'cm_nowpayamount',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            } 
+        }]
     }, {
-        text: '预收余额',
-        xtype: 'numbercolumn',
-        exportFormat: 'Amount',
-        dataIndex: 'cm_endpreamount',
-        width: 110,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        },
-        summaryType: 'sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
+        text: '期末',
+        columns: [{
+            text: '预收',
+            dataIndex: 'cm_endpreamount',
+            exportFormat: 'Amount',
+            xtype: 'numbercolumn',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: '应收',
+            dataIndex: 'cm_endamount',
+            exportFormat: 'Amount',
+            xtype: 'numbercolumn',
+            width: 120,
+            renderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function (v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join('');
+                return Ext.util.Format.number(v, format);
+            }
+        }]
     }, {
         text: '应收余额',
-        dataIndex: 'cm_endamount',
+        dataIndex: 'cm_endamount-cm_endpreamount',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 110,
-        renderer : function(v) {
+        width: 120,
+        renderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         },
         summaryType: 'sum',
-        summaryRenderer: function(v) {
+        summaryRenderer: function (v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join('');
             return Ext.util.Format.number(v, format);
         }
     }, {
+        dataIndex: '',
         flex: 1
     }]
 });

+ 50 - 98
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -22,7 +22,8 @@ Ext.define('saas.view.money.report.VendorCheck', {
         listeners: {
             beforequery: function(f) {
                 return !!f.value;
-            }
+            },
+            change: 'pi_vendname_change'
         }
     }, {
     //     xtype: 'monthdatefield',
@@ -36,11 +37,9 @@ Ext.define('saas.view.money.report.VendorCheck', {
         columnWidth: 0.4
     }],
 
+    reportModel: 'saas.model.report.VendorCheck',
+
     reportColumns: [{
-        text: 'id',
-        dataIndex: 'pi_id',
-        hidden: true
-    }, {
         text: '单据日期',
         dataIndex: 'pi_date',
         xtype:'datecolumn',
@@ -49,34 +48,28 @@ Ext.define('saas.view.money.report.VendorCheck', {
         text: '单号',
         dataIndex: 'pi_inoutno',
         width: 150
-    },  {
+    }, {
+        text: '业务类型',
+        dataIndex: 'pi_class',
+        width: 100
+    }, {
         text: '序号',
         xtype: 'numbercolumn',
         dataIndex: 'pd_pdno',
         exportFormat: 'Integer',
-        width: 80
-    },{
-        text:'供应商编号',
-        dataIndex:'pi_vendcode',
-        width: 150,
-        hidden:true
-    },{
-        text:'供应商名称',
-        dataIndex:'pi_vendname',
-        width: 250,
-        hidden:true
+        width: 65
     }, {
         text: '物料编号',
-        width: 150,
-        dataIndex: 'pr_code'
+        dataIndex: 'pr_code',
+        width: 150
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
-        width: 200
+        width: 100
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -84,7 +77,7 @@ Ext.define('saas.view.money.report.VendorCheck', {
     }, {
         text: '规格',
         dataIndex: 'pr_spec',
-        width: 150
+        width: 200
     }, {
         text: '数量',
         dataIndex: 'qty',
@@ -92,107 +85,66 @@ Ext.define('saas.view.money.report.VendorCheck', {
         xtype: 'numbercolumn',
         width: 110,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '单位',
         dataIndex: 'pd_unit',
-        width: 80
+        width: 65
     }, {
         text: '单价(元)',
-        dataIndex: 'pd_orderprice',
+        dataIndex: 'pd_netprice',
         exportFormat: 'Price',
         xtype: 'numbercolumn',
-        width: 110,
+        width: 120,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     }, {
-        text: '税率',
-        dataIndex: 'pd_taxrate',
-        exportFormat: 'Integer',
+        text: '含税单价(元)',
+        dataIndex: 'pd_orderprice',
+        exportFormat: 'Price',
         xtype: 'numbercolumn',
-        width: 80,
+        width: 120,
         renderer: function(v) {
-            return Ext.util.Format.number(v, '0');
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     }, {
         text: '金额(元)',
-        xtype: 'numbercolumn',
+        dataIndex: 'pd_nettotal',
         exportFormat: 'Amount',
-        dataIndex: 'pd_total',
-        width: 110,
+        xtype: 'numbercolumn',
+        width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
-        // summaryType: 'sum',
-        // summaryRenderer: function(v) {
-        //     var arr = (v + '.').split('.');
-        //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-        //     var format = '0,000.' + xr.join('');
-        //     return Ext.util.Format.number(v, format);
-        // }
-    }, {
-        text: '不含税单价(元)',
-        dataIndex: 'pd_netprice',
-        exportFormat: 'Price',
-        xtype: 'numbercolumn',
-        width: 150,
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        }
     }, {
-        text: '不含税金额(元)',
-        dataIndex: 'pd_nettotal',
+        text: '税率(%)',
+        dataIndex: 'pd_taxrate',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 150,
+        width: 80,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
     }, {
-        text: '单据类型',
-        dataIndex: 'pi_class',
-        width: 110
+        text: '税额(元)',
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: 'pd_ordertotal-pd_nettotal',
+        width: 120,
+        renderer : function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        },
     }, {
-        text: '期初应付',
-        dataIndex: 'beginamount',
-        hidden: true,
-        width: 0,
-        summaryType: 'cus',
-    }, {
-        text: '增加应付',
-        dataIndex: 'nowamount',
-        hidden: true,
-        width: 0,
-        summaryType: 'cus',
-    }, {
-        text: '增加预付',
-        dataIndex: 'nowpay',
-        hidden: true,
-        width: 0,
-        summaryType: 'cus',
-    }, {
-        text: '应付余额',
-        dataIndex: 'nowbalance',
-        hidden: true,
-        width: 0,
-        summaryType: 'cus',
+        text: '价税合计(元)',
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: 'pd_ordertotal',
+        width: 120,
+        renderer : function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        },
     }],
 
     listeners: {

+ 7 - 0
frontend/saas-web/app/view/money/report/VendorCheckController.js

@@ -15,5 +15,12 @@ Ext.define('saas.view.money.report.VendorCheckController', {
                 }
             }
         });
+    },
+
+    pi_vendname_change: function(field, value) {
+        var me = this,
+        reportPanel = me.getView();
+
+        reportPanel.reportTitle = '供应商对账单(' + value + ')'
     }
 });

+ 1 - 9
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -183,14 +183,6 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             align: 'center',
             dataIndex: 'pu_status',
             width: 80
-        }, {
-            text: '序号',
-            dataIndex: 'pd_detno',
-            xtype: 'numbercolumn',
-            width: 65, 
-            renderer : function(v) {
-                return Ext.util.Format.number(v, '0');
-            }
         }, {
             text: '物料编号',
             dataIndex: 'pd_prodcode',
@@ -249,7 +241,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
                 return Ext.util.Format.number(v, format);
             }
         },{
-            text: '税额',
+            text: '税额(元)',
             dataIndex: 'pd_taxamount',
             xtype: 'numbercolumn',
             width: 110,

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

@@ -174,14 +174,14 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             width: 80
         },{
             text: '物料编号',
-            dataIndex: 'pd_prodcode',
+            dataIndex: 'pr_code',
             width: 150
         },{
             text: '品牌',
             dataIndex: 'pr_brand',
             width: 100
         },{
-            text: '名称',
+            text: '物料名称',
             dataIndex: 'pr_detail',
             width: 150
         },{
@@ -192,7 +192,11 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             text: '规格',
             dataIndex: 'pr_spec',
             width: 200
-        },{
+        }, {
+            text: '仓库',
+            dataIndex: 'pd_whname',
+            width: 150
+        }, {
             text: '验收数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
@@ -263,6 +267,10 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
                 var format = '0,000.' + xr.join('');
                 return Ext.util.Format.number(v, format);
             },
+        }, {
+            text: '关联采购单号',
+            dataIndex: 'pi_pucode',
+            width: 150
         }, {
             text: '备注',
             dataIndex: 'pd_remark',

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

@@ -312,7 +312,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             dataIndex: "pd_ioid",
             hidden: true
         }, {
-            text: "验收单号",
+            text: "关联验收单号",
             dataIndex: "iocode",
             width: 150.0,
             ignore: true

+ 1 - 4
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -188,10 +188,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             }, {
                 text: '物料编号',
                 dataIndex: 'pd_prodcode',
-                width: 150, 
-                renderer : function(v) {
-                    return Ext.util.Format.number(v, '0');
-                }
+                width: 150
             }, {
                 text: '品牌',
                 dataIndex: 'pr_brand',

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

@@ -11,9 +11,9 @@ Ext.define('saas.view.purchase.report.Purchase', {
     listUrl: '/api/purchase/report/purchaseDetail',
     defaultCondition: null,
     reportTitle: '采购明细报表',
-    QueryWidth:0.2,
+    QueryWidth: 0.2,
     //筛选:供应商、日期(必填)、业务状态			
-    searchItems: [ {
+    searchItems: [{
         xtype: 'vendorDbfindTrigger',
         name: 'pu_vendname',
         fieldLabel: '供应商名称',
@@ -38,8 +38,7 @@ Ext.define('saas.view.purchase.report.Purchase', {
 
     reportModel: 'saas.model.report.Purchase',
 
-    reportColumns: [
-    {
+    reportColumns: [{
         text: 'id',
         dataIndex: 'pu_id',
         hidden: true
@@ -53,7 +52,6 @@ Ext.define('saas.view.purchase.report.Purchase', {
         width: 200
     }, {
         text: '业务状态',
-        align: 'center',
         dataIndex: 'pu_acceptstatus',
         width: 80
     }, {
@@ -67,16 +65,16 @@ Ext.define('saas.view.purchase.report.Purchase', {
         width: 110
     }, {
         text: '物料编号',
-        width: 150,
-        dataIndex: 'pd_prodcode'
+        dataIndex: 'pd_prodcode',
+        width: 150
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
         width: 100
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -92,17 +90,11 @@ Ext.define('saas.view.purchase.report.Purchase', {
         exportFormat: 'Quantity',
         width: 110,
         summaryType: 'sum',
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        renderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         },
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        summaryRenderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '单位',
@@ -111,118 +103,84 @@ Ext.define('saas.view.purchase.report.Purchase', {
     }, {
         text: '单价(元)',
         dataIndex: 'pd_taxprice',
-        exportFormat: 'Price',
         width: 120,
         xtype: 'numbercolumn',
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        exportFormat: 'Price',
+        renderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     }, {
         text: '含税单价(元)',
         dataIndex: 'pd_price',
-        exportFormat: 'Price',
         width: 120,
         xtype: 'numbercolumn',
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        exportFormat: 'Price',
+        renderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     }, {
         text: '金额(元)',
         dataIndex: 'pd_taxtotal',
+        width: 120,
         exportFormat: 'Amount',
-        width: 110,
         xtype: 'numbercolumn',
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        renderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
+        summaryLabel: '金额',
         summaryType: 'sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        summaryRenderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '税率(%)',
         dataIndex: 'pd_taxrate',
         exportFormat: 'Integer',
-        width: 80,
         xtype: 'numbercolumn',
-        renderer: function(v) {
-            return Ext.util.Format.number(v, '0');
-        }
+        width: 80
     }, {
         text: '税额(元)',
-        dataIndex: 'pd_taxamount',
+        dataIndex: 'pd_total-pd_taxtotal',
+        xtype: 'numbercolumn',
+        width: 120,
         exportFormat: 'Amount',
-        width: 110,
         xtype: 'numbercolumn',
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        renderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
-        summaryType: 'customize_sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        },
-        mySummaryRenderer: function(grid, column, datas) {
-            var arr = [];
-            arr = datas.map(function(d) {
-                return d['pd_taxamount'];
-            });
-            return Ext.Array.sum(arr);
+        summaryLabel: '税额',
+        summaryType: 'sum',
+        summaryRenderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '价税合计(元)',
         dataIndex: 'pd_total',
+        xtype: 'numbercolumn',
+        width: 120,
         exportFormat: 'Amount',
-        width: 110,
         xtype: 'numbercolumn',
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        renderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
+        summaryLabel: '价税合计',
         summaryType: 'sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        summaryRenderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '收货数量',
         dataIndex: 'pd_pdacceptqty',
-        exportFormat: 'Quantity',
+        xtype: 'numbercolumn',
         width: 110,
+        exportFormat: 'Quantity',
         xtype: 'numbercolumn',
-        renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        renderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         },
         summaryType: 'sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+        summaryRenderer: function (v) {
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '备注',

+ 21 - 29
frontend/saas-web/app/view/purchase/report/PurchasePay.js

@@ -25,12 +25,9 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         columnWidth: 0.5
     }],
 
-    reportColumns: [
-    {
-        text: 'id',
-        dataIndex: 'pb_id',
-        hidden: true
-    }, {
+    reportModel: 'saas.model.report.PurchasePay',
+
+    reportColumns: [ {
         text: '付款单号',
         dataIndex: 'pb_code',
         width: 150
@@ -58,53 +55,48 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         dataIndex: 'pi_nettotal',
         width: 120,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
     }, {
         text: '税额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'pi_taxamount',
+        dataIndex: 'pd_total-pi_nettotal',
+        width: 120,
+        renderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        },
+    }, {
+        text: '价税合计(元)',
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: 'pi_total',
         width: 120,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
     }, {
         text: '付款金额(元)',
         dataIndex: 'pbd_nowbalance',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
-        width: 110,
+        width: 120,
         summaryType: 'sum',
+        summaryLabel: '付款金额',
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '付款比例%',
         //本次付款/采购金额*100%
         dataIndex: 'pb_payrate',
         xtype: 'numbercolumn',
-        width: 110,
+        width: 100,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, false);
         }
     }, {
         text: '付款人',

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

@@ -73,7 +73,7 @@ Ext.define('saas.view.sale.report.Sale', {
         dataIndex: 'pr_brand',
         width: 100
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
         width: 150
     }, {
@@ -91,10 +91,12 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         width: 110,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
+        },
+        summaryType: 'sum',
+        summaryLabel: '销售数量',
+        summaryRenderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '单位',
@@ -107,10 +109,7 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     }, {
         text: '含税单价(元)',
@@ -119,10 +118,7 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     }, {
         text: '金额(元)',
@@ -131,17 +127,12 @@ Ext.define('saas.view.sale.report.Sale', {
         width: 120,
         dataIndex: 'sd_nettotal',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '金额',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '税率(%)',
@@ -156,28 +147,15 @@ Ext.define('saas.view.sale.report.Sale', {
         text: '税额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'sd_taxamount',
+        dataIndex: 'sd_total - sd_nettotal',
         width: 120,
         renderer : function(v) {
-            v = (r.data["sd_total"]||0.0) - (r.data["sd_nettotal"]||0.0);
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
-        summaryType: 'customize_sum',
+        summaryType: 'sum',
+        summaryLabel: '税额',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        },
-        mySummaryRenderer: function(grid, column, datas) {
-            var arr = [];
-            arr = datas.map(function(d) {
-                return d['sd_taxamount'];
-            });
-            return Ext.Array.sum(arr);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '价税合计(元)',
@@ -186,17 +164,12 @@ Ext.define('saas.view.sale.report.Sale', {
         dataIndex: 'sd_total',
         width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '价税合计',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '出货数量',
@@ -205,10 +178,12 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         width: 110,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
+        },
+        summaryType: 'sum',
+        summaryLabel: '出货数量',
+        summaryRenderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text : "备注", 

+ 55 - 68
frontend/saas-web/app/view/sale/report/SaleProfit.js

@@ -29,16 +29,17 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         fieldLabel: '时间',
         columnWidth: 0.4
     }],
-
+    reportModel: 'saas.model.report.SaleProfit',
     reportColumns: [
     {
         text: 'id',
         dataIndex: 'sa_id',
         hidden: true
     }, {
-        text: '客户编号',
-        dataIndex: 'sa_custcode',
-        width: 150
+        text: '单据日期',
+        xtype: 'datecolumn',
+        dataIndex: 'pi_date',
+        width: 110
     }, {
         text: '客户名称',
         dataIndex: 'sa_custname',
@@ -46,36 +47,27 @@ Ext.define('saas.view.sale.report.SaleProfit', {
     }, {
         text: '业务员',
         dataIndex: 'sa_seller',
-        width: 110
-    }, {
-        text: '单据日期',
-        xtype: 'datecolumn',
-        dataIndex: 'pi_date',
-        width: 110
+        width: 80
     }, {
         text: '单据编号',
         dataIndex: 'pd_inoutno',
         width: 150
     }, {
-        text: '单据类型',
+        text: '业务类型',
         dataIndex: 'pd_piclass',
-        width: 110
-    }, {
-        text: '物料类别',
-        dataIndex: 'pr_kind',
-        width: 110
+        width: 100
     }, {
         text: '物料编号',
-        width: 150,
-        dataIndex: 'pr_code'
+        dataIndex: 'pr_code',
+        width: 150
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
-        width: 200
+        width: 100
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -83,7 +75,7 @@ Ext.define('saas.view.sale.report.SaleProfit', {
     }, {
         text: '规格',
         dataIndex: 'pr_spec',
-        width: 150
+        width: 200
     }, {
         text: '数量',
         dataIndex: 'pd_outqty',
@@ -91,69 +83,73 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         xtype: 'numbercolumn',
         width: 110,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '单位',
         dataIndex: 'pr_unit',
-        width: 80
+        width: 65
+    }, {
+        text: '单价(元)',
+        dataIndex: 'pd_netprice',
+        exportFormat: 'Price',
+        xtype: 'numbercolumn',
+        width: 120,
+        renderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
+        }
     }, {
         text: '含税单价(元)',
         dataIndex: 'pd_sendprice',
         exportFormat: 'Price',
         xtype: 'numbercolumn',
-        width: 150,
+        width: 120,
+        renderer: function(v) {
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
+        }
+    }, {
+        text: '金额(元)',
+        dataIndex: 'pd_nettotal',
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '税率%',
+        text: '税率(%)',
         dataIndex: 'pd_taxrate',
         exportFormat: 'Integer',
         xtype: 'numbercolumn',
-        width: 90,
+        width: 80,
         renderer: function(v) {
             return Ext.util.Format.number(v, '0');
         }
     }, {
-        text: '含税金额(元)',
-        dataIndex: 'pd_ordertotal',
+        text: '税额(元)',
+        exportFormat: 'Amount',
+        dataIndex: 'pd_ordertotal-pd_nettotal',
         xtype: 'numbercolumn',
+        width:120,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '不含税单价(元)',
-        exportFormat: 'Price',
-        dataIndex: 'pd_netprice',
+        text: '价税合计(元)',
+        exportFormat: 'Amount',
+        dataIndex: 'pd_ordertotal',
         xtype: 'numbercolumn',
-        width:150,
+        width:120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '成本单价(元)',
-        dataIndex: 'pw_costprice',
+        dataIndex: 'pd_price',
         exportFormat: 'Price',
         xtype: 'numbercolumn',
-        width:140,
+        width:120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     }, {
         text: '成本金额(元)',
@@ -161,31 +157,22 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '毛利润',
+        text: '毛利润(元)',
         dataIndex: 'pd_profit',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '毛利率%',
+        text: '毛利率(%)',
         dataIndex: 'pd_profitpresent',
         xtype: 'numbercolumn',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text : "备注", 

+ 20 - 34
frontend/saas-web/app/view/sale/report/SaleRec.js

@@ -13,7 +13,7 @@ Ext.define('saas.view.sale.report.SaleRec', {
     defaultCondition: null,
     reportTitle: '销售收款报表',
     QueryWidth:0.25,
-    searchItems: [{//筛选:客户、日期	
+    searchItems: [{	
         xtype: 'customerDbfindTrigger',
         name: 'rb_custname',
         fieldLabel: '客户',
@@ -24,7 +24,7 @@ Ext.define('saas.view.sale.report.SaleRec', {
         fieldLabel: '日期',
         columnWidth: 0.5
     }],
-
+    reportModel: 'saas.model.report.SaleRec',
     reportColumns: [{
         text: 'id',
         dataIndex: 'id',
@@ -47,35 +47,29 @@ Ext.define('saas.view.sale.report.SaleRec', {
         width: 150
     }, {
         text: '业务类型',
-        dataIndex: 'rbd_slkind'
+        dataIndex: 'rbd_slkind',
+        width: 100
     }, {
         text: '金额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'pi_nettotal',
+        width: 120,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '税额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'rbd_taxamount',
+        dataIndex: 'pi_total-pi_nettotal',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '税额',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '价税合计(元)',
@@ -83,29 +77,20 @@ Ext.define('saas.view.sale.report.SaleRec', {
         exportFormat: 'Amount',
         dataIndex: 'pi_total',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '价税合计',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
-        text: '收款额(元)',
+        text: '收款金额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         dataIndex: 'rbd_nowbalance',
-        hidden:true,
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         text: '回款比例%',
@@ -113,11 +98,12 @@ Ext.define('saas.view.sale.report.SaleRec', {
         exportFormat: 'Number2',
         xtype: 'numbercolumn',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
+    }, {
+        text: '收款人',
+        dataIndex: 'rb_manname',
+        width: 150
     }, {
         text: '备注',
         dataIndex: 'rb_remark',

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

@@ -239,7 +239,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
                 return Ext.util.Format.number(v, format);
             }
         }, {
-            text: '税额',
+            text: '税额(元)',
             dataIndex: 'sd_taxamount',
             xtype: 'numbercolumn',
             width: 110,

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

@@ -326,7 +326,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                     return saas.util.BaseUtil.numberFormat(v, 2, true);
                 }
             }, {
-                text : "出货单号", 
+                text : "关联出货单号", 
                 dataIndex : "pd_iocode", 
                 xtype : "numbercolumn",
                 width: 110.0,

+ 5 - 1
frontend/saas-web/app/view/sale/saleIn/QueryPanel.js

@@ -200,6 +200,10 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
             text: '规格',
             dataIndex: 'pr_spec',
             width: 200
+        }, {
+            text: '仓库',
+            dataIndex: 'pd_whname',
+            width: 150
         },{
             text: '退货数量',
             dataIndex: 'pd_inqty',
@@ -273,7 +277,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
             }
         }, {
             text: '关联出货单号',
-            dataIndex: 'pd_iocode',
+            dataIndex: 'pi_iocode',
             width: 150
         }, {
             text: '备注',

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

@@ -334,7 +334,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 return saas.util.BaseUtil.numberFormat(v, 2, true);
             }
         }, {
-            text: "销售单号",
+            text: "关联销售单号",
             dataIndex: "pd_ordercode",
             width: 150.0,
             ignore: true

+ 25 - 28
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -23,6 +23,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         xtype: 'condatefield',
         name: 'pi_date',
         fieldLabel: '日期',
+        showDetail: true,
         allowBlank: true,
         columnWidth: 0.5
     }, {
@@ -41,6 +42,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         queryMode: 'local',
         emptyText :'全部',
         editable:false,
+        showDetail: true,
         displayField: 'pi_status',
         valueField: 'pi_statuscode',
         store: Ext.create('Ext.data.ArrayStore', {
@@ -120,53 +122,48 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             text: '调拨单号',
             dataIndex: 'pi_inoutno',
             width: 150
-        },{
+        }, {
             text: '单据类型',
             dataIndex: 'pi_class',
             width: 0
-        },{
+        }, {
             text: '单据日期',
             dataIndex: 'pi_date',
             xtype:'datecolumn',
             width: 110
-        },{
+        }, {
             text: '状态',
             align: 'center',
             dataIndex: 'pi_status',
             width: 90
-        },{
+        }, {
             text: '备注',
             dataIndex: 'pi_remark',
             width: 250
         }],
-        relativeColumn: [
-            {
+        relativeColumn: [{
                 text: 'id',
                 dataIndex: 'pi_id',
                 xtype: 'numbercolumn',
                 hidden:true
-            },{
+            }, {
                 text: '调拨单号',
                 dataIndex: 'pi_inoutno',
                 width: 150
-            },{
-                text: '单据类型',
-                dataIndex: 'pi_class',
-                width: 0
-            },{
+            }, {
                 text: '单据日期',
                 dataIndex: 'pi_date',
                 xtype:'datecolumn',
                 width: 110
             },{
-                text: '状态',
+                text: '审核状态',
                 align: 'center',
                 dataIndex: 'pi_status',
-                width: 90
+                width: 80
             },{
                 text: '序号',
                 dataIndex: 'pd_pdno',
-                width: 80
+                width: 65
             },{
                 text: '物料编号',
                 dataIndex: 'pd_prodcode',
@@ -174,11 +171,11 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             },{
                 text: '品牌',
                 dataIndex: 'pr_brand',
-                width: 150
+                width: 100
             },{
-                text: '名称',
+                text: '物料名称',
                 dataIndex: 'pr_detail',
-                width: 200
+                width: 150
             },{
                 text: '型号',
                 dataIndex: 'pr_orispeccode',
@@ -186,34 +183,34 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             },{
                 text: '规格',
                 dataIndex: 'pr_spec',
-                width: 150
+                width: 200
             },{
                 text: '数量',
                 dataIndex: 'pd_outqty',
                 xtype:'numbercolumn',
                 width: 110,
                 renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 3, true);
                 }
             }, {
                 text: '单位',
                 dataIndex: 'pr_unit',
-                width: 80
+                width: 65
             }, {
-                text: '拨出仓',
+                text: '拨出仓',
                 dataIndex: 'pd_whname',
-                width: 150
+                width: 80
             },{
-                text: '拨入仓',
+                text: '拨入仓',
                 dataIndex: 'pd_inwhname',
-                width: 150
+                width: 80
             },{
                 text: '备注',
                 dataIndex: 'pd_remark',
                 width:250
             }]
+    },
+    getQueryMode: function() {
+        return 'DETAIL';
     }
 });

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

@@ -106,62 +106,45 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         dataIndex : "id",
         hidden:true, 
         xtype : "numbercolumn", 
-    },{
+    }, {
+        text : "仓库id", 
+        dataIndex : "st_whid", 
+        xtype : "numbercolumn", 
+        hidden:true
+    }, {
+        text : "仓库编号", 
+        dataIndex : "st_whcode", 
+        hidden:true
+    }, {
+        text : "仓库", 
+        dataIndex : "st_whname", 
+        width : 80.0
+    }, {
+        text : "物料类型", 
+        dataIndex : "st_prodkind", 
+        width : 100.0
+    }, {
         text : "物料id", 
-        hidden:true,
         dataIndex : "st_prodid", 
         xtype : "numbercolumn", 
-    }, 
-    {
+        hidden:true
+    }, {
         text : "物料编号", 
         dataIndex : "st_prodcode", 
-        width : 150.0, 
-        xtype : "", 
-    }, 
-    {
+        width : 150.0,
+    }, {
+        text : "品牌", 
+        dataIndex : "pr_brand", 
+        width : 100.0
+    }, {
         text : "物料名称", 
         dataIndex : "st_proddetail", 
-        width : 200.0, 
-        xtype : "", 
-    },
-    {
+        width : 150.0
+    }, {
         text : "型号", 
         dataIndex : "st_prodorispeccode", 
-        width : 150.0, 
-        xtype : "", 
-    },
-    {
-        text : "物料类别", 
-        dataIndex : "st_prodkind", 
-        width : 100.0, 
-        xtype : "", 
-    },
-    {
-        text : "单位", 
-        dataIndex : "st_produnit", 
-        width : 75.0, 
-        xtype : "", 
-    },
-    {
-        text : "仓库id", 
-        dataIndex : "st_whid", 
-        hidden:true,
-        xtype : "numbercolumn", 
-    },
-    {
-        text : "仓库编号", 
-        dataIndex : "st_whcode", 
-        width : 0,
-        hidden:true, 
-        xtype : "", 
-    },
-    {
-        text : "仓库", 
-        dataIndex : "st_whname", 
-        width : 200.0, 
-        xtype : "", 
-    },
-    {
+        width : 200.0
+    }, {
         text : "系统库存", 
         dataIndex : "st_batchqty", 
         width : 110.0, 
@@ -172,12 +155,14 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
             var format = '0.' + xr.join('');
             return Ext.util.Format.number(v, format);
         } 
-    },
-    {
+    }, {
+        text : "单位", 
+        dataIndex : "st_produnit", 
+        width : 65.0 
+    }, {
         text : "盘点库存", 
         dataIndex : "st_actqty", 
         width : 110.0, 
-        // xtype : "numbercolumn",
         align: 'right',
         editor : {
             xtype : "numberfield",
@@ -195,23 +180,16 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
             }    
         },
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }            
     },
     {
         text : "盘盈盘亏", 
         dataIndex : "st_num", 
         width : 110.0, 
-        // xtype : "numbercolumn",
         aligin: 'right',
         renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }  
     }],
 
@@ -516,8 +494,9 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
 
         Ext.Array.each(allData, function(item){
             var d = Object.assign({}, item.data),
-            dirty = item.dirty;
-            if(dirty){
+            dirty = item.dirty,
+            ignore = item.ignore;
+            if(dirty&&!ignore){
                 if((typeof d.id) != "number" && d.id.indexOf('-')>-1){
                     d.id = 0;
                 }

+ 44 - 96
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -149,14 +149,12 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 dataIndex : "id", 
                 xtype : "numbercolumn",
                 hidden:true
-            },
-            {
+            }, {
                 text : "mm_prodidid", 
                 dataIndex : "mm_prodid", 
                 xtype : "numbercolumn",
                 hidden:true
-            },
-            {
+            }, {
                 text : "物料编号", 
                 width : 150.0, 
                 dataIndex : "mm_prodcode", 
@@ -176,14 +174,13 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     valueField : "value", 
                     xtype : "productMultiDbfindTrigger"
                 }
-            },{
+            }, {
                 text: 'model映射需要',
                 dataIndex: 'productDTO',
                 hidden: true,
-            },
-            {
+            }, {
                 text : "品牌", 
-                width : 150.0, 
+                width : 100.0, 
                 dataIndex : "pr_brand",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -192,9 +189,8 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     }                     
                     return v;
                 }
-            },
-            {
-                text : "名称", 
+            }, {
+                text : "物料名称", 
                 width : 200.0, 
                 dataIndex : "pr_detail",
                 ignore:true,
@@ -204,8 +200,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     }                     
                     return v;
                 }
-            },
-            {
+            }, {
                 text : "型号", 
                 width : 200.0, 
                 dataIndex : "pr_orispeccode",
@@ -218,7 +213,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 }
             },{
                 text : "规格", 
-                width : 150, 
+                width : 200, 
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
@@ -238,23 +233,22 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     minValue:0
                 },
                 renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 3, true);
                 },
                 summaryType: 'sum',
                 summaryRenderer: function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 3, true);
                 }
-            },
-            {
+            }, {
+            
+                text : "单位用量", 
+                xtype: 'numbercolumn',
+                dataIndex : "mm_oneuseqty", 
+                hidden:true
+            }, {
                 text : "单位", 
                 dataIndex : "pr_unit",
-                width : 80.0,
+                width : 65.0,
                 ignore:true,
                 renderer: function (v, m, r) {
                     if(!v){
@@ -262,67 +256,19 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     }
                     return v;
                 }
-            },{
-                text : "成本单价(元)", 
-                dataIndex : "mm_price", 
-                xtype: 'numbercolumn',
-                width : 140.0,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 4,
-                    minValue:0
-                },
-                listeners:{
-                    edit:'price_change'
-                },
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
-                }
-            },
-            {
-                text : "单位用量", 
-                xtype: 'numbercolumn',
-                dataIndex : "mm_oneuseqty", 
-                width : 110.0,
-                hidden:true,
-                editor : {
-                    xtype : "numberfield",
-                    decimalPrecision: 8,
-                    editable:false,
-                    minValue:0
-                },
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
-                },
-                summaryType: 'sum',
-                summaryRenderer: function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
-                }
-            },            
-            {
+            }, {
                 text : "仓库id",
                 dataIndex : "mm_whid",
                 xtype : "numbercolumn",
                 hidden:true
-            },
-            {
+            }, {
                 text : "仓库编号",
                 dataIndex : "mm_whcode",
                 hidden:true
-            },
-            {
+            }, {
                 text : "仓库",
                 dataIndex : "mm_whname",
-                width : 150.0,
+                width : 80.0,
                 items : null,
                 allowBlank : false,
                 editor : {
@@ -338,37 +284,39 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     valueField : "value",
                     xtype : "warehouseDbfindTrigger"
                 }
-            },{
-                text : "成本金额", 
+            }, {
+                text : "成本单价(元)", 
+                dataIndex : "mm_price", 
+                xtype: 'numbercolumn',
+                width : 120.0,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 4,
+                    minValue:0
+                },
+                listeners:{
+                    edit:'price_change'
+                },
+                renderer : function(v) {
+                    return saas.util.BaseUtil.numberFormat(v, 4, true);
+                }
+            }, {
+                text : "成本金额(元)", 
                 xtype: 'numbercolumn',
                 dataIndex : "mm_amount", 
-                width : 110.0, 
+                width : 120.0, 
                 editor : {
                     xtype : "numberfield",
                     decimalPrecision: 2,
                     editable : false
                 },
                 renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 2, true);
                 },
                 summaryType: 'sum',
                 summaryRenderer: function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join('');
-                    return Ext.util.Format.number(v, format);
+                    return saas.util.BaseUtil.numberFormat(v, 2, true);
                 }
-            },{
-                text : "替代料",
-                dataIndex : "mm_repprodcode",
-                width : 0,
-                editor : {
-                    xtype : "textfield"
-                },
-            
             }, {
                 text : "备注",
                 dataIndex : "mm_remark",

+ 9 - 0
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -99,6 +99,15 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         }, {
                             from: 'pr_orispeccode',
                             to: 'ma_prodorispec'
+                        }, {
+                            from: 'pr_whid',
+                            to: 'ma_whid'
+                        }, {
+                            from: 'pr_whcode',
+                            to: 'ma_whcode'
+                        }, {
+                            from: 'pr_whname',
+                            to: 'ma_whname'
                         }],
                         aftertrigger: function (f, record) {
                             me.getBomData(record.data.id)

+ 3 - 12
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -178,10 +178,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 3, true);
             },
         }, {
             text: '单位',
@@ -193,10 +190,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-                var format = '0.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 4, true);
             }        
         },{
             text: '金额(元)',
@@ -204,10 +198,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 2, true);
             }
         },{
             text: '备注',

+ 5 - 15
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -141,7 +141,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             width: 110
         }, {
             text: '客户名称',
-            dataIndex: 'pi_vendname',
+            dataIndex: 'pi_custname',
             width: 200
         }, {
             text: '审核状态',
@@ -174,14 +174,11 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             width: 80
         }, {
             text: '数量',
-            dataIndex: 'pd_inqty',
+            dataIndex: 'pd_outqty',
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 3, true);
             }
         }, {
             text: '单位',
@@ -193,10 +190,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-                var format = '0.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 4, true);
             }       
         }, {
             text: '金额(元)',
@@ -204,11 +198,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {
-                v = (r.data["pd_ordertotal"]||0.0) * (r.data["pd_inqty"]||0.0);
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join('');
-                return Ext.util.Format.number(v, format);
+                return saas.util.BaseUtil.numberFormat(v, 2, true);
             }
         },{
             text: '备注',

+ 16 - 28
frontend/saas-web/app/view/stock/report/DataList.js

@@ -53,11 +53,11 @@ Ext.define('saas.view.stock.report.DataList', {
     }, {
         text: '品牌',
         dataIndex: 'rc_prodBrand',
-        width: 200
+        width: 100
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'rc_prodDetail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'rc_prodOrispec',
@@ -65,18 +65,17 @@ Ext.define('saas.view.stock.report.DataList', {
     }, {
         text: '规格',
         dataIndex: 'rc_prodSpec',
-        width: 150
+        width: 200
     }, {
-        text: "仓库编号",
-        dataIndex: "rc_whCode",
-        width: 200,
-        hidden:true
+        text: '物料类型',
+        dataIndex: 'rc_prodKind',
+        width: 200
     }, {
-        text: "仓库名称",
+        text: "仓库",
         dataIndex: "rc_whName",
         hidden: true,
         toggle: true,
-        width: 110,
+        width: 80,
     }, {
         text: "数量",
         xtype: 'numbercolumn',
@@ -84,15 +83,12 @@ Ext.define('saas.view.stock.report.DataList', {
         dataIndex: "rc_number",
         width: 120,
         renderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     },{
         text: "单位",
         dataIndex: "rc_prodUnit",
-        width: 80
+        width: 65
     }, {
         text: "单价(元)",
         xtype: 'numbercolumn',
@@ -102,30 +98,22 @@ Ext.define('saas.view.stock.report.DataList', {
         dataIndex: "rc_price",
         width: 120,
         renderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     }, {
-        text: "金额",
+        text: "金额(元)",
         xtype: 'numbercolumn',
         dataIndex: "rc_amount",
         exportFormat: 'Amount',
         toggle: true,
         width: 120,
         renderer: function (v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
+        summaryLabel: '金额',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
         }
     }, {
         flex: 1

+ 14 - 15
frontend/saas-web/app/view/stock/report/ProdinoutCount.js

@@ -6,13 +6,11 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
     viewModel: 'stock-report-prodinoutCount',
 
     viewName: 'stock-report-prodinoutCount',
-    //按物料分组
     groupField: null,
     listUrl: '/api/storage/report/prodinoutCount',
     defaultCondition: null,
     reportTitle: '物料收发汇总表',
     QueryWidth:0.4,
-    //筛选:仓库、物料、物料类型、时间			
     searchItems: [{		
         xtype: 'warehouseDbfindTrigger',
         name: 'wh_description',
@@ -36,11 +34,11 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
-        width: 200
+        width: 100
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -48,18 +46,19 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
     }, {
         text: '规格',
         dataIndex: 'pr_spec',
-        width: 150
+        width: 200
+    }, {
+        text: '物料类型',
+        dataIndex: 'pr_kind',
+        width: 100
     }, {
         text: '单位',
         dataIndex: 'pr_unit',
-        width: 80
-    },{
-        text: '物料类型',
-        dataIndex: 'pr_kind'
+        width: 65
     },{
         text: '仓库',
         dataIndex:'wh_description',
-        width: 150
+        width: 80
     }, {
         text: '期初',
         columns: [{
@@ -75,7 +74,7 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
                 return Ext.util.Format.number(v, format);
             },
         },{
-            text: '成本',
+            text: '成本(元)',
             dataIndex:'pwm_beginamount',
             exportFormat: 'Amount',
             xtype: 'numbercolumn',
@@ -102,7 +101,7 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
                 return Ext.util.Format.number(v, format);
             }
         },{
-            text: '成本',
+            text: '成本(元)',
             dataIndex:'pwm_nowinamount',
             exportFormat: 'Amount',
             xtype: 'numbercolumn',
@@ -129,7 +128,7 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
                 return Ext.util.Format.number(v, format);
             }
         },{
-            text: '成本',
+            text: '成本(元)',
             dataIndex:'pwm_nowoutamount',
             exportFormat: 'Amount',
             xtype: 'numbercolumn',
@@ -156,7 +155,7 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
                 return Ext.util.Format.number(v, format);
             }
         },{
-            text: '成本',
+            text: '成本(元)',
             dataIndex:'pwm_endamount',
             exportFormat: 'Amount',
             xtype: 'numbercolumn',

+ 32 - 40
frontend/saas-web/app/view/stock/report/Prodiodetail.js

@@ -6,7 +6,6 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
     viewModel: 'stock-report-prodiodetail',
 
     viewName: 'stock-report-prodiodetail',
-  //  按物料分组
     groupField: 'pd_prodcode',
     groupHeaderTpl: '物料: {[values.rows[0].data.pr_detail]}({[values.rows[0].data.pd_prodcode]})',
     listUrl: '/api/storage/report/prodioDetail',
@@ -15,7 +14,6 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
     QueryWidth:0.2,
     showMySummary: false,
 
-    //筛选:单据类型、物料、日期
     searchItems: [ {		
         xtype: 'textfield',
         name: 'pd_prodcode',
@@ -28,7 +26,7 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
     },{
         xtype: 'multicombo',
         name: 'pi_class',
-        fieldLabel: '单据类型',
+        fieldLabel: '业务类型',
         allowBlank: true,
         columnWidth: 0.2,
         datas: [
@@ -60,31 +58,32 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
         dataIndex: 'pi_inoutno',
         width: 150
     }, {
-        text: '单据类型',
+        text: '业务类型',
         dataIndex: 'pi_class',
-        width: 110
+        width: 100
     }, {
         text: '日期',
         dataIndex: 'pi_date',
-        xtype: 'datecolumn'
+        xtype: 'datecolumn',
+        width: 110
     }, {
         text: '序号',
         dataIndex: 'pd_pdno',
         exportFormat: 'Integer',
         xtype: 'numbercolumn',
-        width: 80
+        width: 65
     }, {
         text: '物料编号',
-        width: 150,
-        dataIndex: 'pd_prodcode'
+        dataIndex: 'pd_prodcode',
+        width: 150
     }, {
         text: '品牌',
         dataIndex: 'pr_brand',
-        width: 200
+        width: 100
     }, {
-        text: '名称',
+        text: '物料名称',
         dataIndex: 'pr_detail',
-        width: 200
+        width: 150
     }, {
         text: '型号',
         dataIndex: 'pr_orispeccode',
@@ -92,66 +91,59 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
     }, {
         text: '规格',
         dataIndex: 'pr_spec',
-        width: 150
-    },{
+        width: 200
+    }, {
         text: '入库数量',
         xtype: 'numbercolumn',
         exportFormat: 'Quantity',
         dataIndex: 'inqty',
+        width: 110,
         summaryType: 'sum',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '出库数量',
         xtype: 'numbercolumn',
         exportFormat: 'Quantity',
         dataIndex: 'outqty',
+        width: 110,
         summaryType: 'sum',
         summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 3, true);
         }
     }, {
         text: '单位',
-        dataIndex: 'pd_unit',
-        width: 80
+        dataIndex: 'pr_unit',
+        width: 65
     }, {
         text: '成本单价(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Price',
         dataIndex: 'pd_price',
-        width: 140,
+        width: 120,
         renderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 4 ? 4 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            return saas.util.BaseUtil.numberFormat(v, 4, true);
         }
     },  {
         text: '仓库',
         dataIndex: 'pd_whname',
-        width: 150
+        width: 80
+    }, {
+        text: '往来单位',
+        dataIndex: 'bizname',
+        width: 200
     }, {
-        text: '订单号',
+        text: '关联单号',
         dataIndex: 'pd_ordercode',
         width: 150
-    },{
-        text: '备注',
-        dataIndex: 'pd_remark',
-        width: 250
     }, {
-        text: '客户/供应商编号',
-        dataIndex: 'bizcode',
-        width: 150
+        text: '物料类型',
+        dataIndex: 'pr_kind',
+        width: 100
     }, {
-        text: '客户/供应商名称',
-        dataIndex: 'bizname',
+        text: '备注',
+        dataIndex: 'pd_remark',
         width: 250
     }]
 

+ 27 - 5
frontend/saas-web/ext/packages/ux/src/feature/MySummary.js

@@ -129,7 +129,7 @@ Ext.define('Ext.ux.feature.MySummary', {
                         if(typeof c.mySummaryRenderer == 'function') {
                             c.summaryValue = c.mySummaryRenderer(grid, c, datas);
                         }else {
-                            c.summaryValue = me.getSummaryValue(datas, c);
+                            c.summaryValue = me.applySummaryValue(datas, c);
                         }
                     } else {
                         c.summaryValue = null;
@@ -186,10 +186,10 @@ Ext.define('Ext.ux.feature.MySummary', {
             if(summaryType) {
                 summarys.push({
                     name: c.dataIndex,
-                    label: c.text,
+                    label: me.getSummaryLabel(c),
                     type: summaryType,
                     typeLabel: summaryType ? typeLabels[summaryType] : '',
-                    value: 0
+                    value: me.getSummaryValue(c)
                 });
             } 
         });
@@ -218,13 +218,35 @@ Ext.define('Ext.ux.feature.MySummary', {
                 return c.dataIndex == s.name;
             });
             if(col) {
-                s.value = col.summaryValue || 0;
+                s.value = me.getSummaryValue(col);
             }
         });
         return summarys;
     },
 
-    getSummaryValue: function(datas, c) {
+    getSummaryLabel: function(c) {
+        var text = c.text,
+        summaryLabel = c.summaryLabel;
+        if(typeof summaryLabel === 'string') {
+            return summaryLabel;
+        }else if(typeof summaryLabel === 'function') {
+            return summaryLabel(c, text);
+        }else {
+            return text;
+        }
+    },
+
+    getSummaryValue: function(c) {
+        var summaryValue = c.summaryValue || 0,
+        summaryValueRender = c.summaryValueRender;
+        if(typeof summaryValueRender === 'function') {
+            return summaryValueRender(summaryValue);
+        }else {
+            return summaryValue;
+        }
+    },
+
+    applySummaryValue: function(datas, c) {
         var dataIndex = c.dataIndex,
         type = c.summaryType,
         values = datas.map(function(d) {

File diff suppressed because it is too large
+ 0 - 21
frontend/saas-web/lib/echarts.common.min.js


File diff suppressed because it is too large
+ 0 - 0
frontend/saas-web/lib/echarts.min.js


+ 47 - 41
frontend/saas-web/overrides/exporter/Stylesheet.js

@@ -10,50 +10,56 @@ Ext.define('saas.override.exporter.Stylesheet', {
         'Currency': '"$"#,##0.00',
         'Euro Currency': '"€"#,##0.00',
         /**  new  */
-        'Number0': function(v) {
-            return Ext.util.Format.number(v, '0');
-        },
-        'Number1': function(v) {
-            return Ext.util.Format.number(v, '0.0');
-        },
-        'Number2': function(v) {
-            return Ext.util.Format.number(v, '0.00');
-        },
-        'Number3': function(v) {
-            return Ext.util.Format.number(v, '0.000');
-        },
-        'Number4': function(v) {
-            return Ext.util.Format.number(v, '0.0000');
-        },
-        'Integer': function(v) {
-            return Ext.util.Format.number(v, '0');
-        },
+        // 'Number0': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 0, false);
+        //     return Number(t);
+        // },
+        'Number0': '#,##0',
+        // 'Number1': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 1, false);
+        //     return Number(t);
+        // },
+        'Number1': '#,##0.0',
+        // 'Number2': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 2, false);
+        //     return Number(t);
+        // },
+        'Number2': '#,##0.00',
+        // 'Number3': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 3, false);
+        //     return Number(t);
+        // },
+        'Number3': '#,##0.000',
+        // 'Number4': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 4, false);
+        //     return Number(t);
+        // },
+        'Number4': '#,##0.0000',
+        // 'Integer': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 0, false);
+        //     return Number(t);
+        // },
+        'Integer': '#,##0',
         // 'Total':function(v) {
-        //     var arr = (v + '.').split('.');
-        //     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-        //     var format = '0,000.' + xr.join('');
-        //     return Ext.util.Format.number(v, format);
+        //     var t = saas.util.BaseUtil.numberFormat(v, 2, false);
+        //     return Number(t);
         // },
         'Total': '#,##0.00',
-        'Amount': function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        },
-        'Quantity': function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        },
-        'Price': function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
-        },
-        // 'Price': '#,##0.00',
+        // 'Amount': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 2, false);
+        //     return Number(t);
+        // },
+        'Amount': '#,##0.00',
+        // 'Quantity': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 3, false);
+        //     return Number(t);
+        // },
+        'Quantity': '#,##0.000',
+        // 'Price': function(v) {
+        //     var t = saas.util.BaseUtil.numberFormat(v, 4, false);
+        //     return Number(t);
+        // },
+        'Price': '#,##0.00',
     },
 
 });

+ 20 - 22
frontend/saas-web/overrides/exporter/file/Style.js

@@ -12,37 +12,35 @@ Ext.define('saas.override.exporter.file.Style', {
         }
 
         if(f === 'Number0') {
-            return Ext.util.Format.number(v, '0');
+            var t = saas.util.BaseUtil.numberFormat(v, 0, false);
+            return Number(t);
         }else if(f === 'Number1') {
-            return Ext.util.Format.number(v, '0.0');
+            var t = saas.util.BaseUtil.numberFormat(v, 1, false);
+            return Number(t);
         }else if(f === 'Number2') {
-            return Ext.util.Format.number(v, '0.00');
+            var t = saas.util.BaseUtil.numberFormat(v, 2, false);
+            return Number(t);
         }else if(f === 'Number3') {
-            return Ext.util.Format.number(v, '0.000');
+            var t = saas.util.BaseUtil.numberFormat(v, 3, false);
+            return Number(t);
         }else if(f === 'Number4') {
-            return Ext.util.Format.number(v, '0.0000');
+            var t = saas.util.BaseUtil.numberFormat(v, 4, false);
+            return Number(t);
         }else if(f === 'Integer') { // new
-            return Ext.util.Format.number(v, '0');
+            var t = saas.util.BaseUtil.numberFormat(v, 0, false);
+            return Number(t);
         }else if(f === 'Total') {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            var t = saas.util.BaseUtil.numberFormat(v, 2, false);
+            return Number(t);
         }else if(f === 'Amount') {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            var t = saas.util.BaseUtil.numberFormat(v, 2, false);
+            return Number(t);
         }else if(f === 'Quantity') {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            var t = saas.util.BaseUtil.numberFormat(v, 3, false);
+            return Number(t);
         }else if(f === 'Price') {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join('');
-            return Ext.util.Format.number(v, format);
+            var t = saas.util.BaseUtil.numberFormat(v, 4, false);
+            return Number(t);
         }else if(f === 'Currency'){
             return fmt.currency(v);
         }else if(f === 'Euro Currency') {

Some files were not shown because too many files changed in this diff