Procházet zdrojové kódy

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

zhuth před 7 roky
rodič
revize
356116e6e0
52 změnil soubory, kde provedl 962 přidání a 127 odebrání
  1. 3 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 12 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Operation.java
  3. 1 1
      applications/commons/commons-server/src/main/resources/mapper/HomePageMapper.xml
  4. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsdetailMapper.java
  5. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsdetailMapper.java
  6. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java
  7. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetMapper.java
  8. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetMapper.java
  9. 14 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/StatsinfoMapper.java
  10. 71 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Statsinfo.java
  11. 27 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  12. 33 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  13. 34 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  14. 30 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  15. 32 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  16. 2 2
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  17. 4 4
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  18. 4 0
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  19. 2 2
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  20. 4 0
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  21. 11 2
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  22. 4 0
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  23. 2 2
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  24. 3 0
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  25. 103 0
      applications/money/money-server/src/main/resources/mapper/StatsinfoMapper.xml
  26. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  27. 3 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  28. 9 0
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  29. 13 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  30. 4 4
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  31. 5 0
      frontend/saas-web/app/view/core/form/FormPanel.js
  32. 20 2
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  33. 2 1
      frontend/saas-web/app/view/core/query/QueryPanelModel.js
  34. 14 1
      frontend/saas-web/app/view/core/report/ReportPanel.js
  35. 20 10
      frontend/saas-web/app/view/core/report/ReportPanelController.js
  36. 13 10
      frontend/saas-web/app/view/document/kind/ChildForm.js
  37. 22 0
      frontend/saas-web/app/view/document/kind/Kind.js
  38. 27 0
      frontend/saas-web/app/view/document/kind/KindModel.js
  39. 1 1
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  40. 9 5
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  41. 8 0
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  42. 11 5
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  43. 45 6
      frontend/saas-web/app/view/sale/report/SaleRec.js
  44. 4 5
      frontend/saas-web/app/view/stock/make/FormPanel.js
  45. 4 2
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  46. 0 3
      frontend/saas-web/app/view/stock/make/QueryPanelController.js
  47. 1 0
      frontend/saas-web/app/view/stock/report/Prodiodetail.js
  48. 24 0
      frontend/saas-web/app/view/sys/account/AccountInformation.js
  49. 8 4
      frontend/saas-web/app/view/sys/config/FormPanel.js
  50. 1 1
      frontend/saas-web/app/view/sys/power/FormPanel.js
  51. 246 36
      frontend/saas-web/app/view/sys/power/GroupGrid.js
  52. 41 0
      frontend/saas-web/overrides/grid/column/CheckColumn.js

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

@@ -37,6 +37,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     ILLEGAL_ID(79999, "id不正确"),
     PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库资料,无法删除"),
     PRODUCTWH_HAS_WAREHOUSE(79503, "该仓库资料存在库存,无法删除"),
+    ACCOUNT_EXISTS(79503, "账号已存在"),
 
 
 
