Browse Source

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

# Conflicts:
#	frontend/saas-web/app.json
yingp 7 years ago
parent
commit
e0f33b0c51
49 changed files with 1332 additions and 989 deletions
  1. 3 1
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ExcelController.java
  2. 25 14
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ExcelServiceImpl.java
  3. 1 1
      applications/commons/commons-server/src/main/resources/mapper/DataImportDetailMapper.xml
  4. 2 2
      applications/commons/commons-server/src/main/resources/mapper/DataImportMapper.xml
  5. 1 1
      applications/commons/commons-server/src/main/resources/mapper/DataTempletMapper.xml
  6. 2 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/EmployeeMapper.java
  7. 13 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  8. 3 0
      applications/document/document-server/src/main/resources/mapper/EmployeeMapper.xml
  9. 1 1
      applications/sale/sale-server/src/main/resources/config/application-docker-test.yml
  10. 62 35
      frontend/saas-web/app.json
  11. 5 0
      frontend/saas-web/app/view/core/base/ImportWindow.js
  12. 1 1
      frontend/saas-web/app/view/core/dbfind/types/BankInfoDbfindTrigger.js
  13. 1 1
      frontend/saas-web/app/view/core/dbfind/types/EmployeeDbfindTrigger.js
  14. 2 64
      frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js
  15. 42 0
      frontend/saas-web/app/view/document/address/DataList.js
  16. 48 0
      frontend/saas-web/app/view/document/address/DataListModel.js
  17. 32 0
      frontend/saas-web/app/view/document/address/Window.js
  18. 82 0
      frontend/saas-web/app/view/document/bankinformation/DataList.js
  19. 54 0
      frontend/saas-web/app/view/document/bankinformation/DataListModel.js
  20. 128 0
      frontend/saas-web/app/view/document/bankinformation/Window.js
  21. 94 0
      frontend/saas-web/app/view/document/employee/DataList.js
  22. 51 0
      frontend/saas-web/app/view/document/employee/DataListModel.js
  23. 123 0
      frontend/saas-web/app/view/document/employee/Window.js
  24. 1 209
      frontend/saas-web/app/view/document/kind/ChildForm.js
  25. 0 200
      frontend/saas-web/app/view/document/kind/Kind.js
  26. 1 1
      frontend/saas-web/app/view/document/kind/KindController.js
  27. 0 247
      frontend/saas-web/app/view/document/kind/KindModel.js
  28. 0 30
      frontend/saas-web/app/view/document/other/Address.js
  29. 0 31
      frontend/saas-web/app/view/document/other/BankInformation.js
  30. 0 28
      frontend/saas-web/app/view/document/other/Employee.js
  31. 0 30
      frontend/saas-web/app/view/document/other/ProductBrand.js
  32. 0 30
      frontend/saas-web/app/view/document/other/ProductUnit.js
  33. 0 28
      frontend/saas-web/app/view/document/other/Warehouse.js
  34. 4 8
      frontend/saas-web/app/view/document/product/FormPanel.js
  35. 42 0
      frontend/saas-web/app/view/document/productbrand/DataList.js
  36. 48 0
      frontend/saas-web/app/view/document/productbrand/DataListModel.js
  37. 32 0
      frontend/saas-web/app/view/document/productbrand/Window.js
  38. 42 0
      frontend/saas-web/app/view/document/productunit/DataList.js
  39. 48 0
      frontend/saas-web/app/view/document/productunit/DataListModel.js
  40. 32 0
      frontend/saas-web/app/view/document/productunit/Window.js
  41. 94 0
      frontend/saas-web/app/view/document/warehouse/DataList.js
  42. 52 0
      frontend/saas-web/app/view/document/warehouse/DataListModel.js
  43. 121 0
      frontend/saas-web/app/view/document/warehouse/Window.js
  44. 2 5
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  45. 17 1
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  46. 1 0
      frontend/saas-web/app/view/sys/power/TreePanel.js
  47. 6 2
      frontend/saas-web/ext/packages/ux/src/feature/MySummary.js
  48. 2 2
      frontend/saas-web/overrides/form/field/TrimVtype.js
  49. 11 16
      frontend/saas-web/resources/json/navigation.json

+ 3 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ExcelController.java

@@ -3,6 +3,7 @@ package com.usoftchina.saas.commons.controller;
 import com.usoftchina.saas.auth.client.annotation.IgnoreAuth;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.commons.service.ExcelService;
+import com.usoftchina.saas.utils.DateUtils;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.xssf.streaming.SXSSFWorkbook;
@@ -15,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
+import java.util.Date;
 import java.util.Map;
 
 /**导入模板下载、解析
@@ -32,7 +34,7 @@ public class ExcelController {
     public void CreateTemplet(@RequestParam("caller") String caller, HttpServletResponse response) throws IOException {
         Map<String, Object> map = excelService.CreateTemplet(caller);
         SXSSFWorkbook workbook = (SXSSFWorkbook)map.get("workbook");
-        String title = map.get("title").toString();
+        String title = map.get("title").toString() + "_" + DateUtils.format(new Date(), "yyyyMMdd");
         String filename = URLEncoder.encode(title + ".xlsx", "UTF-8");
         response.setContentType("application/vnd.ms-excel");
         response.setHeader("Content-Disposition", "attachment;filename=" + filename);

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

@@ -45,6 +45,9 @@ public class ExcelServiceImpl implements ExcelService{
         Map<String, Object> map = new HashMap<>();
         SXSSFWorkbook workbook = new SXSSFWorkbook();
         DataTemplet dataTemplet = dataTempletMapper.selectByCaller(caller, companyId);
+        if (null == dataTemplet) {
+            throw new BizException(9876, "没有查询到对应的excel配置");
+        }
         //列
         String cols = dataTemplet.getDt_columns();
         JSONArray array = (JSONArray) JSONArray.parse(cols);
@@ -70,7 +73,6 @@ public class ExcelServiceImpl implements ExcelService{
     }
 
     @Override
-    @Transactional
     public Integer parseTemplet(Workbook wb, String caller) {
         if (wb == null || StringUtils.isEmpty(caller)) {
             throw new BizException(BizExceptionCode.NULL_DATA);
@@ -182,7 +184,7 @@ public class ExcelServiceImpl implements ExcelService{
                                }
                            }
                            //检测日期类型是否规范
-                           if ("date".equals(set.getType())) {
+                           if ("date".equals(set.getType()) && !StringUtils.isEmpty(value)) {
                                flag = validateDateFormat(value);
                                if (!flag) {
                                    err.append("第" + (i + 2) + "行 " + set.getDescription() + " 日期格式不正确! ");
@@ -257,7 +259,7 @@ public class ExcelServiceImpl implements ExcelService{
         if (StringUtils.isEmpty(date)) {
             return false;
         }
-        String regEx1 = "[0-9]{8}";
+        String regEx1 = "[0-9]{4}/[0-9]{2}/[0-9]{2}";
         String regEX2 = "[0-9]{4}-[0-9]{2}-[0-9]{2}";
         // 编译正则表达式
         Pattern pattern1 = Pattern.compile(regEx1);
@@ -290,6 +292,10 @@ public class ExcelServiceImpl implements ExcelService{
             switch(cell.getCellType()){
                 case Cell.CELL_TYPE_NUMERIC:{
                     cellValue = String.valueOf(cell.getNumericCellValue());
+                    //判断是否为INT类型
+                    if (Double.valueOf(cellValue.toString()).intValue() - Double.valueOf(cellValue.toString()) == 0) {
+                        return Double.valueOf(cellValue.toString()).intValue();
+                    }
                     break;
                 }
                 case Cell.CELL_TYPE_FORMULA:{
@@ -336,9 +342,10 @@ public class ExcelServiceImpl implements ExcelService{
      */
     private void createWorkbook(SXSSFWorkbook workbook, int sheetIdx, JSONArray cols, JSONArray datas, String remark){
         Sheet sheet = workbook.createSheet("sheet" + sheetIdx);
-        CellStyle style = getCellStyle(workbook);
-        //sheet.autoSizeColumn((short) 2);
-        sheet.createFreezePane(0, 1);// 固定列
+        CellStyle style = getCellStyle(workbook, true);
+        CellStyle detailStyle = getCellStyle(workbook, false);
+        //sheet.autoSizeColumn(2);
+       // sheet.createFreezePane(0, 1);// 固定列
         Cell cell = null;
         int rIdx = 0;
         int cIdx = 0;
@@ -347,8 +354,8 @@ public class ExcelServiceImpl implements ExcelService{
         Row row = null;
         if (remark != null) {
             row = sheet.createRow(rIdx);
-            row.setHeightInPoints((short) 100);
-            sheet.setColumnWidth(cIdx, 1000);
+            row.setHeightInPoints((short) 50);
+            sheet.setColumnWidth(cIdx, 500);
             cell = getCell(sheet, rIdx, cIdx);
             cell.setCellValue(remark);
             sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, cols.size() - 1));
@@ -365,19 +372,23 @@ public class ExcelServiceImpl implements ExcelService{
                 width = (short) (obj.get("width") == null ? 0 : (int)obj.get("width")*35.7);
                 width = width == 0 ? 4000 : width;
                 sheet.setColumnWidth(cIdx, width);
-                sheet.createFreezePane(cols.size() + 1, 2);
+               // sheet.createFreezePane(cols.size() + 1, 2);
                 cell = getCell(sheet, rIdx, cIdx);
                 value = obj.get("description") == null ? value : obj.get("description").toString();
                 if ("true".equals(obj.get("necessary"))) {
                     value = "*" + value;
                 }
-                cell.setCellValue(value);
-                keys.add(String.valueOf(obj.get("description")));
                 if ("date".equals(obj.get("type"))) {
                     short df= workbook.createDataFormat().getFormat("yyyy-MM-dd");
                     style.setDataFormat(df);
                 }
-                cell.setCellStyle(style);
+                if ("main".equals(obj.get("position"))) {
+                    cell.setCellStyle(style);
+                } else {
+                    cell.setCellStyle(detailStyle);
+                }
+                cell.setCellValue(value);
+                keys.add(String.valueOf(obj.get("description")));
                 cIdx++;
                 value = "";
             }
@@ -410,7 +421,7 @@ public class ExcelServiceImpl implements ExcelService{
         }
     }
 
