Эх сурвалжийг харах

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

jinsy 7 жил өмнө
parent
commit
588a54674b
77 өөрчлөгдсөн 1144 нэмэгдсэн , 356 устгасан
  1. 6 3
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 46 6
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ExcelServiceImpl.java
  3. 9 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  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. 13 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  32. 2 2
      frontend/saas-web/app/Application.scss
  33. 3 0
      frontend/saas-web/app/view/core/base/ImportWindow.js
  34. 4 3
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js
  35. 4 0
      frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js
  36. 1 0
      frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js
  37. 2 0
      frontend/saas-web/app/view/core/form/field/ConDateField.js
  38. 81 0
      frontend/saas-web/app/view/core/form/field/ConMonthField.js
  39. 10 14
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  40. 12 9
      frontend/saas-web/app/view/core/form/field/Month.js
  41. 1 1
      frontend/saas-web/app/view/core/query/QueryFormPanel.js
  42. 5 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  43. 16 16
      frontend/saas-web/app/view/core/report/ReportPanel.js
  44. 1 0
      frontend/saas-web/app/view/document/bankinformation/Window.js
  45. 4 6
      frontend/saas-web/app/view/document/bom/BasePanel.js
  46. 8 13
      frontend/saas-web/app/view/document/customer/BasePanel.js
  47. 1 0
      frontend/saas-web/app/view/document/employee/Window.js
  48. 11 8
      frontend/saas-web/app/view/document/kind/ChildForm.js
  49. 4 14
      frontend/saas-web/app/view/document/product/BasePanel.js
  50. 2 1
      frontend/saas-web/app/view/document/product/FormController.js
  51. 7 11
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  52. 1 0
      frontend/saas-web/app/view/document/warehouse/Window.js
  53. 1 1
      frontend/saas-web/app/view/home/infoCardList/PurchaseIn.js
  54. 1 1
      frontend/saas-web/app/view/home/infoCardList/SaleOut.js
  55. 1 1
      frontend/saas-web/app/view/main/Main.js
  56. 1 0
      frontend/saas-web/app/view/main/Navigation.scss
  57. 1 1
      frontend/saas-web/app/view/money/report/PayDetail.js
  58. 1 1
      frontend/saas-web/app/view/money/report/RecDetail.js
  59. 6 9
      frontend/saas-web/app/view/money/report/TotalPayDetail.js
  60. 6 9
      frontend/saas-web/app/view/money/report/TotalRecDetail.js
  61. 5 1
      frontend/saas-web/app/view/money/verification/QueryPanelModel.js
  62. 2 4
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  63. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  64. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  65. 2 1
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  66. 4 0
      frontend/saas-web/app/view/sale/report/SaleProfit.js
  67. 1 0
      frontend/saas-web/app/view/sale/report/SaleRec.js
  68. 45 22
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  69. 23 1
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  70. 3 1
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  71. 1 1
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  72. 1 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  73. 10 10
      frontend/saas-web/app/view/stock/report/Prodiodetail.js
  74. 8 5
      frontend/saas-web/app/view/sys/account/AddWindow.js
  75. 1 1
      frontend/saas-web/index.html
  76. 6 0
      frontend/saas-web/overrides/window/MessageBox.js
  77. 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, "保存失败!不能选择重复的源单"),

+ 46 - 6
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("")) {
@@ -191,6 +196,10 @@ public class ExcelServiceImpl implements ExcelService{
                                    break;
                                }
                            }
+                           //如果为数字类型且为空默认赋值0
+                           if ("number".equals(set.getType()) && StringUtils.isEmpty(value)) {
+                                value = "0";
+                           }
                            //插入主表数据
                            if (null != mainData) {
                                mainData.put(set.getField(), value);
@@ -213,7 +222,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;
                            }
                            //检测日期类型是否规范
@@ -224,16 +234,28 @@ public class ExcelServiceImpl implements ExcelService{
                                    break;
                                }
                            }
+                           //如果为数字类型且为空默认赋值0
+                           if ("number".equals(set.getType()) && StringUtils.isEmpty(value)) {
+                               value = "0";
+                           }
                            //拼从表数据
                            detailData.put(set.getField(), value);
                        }
-                       if (detailData.size() > 0) {
+                       if (null != detailData && detailData.size() > 0) {
                            dd.setDd_codevalue(codeValue);
                            dd.setDd_detaildata(detailData.toJSONString());
                        }
                    }
                 }
