Ver Fonte

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

rainco há 7 anos atrás
pai
commit
65373ed858
91 ficheiros alterados com 755 adições e 631 exclusões
  1. 4 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 10 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Status.java
  3. 4 57
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ExcelServiceImpl.java
  4. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/DataImportMapper.java
  5. 6 6
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  6. 8 8
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  7. 19 18
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  8. 6 7
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  9. 6 7
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  10. 1 1
      applications/document/document-server/src/main/resources/mapper/DataImportMapper.xml
  11. 1 1
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  12. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  13. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java
  14. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  15. 5 4
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  16. 2 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  17. 2 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java
  18. 2 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdIODetail.java
  19. 2 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  20. 6 5
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  21. 1 0
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  22. 41 0
      frontend/saas-portal-web/build/build-dev.js
  23. 4 2
      frontend/saas-portal-web/build/webpack.prod.conf.js
  24. 3 4
      frontend/saas-portal-web/config/dev.env.js
  25. 2 2
      frontend/saas-portal-web/config/test.env.js
  26. 2 1
      frontend/saas-portal-web/package.json
  27. 9 1
      frontend/saas-portal-web/src/components/conenter/addgongsi.vue
  28. 7 0
      frontend/saas-portal-web/src/components/conenter/company.vue
  29. 7 12
      frontend/saas-portal-web/src/components/conenter/enterprise.vue
  30. 58 3
      frontend/saas-portal-web/src/components/conenter/problem.vue
  31. 19 4
      frontend/saas-web/app.json
  32. 9 0
      frontend/saas-web/app/view/core/base/BasePanel.scss
  33. 1 1
      frontend/saas-web/app/view/core/base/GridPanel.js
  34. 2 1
      frontend/saas-web/app/view/core/base/ImportWindow.js
  35. 1 1
      frontend/saas-web/app/view/core/dbfind/types/BomDbfindTrigger.js
  36. 1 1
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js
  37. 2 2
      frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js
  38. 2 2
      frontend/saas-web/app/view/core/dbfind/types/ProductMultiDbfindTrigger.js
  39. 1 1
      frontend/saas-web/app/view/core/dbfind/types/VendorDbfindTrigger.js
  40. 1 1
      frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js
  41. 10 1
      frontend/saas-web/app/view/core/form/FormPanelController.js
  42. 2 5
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  43. 10 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.scss
  44. 3 2
      frontend/saas-web/app/view/document/bom/BasePanel.js
  45. 2 2
      frontend/saas-web/app/view/document/bom/FormPanel.js
  46. 3 2
      frontend/saas-web/app/view/document/customer/BasePanel.js
  47. 2 2
      frontend/saas-web/app/view/document/customer/FormPanel.js
  48. 8 3
      frontend/saas-web/app/view/document/kind/ChildForm.js
  49. 3 2
      frontend/saas-web/app/view/document/product/BasePanel.js
  50. 3 3
      frontend/saas-web/app/view/document/product/FormPanel.js
  51. 3 2
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  52. 2 2
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  53. 3 2
      frontend/saas-web/app/view/home/infoCardList/Payment.js
  54. 3 2
      frontend/saas-web/app/view/home/infoCardList/Recment.js
  55. 3 2
      frontend/saas-web/app/view/home/infoCardList/UnauditCheckIn.js
  56. 3 2
      frontend/saas-web/app/view/home/infoCardList/UnauditSaleOut.js
  57. 12 10
      frontend/saas-web/app/view/main/Navigation.js
  58. 1 0
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  59. 1 0
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  60. 1 0
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  61. 4 0
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  62. 1 0
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  63. 4 0
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  64. 1 0
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  65. 7 49
      frontend/saas-web/app/view/money/verification/FormPanelController.js
  66. 1 0
      frontend/saas-web/app/view/money/verification/QueryPanel.js
  67. 4 0
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  68. 1 0
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  69. 6 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  70. 12 8
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  71. 3 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  72. 6 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  73. 8 8
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  74. 3 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  75. 1 9
      frontend/saas-web/app/view/sale/report/SaleRec.js
  76. 99 76
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  77. 15 12
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  78. 1 0
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  79. 4 0
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  80. 1 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  81. 10 35
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  82. 67 115
      frontend/saas-web/app/view/stock/inventory/EditDataList.js
  83. 125 105
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  84. 1 0
      frontend/saas-web/app/view/stock/make/QueryPanel.js
  85. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  86. 2 1
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  87. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  88. 2 1
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  89. 5 0
      frontend/saas-web/overrides/form/field/TextField.js
  90. 15 0
      frontend/saas-web/overrides/form/field/TrimVtype.js
  91. 2 1
      frontend/saas-web/package.json

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

@@ -34,6 +34,10 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_UNENDPRODUCT(79310,"系统还未结账,不能反结账"),
     BIZ_RELUPDATE_CODEANDNAME(79311,"存在关联单据,不允许更新编号,名称"),
     BIZ_RELUPDATE_AMOUNT(79312,"存在关联单据,不允许更新期初应收,期初预收,期初日期"),
+    BIZ_BANNED(79313, "只能禁用已开启的单据"),
+    BIZ_ENABLE(79314, "只能开启已禁用的单据"),
+
+
     NO_OPRATIONDATA(79400,"无可操作单据"),
     NULL_DATA(23232,"无数据"),
 

+ 10 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Status.java

