Browse Source

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

guq 7 years ago
parent
commit
7a2f50640d
44 changed files with 973 additions and 96 deletions
  1. 4 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  2. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java
  3. 9 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  4. 18 0
      frontend/operation-web/app/model/cuservice/Feedback.js
  5. 14 0
      frontend/operation-web/app/model/statistical/CompanyInfo.js
  6. 10 0
      frontend/operation-web/app/model/statistical/LoginLog.js
  7. 17 0
      frontend/operation-web/app/model/statistical/PersonInfo.js
  8. 16 0
      frontend/operation-web/app/util/BaseUtil.js
  9. 41 0
      frontend/operation-web/app/view/core/List.js
  10. 1 1
      frontend/operation-web/app/view/core/tab/Controller.js
  11. 27 0
      frontend/operation-web/app/view/core/window/Controller.js
  12. 9 0
      frontend/operation-web/app/view/core/window/Window.js
  13. 69 0
      frontend/operation-web/app/view/cuservice/Feedback.js
  14. 25 0
      frontend/operation-web/app/view/cuservice/Models.js
  15. 11 7
      frontend/operation-web/app/view/main/Navigation.js
  16. 27 0
      frontend/operation-web/app/view/statistical/AccessLog.js
  17. 36 0
      frontend/operation-web/app/view/statistical/CompanyAnalysis.js
  18. 57 0
      frontend/operation-web/app/view/statistical/CompanyInfo.js
  19. 41 0
      frontend/operation-web/app/view/statistical/LoginLog.js
  20. 63 0
      frontend/operation-web/app/view/statistical/Models.js
  21. 24 0
      frontend/operation-web/app/view/statistical/MonthInfo.js
  22. 64 0
      frontend/operation-web/app/view/statistical/PersonInfo.js
  23. 39 0
      frontend/operation-web/app/view/tools/ClearCache.js
  24. 45 0
      frontend/operation-web/app/view/tools/ResetAccount.js
  25. 1 1
      frontend/operation-web/overrides/data/Connection.js
  26. 38 18
      frontend/operation-web/resources/json/navigation.json
  27. 3 0
      frontend/saas-web/app.json
  28. 1 1
      frontend/saas-web/app/model/sale/SaleOutDetail.js
  29. 1 1
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.scss
  30. 1 1
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  31. 95 0
      frontend/saas-web/app/view/document/currencys/AddWindow.js
  32. 20 1
      frontend/saas-web/app/view/document/currencys/DataList.js
  33. 2 1
      frontend/saas-web/app/view/document/currencys/DataListModel.js
  34. 14 1
      frontend/saas-web/app/view/document/currencys/DatalistController.js
  35. 4 1
      frontend/saas-web/app/view/document/currencys/Window.js
  36. 4 0
      frontend/saas-web/app/view/home/Home.js
  37. 84 0
      frontend/saas-web/app/view/home/HomeController.js
  38. 1 0
      frontend/saas-web/app/view/main/MainController.js
  39. 1 1
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  40. 1 0
      frontend/saas-web/app/view/money/report/OtherIODetail.js
  41. 2 2
      frontend/saas-web/app/view/sys/baseconfig/FormPanel.js
  42. 8 5
      frontend/saas-web/app/view/sys/feedback/FormPanel.js
  43. 0 47
      frontend/saas-web/app/view/sys/feedback/FormPanel.scss
  44. 24 2
      frontend/saas-web/app/view/sys/feedback/FormPanelController.js

+ 4 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -80,7 +80,10 @@ public class ProductController {
 
     @PostMapping("/batchDelete")
     public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs){
-        productService.batchDelete(baseDTOs);
+        String result = productService.batchDelete(baseDTOs);
+        if (!StringUtils.isEmpty(result)){
+            return Result.error(result);
+        }
         return Result.success();
     }
 

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java

@@ -95,7 +95,7 @@ public interface ProductService extends CommonBaseService<ProductMapper, Product
      * @param baseDTOs
      * @return
      */