-                dataImportDetailMapper.insertSelective(dd);
+                //排除编号未填写但是其他字段填写的情况
+                if (StringUtils.hasText(codeValue)) {
+                    dataImportDetailMapper.insertSelective(dd);
+                }
+            }
+            //重复编号检测
+            List<String> samecode = getDuplicateElements(validateCode);
+            if (null != samecode && samecode.size() > 0) {
+                err.append("下列编号重复: " + printList(samecode) + " 请确认无误后再上传!");
             }
             //必填项检查
             if (err.length() > 0) {
@@ -244,6 +266,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) {

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

@@ -323,8 +323,15 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
     public DocBaseDTO close(Long id) {
         DocBaseDTO docBaseDTO = null;
         if(id != null && id > 0){
+            Product product = getMapper().selectByPrimaryKey(id);
+            if (product == null) {
+                throw new BizException(BizExceptionCode.NO_DATA);
+            }
+            if (!Status.ENABLE.getDisplay().equals(product.getPr_status())){
+                throw new BizException(BizExceptionCode.BIZ_BANNED);
+            }
             String code = getMapper().getCodeById(id);
-            Product product = new Product();
+            product = new Product();
             product.setId(id);
             product.setPr_status(Status.BANNED.getDisplay());
             product.setPr_statuscode(Status.BANNED.name());
@@ -349,7 +356,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             if (product == null) {
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (!Status.ENABLE.getDisplay().equals(product.getPr_status())){
+            if (!Status.BANNED.getDisplay().equals(product.getPr_status())){
                 throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }else{
                 product.setId(id);

+ 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>

+ 13 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
@@ -252,6 +253,18 @@ public class AuthController {
             authorizeLogService.save(AuthorizeLog.from(request)
                     .setAccountId(accountDTO.getId())
                     .setAppId(appId).build());
+            //将cookies
+            Cookie[] cookies = request.getCookies();
+            Cookie ssoCookies = null;
+            for (Cookie cookie : cookies) {
+                if (cookieConfig.getName().equals(cookie.getName())) {
+                    ssoCookies = cookie;
+                    break;
+                }
+            }
+            if (null != ssoCookies) {
+                response.addCookie(ssoCookies);
+            }
             // 将登录信息推送到客户端
             if (!StringUtils.isEmpty(clientId)) {
                 Long companyId = null;

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

@@ -421,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;
   }
 }

+ 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();
                         }
                     },

+ 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",

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

@@ -55,6 +55,7 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
             bind: {
                 title: '新增仓库资料'
             },
+            _parent:this,
             caller:'WareHouse',
             session: true
         });

+ 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}'

+ 16 - 16
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);
         }
@@ -501,6 +492,10 @@ Ext.define('saas.view.core.report.ReportPanel', {
             conditions.push(condition);
         }
 
+        return me.myGetConditions(conditions);
+    },
+
+    myGetConditions: function(conditions) {
         return conditions;
     },
 
@@ -511,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';
@@ -544,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';
@@ -564,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: '人员编号',

+ 11 - 8
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -24,7 +24,7 @@ Ext.define('saas.view.document.kind.ChildForm', {
                 codeField = item.name
             }
           });
