Browse Source

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

zhuth 7 years ago
parent
commit
d3f4cdf5f2
47 changed files with 649 additions and 99 deletions
  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. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java
  6. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java
  7. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java
  8. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  9. 1 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  10. 1 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  11. 39 5
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  12. 1 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  13. 39 6
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml
  14. 44 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetDTO.java
  15. 25 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetListDTO.java
  16. 13 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/RoleController.java
  17. 9 3
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleResourceMapper.java
  18. 9 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/OtherPower.java
  19. 19 9
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/RoleResource.java
  20. 8 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/RoleService.java
  21. 52 9
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/RoleServiceImpl.java
  22. 13 2
      base-servers/account/account-server/src/main/resources/mapper/RoleResourceMapper.xml
  23. 89 1
      base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java
  24. 3 1
      base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java
  25. 1 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  26. 5 2
      frontend/saas-web/app/view/document/kind/ChildForm.js
  27. 5 1
      frontend/saas-web/app/view/main/Main.scss
  28. 83 0
      frontend/saas-web/app/view/sys/guide/FormPanel.js
  29. 1 0
      frontend/saas-web/app/view/sys/power/FormPanel.js
  30. 115 43
      frontend/saas-web/app/view/sys/power/FormPanelController.js
  31. 16 1
      frontend/saas-web/app/view/sys/power/GroupGrid.js
  32. 21 1
      frontend/saas-web/app/view/sys/power/OtherField.js
  33. BIN
      frontend/saas-web/resources/images/guide/1.png
  34. BIN
      frontend/saas-web/resources/images/guide/2.png
  35. BIN
      frontend/saas-web/resources/images/guide/3.png
  36. BIN
      frontend/saas-web/resources/images/guide/4.png
  37. BIN
      frontend/saas-web/resources/images/guide/5.png
  38. BIN
      frontend/saas-web/resources/images/guide/6.png
  39. BIN
      frontend/saas-web/resources/images/guide/background.png
  40. BIN
      frontend/saas-web/resources/images/guide/baseSet.png
  41. BIN
      frontend/saas-web/resources/images/guide/begin.png
  42. BIN
      frontend/saas-web/resources/images/guide/customer.png
  43. BIN
      frontend/saas-web/resources/images/guide/point.png
  44. BIN
      frontend/saas-web/resources/images/guide/product.png
  45. BIN
      frontend/saas-web/resources/images/guide/vendor.png
  46. BIN
      frontend/saas-web/resources/images/guide/warehouse.png
  47. 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" >

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

@@ -71,4 +71,6 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_auditman;
 
+    private String pi_remark;
+
 }

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

@@ -71,6 +71,8 @@ public class ProdInOutListDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_auditman;
 
+    private String pi_remark;
+
     private Long pd_piid;
 
     private String pd_inoutno;

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

@@ -66,4 +66,6 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_auditman;
 
+    private String pi_remark;
+
 }

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

@@ -70,6 +70,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_auditman;
 
+    private String pi_remark;
+
     private Long pd_piid;
 
     private String pd_inoutno;

+ 1 - 6
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

