Browse Source

Merge remote-tracking branch 'origin/dev' into dev

rainco 7 years ago
parent
commit
f228dc3a42
55 changed files with 1406 additions and 185 deletions
  1. 12 0
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/CommonService.java
  2. 14 3
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonController.java
  3. 1 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/CommonMapper.java
  4. 1 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/CommonService.java
  5. 40 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/CommonServiceImpl.java
  6. 5 0
      applications/commons/commons-server/src/main/resources/mapper/CommonMapper.xml
  7. 2 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerDTO.java
  8. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/SubledgerMapper.java
  9. 12 9
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  10. 88 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  11. 1 0
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  12. 14 0
      applications/document/document-server/src/main/resources/mapper/SubledgerMapper.xml
  13. 83 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  14. 21 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  15. 21 5
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  16. 22 5
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  17. 0 3
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  18. 0 3
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  19. 5 9
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  20. 2 7
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleReportServiceImpl.java
  21. 9 9
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  22. 9 0
      frontend/saas-web/app/view/core/base/GridPanel.js
  23. 1 1
      frontend/saas-web/app/view/core/chart/ChartBase.js
  24. 39 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  25. 25 0
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  26. 10 0
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  27. 1 1
      frontend/saas-web/app/view/home/HomeModel.js
  28. 20 8
      frontend/saas-web/app/view/home/charts/MonthIO.js
  29. 28 11
      frontend/saas-web/app/view/home/charts/MonthPurchase.js
  30. 9 1
      frontend/saas-web/app/view/home/charts/MonthSale.js
  31. 24 3
      frontend/saas-web/app/view/home/charts/PurchaseTrend.js
  32. 22 1
      frontend/saas-web/app/view/home/charts/SaleTrend.js
  33. 24 3
      frontend/saas-web/app/view/home/charts/StockAmount.js
  34. 7 2
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  35. 96 16
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  36. 77 4
      frontend/saas-web/app/view/money/payBalance/QueryPanelController.js
  37. 6 2
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  38. 68 7
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  39. 91 2
      frontend/saas-web/app/view/money/recBalance/QueryPanelController.js
  40. 1 1
      frontend/saas-web/app/view/sale/report/SaleProfit.js
  41. 1 1
      frontend/saas-web/app/view/sale/report/SaleProfitController.js
  42. 2 2
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  43. 0 24
      frontend/saas-web/app/view/sys/account/AccountInformation.js
  44. 361 0
      frontend/saas-web/app/view/sys/account/DataList.js
  45. 10 0
      frontend/saas-web/app/view/sys/account/DataListController.js
  46. 4 0
      frontend/saas-web/app/view/sys/account/DataListlModel.js
  47. 12 12
      frontend/saas-web/app/view/sys/config/FormPanel.js
  48. 12 0
      frontend/saas-web/app/view/sys/finish/DataList.js
  49. 10 6
      frontend/saas-web/app/view/sys/manager/FormPanel.js
  50. 43 0
      frontend/saas-web/app/view/sys/manager/FormPanel.scss
  51. 9 0
      frontend/saas-web/app/view/sys/maxnumbers/DataList.js
  52. 12 0
      frontend/saas-web/app/view/sys/messagelog/DataList.js
  53. 0 2
      frontend/saas-web/app/view/sys/power/FormPanel.js
  54. 13 19
      frontend/saas-web/app/view/sys/power/GroupGrid.js
  55. 0 1
      frontend/saas-web/app/view/sys/power/TreePanel.js

+ 12 - 0
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/CommonService.java

@@ -0,0 +1,12 @@
+package com.usoftchina.saas.commons.api;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+@FeignClient("commons-server")
+public interface CommonService {
+
+    @PostMapping("/action/audit")
+    public String commonAudit(@RequestParam String table, @RequestParam String keyvalue, @RequestParam String status,
+                                      @RequestParam String statuscode, @RequestParam String auditdate, @RequestParam String auditman);
+}

+ 14 - 3
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonController.java

@@ -3,9 +3,10 @@ package com.usoftchina.saas.commons.controller;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.service.CommonService;
 import com.usoftchina.saas.commons.service.CommonService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.async.DeferredResult;
+
+import java.util.concurrent.CompletableFuture;
 
 
 @RestController
 @RestController
 public class CommonController {
 public class CommonController {
@@ -23,4 +24,14 @@ public class CommonController {
         return Result.success(commonService.initCheck());
         return Result.success(commonService.initCheck());
     }
     }
 
 
+    @PostMapping("/action/audit")
+    public DeferredResult commonAudit(@RequestParam String table, @RequestParam String keyvalue, @RequestParam String status,
+                              @RequestParam String statuscode, @RequestParam String auditdate, @RequestParam String auditman) {
+
+        DeferredResult<String> deferredResult = new DeferredResult<>();
+        CompletableFuture.supplyAsync(() -> commonService.commonAudit(table, keyvalue, status, statuscode, auditdate, auditman))
+                .whenCompleteAsync((result, throwable) -> deferredResult.setResult(result));
+        return deferredResult;
+    }
+
 }
 }

+ 1 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/CommonMapper.java

@@ -14,4 +14,5 @@ public interface CommonMapper {
 
 
     int getCountVendor(@Param("companyId") Long companyId);
     int getCountVendor(@Param("companyId") Long companyId);
 
 
+    void commonAudit(String sql);
 }
 }

+ 1 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/CommonService.java

@@ -10,4 +10,5 @@ public interface CommonService {
      */
      */
     InitStatusDTO initCheck();
     InitStatusDTO initCheck();
 
 
+    String commonAudit(String table, String keyvalue, String status, String statuscode, String auditdate, String auditman);
 }
 }

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

@@ -2,11 +2,16 @@ package com.usoftchina.saas.commons.service.impl;
 
 
 import com.usoftchina.saas.commons.dto.InitStatusDTO;
 import com.usoftchina.saas.commons.dto.InitStatusDTO;
 import com.usoftchina.saas.commons.mapper.CommonMapper;
 import com.usoftchina.saas.commons.mapper.CommonMapper;
+import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.commons.service.CommonService;
 import com.usoftchina.saas.commons.service.CommonService;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.utils.DateUtils;
+import com.usoftchina.saas.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import java.util.Date;
+
 @Service
 @Service
 public class CommonServiceImpl implements CommonService {
 public class CommonServiceImpl implements CommonService {
 
 
@@ -43,4 +48,39 @@ public class CommonServiceImpl implements CommonService {
         }
         }
         return result;
         return result;
     }
     }
+
+    @Override
+    public String commonAudit(String table, String keyvalue, String status, String statuscode, String auditdate, String auditman) {
+        Long companyId = BaseContextHolder.getCompanyId();
+        if (StringUtils.isEmpty(table) || StringUtils.isEmpty(keyvalue)) {
+            return null;
+        }
+        String sql = praseSql(table, keyvalue, status, statuscode, auditdate, auditman, companyId);
+        if (null != sql) {
+            commonMapper.commonAudit(sql);
+        }
+        return "success";
+    }
+
+    private String praseSql(String table, String keyvalue, String status, String statuscode, String auditdate, String auditman, Long companyId) {
+        String sql = "update " + table + " set ";
+        StringBuilder sb = new StringBuilder();
+        if (!StringUtils.isEmpty(status)) {
+            sb.append(" " + status + " = '" + Status.AUDITED.getDisplay() + "',");
+        }
+        if (!StringUtils.isEmpty(statuscode)) {
+            sb.append(" " + statuscode + "='" + Status.AUDITED.name() + "',");
+        }
+        if (!StringUtils.isEmpty(auditdate)) {
+            sb.append(" " + auditdate + "='" + DateUtils.format(new Date(), "yyyy-MM-dd") + "',");
+        }
+        if (!StringUtils.isEmpty(auditman)) {
+            sb.append(" " + auditman + "='" + BaseContextHolder.getUserName() + "',");
+        }
+        if (sb.length() > 0) {
+            sql =  sql + sb.substring(0, sb.length() - 1) + " where " + keyvalue + " and companyId=" + companyId;
+            return sql;
+        }
+        return null;
+    }
 }
 }

+ 5 - 0
applications/commons/commons-server/src/main/resources/mapper/CommonMapper.xml

@@ -13,7 +13,12 @@
     <select id="getCountCustomer" resultType="int">
     <select id="getCountCustomer" resultType="int">
         SELECT COUNT(*) FROM CUSTOMER WHERE COMPANYID=#{companyId} AND CU_STATUSCODE = 'OPEN'
         SELECT COUNT(*) FROM CUSTOMER WHERE COMPANYID=#{companyId} AND CU_STATUSCODE = 'OPEN'
     </select>
     </select>
+
     <select id="getCountVendor" resultType="int">
     <select id="getCountVendor" resultType="int">
         SELECT COUNT(*) FROM VENDOR WHERE COMPANYID=#{companyId} AND VE_STATUSCODE = 'OPEN'
         SELECT COUNT(*) FROM VENDOR WHERE COMPANYID=#{companyId} AND VE_STATUSCODE = 'OPEN'
     </select>
     </select>
+
+    <update id="commonAudit" parameterType="string">
+      ${value}
+    </update>
 </mapper>
 </mapper>

+ 2 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerDTO.java

@@ -61,4 +61,6 @@ public class CustomerDTO extends CommonBaseDTO implements Serializable {
     private Double cu_leftamount;
     private Double cu_leftamount;
 
 
     private Double cu_recamount;
     private Double cu_recamount;
+
+    private Double cu_preamount;
 }
 }

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/SubledgerMapper.java

@@ -28,6 +28,12 @@ public interface SubledgerMapper {
     Subledger selectByKindCodeCustid(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
     Subledger selectByKindCodeCustid(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
                                      @Param("sl_custid") Integer sl_custid);
                                      @Param("sl_custid") Integer sl_custid);
 
 
+    Subledger selectByKindCodeVendid(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
+                                     @Param("sl_vendid") Integer sl_vendid);
+
     void deleteCustomer(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
     void deleteCustomer(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
                         @Param("sl_custid") Integer sl_custid);
                         @Param("sl_custid") Integer sl_custid);
+
+    void deleteVendor(@Param("sl_code") String sl_code, @Param("sl_kind") String sl_kind,
+                        @Param("sl_vendid") Integer sl_vendid);
 }
 }

+ 12 - 9
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java

@@ -127,7 +127,9 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         //应付款余额
         //应付款余额
         Double beginapamount = main.getCu_beginaramount()==null?new Double(0):main.getCu_beginaramount();
         Double beginapamount = main.getCu_beginaramount()==null?new Double(0):main.getCu_beginaramount();
         Double beginprepayamount = main.getCu_beginprerecamount()==null?new Double(0):main.getCu_beginprerecamount();
         Double beginprepayamount = main.getCu_beginprerecamount()==null?new Double(0):main.getCu_beginprerecamount();
-        customer.setCu_leftamount(beginapamount-beginprepayamount);
+        Double recamount = main.getCu_recamount()==null? new Double(0):main.getCu_recamount();
+        Double preamount = main.getCu_preamount()==null? new Double(0):main.getCu_preamount();
+        customer.setCu_leftamount(beginapamount-beginprepayamount+recamount-preamount);
 
 
         //编号校验
         //编号校验
         cu_code = pushMaxnubmer(cu_code, cu_id);
         cu_code = pushMaxnubmer(cu_code, cu_id);
@@ -189,14 +191,6 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             customer.setCu_beginprerecamount(cutpl.getCu_beginprerecamount());
             customer.setCu_beginprerecamount(cutpl.getCu_beginprerecamount());
         }
         }
 
 