-    private CellStyle getCellStyle(SXSSFWorkbook workbook) {
+    private CellStyle getCellStyle(SXSSFWorkbook workbook, boolean main) {
         CellStyle style = workbook.createCellStyle();
         style.setFillBackgroundColor((short) 18);
         style.setFillPattern(FillPatternType.LEAST_DOTS);
@@ -421,7 +432,7 @@ public class ExcelServiceImpl implements ExcelService{
         style.setFont(font);
         style.setAlignment(HorizontalAlignment.CENTER);
         style.setFillForegroundColor(HSSFColor.GREEN.index);
-        style.setFillBackgroundColor(HSSFColor.PALE_BLUE.index);
+        style.setFillBackgroundColor(main ? HSSFColor.LIGHT_YELLOW.index : HSSFColor.PALE_BLUE.index);
         style.setBorderBottom(BorderStyle.MEDIUM);
         style.setBorderLeft(BorderStyle.MEDIUM);
         style.setBorderRight(BorderStyle.MEDIUM);

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

@@ -15,7 +15,7 @@
   </resultMap>
 
   <delete id="deleteByIds">
-    delete from data_importdetail where dd_diid in (${ids})
+    delete from data_importdetail where dd_diid in (${value})
   </delete>
 
   <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.DataImportDetail" >

+ 2 - 2
applications/commons/commons-server/src/main/resources/mapper/DataImportMapper.xml

@@ -6,7 +6,7 @@
   il_toformal=0 and il_result is not null
 </delete>
   <delete id="deleteByIds">
-    delete from data_import where di_id in (${ids});
+    delete from data_import where di_id in (${value});
   </delete>
 
   <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.DataImport" >
@@ -72,7 +72,7 @@
     update data_import
     set
     di_result = #{err},
-    di_success = 0,
+    di_success = 0
     where di_id = #{id}
   </update>
 

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

@@ -12,6 +12,6 @@
   </resultMap>
 
   <select id="selectByCaller" resultMap="BaseResultMap">
-    select * from data_Templet where dt_caller=#{caller} and companyid = #{companyid}
+    select * from data_Templet where dt_caller=#{caller}
   </select>
 </mapper>

+ 2 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/EmployeeMapper.java

@@ -32,4 +32,6 @@ public interface EmployeeMapper extends CommonBaseMapper<Employee> {
     int validateNameAndCodeWhenInsert(@Param("code") String code,@Param("name") String em_name,@Param("companyId") Long companyId);
 
     int validateNameAndCodeWhenUpdate(@Param("code") String code,@Param("name") String em_name,@Param("id") Long id,@Param("companyId") Long companyId);
+
+    List<Employee> selectByName(@Param("name") String name, @Param("companyId") Long companyId);
 }

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

@@ -491,6 +491,8 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         return getMapper().getCombo(id,BaseContextHolder.getCompanyId());
     }
 
+    @Autowired
+    private EmployeeMapper employeeMapper;
     @Override
     public void saveToFormal(Integer id, boolean update) {
         if (null == id || "0".equals(id)) {
@@ -511,6 +513,17 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
                 List<DataImportDetail> data = datas.get(code);
                 DataImportDetail main = dataImportMapper.selectMainBycode(code, id, companyId);
                 CustomerDTO customerDTO = JSONObject.parseObject(main.getDd_maindata(), CustomerDTO.class);
+                //验证业务员
+                if (!StringUtils.isEmpty(customerDTO.getCu_sellername())) {
+                    List<Employee> employees = employeeMapper.selectByName(customerDTO.getCu_sellername(), companyId);
+                    if (null == employees || StringUtils.isEmpty(employees.get(0))) {
+                        err.append("客户编号为: " + customerDTO.getCu_code() + " 的业务员: "+ customerDTO.getCu_sellername() +" 在系统中不存在,请确认数据是否正确");
+                        break;
+                    }
+                    customerDTO.setCu_sellerid(Integer.valueOf(employees.get(0).getId().toString()));
+                    customerDTO.setCu_sellercode(employees.get(0).getEm_code());
+                    customerDTO.setCu_sellername(employees.get(0).getEm_name());
+                }
                 customerDTO.setCu_status(Status.OPEN.getDisplay());
                 customerDTO.setCu_statuscode(Status.OPEN.name());
                 //编号不存在

+ 3 - 0
applications/document/document-server/src/main/resources/mapper/EmployeeMapper.xml

@@ -244,5 +244,8 @@
     select count(*) from Employee where (em_code = #{code} or em_name = #{name}) and em_id !=#{id}  and companyId =#{companyId}
   </select>
 
+  <select id="selectByName" resultMap="BaseResultMap">
+    select * from employee where em_name = #{name} and companyId=#{companyId}
+  </select>
 
 </mapper>

+ 1 - 1
applications/sale/sale-server/src/main/resources/config/application-docker-test.yml

@@ -4,7 +4,7 @@ eureka:
     prefer-ip-address: false
   client:
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server-dev:8515/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server-test:8515/eureka/
 spring:
   rabbitmq:
     virtual-host: test

+ 62 - 35
frontend/saas-web/app.json

@@ -275,39 +275,6 @@
         "cacheParam": "_dc"
     },
 
-    "builds": {
-        "dev": {
-            "server": {
-                "accountCenter":"http://192.168.0.181:8000",
-                "accountEnterprise":"http://192.168.0.181:8000/#/enterprise",
-                "basePath": {
-                    "https": "https://saas-api-dev.usoftchina.com:5443",
-                    "http": "http://192.168.0.181:8560"
-                },
-                "urlPattern": "^\/api\/"
-            }
-        },
-        "test": {
-            "server": {
-                "accountCenter": "https://saas-test.usoftchina.com:5443",
-                "accountEnterprise": "https://saas-test.usoftchina.com:5443/#/enterprise",
-                "basePath": {
-                    "https": "https://saas-api-test.usoftchina.com:5443",
-                    "http": "http://192.168.0.181:8575"
-                },
-                "urlPattern": "^\/api\/"
-            }
-        },
-        "prod": {
-            "server": {
-                "accountCenter":"https://saas.usoftchina.com",
-                "accountEnterprise":"https://saas.usoftchina.com/#/enterprise",
-                "basePath": "https://saas-api.usoftchina.com",
-                "urlPattern": "^\/api\/"
-            }
-        }
-    },
-
     /**
      * Settings specific to production builds.
      */
@@ -326,6 +293,12 @@
         },
         "compressor": {
             "type": "yui"
+        },
+        "server": {
+            "accountCenter":"https://saas.usoftchina.com",
+            "accountEnterprise":"https://saas.usoftchina.com/#/enterprise",
+            "basePath": "https://saas-api.usoftchina.com",
+            "urlPattern": "^\/api\/"
         }
     },
 
@@ -333,14 +306,68 @@
      * 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": "https://saas-test.usoftchina.com:5443",
+            "accountEnterprise": "https://saas-test.usoftchina.com:5443/#/enterprise",
+            "basePath": {
+                "https": "https://saas-api-test.usoftchina.com:5443",
+                "http": "http://192.168.0.181:8575"
+            },
+            "urlPattern": "^\/api\/"
+            **/
+            "accountCenter":"http://192.168.0.181:8000",
+            "accountEnterprise":"http://192.168.0.181:8000/#/enterprise",
+            "basePath": {
+                "https": "https://saas-api-dev.usoftchina.com:5443",
+                "http": "http://192.168.0.181:8560"
+            },
+            "urlPattern": "^\/api\/"
+        }
     },
 
     /**
      * Settings specific to development builds.
      */
     "development": {
-        "watch": {
-            "delay": 250
+        "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",
+            "basePath": {
+                "https": "https://saas-api-dev.usoftchina.com:5443",
+                "http": "http://192.168.0.181:8560"
+            },
+            "urlPattern": "^\/api\/"
         }
     },
 

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

@@ -235,14 +235,19 @@ Ext.define('saas.view.core.base.ImportWindow', {
                                             saas.util.BaseUtil.showSuccessToast('上传成功');
                                             form.importId = id;
                                         }else{
+                                            field.setValue('');
                                             saas.util.BaseUtil.showErrorToast('上传失败:后台未返回信息');
                                         }
                                     }else{
+                                        field.setValue('');
+                                        field.setRawValue('');
+                                        field.value = '';
                                         saas.util.BaseUtil.showErrorToast('上传失败: ' + res.message);
                                     }
                                 },
                                 failure: function (response, opts) {
                                     form.setLoading(false);
+                                    field.setValue('');
                                     var res = Ext.decode(response.responseText);
                                     saas.util.BaseUtil.showErrorToast('上传失败: ' + res.message);
                                 }

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