@@ -61,6 +62,8 @@ public enum BizExceptionCode implements BaseExceptionCode {
 
     RECALANCE_OUTNOWBALANCE(74003,"本次核销金额不能大于未核销金额"),
 
+    BANK_AMOUNT_NOTENOUGH(74004, "资金账号不足"),
+
 
 
     //库存

+ 12 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Operation.java

@@ -60,6 +60,18 @@ public enum Operation {
      * 反记账
      */
     UNENDPRODUCT("msg.unEndProduct", "msg.unEndProductSuccess"),
+
+
+    /**
+     * 转采购验收单
+     */
+    TURNPURCCHECKIN("msg.TurnPurcCheckin", "msg.TurnPurcCheckinSuccess"),
+
+    /**
+     * 转采购验退单
+     */
+    TURNPURCCHECKOUT("msg.TurnPurcCheckout", "msg.TurnPurcCheckoutSuccess"),
+
     /**
      * 转出货单
      */

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

@@ -11,7 +11,7 @@
     </select>
 
     <select id="getPurchaseDataNow" parameterType="long" resultType="string">
-        select concat('[',GROUP_CONCAT(concat('{"x":"',si_vendname,'","y":',IFNULL(si_amount,0),'}')),']')  from statsinfo
+        select concat('[',GROUP_CONCAT(concat('{"x":"',si_vendname,'","y":',IFNULL(round(si_amount/10000,2),0),'}')),']')  from statsinfo
         where companyid=#{componyId} and si_yearmonth=DATE_FORMAT(now(),'%Y%m') and si_type='PURC' ORDER BY si_amount desc
     </select>
 

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsdetailMapper.java

@@ -17,4 +17,6 @@ public interface OthreceiptsdetailMapper {
     int updateByPrimaryKeySelective(Othreceiptsdetail record);
 
     int updateByPrimaryKey(Othreceiptsdetail record);
+
+    List<Integer> selectYm(Integer id);
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthspendingsdetailMapper.java

@@ -17,4 +17,5 @@ public interface OthspendingsdetailMapper {
     int updateByPrimaryKeySelective(Othspendingsdetail record);
 
     int updateByPrimaryKey(Othspendingsdetail record);
+    List<Integer> selectYm(Integer id);
 }

+ 4 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalanceMapper.java

@@ -38,4 +38,8 @@ public interface PaybalanceMapper extends CommonBaseMapper<Paybalance> {
     Vendor selectVendorByPrimaryKey(Integer bkId);
 
     int updateVendorByPrimaryKeySelective(Vendor record);
+
+    Double selectThisamount(Integer id);
+
+    void updateBankAmount(@Param("bk_thisamount") Double bk_thisamount, @Param("id") Integer id);
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetMapper.java

@@ -19,5 +19,6 @@ public interface PaybalancedetMapper {
     int updateByPrimaryKeySelective(Paybalancedet record);
 
     int updateByPrimaryKey(Paybalancedet record);
+    List<Integer> selectYm(Integer id);
 
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecbalancedetMapper.java

@@ -23,4 +23,5 @@ public interface RecbalancedetMapper extends CommonBaseMapper<Recbalancedet> {
     int updateByPrimaryKeySelective(Recbalancedet record);
 
     int updateByPrimaryKey(Recbalancedet record);
+    List<Integer> selectYm(Integer id);
 }

+ 14 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/StatsinfoMapper.java

@@ -0,0 +1,14 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Statsinfo;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author heqw
+ * @date 2018/11/14 16:13
+ **/
+public interface StatsinfoMapper {
+    Integer select(@Param("si_yearmonth") Integer si_yearmonth, @Param("companyid") Long companyid);
+    void update(Statsinfo statsinfo);
+    void insert(Statsinfo statsinfo);
+}

+ 71 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Statsinfo.java

@@ -0,0 +1,71 @@
+package com.usoftchina.saas.money.po;
+
+/**
+ * @author heqw
+ * @date 2018/11/14 16:02
+ **/
+public class Statsinfo {
+    private Double si_yearmonth;
+    private Double si_amount_pay;
+    private Double si_amount_otherpay;
+    private Double si_amount_rec;
+    private Double si_amount_otherrec;
+    private Long companyid;
+    private String si_type;
+
+    public Double getSi_yearmonth() {
+        return si_yearmonth;
+    }
+
+    public void setSi_yearmonth(Double si_yearmonth) {
+        this.si_yearmonth = si_yearmonth;
+    }
+
+    public Double getSi_amount_pay() {
+        return si_amount_pay;
+    }
+
+    public void setSi_amount_pay(Double si_amount_pay) {
+        this.si_amount_pay = si_amount_pay;
+    }
+
+    public Double getSi_amount_otherpay() {
+        return si_amount_otherpay;
+    }
+
+    public void setSi_amount_otherpay(Double si_amount_otherpay) {
+        this.si_amount_otherpay = si_amount_otherpay;
+    }
+
+    public Double getSi_amount_rec() {
+        return si_amount_rec;
+    }
+
+    public void setSi_amount_rec(Double si_amount_rec) {
+        this.si_amount_rec = si_amount_rec;
+    }
+
+    public Double getSi_amount_otherrec() {
+        return si_amount_otherrec;
+    }
+
+    public void setSi_amount_otherrec(Double si_amount_otherrec) {
+        this.si_amount_otherrec = si_amount_otherrec;
+    }
+
+    public Long getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Long companyid) {
+        this.companyid = companyid;
+    }
+
+    public String getSi_type() {
+        return si_type;
+    }
+
+    public void setSi_type(String si_type) {
+        this.si_type = si_type;
+    }
+}

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

@@ -11,9 +11,7 @@ import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.BizException;
-import com.usoftchina.saas.money.mapper.BanksubledgerMapper;
-import com.usoftchina.saas.money.mapper.FundtransferMapper;
-import com.usoftchina.saas.money.mapper.FundtransferdetailMapper;
+import com.usoftchina.saas.money.mapper.*;
 import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.service.FundtransferService;
 import com.usoftchina.saas.page.PageRequest;
@@ -38,6 +36,8 @@ public class FundtransferServiceImpl implements FundtransferService {
     private MaxnumberService maxnumberService;
     @Autowired
     private BanksubledgerMapper banksubledgerMapper;
+    @Autowired
+    private PaybalanceMapper paybalanceMapper;
 
     @Override
     public DocBaseDTO insert(Fundtran fundtran) {
@@ -101,17 +101,32 @@ public class FundtransferServiceImpl implements FundtransferService {
             }
         }
 
-        //取从表金额
+        //取从表金额更新中间表、资金账号表
         List<Fundtransferdetail> fundtransferdetailList = fundtran.getItems();
         Iterator isList = fundtransferdetailList.iterator();
         while (isList.hasNext()){
             Fundtransferdetail fundtransferdetail = (Fundtransferdetail) isList.next();
             Double amount = banksubledgerMapper.selectThisamount(fundtransferdetail.getFtd_bankcode());
             Double inamount = banksubledgerMapper.selectThisamount(fundtransferdetail.getFtd_inbankcode());
+
+            //中间表
             banksubledgerMapper.updateBankcode(amount, fundtransferdetail.getFtd_nowbalance(),
                     fundtransferdetail.getFtd_bankcode(), "-");
             banksubledgerMapper.updateBankcode(inamount, fundtransferdetail.getFtd_nowbalance(),
                     fundtransferdetail.getFtd_bankcode(), "+");
+
+            //资金账号表
+            int bk_id = fundtransferdetail.getFtd_bankid();
+            int bk_inid = fundtransferdetail.getFtd_inbankid();
+            Double bk_amount = paybalanceMapper.selectThisamount(bk_id) == null ? new Double(0) : paybalanceMapper.selectThisamount(bk_id);
+            Double bk_inamount = paybalanceMapper.selectThisamount(bk_inid) == null ? new Double(0) : paybalanceMapper.selectThisamount(bk_inid);
+
+            Double thisamount = bk_amount - fundtransferdetail.getFtd_nowbalance();
+            if (thisamount < 0){
+                throw new BizException(500, BizExceptionCode.BANK_AMOUNT_NOTENOUGH.getMessage());
+            }
+            paybalanceMapper.updateBankAmount(thisamount, bk_id);
+            paybalanceMapper.updateBankAmount(bk_inamount + fundtransferdetail.getFtd_nowbalance(), bk_inid);
         }
     }
 
@@ -139,6 +154,14 @@ public class FundtransferServiceImpl implements FundtransferService {
                     fundtransferdetail.getFtd_bankcode(), "+");
             banksubledgerMapper.updateBankcode(inamount, fundtransferdetail.getFtd_nowbalance(),
                     fundtransferdetail.getFtd_bankcode(), "-");
+
+            //资金账号表
+            int bk_id = fundtransferdetail.getFtd_bankid();
+            int bk_inid = fundtransferdetail.getFtd_inbankid();
+            Double bk_amount = paybalanceMapper.selectThisamount(bk_id) == null ? new Double(0) : paybalanceMapper.selectThisamount(bk_id);
+            Double bk_inamount = paybalanceMapper.selectThisamount(bk_inid) == null ? new Double(0) : paybalanceMapper.selectThisamount(bk_inid);
+            paybalanceMapper.updateBankAmount(bk_amount + fundtransferdetail.getFtd_nowbalance(), bk_id);
+            paybalanceMapper.updateBankAmount(bk_inamount - fundtransferdetail.getFtd_nowbalance(), bk_inid);
         }
     }
 

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

@@ -14,10 +14,8 @@ import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.BanksubledgerMapper;
 import com.usoftchina.saas.money.mapper.OthreceiptsMapper;
 import com.usoftchina.saas.money.mapper.OthreceiptsdetailMapper;
-import com.usoftchina.saas.money.po.Banksubledger;
-import com.usoftchina.saas.money.po.Othreceipts;
-import com.usoftchina.saas.money.po.Othreceiptsdetail;
-import com.usoftchina.saas.money.po.Othte;
+import com.usoftchina.saas.money.mapper.StatsinfoMapper;
+import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.service.OthreceiptsService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,6 +40,8 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
     private MaxnumberService maxnumberService;
     @Autowired
     private BanksubledgerMapper banksubledgerMapper;
+    @Autowired
+    private StatsinfoMapper statsinfoMapper;
 
     @Override
     public DocBaseDTO insert(Othte othte) {
@@ -114,6 +114,21 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
             banksubledgerMapper.updateBankcode(amount, othreceiptsdetail.getOrd_nowbalance(),
                     othreceipts.getOr_bankcode(), "+");
         }
+
+        //计算期间金额
+        Statsinfo statsinfo = new Statsinfo();
+        List<Integer> ymList = othreceiptsdetailMapper.selectYm(id);
+        Integer ym = ymList.indexOf(0);
+        System.out.println("ym:"+ym);
+        statsinfo.setCompanyid(BaseContextHolder.getCompanyId());
+        Integer yms = statsinfoMapper.select(ym, BaseContextHolder.getCompanyId());
+        statsinfo.setSi_yearmonth(Double.valueOf(ym));
+        statsinfo.setSi_amount_otherrec(othreceipts.getOr_amount());
+        if (yms == null){
+            statsinfoMapper.insert(statsinfo);
+        }else {
+            statsinfoMapper.update(statsinfo);
+        }
     }
 
     @Override
@@ -138,6 +153,20 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
                     othreceipts.getOr_bankcode(), "-");
         }
 