@@ -378,12 +378,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
     private void checkUpdateQty(String pu_code, String pi_class) {
         int count = 0;
-        if ("采购验收单".equals(pi_class)) {
-            count = getMapper().checkQtyFromPurchase(pu_code);
-            if (count>0){
-                throw new BizException(500, "明细行数量超过来源采购单明细行数量");
-            }
-        } else if ("采购验退单".equals(pi_class)) {
+        if ("采购验退单".equals(pi_class)) {
             count = getMapper().checkQtyFromProdIn(pu_code);
             if (count>0){
                 throw new BizException(500, "明细行数量超过来源采购验收单明细行数量");

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

@@ -32,6 +32,7 @@
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
     <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
     <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />

+ 39 - 5
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -34,6 +34,7 @@
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
 
 
   </resultMap>
@@ -47,7 +48,8 @@
     pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
     pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
     pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
-    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5
+    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
+    pi_auditman,pi_remark
   </sql>
   <sql id="Blob_Column_List">
     pi_address
@@ -162,6 +164,15 @@
       <if test="pi_address != null">
         pi_address,
       </if>
+      <if test="pi_auditdate != null">
+        pi_auditdate,
+      </if>
+      <if test="pi_auditman != null">
+        pi_auditman,
+      </if>
+      <if test="pi_remark != null">
+        pi_remark,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -255,6 +266,16 @@
       <if test="pi_address != null">
         #{pi_address,jdbcType=LONGVARCHAR},
       </if>
+      <if test="pi_auditdate != null">
+        #{pi_auditdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_auditman != null">
+        #{pi_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_remark != null">
+        #{pi_remark,jdbcType=VARCHAR},
+      </if>
+
     </trim>
   </insert>
 
@@ -351,7 +372,15 @@
       <if test="pi_address != null">
         pi_address = #{pi_address,jdbcType=LONGVARCHAR},
       </if>
-
+      <if test="pi_auditdate != null">
+        pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_auditman != null">
+        pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_remark != null">
+        pi_remark = #{pi_remark,jdbcType=VARCHAR},
+      </if>
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
@@ -386,8 +415,10 @@
       pi_text3 = #{pi_text3,jdbcType=VARCHAR},
       pi_text4 = #{pi_text4,jdbcType=VARCHAR},
       pi_text5 = #{pi_text5,jdbcType=VARCHAR},
-      pi_address = #{pi_address,jdbcType=LONGVARCHAR}
-
+      pi_address = #{pi_address,jdbcType=LONGVARCHAR},
+      pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      pi_remark = #{pi_remark,jdbcType=VARCHAR}
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
@@ -420,7 +451,10 @@
       pi_text2 = #{pi_text2,jdbcType=VARCHAR},
       pi_text3 = #{pi_text3,jdbcType=VARCHAR},
       pi_text4 = #{pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{pi_text5,jdbcType=VARCHAR}
+      pi_text5 = #{pi_text5,jdbcType=VARCHAR},
+      pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      pi_remark = #{pi_remark,jdbcType=VARCHAR}
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
 

+ 1 - 1
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java

@@ -432,7 +432,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             prodIODetail.setPd_ordercode(make.getMa_code());    //订单号
             prodIODetail.setPd_orderdetno(1);  //订单序号
             prodIODetail.setPd_prodid(make.getMa_prodid());    //物料ID
-            prodIODetail.setPd_prodcode(make.getMa_code()); //物料CODE
+            prodIODetail.setPd_prodcode(make.getMa_prodcode()); //物料CODE
             prodIODetail.setPd_outqty(make.getMa_qty());        //出库数
             prodIODetail.setPd_price(make.getMa_price());       //成本单价 ???
             prodIODetail.setPd_total(make.getMa_total());      //金额

+ 39 - 6
applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -34,7 +34,7 @@
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
-
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
 
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
@@ -47,7 +47,8 @@
     pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
     pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
     pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
-    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5
+    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
+    pi_auditman,pi_remark
   </sql>
   <sql id="Blob_Column_List">
     pi_address
@@ -162,6 +163,15 @@
       <if test="pi_address != null">
         pi_address,
       </if>
+      <if test="pi_auditdate != null">
+        pi_auditdate,
+      </if>
+      <if test="pi_auditman != null">
+        pi_auditman,
+      </if>
+      <if test="pi_remark != null">
+        pi_remark,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -255,6 +265,15 @@
       <if test="pi_address != null">
         #{pi_address,jdbcType=LONGVARCHAR},
       </if>
+      <if test="pi_auditdate != null">
+        #{pi_auditdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_auditman != null">
+        #{pi_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_remark != null">
+        #{pi_remark,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
 
@@ -351,7 +370,15 @@
       <if test="pi_address != null">
         pi_address = #{pi_address,jdbcType=LONGVARCHAR},
       </if>
-
+      <if test="pi_auditdate != null">
+        pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_auditman != null">
+        pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_remark != null">
+        pi_remark = #{pi_remark,jdbcType=VARCHAR},
+      </if>
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
@@ -386,8 +413,10 @@
       pi_text3 = #{pi_text3,jdbcType=VARCHAR},
       pi_text4 = #{pi_text4,jdbcType=VARCHAR},
       pi_text5 = #{pi_text5,jdbcType=VARCHAR},
-      pi_address = #{pi_address,jdbcType=LONGVARCHAR}
-
+      pi_address = #{pi_address,jdbcType=LONGVARCHAR},
+      pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      pi_remark = #{pi_remark,jdbcType=VARCHAR}
     where pi_id = #{pi_id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.storage.po.ProdInOut">
@@ -420,7 +449,11 @@
       pi_text2 = #{pi_text2,jdbcType=VARCHAR},
       pi_text3 = #{pi_text3,jdbcType=VARCHAR},
       pi_text4 = #{pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{pi_text5,jdbcType=VARCHAR}
+      pi_text5 = #{pi_text5,jdbcType=VARCHAR},
+      pi_address = #{pi_address,jdbcType=LONGVARCHAR},
+      pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      pi_remark = #{pi_remark,jdbcType=VARCHAR}
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
 

+ 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);
 }

+ 3 - 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());
@@ -115,6 +115,8 @@ public class FileController {
     private void download(FileInfo info, HttpServletResponse response) throws Exception{
         response.setContentType("application/force-download");
         if (info.isFolder()) {
+            response.setHeader("Content-disposition",
+                    "attachment; filename=" + URLEncoder.encode(info.getName() + ".zip", "UTF-8"));
             // 压缩后下载
             try (ArchiveOutputStream out = new ZipArchiveOutputStream(response.getOutputStream());) {
                 cascadeOutput(info, null, out);

+ 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:{

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

@@ -155,6 +155,10 @@ $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;
     background: url(../../../../resources/images/nav/usoftchina.png) 0 0 no-repeat; 
@@ -195,4 +199,4 @@ $treelist-nav-ui: (
     background: url(../../../../resources/images/nav/feedback.png) 0 0 no-repeat; 
     background-size: 16px 16px;
     background-position: center;
-} 
+} 

+ 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);

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


+ 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",