-    boolean batchDelete(BatchDealBaseDTO baseDTOs);
+    String batchDelete(BatchDealBaseDTO baseDTOs);
 
     /**
      * 通过ID获取物料信息

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

@@ -535,11 +535,17 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
 
     @Override
     @Transactional
-    public boolean batchDelete(BatchDealBaseDTO baseDTOs) {
+    public String batchDelete(BatchDealBaseDTO baseDTOs) {
+        StringBuilder errorMsg = new StringBuilder();
         for(DocBaseDTO docBaseDTO : baseDTOs.getBaseDTOs()){
-            deleteByPrimaryKey(docBaseDTO.getId());
+            try {
+                deleteByPrimaryKey(docBaseDTO.getId());
+            }catch (Exception e){
+                String msg = BizExceptionCode.DEAL_FAILED.getMessage();
+                errorMsg.append(String.format(msg, docBaseDTO.getCode(), e.getMessage()) + "<br />");
+            }
         }
-        return true;
+        return errorMsg.toString();
     }
 
     @Override

+ 18 - 0
frontend/operation-web/app/model/cuservice/Feedback.js

@@ -0,0 +1,18 @@
+Ext.define('saas.model.cuservice.Feedback', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'cf_id', type: 'int' },
+        { name: 'cf_creator', type: 'string' },
+        { name: 'cf_creatime', type: 'date' },
+        { name: 'cf_creatorid', type: 'int' },
+        { name: 'cf_content', type: 'string' },
+        { name: 'cf_status', type: 'string' },
+        { name: 'cf_companyid', type: 'int' },
+        { name: 'cf_company', type: 'string' },
+        { name: 'cf_remark', type: 'string' },
+        { name: 'cr_mobile', type: 'string' },
+        { name: 'cr_name', type: 'string' },
+        { name: 'cr_qq', type: 'string' },
+        { name: 'cr_wechat', type: 'string' },
+    ]
+});

+ 14 - 0
frontend/operation-web/app/model/statistical/CompanyInfo.js

@@ -0,0 +1,14 @@
+Ext.define('saas.model.statistical.CompanyInfo', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'name', type: 'string' },
+        { name: 'business_code', type: 'string' },
+        { name: 'address', type: 'string' },
+        { name: 'tel', type: 'string' },
+        { name: 'fax', type: 'string' }, // 传真
+        { name: 'realname', type: 'string' },
+        { name: 'mobile', type: 'string' },
+        { name: 'uu', type: 'int' },
+        { name: 'create_time', type: 'date' },
+    ]
+});

+ 10 - 0
frontend/operation-web/app/model/statistical/LoginLog.js

@@ -0,0 +1,10 @@
+Ext.define('saas.model.statistical.LoginLog', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'account_id', type: 'int' },
+        { name: 'login_num', type: 'int' },
+        { name: 'username', type: 'string' },
+        { name: 'lastesttime', type: 'date' },
+        { name: 'mobile', type: 'string' },
+    ]
+});

+ 17 - 0
frontend/operation-web/app/model/statistical/PersonInfo.js

@@ -0,0 +1,17 @@
+Ext.define('saas.model.statistical.PersonInfo', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'username', type: 'string' },
+        { name: 'realname', type: 'string' },
+        { name: 'email', type: 'string' },
+        { name: 'mobile', type: 'string' },
+        { name: 'type', type: 'int' },
+        { name: 'enabled', type: 'boolean' },
+        { name: 'createTime', type: 'date' },
+        { name: 'creatorId', type: 'int' },
+        { name: 'updateTime', type: 'date' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'uu', type: 'int' },
+    ]
+});

+ 16 - 0
frontend/operation-web/app/util/BaseUtil.js

@@ -29,6 +29,22 @@ Ext.define('saas.util.BaseUtil', {
             }
         },
 
+        openWin: function(xtype, title, id, config) {
+            var mainTab = Ext.getCmp('main-tab-panel');
+            var win = mainTab.query('[winId="' + id + '"]')[0];
+            if (!win) {
+                win = Ext.create('saas.view.core.window.Window', {
+                    tabId: id,
+                    title: title,
+                    viewType: xtype,
+                    viewConfig: config
+                });
+            } else {
+                win.viewConfig = config;
+            }
+            win.show();
+        },
+
         /**
          * 重设tab标题
          */

+ 41 - 0
frontend/operation-web/app/view/core/List.js

@@ -0,0 +1,41 @@
+/**
+ * 用户访问日志
+ */
+Ext.define('saas.view.core.List', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'corelist',
+
+    cls: 'x-core-list x-infocardlist',
+
+    border: 1,
+
+    plugins: [{
+        ptype: 'menuclipboard'
+    }],
+
+    columns: [],
+    store: Ext.create('Ext.data.Store', {
+        fields: [],
+        data: [],
+    }),
+
+    bbar: {
+        items: [{
+            xtype: 'button',
+            tooltip: '刷新',
+            ui: 'header',
+            cls: 'refresh',
+            iconCls: 'x-fa fa-refresh',
+            listeners: {
+                click: function() {
+                    this.up('grid').store.reload();
+                }
+            }
+        }]
+    },
+
+    refresh: function() {
+        this.store.reload();
+    },
+
+});

+ 1 - 1
frontend/operation-web/app/view/core/tab/Controller.js

@@ -78,6 +78,6 @@ Ext.define('saas.view.core.tab.Controller', {
 
     onTabDeactivate: function(component) {
         var tabView = component.down('container');
-        tabView.fireEvent('onTabDeactivate', tabView);
+        tabView && tabView.fireEvent('onTabDeactivate', tabView);
     }
 });

+ 27 - 0
frontend/operation-web/app/view/core/window/Controller.js

@@ -0,0 +1,27 @@
+Ext.define('saas.view.core.window.Controller', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.core-win-controller',
+
+    init: function() {
+        try {
+            var me = this,
+            win = me.getView(),
+            viewType = win.viewType,
+            viewConfig = win.viewConfig;
+    
+            var view = {
+                xtype: viewType
+            };
+            Ext.apply(view, viewConfig);
+    
+            win.add(view);
+        }catch(e) {
+            console.error(e);
+        }
+    },
+
+    closeWin: function() {
+        var win = this.getView();
+        win.close();
+    }
+});

+ 9 - 0
frontend/operation-web/app/view/core/window/Window.js

@@ -0,0 +1,9 @@
+Ext.define('saas.view.core.window.Window', {
+    extend: 'Ext.window.Window',
+    xtype: 'core-win',
+    controller: 'core-win-controller',
+
+    cls: 'x-core-win',
+    layout: 'fit',
+    closable: true
+});

+ 69 - 0
frontend/operation-web/app/view/cuservice/Feedback.js