-        //更新应收余额
-        Customer customer1 = getMapper().selectByPrimaryKey(cu_id);
-        Double cu_leftamount = (customer1.getCu_beginaramount() == null ? new Double(0) :  customer1.getCu_beginaramount())-
-                (customer1.getCu_beginprerecamount() == null ? new Double(0) : customer1.getCu_beginprerecamount()) +
-                (customer1.getCu_recamount() == null ? new Double(0) : customer1.getCu_recamount()) -
-                (customer1.getCu_preamount() == null ? new Double(0) : customer1.getCu_preamount());
-        customer.setCu_leftamount(cu_leftamount);
-
         //更新操作
         //更新操作
         getMapper().updateByPrimaryKeySelective(customer);
         getMapper().updateByPrimaryKeySelective(customer);
         //添加从表传输对象
         //添加从表传输对象
@@ -243,6 +237,15 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             customeraddressMapper.batchUpdate(updateDetail2);
             customeraddressMapper.batchUpdate(updateDetail2);
         }
         }
 
 
+        //更新应收余额
+        Customer customer1 = getMapper().selectByPrimaryKey(cu_id);
+        Double cu_leftamount = (customer1.getCu_beginaramount() == null ? new Double(0) :  customer1.getCu_beginaramount())-
+                (customer1.getCu_beginprerecamount() == null ? new Double(0) : customer1.getCu_beginprerecamount()) +
+                (customer1.getCu_recamount() == null ? new Double(0) : customer1.getCu_recamount()) -
+                (customer1.getCu_preamount() == null ? new Double(0) : customer1.getCu_preamount());
+        customer.setCu_leftamount(cu_leftamount);
+        getMapper().updateByPrimaryKeySelective(customer);
+
         //插入中间表
         //插入中间表
         Double amount = (customer.getCu_beginaramount() == null ? new Double(0) : customer.getCu_beginaramount())
         Double amount = (customer.getCu_beginaramount() == null ? new Double(0) : customer.getCu_beginaramount())
                 - (customer.getCu_beginprerecamount() == null ? new Double(0) : customer.getCu_beginprerecamount());
                 - (customer.getCu_beginprerecamount() == null ? new Double(0) : customer.getCu_beginprerecamount());

+ 88 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java

@@ -14,9 +14,11 @@ import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.dto.VendorDTO;
 import com.usoftchina.saas.document.dto.VendorListDTO;
 import com.usoftchina.saas.document.dto.VendorListDTO;
+import com.usoftchina.saas.document.entities.Subledger;
 import com.usoftchina.saas.document.entities.Vendor;
 import com.usoftchina.saas.document.entities.Vendor;
 import com.usoftchina.saas.document.entities.VendorList;
 import com.usoftchina.saas.document.entities.VendorList;
 import com.usoftchina.saas.document.entities.Vendorcontact;
 import com.usoftchina.saas.document.entities.Vendorcontact;
+import com.usoftchina.saas.document.mapper.SubledgerMapper;
 import com.usoftchina.saas.document.mapper.VendorMapper;
 import com.usoftchina.saas.document.mapper.VendorMapper;
 import com.usoftchina.saas.document.mapper.VendorcontactMapper;
 import com.usoftchina.saas.document.mapper.VendorcontactMapper;
 import com.usoftchina.saas.document.service.VendorService;
 import com.usoftchina.saas.document.service.VendorService;
@@ -26,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
@@ -43,6 +46,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
     private MessageLogService messageLogService;
     private MessageLogService messageLogService;
     @Autowired
     @Autowired
     private MaxnumberService maxnumberService;
     private MaxnumberService maxnumberService;
+    @Autowired
+    private SubledgerMapper subledgerMapper;
 
 
     @Override
     @Override
     public PageInfo<VendorDTO> getVendorsByCondition(PageRequest page, ListReqDTO listReqDTO) {
     public PageInfo<VendorDTO> getVendorsByCondition(PageRequest page, ListReqDTO listReqDTO) {
@@ -124,7 +129,9 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             //更新应付款余额
             //更新应付款余额
             Double beginapamount = main.getVe_beginapamount()==null ? new Double(0):main.getVe_beginapamount();
             Double beginapamount = main.getVe_beginapamount()==null ? new Double(0):main.getVe_beginapamount();
             Double beginprepayamount = main.getVe_beginprepayamount()==null ? new Double(0):main.getVe_beginprepayamount();
             Double beginprepayamount = main.getVe_beginprepayamount()==null ? new Double(0):main.getVe_beginprepayamount();
-            main.setVe_leftamount(beginapamount-beginprepayamount);
+            Double payamount = main.getVe_payamount()==null? new Double(0):main.getVe_payamount();
+            Double preamount = main.getVe_preamount()==null? new Double(0):main.getVe_preamount();
+            main.setVe_leftamount(beginapamount-beginprepayamount+payamount-preamount);
             getMapper().insertSelective(main);
             getMapper().insertSelective(main);
             Long mainId = main.getId();
             Long mainId = main.getId();
             //更新明细表vc_veid
             //更新明细表vc_veid
@@ -195,6 +202,51 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             //记录LOG
             //记录LOG
             messageLogService.update(generateMsgObj(main.getId(), code));
             messageLogService.update(generateMsgObj(main.getId(), code));
         }
         }
+
+        //更新应收款余额
+        Double ve_leftamount = (main.getVe_beginapamount() == null ? new Double(0) : main.getVe_beginapamount())
+                - (main.getVe_beginprepayamount() == null ? new Double(0) : main.getVe_beginprepayamount())
+                + (main.getVe_payamount() == null ? new Double(0) : main.getVe_payamount())
+                - (main.getVe_preamount() == null ? new Double(0) : main.getVe_preamount());
+        main.setVe_leftamount(ve_leftamount);
+        getMapper().updateByPrimaryKeySelective(main);
+
+        //插入中间表
+        Double amount = (main.getVe_beginapamount() == null ? new Double(0) : main.getVe_beginapamount())
+                - (main.getVe_beginprepayamount() == null ? new Double(0) : main.getVe_beginprepayamount());
+        if (amount != new Double(0)){
+            Subledger subledger = new Subledger();
+            subledger.setSl_code("期初余额");
+            subledger.setSl_kind("期初余额");
+            subledger.setSl_vendid(Math.toIntExact(main.getId()));
+            subledger.setSl_custid(0);
+            subledger.setCompanyId(BaseContextHolder.getCompanyId());
+            String dates = date2String(main.getVe_begindate(), "yyyy-mm");
+            dates = dates + "-01";
+            Date date = null;
+            try {
+                date = string2Date(dates, "yyyy-mm-dd");
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            subledger.setSl_date(date);
+            if (amount > new Double(0)){
+                subledger.setSl_amount(amount);
+            }else {
+                subledger.setSl_preamount(amount);
+            }
+            subledger.setSl_orderamount(Math.abs(amount));
+            subledger.setSl_namount(amount);
+
+            Subledger subledger1 = subledgerMapper.selectByKindCodeVendid("期初余额","期初余额",
+                    Math.toIntExact(main.getId()));
+            if (subledger1 == null) {
+                subledgerMapper.insertSelective(subledger);
+            }else {
+                subledgerMapper.updateByPrimaryKeySelective(subledger);
+            }
+        }
+
         return generateMsgObj(main.getId(), code);
         return generateMsgObj(main.getId(), code);
     }
     }
 
 
@@ -208,6 +260,9 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             getMapper().deleteByPrimaryKey(id);
             getMapper().deleteByPrimaryKey(id);
             vendorcontactMapper.deleteByFK(id);
             vendorcontactMapper.deleteByFK(id);
             String code = getMapper().getCodeById(id, BaseContextHolder.getCompanyId());
             String code = getMapper().getCodeById(id, BaseContextHolder.getCompanyId());
+
+            //删除中间表
+            subledgerMapper.deleteVendor("期初余额", "期初余额", Math.toIntExact(id));
             //记录LOG
             //记录LOG
             messageLogService.delete(generateMsgObj(id, code));
             messageLogService.delete(generateMsgObj(id, code));
         }
         }
@@ -353,4 +408,36 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
                 getMapper().validateCodeWhenUpdate(code, id, companyId);
                 getMapper().validateCodeWhenUpdate(code, id, companyId);
         return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.VENDOR.getCaller()).getData();
         return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.VENDOR.getCaller()).getData();
     }
     }
+
+    /**
+     * String转Date类型
+     *
+     * @param dateStr
+     *            时间字符串
+     * @return Date类型时间
+     * @throws Exception
+     *             异常
+     */
+    public static Date string2Date(String dateStr, String format) throws Exception {
+        SimpleDateFormat sdf = new SimpleDateFormat(format);
+        if (dateStr == null) {
+            return sdf.parse(dateStr);
+        }
+        return null;
+    }
+
+    /**
+     * Date转String
+     *
+     * @param date
+     *            Date类型时间
+     * @return 时间字符串
+     */
+    public static String date2String(Date date, String format) {
+        SimpleDateFormat sdf = new SimpleDateFormat(format);
+        if (date != null) {
+            return sdf.format(date);
+        }
+        return null;
+    }
 }
 }

+ 1 - 0
applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml

@@ -31,6 +31,7 @@
     <result column="cu_text5" jdbcType="VARCHAR" property="cu_text5" />
     <result column="cu_text5" jdbcType="VARCHAR" property="cu_text5" />
     <result column="cu_leftamount" jdbcType="DOUBLE" property="cu_leftamount" />
     <result column="cu_leftamount" jdbcType="DOUBLE" property="cu_leftamount" />
     <result column="cu_recamount" jdbcType="DOUBLE" property="cu_recamount" />
     <result column="cu_recamount" jdbcType="DOUBLE" property="cu_recamount" />
+    <result column="cu_preamount" jdbcType="DOUBLE" property="cu_preamount" />
   </resultMap>
   </resultMap>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
     cu_id, cu_code, cu_name, cu_uu, cu_type, cu_begindate, cu_beginaramount, cu_beginprerecamount, 
     cu_id, cu_code, cu_name, cu_uu, cu_type, cu_begindate, cu_beginaramount, cu_beginprerecamount, 

+ 14 - 0
applications/document/document-server/src/main/resources/mapper/SubledgerMapper.xml

@@ -255,9 +255,23 @@
     sl_custid = #{sl_custid,jdbcType=INTEGER}
     sl_custid = #{sl_custid,jdbcType=INTEGER}
   </select>
   </select>
 
 
+  <select id="selectByKindCodeVendid" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from subledger
+    where sl_code = #{sl_code,jdbcType=VARCHAR} and sl_kind = #{sl_kind,jdbcType=VARCHAR} and
+    sl_vendid = #{sl_vendid,jdbcType=INTEGER}
+  </select>
+
   <delete id="deleteCustomer">
   <delete id="deleteCustomer">
     delete from subledger
     delete from subledger
     where sl_code = #{sl_code,jdbcType=VARCHAR} and sl_kind = #{sl_kind, jdbcType=VARCHAR} and
     where sl_code = #{sl_code,jdbcType=VARCHAR} and sl_kind = #{sl_kind, jdbcType=VARCHAR} and
     sl_custid = #{sl_custid,jdbcType=INTEGER}
     sl_custid = #{sl_custid,jdbcType=INTEGER}
   </delete>
   </delete>
+
+  <delete id="deleteVendor">
+    delete from subledger
+    where sl_code = #{sl_code,jdbcType=VARCHAR} and sl_kind = #{sl_kind, jdbcType=VARCHAR} and
+    sl_vendid = #{sl_vendid,jdbcType=INTEGER}
+  </delete>
 </mapper>
 </mapper>

+ 83 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java

@@ -63,6 +63,25 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
 
 
     private Double ve_leftamount;
     private Double ve_leftamount;
 
 