-          if(count!=0&&count<4){
+          if(count!=0&&count<6){
             w.setHeight(114+40*count)
           }
           if(w.record){
@@ -147,13 +147,12 @@ Ext.define('saas.view.document.kind.ChildForm', {
             border: false,
             autoScroll:true,
             modelValidation: true,
-            layout: {
-                type: 'vbox',
-                align: 'stretch'
-            },
+            layout: 'column',
             defaults: {
+                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: [{
@@ -209,9 +208,13 @@ Ext.define('saas.view.document.kind.ChildForm', {
         .then(function(localJson) {
             me.setLoading(false);
             if(localJson.success){
-                var grid = form.ownerCt._parent ? form.ownerCt._parent.lookup('document-kind-Grid') : null;
+                var grid = form.ownerCt._parent;
                 if(grid){
-                    grid.store.load();
+                    if(form.ownerCt._parent.lookup('document-kind-Grid')!=null){
+                        form.ownerCt._parent.lookup('document-kind-Grid').store.load()
+                    }else{
+                        grid.store.load();
+                    }
                 }
                 if(relativeField&&relativeValue&&form.ownerCt._parent){
                     var grid = form.ownerCt._parent.down('grid');

+ 4 - 14
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,'#',ifnull(pr_spec,''),'#',ifnull(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,24 +22,14 @@ Ext.define('saas.view.document.product.BasePanel', {
         xtype : "remotecombo", 
         storeUrl: '/api/document/producttype/getCombo',
         name : "pr_kind", 
-        emptyText : "物料类型",
-        width:130
-    }, {
-        editable:true,
-        hiddenBtn:true,
-        xtype : "remotecombo", 
-        storeUrl:'/api/document/productbrand/getCombo',
-        name : "pr_brand", 
-        emptyText : "品牌", 
-        width:120
+        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;

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

@@ -18,7 +18,7 @@ Ext.define('saas.view.money.report.PayDetail', {
         fieldLabel: '供应商名称',
         columnWidth: 0.25
     }, {
-        xtype: 'condatefield',
+        xtype: 'conmonthfield',
         name: 'pb_date',
         fieldLabel: '单据日期',
         columnWidth: 0.5

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

@@ -19,7 +19,7 @@ Ext.define('saas.view.money.report.RecDetail', {
         fieldLabel: '客户名称',
         columnWidth: 0.25
     }, {
-        xtype: 'condatefield',
+        xtype: 'conmonthfield',
         name: 'rb_date',
         fieldLabel: '单据日期',
         columnWidth: 0.5

+ 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%

+ 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',

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

@@ -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');

+ 45 - 22
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -47,24 +47,45 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 allowBlank : false
             }, {
                 name : "sa_toplace", 
-                xtype : "textfield", 
+                xtype : "remotecombo", 
                 fieldLabel : "交货地址", 
+                editable:false,
                 allowBlank : false, 
                 columnWidth : 0.5,
-                hiddenBtn:false,//true 则会关闭新增按钮功能
-                addHandler:function(b){
-                    var form = this.ownerCmp.ownerCt;
-                    this.dialog = form.add({
-                        xtype: 'document-address-window',
-                        bind: {
-                            title: '新增交货地址'
-                        },
-                        _parent:form,
-                        _combo:this.ownerCmp,
-                        record:null,
-                        session: true
-                    });
-                    this.dialog.show();
+                storeUrl:'/api/document/customer/getAddressCombo',
+                hiddenBtn:true,//true 则会关闭新增按钮功能
+                setValue:function(value){
+                    var me = this,bind, valueBind;
+                    if(value&&value!=''){
+                        me.setDisabled(false);
+                    }else{
+                        me.setDisabled(true);
+                    }
+                    if (me.hasFocus) {
+                        bind = me.getBind();
+                        valueBind = bind && bind.value;
+                        if (valueBind && valueBind.syncing) {
+                            if ((Ext.isEmpty(value) && Ext.isEmpty(me.value)) || value === me.value) {
+                                return me;
+                            } else if (Ext.isArray(value) && Ext.isArray(me.value) && Ext.Array.equals(value, me.value)) {
+                                return me;
+                            }
+                        }
+                    } else {
+                        me.lastSelectedRecords = null;
+                    }
+            
+                    if (value != null) {
+                        me.doSetValue(value);
+                    }
+                    else {
+                        me.suspendEvent('select');
+                        me.valueCollection.beginUpdate();
+                        me.pickerSelectionModel.deselectAll();
+                        me.valueCollection.endUpdate();
+                        me.resumeEvent('select');
+                    }
+                    return me;
                 }
             }, {
                 name : "detailGridField", 
@@ -280,21 +301,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", 

+ 23 - 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: [{
@@ -67,6 +69,26 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                     });
 
                 }
+            },
+            'remotecombo[name=sa_toplace]':{
+                focus:function(f){
+                    //获取客户ID
+                    var sa_custid = f.ownerCt.down('[name=sa_custid]').value;
+                    if(sa_custid&&sa_custid!=""){
+                        Ext.apply(f.store.proxy.extraParams, {
+                            id:sa_custid
+                        });
+                        f.store.load();
+                    }else{
+                        saas.util.BaseUtil.showErrorToast('请先选择客户后在维护交货地址');
+                        f.setDisabled(true);
+                    }
+                },
+                expand:function(f){
+                    if(f.picker&&f.isExpanded){
+                        f.picker.setHeight(33*f.store.getCount())
+                    }
+                }
             }
         });
 

+ 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',

+ 8 - 5
frontend/saas-web/app/view/sys/account/AddWindow.js

@@ -22,6 +22,7 @@ Ext.define('saas.view.sys.account.AddWindow', {
                 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',
@@ -109,6 +110,7 @@ Ext.define('saas.view.sys.account.AddWindow', {
                 regexText:'请输入汉字',
                 allowBlank:false,
                 maxLength: 30,
+                columnWidth:0.5
             },{
                 xtype:'textfield',
                 fieldLabel: '邮箱',
@@ -123,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',
@@ -136,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('校验失败:该邮箱已被注册');
@@ -165,12 +167,13 @@ Ext.define('saas.view.sys.account.AddWindow', {
                 allowBlank:false,
                 maxLength: 30,
             },{
-                margin:'10 0 0 0',
+                margin:'5 0 0 0',
                 xtype:'displayfield',
-                fieldLabel: '温馨提示',
+                fieldLabel: '注意事项',
                 beforeLabelTextTpl: "",
-                value:'已注册优软云可以访问优软云门户网',
-                fieldStyle:'color:#999;margin-top: 9px;'
+                value:'添加的账户拥有访问系统的权限,请勿随意添加',
+                fieldStyle:'color:#999;margin-top: 9px;',
+                lableStyle:'color: #f16161;'
             }]
         }
     },

+ 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"
         }]
     }]
 }, {