Browse Source

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

zhoudw 7 years ago
parent
commit
991f3b67be
95 changed files with 1437 additions and 646 deletions
  1. 6 3
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 34 5
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ExcelServiceImpl.java
  3. 4 4
      applications/commons/commons-server/src/main/resources/mapper/CommonMapper.xml
  4. 20 0
      applications/money/money-dto/src/main/java/com/usoftchina/saas/money/dto/VerificationDTO.java
  5. 29 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/MoneyReportColltroller.java
  6. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/VerificationController.java
  7. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java
  8. 12 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/CustmonthMapper.java
  9. 12 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VendmonthMapper.java
  10. 103 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Custmonth.java
  11. 103 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Vendmonth.java
  12. 20 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Verification.java
  13. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/MoneyReportService.java
  14. 92 18
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/MoneyReportServiceImpl.java
  15. 41 41
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  16. 46 46
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  17. 10 13
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java
  18. 25 0
      applications/money/money-server/src/main/resources/mapper/BanksubledgerMapper.xml
  19. 45 0
      applications/money/money-server/src/main/resources/mapper/CustmonthMapper.xml
  20. 1 0
      applications/money/money-server/src/main/resources/mapper/CustomerCheckViewMapper.xml
  21. 42 0
      applications/money/money-server/src/main/resources/mapper/VendmonthMapper.xml
  22. 1 0
      applications/money/money-server/src/main/resources/mapper/VendorAcountViewMapper.xml
  23. 19 1
      applications/money/money-server/src/main/resources/mapper/VerificationMapper.xml
  24. 2 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java
  25. 6 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java
  26. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java
  27. 2 0
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/SaleList.java
  28. 69 37
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  29. 1 0
      applications/sale/sale-server/src/main/resources/mapper/SaleListMapper.xml
  30. 26 6
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  31. 1 1
      base-servers/account/account-server/src/main/resources/application.yml
  32. 2 2
      base-servers/auth/sso-api/src/test/resources/application.yml
  33. 1 1
      frontend/saas-portal-web/config/dev.env.js
  34. 1 1
      frontend/saas-portal-web/config/index.js
  35. 1 1
      frontend/saas-portal-web/config/test.env.js
  36. 2 1
      frontend/saas-portal-web/src/components/conenter/enterprise.vue
  37. 17 34
      frontend/saas-portal-web/src/components/conenter/home.vue
  38. 17 6
      frontend/saas-portal-web/src/components/conenter/problem.vue
  39. 1 1
      frontend/saas-portal-web/src/components/footer/footer.vue
  40. 1 1
      frontend/saas-portal-web/src/pages/index/index.html
  41. 12 2
      frontend/saas-web/app/Application.scss
  42. 22 20
      frontend/saas-web/app/view/core/base/BasePanelController.js
  43. 3 0
      frontend/saas-web/app/view/core/base/ImportWindow.js
  44. 22 20
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  45. 22 20
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  46. 4 3
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js
  47. 4 0
      frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js
  48. 22 20
      frontend/saas-web/app/view/core/form/MseeageLog.js
  49. 2 0
      frontend/saas-web/app/view/core/form/field/ConDateField.js
  50. 81 0
      frontend/saas-web/app/view/core/form/field/ConMonthField.js
  51. 10 14
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  52. 12 9
      frontend/saas-web/app/view/core/form/field/Month.js
  53. 1 1
      frontend/saas-web/app/view/core/query/QueryFormPanel.js
  54. 5 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  55. 44 40
      frontend/saas-web/app/view/core/query/QueryPanel.js
  56. 20 19
      frontend/saas-web/app/view/core/report/ReportPanel.js
  57. 1 0
      frontend/saas-web/app/view/document/bankinformation/Window.js
  58. 4 6
      frontend/saas-web/app/view/document/bom/BasePanel.js
  59. 8 13
      frontend/saas-web/app/view/document/customer/BasePanel.js
  60. 1 0
      frontend/saas-web/app/view/document/employee/Window.js
  61. 6 7
      frontend/saas-web/app/view/document/kind/ChildForm.js
  62. 4 11
      frontend/saas-web/app/view/document/product/BasePanel.js
  63. 2 1
      frontend/saas-web/app/view/document/product/FormController.js
  64. 7 11
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  65. 1 0
      frontend/saas-web/app/view/document/warehouse/Window.js
  66. 1 1
      frontend/saas-web/app/view/home/infoCardList/PurchaseIn.js
  67. 1 1
      frontend/saas-web/app/view/home/infoCardList/SaleOut.js
  68. 1 1
      frontend/saas-web/app/view/main/Main.js
  69. 1 0
      frontend/saas-web/app/view/main/Navigation.scss
  70. 6 9
      frontend/saas-web/app/view/money/report/TotalPayDetail.js
  71. 6 9
      frontend/saas-web/app/view/money/report/TotalRecDetail.js
  72. 5 1
      frontend/saas-web/app/view/money/verification/QueryPanelModel.js
  73. 2 4
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  74. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  75. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  76. 2 1
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  77. 15 2
      frontend/saas-web/app/view/sale/report/Sale.js
  78. 4 0
      frontend/saas-web/app/view/sale/report/SaleProfit.js
  79. 2 1
      frontend/saas-web/app/view/sale/report/SaleRec.js
  80. 9 7
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  81. 3 1
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  82. 3 1
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  83. 1 1
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  84. 1 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  85. 10 10
      frontend/saas-web/app/view/stock/report/Prodiodetail.js
  86. 92 53
      frontend/saas-web/app/view/sys/account/AddWindow.js
  87. 23 21
      frontend/saas-web/app/view/sys/account/DataList.js
  88. 3 3
      frontend/saas-web/app/view/sys/account/EditWindow.js
  89. 22 20
      frontend/saas-web/app/view/sys/finish/DataList.js
  90. 22 20
      frontend/saas-web/app/view/sys/maxnumbers/DataList.js
  91. 22 20
      frontend/saas-web/app/view/sys/messagelog/DataList.js
  92. 5 3
      frontend/saas-web/ext/packages/ux/src/feature/MySummary.js
  93. 1 1
      frontend/saas-web/index.html
  94. 6 0
      frontend/saas-web/overrides/window/MessageBox.js
  95. 11 11
      frontend/saas-web/resources/json/navigation.json

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