+    private String pd_bankname;
+
+    private String pd_paymethod;
+
+    private String pd_paycode;
+
+    private String pd_remark;
+
+    private String pbd_slcode;
+
+    private String pbd_slkind;
+
+    private Date pbd_sldate;
+
+    private Double pbd_amount;
+
+    private Double pbd_nowbalance;
+
+
     public Date getUpdatedate() {
     public Date getUpdatedate() {
         return updatedate;
         return updatedate;
     }
     }
@@ -262,4 +281,68 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
     public void setVe_leftamount(Double ve_leftamount) {
     public void setVe_leftamount(Double ve_leftamount) {
         this.ve_leftamount = ve_leftamount;
         this.ve_leftamount = ve_leftamount;
     }
     }
+
+    public String getPd_bankname() {
+        return pd_bankname;
+    }
+
+    public void setPd_bankname(String pd_bankname) {
+        this.pd_bankname = pd_bankname;
+    }
+
+    public String getPbd_slcode() {
+        return pbd_slcode;
+    }
+
+    public void setPbd_slcode(String pbd_slcode) {
+        this.pbd_slcode = pbd_slcode;
+    }
+
+    public String getPbd_slkind() {
+        return pbd_slkind;
+    }
+
+    public void setPbd_slkind(String pbd_slkind) {
+        this.pbd_slkind = pbd_slkind;
+    }
+
+    public Date getPbd_sldate() {
+        return pbd_sldate;
+    }
+
+    public void setPbd_sldate(Date pbd_sldate) {
+        this.pbd_sldate = pbd_sldate;
+    }
+
+    public Double getPbd_amount() {
+        return pbd_amount;
+    }
+
+    public void setPbd_amount(Double pbd_amount) {
+        this.pbd_amount = pbd_amount;
+    }
+
+    public Double getPbd_nowbalance() {
+        return pbd_nowbalance;
+    }
+
+    public void setPbd_nowbalance(Double pbd_nowbalance) {
+        this.pbd_nowbalance = pbd_nowbalance;
+    }
+
+    public String getPd_paymethod() {
+        return pd_paymethod;
+    }
+
+    public void setPd_paymethod(String pd_paymethod) {
+        this.pd_paymethod = pd_paymethod;
+    }
+
+    public String getPd_remark() {
+        return pd_remark;
+    }
+
+    public void setPd_remark(String pd_remark) {
+        this.pd_remark = pd_remark;
+    }
 }
 }

+ 21 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java

@@ -63,6 +63,27 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
 
 
     private Double cu_leftamount;
     private Double cu_leftamount;
 
 
+    private String rd_bankname;
+
+    private String rd_paymethod;
+
+    private String rd_paycode;
+
+    private String rd_remark;
+
+    private String rbd_slcode;
+
+    private String rbd_slkind;
+
+    private Date rbd_sldate;
+
+    private Double rbd_amount;
+
+    private Double rbd_nowbalance;
+
+
+
+
     public Date getUpdatedate() {
     public Date getUpdatedate() {
         return updatedate;
         return updatedate;
     }
     }

+ 21 - 5
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -30,6 +30,15 @@
     <result column="pb_text4" jdbcType="VARCHAR" property="pb_text4" />
     <result column="pb_text4" jdbcType="VARCHAR" property="pb_text4" />
     <result column="pb_text5" jdbcType="VARCHAR" property="pb_text5" />
     <result column="pb_text5" jdbcType="VARCHAR" property="pb_text5" />
     <result column="ve_leftamount" jdbcType="DOUBLE" property="ve_leftamount" />
     <result column="ve_leftamount" jdbcType="DOUBLE" property="ve_leftamount" />
+    <result column="pd_bankname" jdbcType="VARCHAR" property="pd_bankname" />
+    <result column="pd_paymethod" jdbcType="VARCHAR" property="pd_paymethod" />
+    <result column="pd_paycode" jdbcType="VARCHAR" property="pd_paycode" />
+    <result column="pd_remark" jdbcType="VARCHAR" property="pd_remark" />
+    <result column="pbd_slcode" jdbcType="VARCHAR" property="pbd_slcode" />
+    <result column="pbd_slkind" jdbcType="VARCHAR" property="pbd_slkind" />
+    <result column="pbd_sldate" jdbcType="TIMESTAMP" property="pbd_sldate" />
+    <result column="pbd_amount" jdbcType="DOUBLE" property="pbd_amount" />
+    <result column="pbd_nowbalance" jdbcType="DOUBLE" property="pbd_nowbalance" />
   </resultMap>
   </resultMap>
   <sql id="Example_Where_Clause">
   <sql id="Example_Where_Clause">
     <where>
     <where>
@@ -98,6 +107,10 @@
   <sql id="left_Column_List">
   <sql id="left_Column_List">
     ve_leftamount
     ve_leftamount
   </sql>
   </sql>
+  <sql id="detail_Column_List">
+    pd_bankname,pd_amount,pd_paymethod,pd_remark,pbd_slcode,pbd_slkind,
+    pbd_sldate,pbd_amount,pbd_nowbalance
+  </sql>
   <select id="selectList" resultMap="BaseResultMap">
   <select id="selectList" resultMap="BaseResultMap">
     select
     select
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
@@ -419,8 +432,10 @@
 
 
   <select id="selectPaybalanceBycondition" resultMap="BaseResultMap">
   <select id="selectPaybalanceBycondition" resultMap="BaseResultMap">
     select
     select
-    <include refid="Base_Column_List" />
-    from Paybalance
+    <include refid="Base_Column_List" />,
+    <include refid="detail_Column_List" />
+    from paybalance left join paybalancedet on pd_pbid=pb_id and paybalance.companyId=paybalancedet.companyId
+    left join paybalancedetail on pbd_pbid=pb_id and paybalancedetail.companyId=paybalance.companyId
     <where>
     <where>
       <if test="con != null">
       <if test="con != null">
         ${con}
         ${con}
@@ -433,9 +448,10 @@
 
 
   <select id="selectPaybalanceListByCondition" resultMap="BaseResultMap">
   <select id="selectPaybalanceListByCondition" resultMap="BaseResultMap">
   select
   select
-  <include refid="Base_Column_List" />
-  from paybalance
-    left join paybalancedet on pb_id=pd_pbid left join paybalancedetail on pb_id=pbd_rbid
+    <include refid="Base_Column_List" />,
+    <include refid="detail_Column_List" />
+    from paybalance left join paybalancedet on pd_pbid=pb_id and paybalance.companyId=paybalancedet.companyId
+    left join paybalancedetail on pbd_pbid=pb_id and paybalancedetail.companyId=paybalance.companyId
     <where>
     <where>
       <if test="con != null">
       <if test="con != null">
         ${con}
         ${con}

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

@@ -30,6 +30,15 @@
     <result column="rb_text4" jdbcType="VARCHAR" property="rb_text4" />
     <result column="rb_text4" jdbcType="VARCHAR" property="rb_text4" />
     <result column="rb_text5" jdbcType="VARCHAR" property="rb_text5" />
     <result column="rb_text5" jdbcType="VARCHAR" property="rb_text5" />
     <result column="cu_leftamount" jdbcType="DOUBLE" property="cu_leftamount" />
     <result column="cu_leftamount" jdbcType="DOUBLE" property="cu_leftamount" />
+    <result column="rd_bankname" jdbcType="VARCHAR" property="rd_bankname" />
+    <result column="rd_paymethod" jdbcType="VARCHAR" property="rd_paymethod" />
+    <result column="rd_paycode" jdbcType="VARCHAR" property="rd_paycode" />
+    <result column="rd_remark" jdbcType="VARCHAR" property="rd_remark" />
+    <result column="rbd_slcode" jdbcType="VARCHAR" property="rbd_slcode" />
+    <result column="rbd_slkind" jdbcType="VARCHAR" property="rbd_slkind" />
+    <result column="rbd_sldate" jdbcType="TIMESTAMP" property="rbd_sldate" />
+    <result column="rbd_amount" jdbcType="DOUBLE" property="rbd_amount" />
+    <result column="rbd_nowbalance" jdbcType="DOUBLE" property="rbd_nowbalance" />
   </resultMap>
   </resultMap>
   <sql id="Example_Where_Clause">
   <sql id="Example_Where_Clause">
     <where>
     <where>
@@ -98,6 +107,11 @@
   <sql id="left_Column_List">
   <sql id="left_Column_List">
     cu_leftamount
     cu_leftamount
   </sql>
   </sql>
+  <sql id="detail_Column_List">
+      rd_bankname,rd_amount,rd_paymethod,rd_paycode,rd_remark,rbd_slcode,rbd_slkind,
+    rbd_sldate,rbd_amount,rbd_nowbalance
+  </sql>
+
   <select id="selectByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample" resultMap="BaseResultMap">
     select
     select
     <if test="distinct">
     <if test="distinct">
@@ -122,8 +136,10 @@
 
 
   <select id="selectRecbalanceBycondition" resultMap="BaseResultMap">
   <select id="selectRecbalanceBycondition" resultMap="BaseResultMap">
     select
     select
-    <include refid="Base_Column_List" />
-    from recbalance
+    <include refid="Base_Column_List" />,
+    <include refid="detail_Column_List" />
+    from recbalance left join recbalancedet on rd_rbid=rb_id and recbalance.companyId=recbalancedet.companyId
+    left join recbalancedetail on rbd_rbid=rb_id and recbalancedetail.companyId=recbalance.companyId
     <where>
     <where>
       <if test="con != null">
       <if test="con != null">
         ${con}
         ${con}
@@ -136,9 +152,10 @@
 
 
   <select id="selectRecbalanceListByCondition" resultMap="BaseResultMap">
   <select id="selectRecbalanceListByCondition" resultMap="BaseResultMap">
     select
     select
-    <include refid="Base_Column_List" />
-    from recbalance
-    left join recbalancedet on rb_id=rd_rbid left join recbalancedetail on rb_id=rbd_rbid
+    <include refid="Base_Column_List" />,
+    <include refid="detail_Column_List" />
+    from recbalance left join recbalancedet on rd_rbid=rb_id and recbalance.comranyId=recbalancedet.comranyId
+    left join recbalancedetail on rbd_rbid=rb_id and recbalancedetail.comranyId=recbalance.comranyId
     <where>
     <where>
       <if test="con != null">
       <if test="con != null">
         ${con}
         ${con}

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

@@ -236,9 +236,6 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Recbalancedet">
     update recbalancedet
     update recbalancedet
     <set>
     <set>
-      <if test="id != null">
-        rd_rbid = #{id,jdbcType=INTEGER},
-      </if>
       <if test="rd_detno != null">
       <if test="rd_detno != null">
         rd_detno = #{rd_detno,jdbcType=INTEGER},
         rd_detno = #{rd_detno,jdbcType=INTEGER},
       </if>
       </if>

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

@@ -183,9 +183,6 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Recbalancedetail" >
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Recbalancedetail" >
     update recbalancedetail
     update recbalancedetail
     <set >
     <set >
-      <if test="id != null" >
-        rbd_rbid = #{id,jdbcType=INTEGER},
-      </if>
       <if test="rbd_detno != null" >
       <if test="rbd_detno != null" >
         rbd_detno = #{rbd_detno,jdbcType=INTEGER},
         rbd_detno = #{rbd_detno,jdbcType=INTEGER},
       </if>
       </if>

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

@@ -17,6 +17,7 @@ import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.api.WarehouseApi;
 import com.usoftchina.saas.document.api.WarehouseApi;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.exception.ExceptionCode;
+import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.sale.dto.ProdIODetailDTO;
 import com.usoftchina.saas.sale.dto.ProdIODetailDTO;
 import com.usoftchina.saas.sale.dto.ProdInOutDTO;
 import com.usoftchina.saas.sale.dto.ProdInOutDTO;
