Просмотр исходного кода

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

zhoudw 7 лет назад
Родитель
Сommit
0118a6e922
91 измененных файлов с 2342 добавлено и 208 удалено
  1. 16 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonController.java
  2. 6 6
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java
  3. 1 1
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  4. 1 1
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  5. 8 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  6. 8 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  7. 44 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetDTO.java
  8. 25 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetListDTO.java
  9. 13 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/RoleController.java
  10. 9 3
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleResourceMapper.java
  11. 9 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/OtherPower.java
  12. 19 9
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/RoleResource.java
  13. 8 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/RoleService.java
  14. 52 9
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/RoleServiceImpl.java
  15. 13 2
      base-servers/account/account-server/src/main/resources/mapper/RoleResourceMapper.xml
  16. 89 1
      base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java
  17. 1 1
      base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java
  18. 12 0
      frontend/saas-web/app/model/chart/DataXY.js
  19. 21 0
      frontend/saas-web/app/model/chart/MultiDataXY.js
  20. 0 2
      frontend/saas-web/app/view/auth/LoginController.js
  21. 89 0
      frontend/saas-web/app/view/core/chart/Area.js
  22. 67 0
      frontend/saas-web/app/view/core/chart/Bar.js
  23. 22 0
      frontend/saas-web/app/view/core/chart/ChartBase.js
  24. 38 0
      frontend/saas-web/app/view/core/chart/Gauge.js
  25. 75 0
      frontend/saas-web/app/view/core/chart/Line.js
  26. 55 0
      frontend/saas-web/app/view/core/chart/Pie.js
  27. 42 0
      frontend/saas-web/app/view/core/chart/Pie3D.js
  28. 55 0
      frontend/saas-web/app/view/core/chart/Polar.js
  29. 71 0
      frontend/saas-web/app/view/core/chart/Stacked.js
  30. 28 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  31. 233 0
      frontend/saas-web/app/view/core/form/MseeageLog.js
  32. 1 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  33. 5 2
      frontend/saas-web/app/view/document/kind/ChildForm.js
  34. 403 0
      frontend/saas-web/app/view/home/ChartsModel.js
  35. 123 74
      frontend/saas-web/app/view/home/Home.js
  36. 30 0
      frontend/saas-web/app/view/home/Home.scss
  37. 8 0
      frontend/saas-web/app/view/home/HomeController.js
  38. 128 0
      frontend/saas-web/app/view/home/InfoCard.js
  39. 88 0
      frontend/saas-web/app/view/home/InfoCard.scss
  40. 87 10
      frontend/saas-web/app/view/main/Main.js
  41. 44 3
      frontend/saas-web/app/view/main/Main.scss
  42. 4 4
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  43. 2 2
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  44. 1 1
      frontend/saas-web/app/view/money/report/AccountBalance.js
  45. 1 1
      frontend/saas-web/app/view/money/report/PayDetail.js
  46. 1 1
      frontend/saas-web/app/view/money/report/RecDetail.js
  47. 13 8
      frontend/saas-web/app/view/money/report/VendorCheck.js
  48. 10 6
      frontend/saas-web/app/view/stock/report/ProdinoutCount.js
  49. 83 0
      frontend/saas-web/app/view/sys/guide/FormPanel.js
  50. 1 0
      frontend/saas-web/app/view/sys/power/FormPanel.js
  51. 115 43
      frontend/saas-web/app/view/sys/power/FormPanelController.js
  52. 16 1
      frontend/saas-web/app/view/sys/power/GroupGrid.js
  53. 21 1
      frontend/saas-web/app/view/sys/power/OtherField.js
  54. 4 2
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/dataview/Abstract.js
  55. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/dataview/EmptyText.js
  56. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/dataview/List.js
  57. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/dataview/plugin/ListPaging.js
  58. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/FileButton.js
  59. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/grid/menu/GroupByThis.js
  60. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/grid/menu/ShowInGroups.js
  61. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/panel/Collapser.js
  62. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/panel/Date.js
  63. 1 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/picker/Picker.js
  64. BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.eot
  65. 0 0
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.js
  66. 0 0
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.svg
  67. BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.ttf
  68. BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.woff
  69. 9 3
      frontend/saas-web/packages/font-saas/sass/etc/icons.scss
  70. BIN
      frontend/saas-web/resources/images/default/arrows-left.png
  71. BIN
      frontend/saas-web/resources/images/default/arrows-right.png
  72. BIN
      frontend/saas-web/resources/images/guide/1.png
  73. BIN
      frontend/saas-web/resources/images/guide/2.png
  74. BIN
      frontend/saas-web/resources/images/guide/3.png
  75. BIN
      frontend/saas-web/resources/images/guide/4.png
  76. BIN
      frontend/saas-web/resources/images/guide/5.png
  77. BIN
      frontend/saas-web/resources/images/guide/6.png
  78. BIN
      frontend/saas-web/resources/images/guide/background.png
  79. BIN
      frontend/saas-web/resources/images/guide/baseSet.png
  80. BIN
      frontend/saas-web/resources/images/guide/begin.png
  81. BIN
      frontend/saas-web/resources/images/guide/customer.png
  82. BIN
      frontend/saas-web/resources/images/guide/point.png
  83. BIN
      frontend/saas-web/resources/images/guide/product.png
  84. BIN
      frontend/saas-web/resources/images/guide/vendor.png
  85. BIN
      frontend/saas-web/resources/images/guide/warehouse.png
  86. BIN
      frontend/saas-web/resources/images/nav/accountCenter.png
  87. BIN
      frontend/saas-web/resources/images/nav/feedback.png
  88. BIN
      frontend/saas-web/resources/images/nav/serviceOnline.png
  89. BIN
      frontend/saas-web/resources/images/nav/userBook.png
  90. BIN
      frontend/saas-web/resources/images/nav/userGuite.png
  91. 5 0
      frontend/saas-web/resources/json/navigation.json

+ 16 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonController.java

@@ -0,0 +1,16 @@
+package com.usoftchina.saas.commons.controller;
+
+import com.usoftchina.saas.base.Result;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class CommonController {
+
+    @RequestMapping("/{caller}/export")
+    public Result export(@PathVariable("caller") String caller){
+        return Result.success();
+    }
+
+}

+ 6 - 6
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java