@@ -0,0 +1,69 @@
+/**
+ * 在线反馈
+ */
+Ext.define('saas.view.cuservice.Feedback', {
+    extend: 'saas.view.core.List',
+    xtype: 'cuservice-feedback',
+
+    viewModel: 'cuservice',
+
+    cls: 'x-infocardlist',
+
+    id: 'feedback',
+
+    border: 1,
+
+    columns: [{
+        text: 'id',
+        dataIndex: 'cf_id',
+        hidden: true
+    }, {
+        text: '反馈人',
+        dataIndex: 'cf_name',
+        width: 120
+    }, {
+        text: '反馈时间',
+        dataIndex: 'cf_creatime',
+        width: 180,
+        renderer: function(v, m, r) {
+            return Ext.Date.format(new Date(v), 'Y-m-d h:i:s');
+        }
+    }, {
+        text: '反馈内容',
+        width: 250,
+        dataIndex: 'cf_content'
+    }, {
+        text: '状态',
+        dataIndex: 'cf_status',
+        width: 80
+    }, {
+        text: '企业id',
+        dataIndex: 'cf_companyid',
+        hidden: true
+    }, {
+        text: '企业名',
+        dataIndex: 'cf_company',
+        width: 120
+    }, {
+        text: '联系电话',
+        dataIndex: 'cf_mobile',
+        width: 120
+    }, {
+        text: 'QQ',
+        dataIndex: 'cf_qq',
+        width: 120
+    }, {
+        text: '微信',
+        dataIndex: 'cf_wechat',
+        width: 120
+    }, {
+        text: '备注',
+        dataIndex: 'cf_remark',
+        width: 250
+    }],
+
+    bind: {
+        store: '{feedback}'
+    }
+
+});

+ 25 - 0
frontend/operation-web/app/view/cuservice/Models.js

@@ -0,0 +1,25 @@
+Ext.define('saas.view.cuservice.Models', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.cuservice',
+
+    stores: {
+        feedback: {
+            model: 'saas.model.cuservice.Feedback',
+            autoLoad: true,
+            proxy: {
+                type: 'ajax',
+                // url: 'http://10.1.80.33:9040/customerFeedBack/list',
+                url: '/api/operation/customerFeedBack/list',
+                timeout: 8000,
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list',
+                    totalProperty: 'data.total',
+                }
+            }
+        }
+    }
+});

+ 11 - 7
frontend/operation-web/app/view/main/Navigation.js