@@ -230,7 +231,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
     }
 
 
     @Override
     @Override
-    @Transactional
     public DocBaseDTO audit(ProdInOutFormDTO formData) {
     public DocBaseDTO audit(ProdInOutFormDTO formData) {
         Long id = null;
         Long id = null;
         DocBaseDTO baseDTO = new DocBaseDTO();
         DocBaseDTO baseDTO = new DocBaseDTO();
@@ -246,7 +246,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         baseDTO.setCode(formData.getMain().getPi_inoutno());
         baseDTO.setCode(formData.getMain().getPi_inoutno());
         return baseDTO;
         return baseDTO;
     }
     }
-    private void singleAudit(ProdInOutDTO prodInOutDTO) {
+
+    @Transactional
+    public void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         String pi_class= prodInOutDTO.getPi_class();
         String pi_inoutno = prodInOutDTO.getPi_inoutno();
         String pi_inoutno = prodInOutDTO.getPi_inoutno();
         String pi_statuscode = prodInOutDTO.getPi_statuscode();
         String pi_statuscode = prodInOutDTO.getPi_statuscode();
@@ -344,13 +346,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
     }
 
 
     @Override
     @Override
-    public PageInfo<ProdInOutList> getListData(PageRequest page, ListReqDTO req) {
-        //设置默认分页
-        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
-            page = new PageRequest();
-            page.setNumber(1);
-            page.setSize(10);
-        }
+    public PageInfo<ProdInOutList> getListData(@PageDefault(size = 10) PageRequest page, ListReqDTO req) {
         PageHelper.startPage(page.getNumber(), page.getSize());
         PageHelper.startPage(page.getNumber(), page.getSize());
         //查询数据
         //查询数据
         List<ProdInOutList> lists = getListByMode(req);
         List<ProdInOutList> lists = getListByMode(req);

+ 2 - 7
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleReportServiceImpl.java

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.sale.mapper.SaleProfitViewMapper;
 import com.usoftchina.saas.sale.mapper.SaleProfitViewMapper;
 import com.usoftchina.saas.sale.mapper.SalerecViewMapper;
 import com.usoftchina.saas.sale.mapper.SalerecViewMapper;
@@ -35,13 +36,7 @@ public class SaleReportServiceImpl implements SaleReportService{
         return getListDATA(page, req, "SaleRec");
         return getListDATA(page, req, "SaleRec");
     }
     }
 
 
-    private PageInfo getListDATA(PageRequest page, ListReqDTO req, String type) {
-        //设置默认分页
-        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
-            page = new PageRequest();
-            page.setNumber(1);
-            page.setSize(10);
-        }
+    private PageInfo getListDATA(@PageDefault(size = 10) PageRequest page, ListReqDTO req, String type) {
         PageHelper.startPage(page.getNumber(), page.getSize());
         PageHelper.startPage(page.getNumber(), page.getSize());
         //查询数据
         //查询数据
         List lists = getListByType(req, type);
         List lists = getListByType(req, type);

+ 9 - 9
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.sale.service.impl;
 
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.api.CommonService;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
@@ -13,6 +14,7 @@ import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.sale.dto.SaleDTO;
 import com.usoftchina.saas.sale.dto.SaleDTO;
 import com.usoftchina.saas.sale.dto.SaleDetailDTO;
 import com.usoftchina.saas.sale.dto.SaleDetailDTO;
@@ -56,15 +58,11 @@ public class SaleServiceImpl implements SaleService{
     private ProdIODetailMapper prodIODetailMapper;
     private ProdIODetailMapper prodIODetailMapper;
     @Autowired
     @Autowired
     private ProdInOutService prodInOutService;
     private ProdInOutService prodInOutService;
+    @Autowired
+    private CommonService commonService;
 
 
     @Override
     @Override
-    public PageInfo<SaleList> getListData(PageRequest page, ListReqDTO req) {
-        //设置默认分页
-        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
-            page = new PageRequest();
-            page.setNumber(1);
-            page.setSize(10);
-        }
+    public PageInfo<SaleList> getListData(@PageDefault(size = 10) PageRequest page, ListReqDTO req) {
         PageHelper.startPage(page.getNumber(), page.getSize());
         PageHelper.startPage(page.getNumber(), page.getSize());
         //查询数据
         //查询数据
         List<SaleList> lists = getListByMode(req);
         List<SaleList> lists = getListByMode(req);
@@ -232,7 +230,7 @@ public class SaleServiceImpl implements SaleService{
     }
     }
 
 
     private void singleAudit(Long id) {
     private void singleAudit(Long id) {
-        Sale sale = new Sale();
+        /*Sale sale = new Sale();
         //生成更新对象
         //生成更新对象
         sale.setId(id);
         sale.setId(id);
         sale.setSa_status(Status.AUDITED.getDisplay());
         sale.setSa_status(Status.AUDITED.getDisplay());
@@ -242,7 +240,9 @@ public class SaleServiceImpl implements SaleService{
         sale.setSa_auditman("TESTADMIN");
         sale.setSa_auditman("TESTADMIN");
         sale.setSa_auditdate(new Date());
         sale.setSa_auditdate(new Date());
         //更新存在字段
         //更新存在字段
-        saleMapper.updateByPrimaryKeySelective(sale);
+        saleMapper.updateByPrimaryKeySelective(sale);*/
+        commonService.commonAudit("sale", "sa_id=" + id, "sa_status",
+                "sa_statuscode", "sa_auditdate", "sa_auditman");
         //更新销售金额
         //更新销售金额
         updateTotal(id);
         updateTotal(id);
         //更新从表总额
         //更新从表总额

+ 9 - 0
frontend/saas-web/app/view/core/base/GridPanel.js

@@ -171,6 +171,15 @@ Ext.define('saas.view.core.base.GridPanel', {
     },
     },
 
 
     listeners:{
     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,a,index,c) {
         itemClick: function(view,record,a,index,c) {
             var classList = c.target.classList.value;
             var classList = c.target.classList.value;
             var form = view.ownerCt.ownerCt;
             var form = view.ownerCt.ownerCt;

+ 1 - 1
frontend/saas-web/app/view/core/chart/ChartBase.js

@@ -6,11 +6,11 @@ Ext.define('saas.view.core.chart.ChartBase', {
     ],
     ],
 
 
     height: 300,
     height: 300,
+    bodyPadding: 5,
 
 
     layout: 'fit',
     layout: 'fit',
 
 
     cls: 'quick-graph-panel shadow',
     cls: 'quick-graph-panel shadow',
-    // headerPosition: 'bottom',
 
 
     defaults: {
     defaults: {
         width: '100%'
         width: '100%'

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

@@ -443,7 +443,45 @@ Ext.define('saas.view.core.form.FormPanel', {
     },
     },
 
 
     getDirtyData: function() {
     getDirtyData: function() {
-        return this.getForm().getDirtyData();
+        var me = this,
+        viewModel = me.getViewModel(),
+        allData = viewModel.getData(),
+        bindFields = allData.base.bindFields,
+        detailCount = me.detailCount,
+        formData = {},
+        detailGrids = me.query('detailGridField');
+
+        Ext.Array.each(bindFields, function(field) {
+            var v = allData[field];
+            if(Ext.isDate(v)) {
+                v = Ext.Date.format(v, 'Y-m-d H:i:s');
+            }
+            formData[field] = v;
+        });
+
+        var dirtyData = {
+            main: formData,
+        };
+
+        for (var i = 0; i < detailCount; i++) {
+            var g = detailGrids[i];
+            var gridDirtyData = g.getDirtyData();
+            var modelDetail = allData['detail' + i];
+            var detailBindFields = modelDetail.detailBindFields;
+
+            Ext.Array.each(gridDirtyData, function(d) {
+                for(k in d) {
+                    if(!Ext.Array.contains(detailBindFields, k)) {
+                        delete d[k];
+                    }
+                }
+            });
+            
+
+            dirtyData['detail' + i] = gridDirtyData;
+        }
+
+        return dirtyData;
     },
     },
 
 
     beforeSave: function() {
     beforeSave: function() {

+ 25 - 0
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -451,6 +451,31 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         return allData;
         return allData;
     },
     },
 
 
+    getDirtyData: function() {
+        var me = this,
+        store = me.getStore(),
+        allData = store.getData().items,
+        dirtyData = [];
+
+        Ext.Array.each(allData, function(item){
+            var d = Object.assign({}, item.data),
+            dirty = item.dirty;
+
+            if(dirty){
+                if((typeof d.id) != "number" && d.id.indexOf('-')>-1){
+                    d.id = 0;
+                }
+                for(k in d) {
+                    if(Ext.isDate(d[k])) {
+                        d[k] = Ext.Date.format(d[k], 'Y-m-d H:i:s');
+                    }
+                }
+                dirtyData.push(d);
+            }
+        });
+        return dirtyData;
+    },
+
     /**
     /**
      * 获得有效数据
      * 获得有效数据
      */
      */

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

@@ -140,6 +140,16 @@ Ext.define('saas.view.document.vendor.BasePanel', {
             dataIndex : "ve_status", 
             dataIndex : "ve_status", 
             width : 120.0, 
             width : 120.0, 
             xtype : ""
             xtype : ""
+        },{
+            text: '应收款余额',
+            dataIndex : 've_leftamount',
+            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);
+            },
         }]
         }]
     },
     },
 
 

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

@@ -143,7 +143,7 @@ Ext.define('saas.view.home.HomeModel', {
                         if(r.get('x') == '收入') {
                         if(r.get('x') == '收入') {
                             Ext.getCmp('home').getViewModel().set('month_in', sum);
                             Ext.getCmp('home').getViewModel().set('month_in', sum);
                         }else if(r.get('x') == '支出') {
                         }else if(r.get('x') == '支出') {
-                            Ext.getCmp('home').getViewModel().set('month_in', sum);
+                            Ext.getCmp('home').getViewModel().set('month_out', sum);
                         }
                         }
                     });
                     });
                 }
                 }

+ 20 - 8
frontend/saas-web/app/view/home/charts/MonthIO.js