@@ -6,7 +6,7 @@ Ext.define('saas.view.core.dbfind.types.BankInfoDbfindTrigger', {
     xtype: 'bandinfoDbfindTrigger',
 
     dataUrl: '/api/document/bankinformation/list',
-    addXtype: 'other-bankinformation',
+    addXtype: 'document-bankinformation-datalist',
     addTitle: '资金账户',
     dbtpls: [{
         field: 'bk_bankcode',

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

@@ -7,7 +7,7 @@ Ext.define('saas.view.core.dbfind.types.EmployeeDbfindTrigger', {
 
     //数据接口
     dataUrl:'/api/document/employee/list',
-    addXtype: 'other-employee',
+    addXtype: 'document-employee-datalist',
     addTitle: '人员资料',
     //联想设置
     dbtpls:[{

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

@@ -7,7 +7,7 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
 
     dataUrl: '/api/document/warehouse/list',
     // dataUrl:'http://localhost:9480/warehouse/list',
-    addXtype: 'other-warehouse',
+    addXtype: 'document-warehouse-datalist',
     addTitle: '仓库资料',
     defaultCondition: "wh_statuscode='ENABLE'",
     dbtpls: [{
@@ -51,72 +51,10 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
         var tab = saas.util.BaseUtil.getCurrentTab();
         // this.isEdit = !!record;
         this.dialog = tab.add({
-            autoScroll:true,
-            xtype: 'document-kind-childwin',
+            xtype: 'document-warehouse-window',
             bind: {
                 title: '新增仓库资料'
             },
-            dataKind: 'warehouse',
-            belong: {
-                columns: [{
-                    text: '编号',
-                    dataIndex: 'wh_code',
-                    width: 150
-                },{
-                    text: '仓库名称',
-                    dataIndex: 'wh_description',
-                    width: 200
-                },{
-                    text: '类型',
-                    dataIndex: 'wh_type',
-                    width: 110
-                },{  
-                    text: '仓库状态码',
-                    dataIndex: 'wh_status',
-                    hidden:true,
-                },{
-                    text: '仓库状态',
-                    dataIndex: 'wh_statuscode',
-                    width:90,
-                    xtype: 'actioncolumn',
-                    align : 'center',
-                    items: [{
-                        iconCls:'',
-                        getClass: function(v, meta, rec) {
-                            if(rec.get('wh_statuscode')=='ENABLE'){
-                                return 'x-grid-checkcolumn-checked-btn';
-                            }else{
-                                return 'x-grid-checkcolumn-btn';
-                            }
-                        },
-                        handler: function(view, rowIndex, colIndex) {
-                            var rec = view.getStore().getAt(rowIndex);
-                            var type=rec.get('wh_statuscode')=='ENABLE'?true:false;
-                            //  禁用/启用
-                            var form = this.ownerCt.ownerCt.ownerCt;
-                            var grid = this.ownerCt.ownerCt;
-                            saas.util.BaseUtil.request({
-                                url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
-                                params: '',
-                                method: 'POST',
-                            })
-                            .then(function(localJson) {
-                                if(localJson.success){
-                                    saas.util.BaseUtil.showSuccessToast('操作成功');
-                                    grid.store.load();
-                                }
-                            })
-                            .catch(function(res) {
-                                console.error(res);
-                                saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
-                            });
-                        }
-                    }]
-                }],
-                keyField:'id',
-                reqUrl: '/api/document/warehouse/save',
-                delUrl: '/api/document/warehouse/delete'
-            },
             caller:'WareHouse',
             session: true
         });

+ 42 - 0
frontend/saas-web/app/view/document/address/DataList.js

@@ -0,0 +1,42 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.address.DataList', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'document-address-datalist',
+    viewModel: 'document-address-datalist',
+    defaultType:'address',
+    windowType:'document-address-window',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    etc:{
+        address:{
+            columns: [{
+                text: '地址名称',
+                dataIndex: 'ad_address',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl: '/api/document/address/save',
+            delUrl: '/api/document/address/delete'
+        },
+    },
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'采购地址'});
+        }
+    }
+})
+
+

+ 48 - 0
frontend/saas-web/app/view/document/address/DataListModel.js

@@ -0,0 +1,48 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.address.DataListModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.document-address-datalist',
+    stores: {
+        address: {
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'ad_address',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/address/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response.responseJson);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        }  
+    }
+});

+ 32 - 0
frontend/saas-web/app/view/document/address/Window.js

@@ -0,0 +1,32 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.address.Window', {
+    extend: 'saas.view.document.kind.ChildForm',
+    xtype: 'document-address-window',
+    dataKind:'address',//类型标识
+    belong:{
+        columns: [{
+            text: '地址名称',
+            dataIndex: 'ad_address',
+            flex: 1
+        }],
+        keyField:'id',
+        reqUrl: '/api/document/address/save',
+        delUrl: '/api/document/address/delete'
+    },
+    etc:{
+        address:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'ad_address',
+                allowBlank:false,
+                fieldLabel:'地址详情',
+                maxLength: 200
+            }]
+        }
+    }
+});

+ 82 - 0
frontend/saas-web/app/view/document/bankinformation/DataList.js

@@ -0,0 +1,82 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.bankinformation.DataList', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'document-bankinformation-datalist',
+    viewModel: 'document-bankinformation-datalist',
+    defaultType:'bankinformation',
+    windowType:'document-bankinformation-window',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    etc:{
+        bankinformation:{
+            columns: [{
+                text: '账户编号',
+                dataIndex: 'bk_bankcode',
+                flex: 1
+            },{
+                text: '账户名称',
+                dataIndex: 'bk_bankname',
+                flex: 1
+            },{
+                text: '账户类别',
+                dataIndex: 'bk_type',
+                flex: 1,
+            },{
+                text: '期初金额',
+                dataIndex: 'bk_beginamount',
+                xtype: 'numbercolumn',
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                flex: 1
+            },{
+                text: '当前余额',
+                dataIndex: 'bk_thisamount',
+                xtype: 'numbercolumn',
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                flex: 1
+            },{
+                xtype:'datecolumn',
+                text: '建账日期',
+                format:'Y-m-d',
+                dataIndex: 'bk_date',
+                flex: 1
+            }, {
+                text: '备注',
+                dataIndex: 'bk_remark',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl: '/api/document/bankinformation/save',
+            delUrl: '/api/document/bankinformation/delete'
+        }
+    },
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'资金账户'});
+        }
+    }
+})
+
+

+ 54 - 0
frontend/saas-web/app/view/document/bankinformation/DataListModel.js

@@ -0,0 +1,54 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.bankinformation.DataListModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.document-bankinformation-datalist',
+    stores: {
+        bankinformation:{
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'bk_bankname',  type: 'string'},
+                {name: 'bk_bankcode',  type: 'string'},
+                {name: 'bk_type',  type: 'string'},
+                {name: 'bk_beginamount',  type: 'float'},
+                {name: 'bk_thisamount',  type: 'float'},
+                {name: 'bk_date',  type: 'date'},
+                {name: 'updateTime', type: 'date'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/bankinformation/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response.responseJson);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        }  
+    }
+});

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

@@ -0,0 +1,128 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.bankinformation.Window', {
+    extend: 'saas.view.document.kind.ChildForm',
+    xtype: 'document-bankinformation-window',
+    dataKind:'bankinformation',//类型标识
+    belong:{
+        columns: [{
+            text: '账户编号',
+            dataIndex: 'bk_bankcode',
+            flex: 1
+        },{
+            text: '账户名称',
+            dataIndex: 'bk_bankname',
+            flex: 1
+        },{
+            text: '账户类别',
+            dataIndex: 'bk_type',
+            flex: 1,
+        },{
+            text: '期初金额',
+            dataIndex: 'bk_beginamount',
+            xtype: 'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            flex: 1
+        },{
+            text: '当前余额',
+            dataIndex: 'bk_thisamount',
+            xtype: 'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            flex: 1
+        },{
+            xtype:'datecolumn',
+            text: '建账日期',
+            format:'Y-m-d',
+            dataIndex: 'bk_date',
+            flex: 1
+        }, {
+            text: '备注',
+            dataIndex: 'bk_remark',
+            flex: 1
+        }],
+        keyField:'id',
+        reqUrl: '/api/document/bankinformation/save',
+        delUrl: '/api/document/bankinformation/delete'
+    },
+    etc:{
+        bankinformation:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'bk_bankcode',
+                allowBlank:false,
+                fieldLabel:'账户编号',
+                autoCode:true,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                name:'bk_bankname',
+                allowBlank:false,
+                fieldLabel:'账户名称',
+                maxLength: 20
+            },{
+                xtype:'numberfield',
+                name:'bk_beginamount',
+                allowBlank:false,
+                fieldLabel:'期初金额',
+                hideTrigger: true,
+                mouseWheelEnabled: false,
+                minValue: 0,
+                maxLength:15,
+                decimalPrecision:2,
+                enforceMaxLength:true
+            },
+            // {
+            //     xtype:'numberfield',
+            //     name:'bk_thisamount',
+            //     allowBlank:true,
+            //     fieldLabel:'当前余额',
+            //     hideTrigger: true,
+            //     mouseWheelEnabled: false,
+            //     beforeLabelTextTpl:'',
+            //     minValue: 0
+            // }
+            // ,
+            {
+                xtype:'combo',
+                name:'bk_type',
+                allowBlank:false,
+                editable:false,
+                fieldLabel:'账户类别',
+                store: [
+                    '现金',
+                    '银行'
+                ]
+            },{
+                xtype:'datefield',
+                name:'bk_date',
+                fieldLabel:'建账日期',
+                format:'Y-m-d',
+                listeners:{
+                    beforerender:function(d){
+                        d.setValue(new Date())
+                    }
+                }
+            }, {
+                xtype:'textfield',
+                name:'bk_remark',
+                allowBlank:true,
+                fieldLabel:'备注',
+                beforeLabelTextTpl:''
+            }]
+        }
+    }
+});