@@ -35,11 +35,11 @@ public class Vendor extends CommonBaseEntity implements Serializable{
     /**
      * 期初应付
      */
-    private double ve_beginapamount;
+    private Double ve_beginapamount;
     /**
      * 期初预付
      */
-    private double ve_beginprepayamount;
+    private Double ve_beginprepayamount;
     /**
      * 承付天数
      */
@@ -173,19 +173,19 @@ public class Vendor extends CommonBaseEntity implements Serializable{
         this.ve_begindate = ve_begindate;
     }
 
-    public double getVe_beginapamount() {
+    public Double getVe_beginapamount() {
         return ve_beginapamount;
     }
 
-    public void setVe_beginapamount(double ve_beginapamount) {
+    public void setVe_beginapamount(Double ve_beginapamount) {
         this.ve_beginapamount = ve_beginapamount;
     }
 
-    public double getVe_beginprepayamount() {
+    public Double getVe_beginprepayamount() {
         return ve_beginprepayamount;
     }
 
-    public void setVe_beginprepayamount(double ve_beginprepayamount) {
+    public void setVe_beginprepayamount(Double ve_beginprepayamount) {
         this.ve_beginprepayamount = ve_beginprepayamount;
     }
 

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

@@ -130,7 +130,7 @@
   </select>
 
   <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
-    SELECT PB_NAME display,PB_NAME value FROM PRODUCTBRAND
+    SELECT PB_NAME display,PB_NAME value FROM PRODUCTBRAND WHERE COMPANYID=#{companyId}
   </select>
   <select id="selectCountByName" resultType="int">
     SELECT COUNT(*) FROM PRODUCTBRAND

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

@@ -101,7 +101,7 @@
             </if>
             AND VENDOR.COMPANYID = #{companyId}
         </where>
-        order by VE_ID,VC_DETNO DESC
+        order by VE_ID DESC
     </select>
 
     <sql id="Base_Column_List" >

+ 8 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -222,6 +222,13 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         vendor.setVe_payamount(payamount-amountTotal2);
         vendor.setVe_leftamount(beginapamount-beginprepayamount+payamount-amountTotal2-preamount-amountTotal);
         paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
+
+        for (Paybalancedetail detail:paybalancedetail) {
+            Subledger subledger1 = new Subledger();
+            subledger1.setId(Long.valueOf(String.valueOf(detail.getPbd_slid())));
+            subledger1.setSl_yamount(detail.getPbd_nowbalance()+detail.getPbd_amount());
+            subledgerMapper.updateByPrimaryKeySelective(subledger1);
+        }
     }
 
     @Override
@@ -290,7 +297,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
 
     public Pay select(int id){
         Pay pay = new Pay();
-        pay.setMain(paybalanceMapper.selectByPrimaryKey(id));
+        pay.setMain(paybalanceMapper.selectByPrimaryKey(Long.valueOf(id)));
         pay.setItems1(paybalancedetMapper.selectByPrimaryKey(id));
         pay.setItems2(paybalancedetailMapper.selectByPrimaryKey(id));
         return pay;

+ 8 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java

@@ -248,6 +248,14 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         customer.setCu_recamount(recamount-amountTotal2);
         customer.setCu_leftamount(beginapamount-beginprepayamount+recamount-amountTotal2-preamount-amountTotal);
         recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
+
+        //更新本次核销金额
+        for (Recbalancedetail detail:recbalancedetail) {
+            Subledger subledger1 = new Subledger();
+            subledger1.setId(Long.valueOf(String.valueOf(detail.getRbd_slid())));
+            subledger1.setSl_yamount(detail.getRbd_nowbalance() - detail.getRbd_amount());
+            subledgerMapper.updateByPrimaryKeySelective(subledger1);
+        }
     }
 
     @Override

+ 44 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetDTO.java

@@ -0,0 +1,44 @@
+package com.usoftchina.saas.account.dto;
+
+import java.io.Serializable;
+
+public class PowerSetDTO implements Serializable {
+
+    private Long groupId;
+    private String classify;
+    private Long resourceId;
+    private boolean checked;
+
+    public Long getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Long groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getClassify() {
+        return classify;
+    }
+
+    public void setClassify(String classify) {
+        this.classify = classify;
+    }
+
+    public Long getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(Long resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    public boolean isChecked() {
+        return checked;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+
+}

+ 25 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetListDTO.java

@@ -0,0 +1,25 @@
+package com.usoftchina.saas.account.dto;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class PowerSetListDTO implements Serializable {
+    private Long roleId;
+    private List<PowerSetDTO> powerSetList;
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
+
+    public List<PowerSetDTO> getPowerSetList() {
+        return powerSetList;
+    }
+
+    public void setPowerSetList(List<PowerSetDTO> powerSetList) {
+        this.powerSetList = powerSetList;
+    }
+}

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

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.account.controller;
 
 import com.usoftchina.saas.account.cache.AccountCache;
+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;
@@ -116,6 +117,13 @@ public class RoleController {
         return Result.success();
     }
 
+    @PostMapping("/save/bind/resource")
+    public Result updateResource(@RequestBody PowerSetListDTO powerSetListDTO){
+        roleService.saveRoleResource(powerSetListDTO);
+        clearAccountCacheByRoleId(powerSetListDTO.getRoleId());
+        return Result.success();
+    }
+
     /**
      * 角色解除绑定资源
      *
@@ -130,6 +138,11 @@ public class RoleController {
         return Result.success();
     }
 
+    /**
+     * 获取所有资源 + 角色资源 绑定状态
+     * @param id
+     * @return
+     */
     @GetMapping("/power/resource")
     public Result getResourcePower(Long id){
         return Result.success(roleService.getResourcePowerById(id));

+ 9 - 3
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleResourceMapper.java

@@ -63,9 +63,15 @@ public interface RoleResourceMapper {
     List<Map<String, Object>> selectClassifyByRoleId(@Param("id") Long id);
 
     /**
-     * 通过资源groupId和角色ID查询 角色是否具有改资源的权限
-     * @param roleId
+     * 查询其他权限
+     * @return
+     */
+    List<OtherPower> selectOthersPower();
+
+    /**
+     * 批量插入
+     * @param roleResourceList
      * @return
      */
-    List<OtherPower> selectOthersPower(@Param("roleId") Long roleId);
+    boolean batchInsert(List<RoleResource> roleResourceList);
 }

+ 9 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/OtherPower.java

@@ -8,6 +8,15 @@ public class OtherPower implements Serializable {
     private String name;
     private boolean checked;
     private Long groupId;
+    private Long roleId;
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
 
     public Long getResourceId() {
         return resourceId;

+ 19 - 9
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/RoleResource.java

@@ -9,18 +9,18 @@ import java.io.Serializable;
  * @date 2018/10/2
  */
 public class RoleResource implements Serializable {
-    private long roleId;
+    private Long roleId;
     /**
      * 资源所属应用
      * <p>冗余字段,方便查询</p>
      */
     private String appId;
-    private long resourceId;
+    private Long resourceId;
     /**
      * 角色所属公司
      * <p>冗余字段,方便查询</p>
      */
-    private long companyId;
+    private Long companyId;
 
     public String getAppId() {
         return appId;
@@ -30,27 +30,37 @@ public class RoleResource implements Serializable {
         this.appId = appId;
     }
 
-    public long getCompanyId() {
+    public Long getCompanyId() {
         return companyId;
     }
 
-    public void setCompanyId(long companyId) {
+    public void setCompanyId(Long companyId) {
         this.companyId = companyId;
     }
 
-    public long getRoleId() {
+    public Long getRoleId() {
         return roleId;
     }
 
-    public void setRoleId(long roleId) {
+    public void setRoleId(Long roleId) {
         this.roleId = roleId;
     }
 
-    public long getResourceId() {
+    public Long getResourceId() {
         return resourceId;
     }
 
-    public void setResourceId(long resourceId) {
+    public void setResourceId(Long resourceId) {
         this.resourceId = resourceId;
     }
+
+    public RoleResource(Long roleId, String appId, Long resourceId, Long companyId) {
+        this.roleId = roleId;
+        this.appId = appId;
+        this.resourceId = resourceId;
+        this.companyId = companyId;
+    }
+
+    public RoleResource() {
+    }
 }

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

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.account.service;
 
 import com.usoftchina.saas.account.dto.PowerDTO;
+import com.usoftchina.saas.account.dto.PowerSetListDTO;
 import com.usoftchina.saas.account.dto.RoleBaseDTO;
 import com.usoftchina.saas.account.mapper.RoleMapper;
 import com.usoftchina.saas.account.po.Role;
@@ -44,4 +45,11 @@ public interface RoleService extends CommonBaseService<RoleMapper, Role> {
      * @return
      */
     List<PowerDTO> getResourcePowerById(Long id);
+
+    /**
+     * 保存角色权限
+     * @param powerSetListDTO
+     * @return
+     */
+    boolean saveRoleResource(PowerSetListDTO powerSetListDTO);
 }

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

@@ -1,9 +1,7 @@
 package com.usoftchina.saas.account.service.impl;
 
 import com.usoftchina.saas.account.constant.RoleType;
-import com.usoftchina.saas.account.dto.OtherPowerDTO;
-import com.usoftchina.saas.account.dto.PowerDTO;
-import com.usoftchina.saas.account.dto.RoleBaseDTO;
+import com.usoftchina.saas.account.dto.*;
 import com.usoftchina.saas.account.mapper.*;
 import com.usoftchina.saas.account.po.*;
 import com.usoftchina.saas.account.service.ResourceService;
@@ -94,7 +92,7 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
     public List<PowerDTO> getResourcePowerById(Long id) {
         List<PowerDTO> powerDTOList = new ArrayList<PowerDTO>();
         List<Map<String, Object>> classifyList = roleResourceMapper.selectClassifyByRoleId(id);
-        List<OtherPower> otherPowerList = roleResourceMapper.selectOthersPower(id);
+        List<OtherPower> otherPowerList = roleResourceMapper.selectOthersPower();
         //查询所有模块
         List<ResourceModule> modules = resourceModuleMapper.selectByAppId(BaseContextHolder.getAppId());
         for (ResourceModule module : modules){
@@ -110,9 +108,7 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
                     if (group.getId().equals(map.get("group_id"))){
                         String classify = String.valueOf(map.get("classify"));
                         setPowerValue(powerDTO, classify);
-                        if (classify.contains("OTHER")){
-                            setOtherPower(powerDTO, group.getId(), otherPowerList);
-                        }
+                        setOtherPower(powerDTO, group.getId(), id, otherPowerList);
                     }
                 }
                 powerDTOList.add(powerDTO);
@@ -121,10 +117,56 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
         return powerDTOList;
     }
 
-    private void setOtherPower(PowerDTO powerDTO, Long groupId, List<OtherPower> otherPowerList) {
+    @Override
+    public boolean saveRoleResource(PowerSetListDTO powerSetListDTO) {
+        Long roleId = powerSetListDTO.getRoleId();
+        Long companyId = BaseContextHolder.getCompanyId();
+        String appId = BaseContextHolder.getAppId();
+        List<RoleResource> addRoleResourceList = new ArrayList<RoleResource>();
+        List<RoleResource> delRoleResourceList = new ArrayList<RoleResource>();
+
+        for (PowerSetDTO powerSetDTO : powerSetListDTO.getPowerSetList()){
+            List<Resource> resourceList = resourceMapper.selectByGroupId(powerSetDTO.getGroupId());
+            if (powerSetDTO.isChecked()) {
+                if (powerSetDTO.getGroupId() != null && powerSetDTO.getResourceId() == null) {
+                    for (Resource resource : resourceList){
+                        if (resource.getClassify().equalsIgnoreCase(powerSetDTO.getClassify())){
+                            RoleResource roleResource = new RoleResource(roleId, appId, resource.getId(), companyId);
+                            addRoleResourceList.add(roleResource);
+                        }
+                    }
+                } else if (powerSetDTO.getResourceId() != null && powerSetDTO.getGroupId() == null) {
+                    roleResourceMapper.delete(roleId, powerSetDTO.getResourceId());
+                    RoleResource roleResource = new RoleResource(roleId, appId, powerSetDTO.getResourceId(), companyId);
+                    addRoleResourceList.add(roleResource);
+                }
+            }else{
+                if (powerSetDTO.getGroupId() != null && powerSetDTO.getResourceId() == null) {
+                    for (Resource resource : resourceList){
+                        if (resource.getClassify().equalsIgnoreCase(powerSetDTO.getClassify())){
+                            RoleResource roleResource = new RoleResource(roleId, appId, resource.getId(), companyId);
+                            delRoleResourceList.add(roleResource);
+                        }
+                    }
+                } else if (powerSetDTO.getResourceId() != null && powerSetDTO.getGroupId() == null) {
+                    RoleResource roleResource = new RoleResource(roleId, appId, powerSetDTO.getResourceId(), companyId);
+                    delRoleResourceList.add(roleResource);
+                }
+            }
+        }
+        for (RoleResource roleResource : delRoleResourceList) {
+            roleResourceMapper.delete(roleResource.getRoleId(), roleResource.getResourceId());
+        }
+        if (addRoleResourceList.size() > 0) {
+            roleResourceMapper.batchInsert(addRoleResourceList);
+        }
+        return true;
+    }
+
+    private void setOtherPower(PowerDTO powerDTO, Long groupId, Long roleId, List<OtherPower> otherPowerList) {
         List<OtherPower> otherPowers = new ArrayList<OtherPower>();
         for (OtherPower otherPower : otherPowerList){
-            if (otherPower.getGroupId().equals(groupId)){
+            if (groupId.equals(otherPower.getGroupId())){
                 otherPowers.add(otherPower);
             }
         }
@@ -138,6 +180,7 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
             switch (array[i]){
                 case "QUERY":
                     powerDTO.setQuery(true);
+                    powerDTO.setFileExport(true);
                     break;
                 case "ADD":
                     powerDTO.setAdd(true);

+ 13 - 2
base-servers/account/account-server/src/main/resources/mapper/RoleResourceMapper.xml

@@ -36,10 +36,21 @@
         <result column="id" property="resourceId" jdbcType="BIGINT" />
         <result column="group_id" property="groupId" jdbcType="BIGINT" />
         <result column="checked" property="checked" jdbcType="BOOLEAN" />
+        <result column="role_id" property="roleId" jdbcType="BIGINT" />
     </resultMap>
     <select id="selectOthersPower" resultMap="OtherPowerResultMap">
-      SELECT name,id,group_id,CASE WHEN ROLE_ID IS NULL THEN false ELSE true end checked FROM AC_RESOURCE
+      SELECT name,id,group_id,role_id,CASE WHEN ROLE_ID IS NULL THEN false ELSE true end checked FROM AC_RESOURCE
       LEFT JOIN ac_role_resource ON ID = RESOURCE_ID
-      WHERE CLASSIFY='OTHER' AND ROLE_ID=#{roleId}
+      WHERE CLASSIFY='OTHER'
     </select>
+    <insert id="batchInsert" parameterType="java.util.List">
+        INSERT INTO AC_ROLE_RESOURCE(ROLE_ID, RESOURCE_ID, COMPANY_ID, APP_ID)
+        VALUES
+        <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+            (
+              #{item.roleId, jdbcType=BIGINT}, #{item.resourceId,jdbcType=BIGINT},
+              #{item.companyId, jdbcType=BIGINT}, #{item.appId,jdbcType=VARCHAR}
+            )
+        </foreach>
+    </insert>
 </mapper>

+ 89 - 1
base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java

@@ -13,6 +13,8 @@ import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.util.List;
+
 /**
  * 文件接口
  *
@@ -37,7 +39,7 @@ public interface FileApi {
      * @return
      */
     @PostMapping(value = "/folder")
-    Result<FolderDTO> folder(FolderSaveDTO newFolder);
+    Result<FolderDTO> createFolder(FolderSaveDTO newFolder);
 
     /**
      * 根据id查看文件详情
@@ -48,6 +50,24 @@ public interface FileApi {
     @GetMapping(value = "/info/{id}")
     Result<FileInfoDTO> getFileInfo(@PathVariable(value = "id") Long id);
 
+    /**
+     * 根据path查看文件信息
+     *
+     * @param path
+     * @return
+     */
+    @GetMapping(value = "/info")
+    Result<FileInfoDTO> getFileInfoByPath(@RequestParam String path);
+
+    /**
+     * 查看子文件
+     *
+     * @param folderId
+     * @return
+     */
+    @GetMapping(value = "/list")
+    Result<List<FileInfoDTO>> listFiles(Long folderId);
+
     /**
      * 上传文件到指定文件夹
      *
@@ -58,4 +78,72 @@ public interface FileApi {
      */
     @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
     Result<FileInfoDTO> upload(Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception;
+
+    /**
+     * 文件下载
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/download/{id}")
+    byte[] download(@PathVariable Long id);
+
+    /**
+     * 文件下载
+     *
+     * @param path
+     * @return
+     */
+    @GetMapping(value = "/download")
+    byte[] downloadByPath(@RequestParam String path);
+
+    /**
+     * 删除文件
+     *
+     * @param id
+     * @param purge true表示直接删除,false表示放入回收站
+     * @return
+     */
+    @GetMapping(value = "/delete/{id}")
+    Result delete(@PathVariable Long id,
+                  @RequestParam(required = false, defaultValue = "false") Boolean purge);
+
+    /**
+     * 删除文件
+     *
+     * @param id
+     * @param purge true表示直接删除,false表示放入回收站
+     * @return
+     */
+    @GetMapping(value = "/delete")
+    Result deleteByPath(@PathVariable Long id,
+                  @RequestParam(required = false, defaultValue = "false") Boolean purge);
+
+    /**
+     * 还原文件
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/restore/{id}")
+    Result restore(@PathVariable Long id);
+
+    /**
+     * 还原文件
+     *
+     * @param path
+     * @return
+     */
+    @GetMapping(value = "/restore")
+    Result restoreByPath(@RequestParam String path);
+
+    /**
+     * 移动文件到文件夹
+     *
+     * @param fileId
+     * @param folderId
+     * @return
+     */
+    @GetMapping(value = "/move")
+    Result move(@RequestParam Long fileId, @RequestParam Long folderId);
 }

+ 1 - 1
base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java

@@ -82,7 +82,7 @@ public class FileController {
 
     @ApiOperation(value = "创建文件夹")
     @PostMapping(value = "/folder")
-    public Result<FolderDTO> folder(FolderSaveDTO newFolder) {
+    public Result<FolderDTO> createFolder(FolderSaveDTO newFolder) {
         BizAssert.notNull(newFolder.getName(), ExceptionCode.FOLDER_NAME_EMPTY);
         // 检查父文件夹
         FileInfo parent = checkFolder(newFolder.getFolderId());

+ 12 - 0
frontend/saas-web/app/model/chart/DataXY.js

@@ -0,0 +1,12 @@
+Ext.define('saas.model.chart.DataXY', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        {
+            name: 'xvalue'
+        },
+        {
+            name: 'yvalue'
+        }
+    ]
+});

+ 21 - 0
frontend/saas-web/app/model/chart/MultiDataXY.js

@@ -0,0 +1,21 @@
+Ext.define('saas.model.chart.MultiDataXY', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        {
+            name: 'xvalue'
+        },
+        {
+            name: 'y1value'
+        },
+        {
+            name: 'y2value'
+        },
+        {
+            name: 'y3value'
+        },
+        {
+            name: 'y4value'
+        }
+    ]
+});

+ 0 - 2
frontend/saas-web/app/view/auth/LoginController.js

@@ -10,7 +10,6 @@ Ext.define('saas.view.auth.LoginController', {
         var me = this, view = me.getView(),
             form = me.lookup('authdialog'),
             values = form.getValues();
-            debugger;
         view.mask('请稍等...');
 
         saas.model.Session.login(values.username, values.password)
@@ -18,7 +17,6 @@ Ext.define('saas.view.auth.LoginController', {
                 view.isMasked() && view.unmask();
                 me.getViewModel().set('session', session);
                 var cos = session.get("account").companies;
-                debugger;
 				if (cos && cos.length) {
                     if (cos.length == 1) {
                         session.get('account').companyId = cos[0].id;

+ 89 - 0
frontend/saas-web/app/view/core/chart/Area.js

@@ -0,0 +1,89 @@
+Ext.define('saas.view.core.chart.Area', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-area',
+
+    requires: [
+        'Ext.chart.CartesianChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.series.Line',
+        'Ext.chart.interactions.PanZoom'
+    ],
+
+    title: 'Area Chart',
+    iconCls: 'x-fa fa-area-chart',
+
+    items: [{
+        xtype: 'cartesian',
+        colors: [
+            '#115fa6',
+            '#94ae0a'
+        ],
+        bind: '{areaData}',
+        series: [
+            {
+                type: 'line',
+                colors: [
+                    'rgba(103, 144, 199, 0.6)'
+                ],
+                xField: 'xvalue',
+                yField: [
+                    'y1value'
+                ],
+                fill: true,
+                smooth: true
+            },
+            {
+                type: 'line',
+                colors: [
+                    'rgba(238, 146, 156, 0.6)'
+                ],
+                xField: 'xvalue',
+                yField: [
+                    'y2value'
+                ],
+                fill: true,
+                smooth: true
+            }
+        ],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: {
+                    type: 'panzoom',
+                    zoomOnPanGesture: true
+                }
+            }
+        },
+        axes: [{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            hidden: true,
+            position: 'bottom'
+        },{
+            type: 'numeric',
+            fields: [
+                'y1value',
+                'y2value',
+                'y3value'
+            ],
+            grid: {
+                odd: {
+                    fill: '#e8e8e8'
+                }
+            },
+            hidden: true,
+            position: 'left'
+        }]
+    }]
+});

+ 67 - 0
frontend/saas-web/app/view/core/chart/Bar.js

@@ -0,0 +1,67 @@
+Ext.define('saas.view.core.chart.Bar', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-bar',
+
+    requires: [
+        'Ext.chart.CartesianChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.interactions.PanZoom',
+        'Ext.chart.series.Bar'
+    ],
+
+    title: 'Bar Chart',
+    iconCls: 'x-fa fa-bar-chart',
+
+    items: [{
+        xtype: 'cartesian',
+        colors: [
+            '#6aa5db'
+        ],
+        bind: '{barData}',
+        axes: [{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            hidden: true,
+            position: 'bottom'
+        },{
+            type: 'numeric',
+            fields: [
+                'yvalue'
+            ],
+            grid: {
+                odd: {
+                    fill: '#e8e8e8'
+                }
+            },
+            hidden: true,
+            position: 'left'
+        }],
+        series: [{
+            type: 'bar',
+            xField: 'xvalue',
+            yField: [
+                'yvalue'
+            ]
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: {
+                    type: 'panzoom',
+                    zoomOnPanGesture: true
+                }
+            }
+        }
+    }]
+});

+ 22 - 0
frontend/saas-web/app/view/core/chart/ChartBase.js

@@ -0,0 +1,22 @@
+Ext.define('saas.view.core.chart.ChartBase', {
+    extend: 'Ext.panel.Panel',
+
+    height: 300,
+
+    layout: 'fit',
+
+    cls: 'quick-graph-panel shadow',
+    // headerPosition: 'bottom',
+
+    defaults: {
+        width: '100%'
+    },
+
+    initComponent: function() {
+        var me = this;
+        
+
+
+        me.callParent(arguments);
+    }
+});

+ 38 - 0
frontend/saas-web/app/view/core/chart/Gauge.js

@@ -0,0 +1,38 @@
+Ext.define('saas.view.core.chart.Gauge', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-gauge',
+
+    requires: [
+        'Ext.chart.PolarChart',
+        'Ext.chart.series.Gauge'
+    ],
+
+    title: 'Gauge Chart',
+    iconCls: 'x-fa fa-wifi',
+
+    items: [{
+        xtype: 'polar',
+        colors: [
+            '#6aa5db',
+            '#aed581'
+        ],
+        bind: '{gaugeData}',
+        series: [{
+            type: 'gauge',
+            angleField: 'position',
+            needleLength: 100
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            }
+        }
+    }]
+
+});

+ 75 - 0
frontend/saas-web/app/view/core/chart/Line.js

@@ -0,0 +1,75 @@
+Ext.define('saas.view.core.chart.Line', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-line',
+
+    requires: [
+        'Ext.chart.CartesianChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.interactions.PanZoom',
+        'Ext.chart.series.Line'
+
+    ],
+
+    title: 'Line Chart',
+    iconCls: 'x-fa fa-line-chart',
+
+    items: [{
+        xtype: 'cartesian',
+        colors: [
+            '#6aa5db',
+            '#94ae0a'
+        ],
+        bind: '{lineData}',
+        axes: [{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            hidden: true,
+            position: 'bottom'
+        },{
+            type: 'numeric',
+            fields: [
+                'yvalue',
+                'y1value',
+                'y2value',
+                'y3value',
+                'y4value',
+                'y5value'
+            ],
+            hidden: true,
+            position: 'left'
+        }],
+        series: [{
+            type: 'line',
+            xField: 'xvalue',
+            yField: [
+                'yvalue'
+            ]
+        },{
+            type: 'line',
+            xField: 'xvalue',
+            yField: [
+                'y1value'
+            ]
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: {
+                    type: 'panzoom',
+                    zoomOnPanGesture: true
+                }
+            }
+        }
+    }]
+});

+ 55 - 0
frontend/saas-web/app/view/core/chart/Pie.js

@@ -0,0 +1,55 @@
+Ext.define('saas.view.core.chart.Pie', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-pie',
+
+    requires: [
+        'Ext.chart.PolarChart',
+        'Ext.chart.interactions.Rotate',
+        'Ext.chart.series.Pie',
+        'Ext.chart.series.sprite.PieSlice'
+    ],
+
+    iconCls: 'x-fa fa-pie-chart',
+
+    items: [{
+        xtype: 'polar',
+        colors: [
+            '#aed581',
+            '#6aa5db',
+            '#ee929c',
+            '#61A0A8',
+            '#D48265',
+            '#91C7AE',
+            '#CA8622',
+            '#BDA29A'
+        ],
+        bind: '{pieData}',
+        // series: [{
+        //     type: 'pie',
+        //     angleField: 'yvalue',
+        //     label: {
+        //         field: 'xvalue',
+        //         display: 'rotate',
+        //         contrast: true,
+        //         font: '12px Open Sans',
+        //     },
+        //     // xField: 'yvalue'
+        // }],
+        series: [{
+            type: 'pie',
+            angleField: 'yvalue',
+            label: {
+                field: 'xvalue',
+            },
+            highlight: true,
+            tooltip: {
+                trackMouse: true,
+                renderer: 'onSeriesTooltipRender'
+            }
+        }],
+        // legend: {
+        //     docked: 'bottom'
+        // },
+        interactions: 'rotate'
+    }]
+});

+ 42 - 0
frontend/saas-web/app/view/core/chart/Pie3D.js

@@ -0,0 +1,42 @@
+Ext.define('saas.view.core.chart.Pie3D', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-pie3d',
+
+    requires: [
+        'Ext.chart.PolarChart',
+        'Ext.chart.interactions.Rotate',
+        'Ext.chart.series.Pie3D'
+    ],
+
+    title: '3D Pie Chart',
+    iconCls: 'x-fa fa-pie-chart',
+
+    items: [{
+        xtype: 'polar',
+        colors: [
+            '#aed581',
+            '#6aa5db',
+            '#ee929c'
+        ],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: 'rotate'
+            }
+        },
+        bind: '{pieData}',
+        series: [{
+            type: 'pie3d',
+            angleField: 'yvalue',
+            donut: 30
+        }]
+    }]
+});

+ 55 - 0
frontend/saas-web/app/view/core/chart/Polar.js

@@ -0,0 +1,55 @@
+Ext.define('saas.view.core.chart.Polar', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-polar',
+
+    requires: [
+        'Ext.chart.PolarChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.interactions.Rotate',
+        'Ext.chart.series.Radar'
+    ],
+
+    title: 'Radial Chart',
+    iconCls: 'x-fa fa-dot-circle-o',
+
+    items: [{
+        xtype: 'polar',
+        colors: ['#6aa5db'],
+        bind: '{radialData}',
+        axes: [{
+            type: 'numeric',
+            fields: [
+                'yvalue'
+            ],
+            grid: true,
+            position: 'radial'
+        },{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            grid: true,
+            position: 'angular'
+        }],
+        series: [{
+            type: 'radar',
+            xField: 'xvalue',
+            yField: 'yvalue'
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: 'rotate'
+            }
+        }
+    }]
+});

+ 71 - 0
frontend/saas-web/app/view/core/chart/Stacked.js

@@ -0,0 +1,71 @@
+Ext.define('saas.view.core.chart.Stacked', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'core-chart-stacked',
+
+    requires: [
+        'Ext.chart.CartesianChart',
+        'Ext.chart.axis.Category',
+        'Ext.chart.axis.Numeric',
+        'Ext.chart.series.Bar',
+        'Ext.chart.interactions.PanZoom'
+    ],
+
+    title: 'Stacked Bar Chart',
+    iconCls: 'x-fa fa-bar-chart',
+
+    items: [{
+        xtype: 'cartesian',
+        colors: [
+            '#6aa5db',
+            '#ee929c'
+        ],
+        bind: '{stackedData}',
+        axes: [{
+            type: 'category',
+            fields: [
+                'xvalue'
+            ],
+            hidden: true,
+            position: 'bottom'
+        },{
+            type: 'numeric',
+            fields: [
+                'y1value',
+                'y2value',
+                'y3value'
+            ],
+            grid: {
+                odd: {
+                    fill: '#e8e8e8'
+                }
+            },
+            hidden: true,
+            position: 'left'
+        }],
+        series: [{
+            type: 'bar',
+            xField: 'xvalue',
+            yField: [
+                'y2value',
+                'y3value'
+            ]
+        }],
+        platformConfig: {
+            phone: {
+                // On a phone the whole view becomes a vertical strip of charts,
+                // which makes it impossible to scroll the view if touch action
+                // started on a chart. So we use a custom touchAction config.
+                touchAction: {
+                    panX: true,
+                    panY: true
+                }
+            },
+            '!phone': {
+                interactions: {
+                    type: 'panzoom',
+                    zoomOnPanGesture: true
+                }
+            }
+        }
+    }]
+});

+ 28 - 1
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -47,7 +47,34 @@ Ext.define('saas.view.core.form.FormPanel', {
         auditBtnText: '审核',
         unAuditBtnText: '反审核',
     },
-
+    buttons:[{
+        text:'操作日志',
+        handler:function(btn){
+            var form = btn.up('form'),
+            mlKeyvalue = form.viewModel.get(form._idField)||0,
+            win = Ext.getCmp(form.xtype+mlKeyvalue);
+            if (!win) {
+                win = Ext.create('Ext.window.Window', {
+                    modal: true,
+                    id:form.xtype+mlKeyvalue,
+                    height: '80%',
+                    width: '80%',
+                    title: '操作日志('+form.viewModel.get(form._codeField)+')',
+                    scrollable: true,
+                    //bodyPadding: 10,
+                    constrain: true,
+                    closable: true,
+                    layout: 'fit',
+                    renderTo: Ext.getCmp('main-tab-panel').getActiveTab().down('form').getEl(),
+                    items: [{
+                        xtype: 'core-form-mseeageLog',
+                        mlKeyvalue:mlKeyvalue
+                    }]
+                });
+            };
+            win.show();
+        }
+    }],
     initComponent: function () {
         var me = this,
         auditTexts = me.auditTexts;

+ 233 - 0
frontend/saas-web/app/view/core/form/MseeageLog.js

@@ -0,0 +1,233 @@
+Ext.define('saas.view.core.form.MseeageLog', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'core-form-mseeageLog',
+
+    autoScroll: true,
+    frame:true,
+    layout:'fit',
+    dataUrl:'/api/commons/messagelog/list',
+
+    tbar: [{
+        width: 150,
+        name: 'ml_man',
+        xtype: 'textfield',
+        emptyText : '操作人员'
+    },{
+        cls:'x-formpanel-btn-orange',
+        xtype:'button',
+        text:'查询',
+        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);
+                grid.store.loadPage(1);
+            }
+        }
+    },'->'],
+
+    //字段属性
+    columns : [{
+        text : "id", 
+        width : 0, 
+        dataIndex : "id", 
+        xtype : "numbercolumn",   
+    },{
+        text:'单据类型',
+        dataIndex : "ml_name",
+        width : 0, 
+    },{
+        text : "单据编号", 
+        width : 0, 
+        dataIndex : "ml_code"
+    },{
+        xtype:'datecolumn',
+        format:'Y-m-d H:i:s',
+        text : "操作时间", 
+        dataIndex : "createTime", 
+        width : 200.0, 
+    }, {
+        text : "操作人员", 
+        dataIndex : "ml_man", 
+        width : 200
+    },
+    {
+        text : "操作", 
+        dataIndex : "ml_content", 
+        width : 220.0, 
+    }, 
+    {
+        text : "结果", 
+        dataIndex : "ml_result", 
+        width : 120.0, 
+        flex:1
+    }],
+
+    initComponent: function() {
+        var me = this;
+        me.condition = [{
+            type: 'number',
+            field: 'ml_keyvalue',
+            operation: '=',
+            value: me.mlKeyvalue
+        }];
+        if(me.columns){
+            var fields = me.columns.map(column => column.dataIndex);
+            me.store = Ext.create('Ext.data.Store',{
+                fields:fields,
+                autoLoad: true,
+                pageSize: 11,
+                data: [],
+                proxy: {
+                    timeout:8000,
+                    type: 'ajax',
+                    url: me.dataUrl,
+                    actionMethods: {
+                        read: 'GET'
+                    },
+                    reader: {
+                        type: 'json',
+                        rootProperty: 'data.list',
+                        totalProperty: 'data.total',
+                    }
+                },
+                listeners: {
+                    beforeload: function (store, op) {
+                        var condition = me.condition;
+                        if (Ext.isEmpty(condition)) {
+                            condition = "";
+                        }
+                        
+                        Ext.apply(store.proxy.extraParams, {
+                            number: op._page,
+                            size: store.pageSize,
+                            condition: JSON.stringify(condition)
+                        });
+                    }
+                }
+            });
+
+            Ext.apply(me, {
+                dockedItems:[{
+                    xtype: 'pagingtoolbar',
+                    dock: 'bottom',
+                    displayInfo: true,
+                    store: me.store
+                }]
+            });
+        }
+        me.callParent(arguments);
+    },
+
+     /**
+     * 获得过滤条件
+     */
+    getCondition: function(items) {
+        var me = this,
+        conditions = [];
+        for(var i = 0; i < items.length; i++) {
+            var item = items[i];
+            var field = item.name,
+            func = item.getCondition,
+            value = item.value,
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        };
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
+        }
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            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') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+
+    refresh:function(){
+        //debugger
+    }
+
+});

+ 1 - 0
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -288,6 +288,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     },
     onExport: function (me) {
         var grid = me.ownerCt.ownerCmp.ownerCt.ownerCt;
+
         grid.store.exportPageSize = 5000;
         grid.store.exportNumber = 1;
         grid.store.load(function(records, operation, success) {

+ 5 - 2
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -115,15 +115,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
             },{
                 xtype:'numberfield',
                 name:'bk_thisamount',
-                allowBlank:false,
-                fieldLabel:'当前额',
+                allowBlank:true,
+                fieldLabel:'当前额',
                 hideTrigger: true,
                 mouseWheelEnabled: false,
+                beforeLabelTextTpl:'',
                 minValue: 0
             },{
                 xtype:'combo',
                 name:'bk_type',
                 allowBlank:false,
+                editable:false,
                 fieldLabel:'账户类别',
                 store: [
                     '现金',
@@ -144,6 +146,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name:'bk_remark',
                 allowBlank:true,
                 fieldLabel:'备注',
+                beforeLabelTextTpl:''
             }]
         },
         productbrand:{

+ 403 - 0
frontend/saas-web/app/view/home/ChartsModel.js

@@ -0,0 +1,403 @@
+Ext.define('saas.view.home.ChartsModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.chartsmodel',
+
+    stores: {
+        barData: {
+            model: 'saas.model.chart.DataXY',
+            data: [
+                {
+                    "xvalue": 2004,
+                    "yvalue": 239
+                },
+                {
+                    "xvalue": 2005,
+                    "yvalue": 402
+                },
+                {
+                    "xvalue": 2006,
+                    "yvalue": 706
+                },
+                {
+                    "xvalue": 2007,
+                    "yvalue": 432
+                },
+                {
+                    "xvalue": 2008,
+                    "yvalue": 200
+                },
+                {
+                    "xvalue": 2009,
+                    "yvalue": 763
+                },
+                {
+                    "xvalue": 2010,
+                    "yvalue": 550
+                },
+                {
+                    "xvalue": 2011,
+                    "yvalue": 630
+                },
+                {
+                    "xvalue": 2012,
+                    "yvalue": 278
+                },
+                {
+                    "xvalue": 2013,
+                    "yvalue": 312
+                },
+                {
+                    "xvalue": 2014,
+                    "yvalue": 600
+                },
+                {
+                    "xvalue": 2015,
+                    "yvalue": 283
+                }
+            ]
+        },
+
+        stackedData: {
+            model: 'saas.model.chart.MultiDataXY',
+            data: [
+                {
+                    "xvalue": 1997,
+                    "y1value": 281,
+                    "y2value": 72,
+                    "y3value": 269,
+                    "y4value": 762
+                },
+                {
+                    "xvalue": 1981,
+                    "y1value": 518,
+                    "y2value": 999,
+                    "y3value": 43,
+                    "y4value": 310
+                },
+                {
+                    "xvalue": 1985,
+                    "y1value": 38,
+                    "y2value": 311,
+                    "y3value": 942,
+                    "y4value": 77
+                },
+                {
+                    "xvalue": 1984,
+                    "y1value": 936,
+                    "y2value": 415,
+                    "y3value": 562,
+                    "y4value": 412
+                },
+                {
+                    "xvalue": 1979,
+                    "y1value": 978,
+                    "y2value": 331,
+                    "y3value": 927,
+                    "y4value": 114
+                },
+                {
+                    "xvalue": 1982,
+                    "y1value": 196,
+                    "y2value": 240,
+                    "y3value": 72,
+                    "y4value": 888
+                },
+                {
+                    "xvalue": 1992,
+                    "y1value": 481,
+                    "y2value": 375,
+                    "y3value": 139,
+                    "y4value": 762
+                },
+                {
+                    "xvalue": 19895,
+                    "y1value": 623,
+                    "y2value": 999,
+                    "y3value": 260,
+                    "y4value": 310
+                },
+                {
+                    "xvalue": 1988,
+                    "y1value": 328,
+                    "y2value": 451,
+                    "y3value": 542,
+                    "y4value": 77
+                },
+                {
+                    "xvalue": 1980,
+                    "y1value": 456,
+                    "y2value": 615,
+                    "y3value": 342,
+                    "y4value": 412
+                },
+                {
+                    "xvalue": 1990,
+                    "y1value": 788,
+                    "y2value": 531,
+                    "y3value": 489,
+                    "y4value": 114
+                }
+            ]
+        },
+
+        gaugeData: {
+            data: [
+                {
+                    position: 40
+                }
+            ],
+
+            fields: [
+                {
+                    name: 'position'
+                }
+            ]
+        },
+
+        radialData: {
+            model: 'saas.model.chart.DataXY',
+            data: [
+                {
+                    "xvalue": "A",
+                    "yvalue": 417
+                },
+                {
+                    "xvalue": "B",
+                    "yvalue": 676
+                },
+                {
+                    "xvalue": "C",
+                    "yvalue": 606
+                },
+                {
+                    "xvalue": "D",
+                    "yvalue": 124
+                },
+                {
+                    "xvalue": "E",
+                    "yvalue": 473
+                },
+                {
+                    "xvalue": "F",
+                    "yvalue": 108
+                },
+                {
+                    "xvalue": "G",
+                    "yvalue": 847
+                },
+                {
+                    "xvalue": "H",
+                    "yvalue": 947
+                },
+                {
+                    "xvalue": "I",
+                    "yvalue": 694
+                },
+                {
+                    "xvalue": "J",
+                    "yvalue": 603
+                }
+            ]
+        },
+
+        lineData: {
+            model: 'saas.model.chart.DataXY',
+            data: [
+                {
+                    "xvalue": 2011,
+                    "yvalue": 0.1,
+                    "y1value": 0.2,
+                    "y2value": 0.3,
+                    "y3value": 0.1,
+                    "y4value": 0,
+                    "y5value": 1
+                },
+                {
+                    "xvalue": 2012,
+                    "yvalue": 0.2,
+                    "y1value": 0.4,
+                    "y2value": 0.2,
+                    "y3value": 0.2,
+                    "y4value": 0,
+                    "y5value": 1
+                },
+                {
+                    "xvalue": 2013,
+                    "yvalue": 0.3,
+                    "y1value": 0.2,
+                    "y2value": 0.4,
+                    "y3value": 0.3,
+                    "y4value": 0,
+                    "y5value": 1
+        
+                },
+                {
+                    "xvalue": 2014,
+                    "yvalue": 0.2,
+                    "y1value": 0.4,
+                    "y2value": 0.1,
+                    "y3value": 0.2,
+                    "y4value": 0,
+                    "y5value": 1
+                },{
+                    "xvalue": 2015,
+                    "yvalue": 0.4,
+                    "y1value": 0.3,
+                    "y2value": 0.4,
+                    "y3value": 0.4,
+                    "y4value": 0,
+                    "y5value": 1
+                }
+            ]
+        },
+
+        pieData: {
+            model: 'saas.model.chart.DataXY',
+            data: [{
+                "xvalue": "华商龙",
+                "yvalue": 200.19
+            }, {
+                "xvalue": "维泰",
+                "yvalue": 180.17
+            }, {
+                "xvalue": "数码",
+                "yvalue": 150.15
+            }, {
+                "xvalue": "优企",
+                "yvalue": 150.15
+            }, {
+                "xvalue": "云服",
+                "yvalue": 120.12
+            }, {
+                "xvalue": "其他",
+                "yvalue": 230.22
+            }]
+        },
+
+        areaData: {
+            model: 'saas.model.chart.MultiDataXY',
+            data: [
+                {
+                    "xvalue": 250,
+                    "y1value": 94,
+                    "y2value": 40
+                },
+                {
+                    "xvalue": 500,
+                    "y1value": 78,
+                    "y2value": 46
+                },
+                {
+                    "xvalue": 750,
+                    "y1value": 60,
+                    "y2value": 53
+                },
+                {
+                    "xvalue": 1250,
+                    "y1value": 51,
+                    "y2value": 48
+                },
+                {
+                    "xvalue": 1500,
+                    "y1value": 60,
+                    "y2value": 36
+                },
+                {
+                    "xvalue": 1750,
+                    "y1value": 68,
+                    "y2value": 26
+                },
+                {
+                    "xvalue": 2250,
+                    "y1value": 59,
+                    "y2value": 37
+                },
+                {
+                    "xvalue": 2500,
+                    "y1value": 40,
+                    "y2value": 58
+                },
+                {
+                    "xvalue": 2750,
+                    "y1value": 24,
+                    "y2value": 78
+                },
+                {
+                    "xvalue": 3250,
+                    "y1value": 36,
+                    "y2value": 85
+                },
+                {
+                    "xvalue": 3500,
+                    "y1value": 65,
+                    "y2value": 70
+                },
+                {
+                    "xvalue": 3750,
+                    "y1value": 94,
+                    "y2value": 55
+                },
+                {
+                    "xvalue": 4250,
+                    "y1value": 103,
+                    "y2value": 61
+                },
+                {
+                    "xvalue": 4500,
+                    "y1value": 83,
+                    "y2value": 82
+                },
+                {
+                    "xvalue": 4750,
+                    "y1value": 61,
+                    "y2value": 102
+                },
+                {
+                    "xvalue": 5250,
+                    "y1value": 55,
+                    "y2value": 95
+                },
+                {
+                    "xvalue": 5500,
+                    "y1value": 70,
+                    "y2value": 67
+                },
+                {
+                    "xvalue": 5750,
+                    "y1value": 84,
+                    "y2value": 39
+                },
+                {
+                    "xvalue": 6250,
+                    "y1value": 78,
+                    "y2value": 31
+                },
+                {
+                    "xvalue": 6500,
+                    "y1value": 58,
+                    "y2value": 49
+                },
+                {
+                    "xvalue": 6750,
+                    "y1value": 38,
+                    "y2value": 69
+                },
+                {
+                    "xvalue": 7250,
+                    "y1value": 41,
+                    "y2value": 74
+                },
+                {
+                    "xvalue": 7500,
+                    "y1value": 65,
+                    "y2value": 60
+                },
+                {
+                    "xvalue": 7750,
+                    "y1value": 89,
+                    "y2value": 46
+                }
+            ]
+        }
+    }
+});

+ 123 - 74
frontend/saas-web/app/view/home/Home.js

@@ -3,90 +3,139 @@ Ext.define('saas.view.home.Home', {
     xtype: 'home',
 
     requires: [
-        'saas.view.home.MsgCard',
         'Ext.slider.Single',
         'Ext.form.field.Display',
-        'Ext.layout.container.Border'
+        'Ext.layout.container.Border',
+        'Ext.ux.layout.ResponsiveColumn'
     ],
 
-    layout: {
-        type: 'vbox',
-        pack: 'start',
-        align: 'stretch'
+    controller: 'home',
+    viewModel: {
+        type: 'chartsmodel'
     },
 
-    bodyPadding: 5,
+    layout: 'responsivecolumn',
+
+    scrollable: true,
 
     defaults: {
-        xtype: 'container'
+        shadow: true,
+        xtype: 'panel',
+        layout: 'column',
+        cls: 'x-home-panel',
+        userCls: 'big-100 small-100',
     },
 
-    items: [
-        {
-            height: 200,
-            layout: 'column',
-            margin: '0 0 20 0',
-            items: [
-                {
-                    xtype: 'msgcard',
-                    containerColor: 'cornflower-blue',
-                    columnWidth: 0.25,
-                    margin: '0 15 0 0',
-                    data: {
-                        count: 0,
-                        title: '库存预警',
-                        icon: 'exclamation-triangle'
-                    }
-                },
-                {
-                    xtype: 'msgcard',
-                    containerColor: 'green',
-                    columnWidth: 0.25,
-                    margin: '0 15 0 0',
-                    data: {
-                        count: 11,
-                        title: '未发货销售订单',
-                        icon: 'shopping-cart'
-                    }
-                },
-                {
-                    xtype: 'msgcard',
-                    containerColor: 'magenta',
-                    columnWidth: 0.25,
-                    margin: '0 15 0 0',
-                    data: {
-                        count: 6,
-                        title: '未审核销售订单',
-                        icon: 'check'
-                    }
-                },
-                {
-                    xtype: 'msgcard',
-                    containerColor: 'orange',
-                    columnWidth: 0.25,
-                    data: {
-                        count: 5,
-                        title: '未审核购货订单',
-                        icon: 'calendar-check-o'
+    items: [{
+        title: '实时数据',
+        xtype: 'infocard',
+        infoData: [{
+            title: '七天内待出货销售',
+            content: '168件',
+            color: 'yellow',
+        }, {
+            title: '七天内待入库采购',
+            content: '168件',
+            color: 'purple',
+        }, {
+            title: '七天内代付款',
+            content: '168件',
+            color: 'red',
+        }, {
+            title: '七天内代收款',
+            content: '168件',
+            color: 'yellow',
+        }, {
+            title: '未审核验收',
+            content: '168件'
+        }, {
+            title: '七天内待出货销售',
+            content: '168件'
+        }, {
+            title: '未审核出货',
+            content: '168件'
+        }]
+    }, {
+        title: '2018年11月经营分析',
+        latyout: 'column',
+        // items: [{
+        //     xtype: 'core-chart-pie',
+        //     columnWidth: 0.33,
+        //     chartConfig: {
+        //         captions: {
+        //             credits: {
+        //                 text: 'Data: IDC Predictions - 2017\n' +
+        //                     'Source: Internet',
+        //                 align: 'left'
+        //             }
+        //         },
+        //     }
+        // }, {
+        //     xtype: 'core-chart-bar',
+        //     columnWidth: 0.33
+        // }, {
+        //     xtype: 'core-chart-gauge',
+        //     columnWidth: 0.33
+        // }]
+    }, {
+        title: '2018年11月经营分析',
+        latyout: 'column',
+        // items: [{
+        //     xtype: 'core-chart-line',
+        //     columnWidth: 0.33
+        // }, {
+        //     xtype: 'core-chart-pie',
+        //     columnWidth: 0.33
+        // }, {
+        //     xtype: 'core-chart-pie3d',
+        //     columnWidth: 0.33
+        // }]
+    }],
+
+    items1: [{
+        title: '2018年11月经营分析',
+        userCls: 'big-50 small-100',
+        items: [{
+            xtype: 'core-chart-pie',
+            columnWidth: 0.33,
+            chartConfig: {
+                captions: {
+                    credits: {
+                        text: 'Data: IDC Predictions - 2017\n' +
+                            'Source: Internet',
+                        align: 'left'
                     }
                 },
-            ]
-        },
-        {
-            xtype: 'tabpanel',
-            flex: 10,
-            cls: 'shadow',
-            items: [
-                {
-                    title: '销货'
-                },
-                {
-                    title: '购货'
-                },
-                {
-                    title: '仓库'
-                }
-            ]
-        }
-    ]
+            }
+        }, {
+            xtype: 'core-chart-bar',
+            columnWidth: 0.33
+        }, {
+            xtype: 'core-chart-gauge',
+            columnWidth: 0.33
+        }]
+    }, {
+        title: '经营趋势分析',
+        userCls: 'big-50 small-100',
+        items: [{
+            xtype: 'core-chart-line',
+            columnWidth: 0.33
+        }, {
+            xtype: 'core-chart-pie',
+            columnWidth: 0.33
+        }, {
+            xtype: 'core-chart-pie3d',
+            columnWidth: 0.33
+        }]
+    }, {
+        title: '待办事宜',
+        userCls: 'big-100 small-100',
+        items: [{
+            xtype: 'core-chart-polar',
+            columnWidth: 0.5
+        }, {
+            xtype: 'core-chart-stacked',
+            columnWidth: 0.5
+        }]
+    }],
 });

+ 30 - 0
frontend/saas-web/app/view/home/Home.scss

@@ -91,6 +91,36 @@ $unaudit-purc-container-color: dynamic(#e91e63);
     left: 0
 }
 
+.x-home-panel {
+    border-radius: 2px;
+
+    &>.x-panel-header {
+        background-color: #fff;
+
+        &>.x-box-inner {
+            &>.x-box-target {
+                &>.x-title {
+                    &>.x-title-text {
+                        font-size: 16px;
+                        color: #505363;
+                        padding-left: 10px;
+            
+                        &:before {
+                            content: ' ';
+                            position: absolute;
+                            width: 4px;
+                            height: 100%;
+                            background: #34BAF6;
+                            left: 0;
+                            border-radius: 2px;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
 .x-responsivecolumn {
     padding: 0;
 }

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

@@ -0,0 +1,8 @@
+Ext.define('saas.view.home.HomeController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.home',
+
+    onSeriesTooltipRender: function (tooltip, record, item) {
+        tooltip.setHtml(record.get('os') + ': ' + record.get('data1') + '%');
+    }
+});

+ 128 - 0
frontend/saas-web/app/view/home/InfoCard.js

@@ -0,0 +1,128 @@
+Ext.define('saas.view.home.InfoCard', {
+    extend: 'Ext.panel.Panel',
+    xtype: 'infocard',
+
+    latyou: 'fit',
+
+    initComponent: function() {
+        var me = this;
+
+        var view = Ext.create('Ext.view.View', {
+            store : Ext.create('Ext.data.Store', {
+				fields: ['title', 'content', 'color'],
+				data: me.infoData,
+			}),
+            tpl: new Ext.XTemplate([
+                '<div class="x-row">',
+                    '<tpl for=".">',
+                    '<div class="x-col">',
+                        '<div>',
+                            '<div class="x-box ',
+                                '<tpl if="color"> x-bg-{color}</tpl>',
+                                '<tpl else"> x-bg-default</tpl>',
+                            '">',
+                                '<h3>{title}</h3>',
+                                '<p>{content}</p>',
+                            '</div>',
+                        '</div>',
+                    '</div>',
+                    '</tpl>',
+                '</div>'
+            ]),
+            itemSelector: 'div.x-info-card-body',
+        });
+
+        Ext.apply(me, {
+            userCls: 'x-info-card ' + me.userCls,
+            items: [{
+                xtype: 'button',
+                cls: 'x-scroller-button x-scroller-button-left',
+                // iconCls: 'x-sa sa-arrows-left',
+                disabled: true,
+                handler: function() {
+                    me.scrollBody(1);
+                }
+            }, view, {
+                xtype: 'button',
+                cls: 'x-scroller-button x-scroller-button-right',
+                // iconCls: 'x-sa sa-arrows-right',
+                handler: function() {
+                    me.scrollBody(-1);
+                }
+            }]
+        });
+
+        me.callParent(arguments);
+    },
+
+    listeners: {
+        boxready: function(th) {
+            var list = Ext.fly(th.items.items[1].el.dom);
+            var listWidth = Number(list.getStyle('width').replace('px', ''));
+            var bodyWidth = th.body.getBox().width;
+            var btns = th.query('button');
+
+            if(listWidth <= (bodyWidth-88)) {
+                btns[0].setVisible(false);
+                btns[1].setVisible(false);
+                return;
+            }
+
+            Ext.fly(th.body).on('mousewheel', function() {
+                var ev = window.event;
+                var delta = ev.wheelDelta;
+
+                if(ev.preventDefault) {
+                    ev.preventDefault();  
+                }
+                else {
+                    ev.cancel=true;
+                }
+                th.scrollBody(delta/120);
+            })
+        }
+    },
+
+    scrollBody: function(delta) {
+        var me = this;
+        var list = Ext.fly(me.items.items[1].el.dom);
+        var marginLeft = Number(list.getStyle('marginLeft').replace('px', ''));
+        var le = marginLeft + delta * 50;
+        var MAX_LEN = list.getBox().width - (me.body.getBox().width - 88);
+
+        if(le > 0) {
+            le = 0;
+            me.scrollLeftDisabled();
+        }else if(le < -MAX_LEN) {
+            le = -MAX_LEN;
+            me.scrollRightDisabled();
+        }else {
+            me.scrollEnable();
+        }
+
+        list.setStyle({
+            marginLeft: le + 'px'
+        });
+    },
+    
+    scrollLeftDisabled: function() {
+        var me = this;
+        var leftBtn = me.query('button')[0];
+        leftBtn.setDisabled(true);
+    },
+
+    scrollRightDisabled: function() {
+        var me = this;
+        var rightBtn = me.query('button')[1];
+        rightBtn.setDisabled(true);
+    },
+
+    scrollEnable: function() {
+        var me = this;
+        var btns = me.query('button');
+
+        for(var i = 0; i < btns.length; i ++) {
+            btns[i].setDisabled(false);
+        }
+    }
+});

+ 88 - 0
frontend/saas-web/app/view/home/InfoCard.scss

@@ -0,0 +1,88 @@
+$card-width: 200px;
+
+.x-info-card {
+
+    .x-panel-bodyWrap {
+        .x-autocontainer-innerCt {
+            padding: 0 44px;
+        }
+        .x-row {
+            display: flex;
+            flex-wrap: nowrap;
+        
+            .x-col {
+        
+                color: #fff;
+                padding: 10px;
+        
+                .x-box {
+                    padding: 16px;
+                    width: 235px;
+                    height: 131px;
+                    border-radius: 0.5rem;
+                    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
+                    position: relative;
+                    display: block;
+        
+                    h3 {
+                        font-size: 16px;
+                    }
+        
+                    p {
+                        font-size: 24px;
+                        text-align: center;
+                        margin-top: 32px;
+                    }
+        
+                }
+            }
+        }
+    }
+}
+
+.x-scroller-button {
+    position: absolute;
+    z-index: 1;
+    width: 44px;
+    height: 100%;
+    padding: 0;
+    background-color: white;
+    border: none !important;
+    box-shadow: none !important;
+    background-repeat: no-repeat !important;
+    background-size: 30px !important;
+    background-position-y: center !important;
+    background-position-x: 6px !important;
+}
+
+.x-scroller-button-left {
+    left: 0;
+    background-image: url('images/default/arrows-left.png') !important;
+}
+
+.x-scroller-button-right {
+    right: 0;
+    background-image: url('images/default/arrows-right.png') !important;
+}
+
+.x-btn-over.x-btn-default-small.x-scroller-button-left,
+.x-btn.x-btn-disabled.x-btn-default-small.x-scroller-button-left,
+.x-btn-over.x-btn-default-small.x-scroller-button-right,
+.x-btn.x-btn-disabled.x-btn-default-small.x-scroller-button-right,
+.x-keyboard-mode .x-btn-focus.x-btn-default-small.x-scroller-button-left,
+.x-keyboard-mode .x-btn-focus.x-btn-default-small.x-scroller-button-right {
+    background: white;
+}
+
+.x-bg-default {
+    background: linear-gradient(to right, #25CBDB , #5161F1);
+}
+.x-bg-yellow {
+    background: linear-gradient(to right, #F4BF59 , #F99A50);
+}
+.x-bg-purple {
+    background: linear-gradient(to right, #946DFF , #7460FF);
+}
+.x-bg-red {
+    background: linear-gradient(to right, #FA8B86 , #F36487);
+}

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

@@ -45,16 +45,13 @@ Ext.define('saas.view.main.Main', {
                     reference: 'mainprofile',
                     arrowVisible: false,
                     ui: 'header',
+                    tooltip: '所属公司',
                     bind: {
-                        tooltip: '{company.name}',
                         text: '{company.name}'
                     },
                     menu: {
                         items: [{
                             xtype: 'menuseparator'
-                        }, {
-                            text: '退出',
-                            handler: 'onLogout'
                         }]
                     }
                 },
@@ -62,12 +59,58 @@ Ext.define('saas.view.main.Main', {
                 {
                     iconCls:'icon-usoftchina',
                     ui: 'header',
-                    tooltip: '优软云'
+                    tooltip: '优软云',
+                    handler:function(){
+					    window.open('http://www.usoftchina.com','_blank');
+                    }
                 },
                 {
                     iconCls:'x-fa fa-question',
                     ui: 'header',
-                    tooltip: '帮助'
+                    arrowVisible: false,
+                    //tooltip: '帮助',
+                    width:50, 
+                    listeners:{
+                        'mouseover':function(){
+                            this.showMenu(); 
+                        },
+                        'mouseout':function(btn,e){
+                            var cx = e.browserEvent.clientX, cy = e.browserEvent.clientY;
+                            var btnLayout = btn.el.dom.getBoundingClientRect();
+                            if(cx <= btnLayout.left || cx >= btnLayout.left+btnLayout.width || cy <= btnLayout.top) {
+                                btn.hideMenu();
+                            }
+                        },'mouseleave':function(enu){
+                            this.hide();
+                        } 
+                    },
+                    menu: {
+                        items: [{
+                            text: '新手导航',
+                            iconCls:'x-fa icon-userGuite',
+                            handler:function(){
+                               console.log("新手导航");
+                            }
+                        },{
+                            text: '用户手册',
+                            iconCls:'x-fa icon-userBook',
+                            handler:function(){
+                                console.log("用户手册");
+                            }
+                        },{
+                            text: '常见问题',
+                            iconCls:'x-fa icon-commonQuestion',
+                            handler:function(){
+                                console.log("常见问题");
+                            }
+                        },{
+                            text: '客服热线',
+                            iconCls:'x-fa icon-serviceOnline',
+                            handler:function(){
+                                console.log("客服热线");
+                            }
+                        }]
+                    }
                 },
                 {
                     ui: 'header',
@@ -77,13 +120,47 @@ Ext.define('saas.view.main.Main', {
                     }
                 },
                 {
-                    xtype: 'image',
+                    ui: 'header',
+                    arrowVisible: false,
                     cls: 'header-right-profile-image',
-                    height: 35,
-                    width: 35,
-                    bind: {
+                    height: 70,
+                    width: 70,
+                   /*  bind: {
                         src: '{avatarUrl}'
+                    }, */
+                    menu: {
+                        items: [ {  
+                            text: '账户中心',
+                            iconCls:'x-fa icon-accountCenter',
+                            handler:function(){
+                            console.log("账户中心");
+                            }
+                        },{  
+                            text: '意见反馈',
+                            iconCls:'x-fa icon-feedback',
+                            handler:function(){
+                            console.log("意见反馈");
+                            }
+                        }, {
+                            text: '退出',
+                            handler: 'onLogout'
+                        }]
+                    } ,
+                    listeners:{
+                        'mouseover':function(){
+                            this.showMenu(); 
+                        },
+                        'mouseout':function(btn,e){
+                            var cx = e.browserEvent.clientX, cy = e.browserEvent.clientY;
+                            var btnLayout = btn.el.dom.getBoundingClientRect();
+                            if(cx <= btnLayout.left || cx >= btnLayout.left+btnLayout.width || cy <= btnLayout.top) {
+                                btn.hideMenu();
+                            }
+                        },'mouseleave':function(enu){
+                            this.hide();
+                        } 
                     }
+                    
                 }
             ]
         },

+ 44 - 3
frontend/saas-web/app/view/main/Main.scss

@@ -92,6 +92,8 @@ $treelist-nav-ui: (
 
     .header-right-profile-image {
         border-radius: 20px;
+        background: url(../../../../resources/images/default/user-profile-default.png) 0 0 no-repeat;
+        background-position: center;
     }
 }
 .top-english-button {
@@ -153,9 +155,48 @@ $treelist-nav-ui: (
     height: 21px;
     background: url(../../../../resources/images/grid/check.png) 0 0 no-repeat;
 }
+body > .x-mask {
+    background-image: none;
+    background-color: rgba(142, 141, 141, 0.75);
+}
 .icon-usoftchina{
     margin-top: 0px;
-	width: 16px;
-    height: 16px;
     background: url(../../../../resources/images/nav/usoftchina.png) 0 0 no-repeat; 
-}
+   
+}
+.icon-userGuite{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/userGuite.png) 0 0 no-repeat;
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-userBook{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/userBook.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-commonQuestion{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/commonQuestion.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-serviceOnline{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/serviceOnline.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-accountCenter{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/accountCenter.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+}
+.icon-feedback{
+    margin-top: 0px;
+    background: url(../../../../resources/images/nav/feedback.png) 0 0 no-repeat; 
+    background-size: 16px 16px;
+    background-position: center;
+} 

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

@@ -21,9 +21,9 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     _unAuditUrl: '/api/money/paybalance/unAudit/',
     _deleteUrl: '/api/money/paybalance/delete/',
 
-    // _readUrl: 'http://192.168.253.129:8940/money/paybalance/read/',
+    _readUrl: 'http://192.168.253.35:8880/paybalance/read/',
     // _saveUrl: 'http://192.168.253.129:8940/money/paybalance/save/',
-    // _auditUrl: 'http://192.168.253.35:8880/paybalance/audit/',
+    _auditUrl: 'http://192.168.253.35:8880/paybalance/audit/',
     // _unAuditUrl: 'http://192.168.253.35Pb_pdamount:8880/paybalance/unAudit/',
     // _deleteUrl: 'http://192.168.253.129:8940/money/paybalance/delete/',
     
@@ -244,7 +244,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: "已核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pb_havebalance",
+            dataIndex: "pbd_havebalance",
             // editor : {
             //     xtype : "numberfield",
             //     decimalPrecision: 2
@@ -265,7 +265,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: "未核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pb_pbdamount",
+            dataIndex: "pbd_pbdamount",
             // editor : {
             //     xtype : "numberfield",
             //     decimalPrecision: 2

+ 2 - 2
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -249,7 +249,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "已核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "rbd_nowbalance",
+            dataIndex: "rbd_havebalance",
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');
@@ -266,7 +266,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "未核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "rbd_nowbalance",
+            dataIndex: "rbd_pbdamount",
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');

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

@@ -11,7 +11,7 @@ Ext.define('saas.view.money.report.AccountBalance', {
     listUrl: '/api/money/report/accountBalance',
     defaultCondition: null,
     reportTitle: '资金账户收支明细',
-    QueryWidth:0.1,
+    QueryWidth:0.2,
     //筛选:账户、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',

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

@@ -10,7 +10,7 @@ Ext.define('saas.view.money.report.PayDetail', {
     listUrl: '/api/money/report/payDetail',
     defaultCondition: null,
     reportTitle: '应付账款明细表',
-    QueryWidth:0.1,
+    QueryWidth:0.2,
     //筛选:供应商、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',

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

@@ -11,7 +11,7 @@ Ext.define('saas.view.money.report.RecDetail', {
     listUrl: '/api/money/report/recDetail',
     defaultCondition: null,
     reportTitle: '应收账款明细',
-    QueryWidth:0.1,
+    QueryWidth:0.2,
     //筛选:客户、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',

+ 13 - 8
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -11,7 +11,7 @@ Ext.define('saas.view.money.report.VendorCheck', {
     listUrl: '/api/money/report/vendorCheck',
     defaultCondition: null,
     reportTitle: '供应商对账单',
-    QueryWidth:0.1,
+    QueryWidth:0.2,
     //筛选:供应商、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
@@ -33,30 +33,35 @@ Ext.define('saas.view.money.report.VendorCheck', {
         }, {
             text: '单号',
             dataIndex: 'pi_inoutno',
-            width: 200
+            width: 180
         }, {
             text: '单据类型',
             dataIndex: 'pi_class',
-            width: 200
+            width: 180
         }, {
             text: '单据日期',
             dataIndex: 'pi_date',
-            width: 200
+            xtype:'datecolumn',
+            format:'Y-m-d'
         }, {
             text: '序号',
             dataIndex: 'pd_pdno'
         },{
             text:'供应商编号',
-            dataIndex:'pi_vendcode'
+            dataIndex:'pi_vendcode',
+            width: 180
         },{
             text:'供应商名称',
-            dataIndex:'pi_vendname'
+            dataIndex:'pi_vendname',
+            width: 180
         },{
             text: '物料编号',
-            dataIndex: 'pr_code'
+            dataIndex: 'pr_code',
+            width: 180
         }, {
             text: '物料名称',
-            dataIndex: 'pr_detail'
+            dataIndex: 'pr_detail',
+            width: 180
         }, {
             text: '物料规格',
             dataIndex: 'pr_spec'

+ 10 - 6
frontend/saas-web/app/view/stock/report/ProdinoutCount.js

@@ -11,7 +11,7 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
     listUrl: '/api/storage/report/prodinoutCount',
     defaultCondition: null,
     reportTitle: '物料收发汇总表',
-    QueryWidth:0.1,
+    QueryWidth:0.4,
     //筛选:仓库、物料、物料类型、时间			
     searchItems: [{		
         xtype: 'dbfindtrigger',
@@ -30,7 +30,7 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
         fieldLabel: '单据日期',
         format: 'YYYYMM',
        // defaultValue: new Date(),
-        columnWidth: 0.4
+        columnWidth: 0.2
     }],
     reportColumns: [{
         text: '物料类型',
@@ -57,22 +57,26 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
         columns: [{
             text: '数量',
             dataIndex:'pwm_beginqty',
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            width:100
         },{
             text: '成本',
             dataIndex:'pwm_beginamount',
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            width:100
         }]
     }, {
         text: '入库合计',
         columns: [{
             text: '数量',
             dataIndex:'pwm_nowinqty',
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            width:100
         },{
             text: '成本',
             dataIndex:'pwm_nowinamount',
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            width:100
         }]
     }, {
         text: '出库合计',

+ 83 - 0
frontend/saas-web/app/view/sys/guide/FormPanel.js

@@ -0,0 +1,83 @@
+Ext.define('saas.view.sys.guide.FormPanel', {
+    extend: 'Ext.panel.Panel',
+    xtype: 'sys-guide-formpanel',
+
+    layout:'fit',
+
+    cls:'x-guide-background',
+
+    // bodyStyle: {
+    //     background: 'url(resources/images/guide/background.png)'
+    // },
+
+    initComponent: function () {
+        var me = this;
+		var view = new Ext.DataView({
+            style:"margin:7% 0 7% 0;",
+			tpl : new Ext.XTemplate(
+				'<div class="x-guide-panel" align ="center">',
+                    '<div class="x-guide-item" align ="center" >',
+                        '<img cls="afterLine" src="resources/images/guide/baseSet.png" style="margin:0 185px 0 0;" align ="center" width="135" height="90" data-qtip="基础设置" alt="基础设置" onClick="" >',
+                        '<img src="resources/images/guide/warehouse.png" style="margin:0 185px 0 0;" align ="center" width="135" height="90" data-qtip="仓库资料" alt="仓库资料" onClick="" >',
+                        '<img src="resources/images/guide/product.png" align ="center" width="135" height="90" data-qtip="物料资料" alt="物料资料" onClick="" >',
+                    '</div>',
+                    '<div class="x-guide-item" align ="center">',
+                        '<img src="resources/images/guide/1.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" >',
+                        '<img src="resources/images/guide/2.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" >',
+                        '<img src="resources/images/guide/3.png" style="margin: -20px 0px 0 0;" align ="center" width="32" height="32" >',
+                    '</div>',
+                    '<div class="x-guide-item" align ="center">',
+                        '<span  style="margin:0 270px 0px 0;" align ="center"  >基础设置</span>',
+                        '<span  style="margin:0 270px 0px 0;" align ="center" >仓库资料</span>',
+                        '<span  style="margin:0 0px 0px 0;" align ="center"  >物料资料</span>',
+                    '</div>',
+                    '<div class="x-guide-item" align ="center">',
+                        '<img src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
+                        '<img src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
+                        '<img src="resources/images/guide/point.png" style="margin: 2px 0px 0 0;" align ="center" width="16" height="16" >',
+                        "<br>",
+                        '<div class="x-guide-line"  height="1"  style="border:1px solid #E4F7FF;margin: -9px 0 0 0;width: 654px !important;" align ="center"></div>',
+                    '</div>',
+                    '<div class="x-guide-item" align ="center">',
+                        '<img src="resources/images/guide/customer.png" style="margin:50px 185px 0 0;" align ="center" width="135" height="90" data-qtip="客户资料" alt="客户资料" onClick="" >',
+                        '<img src="resources/images/guide/vendor.png" style="margin:50px 185px 0 0;" align ="center" width="135" height="90" data-qtip="供应商资料" alt="供应商资料" onClick="" >',
+                        '<img src="resources/images/guide/begin.png" style="margin:50px 0 0 0;" align ="center" width="135" height="90" data-qtip="开始使用" alt="开始使用" onClick="" >',
+                    '</div>',
+                    '<div class="x-guide-item" align ="center">',
+                        '<img src="resources/images/guide/4.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" >',
+                        '<img src="resources/images/guide/5.png" style="margin: -20px 290px 0 0;" align ="center" width="32" height="32" >',
+                        '<img src="resources/images/guide/6.png" style="margin: -20px 0px 0 0;" align ="center" width="32" height="32" >',
+                    '</div>',
+                    '<div class="x-guide-item" align ="center">',
+                        '<span  style="margin:0 265px 100px 0;" align ="center"  >客户资料</span>',
+                        '<span  style="margin:0 265px 100px 0;" align ="center" >供应商资料</span>',
+                        '<span  style="margin:0 0px 100px 0;" align ="center"  >开始使用</span>',
+                    '</div>',
+                    '<div class="x-guide-item" align ="center">',
+                        '<img src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
+                        '<img src="resources/images/guide/point.png" style="margin: 2px 306px 0 0;" align ="center" width="16" height="16" >',
+                        '<img src="resources/images/guide/point.png" style="margin: 2px 0px 0 0;" align ="center" width="16" height="16" >',
+                        "<br>",
+                        '<div class="x-guide-line"  height="1"  style="border:1px solid #E4F7FF;margin: -9px 0 0 0;width: 654px !important;" align ="center"></div>',
+                    '</div>',
+				'</div>'
+			),
+			trackOver: true,
+			overItemCls : 'x-module-over',
+			selectedClass : 'selected',
+			singleSelect : true,
+			itemSelector : '.x-module-item'
+		});
+		
+		Ext.apply(me,{
+			items:[view]
+		});
+		me.view = view;
+        me.callParent(arguments);
+    },
+
+    refresh:function(){
+        this.ownerCt.setTitle('新手指引')
+    }
+
+});

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

@@ -15,6 +15,7 @@ Ext.define('saas.view.sys.power.FormPanel', {
     frame:true,
     layout: 'border',
     autoScroll: true,
+    saveUrl:'/api/account/role/save/bind/resource',
 
     items: [{
         title:'角色列表',

+ 115 - 43
frontend/saas-web/app/view/sys/power/FormPanelController.js

@@ -8,59 +8,131 @@ Ext.define('saas.view.sys.power.FormPanelController', {
     init: function (form) {
         var me = this;
         this.control({
-            'button[name=save]':{
-                click:function(){
-                    me.onSave();
+            'button[name=savepower]':{
+                click:function(b){
+                    me.onSave(b);
                 }
             }
         });
     },
 
-    onSave: function() {
+    onSave: function(b) {
         var me = this,
-        form = this.getView();
+        form = me.getView(),
+        viewModel = me.getViewModel(),
+        updateRecs = viewModel.data.powergrid.getUpdatedRecords();
 
-        var valid = form.isValid();
-        if(!valid) {
-            showToast('表单校验有误,请检查');
-            return false;
+        if(updateRecs.length>0){
+            var params = {};
+            var roleId = b.ownerCt.ownerCt.initId;//角色ID
+            params.roleId = roleId;
+            var datas = [];
+            Ext.Array.each(updateRecs,function(rec){
+                var modified = rec.modified;
+                if(modified){
+                    var modifyDatas = me.getBaseField(modified,rec.get('groupId'),rec.data);
+                    datas = datas.concat(modifyDatas);
+                }
+                //收集other
+                var other = rec.get('other');
+                if(other&&other!=null){
+                    Ext.Array.each(other,function(o){
+                        datas.push({
+                            classify:'other',
+                            checked:o.checked,
+                            resourceId:o.resourceId
+                        });
+                    });
+                }
+            })
+            params.powerSetList = datas;
+
+            me.BaseUtil.request({
+                url: form.saveUrl,
+                params: JSON.stringify(params),
+                method: 'POST',
+            })
+            .then(function(localJson) {
+                if(localJson.success){
+                    showToast('保存成功');
+                    viewModel.data.powergrid.load();
+                }
+            })
+            .catch(function(res) {
+                console.error(res);
+                showToast('保存失败: ' + res.message);
+            });
+        }else{
+            showToast('没有修改数据,请修改后保存');
         }
+    },
 
-        if(form.getForm().wasDirty==false){
-            showToast('未修改数据,请修改后保存');
-            return false;
+    getBaseField:function(modified,groupId,data){
+        var powerSetList = [];
+        if((typeof modified.add) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'add',
+                checked:data['add']
+            })
         }
-        
-        viewModel = me.getViewModel();
-        var formData = viewModel.data;
-        formData.en_name = null;
-        formData.updateTime = null;
-        me.BaseUtil.request({
-            url: form._saveUrl,
-            params: JSON.stringify(formData),
-            method: 'POST',
-        })
-        .then(function(localJson) {
-            if(localJson.success){
-                showToast('保存成功');
-                viewModel = form.getViewModel();
-                var url = form._readUrl;
-                form.BaseUtil.request({url })
-                .then(function(res) {
-                    if(res.success) {
-                        var d = res.data;
-                        viewModel.setData(d)
-                    }
-                })
-                .catch(function(response) {
-                    console.error(response);
-                });
-            }
-        })
-        .catch(function(res) {
-            console.error(res);
-            showToast('保存失败: ' + res.message);
-        });
+        if((typeof modified.query) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'query',
+                checked:data['query']
+            })
+        }
+        if((typeof modified.delete) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'delete',
+                checked:data['delete']
+            })
+        }
+        if((typeof modified.audit) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'audit',
+                checked:data['audit']
+            })
+        }
+        if((typeof modified.update) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'update',
+                checked:data['update']
+            })
+        }
+        if((typeof modified.unAudit) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'unAudit',
+                checked:data['unAudit']
+            })
+        }
+        if((typeof modified.fileExport) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'fileExport',
+                checked:data['fileExport']
+            })
+        }
+        if((typeof modified.fileImport) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'fileImport',
+                checked:data['fileImport']
+            })
+        }
+        if((typeof modified.print) == 'boolean'){
+            powerSetList.push({
+                groupId:groupId,
+                classify:'print',
+                checked:data['print']
+            })
+        }
+        return powerSetList;
     }
 
 });

+ 16 - 1
frontend/saas-web/app/view/sys/power/GroupGrid.js

@@ -15,7 +15,17 @@ Ext.define('saas.view.sys.power.GroupGrid', {
     bind:{
         store: '{powergrid}'
     },
+    tools:[{
+        xtype:'button',				
+        text:'保存',
+        name:'savepower',
+        margin:'0 0 0 2',
+        style:'background:#da8282;border-color:#cccccc'
+    }],
     features : [Ext.create('Ext.grid.feature.Grouping',{
+        collapseTip:null,
+        collapsible:false,
+        expandTip:null,
 		showSummaryRow: true,
         startCollapsed: false,
         groupHeaderTpl: '{name}'+'模块'
@@ -24,6 +34,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
     dataUrl:'http://192.168.253.31:8560/api/account/role/power/resource',
     selModel:Ext.create('Ext.selection.CheckboxModel', {
         checkOnly: true,
+        showHeaderCheckbox:false,
         listeners: {
             'select': function (selModel, record) {
                 selModel.view.ownerCt.selectAllPower(record);
@@ -148,7 +159,11 @@ Ext.define('saas.view.sys.power.GroupGrid', {
                 {name: 'fileImport', type: 'bool'},
                 {name: 'print', type: 'bool'},
                 {name: 'other', calculate: function(data) {
+                    var groupId = data['groupId'];
                     var other = data['other'];
+                    Ext.Array.each(other,function(o){
+                        o.groupId=groupId;
+                    })
                     return other;
                 }}
             ],
@@ -210,7 +225,7 @@ Ext.define('saas.view.sys.power.GroupGrid', {
         var other=record.get('other');
         Ext.Array.each(other,function(o){
             o.checked=bool;
-        })
+        });
         data.other = other;
         data.id = record.get('id');
         data.groupId = record.get('groupId');

+ 21 - 1
frontend/saas-web/app/view/sys/power/OtherField.js

@@ -24,7 +24,27 @@ Ext.define('saas.view.sys.power.OtherField', {
             for (i = 0; i < len; i++) {
                 items.push({
                    boxLabel:v[i].name,
-                   checked:v[i].checked
+                   checked:v[i].checked,
+                   groupId:v[i].groupId,
+                   listeners:{
+                       change:function(f,v){
+                           var id = f.groupId;
+                           var boxLabel = f.boxLabel;
+                           var viewModel = f.ownerCt.ownerCmp.ownerCt.ownerCt.getViewModel();
+                           var records = viewModel.data.powergrid.getData().items;
+                           for (i = 0; i < records.length; i++) {
+                                if(records[i].get('groupId')==id){
+                                    var other = records[i].get('other');
+                                    Ext.Array.each(other,function(o){
+                                        if(boxLabel==o.name){
+                                            o.checked = v
+                                        }
+                                    });
+                                    records[i].dirty = true
+                                }
+                           }
+                       }
+                   }
                 });
             }
             this.add(items);

+ 4 - 2
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/dataview/Abstract.js

@@ -3,9 +3,11 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.dataview.Abstract', {
-    override: 'Ext.dataview.Abstract',
+    // override: 'Ext.view.AbstractView',
 
     config:{
+        emptyText: '没有数据',
         loadingText: '加载中...'
-    }
+    },
+
 });

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/dataview/EmptyText.js

@@ -3,7 +3,7 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.dataview.EmptyText', {
-    override: 'Ext.dataview.EmptyText',
+    // override: 'Ext.dataview.EmptyText',
 
     config: {
         html: '没有数据'

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/dataview/List.js

@@ -3,7 +3,7 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.dataview.List', {
-    override: 'Ext.dataview.List',
+    // override: 'Ext.dataview.List',
 
     config:{
         loadingText: '加载中...'

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/dataview/plugin/ListPaging.js

@@ -3,7 +3,7 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.dataview.plugin.ListPaging', {
-    override: 'Ext.dataview.plugin.ListPaging',
+    // override: 'Ext.dataview.plugin.ListPaging',
 
     config: {
         loadMoreText: '加载更多',

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/FileButton.js

@@ -3,7 +3,7 @@
  * 2018年3月12日
  */
 Ext.define('Ext.locale.zh_CN.field.FileButton', {
-    override: 'Ext.field.FileButton',
+    override: 'Ext.form.field.FileButton',
 
     config: {
         text: '浏览...'

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/grid/menu/GroupByThis.js

@@ -3,7 +3,7 @@
  * 2017年10月16日
  */
 Ext.define('Ext.locale.zh_CN.grid.menu.GroupByThis', {
-    override: 'Ext.grid.menu.GroupByThis',
+    // override: 'Ext.grid.menu.GroupByThis',
 
     config: {
         text: '按该字段分组'

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/grid/menu/ShowInGroups.js

@@ -3,7 +3,7 @@
  * 2017年10月16日
  */
 Ext.define('Ext.locale.zh_CN.grid.menu.ShowInGroups', {
-    override: 'Ext.grid.menu.ShowInGroups',
+    // override: 'Ext.grid.menu.ShowInGroups',
 
     config: {
         text: '以分组形式显示'

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/panel/Collapser.js

@@ -3,7 +3,7 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.panel.Collapser', {
-    override: 'Ext.panel.Collapser',
+    // override: 'Ext.panel.Collapser',
 
     config:{
         collapseToolText: "收起面板",

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/panel/Date.js

@@ -3,7 +3,7 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.panel.Date', {
-    override: 'Ext.panel.Date',
+    // override: 'Ext.panel.Date',
 
     config: {
         nextText: '下个月 (Ctrl + ->)',

+ 1 - 1
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/picker/Picker.js

@@ -3,7 +3,7 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.picker.Picker', {
-    override: 'Ext.picker.Picker',
+    // override: 'Ext.picker.Picker',
 
     config: {
         doneButton: '完成',

BIN
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.eot


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.svg


BIN
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.ttf


BIN
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.woff


+ 9 - 3
frontend/saas-web/packages/font-saas/sass/etc/icons.scss

@@ -1,6 +1,7 @@
+
 .sa-purchase:before { content: "\e613"; }
 
-.sa-weibiaoti1:before { content: "\e669"; }
+.sa-weibiaoti1:before { content: "\ef04"; }
 
 .sa-document:before { content: "\e654"; }
 
@@ -10,10 +11,15 @@
 
 .sa-sale:before { content: "\e638"; }
 
+.sa-arrows-left:before { content: "\ef02"; }
+
 .sa-warehouse:before { content: "\e63c"; }
 
 .sa-setting:before { content: "\e64b"; }
 
-.sa-saas:before { content: "\e769"; }
+.sa-saas:before { content: "\ef03"; }
+
+.sa-money:before { content: "\e6fa"; }
+
+.sa-arrows-right:before { content: "\ef01"; }
 
-.sa-money:before { content: "\e6fa"; }

BIN
frontend/saas-web/resources/images/default/arrows-left.png


BIN
frontend/saas-web/resources/images/default/arrows-right.png


BIN
frontend/saas-web/resources/images/guide/1.png


BIN
frontend/saas-web/resources/images/guide/2.png


BIN
frontend/saas-web/resources/images/guide/3.png


BIN
frontend/saas-web/resources/images/guide/4.png


BIN
frontend/saas-web/resources/images/guide/5.png


BIN
frontend/saas-web/resources/images/guide/6.png


BIN
frontend/saas-web/resources/images/guide/background.png


BIN
frontend/saas-web/resources/images/guide/baseSet.png


BIN
frontend/saas-web/resources/images/guide/begin.png


BIN
frontend/saas-web/resources/images/guide/customer.png


BIN
frontend/saas-web/resources/images/guide/point.png


BIN
frontend/saas-web/resources/images/guide/product.png


BIN
frontend/saas-web/resources/images/guide/vendor.png


BIN
frontend/saas-web/resources/images/guide/warehouse.png


BIN
frontend/saas-web/resources/images/nav/accountCenter.png


BIN
frontend/saas-web/resources/images/nav/feedback.png


BIN
frontend/saas-web/resources/images/nav/serviceOnline.png


BIN
frontend/saas-web/resources/images/nav/userBook.png


BIN
frontend/saas-web/resources/images/nav/userGuite.png


+ 5 - 0
frontend/saas-web/resources/json/navigation.json

@@ -284,6 +284,11 @@
     "items": [{
         "text": "系统设置",
         "items": [{
+            "id":"sys-guide-formpanel",
+            "text": "新手导航",
+            "viewType": "sys-guide-formpanel",
+            "leaf": true
+        }, {
             "id":"sys-config-formpanel",
             "text": "系统参数",
             "viewType": "sys-config-formpanel",

Некоторые файлы не были показаны из-за большого количества измененных файлов