@@ -76,7 +76,7 @@ Ext.define('saas.view.main.Navigation', {
         if (!menu) {
             var view = new Ext.DataView({
                 store: Ext.create('Ext.data.Store', {
-                    fields: ['id', 'text', 'addType', 'viewType'],
+                    fields: ['id', 'text', 'addType', 'viewType', 'ctype'],
                     data: menuItems
                 }),
                 tpl: new Ext.XTemplate('<div class="x-navitem-menu">',
@@ -89,7 +89,7 @@ Ext.define('saas.view.main.Navigation', {
                         '<div class="menu-content">',
                             '<tpl for="items">',
                             '<div class="menuitem">',
-                                '<div class="item-text" data-config="{config}" data-id="{id}" data-text="{text}" data-type="query" data-viewType="{viewType}">',
+                                '<div class="item-text" data-config="{config}" data-id="{id}" data-text="{text}" data-type="query" data-viewType="{viewType}" data-ctype="{ctype}">',
                                     '{text}',
                                 '</div>',
                                 '<tpl if="{addType}">',
@@ -152,13 +152,15 @@ Ext.define('saas.view.main.Navigation', {
                                     type = dataset.type,
                                     text = dataset.text,
                                     config = dataset.config,
-                                    id = dataset.id;
+                                    id = dataset.id,
+                                    componentType = dataset.ctype || 'Tab';
 
                                     var tabTitle = text,
                                     tabId = 'maintab-' + type + '-' + id;
-
+                                    
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
-                                    saas.util.BaseUtil.openTab(viewType, tabTitle, tabId,config);
+                                    // saas.util.BaseUtil.openTab(viewType, tabTitle, tabId,config);
+                                    saas.util.BaseUtil['open' + componentType](viewType, tabTitle, tabId,config);
                                     menu.hide();
                                 });
                             });
@@ -169,13 +171,15 @@ Ext.define('saas.view.main.Navigation', {
                                     viewType = dataset.viewtype,
                                     type = dataset.type,
                                     text = dataset.text,
-                                    id = dataset.id;
+                                    id = dataset.id,
+                                    componentType = dataset.ctype || 'Tab';
 
                                     var tabTitle ='新增' + text,
                                     tabId = viewType + '-add';
 
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
-                                    saas.util.BaseUtil.openTab(viewType, tabTitle, tabId);
+                                    // saas.util.BaseUtil.openTab(viewType, tabTitle, tabId);
+                                    saas.util.BaseUtil['open' + componentType](viewType, tabTitle, tabId);
                                     menu.hide();
                                 });
                             });

+ 27 - 0
frontend/operation-web/app/view/statistical/AccessLog.js

@@ -0,0 +1,27 @@
+/**
+ * 用户访问日志
+ */
+Ext.define('saas.view.statistical.AccessLog', {
+    extend: 'saas.view.core.List',
+    xtype: 'statistical-accesslog',
+
+    columns: [{
+        text: '用户名',
+        dataIndex: 'name'
+    }, {
+        text: '联系电话',
+        dataIndex: 'phone'
+    }, {
+        text: '最后访问时间',
+        dataIndex: 'lastTime'
+    }, {
+        text: '近三月访问次数',
+        dataIndex: 'count'
+    }],
+
+    store: Ext.create('Ext.data.Store', {
+        fields: ['name', 'phone', 'lastTime', 'count'],
+        data: [],
+    })
+
+});

+ 36 - 0
frontend/operation-web/app/view/statistical/CompanyAnalysis.js

@@ -0,0 +1,36 @@
+/**
+ * 企业分析
+ */
+Ext.define('saas.view.statistical.CompanyAnalysis', {
+    extend: 'saas.view.core.List',
+    xtype: 'statistical-companyanalysis',
+
+    columns: [{
+        text: '企业名称',
+        dataIndex: 'name'
+    }, {
+        text: '企业地址',
+        dataIndex: 'address'
+    }, {
+        text: '管理员',
+        dataIndex: 'administrator'
+    }, {
+        text: '注册时间',
+        dataIndex: 'registeTime'
+    }, {
+        text: '最近操作时间',
+        dataIndex: 'lastTime'
+    }, {
+        text: '目前阶段',
+        dataIndex: 'step'
+    }, {
+        text: '使用状态',
+        dataIndex: 'status'
+    }],
+
+    store: Ext.create('Ext.data.Store', {
+        fields: ['name', 'address', 'administrator', 'registeTime', 'lastTime', 'step', 'status'],
+        data: [],
+    })
+
+});

+ 57 - 0
frontend/operation-web/app/view/statistical/CompanyInfo.js

@@ -0,0 +1,57 @@
+/**
+ * 企业注册数据
+ */
+Ext.define('saas.view.statistical.CompanyInfo', {
+    extend: 'saas.view.core.List',
+    xtype: 'statistical-companyinfo',
+
+    viewModel: 'statistical',
+
+    id: 'companyinfo',
+    columns: [{
+        text: '注册时间',
+        dataIndex: 'create_time',
+        width: 180,
+        xtype: 'datecolumn',
+        renderer: function(v, m, r) {
+            return Ext.Date.format(new Date(v), 'Y-m-d h:i:s');
+        }
+    }, {
+        text: '企业编号',
+        width: 200,
+        dataIndex: 'business_code'
+    }, {
+        text: '企业名称',
+        width: 200,
+        dataIndex: 'name'
+    }, {
+        text: 'UU号',
+        width: 120,
+        dataIndex: 'uu'
+    }, {
+        text: '企业地址',
+        width: 250,
+        dataIndex: 'address'
+    }, {
+        text: '电话',
+        width: 120,
+        dataIndex: 'tel'
+    }, {
+        text: '传真',
+        width: 150,
+        dataIndex: 'fax'
+    }, {
+        text: '管理员',
+        width: 100,
+        dataIndex: 'realname'
+    }, {
+        text: '联系方式',
+        width: 150,
+        dataIndex: 'mobile'
+    }],
+
+    bind: {
+        store: '{companyinfo}'
+    }
+
+});

+ 41 - 0
frontend/operation-web/app/view/statistical/LoginLog.js

@@ -0,0 +1,41 @@
+/**
+ * 登录日志
+ */
+Ext.define('saas.view.statistical.LoginLog', {
+    extend: 'saas.view.core.List',
+    xtype: 'statistical-loginlog',
+
+    viewModel: 'statistical',
+
+    id: 'loginlog',
+
+    columns: [{
+        text: 'id',
+        dataIndex: 'account_id',
+        hidden: true
+    }, {
+        text: '用户名',
+        dataIndex: 'username',
+        width: 120
+    }, {
+        text: '手机号',
+        dataIndex: 'mobile',
+        width: 120
+    }, {
+        text: '近三月登录次数',
+        dataIndex: 'login_num'
+    }, {
+        text: '最后登录时间',
+        dataIndex: 'lastesttime',
+        width: 180,
+        xtype: 'datecolumn',
+        renderer: function(v, m, r) {
+            return Ext.Date.format(new Date(v), 'Y-m-d h:i:s');
+        }
+    }],
+
+    bind: {
+        store: '{loginlog}'
+    }
+
+});

+ 63 - 0
frontend/operation-web/app/view/statistical/Models.js

@@ -0,0 +1,63 @@
+Ext.define('saas.view.statistical.Models', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.statistical',
+
+    stores: {
+        personinfo: {
+            model: 'saas.model.statistical.PersonInfo',
+            autoLoad: true,
+            proxy: {
+                type: 'ajax',
+                // url: 'http://10.1.80.33:9040/data/getAccount',
+                url: '/api/operation/data/getAccount',
+                timeout: 8000,
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list',
+                    totalProperty: 'data.total',
+                }
+            }
+        },
+
+        companyinfo: {
+            model: 'saas.model.statistical.CompanyInfo',
+            autoLoad: true,
+            proxy: {
+                type: 'ajax',
+                // url: 'http://10.1.80.33:9040/data/getCompany',
+                url: '/api/operation/data/getCompany',
+                timeout: 8000,
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list',
+                    totalProperty: 'data.total',
+                }
+            }
+        },
+
+        loginlog: {
+            model: 'saas.model.statistical.LoginLog',
+            autoLoad: true,
+            proxy: {
+                type: 'ajax',
+                // url: 'http://10.1.80.33:9040/data/getLogin',
+                url: '/api/operation/data/getLogin',
+                timeout: 8000,
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list',
+                    totalProperty: 'data.total',
+                },
+            }
+        },
+    }
+});

+ 24 - 0
frontend/operation-web/app/view/statistical/MonthInfo.js

@@ -0,0 +1,24 @@
+/**
+ * 月注册分析
+ */
+Ext.define('saas.view.statistical.MonthInfo', {
+    extend: 'saas.view.core.List',
+    xtype: 'statistical-monthinfo',
+
+    columns: [{
+        text: '姓名',
+        dataIndex: 'name'
+    }, {
+        text: '手机号',
+        dataIndex: 'phone'
+    }, {
+        text: '注册时间',
+        dataIndex: 'registeTime'
+    }],
+
+    store: Ext.create('Ext.data.Store', {
+        fields: ['name', 'phone', 'registeTime'],
+        data: [],
+    })
+
+});

+ 64 - 0
frontend/operation-web/app/view/statistical/PersonInfo.js