+ 94 - 0
frontend/saas-web/app/view/document/employee/DataList.js

@@ -0,0 +1,94 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.employee.DataList', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'document-employee-datalist',
+    viewModel: 'document-employee-datalist',
+    defaultType:'employee',
+    windowType:'document-employee-window',
+    _openUrl:'/api/document/employee/open',
+    _closeUrl:'/api/document/employee/close',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    etc:{
+        employee:{
+            columns: [{
+                text: '人员编号',
+                dataIndex: 'em_code',
+                width: 150
+            },{
+                text: '人员名称',
+                dataIndex: 'em_name',
+                width: 110
+            },{
+                text: '联系电话',
+                dataIndex: 'em_mobile',
+                width: 110
+            },{  
+                text: '邮箱',
+                dataIndex: 'em_email',
+                width: 180
+            },{
+                text: '人员状态',
+                dataIndex: 'em_class',
+                width:90,
+                xtype: 'actioncolumn',
+                align : 'center',
+                items: [{
+                    iconCls:'',
+                    getClass: function(v, meta, rec) {
+                        if(rec.get('em_class')=='正式'){
+                            return 'x-grid-checkcolumn-checked-btn';
+                        }else{
+                            return 'x-grid-checkcolumn-btn';
+                        }
+                    },
+                    handler: function(view, rowIndex, colIndex) {
+                        var rec = view.getStore().getAt(rowIndex);
+                        var type=rec.get('em_class')=='正式'?true:false;
+                        //  禁用/启用
+                        var form = this.ownerCt.ownerCt.ownerCt;
+                        var grid = this.ownerCt.ownerCt;
+                        saas.util.BaseUtil.request({
+                            url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
+                            params: '',
+                            method: 'POST',
+                        })
+                        .then(function(localJson) {
+                            if(localJson.success){
+                                saas.util.BaseUtil.showSuccessToast('操作成功');
+                                grid.store.load();
+                            }
+                        })
+                        .catch(function(res) {
+                            console.error(res);
+                            saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
+                        });
+                    }
+                }]
+            }],
+            keyField:'id',
+            reqUrl: '/api/document/employee/save',
+            delUrl: '/api/document/employee/delete'
+        }
+    },
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'人员资料'});
+        }
+    }
+})
+
+

+ 51 - 0
frontend/saas-web/app/view/document/employee/DataListModel.js

@@ -0,0 +1,51 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.employee.DataListModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.document-employee-datalist',
+    stores: {
+        employee:{
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'em_code',  type: 'string'},
+                {name: 'em_mobile',  type: 'string'},
+                {name: 'em_email',  type: 'string'},
+                {name: 'em_clasee',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/employee/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response.responseJson);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        }
+    }
+});

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

@@ -0,0 +1,123 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.employee.Window', {
+    extend: 'saas.view.document.kind.ChildForm',
+    xtype: 'document-employee-window',
+    dataKind:'employee',//类型标识
+    belong:{
+        columns: [{
+            text: '人员编号',
+            dataIndex: 'em_code',
+            width: 150
+        },{
+            text: '人员名称',
+            dataIndex: 'em_name',
+            width: 110
+        },{
+            text: '联系电话',
+            dataIndex: 'em_mobile',
+            width: 110
+        },{  
+            text: '邮箱',
+            dataIndex: 'em_email',
+            width: 180
+        },{
+            text: '人员状态',
+            dataIndex: 'em_class',
+            width:90,
+            xtype: 'actioncolumn',
+            align : 'center',
+            items: [{
+                iconCls:'',
+                getClass: function(v, meta, rec) {
+                    if(rec.get('em_class')=='正式'){
+                        return 'x-grid-checkcolumn-checked-btn';
+                    }else{
+                        return 'x-grid-checkcolumn-btn';
+                    }
+                },
+                handler: function(view, rowIndex, colIndex) {
+                    var rec = view.getStore().getAt(rowIndex);
+                    var type=rec.get('em_class')=='正式'?true:false;
+                    //  禁用/启用
+                    var form = this.ownerCt.ownerCt.ownerCt;
+                    var grid = this.ownerCt.ownerCt;
+                    saas.util.BaseUtil.request({
+                        url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
+                        params: '',
+                        method: 'POST',
+                    })
+                    .then(function(localJson) {
+                        if(localJson.success){
+                            saas.util.BaseUtil.showSuccessToast('操作成功');
+                            grid.store.load();
+                        }
+                    })
+                    .catch(function(res) {
+                        console.error(res);
+                        saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
+                    });
+                }
+            }]
+        }],
+        keyField:'id',
+        reqUrl: '/api/document/employee/save',
+        delUrl: '/api/document/employee/delete'
+    },
+    etc:{
+        employee:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                fieldLabel: '人员编号',
+                autoCode:true,
+                name: 'em_code',
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                fieldLabel: '人员名称',
+                name: 'em_name',
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                fieldLabel: '联系电话',
+                name: 'em_mobile',
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                fieldLabel: '邮箱',
+                name: 'em_email', 
+                allowBlank:true,  
+                beforeLabelTextTpl: '',
+                maxLength: 20
+            },{
+                value:'正式',
+                xtype:'combo',
+                fieldLabel: '人员状态',
+                name: 'em_class',
+                allowBlank:false,
+                displayField : "display", 
+                editable:false,
+                hideTrigger : false, 
+                maxLength : 100.0, 
+                minValue : null, 
+                positiveNum : false, 
+                queryMode : "local", 
+                valueField : "value", 
+                store:{
+                    fields: ['display', 'value'],
+                    data : [
+                        {"display":"正式", "value":'正式'},
+                        {"display":"离职", "value":'离职'}
+                    ]
+                }
+            },]
+        }
+    }
+});

+ 1 - 209
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -1,7 +1,7 @@
 /**
  * Created by zhouy on 2018/10/18.
  */
-Ext.define('KitchenSink.view.binding.ChildForm', {
+Ext.define('saas.view.document.kind.ChildForm', {
     extend: 'Ext.window.Window',
     xtype: 'document-kind-childwin',
     cls:'x-window-dbfind',
@@ -129,98 +129,6 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 maxLength: 20
             }]
         },
-        bankinformation:{
-            items:[{
-                xtype:'hidden',
-                name:'id'
-            },{
-                xtype:'textfield',
-                name:'bk_bankcode',
-                allowBlank:false,
-                fieldLabel:'账户编号',
-                autoCode:true,
-                maxLength: 20
-            },{
-                xtype:'textfield',
-                name:'bk_bankname',
-                allowBlank:false,
-                fieldLabel:'账户名称',
-                maxLength: 20
-            },{
-                xtype:'numberfield',
-                name:'bk_beginamount',
-                allowBlank:false,
-                fieldLabel:'期初金额',
-                hideTrigger: true,
-                mouseWheelEnabled: false,
-                minValue: 0,
-                maxLength:15,
-                decimalPrecision:2,
-                enforceMaxLength:true
-            },
-            // {
-            //     xtype:'numberfield',
-            //     name:'bk_thisamount',
-            //     allowBlank:true,
-            //     fieldLabel:'当前余额',
-            //     hideTrigger: true,
-            //     mouseWheelEnabled: false,
-            //     beforeLabelTextTpl:'',
-            //     minValue: 0
-            // }
-            // ,
-            {
-                xtype:'combo',
-                name:'bk_type',
-                allowBlank:false,
-                editable:false,
-                fieldLabel:'账户类别',
-                store: [
-                    '现金',
-                    '银行'
-                ]
-            },{
-                xtype:'datefield',
-                name:'bk_date',
-                fieldLabel:'建账日期',
-                format:'Y-m-d',
-                listeners:{
-                    beforerender:function(d){
-                        d.setValue(new Date())
-                    }
-                }
-            }, {
-                xtype:'textfield',
-                name:'bk_remark',
-                allowBlank:true,
-                fieldLabel:'备注',
-                beforeLabelTextTpl:''
-            }]
-        },
-        productbrand:{
-            items:[{
-                xtype:'hidden',
-                name:'id'
-            },{
-                xtype:'textfield',
-                name:'pb_name',
-                allowBlank:false,
-                fieldLabel:'物料品牌',
-                maxLength: 20
-            }]
-        },  
-        productunit:{
-            items:[{
-                xtype:'hidden',
-                name:'id'
-            },{
-                xtype:'textfield',
-                name:'pu_name',
-                allowBlank:false,
-                fieldLabel:'计量单位',
-                maxLength: 20
-            }]
-        },
         inoutkind:{
             items:[{
                 xtype:'hidden',
@@ -255,18 +163,6 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 }
             }]
         },