@@ -37,17 +37,27 @@ Ext.define('saas.view.home.charts.MonthIO', {
                     position: 'left',
                     position: 'left',
                     adjustByMajorUnit: true,
                     adjustByMajorUnit: true,
                     fields: ['main'],
                     fields: ['main'],
-                    minimum: 0
+                    minimum: 0,
+                    grid: {
+                        even: {
+                            stroke: '#E7EBEF'
+                        },
+                        odd: {
+                            stroke: '#E7EBEF',
+                        }
+                    },
+                    style: {
+                        fill: '#fff',
+                        strokeStyle: 'transparent'
+                    },
                 }, {
                 }, {
                     type: 'category',
                     type: 'category',
                     position: 'bottom',
                     position: 'bottom',
-                    grid: true,
                     fields: ['x'],
                     fields: ['x'],
-                    label: {
-                        rotate: {
-                            degrees: -45
-                        }
-                    }
+                    style: {
+                        fill: '#E7EBEF',
+                        strokeStyle: 'transparent'
+                    },
                 }],
                 }],
                 series: [{
                 series: [{
                     type: 'bar',
                     type: 'bar',
@@ -56,7 +66,9 @@ Ext.define('saas.view.home.charts.MonthIO', {
                     yField: ['main', 'other'],
                     yField: ['main', 'other'],
                     stacked: true,
                     stacked: true,
                     style: {
                     style: {
-                        opacity: 0.80
+                        lineWidth: 0,
+                        strokeStyle: 'transparent',
+                        maxBarWidth: 50,
                     },
                     },
                     tooltip: {
                     tooltip: {
                         trackMouse: true,
                         trackMouse: true,

+ 28 - 11
frontend/saas-web/app/view/home/charts/MonthPurchase.js

@@ -29,23 +29,40 @@ Ext.define('saas.view.home.charts.MonthPurchase', {
                 },
                 },
                 axes: [{
                 axes: [{
                     type: 'category',
                     type: 'category',
-                    fields: [
-                        'x'
-                    ],
-                    position: 'bottom'
+                    fields: ['x'],
+                    position: 'bottom',
+                    style: {
+                        fill: '#E7EBEF',
+                        strokeStyle: 'transparent'
+                    },
                 },{
                 },{
                     type: 'numeric',
                     type: 'numeric',
-                    fields: [
-                        'y'
-                    ],
-                    position: 'left'
+                    fields: ['y'],
+                    position: 'left',
+                    adjustByMajorUnit: true,
+                    grid: {
+                        even: {
+                            stroke: '#E7EBEF'
+                        },
+                        odd: {
+                            stroke: '#E7EBEF',
+                        }
+                    },
+                    style: {
+                        fill: '#fff',
+                        strokeStyle: 'transparent'
+                    },
+                    minimum: 0
                 }],
                 }],
                 series: [{
                 series: [{
                     type: 'bar',
                     type: 'bar',
                     xField: 'x',
                     xField: 'x',
-                    yField: [
-                        'y'
-                    ],
+                    yField: ['y'],
+                    style: {
+                        lineWidth: 0,
+                        strokeStyle: 'transparent',
+                        maxBarWidth: 50,
+                    },
                     tooltip: {
                     tooltip: {
                         trackMouse: true,
                         trackMouse: true,
                         renderer: me.onBarTipRender
                         renderer: me.onBarTipRender

+ 9 - 1
frontend/saas-web/app/view/home/charts/MonthSale.js

@@ -36,8 +36,12 @@ Ext.define('saas.view.home.charts.MonthSale', {
                 width: '100%',
                 width: '100%',
                 innerPadding: 20,
                 innerPadding: 20,
                 // legend: {
                 // legend: {
-                //     docked: 'bottom'
+                //     type: 'dom',
+                //     docked: 'right'
                 // },
                 // },
+                style: {
+                    stroke: "#789"
+                },
                 interactions: ['rotate', 'itemhighlight'],
                 interactions: ['rotate', 'itemhighlight'],
                 series: [{
                 series: [{
                     type: 'pie',
                     type: 'pie',
@@ -52,6 +56,10 @@ Ext.define('saas.view.home.charts.MonthSale', {
                         trackMouse: true,
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender
                         renderer: me.onSeriesTooltipRender
                     },
                     },
+                    style: {
+                        lineWidth: 0,
+                        strokeStyle: 'transparent',
+                    },
                 }]
                 }]
             }],
             }],
         });
         });

+ 24 - 3
frontend/saas-web/app/view/home/charts/PurchaseTrend.js

@@ -30,11 +30,27 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                 axes: [{
                 axes: [{
                     type: 'category',
                     type: 'category',
                     fields: ['x'],
                     fields: ['x'],
-                    position: 'bottom'
+                    position: 'bottom',
+                    style: {
+                        fill: '#E7EBEF',
+                        strokeStyle: 'transparent'
+                    },
                 },{
                 },{
                     type: 'numeric',
                     type: 'numeric',
                     fields: ['y'],
                     fields: ['y'],
-                    position: 'left'
+                    position: 'left',
+                    grid: {
+                        even: {
+                            stroke: '#E7EBEF'
+                        },
+                        odd: {
+                            stroke: '#E7EBEF',
+                        }
+                    },
+                    style: {
+                        fill: '#fff',
+                        strokeStyle: 'transparent'
+                    },
                 }],
                 }],
                 series: [{
                 series: [{
                     type: 'bar',
                     type: 'bar',
@@ -43,7 +59,12 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                     tooltip: {
                     tooltip: {
                         trackMouse: true,
                         trackMouse: true,
                         renderer: me.onBarTipRender
                         renderer: me.onBarTipRender
-                    }
+                    },
+                    style: {
+                        lineWidth: 0,
+                        strokeStyle: 'transparent',
+                        maxBarWidth: 50,
+                    },
                 }]
                 }]
             }]
             }]
         });
         });

+ 22 - 1
frontend/saas-web/app/view/home/charts/SaleTrend.js

@@ -28,6 +28,11 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                 bind: {
                 bind: {
                     store: '{sale_trend}',
                     store: '{sale_trend}',
                 },
                 },
+                // legend: {
+                //     type: 'dom',
+                //     docked: 'top',
+
+                // },
                 axes: [{
                 axes: [{
                     type: 'category',
                     type: 'category',
                     fields: ['x'],
                     fields: ['x'],
@@ -36,11 +41,27 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                         rotate: {
                         rotate: {
                             degrees: -25
                             degrees: -25
                         }
                         }
-                    }
+                    },
+                    style: {
+                        fill: '#E7EBEF',
+                        strokeStyle: 'transparent'
+                    },
                 },{
                 },{
                     type: 'numeric',
                     type: 'numeric',
                     fields: ['sale', 'saleback'],
                     fields: ['sale', 'saleback'],
                     position: 'left',
                     position: 'left',
+                    grid: {
+                        even: {
+                            stroke: '#E7EBEF',
+                        },
+                        odd: {
+                            stroke: '#E7EBEF',
+                        }
+                    },
+                    style: {
+                        fill: '#fff',
+                        strokeStyle: 'transparent'
+                    },
                 }],
                 }],
                 series: [{
                 series: [{
                     type: 'line',
                     type: 'line',

+ 24 - 3
frontend/saas-web/app/view/home/charts/StockAmount.js

@@ -30,11 +30,27 @@ Ext.define('saas.view.home.charts.StockAmount', {
                 axes: [{
                 axes: [{
                     type: 'category',
                     type: 'category',
                     fields: ['x'],
                     fields: ['x'],
-                    position: 'bottom'
+                    position: 'bottom',
+                    style: {
+                        fill: '#E7EBEF',
+                        strokeStyle: 'transparent'
+                    },
                 },{
                 },{
                     type: 'numeric',
                     type: 'numeric',
                     fields: ['y'],
                     fields: ['y'],
-                    position: 'left'
+                    position: 'left',
+                    grid: {
+                        even: {
+                            stroke: '#E7EBEF',
+                        },
+                        odd: {
+                            stroke: '#E7EBEF',
+                        }
+                    },
+                    style: {
+                        fill: '#fff',
+                        strokeStyle: 'transparent'
+                    },
                 }],
                 }],
                 series: [{
                 series: [{
                     type: 'bar',
                     type: 'bar',
@@ -43,7 +59,12 @@ Ext.define('saas.view.home.charts.StockAmount', {
                     tooltip: {
                     tooltip: {
                         trackMouse: true,
                         trackMouse: true,
                         renderer: me.onBarTipRender
                         renderer: me.onBarTipRender
-                    }
+                    },
+                    style: {
+                        lineWidth: 0,
+                        strokeStyle: 'transparent',
+                        maxBarWidth: 50,
+                    },
                 }]
                 }]
             }]
             }]
         });
         });

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

@@ -177,12 +177,17 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         columnWidth : 0.75
         columnWidth : 0.75
     }, {
     }, {
         xtype : "textfield", 
         xtype : "textfield", 
-        name : "ft_recorder", 
+        name : "creatorId", 
+        fieldLabel : "录入人ID", 
+        hidden:true
+    }, {
+        xtype : "textfield", 
+        name : "creator", 
         fieldLabel : "录入人", 
         fieldLabel : "录入人", 
         readOnly:true
         readOnly:true
     }, {
     }, {
         xtype : "datefield", 
         xtype : "datefield", 
-        name : "ft_recorddate",
+        name : "createTime",
         fieldLabel : "录入日期",
         fieldLabel : "录入日期",
         readOnly:true
         readOnly:true
     }
     }

+ 96 - 16
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -11,22 +11,42 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         xtype: 'textfield',
         xtype: 'textfield',
         name: 'pb_code',
         name: 'pb_code',
         fieldLabel: '单据编号',
         fieldLabel: '单据编号',
