Browse Source

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

rainco 7 years ago
parent
commit
c6dbf84d21
20 changed files with 185 additions and 87 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 4 3
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ExcelController.java
  3. 1 2
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/ExcelService.java
  4. 7 2
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ExcelServiceImpl.java
  5. 8 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  6. 1 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  7. 7 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  8. 14 3
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/RoleController.java
  9. 7 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleMapper.java
  10. 7 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/RoleService.java
  11. 10 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/RoleServiceImpl.java
  12. 3 0
      base-servers/account/account-server/src/main/resources/mapper/RoleMapper.xml
  13. 1 0
      framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java
  14. 8 9
      frontend/saas-portal-web/src/components/conenter/enterprise.vue
  15. 80 51
      frontend/saas-web/app/view/core/form/MseeageLog.js
  16. 8 6
      frontend/saas-web/app/view/home/charts/MonthSale.js
  17. 1 1
      frontend/saas-web/app/view/main/Main.js
  18. 5 2
      frontend/saas-web/app/view/main/MainController.js
  19. 7 1
      frontend/saas-web/app/view/sys/invitation/DataList.js
  20. 5 0
      frontend/saas-web/overrides/form/field/Base.js

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

@@ -39,6 +39,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_NULLCALLER(79315, "该单据的定义不存在"),
     BIZ_REPORT_NOCALLER(79316, "报表配置不存在"),
     BIZ_REPORT_NOTCORRECT(79317, "导入数据无效"),
+    BIZ_IMPORT_ERROREXCEL(79318, "请导入对应的单据数据"),
 
     NO_OPRATIONDATA(79400,"无可操作单据"),
     NULL_DATA(23232,"无数据"),

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

@@ -55,6 +55,7 @@ public class ExcelController {
         } else {
             excelService.clearBefore(caller);
             String ft = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1);
+            String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf("."));
             is = file.getInputStream();
             if (ft.equals("xlsx")) {
                 wb = new XSSFWorkbook(is);
@@ -64,12 +65,12 @@ public class ExcelController {
                 return Result.error(new String("{error: 'excel文件的格式不太规范,导入失败<hr>可以尝试将文件另存为.xls文件,或将数据选择性粘贴到excel模板,然后导入'}".getBytes("utf-8"),
                         "iso8859-1"));
             }
-            keyvalue = excelService.parseTemplet(wb, caller);
+            keyvalue = excelService.parseTemplet(wb, caller, fileName);
         }
         return Result.success(keyvalue);
     }
 
-    @RequestMapping(value = "/test")
+   /* @RequestMapping(value = "/test")
     public Result ParseTemplet(String caller) throws IOException {
         InputStream is = null;
         Workbook wb = null;
@@ -78,6 +79,6 @@ public class ExcelController {
         wb = new XSSFWorkbook(is);
         excelService.parseTemplet(wb, caller);
         return Result.success();
-    }
+    }*/
 
 }

+ 1 - 2
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/ExcelService.java

@@ -1,7 +1,6 @@
 package com.usoftchina.saas.commons.service;
 
 import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.xssf.streaming.SXSSFWorkbook;
 
 import java.util.Map;
 
@@ -10,5 +9,5 @@ public interface ExcelService {
 
     void clearBefore(String caller);
 
-    Integer parseTemplet(Workbook wb, String caller);
+    Integer parseTemplet(Workbook wb, String caller, String title);
 }

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