-        address:{
-            items:[{
-                xtype:'hidden',
-                name:'id'
-            },{
-                xtype:'textfield',
-                name:'ad_address',
-                allowBlank:false,
-                fieldLabel:'地址详情',
-                maxLength: 200
-            }]
-        },
         accountinformation:{
             items:[{
                 xtype:'hidden',
@@ -431,110 +327,6 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 maxLength: 30,
             }]
         },
-        warehouse:{
-            items:[{
-                xtype:'hidden',
-                name:'id'
-            },{
-                xtype:'textfield',
-                fieldLabel: '仓库编号',
-                name: 'wh_code',
-                autoCode:true,
-                allowBlank:false,
-                maxLength: 20
-            },{
-                xtype:'textfield',
-                fieldLabel: '仓库名称',
-                name: 'wh_description',
-                allowBlank:false,
-                maxLength: 20
-            },{
-                xtype:'combo',
-                fieldLabel: '仓库类型',
-                name: 'wh_type',
-                allowBlank:false,
-                displayField : "display", 
-                editable:false,
-                hideTrigger : false, 
-                maxLength : 100.0, 
-                minValue : null, 
-                positiveNum : false, 
-                queryMode : "local", 
-                valueField : "value", 
-                store:{
-                    fields: ['display', 'value'],
-                    data : [
-                        {"display":"良品仓", "value":'良品仓'},
-                        {"display":"不良品仓", "value":'不良品仓'}
-                    ]
-                }
-            },{
-                readOnly:true,
-                xtype:'textfield',
-                fieldLabel: '仓库状态',
-                name: 'wh_status',   
-                value:'已启用',
-                maxLength: 20
-            },{
-                xtype:'hidden',
-                fieldLabel: '仓库状态码',
-                name: 'wh_statuscode',
-                value:'ENABLE'
-            }]
-        },
-        employee:{
-            items:[{
-                xtype:'hidden',
-                name:'id'
-            },{
-                xtype:'textfield',
-                fieldLabel: '人员编号',
-                autoCode:true,
-                name: 'em_code',
-                allowBlank:false,
-                maxLength: 20
-            },{
-                xtype:'textfield',
-                fieldLabel: '人员名称',
-                name: 'em_name',
-                allowBlank:false,
-                maxLength: 20
-            },{
-                xtype:'textfield',
-                fieldLabel: '联系电话',
-                name: 'em_mobile',
-                allowBlank:false,
-                maxLength: 20
-            },{
-                xtype:'textfield',
-                fieldLabel: '邮箱',
-                name: 'em_email', 
-                allowBlank:true,  
-                beforeLabelTextTpl: '',
-                maxLength: 20
-            },{
-                value:'正式',
-                xtype:'combo',
-                fieldLabel: '人员状态',
-                name: 'em_class',
-                allowBlank:false,
-                displayField : "display", 
-                editable:false,
-                hideTrigger : false, 
-                maxLength : 100.0, 
-                minValue : null, 
-                positiveNum : false, 
-                queryMode : "local", 
-                valueField : "value", 
-                store:{
-                    fields: ['display', 'value'],
-                    data : [
-                        {"display":"正式", "value":'正式'},
-                        {"display":"离职", "value":'离职'}
-                    ]
-                }
-            },]
-        },
         maxnumbers:{
             items:[{
                 xtype:'hidden',

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

@@ -106,76 +106,6 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl:'/api/document/producttype/save',
             delUrl:'/api/document/producttype/delete'
         }, 
-        productbrand:{
-            columns: [{
-                text: '物料品牌',
-                dataIndex: 'pb_name',
-                flex: 1
-            }],
-            keyField:'id',
-            reqUrl:'/api/document/productbrand/save',
-            delUrl:'/api/document/productbrand/delete'
-        },
-        productunit:{
-            columns: [{
-                text: '计量单位',
-                dataIndex: 'pu_name',
-                flex: 1
-            }],
-            keyField:'id',
-            reqUrl:'/api/document/productunit/save',
-            delUrl:'/api/document/productunit/delete'
-        },
-        bankinformation:{
-            columns: [{
-                text: '账户编号',
-                dataIndex: 'bk_bankcode',
-                flex: 1
-            },{
-                text: '账户名称',
-                dataIndex: 'bk_bankname',
-                flex: 1
-            },{
-                text: '账户类别',
-                dataIndex: 'bk_type',
-                flex: 1,
-            },{
-                text: '期初金额',
-                dataIndex: 'bk_beginamount',
-                xtype: 'numbercolumn',
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
-                },
-                flex: 1
-            },{
-                text: '当前余额',
-                dataIndex: 'bk_thisamount',
-                xtype: 'numbercolumn',
-                renderer : function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
-                },
-                flex: 1
-            },{
-                xtype:'datecolumn',
-                text: '建账日期',
-                format:'Y-m-d',
-                dataIndex: 'bk_date',
-                flex: 1
-            }, {
-                text: '备注',
-                dataIndex: 'bk_remark',
-                flex: 1
-            }],
-            keyField:'id',
-            reqUrl: '/api/document/bankinformation/save',
-            delUrl: '/api/document/bankinformation/delete'
-        },
         inoutkind:{
             columns: [{
                 text: '收支名称',
@@ -190,16 +120,6 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl: '/api/document/fundinouttype/save',
             delUrl: '/api/document/fundinouttype/delete'
         },
-        address:{
-            columns: [{
-                text: '地址名称',
-                dataIndex: 'ad_address',
-                flex: 1
-            }],
-            keyField:'id',
-            reqUrl: '/api/document/address/save',
-            delUrl: '/api/document/address/delete'
-        },
         maxnumbers:{
             columns: [{
                 text : "单据名称", 
@@ -270,126 +190,6 @@ Ext.define('saas.view.document.kind.Kind', {
                 dataIndex: 'email',
             }],
             reqUrl: '/api/account/account/register/add',
-        },
-        employee:{
-            columns: [{
-                text: '人员编号',
-                dataIndex: 'em_code',
-                width: 150
-            },{
-                text: '人员名称',
-                dataIndex: 'em_name',
-                width: 110
-            },{
-                text: '联系电话',
-                dataIndex: 'em_mobile',
-                width: 110
-            },{  
-                text: '邮箱',
-                dataIndex: 'em_email',
-                width: 180
-            },{
-                text: '人员状态',
-                dataIndex: 'em_class',
-                width:90,
-                xtype: 'actioncolumn',
-                align : 'center',
-                items: [{
-                    iconCls:'',
-                    getClass: function(v, meta, rec) {
-                        if(rec.get('em_class')=='正式'){
-                            return 'x-grid-checkcolumn-checked-btn';
-                        }else{
-                            return 'x-grid-checkcolumn-btn';
-                        }
-                    },
-                    handler: function(view, rowIndex, colIndex) {
-                        var rec = view.getStore().getAt(rowIndex);
-                        var type=rec.get('em_class')=='正式'?true:false;
-                        //  禁用/启用
-                        var form = this.ownerCt.ownerCt.ownerCt;
-                        var grid = this.ownerCt.ownerCt;
-                        saas.util.BaseUtil.request({
-                            url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
-                            params: '',
-                            method: 'POST',
-                        })
-                        .then(function(localJson) {
-                            if(localJson.success){
-                                saas.util.BaseUtil.showSuccessToast('操作成功');
-                                grid.store.load();
-                            }
-                        })
-                        .catch(function(res) {
-                            console.error(res);
-                            saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
-                        });
-                    }
-                }]
-            }],
-            keyField:'id',
-            reqUrl: '/api/document/employee/save',
-            delUrl: '/api/document/employee/delete'
-        },
-        warehouse:{
-            columns: [{
-                text: '编号',
-                dataIndex: 'wh_code',
-                width: 150
-            },{
-                text: '仓库名称',
-                dataIndex: 'wh_description',
-                width: 200
-            },{
-                text: '类型',
-                dataIndex: 'wh_type',
-                width: 110
-            },{  
-                text: '仓库状态码',
-                dataIndex: 'wh_status',
-                hidden:true,
-            },{
-                text: '仓库状态',
-                dataIndex: 'wh_statuscode',
-                width:90,
-                xtype: 'actioncolumn',
-                align : 'center',
-                items: [{
-                    iconCls:'',
-                    getClass: function(v, meta, rec) {
-                        if(rec.get('wh_statuscode')=='ENABLE'){
-                            return 'x-grid-checkcolumn-checked-btn';
-                        }else{
-                            return 'x-grid-checkcolumn-btn';
-                        }
-                    },
-                    handler: function(view, rowIndex, colIndex) {
-                        var rec = view.getStore().getAt(rowIndex);
-                        var type=rec.get('wh_statuscode')=='ENABLE'?true:false;
-                        //  禁用/启用
-                        var form = this.ownerCt.ownerCt.ownerCt;
-                        var grid = this.ownerCt.ownerCt;
-                        saas.util.BaseUtil.request({
-                            url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
-                            params: '',
-                            method: 'POST',
-                        })
-                        .then(function(localJson) {
-                            if(localJson.success){
-                                saas.util.BaseUtil.showSuccessToast('操作成功');
-                                grid.store.load();
-                            }
-                        })
-                        .catch(function(res) {
-                            console.error(res);
-                            saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
-                        });
-                    }
-                }]
-            }],
-            keyField:'id',
-            reqUrl: '/api/document/warehouse/save',
-            delUrl: '/api/document/warehouse/delete'
         }
     },
     refresh:function(){

+ 1 - 1
frontend/saas-web/app/view/document/kind/KindController.js

@@ -101,7 +101,7 @@ Ext.define('saas.view.document.kind.KindController', {
         this.isEdit = !!record;
         this.dialog = view.add({
             autoScroll:true,
-            xtype: 'document-kind-childwin',
+            xtype: view.windowType?view.windowType:'document-kind-childwin',
             bind: {
                 title: record ? '修改{title}' : '新增{title}'
             },

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

@@ -125,90 +125,6 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             }
         },
-        productbrand:{
-            fields:[
-                {name: 'id', type: 'int'},
-                {name: 'pb_name',  type: 'string'}
-            ],
-            proxy: {
-                type: 'ajax',
-                url: '/api/document/productbrand/list',
-                actionMethods: {
-                    read: 'GET'
-                },
-                reader: {
-                    type: 'json',
-                    rootProperty: 'data'
-                },
-                listeners: {
-                    exception: function(proxy, response, operation, eOpts) {
-                        if(operation.success) {
-                            if(response.timedout) {
-                                saas.util.BaseUtil.showErrorToast('请求超时');
-                            }
-                        }else {
-                            console.error('exception: ', response.responseJson);
-                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
-                        }
-                    }
-                }
-            },
-            pageSize: null,
-            autoLoad: false,
-            listeners: {
-                beforeload: function (store, op) {
-                    Ext.apply(store.proxy.extraParams, {
-                        number: 1,
-                        size: 1000
-                    });
-                }
-            }
-        },
-        bankinformation:{
-            fields:[
-                {name: 'id', type: 'int'},
-                {name: 'bk_bankname',  type: 'string'},
-                {name: 'bk_bankcode',  type: 'string'},
-                {name: 'bk_type',  type: 'string'},
-                {name: 'bk_beginamount',  type: 'float'},
-                {name: 'bk_thisamount',  type: 'float'},
-                {name: 'bk_date',  type: 'date'},
-                {name: 'updateTime', type: 'date'}
-            ],
-            proxy: {
-                type: 'ajax',
-                url: '/api/document/bankinformation/list',
-                actionMethods: {
-                    read: 'GET'
-                },
-                reader: {
-                    type: 'json',
-                    rootProperty: 'data.list'
-                },
-                listeners: {
-                    exception: function(proxy, response, operation, eOpts) {
-                        if(operation.success) {
-                            if(response.timedout) {
-                                saas.util.BaseUtil.showErrorToast('请求超时');
-                            }
-                        }else {
-                            console.error('exception: ', response.responseJson);
-                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
-                        }
-                    }
-                }
-            },
-            pageSize: null,
-            autoLoad: false,
-            listeners: {
-                beforeload: function (store, op) {
-                    Ext.apply(store.proxy.extraParams, {
-                        number: 1,
-                        size: 1000
-                    });
-                }
-            }
-        },
         inoutkind:{ 
             fields:[
                 {name: 'id', type: 'int'},
@@ -249,88 +165,6 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             }
         },
-        warehouse: {
-            fields:[
-                {name: 'id', type: 'int'},
-                {name: 'wh_code',  type: 'string'},
-                {name: 'wh_type',  type: 'string'},
-                {name: 'wh_description',  type: 'string'},
-                {name: 'wh_statuscode',  type: 'string'},
-                {name: 'wh_status',  type: 'string'}
-            ],
-            proxy: {
-                type: 'ajax',
-                url: '/api/document/warehouse/list',
-                actionMethods: {
-                    read: 'GET'
-                },
-                reader: {
-                    type: 'json',
-                    rootProperty: 'data.list'
-                },
-                listeners: {
-                    exception: function(proxy, response, operation, eOpts) {
-                        if(operation.success) {
-                            if(response.timedout) {
-                                saas.util.BaseUtil.showErrorToast('请求超时');
-                            }
-                        }else {
-                            console.error('exception: ', response.responseJson);
-                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
-                        }
-                    }
-                }
-            },
-            pageSize: null,
-            autoLoad: false,
-            listeners: {
-                beforeload: function (store, op) {
-                    Ext.apply(store.proxy.extraParams, {
-                        number: 1,
-                        size: 1000
-                    });
-                }
-            }
-        },
-        address: {
-            fields:[
-                {name: 'id', type: 'int'},
-                {name: 'ad_address',  type: 'string'}
-            ],
-            proxy: {
-                type: 'ajax',
-                url: '/api/document/address/list',
-                actionMethods: {
-                    read: 'GET'
-                },
-                reader: {
-                    type: 'json',
-                    rootProperty: 'data'
-                },
-                listeners: {
-                    exception: function(proxy, response, operation, eOpts) {
-                        if(operation.success) {
-                            if(response.timedout) {
-                                saas.util.BaseUtil.showErrorToast('请求超时');
-                            }
-                        }else {
-                            console.error('exception: ', response.responseJson);
-                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
-                        }
-                    }
-                }
-            },
-            pageSize: null,
-            autoLoad: false,
-            listeners: {
-                beforeload: function (store, op) {
-                    Ext.apply(store.proxy.extraParams, {
-                        number: 1,
-                        size: 1000
-                    });
-                }
-            }
-        },  
         accountinformation: {    
             fields:[
                 {name: 'id', type: 'int'},
@@ -369,87 +203,6 @@ Ext.define('saas.view.document.kind.KindModel', {
                     });
                 }
             }
-        },
-        employee:{
-            fields:[
-                {name: 'id', type: 'int'},
-                {name: 'em_code',  type: 'string'},
-                {name: 'em_mobile',  type: 'string'},
-                {name: 'em_email',  type: 'string'},
-                {name: 'em_clasee',  type: 'string'}
-            ],
-            proxy: {
-                type: 'ajax',
-                url: '/api/document/employee/list',
-                actionMethods: {
-                    read: 'GET'
-                },
-                reader: {
-                    type: 'json',
-                    rootProperty: 'data.list'
-                },
-                listeners: {
-                    exception: function(proxy, response, operation, eOpts) {
-                        if(operation.success) {
-                            if(response.timedout) {
-                                saas.util.BaseUtil.showErrorToast('请求超时');
-                            }
-                        }else {
-                            console.error('exception: ', response.responseJson);
-                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
-                        }
-                    }
-                }
-            },
-            pageSize: null,
-            autoLoad: false,
-            listeners: {
-                beforeload: function (store, op) {
-                    Ext.apply(store.proxy.extraParams, {
-                        number: 1,
-                        size: 1000
-                    });
-                }
-            }
-        },
-        productunit: {    
-            fields:[
-                {name: 'id', type: 'int'},
-                {name: 'pu_name',  type: 'string'}
-            ],
-            proxy: {
-                type: 'ajax',
-                url: '/api/document/productunit/list',
-                actionMethods: {
-                    read: 'GET'
-                },
-                reader: {
-                    type: 'json',
-                    rootProperty: 'data'
-                },
-                listeners: {
-                    exception: function(proxy, response, operation, eOpts) {
-                        if(operation.success) {
-                            if(response.timedout) {
-                                saas.util.BaseUtil.showErrorToast('请求超时');
-                            }
-                        }else {
-                            console.error('exception: ', response.responseJson);
-                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
-                        }
-                    }
-                }
-            },
-            pageSize: null,
-            autoLoad: false,
-            listeners: {
-                beforeload: function (store, op) {
-                    Ext.apply(store.proxy.extraParams, {
-                        number: 1,
-                        size: 1000
-                    });
-                }
-            }
         }
     }
 });

+ 0 - 30
frontend/saas-web/app/view/document/other/Address.js

@@ -1,30 +0,0 @@
-/**
- * Created by zhouy on 2018/10/18.
- */
-Ext.define('saas.view.document.other.Address', {
-    extend: 'saas.view.document.kind.Kind',
-    xtype: 'other-address',
-    autoScroll: true,
-    layout:'fit',
-    defaultType:'address',
-    tbar: ['->',{
-        xtype:'button',
-        text:'新增',
-        listeners: {
-            click: 'onAdd'
-        }
-    },{
-        xtype:'button',
-        text:'刷新',
-        listeners: {
-            click: 'onRefresh'
-        }
-    }],
-    listeners:{
-        afterrender:function(p){
-            p.getViewModel().setData({title:'采购地址'});
-        }
-    }
-})
-
-

+ 0 - 31
frontend/saas-web/app/view/document/other/BankInformation.js

@@ -1,31 +0,0 @@
-/**
- * Created by zhouy on 2018/10/18.
- */
-Ext.define('saas.view.document.other.BankInformation', {
-    extend: 'saas.view.document.kind.Kind',
-    xtype: 'other-bankinformation',
-    autoScroll: true,
-    layout:'fit',
-    caller:'BankInformation',
-    defaultType:'bankinformation',
-    tbar: ['->',{
-        xtype:'button',
-        text:'新增',
-        listeners: {
-            click: 'onAdd'
-        }
-    },{
-        xtype:'button',
-        text:'刷新',
-        listeners: {
-            click: 'onRefresh'
-        }
-    }],
-    listeners:{
-        afterrender:function(p){
-            p.getViewModel().setData({title:'资金账户'});
-        }
-    }
-})
-
-

+ 0 - 28
frontend/saas-web/app/view/document/other/Employee.js

@@ -1,28 +0,0 @@
-Ext.define('saas.view.document.other.Employee', {
-    extend: 'saas.view.document.kind.Kind',
-    xtype: 'other-employee',
-    autoScroll: true,
-    layout:'fit',
-    caller:'Employee',
-    _openUrl:'/api/document/employee/open',
-    _closeUrl:'/api/document/employee/close',
-    defaultType:'employee',
-    tbar: ['->',{
-        xtype:'button',
-        text:'新增',
-        listeners: {
-            click: 'onAdd'
-        }
-    },{
-        xtype:'button',
-        text:'刷新',
-        listeners: {
-            click: 'onRefresh'
-        }
-    }],
-    listeners:{
-        afterrender:function(p){
-            p.getViewModel().setData({title:'人员资料'});
-        }
-    }
-})

+ 0 - 30
frontend/saas-web/app/view/document/other/ProductBrand.js

@@ -1,30 +0,0 @@
-/**
- * Created by zhouy on 2018/10/18.
- */
-Ext.define('saas.view.document.other.ProductBrand', {
-    extend: 'saas.view.document.kind.Kind',
-    xtype: 'other-productbrand',
-    autoScroll: true,
-    layout:'fit',
-    defaultType:'productbrand',
-    tbar: ['->',{
-        xtype:'button',
-        text:'新增',
-        listeners: {
-            click: 'onAdd'
-        }
-    },{
-        xtype:'button',
-        text:'刷新',
-        listeners: {
-            click: 'onRefresh'
-        }
-    }],
-    listeners:{
-        afterrender:function(p){
-            p.getViewModel().setData({title:'物料品牌'});
-        }
-    }
-})
-
-

+ 0 - 30
frontend/saas-web/app/view/document/other/ProductUnit.js

@@ -1,30 +0,0 @@
-/**
- * Created by zhouy on 2018/10/18.
- */
-Ext.define('saas.view.document.other.ProductUnit', {
-    extend: 'saas.view.document.kind.Kind',
-    xtype: 'other-productunit',
-    autoScroll: true,
-    layout:'fit',
-    defaultType:'productunit',
-    tbar: ['->',{
-        xtype:'button',
-        text:'新增',
-        listeners: {
-            click: 'onAdd'
-        }
-    },{
-        xtype:'button',
-        text:'刷新',
-        listeners: {
-            click: 'onRefresh'
-        }
-    }],
-    listeners:{
-        afterrender:function(p){
-            p.getViewModel().setData({title:'物料单位'});
-        }
-    }
-})
-
-

+ 0 - 28
frontend/saas-web/app/view/document/other/Warehouse.js

@@ -1,28 +0,0 @@
-Ext.define('saas.view.document.other.Warehouse', {
-    extend: 'saas.view.document.kind.Kind',
-    xtype: 'other-warehouse',
-    autoScroll: true,
-    layout:'fit',
-    caller:'Warehouse',
-    _openUrl:'/api/document/warehouse/open',
-    _closeUrl:'/api/document/warehouse/close',
-    defaultType:'warehouse',
-    tbar: ['->',{
-        xtype:'button',
-        text:'新增',
-        listeners: {
-            click: 'onAdd'
-        }
-    },{
-        xtype:'button',
-        text:'刷新',
-        listeners: {
-            click: 'onRefresh'
-        }
-    }],
-    listeners:{
-        afterrender:function(p){
-            p.getViewModel().setData({title:'仓库'});
-        }
-    }
-})

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

@@ -85,15 +85,13 @@ Ext.define('saas.view.document.product.FormPanel', {
         name : "pr_brand", 
         fieldLabel : "品牌", 
         addHandler:function(b){
-            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
+            this.dialog = form.add({
+                xtype: 'document-productbrand-window',
                 bind: {
                     title: '新增物料品牌'
                 },
                 dataKind:'productbrand',
-                belong:document.etc['productbrand'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -110,15 +108,13 @@ Ext.define('saas.view.document.product.FormPanel', {
         allowBlank : false, 
         editable:false,
         addHandler:function(b){
-            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
+            this.dialog = form.add({
+                xtype: 'document-productunit-window',
                 bind: {
                     title: '新增物料单位'
                 },
                 dataKind:'productunit',
-                belong:document.etc['productunit'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,

+ 42 - 0
frontend/saas-web/app/view/document/productbrand/DataList.js

@@ -0,0 +1,42 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.productbrand.DataList', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'document-productbrand-datalist',
+    viewModel: 'document-productbrand-datalist',
+    defaultType:'productbrand',
+    windowType:'document-productbrand-window',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    etc:{
+        productbrand:{
+            columns: [{
+                text: '物料品牌',
+                dataIndex: 'pb_name',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl:'/api/document/productbrand/save',
+            delUrl:'/api/document/productbrand/delete'
+        }
+    },
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'物料品牌'});
+        }
+    }
+})
+
+

+ 48 - 0
frontend/saas-web/app/view/document/productbrand/DataListModel.js

@@ -0,0 +1,48 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.productbrand.DataListModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.document-productbrand-datalist',
+    stores: {
+        productbrand:{
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'pb_name',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/productbrand/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response.responseJson);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        },
+    }
+});

+ 32 - 0
frontend/saas-web/app/view/document/productbrand/Window.js

@@ -0,0 +1,32 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.productbrand.Window', {
+    extend: 'saas.view.document.kind.ChildForm',
+    xtype: 'document-productbrand-window',
+    dataKind:'productbrand',//类型标识
+    belong:{
+        columns: [{
+            text: '物料品牌',
+            dataIndex: 'pb_name',
+            flex: 1
+        }],
+        keyField:'id',
+        reqUrl:'/api/document/productbrand/save',
+        delUrl:'/api/document/productbrand/delete'
+    },
+    etc:{
+        productbrand:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'pb_name',
+                allowBlank:false,
+                fieldLabel:'物料品牌',
+                maxLength: 20
+            }]
+        }
+    }
+});

+ 42 - 0
frontend/saas-web/app/view/document/productunit/DataList.js

@@ -0,0 +1,42 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.productunit.DataList', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'document-productunit-datalist',
+    viewModel: 'document-productunit-datalist',
+    defaultType:'productunit',
+    windowType:'document-productunit-window',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    etc:{
+        productunit:{
+            columns: [{
+                text: '计量单位',
+                dataIndex: 'pu_name',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl:'/api/document/productunit/save',
+            delUrl:'/api/document/productunit/delete'
+        }
+    },
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'物料单位'});
+        }
+    }
+})
+
+