-        columnWidth: 0.2
+        columnWidth: 0.3
+    },{
+        xtype: 'dbfindtrigger',
+        name: 'pb_vendname',
+        fieldLabel: '供应商',
+        columnWidth: 0.3
+    },{
+        xtype: 'textfield',
+        name: 'pb_manname',
+        fieldLabel: '付款人',
+        columnWidth: 0.3
+    },{
+        xtype: 'dbfindtrigger',
+        name: 'pd_bankname',
+        fieldLabel: '资金账户',
+        columnWidth: 0.3
     },{
     },{
         xtype: 'condatefield',
         xtype: 'condatefield',
         name: 'pb_date',
         name: 'pb_date',
-        fieldLabel: '日期',
-        columnWidth: 0.5,
+        fieldLabel: '单据日期',
+        columnWidth: 0.6,
         operation: 'between'
         operation: 'between'
     },{
     },{
         xtype: 'multicombo',
         xtype: 'multicombo',
         name: 'pb_status',
         name: 'pb_status',
         fieldLabel: '审核状态',
         fieldLabel: '审核状态',
-        columnWidth: 0.2,
+        columnWidth: 0.3,
         datas: [
         datas: [
             ["已审核", "已审核"],
             ["已审核", "已审核"],
             ["未审核", "未审核"]
             ["未审核", "未审核"]
         ]
         ]
+    },{
+        xtype: 'textfield',
+        name: 'pbd_slcode',
+        fieldLabel: '源单编号',
+        columnWidth: 0.3
     }],
     }],
     moreQueryFormItems: [],
     moreQueryFormItems: [],
     queryGridConfig: {
     queryGridConfig: {
@@ -36,6 +56,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         addXtype: 'money-paybalance-formpanel',
         addXtype: 'money-paybalance-formpanel',
         defaultCondition:'1=1',
         defaultCondition:'1=1',
         baseVastUrl: '/api/money/paybalance/',
         baseVastUrl: '/api/money/paybalance/',
+        // baseVastUrl: 'http://192.168.253.35:8880/paybalance/',
         baseColumn: [{
         baseColumn: [{
             text: 'id',
             text: 'id',
             dataIndex: 'id',
             dataIndex: 'id',
@@ -43,35 +64,39 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
             xtype: 'numbercolumn',
             xtype: 'numbercolumn',
             hidden:true
             hidden:true
         }, {
         }, {
-            text: '单据编号',
+            text: '单号',
             dataIndex: 'pb_code',
             dataIndex: 'pb_code',
             width: 200
             width: 200
-        }, {
-            text: '审核状态',
-            dataIndex: 'pb_status',
-            width: 120
         }, {
         }, {
             text: '单据日期',
             text: '单据日期',
             dataIndex: 'pb_date',
             dataIndex: 'pb_date',
             xtype: 'datecolumn',
             xtype: 'datecolumn',
             width: 160
             width: 160
+        }, {
+            text: '审核状态',
+            dataIndex: 'pb_status',
+            width: 120
         }, {
         }, {
             text: '供应商编号',
             text: '供应商编号',
             dataIndex: 'pb_vendcode',
             dataIndex: 'pb_vendcode',
             width: 200,
             width: 200,
             hidden:true
             hidden:true
         }, {
         }, {
-            text: '供应商名称',
+            text: '供应商',
             dataIndex: 'pb_vendname',
             dataIndex: 'pb_vendname',
             width: 120,
             width: 120,
         }, {
         }, {
-            text: '款人',
+            text: '款人',
             dataIndex: 'pb_manname',
             dataIndex: 'pb_manname',
             width: 120,
             width: 120,
         }, {
         }, {
+            text: '资金账户',
+            dataIndex: 'pd_bankname',
+            width: 120,
+        },{
             text: '付款金额',
             text: '付款金额',
             xtype: 'numbercolumn',
             xtype: 'numbercolumn',
-            dataIndex: 'pb_pdamount',
+            dataIndex: 'pd_amount',
             width: 120,
             width: 120,
             hidden:true,
             hidden:true,
             renderer : function(v) {
             renderer : function(v) {
@@ -81,10 +106,65 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
                 return Ext.util.Format.number(v, format);
                 return Ext.util.Format.number(v, format);
             },
             },
         }, {
         }, {
+            text: '结算方式',
+            dataIndex: 'pd_paymethod',
+            width: 120,
+        },{
+            text: '结算号',
+            dataIndex: 'pd_paycode',
+            width: 120
+        },  {
+            text: '备注',
+            dataIndex: 'pd_remark',
+            width: 120,
+        },{
+            text: '付款总额',
+            dataIndex: 'pb_pdamount',
+            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: '源单编号',
+            dataIndex: 'pbd_slcode',
+            width: 120,
+        },{
+            text: '业务类别',
+            dataIndex: 'pbd_slkind',
+            width: 120,
+        },{
+            text: '单据日期',
+            dataIndex: 'pbd_sldate',
+            width: 120,
+            xtype:'datecolumn'
+        },{
+            text: '单据金额',
+            dataIndex: 'pbd_amount',
+            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: '本次核销金额',
+            dataIndex: 'pbd_nowbalance',
+            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: '本次核销金额',
             text: '本次核销金额',
             xtype: 'numbercolumn',
             xtype: 'numbercolumn',
             dataIndex: 'pb_pbdamount',
             dataIndex: 'pb_pbdamount',
-            width: 120,
+            width: 0,
             hidden:true,
             hidden:true,
             renderer : function(v) {
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var arr = (v + '.').split('.');
@@ -95,7 +175,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         }, {
         }, {
             text: '本次预付款',
             text: '本次预付款',
             dataIndex: 'pb_preamount',
             dataIndex: 'pb_preamount',
-            width: 120,
+            width: 0,
             hidden:true,
             hidden:true,
             renderer : function(v) {
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var arr = (v + '.').split('.');
@@ -106,13 +186,13 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         }, {
         }, {
             text: '整单折扣',
             text: '整单折扣',
             dataIndex: 'pb_discounts',
             dataIndex: 'pb_discounts',
-            width: 120,
+            width: 0,
             hidden:true
             hidden:true
         }, {
         }, {
             text: '已核销金额',
             text: '已核销金额',
             xtype: 'numbercolumn',
             xtype: 'numbercolumn',
             dataIndex: 'pb_havebalance',
             dataIndex: 'pb_havebalance',
-            width: 120,
+            width: 0,
             hidden:true,
             hidden:true,
             renderer : function(v) {
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var arr = (v + '.').split('.');

+ 77 - 4
frontend/saas-web/app/view/money/payBalance/QueryPanelController.js

@@ -6,16 +6,14 @@ Ext.define('saas.view.money.paybalance.QueryPanelController', {
         var me = this;
         var me = this;
         this.control({
         this.control({
             //放大镜赋值关系 以及 tpl模板
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendname]':{
+            'dbfindtrigger[name=pb_vendname]':{
                 beforerender:function(f){
                 beforerender:function(f){
                     Ext.apply(f,{
                     Ext.apply(f,{
                         dataUrl:'/api/document/vendor/list',
                         dataUrl:'/api/document/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
                         addTitle: '供应商资料',
                         dbfinds:[{
                         dbfinds:[{
-                            from:'ve_code',to:'pu_vendcode'
-                        },{
-                            from:'ve_name',to:'pu_vendname'
+                            from:'ve_name',to:'pb_vendname'
                         }],
                         }],
                         dbtpls:[{
                         dbtpls:[{
                             field:'ve_code',width:100
                             field:'ve_code',width:100
@@ -178,6 +176,81 @@ Ext.define('saas.view.money.paybalance.QueryPanelController', {
                         }]   
                         }]   
                     }) ;   
                     }) ;   
 
 
+                }
+            },
+            'dbfindtrigger[name=pd_bankname]':{
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/bankinformation/list',
+                        addXtype: 'other-bankinformation',
+                        addTitle: '资金账户',
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'pd_bankid'
+                        }, {
+                            from: 'bk_bankcode',
+                            to: 'pd_bankcode'
+                        },{
+                            from: 'bk_bankname',
+                            to: 'pd_bankname'
+                        }],
+                        dbtpls: [{
+                            field: 'bk_bankcode',
+                            width: 100
+                        }, {
+                            field: 'bk_bankname',
+                            width: 100
+                        }],
+                        otherConditon:'',
+                        dbSearchFields: [{
+                            emptyText: '查找资金账户',
+                            xtype: "textfield",
+                            name: "search",
+                            getCondition: function (v) {
+                                return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank: true,
+                            columnWidth: 0.25
+                        }],
+                        dbColumns: [{
+                            "text": "账户ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": ""
+                        }, {
+                            "text": "资金账户",
+                            "flex": 1,
+                            "dataIndex": "bk_bankcode",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "账户名称",
+                            "flex": 1,
+                            "dataIndex": "bk_bankname",
+                            "width": 150,
+                            "xtype": ""
+                        }, {
+                            "text": "账户类别",
+                            "flex": 1,
+                            "dataIndex": "bk_type",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            xtype: 'numbercolumn',
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
+                        }]
+                    });
+
                 }
                 }
             }
             }
         });
         });

+ 6 - 2
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -159,11 +159,15 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 valueField: 'value',
                 valueField: 'value',
                 store:Ext.create('Ext.data.Store', {
                 store:Ext.create('Ext.data.Store', {
                     fields: ['value', 'display'],
                     fields: ['value', 'display'],
-                    data : [{value:"信用卡", display:"信用卡"},
+                    data : [
+                        {value:"信用卡", display:"信用卡"},
                         {value:"支票", display:"支票"},
                         {value:"支票", display:"支票"},
                         {value:"汇票", display:"汇票"},
                         {value:"汇票", display:"汇票"},
                         {value:"现金", display:"现金"},
                         {value:"现金", display:"现金"},
-                        {value:"银行转账", display:"银行转账"}]
+                        {value:"银行转账", display:"银行转账"},
+                        {value:"支付宝转账", display:"支付宝转账"},
+                        {value:"微信转账", display:"微信转账"}
+                    ]
                 })
                 })
             }
             }
         }, {
         }, {

+ 68 - 7
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -18,22 +18,43 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
     }, {
     }, {
         xtype: 'textfield',
         xtype: 'textfield',
         name: 'rb_code',
         name: 'rb_code',
-        fieldLabel: '单据编号'
+        fieldLabel: '单据编号',
+        columnWidth: 0.3,
     }, {
     }, {
+        xtype: 'dbfindtrigger',
+        name: 'rb_custname',
+        fieldLabel: '客户名',
+        columnWidth: 0.3,
+    }, {
+        xtype: 'textfield',
+        name: 'rb_manname',
+        fieldLabel: '收款人',
+        columnWidth: 0.3,
+    },{
+        xtype: 'textfield',
+        name: 'rd_bankname',
+        fieldLabel: '资金账户',
+        columnWidth: 0.3,
+    },  {
         xtype: 'condatefield',
         xtype: 'condatefield',
         name: 'rb_date',
         name: 'rb_date',
-        fieldLabel: '日期',
-        columnWidth: 0.5,
+        fieldLabel: '单据日期',
+        columnWidth: 0.6,
         operation: 'between'
         operation: 'between'
     },{
     },{
         xtype: 'multicombo',
         xtype: 'multicombo',
         name: 'rb_status',
         name: 'rb_status',
         fieldLabel: '审核状态',
         fieldLabel: '审核状态',
-        columnWidth: 0.2,
+        columnWidth: 0.3,
         datas: [
         datas: [
             ["已审核", "已审核"],
             ["已审核", "已审核"],
             ["未审核", "未审核"]
             ["未审核", "未审核"]
         ]
         ]
+    },{
+        xtype: 'textfield',
+        name: 'rbd_slcode',
+        fieldLabel: '源单编号',
+        columnWidth: 0.3,
     }],
     }],
     moreQueryFormItems: [],
     moreQueryFormItems: [],
     queryGridConfig: {
     queryGridConfig: {
@@ -43,6 +64,7 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         addXtype: 'money-recbalance-formpanel',
         addXtype: 'money-recbalance-formpanel',
         defaultCondition:'',
         defaultCondition:'',
         baseVastUrl: '/api/money/recbalance/',
         baseVastUrl: '/api/money/recbalance/',
+        // baseVastUrl: 'http://192.168.253.35:8880/recbalance/',
         baseColumn: [{
         baseColumn: [{
             text: 'id',
             text: 'id',
             dataIndex: 'id',
             dataIndex: 'id',
@@ -72,10 +94,25 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         }, {
         }, {
             text: '收款人',
             text: '收款人',
             dataIndex: 'rb_manname',
             dataIndex: 'rb_manname',
-            xtype: 'numbercolumn',
             width: 120,
             width: 120,
         }, {
         }, {
-            text: '收款金额',
+            text: '资金账户',
+            dataIndex: 'rd_bankname',
+            width: 120,
+        },{
+            text: '结算方式',
+            dataIndex: 'rd_paymethod',
+            width: 120,
+        },{
+            text: '结算号',
+            dataIndex: 'rd_paycode',
+            width: 120,
+        },{
+            text: '备注',
+            dataIndex: 'rd_remark',
+            width: 120,
+        },{
+            text: '收款总额',
             dataIndex: 'rb_rdamount',
             dataIndex: 'rb_rdamount',
             xtype: 'numbercolumn',
             xtype: 'numbercolumn',
             width: 120,
             width: 120,
@@ -86,6 +123,30 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
                 var format = '0,000.' + xr.join();
                 var format = '0,000.' + xr.join();
                 return Ext.util.Format.number(v, format);
                 return Ext.util.Format.number(v, format);
             },
             },
-        }]
+        },{
+            text: '源单编号',
+            dataIndex: 'rbd_slcode',
+            width: 120,
+        },{
+            text: '业务类别',
+            dataIndex: 'rbd_slkind',
+            width: 120,
+        },{
+            text: '单据日期',
+            dataIndex: 'rbd_sldate',
+            xtype: 'datecolumn',
+            width: 120,
+        },{
+            text: '单据金额',
+            dataIndex: 'rbd_amount',
+            xtype: 'numbercolumn',
+            width: 120,
+        },{
+            text: '本次核销金额',
+            dataIndex: 'rbd_nowbalance',
+            xtype: 'numbercolumn',
+            width: 120,
+        },
+        ]
     }
     }
 });
 });

+ 91 - 2
frontend/saas-web/app/view/money/recBalance/QueryPanelController.js