+        //计算期间金额
+        Statsinfo statsinfo = new Statsinfo();
+        List<Integer> ymList = othreceiptsdetailMapper.selectYm(id);
+        Integer ym = ymList.indexOf(0);
+        statsinfo.setCompanyid(BaseContextHolder.getCompanyId());
+        Integer yms = statsinfoMapper.select(ym, BaseContextHolder.getCompanyId());
+        statsinfo.setSi_yearmonth(Double.valueOf(ym));
+        statsinfo.setSi_amount_otherrec(othreceipts.getOr_amount());
+        if (yms == null){
+            statsinfoMapper.insert(statsinfo);
+        }else {
+            statsinfoMapper.update(statsinfo);
+        }
+
     }
 
 

+ 34 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java

@@ -14,10 +14,8 @@ import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.BanksubledgerMapper;
 import com.usoftchina.saas.money.mapper.OthspendingsMapper;
 import com.usoftchina.saas.money.mapper.OthspendingsdetailMapper;
-import com.usoftchina.saas.money.po.Banksubledger;
-import com.usoftchina.saas.money.po.Othsp;
-import com.usoftchina.saas.money.po.Othspendings;
-import com.usoftchina.saas.money.po.Othspendingsdetail;
+import com.usoftchina.saas.money.mapper.StatsinfoMapper;
+import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.service.OthspendingsService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -41,6 +39,8 @@ public class OthspendingsServiceImpl implements OthspendingsService {
     private MaxnumberService maxnumberService;
     @Autowired
     private BanksubledgerMapper banksubledgerMapper;
+    @Autowired
+    private StatsinfoMapper statsinfoMapper;
 
     @Override
     public DocBaseDTO insert(Othsp othsp) {
@@ -146,6 +146,21 @@ public class OthspendingsServiceImpl implements OthspendingsService {
             banksubledgerMapper.updateBankcode(amount, othspendingsdetail.getOsd_nowbalance(),
                     othspendings.getOs_bankcode(), "+");
         }
+
+        //计算期间金额
+        Statsinfo statsinfo = new Statsinfo();
+        List<Integer> ymList = othspendingsdetailMapper.selectYm(id);
+        Integer ym = ymList.indexOf(0);
+        System.out.println("ym:"+ym);
+        statsinfo.setCompanyid(BaseContextHolder.getCompanyId());
+        Integer yms = statsinfoMapper.select(ym, BaseContextHolder.getCompanyId());
+        statsinfo.setSi_yearmonth(Double.valueOf(ym));
+        statsinfo.setSi_amount_otherpay(othspendings.getOs_amount());
+        if (yms == null){
+            statsinfoMapper.insert(statsinfo);
+        }else {
+            statsinfoMapper.update(statsinfo);
+        }
     }
 
     @Override
@@ -170,6 +185,21 @@ public class OthspendingsServiceImpl implements OthspendingsService {
             banksubledgerMapper.updateBankcode(amount, othspendingsdetail.getOsd_nowbalance(),
                     othspendings.getOs_bankcode(), "-");
         }
+
+        //计算期间金额
+        Statsinfo statsinfo = new Statsinfo();
+        List<Integer> ymList = othspendingsdetailMapper.selectYm(id);
+        Integer ym = ymList.indexOf(0);
+        System.out.println("ym:"+ym);
+        statsinfo.setCompanyid(BaseContextHolder.getCompanyId());
+        Integer yms = statsinfoMapper.select(ym, BaseContextHolder.getCompanyId());
+        statsinfo.setSi_yearmonth(Double.valueOf(ym));
+        statsinfo.setSi_amount_otherpay(othspendings.getOs_amount());
+        if (yms == null){
+            statsinfoMapper.insert(statsinfo);
+        }else {
+            statsinfoMapper.update(statsinfo);
+        }
     }
 
     @Override

+ 30 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -40,6 +40,8 @@ public class PaybalanceServiceImpl implements PaybalanceService {
     private SubledgerMapper subledgerMapper;
     @Autowired
     private BanksubledgerMapper banksubledgerMapper;
+    @Autowired
+    private StatsinfoMapper statsinfoMapper;
 
     public DocBaseDTO insert(Pay pay) {
         Paybalance paybalance = pay.getMain();
@@ -243,6 +245,20 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             subledgerMapper.updateByPrimaryKeySelective(subledger1);
         }
 
+        //计算期间金额
+        Statsinfo statsinfo = new Statsinfo();
+        List<Integer> ymList = paybalancedetMapper.selectYm(id);
+        Integer ym = ymList.indexOf(0);
+        System.out.println("ym:"+ym);
+        statsinfo.setCompanyid(BaseContextHolder.getCompanyId());
+        Integer yms = statsinfoMapper.select(ym, BaseContextHolder.getCompanyId());
+        statsinfo.setSi_yearmonth(Double.valueOf(ym));
+        statsinfo.setSi_amount_pay(100.0);
+        if (yms == null){
+            statsinfoMapper.insert(statsinfo);
+        }else {
+            statsinfoMapper.update(statsinfo);
+        }
     }
 
     @Override
@@ -308,7 +324,20 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         subledgerMapper.deleteByPrimaryKey(paybalance.getPb_code(), paybalance.getPb_kind());
         banksubledgerMapper.deleteByPrimaryKey(paybalance.getPb_code(), paybalance.getPb_kind());
 
-
+        //计算期间金额
+        Statsinfo statsinfo = new Statsinfo();
+        List<Integer> ymList = paybalancedetMapper.selectYm(id);
+        Integer ym = ymList.indexOf(0);
+        System.out.println("ym:"+ym);
+        statsinfo.setCompanyid(BaseContextHolder.getCompanyId());
+        Integer yms = statsinfoMapper.select(ym, BaseContextHolder.getCompanyId());
+        statsinfo.setSi_yearmonth(Double.valueOf(ym));
+        statsinfo.setSi_amount_pay(100.0);
+        if (yms == null){
+            statsinfoMapper.insert(statsinfo);
+        }else {
+            statsinfoMapper.update(statsinfo);
+        }
     }
 
 

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