+ 48 - 0
frontend/saas-web/app/view/document/productunit/DataListModel.js

@@ -0,0 +1,48 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.productunit.DataListModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.document-productunit-datalist',
+    stores: {
+        productunit: {    
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'pu_name',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/productunit/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response.responseJson);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        }
+    }
+});

+ 32 - 0
frontend/saas-web/app/view/document/productunit/Window.js

@@ -0,0 +1,32 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.productunit.Window', {
+    extend: 'saas.view.document.kind.ChildForm',
+    xtype: 'document-productunit-window',
+    dataKind:'productunit',//类型标识
+    belong:{
+        columns: [{
+            text: '计量单位',
+            dataIndex: 'pu_name',
+            flex: 1
+        }],
+        keyField:'id',
+        reqUrl:'/api/document/productunit/save',
+        delUrl:'/api/document/productunit/delete'
+    },
+    etc:{
+        productunit:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'pu_name',
+                allowBlank:false,
+                fieldLabel:'计量单位',
+                maxLength: 20
+            }]
+        }
+    }
+});

+ 94 - 0
frontend/saas-web/app/view/document/warehouse/DataList.js

@@ -0,0 +1,94 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.warehouse.DataList', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'document-warehouse-datalist',
+    viewModel: 'document-warehouse-datalist',
+    defaultType:'warehouse',
+    windowType:'document-warehouse-window',
+    _openUrl:'/api/document/warehouse/open',
+    _closeUrl:'/api/document/warehouse/close',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    etc:{
+        warehouse:{
+            columns: [{
+                text: '编号',
+                dataIndex: 'wh_code',
+                width: 150
+            },{
+                text: '仓库名称',
+                dataIndex: 'wh_description',
+                width: 200
+            },{
+                text: '类型',
+                dataIndex: 'wh_type',
+                width: 110
+            },{  
+                text: '仓库状态码',
+                dataIndex: 'wh_status',
+                hidden:true,
+            },{
+                text: '仓库状态',
+                dataIndex: 'wh_statuscode',
+                width:90,
+                xtype: 'actioncolumn',
+                align : 'center',
+                items: [{
+                    iconCls:'',
+                    getClass: function(v, meta, rec) {
+                        if(rec.get('wh_statuscode')=='ENABLE'){
+                            return 'x-grid-checkcolumn-checked-btn';
+                        }else{
+                            return 'x-grid-checkcolumn-btn';
+                        }
+                    },
+                    handler: function(view, rowIndex, colIndex) {
+                        var rec = view.getStore().getAt(rowIndex);
+                        var type=rec.get('wh_statuscode')=='ENABLE'?true:false;
+                        //  禁用/启用
+                        var form = this.ownerCt.ownerCt.ownerCt;
+                        var grid = this.ownerCt.ownerCt;
+                        saas.util.BaseUtil.request({
+                            url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
+                            params: '',
+                            method: 'POST',
+                        })
+                        .then(function(localJson) {
+                            if(localJson.success){
+                                saas.util.BaseUtil.showSuccessToast('操作成功');
+                                grid.store.load();
+                            }
+                        })
+                        .catch(function(res) {
+                            console.error(res);
+                            saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
+                        });
+                    }
+                }]
+            }],
+            keyField:'id',
+            reqUrl: '/api/document/warehouse/save',
+            delUrl: '/api/document/warehouse/delete'
+        }
+    },
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'仓库'});
+        }
+    }
+})
+
+