@@ -6,7 +6,7 @@ Ext.define('saas.view.money.recBalance.QueryPanelController', {
         var me = this;
         var me = this;
         this.control({
         this.control({
             //放大镜赋值关系 以及 tpl模板
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendname]':{
+            'dbfindtrigger[name=rd_bankname]':{
                 beforerender:function(f){
                 beforerender:function(f){
                     Ext.apply(f,{
                     Ext.apply(f,{
                         dataUrl: '/api/document/vendor/list',
                         dataUrl: '/api/document/vendor/list',
@@ -180,7 +180,96 @@ Ext.define('saas.view.money.recBalance.QueryPanelController', {
                     }) ;   
                     }) ;   
 
 
                 }
                 }
-            }
+            },
+            'dbfindtrigger[name=rb_custname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl: '/api/document/customer/list',
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        //赋值
+                        dbfinds:[{
+                            from: 'id', to: 'rb_custid'
+                        }, {
+                            from:'cu_code', to:'rb_custcode'
+                        },{
+                            from:'cu_name', to:'rb_custname'
+                        },{
+                            from:'cu_leftamount', to:'cu_leftamount'
+                        }],
+                        //联想设置
+                        dbtpls:[{
+                            field:'cu_code',width:100
+                        },{
+                            field:'cu_name',width:100
+                        },{
+                            field:'cu_leftamount',width:100
+                        }],
+                        defaultCondition: 'cu_statuscode="OPEN"',
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
+                            xtype : "textfield",
+                            name : "search",
+                            getCondition: function(v) {
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true,
+                            columnWidth : 0.25
+                        }],
+                        //放大镜窗口列表
+                        dbColumns:[{
+                            "text": "客户ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        },{
+                            "text": "客户编号",
+                            "dataIndex": "cu_code",
+                            "width": 200,
+                        }, {
+                            "text": "客户名称",
+                            "dataIndex": "cu_name",
+                            "width": 200
+                        },{
+                            "text": "客户类型",
+                            "dataIndex": "cu_name",
+                            "width": 100
+                        },{
+                            "text": "业务员",
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        },{
+                            "text": "应收款余额",
+                            "dataIndex": "cu_leftamount",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "税率",
+                            "dataIndex": "cu_taxrate",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "承付天数",
+                            "dataIndex": "cu_promisedays",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end',
+                            renderer : function(v) {
+                                return Ext.util.Format.number(v, '0');
+                            }
+                        },{
+                            "text": "额度",
+                            "dataIndex": "cu_credit",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        }]
+                    }) ;
+
+                }
+            },
         });
         });
 
 
     }
     }

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