@@ -17,6 +17,16 @@ public enum Status {
     OPEN("已开启"),
 
 
+    /**
+     * 已禁用
+     */
+    BANNED("已禁用"),
+
+    /**
+     * 已启用
+     */
+    ENABLE("已启用"),
+
     /**
      * 已审核
      */

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

@@ -45,66 +45,13 @@ public class ExcelServiceImpl implements ExcelService{
         Map<String, Object> map = new HashMap<>();
         SXSSFWorkbook workbook = new SXSSFWorkbook();
         DataTemplet dataTemplet = dataTempletMapper.selectByCaller(caller, companyId);
+        //列
         String cols = dataTemplet.getDt_columns();
-      /*  String cols = "[{\"description\":\"物料编号\",\"necessary\":\"true\"},{\"description\":\"物料名称\",\"necessary\":\"true\"},{\"description\":\"物料类型\",\"necessary\":\"true\"},{\"description\":\"仓库编号\",\"necessary\":\"true\"},{\"description\":\"仓库名称\",\"necessary\":\"true\"}]";
-        cols = "[{\"description\":\"物料编号\",\"necessary\":\"true\",\"position\":\"main\",\"field\":\"pr_code\",\"codefield\":true}," +
-                "{\"description\":\"物料名称\",\"necessary\":\"true\",\"position\":\"main\",\"field\":\"pr_detail\",\"codefield\":false}," +
-                "{\"description\":\"更新时间\",\"necessary\":\"false\",\"position\":\"main\",\"field\":\"updateTime\",\"codefield\":false,\"type\":\"date\"}," +
-                "{\"description\":\"规格\",\"necessary\":\"true\",\"position\":\"main\",\"field\":\"pr_spec\",\"codefield\":false}," +
-                "{\"description\":\"类型\",\"necessary\":\"true\",\"position\":\"main\",\"field\":\"pr_kind\",\"codefield\":false}," +
-                "{\"description\":\"型号\",\"necessary\":\"false\",\"position\":\"main\",\"field\":\"pr_orispeccode\",\"codefield\":false}" +
-                ",{\"description\":\"品牌\",\"necessary\":\"false\",\"position\":\"main\",\"field\":\"pr_brand\",\"codefield\":false}," +
-                "{\"description\":\"单位\",\"necessary\":\"true\",\"position\":\"main\",\"field\":\"pr_unit\",\"codefield\":false}," +
-                "{\"description\":\"仓库编号\",\"necessary\":\"false\",\"position\":\"main\",\"field\":\"pr_whcode\",\"codefield\":false}," +
-                "{\"description\":\"仓库名称\",\"necessary\":\"false\",\"position\":\"main\",\"field\":\"pr_whname\",\"codefield\":false}," +
-                "{\"description\":\"最新采购单价\",\"necessary\":\"false\",\"position\":\"main\",\"field\":\"pr_purcprice\",\"codefield\":false}" +
-                ",{\"description\":\"最新出货单价\",\"necessary\":\"false\",\"position\":\"main\",\"field\":\"pr_saleprice\",\"codefield\":false}," +
-                "{\"description\":\"替代料仓库编号\",\"necessary\":\"true\",\"position\":\"detail\",\"field\":\"pd_whcode\",\"codefield\":false}," +
-                "{\"description\":\"替代料仓库名称\",\"necessary\":\"false\",\"position\":\"detail\",\"field\":\"pd_whname\",\"codefield\":false}," +
-                "{\"description\":\"期初数量\",\"necessary\":\"true\",\"position\":\"detail\",\"field\":\"pd_num\",\"codefield\":false}," +
-                "{\"description\":\"单位成本\",\"necessary\":\"true\",\"position\":\"detail\",\"field\":\"pd_price\",\"codefield\":false}]";
-      */
         JSONArray array = (JSONArray) JSONArray.parse(cols);
+        //模板数据
         String remark = dataTemplet.getDt_description();
-        //String exampledata = dataTemplet.getDt_exampledata();
-        //JSONArray datas = (JSONArray) JSONArray.parse(exampledata);
-        JSONArray datas = new JSONArray();
-        JSONObject data = new JSONObject();
-        data.put("物料编号", "code1");
-        data.put("物料名称", "name1");
-        data.put("规格", "spec1");
-        data.put("型号", "kind1");
-        data.put("品牌", "brand1");
-        data.put("更新时间", "2018-09-08");
-        data.put("单位", "nuit1");
-        data.put("类型", "leixin1");
-        data.put("仓库编号", "whcode1");
-        data.put("仓库名称", "whname1");
-        data.put("最新采购单价", "100");
-        data.put("最新出货单价", "22");
-        data.put("替代料仓库编号", "tcode1");
-        data.put("替代料仓库名称", "tname1");
-        data.put("期初数量", "22");
-        data.put("单位成本", "22");
-        datas.add(data);
-        JSONObject data2 = new JSONObject();
-        data2.put("物料编号", "code2");
-        data2.put("物料名称", "name2");
-        data2.put("规格", "spec2");
-        data2.put("型号", "kind2");
-        data2.put("品牌", "brand2");
-        data2.put("单位", "nuit2");
-        data2.put("类型", "leixin2");
-        data2.put("仓库编号", "whcode2");
-        data2.put("仓库名称", "whname2");
-        data2.put("最新采购单价", "100");
-        data2.put("最新出货单价", "22");
-        data2.put("替代料仓库编号", "tcode2");
-        data2.put("替代料仓库名称", "tname2");
-        data2.put("期初数量", "22");
-        data2.put("单位成本", "22");
-        datas.add(data2);
-        System.out.println(datas.toJSONString());
+        String exampledata = dataTemplet.getDt_exampledata();
+        JSONArray datas = (JSONArray) JSONArray.parse(exampledata);
         createWorkbook(workbook, 1, array, datas, remark);
         map.put("workbook", workbook);
         map.put("title", dataTemplet.getDt_title());

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/DataImportMapper.java

@@ -14,7 +14,7 @@ public interface DataImportMapper {
 
     List<DataImportDetail> selectDataById(Integer id);
 
-    DataImportDetail selectProductBycode(@Param("code") String code, @Param("id") int id, @Param("companyid") Long companyId);
+    DataImportDetail selectMainBycode(@Param("code") String code, @Param("id") int id, @Param("companyid") Long companyId);
 
     void updateDataImport(Integer id);
 

+ 6 - 6
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java

@@ -209,8 +209,8 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
 
             bom = new Bom();
             bom.setId(id);
-            bom.setBo_status(Status.CLOSE.getDisplay());
-            bom.setBo_statuscode(Status.CLOSE.name());
+            bom.setBo_status(Status.BANNED.getDisplay());
+            bom.setBo_statuscode(Status.BANNED.name());
             bom.setUpdaterId(BaseContextHolder.getUserId());
             bom.setUpdateTime(new Date());
 
@@ -232,12 +232,12 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
             if(bom == null){
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (Status.CLOSE.name().equals(bom.getBo_statuscode())){
+            if (Status.BANNED.name().equals(bom.getBo_statuscode())){
                 String code = bom.getBo_mothercode();
                 bom = new Bom();
                 bom.setId(id);
-                bom.setBo_statuscode(Status.OPEN.name());
-                bom.setBo_status(Status.OPEN.getDisplay());
+                bom.setBo_statuscode(Status.ENABLE.name());
+                bom.setBo_status(Status.ENABLE.getDisplay());
                 bom.setUpdateTime(new Date());
                 bom.setUpdaterId(BaseContextHolder.getUserId());
                 getMapper().updateByPrimaryKeySelective(bom);
@@ -246,7 +246,7 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
                 messageLogService.customizeLog(docBaseDTO, Operation.ENABLE);
                 return docBaseDTO;
             }else {
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }
         }else {
             throw new BizException(BizExceptionCode.ILLEGAL_ID);

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

@@ -399,11 +399,11 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
             Customer customer = getMapper().selectByPrimaryKey(id);
-            if(Status.CLOSE.name().equals(customer.getCu_statuscode())){
-                throw new BizException(BizExceptionCode.BIZ_CLOSE);
+            if(Status.BANNED.name().equals(customer.getCu_statuscode())){
+                throw new BizException(BizExceptionCode.BIZ_BANNED);
             }
-            customer.setCu_statuscode(Status.CLOSE.name());
-            customer.setCu_status(Status.CLOSE.getDisplay());
+            customer.setCu_statuscode(Status.BANNED.name());
+            customer.setCu_status(Status.BANNED.getDisplay());
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志
@@ -434,11 +434,11 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
             Customer customer = getMapper().selectByPrimaryKey(id);
-            if(Status.OPEN.name().equals(customer.getCu_statuscode())){
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+            if(Status.ENABLE.name().equals(customer.getCu_statuscode())){
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }
-            customer.setCu_statuscode(Status.OPEN.name());
-            customer.setCu_status(Status.OPEN.getDisplay());
+            customer.setCu_statuscode(Status.ENABLE.name());
+            customer.setCu_status(Status.ENABLE.getDisplay());
             getMapper().updateByPrimaryKeySelective(customer);
             docBaseDTO = getBaseDTOById(id);
             //日志

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

@@ -326,8 +326,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             String code = getMapper().getCodeById(id);
             Product product = new Product();
             product.setId(id);
-            product.setPr_status(Status.CLOSE.getDisplay());
-            product.setPr_statuscode(Status.CLOSE.name());
+            product.setPr_status(Status.BANNED.getDisplay());
+            product.setPr_statuscode(Status.BANNED.name());
             product.setUpdaterId(BaseContextHolder.getUserId());
             product.setUpdateTime(new Date());
             getMapper().updateByPrimaryKeySelective(product);
@@ -349,12 +349,12 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             if (product == null) {
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (!Status.CLOSE.getDisplay().equals(product.getPr_status())){
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+            if (!Status.ENABLE.getDisplay().equals(product.getPr_status())){
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }else{
                 product.setId(id);
-                product.setPr_statuscode(Status.OPEN.name());
-                product.setPr_status(Status.OPEN.getDisplay());
+                product.setPr_statuscode(Status.ENABLE.name());
+                product.setPr_status(Status.ENABLE.getDisplay());
                 product.setUpdaterId(BaseContextHolder.getUserId());
                 product.setUpdateTime(new Date());
                 getMapper().updateByPrimaryKeySelective(product);
@@ -549,7 +549,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
                 List<ProductDetail> productDetails = new ArrayList<>();
                 int i = getMapper().validateCodeWhenInsert(code, companyId);
                 List<DataImportDetail> data = datas.get(code);
-                DataImportDetail main = dataImportMapper.selectProductBycode(code, id, companyId);
+                DataImportDetail main = dataImportMapper.selectMainBycode(code, id, companyId);
                 Product product = JSONObject.parseObject(main.getDd_maindata(), Product.class);
                 Warehouse warehouse = null;
                 //验证仓库
@@ -563,6 +563,17 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
                     product.setPr_status(Status.OPEN.getDisplay());
                     product.setPr_statuscode(Status.OPEN.name());
                 }
+                //编号不存在
+                if (i == 0) {
+                    product.setId(0l);
+                    //编号存在、需要更新
+                } else if (update){
+                    Long pr_id = getMapper().selectIdByCode(code, companyId);
+                    product.setId(pr_id);
+                    //编号存在、不需要处理
+                } else {
+                    continue;
+                }
                 //添加从表
                 if (data.size() > 0) {
                     detno = 1;
@@ -584,17 +595,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
                         }
                     }
                 }
-                //编号不存在
-                if (i == 0) {
-                    product.setId(0l);
-                //编号存在、需要更新
-                } else if (update){
-                    Long pr_id = getMapper().selectIdByCode(code, companyId);
-                    product.setId(pr_id);
-                //编号存在、不需要处理
-                } else {
-                    continue;
-                }
+
                 listDTO.setMain(product);
                 listDTO.setItems(productDetails);
                 list.add(listDTO);

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

@@ -2,7 +2,6 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -330,8 +329,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
         if(id != null && id > 0){
             Vendor vendor = new Vendor();
             vendor.setId(id);
-            vendor.setVe_status(Status.CLOSE.getDisplay());
-            vendor.setVe_statuscode(Status.CLOSE.name());
+            vendor.setVe_status(Status.BANNED.getDisplay());
+            vendor.setVe_statuscode(Status.BANNED.name());
             vendor.setUpdaterId(BaseContextHolder.getUserId());
             vendor.setUpdateTime(new Date());
 
@@ -358,19 +357,19 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
             if(vendor == null){
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (Status.CLOSE.name().equals(vendor.getVe_statuscode())){
+            if (Status.BANNED.name().equals(vendor.getVe_statuscode())){
                 String code = vendor.getVe_code();
                 vendor = new Vendor();
                 vendor.setId(id);
-                vendor.setVe_statuscode(Status.OPEN.name());
-                vendor.setVe_status(Status.OPEN.getDisplay());
+                vendor.setVe_statuscode(Status.ENABLE.name());
+                vendor.setVe_status(Status.ENABLE.getDisplay());
                 getMapper().updateByPrimaryKeySelective(vendor);
                 //记录LOG
                 DocBaseDTO docBaseDTO = generateMsgObj(id, code);
                 messageLogService.customizeLog(docBaseDTO, Operation.ENABLE);
                 return docBaseDTO;
             }else {
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }
         }else {
             throw new BizException(BizExceptionCode.ILLEGAL_ID);

+ 6 - 7
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java

@@ -21,7 +21,6 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.RegexpUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.HashMap;
@@ -172,8 +171,8 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
             }
             Warehouse warehouse = new Warehouse();
             warehouse.setId(id);
-            warehouse.setWh_status(Status.CLOSE.getDisplay());
-            warehouse.setWh_statuscode(Status.CLOSE.name());
+            warehouse.setWh_status(Status.BANNED.getDisplay());
+            warehouse.setWh_statuscode(Status.BANNED.name());
             warehouse.setUpdaterId(BaseContextHolder.getUserId());
             warehouse.setUpdateTime(new Date());
 
@@ -195,12 +194,12 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
             if(warehouse == null){
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (Status.CLOSE.name().equals(warehouse.getWh_statuscode())){
+            if (Status.BANNED.name().equals(warehouse.getWh_statuscode())){
                 String code = warehouse.getWh_code();
                 warehouse = new Warehouse();
                 warehouse.setId(id);
-                warehouse.setWh_statuscode(Status.OPEN.name());
-                warehouse.setWh_status(Status.OPEN.getDisplay());
+                warehouse.setWh_statuscode(Status.ENABLE.name());
+                warehouse.setWh_status(Status.ENABLE.getDisplay());
                 warehouse.setUpdaterId(BaseContextHolder.getUserId());
                 warehouse.setUpdateTime(new Date());
 
@@ -210,7 +209,7 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
                 messageLogService.customizeLog(docBaseDTO, Operation.ENABLE);
                 return docBaseDTO;
             }else {
-                throw new BizException(BizExceptionCode.BIZ_OPEN);
+                throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }
         }else {
             throw new BizException(BizExceptionCode.ILLEGAL_ID);

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

@@ -91,7 +91,7 @@
   where dd_diid = #{id}
 </select>
 
-  <select id="selectProductBycode" resultMap="DetailMap">
+  <select id="selectMainBycode" resultMap="DetailMap">
     select * from  data_importdetail
     where dd_codevalue = #{code} and dd_diid=#{id} and ifnull(dd_success,0)=0 and dd_maindata is not null and companyid=#{companyid}
   </select>

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

@@ -902,7 +902,7 @@
         DELETE FROM PRODIODETAIL WHERE PD_PIID IN (SELECT PI_ID FROM PRODINOUT WHERE PI_INOUTNO=#{code} AND PRODINOUT.COMPANYID = #{companyId}) AND PRODIODETAIL.COMPANYID = #{companyId}
     </delete>
 
-    <select id="selectIdByCode" parameterType="long">
+    <select id="selectIdByCode" resultType="long">
         select pr_id from product where pr_code=#{code} and companyId=#{companyId}
     </select>
 </mapper>

+ 2 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java

@@ -49,6 +49,8 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

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

@@ -44,6 +44,8 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

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

@@ -102,6 +102,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;

+ 5 - 4
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -21,6 +21,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -654,15 +655,15 @@
 
   <update id="calcProdIn">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 

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

@@ -48,6 +48,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -148,6 +149,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <!--<result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />-->
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />

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

@@ -49,6 +49,8 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Long pd_whid;
 
     private String pd_whcode;

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

@@ -45,6 +45,8 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Long pd_whid;
 
     private String pd_whcode;
@@ -81,8 +83,6 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
-    private Double pd_ordertotal;
-
     private ProductDTO productDTO;
 
 }

+ 2 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -96,6 +96,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pd_nettotal;
 
+    private Double pd_ordertotal;
+
     private Integer pd_whid;
 
     private String pd_whcode;
@@ -130,7 +132,6 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pd_remark;
 
-    private Double pd_ordertotal;
 
     private Long pd_ioid;
 

+ 6 - 5
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -21,6 +21,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
@@ -739,19 +740,19 @@
 
   <update id="calcProdIn">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_ordertotal = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_ordertotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
     update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <delete id="deleteByInOutNo" >
       DELETE FROM prodiodetail WHERE PD_INOUTNO=#{code} AND PD_PICLASS=#{type} AND COMPANYID=#{companyId}
   </delete>
-</mapper>
+</mapper>

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

@@ -48,6 +48,7 @@
     <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
     <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
     <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
+    <result column="pd_ordertotal" jdbcType="DOUBLE" property="pd_ordertotal" />
     <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
     <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
     <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />

+ 41 - 0
frontend/saas-portal-web/build/build-dev.js

@@ -0,0 +1,41 @@
+'use strict'
+require('./check-versions')()
+
+process.env.NODE_ENV = 'development'
+
+const ora = require('ora')
+const rm = require('rimraf')
+const path = require('path')
+const chalk = require('chalk')
+const webpack = require('webpack')
+const config = require('../config')
+const webpackConfig = require('./webpack.prod.conf')
+
+const spinner = ora('building for development...')
+spinner.start()
+
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
+  if (err) throw err
+  webpack(webpackConfig, (err, stats) => {
+    spinner.stop()
+    if (err) throw err
+    process.stdout.write(stats.toString({
+      colors: true,
+      modules: false,
+      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
+      chunks: false,
+      chunkModules: false
+    }) + '\n\n')
+
+    if (stats.hasErrors()) {
+      console.log(chalk.red('  Build failed with errors.\n'))
+      process.exit(1)
+    }
+
+    console.log(chalk.cyan('  Build complete.\n'))
+    console.log(chalk.yellow(
+      '  Tip: built files are meant to be served over an HTTP server.\n' +
+      '  Opening index.html over file:// won\'t work.\n'
+    ))
+  })
+})

+ 4 - 2
frontend/saas-portal-web/build/webpack.prod.conf.js

@@ -13,7 +13,9 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
 
 const env = process.env.NODE_ENV === 'testing'
   ? require('../config/test.env')
-  : require('../config/prod.env')
+  : (process.env.NODE_ENV === 'development'
+    ? require('../config/dev.env')
+    : require('../config/prod.env'))
 
 const webpackConfig = merge(baseWebpackConfig, {
   module: {
@@ -48,7 +50,7 @@ const webpackConfig = merge(baseWebpackConfig, {
       filename: utils.assetsPath('css/[name].[contenthash].css'),
       // Setting the following option to `false` will not extract CSS from codesplit chunks.
       // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
-      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 
+      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
       // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
       allChunks: true,
     }),

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

@@ -6,11 +6,10 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   BASE_URL: {
     // 前端地址
-    web: '"http://192.168.0.181"',
+    web: '"https://trade-dev.usoftchina.com:5443"',
     // 后端接口网关
-    api: '"http://192.168.0.181:8560"',
-    // api:'"http://192.168.253.31:8560"',
+    api: '"https://saas-api-dev.usoftchina.com:5443"',
     // 账户中心接口
-    sso: '"http://192.168.253.12:32323"'
+    sso: '"https://sso-dev.usoftchina.com:5443"'
   }
 })

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

@@ -6,9 +6,9 @@ module.exports = merge(devEnv, {
   NODE_ENV: '"testing"',
   BASE_URL: {
     // 前端地址
-    web: '"https://trade-dev.usoftchina.com:5443"',
+    web: '"https://trade-test.usoftchina.com:5443"',
     // 后端接口网关
-    api: '"https://saas-api-dev.usoftchina.com:5443"',
+    api: '"https://saas-api-test.usoftchina.com:5443"',
     // 账户中心接口
     sso: '"https://sso-dev.usoftchina.com:5443"'
   }

+ 2 - 1
frontend/saas-portal-web/package.json

@@ -11,7 +11,8 @@
     "e2e": "node test/e2e/runner.js",
     "test": "npm run unit && npm run e2e",
     "build": "node build/build.js",
-    "build-test": "node build/build-test.js"
+    "build-test": "node build/build-test.js",
+    "build-dev": "node build/build-dev.js"
   },
   "dependencies": {
     "axios": "^0.18.0",

+ 9 - 1
frontend/saas-portal-web/src/components/conenter/addgongsi.vue

@@ -80,6 +80,7 @@
 </template>
 
 <script>
+import Session from '@/utils/session'
 import VDistpicker from 'v-distpicker'
     export default {
         data(){
@@ -112,7 +113,7 @@ import VDistpicker from 'v-distpicker'
                 document.documentElement.scrollTop = 0;
                 this.$router.push({name:'company',}); 
             },
-            //测企业名称
+            //测企业名称
             spaceName(){
                 let qyname = this.$refs.qyname.value.replace(/\s+/g, "");//公司名字过滤空格
                 if(qyname == ''){
@@ -235,6 +236,13 @@ import VDistpicker from 'v-distpicker'
                                 }
                             })
                             .then(res=>{
+                                let id = res.data.data
+                                let logoUrl = null
+                                let name = qyname
+                                let addenterprise = {'id':id, 'logoUrl': logoUrl, 'name': name}
+                                let session = JSON.parse(window.localStorage.getItem('app-state-session'))
+                                session.account.companies.push(addenterprise)
+                                Session.set(session);
                                 document.documentElement.scrollTop = 0;
                                 this.$router.push({name:'company'})
                             })

+ 7 - 0
frontend/saas-portal-web/src/components/conenter/company.vue

@@ -263,6 +263,13 @@
                     if (res.data.success) {
                         // this.saasid = res.data.data
                         // this.ktsass = false;
+                        let id = res.data.data
+                        let name = qyname
+                        let logoUrl = null
+                        let addenterprise = {'id':id, 'logoUrl': logoUrl, 'name': name}
+                        let session = JSON.parse(window.localStorage.getItem('app-state-session'))
+                        session.account.companies.push(addenterprise)
+                        Session.set(session);
                         this.$router.go(0);
                     } else {
                         let msg = res.data.message

+ 7 - 12
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -76,26 +76,17 @@
                     <div class="gs-anquanxinxi">
                         <div class="over aq-title"><span class="left">登录密码</span><button class="right dianji">更换密码</button></div>
                         <div class="aq-text">
-                            <p>飞飞有限公司生生世世生生世世生生世世生生世生生世世生生世世生生世世生生世世生生世世生生世世生生世世生世
-                                呜呜呜呜呜呜
+                            <p>安全性高的密码可以使账号更安全,建议您定期更换密码,并且设置一个包含数字和字母,长度超过8位以上的密码。
                             </p>
                         </div>
                     </div>
                     <div class="gs-anquanxinxi">
                         <div class="over aq-title"><span class="left">手机验证</span><button class="right dianji">修改手机号</button></div>
                         <div class="aq-text">
-                            <p>飞飞有限公司生生世世生生世世生生世世生生世生生世世生生世世生生世世生生世世生生
+                            <p>您绑定的手机:{{mobile}}。若已丢失或停用,请立即更换,避免账户被盗。
                             </p>
                         </div>
                     </div>
-                    <div class="gs-anquanxinxi">
-                        <div class="over aq-title"><span class="left">邮箱认证</span><button class="right dianji">绑定邮箱</button></div>
-                        <div class="aq-text">
-                            <p>飞飞有限公司生生世世生生世世生生
-                            </p>
-                        </div>
-                    </div>
-                    
                 </div>
             </div>
             
@@ -112,13 +103,17 @@ import { setTimeout } from 'timers';
                 nowindex: 0,//tab切换
                 tianjiaqiye: true,//添加企业切换
                 mytoken: JSON.parse(localStorage.getItem('app-state-session')).account,//本地储存的用户信息
+                mobile: null,
                 tab: [
                     {name: '企业信息'},
                     {name: '个人信息'},
-                    // {name: '安全信息'},
+                    {name: '安全信息'},
                     ],
             }
         },
+        mounted(){
+            let mob = this.mytoken.mobile;
+        },
         computed :{
             setTokenPage() {
                 return this.$url.web + '/set-token.html'

+ 58 - 3
frontend/saas-portal-web/src/components/conenter/problem.vue

@@ -21,7 +21,10 @@
                         <li>
                           <span class="left bz-yuandian"></span>
                           <span class="left">方式不同吧好像是差不多 </span>
-                          <img class="right bz-copy" src="/static/img/Triangle Copy 4.png" alt="">
+                          <img @click="shows" class="right bz-copy" :class="isrotate ? 'rotates' : 'norotate'" src="/static/img/Triangle Copy 4.png" alt="">
+                          <div class="Text-content" :class="isshow ? 'dispays' : 'hides'">
+                            <p>警方圣诞快乐JFK的实力积分积分累积角度考虑实际疯狂的世界佛教埃及空军看见反抗类毒素解放就</p>
+                          </div>
                         </li>
                         <li>
                           <span class="left bz-yuandian"></span>
@@ -46,16 +49,64 @@
 
 <script>
     export default {
-        
+        data(){
+          return {
+            isshow: false,
+            isrotate: false
+          }
+        },
+        methods: {
+          shows(){
+            this.isshow = !this.isshow
+            this.isrotate = !this.isrotate
+          }
+        }
     }
 </script>
 
 <style scoped>
+.dispays {
+  /* display: block; */
+  height: 60px;
+  transition: All 0.4s ease-in-out;
+  -webkit-transition: All 0.4s ease-in-out;
+  -moz-transition: All 0.4s ease-in-out;
+  -o-transition: All 0.4s ease-in-out;
+}
+.hides {
+  /* display: none; */
+  height: 0;
+  margin-bottom: -13px;
+  transition: All 0.4s ease-in-out;
+  -webkit-transition: All 0.4s ease-in-out;
+  -moz-transition: All 0.4s ease-in-out;
+  -o-transition: All 0.4s ease-in-out;
+}
+.Text-content {
+  float: left;
+  width: 90%;
+  margin-left: 4%;
+  margin-top: 2%;
+}
+.rotates {
+  transform: rotate(0deg);
+  -webkit-transform: rotate(0deg);
+  -moz-transform: rotate(0deg);
+  -o-transform: rotate(0deg);
+  -ms-transform: rotate(0deg);
+}
+.norotate {
+  transform: rotate(-90deg);
+  -webkit-transform: rotate(-90deg);
+  -moz-transform: rotate(-90deg);
+  -o-transform: rotate(-90deg);
+  -ms-transform: rotate(-90deg);
+}
 .bz-container {
     width: 55%;
     margin: 0 auto;
     font-size: 14px;
-    margin-top: 180px;
+    margin-top: 11%;
     margin-bottom: 190px;
 }
 .bz-titlebox {
@@ -78,5 +129,9 @@
 .bz-copy {
     margin-right: 7px;
     cursor: pointer;
+    transition: All 0.4s ease-in-out;
+    -webkit-transition: All 0.4s ease-in-out;
+    -moz-transition: All 0.4s ease-in-out;
+    -o-transition: All 0.4s ease-in-out;
 }
 </style>

+ 19 - 4
frontend/saas-web/app.json

@@ -306,12 +306,27 @@
      * Settings specific to testing builds.
      */
     "testing": {
+        "output": {
+            "appCache": {
+                "enable": true,
+                "path": "cache.appcache"
+            }
+        },
+        "loader": {
+            "cache": "${build.timestamp}"
+        },
+        "cache": {
+            "enable": true
+        },
+        "compressor": {
+            "type": "yui"
+        },
         "server": {
-            "accountCenter":"http://192.168.0.181:8000",
-            "accountEnterprise":"http://192.168.0.181:8000/#/enterprise",
+            "accountCenter": "https://saas-test.usoftchina.com:5443",
+            "accountEnterprise": "https://saas-test.usoftchina.com:5443/#/enterprise",
             "basePath": {
-                "https": "https://saas-api-dev.usoftchina.com:5443",
-                "http": "http://192.168.0.181:8560"
+                "https": "https://saas-api-test.usoftchina.com:5443",
+                "http": "http://192.168.0.181:8575"
             },
             "urlPattern": "^\/api\/"
         }

+ 9 - 0
frontend/saas-web/app/view/core/base/BasePanel.scss

@@ -19,6 +19,15 @@
         border-bottom-color: #fff !important;
         border-bottom-width: 1px !important;
     }
+    .x-btn-menu-active{
+        .x-btn-wrap{
+            .x-btn-button{
+                .x-btn-inner{
+                    color:#fff;
+                }
+            }
+        }
+    }
 }
 .core-base-gridpanel{
     .x-grid-body{

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

@@ -53,7 +53,7 @@ Ext.define('saas.view.core.base.GridPanel', {
                                 }
                             }else {
                                 console.error('exception: ', response.responseJson);
-                                saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                                saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson?response.responseJson.message:'请求超时');
                             }
                         }
                     }

+ 2 - 1
frontend/saas-web/app/view/core/base/ImportWindow.js

@@ -166,7 +166,8 @@ Ext.define('saas.view.core.base.ImportWindow', {
                         handler:function(b){
                             var caller = b.ownerCt.ownerCt.ownerCt.ownerCt.caller;
                             //获取模版
-                            window.location.href = '/api/commons/excel/import/templet?caller='+caller;
+                            var serverOptions = Ext.manifest.server;
+                            window.location.href = (serverOptions.basePath.http?serverOptions.basePath.http:serverOptions.basePath) + '/api/commons/excel/import/templet?caller='+caller;
                         }
                     }
                 },{

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

@@ -18,7 +18,7 @@ Ext.define('saas.view.core.dbfind.types.BomDbfindTrigger', {
         width: 200
     }],
     
-    defaultCondition: "bo_statuscode='OPEN'",
+    defaultCondition: "bo_statuscode='ENABLE'",
     //窗口字段设置
     dbSearchFields: [{
         emptyText: '输入BOM编号或名称',

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

@@ -8,7 +8,7 @@ Ext.define('saas.view.core.dbfind.types.CustomerDbfindTrigger', {
     dataUrl: '/api/document/customer/dbfind',
     addXtype: 'document-customer-formpanel',
     addTitle: '客户资料',
-    defaultCondition: "cu_statuscode='OPEN'",
+    defaultCondition: "cu_statuscode='ENABLE'",
     
     dbtpls: [{
         field: 'cu_code',

+ 2 - 2
frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js

@@ -13,7 +13,7 @@ Ext.define('saas.view.core.dbfind.types.ProductDbfindTrigger', {
     },{
         field:'pr_detail',width:200
     }],
-    defaultCondition: "pr_statuscode='OPEN'",
+    defaultCondition: "pr_statuscode='ENABLE'",
     dbSearchFields:[{
         emptyText:'输入物料编号、名称或规格',
         xtype : "textfield", 
@@ -102,7 +102,7 @@ Ext.define('saas.view.core.dbfind.types.ProductDbfindTrigger', {
             return Ext.util.Format.number(v, format);
         }
     },{
-        text: "L/T",
+        text: "采购提前期",
         dataIndex: "pr_leadtime",
         width: 80
     }]

+ 2 - 2
frontend/saas-web/app/view/core/dbfind/types/ProductMultiDbfindTrigger.js

@@ -40,7 +40,7 @@ Ext.define('saas.view.core.dbfind.types.ProductMultiDbfindTrigger', {
         field: 'pr_detail',
         width: 200
     }],
-    defaultCondition: "pr_statuscode='OPEN'",
+    defaultCondition: "pr_statuscode='ENABLE'",
     dbSearchFields: [{
         emptyText: '输入物料编号、名称或规格',
         width: 200,
@@ -133,7 +133,7 @@ Ext.define('saas.view.core.dbfind.types.ProductMultiDbfindTrigger', {
             return Ext.util.Format.number(v, format);
         },
     }, {
-        text: "L/T",
+        text: "采购提前期",
         dataIndex: "pr_leadtime",
         width: 80
     }]

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

@@ -9,7 +9,7 @@ Ext.define('saas.view.core.dbfind.types.VendorDbfindTrigger', {
     dataUrl:'/api/document/vendor/list',
     addXtype: 'document-vendor-formpanel',
     addTitle: '供应商资料',
-    defaultCondition:"ve_statuscode='OPEN'",
+    defaultCondition:"ve_statuscode='ENABLE'",
 
     //联想设置
     dbtpls:[{

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

@@ -9,7 +9,7 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
     // dataUrl:'http://localhost:9480/warehouse/list',
     addXtype: 'other-warehouse',
     addTitle: '仓库资料',
-    defaultCondition: "wh_statuscode='OPEN'",
+    defaultCondition: "wh_statuscode='ENABLE'",
     dbtpls: [{
         field: 'wh_code',
         width: 150

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

@@ -180,28 +180,31 @@ Ext.define('saas.view.core.form.FormPanelController', {
             delete params.items1;
         }
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._saveUrl,
             params: JSON.stringify(params),
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var id = localJson.data.id;
                 var code = localJson.data.code;
                 form.initId = id;
                 saas.util.FormUtil.loadData(form);
-                saas.util.BaseUtil.showSuccessToast('保存成功');
 
                 var newId = form.xtype + '-' + id;
                 var newTitle = form._title + '(' + code + ')';
 
                 saas.util.BaseUtil.refreshTabTitle(newId, newTitle);
 
+                saas.util.BaseUtil.showSuccessToast('保存成功');
                 form.fireEvent('aftersave', true, form, localJson);
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
             form.fireEvent('aftersave', false, form, res);
@@ -263,12 +266,14 @@ Ext.define('saas.view.core.form.FormPanelController', {
             delete params.items1;
         }
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._auditUrl,
             params: JSON.stringify(params),
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 // 未保存直接审核会返回id
                 if(localJson.data) {
@@ -289,6 +294,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             if(res.data) {
                 var id = localJson.data.id;
@@ -330,11 +336,13 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var id = viewModel.get(form._idField);
         var code = viewModel.get(form._codeField);
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._unAuditUrl + '/' + id,
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 //解析参数
                 saas.util.BaseUtil.showSuccessToast('反审核成功');
@@ -342,6 +350,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('反审核失败: ' + res.message);
         });

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

@@ -93,7 +93,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                                 if(response.timedout) {
                                     saas.util.BaseUtil.showErrorToast('请求超时');
                                 }else{
-                                    saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                                    saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson?response.responseJson.message:'请求超时');
                                 }
                             }
                         }
@@ -316,10 +316,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     onExport: function () {
         var grid = this.up('grid');
         //导出接口权限设置
-        var _url = grid.baseVastUrl.substring(0,grid.baseVastUrl.length-1);
-        var lastIndex = _url.lastIndexOf('/');
-        var caller = _url.substring(lastIndex);
-        var url = '/api/commons'+caller+'/export';
+        var url = '/api/commons/'+grid.caller+'/export';
         saas.util.BaseUtil.request({
             url: url,
             params: '',

+ 10 - 0
frontend/saas-web/app/view/core/query/QueryGridPanel.scss

@@ -9,6 +9,16 @@
         }
     }
 
+    .x-btn-menu-active{
+        .x-btn-wrap{
+            .x-btn-button{
+                .x-btn-inner{
+                    color:#fff;
+                }
+            }
+        }
+    }
+
     .x-panel-default-outer-border-trl {
         border-top-color: #fff !important;
         border-top-width: 1px !important;

+ 3 - 2
frontend/saas-web/app/view/document/bom/BasePanel.js

@@ -34,8 +34,8 @@ Ext.define('saas.view.document.bom.BasePanel', {
         fields: ['bo_statuscode', 'bo_status'],
         data: [
             ["ALL", "全部"],
-            ["OPEN", "已启"],
-            ["CLOSE", "已关闭"]
+            ["ENABLE", "已启"],
+            ["BANNED", "已禁用"]
         ]
         }),
         getCondition: function(value) {
@@ -61,6 +61,7 @@ Ext.define('saas.view.document.bom.BasePanel', {
         codeField: 'bo_mothercode',
         statusCodeField:'bo_statuscode',
         dataUrl: '/api/document/bom/list',
+        caller: 'Bom',
         columns : [{
             text : "id", 
             width : 0, 

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

@@ -220,9 +220,9 @@ Ext.define('saas.view.document.bom.FormPanel', {
 
     auditTexts: {
         auditCode: 'CLOSE',
-        auditText: '已关闭',
+        auditText: '已禁用',
         unAuditCode: 'OPEN',
-        unAuditText: '已启',
+        unAuditText: '已启',
         auditBtnText: '禁用',
         unAuditBtnText: '启用',
     }

+ 3 - 2
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -43,8 +43,8 @@ Ext.define('saas.view.document.customer.BasePanel', {
         fields: ['cu_statuscode', 'cu_status'],
         data: [
             ["ALL", "全部"],
-            ["OPEN", "已启"],
-            ["CLOSE", "已关闭"]
+            ["ENABLE", "已启"],
+            ["BANNED", "已禁用"]
         ]
         }),
         getCondition: function(value) {
@@ -70,6 +70,7 @@ Ext.define('saas.view.document.customer.BasePanel', {
         codeField: 'cu_code',
         statusCodeField:'cu_statuscode',
         dataUrl: '/api/document/customer/list',
+        caller: 'Customer',
         columns : [
         {
             text : "客户id", 

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

@@ -438,9 +438,9 @@ Ext.define('saas.view.document.customer.FormPanel', {
     }],
     auditTexts: {
         auditCode: 'CLOSE',
-        auditText: '已关闭',
+        auditText: '已禁用',
         unAuditCode: 'OPEN',
-        unAuditText: '已启',
+        unAuditText: '已启',
         auditBtnText: '禁用',
         unAuditBtnText: '启用',
     }

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

@@ -316,14 +316,19 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 hideTrigger:true,
                 allowBlank:false,
                 maxLength: 30,
-                regex:/^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/,
+                regex:/^1(3|4|5|7|8)\d{9}$/,
                 regexText:'请输入正确的手机号码',
                 listeners:{
+                    change:function(f,a,b){
+                        if(a==''){
+                            f._lastCheckValue = ''
+                        }
+                    },
                     blur:function(f,a,b,c){
                         var form = f.ownerCt;
                         if(f.value&&f.value!=''&&f.isValid()&&f._lastCheckValue!=f.value){
+                            f._lastCheckValue = f.value;
                             form.setLoading(true);
-                            f._lastCheckValue = f.value
                             Ext.Ajax.request({
                                 url: '/api/account/account/checkMobile?mobile='+f.value,
                                 method: 'GET',
@@ -465,7 +470,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 fieldLabel: '仓库状态',
                 name: 'wh_status',   
-                value:'已启',
+                value:'已启',
                 maxLength: 20
             },{
                 xtype:'hidden',

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

@@ -44,8 +44,8 @@ Ext.define('saas.view.document.product.BasePanel', {
         fields: ['pr_statuscode', 'pr_status'],
         data: [
             ["ALL", "全部"],
-            ["OPEN", "已启"],
-            ["CLOSE", "已关闭"]
+            ["ENABLE", "已启"],
+            ["BANNED", "已禁用"]
         ]
         }),
         getCondition: function(value) {
@@ -71,6 +71,7 @@ Ext.define('saas.view.document.product.BasePanel', {
         codeField: 'pr_code',
         statusCodeField:'pr_statuscode',
         dataUrl: '/api/document/product/list',
+        caller: 'Product',
         columns : [{
             text : "id", 
             width : 0, 

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

@@ -198,7 +198,7 @@ Ext.define('saas.view.document.product.FormPanel', {
         fieldLabel : "更新时间"
     }, {
         xtype: 'numberfield',
-        fieldLabel: 'L/T',
+        fieldLabel: '采购提前期',
         name: 'pr_leadtime',
         minValue: 0,
         maxLength: 10
@@ -357,9 +357,9 @@ Ext.define('saas.view.document.product.FormPanel', {
     }],
     auditTexts: {
         auditCode: 'CLOSE',
-        auditText: '已关闭',
+        auditText: '已禁用',
         unAuditCode: 'OPEN',
-        unAuditText: '已启',
+        unAuditText: '已启',
         auditBtnText: '禁用',
         unAuditBtnText: '启用',
     },

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

@@ -38,8 +38,8 @@ Ext.define('saas.view.document.vendor.BasePanel', {
         fields: ['ve_statuscode', 've_status'],
         data: [
             ["ALL", "全部"],
-            ["OPEN", "已启"],
-            ["CLOSE", "已关闭"]
+            ["ENABLE", "已启"],
+            ["BANNED", "已禁用"]
         ]
         }),
         getCondition: function(value) {
@@ -65,6 +65,7 @@ Ext.define('saas.view.document.vendor.BasePanel', {
         codeField: 've_code',
         statusCodeField:'ve_statuscode',
         dataUrl: '/api/document/vendor/list',
+        caller: 'Vendor',
         columns : [{
             text : "供应商id", 
             width : 0, 

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

@@ -322,9 +322,9 @@ Ext.define('saas.view.document.vendor.FormPanel', {
     }],
     auditTexts: {
         auditCode: 'CLOSE',
-        auditText: '已关闭',
+        auditText: '已禁用',
         unAuditCode: 'OPEN',
-        unAuditText: '已启',
+        unAuditText: '已启',
         auditBtnText: '禁用',
         unAuditBtnText: '启用',
     }

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

@@ -5,7 +5,7 @@ Ext.define('saas.view.home.infoCardList.Payment', {
     extend: 'saas.view.home.infoCardList.InfoList',
     xtype: 'home-infocardlist-payment',
 
-    listUrl: '/api/purchase/prodinout/list',
+    listUrl: '/api/purchase/prodinout/homepageList',
     idField: 'id',
     codeField: 'pi_inoutno',
     // detailTitle: '采购验收单',
@@ -68,7 +68,8 @@ Ext.define('saas.view.home.infoCardList.Payment', {
         width: 80
     }, {
         text: '数量',
-        dataIndex: 'pd_inqty',
+        // dataIndex: 'pd_inqty',
+        dataIndex: 'qty',
         xtype: 'numbercolumn',
         width: 110,
         renderer: function (v) {

+ 3 - 2
frontend/saas-web/app/view/home/infoCardList/Recment.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.home.infoCardList.Recment', {
     extend: 'saas.view.home.infoCardList.InfoList',
     xtype: 'home-infocardlist-recment',
 
-    listUrl: '/api/sale/prodinout/list',
+    listUrl: '/api/sale/prodinout/homepageList/',
     idField: 'id',
     codeField: 'pi_inoutno',
     // detailTitle: '出货单',
@@ -66,7 +66,8 @@ Ext.define('saas.view.home.infoCardList.Recment', {
         width: 150
     }, {
         text: '出货数量',
-        dataIndex: 'pd_outqty',
+        // dataIndex: 'pd_outqty',
+        dataIndex: 'qty',
         xtype:'numbercolumn',
         width: 110,
         renderer : function(v) {

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

@@ -5,7 +5,7 @@ Ext.define('saas.view.home.infoCardList.UnauditCheckIn', {
     extend: 'saas.view.home.infoCardList.InfoList',
     xtype: 'home-infocardlist-unauditcheckin',
 
-    listUrl: '/api/purchase/prodinout/list',
+    listUrl: '/api/purchase/prodinout/homepageList',
     idField: 'id',
     codeField: 'pi_inoutno',
     // detailTitle: '采购验收单',
@@ -68,7 +68,8 @@ Ext.define('saas.view.home.infoCardList.UnauditCheckIn', {
         width: 80
     }, {
         text: '数量',
-        dataIndex: 'pd_inqty',
+        // dataIndex: 'pd_inqty',
+        dataIndex: 'qty',
         xtype: 'numbercolumn',
         width: 110,
         renderer: function (v) {

+ 3 - 2
frontend/saas-web/app/view/home/infoCardList/UnauditSaleOut.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.home.infoCardList.UnauditSaleOut', {
     extend: 'saas.view.home.infoCardList.InfoList',
     xtype: 'home-infocardlist-unauditsaleout',
 
-    listUrl: '/api/sale/prodinout/list',
+    listUrl: '/api/sale/prodinout/homepageList',
     idField: 'id',
     codeField: 'pi_inoutno',
     // detailTitle: '出货单',
@@ -66,7 +66,8 @@ Ext.define('saas.view.home.infoCardList.UnauditSaleOut', {
         width: 150
     }, {
         text: '数量',
-        dataIndex: 'pd_outqty',
+        // dataIndex: 'pd_outqty',
+        dataIndex: 'qty',
         xtype:'numbercolumn',
         width: 110,
         renderer : function(v) {

+ 12 - 10
frontend/saas-web/app/view/main/Navigation.js

@@ -124,16 +124,18 @@ Ext.define('saas.view.main.Navigation', {
                         });
 
                         view.el.dom.addEventListener('mouseleave', function (e) {
-                            var ex = e.clientX,
-                                ey = e.clientY,
-                                box = menuView.getBoundingClientRect(),
-                                navItem = menu.navItem,
-                                navBox = navItem.getBoundingClientRect();
-
-                            if (ey <= box.top || ex >= (box.left + box.width) || ey >= (box.top + box.height) || (ex <= box.left && (ey <= navBox.top || ey >= (navBox.top + navBox.height)))) {
-                                menu.navItem.classList.remove(menu.navView.overItemCls);
-                                menu.hide();
-                            }
+                            menu.navItem.classList.remove(menu.navView.overItemCls);
+                            menu.hide();
+                            // var ex = e.clientX,
+                            //     ey = e.clientY,
+                            //     box = menuView.getBoundingClientRect(),
+                            //     navItem = menu.navItem,
+                            //     navBox = navItem.getBoundingClientRect();
+
+                            // if ((ex <= box.left && (ey <= (navBox.top - 5) || ey >= (navBox.top + navBox.height))) || ey <= (box.top - 5) || ex >= (box.left + box.width + 5) || ey >= (box.top + box.height + 5)) {
+                            //     menu.navItem.classList.remove(menu.navView.overItemCls);
+                            //     menu.hide();
+                            // }
                         });
 
                         Ext.Array.each(menuItem, function (mi) {

+ 1 - 0
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -74,6 +74,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         addXtype: 'money-fundtransfer-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/fundtransfer/',
+        caller:'FundTransfer',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 1 - 0
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -94,6 +94,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         addXtype: 'money-othreceipts-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/othreceipts/',
+        caller:'OthReceipts',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 1 - 0
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -91,6 +91,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         addXtype: 'money-othspendings-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/othspendings/',
+        caller:'OthSpendings',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 4 - 0
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -177,17 +177,21 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._turnInUrl+id.value,
             method: 'GET',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 saas.util.BaseUtil.showSuccessToast('转单成功');
               
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

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

@@ -66,6 +66,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         addXtype: 'money-paybalance-formpanel',
         defaultCondition: '',
         baseVastUrl: '/api/money/paybalance/',
+        caller: 'PayBalance',
         baseColumn: [
             {
                 text: 'id',

+ 4 - 0
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -174,17 +174,21 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._turnInUrl+id.value,
             method: 'GET',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 saas.util.BaseUtil.showSuccessToast('转单成功');
               
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

+ 1 - 0
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -58,6 +58,7 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         addXtype: 'money-recbalance-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/recbalance/',
+        caller: 'RecBalance',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 7 - 49
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -485,55 +485,6 @@ Ext.define('saas.view.money.verification.FormPanelController', {
         return defaultCondition;
     },
 
-    /**
-     * 清空所有从表数据
-     */
-    clearDetails: function() {
-        var me = this;
-        
-        me.clearDetail0();
-        me.clearDetail1();
-    },
-
-    /**
-     * 清空第一个从表数据
-     */
-    clearDetail0: function(f, n, o) {
-        var me = this,
-        form = me.getView(),
-        grid = form.query('detailGridField')[0];
-        me.clearDetail(grid);
-    },
-
-    /**
-     * 清空第二个从表数据
-     */
-    clearDetail1: function() {
-        var me = this,
-        form = me.getView(),
-        grid = form.query('detailGridField')[1];
-        me.clearDetail(grid);
-    },
-
-    /**
-     * 清空一个从表数据
-     */
-    clearDetail: function(grid) {
-        var datas = [],
-        emptyRows = grid.emptyRows,
-        detnoColumn = grid.detnoColumn,
-        detno = 0,
-        store = grid.getStore();
-        
-        Ext.Array.each(new Array(emptyRows), function() {
-            detno += 1;
-            var data = {};
-            data[detnoColumn] = detno;
-            datas.push(data);
-        })
-        store.removeAll();
-        store.add(datas);
-    },
     onSave: function() {
         var me = this,
             form = me.getView(),
@@ -573,12 +524,14 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             params['items' + ( i + 1)] = formData['detail' + i];
         }
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._saveUrl,
             params: JSON.stringify(params),
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var id = localJson.data.id;
                 var code = localJson.data.code;
@@ -595,11 +548,13 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
             form.fireEvent('aftersave', false, form, res);
         });
     },
+
     audit: function() {
         var me = this,
         form = me.getView(),
@@ -617,12 +572,14 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             params['items' + ( i + 1)] = formData['detail' + i];
         }
 
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._auditUrl,
             params: JSON.stringify(params),
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 // 未保存直接审核会返回id
                 if(localJson.data) {
@@ -643,6 +600,7 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             if(res.data) {
                 var id = localJson.data.id;

+ 1 - 0
frontend/saas-web/app/view/money/verification/QueryPanel.js

@@ -77,6 +77,7 @@ Ext.define('saas.view.money.verification.QueryPanel', {
         addXtype: 'money-verification-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/verification/',
+        caller: 'Verification',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 4 - 0
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -63,11 +63,14 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(false);
         saas.util.BaseUtil.request({
             url: form._turnInUrl+'/'+id.value,
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var intValue = localJson.data.id,
                     codeValue= localJson.data.code,
@@ -79,6 +82,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

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

@@ -106,6 +106,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         addXtype: 'purchase-purchase-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/purchase/purchase/',
+        caller:'Purchase',
         baseColumn: [
         {
             text: 'id',

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

@@ -266,7 +266,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             },{
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0, 
                 // editor : {
                 //     xtype : "numberfield",
@@ -327,7 +327,11 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 width : 110.0,
                 format: '0',
                 renderer: function(v) {
-                    return v ? v : null;
+                    if(v) {
+                        return Ext.util.Format.number(v, '0');
+                    }else {
+                        return null;
+                    }
                 }
             },{
                 text : "备注", 

+ 12 - 8
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -111,14 +111,14 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
         main[form._statusCodeField] = auditTexts.unAuditCode;
         main[form._statusField] = auditTexts.unAuditText;
         //录入人,录入日期,审核人,审核日期清空
-        main['creatorId'] = null;
-        main['creatorName'] = null;
-        main['createTime'] = null;
-        main['updaterId'] = null;
-        main['updaterName'] = null;
-        main['updateTime'] = null;
-        main[form._auditmanField] = null;
-        main[form._auditdateField] = null;
+        main['creatorId'] = undefined;
+        main['creatorName'] = undefined;
+        main['createTime'] = undefined;
+        main['updaterId'] = undefined;
+        main['updaterName'] = undefined;
+        main['updateTime'] = undefined;
+        main[form._auditmanField] = undefined;
+        main[form._auditdateField] = undefined;
 
         for(var k in main) {
             // 主表日期改为当前日期
@@ -153,11 +153,14 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._turnOutUrl+'/'+id.value,
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var intValue = localJson.data.id,
                 codeValue= localJson.data.code,
@@ -170,6 +173,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
             console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

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

@@ -106,6 +106,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         addXtype:'purchase-purchasein-formpanel',
         defaultCondition:' pi_class = \'采购验收单\'',
         baseVastUrl:'/api/purchase/prodinout/',
+        caller:'PurchaseIn',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -134,7 +135,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             width: 150
         },{
             text: '总金额',
-            dataIndex: 'pi_total',
+            dataIndex: 'pd_ordertotal',
             width: 110
         },{
             text: '单据状态',
@@ -251,7 +252,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',
             width: 110,
             renderer : function(v) {

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

@@ -253,7 +253,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             {
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0, 
                 // editor : {
                 //     xtype : "numberfield",
@@ -313,7 +313,11 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 xtype : "numbercolumn", 
                 width : 110.0,
                 renderer: function(v) {
-                    return Ext.util.Format.number(v, '0');
+                    if(v) {
+                        return Ext.util.Format.number(v, '0');
+                    }else {
+                        return null;
+                    }
                 }
             },{
                 text : "备注", 

+ 8 - 8
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -113,14 +113,14 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
         main[form._statusCodeField] = auditTexts.unAuditCode;
         main[form._statusField] = auditTexts.unAuditText;
         //录入人,录入日期,审核人,审核日期清空
-        main['creatorId'] = null;
-        main['creatorName'] = null;
-        main['createTime'] = null;
-        main['updaterId'] = null;
-        main['updaterName'] = null;
-        main['updateTime'] = null;
-        main[form._auditmanField] = null;
-        main[form._auditdateField] = null;
+        main['creatorId'] = undefined;
+        main['creatorName'] = undefined;
+        main['createTime'] = undefined;
+        main['updaterId'] = undefined;
+        main['updaterName'] = undefined;
+        main['updateTime'] = undefined;
+        main[form._auditmanField] = undefined;
+        main[form._auditdateField] = undefined;
 
         for(var k in main) {
             // 主表日期改为当前日期

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

@@ -109,6 +109,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         addXtype:'purchase-purchaseout-formpanel',
         defaultCondition:' pi_class = \'采购验退单\'',
         baseVastUrl:'/api/purchase/prodinout/',
+        caller:'PurchaseOut',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -137,7 +138,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             width: 150
         },{
             text: '总金额',
-            dataIndex: 'pi_total',
+            dataIndex: 'pd_ordertotal',
             width: 110
         },{
             text: '单据状态',
@@ -254,7 +255,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
                 },
             },{
                 text: '金额',
-                dataIndex: 'pd_total',
+                dataIndex: 'pd_ordertotal',
                 xtype:'numbercolumn',
                 width: 110,
                 renderer : function(v) {

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

@@ -31,7 +31,6 @@ Ext.define('saas.view.sale.report.SaleRec', {
     }, {
         text: '收款单号',
         dataIndex: 'rb_code',
-        summaryType: 'count',
         width: 150
     }, {
         text: '客户编号',
@@ -64,13 +63,6 @@ Ext.define('saas.view.sale.report.SaleRec', {
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
-        },
-        summaryType: 'sum',
-        summaryRenderer: function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-            var format = '0,000.' + xr.join();
-            return Ext.util.Format.number(v, format);
         }
     }, {
         text: '本次收款',
@@ -107,7 +99,7 @@ Ext.define('saas.view.sale.report.SaleRec', {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
             var format = '0.' + xr.join();
-            return Ext.util.Format.number(v*100, format);
+            return Ext.util.Format.number(v, format);
         }
     }, {
         text: '备注',

+ 99 - 76
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -5,111 +5,134 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=sa_custname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[
-                            {
-                                from:'id',to:'sa_custid',ignore:true
-                            },{
-                                from:'cu_code',to:'sa_custcode'
-                            },{
-                                from:'cu_name',to:'sa_custname'
-                            },{
-                                from:'ca_address',to:'sa_toplace'
-                            },{
-                                from:'cu_sellercode',to:'sa_sellercode'
-                            },{
-                                from:'cu_sellername',to:'sa_seller'
-                            }],
-                    }) ;   
+            'dbfindtrigger[name=sa_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'sa_custid',
+                            ignore: true
+                        }, {
+                            from: 'cu_code',
+                            to: 'sa_custcode'
+                        }, {
+                            from: 'cu_name',
+                            to: 'sa_custname'
+                        }, {
+                            from: 'ca_address',
+                            to: 'sa_toplace'
+                        }, {
+                            from: 'cu_sellercode',
+                            to: 'sa_sellercode'
+                        }, {
+                            from: 'cu_sellername',
+                            to: 'sa_seller'
+                        }],
+                    });
 
                 }
-            },// 主表-采购员名称
-            'dbfindtrigger[name=sa_sellercode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'id',to:'sa_sellerid',ignore:true
-                        },{
-                            from:'em_code',to:'sa_sellercode'
-                        },{
-                            from:'em_name',to:'sa_seller'
+            }, // 主表-采购员名称
+            'dbfindtrigger[name=sa_sellercode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'sa_sellerid',
+                            ignore: true
+                        }, {
+                            from: 'em_code',
+                            to: 'sa_sellercode'
+                        }, {
+                            from: 'em_name',
+                            to: 'sa_seller'
                         }],
-                    }) ;   
+                    });
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'multidbfindtrigger[name=sd_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[
-                        {
-                            from:'pr_code',to:'sd_prodcode'
+            'multidbfindtrigger[name=sd_prodcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'pr_code',
+                            to: 'sd_prodcode'
+                        }, {
+                            from: 'pr_saleprice',
+                            to: 'sd_price'
                         }, {
-                            from:'pr_saleprice',to:'sd_price'
-                        },{
-                            from:'pr_detail',to:'pr_detail'
+                            from: 'pr_detail',
+                            to: 'pr_detail'
                         }, {
-                            from:'pr_spec',to:'pr_spec'
+                            from: 'pr_spec',
+                            to: 'pr_spec'
                         }, {
-                            from:'id',to:'sd_prodid',ignore:true
+                            from: 'id',
+                            to: 'sd_prodid',
+                            ignore: true
                         }],
-                    }) ;   
+                    });
 
                 }
             }
         });
 
     },
-    turnOut: function() {
-        var me = this,
-        form = me.getView(),
-        id = form.getForm().findField(form._idField);
-        saas.util.BaseUtil.request({
-            url: form._turnOutUrl+'/'+id.value,
-            method: 'POST',
-        })
-        .then(function(localJson) {
-            if(localJson.success){
-                var intValue = localJson.data.id,
-                    codeValue= localJson.data.code,
-                    name = '出货单';
-                saas.util.BaseUtil.openTab('sale-saleout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
-                    initId: intValue
-                });
-                saas.util.BaseUtil.showSuccessToast('转单成功');  
-                saas.util.FormUtil.loadData(form);
-            }
-        })
-        .catch(function(res) {
-            console.error(res);
-            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
-        });
-     },
-    turnPurchase : function(){
+    turnOut: function () {
         var me = this,
             form = me.getView(),
             id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
-            url: form._turnPurchase+'/'+id.value,
-            method: 'POST',
-        })
-            .then(function(localJson) {
-                if(localJson.success){
+                url: form._turnOutUrl + '/' + id.value,
+                method: 'POST',
+            })
+            .then(function (localJson) {
+                form.setLoading(false);
+                if (localJson.success) {
                     var intValue = localJson.data.id,
-                        codeValue= localJson.data.code,
-                        name = localJson.data.name;
-                    saas.util.BaseUtil.openTab('purchase-purchase-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                        codeValue = localJson.data.code,
+                        name = '出货单';
+                    saas.util.BaseUtil.openTab('sale-saleout-formpanel', name + "(" + codeValue + ")", codeValue + intValue, {
                         initId: intValue
                     });
                     saas.util.BaseUtil.showSuccessToast('转单成功');
                     saas.util.FormUtil.loadData(form);
                 }
             })
-            .catch(function(res) {
+            .catch(function (res) {
+                form.setLoading(false);
                 console.error(res);
                 saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
             });
+    },
+    turnPurchase: function () {
+        var me = this,
+            form = me.getView(),
+            id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
+        saas.util.BaseUtil.request({
+            url: form._turnPurchase + '/' + id.value,
+            method: 'POST',
+        })
+        .then(function (localJson) {
+            form.setLoading(false);
+            if (localJson.success) {
+                var intValue = localJson.data.id,
+                    codeValue = localJson.data.code,
+                    name = localJson.data.name;
+                saas.util.BaseUtil.openTab('purchase-purchase-formpanel', name + "(" + codeValue + ")", codeValue + intValue, {
+                    initId: intValue
+                });
+                saas.util.BaseUtil.showSuccessToast('转单成功');
+                saas.util.FormUtil.loadData(form);
+            }
+        })
+        .catch(function (res) {
+            form.setLoading(false);
+            console.error(res);
+            saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
+        });
     }
 });

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

@@ -96,6 +96,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         addXtype: 'sale-sale-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/sale/sale/',
+        caller:'Sale',
         baseColumn: [{
             text: 'id',
             dataIndex: 'sa_id',
@@ -253,18 +254,20 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
                 var format = '0.' + xr.join();
                 return Ext.util.Format.number(v, format);
             },
-        }, {
-            text: '已审核采购单数',
-            dataIndex: 'sd_pdqty',
-            xtype: 'numbercolumn',
-            width: 180,
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-                var format = '0.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            },
-        }, {
+        },
+        //  {
+        //     text: '已审核采购单数',
+        //     dataIndex: 'sd_pdqty',
+        //     xtype: 'numbercolumn',
+        //     width: 180,
+        //     renderer : function(v) {
+        //         var arr = (v + '.').split('.');
+        //         var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+        //         var format = '0.' + xr.join();
+        //         return Ext.util.Format.number(v, format);
+        //     },
+        // } 
+        {
             text: '备注',
             dataIndex: 'sd_remark',
             width: 250

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

@@ -95,6 +95,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         addXtype:'sale-salein-formpanel',
         defaultCondition:' pi_class = \'销售退货单\'',
         baseVastUrl: '/api/sale/prodinout/',
+        caller:'SaleIn',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 4 - 0
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -59,11 +59,14 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
+
+        form.setLoading(true);
         saas.util.BaseUtil.request({
             url: form._turnInUrl + '/' + id.value,
             method: 'POST',
         })
         .then(function(localJson) {
+            form.setLoading(false);
             if(localJson.success){
                 var intValue = localJson.data.id,
                     codeValue= localJson.data.code,
@@ -76,6 +79,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
             }
         })
         .catch(function(res) {
+            form.setLoading(false);
            // console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });

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

@@ -97,6 +97,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         addXtype:'sale-saleout-formpanel',
         defaultCondition:' pi_class = \'出货单\'',
         baseVastUrl: '/api/sale/prodinout/',
+        caller:'SaleOut',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 10 - 35
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -116,6 +116,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         addXtype:'stock-appropriationinout-formpanel',
         defaultCondition:' pi_class = \'调拨单\'',
         baseVastUrl:'/api/storage/prodinout/',
+        caller:'AppropriationInOut',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -180,10 +181,6 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
                 text: '序号',
                 dataIndex: 'pd_pdno',
                 width: 80
-            },{
-                text: '相关单号',
-                dataIndex: 'pd_ordercode',
-                width: 150
             },{
                 text: '物料编号',
                 dataIndex: 'pd_prodcode',
@@ -193,7 +190,11 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
                 dataIndex: 'pr_detail',
                 width: 200
             },{
-                text: '物料规格',
+                text: '型号',
+                dataIndex: 'pr_orispeccode',
+                width: 150
+            },{
+                text: '规格',
                 dataIndex: 'pr_spec',
                 width: 150
             },{
@@ -206,39 +207,13 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
                 xtype:'numbercolumn',
                 width: 110
             },{
-                text: '仓',
+                text: '拨出仓',
                 dataIndex: 'pd_whname',
                 width: 150
             },{
-                text: '单价',
-                dataIndex: 'pd_orderprice',
-                xtype:'numbercolumn',
-                width: 110,
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
-                }         
-            },{
-                text: '税率',
-                dataIndex: 'pd_taxrate',
-                xtype:'numbercolumn',
-                width: 80,            
-                renderer : function(v) {
-                    return Ext.util.Format.number(v, '0');
-                },
-            },{
-                text: '金额',
-                dataIndex: 'pd_total',
-                xtype:'numbercolumn',            
-                width: 110,
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
-                }
+                text: '拨入仓',
+                dataIndex: 'pd_inwhname',
+                width: 150
             },{
                 text: '备注',
                 dataIndex: 'pd_remark',

+ 67 - 115
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -29,23 +29,11 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         gridexporter: true
     },
     tbar: [{
-        xtype: 'hidden',
-        name: 'wh_id',
-        bind:'{wh_id}',
-        fieldLabel: 'wh_id'
-    },{
-        xtype: 'hidden',
-        name: 'wh_code',
-        fieldLabel: 'wh_code'
-    },{		
         xtype: 'warehouseDbfindTrigger',
         name: 'wh_description',
+        bind: '{form.wh_description}',
         emptyText: '仓库',
         dbfinds:[{
-            from:'id',to:'wh_id',ignore:true 
-        }, { 
-            from:'wh_code',to:'wh_code'
-        }, {
             from:'wh_description',to:'wh_description'
         }],
         width:150,
@@ -54,32 +42,25 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         xtype : "remotecombo", 
         storeUrl:'/api/document/producttype/getCombo',
         name : "pr_kind",
-        bind:'{pr_kind}', 
+        bind: '{form.pr_kind}',
         emptyText : "类型",
         hiddenBtn:true, 
         allowBlank : false,
         width:150
     },{
-        xtype: 'hidden',
-        name: 'pr_id',
-        bind:'{pr_id}',
-        fieldLabel: 'pr_id'
-    },{
-        xtype: 'hidden',
-        name: 'pr_code',
-        fieldLabel: 'pr_code'
-    },{
-        xtype: 'productDbfindTrigger',
+        // xtype: 'productDbfindTrigger',
+        xtype: 'textfield',
         name: 'pr_detail',
         emptyText:'输入物料编号或名称',
         width:200,
-        dbfinds:[{
-            from:'id',to:'pr_id',ignore:true
-        },{
-            from:'pr_code',to:'pr_code',
-        }, {
-            from:'pr_detail',to:'pr_detail'
-        }]
+        bind: '{form.pr_detail}',
+        getCondition: function(value) {
+            if(value) {
+                return 'pr_detail like %' + value + '% or pr_code like%' + value + '%';
+            }else {
+                return '1 = 1';
+            }
+        }
     },{
         cls:'x-formpanel-btn-blue',
         xtype:'button',
@@ -235,8 +216,6 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         }  
     }],
 
-    condition:'',
-
     listeners:{
         boxready: function(grid, width, height, eOpts) {
             var store = grid.getStore(),
@@ -288,7 +267,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
                 },
                 listeners: {
                     beforeload: function (store, op) {
-                        var condition = me.condition;
+                        var condition = me.getConditions();
                         if (Ext.isEmpty(condition)) {
                             condition = "";
                         }
@@ -315,6 +294,27 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     },
 
     listeners: {
+        beforerender: function(grid) {
+            var tbar = grid.dockedItems.items[2];
+            var fields = tbar.items.items;
+            var items = [];
+
+            Ext.each(fields, function(f, index){
+                items.push(f);
+                f.enableKeyEvents = true;
+                f.on && f.on({
+                    keydown: {
+                        fn: function(th, e, eOpts) {
+                            if(e.keyCode == 13) {
+                                grid.store.load();
+                            }
+                        }
+                    }
+                });
+            });
+
+            grid.formItems = items;
+        },
         boxready: function(grid, width, height, eOpts) {
             var store = grid.getStore(),
             gridBodyBox = grid.body.dom.getBoundingClientRect(),
@@ -329,83 +329,46 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
      /**
      * 获得过滤条件
      */
-    getConditions: function(moreQuery) {
+    getConditions: function() {
         var me = this,
-        formItems = me.queryFormItems,
-        moreQueryFormItems = me.moreQueryFormItems,
+        formItems = me.formItems,
         viewModel = me.getViewModel(),
         viewModelData = viewModel.getData(),
         bindItems = viewModelData['form'],
-        moreItems = viewModelData['moreForm'],
         condition,
         conditions = [];
 
-        if(moreQuery) {
-            for(k in moreItems) {
-                var item = Ext.Array.findBy(moreQueryFormItems, function(i) {
-                    return i.name == k;
-                });
-                var field = item.name,
-                func = item.getCondition,
-                value = moreItems[k],
-                condition;
-    
-                if(typeof func == 'function') {
-                    condition = {
-                        type: 'condition',
-                        value: func(value)
-                    }
-                }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
-        
-                    if(!conditionValue) {
-                        continue;
-                    }
-                    condition = {
-                        type: type,
-                        field: field,
-                        operation: operation,
-                        value: conditionValue
-                    }
+        for(k in bindItems) {
+            var item = Ext.Array.findBy(formItems, function(i) {
+                return i.name == k;
+            });
+            var field = item.name,
+            func = item.getCondition,
+            value = bindItems[k],
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
                 }
-                conditions.push(condition);
-            }
-        }else {
-            for(k in bindItems) {
-                var item = Ext.Array.findBy(formItems, function(i) {
-                    return i.name == k;
-                });
-                var field = item.name,
-                func = item.getCondition,
-                value = bindItems[k],
-                condition;
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
     
-                if(typeof func == 'function') {
-                    condition = {
-                        type: 'condition',
-                        value: func(value)
-                    }
-                }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
-        
-                    if(!conditionValue) {
-                        continue;
-                    }
-                    condition = {
-                        type: type,
-                        field: field,
-                        operation: operation,
-                        value: conditionValue
-                    }
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
                 }
-                conditions.push(condition);
             }
+            conditions.push(condition);
         }
 
         return conditions;
@@ -515,18 +478,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     onbuild:function(){
         var me =this;
         var grid = me;
-        var tbar = me.dockedItems.items[2];
-        var data;
-        grid.condition = '';
-        var items = [];
-        var fields = tbar.items.items.map(f => f.name);
-        Ext.each(fields, function(f, index){
-            var field = tbar.down('[name='+f+']');
-            if(field){
-                items.push(field);
-            }
-        });
-        grid.condition = grid.getCondition(items);
+        grid.condition = grid.getConditions(me.formItems);
 
         var data = grid.condition;
         param = {
@@ -545,14 +497,14 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });        
     },
     onSave:function(){
         var me = this,
         gridData = me.getDirtyData();
         if(gridData==null){
-            saas.util.BaseUtil.showToast('未修改数据');
+            saas.util.BaseUtil.showErrorToast('未修改数据');
         }
         saas.util.BaseUtil.request({
             url: me.saveUrl,
@@ -566,7 +518,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         })
         .catch(function(res) {
             console.error(res);
-            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+            saas.util.BaseUtil.showErrorToast('保存失败: ' + res.message);
         });        
     },
     getDirtyData: function() {

+ 125 - 105
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -5,83 +5,103 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=ma_whname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'id',to:'ma_whid',ignore:true                          
-                        },{
-                            from:'wh_code',to:'ma_whcode'                          
-                        },{
-                            from:'wh_description',to:'ma_whname'
+            'dbfindtrigger[name=ma_whname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'ma_whid',
+                            ignore: true
+                        }, {
+                            from: 'wh_code',
+                            to: 'ma_whcode'
+                        }, {
+                            from: 'wh_description',
+                            to: 'ma_whname'
                         }],
-                    }) ;   
+                    });
 
                 }
-            },            
+            },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=mm_whname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'id',to:'mm_whid',ignore:true                          
-                        },{
-                            from:'wh_code',to:'mm_whcode'                          
-                        },{
-                            from:'wh_description',to:'mm_whname'
+            'dbfindtrigger[name=mm_whname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'mm_whid',
+                            ignore: true
+                        }, {
+                            from: 'wh_code',
+                            to: 'mm_whcode'
+                        }, {
+                            from: 'wh_description',
+                            to: 'mm_whname'
                         }]
-                    }) ;   
+                    });
 
                 }
             },
-            'multidbfindtrigger[name=mm_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dbfinds:[{
-                            from:'pr_code',to:'mm_prodcode'
-                        },{
-                            from:'id',to:'mm_prodid'
-                        },{
-                            from:'pr_detail',to:'pr_detail'
-                        },{
-                            from:'pr_spec',to:'pr_spec'
-                        },{
-                            from:'pr_unit',to:'pr_unit'
-                        },{
-                            from:'pr_purcprice',to:'mm_price'
+            'multidbfindtrigger[name=mm_prodcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'pr_code',
+                            to: 'mm_prodcode'
+                        }, {
+                            from: 'id',
+                            to: 'mm_prodid'
+                        }, {
+                            from: 'pr_detail',
+                            to: 'pr_detail'
+                        }, {
+                            from: 'pr_spec',
+                            to: 'pr_spec'
+                        }, {
+                            from: 'pr_unit',
+                            to: 'pr_unit'
+                        }, {
+                            from: 'pr_purcprice',
+                            to: 'mm_price'
                         }],
-                    }) ;   
+                    });
 
                 }
             },
-            'bomDbfindTrigger[name=ma_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
+            'bomDbfindTrigger[name=ma_prodcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
                         //放大镜赋值设置
-                        dbfinds:[{
-                            from:'bo_motherid',to:'ma_prodid'
-                        },{
-                            from:'bo_mothercode',to:'ma_prodcode'
-                        },{
-                            from:'bo_mothername',to:'ma_proddetail'
-                        },{
-                            from:'pr_spec',to:'ma_prodspec'
-                        },{
-                            from:'pr_unit',to:'ma_produnit'
-                        },{
-                            from:'bo_version',to:'ma_version'
+                        dbfinds: [{
+                            from: 'bo_motherid',
+                            to: 'ma_prodid'
+                        }, {
+                            from: 'bo_mothercode',
+                            to: 'ma_prodcode'
+                        }, {
+                            from: 'bo_mothername',
+                            to: 'ma_proddetail'
+                        }, {
+                            from: 'pr_spec',
+                            to: 'ma_prodspec'
+                        }, {
+                            from: 'pr_unit',
+                            to: 'ma_produnit'
+                        }, {
+                            from: 'bo_version',
+                            to: 'ma_version'
                         }],
-                        aftertrigger:function(f,record){
+                        aftertrigger: function (f, record) {
                             me.getBomData(record.data.id)
                         }
-                    }) ;   
+                    });
 
                 }
             },
 
         });
     },
-    initCopyData: function(formData) {
+    initCopyData: function (formData) {
         var me = this;
         var form = this.getView();
         var detailCount = form.detailCount;
@@ -107,26 +127,26 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         main['ma_qty'] = 0;
         main['ma_price'] = 0;
         main['ma_total'] = 0;
-        for(var k in main) {
+        for (var k in main) {
             // 主表日期改为当前日期
-            if(saas.util.BaseUtil.isDateString(main[k])) {
+            if (saas.util.BaseUtil.isDateString(main[k])) {
                 main[k] = Ext.Date.format(new Date, 'Y-m-d H:i:s');
             }
         }
 
-        for(var j = 0; j < detailCount; j++) {
+        for (var j = 0; j < detailCount; j++) {
             var detail = formData['detail' + j];
-            for(var x = 0; x < detail.length; x ++) {
+            for (var x = 0; x < detail.length; x++) {
                 var d = detail[x];
 
-                for(var k in d) {
+                for (var k in d) {
                     // 从表id清空
                     delete d['id'];
                     delete d['mm_price'];
                     delete d['mm_qty'];
                     delete d['mm_amount'];
                     // 从表日期清空
-                    if(saas.util.BaseUtil.isDateString(d[k])) {
+                    if (saas.util.BaseUtil.isDateString(d[k])) {
                         d[k] = '';
                     }
                 }
@@ -134,54 +154,54 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         }
         return me.myInitCopyData(formData);;
     },
-    price_change:function(v) {
+    price_change: function (v) {
         var me = this,
-        viewModel = me.getViewModel(),
-        store = viewModel.get('detail0').detailStore,
-        type = viewModel.get('ma_type');
-        if('拆件'==type && v==0){
+            viewModel = me.getViewModel(),
+            store = viewModel.get('detail0').detailStore,
+            type = viewModel.get('ma_type');
+        if ('拆件' == type && v == 0) {
             saas.util.BaseUtil.showErrorToast('成本单价为0!');
         }
     },
-    getBomData: function(v) {
-    var me = this,
-    form = me.getView(),
-    viewModel = me.getViewModel(),
-    store = viewModel.get('detail0').detailStore,
-    type = viewModel.get('ma_type'),
-    loadData = new Array();
+    getBomData: function (v) {
+        var me = this,
+            form = me.getView(),
+            viewModel = me.getViewModel(),
+            store = viewModel.get('detail0').detailStore,
+            type = viewModel.get('ma_type'),
+            loadData = new Array();
 
-    //请求bom资料
-    saas.util.BaseUtil.request({
-        url: form._getBomUrl+'/'+v,
-        method: 'GET',
-    })
-    .then(function(localJson) {
-        if(localJson.success){
-            var data = localJson.data.items;
-            Ext.Array.each(data, function(item, i) {
-                loadData.push({
-                    mm_detno:item.bd_detno,
-                    mm_prodid:item.productDTO.id,
-                    mm_prodcode:item.productDTO.pr_code,
-                    mm_oneuseqty:item.bd_baseqty,
-                    pr_detail:item.productDTO.pr_detail,
-                    pr_spec:item.productDTO.pr_spec,
-                    pr_unit:item.productDTO.pr_unit,
-                    mm_repprodcode:item.bd_replace,
-                    mm_remark:item.bd_remark,                        
-                    mm_whid:item.productDTO.pr_whid,                        
-                    mm_whcode:item.productDTO.pr_whcode,
-                    mm_whname:item.productDTO.pr_whname,
-                    mm_price:type=='拆件'?item.productDTO.pr_purcprice:null
-                })                
-            });
-            store.loadData(loadData);
-        }
-    })
-    .catch(function(res) {
-        console.error(res);
-        saas.util.BaseUtil.showErrorToast('获取BOM资料失败: ' + res.message);
-    });
+        //请求bom资料
+        saas.util.BaseUtil.request({
+            url: form._getBomUrl + '/' + v,
+            method: 'GET',
+        })
+        .then(function (localJson) {
+            if (localJson.success) {
+                var data = localJson.data.items;
+                Ext.Array.each(data, function (item, i) {
+                    loadData.push({
+                        mm_detno: item.bd_detno,
+                        mm_prodid: item.productDTO.id,
+                        mm_prodcode: item.productDTO.pr_code,
+                        mm_oneuseqty: item.bd_baseqty,
+                        pr_detail: item.productDTO.pr_detail,
+                        pr_spec: item.productDTO.pr_spec,
+                        pr_unit: item.productDTO.pr_unit,
+                        mm_repprodcode: item.bd_replace,
+                        mm_remark: item.bd_remark,
+                        mm_whid: item.productDTO.pr_whid,
+                        mm_whcode: item.productDTO.pr_whcode,
+                        mm_whname: item.productDTO.pr_whname,
+                        mm_price: type == '拆件' ? item.productDTO.pr_purcprice : null
+                    })
+                });
+                store.loadData(loadData);
+            }
+        })
+        .catch(function (res) {
+            console.error(res);
+            saas.util.BaseUtil.showErrorToast('获取BOM资料失败: ' + res.message);
+        });
     }
 });

+ 1 - 0
frontend/saas-web/app/view/stock/make/QueryPanel.js

@@ -113,6 +113,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         addXtype: 'stock-make-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/storage/make/',
+        caller:'Make',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -224,7 +224,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
            {
                 text : "含税金额", 
                 xtype: 'numbercolumn',
-                dataIndex : "pd_total", 
+                dataIndex : "pd_ordertotal", 
                 width : 110.0,
                 // editor : {
                 //     xtype : "numberfield",

+ 2 - 1
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -103,6 +103,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         addXtype:'stock-otherin-formpanel',
         defaultCondition:' pi_class = \'其它入库单\'',
         baseVastUrl:'/api/storage/prodinout/',
+        caller:'OtherIn',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -225,7 +226,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {

+ 1 - 1
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -202,7 +202,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
             {
                 text: "含税金额",
                 xtype: 'numbercolumn',
-                dataIndex: "pd_total",
+                dataIndex: "pd_ordertotal",
                 width: 110.0,
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 2 - 1
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -97,6 +97,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         addXtype:'stock-otherout-formpanel',
         defaultCondition:' pi_class = \'其它出库单\'',
         baseVastUrl:'/api/storage/prodinout/',
+        caller: 'OtherOut',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -219,7 +220,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             },
         },{
             text: '金额',
-            dataIndex: 'pd_total',
+            dataIndex: 'pd_ordertotal',
             xtype:'numbercolumn',            
             width: 110,
             renderer : function(v) {

+ 5 - 0
frontend/saas-web/overrides/form/field/TextField.js

@@ -0,0 +1,5 @@
+Ext.define('saas.override.form.field.TextField', {
+    override: 'Ext.form.field.Text',
+    vtype: 'trim'
+
+});

+ 15 - 0
frontend/saas-web/overrides/form/field/TrimVtype.js

@@ -0,0 +1,15 @@
+Ext.define('saas.override.form.field.TrimVtype', {
+    override: 'Ext.form.field.VTypes',
+
+    // vtype validation function
+    trim: function(value) {
+        return this.trimRe.test(value);
+    },
+    // RegExp for the value to be tested against within the validation function
+    trimRe: /^(?! ).*(?<! )$/i,
+    // vtype Text property: The error text to display when the validation function returns false
+    trimText: '请不要在内容的开头和结尾添加空格',
+    // vtype Mask property: The keystroke filter mask
+    trimMask: /[\d\s:amp]/i
+
+});

+ 2 - 1
frontend/saas-web/package.json

@@ -6,8 +6,9 @@
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
     "dev": "sencha app watch",
+    "build-dev": "sencha app build --development",
     "build-test": "sencha app build --testing",
-    "build": "sencha app build"
+    "build": "sencha app build --production"
   },
   "keywords": [
     "saas"