+ 52 - 0
frontend/saas-web/app/view/document/warehouse/DataListModel.js

@@ -0,0 +1,52 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.warehouse.DataListModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.document-warehouse-datalist',
+    stores: {
+        warehouse: {
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'wh_code',  type: 'string'},
+                {name: 'wh_type',  type: 'string'},
+                {name: 'wh_description',  type: 'string'},
+                {name: 'wh_statuscode',  type: 'string'},
+                {name: 'wh_status',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/warehouse/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response.responseJson);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + response.responseJson.message);
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        }  
+    }
+});

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

@@ -0,0 +1,121 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.warehouse.Window', {
+    extend: 'saas.view.document.kind.ChildForm',
+    xtype: 'document-warehouse-window',
+    dataKind:'warehouse',//类型标识
+    belong:{
+        columns: [{
+            text: '编号',
+            dataIndex: 'wh_code',
+            width: 150
+        },{
+            text: '仓库名称',
+            dataIndex: 'wh_description',
+            width: 200
+        },{
+            text: '类型',
+            dataIndex: 'wh_type',
+            width: 110
+        },{  
+            text: '仓库状态码',
+            dataIndex: 'wh_status',
+            hidden:true,
+        },{
+            text: '仓库状态',
+            dataIndex: 'wh_statuscode',
+            width:90,
+            xtype: 'actioncolumn',
+            align : 'center',
+            items: [{
+                iconCls:'',
+                getClass: function(v, meta, rec) {
+                    if(rec.get('wh_statuscode')=='ENABLE'){
+                        return 'x-grid-checkcolumn-checked-btn';
+                    }else{
+                        return 'x-grid-checkcolumn-btn';
+                    }
+                },
+                handler: function(view, rowIndex, colIndex) {
+                    var rec = view.getStore().getAt(rowIndex);
+                    var type=rec.get('wh_statuscode')=='ENABLE'?true:false;
+                    //  禁用/启用
+                    var form = this.ownerCt.ownerCt.ownerCt;
+                    var grid = this.ownerCt.ownerCt;
+                    saas.util.BaseUtil.request({
+                        url: (!type?form._openUrl:form._closeUrl)+'/'+rec.get('id'),
+                        params: '',
+                        method: 'POST',
+                    })
+                    .then(function(localJson) {
+                        if(localJson.success){
+                            saas.util.BaseUtil.showSuccessToast('操作成功');
+                            grid.store.load();
+                        }
+                    })
+                    .catch(function(res) {
+                        console.error(res);
+                        saas.util.BaseUtil.showErrorToast('操作失败: ' + res.message);
+                    });
+                }
+            }]
+        }],
+        keyField:'id',
+        reqUrl: '/api/document/warehouse/save',
+        delUrl: '/api/document/warehouse/delete'
+    },
+    etc:{
+        warehouse:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                fieldLabel: '仓库编号',
+                name: 'wh_code',
+                autoCode:true,
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                fieldLabel: '仓库名称',
+                name: 'wh_description',
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'combo',
+                fieldLabel: '仓库类型',
+                name: 'wh_type',
+                allowBlank:false,
+                displayField : "display", 
+                editable:false,
+                hideTrigger : false, 
+                maxLength : 100.0, 
+                minValue : null, 
+                positiveNum : false, 
+                queryMode : "local", 
+                valueField : "value", 
+                store:{
+                    fields: ['display', 'value'],
+                    data : [
+                        {"display":"良品仓", "value":'良品仓'},
+                        {"display":"不良品仓", "value":'不良品仓'}
+                    ]
+                }
+            },{
+                readOnly:true,
+                xtype:'textfield',
+                fieldLabel: '仓库状态',
+                name: 'wh_status',   
+                value:'已启用',
+                maxLength: 20
+            },{
+                xtype:'hidden',
+                fieldLabel: '仓库状态码',
+                name: 'wh_statuscode',
+                value:'ENABLE'
+            }]
+        }
+    }
+});

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