@@ -0,0 +1,64 @@
+/**
+ * 个人注册数据
+ */
+Ext.define('saas.view.statistical.PersonInfo', {
+    extend: 'saas.view.core.List',
+    xtype: 'statistical-personinfo',
+
+    viewModel: 'statistical',
+
+    id: 'personinfo',
+
+    columns: [{
+        text: 'id',
+        dataIndex: 'id',
+        hidden: true
+    }, {
+        text: '账号',
+        dataIndex: 'username',
+        width: 120
+    }, {
+        text: '姓名',
+        dataIndex: 'realname',
+        width: 120
+    }, {
+        text: '邮箱',
+        dataIndex: 'email',
+        width: 180
+    }, {
+        text: '手机号',
+        dataIndex: 'mobile',
+        width: 120
+    }, {
+        text: '类型',
+        dataIndex: 'type',
+        width: 140,
+        renderer: function(v, m, r) {
+            return v == 1 ? '<span style="font-weight: bold;">管理员</span>' : '普通用户';
+        }
+    }, {
+        text: '状态',
+        dataIndex: 'enabled',
+        width: 80,
+        renderer: function(v, m, r) {
+            return v == true ? '<span style="color: #81CB31;">正常</span>' : '<span style="color: #DD6550;">禁用</span>';
+        }
+    }, {
+        text: '注册时间',
+        xtype: 'datecolumn',
+        dataIndex: 'createTime',
+        width: 180,
+        renderer: function(v, m, r) {
+            return Ext.Date.format(new Date(v), 'Y-m-d h:i:s'); 
+        }
+    }, {
+        text: 'UU号',
+        dataIndex: 'uu',
+        width: 120
+    }],
+
+    bind: {
+        store: '{personinfo}'
+    }
+
+});

+ 39 - 0
frontend/operation-web/app/view/tools/ClearCache.js

@@ -0,0 +1,39 @@
+Ext.define('saas.view.tools.ClearCache', {
+    extend: 'Ext.form.Panel',
+    xtype: 'tools-clearcache',
+
+    requires: ['Ext.form.field.Display'],
+
+    layout: 'column',
+    width: 350,
+    bodyPadding: 10,
+
+    items: [{
+        xtype: 'displayfield',
+        value: '确定执行清除缓存操作吗?',
+        columnWidth: 1
+    }],
+
+    buttonAlign: 'center',
+    buttons: [{
+        text: '确定',
+        handler: function() {
+            var win = this.up('core-win');
+            win.setLoading(true);
+            saas.util.BaseUtil.request({
+                url: '/api/account/account/cache/clearAll',
+            }).then(function(res) {
+                saas.util.BaseUtil.showSuccessToast('清除缓存成功');
+                win.setLoading(false);
+                win.close();
+            }).catch(function(e) {
+                saas.util.BaseUtil.showErrorToast('清除缓存失败: ' + e.message);
+                win.setLoading(false);
+                win.close();
+            });
+        }
+    }, {
+        text: '取消',
+        handler: 'closeWin'
+    }]
+})

+ 45 - 0
frontend/operation-web/app/view/tools/ResetAccount.js

@@ -0,0 +1,45 @@
+Ext.define('saas.view.tools.ResetAccount', {
+    extend: 'Ext.form.Panel',
+    xtype: 'tools-resetaccount',
+
+    requires: ['Ext.layout.container.Column'],
+
+    layout: 'column',
+    width: 350,
+    bodyPadding: 10,
+
+    items: [{
+        xtype: 'textfield',
+        name: 'userName',
+        emptyText: '输入账号',
+        columnWidth: 1,
+        allowBlank: false
+    }],
+
+    buttonAlign: 'center',
+    buttons: [{
+        text: '确定',
+        formBind: true,
+        handler: function() {
+            var win = this.up('core-win'),
+            form = this.up('tools-resetaccount'),
+            userName = form.getValues().userName;
+
+            win.setLoading(true);
+            saas.util.BaseUtil.request({
+                url: '/api/oper_auth/clearAuthorizeCount?username=' + userName,
+            }).then(function(res) {
+                saas.util.BaseUtil.showSuccessToast('账号[' + userName + ']已重置');
+                win.setLoading(false);
+                win.close();
+            }).catch(function(e) {
+                saas.util.BaseUtil.showErrorToast('账号[' + userName + ']重置失败: ' + e.message);
+                win.setLoading(false);
+                win.close();
+            });
+        }
+    }, {
+        text: '取消',
+        handler: 'closeWin'
+    }]
+})

+ 1 - 1
frontend/operation-web/overrides/data/Connection.js