@@ -78,7 +78,7 @@ public class ExcelServiceImpl implements ExcelService{
 
     @Override
     @Transactional
-    public Integer parseTemplet(Workbook wb, String caller) {
+    public Integer parseTemplet(Workbook wb, String caller, String fileName) {
         if (wb == null || StringUtils.isEmpty(caller)) {
             throw new BizException(BizExceptionCode.NULL_DATA);
         }
@@ -96,6 +96,11 @@ public class ExcelServiceImpl implements ExcelService{
         if (StringUtils.isEmpty(cols)) {
             throw new BizException(12135, "没有查询到对应的excel配置");
         }
+        //验证标题是否正确
+        String title = dataTemplet.getDt_title();
+        if (StringUtils.isEmpty(fileName) || fileName.indexOf(title) < 0) {
+            throw new BizException(BizExceptionCode.BIZ_IMPORT_ERROREXCEL);
+        }
         //前端列表信息
         List<TempletSet> templetSets = JSONArray.parseArray(cols, TempletSet.class);
         Map<String, List<TempletSet>> columns = CollectionUtils.groupBy(templetSets, TempletSet::getPosition);
@@ -222,7 +227,7 @@ public class ExcelServiceImpl implements ExcelService{
                        for (TempletSet set : detail) {
                            //取excel值
                            value = data.get(set.getDescription());
-                           if ("true".equals(set.getNecessary()) && value.equals("")) {
+                           if ("true".equals(set.getNecessary()) && StringUtils.isEmpty(value)) {
                                detailData = null;
                                //err.append("第" + (i + 3) + "行 " + set.getDescription() + " 必填字段未填写!<br/> ");
                                break;

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

@@ -303,8 +303,8 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         getMapper().updateByPrimaryKeySelective(customer);
 
         //插入中间表
-        Double amount = (customer.getCu_beginaramount() == null ? new Double(0) : customer.getCu_beginaramount())
-                - (customer.getCu_beginprerecamount() == null ? new Double(0) : customer.getCu_beginprerecamount());
+        Double amount = (main.getCu_beginaramount() == null ? new Double(0) : main.getCu_beginaramount())
+                - (main.getCu_beginprerecamount() == null ? new Double(0) : main.getCu_beginprerecamount());
         Subledger subledger = new Subledger();
         subledger.setSl_code("期初余额");
         subledger.setSl_kind("期初余额");
@@ -318,11 +318,15 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         subledger.setCreatorName(BaseContextHolder.getUserName());
         if (amount > new Double(0)){
             subledger.setSl_amount(amount);
+            subledger.setSl_preamount(new Double(0));
         }else {
-            subledger.setSl_preamount(amount);
+            subledger.setSl_amount(new Double(0));
+            subledger.setSl_preamount(Math.abs(amount));
         }
         subledger.setSl_orderamount(Math.abs(amount));
-        subledger.setSl_namount(Math.abs(amount));
+        subledger.setSl_namount((subledger.getSl_orderamount() == null ? new Double(0) : subledger.getSl_orderamount()) +
+                (subledger.getSl_discount() == null ? new Double(0) : subledger.getSl_discount()) -
+                (subledger.getSl_yamount() == null ? new Double(0) : subledger.getSl_yamount()));
 
         Long sl_id  = subledgerMapper.selectByKindCodeCustid("期初余额","期初余额",
                 Math.toIntExact(customer.getId()),BaseContextHolder.getCompanyId(),YM);

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

@@ -693,6 +693,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
                                     break;
                                 }
                                 detail.setPd_whid(Integer.valueOf(warehouse.getId().toString()));
+                                detail.setPd_whname(warehouse.getWh_description());
                                 detail.setPd_detno(detno);
                                 detno++;
                             }

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

@@ -279,12 +279,16 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
         subledger.setSl_date(DateUtils.getFirstDay(main.getVe_begindate()));
         subledger.setSl_ym(DateUtils.getYm(main.getVe_begindate()));
         if (amount > new Double(0)){
-            subledger.setSl_amount(amount);
+            subledger.setSl_preamount(new Double(0));
+            subledger.setSl_amount(Math.abs(amount));
         }else {
-            subledger.setSl_preamount(amount);
+            subledger.setSl_amount(new Double(0));
+            subledger.setSl_preamount(Math.abs(amount));
         }
         subledger.setSl_orderamount(Math.abs(amount));
-        subledger.setSl_namount(Math.abs(amount));
+        subledger.setSl_namount((subledger.getSl_orderamount() == null ? new Double(0) : subledger.getSl_orderamount()) +
+                (subledger.getSl_discount() == null ? new Double(0) : subledger.getSl_discount()) -
+                (subledger.getSl_yamount() == null ? new Double(0) : subledger.getSl_yamount()));
         subledger.setCreateTime(new Date());
         subledger.setCreatorId(BaseContextHolder.getUserId());
         subledger.setCreatorName(BaseContextHolder.getUserName());

+ 14 - 3
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/RoleController.java

@@ -5,6 +5,7 @@ import com.usoftchina.saas.account.dto.PowerSetListDTO;
 import com.usoftchina.saas.account.dto.RoleDTO;
 import com.usoftchina.saas.account.dto.RoleSaveDTO;
 import com.usoftchina.saas.account.dto.RoleUpdateDTO;
+import com.usoftchina.saas.account.mapper.RoleResourceMapper;
 import com.usoftchina.saas.account.po.Account;
 import com.usoftchina.saas.account.po.Role;
 import com.usoftchina.saas.account.service.AccountService;
@@ -34,6 +35,9 @@ public class RoleController {
     @Autowired
     private AccountService accountService;
 
+    @Autowired
+    private RoleResourceMapper roleResourceMapper;
+
     /**
      * 保存
      *
@@ -69,9 +73,16 @@ public class RoleController {
      */
     @PostMapping("/delete/{id}")
     public Result delete(@PathVariable Long id) {
-        clearAccountCacheByRoleId(id);
-        roleService.removeByPrimaryKey(id);
-        return Result.success();
+        boolean valid = roleService.valid(id);
+        if (valid) {
+            clearAccountCacheByRoleId(id);
+            //解除 角色-资源 绑定关系
+            roleResourceMapper.deleteByRoleId(id);
+            //删除 角色
+            roleService.removeByPrimaryKey(id);
+            return Result.success();
+        }
+        return Result.error(ExceptionCode.ROLE_HAS_USE);
     }
 
     /**

+ 7 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleMapper.java

@@ -26,4 +26,11 @@ public interface RoleMapper extends CommonBaseMapper<Role> {
      * @return
      */
     Role findManagerByCompanyId(@Param("companyId") Long companyId);
+
+    /**
+     * 查询角色绑定的用户数量
+     * @param id
+     * @return
+     */
+    int selectAccountCountById(Long id);
 }

+ 7 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/RoleService.java

@@ -59,4 +59,11 @@ public interface RoleService extends CommonBaseService<RoleMapper, Role> {
      * @return
      */
     Role findManagerByCompanyId(Long companyId);
+
+    /**
+     * 删除前校验
+     * @param id
+     * @return
+     */
+    boolean valid(Long id);
 }

+ 10 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/RoleServiceImpl.java

@@ -171,6 +171,16 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
         return getMapper().findManagerByCompanyId(companyId);
     }
 
+    @Override
+    public boolean valid(Long id) {
+        int count = getMapper().selectAccountCountById(id);
+        if (count > 0) {
+            return false;
+        }else {
+            return true;
+        }
+    }
+
     /**
      * 设置其他默认权限,用于生成设置按钮
      * @param powerDTO

+ 3 - 0
base-servers/account/account-server/src/main/resources/mapper/RoleMapper.xml

@@ -107,4 +107,7 @@
     <select id="findManagerByCompanyId" resultType="com.usoftchina.saas.account.po.Role">
         SELECT * FROM AC_ROLE WHERE COMPANY_ID = #{companyId} AND TYPE = 0 limit 1
     </select>
+    <select id="selectAccountCountById" parameterType="java.lang.Long" resultType="java.lang.Integer">
+        SELECT COUNT(*) FROM AC_ACCOUNT_ROLE WHERE ROLE_ID = #{id}
+    </select>
 </mapper>

+ 1 - 0
framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java

@@ -46,6 +46,7 @@ public enum ExceptionCode implements BaseExceptionCode {
     ROLE_NOT_EXIST(53020, "角色不存在"),
     MISSING_PERMISSIONS(53030, "权限缺失"),
     USER_COMPANY_EXIST(53007, "企业已存在账户"),
+    ROLE_HAS_USE(54030, "存在已使用该角色的账户,不允许删除"),
 
     // 文件相关
     FOLDER_NOT_EXISTS(55000, "文件夹不存在"),

+ 8 - 9
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -200,14 +200,13 @@ import { setTimeout } from 'timers';
             tabswitch(index){
                 if (index == 3) {
                     this.nowindex = 3;
-                let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
-                let id = mytoken.account.id;
-                // tab切换到消息的时候执行
-                let param = [{
-                    type:'condition',
-                    value:'creatorId='+id+''
-                }]
-                
+                    let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
+                    let id = mytoken.account.id;
+                    // tab切换到消息的时候执行
+                    let param = {
+                        type:'condition',
+                        value:'creatorId='+id+''
+                    }
                     this.$ajax({
                         url:'http://192.168.253.41:8560/api/commons/remind/apply/list',
                         method:'GET',
@@ -231,7 +230,7 @@ import { setTimeout } from 'timers';
                 
             },
             setTurnHome(){
-                debugger
+                // debugger
                 this.$parent.turnHome = true
             },
             //退出

+ 80 - 51
frontend/saas-web/app/view/core/form/MseeageLog.js

@@ -10,25 +10,28 @@ Ext.define('saas.view.core.form.MseeageLog', {
         width: 150,
         name: 'ml_man',
         xtype: 'textfield',
-        emptyText : '操作人员'
+        emptyText : '操作人员',
+        enableKeyEvents: true,
+        listeners: {
+            keydown: {
+                fn: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        var grid = th.up('core-form-mseeageLog');
+                        grid.condition = grid.getConditions();
+                        grid.store.loadPage(1);
+                    }
+                }
+            }
+        }
     },{
         cls:'x-formpanel-btn-blue',
         xtype:'button',
         text:'查询',
+        margin: '0 0 0 10',
         listeners: {
             click:function(b){
-                var grid = b.ownerCt.ownerCt;
-                var tbar = b.ownerCt;
-                grid.condition = '';
-                var items = [];
-                var fields = tbar.items.items.map(f => f.name);
-                Ext.each(fields, function(f, index){
-                    var field = tbar.down('[name='+f+']');
-                    if(field){
-                        items.push(field);
-                    }
-                });
-                grid.condition = grid.getCondition(items);
+                var grid = b.up('core-form-mseeageLog');
+                grid.condition = grid.getConditions();
                 grid.store.loadPage(1);
             }
         }
@@ -37,16 +40,16 @@ Ext.define('saas.view.core.form.MseeageLog', {
     //字段属性
     columns : [{
         text : "id", 
-        width : 0, 
+        hidden: true, 
         dataIndex : "id", 
         xtype : "numbercolumn",   
     },{
         text:'单据类型',
         dataIndex : "ml_name",
-        width : 0, 
+        hidden: true
     },{
         text : "单据编号", 
-        width : 0, 
+        hidden: true,
         dataIndex : "ml_code"
     },{
         xtype:'datecolumn',
@@ -132,11 +135,13 @@ Ext.define('saas.view.core.form.MseeageLog', {
         me.callParent(arguments);
     },
 
-     /**
+    /**
      * 获得过滤条件
      */
-    getCondition: function(items) {
+    getConditions: function() {
         var me = this,
+        tbar = me.getDockedItems()[0],
+        items = tbar.items.items,
         conditions = [{
             type: 'number',
             field: 'ml_keyvalue',
@@ -162,10 +167,9 @@ Ext.define('saas.view.core.form.MseeageLog', {
                         value: func(value)
                     }
                 }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
+                    var type = item.fieldType || me.getDefaultFieldType(item),
+                    operation = item.operation || me.getDefaultFieldOperation(item),
+                    conditionValue = me.getConditionValue(item, value);
         
                     if(!conditionValue) {
                         continue;
@@ -179,38 +183,58 @@ Ext.define('saas.view.core.form.MseeageLog', {
                 }
                 conditions.push(condition);
             }
-        };
+        }
+
         return conditions;
     },
 
-    getDefaultFieldType: function(xtype) {
-        var type;
+    /**
+     * 只要arr1和arr2中存在相同项即返回真
+     */
+    isContainsAny: function (arr1, arr2) {
+        for (var i = 0; i < arr2.length; i++) {
+            var a2 = arr2[i];
+            if (!!arr1.find(function (a1) {
+                    return a1 == a2
+                })) {
+                return true;
+            }
+        }
+        return false;
+    },
+
+    getDefaultFieldType: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            type;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield'])) {
             type = 'number';
-        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['datefield', 'condatefield', 'conmonthfield'])) {
             type = 'date';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            type = 'enum';
+        } else if (me.isContainsAny(xtypes, ['combobox', 'multicombo', 'combo', 'radiofield', 'radio'])) {
             type = 'enum';
-        }else {
+        } else {
             type = 'string';
         }
 
         return type;
     },
 
-    getDefaultFieldOperation: function(xtype) {
-        var operation;
+    getDefaultFieldOperation: function (field) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            operation;
 
-        if(Ext.Array.contains(['numberfield'], xtype)) {
+        if (me.isContainsAny(xtypes, ['numberfield', 'datefield', 'dbfindtrigger'])) {
             operation = '=';
-        }else if(Ext.Array.contains(['datefield'], xtype)) {
-            operation = '=';
-        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['condatefield', 'conmonthfield'])) {
             operation = 'between';
-        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+        } else if (me.isContainsAny(xtypes, ['multidbfindtrigger', 'combobox', 'multicombo', 'combo'])) {
             operation = 'in';
-        }else {
+        } else {
             operation = 'like';
         }
 
@@ -220,30 +244,35 @@ Ext.define('saas.view.core.form.MseeageLog', {
     /**
      * 处理部分字段值
      */
-    getConditionValue: function(xtype, value) {
-        var conditionValue;
-        if(xtype == 'datefield') {
+    getConditionValue: function (field, value) {
+        var me = this,
+            xtypes = field.getXTypes().split('/'),
+            conditionValue;
+        if (me.isContainsAny(xtypes, ['datefield'])) {
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        }else if(xtype == 'condatefield') {
+        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
+            var from = value.from,
+                to = value.to;
+
+            conditionValue = from + ',' + to;
+        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
             var from = value.from,
-            to = value.to;
+                to = value.to;
 
             conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        }else if(xtype == 'combobox' || xtype == 'combo') {
+        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
+            conditionValue = value;
+        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
             conditionValue = '\'' + value + '\'';
-        }else if(xtype == 'multicombo') {
-            conditionValue = value.map(function(v) {
+        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
+            conditionValue = value.map ? value.map(function (v) {
                 return '\'' + v.value + '\'';
-            }).join(',');
-        }else {
+            }).join(',') : '';
+        } else {
             conditionValue = value;
         }
 
         return conditionValue;
     },
 
-    refresh:function(){
-        //debugger
-    }
-
 });

+ 8 - 6
frontend/saas-web/app/view/home/charts/MonthSale.js

@@ -31,11 +31,13 @@ Ext.define('saas.view.home.charts.MonthSale', {
 
         store.each(function(d) {
             var d = d.data;
-            fields.push(d.x);
-            data.push({
-                value: d.y,
-                name: d.x
-            });
+            if(d.y > 0) {
+                fields.push(d.x);
+                data.push({
+                    value: d.y,
+                    name: d.x
+                });
+            }
         });
 
         return {
@@ -64,7 +66,7 @@ Ext.define('saas.view.home.charts.MonthSale', {
                 }
             },
             legend: {
-                orient: 'horizontal',
+                orient: 'vertical',
                 left: '70%',
                 width: '30%',
                 icon: 'circle',

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

@@ -134,7 +134,7 @@ Ext.define('saas.view.main.Main', {
                                 if(rolesMap&&rolesMap.length>0){
                                     for(var i = 0; i < rolesMap.length; i++) {
                                         if(rolesMap[i].type==0){
-                                             main.getController().loadInvitationMsg(1)
+                                             main.getController().loadInvitationMsg(1,nowCompanyId)
                                         }
                                      }
                                 }

+ 5 - 2
frontend/saas-web/app/view/main/MainController.js

@@ -117,13 +117,16 @@ Ext.define('saas.view.main.MainController', {
         win.show();
     },
 
-    loadInvitationMsg: function(count) {
+    loadInvitationMsg: function(count,nowCompanyId) {
         var me = this.view;//视图层
         var hasInvitationMsg = false;
         //查询后台
         var param = [{
             type:'condition',
             value:"re_status=2"
+        },{
+            type:'condition',
+            value:"companyId="+nowCompanyId
         }]
         Ext.Ajax.request({  
             url :'/api/commons/remind/apply/list',
@@ -162,7 +165,7 @@ Ext.define('saas.view.main.MainController', {
             }, 300);
         }
         setTimeout(function() {
-            me.getController().loadInvitationMsg(count+1);
+            me.getController().loadInvitationMsg(count+1,nowCompanyId);
         }, 8000);
     },
 

+ 7 - 1
frontend/saas-web/app/view/sys/invitation/DataList.js

@@ -208,8 +208,14 @@ Ext.define('saas.view.sys.invitation.DataList', {
                     beforeload: function (store, op) {
                         var condition = me.condition;
                         if (Ext.isEmpty(condition)) {
-                            condition = '';
+                            condition = [];
                         }
+                        var _localStorage = Ext.decode(localStorage.getItem('app-state-session'));
+                        var nowCompanyId = _localStorage.account.companyId;
+                        condition.push({
+                            type:'condition',
+                            value:"companyId="+nowCompanyId
+                        });
                         Ext.apply(store.proxy.extraParams, {
                             number: op._page,
                             size: store.pageSize,

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

@@ -0,0 +1,5 @@
+Ext.define('saas.override.form.field.Base', {
+    override: 'Ext.form.field.Base',
+    
+    msgTarget: 'side'
+});