@@ -40,6 +40,8 @@ public class RecbalanceServiceImpl implements RecbalanceService {
     private BanksubledgerMapper banksubledgerMapper;
     @Autowired
     private SubledgerMapper subledgerMapper;
+    @Autowired
+    private StatsinfoMapper statsinfoMapper;
 
     @Override
     public DocBaseDTO insert(Rec rec) {
@@ -269,6 +271,21 @@ public class RecbalanceServiceImpl implements RecbalanceService {
             subledger1.setSl_namount(namount-nowBalance);//未核销
             subledgerMapper.updateByPrimaryKeySelective(subledger1);
         }
+
+        //计算期间金额
+        Statsinfo statsinfo = new Statsinfo();
+        List<Integer> ymList = recbalancedetMapper.selectYm(id);
+        Integer ym = ymList.indexOf(0);
+        System.out.println("ym:"+ym);
+        statsinfo.setCompanyid(BaseContextHolder.getCompanyId());
+        Integer yms = statsinfoMapper.select(ym, BaseContextHolder.getCompanyId());
+        statsinfo.setSi_yearmonth(Double.valueOf(ym));
+        statsinfo.setSi_amount_rec(100.0);
+        if (yms == null){
+            statsinfoMapper.insert(statsinfo);
+        }else {
+            statsinfoMapper.update(statsinfo);
+        }
     }
 
     @Override
@@ -334,6 +351,21 @@ public class RecbalanceServiceImpl implements RecbalanceService {
             subledger1.setSl_namount(namount+nowBalance);//未核销
             subledgerMapper.updateByPrimaryKeySelective(subledger1);
         }
+
+        //计算期间金额
+        Statsinfo statsinfo = new Statsinfo();
+        List<Integer> ymList = recbalancedetMapper.selectYm(Math.toIntExact(id));
+        Integer ym = ymList.indexOf(0);
+        System.out.println("ym:"+ym);
+        statsinfo.setCompanyid(BaseContextHolder.getCompanyId());
+        Integer yms = statsinfoMapper.select(ym, BaseContextHolder.getCompanyId());
+        statsinfo.setSi_yearmonth(Double.valueOf(ym));
+        statsinfo.setSi_amount_rec(100.0);
+        if (yms == null){
+            statsinfoMapper.insert(statsinfo);
+        }else {
+            statsinfoMapper.update(statsinfo);
+        }
     }
 
     public PageInfo<Recbalance> selectList(PageRequest page, ListReqDTO reqDTO) {

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

@@ -241,7 +241,7 @@
       <if test="companyId != null">
         and   Fundtransfer.companyId = #{companyId}
       </if>
-    </where>  order by ft_date desc
+    </where>  order by ft_date desc, ft_code desc
   </select>
 
   <select id="selectFundtransferListByCondition" resultMap="BaseResultMap">
@@ -256,6 +256,6 @@
       <if test="companyId != null">
         and   fundtransfer.companyId = #{companyId}
       </if>
-    </where>  order by ft_date desc
+    </where>  order by ft_date desc, ft_code desc
   </select>
 </mapper>

+ 4 - 4
applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml

@@ -324,9 +324,9 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and   othreceipts.companyId = #{companyId}
+        and   othreceipts.companyId = #{companyId, jdbcType=INTEGER}
       </if>
-    </where>  order by or_date desc
+    </where>  order by or_date desc,or_code desc
   </select>
 
   <select id="selectOthreceiptsListByCondition" resultMap="BaseResultMap">
@@ -339,8 +339,8 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and   othreceipts.companyId = #{companyId}
+        and   othreceipts.companyId = #{companyId, jdbcType=INTEGER}
       </if>
-    </where>  order by or_date desc
+    </where>  order by or_date desc, or_code desc
   </select>
 </mapper>

+ 4 - 0
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -207,4 +207,8 @@
       ord_text5 = #{ordText5,jdbcType=VARCHAR}
     where ord_id = #{ordId,jdbcType=INTEGER}
   </update>
+
+  <select id="selectYm" parameterType="java.lang.Integer" resultType="java.lang.Integer">
+    select ord_ym from othreceiptsdetail where ord_orid = #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

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

@@ -321,7 +321,7 @@
       <if test="companyId != null">
         and   othspendings.companyId = #{companyId}
       </if>
-    </where>  order by os_date desc
+    </where>  order by os_date desc, os_code desc
   </select>
 
   <select id="selectOthspendingsListByCondition" resultMap="BaseResultMap">
@@ -336,6 +336,6 @@
       <if test="companyId != null">
         and   othspendings.companyId = #{companyId}
       </if>
-    </where>  order by os_date desc
+    </where>  order by os_date desc,os_code desc
   </select>
 </mapper>

+ 4 - 0
applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml

@@ -213,4 +213,8 @@
       osd_text5 = #{osdText5,jdbcType=VARCHAR}
     where osd_id = #{osdId,jdbcType=INTEGER}
   </update>
+
+  <select id="selectYm" parameterType="java.lang.Integer" resultType="java.lang.Integer">
+    select osd_ym from othspendingsdetail where osd_orid = #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 11 - 2
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -428,7 +428,7 @@
       <if test="companyId != null">
         and   paybalance.companyId = #{companyId}
       </if>
-    </where>  order by pb_id
+    </where>  order by pb_date desc, pb_code desc
   </select>
 
   <select id="selectPaybalanceListByCondition" resultMap="BaseResultMap">
@@ -443,7 +443,7 @@
       <if test="companyId != null">
         and   paybalance.companyId = #{companyId}
       </if>
-    </where>  order by pb_id
+    </where>  order by pb_date desc,pb_code desc
   </select>
 
   <select id="validateCodeWhenInsert" resultType="int">
@@ -576,6 +576,15 @@
     where bk_id = #{id,jdbcType=INTEGER}
   </update>
 
+  <update id="updateBankAmount" >
+    update bankinformation set bk_thisamount = #{bk_thisamount,jdbcType=DOUBLE}
+     where bk_id = #{id,jdbcType=INTEGER}
+  </update>
+
+<select id="selectThisamount" parameterType="java.lang.Integer" resultType="java.lang.Double">
+  select bk_thisamount from bankinformation where bk_id = #{id,jdbcType=INTEGER}
+</select>
+
 <!-- 供应商-->
   <resultMap id="VendorResultMapper" type="com.usoftchina.saas.money.po.Vendor">
     <id column="ve_id" property="id" jdbcType="INTEGER" />

+ 4 - 0
applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml

@@ -287,4 +287,8 @@
       </if>
     </where>  order by pb_id
   </select>
+
+  <select id="selectYm" parameterType="java.lang.Integer" resultType="java.lang.Integer">
+    select pd_ym from paybalancedet where pd_pbid = #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

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

@@ -131,7 +131,7 @@
       <if test="companyId != null">
         and   recbalance.companyId = #{companyId}
       </if>
-    </where>  order by rb_date desc
+    </where>  order by rb_date desc,rb_code desc
   </select>
 
   <select id="selectRecbalanceListByCondition" resultMap="BaseResultMap">
@@ -146,7 +146,7 @@
       <if test="companyId != null">
         and   recbalance.companyId = #{companyId}
       </if>
-    </where>  order by rb_date desc
+    </where>  order by rb_date desc, rb_code desc
   </select>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">

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

@@ -294,4 +294,7 @@
     where rd_id = #{id,jdbcType=INTEGER}
   </update>
 
+  <select id="selectYm" parameterType="java.lang.Integer" resultType="java.lang.Integer">
+    select rd_ym from recbalancedet where rd_rbid = #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 103 - 0
applications/money/money-server/src/main/resources/mapper/StatsinfoMapper.xml

@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.money.mapper.StatsinfoMapper" >
+    <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Statsinfo">
+        <result column="si_yearmonth" jdbcType="DOUBLE" property="si_yearmonth" />
+        <result column="si_amount_pay" jdbcType="DOUBLE" property="si_amount_pay" />
+        <result column="si_amount_otherpay" jdbcType="DOUBLE" property="si_amount_otherpay" />
+        <result column="si_amount_rec" jdbcType="DOUBLE" property="si_amount_rec" />
+        <result column="si_amount_otherrec" jdbcType="DOUBLE" property="si_amount_otherrec" />
+        <result column="companyid" jdbcType="INTEGER" property="companyid" />
+        <result column="si_type" jdbcType="VARCHAR" property="si_type" />
+    </resultMap>
+
+    <insert id="insert" parameterType="com.usoftchina.saas.money.po.Statsinfo">
+        insert into statsinfo
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+        <if test="si_yearmonth != null" >
+            si_yearmonth,
+        </if>
+        <if test="si_amount_pay != null" >
+            si_amount_pay,
+        </if>
+        <if test="si_amount_otherpay != null" >
+            si_amount_otherpay,
+        </if>
+        <if test="si_amount_rec != null" >
+            si_amount_rec,
+        </if>
+        <if test="si_amount_otherrec != null" >
+            si_amount_otherrec,
+        </if>
+        <if test="companyid != null" >
+            companyid,
+        </if>
+            si_type,
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="si_yearmonth != null" >
+                #{si_yearmonth,jdbcType=INTEGER},
+            </if>
+            <if test="si_amount_pay != null" >
+                select sum(pd_amount) from paybalancedet left join paybalance on pd_pbid=pb_id
+                where paybalance.companyId= #{companyid,jdbcType=INTEGER}
+                and pd_ym=#{si_yearmonth,jdbcType=INTEGER} and pb_statuscode='AUDITED',
+            </if>
+            <if test="si_amount_otherpay != null" >
+                (select sum(os_amount) from othspendings RIGHT JOIN othspendingsdetail on os_id = osd_orid
+                where othspendingsdetail.companyId=#{companyid,jdbcType=INTEGER}
+                and osd_ym=#{si_yearmonth,jdbcType=INTEGER} and os_statuscode='AUDITED'),
+            </if>
+            <if test="si_amount_rec != null" >
+                (select sum(rd_amount) from recbalancedet left join recbalance on rd_rbid=rb_id
+                where recbalancedet.companyId=#{companyid,jdbcType=INTEGER}
+                and rd_ym=#{si_yearmonth,jdbcType=INTEGER} and rb_statuscode='AUDITED'),
+            </if>
+            <if test="si_amount_otherrec != null" >
+                (select  sum(or_amount) from othreceipts RIGHT JOIN othreceiptsdetail on or_id = ord_orid
+                where othreceiptsdetail.companyId=#{companyid,jdbcType=INTEGER}
+                and ord_ym=#{si_yearmonth,jdbcType=INTEGER} and or_statuscode='AUDITED'),
+            </if>
+            <if test="companyid != null" >
+                #{companyid,jdbcType=INTEGER},
+            </if>
+                'FUND',
+        </trim>
+    </insert>
+
+    <update id="update" parameterType="com.usoftchina.saas.money.po.Statsinfo" >
+        update statsinfo
+        <set >
+            <if test="si_amount_pay != null" >
+                si_amount_pay =
+                (select sum(pd_amount) from paybalancedet left join paybalance on pd_pbid=pb_id
+                where paybalance.companyId= #{companyid,jdbcType=INTEGER}
+                and pd_ym=#{si_yearmonth,jdbcType=INTEGER} and pb_statuscode='AUDITED'),
+            </if>
+            <if test="si_amount_otherpay != null" >
+                si_amount_otherpay =
+                (select sum(os_amount) from othspendings RIGHT JOIN othspendingsdetail on os_id = osd_orid
+                where othspendingsdetail.companyId=#{companyid,jdbcType=INTEGER}
+                and osd_ym=#{si_yearmonth,jdbcType=INTEGER} and os_statuscode='AUDITED'),
+            </if>
+            <if test="si_amount_rec != null" >
+                si_amount_rec =
+                (select sum(rd_amount) from recbalancedet left join recbalance on rd_rbid=rb_id
+                where recbalancedet.companyId=#{companyid,jdbcType=INTEGER}
+                and rd_ym=#{si_yearmonth,jdbcType=INTEGER} and rb_statuscode='AUDITED'),
+            </if>
+            <if test="si_amount_otherrec != null" >
+                si_amount_otherrec =
+                (select  sum(or_amount) from othreceipts RIGHT JOIN othreceiptsdetail on or_id = ord_orid
+                where othreceiptsdetail.companyId=#{companyid,jdbcType=INTEGER}
+                and ord_ym=#{si_yearmonth,jdbcType=INTEGER} and or_statuscode='AUDITED'),
+            </if>
+        </set>
+        where si_yearmonth = #{si_yearmonth,jdbcType=INTEGER} and companyid = #{companyid,jdbcType=INTEGER}
+        and si_type = 'FUND'
+    </update>
+
+    <select id="select" resultType="java.lang.Integer">
+        select DISTINCT si_yearmonth from statsinfo where si_yearmonth =#{si_yearmonth,jdbcType=INTEGER} and companyid = #{companyid,jdbcType=INTEGER}
+    </select>
+</mapper>

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

@@ -11,6 +11,7 @@ import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
+import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.api.EmployeeApi;
@@ -213,6 +214,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         updateYqty(prodInOut);
         //日志记录
         messageLogService.update(baseDTO);
+        messageLogService.customizeLog(baseDTO, Operation.TURNPURCCHECKOUT);
         return baseDTO;
     }
 

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

@@ -11,6 +11,7 @@ import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
+import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.api.EmployeeApi;
@@ -470,10 +471,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
         //采购验收单相关计算
         prodInOutService.calcProdInout(pi_id,"采购验收单");
-        DocBaseDTO baseDTO = new DocBaseDTO();
-        baseDTO.setId(pi_id);
-        baseDTO.setCode(piInoutno);
-        baseDTO.setName("采购验收单");
+        DocBaseDTO baseDTO = new DocBaseDTO(pi_id, piInoutno, BillCodeSeq.PURCHASEIN.getName());
+        messageLogService.customizeLog(baseDTO, Operation.TURNPURCCHECKIN);
         return Result.success(baseDTO);
     }
 

+ 9 - 0
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -89,6 +89,15 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
     },
 
     listeners:{
+        boxready: function(grid, width, height, eOpts) {
+            var store = grid.getStore(),
+            gridBodyBox = grid.body.dom.getBoundingClientRect(),
+            gridBodyBoxHeight = gridBodyBox.height;
+
+            var pageSize = Math.floor(gridBodyBoxHeight / 32);
+
+            store.setPageSize(pageSize);
+        },
         itemClick: function(view,record) {
             var me = this;
             var dbfinds = me.dbfinds;

+ 13 - 1
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -31,7 +31,19 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                 }
             }
          }
-	},
+    },
+    
+    listeners:{
+        boxready: function(grid, width, height, eOpts) {
+            var store = grid.getStore(),
+            gridBodyBox = grid.body.dom.getBoundingClientRect(),
+            gridBodyBoxHeight = gridBodyBox.height;
+
+            var pageSize = Math.floor(gridBodyBoxHeight / 32);
+
+            store.setPageSize(pageSize);
+        }
+    },
 
     initComponent: function() {
         var me = this;

+ 4 - 4
frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js

@@ -225,10 +225,10 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
                             var nowRec = me.column.ownerCt.ownerCt.store.getData().getByKey(rec.id);
                             if(nowRec.get(item.to)&&nowRec.get(item.to)!=""){
                                 nowRec.set(item.to,null);
-                                delete nowRec.modified[item.to];
-                                if(JSON.stringify(nowRec.modified)=="{}"){
-                                    nowRec.dirty = false
-                                }
+                            }
+                            delete nowRec.modified[item.to];
+                            if(JSON.stringify(nowRec.modified)=="{}"){
+                                nowRec.dirty = false
                             }
                             if(me.name==item.to){
                                 me.column.getEditor().setValue('');

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

@@ -59,11 +59,13 @@ Ext.define('saas.view.core.form.FormPanel', {
             cls: 'x-formpanel-btn-orange',
             xtype: 'button',
             text: '新增',
+            hidden: true,
             bind: {
                 hidden: '{!id}'
             },
             handler: 'add'
         }, {
+            hidden: true,
             xtype: 'button',
             text: '复制',
             handler: 'onCopy',
@@ -71,6 +73,7 @@ Ext.define('saas.view.core.form.FormPanel', {
                 hidden: '{!'+ me._idField + '}',
             }
         }, {
+            hidden: true,
             xtype: 'button',
             text: '保存',
             handler: 'onSave',
@@ -80,6 +83,7 @@ Ext.define('saas.view.core.form.FormPanel', {
                 disabled: '{!base.valid || '+ me._statusCodeField + ' == "' + me.auditTexts.auditCode + '"}'
             }
         }, {
+            hidden: true,
             xtype: 'button',
             text: '删除',
             bind: {
@@ -87,6 +91,7 @@ Ext.define('saas.view.core.form.FormPanel', {
             },
             handler: 'delete'
         }, {
+            hidden: true,
             xtype: 'button',
             bind: {
                 text: '{auditBtnText}',

+ 20 - 2
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -33,7 +33,24 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     columnWidth: 1.0,
     showRowNum: true,
     autoQuery: true,
-    selModel: 'checkboxmodel',
+    selModel: {
+        checkOnly:true,
+        type:'checkboxmodel',
+        listeners:{
+            selectionchange:function(selModel,record,e){
+                var grid = selModel.view.ownerCt;
+                var statusField = grid.codeField.split('_')[0] + '_status';
+                var hasAudited = false;
+                var items = selModel.getSelected().items;
+                Ext.each(items, function(item, index){
+                    if(item.get(statusField)=='已审核'){
+                        hasAudited = true
+                    }
+                });
+                grid.ownerCt.getViewModel().setData({'deleteDisable':hasAudited});
+            }
+         }
+	},
 
     initComponent: function () {
         var me = this;
@@ -215,7 +232,8 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     text: '删除',
                     handler: me.onDelete,
                     bind: {
-                        hidden: '{!deleteEnable}'
+                        hidden: '{!deleteEnable}',
+                        disabled: '{deleteDisable}'
                     }
                 }]
             }, {

+ 2 - 1
frontend/saas-web/app/view/core/query/QueryPanelModel.js

@@ -9,6 +9,7 @@ Ext.define('saas.view.core.query.QueryPanelModel', {
         printEnable: true, // 显示打印按钮
         importEnable: true, // 显示导入按钮
         closeEnable: true, // 显示关闭按钮
-        deleteEnable: true // 显示删除按钮
+        deleteEnable: true, // 显示删除按钮
+        deleteDisable:false //删除按钮是否可使用
     }
 });

+ 14 - 1
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -44,7 +44,20 @@ Ext.define('saas.view.core.report.ReportPanel', {
                         xtype: 'button',
                         text: '查询',
                         handler: 'onQuery'
-                    }, {
+                    },{
+                        xtype:'button',
+                        text:'打印',
+                        style: {
+                            float: 'right'
+                        },
+                        handler: 'exportTo',
+                        cfg: {
+                            type: 'html',
+                            includeGroups: true,
+                            includeSummary: true,
+                            isPrint:true
+                        }
+                    },{
                         xtype: 'button',
                         style: {
                             float: 'right'

+ 20 - 10
frontend/saas-web/app/view/core/report/ReportPanelController.js

@@ -14,30 +14,40 @@ Ext.define('saas.view.core.report.ReportPanelController', {
         var me = this,
         reportPanel = me.getView(),
         grid = reportPanel.getListGrid();
-
         grid.store.loadPage(1);
     },
-
-    exportTo: function(btn){
+    exportTo:function(btn){
         var me = this,
-        reportPanel = me.getView(),
-        grid = reportPanel.getListGrid(),
-        title = reportPanel.reportTitle;
+            reportPanel = me.getView(),
+            grid = reportPanel.getListGrid(),
+            title = reportPanel.reportTitle;
 
         var cfg = Ext.merge({
             title: title,
+            titleStyle:{
+                alignment:{
+                    horizontal:'Center', vertical:'Center'
+                }
+                //font:
+            },
             fileName: title + '.' + (btn.cfg.ext || btn.cfg.type)
         }, btn.cfg);
-
-
         grid.store.exportPageSize = 5000;
         grid.store.exportNumber = 1;
         grid.store.load(function(records, operation, success) {
-            grid.saveDocumentAs(cfg);
+            if(btn.cfg.isPrint){
+                me.printHtml(grid.getDocumentData(cfg));
+            }else  grid.saveDocumentAs(cfg);
             grid.store.exportPageSize = null;
             grid.store.exportNumber = null;
             grid.store.load(function(records, operation, success) {
             });
         });
-    }
+    },
+    printHtml: function(html){
+        var d = window.open("", "print");
+        d.document.write(html);
+        d.document.close();
+        d.print();
+    },
 });

+ 13 - 10
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -112,16 +112,19 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 hideTrigger: true,
                 mouseWheelEnabled: false,
                 minValue: 0
-            },{
-                xtype:'numberfield',
-                name:'bk_thisamount',
-                allowBlank:true,
-                fieldLabel:'当前余额',
-                hideTrigger: true,
-                mouseWheelEnabled: false,
-                beforeLabelTextTpl:'',
-                minValue: 0
-            },{
+            },
+            // {
+            //     xtype:'numberfield',
+            //     name:'bk_thisamount',
+            //     allowBlank:true,
+            //     fieldLabel:'当前余额',
+            //     hideTrigger: true,
+            //     mouseWheelEnabled: false,
+            //     beforeLabelTextTpl:'',
+            //     minValue: 0
+            // }
+            // ,
+            {
                 xtype:'combo',
                 name:'bk_type',
                 allowBlank:false,

+ 22 - 0
frontend/saas-web/app/view/document/kind/Kind.js

@@ -249,6 +249,28 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl:'/api/account/role/save',
             updateUrl:'/api/account/role/update',
         },
+        accountinformation:{
+            columns: [{
+                text: '账户',
+                dataIndex: 'wh_code',
+                width: 200
+            },{
+                text: '账户',
+                dataIndex: 'wh_description',
+                width: 200
+            },{
+                text: '账户',
+                dataIndex: 'wh_type',
+                width: 200
+            },{  
+                text: '账户',
+                dataIndex: 'wh_status',
+                hidden:true,
+            }],
+            keyField:'id',
+            reqUrl: '/api/document/warehouse/save',
+            delUrl: '/api/document/warehouse/delete'
+        },
         warehouse:{
             columns: [{
                 text: '编号',

+ 27 - 0
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -235,6 +235,33 @@ Ext.define('saas.view.document.kind.KindModel', {
                     });
                 }
             }
+        },  
+        accountinformation: {    
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'rl_name',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/account/account/accountRole/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         productunit: {    
             fields:[

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

@@ -321,7 +321,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             hidden: true
         }]
     }, {
-        xtype: 'hidden',
+        xtype: 'textfield',
         name: 'pb_remark',
         columnWidth: 1,
         fieldLabel: '备注'

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

@@ -73,11 +73,6 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         xtype: "textfield",
         name: "rb_manname",
         fieldLabel: "收款人"
-    }, {
-        xtype: 'hidden',
-        name: 'rb_remark',
-        fieldLabel: '备注',
-        columnWidth: 1
     }, {
         xtype: "numberfield",
         name: "rb_discounts",
@@ -128,6 +123,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: '资金账户',
             dataIndex: 'rd_bankname',
+            width: 200,
             editor:{
                 xtype:'dbfindtrigger'
             }
@@ -179,6 +175,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             text: "备注",
             dataIndex: "rd_remark",
             width: 250,
+            flex:1,
             editor: {
                 xtype: 'textfield'
             }
@@ -210,6 +207,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: '来源单号',
             dataIndex: 'rbd_slcode',
+            width: 200,
             editor:{
                 displayField : "display",
                 editable : true,
@@ -290,6 +288,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             text: "本次核销金额",
             xtype: 'numbercolumn',
             dataIndex: "rbd_nowbalance",
+            width:200,
             editor : {
                 xtype : "numberfield",
                 decimalPrecision: 2
@@ -309,6 +308,11 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 return Ext.util.Format.number(v, format);
             }
         }]
+    }, {
+        xtype: 'textfield',
+        name: 'rb_remark',
+        fieldLabel: '备注',
+        columnWidth: 1
     }, {
         xtype: 'numberfield',
         name: 'rb_recorderid',

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

@@ -310,6 +310,14 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 text : "关联销售单号", 
                 dataIndex : "pd_salecode", 
                 width : 120.0
+            },{
+                text : "备注", 
+                dataIndex : "sd_remark",
+                width : 250, 
+                items : null,
+                editor : {
+                    xtype : "textfield"
+                },
             }
         ]
     }, {

+ 11 - 5
frontend/saas-web/app/view/purchase/report/PurchasePay.js

@@ -67,7 +67,7 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         summaryType: 'sum',
         summaryRenderer: function(v) {
             var arr = (v + '.').split('.');
-            var xr = (new Array(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);
         }
@@ -79,7 +79,7 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         summaryType: 'sum',
         summaryRenderer: function(v) {
             var arr = (v + '.').split('.');
-            var xr = (new Array(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);
         }
@@ -89,13 +89,19 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         dataIndex: 'pb_pbdamount',
         xtype: 'numbercolumn'
     }, {
-        text: '付款比例',
+        text: '付款比例%',
         //本次付款/采购金额*100%
         dataIndex: 'pb_payrate',
-        xtype: 'numbercolumn'
+        xtype: 'numbercolumn',
+        renderer : function(v) {
+            var arr = (v*100 + '.').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*100, format);
+        }
     }, {
         text: '备注',
-        dataIndex: 'pd_remark',
+        dataIndex: 'pb_remark',
         width: 200
     }]
 

+ 45 - 6
frontend/saas-web/app/view/sale/report/SaleRec.js

@@ -50,26 +50,65 @@ Ext.define('saas.view.sale.report.SaleRec', {
         xtype: 'datecolumn'
     }, {
         text: '来源单号',
-        dataIndex: 'rbd_slcode'
+        dataIndex: 'rbd_slcode',
+        width: 200
     }, {
         text: '类型',
         dataIndex: 'rbd_slkind'
     }, {
         text: '销售金额',
         xtype: 'numbercolumn',
-        dataIndex: 'rbd_amount'
+        dataIndex: 'rbd_amount',
+        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: '本次收款',
         xtype: 'numbercolumn',
-        dataIndex: 'rbd_nowbalance'
+        dataIndex: 'rbd_nowbalance',
+        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: '应收余额',
         xtype: 'numbercolumn',
-        dataIndex: 'rb_rbdamount'
+        dataIndex: 'rb_rbdamount',
+        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: '回款比例',
+        text: '回款比例%',
+        dataIndex: 'rb_backrate',
         xtype: 'numbercolumn',
-        dataIndex: 'rb_backrate'
+        renderer : function(v) {
+            var arr = (v*100 + '.').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*100, format);
+        }
     }, {
         text: '备注',
         dataIndex: 'rb_remark'

+ 4 - 5
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -55,7 +55,6 @@ Ext.define('saas.view.stock.make.FormPanel', {
         fieldLabel: '产品id'
     },{
         xtype : "dbfindtrigger",
-        editable:false, 
         name : "ma_prodcode", 
         fieldLabel : "产品编号",
         allowBlank : false,
@@ -74,14 +73,14 @@ Ext.define('saas.view.stock.make.FormPanel', {
         columnWidth: 0.25,
     },{
         xtype : "textfield", 
-        name : "ma_version", 
-        fieldLabel : "版本",
+        name : "ma_produnit", 
+        fieldLabel : "单位",
         readOnly:true,
         columnWidth: 0.25
     },{
         xtype : "textfield", 
-        name : "ma_produnit", 
-        fieldLabel : "单位",
+        name : "ma_version", 
+        fieldLabel : "版本",
         readOnly:true,
         columnWidth: 0.25
     },

+ 4 - 2
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -21,9 +21,9 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             from:'wh_description',to:'ma_whname'
                         }],
                         dbtpls:[{
-                            field:'pd_whcode',width:100
+                            field:'wh_code',width:100
                         },{
-                            field:'pd_whname',width:100
+                            field:'wh_description',width:100
                         }],
                         dbSearchFields:[{
                             emptyText:'输入仓库编号或名称',
@@ -261,6 +261,8 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             from:'bo_mothername',to:'ma_proddetail'
                         },{
                             from:'pr_spec',to:'ma_prodspec'
+                        },{
+                            from:'pr_unit',to:'ma_produnit'
                         },{
                             from:'bo_version',to:'ma_version'
                         }],

+ 0 - 3
frontend/saas-web/app/view/stock/make/QueryPanelController.js

@@ -208,9 +208,6 @@ Ext.define('saas.view.stock.make.QueryPanelController', {
                         },{
                             field:'bo_mothername',width:100
                         }],
-                        aftertrigger:function(f,record){
-                            me.getBomData(record.data.id)
-                        },
                         defaultCondition:"bo_statuscode='OPEN'",
                         //窗口字段设置
                         dbSearchFields:[{

+ 1 - 0
frontend/saas-web/app/view/stock/report/Prodiodetail.js

@@ -26,6 +26,7 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
             ["销售退货单", "销售退货单"],
             ["完工入库单", "完工入库单"],
             ["生产领料单", "生产领料单"],
+            ["拆件领料单", "拆件领料单"],
             ["其它入库单", "其它入库单"],
             ["其它出库单", "其它出库单"],
             ["调拨单", "调拨单"],

+ 24 - 0
frontend/saas-web/app/view/sys/account/AccountInformation.js

@@ -0,0 +1,24 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.sys.account.AccountInformation', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'sys-account-accountinformation',
+    autoScroll: true,
+    layout:'fit',
+    defaultType:'accountinformation',
+    tbar: ['->',{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'账户信息'});
+        }
+    }
+})
+
+

+ 8 - 4
frontend/saas-web/app/view/sys/config/FormPanel.js

@@ -115,12 +115,16 @@ Ext.define('saas.view.sys.config.FormPanel', {
         columnWidth : 0.25
     },{  
         bind:'{en_signet}',
-        xtype : "textfield", 
         name : "en_signet", 
         fieldLabel : "打印章上传", 
-        allowBlank : true, 
-        editable:false,
-        columnWidth : 0.25
+        allowBlank : false, 
+        columnWidth : 0.33,
+        xtype: 'filefield',
+        emptyText: '请选择图片',
+        buttonText: '',
+        buttonConfig: {
+            iconCls: 'x-fa fa-picture-o'
+        }
     },{  
         ignore:true,
         bind:'{updateTime}',

+ 1 - 1
frontend/saas-web/app/view/sys/power/FormPanel.js

@@ -15,7 +15,7 @@ Ext.define('saas.view.sys.power.FormPanel', {
     frame:true,
     layout: 'border',
     autoScroll: true,
-    saveUrl:'/api/account/role/save/bind/resource',
+    saveUrl:'http://192.168.253.31:8560/api/account/role/save/bind/resource',
 
     items: [{
         title:'角色列表',

+ 246 - 36
frontend/saas-web/app/view/sys/power/GroupGrid.js

@@ -7,11 +7,6 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         'saas.view.sys.power.OtherField'
     ],
     xtype: 'power-grid',
-    plugins: {
-        cellediting: {
-            clicksToEdit: 1
-        }
-    },
     bind:{
         store: '{powergrid}'
     },
@@ -26,12 +21,12 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         collapseTip:null,
         collapsible:false,
         expandTip:null,
-		showSummaryRow: true,
+		showSummaryRow: false,
         startCollapsed: false,
         groupHeaderTpl: '{name}'+'模块'
 	})],
     initId:0,
-    dataUrl:'/api/account/role/power/resource',
+    dataUrl:'http://192.168.253.31:8560/api/account/role/power/resource',
     selModel:Ext.create('Ext.selection.CheckboxModel', {
         checkOnly: true,
         showHeaderCheckbox:false,
@@ -54,7 +49,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         header: '单据名称',
         dataIndex: 'groupName',
         xtype: '',
-        flex: 1.5,
+        flex: 2,
         stopSelection: false
     },{
         header: '查询',
@@ -63,7 +58,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('query');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('query',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '保存',
         dataIndex: 'add',
@@ -71,7 +90,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('add');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('add',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '修改',
         dataIndex: 'update',
@@ -79,7 +122,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('update');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('update',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '删除',
         dataIndex: 'delete',
@@ -87,7 +154,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('delete');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('delete',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '审核',
         dataIndex: 'audit',
@@ -95,7 +186,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('audit');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('audit',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '反审核',
         dataIndex: 'unAudit',
@@ -103,7 +218,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('unAudit');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('unAudit',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '导入',
         dataIndex: 'fileImport',
@@ -111,7 +250,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('fileImport');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('fileImport',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '导出',
         dataIndex: 'fileExport',
@@ -119,7 +282,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('fileExport');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('fileExport',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     }, {
         header: '打印',
         dataIndex: 'print',
@@ -127,7 +314,31 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         headerCheckbox: true,
         menuDisabled:true,
         flex: 1,
-        stopSelection: false
+        stopSelection: false,
+        onTitleElClick:function(a,b,c,d){
+            var me = this;
+            var records = me.ownerCt.ownerCt.store.data.items;
+            var first = 'null',isAllCheck = true;
+            Ext.Array.each(records,function(rec){
+                var data = rec.get('print');
+                if(data!=null&&(typeof data)=='boolean'){
+                    if(first=='null'){
+                        first = data;
+                    }else{
+                        if(first!=data){
+                            isAllCheck = false
+                        }
+                    }
+                    rec.set('print',!data)
+                }
+            });
+            if(isAllCheck){
+                me.setHeaderStatus(!first)
+            }
+        },
+        doUpdateHeaderState: function(e) {
+            return true;
+        }
     },{
         text: '其它',
         flex: 2.7,
@@ -149,15 +360,14 @@ Ext.define('saas.view.sys.power.GroupGrid', {
                 {name: 'groupId',type:'int'},
                 {name: 'groupName',type:'string'},
                 {name: 'moduleName',type:'string'},
-                {name: 'query',type:'bool'},
-                {name: 'add', type: 'bool'},
-                {name: 'delete', type: 'bool'},
-                {name: 'audit', type: 'bool'},
-                {name: 'update', type: 'bool'},
-                {name: 'unAudit', type: 'bool'},
-                {name: 'fileExport', type: 'bool'},
-                {name: 'fileImport', type: 'bool'},
-                {name: 'print', type: 'bool'},
+                {name: 'add'},
+                {name: 'delete'},
+                {name: 'audit'},
+                {name: 'update'},
+                {name: 'unAudit'},
+                {name: 'fileExport'},
+                {name: 'fileImport'},
+                {name: 'print'},
                 {name: 'other', calculate: function(data) {
                     var groupId = data['groupId'];
                     var other = data['other'];
@@ -200,7 +410,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
 
     listeners: {
         columnshow: 'onColumnToggle',
-        columnhide: 'onColumnToggle'
+        columnhide: 'onColumnToggle',
     },
     selectAllPower: function(record){
         var me = this;
@@ -213,15 +423,15 @@ Ext.define('saas.view.sys.power.GroupGrid', {
     },
     setAllOthers:function(record,bool){
         var data = {};
-        data.add = bool;
-        data.query = bool;
-        data.delete = bool;
-        data.audit = bool;
-        data.update = bool;
-        data.unAudit= bool;
-        data.fileExport= bool;
-        data.fileImport= bool;
-        data.print= bool;
+        data.add = record.get('add')==null?null:bool;
+        data.query = record.get('query')==null?null:bool;
+        data.delete = record.get('delete')==null?null:bool;
+        data.audit = record.get('audit')==null?null:bool;
+        data.update = record.get('update')==null?null:bool;
+        data.unAudit= record.get('unAudit')==null?null:bool;
+        data.fileExport= record.get('fileExport')==null?null:bool;
+        data.fileImport= record.get('fileImport')==null?null:bool;
+        data.print= record.get('print')==null?null:bool;
         var other=record.get('other');
         Ext.Array.each(other,function(o){
             o.checked=bool;

+ 41 - 0
frontend/saas-web/overrides/grid/column/CheckColumn.js

@@ -0,0 +1,41 @@
+Ext.define('saas.override.grid.column.CheckColumn', {
+    override: 'Ext.grid.column.Check',
+
+    defaultRenderer:function(value,cellValues,a,b,c,d,e,f){
+        var me = this,
+        cls = me.checkboxCls,
+        tip = '';
+        if (me.invert) {
+            value = !value;
+        }
+        if (me.disabled) {
+            cellValues.tdCls += ' ' + me.disabledCls;
+        }
+        if (value) {
+            cls += ' ' + me.checkboxCheckedCls;
+            tip = me.checkedTooltip;
+        } else {
+            tip = me.tooltip;
+        }
+        if (tip) {
+            cellValues.tdAttr += ' data-qtip="' + Ext.htmlEncode(tip) + '"';
+        }
+        if (me.useAriaElements) {
+            cellValues.tdAttr += ' aria-describedby="' + me.id + '-cell-description' + (!value ? '-not' : '') + '-selected"';
+        }
+        // This will update the header state on the next animation frame
+        // after all rows have been rendered.
+        me.updateHeaderState();
+        if(typeof value=='object'&&value==null){
+            cellValues.style = 'display: none;';
+            cellValues.tdCls += ' ' + me.disabledCls;
+            cellValues.innerCls = me.disabledCls;
+            cellValues.classes.push(me.disabledCls);
+            cellValues.cellRole = me.disabledCls;
+            return '<span style="display: none;" class="'+ me.disabledCls +'"></span>'
+        }
+
+        return '<span class="' + cls + '" role="' + me.checkboxAriaRole + '"' + (!me.ariaStaticRoles[me.checkboxAriaRole] ? ' tabIndex="0"' : '') + '></span>';
+    }
+
+});