@@ -60,7 +60,7 @@ Ext.define('saas.override.data.Connection', {
 
         if(res && res.code == 40001) {
             // 如果token超时则显示重新登陆弹窗
-            saas.util.BaseUtil.showLoginWin();
+            // saas.util.BaseUtil.showLoginWin();
             throw new Error('会话已过期');
         }
 

+ 38 - 18
frontend/operation-web/resources/json/navigation.json

@@ -1,31 +1,51 @@
 [{
-    "text": "企业",
+    "text": "统计分析",
     "iconCls": "x-sa sa-accountCenter",
     "items": [{
-        "text": "查询",
+        "text": "注册统计",
         "items": [{
-            "id": "company",
-            "text": "企业信息",
-            "viewType": "account-company-querypanel"
+            "id": "1",
+            "text": "企业注册数据",
+            "viewType": "statistical-companyinfo"
         }, {
-            "id": "account",
-            "text": "用户信息",
-            "viewType": "account-account-querypanel"
+            "id": "2",
+            "text": "个人注册数据",
+            "viewType": "statistical-personinfo"
         }]
     }, {
-        "text": "报表",
+        "text": "行为统计",
         "items": [{
-            "id": "report-company",
-            "text": "企业活跃度一览表",
-            "viewType": "operation-report-company"
-        },{
-            "id": "report-account",
-            "text": "用户活跃度一览表",
-            "viewType": "operation-report-account"
+            "id": "4",
+            "text": "用户访问日志",
+            "viewType": "statistical-loginlog"
         }]
     }]
 }, {
-    "text": "设置",
+    "text": "客户服务",
+    "iconCls": "x-sa sa-info",
+    "items": [{
+        "text": "客户反馈",
+        "items": [{
+            "id": "6",
+            "text": "在线反馈",
+            "viewType": "cuservice-feedback"
+        }]
+    }]
+}, {
+    "text": "研发助手",
     "iconCls": "x-sa sa-setting",
-    "items": []
+    "items": [{
+        "text": "工具",
+        "items": [{
+            "id": "9",
+            "text":"清除系统缓存",
+            "ctype": "Win",
+            "viewType": "tools-clearcache"
+        }, {
+            "id": "10",
+            "text": "冻结账号恢复",
+            "ctype": "Win",
+            "viewType": "tools-resetaccount"
+        }]
+    }]
 }]

+ 3 - 0
frontend/saas-web/app.json

@@ -280,6 +280,7 @@
     "builds": {
         "dev": {
             "server": {
+                "mail":"https://test-mall.uuzcc.cn",
                 "accountCenter":"https://saas-dev.usoftchina.com:5443",
                 "accountEnterprise":"https://saas-dev.usoftchina.com:5443/#/enterprise",
                 "basePath": {
@@ -292,6 +293,7 @@
         },
         "test": {
             "server": {
+                "mail":"https://test-mall.uuzcc.cn",
                 "accountCenter": "https://saas-test.usoftchina.com:5443",
                 "accountEnterprise": "https://saas-test.usoftchina.com:5443/#/enterprise",
                 "basePath": {
@@ -304,6 +306,7 @@
         },
         "prod": {
             "server": {
+                "mail":"https://mall.usoftchina.com",
                 "accountCenter":"https://saas.usoftchina.com",
                 "accountEnterprise":"https://saas.usoftchina.com/#/enterprise",
                 "basePath": "https://saas-api.usoftchina.com",

+ 1 - 1
frontend/saas-web/app/model/sale/SaleOutDetail.js

@@ -13,7 +13,7 @@ Ext.define('saas.model.sale.SaleOutDetail', {
         { name: 'pd_outqty', type: 'float' }, // 出货数量
         { name: 'pr_unit', type: 'string' }, // 单位
         { name: 'pd_whid', type: 'int' }, // 仓库id
-        { name: 'pd_whcode', type: 'float' }, // 仓库编号
+        { name: 'pd_whcode', type: 'string' }, // 仓库编号
         { name: 'pd_whname', type: 'string' }, // 仓库
         { name: 'pd_taxrate', type: 'float' }, // 税率
         { name: 'pd_netprice', type: 'float' }, // 单价

+ 1 - 1
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.scss

@@ -34,7 +34,7 @@
     }
     .x-window-body{
         padding-top: 0px !important;
-        background-image: url(get-resource-path('images/default/win-bg-img.png'));
+        // background-image: url(get-resource-path('images/default/win-bg-img.png'));
     }
     .x-toolbar-docked-top {
         padding: 6px 0 12px 0px;

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

@@ -132,7 +132,7 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
         f.blur(f);
         //判断dbfindtrigger归属
         f.judge(f); //form
-        var panel = f.up('core-tab-panel'),
+        var panel = f.up('core-tab-panel') || Ext.getCmp('mainView'),
             panelEl;
         if (!f.column && f.ownerCt.ownerCt.id.indexOf('window-') > -1 && f.ownerCt.ownerCt.id.indexOf('document-') <0) {
             panelEl = f.ownerCt.ownerCt.getEl()

+ 95 - 0
frontend/saas-web/app/view/document/currencys/AddWindow.js

@@ -0,0 +1,95 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.currencys.AddWindow', {
+    extend: 'saas.view.document.kind.ChildForm',
+    xtype: 'document-currencys-addwindow',
+    dataKind:'currencysadd',//类型标识
+    height: 325,
+    belong:{
+        columns: [{
+            text: '币别',
+            dataIndex: 'cr_name',
+            flex: 1
+        },{
+            text: '默认汇率',
+            dataIndex: 'cr_rate',
+            flex: 1
+        }],
+        keyField:'id',
+        reqUrl:'/api/document/currency/save'
+    },
+    etc:{
+        currencysadd:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'cr_name',
+                allowBlank:false,
+                fieldLabel:'币别',
+                maxLength: 20
+            },{
+                xtype:'numberfield',
+                hideTrigger:true,
+                name:'cr_rate',
+                allowBlank:false,
+                fieldLabel:'汇率',
+                maxLength: 20,
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
+            }]
+        }
+    },
+    // onSave:function(){
+    //     var me = this;
+    //     var belong = this.belong;
+    //     me.setLoading(true);
+    //     var form=this.down('form');
+    //     var params = {};
+    //     var names = belong.columns.map(column => column.dataIndex);
+
+    //     Ext.Array.each(names,function(name) {
+    //         if(name){
+    //             var dataField = form.down('[name='+name+']');
+    //             if(dataField&&dataField.value){
+    //                 params[name] = dataField.value;
+    //             }
+    //             if(dataField.name=='mobile'){
+    //                 params['hasRegister'] = dataField.hasRegister;
+    //             }
+    //         }
+    //     });
+
+    //     //更改参数
+    //     var o = '';
+    //     var dataField = form.down('[name=roleIds]');
+    //     Ext.Array.each(dataField.value,function(item) {
+    //         o+=item+','
+    //     });
+    //     o = o.substring(0,o.length-1);
+    //     params['username'] = params['mobile'];
+    //     params['type'] = 1;
+    //     params['roleIds'] = o;
+    //     //保存接口
+    //     saas.util.BaseUtil.request({
+    //         url: belong.reqUrl,
+    //         params: JSON.stringify(params),
+    //         method: 'POST'
+    //     })
+    //     .then(function(localJson) {
+    //         me.setLoading(false);
+    //         if(localJson.success){
+    //             form.ownerCt._parent.store.load();
+    //             saas.util.BaseUtil.showSuccessToast('保存成功');
+    //             form.ownerCt.close();
+    //         }
+    //     })
+    //     .catch(function(e) {
+    //         me.setLoading(false);
+    //         saas.util.BaseUtil.showErrorToast('保存失败: ' + e.message);
+    //     });
+    // }
+});

+ 20 - 1
frontend/saas-web/app/view/document/currencys/DataList.js

@@ -10,7 +10,6 @@ Ext.define('saas.view.document.currencys.DataList', {
     windowType:'document-currencys-window',
     tbar: ['->',{
         xtype:'button',
-        hidden:true,
         text:'新增',
         listeners: {
             click: 'onAdd'
@@ -24,6 +23,26 @@ Ext.define('saas.view.document.currencys.DataList', {
     }],
     etc:{
         currencys:{
+            columns: [{
+                text: '币别',
+                dataIndex: 'cr_name',
+                flex: 1,
+                renderer:function(a,b,c){
+                    if(c.get('cr_standard')==1){
+                        return a + '(本位币)'
+                    }
+                    return a;
+                }
+            },{
+                text: '默认汇率',
+                dataIndex: 'cr_rate',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl:'/api/document/currency/save',
+            delUrl:'/api/document/currency/delete'
+        },
+        currencysadd:{
             columns: [{
                 text: '币别',
                 dataIndex: 'cr_name',

+ 2 - 1
frontend/saas-web/app/view/document/currencys/DataListModel.js

@@ -9,7 +9,8 @@ Ext.define('saas.view.document.currencys.DataListModel', {
             fields:[
                 {name: 'id', type: 'int'},
                 {name: 'cr_rate',  type: 'float'},
-                {name: 'cr_name',  type: 'string'}
+                {name: 'cr_name',  type: 'string'},
+                {name: 'cr_standard',  type: 'int'},
             ],
             proxy: {
                 type: 'ajax',

+ 14 - 1
frontend/saas-web/app/view/document/currencys/DatalistController.js

@@ -21,5 +21,18 @@ Ext.define('saas.view.document.currencys.DatalistController', {
             }]);
         }
         return columns;
-    }
+    },
+    onAdd:function(b){
+        var form = this.view;
+        this.dialog = form.add({
+            xtype: 'document-currencys-addwindow',
+            bind: {
+                title: '新增币别'
+            },
+            _parent:form,
+            record:null,
+            session: true
+        });
+        this.dialog.show();
+    },
 });

+ 4 - 1
frontend/saas-web/app/view/document/currencys/Window.js

@@ -28,7 +28,10 @@ Ext.define('saas.view.document.currencys.Window', {
                 name:'cr_rate',
                 allowBlank:false,
                 fieldLabel:'汇率',
-                maxLength: 20
+                maxLength: 20,
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
             }]
         }
     }

+ 4 - 0
frontend/saas-web/app/view/home/Home.js

@@ -76,6 +76,7 @@ Ext.define('saas.view.home.Home', {
     }],
 
     initComponent: function() {
+        var me = this;
         this.lastTime = Ext.Date.now();
         //判断当前是否未完成新手导航
         saas.util.BaseUtil.request({
@@ -84,6 +85,9 @@ Ext.define('saas.view.home.Home', {
             if(!res.data.begin){
                 saas.util.BaseUtil.openTab('sys-guide-formpanel', '新手导航', 'sys-guide-formpanel')
             }
+            if(!res.data.currency){
+                me.getController().setDefaultCurrency();
+            }
         }).catch(function(e) {
             saas.util.BaseUtil.showErrorToast(e.message);
         })

+ 84 - 0
frontend/saas-web/app/view/home/HomeController.js

@@ -6,4 +6,88 @@ Ext.define('saas.view.home.HomeController', {
         return v + '%';
     },
     
+    setDefaultCurrency:function(){
+        var win = Ext.create('Ext.window.Window', {  
+            id:'x-defaultcurrency',
+            cls:'x-window-dbfind', 
+            height: 100,
+            width: 450,
+            modal:true,
+            title: '本位币设置',
+            bodyPadding: 10,
+            constrain: true,
+            closable: false,
+            layout: {
+                type: 'vbox',
+                align: 'center'
+            },
+            items:[{
+                xtype:'panel',
+                layout:'hbox',
+                items:[{
+                    belong:'form',
+                    dbfinds:[{
+                        from:'cr_name',to:'defaultCurrency'
+                    }],
+                    margin:'0 10 0 0',
+                    labelWidth:60,
+                    allowBlank:false,
+                    xtype : "currencyDbfindTrigger", 
+                    name : "defaultCurrency",
+                    fieldLabel : "本位币", 
+                    beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
+                    onAddClick: function() {
+                        var me=this;
+                        var tab = me.ownerCt;
+                        // this.isEdit = !!record;
+                        this.dialog = tab.add({
+                            xtype: 'document-currencys-addwindow',
+                            _parent:this,
+                            session: true
+                        });
+                        this.dialog.show();
+                    }
+                },{
+                    margin:'0 0 0 5',
+                    xtype:'button',
+                    text:'确认',
+                    handler:function(b){
+                        var v = b.ownerCt.down('[name=defaultCurrency]').value;
+                        if(!v||v==''||v==null){
+                            saas.util.BaseUtil.showErrorToast('请选择币别');
+                            return;
+                        }
+                        saas.util.BaseUtil.showConfirm('提示', '确定使用选择的币别: '+v+' 作为本位币吗(无法修改)?')
+                        .then(function(yes) {
+                            if(yes == 'yes') {
+                                var formData = [];
+                                formData.push({
+                                    code:'defaultCurrency',
+                                    data:v
+                                })
+                                saas.util.BaseUtil.request({
+                                    url: '/api/commons/configs/update',
+                                    params: JSON.stringify(formData),
+                                    method: 'POST',
+                                })
+                                .then(function(localJson) {
+                                    if(localJson.success){
+                                        saas.util.BaseUtil.showSuccessToast('本位币设置成功');
+                                        Ext.getCmp('x-defaultcurrency').close();
+                                    }
+                                })
+                                .catch(function(res) {
+                                    console.error(res);
+                                    saas.util.BaseUtil.showErrorToast('本位币设置失败: ' + res.message);
+                                });
+                            }else {
+                                throw new Error();
+                            }
+                        })
+                    }
+                }]
+            }]
+        });
+        win.show();
+    }
 });

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

@@ -101,6 +101,7 @@ Ext.define('saas.view.main.MainController', {
                 draggable: false,
                 resizable: false,
                 id:"feedbackWin",
+                cls: 'x-window-dbfind',
                 height: 343,
                 width: 756,
                 title: '意见反馈',

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

@@ -71,7 +71,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 xtype: "numberfield",
                 name: "or_rate",
                 fieldLabel: "汇率",
-                defaultValue: '1',
+                defaultValue: 1,
                 decimalPrecision: 6,
                 vtype: 'positiveNumber'
             }, {

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

@@ -65,6 +65,7 @@ Ext.define('saas.view.money.report.OtherIODetail', {
 
     reportColumns: [{
         text: '日期',
+        xtype: 'datecolumn',
         dataIndex: 'bl_date',
         width: 110
     }, {

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

@@ -62,9 +62,9 @@ Ext.define('saas.view.sys.baseconfig.FormPanel', {
         fieldLabel : "库存计算方式", 
         allowBlank : false, 
     },{
-        bind:'{currency}',
+        bind:'{defaultCurrency}',
         xtype : "textfield", 
-        name : "currency",
+        name : "defaultCurrency",
         fieldLabel : "本位币", 
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         readOnly:true,

+ 8 - 5
frontend/saas-web/app/view/sys/feedback/FormPanel.js

@@ -29,29 +29,31 @@ Ext.define('saas.view.sys.feedback.FormPanel', {
             bind: '{account.id}'
         }, {
             xtype : "textfield", 
-            name : "fb_name", 
+            name : "name", 
             fieldLabel : "姓名",
             readOnly:true,
             bind: '{account.realname}'
         }, {
             xtype : "textfield", 
-            name : "fb_mobile", 
+            name : "mobile", 
             fieldLabel : "手机号",
             // regex:/^1(3|4|5|7|8|9)\d{9}$/,
             // regexText:'请输入正确的手机号码',
             bind: '{account.mobile}'
         }, {
             xtype : "textfield", 
-            name : "fb_QQ", 
+            name : "qq", 
             fieldLabel : "QQ"
         }, {
             xtype : "textfield", 
-            name : "fb_wechat", 
+            name : "wechat", 
             fieldLabel : "微信"
         }, {
             xtype : "textareafield", 
-            name : "fb_msg", 
+            name : "content", 
             fieldLabel : "反馈内容",
+            allowBlank: false,
+            beforeLabelTextTpl: "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
             columnWidth: 1,
             height: 63,
             maxHeight: 63
@@ -60,6 +62,7 @@ Ext.define('saas.view.sys.feedback.FormPanel', {
         me.buttons = [{
             text: '提交',
             margin: '0 20 0 20',
+            formBind: true,
             handler:'onSubmit'
         },{
             text: '关闭',

+ 0 - 47
frontend/saas-web/app/view/sys/feedback/FormPanel.scss

@@ -1,47 +0,0 @@
-#feedbackWin {
-    border: none;
-    border-radius: 4px;
-
-    .x-window-header {
-        padding: 30px 45px 20px 45px;
-        background: #fff;
-        border: none;
-
-        .x-window-header-title-default {
-            .x-title-text {
-                color: #34BAF6;
-                font-size: 16px;
-                font-weight: 500;
-                letter-spacing: 1.8px;
-                padding-left: 10px;
-
-                &:before {
-                    content: ' ';
-                    position: absolute;
-                    width: 5px;
-                    height: 16px;
-                    background: #34baf6;
-                    left: 0;
-                    top: 2px;
-                    border-radius: 4px;
-                }
-            }
-        }
-
-        .x-tool-default {
-            
-            .x-tool-close {
-                color:  #34BAF6;
-            }
-        }
-    }
-
-    .x-window-bodyWrap {
-        
-        .x-toolbar-footer {
-            padding: 0;
-            top: 210px !important;
-            background: #fff;
-        }
-    }
-}

+ 24 - 2
frontend/saas-web/app/view/sys/feedback/FormPanelController.js

@@ -7,8 +7,30 @@ Ext.define('saas.view.sys.feedback.FormPanelController', {
         });
     },
     onSubmit:function(){
-        saas.util.BaseUtil.showSuccessToast('提交成功!');
-        Ext.destroy(Ext.getCmp("feedbackWin"));
+        let form = this.getView(),
+        values = form.getValues(),
+        name = values.name,
+        content = values.content,
+        qq = values.qq,
+        wechat = values.wechat,
+        mobile = values.mobile;
+
+        saas.util.BaseUtil.request({
+            url: '/api/operation/customerFeedBack/save',
+            params: JSON.stringify({
+                cf_content: content,
+                cf_name: name,
+                cf_qq: qq,
+                cf_wechat: wechat,
+                cf_mobile: mobile
+            }),
+            method: 'POST'
+        }).then(function(res) {
+            saas.util.BaseUtil.showSuccessToast('提交成功!');
+            Ext.destroy(Ext.getCmp("feedbackWin"));
+        }).catch(function(e) {
+            saas.util.BaseUtil.showErrorToast('提交失败: ' + e.message);
+        });
     },
     onClose:function(){
         Ext.destroy(Ext.getCmp("feedbackWin"));