@@ -74,19 +74,22 @@ public enum BizExceptionCode implements BaseExceptionCode {
 
     //销售
     SALE_ALL_TURNOUT(72000, "该销售单已全部转出货,无法转出货单"),
-    SALE_CLOSE(72001, "单据已关闭,无法进行操作"),
+    SALE_CLOSE(72001, "单据已关闭,无法%s"),
     SALE_YQTYBEYONDQTY(72001, "明细行已转数量大于数量"),
     SALE_NULL_BILL(72002, "单据不存在或者明细为空"),
     SALEOUT_ALL_TURNIN(72003, "该出货单已全部转退货,无法转销售退货单"),
-    SALEOUT_POSTSTATUS_ERROR(72004,"当前单据状态无法进行此操作"),
+    SALEOUT_POSTSTATUS_ERROR(72004,"当前单据状态无法进行此操作"),
     SALEOUT_POST_ERROR(72005,"编号:<u>%s</u>处理失败,%s"),
     SALEOUT_UNAUDIT_ERROR(72006,"销售订单已转出货单,无法反审核"),
     SALE_ORDER_HASAUDIT(72003, "存在已审核单据,单据编号:%s"),
     SALE_EXISTS_PURCHASE(72004, "存在已转的采购单据,单据编号:%s"),
-    SALE_ALREADY_UNAUDIT(72007, "单据状态为未审核,无法反审核"),
+    SALE_ALREADY_UNAUDIT(72007, "反审核失败!该单据非审核状态"),
     SALE_CUST_CLOSE(72008, "客户已关闭,无法审核"),
     SALE_ORDER_ISUNAUDIT(72009, "存在未审核单据,单据编号:%s"),
     SALE_ORDER_ISCOLSED(72010, "存在已关闭单据,单据编号:%s"),
+    SALE_ORDER_CUSTBANDED(72011, "存在已禁用客户,无法%s,单据编号:"),
+    SALE_CUSTBANDED(72013, "存在已禁用客户,无法%s"),
+    SALE_AUDITED(72014,"审核失败!该单据已审核"),
     //资金
     PAYBALANCE_OUTNOWBALANCE(74001,"本次核销金额不能大于未核销金额"),
     PAYBALANCE_UNIQUESOURCECODE(74002, "保存失败!不能选择重复的源单"),

+ 34 - 5
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ExcelServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.commons.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.google.common.collect.Lists;
 import com.usoftchina.saas.commons.dto.ProductBaseDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.mapper.DataImportDetailMapper;
@@ -25,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
 import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
 /**
  * @author: guq
@@ -74,6 +76,7 @@ public class ExcelServiceImpl implements ExcelService{
     }
 
     @Override
+    @Transactional
     public Integer parseTemplet(Workbook wb, String caller) {
         if (wb == null || StringUtils.isEmpty(caller)) {
             throw new BizException(BizExceptionCode.NULL_DATA);
@@ -112,19 +115,19 @@ public class ExcelServiceImpl implements ExcelService{
         //获取最大列数
         int colnum = row.getPhysicalNumberOfCells();
         String key = null;
+        Map<String,String> map = null;
         //添加keys
-        for (int j = 0;j < colnum; j++){
+        for (int j = 0; j < colnum; j++){
             key = (String) getCellFormatValue(row.getCell(j));
             keys.add(key);
         }
         //存储数据
         for (int i = 2; i < rownum; i++) {
-            Map<String,String> map = new LinkedHashMap<String,String>();
+            map = new LinkedHashMap<String,String>();
             row = sheet.getRow(i);
             if(row !=null){
                 for (int j = 0;j < colnum; j++){
                     cellData = (String) getCellFormatValue(row.getCell(j));
-                    //检测字段必填与否
                     map.put(keys.get(j), cellData);
                 }
             }else{
@@ -134,6 +137,7 @@ public class ExcelServiceImpl implements ExcelService{
         }
         dataImportMapper.insertSelective(di);
         Integer keyvalue = di.getDi_id();
+        List<String> validateCode = Lists.newArrayList();
         //数据转换成字段
         if (!CollectionUtils.isEmpty(datas)) {
             StringBuilder err = new StringBuilder();
@@ -169,6 +173,7 @@ public class ExcelServiceImpl implements ExcelService{
                                mainData = new JSONObject();
                                codeValue = value;
                                difference = true;
+                               validateCode.add(codeValue);
                            }
                            //检查是否是同一单
                            if (set.isCodefield() && data.get("*" + set.getDescription()).equals("")) {
@@ -213,7 +218,8 @@ public class ExcelServiceImpl implements ExcelService{
                                value = data.get(set.getDescription());
                            }
                            if ("true".equals(set.getNecessary()) && value.equals("")) {
-                               err.append("第" + (i + 3) + "行 " + set.getDescription() + " 必填字段未填写!<br/> ");
+                               detailData = null;
+                               //err.append("第" + (i + 3) + "行 " + set.getDescription() + " 必填字段未填写!<br/> ");
                                break;
                            }
                            //检测日期类型是否规范
@@ -227,7 +233,7 @@ public class ExcelServiceImpl implements ExcelService{
                            //拼从表数据
                            detailData.put(set.getField(), value);
                        }
-                       if (detailData.size() > 0) {
+                       if (null != detailData && detailData.size() > 0) {
                            dd.setDd_codevalue(codeValue);
                            dd.setDd_detaildata(detailData.toJSONString());
                        }
@@ -235,6 +241,11 @@ public class ExcelServiceImpl implements ExcelService{
                 }
                 dataImportDetailMapper.insertSelective(dd);
             }
+            //重复编号检测
+            List<String> samecode = getDuplicateElements(validateCode);
+            if (null != samecode && samecode.size() > 0) {
+                err.append("下列编号重复: " + printList(samecode) + " 请确认无误后再上传!");
+            }
             //必填项检查
             if (err.length() > 0) {
                 dataImportMapper.updateErr(err.toString(), keyvalue);
@@ -244,6 +255,24 @@ public class ExcelServiceImpl implements ExcelService{
         return keyvalue;
     }
 
+    private  <E> List<E> getDuplicateElements(List<E> list) {
+        return list.stream() // list 对应的 Stream
+                .collect(Collectors.toMap(e -> e, e -> 1, (a, b) -> a + b)) // 获得元素出现频率的 Map,键为元素,值为元素出现的次数
+                .entrySet().stream() // 所有 entry 对应的 Stream
+                .filter(entry -> entry.getValue() > 1) // 过滤出元素出现次数大于 1 的 entry
+                .map(entry -> entry.getKey()) // 获得 entry 的键(重复元素)对应的 Stream
+                .collect(Collectors.toList());  // 转化为 List
+    }
+
+    private String printList(List list) {
+        String result = null;
+        if (!StringUtils.isEmpty(list)) {
+            result = list.toString().substring(1, list.toString().length() - 1);
+        }
+        return result;
+    }
+
+
 
 
     private boolean validateDateFormat(String date) {

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

@@ -2,17 +2,17 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.usoftchina.saas.commons.mapper.CommonMapper" >
     <select id="getCountWarehouse" resultType="int">
-        SELECT COUNT(*) FROM WAREHOUSE WHERE COMPANYID=#{companyId} AND WH_STATUSCODE = 'OPEN'
+        SELECT COUNT(*) FROM WAREHOUSE WHERE COMPANYID=#{companyId} AND WH_STATUSCODE = 'ENABLE'
     </select>
     <select id="getCountProduct" resultType="int">
-        SELECT COUNT(*) FROM PRODUCT WHERE COMPANYID=#{companyId} AND PR_STATUSCODE = 'OPEN'
+        SELECT COUNT(*) FROM PRODUCT WHERE COMPANYID=#{companyId} AND PR_STATUSCODE = 'ENABLE'
     </select>
     <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 = 'ENABLE'
     </select>
 
     <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 = 'ENABLE'
     </select>
 
     <update id="commonAudit" parameterType="string">

+ 20 - 0
applications/money/money-dto/src/main/java/com/usoftchina/saas/money/dto/VerificationDTO.java

@@ -68,6 +68,26 @@ public class VerificationDTO extends  CommonBaseDTO implements Serializable {
 
     private String vc_text5;
 
+    private Date vc_auditdate;
+
+    private String vc_auditman;
+
+    public Date getVc_auditdate() {
+        return vc_auditdate;
+    }
+
+    public void setVc_auditdate(Date vc_auditdate) {
+        this.vc_auditdate = vc_auditdate;
+    }
+
+    public String getVc_auditman() {
+        return vc_auditman;
+    }
+
+    public void setVc_auditman(String vc_auditman) {
+        this.vc_auditman = vc_auditman;
+    }
+
     public Integer getVc_id() {
         return vc_id;
     }

+ 29 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/MoneyReportColltroller.java

@@ -58,10 +58,38 @@ public class MoneyReportColltroller {
         return Result.success(listData);
     }
 
-    //冲账明细表
+    //核销明细表
     @GetMapping("/accountdetails")
     public Result accountdetails(PageRequest page, ListReqDTO req) {
         Map<String, Object> listData = moneyReportService.accountdetails(page, req);
         return Result.success(listData);
     }
+
+    //应付总账
+    @GetMapping("/vendormonthdetails")
+    public Result vendormonthdetails(PageRequest page, ListReqDTO req) {
+        Map<String, Object> listData = moneyReportService.vendormonthdetails(page, req);
+        return Result.success(listData);
+    }
+
+    //应收总账
+    @GetMapping("/custormonthdetails")
+    public Result custormonthdetails(PageRequest page, ListReqDTO req) {
+        Map<String, Object> listData = moneyReportService.custormonthdetails(page, req);
+        return Result.success(listData);
+    }
+
+    //其他收支明细表
+    @GetMapping("/othrinoutdetails")
+    public Result othrinoutdetails(PageRequest page, ListReqDTO req) {
+        Map<String, Object> listData = moneyReportService.othrinoutdetails(page, req);
+        return Result.success(listData);
+    }
+
+    //毛利润分析表
+    @GetMapping("/profitdetails")
+    public Result profitdetails(PageRequest page, ListReqDTO req) {
+        Map<String, Object> listData = moneyReportService.profitdetails(page, req);
+        return Result.success(listData);
+    }
 }

+ 10 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/VerificationController.java

@@ -13,6 +13,7 @@ import com.usoftchina.saas.money.po.VerificationList;
 import com.usoftchina.saas.money.service.VerificationService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -58,6 +59,7 @@ public class VerificationController {
      * @param form
      * @return
      */
+    @Transactional
     @RequestMapping("/save")
     public Result<DocSavedDTO> saveFormData(@RequestBody VerificationFormDTO form) {
         DocBaseDTO base = verificationService.saveFormData(form);
@@ -69,6 +71,7 @@ public class VerificationController {
      * @param id
      * @return
      */
+    @Transactional
     @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") Long id) {
         verificationService.delete(id);
@@ -80,6 +83,7 @@ public class VerificationController {
      * @param id
      * @return
      */
+    @Transactional
     @PostMapping("/deleteDetail1/{id}")
     public Result deleteDetail1(@PathVariable("id") Long id) {
         verificationService.deleteDetail1(id);
@@ -91,36 +95,42 @@ public class VerificationController {
      * @param id
      * @return
      */
+    @Transactional
     @PostMapping("/deleteDetail2/{id}")
     public Result deleteDetail2(@PathVariable("id") Long id) {
         verificationService.deleteDetail2(id);
         return Result.success();
     }
 
+    @Transactional
     @RequestMapping("/audit")
     public Result audit(@RequestBody VerificationFormDTO formDTO) {
         DocBaseDTO audit = verificationService.audit(formDTO);
         return Result.success(audit);
     }
 
+    @Transactional
     @RequestMapping("/unAudit/{id}")
     public Result resAudit(@PathVariable("id") Long id) {
         verificationService.resAudit(id);
         return Result.success();
     }
 
+    @Transactional
     @RequestMapping("/batchAudit")
     public Result batchAudit(@RequestBody  BatchDealBaseDTO body) {
         verificationService.batchAudit(body);
         return Result.success();
     }
 
+    @Transactional
     @RequestMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO body) {
         verificationService.batchUnAudit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/batchDelete")
     public Result batchDelete(@RequestBody BatchDealBaseDTO body) {
         verificationService.batchDelete(body);

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

@@ -39,4 +39,8 @@ public interface BanksubledgerMapper extends CommonBaseMapper<Banksubledger> {
     int updateBankcode(@Param("bk_thisamount") Double bk_thisamount, @Param("nowbalance") Double nowbalance,
                        @Param("bankcode") String bankcode, @Param("symbol") String symbol);
     Double selectThisamount(@Param("bankcode") String bankcode, @Param("companyId") Long companyId);
+
+
+    List<Banksubledger> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
 }

+ 12 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/CustmonthMapper.java

@@ -0,0 +1,12 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Custmonth;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+public interface CustmonthMapper {
+    List<Custmonth> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    void callCustm(Map<String, Integer> map);
+}

+ 12 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VendmonthMapper.java

@@ -0,0 +1,12 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Vendmonth;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+public interface VendmonthMapper {
+    List<Vendmonth> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    void callVend(Map<String, Integer> map);
+}

+ 103 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Custmonth.java

@@ -0,0 +1,103 @@
+package com.usoftchina.saas.money.po;
+
+public class Custmonth {
+    private Integer cm_id;
+
+    private Integer cm_yearmonth;
+
+    private Integer cm_custid;
+
+    private String cm_custcode;
+
+    private String cm_custname;
+
+    private Double cm_beginamount;
+
+    private Double cm_nowamount;
+
+    private Double cm_nowpreamount;
+
+    private Double cm_endamount;
+
+    private Integer companyid;
+
+    public Integer getCm_id() {
+        return cm_id;
+    }
+
+    public void setCm_id(Integer cm_id) {
+        this.cm_id = cm_id;
+    }
+
+    public Integer getCm_yearmonth() {
+        return cm_yearmonth;
+    }
+
+    public void setCm_yearmonth(Integer cm_yearmonth) {
+        this.cm_yearmonth = cm_yearmonth;
+    }
+
+    public Integer getCm_custid() {
+        return cm_custid;
+    }
+
+    public void setCm_custid(Integer cm_custid) {
+        this.cm_custid = cm_custid;
+    }
+
+    public String getCm_custcode() {
+        return cm_custcode;
+    }
+
+    public void setCm_custcode(String cm_custcode) {
+        this.cm_custcode = cm_custcode == null ? null : cm_custcode.trim();
+    }
+
+    public String getCm_custname() {
+        return cm_custname;
+    }
+
+    public void setCm_custname(String cm_custname) {
+        this.cm_custname = cm_custname == null ? null : cm_custname.trim();
+    }
+
+    public Double getCm_beginamount() {
+        return cm_beginamount;
+    }
+
+    public void setCm_beginamount(Double cm_beginamount) {
+        this.cm_beginamount = cm_beginamount;
+    }
+
+    public Double getCm_nowamount() {
+        return cm_nowamount;
+    }
+
+    public void setCm_nowamount(Double cm_nowamount) {
+        this.cm_nowamount = cm_nowamount;
+    }
+
+    public Double getCm_nowpreamount() {
+        return cm_nowpreamount;
+    }
+
+    public void setCm_nowpreamount(Double cm_nowpreamount) {
+        this.cm_nowpreamount = cm_nowpreamount;
+    }
+
+    public Double getCm_endamount() {
+        return cm_endamount;
+    }
+
+    public void setCm_endamount(Double cm_endamount) {
+        this.cm_endamount = cm_endamount;
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+}

+ 103 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Vendmonth.java

@@ -0,0 +1,103 @@
+package com.usoftchina.saas.money.po;
+
+public class Vendmonth {
+    private Integer vm_id;
+
+    private Integer vm_yearmonth;
+
+    private Integer vm_vendid;
+
+    private String vm_vendcode;
+
+    private String vm_vendname;
+
+    private Double vm_beginamount;
+
+    private Double vm_nowamount;
+
+    private Double vm_nowpreamount;
+
+    private Double vm_endamount;
+
+    private Integer companyid;
+
+    public Integer getVm_id() {
+        return vm_id;
+    }
+
+    public void setVm_id(Integer vm_id) {
+        this.vm_id = vm_id;
+    }
+
+    public Integer getVm_yearmonth() {
+        return vm_yearmonth;
+    }
+
+    public void setVm_yearmonth(Integer vm_yearmonth) {
+        this.vm_yearmonth = vm_yearmonth;
+    }
+
+    public Integer getVm_vendid() {
+        return vm_vendid;
+    }
+
+    public void setVm_vendid(Integer vm_vendid) {
+        this.vm_vendid = vm_vendid;
+    }
+
+    public String getVm_vendcode() {
+        return vm_vendcode;
+    }
+
+    public void setVm_vendcode(String vm_vendcode) {
+        this.vm_vendcode = vm_vendcode;
+    }
+
+    public String getVm_vendname() {
+        return vm_vendname;
+    }
+
+    public void setVm_vendname(String vm_vendname) {
+        this.vm_vendname = vm_vendname;
+    }
+
+    public Double getVm_beginamount() {
+        return vm_beginamount;
+    }
+
+    public void setVm_beginamount(Double vm_beginamount) {
+        this.vm_beginamount = vm_beginamount;
+    }
+
+    public Double getVm_nowamount() {
+        return vm_nowamount;
+    }
+
+    public void setVm_nowamount(Double vm_nowamount) {
+        this.vm_nowamount = vm_nowamount;
+    }
+
+    public Double getVm_nowpreamount() {
+        return vm_nowpreamount;
+    }
+
+    public void setVm_nowpreamount(Double vm_nowpreamount) {
+        this.vm_nowpreamount = vm_nowpreamount;
+    }
+
+    public Double getVm_endamount() {
+        return vm_endamount;
+    }
+
+    public void setVm_endamount(Double vm_endamount) {
+        this.vm_endamount = vm_endamount;
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+}

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Verification.java

@@ -65,6 +65,26 @@ public class Verification extends CommonBaseEntity implements Serializable {
 
     private String vc_text5;
 
+    private Date vc_auditdate;
+
+    private String vc_auditman;
+
+    public Date getVc_auditdate() {
+        return vc_auditdate;
+    }
+
+    public void setVc_auditdate(Date vc_auditdate) {
+        this.vc_auditdate = vc_auditdate;
+    }
+
+    public String getVc_auditman() {
+        return vc_auditman;
+    }
+
+    public void setVc_auditman(String vc_auditman) {
+        this.vc_auditman = vc_auditman;
+    }
+
     public Integer getVc_id() {
         return vc_id;
     }

+ 4 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/MoneyReportService.java

@@ -17,4 +17,8 @@ public interface MoneyReportService {
     Map<String, Object> acountBalance(PageRequest page, ListReqDTO req);
     Map<String, Object> customercheck(PageRequest page, ListReqDTO req);
     Map<String, Object> accountdetails(PageRequest page, ListReqDTO req);
+    Map<String, Object> vendormonthdetails(PageRequest page, ListReqDTO req);
+    Map<String, Object> custormonthdetails(PageRequest page, ListReqDTO req);
+    Map<String, Object> othrinoutdetails(PageRequest page, ListReqDTO req);
+    Map<String, Object> profitdetails(PageRequest page, ListReqDTO req);
 }

+ 92 - 18
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/MoneyReportServiceImpl.java

@@ -11,15 +11,13 @@ import com.usoftchina.saas.money.po.CustomerCheckView;
 import com.usoftchina.saas.money.po.VendorAcountView;
 import com.usoftchina.saas.money.po.VendOrCustAdd;
 import com.usoftchina.saas.money.service.MoneyReportService;
+import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @author heqw
@@ -39,6 +37,10 @@ public class MoneyReportServiceImpl implements MoneyReportService {
     private CustomerCheckViewMapper customerCheckViewMapper;
     @Autowired
     private AccountDetailsViewMapper accountDetailsViewMapper;
+    @Autowired
+    private VendmonthMapper vendmonthMapper;
+    @Autowired
+    private CustmonthMapper custmonthMapper;
 
     @Override
     public Map<String, Object> vendorCheck(PageRequest page, ListReqDTO req) {
@@ -70,22 +72,59 @@ public class MoneyReportServiceImpl implements MoneyReportService {
         return getListDATA(page, req, "accountdetails");
     }
 
-    private Map<String, Object> getListDATA(PageRequest page, ListReqDTO req, String type) {
-        //设置默认分页
+    @Override
+    public Map<String, Object> vendormonthdetails(PageRequest page, ListReqDTO req) {
+        return getListDATA(page, req, "vendormonthdetails");
+    }
+
+    @Override
+    public Map<String, Object> custormonthdetails(PageRequest page, ListReqDTO req) {
+        return getListDATA(page, req, "custormonthdetails");
+    }
+
+    @Override
+    public Map<String, Object> othrinoutdetails(PageRequest page, ListReqDTO req) {
+        return getListDATA(page, req, "othrinoutdetails");
+    }
+
+    @Override
+    public Map<String, Object> profitdetails(PageRequest page, ListReqDTO req) {
+        return getListDATA(page, req, "profitdetails");
+    }
+
+    private Map<String, Object> getListDATA(@PageDefault(size = 10) PageRequest page, ListReqDTO req, String type) {
+        if ("custormonthdetails".equals(type)){
+            Map map1 = this.getYm(req.getCondition());
+            Map<String, Integer> map = new HashMap();
+            map.put("v_YearMonth", Integer.valueOf((String) map1.get("yearmonth")));
+            map.put("v_YearMonthTo", Integer.valueOf((String) map1.get("yearmonthTo")));
+            map.put("v_companyid", Math.toIntExact(BaseContextHolder.getCompanyId()));
+            custmonthMapper.callCustm(map);
+        }else if ("vendormonthdetails".equals(type)){
+            Map map1 = this.getYm(req.getCondition());
+            Map<String, Integer> map = new HashMap();
+            map.put("v_YearMonth", Integer.valueOf((String) map1.get("yearmonth")));
+            map.put("v_YearMonthTo", Integer.valueOf((String) map1.get("yearmonthTo")));
+            map.put("v_companyid",  Math.toIntExact(BaseContextHolder.getCompanyId()));
+            vendmonthMapper.callVend(map);
+        }
+
+      /*  //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
             page.setNumber(1);
             page.setSize(10);
-        }
-        PageHelper.startPage(page.getNumber(), page.getSize());
-
-        //查询数据
-        Map<String, Object> map = getListByType(req, type);
-        //取分页信息
-        PageInfo lists = new PageInfo((List) map.get("list"));
-        map.remove("list");
-        map.put("list", lists);
-        return map;
+        }*/
+
+          PageHelper.startPage(page.getNumber(), page.getSize());
+
+          //查询数据
+          Map<String, Object> map = getListByType(req, type);
+          //取分页信息
+          PageInfo lists = new PageInfo((List) map.get("list"));
+          map.remove("list");
+          map.put("list", lists);
+          return map;
     }
 
     private Map<String, Object> getListByType(ListReqDTO req, String type) {
@@ -179,6 +218,13 @@ public class MoneyReportServiceImpl implements MoneyReportService {
             if (!StringUtils.isEmpty(calculateFieldsSql)) {
                 res = accountDetailsViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
             }
+        }else if("vendormonthdetails".equals(type)){
+            list = vendmonthMapper.selectByCondition(con, companyId);
+            res = null;
+        }else if ("custormonthdetails".equals(type)){
+            System.out.println("companyid"+companyId);
+            list = custmonthMapper.selectByCondition(con, companyId);
+            res = null;
         }
 
         try {
@@ -207,13 +253,41 @@ public class MoneyReportServiceImpl implements MoneyReportService {
                 Object type = jsonObject.get("type");
                 if ("date".equals(type)){
                     String value = (String) jsonObject.get("value");
-                    System.out.println("value" + value);
                     value = value.replace(",", "' and '");
                     con =  " a.sl_date between '" + value + "'" ;
-                    System.out.println("con"+con);
+                    return con;
                 }
             }
         }
         return con;
     }
+
+    //取两个期间
+    public Map<String, String> getYm(String cons){
+        System.out.println("cons:" + cons);
+        JSONArray jsonArray = JSONArray.parseArray(cons);
+        Map<String, String> map = new HashMap<>();
+        if (null != jsonArray && jsonArray.size() > 0) {
+            StringBuffer finalCondition = new StringBuffer();
+            for (int i = 0; i < jsonArray.size(); i++) {
+                JSONObject jsonObject = (JSONObject) jsonArray.get(i);
+//
+//                String yearmonth = "yearmonth";
+//                String yearmonthTo = "yearmonthTo";
+//                if (st.equals("vend")){
+//                    yearmonth = "vm_" + yearmonth;
+//                    yearmonthTo = "vm_" + yearmonthTo;
+//                }else if (st.equals("cust")){
+//                    yearmonth = "cm_" + yearmonth;
+//                    yearmonthTo = "cm_" + yearmonthTo;
+//                }
+                    String value = (String) jsonObject.get("value");
+                    String[] arr = value.split(",");
+                    map.put("yearmonth", arr[0]);
+                    map.put("yearmonthTo", arr[1]);
+            }
+        }
+        System.out.println("map:" + map);
+        return map;
+    }
 }

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

@@ -151,32 +151,32 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
          * cu_recamount=nvl(cu_recamount,0)-rb_rbdamount,
          * cu_leftamount=cu_beginaramount-cu_beginprerecamount+cu_recamount-cu_preamount;
          */
-        if (othreceipts.getOr_custid() != null && othreceipts.getOr_custid() != 0) {
-            Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(othreceipts.getOr_custid());
-            Double preamount = customerData.getCu_preamount() == null ? new Double(0) : customerData.getCu_preamount();
-            Double beginapamount = customerData.getCu_beginaramount() == null ? new Double(0) : customerData.getCu_beginaramount();
-            Double beginprepayamount = customerData.getCu_beginprerecamount() == null ? new Double(0) : customerData.getCu_beginprerecamount();
-            Double recamount = customerData.getCu_recamount() == null ? new Double(0) : customerData.getCu_recamount();
-
-            Customer customer = new Customer();
-            customer.setId(Long.valueOf(othreceipts.getOr_custid()));
-            customer.setCu_preamount(preamount);
-            customer.setCu_recamount(recamount + or_amount);
-            customer.setCu_leftamount(beginapamount - beginprepayamount + recamount + or_amount - preamount);
-            recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
-
-            //插入subledger中间表
-            Subledger subledger = new Subledger();
-            subledger.setSl_code(othreceipts.getOr_code());
-            subledger.setSl_kind("其他收入单");
-            subledger.setSl_custid(othreceipts.getOr_custid());
-            subledger.setSl_vendid(0);
-            subledger.setSl_date(othreceipts.getOr_date());
-            subledger.setSl_ym(DateUtils.getYm(othreceipts.getOr_date()));
-            subledger.setSl_amount(or_amount);
-            subledger.setCompanyId(BaseContextHolder.getCompanyId());
-            subledgerMapper.insertSelective(subledger);
-        }
+//        if (othreceipts.getOr_custid() != null && othreceipts.getOr_custid() != 0) {
+//            Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(othreceipts.getOr_custid());
+//            Double preamount = customerData.getCu_preamount() == null ? new Double(0) : customerData.getCu_preamount();
+//            Double beginapamount = customerData.getCu_beginaramount() == null ? new Double(0) : customerData.getCu_beginaramount();
+//            Double beginprepayamount = customerData.getCu_beginprerecamount() == null ? new Double(0) : customerData.getCu_beginprerecamount();
+//            Double recamount = customerData.getCu_recamount() == null ? new Double(0) : customerData.getCu_recamount();
+//
+//            Customer customer = new Customer();
+//            customer.setId(Long.valueOf(othreceipts.getOr_custid()));
+//            customer.setCu_preamount(preamount);
+//            customer.setCu_recamount(recamount + or_amount);
+//            customer.setCu_leftamount(beginapamount - beginprepayamount + recamount + or_amount - preamount);
+//            recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
+//
+//            //插入subledger中间表
+//            Subledger subledger = new Subledger();
+//            subledger.setSl_code(othreceipts.getOr_code());
+//            subledger.setSl_kind("其他收入单");
+//            subledger.setSl_custid(othreceipts.getOr_custid());
+//            subledger.setSl_vendid(0);
+//            subledger.setSl_date(othreceipts.getOr_date());
+//            subledger.setSl_ym(DateUtils.getYm(othreceipts.getOr_date()));
+//            subledger.setSl_amount(or_amount);
+//            subledger.setCompanyId(BaseContextHolder.getCompanyId());
+//            subledgerMapper.insertSelective(subledger);
+//        }
 
 
         //计算期间金额
@@ -249,21 +249,21 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
          * cu_recamount=nvl(cu_recamount,0)-rb_rbdamount,
          * cu_leftamount=cu_beginaramount-cu_beginprerecamount+cu_recamount-cu_preamount;
          */
-        if (othreceipts.getOr_custid() != null && othreceipts.getOr_custid() != 0) {
-            Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(othreceipts.getOr_custid());
-            Double preamount = customerData.getCu_preamount() == null ? new Double(0) : customerData.getCu_preamount();
-            Double beginapamount = customerData.getCu_beginaramount() == null ? new Double(0) : customerData.getCu_beginaramount();
-            Double beginprepayamount = customerData.getCu_beginprerecamount() == null ? new Double(0) : customerData.getCu_beginprerecamount();
-            Double recamount = customerData.getCu_recamount() == null ? new Double(0) : customerData.getCu_recamount();
-
-            Customer customer = new Customer();
-            customer.setId(Long.valueOf(othreceipts.getOr_custid()));
-            customer.setCu_preamount(preamount);
-            customer.setCu_recamount(recamount - or_amount);
-            customer.setCu_leftamount(beginapamount - beginprepayamount + recamount - or_amount - preamount);
-            recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
-            subledgerMapper.deleteByPrimaryKey(othreceipts.getOr_code(), "其他收入单",BaseContextHolder.getCompanyId());
-        }
+//        if (othreceipts.getOr_custid() != null && othreceipts.getOr_custid() != 0) {
+//            Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(othreceipts.getOr_custid());
+//            Double preamount = customerData.getCu_preamount() == null ? new Double(0) : customerData.getCu_preamount();
+//            Double beginapamount = customerData.getCu_beginaramount() == null ? new Double(0) : customerData.getCu_beginaramount();
+//            Double beginprepayamount = customerData.getCu_beginprerecamount() == null ? new Double(0) : customerData.getCu_beginprerecamount();
+//            Double recamount = customerData.getCu_recamount() == null ? new Double(0) : customerData.getCu_recamount();
+//
+//            Customer customer = new Customer();
+//            customer.setId(Long.valueOf(othreceipts.getOr_custid()));
+//            customer.setCu_preamount(preamount);
+//            customer.setCu_recamount(recamount - or_amount);
+//            customer.setCu_leftamount(beginapamount - beginprepayamount + recamount - or_amount - preamount);
+//            recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
+//            subledgerMapper.deleteByPrimaryKey(othreceipts.getOr_code(), "其他收入单",BaseContextHolder.getCompanyId());
+//        }
 
 
         //计算期间金额

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

@@ -186,37 +186,37 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
         bankinformation.setBk_spending(spending + bk_amount);
         bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
 
-        /**
-         * ve_preamount=nvl(ve_preamount,0)+pb_preamount,
-         * ve_payamount=nvl(ve_payamount,0)-pb_pbdamount,
-         * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
-         */
-        if (othspendings.getOs_vendid() != null && othspendings.getOs_vendid() != 0) {
-            Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(othspendings.getOs_vendid());
-            Double preamount = vendorData.getVe_preamount() == null ? new Double(0) : vendorData.getVe_preamount();
-            Double beginapamount = vendorData.getVe_beginapamount() == null ? new Double(0) : vendorData.getVe_beginapamount();
-            Double beginprepayamount = vendorData.getVe_beginprepayamount() == null ? new Double(0) : vendorData.getVe_beginprepayamount();
-            Double payamount = vendorData.getVe_payamount() == null ? new Double(0) : vendorData.getVe_payamount();
-
-            Vendor vendor = new Vendor();
-            vendor.setId(Long.valueOf(othspendings.getOs_vendid()));
-            vendor.setVe_preamount(preamount);
-            vendor.setVe_payamount(payamount - bk_amount);
-            vendor.setVe_leftamount(beginapamount - beginprepayamount + payamount - bk_amount - preamount);
-            paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
+//        /**
+//         * ve_preamount=nvl(ve_preamount,0)+pb_preamount,
+//         * ve_payamount=nvl(ve_payamount,0)-pb_pbdamount,
+//         * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
+//         */
+//        if (othspendings.getOs_vendid() != null && othspendings.getOs_vendid() != 0) {
+//            Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(othspendings.getOs_vendid());
+//            Double preamount = vendorData.getVe_preamount() == null ? new Double(0) : vendorData.getVe_preamount();
+//            Double beginapamount = vendorData.getVe_beginapamount() == null ? new Double(0) : vendorData.getVe_beginapamount();
+//            Double beginprepayamount = vendorData.getVe_beginprepayamount() == null ? new Double(0) : vendorData.getVe_beginprepayamount();
+//            Double payamount = vendorData.getVe_payamount() == null ? new Double(0) : vendorData.getVe_payamount();
+//
+//            Vendor vendor = new Vendor();
+//            vendor.setId(Long.valueOf(othspendings.getOs_vendid()));
+//            vendor.setVe_preamount(preamount);
+//            vendor.setVe_payamount(payamount - bk_amount);
+//            vendor.setVe_leftamount(beginapamount - beginprepayamount + payamount - bk_amount - preamount);
+//            paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
 
             //插入subledger中间表
-            Subledger subledger = new Subledger();
-            subledger.setSl_code(othspendings.getOs_code());
-            subledger.setSl_kind("其他支出单");
-            subledger.setSl_custid(0);
-            subledger.setSl_vendid(othspendings.getOs_vendid());
-            subledger.setSl_date(othspendings.getOs_date());
-            subledger.setSl_ym(DateUtils.getYm(othspendings.getOs_date()));
-            subledger.setSl_amount(bk_amount);
-            subledger.setCompanyId(BaseContextHolder.getCompanyId());
-            subledgerMapper.insertSelective(subledger);
-        }
+//            Subledger subledger = new Subledger();
+//            subledger.setSl_code(othspendings.getOs_code());
+//            subledger.setSl_kind("其他支出单");
+//            subledger.setSl_custid(0);
+//            subledger.setSl_vendid(othspendings.getOs_vendid());
+//            subledger.setSl_date(othspendings.getOs_date());
+//            subledger.setSl_ym(DateUtils.getYm(othspendings.getOs_date()));
+//            subledger.setSl_amount(bk_amount);
+//            subledger.setCompanyId(BaseContextHolder.getCompanyId());
+//            subledgerMapper.insertSelective(subledger);
+//        }
 
         //计算期间金额
         Statsinfo statsinfo = new Statsinfo();
@@ -282,22 +282,22 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
          * ve_payamount=nvl(ve_payamount,0)-pb_pbdamount,
          * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
          */
-        if (othspendings.getOs_vendid() != null && othspendings.getOs_vendid() != 0) {
-            Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(othspendings.getOs_vendid());
-            Double preamount = vendorData.getVe_preamount() == null ? new Double(0) : vendorData.getVe_preamount();
-            Double beginapamount = vendorData.getVe_beginapamount() == null ? new Double(0) : vendorData.getVe_beginapamount();
-            Double beginprepayamount = vendorData.getVe_beginprepayamount() == null ? new Double(0) : vendorData.getVe_beginprepayamount();
-            Double payamount = vendorData.getVe_payamount() == null ? new Double(0) : vendorData.getVe_payamount();
-
-            Vendor vendor = new Vendor();
-            vendor.setId(Long.valueOf(othspendings.getOs_vendid()));
-            vendor.setVe_preamount(preamount);
-            vendor.setVe_payamount(payamount + bk_amount);
-            vendor.setVe_leftamount(beginapamount - beginprepayamount + payamount + bk_amount - preamount);
-            paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
-
-            subledgerMapper.deleteByPrimaryKey(othspendings.getOs_code(), "其他支出单",BaseContextHolder.getCompanyId());
-        }
+//        if (othspendings.getOs_vendid() != null && othspendings.getOs_vendid() != 0) {
+//            Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(othspendings.getOs_vendid());
+//            Double preamount = vendorData.getVe_preamount() == null ? new Double(0) : vendorData.getVe_preamount();
+//            Double beginapamount = vendorData.getVe_beginapamount() == null ? new Double(0) : vendorData.getVe_beginapamount();
+//            Double beginprepayamount = vendorData.getVe_beginprepayamount() == null ? new Double(0) : vendorData.getVe_beginprepayamount();
+//            Double payamount = vendorData.getVe_payamount() == null ? new Double(0) : vendorData.getVe_payamount();
+//
+//            Vendor vendor = new Vendor();
+//            vendor.setId(Long.valueOf(othspendings.getOs_vendid()));
+//            vendor.setVe_preamount(preamount);
+//            vendor.setVe_payamount(payamount + bk_amount);
+//            vendor.setVe_leftamount(beginapamount - beginprepayamount + payamount + bk_amount - preamount);
+//            paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
+//
+//            subledgerMapper.deleteByPrimaryKey(othspendings.getOs_code(), "其他支出单",BaseContextHolder.getCompanyId());
+//        }
 
 
         //计算期间金额
@@ -425,7 +425,7 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             banksubledger.setBl_assid(othspendings.getOs_vendid());
             banksubledger.setBl_asscode(othspendings.getOs_vendcode());
             banksubledger.setBl_assname(othspendings.getOs_vendname());
-            banksubledger.setBl_income(othspendingsdetail.getOsd_nowbalance());
+            banksubledger.setBl_spending(othspendingsdetail.getOsd_nowbalance());
             banksubledger.setBl_remark(othspendingsdetail.getOsd_remark());
             banksubledger.setBl_orderamount(othspendingsdetail.getOsd_nowbalance() * -1);
             banksubledger.setBl_item(othspendingsdetail.getOsd_type());

+ 10 - 13
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -535,19 +535,14 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
 
     @Override
     public DocBaseDTO audit(VerificationFormDTO formData) {
-        Long id = null;
+
         DocBaseDTO baseDTO = new DocBaseDTO();
-        if (null != formData) {
-            id = formData.getMain().getId();
-            if (StringUtils.isEmpty(id)) {
-                baseDTO = saveFormData(formData);
-                id = baseDTO.getId();
-            }
-            Verification verification = new Verification();
-            verification.setVc_status(Status.AUDITED.getDisplay());
-            verification.setVc_statuscode(Status.AUDITED.name());
-            verification.setVc_id(Integer.valueOf(String.valueOf(id)));
-            verificationMapper.updateByPrimaryKeySelective(verification);
+        formData.getMain().setVc_status(Status.AUDITED.getDisplay());
+        formData.getMain().setVc_statuscode(Status.AUDITED.name());
+        formData.getMain().setVc_auditman(BaseContextHolder.getUserName());
+        formData.getMain().setVc_auditdate(new Date());
+        baseDTO = this.saveFormData(formData);
+        Long id = baseDTO.getId();
 
 
             VerificationDTO verificationDTO = formData.getMain();
@@ -575,7 +570,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
                     updateAuditSubledeger(detail.getVcd_slid(),nowbalanceDet);
                 }
             }
-        }
+
         //更新出入库状态
         this.updateProdInoutStatus(id);
 
@@ -793,6 +788,8 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         verification.setVc_statuscode(Status.UNAUDITED.name());
         verification.setUpdateTime(new Date());
         verification.setUpdaterId(BaseContextHolder.getUserId());
+        verification.setVc_auditdate(null);
+        verification.setVc_auditman(null);
         //更新存在字段
         verificationMapper.updateByPrimaryKeySelective(verification);
 

+ 25 - 0
applications/money/money-server/src/main/resources/mapper/BanksubledgerMapper.xml

@@ -454,5 +454,30 @@
     </select>
 
 
+    <select id="selectByCondition" resultMap="BaseResultMap">
+        select  bl_date, bl_code, bl_kind,bl_bankcode,bl_bankid, bl_bankname, bl_income, bl_spending, bl_assname, bl_remark
+        from banksubledger
+        <where>
+            <if test="con != null">
+                ${con}
+            </if>
+            <if test="companyId != null">
+                and  companyId = #{companyId} and bl_kind = '其他支出单' or bl_kind = '其他收入单'
+            </if>
+        </where>
+        order by bl_bankname asc, bl_date desc,bl_bankcode desc
+    </select>
+
+    <select id="selectCalculateFields" resultType="string">
+        select   ${fields}  from banksubledger
+        <where>
+            <if test="con != null">
+                ${con}
+            </if>
+            <if test="companyId != null">
+                and  companyId = #{companyId} and bl_kind = '其他支出单' or bl_kind = '其他收入单'
+            </if>
+        </where>
+    </select>
 
 </mapper>

+ 45 - 0
applications/money/money-server/src/main/resources/mapper/CustmonthMapper.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.money.mapper.CustmonthMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Custmonth" >
+    <id column="cm_id" property="cm_id" jdbcType="INTEGER" />
+    <result column="cm_yearmonth" property="cm_yearmonth" jdbcType="INTEGER" />
+    <result column="cm_custid" property="cm_custid" jdbcType="INTEGER" />
+    <result column="cm_custcode" property="cm_custcode" jdbcType="VARCHAR" />
+    <result column="cm_custname" property="cm_custname" jdbcType="VARCHAR" />
+    <result column="cm_beginamount" property="cm_beginamount" jdbcType="DOUBLE" />
+   <result column="cm_nowamount" property="cm_nowamount" jdbcType="DOUBLE" />
+    <result column="cm_nowpreamount" property="cm_nowpreamount" jdbcType="DOUBLE" />
+    <result column="cm_endamount" property="cm_endamount" jdbcType="DOUBLE" />
+    <result column="companyid" property="companyid" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    cm_id, cm_yearmonth, cm_custid, cm_custcode, cm_custname, CM_BEGINAMOUNT, CM_NOWAMOUNT, 
+    CM_NOWPREAMOUNT, CM_ENDAMOUNT, companyid
+  </sql>
+
+  <select id="selectByCondition" resultMap="BaseResultMap">
+    select  *  from custmonth
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+    order by cm_id desc, cm_yearmonth desc
+  </select>
+
+
+  <parameterMap id="ymParamMap" type="java.util.Map">
+    <parameter property="v_YearMonth" jdbcType="INTEGER" mode="IN" />
+    <parameter property="v_YearMonthTo" jdbcType="INTEGER" mode="IN" />
+    <parameter property="v_companyid" jdbcType="INTEGER" mode="IN" />
+  </parameterMap>
+
+  <select id="callCustm" parameterMap="ymParamMap" statementType="CALLABLE" >
+        CALL SP_REFRESHCUSTMONTHNEW(?, ?, ?)
+   </select>
+
+</mapper>

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

@@ -50,6 +50,7 @@
         <result column="beginamount" property="beginamount" jdbcType="DOUBLE" />
         <result column="nowamount" property="nowamount" jdbcType="DOUBLE" />
         <result column="nowpay" property="beginamount" jdbcType="DOUBLE" />
+        <result column="nowbalance" property="nowbalance" jdbcType="DOUBLE" />
     </resultMap>
     <select id="selectCustAdd" resultMap="BaseAddMap">
     select a.sl_orderamount as beginamount, b.nowamount, b.nowpay,(a.sl_orderamount +b.nowamount-b.nowpay) as nowbalance FROM

+ 42 - 0
applications/money/money-server/src/main/resources/mapper/VendmonthMapper.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.money.mapper.VendmonthMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Vendmonth" >
+    <id column="vm_id" property="vm_id" jdbcType="INTEGER" />
+    <result column="vm_yearmonth" property="vm_yearmonth" jdbcType="INTEGER" />
+    <result column="vm_vendid" property="vm_vendid" jdbcType="INTEGER" />
+    <result column="vm_vendcode" property="vm_vendcode" jdbcType="VARCHAR" />
+    <result column="vm_vendname" property="vm_vendname" jdbcType="VARCHAR" />
+    <result column="vm_beginamount" property="vm_beginamount" jdbcType="DOUBLE" />
+    <result column="vm_nowamount" property="vm_nowamount" jdbcType="DOUBLE" />
+    <result column="vm_nowpreamount" property="vm_nowpreamount" jdbcType="DOUBLE" />
+    <result column="vm_endamount" property="vm_endamount" jdbcType="DOUBLE" />
+    <result column="companyid" property="companyid" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    vm_id, vm_yearmonth, vm_vendid, VM_VENDCODE, VM_VENDNAME, VM_BEGINAMOUNT, VM_NOWAMOUNT, 
+    VM_NOWPREAMOUNT, VM_ENDAMOUNT, companyid
+  </sql>
+
+  <select id="selectByCondition" resultMap="BaseResultMap">
+    select  *  from vendmonth
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyid = #{companyId}
+      </if>
+    </where>
+    order by vm_id desc, vm_yearmonth desc
+  </select>
+
+  <parameterMap id="ymParamMap" type="java.util.Map">
+    <parameter property="v_YearMonth" jdbcType="INTEGER" mode="IN" />
+    <parameter property="v_YearMonthTo" jdbcType="INTEGER" mode="IN" />
+    <parameter property="v_companyid" jdbcType="INTEGER" mode="IN" />
+  </parameterMap>
+  <select id="callVend" parameterMap="ymParamMap" statementType="CALLABLE">
+        CALL SP_REFRESHVENDMONTHNEW(?, ?, ?)
+    </select>
+</mapper>

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

@@ -53,6 +53,7 @@
     <result column="beginamount" property="beginamount" jdbcType="DOUBLE" />
     <result column="nowamount" property="nowamount" jdbcType="DOUBLE" />
     <result column="nowpay" property="beginamount" jdbcType="DOUBLE" />
+    <result column="nowbalance" property="nowbalance" jdbcType="DOUBLE" />
   </resultMap>
   <select id="selectVendAdd" resultMap="BaseAddMap">
     select a.sl_orderamount as beginamount, b.nowamount, b.nowpay,(a.sl_orderamount +b.nowamount-b.nowpay) as nowbalance FROM

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

@@ -31,6 +31,10 @@
     <result column="vc_text3" property="vc_text3" jdbcType="VARCHAR" />
     <result column="vc_text4" property="vc_text4" jdbcType="VARCHAR" />
     <result column="vc_text5" property="vc_text5" jdbcType="VARCHAR" />
+    <result column="vc_auditman" property="vc_auditman" jdbcType="VARCHAR" />
+    <result column="vc_auditdate" property="vc_auditdate" jdbcType="TIMESTAMP" />
+    <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
+    <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Example_Where_Clause" >
     <where >
@@ -94,7 +98,7 @@
     vc_id, vc_code, vc_kind, vc_date, vc_vendid, vc_vendcode, vc_vendname, vc_custid, 
     vc_custcode, vc_custname, vc_turnvendid, vc_turnvendcode, vc_turnvendname, vc_turncustid, 
     vc_turncustcode, vc_turncustname, vc_amount1, vc_amount2, vc_status, vc_statuscode, vc_remark, companyId, updaterId, updateTime,
-    vc_text1, vc_text2, vc_text3, vc_text4, vc_text5
+    vc_text1, vc_text2, vc_text3, vc_text4, vc_text5, vc_auditman, vc_auditdate, createTime, creatorName
   </sql>
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.usoftchina.saas.money.po.VerificationExample" >
     select
@@ -235,6 +239,12 @@
       <if test="vc_text5 != null" >
         vc_text5,
       </if>
+      <if test="creatorName != null" >
+        creatorName,
+      </if>
+      <if test="createTime != null" >
+        createTime,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="vc_code != null" >
@@ -321,6 +331,12 @@
       <if test="vc_text5 != null" >
         #{vc_text5,jdbcType=VARCHAR},
       </if>
+      <if test="creatorName != null" >
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -549,6 +565,8 @@
       <if test="vc_text5 != null" >
         vc_text5 = #{vc_text5,jdbcType=VARCHAR},
       </if>
+        vc_auditman = #{vc_auditman,jdbcType=VARCHAR},
+        vc_auditdate = #{vc_auditdate,jdbcType=TIMESTAMP}
     </set>
     where vc_id = #{vc_id,jdbcType=INTEGER}
   </update>

+ 2 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java

@@ -59,4 +59,6 @@ public class SaleDTO extends CommonBaseDTO{
     private String sa_seller;
 
     private String sa_sellercode;
+
+    private Integer sa_sellerid;
 }

+ 6 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/mapper/SaleMapper.java

@@ -31,8 +31,12 @@ public interface SaleMapper extends CommonBaseMapper<Sale> {
 
     String validateUnAudit(Long id);
 
+    String validateCloseStatus(Long id);
+
     String validateAudit(List<DocBaseDTO> baseDTOs);
 
+    String validateAuditStatus(Long id);
+
     Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long companyId);
 
     void updateTotal(Long id);
@@ -57,5 +61,7 @@ public interface SaleMapper extends CommonBaseMapper<Sale> {
 
     String validateCustAudit(List<DocBaseDTO> baseDTOs);
 
+    String validateCustStatus(Long id);
+
     String validateClose(List<DocBaseDTO> baseDTOs);
 }

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

@@ -58,4 +58,6 @@ public class Sale extends CommonBaseEntity{
     private String sa_seller;
 
     private String sa_sellercode;
+
+    private Integer sa_sellerid;
 }

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

@@ -65,6 +65,8 @@ public class SaleList implements Serializable {
 
     private String sa_auditman;
 
+    private Integer sa_sellerid;
+
     private Integer sd_id;
 
     private Integer sd_said;

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

@@ -225,6 +225,21 @@ public class SaleServiceImpl implements SaleService{
                 baseDTO = saveFormData(formData);
                 id = baseDTO.getId();
             }
+            //审核失败!该单据已审核
+            String code = saleMapper.validateAuditStatus(id);
+            if (null != code) {
+                throw new BizException(BizExceptionCode.SALE_AUDITED);
+            }
+            //存在已禁用客户,无法审核:
+            code = saleMapper.validateCustStatus(id);
+            if (null != code) {
+                throw new BizException(BizExceptionCode.SALE_CUSTBANDED.getCode(),String.format(BizExceptionCode.SALE_CUSTBANDED.getMessage(),"审核"));
+            }
+            //单据状态为已关闭,无法审核
+            code = saleMapper.validateCloseStatus(id);
+            if (null != code) {
+                throw new BizException(BizExceptionCode.SALE_CLOSE.getCode(),String.format(BizExceptionCode.SALE_CLOSE.getMessage(),"审核"));
+            }
             singleAudit(id);
         }
         return baseDTO;
@@ -232,17 +247,6 @@ public class SaleServiceImpl implements SaleService{
 
     @Transactional
     private void singleAudit(Long id) {
-        /*Sale sale = new Sale();
-        //生成更新对象
-        sale.setId(id);
-        sale.setSa_status(Status.AUDITED.getDisplay());
-        sale.setSa_statuscode(Status.AUDITED.name());
-        sale.setUpdateTime(new Date());
-        sale.setUpdaterId(BaseContextHolder.getUserId());
-        sale.setSa_auditman("TESTADMIN");
-        sale.setSa_auditdate(new Date());
-        //更新存在字段
-        saleMapper.updateByPrimaryKeySelective(sale);*/
         Integer integer = saleMapper.checkCustomer(id);
         if (integer > 0) {
             throw new BizException(BizExceptionCode.SALE_CUST_CLOSE);
@@ -266,17 +270,7 @@ public class SaleServiceImpl implements SaleService{
                 baseDTOs.getBaseDTOs().size() == 0) {
             return;
         }
-
-        String validate = saleMapper.validateAudit(baseDTOs.getBaseDTOs());
-        if (!StringUtils.isEmpty(validate)) {
-            String message = BizExceptionCode.SALE_ORDER_HASAUDIT.getMessage();
-            int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
-            throw new BizException(code, String.format(message, validate));
-        }
-        String custAudit = saleMapper.validateCustAudit(baseDTOs.getBaseDTOs());
-        if (!StringUtils.isEmpty(custAudit)) {
-            throw new BizException(72009, "客户已关闭,无法审核, 单号:" + custAudit);
-        }
+        checkBatchAuditStatus(baseDTOs,"batchAudit");
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             singleAudit(base.getId());
         }
@@ -287,6 +281,7 @@ public class SaleServiceImpl implements SaleService{
         if (null == id) {
             return;
         }
+        //单据状态为未审核,无法反审核
         String code = saleMapper.validateUnAudit(id);
         if (null != code) {
             throw new BizException(BizExceptionCode.SALE_ALREADY_UNAUDIT);
@@ -328,20 +323,7 @@ public class SaleServiceImpl implements SaleService{
                 baseDTOs.getBaseDTOs().size() == 0) {
             return;
         }
-        //存在未审核单据,单据编号:XXXX
-        String msg = saleMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
-        if (null != msg) {
-            String message = BizExceptionCode.SALE_ORDER_ISUNAUDIT.getMessage();
-            int code = BizExceptionCode.SALE_ORDER_ISUNAUDIT.getCode();
-            throw new BizException(code, String.format(message, msg));
-        }
-        //存在已关闭单据,单据编号:XXXX
-        msg = saleMapper.validateClose(baseDTOs.getBaseDTOs());
-        if (null != msg) {
-            String message = BizExceptionCode.SALE_ORDER_ISCOLSED.getMessage();
-            int code = BizExceptionCode.SALE_ORDER_ISCOLSED.getCode();
-            throw new BizException(code, String.format(message, msg));
-        }
+        checkBatchAuditStatus(baseDTOs,"batchUnAudit");
         //saleMapper.BatchcheckSendStatus();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
             unAudit(base.getId());
@@ -444,7 +426,7 @@ public class SaleServiceImpl implements SaleService{
             throw new BizException(BizExceptionCode.SALE_ALL_TURNOUT);
         }
         if (Status.CLOSE.name().equals(statuscode)){
-            throw new BizException(BizExceptionCode.SALE_CLOSE);
+            throw new BizException(BizExceptionCode.SALE_CLOSE.getCode(),String.format(BizExceptionCode.SALE_CLOSE.getMessage(),"转出货单"));
         }
 
         //检查从表
@@ -710,4 +692,54 @@ public class SaleServiceImpl implements SaleService{
         return null;
     }
 
+    /**
+     * 批量审核、反审核状态校验
+     * */
+    private void checkBatchAuditStatus(BatchDealBaseDTO baseDTOs,String opation){
+        if(opation.equals("batchAudit")){
+            //存在已审核单据,单据编号:XXX
+            String validate = saleMapper.validateAudit(baseDTOs.getBaseDTOs());
+            if (!StringUtils.isEmpty(validate)) {
+                String message = BizExceptionCode.SALE_ORDER_HASAUDIT.getMessage();
+                int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
+                throw new BizException(code, String.format(message, validate));
+            }
+            //存在已关闭单据,单据编号:XXXX
+            validate = saleMapper.validateClose(baseDTOs.getBaseDTOs());
+            if (null != validate) {
+                String message = BizExceptionCode.SALE_ORDER_ISCOLSED.getMessage();
+                int code = BizExceptionCode.SALE_ORDER_ISCOLSED.getCode();
+                throw new BizException(code, String.format(message, validate));
+            }
+            //存在已禁用客户,无法审核,单据编号:XXX
+            String custAudit = saleMapper.validateCustAudit(baseDTOs.getBaseDTOs());
+            if (!StringUtils.isEmpty(custAudit)) {
+                String message = BizExceptionCode.SALE_ORDER_CUSTBANDED.getMessage();
+                int code = BizExceptionCode.SALE_ORDER_CUSTBANDED.getCode();
+                throw new BizException(code, String.format(message, "反审核")+custAudit);
+            }
+        }else{
+            //存在未审核单据,单据编号:XXXX
+            String msg = saleMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
+            if (null != msg) {
+                String message = BizExceptionCode.SALE_ORDER_ISUNAUDIT.getMessage();
+                int code = BizExceptionCode.SALE_ORDER_ISUNAUDIT.getCode();
+                throw new BizException(code, String.format(message, msg));
+            }
+            //存在已关闭单据,单据编号:XXXX
+            msg = saleMapper.validateClose(baseDTOs.getBaseDTOs());
+            if (null != msg) {
+                String message = BizExceptionCode.SALE_ORDER_ISCOLSED.getMessage();
+                int code = BizExceptionCode.SALE_ORDER_ISCOLSED.getCode();
+                throw new BizException(code, String.format(message, msg));
+            }
+            //存在已禁用客户,无法审核,单据编号:XXX
+            msg = saleMapper.validateCustAudit(baseDTOs.getBaseDTOs());
+            if (!StringUtils.isEmpty(msg)) {
+                String message = BizExceptionCode.SALE_ORDER_CUSTBANDED.getMessage();
+                int code = BizExceptionCode.SALE_ORDER_CUSTBANDED.getCode();
+                throw new BizException(code, String.format(message, "反审核")+msg);
+            }
+        }
+    }
 }

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

@@ -28,6 +28,7 @@
         <result column="sa_text3" property="sa_text3" jdbcType="VARCHAR" />
         <result column="sa_text4" property="sa_text4" jdbcType="VARCHAR" />
         <result column="sa_text5" property="sa_text5" jdbcType="VARCHAR" />
+        <result column="sa_sellerid" property="sa_sellerid" jdbcType="INTEGER" />
         <result column="sd_id" property="sd_id" jdbcType="INTEGER" />
         <result column="sd_said" property="sd_said" jdbcType="INTEGER" />
         <result column="sd_detno" property="sd_detno" jdbcType="INTEGER" />

+ 26 - 6
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -33,13 +33,14 @@
     <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
     <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP"/>
+    <result column="sa_sellerid" property="sa_sellerid" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     sa_id, sa_code, sa_custid, sa_custcode, sa_custname, sa_toplace, sa_total, sa_totalupper, 
     sa_remark, sa_status, sa_statuscode, sa_sendstatuscode, sa_sendstatus, sa_printstatus, 
     sa_printstatuscode,companyId, updaterId,
     updateTime, sa_text1, sa_text2, sa_text3, sa_text4, sa_text5,sa_auditman,sa_auditdate,
-    sa_seller,sa_sellercode,sa_date
+    sa_seller,sa_sellercode,sa_date,sa_sellerid
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select * from sale where sa_id = #{id}
@@ -56,7 +57,7 @@
       sa_sendstatus, sa_printstatus, sa_printstatuscode, 
       companyId, updaterId, updateTime,
       sa_text1, sa_text2, sa_text3, 
-      sa_text4, sa_text5)
+      sa_text4, sa_text5,sa_sellerid)
     values (#{sa_id,jdbcType=INTEGER}, #{sa_code,jdbcType=VARCHAR}, #{sa_custid,jdbcType=INTEGER}, 
       #{sa_custcode,jdbcType=VARCHAR}, #{sa_custname,jdbcType=VARCHAR}, #{sa_toplace,jdbcType=VARCHAR}, 
       #{sa_total,jdbcType=DOUBLE}, #{sa_totalupper,jdbcType=VARCHAR}, #{sa_remark,jdbcType=VARCHAR}, 
@@ -64,7 +65,7 @@
       #{sa_sendstatus,jdbcType=VARCHAR}, #{sa_printstatus,jdbcType=VARCHAR}, #{sa_printstatuscode,jdbcType=VARCHAR}, 
       #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP},
       #{sa_text1,jdbcType=VARCHAR}, #{sa_text2,jdbcType=VARCHAR}, #{sa_text3,jdbcType=VARCHAR}, 
-      #{sa_text4,jdbcType=VARCHAR}, #{sa_text5,jdbcType=VARCHAR})
+      #{sa_text4,jdbcType=VARCHAR}, #{sa_text5,jdbcType=VARCHAR},#{sa_sellerid,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.sale.po.Sale" >
     <selectKey  resultType="java.lang.Long" keyProperty="id">
@@ -147,6 +148,9 @@
       <if test="sa_date != null" >
         sa_date,
       </if>
+      <if test="sa_sellerid != null">
+        sa_sellerid,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="sa_code != null" >
@@ -224,6 +228,9 @@
       <if test="sa_date != null" >
         #{sa_date,jdbcType=TIMESTAMP},
       </if>
+      <if test="sa_sellerid != null" >
+        #{sa_sellerid,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.sale.po.Sale" >
@@ -310,6 +317,9 @@
       <if test="sa_date != null" >
         sa_date = #{sa_date,jdbcType=TIMESTAMP},
       </if>
+      <if test="sa_sellerid != null" >
+        sa_sellerid = #{sa_sellerid,jdbcType=INTEGER},
+      </if>
     </set>
     where sa_id = #{id,jdbcType=INTEGER}
   </update>
@@ -336,7 +346,8 @@
       sa_text2 = #{sa_text2,jdbcType=VARCHAR},
       sa_text3 = #{sa_text3,jdbcType=VARCHAR},
       sa_text4 = #{sa_text4,jdbcType=VARCHAR},
-      sa_text5 = #{sa_text5,jdbcType=VARCHAR}
+      sa_text5 = #{sa_text5,jdbcType=VARCHAR},
+      sa_sellerid = #{sa_sellerid,jdbcType=INTEGER}
     where sa_id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -356,20 +367,29 @@
       #{item.id}
     </foreach>
   </select>
+  <select id="validateAuditStatus" resultType="string" parameterType="long">
+    select sa_code from sale where IFNULL(sa_statuscode,' ')='AUDITED' and sa_id=#{id}
+  </select>
   <select id="validateClose" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
       select GROUP_CONCAT(sa_code) from sale where IFNULL(sa_sendstatuscode,' ')='CLOSE' and sa_id in
     <foreach collection="list" item="item" open="(" close=")" separator=",">
       #{item.id}
     </foreach>
   </select>
+  <select id="validateCloseStatus" resultType="string" parameterType="long">
+    select sa_code from sale where IFNULL(sa_sendstatuscode,' ')='CLOSE' and sa_id=#{id}
+  </select>
   <select id="validateCustAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
-    select GROUP_CONCAT(sa_code) from sale left join customer on cu_id=sa_custid  where sa_statuscode='AUDITED' and sa_id in
+    select GROUP_CONCAT(sa_code) from sale left join customer on cu_id=sa_custid  where IFNULL(sa_statuscode,' ')='AUDITED' and IFNULL(cu_statuscode,' ')='BANNED' and sa_id in
     <foreach collection="list" item="item" open="(" close=")" separator=",">
       #{item.id}
     </foreach>
   </select>
+  <select id="validateCustStatus" resultType="string" parameterType="long">
+    select sa_code from sale left join customer on cu_id=sa_custid  where IFNULL(cu_statuscode,' ')='BANNED' and sa_id=#{id}
+  </select>
   <select id="validateBatchUnAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
-    select GROUP_CONCAT(sa_code) from sale where IFNULL(sa_statuscode,'UNAUDITED') = 'UNAUDITED' and sa_id in
+    select GROUP_CONCAT(sa_code) from sale where IFNULL(sa_statuscode,' ') = 'UNAUDITED' and sa_id in
     <foreach collection="list" item="item" open="(" close=")" separator=",">
       #{item.id}
     </foreach>

+ 1 - 1
base-servers/account/account-server/src/main/resources/application.yml

@@ -83,7 +83,7 @@ auth:
   public-key: auth/pub.key
 sso:
 #  base-url: https://sso.ubtob.com
-  base-url: http://192.168.253.12:32323
+  base-url: https://tsso.usoftchina.com/
 ribbon:
   ReadTimeout: 6000
   ConnectTimeout: 2000

+ 2 - 2
base-servers/auth/sso-api/src/test/resources/application.yml

@@ -1,3 +1,3 @@
 sso:
-#  base-url: http://192.168.253.12:32323
-  base-url: https://sso.ubtob.com
+  base-url: https://tsso.usoftchina.com
+#  base-url: https://sso.ubtob.com

+ 1 - 1
frontend/saas-portal-web/config/dev.env.js

@@ -10,6 +10,6 @@ module.exports = merge(prodEnv, {
     // 后端接口网关
     api: '"https://saas-api-dev.usoftchina.com:5443"',
     // 账户中心接口
-    sso: '"https://sso-dev.usoftchina.com:5443"'
+    sso: '"https://tsso.usoftchina.com"'
   }
 })

+ 1 - 1
frontend/saas-portal-web/config/index.js

@@ -10,7 +10,7 @@ module.exports = {
     // Paths
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
-    proxyTable: {}, 
+    proxyTable: {},  
 
     // Various Dev Server settings
     // host: 'localhost', // can be overwritten by process.env.HOST

+ 1 - 1
frontend/saas-portal-web/config/test.env.js

@@ -10,6 +10,6 @@ module.exports = merge(devEnv, {
     // 后端接口网关
     api: '"https://saas-api-test.usoftchina.com:5443"',
     // 账户中心接口
-    sso: '"https://sso-dev.usoftchina.com:5443"'
+    sso: '"https://tsso.usoftchina.com"'
   }
 })

+ 2 - 1
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -1,6 +1,5 @@
 <template>
     <div class="div">
-        
         <div id="navigation" class="navbar-inverse navbar-fixed-top animated-header">
         <div class="container">
             <div class="navbar-header">
@@ -31,6 +30,7 @@
             </div>
         </div>
         </div>
+
         <iframe hidden :src="setTokenPage"></iframe>
         <div class="gs-worp">
             <!-- 顶部tab -->
@@ -131,6 +131,7 @@ import { setTimeout } from 'timers';
                 frame.postMessage('', '*')
                 Session.remove()
                 window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL=https://'+window.location.host
+                // this.$router.puth({path:'/home'})
             },
             //修改密码
             changpasd(){

+ 17 - 34
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -21,10 +21,8 @@
             <li><a href="https://www.usoftchina.com/" target="_blank"><span>优软云</span></a></li>
             <li>
               <a href="#feature"><span>特色</span></a>
-              <!-- <router-link to="/enterprise"><a href="#"><span>特色</span></a></router-link> -->
             </li>
             <li><a href="#service"><span>功能</span></a></li>
-            <!-- <li><a href="#prototype"><span>帮助中心</span></a></li> -->
             <li><a href="https://uas.usoftchina.com/about" target="_blank"><span>关于我们</span></a></li>
             <li class="login" v-if="!account" style="margin-left: 30px;">
               <span @click="login"><img src="/static/img/assets/denglu3x.png" alt="">登录  &nbsp;</span>
@@ -58,8 +56,6 @@
       <div class="tiyan" v-if="isexperience">
         <img @click="Closeexperience" class="tc-on ty-out" src="/static/img/qiye/x.png" alt="" />
         <div><img class="ty-logo" src="/static/img/assets/dalogo@2x.png" alt=""></div>
-        <!-- <div><p class="ty-logotxt">欢迎你访问U企云服</p></div> -->
-        <!-- <div class="ty-title"><span>填写手机号后,即刻体验电子行业贸易版所有功能</span></div> -->
         <div class="ty-phone over">
           <div class="left ty-input">
             <span><img style="margin: 6px 8px 10px 15px;" src="/static/img/assets/phone.png" alt=""></span>
@@ -265,23 +261,23 @@
         this.isproblem = true
       } else {
         this.isproblem = this.$route.params.isporblem
-      }
-        this.$ajax({
-          url: this.$url.api+'/api/auth/info',
-          method: 'get',
-          async:false,
-          withCredentials:true
-        })
-        .then(res=>{
-          const data=res.data.data,session = data.token, account = data.account
-          account.companies = account.companies || []
-          session.account = account
-          Session.set(session);
-          this.account = Session.getAccount();
-        })
-        .catch(err=>{
-          // console.log("请求失败",err)
-        })
+      };
+      this.$ajax({
+        url: this.$url.api+'/api/auth/info',
+        method: 'get',
+        async:false,
+        withCredentials:true
+      })
+      .then(res=>{
+        const data=res.data.data,session = data.token, account = data.account
+        account.companies = account.companies || []
+        session.account = account
+        Session.set(session);
+        this.account = Session.getAccount();
+      })
+      .catch(err=>{
+        // console.log("请求失败",err)
+      })
     },
     mounted() {
       this.clientId = Math.random().toString(36).substr(2)
@@ -362,7 +358,6 @@
       },
       //体验
       experience(){
-        console.log(123)
         this.isexperience = true;
       },
       //关闭体验
@@ -451,18 +446,6 @@
   width: 140px;
   margin: 15px 0 50px 13px;
 }
-.ty-logotxt {
-  font-family: PingFangSC-Regular;
-  font-size: 22px !important;
-  color: #059FFE;
-}
-.ty-title {
-  margin-top: 30px;
-  font-family: PingFangSC-Regular;
-  font-size: 14px;
-  color: #059FFE;
-  text-align: center;
-}
 .ty-input {
   width: 330px;
   height: 40px;

+ 17 - 6
frontend/saas-portal-web/src/components/conenter/problem.vue

@@ -18,7 +18,8 @@
                   <li v-for="(d , i) in list" :key="i">
                     <div class="over Text-title" @click="shows(d,i)">
                       <span class="left bz-yuandian"></span>
-                      <span ref="txttitle" class="left bz-txttitle">{{d.title}}</span>
+                      <!-- <span class="left bz-txttitle">{{d.title}}</span> -->
+                      <span class="left bz-txttitle" v-html="keyword(d.title,searchVal)"></span>
                       <img  class="right bz-copy" :class="d.isshow ? 'rotates' : 'norotate'" src="/static/img/Triangle Copy 4.png" alt="">
                     </div>
                     <div ref="title" class="Text-content" :class="d.isshow ? 'dispays' : 'hides'">
@@ -38,7 +39,7 @@
         data(){
           return {
             arr:[
-              {isshow: true, title:'1、如何注册开通优企云服?',centent:'警方圣诞快乐JFK的实力积分积分累积角度考虑实际疯狂的世界佛教埃及空军看见反抗类毒素解放就'},
+              {isshow: true, title:'1、如何注册开通U企云服?',centent:'答:首先进入【U企云服】(http://saas.usoftchina.com) 进行注册;已是优软云的企业用户,进入【U企云服】登陆后,在【账户中心】 选择企业点击【开通服务】即可开通。'},
               {isshow: false, title:'2、实际送货数量大于采购单数量如何操作?',centent:'答:若超出部份正好是贵司所需, 按实际收货数量修改采购验收数量(应付款是按已审核的采购验收单金额记账的'},
               {isshow: false, title:'3、为什么新增采购单据时有的物料可自动带出单价, 有的不能?',centent:'答:因为采购单中的单价取的是物料资料中的最新采购单价, 而最新采购单价是采购验收单审核后自动更新至物料资料中的。'},
               {isshow: false, title:'4、采购单分批次交货时,如何操作? 采购单界面点“转验收单”按钮时会将采购单中的所有都转过去。',centent:'答:采购验收单中可修改数量, 也可删除明细行。 删除后再次收货时在采购单界面点“转验收单”按钮时生成的采购验收单会显示之前删除的那行数据(即所有未交部份均可再显示)'},
@@ -64,18 +65,28 @@
             let textH =  this.$refs.text[i].offsetHeight;
             this.$refs.title[i].style.height = textH + 'px';
           },
+          //搜索文字高亮
+          keyword(val,word){
+            val = val + '';
+            if (val.indexOf(word) !== -1 && word !== '') {
+              return val.replace(word, '<font color="#409EFF">' + word + '</font>')
+            } else {
+              return val
+            }
+          },
         },
         //通过计算属性过滤数据
         computed:{
             list: function(){
-                var arrByZM = [];
+                let list = [];
+                let val = this.searchVal.replace(/\s+/g, "")//去除空格
                 for (var i=0;i<this.arr.length;i++){
-                    if(this.arr[i].title.search(this.searchVal) != -1){
+                    if(this.arr[i].title.search(val) != -1){
                         //判断输入框中的值是否可以匹配到数据,如果匹配成功添加到数组
-                        arrByZM.push(this.arr[i]);
+                      list.push(this.arr[i]);
                     }
                 }
-                return arrByZM;
+                return list;
             }
         }
     }

+ 1 - 1
frontend/saas-portal-web/src/components/footer/footer.vue

@@ -29,7 +29,7 @@
 						</ul>
 						<ul>
 							<li><span>产品</span></li>
-							<li><a href="#">企云服</a></li>
+							<li><a href="#">U企云服</a></li>
 							<li><a href="https://mall.usoftchina.com/" target="_blank">优软商城</a></li>
 							<li><a href="https://fin.yitoa-fintech.com/" target="_blank">优智融</a></li>
 							<li><a href="https://zb.usoftchina.com/" target="_blank">闯客网</a></li>

+ 1 - 1
frontend/saas-portal-web/src/pages/index/index.html

@@ -32,7 +32,7 @@
 
         <script src="./static/js/sockjs.min.js"></script>
         <script src="./static/js/stomp.min.js"></script>
-    <title>企云服</title>
+    <title>U企云服</title>
   </head>
   <body>
     <div id="app"></div>

+ 12 - 2
frontend/saas-web/app/Application.scss

@@ -153,6 +153,16 @@ body.launching {
   }
 }
 
+.x-btn-showicon{
+  .x-btn-wrap{
+    .x-btn-button{
+      .x-btn-inner{
+        color:#999 !important;
+      }
+    }
+  }
+}
+
 .x-keyboard-mode .x-btn-focus.x-btn-default-toolbar-small {
   background: inherit;
   opacity: 1;
@@ -411,8 +421,8 @@ div::-webkit-scrollbar-track {
   border-left: 1px solid #D2D6E5;
   
   &:before {
-    content: "\e80f";
-    font-family: font-saas;
+    // content: "\e80f";
+    // font-family: font-saas;
     color: #5AC6F8;
   }
 }

+ 22 - 20
frontend/saas-web/app/view/core/base/BasePanelController.js

@@ -36,28 +36,30 @@ Ext.define('saas.view.core.base.BasePanelController', {
             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
+            if(value&&value!=''){
+                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);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 3 - 0
frontend/saas-web/app/view/core/base/ImportWindow.js

@@ -98,6 +98,9 @@ Ext.define('saas.view.core.base.ImportWindow', {
                         if(!res.success){
                             saas.util.BaseUtil.showErrorToast('导入数据失败:' + res.message);
                         }else{
+                            //刷新界面
+                            var g = form.ownerCt.down('grid');
+                            g.store.loadPage(g.store.currentPage);
                             form.close();
                         }
                     },

+ 22 - 20
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -194,28 +194,30 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
             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
+            if(value&&value!=''){
+                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);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 22 - 20
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -377,28 +377,30 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
             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
+            if(value&&value!=''){
+                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);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

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

@@ -28,20 +28,21 @@ Ext.define('saas.view.core.dbfind.types.CustomerDbfindTrigger', {
         width:300
     }],
     dbColumns: [{
-        conditionCode: 'id',
         text: "客户ID",
         dataIndex: "id",
         hidden:true
     }, {
-        conditionCode: 'cu_code',
         text: "客户编号",
         dataIndex: "cu_code",
         width: 150
     }, {
-        conditionCode: 'cu_name',
         text: "客户名称",
         dataIndex: "cu_name",
         width: 200
+    }, {
+        text: "客户简称",
+        dataIndex: "cu_shortname",
+        width: 150
     }, {
         conditionCode: 'cu_type',
         text: "客户类型",

+ 4 - 0
frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js

@@ -41,6 +41,10 @@ Ext.define('saas.view.core.dbfind.types.VendorDbfindTrigger', {
         text: "供应商名称",
         dataIndex: "ve_name",
         width: 200
+    }, {
+        text: "供应商简称",
+        dataIndex: "ve_shortname",
+        width: 150
     }, {
         text: "供应商类型",
         dataIndex: "ve_type",

+ 22 - 20
frontend/saas-web/app/view/core/form/MseeageLog.js

@@ -155,28 +155,30 @@ Ext.define('saas.view.core.form.MseeageLog', {
             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
+            if(value&&value!=''){
+                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);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 2 - 0
frontend/saas-web/app/view/core/form/field/ConDateField.js

@@ -60,6 +60,7 @@ Ext.define('saas.view.core.form.field.ConDateField', {
             formatText: '',
             allowBlank: allowBlank,
             flex: 1,
+            editable:false,
             fieldStyle: me.fieldStyle,
             emptyText: '起始时间',
             //matchFieldWidth:true,
@@ -95,6 +96,7 @@ Ext.define('saas.view.core.form.field.ConDateField', {
             format: 'Y-m-d',
             formatText: '',
             flex: 1,
+            editable:false,
             fieldStyle: me.fieldStyle,
             emptyText: '结束时间',
             listeners: {

+ 81 - 0
frontend/saas-web/app/view/core/form/field/ConMonthField.js

@@ -0,0 +1,81 @@
+Ext.define('saas.view.core.form.field.ConMonthField', {
+    extend: 'Ext.form.FieldContainer',
+    alias: 'widget.conmonthfield',
+
+    layout: 'hbox',
+    items: [],
+    defaults: {
+        margin: '0 0 0 0'
+    },
+    columnWidth: 0.5,
+    defaultBindProperty: 'value',
+
+    combineErrors: true,
+
+    cls: 'x-conmonthfield',
+
+    initComponent : function(){
+        this.callParent(arguments);
+        var me = this, allowBlank = (Ext.isDefined(me.allowBlank) ? me.allowBlank : true);
+        me.from = me.insert(0, {
+            xtype: 'monthdatefield',
+            listeners: {
+                beforeChange: me.beforeFromChange,
+                change: me.fromChange
+            }
+        });
+        me.to = me.insert(1, {
+            xtype: 'monthdatefield',
+            listeners: {
+                beforeChange: me.beforeToChange,
+                change: me.toChange
+            }
+        });
+    },
+
+    setValue: function(value) {
+        this.value = value;
+        this.publishState('value', this.value);
+    },
+
+    beforeFromChange: function(picker, value) {
+        var container = picker.ownerCt,
+        toField = container.to,
+        toValue = toField.value;
+
+        if(Number(value) > Number(toValue)) {
+            toField.setValue('');
+        }
+        return true;
+    },
+
+    fromChange: function(picker, newValue, oldValue) {
+        var container = picker.ownerCt,
+        toField = container.to;
+        container.setValue({
+            from: newValue,
+            to: toField.value
+        });
+    },
+
+    beforeToChange: function(picker, value) {
+        var container = picker.ownerCt,
+        fromField = container.from,
+        fromValue = fromField.value;
+
+        if(Number(value) <= Number(fromValue)) {
+            return false;
+        }else {
+            return true;
+        }
+    },
+
+    toChange: function(picker, newValue, oldValue) {
+        var container = picker.ownerCt,
+        fromField = container.from;
+        container.setValue({
+            from: fromField.value,
+            to: newValue
+        });
+    }
+});

+ 10 - 14
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -217,25 +217,20 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         store.each(function(s) {
             var itemFields = s.fields,
             itemData = s.getData(),
+            detno = itemData[detnoColumn],
+            id = itemData.id,
             dirtyFields = [];
 
-            for(var x = 0; x < itemFields.length; x++) {
-                var field = itemFields[x],
-                name = field.name,
-                type = field.type;
-
-                if(type == 'int' && itemData[name] == 0) {
-                }else if(type == 'string' && itemData[name] == '') {
-                }else if(type == 'float' && itemData[name] == 0) {
-                }else if(type == 'date' && itemData[name] == null) {
-                }else {
-                    dirtyFields.push(name);
-                }
+            if(s.isDirty()) {
+                var modified = s.modified;
+                var dirtyFields = Ext.Object.getAllKeys(modified);
             }
 
-            // 如果有有效数据(非ID和序号列)才算dirty,否则直接commit
+            // 如果有有效数据才算dirty,否则直接commit
             if(dirtyFields.length == 2 && Ext.Array.contains(dirtyFields, 'id') && Ext.Array.contains(dirtyFields, detnoColumn)) {
-                s.commit()
+                s.commit();
+            }else if(!Ext.isNumber(id) && dirtyFields.length == 1 && dirtyFields[0] == detnoColumn) {
+                s.commit();
             }
         });
 
@@ -287,6 +282,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
             store.remove(selectedRecord);
             me.fireEvent('validChange');
         }
+        store.getAt(0) ? store.afterEdit(store.getAt(0), ['']) : null;
     },
 
     swapUp: function() {

+ 12 - 9
frontend/saas-web/app/view/core/form/field/Month.js

@@ -80,25 +80,32 @@ Ext.define('saas.view.core.form.field.Month', {
             month = Number(month) + 1;
             month = month < 10 ? '0' + month : month;
             year = year == null ? new Date().getFullYear() : year;
+
+            var v = year + '' + month;
             if (this.minValue) {
-                if (Number(year + '' + month) < this.minYearMonth) {
+                if (Number(v) < this.minYearMonth) {
                     return;
                 }
             }
             if (this.maxValue) {
-                if (Number(year + '' + month) > this.maxYearMonth) {
+                if (Number(v) > this.maxYearMonth) {
                     return;
                 }
             }
-            this.setValue(year + '' + month);
+            if(!this.fireEvent('beforeChange', this, v)) {
+                this.monthPicker.hide();
+                return;
+            }
+            this.setValue(v);
+            this.fireEvent('select', this, v);
         }
-        me.onSelect();
+        this.monthPicker.hide();
     },
     getCurrentVal:function(){
         return Ext.Date.format(new Date(),this.format);
     },
     onCancelClick: function() {
-        this.onSelect();
+        this.monthPicker.hide();
     },
     getPickerValues:function() {
         var val = this.value, year, month;
@@ -118,8 +125,4 @@ Ext.define('saas.view.core.form.field.Month', {
         }
         this.callParent(arguments);
     },
-    onSelect: function() {
-        this.monthPicker.hide();
-    }
-
 });

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

@@ -77,7 +77,7 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
     listeners: {
         boxReady:function(form){
             if(window.innerHeight - 110 >= 800){
-                form.setHeight(112);
+                form.setHeight(96);
             }
         },
         beforerender: function(form) {

+ 5 - 0
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -162,6 +162,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     text: '新增',
                     cls:'x-formpanel-btn-blue',
                     handler: 'onAddClick',
+                    hidden: true,
                     bind: {
                         hidden: '{!addEnable}'
                     }
@@ -184,12 +185,14 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                             } 
                         }
                     },
+                    hidden: true,
                     bind: {
                         hidden: '{!auditEnable}'
                     }
                 },  {
                     text: '导出',
                     handler: me.onExport,
+                    hidden: true,
                     bind: {
                         hidden: '{!importEnable}'
                     }
@@ -211,12 +214,14 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                             } 
                         }
                     },
+                    hidden: true,
                     bind: {
                         hidden: '{!closeEnable}'
                     }
                 }, {
                     text: '删除',
                     handler: me.onDelete,
+                    hidden: true,
                     bind: {
                         hidden: '{!deleteEnable}',
                         disabled: '{deleteDisable}'

+ 44 - 40
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -137,28 +137,30 @@ Ext.define('saas.view.core.query.QueryPanel', {
                 value = moreItems[k],
                 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
+                if(value&&value!=''){
+                    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);
                 }
-                conditions.push(condition);
             }
         }else {
             for(k in bindItems) {
@@ -170,28 +172,30 @@ Ext.define('saas.view.core.query.QueryPanel', {
                 value = bindItems[k],
                 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
+                if(value&&value!=''){
+                    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);
                 }
-                conditions.push(condition);
             }
         }
 

+ 20 - 19
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -22,6 +22,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
     searchItems: [], // 查询字段
     reportTitle: '报表',
     autoLoad:true,
+    allowPaging: true,
     printAble: true,
     exportAble: true,
     queryMode: 'DETAIL',
@@ -162,23 +163,12 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 }],
                 store: store,
                 columns: me.initColumns(),
-                dockedItems: [{
+                dockedItems: [me.allowPaging ? {
                     xtype: 'pagingtoolbar',
                     dock: 'bottom',
                     displayInfo: true,
                     store: store
-                }],
-                viewConfig: {
-                    deferEmptyText: false,
-                    listeners: {
-                        itemcontextmenu: function(view, rec, node, index, e) {
-                            e.stopEvent();
-                            me.getContextMenu().show().setLocalXY(e.getXY());
-                            me.selectedData = e.target.innerText;
-                            return false;
-                        }
-                    }
-                },
+                } : null],
             }]
         });
 
@@ -187,12 +177,13 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
     listeners: {
         boxready: function(p) {
+            var allowPaging = p.allowPaging;
             var grid = p.down('grid');
             var store = grid.getStore();
             var gridBodyBox = grid.body.dom.getBoundingClientRect();
             var gridBodyBoxHeight = gridBodyBox.height;
 
-            var pageSize = Math.floor(gridBodyBoxHeight / 32);
+            var pageSize = allowPaging ? Math.floor(gridBodyBoxHeight / 32) : 99999;
 
             store.setPageSize(pageSize);
         }
@@ -239,8 +230,8 @@ Ext.define('saas.view.core.report.ReportPanel', {
                                 if(type && d) {
                                     if(type == 'count') {
                                         c.summaryValue = Ext.util.Format.number(d[name], c.format || '0');
-                                    }else if(typeof c.summaryRender == 'function') {
-                                        c.summaryValue = c.summaryRender(d[name]);
+                                    }else if(typeof c.summaryRenderer == 'function') {
+                                        c.summaryValue = c.summaryRenderer(d[name]);
                                     }else if(typeof c.renderer == 'function') {
                                         c.summaryValue = c.renderer(d[name]);
                                     }else {
@@ -345,7 +336,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 })
             }else if(c.xtype == 'numbercolumn') {
                 Ext.applyIf(c, {
-                    align: 'end',
+                    align: 'end', // 数字右对齐
                     renderer : function(v) {
                         var arr = (v + '.').split('.');
                         var xr = (new Array(arr[1].length)).fill('0');
@@ -375,6 +366,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
             column.summaryTypeName = summaryType;
         }
         if(summaryType == 'sum') {
+            column._summaryType = 'sum';
             // 原生的求和方法使用的是Store.sum,在数据存在null时计算结果为NaN,这里重写一下
             column.summaryType = function(records, values) {
                 return Ext.Array.sum(values);
@@ -500,6 +492,10 @@ Ext.define('saas.view.core.report.ReportPanel', {
             conditions.push(condition);
         }
 
+        return me.myGetConditions(conditions);
+    },
+
+    myGetConditions: function(conditions) {
         return conditions;
     },
 
@@ -510,7 +506,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
         if(me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(me.isContainsAny(xtypes, ['datefield', 'condatefield'])) {
+        }else if(me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
         }else if(me.isContainsAny(xtypes, ['dbfindtrigger'])) {
             type = 'string';
@@ -543,7 +539,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
         if(me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(me.isContainsAny(xtypes, ['condatefield'])) {
+        }else if(me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
         }else if(me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
@@ -563,6 +559,11 @@ Ext.define('saas.view.core.report.ReportPanel', {
         conditionValue;
         if(me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
+        }else if(me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = from + ',' + to;
         }else if(me.isContainsAny(xtypes, ['condatefield'])) {
             var from = value.from,
             to = value.to;

+ 1 - 0
frontend/saas-web/app/view/document/bankinformation/Window.js

@@ -5,6 +5,7 @@ Ext.define('saas.view.document.bankinformation.Window', {
     extend: 'saas.view.document.kind.ChildForm',
     xtype: 'document-bankinformation-window',
     dataKind:'bankinformation',//类型标识
+    caller:'BankInformation',
     belong:{
         columns: [{
             text: '账户编号',

+ 4 - 6
frontend/saas-web/app/view/document/bom/BasePanel.js

@@ -10,8 +10,8 @@ Ext.define('saas.view.document.bom.BasePanel', {
     searchField:[{
         xtype : "textfield", 
         name : "bo_mothercode", 
-        width:150, 
-        emptyText:'产品',
+        width:200, 
+        emptyText:'请输入产品编号或名称',
         getCondition: function(value) {
            return  ' (bo_mothername like\'%' + value + '%\'' 
                 +' or bo_mothercode like \'%'+value+'%\' ) ';
@@ -19,17 +19,15 @@ Ext.define('saas.view.document.bom.BasePanel', {
     },{
         xtype : "textfield", 
         name : "bo_version", 
-        width:110, 
-        emptyText:'版本'
+        fieldLabel:'版本'
     },{
         xtype: 'combobox',
         name: 'bo_statuscode',
         queryMode: 'local',
         displayField: 'bo_status',
         valueField: 'bo_statuscode',
-        emptyText :'状态',
+        fieldLabel :'状态',
         editable:false,
-        width:110,
         store: Ext.create('Ext.data.ArrayStore', {
         fields: ['bo_statuscode', 'bo_status'],
         data: [

+ 8 - 13
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -11,34 +11,29 @@ Ext.define('saas.view.document.customer.BasePanel', {
     searchField:[{
         xtype : "textfield", 
         name : "cu_code", 
-        width:150, 
-        emptyText:'编号'
+        width:200, 
+        emptyText:'请输入客户编号或名称',
+        getCondition: function (v) {
+            return "(upper(CONCAT(cu_code,'#',cu_name)) like '%" + v.toUpperCase() + "%' )";
+        }
     }, {
-        xtype : "textfield", 
-        name : "cu_name", 
-        width:150, 
-        emptyText:'名称'
-    },{
         xtype : "remotecombo", 
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
-        emptyText : "客户类型", 
-        width:110,
+        fieldLabel : "客户类型", 
         hiddenBtn:true
     }, {
         xtype : "employeeDbfindTrigger", 
         name : "cu_sellername", 
-        width:150, 
-        emptyText:'业务员'
+        fieldLabel:'业务员'
     },{
         xtype: 'combobox',
         name: 'cu_statuscode',
         queryMode: 'local',
         displayField: 'cu_status',
         valueField: 'cu_statuscode',
-        emptyText :'状态',
+        fieldLabel :'状态',
         editable:false,
-        width:110,
         store: Ext.create('Ext.data.ArrayStore', {
         fields: ['cu_statuscode', 'cu_status'],
         data: [

+ 1 - 0
frontend/saas-web/app/view/document/employee/Window.js

@@ -5,6 +5,7 @@ Ext.define('saas.view.document.employee.Window', {
     extend: 'saas.view.document.kind.ChildForm',
     xtype: 'document-employee-window',
     dataKind:'employee',//类型标识
+    caller:'Employee',
     belong:{
         columns: [{
             text: '人员编号',

+ 6 - 7
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -143,19 +143,18 @@ Ext.define('saas.view.document.kind.ChildForm', {
         var me = this, kind = me.dataKind;
         var conf = {
             xtype: 'form',
-            bodyPadding: 10,
+            bodyPadding: '10 30 10 10',
             border: false,
             autoScroll:true,
             modelValidation: true,
-            layout: {
-                type: 'vbox',
-                align: 'stretch'
-            },
+            layout: 'column',
             defaults: {
-                labelAlign:'right',
+                margin:'0 0 10 0',
                 beforeLabelTextTpl: "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
-                xtype: 'textfield'
+                xtype: 'textfield',
+                columnWidth:1
             },
+            buttonAlign:'center',
             buttons: [{
                 text: '保存',
                 formBind:true,

+ 4 - 11
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -12,9 +12,9 @@ Ext.define('saas.view.document.product.BasePanel', {
         xtype : "textfield", 
         name : "pr_code", 
         width:300, 
-        emptyText:'输入物料编号、名称、型号或规格',
+        emptyText:'输入物料编号、名称、型号、规格或品牌',
         getCondition: function (v) {
-            return "(upper(CONCAT(pr_code,'#',pr_detail,'#',pr_spec,'#',pr_orispeccode)) like '%" + v.toUpperCase() + "%')";
+            return "(upper(CONCAT(pr_code,'#',pr_detail,'#',ifnull(pr_spec,''),'#',ifnull(pr_orispeccode,'')'#',ifnull(pr_brand,''))) like '%" + v.toUpperCase() + "%' )";
         },
     },{
         editable:true,
@@ -22,21 +22,14 @@ Ext.define('saas.view.document.product.BasePanel', {
         xtype : "remotecombo", 
         storeUrl: '/api/document/producttype/getCombo',
         name : "pr_kind", 
-        emptyText : "物料类型",
-        width:120,
-    }, {
-        xtype : "textfield", 
-        name : "pr_brand", 
-        emptyText : "品牌", 
-        width:110
+        fieldLabel : '物料类型'
     }, {
         xtype: 'combobox',
         name: 'pr_statuscode',
         queryMode: 'local',
         displayField: 'pr_status',
         valueField: 'pr_statuscode',
-        emptyText :'状态',
-        width:110,
+        fieldLabel : '状态',
         editable:false,
         store: Ext.create('Ext.data.ArrayStore', {
         fields: ['pr_statuscode', 'pr_status'],

+ 2 - 1
frontend/saas-web/app/view/document/product/FormController.js

@@ -163,7 +163,8 @@ Ext.define('saas.view.document.product.FormController', {
         Ext.Array.each(items, function(item, i) {
            var pd_num = item.get('pd_num') || 0 ;
            var pd_price = item.get('pd_price') || 0 ;
-           item.set('pd_amount', pd_num*pd_price);               
+           var m = Ext.util.Format.number(pd_num*pd_price, '0,000.00');
+           item.set('pd_amount', m);               
         });
     }
 });

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

@@ -11,19 +11,16 @@ Ext.define('saas.view.document.vendor.BasePanel', {
     {
         xtype : "textfield", 
         name : "ve_code", 
-        width:150, 
-        emptyText:'编号'
-    }, {
-        xtype : "textfield", 
-        name : "ve_name", 
-        width:150, 
-        emptyText:'名称'
+        width:200, 
+        emptyText:'请输入供应商编号或名称',
+        getCondition: function (v) {
+            return "(upper(CONCAT(ve_code,'#',ve_name)) like '%" + v.toUpperCase() + "%' )";
+        }
     },{
         xtype : "remotecombo", 
         storeUrl:'/api/document/vendorkind/getCombo',
         name : "ve_type", 
-        emptyText : "供应商类型", 
-        width:110,
+        fieldLabel : '供应商类型',
         hiddenBtn:true
     },{
         xtype: 'combobox',
@@ -31,8 +28,7 @@ Ext.define('saas.view.document.vendor.BasePanel', {
         queryMode: 'local',
         displayField: 've_status',
         valueField: 've_statuscode',
-        emptyText :'状态',
-        width:110,
+        fieldLabel : '状态',
         editable:false,
         store: Ext.create('Ext.data.ArrayStore', {
         fields: ['ve_statuscode', 've_status'],

+ 1 - 0
frontend/saas-web/app/view/document/warehouse/Window.js

@@ -5,6 +5,7 @@ Ext.define('saas.view.document.warehouse.Window', {
     extend: 'saas.view.document.kind.ChildForm',
     xtype: 'document-warehouse-window',
     dataKind:'warehouse',//类型标识
+    caller:'WareHouse',
     belong:{
         columns: [{
             text: '编号',

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

@@ -10,7 +10,7 @@ Ext.define('saas.view.home.infoCardList.PurchaseIn', {
     codeField: 'pu_code',
     detailTitle: '采购订单',
     detailXType: 'purchase-purchase-formpanel',
-    condition: 'purchase.companyId=#{companyId} and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail detail where pd_id=purchasedetail.pd_id and IFNULL(pd_acceptqty,0) < ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <= 7)',
+    condition: 'purchase.companyId=#{companyId} and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail detail where pd_id=purchasedetail.pd_id and IFNULL(pu_acceptstatus,\' \') <> \'已入库\')',
     listColumns: [{
         text: 'id',
         dataIndex: 'pu_id',

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

@@ -10,7 +10,7 @@ Ext.define('saas.view.home.infoCardList.SaleOut', {
     codeField: 'sa_code',
     detailTitle: '销售订单',
     detailXType: 'sale-sale-formpanel',
-    condition: 'sale.companyid=#{companyId} and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail detail where sd_id=saledetail.sd_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now())<= 7)',
+    condition: 'sale.companyid=#{companyId} and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail detail where sd_id=saledetail.sd_id and  IFNULL(sa_sendstatus,\' \') <> \'已出库\' ',
     listColumns: [{
         text: 'id',
         dataIndex: 'sa_id',

+ 1 - 1
frontend/saas-web/app/view/main/Main.js

@@ -31,7 +31,7 @@ Ext.define('saas.view.main.Main', {
                     reference: 'mainLogo',
                     width: 180,
                     cls: 'main-logo-wrap',
-                    html: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">U企云服</div></div>',
+                    html: '<div class="main-logo"><img src="resources/images/default/logo-default.png"/><div class="logo-text">企云服</div></div>',
                     bind: {
                         width: '{navWidth}'
                     }

+ 1 - 0
frontend/saas-web/app/view/main/Navigation.scss

@@ -146,6 +146,7 @@ $nav-font-color-over: #fff;
                     height: 40px;
                     line-height: 40px;
                     font-size: 16px;
+                    font-weight: bold;
                     color: #4F5170;
                     letter-spacing: 0.64px;
                     text-align: left;

+ 6 - 9
frontend/saas-web/app/view/money/report/TotalPayDetail.js

@@ -14,8 +14,10 @@ Ext.define('saas.view.money.report.TotalPayDetail', {
     listUrl: '/api/money/report/vendormonthdetails',
     // listUrl: 'http://192.168.253.139:8560/api/money/report/vendormonthdetails',
     defaultCondition: null,
-    reportTitle: '应收总账明细表',
+    reportTitle: '应收总账',
     QueryWidth: 0.35,
+    allowPaging: false,
+
     searchItems: [{
         xtype: 'textfield',
         name: 'vm_vendcode',
@@ -25,15 +27,10 @@ Ext.define('saas.view.money.report.TotalPayDetail', {
             return "(upper(vm_vendcode) like '%"+v.toUpperCase()+"%' or upper(vm_vendname) like '%"+v.toUpperCase()+"%')";
         },
     }, {
-        xtype: 'monthdatefield',
+        xtype: 'conmonthfield',
+        fieldLabel: '期间',
         name: 'vm_yearmonth',
-        fieldLabel: '起始期间',
-        columnWidth: 0.2
-    }, {
-        xtype: 'monthdatefield',
-        name: 'vm_yearmonthTo',
-        fieldLabel: '结束期间',
-        columnWidth: 0.2
+        columnWidth: 0.4
     }],
 
     reportColumns: [{

+ 6 - 9
frontend/saas-web/app/view/money/report/TotalRecDetail.js

@@ -14,8 +14,10 @@ Ext.define('saas.view.money.report.TotalRecDetail', {
     listUrl: '/api/money/report/custormonthdetails',
     // listUrl: 'http://192.168.253.139:8560/api/money/report/custormonthdetails',
     defaultCondition: null,
-    reportTitle: '应收总账明细表',
+    reportTitle: '应收总账',
     QueryWidth: 0.35,
+    allowPaging: false,
+
     searchItems: [{
         xtype: 'textfield',
         name: 'cm_custcode',
@@ -25,15 +27,10 @@ Ext.define('saas.view.money.report.TotalRecDetail', {
             return "(upper(cm_custcode) like '%" + v.toUpperCase() + "%' or upper(cm_custname) like '%" + v.toUpperCase() + "%')";
         },
     }, {
-        xtype: 'monthdatefield',
+        xtype: 'conmonthfield',
+        fieldLabel: '期间',
         name: 'cm_yearmonth',
-        fieldLabel: '起始期间',
-        columnWidth: 0.2
-    }, {
-        xtype: 'monthdatefield',
-        name: 'cm_yearmonthTo',
-        fieldLabel: '结束期间',
-        columnWidth: 0.2
+        columnWidth: 0.4
     }],
 
     reportColumns: [{

+ 5 - 1
frontend/saas-web/app/view/money/verification/QueryPanelModel.js

@@ -1,5 +1,9 @@
 Ext.define('saas.view.money.verification.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.money-verification-querypanel'
+    alias: 'viewmodel.money-verification-querypanel',
+
+    data: {
+        closeEnable: false
+    }
 
 });

+ 2 - 4
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -322,13 +322,11 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 xtype : "employeeDbfindTrigger", 
                 name : "pu_buyername", 
                 fieldLabel : "采购员",
-                columnWidth : 0.25,
-                defaultValue:saas.util.BaseUtil.getCurrentUser().realname
+                columnWidth : 0.25
             },{
                 xtype : "hidden", 
                 name : "pu_buyerid", 
-                fieldLabel : "采购员ID",
-                defaultValue:saas.util.BaseUtil.getCurrentUser().id
+                fieldLabel : "采购员ID"
             },
             {
                 xtype : "hidden", 

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

@@ -53,7 +53,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         }
     }, {
         xtype: 'multicombo',
-        name: 'pi_prstatus',
+        name: 'pi_prstatuscode',
         fieldLabel: '付款状态',
         emptyText :'全部',
         datas: [

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

@@ -53,7 +53,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         }
     }, {
         xtype: 'multicombo',
-        name: 'pi_prstatus',
+        name: 'pi_prstatuscode',
         fieldLabel: '付款状态',
         emptyText :'全部',
         datas: [

+ 2 - 1
frontend/saas-web/app/view/purchase/report/PurchasePay.js

@@ -89,7 +89,8 @@ Ext.define('saas.view.purchase.report.PurchasePay', {
         xtype: 'numbercolumn',
         dataIndex: 'pb_pbdamount',
         xtype: 'numbercolumn',
-        width: 110
+        width: 110,
+        hidden:true
     }, {
         text: '付款比例%',
         //本次付款/采购金额*100%

+ 15 - 2
frontend/saas-web/app/view/sale/report/Sale.js

@@ -127,7 +127,7 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         renderer : function(v) {
             var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+            var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
         }
@@ -137,7 +137,7 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         renderer : function(v) {
             var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+            var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
         }
@@ -154,6 +154,12 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         dataIndex: 'sd_total',
         xtype: 'numbercolumn',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
         summaryType: 'sum',
         summaryRenderer: function(v) {
             var arr = (v + '.').split('.');
@@ -166,11 +172,18 @@ Ext.define('saas.view.sale.report.Sale', {
         xtype: 'numbercolumn',
         dataIndex: 'sd_nettotal',
         xtype: 'numbercolumn',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
         summaryType: 'sum',
         summaryRenderer: function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join();
+            console.log(v, format, Ext.util.Format.number(v, format));
             return Ext.util.Format.number(v, format);
         }
     }, {

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

@@ -120,6 +120,10 @@ Ext.define('saas.view.sale.report.SaleProfit', {
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
         }
+    }, {
+        text: '不含税单价',
+        dataIndex: 'pd_netprice',
+        xtype: 'numbercolumn'
     }, {
         text: '成本单价',
         dataIndex: 'pw_costprice',

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

@@ -65,7 +65,7 @@ Ext.define('saas.view.sale.report.SaleRec', {
             return Ext.util.Format.number(v, format);
         }
     }, {
-        text: '本次收款',
+        text: '收款金额',
         xtype: 'numbercolumn',
         dataIndex: 'rbd_nowbalance',
         renderer : function(v) {
@@ -85,6 +85,7 @@ Ext.define('saas.view.sale.report.SaleRec', {
         text: '应收余额',
         xtype: 'numbercolumn',
         dataIndex: 'rb_rbdamount',
+        hidden:true,
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');

+ 9 - 7
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -280,21 +280,23 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 name : "sa_total", 
                 fieldLabel : "销售金额",
                 readOnly:true
+            },{
+                xtype : "employeeDbfindTrigger", 
+                name : "sa_seller", 
+                fieldLabel : "业务员"
+            },{
+                xtype : "hidden", 
+                name : "sa_sellerid", 
+                fieldLabel : "业务员ID"
             },{
                 xtype : "hidden", 
                 name : "sa_sellercode", 
                 fieldLabel : "业务员编号",
-            },{
-                xtype : "employeeDbfindTrigger", 
-                name : "sa_seller", 
-                fieldLabel : "业务员",
-                defaultValue:saas.util.BaseUtil.getCurrentUser().realname
             }, {
                 xtype : 'textfield', 
                 name : 'sa_sendstatus', 
                 fieldLabel : '出货状态', 
-                hidden : true,
-                defaultValue:saas.util.BaseUtil.getCurrentUser().id
+                hidden : true
              },{
                 xtype : "hidden", 
                 name : "creatorId", 

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

@@ -27,12 +27,14 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                         }, {
                             from: 'cu_sellername',
                             to: 'sa_seller'
+                        }, {
+                            from:'cu_sellerid',to:'cu_sellerid'
                         }],
                     });
 
                 }
             }, // 主表-采购员名称
-            'dbfindtrigger[name=sa_sellercode]': {
+            'dbfindtrigger[name=sa_seller]': {
                 beforerender: function (f) {
                     Ext.apply(f, {
                         dbfinds: [{

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

@@ -250,13 +250,15 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
             {
                 text : "销售单号", 
                 dataIndex : "pd_ordercode", 
-                width : 150.0
+                width : 150.0,
+                ignore:true
             },{
                 text : "销售序号", 
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
                 width: 110.0,
                 format: '0',
+                ignore:true,
                 renderer: function(v) {
                     return v ? v : null;
                 }

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

@@ -51,7 +51,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }
     }, {
         xtype: 'multicombo',
-        name: 'pi_prstatus',
+        name: 'pi_prstatuscode',
         fieldLabel: '付款状态',
         emptyText :'全部',
         datas: [

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

@@ -51,7 +51,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }
     }, {
         xtype: 'multicombo',
-        name: 'pi_prstatus',
+        name: 'pi_prstatuscode',
         fieldLabel: '付款状态',
         emptyText :'全部',
         datas: [

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

@@ -13,7 +13,16 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
     reportTitle: '物料出入库明细表',
     QueryWidth:0.2,
     //筛选:单据类型、物料、日期
-    searchItems: [{
+    searchItems: [ {		
+        xtype: 'textfield',
+        name: 'pd_prodcode',
+        fieldLabel: '',
+        emptyText:'输入单号,订单号或物料编号',
+        columnWidth: 0.2,
+        getCondition:function(v){
+            return "pd_prodcode='"+v+"' or pi_inoutno='"+v+"' or pd_ordercode='"+v+"'";
+        }
+    },{
         xtype: 'multicombo',
         name: 'pi_class',
         fieldLabel: '单据类型',
@@ -33,15 +42,6 @@ Ext.define('saas.view.stock.report.Prodiodetail', {
             ["拨入单", "拨入单"],
             ["库存初始化","库存初始化"]
         ]
-    }, {		
-        xtype: 'textfield',
-        name: 'pd_prodcode',
-        fieldLabel: '',
-        emptyText:'输入单号,订单号或物料编号',
-        columnWidth: 0.2,
-        getCondition:function(v){
-            return "pd_prodcode='"+v+"' or pi_inoutno='"+v+"' or pd_ordercode='"+v+"'";
-        }
     }, {
         xtype: 'condatefield',
         name: 'pi_date',

+ 92 - 53
frontend/saas-web/app/view/sys/account/AddWindow.js

@@ -5,6 +5,7 @@ Ext.define('saas.view.sys.account.AddWindow', {
     extend: 'saas.view.document.kind.ChildForm',
     xtype: 'sys-account-addwindow',
     dataKind:'accountadd',//类型标识
+    height: 325,
     belong:{
         columns:[{
             dataIndex:'realname',
@@ -18,61 +19,89 @@ Ext.define('saas.view.sys.account.AddWindow', {
     etc:{
         accountadd:{
             items:[{
-                xtype:'textfield',
-                fieldLabel: '联系号码',
-                name: 'mobile',
-                hideTrigger:true,
-                allowBlank:false,
-                maxLength: 30,
-                regex:/^1(3|4|5|7|8)\d{9}$/,
-                regexText:'请输入正确的手机号码',
-                listeners:{
-                    change:function(f,a,b){
-                        if(a==''){
-                            f._lastCheckValue = ''
-                        }
-                    },
-                    blur:function(f,a,b,c){
-                        var form = f.ownerCt;
-                        if(f.value&&f.value!=''&&f.isValid()&&f._lastCheckValue!=f.value){
-                            f._lastCheckValue = f.value;
-                            form.setLoading(true);
-                            Ext.Ajax.request({
-                                url: '/api/account/account/checkMobile?mobile='+f.value,
-                                method: 'GET',
-                                headers:{
-                                    'Access-Control-Allow-Origin': '*',
-                                    "Content-Type": 'application/json;charset=UTF-8',
-                                },
-                                success: function (response) {
-                                    form.setLoading(false);
-                                    var localJson = Ext.decode(response.responseText);
-                                    if(localJson.success){
-                                        if(localJson.data.hasRegister){
-                                            saas.util.BaseUtil.showSuccessToast('校验成功:手机号已在优软云注册');
+                xtype: 'fieldcontainer',
+                layout: 'column',
+                items: [{
+                    beforeLabelTextTpl: "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
+                    xtype:'textfield',
+                    fieldLabel: '手机号码',
+                    name: 'mobile',
+                    hideTrigger:true,
+                    allowBlank:false,
+                    maxLength: 30,
+                    columnWidth:0.7,
+                    regex:/^1(3|4|5|7|8)\d{9}$/,
+                    regexText:'请输入正确的手机号码',
+                    listeners:{
+                        change:function(f,a,b){
+                            if(a==''){
+                                f._lastCheckValue = ''
+                            }
+                        },
+                        blur:function(f,a,b,c){
+                            var form = f.ownerCt;
+                            if(f.value&&f.value!=''&&f.isValid()&&f._lastCheckValue!=f.value){
+                                f._lastCheckValue = f.value;
+                                form.setLoading(true);
+                                Ext.Ajax.request({
+                                    url: '/api/account/account/checkMobile?mobile='+f.value,
+                                    method: 'GET',
+                                    headers:{
+                                        'Access-Control-Allow-Origin': '*',
+                                        "Content-Type": 'application/json;charset=UTF-8',
+                                    },
+                                    success: function (response) {
+                                        form.setLoading(false);
+                                        var localJson = Ext.decode(response.responseText);
+                                        if(localJson.success){
+                                            f.hasRegister = localJson.data.hasRegister;
+                                            if(localJson.data.hasRegister){
+                                                f.ownerCt.down('[name=hasAccount]').show();
+                                                f.ownerCt.down('[name=noAccount]').hide();
+                                            }else{
+                                                f.ownerCt.down('[name=hasAccount]').hide();
+                                                f.ownerCt.down('[name=noAccount]').show();
+                                            }
                                         }else{
-                                            saas.util.BaseUtil.showErrorToast('校验失败:手机号未在优软云注册');
+                                            saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
+                                            f.setValue('');
+                                            f.ownerCt.down('[name=hasAccount]').hide();
+                                            f.ownerCt.down('[name=noAccount]').hide();
+                                        }
+                                    },
+                                    failure: function (response) {
+                                        if(response.responseText){
+                                            var localJson = Ext.decode(response.responseText);
+                                            saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
+                                            f.setValue('');
+                                        }else{
+                                            saas.util.BaseUtil.showErrorToast('手机号校验接口连接超时');
                                             f.setValue('');
                                         }
-                                    }else{
-                                        saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
-                                        f.setValue('');
-                                    }
-                                },
-                                failure: function (response) {
-                                    if(response.responseText){
-                                        var localJson = Ext.decode(response.responseText);
-                                        saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
-                                        f.setValue('');
-                                    }else{
-                                        saas.util.BaseUtil.showErrorToast('手机号校验接口连接超时');
-                                        f.setValue('');
                                     }
-                                }
-                            });
+                                });
+                            }
                         }
                     }
-                }
+                },{
+                    hidden:true,
+                    name:'hasAccount',
+                    xtype:'button',
+                    cls:'x-btn-showicon',
+                    style:'background:#fff;border:none;padding:7px 0 7px 0;',
+                    text:'已注册优软云',
+                    icon:'resources/images/default/toast_over.png',
+                    columnWidth:0.3,
+                },{
+                    name:'noAccount',
+                    hidden:true,
+                    xtype:'button',
+                    cls:'x-btn-showicon',
+                    style:'background:#fff;border:none;padding:7px 0 7px 0;',
+                    text:'未注册优软云',
+                    icon:'resources/images/default/toast_close.png',
+                    columnWidth:0.3,
+                }]
             },{
                 xtype:'textfield',
                 fieldLabel: '真实姓名',
@@ -81,6 +110,7 @@ Ext.define('saas.view.sys.account.AddWindow', {
                 regexText:'请输入汉字',
                 allowBlank:false,
                 maxLength: 30,
+                columnWidth:0.5
             },{
                 xtype:'textfield',
                 fieldLabel: '邮箱',
@@ -95,7 +125,6 @@ Ext.define('saas.view.sys.account.AddWindow', {
                         var form = f.ownerCt;
                         if(f.value&&f.value!=''&&f.isValid()&&f._lastCheckValue!=f.value){
                             form.setLoading(true);
-                            f._lastCheckValue = f.value
                             Ext.Ajax.request({
                                 url: '/api/account/account/checkEmail?email='+f.value,
                                 method: 'GET',
@@ -108,6 +137,7 @@ Ext.define('saas.view.sys.account.AddWindow', {
                                     var localJson = Ext.decode(response.responseText);
                                     if(localJson.success){
                                         if(!localJson.data){
+                                            f._lastCheckValue = f.value;
                                             saas.util.BaseUtil.showSuccessToast('校验成功:邮箱未注册');
                                         }else{
                                             saas.util.BaseUtil.showErrorToast('校验失败:该邮箱已被注册');
@@ -132,10 +162,18 @@ Ext.define('saas.view.sys.account.AddWindow', {
             },{
                 xtype:'datamulticombo',
                 dataUrl:'/api/account/role/list',
-                fieldLabel: '关联角色',
+                fieldLabel: '岗位角色',
                 name: 'roleIds',
                 allowBlank:false,
                 maxLength: 30,
+            },{
+                margin:'5 0 0 0',
+                xtype:'displayfield',
+                fieldLabel: '注意事项',
+                beforeLabelTextTpl: "",
+                value:'添加的账户拥有访问系统的权限,请勿随意添加',
+                fieldStyle:'color:#999;margin-top: 9px;',
+                lableStyle:'color: #f16161;'
             }]
         }
     },
@@ -144,7 +182,6 @@ Ext.define('saas.view.sys.account.AddWindow', {
         var belong = this.belong;
         me.setLoading(true);
         var form=this.down('form');
-        var combo = this._combo;
         var params = {};
         var names = belong.columns.map(column => column.dataIndex);
 
@@ -153,7 +190,9 @@ Ext.define('saas.view.sys.account.AddWindow', {
                 var dataField = form.down('[name='+name+']');
                 if(dataField&&dataField.value){
                     params[name] = dataField.value;
-                    params._value = dataField.value;
+                }
+                if(dataField.name=='mobile'){
+                    params['hasRegister'] = dataField.hasRegister;
                 }
             }
         });

+ 23 - 21
frontend/saas-web/app/view/sys/account/DataList.js

@@ -22,7 +22,7 @@ Ext.define('saas.view.sys.account.DataList', {
         width: 140,
         name: 'mobile',
         xtype: 'textfield',
-        emptyText : '联系电话'
+        emptyText : '手机号码'
     },{
         xtype:'button',
         text:'查询',
@@ -311,28 +311,30 @@ Ext.define('saas.view.sys.account.DataList', {
             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
+            if(value&&value!=''){
+                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);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 3 - 3
frontend/saas-web/app/view/sys/account/EditWindow.js

@@ -38,14 +38,14 @@ Ext.define('saas.view.sys.account.EditWindow', {
             },{
                 xtype:'datamulticombo',
                 dataUrl:'/api/account/role/list',
-                fieldLabel: '关联角色',
+                fieldLabel: '岗位角色',
                 name: 'roleNames',
                 allowBlank:true,
                 maxLength: 20,
                 beforeLabelTextTpl: "",
             },{
                 xtype:'textfield',
-                fieldLabel: '联系电话',
+                fieldLabel: '手机号码',
                 name: 'mobile',
                 readOnly:true,
                 editable:false,
@@ -90,7 +90,7 @@ Ext.define('saas.view.sys.account.EditWindow', {
         o = o.substring(0,o.length-1);
 
         if(o==""){
-            saas.util.BaseUtil.showErrorToast('关联角色未选择,无法保存!')
+            saas.util.BaseUtil.showErrorToast('岗位角色未选择,无法保存!')
         }
 
         var _params = {

+ 22 - 20
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -196,28 +196,30 @@ Ext.define('saas.view.sys.finish.DataList', {
             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
+            if(value&&value!=''){
+                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);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 22 - 20
frontend/saas-web/app/view/sys/maxnumbers/DataList.js

@@ -292,28 +292,30 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
             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
+            if(value&&value!=''){
+                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);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 22 - 20
frontend/saas-web/app/view/sys/messagelog/DataList.js

@@ -160,28 +160,30 @@ Ext.define('saas.view.sys.messagelog.DataList', {
             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
+            if(value&&value!=''){
+                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);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

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

@@ -101,12 +101,14 @@ Ext.define('Ext.ux.feature.MySummary', {
         };
 
         Ext.Array.each(columns, function(c) {
-            if(c.summaryType) {
+            var summaryType = c._summaryType || c.summaryType;
+
+            if(summaryType) {
                 summarys.push({
                     name: c.dataIndex,
                     label: c.text,
-                    type: c.summaryType,
-                    typeLabel: c.summaryType ? typeLabels[c.summaryType] : '',
+                    type: summaryType,
+                    typeLabel: summaryType ? typeLabels[summaryType] : '',
                     value: c.summaryValue || 0
                 });
             } 

+ 1 - 1
frontend/saas-web/index.html

@@ -5,7 +5,7 @@
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=10, user-scalable=yes">
 
-    <title>云进销存 - U企云服</title>
+    <title>云进销存 - 企云服</title>
     <link rel="icon" href="/resources/images/favicon.png" type="image/x-icon">
     <!-- 图片动画效果样式导入 -->
     <link type="text/css" rel="stylesheet" href="/resources/othcss/imagehover.css" />

+ 6 - 0
frontend/saas-web/overrides/window/MessageBox.js

@@ -0,0 +1,6 @@
+Ext.define('saas.override.window.MessageBox', {
+    override: 'Ext.window.MessageBox',
+
+    cls: 'x-window-dbfind'
+
+});

+ 11 - 11
frontend/saas-web/resources/json/navigation.json

@@ -161,6 +161,14 @@
     }, {
         "text": "报表",
         "items": [{
+            "text": "应收总账",
+            "id": "monry-report-totalrecdetail",
+            "viewType":"monry-report-totalrecdetail"
+        }, {
+            "text": "应付总账",
+            "id": "monry-report-totalpaydetail",
+            "viewType":"monry-report-totalpaydetail"
+        },{
             "text": "应收账款明细表",
             "id": "monry-report-recdetail",
             "viewType":"monry-report-recdetail"
@@ -168,22 +176,14 @@
             "text": "应付账款明细表",
             "id": "monry-report-paydetail",
             "viewType":"monry-report-paydetail"
-        }, {
-            "text": "账户收支明细表",
-            "id": "monry-report-accountbalance",
-            "viewType":"monry-report-accountbalance"
         }, {
             "text": "核销明细表",
             "id": "monry-report-accountdetails",
             "viewType":"monry-report-accountdetails"
         }, {
-            "text": "应收总账明细表",
-            "id": "monry-report-totalrecdetail",
-            "viewType":"monry-report-totalrecdetail"
-        }, {
-            "text": "应付总账明细表",
-            "id": "monry-report-totalpaydetail",
-            "viewType":"monry-report-totalpaydetail"
+            "text": "账户收支明细表",
+            "id": "monry-report-accountbalance",
+            "viewType":"monry-report-accountbalance"
         }]
     }]
 }, {