@@ -69,15 +69,12 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         columnWidth : 0.5,
         hiddenBtn:false,//true 则会关闭新增按钮功能
         addHandler:function(b){
-            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
+            this.dialog = form.add({
+                xtype: 'document-address-window',
                 bind: {
                     title: '新增交货地址'
                 },
-                dataKind:'address',
-                belong:document.etc['address'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,

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

@@ -66,7 +66,23 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         name : "sa_toplace", 
         xtype : "textfield", 
         fieldLabel : "交货地址", 
-        columnWidth : 0.5
+        allowBlank : false, 
+        columnWidth : 0.5,
+        hiddenBtn:false,//true 则会关闭新增按钮功能
+        addHandler:function(b){
+            var form = this.ownerCmp.ownerCt;
+            this.dialog = form.add({
+                xtype: 'document-address-window',
+                bind: {
+                    title: '新增交货地址'
+                },
+                _parent:form,
+                _combo:this.ownerCmp,
+                record:null,
+                session: true
+            });
+            this.dialog.show();
+        }
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 

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

@@ -4,6 +4,7 @@ Ext.define('saas.view.sys.power.TreePanel', {
 
     dataUrl:'/api/account/role/list',
     deleteUrl:'/api/account/role/delete/',
+    focusable:false,
 
     initComponent: function () {
         var me = this;

+ 6 - 2
frontend/saas-web/ext/packages/ux/src/feature/MySummary.js

@@ -19,8 +19,7 @@ Ext.define('Ext.ux.feature.MySummary', {
     summaryRowCls: Ext.baseCSSPrefix + 'grid-row-summary ' + Ext.baseCSSPrefix + 'grid-row-total',
     summaryRowSelector: '.' + Ext.baseCSSPrefix + 'grid-row-summary.' + Ext.baseCSSPrefix + 'grid-row-total',
 
-    // turn off feature events.
-    hasFeatureEvent: false,
+    showSummaryRow: true,
 
     init: function(grid) {
         var me = this,
@@ -71,6 +70,7 @@ Ext.define('Ext.ux.feature.MySummary', {
                         '</table>',
                     ],
                     data: summarys,
+                    height: 36,
                     scrollable: {
                         x: false,
                         y: false
@@ -114,6 +114,10 @@ Ext.define('Ext.ux.feature.MySummary', {
 
         grid.summarys = summarys;
 
+        if(summarys.length == 0) {
+            me.showSummaryRow = false;
+        }
+
         return summarys;
     },
 

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

@@ -3,10 +3,10 @@ Ext.define('saas.override.form.field.TrimVtype', {
 
     // vtype validation function
     trim: function(value) {
-        return this.trimRe.test(value);
+        return !this.trimRe.test(value);
     },
     // RegExp for the value to be tested against within the validation function
-    trimRe: /^(?! ).*(?<! )$/i,
+    trimRe: /(^ .*)|(.* $)/,
     // vtype Text property: The error text to display when the validation function returns false
     trimText: '请不要在内容的开头和结尾添加空格'
 });

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

@@ -204,7 +204,7 @@
         }, {
             "id":"other-warehouse",
             "text": "仓库资料",
-            "viewType": "other-warehouse",
+            "viewType": "document-warehouse-datalist",
             "leaf": true
         }, {
             "id":"document-bom-basepanel",
@@ -213,14 +213,14 @@
             "addType": "document-bom-formpanel",
             "leaf": true
         }, {
-            "id":"other-bankinformation",
+            "id":"document-bankinformation-datalist",
             "text": "资金账户",
-            "viewType": "other-bankinformation",
+            "viewType": "document-bankinformation-datalist",
             "leaf": true
         },{
-            "id":"other-employee",
+            "id":"document-employee-datalist",
             "text": "人员资料",
-            "viewType": "other-employee",
+            "viewType": "document-employee-datalist",
             "leaf": true
         }]
     }, {
@@ -234,7 +234,7 @@
         }, {
             "id":"other-address",
             "text": "采购交货地址",
-            "viewType": "other-address",
+            "viewType": "document-address-datalist",
             "leaf": true
         }, {
             "config":"customerkind",
@@ -243,9 +243,9 @@
             "viewType": "document-kind",
             "leaf": true
         }, {
-            "id":"other-productunit",
+            "id":"document-productunit-datalist",
             "text": "计量单位",
-            "viewType": "other-productunit",
+            "viewType": "document-productunit-datalist",
             "leaf": true
         }, {
             "config":"productkind",
@@ -254,9 +254,9 @@
             "viewType": "document-kind",
             "leaf": true
         }, {
-            "id":"other-productbrand",
+            "id":"document-productbrand-datalist",
             "text": "物料品牌",
-            "viewType": "other-productbrand",
+            "viewType": "document-productbrand-datalist",
             "leaf": true
         }, {
             "config":"inoutkind",
@@ -271,12 +271,7 @@
     "iconCls": "x-sa sa-setting",
     "items": [{
         "text": "系统设置",
-        "items": [{
-            "id":"sys-guide-formpanel",
-            "text": "新手导航",
-            "viewType": "sys-guide-formpanel",
-            "leaf": true
-        }, {  
+        "items": [{  
             "id":"sys-manager-formpanel",
             "text": "系统管理",
             "viewType": "sys-manager-formpanel",