@@ -20,7 +20,7 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         columnWidth: 0.2
         columnWidth: 0.2
     }, {
     }, {
         xtype: 'dbfindtrigger',
         xtype: 'dbfindtrigger',
-        name: 'sd_prodcode',
+        name: 'pr_code',
         fieldLabel: '物料',
         fieldLabel: '物料',
         columnWidth: 0.2
         columnWidth: 0.2
     }, {
     }, {

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

@@ -112,7 +112,7 @@ Ext.define('saas.view.sale.report.SaleProfitController', {
                 }
                 }
             },
             },
             //放大镜赋值关系 以及 tpl模板
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=sd_prodcode]':{
+            'dbfindtrigger[name=pr_code]':{
                 beforerender:function(f){
                 beforerender:function(f){
                     Ext.apply(f,{
                     Ext.apply(f,{
                         dataUrl:'/api/document/product/list',
                         dataUrl:'/api/document/product/list',

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

@@ -313,9 +313,9 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                     addTitle: '仓库资料',
                     addTitle: '仓库资料',
                     defaultCondition:"wh_statuscode='OPEN'",
                     defaultCondition:"wh_statuscode='OPEN'",
                     dbfinds:[{
                     dbfinds:[{
-                        from:'id',to:'id',ignore:true                          
+                        from:'id',to:'pd_whid',ignore:true                          
                     },{
                     },{
-                        from:'wh_code',to:'wh_code'                          
+                        from:'wh_code',to:'pd_whcode'                          
                     },{
                     },{
                         from:'wh_description',to:'pd_whname'
                         from:'wh_description',to:'pd_whname'
                     }],
                     }],

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

@@ -1,24 +0,0 @@
-/**
- * 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:'账户信息'});
-        }
-    }
-})
-
-

+ 361 - 0
frontend/saas-web/app/view/sys/account/DataList.js

@@ -0,0 +1,361 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.sys.account.DataList', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'sys-account-datalist',
+    controller: 'sys-account-datalist',
+    viewModel: 'sys-account-datalist',
+    autoScroll: true,
+    frame:true,
+    layout:'fit',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    dataUrl:'http://192.168.253.31:8560/api/account/account/accountRole/list',                 
+
+    tbar: [{
+        width: 150,
+        name: 'mn_name',
+        xtype: 'textfield',
+        emptyText : '账户名称'
+    },{
+        width: 150,
+        name: 'mn_leadcode',
+        xtype: 'textfield',
+        emptyText : '账户编号'
+    },{
+        cls:'x-formpanel-btn-orange',
+        xtype:'button',
+        text:'查询',
+        listeners: {
+            click:function(b){
+                var grid = b.ownerCt.ownerCt;
+                var tbar = b.ownerCt;
+                grid.condition = '';
+                var items = [];
+                var fields = tbar.items.items.map(f => f.name);
+                Ext.each(fields, function(f, index){
+                    var field = tbar.down('[name='+f+']');
+                    if(field){
+                        items.push(field);
+                    }
+                });
+                grid.condition = grid.getCondition(items);
+                grid.store.loadPage(1);
+            }
+        }
+    },'->'],
+
+    columns : [{
+        text : 'id', 
+        width : 0, 
+        dataIndex : 'id', 
+        xtype : 'numbercolumn', 
+    },{
+        text : '账户名称', 
+        width : 200.0, 
+        dataIndex : 'mn_name', 
+        xtype : '', 
+    }, 
+    {
+        text : '账户编号', 
+        dataIndex : 'mn_leadcode', 
+        width : 120.0, 
+        xtype : '', 
+    }, 
+    {
+        text : '单据规则', 
+        dataIndex : 'mn_rule', 
+        width : 220.0,
+    },{
+        text : '流水长度', 
+        dataIndex : 'mn_number', 
+        width : 120.0, 
+        xtype : '', 
+    }],
+
+    dbSearchFields: [],
+    condition:'',
+
+    initComponent: function() {
+        var me = this;
+        if(me.columns){
+            var fields = me.columns.map(column => column.dataIndex);
+            me.columns = me.insertFirstColumn(me.columns);
+            me.store = Ext.create('Ext.data.Store',{
+                fields:fields,
+                autoLoad: true,
+                pageSize: 11,
+                data: [],
+                proxy: {
+                    timeout:8000,
+                    type: 'ajax',
+                    url: me.dataUrl,
+                    actionMethods: {
+                        read: 'GET'
+                    },
+                    reader: {
+                        type: 'json',
+                        rootProperty: 'data.list',
+                        totalProperty: 'data.total',
+                    }
+                },
+                listeners: {
+                    beforeload: function (store, op) {
+                        var condition = me.condition;
+                        if (Ext.isEmpty(condition)) {
+                            condition = '';
+                        }
+                        Ext.apply(store.proxy.extraParams, {
+                            number: op._page,
+                            size: store.pageSize,
+                            condition: JSON.stringify(condition)
+                        });
+                    }
+                }
+            });
+
+            Ext.apply(me, {
+                dockedItems:[{
+                    xtype: 'pagingtoolbar',
+                    dock: 'bottom',
+                    displayInfo: true,
+                    store: me.store
+                }]
+            });
+        }
+        me.callParent(arguments);
+    },
+
+    onVastDeal:function(url,type){
+        var form = this.ownerCt;
+        var grid = this;
+        var data = grid.getGridSelected(type);
+        if(!data){
+            showToast('请勾选符合条件的行进行操作。');
+            return false;
+        }
+        if(data&&data.length>0){
+            var params = JSON.stringify({baseDTOs:data});
+            form.BaseUtil.request({
+                    url: url,
+                    params: params,
+                    method: 'POST',
+                    async:false
+                })
+                .then(function() {
+                    showToast('操作成功');
+                    grid.store.load();
+                })
+                .catch(function(response) {
+                    showToast('操作失败');
+                });
+        }else{
+            showToast('请勾选至少一条明细。');
+        }
+    },
+
+    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,a,index,c) {
+            var classList = c.target.classList.value;
+            var grid = this;
+            if(classList.indexOf('fa-pencil')>-1){
+                var document = Ext.create('saas.view.document.kind.Kind',{});
+                var form = this.ownerCt;
+                this.dialog = form.getController().getView().add({
+                    xtype: 'document-kind-childwin',
+                    bind: {
+                        title: '修改单据编码规则'
+                    },
+                    dataKind:'maxnumbers',
+                    belong:document.etc['maxnumbers'],
+                    _parent:form,
+                    _combo:this,
+                    record:record,
+                    session: true
+                });
+                this.dialog.show();
+            }else if(classList.indexOf('fa-trash-o')>-1){
+                //删除
+                var id = record.get('id');
+                if(id){
+                    grid.BaseUtil.request({
+                        url: grid.deleteUrl+id,
+                        method: 'POST',
+                    })
+                    .then(function(localJson) {
+                        if(localJson.success){
+                            //解析参数
+                            showToast('删除成功');
+                            view.ownerCt.store.load();
+                        }
+                    })
+                    .catch(function() {
+                        showToast('删除失败');
+                    });
+                }
+            }
+        }
+    },
+
+    insertFirstColumn:function(columns){
+        var me=this;
+        if(columns.length>0 && columns[0].xtype!='actioncolumn'){
+            return Ext.Array.insert(columns,0,[{
+                xtype:'actioncolumn',
+                width:50,
+                dataIndex:'actioncolumn',
+                text:'操作',
+                items: [{
+                    tooltip: '编辑',
+                    iconCls: 'x-fa fa-pencil fa-fw',
+                    scope:this
+                }]
+            }]);
+        }
+        return columns;
+    },
+
+    getGridSelected:function(type){
+        var isErrorSelect = false;
+        var checkField = this.statusCodeField;
+        var me = this,
+        items = me.selModel.getSelection(),
+        data = new Array() ;
+        Ext.each(items, function(item, index){
+            if(!Ext.isEmpty(item.data[me.idField])){
+                var o = new Object();
+                if(me.idField){
+                    o['id'] = item.data[me.idField];
+                }
+                if(me.codeField){
+                    o['code'] = item.data[me.codeField];
+                }
+                if(type&&type==item.data[checkField]){
+                    isErrorSelect = true
+                }
+                data.push(o);
+            }
+        });
+        if(isErrorSelect){
+            return false;
+        }
+		return data;
+    },
+
+    /**
+     * 获得过滤条件
+     */
+    getCondition: function(items) {
+        var me = this,
+        conditions = [];
+
+        for(var i = 0; i < items.length; i++) {
+            var item = items[i];
+            var field = item.name,
+            func = item.getCondition,
+            value = item.value,
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        };
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
+        }
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
+        }else if(xtype == 'combobox' || xtype == 'combo') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+
+    refresh:function(){
+        //debugger
+    }
+
+})
+
+

+ 10 - 0
frontend/saas-web/app/view/sys/account/DataListController.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.sys.account.DataListController', {
+    extend: 'saas.view.core.base.BasePanelController',
+    alias: 'controller.sys-account-datalist',
+
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/sys/account/DataListlModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sys.account.DataListModel', {
+    extend: 'saas.view.core.base.BasePanelModel',
+    alias: 'viewmodel.sys-account-datalist'
+});

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

@@ -29,16 +29,13 @@ Ext.define('saas.view.sys.config.FormPanel', {
         blankText: '该字段不能为空'
         blankText: '该字段不能为空'
     },
     },
 
 
-    tbar:{
-        style: {
-            'border-bottom': '1px solid #35baf6 !important'
-        },
+    bbar:{
         frame:true,
         frame:true,
         items:['->',{
         items:['->',{
             text:'保存',
             text:'保存',
             formBind:true,
             formBind:true,
             name:'save'
             name:'save'
-        }]
+        },'->']
     },
     },
 
 
     items: [{
     items: [{
@@ -72,14 +69,14 @@ Ext.define('saas.view.sys.config.FormPanel', {
         fieldLabel: '电话',
         fieldLabel: '电话',
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         allowBlank: false,
         allowBlank: false,
-        columnWidth: 0.25
+        width:500
     },{
     },{
         bind:'{en_fax}',
         bind:'{en_fax}',
         xtype: 'textfield',
         xtype: 'textfield',
         name: 'en_fax',
         name: 'en_fax',
         fieldLabel: '传真',
         fieldLabel: '传真',
         allowBlank: true,
         allowBlank: true,
-        columnWidth: 0.5
+        width:500
     },{
     },{
         bind:'{en_begindate}',
         bind:'{en_begindate}',
         xtype : "datefield", 
         xtype : "datefield", 
@@ -89,13 +86,15 @@ Ext.define('saas.view.sys.config.FormPanel', {
         allowBlank : true, 
         allowBlank : true, 
         editable:false,
         editable:false,
         hideTrigger:true,
         hideTrigger:true,
-        readOnly:true
+        readOnly:true,
+        width:500
     },{ 
     },{ 
         bind:'{en_pricemethod}',
         bind:'{en_pricemethod}',
         displayField : "display", 
         displayField : "display", 
         editable:false,
         editable:false,
         hideTrigger : false, 
         hideTrigger : false, 
         maxLength : 100.0, 
         maxLength : 100.0, 
+        width:500,
         minValue : null, 
         minValue : null, 
         queryMode : "local", 
         queryMode : "local", 
         valueField : "value", 
         valueField : "value", 
@@ -112,14 +111,14 @@ Ext.define('saas.view.sys.config.FormPanel', {
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         fieldLabel : "库存计算方式", 
         fieldLabel : "库存计算方式", 
         allowBlank : false, 
         allowBlank : false, 
-        columnWidth : 0.25
     },{  
     },{  
         bind:'{en_signet}',
         bind:'{en_signet}',
         name : "en_signet", 
         name : "en_signet", 
         fieldLabel : "打印章上传", 
         fieldLabel : "打印章上传", 
         allowBlank : false, 
         allowBlank : false, 
-        columnWidth : 0.33,
+        width:500,
         xtype: 'filefield',
         xtype: 'filefield',
+        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         emptyText: '请选择图片',
         emptyText: '请选择图片',
         buttonText: '',
         buttonText: '',
         buttonConfig: {
         buttonConfig: {
@@ -130,8 +129,9 @@ Ext.define('saas.view.sys.config.FormPanel', {
         name : "en_logo", 
         name : "en_logo", 
         fieldLabel : "Logo上传", 
         fieldLabel : "Logo上传", 
         allowBlank : false, 
         allowBlank : false, 
-        columnWidth : 0.33,
+        width:500,
         xtype: 'filefield',
         xtype: 'filefield',
+        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         emptyText: '请选择图片',
         emptyText: '请选择图片',
         buttonText: '',
         buttonText: '',
         buttonConfig: {
         buttonConfig: {
@@ -148,7 +148,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
         format:'Y-m-d H:i:s',
         format:'Y-m-d H:i:s',
         editable:false,
         editable:false,
         readOnly:true,
         readOnly:true,
-        columnWidth : 0.25
+        width:500,
     }],
     }],
 
 
     initComponent: function () {
     initComponent: function () {

+ 12 - 0
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -109,6 +109,18 @@ Ext.define('saas.view.sys.finish.DataList', {
 
 
     condition:'',
     condition:'',
 
 
+    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() {
     initComponent: function() {
         var me = this;
         var me = this;
         if(me.columns){
         if(me.columns){

+ 10 - 6
frontend/saas-web/app/view/sys/manager/FormPanel.js

@@ -4,6 +4,8 @@ Ext.define('saas.view.sys.manager.FormPanel', {
     
     
     layout:'fit',
     layout:'fit',
 
 
+    cls:'sys-manager-formpanel',
+
     bodyCls:'x-manager-background',
     bodyCls:'x-manager-background',
     //工具类
     //工具类
     FormUtil: Ext.create('saas.util.FormUtil'),
     FormUtil: Ext.create('saas.util.FormUtil'),
@@ -11,26 +13,28 @@ Ext.define('saas.view.sys.manager.FormPanel', {
 
 
     tabBar: {
     tabBar: {
         layout: {
         layout: {
-            pack: 'left'
+            pack: 'center'
         },
         },
         border: false
         border: false
     },
     },
 
 
     defaults: {
     defaults: {
-        iconAlign: 'left',
+        iconAlign: 'top',
         bodyPadding: 15
         bodyPadding: 15
     },
     },
 
 
     items: [{
     items: [{
-        icon:'x-fa fa-key',
+        cls:'sys-config-formpanel',
+        iconCls:'x-fa fa-building',
         title: '公司设置',
         title: '公司设置',
         xtype:'sys-config-formpanel'
         xtype:'sys-config-formpanel'
     }, {
     }, {
-        icon:'x-fa fa-key',
+        iconCls:'x-fa fa-key',
         title: '账户设置',
         title: '账户设置',
-        xtype:'panel' 
+        xtype:'sys-account-datalist' 
     }, {
     }, {
-        icon:'x-fa fa-key',
+        cls:'sys-power-formpanel',
+        iconCls:'x-fa fa-user-circle-o',
         title: '权限设置',
         title: '权限设置',
         xtype:'sys-power-formpanel'
         xtype:'sys-power-formpanel'
     }],
     }],

+ 43 - 0
frontend/saas-web/app/view/sys/manager/FormPanel.scss

@@ -0,0 +1,43 @@
+.sys-manager-formpanel{
+    .x-tab-bar-default-top > .x-tab-bar-body-default {
+        padding: 8px 4px 8px 8px;
+    }
+    .x-tab-bar-default {
+        border-color: #35baf6;
+        border-width: 2px !important;
+        border: 1px solid #35baf6;
+        background-color: #ffffff;
+        border-bottom-width: 0 !important;
+    }
+    .x-tab.x-tab-active.x-tab-default{
+        background-color: #35baf6;
+    }
+    .x-tab.x-tab-active.x-tab-default .x-tab-icon-el {
+        color: #ffffff;
+    }
+    .x-tab.x-tab-active.x-tab-default .x-tab-inner-default {
+        color: #ffffff;
+    }
+    .x-tab-icon-el-default {
+        color: #a7a7a7;
+    }
+    .x-tab-inner-default {
+        color: #969696;
+    }
+}
+.sys-config-formpanel{
+    .x-form-item-label-default{
+        width:120px !important;
+        .x-form-item-label-inner{
+            width:100px !important;
+        }
+    }
+}
+.sys-power-formpanel{
+    .x-panel-body-default-framed{
+        padding:0 !important;
+    }
+    .x-keyboard-mode .x-grid-item-focused .x-grid-cell-inner:before{
+        border:1px solid #ffffff;
+    }
+}

+ 9 - 0
frontend/saas-web/app/view/sys/maxnumbers/DataList.js

@@ -191,6 +191,15 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     },
     },
 
 
     listeners:{
     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,a,index,c) {
         itemClick: function(view,record,a,index,c) {
             var classList = c.target.classList.value;
             var classList = c.target.classList.value;
             var grid = this;
             var grid = this;

+ 12 - 0
frontend/saas-web/app/view/sys/messagelog/DataList.js

@@ -85,6 +85,18 @@ Ext.define('saas.view.sys.messagelog.DataList', {
 
 
     condition:'',
     condition:'',
 
 
+    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() {
     initComponent: function() {
         var me = this;
         var me = this;
         if(me.columns){
         if(me.columns){

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

@@ -18,7 +18,6 @@ Ext.define('saas.view.sys.power.FormPanel', {
     saveUrl:'http://192.168.253.31:8560/api/account/role/save/bind/resource',
     saveUrl:'http://192.168.253.31:8560/api/account/role/save/bind/resource',
 
 
     items: [{
     items: [{
-        title:'角色列表',
         region:'west',
         region:'west',
         xtype: 'sys-power-treepanel',
         xtype: 'sys-power-treepanel',
         layout:'fit',
         layout:'fit',
@@ -26,7 +25,6 @@ Ext.define('saas.view.sys.power.FormPanel', {
         width: '20%',
         width: '20%',
         useArrows: true
         useArrows: true
     },{
     },{
-        title:'权限列表',
         margin:'0 0 0 5',
         margin:'0 0 0 5',
         region:'center',
         region:'center',
         layout:'fit',
         layout:'fit',

+ 13 - 19
frontend/saas-web/app/view/sys/power/GroupGrid.js

@@ -3,18 +3,16 @@
  */
  */
 Ext.define('saas.view.sys.power.GroupGrid', {
 Ext.define('saas.view.sys.power.GroupGrid', {
     extend: 'Ext.grid.Panel',
     extend: 'Ext.grid.Panel',
-    requires: [
-        'saas.view.sys.power.OtherField'
-    ],
     xtype: 'power-grid',
     xtype: 'power-grid',
     bind:{
     bind:{
         store: '{powergrid}'
         store: '{powergrid}'
     },
     },
-    tools:[{
+    tbar:['->',{
         xtype:'button',				
         xtype:'button',				
         text:'保存',
         text:'保存',
         name:'savepower',
         name:'savepower',
-        margin:'0 0 0 2',
+        margin:'0 10 0 2',
+        cls:'x-formpanel-btn-orange',
         style:'background:#da8282;border-color:#cccccc'
         style:'background:#da8282;border-color:#cccccc'
     }],
     }],
     features : [Ext.create('Ext.grid.feature.Grouping',{
     features : [Ext.create('Ext.grid.feature.Grouping',{
@@ -27,18 +25,19 @@ Ext.define('saas.view.sys.power.GroupGrid', {
 	})],
 	})],
     initId:0,
     initId:0,
     dataUrl:'http://192.168.253.31:8560/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,
+    selModel: {
         showHeaderCheckbox:false,
         showHeaderCheckbox:false,
-        listeners: {
-            'select': function (selModel, record) {
+        checkOnly:true,
+        type:'checkboxmodel',
+        listeners:{
+            select:function(selModel,record,c,d){
                 selModel.view.ownerCt.selectAllPower(record);
                 selModel.view.ownerCt.selectAllPower(record);
             },
             },
-            'deselect': function (selModel, record) {
+            deselect:function(selModel,record){
                 selModel.view.ownerCt.deselectAllPower(record);
                 selModel.view.ownerCt.deselectAllPower(record);
             }
             }
-        }
-    }),
+         }
+    },
     viewConfig: {
     viewConfig: {
      stripeRows: false,
      stripeRows: false,
      enableTextSelection: false,
      enableTextSelection: false,
@@ -50,7 +49,8 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         dataIndex: 'groupName',
         dataIndex: 'groupName',
         xtype: '',
         xtype: '',
         flex: 2,
         flex: 2,
-        stopSelection: false
+        stopSelection: false,
+        menuDisabled:true,
     },{
     },{
         header: '查询',
         header: '查询',
         dataIndex: 'query',
         dataIndex: 'query',
@@ -406,12 +406,6 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         me.callParent(arguments);
         me.callParent(arguments);
     },
     },
 
 
-    defaultListenerScope: true,
-
-    listeners: {
-        columnshow: 'onColumnToggle',
-        columnhide: 'onColumnToggle',
-    },
     selectAllPower: function(record){
     selectAllPower: function(record){
         var me = this;
         var me = this;
         me.setAllOthers(record,true);
         me.setAllOthers(record,true);

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

@@ -92,7 +92,6 @@ Ext.define('saas.view.sys.power.TreePanel', {
                 var grid = view.ownerCt.ownerCt.query('power-grid')[0];
                 var grid = view.ownerCt.ownerCt.query('power-grid')[0];
                 grid.initId = id;
                 grid.initId = id;
                 grid.store.load();
                 grid.store.load();
-                grid.store.group('moduleName', 'ASC');
             }
             }
         }
         }
     },
     },